Arithmetic semantics of fixed-width signed integers #
These are the carrier-level correctness lemmas for wrapping, checked, and saturating signed
arithmetic. They connect overflow predicates and BitVec operations to ordinary integer sums,
differences, and products.
The file deliberately stops short of the library-wide operation interface. Refinement builds
that reusable layer from these concrete facts, which keeps low-level overflow reasoning out of
generic numerical proofs.
@[simp]
theorem
FloatLib.Numerics.Representations.FixedInt.toInt_saturatingSub
{width : ℕ}
(hwidth : 0 < width)
(left right : FixedInt width)
:
Saturating subtraction denotes exact subtraction followed by signed-range clamping.
@[simp]
theorem
FloatLib.Numerics.Representations.FixedInt.toInt_saturatingMul
{width : ℕ}
(hwidth : 0 < width)
(left right : FixedInt width)
:
Saturating multiplication denotes exact multiplication followed by signed-range clamping.