Can anyone explain the math behind this one? I mean, if the normal image is made up by summing the two values from each half of a dual pixel, which each collect half the light, how is it better than just halving brightness in the original image?

The only way I could see it helping is if the file format runs out of bits to store the max value from combining the dual pixels. That is the case for jpegs which drop some of the highlight detail, but I'd be surprised if it is the case for regular RAW files.

Each half-pixel is going through an analog-to-digital converter and ends up in a 14 bit memory slot as a number between 0 and 16383, for example 8375 being 10 0000 1011 0111 and 8402 being 10 0000 1101 0010. The two half-pixels are then added together into a new 14 bit memory slot, 8375+8402=16777 or 100 0001 1000 1001 which wouldn't fit in 14 bits. The value is clamped to largest number you can encode with 14 bits: 16383=11 1111 1111 1111. Blown higlight.

If you have dual pixel raw turned on, you'd have two pictures in your .CR2, one with blown hilights being clamped to 11 1111 1111 1111 and one with 10 0000 1101 0010. The number of extra stops of hilights is 0.034285: (ln(16777)-ln(16383))/ln(2)

The largest gain from this is when you almost blow out both half-pixels: 11 1111 1111 1110+11 1111 1111 1110=111 1111 1111 1100 (3276 in decimal) which gives .9999 stops extra hilight detail which means very close to double the brightness recorded. The math behind the number of stops: (ln(32764)-ln(16383))/ln(2) ≃ .999912

In short, as long as your hilights are at most blown by just a hair under a stop, this would make them recoverable, albeit with a minor parallax shift. Anything over 1 stop would still give an extra stop of hilights in the gradient towards the blown-out region.

Canon could implement this hilight recovery directly in camera, if they were to add a 15th bit to the .CR2 format.

But then, the .CR2 format also wastes a few bits on a non-zero black point (which is really good for shadow denoise) so we wouldn't get 15 bits of DR just like that.