TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Sign.Proof

Bit preservation and datum semantics of decimal sign operations #

Decimal sign replacement preserves every payload bit, including in noncanonical words. Decoding commutes with sign replacement, negation, absolute value, and sign copying for every codec.

Reversing a finite sign negates the exact rational, including at zero.

@[simp]

All bits below the sign are unchanged, even for noncanonical words.

Decoding sign replacement preserves the coefficient, quantum and NaN metadata. This holds for every codec and every word, without a canonicality hypothesis.