TorchLean API

FloatLib.Floats.Formats.P3109.Conversion.Proof

P3109 conversion proofs #

These theorems expose the executable equations, connect conversion output to the proved round-then-saturate projection semantics, and discharge the declared quantizer contract.

@[simp]

Every P3109 conversion is the policy-selected projection with its computed status.

Finite conversion goes through the exact rational projection ofRat.

@[simp]

Converting an infinity follows the P3109 projection policy.

@[simp]

Converting an exceptional value follows the P3109 projection policy.

Decoding a conversion result yields the proved P3109 round-then-saturate datum.

run meets the quantizer contract spec: word, status, and decoded datum.

theorem FloatLib.Floats.ExecFloat.P3109.Conversion.spec_iff_eq_run {format : Formats.P3109.Format} (policy : Formats.P3109.ProjectionPolicy) (input : Numerics.NumericalValue ℚ) (outcome : ConversionOutcome (P3109 format)) :
spec policy input outcome ↔ outcome = run policy input

An outcome meets spec exactly when it is the outcome of run, status included.

Any successful outcome admitted by the contract denotes the policy-selected datum.

@[simp]

The installed P3109 exact decoder is decodeRat.