Documentation

Complexitylib.Algebraic.LowerBound.Cutwidth.Extractor.Condenser.Modulus.Binary.Codec

The fixed-width binary quotient codec #

Every quotient element has exactly one representation of length 2 * 3^s. Decoding is polynomial interpretation followed by the quotient map; encoding uses Mathlib's unique monic remainder. Arbitrary input lists may include padding or higher powers, while the encoding always has canonical width.

The representation proof uses AdjoinRoot.modByMonicHom and its inverse law: https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/AdjoinRoot.html. This semantic equivalence is separate from any encoded evaluator or FP claim.

Encoding retains exactly the modulus degree in coefficient bits.

The encoded polynomial is exactly the unique monic remainder.

Encoding and decoding recover every semantic quotient element.

theorem Algebraic.Cutwidth.Extractor.BinaryFieldCodec.encode_decode (s : ℕ) (bits : List Bool) (length : bits.length = 2 * 3 ^ s) :
encode s (decode s bits) = bits

Every list of the canonical width is recovered exactly, including high zeros.

Quotient elements correspond exactly to coefficient lists of the modulus degree.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Bitwise polynomial addition decodes to quotient addition.

    Carryless polynomial multiplication decodes to quotient multiplication.

    Reducing by any bit representation of the modulus preserves the quotient class.

    The bounded modular-squaring algorithm decodes to the corresponding power in the quotient, for every supplied representation of the binary modulus.