Documentation

HexGFqMathlib.Subfield

Reduction into the executable finite field is a ring homomorphism.

The component facts live on the quotient-ring layer; this bundles them so that Mathlib constructions needing a RingHom can be pointed at the executable field.

Equations
Instances For
    @[simp]
    theorem HexGFqMathlib.ofPolyHom_apply {p : } [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] {f : Hex.FpPoly p} {hf : 0 < f.degree} {hp : Hex.Nat.Prime p} {hirr : f.Irreducible} (g : Hex.FpPoly p) :
    (ofPolyHom f hf hp hirr) g = Hex.GFqField.ofPoly f hf hp hirr g

    The constant embedding ZMod p →+* FpPoly p, routing Mathlib's coefficient ring through the executable ZMod64 p.

    Equations
    Instances For
      noncomputable def HexGFqMathlib.constHom {p : } [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (f : Hex.FpPoly p) (hf : 0 < f.degree) (hp : Hex.Nat.Prime p) (hirr : f.Irreducible) :

      Constants of the executable finite field, as a ring homomorphism from Mathlib's coefficient ring. This is what instantiates Polynomial.eval₂RingHom.

      Equations
      Instances For

        Substituting b and reducing agrees with evaluating at the reduction of b, for every polynomial.

        noncomputable def HexGFqMathlib.substHom {p : } [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (f : Hex.FpPoly p) (hf : 0 < f.degree) (hp : Hex.Nat.Prime p) (hirr : f.Irreducible) (b : Hex.FpPoly p) :

        Substitution into the executable field, as a ring homomorphism out of the executable polynomials: g ↦ g(b) in F_p[x] / (f).

        Equations
        Instances For
          theorem HexGFqMathlib.substHom_apply {p : } [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] {f : Hex.FpPoly p} {hf : 0 < f.degree} {hp : Hex.Nat.Prime p} {hirr : f.Irreducible} (b g : Hex.FpPoly p) :
          (substHom f hf hp hirr b) g = (ofPolyHom f hf hp hirr) (Hex.DensePoly.compose g b)
          theorem HexGFqMathlib.substHom_reduceMod {p : } [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] {f : Hex.FpPoly p} {hf : 0 < f.degree} {hp : Hex.Nat.Prime p} {hirr : f.Irreducible} (b fm : Hex.FpPoly p) (hzero : (substHom f hf hp hirr b) fm = 0) (g : Hex.FpPoly p) :
          (substHom f hf hp hirr b) (Hex.GFqRing.reduceMod fm g) = (substHom f hf hp hirr b) g

          Substitution is insensitive to reduction modulo a polynomial it kills.

          This is the descent step: two representatives of the same residue differ by a multiple of the modulus, so if the modulus is sent to zero they have the same image.

          The class of X in the Conway presentation of GFq p n.

          Equations
          Instances For

            The norm element of GFq p n, as a field element rather than a representative: where the generator of the degree-m subfield goes.

            Equations
            Instances For
              theorem HexGFqMathlib.conwayGen_eq_norm {m n : } (p : ) [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (hn : Hex.Conway.SupportedEntry p n) (hm_pos : 0 < m) (hmn : m n) :
              conwayGen p m n hn = conwayX p n hn ^ ((p ^ n - 1) / (p ^ m - 1))

              The computed Conway subfield generator is the explicit finite-field norm power of the ambient class of X.

              Substituting the norm element kills the smaller Conway polynomial.

              This is Tier 2 compatibility, carried from the executable Bool check to the statement a descent needs.

              noncomputable def HexGFqMathlib.conwayEmbed (p m n : ) [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (hm : Hex.Conway.SupportedEntry p m) (hn : Hex.Conway.SupportedEntry p n) (hcompat : Hex.Conway.Compatible p m n hm hn) :
              Hex.GFq p m hm →+* Hex.GFq p n hn

              The canonical embedding of the degree-m Conway field into the degree-n one.

              Given m ∣ n and compatibility of the two committed entries, this is a genuine ring homomorphism GFq p m →+* GFq p n: substitute the norm element for the generator. It is canonical because the target is the Conway norm rather than an arbitrary root of C(p, m), so two callers embedding GF(p^m) into GF(p^n) land on the same copy. That is the property the Conway table exists to provide, and Tier 2 compatibility is what makes the substitution well defined.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem HexGFqMathlib.conwayEmbed_X {m n : } (p : ) [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (hm : Hex.Conway.SupportedEntry p m) (hn : Hex.Conway.SupportedEntry p n) (hcompat : Hex.Conway.Compatible p m n hm hn) :
                (conwayEmbed p m n hm hn hcompat) (conwayX p m hm) = conwayGen p m n hn

                The Conway embedding sends the source class of X to the computed subfield generator. Together with conwayGen_eq_norm, this identifies its image with the finite-field norm power in the target.

                theorem HexGFqMathlib.conwayEmbed_X_eq_norm {m n : } (p : ) [Hex.ZMod64.Bounds p] [Hex.ZMod64.PrimeModulus p] (hm : Hex.Conway.SupportedEntry p m) (hn : Hex.Conway.SupportedEntry p n) (hcompat : Hex.Conway.Compatible p m n hm hn) (hmn : m n) :
                (conwayEmbed p m n hm hn hcompat) (conwayX p m hm) = conwayX p n hn ^ ((p ^ n - 1) / (p ^ m - 1))

                The Conway embedding sends the source class of X directly to the explicit finite-field norm power of the target class of X.