Finite fields #
This file contains basic results about finite fields.
Throughout most of this file, K denotes a finite field
and q is notation for the cardinality of K.
See RingTheory.IntegralDomain for the fact that the unit group of a finite field is a
cyclic group, as well as the fact that every finite integral domain is a field
(Fintype.fieldOfDomain).
Main results #
Fintype.card_units: The unit group of a finite field has cardinalityq - 1.sum_pow_units: The sum ofx^i, wherexranges over the units ofK, is
q-1ifq-1 ∣ i0otherwise
FiniteField.card: The cardinalityqis a power of the characteristic ofK. SeeFiniteField.card'for a variant.
Notation #
Throughout most of this file, K denotes a finite field
and q is notation for the cardinality of K.
Implementation notes #
While Fintype Kˣ can be inferred from Fintype K in the presence of DecidableEq K,
in this file we take the Fintype Kˣ argument directly to reduce the chance of typeclass
diamonds, as Fintype carries data.
The cardinality of a field is at most n times the cardinality of the image of a degree n
polynomial
If f and g are quadratic polynomials, then the f.eval a + g.eval b = 0 has a solution.
The sum of x ^ i as x ranges over the units of a finite field of cardinality q
is equal to 0 unless (q - 1) ∣ i, in which case the sum is q - 1.
If R is an algebra over a finite field K, the Frobenius K-algebra endomorphism of R is
given by raising every element of R to its #K-th power.
Equations
- FiniteField.frobeniusAlgHom K R = { toMonoidHom := powMonoidHom (Fintype.card K), map_zero' := ⋯, map_add' := ⋯, commutes' := ⋯ }
Instances For
If R is a perfect ring and an algebra over a finite field K, the Frobenius K-algebra
endomorphism of R is an automorphism.
Equations
Instances For
If L/K is an algebraic extension of a finite field, the Frobenius K-algebra endomorphism
of L is an automorphism.
Equations
Instances For
If p is a prime natural number and x is an integer number, then there exist natural numbers
a ≤ p / 2 and b ≤ p / 2 such that a ^ 2 + b ^ 2 ≡ x [ZMOD p]. This is a version of
ZMod.sq_add_sq with estimates on a and b.
If p is a prime natural number and x is a natural number, then there exist natural numbers
a ≤ p / 2 and b ≤ p / 2 such that a ^ 2 + b ^ 2 ≡ x [MOD p]. This is a version of
ZMod.sq_add_sq with estimates on a and b.
The Fermat-Euler totient theorem. Nat.ModEq.pow_totient is an alternative statement
of the same theorem.
The Fermat-Euler totient theorem. ZMod.pow_totient is an alternative statement
of the same theorem.
A variation on Fermat's little theorem. See ZMod.pow_card_sub_one_eq_one
The prime subfield is finite.
Equations
- Subfield.fintypeBot F p = Fintype.subtype (Finset.map { toFun := ⇑(ZMod.castHom ⋯ F), inj' := ⋯ } Finset.univ) ⋯