Documentation

HexPolyFp.Field

@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[instance_reducible]
Equations
theorem Hex.ZMod64.coeff_mul_at_top {p : Nat} [Bounds p] (f g : DensePoly (ZMod64 p)) (hf : 0 < f.size) (hg : 0 < g.size) :
(f * g).coeff (f.size - 1 + (g.size - 1)) = f.coeff (f.size - 1) * g.coeff (g.size - 1)

The top coefficient of a product of nonzero ZMod64-valued polynomials is the product of the leading coefficients.

theorem Hex.ZMod64.zmod_div_one {p : Nat} [Bounds p] [PrimeModulus p] (a : ZMod64 p) :
a / 1 = a

Division by 1 is the identity on ZMod64 p. Callers normalizing a value against a unit denominator (for example a leading coefficient already equal to 1) can discharge the division outright.

The F_p[x] division law obligations used by quotient constructions.

These are the concrete finite-field instances of the generic DensePoly.DivModLaws proof surface used by downstream quotient-ring code; the executable division operations themselves are inherited from DensePoly.

The F_p[x] gcd law obligations used by finite-field inverse construction.

@[reducible, inline]
abbrev Hex.FpPoly (p : Nat) [ZMod64.Bounds p] :

Executable dense polynomials over the prime-field candidate ZMod64 p.

Equations
Instances For

    Finite-field remainder with the divisor's coefficient inverse computed once for the whole long-division pass.

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

      Caching the divisor-leading inverse leaves the executable remainder unchanged. This equality is definitional for the ZMod64 division instance and does not require primality of the modulus.

      def Hex.FpPoly.gcdAuxCached {p : Nat} [ZMod64.Bounds p] (r₀ r₁ : FpPoly p) (fuel : Nat) :

      Euclidean GCD with one coefficient inverse per division rather than one per eliminated coefficient.

      Equations
      Instances For
        theorem Hex.FpPoly.gcdAuxCached_eq {p : Nat} [ZMod64.Bounds p] (r₀ r₁ : FpPoly p) (fuel : Nat) :
        r₀.gcdAuxCached r₁ fuel = DensePoly.gcdAux r₀ r₁ fuel

        The inverse-cached loop computes the reference Euclidean remainder sequence exactly, including its unnormalised representative.

        Inverse-cached finite-field polynomial GCD.

        Equations
        Instances For

          The inverse-cached finite-field GCD returns the exact reference representative.