Documentation

CompPoly.Fields.Extension.Field

The field structure on an extension #

toQuot is not just injective but bijective: every class in F[X] / f has a unique representative of degree < d. That gives Ext.ringEquivQuot : Ext P ≃+* AdjoinRoot P.poly, and the separately certified base cardinality gives Nat.card (Ext P) = q ^ d. A Field structure requires [Finite F], [Fact (Nat.card F = P.q)], and irreducibility of the defining polynomial.

Inversion is by Fermat's little theorem, x⁻¹ = x ^ (q^d - 2), matching how CompPoly/Fields/Montgomery/Native32Field.lean inverts in the base field. Exponentiation is binary, so this costs O(d · log q) extension multiplications.

The instance is assembled by hand rather than via Function.Injective.field, for the same reason as Ext.instCommRing: that transport takes toQuot as data and would make the whole structure noncomputable, which then shadows the computable Mul and Pow. The qsmul / nnqsmul fields use the castRec defaults, following mkDivisionRingInstance in CompPoly/Fields/Binary/Tower/Concrete/Core.lean.

Main definitions and statements #

Implementation notes #

The inverse candidate is defined in Extension/Arithmetic.lean; its correctness depends on the certificates above. Extension/Cardinality.lean supplies the finite-coordinate facts without importing the polynomial quotient bridge.

theorem CompPoly.Extension.Ext.four_le_card_pow {F : Type u_1} [Field F] {P : ExtensionParams F} [Finite F] [Fact (Nat.card F = P.q)] :
4 P.q ^ P.d

4 ≤ q ^ d, since 2 ≤ q and 2 ≤ d. Used to justify the Fermat exponent q ^ d - 2.

Surjectivity and the ring equivalence #

The extension is isomorphic to its specification F[X] / f.

Instances For
    @[instance_reducible]
    noncomputable instance CompPoly.Extension.Ext.instFintypeQuot {F : Type u_1} [Field F] {P : ExtensionParams F} [Fintype F] :

    The quotient is finite, transported along the ring equivalence.

    Inversion #

    The canonical inverse candidate and its Inv/Div instances come from the raw arithmetic module. The following laws require certified cardinality; cancellation also requires irreducibility.

    The field structure #

    theorem CompPoly.Extension.Ext.mul_inv_cancel' {F : Type u_1} [Field F] {P : ExtensionParams F} [Finite F] [Fact (Nat.card F = P.q)] [Fact (Irreducible P.poly)] {x : Ext P} (hx : x 0) :
    x * x⁻¹ = 1
    @[instance_reducible]

    The field structure. Every operation is computable: inv is Fermat exponentiation, div is x * y⁻¹, and the rational-scalar fields use the generic castRec definitions.