TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Configured.Reduction.Proof

Correctness of configured binary reductions #

The configured API is a lossless carrier adaptation of the descriptor-model reducer. These theorems state that connection, so proofs can reason about the one model definition without depending on byte, word, or wide storage choices.

Decoding a configured correctly rounded sum gives the descriptor-model sum, status indicators included.

@[simp]

Decoding the value-only configured sum gives the value component of the descriptor-model sum.

@[simp]

The configured sum with status := true delivers the value of the configured sum.

Configured dot-product execution with status := true is the descriptor-model dot product, including a length-mismatch error and every IEEE status indicator.

On a successful configured dot product, decoding the delivered value gives the descriptor-model value.

@[simp]
theorem FloatLib.Floats.ExecFloat.Binary.map_value_dot {format : Formats.BinaryInterchange.FloatFormat} {plan : Formats.BinaryInterchange.Configured.StoragePlan format} {code : Type} [ModelCodec plan (Formats.BinaryInterchange.Model format) code] (left right : Array (ExecFloat (Formats.BinaryInterchange.Configured.Family format code plan))) (mode : Formats.BinaryInterchange.Model.IEEERoundingMode) :
Except.map (fun (x : match true with | true => IEEEOutcome | false => Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code) => x.value) (dot left right mode true) = dot left right mode

The configured dot product with status := true has the value and the length check of the value-only configured dot product.