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 #
Ext.toQuot_surjective,Ext.ringEquivQuot:Ext P ≃+* AdjoinRoot P.poly.Ext.inv: Fermat inversion.Ext.instField: theFieldstructure, given finite base field, certifiedNat.card F = P.q, and irreducibility ofP.poly.
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.
Surjectivity and the ring equivalence #
The extension is isomorphic to its specification F[X] / f.
Instances For
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 #
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.