fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
frobeniusEquiv_symm_pow_p (x : R) : ((frobeniusEquiv R p).symm x) ^ p = x := frobenius_apply_frobeniusEquiv_symm R p x
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
frobeniusEquiv_symm_pow_p
null
injective_pow_p {x y : R} (h : x ^ p = y ^ p) : x = y := (frobeniusEquiv R p).injective h
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
injective_pow_p
null
polynomial_expand_eq (f : R[X]) : expand R p f = (f.map (frobeniusEquiv R p).symm) ^ p := by rw [← (f.map (S := R) (frobeniusEquiv R p).symm).expand_char p, map_expand, map_map, frobenius_comp_frobeniusEquiv_symm, map_id] @[simp]
lemma
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
polynomial_expand_eq
null
not_irreducible_expand (R p) [CommSemiring R] [Fact p.Prime] [CharP R p] [PerfectRing R p] (f : R[X]) : ¬ Irreducible (expand R p f) := by rw [polynomial_expand_eq] exact not_irreducible_pow (Fact.out : p.Prime).ne_one
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
not_irreducible_expand
null
instPerfectRingProd (S : Type*) [CommSemiring S] [ExpChar S p] [PerfectRing S p] : PerfectRing (R × S) p where bijective_frobenius := (bijective_frobenius R p).prodMap (bijective_frobenius S p)
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
instPerfectRingProd
null
PerfectField (K : Type*) [Field K] : Prop where /-- A field is perfect if every irreducible polynomial is separable. -/ separable_of_irreducible : ∀ {f : K[X]}, Irreducible f → f.Separable
class
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
PerfectField
A perfect field. See also `PerfectRing` for a generalisation in positive characteristic.
PerfectRing.toPerfectField (K : Type*) (p : ℕ) [Field K] [ExpChar K p] [PerfectRing K p] : PerfectField K := by obtain hp | ⟨hp⟩ := ‹ExpChar K p› · exact ⟨Irreducible.separable⟩ refine PerfectField.mk fun hf ↦ ?_ rcases separable_or p hf with h | ⟨-, g, -, rfl⟩ · assumption · exfalso; revert hf; haveI := Fact.mk hp; simp
lemma
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
PerfectRing.toPerfectField
null
ofCharZero [CharZero K] : PerfectField K := ⟨Irreducible.separable⟩
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
ofCharZero
null
ofFinite [Finite K] : PerfectField K := by obtain ⟨p, _instP⟩ := CharP.exists K have : Fact p.Prime := ⟨CharP.char_is_prime K p⟩ exact PerfectRing.toPerfectField K p variable [PerfectField K]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
ofFinite
null
toPerfectRing (p : ℕ) [hp : ExpChar K p] : PerfectRing K p := by refine PerfectRing.ofSurjective _ _ fun y ↦ ?_ rcases hp with _ | hp · simp [frobenius] rw [← not_forall_not] apply mt (X_pow_sub_C_irreducible_of_prime hp) apply mt separable_of_irreducible simp [separable_def, isCoprime_zero_right, isUnit_iff_degree_eq_zero, derivative_X_pow, degree_X_pow_sub_C hp.pos, hp.ne_zero]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
toPerfectRing
A perfect field of characteristic `p` (prime) is a perfect ring.
separable_iff_squarefree {g : K[X]} : g.Separable ↔ Squarefree g := by refine ⟨Separable.squarefree, fun sqf ↦ isCoprime_of_irreducible_dvd (sqf.ne_zero ·.1) ?_⟩ rintro p (h : Irreducible p) ⟨q, rfl⟩ (dvd : p ∣ derivative (p * q)) replace dvd : p ∣ q := by rw [derivative_mul, dvd_add_left (dvd_mul_right p _)] at dvd exact (separable_of_irreducible h).dvd_of_dvd_mul_left dvd exact (h.1 : ¬ IsUnit p) (sqf _ <| mul_dvd_mul_left _ dvd)
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
separable_iff_squarefree
null
Algebra.IsAlgebraic.isSeparable_of_perfectField {K L : Type*} [Field K] [Field L] [Algebra K L] [Algebra.IsAlgebraic K L] [PerfectField K] : Algebra.IsSeparable K L := ⟨fun x ↦ PerfectField.separable_of_irreducible <| minpoly.irreducible (Algebra.IsIntegral.isIntegral x)⟩
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
Algebra.IsAlgebraic.isSeparable_of_perfectField
If `L / K` is an algebraic extension, `K` is a perfect field, then `L / K` is separable.
Algebra.IsAlgebraic.perfectField {K L : Type*} [Field K] [Field L] [Algebra K L] [Algebra.IsAlgebraic K L] [PerfectField K] : PerfectField L := ⟨fun {f} hf ↦ by obtain ⟨_, _, hi, h⟩ := hf.exists_dvd_monic_irreducible_of_isIntegral (K := K) exact (PerfectField.separable_of_irreducible hi).map |>.of_dvd h⟩
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
Algebra.IsAlgebraic.perfectField
If `L / K` is an algebraic extension, `K` is a perfect field, then so is `L`.
roots_expand_pow_map_iterateFrobenius_le : (expand R (p ^ n) f).roots.map (iterateFrobenius R p n) ≤ p ^ n • f.roots := by classical refine le_iff_count.2 fun r ↦ ?_ by_cases h : ∃ s, r = s ^ p ^ n · obtain ⟨s, rfl⟩ := h simp_rw [count_nsmul, count_roots, ← rootMultiplicity_expand_pow, ← count_roots, count_map, count_eq_card_filter_eq] exact card_le_card (monotone_filter_right _ fun _ h ↦ iterateFrobenius_inj R p n h) convert Nat.zero_le _ simp_rw [count_map, card_eq_zero] exact ext' fun t ↦ count_zero t ▸ count_filter_of_neg fun h' ↦ h ⟨t, h'⟩
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_pow_map_iterateFrobenius_le
null
roots_expand_map_frobenius_le : (expand R p f).roots.map (frobenius R p) ≤ p • f.roots := by rw [← iterateFrobenius_one] convert ← roots_expand_pow_map_iterateFrobenius_le p 1 f <;> apply pow_one
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_map_frobenius_le
null
roots_expand_pow_image_iterateFrobenius_subset [DecidableEq R] : (expand R (p ^ n) f).roots.toFinset.image (iterateFrobenius R p n) ⊆ f.roots.toFinset := by rw [Finset.image_toFinset, ← (roots f).toFinset_nsmul _ (expChar_pow_pos R p n).ne', toFinset_subset] exact subset_of_le (roots_expand_pow_map_iterateFrobenius_le p n f)
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_pow_image_iterateFrobenius_subset
null
roots_expand_image_frobenius_subset [DecidableEq R] : (expand R p f).roots.toFinset.image (frobenius R p) ⊆ f.roots.toFinset := by rw [← iterateFrobenius_one] convert ← roots_expand_pow_image_iterateFrobenius_subset p 1 f apply pow_one
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_image_frobenius_subset
null
roots_expand_pow : (expand R (p ^ n) f).roots = p ^ n • f.roots.map (iterateFrobeniusEquiv R p n).symm := by classical refine ext' fun r ↦ ?_ rw [count_roots, rootMultiplicity_expand_pow, ← count_roots, count_nsmul, count_map, count_eq_card_filter_eq]; congr; ext exact (iterateFrobeniusEquiv R p n).eq_symm_apply.symm
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_pow
null
roots_expand : (expand R p f).roots = p • f.roots.map (frobeniusEquiv R p).symm := by conv_lhs => rw [← pow_one p, roots_expand_pow, iterateFrobeniusEquiv_eq_pow, pow_one] rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand
null
roots_X_pow_char_pow_sub_C {y : R} : (X ^ p ^ n - C y).roots = p ^ n • {(iterateFrobeniusEquiv R p n).symm y} := by have H := roots_expand_pow (p := p) (n := n) (f := X - C y) rwa [roots_X_sub_C, Multiset.map_singleton, map_sub, expand_X, expand_C] at H
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_X_pow_char_pow_sub_C
null
roots_X_pow_char_pow_sub_C_pow {y : R} {m : ℕ} : ((X ^ p ^ n - C y) ^ m).roots = (m * p ^ n) • {(iterateFrobeniusEquiv R p n).symm y} := by rw [roots_pow, roots_X_pow_char_pow_sub_C, mul_smul]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_X_pow_char_pow_sub_C_pow
null
roots_X_pow_char_sub_C {y : R} : (X ^ p - C y).roots = p • {(frobeniusEquiv R p).symm y} := by have H := roots_X_pow_char_pow_sub_C (p := p) (n := 1) (y := y) rwa [pow_one, iterateFrobeniusEquiv_one] at H
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_X_pow_char_sub_C
null
roots_X_pow_char_sub_C_pow {y : R} {m : ℕ} : ((X ^ p - C y) ^ m).roots = (m * p) • {(frobeniusEquiv R p).symm y} := by have H := roots_X_pow_char_pow_sub_C_pow (p := p) (n := 1) (y := y) (m := m) rwa [pow_one, iterateFrobeniusEquiv_one] at H
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_X_pow_char_sub_C_pow
null
roots_expand_pow_map_iterateFrobenius : (expand R (p ^ n) f).roots.map (iterateFrobenius R p n) = p ^ n • f.roots := by simp_rw [← coe_iterateFrobeniusEquiv, roots_expand_pow, Multiset.map_nsmul, Multiset.map_map, comp_apply, RingEquiv.apply_symm_apply, map_id']
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_pow_map_iterateFrobenius
null
roots_expand_map_frobenius : (expand R p f).roots.map (frobenius R p) = p • f.roots := by simp [roots_expand, Multiset.map_nsmul]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_map_frobenius
null
roots_expand_image_iterateFrobenius [DecidableEq R] : (expand R (p ^ n) f).roots.toFinset.image (iterateFrobenius R p n) = f.roots.toFinset := by rw [Finset.image_toFinset, roots_expand_pow_map_iterateFrobenius, (roots f).toFinset_nsmul _ (expChar_pow_pos R p n).ne']
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_image_iterateFrobenius
null
roots_expand_image_frobenius [DecidableEq R] : (expand R p f).roots.toFinset.image (frobenius R p) = f.roots.toFinset := by rw [Finset.image_toFinset, roots_expand_map_frobenius, (roots f).toFinset_nsmul _ (expChar_pos R p).ne']
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
roots_expand_image_frobenius
null
noncomputable rootsExpandToRoots : (expand R p f).roots.toFinset ↪ f.roots.toFinset where toFun x := ⟨x ^ p, roots_expand_image_frobenius_subset p f (Finset.mem_image_of_mem _ x.2)⟩ inj' _ _ h := Subtype.ext (frobenius_inj R p <| Subtype.ext_iff.1 h) @[simp]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandToRoots
If `f` is a polynomial over an integral domain `R` of characteristic `p`, then there is a map from the set of roots of `Polynomial.expand R p f` to the set of roots of `f`. It's given by `x ↦ x ^ p`, see `rootsExpandToRoots_apply`.
rootsExpandToRoots_apply (x) : (rootsExpandToRoots p f x : R) = x ^ p := rfl open scoped Classical in
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandToRoots_apply
null
noncomputable rootsExpandPowToRoots : (expand R (p ^ n) f).roots.toFinset ↪ f.roots.toFinset where toFun x := ⟨x ^ p ^ n, roots_expand_pow_image_iterateFrobenius_subset p n f (Finset.mem_image_of_mem _ x.2)⟩ inj' _ _ h := Subtype.ext (iterateFrobenius_inj R p n <| Subtype.ext_iff.1 h) @[simp]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandPowToRoots
If `f` is a polynomial over an integral domain `R` of characteristic `p`, then there is a map from the set of roots of `Polynomial.expand R (p ^ n) f` to the set of roots of `f`. It's given by `x ↦ x ^ (p ^ n)`, see `rootsExpandPowToRoots_apply`.
rootsExpandPowToRoots_apply (x) : (rootsExpandPowToRoots p n f x : R) = x ^ p ^ n := rfl variable [PerfectRing R p]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandPowToRoots_apply
null
noncomputable rootsExpandEquivRoots : (expand R p f).roots.toFinset ≃ f.roots.toFinset := ((frobeniusEquiv R p).image _).trans <| .setCongr <| show _ '' setOf (· ∈ _) = setOf (· ∈ _) by classical simp_rw [← roots_expand_image_frobenius (p := p) (f := f), Finset.mem_val, Finset.setOf_mem, Finset.coe_image, RingEquiv.toEquiv_eq_coe, EquivLike.coe_coe, frobeniusEquiv_apply] @[simp]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandEquivRoots
If `f` is a polynomial over a perfect integral domain `R` of characteristic `p`, then there is a bijection from the set of roots of `Polynomial.expand R p f` to the set of roots of `f`. It's given by `x ↦ x ^ p`, see `rootsExpandEquivRoots_apply`.
rootsExpandEquivRoots_apply (x) : (rootsExpandEquivRoots p f x : R) = x ^ p := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandEquivRoots_apply
null
noncomputable rootsExpandPowEquivRoots (n : ℕ) : (expand R (p ^ n) f).roots.toFinset ≃ f.roots.toFinset := ((iterateFrobeniusEquiv R p n).image _).trans <| .setCongr <| show _ '' (setOf (· ∈ _)) = setOf (· ∈ _) by classical simp_rw [← roots_expand_image_iterateFrobenius (p := p) (f := f) (n := n), Finset.mem_val, Finset.setOf_mem, Finset.coe_image, RingEquiv.toEquiv_eq_coe, EquivLike.coe_coe, iterateFrobeniusEquiv_apply] @[simp]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandPowEquivRoots
If `f` is a polynomial over a perfect integral domain `R` of characteristic `p`, then there is a bijection from the set of roots of `Polynomial.expand R (p ^ n) f` to the set of roots of `f`. It's given by `x ↦ x ^ (p ^ n)`, see `rootsExpandPowEquivRoots_apply`.
rootsExpandPowEquivRoots_apply (n : ℕ) (x) : (rootsExpandPowEquivRoots p f n x : R) = x ^ p ^ n := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Basic", "Mathlib.Algebra.CharP.Reduced", "Mathlib.FieldTheory.KummerPolynomial", "Mathlib.FieldTheory.Separable" ]
Mathlib/FieldTheory/Perfect.lean
rootsExpandPowEquivRoots_apply
null
@[mk_iff] PerfectClosure.R : ℕ × K → ℕ × K → Prop | intro : ∀ n x, PerfectClosure.R (n, x) (n + 1, frobenius K p x)
inductive
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
PerfectClosure.R
`PerfectClosure.R` is the relation `(n, x) ∼ (n + 1, x ^ p)` for `n : ℕ` and `x : K`. `PerfectClosure K p` is the quotient by this relation.
PerfectClosure : Type u := Quot (PerfectClosure.R K p)
def
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
PerfectClosure
The perfect closure is the smallest extension that makes frobenius surjective.
mk (x : ℕ × K) : PerfectClosure K p := Quot.mk (R K p) x
def
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk
`PerfectClosure.mk K p (n, x)` for `n : ℕ` and `x : K` is an element of `PerfectClosure K p`, viewed as `x ^ (p ^ -n)`. Every element of `PerfectClosure K p` is of this form (`PerfectClosure.mk_surjective`).
mk_surjective : Function.Surjective (mk K p) := Quot.mk_surjective @[simp] theorem mk_succ_pow (m : ℕ) (x : K) : mk K p ⟨m + 1, x ^ p⟩ = mk K p ⟨m, x⟩ := Eq.symm <| Quot.sound (R.intro m x) @[simp]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_surjective
null
quot_mk_eq_mk (x : ℕ × K) : (Quot.mk (R K p) x : PerfectClosure K p) = mk K p x := rfl variable {K p}
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
quot_mk_eq_mk
null
liftOn {L : Type*} (x : PerfectClosure K p) (f : ℕ × K → L) (hf : ∀ x y, R K p x y → f x = f y) : L := Quot.liftOn x f hf @[simp]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
liftOn
Lift a function `ℕ × K → L` to a function on `PerfectClosure K p`.
liftOn_mk {L : Sort _} (f : ℕ × K → L) (hf : ∀ x y, R K p x y → f x = f y) (x : ℕ × K) : (mk K p x).liftOn f hf = f x := rfl @[elab_as_elim]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
liftOn_mk
null
induction_on (x : PerfectClosure K p) {q : PerfectClosure K p → Prop} (h : ∀ x, q (mk K p x)) : q x := Quot.inductionOn x h variable (K p)
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
induction_on
null
private mul_aux_left (x1 x2 y : ℕ × K) (H : R K p x1 x2) : mk K p (x1.1 + y.1, (frobenius K p)^[y.1] x1.2 * (frobenius K p)^[x1.1] y.2) = mk K p (x2.1 + y.1, (frobenius K p)^[y.1] x2.2 * (frobenius K p)^[x2.1] y.2) := match x1, x2, H with | _, _, R.intro n x => Quot.sound <| by rw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_mul, Nat.succ_add] apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mul_aux_left
null
private mul_aux_right (x y1 y2 : ℕ × K) (H : R K p y1 y2) : mk K p (x.1 + y1.1, (frobenius K p)^[y1.1] x.2 * (frobenius K p)^[x.1] y1.2) = mk K p (x.1 + y2.1, (frobenius K p)^[y2.1] x.2 * (frobenius K p)^[x.1] y2.2) := match y1, y2, H with | _, _, R.intro n y => Quot.sound <| by rw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_mul] apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mul_aux_right
null
instMul : Mul (PerfectClosure K p) := ⟨Quot.lift (fun x : ℕ × K => Quot.lift (fun y : ℕ × K => mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 * (frobenius K p)^[x.1] y.2)) (mul_aux_right K p x)) fun x1 x2 (H : R K p x1 x2) => funext fun e => Quot.inductionOn e fun y => mul_aux_left K p x1 x2 y H⟩ @[simp]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instMul
null
mk_mul_mk (x y : ℕ × K) : mk K p x * mk K p y = mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 * (frobenius K p)^[x.1] y.2) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_mul_mk
null
instCommMonoid : CommMonoid (PerfectClosure K p) := { (inferInstance : Mul (PerfectClosure K p)) with mul_assoc := fun e f g => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => Quot.inductionOn g fun ⟨s, z⟩ => by apply congr_arg (Quot.mk _) simp only [mul_assoc, iterate_map_mul, ← iterate_add_apply, add_comm, add_left_comm] one := mk K p (0, 1) one_mul := fun e => Quot.inductionOn e fun ⟨n, x⟩ => congr_arg (Quot.mk _) <| by simp only [iterate_map_one, iterate_zero_apply, one_mul, zero_add] mul_one := fun e => Quot.inductionOn e fun ⟨n, x⟩ => congr_arg (Quot.mk _) <| by simp only [iterate_map_one, iterate_zero_apply, mul_one, add_zero] mul_comm := fun e f => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => congr_arg (Quot.mk _) <| by simp only [add_comm, mul_comm] }
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instCommMonoid
null
one_def : (1 : PerfectClosure K p) = mk K p (0, 1) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
one_def
null
instInhabited : Inhabited (PerfectClosure K p) := ⟨1⟩
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instInhabited
null
private add_aux_left (x1 x2 y : ℕ × K) (H : R K p x1 x2) : mk K p (x1.1 + y.1, (frobenius K p)^[y.1] x1.2 + (frobenius K p)^[x1.1] y.2) = mk K p (x2.1 + y.1, (frobenius K p)^[y.1] x2.2 + (frobenius K p)^[x2.1] y.2) := match x1, x2, H with | _, _, R.intro n x => Quot.sound <| by rw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_add, Nat.succ_add] apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
add_aux_left
null
private add_aux_right (x y1 y2 : ℕ × K) (H : R K p y1 y2) : mk K p (x.1 + y1.1, (frobenius K p)^[y1.1] x.2 + (frobenius K p)^[x.1] y1.2) = mk K p (x.1 + y2.1, (frobenius K p)^[y2.1] x.2 + (frobenius K p)^[x.1] y2.2) := match y1, y2, H with | _, _, R.intro n y => Quot.sound <| by rw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_add] apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
add_aux_right
null
instAdd : Add (PerfectClosure K p) := ⟨Quot.lift (fun x : ℕ × K => Quot.lift (fun y : ℕ × K => mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 + (frobenius K p)^[x.1] y.2)) (add_aux_right K p x)) fun x1 x2 (H : R K p x1 x2) => funext fun e => Quot.inductionOn e fun y => add_aux_left K p x1 x2 y H⟩ @[simp]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instAdd
null
mk_add_mk (x y : ℕ × K) : mk K p x + mk K p y = mk K p (x.1 + y.1, (frobenius K p)^[y.1] x.2 + (frobenius K p)^[x.1] y.2) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_add_mk
null
instNeg : Neg (PerfectClosure K p) := ⟨Quot.lift (fun x : ℕ × K => mk K p (x.1, -x.2)) fun x y (H : R K p x y) => match x, y, H with | _, _, R.intro n x => Quot.sound <| by rw [← frobenius_neg]; apply R.intro⟩ @[simp]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instNeg
null
neg_mk (x : ℕ × K) : -mk K p x = mk K p (x.1, -x.2) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
neg_mk
null
instZero : Zero (PerfectClosure K p) := ⟨mk K p (0, 0)⟩
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instZero
null
zero_def : (0 : PerfectClosure K p) = mk K p (0, 0) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
zero_def
null
@[simp] mk_zero : mk K p 0 = 0 := rfl @[simp]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_zero
Prior to https://github.com/leanprover-community/mathlib4/pull/15862, this lemma was called `mk_zero_zero`. See `mk_zero_right` for the lemma used to be called `mk_zero`.
mk_zero_right (n : ℕ) : mk K p (n, 0) = 0 := by induction n with | zero => rfl | succ n ih => rw [← ih] apply (Quot.sound _).symm have := R.intro (p := p) n (0 : K) rwa [frobenius_zero K p] at this
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_zero_right
null
R.sound (m n : ℕ) (x y : K) (H : (frobenius K p)^[m] x = y) : mk K p (n, x) = mk K p (m + n, y) := by subst H induction m with | zero => simp only [zero_add, iterate_zero_apply] | succ m ih => rw [ih, Nat.succ_add, iterate_succ'] apply Quot.sound apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
R.sound
null
instAddCommGroup : AddCommGroup (PerfectClosure K p) := { (inferInstance : Add (PerfectClosure K p)), (inferInstance : Neg (PerfectClosure K p)) with add_assoc := fun e f g => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => Quot.inductionOn g fun ⟨s, z⟩ => by apply congr_arg (Quot.mk _) simp only [iterate_map_add, ← iterate_add_apply, add_assoc, add_comm s _] zero := 0 zero_add := fun e => Quot.inductionOn e fun ⟨n, x⟩ => congr_arg (Quot.mk _) <| by simp only [iterate_map_zero, iterate_zero_apply, zero_add] add_zero := fun e => Quot.inductionOn e fun ⟨n, x⟩ => congr_arg (Quot.mk _) <| by simp only [iterate_map_zero, iterate_zero_apply, add_zero] sub_eq_add_neg := fun _ _ => rfl neg_add_cancel := fun e => Quot.inductionOn e fun ⟨n, x⟩ => by simp only [quot_mk_eq_mk, neg_mk, mk_add_mk, iterate_map_neg, neg_add_cancel, mk_zero_right] add_comm := fun e f => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => congr_arg (Quot.mk _) <| by simp only [add_comm] nsmul := nsmulRec zsmul := zsmulRec }
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instAddCommGroup
null
instCommRing : CommRing (PerfectClosure K p) := { instAddCommGroup K p, AddMonoidWithOne.unary, (inferInstance : CommMonoid (PerfectClosure K p)) with zero_mul := fun a => by refine Quot.inductionOn a fun ⟨m, x⟩ => ?_ rw [zero_def, quot_mk_eq_mk, mk_mul_mk] simp only [zero_add, iterate_zero, id_eq, iterate_map_zero, zero_mul, mk_zero_right] mul_zero := fun a => by refine Quot.inductionOn a fun ⟨m, x⟩ => ?_ rw [zero_def, quot_mk_eq_mk, mk_mul_mk] simp only [iterate_zero, id_eq, iterate_map_zero, mul_zero, mk_zero_right] left_distrib := fun e f g => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => Quot.inductionOn g fun ⟨s, z⟩ => by simp only [quot_mk_eq_mk, mk_add_mk, mk_mul_mk, add_comm, add_left_comm] apply R.sound simp only [iterate_map_mul, iterate_map_add, ← iterate_add_apply, mul_add, add_comm, add_left_comm] right_distrib := fun e f g => Quot.inductionOn e fun ⟨m, x⟩ => Quot.inductionOn f fun ⟨n, y⟩ => Quot.inductionOn g fun ⟨s, z⟩ => by simp only [quot_mk_eq_mk, mk_add_mk, mk_mul_mk, add_assoc, add_comm _ s, add_left_comm _ s] apply R.sound simp only [iterate_map_mul, iterate_map_add, ← iterate_add_apply, add_mul, add_comm, add_left_comm] }
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instCommRing
null
mk_eq_iff (x y : ℕ × K) : mk K p x = mk K p y ↔ ∃ z, (frobenius K p)^[y.1 + z] x.2 = (frobenius K p)^[x.1 + z] y.2 := by constructor · intro H replace H := Quot.eqvGen_exact H induction H with | rel x y H => obtain ⟨n, x⟩ := H; exact ⟨0, rfl⟩ | refl H => exact ⟨0, rfl⟩ | symm x y H ih => obtain ⟨w, ih⟩ := ih; exact ⟨w, ih.symm⟩ | trans x y z H1 H2 ih1 ih2 => obtain ⟨z1, ih1⟩ := ih1 obtain ⟨z2, ih2⟩ := ih2 exists z2 + (y.1 + z1) rw [← add_assoc, iterate_add_apply, ih1] rw [← iterate_add_apply, add_comm, iterate_add_apply, ih2] rw [← iterate_add_apply] simp only [add_comm, add_left_comm] intro H obtain ⟨m, x⟩ := x obtain ⟨n, y⟩ := y obtain ⟨z, H⟩ := H; dsimp only at H rw [R.sound K p (n + z) m x _ rfl, R.sound K p (m + z) n y _ rfl, H] rw [add_assoc, add_comm, add_comm z] @[simp]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_eq_iff
null
mk_pow (x : ℕ × K) (n : ℕ) : mk K p x ^ n = mk K p (x.1, x.2 ^ n) := by induction n with | zero => rw [pow_zero, pow_zero, one_def, mk_eq_iff] exact ⟨0, by simp_rw [← coe_iterateFrobenius, map_one]⟩ | succ n ih => rw [pow_succ, pow_succ, ih, mk_mul_mk, mk_eq_iff] exact ⟨0, by simp_rw [iterate_frobenius, add_zero, mul_pow, ← pow_mul, ← pow_add, mul_assoc, ← pow_add]⟩
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_pow
null
natCast (n x : ℕ) : (x : PerfectClosure K p) = mk K p (n, x) := by induction n with | zero => induction x with | zero => simp | succ x ih => simp [Nat.cast_succ, ih, one_def] | succ n ih => rw [ih]; apply Quot.sound suffices R K p (n, (x : K)) (Nat.succ n, frobenius K p (x : K)) by rwa [frobenius_natCast K p x] at this apply R.intro
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
natCast
null
intCast (x : ℤ) : (x : PerfectClosure K p) = mk K p (0, x) := by cases x <;> simp [natCast K p 0]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
intCast
null
natCast_eq_iff (x y : ℕ) : (x : PerfectClosure K p) = y ↔ (x : K) = y := by constructor <;> intro H · rw [natCast K p 0, natCast K p 0, mk_eq_iff] at H obtain ⟨z, H⟩ := H simpa only [zero_add, iterate_fixed (frobenius_natCast K p _)] using H rw [natCast K p 0, natCast K p 0, H]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
natCast_eq_iff
null
instCharP : CharP (PerfectClosure K p) p := by constructor; intro x; rw [← CharP.cast_eq_zero_iff K] rw [← Nat.cast_zero, natCast_eq_iff, Nat.cast_zero]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instCharP
null
frobenius_mk (x : ℕ × K) : (frobenius (PerfectClosure K p) p : PerfectClosure K p → PerfectClosure K p) (mk K p x) = mk _ _ (x.1, x.2 ^ p) := by simp only [frobenius_def] exact mk_pow K p x p
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
frobenius_mk
null
of : K →+* PerfectClosure K p where toFun x := mk _ _ (0, x) map_one' := rfl map_mul' _ _ := rfl map_zero' := rfl map_add' _ _ := rfl
def
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
of
Embedding of `K` into `PerfectClosure K p`
of_apply (x : K) : of K p x = mk _ _ (0, x) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
of_apply
null
instReduced : IsReduced (PerfectClosure K p) where eq_zero x := induction_on x fun x ⟨n, h⟩ ↦ by replace h : mk K p x ^ p ^ n = 0 := by rw [← Nat.sub_add_cancel ((n.lt_pow_self (Fact.out : p.Prime).one_lt).le), pow_add, h, mul_zero] simp only [zero_def, mk_pow, mk_eq_iff, zero_add, ← coe_iterateFrobenius, map_zero] at h ⊢ obtain ⟨m, h⟩ := h exact ⟨n + m, by simpa only [iterateFrobenius_def, pow_add, pow_mul] using h⟩
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instReduced
null
instPerfectRing : PerfectRing (PerfectClosure K p) p where bijective_frobenius := by let f : PerfectClosure K p → PerfectClosure K p := fun e ↦ liftOn e (fun x => mk K p (x.1 + 1, x.2)) fun x y H => match x, y, H with | _, _, R.intro n x => Quot.sound (R.intro _ _) refine bijective_iff_has_inverse.mpr ⟨f, fun e ↦ induction_on e fun ⟨n, x⟩ ↦ ?_, fun e ↦ induction_on e fun ⟨n, x⟩ ↦ ?_⟩ <;> simp only [f, liftOn_mk, frobenius_mk, mk_succ_pow] @[simp]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instPerfectRing
null
iterate_frobenius_mk (n : ℕ) (x : K) : (frobenius (PerfectClosure K p) p)^[n] (mk K p ⟨n, x⟩) = of K p x := by induction n with | zero => rfl | succ n ih => rw [iterate_succ_apply, ← ih, frobenius_mk, mk_succ_pow]
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
iterate_frobenius_mk
null
noncomputable lift (L : Type v) [CommSemiring L] [CharP L p] [PerfectRing L p] : (K →+* L) ≃ (PerfectClosure K p →+* L) where toFun f := { toFun := by refine fun e => liftOn e (fun x => (frobeniusEquiv L p).symm^[x.1] (f x.2)) ?_ rintro - - ⟨n, x⟩ simp [f.map_frobenius] map_one' := f.map_one map_zero' := f.map_zero map_mul' := by rintro ⟨n, x⟩ ⟨m, y⟩ simp only [quot_mk_eq_mk, liftOn_mk, f.map_iterate_frobenius, mk_mul_mk, map_mul, iterate_map_mul] have := LeftInverse.iterate (frobeniusEquiv_symm_apply_frobenius L p) rw [iterate_add_apply, this _ _, add_comm, iterate_add_apply, this _ _] map_add' := by rintro ⟨n, x⟩ ⟨m, y⟩ simp only [quot_mk_eq_mk, liftOn_mk, f.map_iterate_frobenius, mk_add_mk, map_add, iterate_map_add] have := LeftInverse.iterate (frobeniusEquiv_symm_apply_frobenius L p) rw [iterate_add_apply, this _ _, add_comm n, iterate_add_apply, this _ _] } invFun f := f.comp (of K p) right_inv f := by ext ⟨n, x⟩ simp only [quot_mk_eq_mk, RingHom.comp_apply, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, liftOn_mk] apply (injective_frobenius L p).iterate n rw [← f.map_iterate_frobenius, iterate_frobenius_mk, RightInverse.iterate (frobenius_apply_frobeniusEquiv_symm L p) n]
def
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
lift
Given a ring `K` of characteristic `p` and a perfect ring `L` of the same characteristic, any homomorphism `K →+* L` can be lifted to `PerfectClosure K p`.
eq_iff [CommRing K] [IsReduced K] (p : ℕ) [Fact p.Prime] [CharP K p] (x y : ℕ × K) : mk K p x = mk K p y ↔ (frobenius K p)^[y.1] x.2 = (frobenius K p)^[x.1] y.2 := (mk_eq_iff K p x y).trans ⟨fun ⟨z, H⟩ => (frobenius_inj K p).iterate z <| by simpa only [add_comm, iterate_add] using H, fun H => ⟨0, H⟩⟩
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
eq_iff
null
instInv : Inv (PerfectClosure K p) := ⟨Quot.lift (fun x : ℕ × K => Quot.mk (R K p) (x.1, x.2⁻¹)) fun x y (H : R K p x y) => match x, y, H with | _, _, R.intro n x => Quot.sound <| by simp only [frobenius_def] rw [← inv_pow] apply R.intro⟩ @[simp]
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instInv
null
mk_inv (x : ℕ × K) : (mk K p x)⁻¹ = mk K p (x.1, x.2⁻¹) := rfl
theorem
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
mk_inv
null
instDivisionRing : DivisionRing (PerfectClosure K p) where mul_inv_cancel e := induction_on e fun ⟨m, x⟩ H ↦ by have := mt (eq_iff _ _ _ _).2 H rw [mk_inv, mk_mul_mk] refine (eq_iff K p _ _).2 ?_ simp only [iterate_map_one, iterate_map_zero, iterate_zero_apply, ← iterate_map_mul] at this ⊢ rw [mul_inv_cancel₀ this, iterate_map_one] inv_zero := congr_arg (Quot.mk (R K p)) (by rw [inv_zero]) nnqsmul := _ nnqsmul_def := fun _ _ => rfl qsmul := _ qsmul_def := fun _ _ => rfl
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instDivisionRing
null
instField : Field (PerfectClosure K p) := { (inferInstance : DivisionRing (PerfectClosure K p)), (inferInstance : CommRing (PerfectClosure K p)) with }
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instField
null
instPerfectField : PerfectField (PerfectClosure K p) := PerfectRing.toPerfectField _ p
instance
FieldTheory
[ "Mathlib.Algebra.CharP.Lemmas", "Mathlib.FieldTheory.Perfect" ]
Mathlib/FieldTheory/PerfectClosure.lean
instPerfectField
null
Gal := p.SplittingField ≃ₐ[F] p.SplittingField deriving Group, Fintype, EquivLike, AlgEquivClass
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
Gal
The Galois group of a polynomial.
applyMulSemiringAction : MulSemiringAction p.Gal p.SplittingField := AlgEquiv.applyMulSemiringAction @[ext]
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
applyMulSemiringAction
null
ext {σ τ : p.Gal} (h : ∀ x ∈ p.rootSet p.SplittingField, σ x = τ x) : σ = τ := by refine AlgEquiv.ext fun x => (AlgHom.mem_equalizer σ.toAlgHom τ.toAlgHom x).mp ((SetLike.ext_iff.mp ?_ x).mpr Algebra.mem_top) rwa [eq_top_iff, ← SplittingField.adjoin_rootSet, Algebra.adjoin_le_iff]
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
ext
null
uniqueGalOfSplits (h : p.Splits (RingHom.id F)) : Unique p.Gal where default := 1 uniq f := AlgEquiv.ext fun x => by obtain ⟨y, rfl⟩ := Algebra.mem_bot.mp ((SetLike.ext_iff.mp ((IsSplittingField.splits_iff _ p).mp h) x).mp Algebra.mem_top) rw [AlgEquiv.commutes, AlgEquiv.commutes]
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalOfSplits
If `p` splits in `F` then the `p.gal` is trivial.
uniqueGalZero : Unique (0 : F[X]).Gal := uniqueGalOfSplits _ (splits_zero _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalZero
null
uniqueGalOne : Unique (1 : F[X]).Gal := uniqueGalOfSplits _ (splits_one _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalOne
null
uniqueGalC (x : F) : Unique (C x).Gal := uniqueGalOfSplits _ (splits_C _ _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalC
null
uniqueGalX : Unique (X : F[X]).Gal := uniqueGalOfSplits _ (splits_X _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalX
null
uniqueGalXSubC (x : F) : Unique (X - C x).Gal := uniqueGalOfSplits _ (splits_X_sub_C _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalXSubC
null
uniqueGalXPow (n : ℕ) : Unique (X ^ n : F[X]).Gal := uniqueGalOfSplits _ (splits_X_pow _ _)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
uniqueGalXPow
null
restrict [Fact (p.Splits (algebraMap F E))] : (E ≃ₐ[F] E) →* p.Gal := AlgEquiv.restrictNormalHom p.SplittingField
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrict
Restrict from a superfield automorphism into a member of `gal p`.
restrict_surjective [Fact (p.Splits (algebraMap F E))] [Normal F E] : Function.Surjective (restrict p E) := AlgEquiv.restrictNormalHom_surjective E
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrict_surjective
null
mapRoots [Fact (p.Splits (algebraMap F E))] : rootSet p p.SplittingField → rootSet p E := Set.MapsTo.restrict (IsScalarTower.toAlgHom F p.SplittingField E) _ _ <| rootSet_mapsTo _
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
mapRoots
The function taking `rootSet p p.SplittingField` to `rootSet p E`. This is actually a bijection, see `Polynomial.Gal.mapRoots_bijective`.
mapRoots_bijective [h : Fact (p.Splits (algebraMap F E))] : Function.Bijective (mapRoots p E) := by constructor · exact fun _ _ h => Subtype.ext (RingHom.injective _ (Subtype.ext_iff.mp h)) · intro y have key := roots_map (IsScalarTower.toAlgHom F p.SplittingField E : p.SplittingField →+* E) ((splits_id_iff_splits _).mpr (IsSplittingField.splits p.SplittingField p)) rw [map_map, AlgHom.comp_algebraMap] at key have hy := Subtype.mem y simp only [rootSet, Finset.mem_coe, Multiset.mem_toFinset, key, Multiset.mem_map] at hy rcases hy with ⟨x, hx1, hx2⟩ exact ⟨⟨x, (@Multiset.mem_toFinset _ (Classical.decEq _) _ _).mpr hx1⟩, Subtype.ext hx2⟩
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
mapRoots_bijective
null
rootsEquivRoots [Fact (p.Splits (algebraMap F E))] : rootSet p p.SplittingField ≃ rootSet p E := Equiv.ofBijective (mapRoots p E) (mapRoots_bijective p E)
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
rootsEquivRoots
The bijection between `rootSet p p.SplittingField` and `rootSet p E`.
galActionAux : MulAction p.Gal (rootSet p p.SplittingField) where smul ϕ := Set.MapsTo.restrict ϕ _ _ <| rootSet_mapsTo ϕ.toAlgHom one_smul _ := by ext; rfl mul_smul _ _ _ := by ext; rfl
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galActionAux
null
smul [Fact (p.Splits (algebraMap F E))] : SMul p.Gal (rootSet p E) where smul ϕ x := rootsEquivRoots p E (ϕ • (rootsEquivRoots p E).symm x)
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
smul
null
smul_def [Fact (p.Splits (algebraMap F E))] (ϕ : p.Gal) (x : rootSet p E) : ϕ • x = rootsEquivRoots p E (ϕ • (rootsEquivRoots p E).symm x) := rfl
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
smul_def
null