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
galAction [Fact (p.Splits (algebraMap F E))] : MulAction p.Gal (rootSet p E) where one_smul _ := by simp only [smul_def, Equiv.apply_symm_apply, one_smul] mul_smul _ _ _ := by simp only [smul_def, Equiv.symm_apply_apply, mul_smul]
instance
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galAction
The action of `gal p` on the roots of `p` in `E`.
galAction_isPretransitive [Fact (p.Splits (algebraMap F E))] (hp : Irreducible p) : MulAction.IsPretransitive p.Gal (p.rootSet E) := by refine ⟨fun x y ↦ ?_⟩ have hx := minpoly.eq_of_irreducible hp (mem_rootSet.mp ((rootsEquivRoots p E).symm x).2).2 have hy := minpoly.eq_of_irreducible hp (mem_rootSet.mp ((rootsEquivRoots p E).symm y).2).2 obtain ⟨g, hg⟩ := (Normal.minpoly_eq_iff_mem_orbit p.SplittingField).mp (hy.symm.trans hx) exact ⟨g, (rootsEquivRoots p E).apply_eq_iff_eq_symm_apply.mpr (Subtype.ext hg)⟩ variable {p E}
lemma
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galAction_isPretransitive
null
@[simp] restrict_smul [Fact (p.Splits (algebraMap F E))] (ϕ : E ≃ₐ[F] E) (x : rootSet p E) : ↑(restrict p E ϕ • x) = ϕ x := by let ψ := AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom F p.SplittingField E) change ↑(ψ (ψ.symm _)) = ϕ x rw [AlgEquiv.apply_symm_apply ψ] change ϕ (rootsEquivRoots p E ((rootsEquivRoots p E).symm x)) = ϕ x rw [Equiv.apply_symm_apply (rootsEquivRoots p E)] variable (p E)
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrict_smul
`Polynomial.Gal.restrict p E` is compatible with `Polynomial.Gal.galAction p E`.
galActionHom [Fact (p.Splits (algebraMap F E))] : p.Gal →* Equiv.Perm (rootSet p E) := MulAction.toPermHom _ _
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galActionHom
`Polynomial.Gal.galAction` as a permutation representation
galActionHom_restrict [Fact (p.Splits (algebraMap F E))] (ϕ : E ≃ₐ[F] E) (x : rootSet p E) : ↑(galActionHom p E (restrict p E ϕ) x) = ϕ x := restrict_smul ϕ x
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galActionHom_restrict
null
galActionHom_injective [Fact (p.Splits (algebraMap F E))] : Function.Injective (galActionHom p E) := by rw [injective_iff_map_eq_one] intro ϕ hϕ ext (x hx) have key := Equiv.Perm.ext_iff.mp hϕ (rootsEquivRoots p E ⟨x, hx⟩) change rootsEquivRoots p E (ϕ • (rootsEquivRoots p E).symm (rootsEquivRoots p E ⟨x, hx⟩)) = rootsEquivRoots p E ⟨x, hx⟩ at key rw [Equiv.symm_apply_apply] at key exact Subtype.ext_iff.mp (Equiv.injective (rootsEquivRoots p E) key)
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
galActionHom_injective
`gal p` embeds as a subgroup of permutations of the roots of `p` in `E`.
restrictDvd (hpq : p ∣ q) : q.Gal →* p.Gal := haveI := Classical.dec (q = 0) if hq : q = 0 then 1 else @restrict F _ p _ _ _ ⟨splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q) hpq⟩
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictDvd
`Polynomial.Gal.restrict`, when both fields are splitting fields of polynomials.
restrictDvd_def [Decidable (q = 0)] (hpq : p ∣ q) : restrictDvd hpq = if hq : q = 0 then 1 else @restrict F _ p _ _ _ ⟨splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q) hpq⟩ := by unfold restrictDvd congr
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictDvd_def
null
restrictDvd_surjective (hpq : p ∣ q) (hq : q ≠ 0) : Function.Surjective (restrictDvd hpq) := by classical haveI := Fact.mk <| splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q) hpq simpa only [restrictDvd_def, dif_neg hq] using restrict_surjective _ _ variable (p q)
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictDvd_surjective
null
restrictProd : (p * q).Gal →* p.Gal × q.Gal := MonoidHom.prod (restrictDvd (dvd_mul_right p q)) (restrictDvd (dvd_mul_left q p))
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictProd
The Galois group of a product maps into the product of the Galois groups.
restrictProd_injective : Function.Injective (restrictProd p q) := by by_cases hpq : p * q = 0 · have : Unique (p * q).Gal := by rw [hpq]; infer_instance exact fun f g _ => Eq.trans (Unique.eq_default f) (Unique.eq_default g).symm intro f g hfg classical simp only [restrictProd, restrictDvd_def] at hfg simp only [dif_neg hpq, MonoidHom.prod_apply, Prod.mk_inj] at hfg ext (x hx) rw [rootSet_def, aroots_mul hpq] at hx rcases Multiset.mem_add.mp (Multiset.mem_toFinset.mp hx) with h | h · haveI : Fact (p.Splits (algebraMap F (p * q).SplittingField)) := ⟨splits_of_splits_of_dvd _ hpq (SplittingField.splits (p * q)) (dvd_mul_right p q)⟩ have key : x = algebraMap p.SplittingField (p * q).SplittingField ((rootsEquivRoots p _).invFun ⟨x, (@Multiset.mem_toFinset _ (Classical.decEq _) _ _).mpr h⟩) := Subtype.ext_iff.mp (Equiv.apply_symm_apply (rootsEquivRoots p _) ⟨x, _⟩).symm rw [key, ← AlgEquiv.restrictNormal_commutes, ← AlgEquiv.restrictNormal_commutes] exact congr_arg _ (AlgEquiv.ext_iff.mp hfg.1 _) · haveI : Fact (q.Splits (algebraMap F (p * q).SplittingField)) := ⟨splits_of_splits_of_dvd _ hpq (SplittingField.splits (p * q)) (dvd_mul_left q p)⟩ have key : x = algebraMap q.SplittingField (p * q).SplittingField ((rootsEquivRoots q _).invFun ⟨x, (@Multiset.mem_toFinset _ (Classical.decEq _) _ _).mpr h⟩) := Subtype.ext_iff.mp (Equiv.apply_symm_apply (rootsEquivRoots q _) ⟨x, _⟩).symm rw [key, ← AlgEquiv.restrictNormal_commutes, ← AlgEquiv.restrictNormal_commutes] exact congr_arg _ (AlgEquiv.ext_iff.mp hfg.2 _)
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictProd_injective
`Polynomial.Gal.restrictProd` is actually a subgroup embedding.
mul_splits_in_splittingField_of_mul {p₁ q₁ p₂ q₂ : F[X]} (hq₁ : q₁ ≠ 0) (hq₂ : q₂ ≠ 0) (h₁ : p₁.Splits (algebraMap F q₁.SplittingField)) (h₂ : p₂.Splits (algebraMap F q₂.SplittingField)) : (p₁ * p₂).Splits (algebraMap F (q₁ * q₂).SplittingField) := by apply splits_mul · rw [← (SplittingField.lift q₁ (splits_of_splits_of_dvd (algebraMap F (q₁ * q₂).SplittingField) (mul_ne_zero hq₁ hq₂) (SplittingField.splits _) (dvd_mul_right q₁ q₂))).comp_algebraMap] exact splits_comp_of_splits _ _ h₁ · rw [← (SplittingField.lift q₂ (splits_of_splits_of_dvd (algebraMap F (q₁ * q₂).SplittingField) (mul_ne_zero hq₁ hq₂) (SplittingField.splits _) (dvd_mul_left q₂ q₁))).comp_algebraMap] exact splits_comp_of_splits _ _ h₂
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
mul_splits_in_splittingField_of_mul
null
splits_in_splittingField_of_comp (hq : q.natDegree ≠ 0) : p.Splits (algebraMap F (p.comp q).SplittingField) := by let P : F[X] → Prop := fun r => r.Splits (algebraMap F (r.comp q).SplittingField) have key1 : ∀ {r : F[X]}, Irreducible r → P r := by intro r hr by_cases hr' : natDegree r = 0 · exact splits_of_natDegree_le_one _ (le_trans (le_of_eq hr') zero_le_one) obtain ⟨x, hx⟩ := exists_root_of_splits _ (SplittingField.splits (r.comp q)) fun h => hr' ((mul_eq_zero.mp (natDegree_comp.symm.trans (natDegree_eq_of_degree_eq_some h))).resolve_right hq) rw [← aeval_def, aeval_comp] at hx have h_normal : Normal F (r.comp q).SplittingField := SplittingField.instNormal (r.comp q) have qx_int := Normal.isIntegral h_normal (aeval x q) exact splits_of_splits_of_dvd _ (minpoly.ne_zero qx_int) (Normal.splits h_normal _) ((minpoly.irreducible qx_int).dvd_symm hr (minpoly.dvd F _ hx)) have key2 : ∀ {p₁ p₂ : F[X]}, P p₁ → P p₂ → P (p₁ * p₂) := by intro p₁ p₂ hp₁ hp₂ by_cases h₁ : p₁.comp q = 0 · rcases comp_eq_zero_iff.mp h₁ with h | h · rw [h, zero_mul] exact splits_zero _ · exact False.elim (hq (by rw [h.2, natDegree_C])) by_cases h₂ : p₂.comp q = 0 · rcases comp_eq_zero_iff.mp h₂ with h | h · rw [h, mul_zero] exact splits_zero _ · exact False.elim (hq (by rw [h.2, natDegree_C])) have key := mul_splits_in_splittingField_of_mul h₁ h₂ hp₁ hp₂ rwa [← mul_comp] at key exact WfDvdMonoid.induction_on_irreducible p (splits_zero _) (fun _ => splits_of_isUnit _) fun _ _ _ h => key2 (key1 h)
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
splits_in_splittingField_of_comp
`p` splits in the splitting field of `p ∘ q`, for `q` non-constant.
restrictComp (hq : q.natDegree ≠ 0) : (p.comp q).Gal →* p.Gal := let h : Fact (Splits (algebraMap F (p.comp q).SplittingField) p) := ⟨splits_in_splittingField_of_comp p q hq⟩ @restrict F _ p _ _ _ h
def
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictComp
`Polynomial.Gal.restrict` for the composition of polynomials.
restrictComp_surjective (hq : q.natDegree ≠ 0) : Function.Surjective (restrictComp p q hq) := by haveI : Fact (Splits (algebraMap F (SplittingField (comp p q))) p) := ⟨splits_in_splittingField_of_comp p q hq⟩ simpa only [restrictComp] using restrict_surjective _ _ variable {p q} open scoped IntermediateField
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
restrictComp_surjective
null
card_of_separable (hp : p.Separable) : Nat.card p.Gal = finrank F p.SplittingField := haveI : IsGalois F p.SplittingField := IsGalois.of_separable_splitting_field hp IsGalois.card_aut_eq_finrank F p.SplittingField
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
card_of_separable
For a separable polynomial, its Galois group has cardinality equal to the dimension of its splitting field over `F`.
prime_degree_dvd_card [CharZero F] (p_irr : Irreducible p) (p_deg : p.natDegree.Prime) : p.natDegree ∣ Nat.card p.Gal := by rw [Gal.card_of_separable p_irr.separable] have hp : p.degree ≠ 0 := fun h => Nat.Prime.ne_zero p_deg (natDegree_eq_zero_iff_degree_le_zero.mpr (le_of_eq h)) let α : p.SplittingField := rootOfSplits (algebraMap F p.SplittingField) (SplittingField.splits p) hp have hα : IsIntegral F α := .of_finite F α use Module.finrank F⟮α⟯ p.SplittingField suffices (minpoly F α).natDegree = p.natDegree by letI _ : AddCommGroup F⟮α⟯ := Ring.toAddCommGroup rw [← Module.finrank_mul_finrank F F⟮α⟯ p.SplittingField, IntermediateField.adjoin.finrank hα, this] suffices minpoly F α ∣ p by have key := (minpoly.irreducible hα).dvd_symm p_irr this apply le_antisymm · exact natDegree_le_of_dvd this p_irr.ne_zero · exact natDegree_le_of_dvd key (minpoly.ne_zero hα) apply minpoly.dvd F α rw [aeval_def, map_rootOfSplits _ (SplittingField.splits p) hp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.Galois.Basic" ]
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
prime_degree_dvd_card
null
@[stacks 09HY "second part"] exists_primitive_element_of_finite_top [Finite E] : ∃ α : E, F⟮α⟯ = ⊤ := by obtain ⟨α, hα⟩ := @IsCyclic.exists_generator Eˣ _ _ use α rw [eq_top_iff] rintro x - by_cases hx : x = 0 · rw [hx] exact F⟮α.val⟯.zero_mem · obtain ⟨n, hn⟩ := Set.mem_range.mp (hα (Units.mk0 x hx)) rw [show x = α ^ n by norm_cast; rw [hn, Units.val_mk0]] exact zpow_mem (mem_adjoin_simple_self F (E := E) ↑α) n
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
exists_primitive_element_of_finite_top
**Primitive element theorem** assuming E is finite.
exists_primitive_element_of_finite_bot [Finite F] [FiniteDimensional F E] : ∃ α : E, F⟮α⟯ = ⊤ := haveI : Finite E := Module.finite_of_finite F exists_primitive_element_of_finite_top F E
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
exists_primitive_element_of_finite_bot
Primitive element theorem for finite-dimensional extension of a finite field.
primitive_element_inf_aux_exists_c (f g : F[X]) : ∃ c : F, ∀ α' ∈ (f.map ϕ).roots, ∀ β' ∈ (g.map ϕ).roots, -(α' - α) / (β' - β) ≠ ϕ c := by classical let sf := (f.map ϕ).roots let sg := (g.map ϕ).roots classical let s := (sf.bind fun α' => sg.map fun β' => -(α' - α) / (β' - β)).toFinset let s' := s.preimage ϕ fun x _ y _ h => ϕ.injective h obtain ⟨c, hc⟩ := Infinite.exists_notMem_finset s' simp_rw [s', s, Finset.mem_preimage, Multiset.mem_toFinset, Multiset.mem_bind, Multiset.mem_map] at hc push_neg at hc exact ⟨c, hc⟩ variable (F) variable [Algebra F E]
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_inf_aux_exists_c
null
primitive_element_inf_aux [Algebra.IsSeparable F E] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯ := by classical have hα := Algebra.IsSeparable.isIntegral F α have hβ := Algebra.IsSeparable.isIntegral F β let f := minpoly F α let g := minpoly F β let ιFE := algebraMap F E let ιEE' := algebraMap E (SplittingField (g.map ιFE)) obtain ⟨c, hc⟩ := primitive_element_inf_aux_exists_c (ιEE'.comp ιFE) (ιEE' α) (ιEE' β) f g let γ := α + c • β suffices β_in_Fγ : β ∈ F⟮γ⟯ by use γ apply le_antisymm · rw [adjoin_le_iff] have α_in_Fγ : α ∈ F⟮γ⟯ := by rw [← add_sub_cancel_right α (c • β)] exact F⟮γ⟯.sub_mem (mem_adjoin_simple_self F γ) (F⟮γ⟯.toSubalgebra.smul_mem β_in_Fγ c) rintro x (rfl | rfl) <;> assumption · rw [adjoin_simple_le_iff] have α_in_Fαβ : α ∈ F⟮α, β⟯ := subset_adjoin F {α, β} (Set.mem_insert α {β}) have β_in_Fαβ : β ∈ F⟮α, β⟯ := subset_adjoin F {α, β} (Set.mem_insert_of_mem α rfl) exact F⟮α, β⟯.add_mem α_in_Fαβ (F⟮α, β⟯.smul_mem β_in_Fαβ) classical let p := EuclideanDomain.gcd ((f.map (algebraMap F F⟮γ⟯)).comp (C (AdjoinSimple.gen F γ) - (C ↑c : F⟮γ⟯[X]) * X)) (g.map (algebraMap F F⟮γ⟯)) let h := EuclideanDomain.gcd ((f.map ιFE).comp (C γ - C (ιFE c) * X)) (g.map ιFE) have map_g_ne_zero : g.map ιFE ≠ 0 := map_ne_zero (minpoly.ne_zero hβ) have h_ne_zero : h ≠ 0 := mt EuclideanDomain.gcd_eq_zero_iff.mp (not_and.mpr fun _ => map_g_ne_zero) suffices p_linear : p.map (algebraMap F⟮γ⟯ E) = C h.leadingCoeff * (X - C β) by have finale : β = algebraMap F⟮γ⟯ E (-p.coeff 0 / p.coeff 1) := by simp [map_div₀, RingHom.map_neg, ← coeff_map, ← coeff_map, p_linear, mul_sub, coeff_C, mul_div_cancel_left₀ β (mt leadingCoeff_eq_zero.mp h_ne_zero)] rw [finale] exact Subtype.mem (-p.coeff 0 / p.coeff 1) have h_sep : h.Separable := separable_gcd_right _ (.map (Algebra.IsSeparable.isSeparable F β)) have h_root : h.eval β = 0 := by apply eval_gcd_eq_zero · rw [eval_comp, eval_sub, eval_mul, eval_C, eval_C, eval_X, eval_map, ← aeval_def, ← Algebra.smul_def, add_sub_cancel_right, minpoly.aeval] · rw [eval_map, ← aeval_def, minpoly.aeval] have h_splits : Splits ιEE' h := splits_of_splits_gcd_right ιEE' map_g_ne_zero (SplittingField.splits _) have h_roots : ∀ x ∈ (h.map ιEE').roots, x = ιEE' β := by intro x hx rw [mem_roots_map h_ne_zero] at hx specialize hc (ιEE' γ - ιEE' (ιFE c) * x) (by have f_root := root_left_of_root_gcd hx rw [eval₂_comp, eval₂_sub, eval₂_mul, eval₂_C, eval₂_C, eval₂_X, eval₂_map] at f_root exact (mem_roots_map (minpoly.ne_zero hα)).mpr f_root) specialize hc x (by ...
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_inf_aux
This is the heart of the proof of the primitive element theorem. It shows that if `F` is infinite and `α` and `β` are separable over `F` then `F⟮α, β⟯` is generated by a single element.
private primitive_element_inf_aux_of_finite_intermediateField [Finite (IntermediateField F E)] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯ := by let f : F → IntermediateField F E := fun x ↦ F⟮α + x • β⟯ obtain ⟨x, y, hneq, heq⟩ := Finite.exists_ne_map_eq_of_infinite f use α + x • β apply le_antisymm · rw [adjoin_le_iff] have αxβ_in_K : α + x • β ∈ F⟮α + x • β⟯ := mem_adjoin_simple_self F _ have αyβ_in_K : α + y • β ∈ F⟮α + y • β⟯ := mem_adjoin_simple_self F _ dsimp [f] at * simp only [← heq] at αyβ_in_K have β_in_K := sub_mem αxβ_in_K αyβ_in_K rw [show (α + x • β) - (α + y • β) = (x - y) • β by rw [sub_smul]; abel1] at β_in_K replace β_in_K := smul_mem _ β_in_K (x := (x - y)⁻¹) rw [smul_smul, inv_mul_eq_div, div_self (sub_ne_zero.2 hneq), one_smul] at β_in_K have α_in_K : α ∈ F⟮α + x • β⟯ := by convert ← sub_mem αxβ_in_K (smul_mem _ β_in_K) apply add_sub_cancel_right rintro x (rfl | rfl) <;> assumption · rw [adjoin_simple_le_iff] have α_in_Fαβ : α ∈ F⟮α, β⟯ := subset_adjoin F {α, β} (Set.mem_insert α {β}) have β_in_Fαβ : β ∈ F⟮α, β⟯ := subset_adjoin F {α, β} (Set.mem_insert_of_mem α rfl) exact F⟮α, β⟯.add_mem α_in_Fαβ (F⟮α, β⟯.smul_mem β_in_Fαβ)
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_inf_aux_of_finite_intermediateField
null
@[stacks 030N "The moreover part"] exists_primitive_element : ∃ α : E, F⟮α⟯ = ⊤ := by rcases isEmpty_or_nonempty (Fintype F) with (F_inf | ⟨⟨F_finite⟩⟩) · let P : IntermediateField F E → Prop := fun K => ∃ α : E, F⟮α⟯ = K have base : P ⊥ := ⟨0, adjoin_zero⟩ have ih : ∀ (K : IntermediateField F E) (x : E), P K → P (K⟮x⟯.restrictScalars F) := by intro K β hK obtain ⟨α, hK⟩ := hK rw [← hK, adjoin_simple_adjoin_simple] haveI : Infinite F := isEmpty_fintype.mp F_inf obtain ⟨γ, hγ⟩ := primitive_element_inf_aux F α β exact ⟨γ, hγ.symm⟩ exact induction_on_adjoin P base ih ⊤ · exact exists_primitive_element_of_finite_bot F E
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
exists_primitive_element
**Primitive element theorem**: a finite separable field extension `E` of `F` has a primitive element, i.e. there is an `α ∈ E` such that `F⟮α⟯ = (⊤ : Subalgebra F E)`.
noncomputable powerBasisOfFiniteOfSeparable : PowerBasis F E := let α := (exists_primitive_element F E).choose let pb := adjoin.powerBasis (Algebra.IsSeparable.isIntegral F α) have e : F⟮α⟯ = ⊤ := (exists_primitive_element F E).choose_spec pb.map ((IntermediateField.equivOfEq e).trans IntermediateField.topEquiv)
def
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
powerBasisOfFiniteOfSeparable
Alternative phrasing of primitive element theorem: a finite separable field extension has a basis `1, α, α^2, ..., α^n`. See also `exists_primitive_element`.
isAlgebraic_of_adjoin_eq_adjoin {α : E} {m n : ℕ} (hneq : m ≠ n) (heq : F⟮α ^ m⟯ = F⟮α ^ n⟯) : IsAlgebraic F α := by wlog hmn : m < n · exact this F E hneq.symm heq.symm (hneq.lt_or_gt.resolve_left hmn) by_cases hm : m = 0 · rw [hm] at heq hmn simp only [pow_zero, adjoin_one] at heq obtain ⟨y, h⟩ := mem_bot.1 (heq.symm ▸ mem_adjoin_simple_self F (α ^ n)) refine ⟨X ^ n - C y, X_pow_sub_C_ne_zero hmn y, ?_⟩ simp only [map_sub, map_pow, aeval_X, aeval_C, h, sub_self] obtain ⟨r, s, h⟩ := (mem_adjoin_simple_iff F _).1 (heq ▸ mem_adjoin_simple_self F (α ^ m)) by_cases hzero : aeval (α ^ n) s = 0 · simp only [hzero, div_zero, pow_eq_zero_iff hm] at h exact h.symm ▸ isAlgebraic_zero replace hm : 0 < m := Nat.pos_of_ne_zero hm rw [eq_div_iff hzero, ← sub_eq_zero] at h replace hzero : s ≠ 0 := by rintro rfl; simp only [map_zero, not_true_eq_false] at hzero let f : F[X] := X ^ m * expand F n s - expand F n r refine ⟨f, ?_, ?_⟩ · have : f.coeff (n * s.natDegree + m) ≠ 0 := by have hn : 0 < n := by linarith only [hm, hmn] have hndvd : ¬ n ∣ n * s.natDegree + m := by rw [← Nat.dvd_add_iff_right (n.dvd_mul_right s.natDegree)] exact Nat.not_dvd_of_pos_of_lt hm hmn simp only [f, coeff_sub, coeff_X_pow_mul, s.coeff_expand_mul' hn, coeff_natDegree, coeff_expand hn r, hndvd, ite_false, sub_zero] exact leadingCoeff_ne_zero.2 hzero intro h simp only [h, coeff_zero, ne_eq, not_true_eq_false] at this · simp only [f, map_sub, map_mul, map_pow, aeval_X, expand_aeval, h]
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
isAlgebraic_of_adjoin_eq_adjoin
null
isAlgebraic_of_finite_intermediateField [Finite (IntermediateField F E)] : Algebra.IsAlgebraic F E := ⟨fun α ↦ have ⟨_m, _n, hneq, heq⟩ := Finite.exists_ne_map_eq_of_infinite fun n ↦ F⟮α ^ n⟯ isAlgebraic_of_adjoin_eq_adjoin F E hneq heq⟩
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
isAlgebraic_of_finite_intermediateField
null
FiniteDimensional.of_finite_intermediateField [Finite (IntermediateField F E)] : FiniteDimensional F E := by let IF := { K : IntermediateField F E // ∃ x, K = F⟮x⟯ } have := isAlgebraic_of_finite_intermediateField F E haveI : ∀ K : IF, FiniteDimensional F K.1 := fun ⟨_, x, rfl⟩ ↦ adjoin.finiteDimensional (Algebra.IsIntegral.isIntegral _) have hfin := finiteDimensional_iSup_of_finite (t := fun K : IF ↦ K.1) have htop : ⨆ K : IF, K.1 = ⊤ := le_top.antisymm fun x _ ↦ le_iSup (fun K : IF ↦ K.1) ⟨F⟮x⟯, x, rfl⟩ <| mem_adjoin_simple_self F x rw [htop] at hfin exact topEquiv.toLinearEquiv.finiteDimensional
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
FiniteDimensional.of_finite_intermediateField
null
exists_primitive_element_of_finite_intermediateField [Finite (IntermediateField F E)] (K : IntermediateField F E) : ∃ α : E, F⟮α⟯ = K := by haveI := FiniteDimensional.of_finite_intermediateField F E rcases finite_or_infinite F with (_ | _) · obtain ⟨α, h⟩ := exists_primitive_element_of_finite_bot F K exact ⟨α, by simpa only [lift_adjoin_simple, lift_top] using congr_arg lift h⟩ · apply induction_on_adjoin (fun K ↦ ∃ α : E, F⟮α⟯ = K) ⟨0, adjoin_zero⟩ rintro K β ⟨α, rfl⟩ simp_rw [adjoin_simple_adjoin_simple, eq_comm] exact primitive_element_inf_aux_of_finite_intermediateField F α β
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
exists_primitive_element_of_finite_intermediateField
null
FiniteDimensional.of_exists_primitive_element [Algebra.IsAlgebraic F E] (h : ∃ α : E, F⟮α⟯ = ⊤) : FiniteDimensional F E := by obtain ⟨α, hprim⟩ := h have hfin := adjoin.finiteDimensional (Algebra.IsIntegral.isIntegral (R := F) α) rw [hprim] at hfin exact topEquiv.toLinearEquiv.finiteDimensional
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
FiniteDimensional.of_exists_primitive_element
null
finite_intermediateField_of_exists_primitive_element [Algebra.IsAlgebraic F E] (h : ∃ α : E, F⟮α⟯ = ⊤) : Finite (IntermediateField F E) := by haveI := FiniteDimensional.of_exists_primitive_element F E h obtain ⟨α, hprim⟩ := h let f : F[X] := minpoly F α let G := { g : E[X] // g.Monic ∧ g ∣ f.map (algebraMap F E) } have hfin : Finite G := @Finite.of_fintype _ <| fintypeSubtypeMonicDvd (f.map (algebraMap F E)) <| map_ne_zero (minpoly.ne_zero_of_finite F α) let g : IntermediateField F E → G := fun K ↦ ⟨(minpoly K α).map (algebraMap K E), (minpoly.monic <| .of_finite K α).map _, by convert Polynomial.map_dvd (algebraMap K E) (minpoly.dvd_map_of_isScalarTower F K α) rw [Polynomial.map_map]; rfl⟩ have hinj : Function.Injective g := fun K K' heq ↦ by rw [Subtype.mk.injEq] at heq apply_fun fun f : E[X] ↦ adjoin F (f.coeffs : Set E) at heq simpa only [adjoin_minpoly_coeff_of_exists_primitive_element F hprim] using heq exact Finite.of_injective g hinj
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
finite_intermediateField_of_exists_primitive_element
null
@[stacks 030N "Equivalence of (1) & (2)"] exists_primitive_element_iff_finite_intermediateField : (Algebra.IsAlgebraic F E ∧ ∃ α : E, F⟮α⟯ = ⊤) ↔ Finite (IntermediateField F E) := ⟨fun ⟨_, h⟩ ↦ finite_intermediateField_of_exists_primitive_element F E h, fun _ ↦ ⟨isAlgebraic_of_finite_intermediateField F E, exists_primitive_element_of_finite_intermediateField F E _⟩⟩
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
exists_primitive_element_iff_finite_intermediateField
**Steinitz theorem**: an algebraic extension `E` of `F` has a primitive element (i.e. there is an `α ∈ E` such that `F⟮α⟯ = (⊤ : Subalgebra F E)`) if and only if there exist only finitely many intermediate fields between `E` and `F`.
AlgHom.natCard_of_splits (L : Type*) [Field L] [Algebra F L] (hL : ∀ x : E, (minpoly F x).Splits (algebraMap F L)) : Nat.card (E →ₐ[F] L) = finrank F E := (AlgHom.natCard_of_powerBasis (L := L) (Field.powerBasisOfFiniteOfSeparable F E) (Algebra.IsSeparable.isSeparable _ _) <| hL _).trans (PowerBasis.finrank _).symm @[simp]
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
AlgHom.natCard_of_splits
null
AlgHom.card_of_splits (L : Type*) [Field L] [Algebra F L] (hL : ∀ x : E, (minpoly F x).Splits (algebraMap F L)) : Fintype.card (E →ₐ[F] L) = finrank F E := by rw [Fintype.card_eq_nat_card, AlgHom.natCard_of_splits F E L hL] @[simp]
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
AlgHom.card_of_splits
null
AlgHom.card (K : Type*) [Field K] [IsAlgClosed K] [Algebra F K] : Fintype.card (E →ₐ[F] K) = finrank F E := AlgHom.card_of_splits _ _ _ (fun _ ↦ IsAlgClosed.splits_codomain _)
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
AlgHom.card
null
primitive_element_iff_minpoly_natDegree_eq (α : E) : F⟮α⟯ = ⊤ ↔ (minpoly F α).natDegree = finrank F E := by rw [← adjoin.finrank (IsIntegral.of_finite F α), ← finrank_top F E] refine ⟨fun h => ?_, fun h => eq_of_le_of_finrank_eq le_top h⟩ exact congr_arg (fun K : IntermediateField F E => finrank F K) h
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_iff_minpoly_natDegree_eq
null
primitive_element_iff_minpoly_degree_eq (α : E) : F⟮α⟯ = ⊤ ↔ (minpoly F α).degree = finrank F E := by rw [degree_eq_iff_natDegree_eq, primitive_element_iff_minpoly_natDegree_eq] exact minpoly.ne_zero_of_finite F α variable [Algebra.IsSeparable F E] (A : Type*) [Field A] [Algebra F A] (hA : ∀ x : E, (minpoly F x).Splits (algebraMap F A)) include hA
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_iff_minpoly_degree_eq
null
primitive_element_iff_algHom_eq_of_eval' (α : E) : F⟮α⟯ = ⊤ ↔ Function.Injective fun φ : E →ₐ[F] A ↦ φ α := by classical simp_rw [primitive_element_iff_minpoly_natDegree_eq, ← card_rootSet_eq_natDegree (K := A) (Algebra.IsSeparable.isSeparable F α) (hA _), ← toFinset_card, ← (Algebra.IsAlgebraic.of_finite F E).range_eval_eq_rootSet_minpoly_of_splits _ hA α, ← AlgHom.card_of_splits F E A hA, Fintype.card, toFinset_range, Finset.card_image_iff, Finset.coe_univ, ← injective_iff_injOn_univ]
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_iff_algHom_eq_of_eval'
null
primitive_element_iff_algHom_eq_of_eval (α : E) (φ : E →ₐ[F] A) : F⟮α⟯ = ⊤ ↔ ∀ ψ : E →ₐ[F] A, φ α = ψ α → φ = ψ := by refine ⟨fun h ψ hψ ↦ (Field.primitive_element_iff_algHom_eq_of_eval' F A hA α).mp h hψ, fun h ↦ eq_of_le_of_finrank_eq' le_top ?_⟩ letI : Algebra F⟮α⟯ A := (φ.comp F⟮α⟯.val).toAlgebra haveI := Algebra.isSeparable_tower_top_of_isSeparable F F⟮α⟯ E rw [IntermediateField.finrank_top, ← AlgHom.card_of_splits _ _ A, Fintype.card_eq_one_iff] · exact ⟨{ __ := φ, commutes' := fun _ ↦ rfl }, fun ψ ↦ AlgHom.restrictScalars_injective F <| Eq.symm <| h _ (ψ.commutes <| AdjoinSimple.gen F α).symm⟩ · exact fun x ↦ (IsIntegral.of_finite F x).minpoly_splits_tower_top (hA x)
theorem
FieldTheory
[ "Mathlib.Data.Fintype.Pigeonhole", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.FieldTheory.SplittingField.Construction", "Mathlib.RingTheory.IntegralDomain", "Mathlib.RingTheory.Polynomial.UniqueFactorization" ]
Mathlib/FieldTheory/PrimitiveElement.lean
primitive_element_iff_algHom_eq_of_eval
null
noncomputable relrank := Module.rank ↥(A ⊓ B) (extendScalars (inf_le_right : A ⊓ B ≤ B))
def
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank
`Subfield.relrank A B` is defined to be `[B : A ⊓ B]` as a `Cardinal`, in particular, when `A ≤ B` it is `[B : A]`, the degree of the field extension `B / A`. This is similar to `Subgroup.relIndex` but it is `Cardinal` valued.
noncomputable relfinrank := finrank ↥(A ⊓ B) (extendScalars (inf_le_right : A ⊓ B ≤ B))
def
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank
The `Nat` version of `Subfield.relrank`. If `B / A ⊓ B` is an infinite extension, then it is zero.
relfinrank_eq_toNat_relrank : relfinrank A B = toNat (relrank A B) := rfl variable {A B C}
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_toNat_relrank
null
relrank_eq_of_inf_eq (h : A ⊓ C = B ⊓ C) : relrank A C = relrank B C := by simp_rw [relrank] congr!
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_eq_of_inf_eq
null
relfinrank_eq_of_inf_eq (h : A ⊓ C = B ⊓ C) : relfinrank A C = relfinrank B C := congr(toNat $(relrank_eq_of_inf_eq h))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_of_inf_eq
null
relrank_eq_rank_of_le (h : A ≤ B) : relrank A B = Module.rank A (extendScalars h) := by rw [relrank] have := inf_of_le_left h congr!
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_eq_rank_of_le
If `A ≤ B`, then `Subfield.relrank A B` is `[B : A]`.
relfinrank_eq_finrank_of_le (h : A ≤ B) : relfinrank A B = finrank A (extendScalars h) := congr(toNat $(relrank_eq_rank_of_le h)) variable (A B C)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_finrank_of_le
If `A ≤ B`, then `Subfield.relfinrank A B` is `[B : A]`.
inf_relrank_right : relrank (A ⊓ B) B = relrank A B := relrank_eq_rank_of_le (inf_le_right : A ⊓ B ≤ B)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relrank_right
null
inf_relfinrank_right : relfinrank (A ⊓ B) B = relfinrank A B := congr(toNat $(inf_relrank_right A B))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relfinrank_right
null
inf_relrank_left : relrank (A ⊓ B) A = relrank B A := by rw [inf_comm, inf_relrank_right]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relrank_left
null
inf_relfinrank_left : relfinrank (A ⊓ B) A = relfinrank B A := congr(toNat $(inf_relrank_left A B)) @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relfinrank_left
null
relrank_self : relrank A A = 1 := by rw [relrank_eq_rank_of_le (le_refl A), extendScalars_self, IntermediateField.rank_bot] @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_self
null
relfinrank_self : relfinrank A A = 1 := by simp [relfinrank_eq_toNat_relrank] variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_self
null
relrank_eq_one_of_le (h : B ≤ A) : relrank A B = 1 := by rw [← inf_relrank_right, inf_eq_right.2 h, relrank_self] variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_eq_one_of_le
null
relfinrank_eq_one_of_le (h : B ≤ A) : relfinrank A B = 1 := by simp [relfinrank_eq_toNat_relrank, relrank_eq_one_of_le h] variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_one_of_le
null
relrank_mul_rank_top (h : A ≤ B) : relrank A B * Module.rank B E = Module.rank A E := by rw [relrank_eq_rank_of_le h] letI : Algebra A B := (inclusion h).toAlgebra haveI : IsScalarTower A B E := IsScalarTower.of_algebraMap_eq' rfl exact rank_mul_rank A B E variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_mul_rank_top
null
relfinrank_mul_finrank_top (h : A ≤ B) : relfinrank A B * finrank B E = finrank A E := by simpa using congr(toNat $(relrank_mul_rank_top h)) @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_mul_finrank_top
null
relrank_top_left : relrank ⊤ A = 1 := relrank_eq_one_of_le le_top @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_top_left
null
relfinrank_top_left : relfinrank ⊤ A = 1 := relfinrank_eq_one_of_le le_top @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_top_left
null
relrank_top_right : relrank A ⊤ = Module.rank A E := by let _ : AddCommMonoid (⊤ : IntermediateField A E) := inferInstance rw [relrank_eq_rank_of_le (show A ≤ ⊤ from le_top), extendScalars_top, IntermediateField.topEquiv.toLinearEquiv.rank_eq] @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_top_right
null
relfinrank_top_right : relfinrank A ⊤ = finrank A E := by simp [relfinrank_eq_toNat_relrank, finrank]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_top_right
null
lift_relrank_map_map (f : E →+* L) : lift.{v} (relrank (A.map f) (B.map f)) = lift.{w} (relrank A B) := .symm <| Algebra.lift_rank_eq_of_equiv_equiv (((A ⊓ B).equivMapOfInjective f f.injective).trans <| .subringCongr <| by rw [← map_inf]; rfl) (B.equivMapOfInjective f f.injective) rfl
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_relrank_map_map
null
relrank_map_map {L : Type v} [Field L] (f : E →+* L) : relrank (A.map f) (B.map f) = relrank A B := by simpa only [lift_id] using lift_relrank_map_map A B f
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_map_map
null
lift_relrank_comap (f : L →+* E) (B : Subfield L) : lift.{v} (relrank (A.comap f) B) = lift.{w} (relrank A (B.map f)) := (lift_relrank_map_map _ _ f).symm.trans <| congr_arg lift <| relrank_eq_of_inf_eq <| by rw [map_comap_eq, f.fieldRange_eq_map, inf_assoc, ← map_inf, top_inf_eq]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_relrank_comap
null
relrank_comap {L : Type v} [Field L] (f : L →+* E) (B : Subfield L) : relrank (A.comap f) B = relrank A (B.map f) := by simpa only [lift_id] using A.lift_relrank_comap f B
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_comap
null
relfinrank_comap (f : L →+* E) (B : Subfield L) : relfinrank (A.comap f) B = relfinrank A (B.map f) := by simpa using congr(toNat $(lift_relrank_comap A f B))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_comap
null
lift_rank_comap (f : L →+* E) : lift.{v} (Module.rank (A.comap f) L) = lift.{w} (relrank A f.fieldRange) := by simpa only [relrank_top_right, ← RingHom.fieldRange_eq_map] using lift_relrank_comap A f ⊤
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_rank_comap
null
rank_comap {L : Type v} [Field L] (f : L →+* E) : Module.rank (A.comap f) L = relrank A f.fieldRange := by simpa only [lift_id] using A.lift_rank_comap f
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
rank_comap
null
finrank_comap (f : L →+* E) : finrank (A.comap f) L = relfinrank A f.fieldRange := by simpa using congr(toNat $(lift_rank_comap A f))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
finrank_comap
null
relfinrank_map_map (f : E →+* L) : relfinrank (A.map f) (B.map f) = relfinrank A B := by simpa using congr(toNat $(lift_relrank_map_map A B f))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_map_map
null
lift_relrank_comap_comap_eq_lift_relrank_inf (f : L →+* E) : lift.{v} (relrank (A.comap f) (B.comap f)) = lift.{w} (relrank A (B ⊓ f.fieldRange)) := by conv_lhs => rw [← lift_relrank_map_map _ _ f, map_comap_eq, map_comap_eq] congr 1 apply relrank_eq_of_inf_eq rw [inf_assoc, inf_left_comm _ B, inf_of_le_left (le_refl _)]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_relrank_comap_comap_eq_lift_relrank_inf
null
relrank_comap_comap_eq_relrank_inf {L : Type v} [Field L] (f : L →+* E) : relrank (A.comap f) (B.comap f) = relrank A (B ⊓ f.fieldRange) := by simpa only [lift_id] using lift_relrank_comap_comap_eq_lift_relrank_inf A B f
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_comap_comap_eq_relrank_inf
null
relfinrank_comap_comap_eq_relfinrank_inf (f : L →+* E) : relfinrank (A.comap f) (B.comap f) = relfinrank A (B ⊓ f.fieldRange) := by simpa using congr(toNat $(lift_relrank_comap_comap_eq_lift_relrank_inf A B f))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_comap_comap_eq_relfinrank_inf
null
lift_relrank_comap_comap_eq_lift_relrank_of_le (f : L →+* E) (h : B ≤ f.fieldRange) : lift.{v} (relrank (A.comap f) (B.comap f)) = lift.{w} (relrank A B) := by simpa only [inf_of_le_left h] using lift_relrank_comap_comap_eq_lift_relrank_inf A B f
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_relrank_comap_comap_eq_lift_relrank_of_le
null
relrank_comap_comap_eq_relrank_of_le {L : Type v} [Field L] (f : L →+* E) (h : B ≤ f.fieldRange) : relrank (A.comap f) (B.comap f) = relrank A B := by simpa only [lift_id] using lift_relrank_comap_comap_eq_lift_relrank_of_le A B f h
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_comap_comap_eq_relrank_of_le
null
relfinrank_comap_comap_eq_relfinrank_of_le (f : L →+* E) (h : B ≤ f.fieldRange) : relfinrank (A.comap f) (B.comap f) = relfinrank A B := by simpa using congr(toNat $(lift_relrank_comap_comap_eq_lift_relrank_of_le A B f h))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_comap_comap_eq_relfinrank_of_le
null
lift_relrank_comap_comap_eq_lift_relrank_of_surjective (f : L →+* E) (h : Function.Surjective f) : lift.{v} (relrank (A.comap f) (B.comap f)) = lift.{w} (relrank A B) := lift_relrank_comap_comap_eq_lift_relrank_of_le A B f fun x _ ↦ h x
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
lift_relrank_comap_comap_eq_lift_relrank_of_surjective
null
relrank_comap_comap_eq_relrank_of_surjective {L : Type v} [Field L] (f : L →+* E) (h : Function.Surjective f) : relrank (A.comap f) (B.comap f) = relrank A B := by simpa using lift_relrank_comap_comap_eq_lift_relrank_of_surjective A B f h
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_comap_comap_eq_relrank_of_surjective
null
relfinrank_comap_comap_eq_relfinrank_of_surjective (f : L →+* E) (h : Function.Surjective f) : relfinrank (A.comap f) (B.comap f) = relfinrank A B := by simpa using congr(toNat $(lift_relrank_comap_comap_eq_lift_relrank_of_surjective A B f h)) variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_comap_comap_eq_relfinrank_of_surjective
null
relrank_dvd_rank_top_of_le (h : A ≤ B) : relrank A B ∣ Module.rank A E := dvd_of_mul_right_eq _ (relrank_mul_rank_top h) variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_dvd_rank_top_of_le
null
relfinrank_dvd_finrank_top_of_le (h : A ≤ B) : relfinrank A B ∣ finrank A E := dvd_of_mul_right_eq _ (relfinrank_mul_finrank_top h) variable {A B C} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_dvd_finrank_top_of_le
null
relrank_mul_relrank (h1 : A ≤ B) (h2 : B ≤ C) : relrank A B * relrank B C = relrank A C := by have h3 := h1.trans h2 rw [relrank_eq_rank_of_le h1, relrank_eq_rank_of_le h2, relrank_eq_rank_of_le h3] letI : Algebra A B := (inclusion h1).toAlgebra letI : Algebra B C := (inclusion h2).toAlgebra letI : Algebra A C := (inclusion h3).toAlgebra haveI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' rfl exact rank_mul_rank A B C variable {A B C} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_mul_relrank
null
relfinrank_mul_relfinrank (h1 : A ≤ B) (h2 : B ≤ C) : relfinrank A B * relfinrank B C = relfinrank A C := by simpa using congr(toNat $(relrank_mul_relrank h1 h2))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_mul_relfinrank
null
relrank_inf_mul_relrank : A.relrank (B ⊓ C) * B.relrank C = (A ⊓ B).relrank C := by rw [← inf_relrank_right A (B ⊓ C), ← inf_relrank_right B C, ← inf_relrank_right (A ⊓ B) C, inf_assoc, relrank_mul_relrank inf_le_right inf_le_right]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_inf_mul_relrank
null
relfinrank_inf_mul_relfinrank : A.relfinrank (B ⊓ C) * B.relfinrank C = (A ⊓ B).relfinrank C := by simpa using congr(toNat $(relrank_inf_mul_relrank A B C)) variable {B C} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_inf_mul_relfinrank
null
relrank_mul_relrank_eq_inf_relrank (h : B ≤ C) : relrank A B * relrank B C = (A ⊓ B).relrank C := by simpa only [inf_of_le_left h] using relrank_inf_mul_relrank A B C variable {B C} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_mul_relrank_eq_inf_relrank
null
relfinrank_mul_relfinrank_eq_inf_relfinrank (h : B ≤ C) : relfinrank A B * relfinrank B C = (A ⊓ B).relfinrank C := by simpa using congr(toNat $(relrank_mul_relrank_eq_inf_relrank A h)) variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_mul_relfinrank_eq_inf_relfinrank
null
relrank_inf_mul_relrank_of_le (h : A ≤ B) : A.relrank (B ⊓ C) * B.relrank C = A.relrank C := by simpa only [inf_of_le_left h] using relrank_inf_mul_relrank A B C variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_inf_mul_relrank_of_le
null
relfinrank_inf_mul_relfinrank_of_le (h : A ≤ B) : A.relfinrank (B ⊓ C) * B.relfinrank C = A.relfinrank C := by simpa using congr(toNat $(relrank_inf_mul_relrank_of_le C h)) variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_inf_mul_relfinrank_of_le
null
relrank_dvd_of_le_left (h : A ≤ B) : B.relrank C ∣ A.relrank C := dvd_of_mul_left_eq _ (relrank_inf_mul_relrank_of_le C h) variable {A B} in
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_dvd_of_le_left
null
relfinrank_dvd_of_le_left (h : A ≤ B) : B.relfinrank C ∣ A.relfinrank C := dvd_of_mul_left_eq _ (relfinrank_inf_mul_relfinrank_of_le C h)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_dvd_of_le_left
null
noncomputable relrank := A.toSubfield.relrank B.toSubfield
def
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank
`IntermediateField.relrank A B` is defined to be `[B : A ⊓ B]` as a `Cardinal`, in particular, when `A ≤ B` it is `[B : A]`, the degree of the field extension `B / A`. This is similar to `Subgroup.relIndex` but it is `Cardinal` valued.
noncomputable relfinrank := A.toSubfield.relfinrank B.toSubfield
def
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank
The `Nat` version of `IntermediateField.relrank`. If `B / A ⊓ B` is an infinite extension, then it is zero.
relfinrank_eq_toNat_relrank : relfinrank A B = toNat (relrank A B) := rfl variable {A B C}
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_toNat_relrank
null
relrank_eq_of_inf_eq (h : A ⊓ C = B ⊓ C) : relrank A C = relrank B C := Subfield.relrank_eq_of_inf_eq congr(toSubfield $h)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_eq_of_inf_eq
null
relfinrank_eq_of_inf_eq (h : A ⊓ C = B ⊓ C) : relfinrank A C = relfinrank B C := congr(toNat $(relrank_eq_of_inf_eq h))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_of_inf_eq
null
relrank_eq_rank_of_le (h : A ≤ B) : relrank A B = Module.rank A (extendScalars h) := Subfield.relrank_eq_rank_of_le h
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relrank_eq_rank_of_le
If `A ≤ B`, then `IntermediateField.relrank A B` is `[B : A]`
relfinrank_eq_finrank_of_le (h : A ≤ B) : relfinrank A B = finrank A (extendScalars h) := congr(toNat $(relrank_eq_rank_of_le h)) variable (A B C)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
relfinrank_eq_finrank_of_le
If `A ≤ B`, then `IntermediateField.relrank A B` is `[B : A]`
inf_relrank_right : relrank (A ⊓ B) B = relrank A B := relrank_eq_rank_of_le (inf_le_right : A ⊓ B ≤ B)
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relrank_right
null
inf_relfinrank_right : relfinrank (A ⊓ B) B = relfinrank A B := congr(toNat $(inf_relrank_right A B))
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relfinrank_right
null
inf_relrank_left : relrank (A ⊓ B) A = relrank B A := by rw [inf_comm, inf_relrank_right]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relrank_left
null
inf_relfinrank_left : relfinrank (A ⊓ B) A = relfinrank B A := congr(toNat $(inf_relrank_left A B)) @[simp]
theorem
FieldTheory
[ "Mathlib.FieldTheory.IntermediateField.Adjoin.Basic" ]
Mathlib/FieldTheory/Relrank.lean
inf_relfinrank_left
null