Skip to content

Commit 50f57fe

Browse files
committed
feat(Algebra/Polynomial/Splits): remove the RingHom argument of Splits (#31631)
1 parent 73f6a3a commit 50f57fe

File tree

37 files changed

+284
-276
lines changed

37 files changed

+284
-276
lines changed

Mathlib/Algebra/CubicDiscriminant.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ variable {P : Cubic F} [Field F] [Field K] {φ : F →+* K} {x y z : K}
413413
section Split
414414

415415
theorem splits_iff_card_roots (ha : P.a ≠ 0) :
416-
Splits φ P.toPoly ↔ Multiset.card (map φ P).roots = 3 := by
416+
Splits (P.toPoly.map φ) ↔ Multiset.card (map φ P).roots = 3 := by
417417
replace ha : (map φ P).a ≠ 0 := (_root_.map_ne_zero φ).mpr ha
418418
nth_rw 1 [← RingHom.id_comp φ]
419419
rw [roots, ← splits_map_iff, ← map_toPoly, Polynomial.splits_iff_card_roots,
420420
← ((degree_eq_iff_natDegree_eq <| ne_zero_of_a_ne_zero ha).1 <| degree_of_a_ne_zero ha : _ = 3)]
421421

422422
theorem splits_iff_roots_eq_three (ha : P.a ≠ 0) :
423-
Splits φ P.toPoly ↔ ∃ x y z : K, (map φ P).roots = {x, y, z} := by
423+
Splits (P.toPoly.map φ) ↔ ∃ x y z : K, (map φ P).roots = {x, y, z} := by
424424
rw [splits_iff_card_roots ha, card_eq_three]
425425

426426
theorem eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :

Mathlib/Algebra/Polynomial/Splits.lean

Lines changed: 102 additions & 99 deletions
Large diffs are not rendered by default.

Mathlib/Analysis/Complex/Polynomial/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Polynomial.Gal
6161

6262
section Rationals
6363

64-
theorem splits_ℚ_ℂ {p : ℚ[X]} : Fact (p.Splits (algebraMap ℚ ℂ)) :=
64+
theorem splits_ℚ_ℂ {p : ℚ[X]} : Fact ((p.map (algebraMap ℚ ℂ)).Splits) :=
6565
⟨IsAlgClosed.splits_codomain p⟩
6666

6767
attribute [local instance] splits_ℚ_ℂ

Mathlib/Analysis/Matrix/Spectrum.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ lemma eigenvalues_eq_eigenvalues_iff :
182182
· suffices hA.eigenvalues₀ = hB.eigenvalues₀ by unfold eigenvalues; rw [this]
183183
simp_rw [← List.ofFn_inj, ← sort_roots_charpoly_eq_eigenvalues₀, h]
184184

185-
theorem splits_charpoly (hA : A.IsHermitian) : A.charpoly.Splits (RingHom.id 𝕜) :=
185+
theorem splits_charpoly (hA : A.IsHermitian) : (A.charpoly.map (RingHom.id 𝕜)).Splits :=
186186
Polynomial.splits_iff_card_roots.mpr (by simp [hA.roots_charpoly_eq_eigenvalues])
187187

188188
/-- The determinant of a Hermitian matrix is the product of its eigenvalues. -/

Mathlib/Analysis/Normed/Unbundled/SpectralNorm.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ theorem spectralNorm_eq_iSup_of_finiteDimensional_normal
483483
norm_root_le_spectralValue hf_pm hf_na
484484
(minpoly.monic (hn.isIntegral x)) (minpoly.aeval_algHom _ σ.toAlgHom _))
485485
· set p := minpoly K x
486-
have hp_sp : Splits (algebraMap K L) (minpoly K x) := hn.splits x
486+
have hp_sp : Splits ((minpoly K x).map (algebraMap K L)) := hn.splits x
487487
obtain ⟨s, hs⟩ := (splits_iff_exists_multiset _).mp hp_sp
488488
have h_lc : (algebraMap K L) (minpoly K x).leadingCoeff = 1 := by
489489
rw [minpoly.monic (hn.isIntegral x), map_one]
@@ -953,7 +953,7 @@ theorem spectralNorm_pow_natDegree_eq_prod_roots (x : L) {E : Type*} [Field E] [
953953
theorem spectralNorm_eq_norm_coeff_zero_rpow (x : L) :
954954
spectralNorm K L x = ‖(minpoly K x).coeff 0‖ ^ (1 / (minpoly K x).natDegree : ℝ) := by
955955
set E := (mapAlg K L (minpoly K x)).SplittingField
956-
have hspl : Splits (RingHom.id E) (mapAlg K E (minpoly K x)) :=
956+
have hspl : Splits ((mapAlg K E (minpoly K x)).map (RingHom.id E)) :=
957957
IsSplittingField.IsScalarTower.splits (K := L) E (minpoly K x)
958958
have : Algebra.IsAlgebraic L E :=
959959
IsSplittingField.IsScalarTower.isAlgebraic E (mapAlg K L (minpoly K x))

Mathlib/FieldTheory/AbelRuffini.lean

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ theorem gal_prod_isSolvable {s : Multiset F[X]} (hs : ∀ p ∈ s, IsSolvable (G
6060
exact gal_mul_isSolvable (hs p hps) ht
6161

6262
theorem gal_isSolvable_of_splits {p q : F[X]}
63-
(_ : Fact (p.Splits (algebraMap F q.SplittingField))) (hq : IsSolvable q.Gal) :
63+
(_ : Fact ((p.map (algebraMap F q.SplittingField)).Splits)) (hq : IsSolvable q.Gal) :
6464
IsSolvable p.Gal :=
6565
haveI : IsSolvable (q.SplittingField ≃ₐ[F] q.SplittingField) := hq
6666
solvable_of_surjective (AlgEquiv.restrictNormalHom_surjective q.SplittingField)
6767

68-
theorem gal_isSolvable_tower (p q : F[X]) (hpq : p.Splits (algebraMap F q.SplittingField))
68+
theorem gal_isSolvable_tower (p q : F[X]) (hpq : (p.map (algebraMap F q.SplittingField)).Splits)
6969
(hp : IsSolvable p.Gal) (hq : IsSolvable (q.map (algebraMap F p.SplittingField)).Gal) :
7070
IsSolvable q.Gal := by
7171
let K := p.SplittingField
7272
let L := q.SplittingField
73-
haveI : Fact (p.Splits (algebraMap F L)) := ⟨hpq⟩
73+
haveI : Fact ((p.map (algebraMap F L)).Splits) := ⟨hpq⟩
7474
let ϕ : Gal(L/K) ≃* (q.map (algebraMap F K)).Gal :=
7575
(IsSplittingField.algEquiv L (q.map (algebraMap F K))).autCongr
7676
have ϕ_inj : Function.Injective ϕ.toMonoidHom := ϕ.injective
@@ -99,7 +99,7 @@ theorem gal_X_pow_sub_one_isSolvable (n : ℕ) : IsSolvable (X ^ n - 1 : F[X]).G
9999
rw [σ.mul_apply, τ.mul_apply, hc, map_pow, hd, map_pow, hc, ← pow_mul, pow_mul']
100100

101101
theorem gal_X_pow_sub_C_isSolvable_aux (n : ℕ) (a : F)
102-
(h : (X ^ n - 1 : F[X]).Splits (RingHom.id F)) : IsSolvable (X ^ n - C a).Gal := by
102+
(h : ((X ^ n - 1 : F[X]).map (RingHom.id F)).Splits) : IsSolvable (X ^ n - C a).Gal := by
103103
by_cases ha : a = 0
104104
· rw [ha, C_0, sub_zero]
105105
exact gal_X_pow_isSolvable n
@@ -136,12 +136,11 @@ theorem gal_X_pow_sub_C_isSolvable_aux (n : ℕ) (a : F)
136136
mul_assoc, mul_assoc, mul_right_inj' hb', mul_comm]
137137

138138
theorem splits_X_pow_sub_one_of_X_pow_sub_C {F : Type*} [Field F] {E : Type*} [Field E]
139-
(i : F →+* E) (n : ℕ) {a : F} (ha : a ≠ 0) (h : (X ^ n - C a).Splits i) :
140-
(X ^ n - 1 : F[X]).Splits i := by
139+
(i : F →+* E) (n : ℕ) {a : F} (ha : a ≠ 0) (h : ((X ^ n - C a).map i).Splits) :
140+
((X ^ n - 1 : F[X]).map i).Splits := by
141141
have ha' : i a ≠ 0 := mt ((injective_iff_map_eq_zero i).mp i.injective a) ha
142142
by_cases hn : n = 0
143-
· rw [hn, pow_zero, sub_self]
144-
exact splits_zero i
143+
· simp [hn]
145144
have hn' : 0 < n := pos_iff_ne_zero.mpr hn
146145
have hn'' : (X ^ n - C a).degree ≠ 0 :=
147146
ne_of_eq_of_ne (degree_X_pow_sub_C hn' a) (mt WithBot.coe_eq_coe.mp hn)

Mathlib/FieldTheory/AlgebraicClosure.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ variable {F}
217217
Let `E / F` be a field extension. If a polynomial `p`
218218
splits in `E`, then it splits in the relative algebraic closure of `F` in `E` already.
219219
-/
220-
theorem Splits.algebraicClosure {p : F[X]} (h : p.Splits (algebraMap F E)) :
221-
p.Splits (algebraMap F (algebraicClosure F E)) :=
220+
theorem Splits.algebraicClosure {p : F[X]} (h : (p.map (algebraMap F E)).Splits) :
221+
(p.map (algebraMap F (algebraicClosure F E))).Splits :=
222222
splits_of_splits h fun _ hx ↦ (isAlgebraic_of_mem_rootSet hx).isIntegral

Mathlib/FieldTheory/Extension.lean

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ theorem nonempty_algHom_of_exist_lifts_finset [alg : Algebra.IsAlgebraic F E]
205205
/-- Given a lift `x` and an integral element `s : E` over `x.carrier` whose conjugates over
206206
`x.carrier` are all in `K`, we can extend the lift to a lift whose carrier contains `s`. -/
207207
theorem exists_lift_of_splits' (x : Lifts F E K) {s : E} (h1 : IsIntegral x.carrier s)
208-
(h2 : (minpoly x.carrier s).Splits x.emb.toRingHom) : ∃ y, x ≤ y ∧ s ∈ y.carrier :=
208+
(h2 : ((minpoly x.carrier s).map x.emb.toRingHom).Splits) : ∃ y, x ≤ y ∧ s ∈ y.carrier :=
209209
have I2 := (minpoly.degree_pos h1).ne'
210210
letI : Algebra x.carrier K := x.emb.toRingHom.toAlgebra
211211
let carrier := x.carrier⟮s⟯.restrictScalars F
@@ -222,7 +222,7 @@ theorem exists_lift_of_splits' (x : Lifts F E K) {s : E} (h1 : IsIntegral x.carr
222222
/-- Given an integral element `s : E` over `F` whose `F`-conjugates are all in `K`,
223223
any lift can be extended to one whose carrier contains `s`. -/
224224
theorem exists_lift_of_splits (x : Lifts F E K) {s : E} (h1 : IsIntegral F s)
225-
(h2 : (minpoly F s).Splits (algebraMap F K)) : ∃ y, x ≤ y ∧ s ∈ y.carrier :=
225+
(h2 : ((minpoly F s).map (algebraMap F K)).Splits) : ∃ y, x ≤ y ∧ s ∈ y.carrier :=
226226
exists_lift_of_splits' x h1.tower_top <| h1.minpoly_splits_tower_top' <| by
227227
rwa [← x.emb.comp_algebraMap] at h2
228228

@@ -231,7 +231,7 @@ end Lifts
231231
section
232232

233233
private theorem exists_algHom_adjoin_of_splits'' {L : IntermediateField F E}
234-
(f : L →ₐ[F] K) (hK : ∀ s ∈ S, IsIntegral L s ∧ (minpoly L s).Splits f.toRingHom) :
234+
(f : L →ₐ[F] K) (hK : ∀ s ∈ S, IsIntegral L s ∧ ((minpoly L s).map f.toRingHom).Splits) :
235235
∃ φ : adjoin L S →ₐ[F] K, φ.restrictDomain L = f := by
236236
obtain ⟨φ, hfφ, hφ⟩ := zorn_le_nonempty_Ici₀ _
237237
(fun c _ hc _ _ ↦ Lifts.exists_upper_bound c hc) ⟨L, f⟩ le_rfl
@@ -246,7 +246,7 @@ private theorem exists_algHom_adjoin_of_splits'' {L : IntermediateField F E}
246246
· convert (hK s h).2; ext; apply hfφ.2
247247

248248
variable {L : Type*} [Field L] [Algebra F L] [Algebra L E] [IsScalarTower F L E]
249-
(f : L →ₐ[F] K) (hK : ∀ s ∈ S, IsIntegral L s ∧ (minpoly L s).Splits f.toRingHom)
249+
(f : L →ₐ[F] K) (hK : ∀ s ∈ S, IsIntegral L s ∧ ((minpoly L s).map f.toRingHom).Splits)
250250

251251
include hK in
252252
theorem exists_algHom_adjoin_of_splits' :
@@ -278,14 +278,15 @@ theorem exists_algHom_of_adjoin_splits' (hS : adjoin L S = ⊤) :
278278
have ⟨φ, hφ⟩ := exists_algHom_adjoin_of_splits' f hK
279279
⟨φ.comp (((equivOfEq hS).trans topEquiv).symm.toAlgHom.restrictScalars F), hφ⟩
280280

281-
theorem exists_algHom_of_splits' (hK : ∀ s : E, IsIntegral L s ∧ (minpoly L s).Splits f.toRingHom) :
281+
theorem exists_algHom_of_splits'
282+
(hK : ∀ s : E, IsIntegral L s ∧ ((minpoly L s).map f.toRingHom).Splits) :
282283
∃ φ : E →ₐ[F] K, φ.restrictDomain L = f :=
283284
exists_algHom_of_adjoin_splits' f (fun x _ ↦ hK x) (adjoin_univ L E)
284285

285286
end
286287

287-
variable (hK : ∀ s ∈ S, IsIntegral F s ∧ (minpoly F s).Splits (algebraMap F K))
288-
(hK' : ∀ s : E, IsIntegral F s ∧ (minpoly F s).Splits (algebraMap F K))
288+
variable (hK : ∀ s ∈ S, IsIntegral F s ∧ ((minpoly F s).map (algebraMap F K)).Splits)
289+
(hK' : ∀ s : E, IsIntegral F s ∧ ((minpoly F s).map (algebraMap F K)).Splits)
289290
{L : IntermediateField F E} (f : L →ₐ[F] K) (hL : L ≤ adjoin F S) {x : E} {y : K}
290291

291292
section
@@ -360,7 +361,7 @@ polynomial over `F` of elements of `K` splits. Then, for `x ∈ K`, the images o
360361
of `x` over `F`. -/
361362
theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly_of_splits {F K : Type*} (L : Type*)
362363
[Field F] [Field K] [Field L] [Algebra F L] [Algebra F K]
363-
(hA : ∀ x : K, (minpoly F x).Splits (algebraMap F L))
364+
(hA : ∀ x : K, ((minpoly F x).map (algebraMap F L)).Splits)
364365
[Algebra.IsAlgebraic F K] (x : K) :
365366
(Set.range fun (ψ : K →ₐ[F] L) => ψ x) = (minpoly F x).rootSet L := by
366367
ext a

Mathlib/FieldTheory/Finite/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ theorem Subfield.roots_X_pow_char_sub_X_bot :
735735
exact FiniteField.roots_X_pow_card_sub_X _
736736

737737
theorem Subfield.splits_bot :
738-
Splits (RingHom.id (⊥ : Subfield F)) (X ^ p - X) := by
738+
Splits (Polynomial.map (RingHom.id (⊥ : Subfield F)) (X ^ p - X)) := by
739739
let _ := Subfield.fintypeBot F p
740740
rw [splits_iff_card_roots, roots_X_pow_char_sub_X_bot, ← Finset.card_def, Finset.card_univ,
741741
FiniteField.X_pow_card_sub_X_natDegree_eq _ (Fact.out (p := p.Prime)).one_lt,

Mathlib/FieldTheory/Finite/GaloisField.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ theorem card (h : n ≠ 0) : Nat.card (GaloisField p n) = p ^ n := by
133133
rw [Nat.card_eq_fintype_card, Module.card_fintype b, ← Module.finrank_eq_card_basis b,
134134
ZMod.card, finrank p h]
135135

136-
theorem splits_zmod_X_pow_sub_X : Splits (RingHom.id (ZMod p)) (X ^ p - X) := by
136+
theorem splits_zmod_X_pow_sub_X : Splits (map (RingHom.id (ZMod p)) (X ^ p - X)) := by
137137
have hp : 1 < p := h_prime.out.one_lt
138138
have h1 : roots (X ^ p - X : (ZMod p)[X]) = Finset.univ.val := by
139139
convert FiniteField.roots_X_pow_card_sub_X (ZMod p)
@@ -154,7 +154,7 @@ section Fintype
154154
variable {K : Type*} [Field K] [Fintype K] [Algebra (ZMod p) K]
155155

156156
theorem _root_.FiniteField.splits_X_pow_card_sub_X :
157-
Splits (algebraMap (ZMod p) K) (X ^ Fintype.card K - X) :=
157+
Splits (map (algebraMap (ZMod p) K) (X ^ Fintype.card K - X)) :=
158158
(FiniteField.isSplittingField_sub K (ZMod p)).splits
159159

160160
theorem _root_.FiniteField.isSplittingField_of_card_eq (h : Fintype.card K = p ^ n) :
@@ -173,7 +173,7 @@ section Finite
173173
variable {K : Type*} [Field K] [Algebra (ZMod p) K]
174174

175175
theorem _root_.FiniteField.splits_X_pow_nat_card_sub_X [Finite K] :
176-
Splits (algebraMap (ZMod p) K) (X ^ Nat.card K - X) := by
176+
Splits (map (algebraMap (ZMod p) K) (X ^ Nat.card K - X)) := by
177177
haveI : Fintype K := Fintype.ofFinite K
178178
rw [Nat.card_eq_fintype_card]
179179
exact (FiniteField.isSplittingField_sub K (ZMod p)).splits

0 commit comments

Comments
 (0)