Correctness of width-generic finite arithmetic #
The executable arbitrary-precision kernels live in Kernel.Runtime. This module proves that the
compact field-scale implementations agree with the exact dyadic specifications and installs the
verified compiler substitutions.
Negating a conventional IEEE value flips only the decoded sign.
The dyadic of a component triple carries the component sign.
The dyadic of a component triple has the component mantissa as significand.
For a nonzero mantissa, the dyadic exponent is the descriptor-adjusted component exponent.
Scalar finite decoding is extensionally equal to binding the component decoder.
The unsigned finite scale denotes the same signed exponent as the public decoder.
Adding nonzero components with the same sign and exponent reduces to one product-round call.
The scale is derived entirely from the format descriptor, so fixed-width backends do not need their own binary32, binary64, or binary128 versions of this argument.
Compact decoding produces exactly the same finite dyadic as toDyadic?.
Finite component addition is commutative for every format descriptor.
Unsigned-scale finite addition is extensionally equal to the public component operation.
Compile finite addition through unsigned scale alignment on conventional IEEE formats.
Compact finite addition equals the public exact-dyadic finite path.
The compact finite multiplication kernel equals the public exact-dyadic finite path.
The compact finite division kernel equals the public exact-dyadic finite path.
Unsigned-scale FMA is extensionally equal to the public exact component operation.
An aligned same-sign FMA reduces to one product-round call for every IEEE binary format.
The caller supplies the significand alignment width. The exponent offset remains descriptor derived, so binary32, binary64, binary128, and custom IEEE descriptors share this proof.
Compile finite FMA through the verified unsigned-scale implementation on IEEE formats.
The compact finite FMA kernel equals the public exact-dyadic finite path.
Scalar-field addition agrees with component addition.
The scalar-field addition entry point preserves add?.
Compile finite addition through the scalar decoder.
The scalar-field multiplication entry point preserves mul?.
Compile finite multiplication through the scalar decoder.
The scalar-field division entry point preserves div?.
Compile finite division through the scalar decoder.
Scalar-field FMA agrees with component FMA.
The scalar-field FMA entry point preserves fma?.
The straight-line decoder agrees with the continuation decoder.
Compile finite FMA through the scalar decoder.