Refinement of direct two-limb posit decoding #
The two-limb backend inspects a packed 128-bit code without first rebuilding an arbitrary-precision natural. This module proves each primitive observation (zero detection, individual bits, regime length, fields, and the resulting dyadic value) equal to the exact-width posit model.
The proofs are separate from Decode.Runtime, so importing the decoder does not import these
dependencies. Arithmetic refinements use toDyadic?_eq_model for stored words and the
continuation laws for kernels that consume native significands directly.
The fixed-limb zero test is exactly mathematical equality with zero.
Native two-limb bit inspection agrees with natural-number bit inspection.
Two-limb low-bit extraction is exact at every zero-extended width.
Native two-limb logarithmic zero counting agrees with the exact model scan.
Two-limb and reference-model regime scans return the same run length.
The direct candidate decoder always clears the sign field.
Reducing a full-carrier two's complement to the format width yields exact-width subtraction.
Both magnitude extraction and sign restoration use this identity.
The total two-limb decoder agrees with Model.toDyadic? on every in-range word.
Projecting a carrier-valued two-input decoder agrees with an exact mathematical continuation whenever the carrier continuation satisfies the supplied pointwise refinement law.
Native binary kernels retain UInt128 significands; their refinements use the corresponding
Nat values.
Eliminating three native words is the nested exact-dyadic decoder.
The runtime continuation receives fixed-width significands while the theorem exposes their mathematical values to proof-facing clients.