TorchLean API

FloatLib.Floats.Formats.Posit.Semantics.Exact.Proof

Correctness properties of exact posit semantics #

The complete and partial rational decoders preserve zero and finite fields, identify NaR exactly, and agree with the shared dyadic decoder used by integer arithmetic kernels.

This is the semantic junction between user-facing rational meanings and implementation-facing dyadics. Proving the agreement once lets order, rounding, and arithmetic developments choose the more convenient exact representation without creating parallel definitions of what a posit word means.

@[simp]

Forgetting exact zero produces finite rational zero.

@[simp]

Forgetting decoded finite fields preserves their exact rational value.

@[simp]

The optional rational view maps exact zero to rational zero.

@[simp]

The optional rational view preserves decoded finite fields exactly.

@[simp]

The optional rational view is unavailable for NaR.

The rational and shared-dyadic decoders commute.

Integer kernels may therefore prove their rounding behavior in Numerics.Dyadic and reuse the result against the public rational specification.

@[simp]

Decoding the canonical zero word produces finite rational zero.

@[simp]

Decoding the unique NaR word produces the common notAReal exception.

@[simp]

The optional exact-rational semantics of the canonical zero word is zero.

@[simp]

The optional exact-rational semantics of the unique NaR word is unavailable.

An exact rational is unavailable precisely for the unique NaR word.