Correctness of catalog-codebook arithmetic #
For the one-bit bipolar and two-bit ternary catalog tables, negation and multiplication agree with the corresponding integer operations on finite inputs. The proofs enumerate these tables' stored words. The ternary refinement statements assume finite operands; separate rejection theorems cover multiplication with a reserved operand.
theorem
FloatLib.Floats.Formats.Codebook.Catalog.bipolar1.neg_refines :
Numerics.Operation.Finite1 bipolar1.numericalSystem bipolar1.numericalSystem neg fun (x : ℤ) => -x
Bipolar negation exactly refines integer negation.
theorem
FloatLib.Floats.Formats.Codebook.Catalog.bipolar1.mul_refines :
Numerics.Operation.Finite2 bipolar1.numericalSystem bipolar1.numericalSystem bipolar1.numericalSystem mul
fun (x y : ℤ) => x * y
Bipolar multiplication exactly refines integer multiplication.
Checked ternary negation exactly refines integer negation on finite inputs.
Checked ternary multiplication exactly refines integer multiplication on finite inputs.