Verified fixed-limb significand products #
mul128_toNat proves exact 128 × 128 → 256 multiplication using the mul64_toNat theorem
from Core.Proof.UInt128. The addition theorems reconstruct the exact sum from its low limbs
and outgoing carry. The UInt256 lemmas describe widening, projection, and leading-bit selection.
The natural-number interpretation determines every limb of a four-word value.
theorem
FloatLib.Numerics.FixedWord.addCarry64_carry_le_one
(x y carry : UInt64)
(hcarry : carry.toNat ≤ 1)
:
The outgoing carry from addCarry64 is a bit when the incoming carry is a bit.
theorem
FloatLib.Numerics.FixedWord.add128_value_toNat_of_lt
(x y : UInt128)
(hfit : x.toNat + y.toNat < 2 ^ 128)
:
The low two limbs of add128 contain the ordinary sum whenever that sum fits in 128 bits.
This is the common refinement fact needed by fixed-limb midpoint, significand, and remainder
kernels. Keeping it next to add128 avoids backend-local copies of the same carry argument.