TorchLean API

FloatLib.Floats.Formats.OCP.MX.Configured.Proof

Representation theorems for configured OCP MX values #

Complete E8M0 bytes and joint MX block codes round-trip through their configured wrappers.

@[simp]

Unwrapping a freshly wrapped E8M0 code returns the original code.

@[simp]

Rewrapping the code of an E8M0 value returns the original value.

@[simp]

Reconstructing an E8M0 scale from its complete byte preserves the value.

@[simp]

An in-range byte is unchanged by E8M0 encoding and decoding.

@[simp]

Unwrapping a freshly wrapped MX block returns the original code.

@[simp]

Rewrapping the code of an MX block returns the original value.

@[simp]
theorem FloatLib.Floats.ExecFloat.OCP.MX.Block.scale_ofComponents {format : Formats.BinaryInterchange.FloatFormat} (scaleValue : E8M0) (elementValues : Array (Formats.BinaryInterchange.Model format)) :
(ofComponents scaleValue elementValues).scale = scaleValue

ofComponents preserves the supplied shared scale.

@[simp]
theorem FloatLib.Floats.ExecFloat.OCP.MX.Block.values_ofComponents {format : Formats.BinaryInterchange.FloatFormat} (scaleValue : E8M0) (elementValues : Array (Formats.BinaryInterchange.Model format)) :
(ofComponents scaleValue elementValues).values = elementValues

ofComponents preserves the supplied binary element words.

@[simp]
theorem FloatLib.Floats.ExecFloat.OCP.MX.Block.values_ofElements {F : Type u} [Formats.BinaryInterchange.StaticByte.Family F] (scaleValue : E8M0) (elementValues : Array (ExecFloat F)) :
(ofElements scaleValue elementValues).values = Array.map (fun (value : ExecFloat F) => Formats.BinaryInterchange.StaticByte.toModel value) elementValues

Building from nominal elements stores exactly their corresponding proof-model values.