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
, wherex
ranges over the units ofK
, isq-1
ifq-1 ∣ i
0
otherwise
FiniteField.card
: The cardinalityq
is 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 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