Static-byte backend correctness #
Each supplied byte operation decodes to the model-level reference result. The proofs use the operation's certificate, so they apply to exhaustive tables and arithmetic kernels alike.
theorem
FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Backend.Table.binary_eq_spec
{F : Type u}
[Family F]
{modelSpec : ModelValue (Family.format F) → ModelValue (Family.format F) → ModelValue (Family.format F)}
(width_le_eight : (Family.format F).bitWidth ≤ 8)
(table : ExecFloat.Backend.TinyTable.CertifiedBinary (encoding (Family.format F) width_le_eight) modelSpec)
(left right : ExecFloat F)
:
A direct binary table agrees with the model operation certified by that table.
theorem
FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Backend.Table.unary_eq_spec
{F : Type u}
[Family F]
{modelSpec : ModelValue (Family.format F) → ModelValue (Family.format F)}
(width_le_eight : (Family.format F).bitWidth ≤ 8)
(table : ExecFloat.Backend.TinyTable.CertifiedUnary (encoding (Family.format F) width_le_eight) modelSpec)
(value : ExecFloat F)
:
A direct unary table agrees with the model operation certified by that table.
theorem
FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Backend.Table.ternary_eq_spec
{F : Type u}
[Family F]
{modelSpec :
ModelValue (Family.format F) →
ModelValue (Family.format F) → ModelValue (Family.format F) → ModelValue (Family.format F)}
(width_le_eight : (Family.format F).bitWidth ≤ 8)
(table : ExecFloat.Backend.TinyTable.CertifiedTernary (encoding (Family.format F) width_le_eight) modelSpec)
(left right addend : ExecFloat F)
:
A direct ternary table agrees with the model operation certified by that table.
theorem
FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Backend.Model.ternary_eq_spec
{F : Type u}
[Family F]
{modelSpec :
ModelValue (Family.format F) →
ModelValue (Family.format F) → ModelValue (Family.format F) → ModelValue (Family.format F)}
(width_le_eight : (Family.format F).bitWidth ≤ 8)
(op :
ModelValue (Family.format F) →
ModelValue (Family.format F) → ModelValue (Family.format F) → ModelValue (Family.format F))
(op_eq_spec : ∀ (left right addend : ModelValue (Family.format F)), op left right addend = modelSpec left right addend)
(left right addend : ExecFloat F)
:
A direct model adapter preserves any proved ternary specification.