Galois fields #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
If p
is a prime number, and n
a natural number,
then galois_field p n
is defined as the splitting field of X^(p^n) - X
over zmod p
.
It is a finite field with p ^ n
elements.
Main definition #
galois_field p n
is a field withp ^ n
elements
Main Results #
galois_field.alg_equiv_galois_field
: Any finite field is isomorphic to some Galois fieldfinite_field.alg_equiv_of_card_eq
: Uniqueness of finite fields : algebra isomorphismfinite_field.ring_equiv_of_card_eq
: Uniqueness of finite fields : ring isomorphism
@[protected, instance]
noncomputable
def
galois_field.field
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ) :
field (galois_field p n)
A finite field with p ^ n
elements.
Every field with the same cardinality is (non-canonically)
isomorphic to this field.
Equations
- galois_field p n = (polynomial.X ^ p ^ n - polynomial.X).splitting_field
@[protected, instance]
Equations
- galois_field.inhabited = {default := 37}
@[protected, instance]
noncomputable
def
galois_field.algebra
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ) :
algebra (zmod p) (galois_field p n)
Equations
@[protected, instance]
def
galois_field.has_sub.sub.polynomial.is_splitting_field
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ) :
polynomial.is_splitting_field (zmod p) (galois_field p n) (polynomial.X ^ p ^ n - polynomial.X)
@[protected, instance]
@[protected, instance]
noncomputable
def
galois_field.fintype
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ) :
fintype (galois_field p n)
Equations
- galois_field.fintype p n = id (finite_dimensional.fintype_of_fintype (zmod p) (galois_field p n))
theorem
galois_field.finrank
(p : ℕ)
[fact (nat.prime p)]
{n : ℕ}
(h : n ≠ 0) :
finite_dimensional.finrank (zmod p) (galois_field p n) = n
theorem
galois_field.card
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ)
(h : n ≠ 0) :
fintype.card (galois_field p n) = p ^ n
theorem
galois_field.splits_zmod_X_pow_sub_X
(p : ℕ)
[fact (nat.prime p)] :
polynomial.splits (ring_hom.id (zmod p)) (polynomial.X ^ p - polynomial.X)
noncomputable
def
galois_field.equiv_zmod_p
(p : ℕ)
[fact (nat.prime p)] :
galois_field p 1 ≃ₐ[zmod p] zmod p
A Galois field with exponent 1 is equivalent to zmod
Equations
- galois_field.equiv_zmod_p p = let h : polynomial.X ^ p ^ 1 = polynomial.X ^ fintype.card (zmod p) := _, inst : polynomial.is_splitting_field (zmod p) (zmod p) (polynomial.X ^ p ^ 1 - polynomial.X) := _ in (polynomial.is_splitting_field.alg_equiv (zmod p) (polynomial.X ^ p ^ 1 - polynomial.X)).symm
theorem
galois_field.splits_X_pow_card_sub_X
(p : ℕ)
[fact (nat.prime p)]
{K : Type u_1}
[field K]
[fintype K]
[algebra (zmod p) K] :
polynomial.splits (algebra_map (zmod p) K) (polynomial.X ^ fintype.card K - polynomial.X)
theorem
galois_field.is_splitting_field_of_card_eq
(p : ℕ)
[fact (nat.prime p)]
(n : ℕ)
{K : Type u_1}
[field K]
[fintype K]
[algebra (zmod p) K]
(h : fintype.card K = p ^ n) :
polynomial.is_splitting_field (zmod p) K (polynomial.X ^ p ^ n - polynomial.X)
noncomputable
def
finite_field.alg_equiv_of_card_eq
{K : Type u_1}
[field K]
[fintype K]
{K' : Type u_2}
[field K']
[fintype K']
(p : ℕ)
[fact (nat.prime p)]
[algebra (zmod p) K]
[algebra (zmod p) K']
(hKK' : fintype.card K = fintype.card K') :
Uniqueness of finite fields: Any two finite fields of the same cardinality are (possibly non canonically) isomorphic
Equations
- finite_field.alg_equiv_of_card_eq p hKK' = (λ (_x : nat.prime p ∧ fintype.card K = p ^ ↑(classical.some _)), (λ (_x_1 : nat.prime p ∧ fintype.card K' = p ^ ↑(classical.some _)), (_.mp (galois_field.alg_equiv_galois_field p ↑(classical.some _) _)).trans (galois_field.alg_equiv_galois_field p ↑(classical.some _) _).symm) _) _
noncomputable
def
finite_field.ring_equiv_of_card_eq
{K : Type u_1}
[field K]
[fintype K]
{K' : Type u_2}
[field K']
[fintype K']
(hKK' : fintype.card K = fintype.card K') :
K ≃+* K'
Uniqueness of finite fields: Any two finite fields of the same cardinality are (possibly non canonically) isomorphic
Equations
- finite_field.ring_equiv_of_card_eq hKK' = (λ (_x : char_p K (classical.some finite_field.ring_equiv_of_card_eq._proof_1)), (λ (_x_1 : char_p K' (classical.some finite_field.ring_equiv_of_card_eq._proof_2)), (λ (_x_2 : nat.prime (classical.some finite_field.ring_equiv_of_card_eq._proof_1) ∧ fintype.card K = classical.some finite_field.ring_equiv_of_card_eq._proof_1 ^ ↑(classical.some _)), (λ (_x_3 : nat.prime (classical.some finite_field.ring_equiv_of_card_eq._proof_2) ∧ fintype.card K' = classical.some finite_field.ring_equiv_of_card_eq._proof_2 ^ ↑(classical.some _)), let _inst_5 : algebra (zmod (classical.some finite_field.ring_equiv_of_card_eq._proof_1)) K := zmod.algebra K (classical.some finite_field.ring_equiv_of_card_eq._proof_1), _inst_6 : algebra (zmod (classical.some finite_field.ring_equiv_of_card_eq._proof_1)) K' := zmod.algebra K' (classical.some finite_field.ring_equiv_of_card_eq._proof_1) in ↑(finite_field.alg_equiv_of_card_eq (classical.some finite_field.ring_equiv_of_card_eq._proof_1) hKK')) _) _) finite_field.ring_equiv_of_card_eq._proof_10) finite_field.ring_equiv_of_card_eq._proof_11