TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Elementary.Proof

Real correctness of configured natural posit functions #

The configured operations inherit the model's real-rounding theorem at every supported width. The Minus1 and Plus1 statements include the exact subtraction or addition in the value being rounded.

@[simp]

Configured exponential refines the model operation.

@[simp]

Configured exponential minus one refines the model operation.

@[simp]

Configured logarithm refines the model operation.

@[simp]

Configured logarithm of one plus the input refines the model operation.

Natural exponential rounds its exact real value at the destination width.

Exponential minus one has no intermediate posit rounding.

theorem FloatLib.Floats.ExecFloat.Posit.log_eq_real {format : Formats.Posit.Format} {plan : Formats.Posit.Configured.StoragePlan format} {code : Type} [ModelCodec plan (Formats.Posit.Model format) code] (value : ExecFloat (Formats.Posit.Configured.Family format code plan)) {q : } (hvalue : toRat? value = some q) (hq : 0 < q) :

Natural logarithm rounds its exact real value on the positive domain.

theorem FloatLib.Floats.ExecFloat.Posit.logPlus1_eq_real {format : Formats.Posit.Format} {plan : Formats.Posit.Configured.StoragePlan format} {code : Type} [ModelCodec plan (Formats.Posit.Model format) code] (value : ExecFloat (Formats.Posit.Configured.Family format code plan)) {q : } (hvalue : toRat? value = some q) (hq : -1 < q) :

The input addition in logPlus1 is exact before logarithm evaluation.