Skip to content

Commit ba5f510

Browse files
committed
refactor(Algebra/Polynomial/Splits): continue deprecation (#32103)
This PR continues the deprecation in `Splits.lean` as we move over to the new API in `Factors.lean`. Co-authored-by: tb65536 <[email protected]>
1 parent 7f65024 commit ba5f510

File tree

21 files changed

+191
-161
lines changed

21 files changed

+191
-161
lines changed

Mathlib/Algebra/CubicDiscriminant.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@ theorem splits_iff_roots_eq_three (ha : P.a ≠ 0) :
425425
theorem eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
426426
(map φ P).toPoly = C (φ P.a) * (X - C x) * (X - C y) * (X - C z) := by
427427
rw [map_toPoly,
428-
eq_prod_roots_of_splits <|
428+
Splits.eq_prod_roots <|
429429
(splits_iff_roots_eq_three ha).mpr <| Exists.intro x <| Exists.intro y <| Exists.intro z h3,
430-
leadingCoeff_of_a_ne_zero ha, ← map_roots, h3]
430+
leadingCoeff_map, leadingCoeff_of_a_ne_zero ha, ← map_roots, h3]
431431
change C (φ P.a) * ((X - C x) ::ₘ (X - C y) ::ₘ {X - C z}).prod = _
432432
rw [prod_cons, prod_cons, prod_singleton, mul_assoc, mul_assoc]
433433

Mathlib/Algebra/Polynomial/Factors.lean

Lines changed: 92 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,33 @@ theorem splits_of_degree_le_zero {f : R[X]} (hf : degree f ≤ 0) :
9292
Splits f :=
9393
splits_of_natDegree_eq_zero (natDegree_eq_zero_iff_degree_le_zero.mpr hf)
9494

95+
theorem _root_.IsUnit.splits [NoZeroDivisors R] {f : R[X]} (hf : IsUnit f) : Splits f :=
96+
splits_of_natDegree_eq_zero (natDegree_eq_zero_of_isUnit hf)
97+
98+
@[deprecated (since := "2025-11-27")]
99+
alias splits_of_isUnit := IsUnit.splits
100+
101+
theorem splits_of_natDegree_le_one_of_invertible {f : R[X]}
102+
(hf : f.natDegree ≤ 1) (h : Invertible f.leadingCoeff) : f.Splits := by
103+
obtain ⟨a, b, rfl⟩ := exists_eq_X_add_C_of_natDegree_le_one hf
104+
rcases eq_or_ne a 0 with rfl | ha
105+
· simp
106+
· replace h : Invertible a := by simpa [leadingCoeff, ha] using h
107+
rw [← mul_invOf_cancel_left a b, C_mul, ← mul_add]
108+
exact (Splits.C a).mul (Splits.X_add_C _)
109+
110+
theorem splits_of_degree_le_one_of_invertible {f : R[X]}
111+
(hf : f.degree ≤ 1) (h : Invertible f.leadingCoeff) : f.Splits :=
112+
splits_of_natDegree_le_one_of_invertible (natDegree_le_of_degree_le hf) h
113+
114+
theorem splits_of_natDegree_le_one_of_monic {f : R[X]} (hf : f.natDegree ≤ 1) (h : Monic f) :
115+
f.Splits :=
116+
splits_of_natDegree_le_one_of_invertible hf (h.leadingCoeff ▸ invertibleOne)
117+
118+
theorem splits_of_degree_le_one_of_monic {f : R[X]} (hf : f.degree ≤ 1) (h : Monic f) :
119+
f.Splits :=
120+
splits_of_natDegree_le_one_of_monic (natDegree_le_of_degree_le hf) h
121+
95122
end Semiring
96123

97124
section CommSemiring
@@ -146,6 +173,35 @@ theorem Splits.natDegree_le_one_of_irreducible {f : R[X]} (hf : Splits f)
146173
grw [hm, this, natDegree_mul_le]
147174
simp
148175

176+
theorem Splits.comp_of_natDegree_le_one_of_invertible {f g : R[X]} (hf : f.Splits)
177+
(hg : g.natDegree ≤ 1) (h : Invertible g.leadingCoeff) : (f.comp g).Splits := by
178+
rcases lt_or_eq_of_le hg with hg | hg
179+
· rw [eq_C_of_natDegree_eq_zero (Nat.lt_one_iff.mp hg)]
180+
simp
181+
obtain ⟨m, hm⟩ := splits_iff_exists_multiset'.mp hf
182+
rw [hm, mul_comp, C_comp, multiset_prod_comp]
183+
refine (Splits.C _).mul (multisetProd ?_)
184+
simp only [Multiset.mem_map]
185+
rintro - ⟨-, ⟨a, -, rfl⟩, rfl⟩
186+
apply splits_of_natDegree_le_one_of_invertible (by simpa)
187+
rw [leadingCoeff, hg] at h
188+
simpa [leadingCoeff, hg]
189+
190+
theorem Splits.comp_of_degree_le_one_of_invertible {f g : R[X]} (hf : f.Splits)
191+
(hg : g.degree ≤ 1) (h : Invertible g.leadingCoeff) : (f.comp g).Splits :=
192+
hf.comp_of_natDegree_le_one_of_invertible (natDegree_le_of_degree_le hg) h
193+
194+
theorem Splits.comp_of_natDegree_le_one_of_monic {f g : R[X]} (hf : f.Splits)
195+
(hg : g.natDegree ≤ 1) (h : Monic g) : (f.comp g).Splits :=
196+
hf.comp_of_natDegree_le_one_of_invertible hg (h.leadingCoeff ▸ invertibleOne)
197+
198+
theorem Splits.comp_of_degree_le_one_of_monic {f g : R[X]} (hf : f.Splits)
199+
(hg : g.degree ≤ 1) (h : Monic g) : (f.comp g).Splits :=
200+
hf.comp_of_natDegree_le_one_of_monic (natDegree_le_of_degree_le hg) h
201+
202+
theorem Splits.comp_X_add_C {f : R[X]} (hf : f.Splits) (a : R) : (f.comp (X + C a)).Splits :=
203+
hf.comp_of_natDegree_le_one_of_monic (natDegree_add_C.trans_le natDegree_X_le) (monic_X_add_C a)
204+
149205
end CommSemiring
150206

151207
section Ring
@@ -195,6 +251,9 @@ theorem Splits.exists_eval_eq_zero (hf : Splits f) (hf0 : degree f ≠ 0) :
195251
obtain ⟨m, rfl⟩ := Multiset.exists_cons_of_mem ha
196252
exact ⟨a, hm ▸ by simp⟩
197253

254+
theorem Splits.comp_X_sub_C {f : R[X]} (hf : f.Splits) (a : R) : (f.comp (X - C a)).Splits :=
255+
hf.comp_of_natDegree_le_one_of_monic (natDegree_sub_C.trans_le natDegree_X_le) (monic_X_sub_C a)
256+
198257
variable [IsDomain R]
199258

200259
theorem Splits.eq_prod_roots (hf : Splits f) :
@@ -249,15 +308,18 @@ theorem splits_mul_iff (hf₀ : f ≠ 0) (hg₀ : g ≠ 0) :
249308
have := ih (by aesop) hg₀ (f * g) rfl (splits_X_sub_C_mul_iff.mp h) hn
250309
aesop
251310

252-
theorem Splits.of_dvd (hg : Splits g) (hg₀ : g ≠ 0) (hfg : f ∣ g) : Splits f := by
311+
theorem Splits.splits_of_dvd (hg : Splits g) (hg₀ : g ≠ 0) (hfg : f ∣ g) : Splits f := by
253312
obtain ⟨g, rfl⟩ := hfg
254313
exact ((splits_mul_iff (by aesop) (by aesop)).mp hg).1
255314

315+
@[deprecated (since := "2025-11-27")]
316+
alias Splits.of_dvd := Splits.splits_of_dvd
317+
256318
-- Todo: Remove or fix name once `Splits` is gone.
257319
theorem Splits.splits (hf : Splits f) :
258320
f = 0 ∨ ∀ {g : R[X]}, Irreducible g → g ∣ f → degree g ≤ 1 :=
259321
or_iff_not_imp_left.mpr fun hf0 _ hg hgf ↦ degree_le_of_natDegree_le <|
260-
(hf.of_dvd hf0 hgf).natDegree_le_one_of_irreducible hg
322+
(hf.splits_of_dvd hf0 hgf).natDegree_le_one_of_irreducible hg
261323

262324
lemma map_sub_sprod_roots_eq_prod_map_eval
263325
(s : Multiset R) (g : R[X]) (hg : g.Monic) (hg' : g.Splits) :
@@ -304,6 +366,33 @@ section Field
304366

305367
variable [Field R]
306368

369+
theorem Splits.comp_of_natDegree_le_one {f g : R[X]} (hf : f.Splits) (hg : g.natDegree ≤ 1) :
370+
(f.comp g).Splits := by
371+
rcases eq_or_ne g 0 with rfl | hg0
372+
· simp
373+
· exact Splits.comp_of_natDegree_le_one_of_invertible hf hg
374+
(invertibleOfNonzero (leadingCoeff_ne_zero.mpr hg0))
375+
376+
theorem Splits.comp_of_degree_le_one {f g : R[X]} (hf : f.Splits) (hg : g.degree ≤ 1) :
377+
(f.comp g).Splits :=
378+
hf.comp_of_natDegree_le_one (natDegree_le_of_degree_le hg)
379+
380+
theorem splits_iff_comp_splits_of_natDegree_eq_one {f g : R[X]} (hg : g.natDegree = 1) :
381+
f.Splits ↔ (f.comp g).Splits := by
382+
refine ⟨fun hf ↦ hf.comp_of_natDegree_le_one hg.le, fun hf ↦ ?_⟩
383+
obtain ⟨a, b, rfl⟩ := exists_eq_X_add_C_of_natDegree_le_one hg.le
384+
have ha : a ≠ 0 := by contrapose! hg; simp [hg]
385+
have : f = (f.comp (C a * X + C b)).comp ((C a⁻¹ * (X - C b))) := by
386+
simp only [comp_assoc, add_comp, mul_comp, C_comp, X_comp]
387+
rw [← mul_assoc, ← C_mul, mul_inv_cancel₀ ha, C_1, one_mul, sub_add_cancel, comp_X]
388+
rw [this]
389+
refine Splits.comp_of_natDegree_le_one hf ?_
390+
rw [natDegree_C_mul (mt inv_eq_zero.mp ha), natDegree_X_sub_C]
391+
392+
theorem splits_iff_comp_splits_of_degree_eq_one {f g : R[X]} (hg : g.degree = 1) :
393+
f.Splits ↔ (f.comp g).Splits :=
394+
splits_iff_comp_splits_of_natDegree_eq_one (natDegree_eq_of_degree_eq_some hg)
395+
307396
open UniqueFactorizationMonoid in
308397
-- Todo: Remove or fix name.
309398
theorem splits_iff_splits {f : R[X]} :
@@ -317,8 +406,7 @@ theorem splits_iff_splits {f : R[X]} :
317406
· simp [hf0]
318407
obtain ⟨u, hu⟩ := factors_prod hf0
319408
rw [← hu]
320-
refine (Splits.multisetProd fun g hg ↦ ?_).mul
321-
(splits_of_natDegree_eq_zero (natDegree_eq_zero_of_isUnit u.isUnit))
409+
refine (Splits.multisetProd fun g hg ↦ ?_).mul u.isUnit.splits
322410
exact Splits.of_degree_eq_one (hf (irreducible_of_factor g hg) (dvd_of_mem_factors hg))
323411

324412
end Field

Mathlib/Algebra/Polynomial/Splits.lean

Lines changed: 23 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,11 @@ alias splits_of_natDegree_le_one := Splits.of_natDegree_le_one
6666
@[deprecated (since := "2025-11-24")]
6767
alias splits_of_natDegree_eq_one := Splits.of_natDegree_eq_one
6868

69-
theorem splits_mul {f g : K[X]} (hf : Splits (f.map i)) (hg : Splits (g.map i)) :
70-
Splits ((f * g).map i) := by
71-
simp [hf.mul hg]
69+
@[deprecated (since := "2025-11-25")]
70+
alias splits_mul := Splits.mul
7271

73-
theorem splits_of_splits_mul' {f g : K[X]} (hfg : (f * g).map i ≠ 0) (h : Splits ((f * g).map i)) :
74-
Splits (f.map i) ∧ Splits (g.map i) := by
75-
simp only [Splits, Polynomial.map_mul, mul_ne_zero_iff] at hfg h
76-
exact (splits_mul_iff hfg.1 hfg.2).mp h
72+
@[deprecated (since := "2025-11-25")]
73+
alias splits_of_splits_mul' := splits_mul_iff
7774

7875
@[deprecated "Use `Polynomial.map_map` instead." (since := "2025-11-24")]
7976
theorem splits_map_iff {L : Type*} [CommRing L] (i : K →+* L) (j : L →+* F) {f : K[X]} :
@@ -83,9 +80,6 @@ theorem splits_map_iff {L : Type*} [CommRing L] (i : K →+* L) (j : L →+* F)
8380
@[deprecated (since := "2025-11-24")]
8481
alias splits_one := Splits.one
8582

86-
theorem splits_of_isUnit [IsDomain K] {u : K[X]} (hu : IsUnit u) : (u.map i).Splits :=
87-
(isUnit_iff.mp hu).choose_spec.2 ▸ map_C i ▸ Splits.C _
88-
8983
@[deprecated (since := "2025-11-24")]
9084
alias splits_X_sub_C := Splits.X_sub_C
9185

@@ -108,43 +102,9 @@ theorem splits_id_iff_splits {f : K[X]} :
108102

109103
variable {i}
110104

111-
theorem Splits.comp_of_degree_le_one {f : L[X]} {p : L[X]} (hd : p.degree ≤ 1)
112-
(h : f.Splits) : (f.comp p).Splits := by
113-
obtain ⟨m, hm⟩ := splits_iff_exists_multiset.mp h
114-
rw [hm, mul_comp, C_comp, multiset_prod_comp]
115-
refine (Splits.C _).mul (Splits.multisetProd ?_)
116-
simp only [Multiset.mem_map]
117-
rintro - ⟨-, ⟨a, -, rfl⟩, rfl⟩
118-
apply Splits.of_degree_le_one
119-
grw [sub_comp, X_comp, C_comp, degree_sub_le, hd, degree_C_le, max_eq_left zero_le_one]
120-
121-
@[deprecated (since := "2025-11-24")]
105+
@[deprecated (since := "2025-11-25")]
122106
alias Splits.comp_of_map_degree_le_one := Splits.comp_of_degree_le_one
123107

124-
theorem splits_iff_comp_splits_of_degree_eq_one {f : L[X]} {p : L[X]} (hd : p.degree = 1) :
125-
f.Splits ↔ (f.comp p).Splits := by
126-
refine ⟨Splits.comp_of_degree_le_one hd.le, fun h ↦ ?_⟩
127-
let _ := invertibleOfNonzero (leadingCoeff_ne_zero.mpr
128-
(ne_zero_of_degree_gt (n := ⊥) (by rw [hd]; decide)))
129-
have : f = (f.comp p).comp ((C ⅟p.leadingCoeff *
130-
(X - C (p.coeff 0)))) := by
131-
rw [comp_assoc]
132-
nth_rw 1 [eq_X_add_C_of_degree_eq_one hd]
133-
simp only [invOf_eq_inv, mul_sub, ← C_mul, add_comp, mul_comp, C_comp, X_comp,
134-
← mul_assoc]
135-
simp
136-
rw [this]
137-
refine Splits.comp_of_degree_le_one ?_ h
138-
simp [degree_C (inv_ne_zero (Invertible.ne_zero (a := p.leadingCoeff)))]
139-
140-
theorem Splits.comp_X_sub_C (a : L) {f : L[X]}
141-
(h : f.Splits) : (f.comp (X - C a)).Splits :=
142-
Splits.comp_of_degree_le_one (degree_X_sub_C_le _) h
143-
144-
theorem Splits.comp_X_add_C (a : L) {f : L[X]}
145-
(h : f.Splits) : (f.comp (X + C a)).Splits :=
146-
Splits.comp_of_degree_le_one (degree_X_add_C a).le h
147-
148108
variable (i)
149109

150110
theorem exists_root_of_splits' {f : K[X]} (hs : Splits (f.map i)) (hf0 : degree (f.map i) ≠ 0) :
@@ -194,22 +154,19 @@ theorem Splits.def {i : K →+* L} {f : K[X]} (h : Splits (f.map i)) :
194154
f = 0 ∨ ∀ {g : L[X]}, Irreducible g → g ∣ f.map i → degree g = 1 :=
195155
(splits_iff i f).mp h
196156

197-
theorem splits_of_splits_mul {f g : K[X]} (hfg : f * g ≠ 0) (h : Splits ((f * g).map i)) :
198-
Splits (f.map i) ∧ Splits (g.map i) :=
199-
splits_of_splits_mul' i (map_ne_zero hfg) h
157+
@[deprecated (since := "2025-11-25")]
158+
alias splits_of_splits_mul := splits_mul_iff
200159

201-
theorem splits_of_splits_of_dvd {f g : K[X]} (hf0 : f ≠ 0) (hf : Splits (f.map i)) (hgf : g ∣ f) :
202-
Splits (g.map i) := by
203-
obtain ⟨f, rfl⟩ := hgf
204-
exact (splits_of_splits_mul i hf0 hf).1
160+
@[deprecated (since := "2025-11-25")]
161+
alias splits_of_splits_of_dvd := Splits.splits_of_dvd
205162

206163
theorem splits_of_splits_gcd_left [DecidableEq K] {f g : K[X]} (hf0 : f ≠ 0)
207164
(hf : Splits (f.map i)) : Splits ((EuclideanDomain.gcd f g).map i) :=
208-
Polynomial.splits_of_splits_of_dvd i hf0 hf (EuclideanDomain.gcd_dvd_left f g)
165+
Splits.splits_of_dvd hf (map_ne_zero hf0) <| map_dvd i <| EuclideanDomain.gcd_dvd_left f g
209166

210167
theorem splits_of_splits_gcd_right [DecidableEq K] {f g : K[X]} (hg0 : g ≠ 0)
211168
(hg : Splits (g.map i)) : Splits ((EuclideanDomain.gcd f g).map i) :=
212-
Polynomial.splits_of_splits_of_dvd i hg0 hg (EuclideanDomain.gcd_dvd_right f g)
169+
Splits.splits_of_dvd hg (map_ne_zero hg0) <| map_dvd i <| EuclideanDomain.gcd_dvd_right f g
213170

214171
theorem splits_prod_iff {ι : Type u} {s : ι → K[X]} {t : Finset ι} :
215172
(∀ j ∈ t, s j ≠ 0) → (((∏ x ∈ t, s x).map i).Splits ↔ ∀ j ∈ t, ((s j).map i).Splits) := by
@@ -286,19 +243,15 @@ theorem adjoin_rootSet_eq_range [Algebra R K] [Algebra R L] {p : R[X]}
286243
rw [← image_rootSet h f, Algebra.adjoin_image, ← Algebra.map_top]
287244
exact (Subalgebra.map_injective f.toRingHom.injective).eq_iff
288245

289-
theorem eq_prod_roots_of_splits {p : K[X]} {i : K →+* L} (hsplit : Splits (p.map i)) :
290-
p.map i = C (i p.leadingCoeff) * ((p.map i).roots.map fun a => X - C a).prod := by
291-
rw [← leadingCoeff_map]; symm
292-
apply C_leadingCoeff_mul_prod_multiset_X_sub_C
293-
rw [natDegree_map]; exact (natDegree_eq_card_roots hsplit).symm
246+
@[deprecated (since := "2025-11-25")]
247+
alias eq_prod_roots_of_splits := Splits.eq_prod_roots
294248

295-
theorem eq_prod_roots_of_splits_id {p : K[X]} (hsplit : Splits p) :
296-
p = C p.leadingCoeff * (p.roots.map fun a => X - C a).prod :=
297-
hsplit.eq_prod_roots
249+
@[deprecated (since := "2025-11-25")]
250+
alias eq_prod_roots_of_splits_id := Splits.eq_prod_roots
298251

299252
theorem Splits.dvd_of_roots_le_roots {p q : K[X]} (hp : p.Splits) (hp0 : p ≠ 0)
300253
(hq : p.roots ≤ q.roots) : p ∣ q := by
301-
rw [eq_prod_roots_of_splits_id hp, C_mul_dvd (leadingCoeff_ne_zero.2 hp0)]
254+
rw [Splits.eq_prod_roots hp, C_mul_dvd (leadingCoeff_ne_zero.2 hp0)]
302255
exact dvd_trans
303256
(Multiset.prod_dvd_prod_of_le (Multiset.map_le_map hq))
304257
(prod_multiset_X_sub_C_dvd _)
@@ -311,7 +264,7 @@ theorem Splits.dvd_iff_roots_le_roots {p q : K[X]}
311264
theorem aeval_eq_prod_aroots_sub_of_splits [Algebra K L] {p : K[X]}
312265
(hsplit : Splits (p.map (algebraMap K L))) (v : L) :
313266
aeval v p = algebraMap K L p.leadingCoeff * ((p.aroots L).map fun a ↦ v - a).prod := by
314-
rw [← eval_map_algebraMap, eq_prod_roots_of_splits hsplit]
267+
rw [← eval_map_algebraMap, Splits.eq_prod_roots hsplit]
315268
simp [eval_multiset_prod]
316269

317270
theorem eval_eq_prod_roots_sub_of_splits_id {p : K[X]}
@@ -322,7 +275,7 @@ theorem eval_eq_prod_roots_sub_of_splits_id {p : K[X]}
322275

323276
theorem eq_prod_roots_of_monic_of_splits_id {p : K[X]} (m : Monic p)
324277
(hsplit : Splits p) : p = (p.roots.map fun a => X - C a).prod := by
325-
convert eq_prod_roots_of_splits_id hsplit
278+
convert Splits.eq_prod_roots hsplit
326279
simp [m]
327280

328281
theorem aeval_eq_prod_aroots_sub_of_monic_of_splits [Algebra K L] {p : K[X]} (m : Monic p)
@@ -338,7 +291,7 @@ theorem eval_eq_prod_roots_sub_of_monic_of_splits_id {p : K[X]} (m : Monic p)
338291
theorem eq_X_sub_C_of_splits_of_single_root {x : K} {h : K[X]} (h_splits : Splits (h.map i))
339292
(h_roots : (h.map i).roots = {i x}) : h = C h.leadingCoeff * (X - C x) := by
340293
apply Polynomial.map_injective _ i.injective
341-
rw [eq_prod_roots_of_splits h_splits, h_roots]
294+
rw [Splits.eq_prod_roots h_splits, h_roots]
342295
simp
343296

344297
variable (R) in
@@ -389,7 +342,7 @@ theorem splits_of_comp (j : L →+* F) {f : K[X]} (h : Splits (f.map (j.comp i))
389342
choose lift lift_eq using roots_mem_range
390343
rw [splits_iff_exists_multiset]
391344
refine ⟨(f.map (j.comp i)).roots.pmap lift fun _ ↦ id, map_injective _ j.injective ?_⟩
392-
conv_lhs => rw [Polynomial.map_map, eq_prod_roots_of_splits h]
345+
conv_lhs => rw [Polynomial.map_map, Splits.eq_prod_roots h]
393346
simp_rw [Polynomial.map_mul, Polynomial.map_multiset_prod, Multiset.map_pmap, Polynomial.map_sub,
394347
map_C, map_X, lift_eq, Multiset.pmap_eq_map]
395348
simp
@@ -428,7 +381,7 @@ theorem eval₂_derivative_of_splits [DecidableEq L] {P : K[X]} {f : K →+* L}
428381
(x : L) :
429382
eval₂ f x P.derivative = f (P.leadingCoeff) *
430383
((P.map f).roots.map fun a ↦ (((P.map f).roots.erase a).map (x - ·)).prod).sum := by
431-
conv_lhs => rw [← eval_map, ← derivative_map, eq_prod_roots_of_splits hP]
384+
conv_lhs => rw [← eval_map, ← derivative_map, Splits.eq_prod_roots hP]
432385
classical
433386
simp [derivative_prod, eval_multisetSum, eval_multiset_prod]
434387

@@ -460,7 +413,7 @@ theorem eval_derivative_eq_eval_mul_sum_of_splits {p : K[X]} {x : K}
460413
classical
461414
suffices p.roots.map (fun z ↦ p.leadingCoeff * ((p.roots.erase z).map (fun w ↦ x - w) ).prod) =
462415
p.roots.map fun i ↦ p.leadingCoeff * ((x - i)⁻¹ * (p.roots.map (fun z ↦ x - z)).prod) by
463-
nth_rw 2 [p.eq_prod_roots_of_splits_id h]
416+
nth_rw 2 [Splits.eq_prod_roots h]
464417
simp [eval_derivative_of_splits h, ← Multiset.sum_map_mul_left, this, eval_multiset_prod,
465418
mul_comm, mul_left_comm]
466419
refine Multiset.map_congr rfl fun z hz ↦ ?_
@@ -488,7 +441,7 @@ theorem coeff_zero_eq_prod_roots_of_monic_of_splits {P : K[X]} (hmo : P.Monic)
488441

489442
theorem nextCoeff_eq_neg_sum_roots_mul_leadingCoeff_of_splits {P : K[X]}
490443
(hP : P.Splits) : P.nextCoeff = -P.leadingCoeff * P.roots.sum := by
491-
nth_rw 1 [eq_prod_roots_of_splits_id hP]
444+
nth_rw 1 [Splits.eq_prod_roots hP]
492445
simp [Multiset.sum_map_neg', monic_X_sub_C, Monic.nextCoeff_multiset_prod]
493446

494447
/-- If `P` is a monic polynomial that splits, then `P.nextCoeff` equals the negative of the sum

Mathlib/Analysis/Polynomial/MahlerMeasure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ theorem logMahlerMeasure_eq_log_leadingCoeff_add_sum_log_roots (p : ℂ[X]) : p.
209209
by_cases hp : p = 0
210210
· simp [hp]
211211
have : ∀ x ∈ Multiset.map (fun x ↦ max 1 ‖x‖) p.roots, x ≠ 0 := by grind [Multiset.mem_map]
212-
nth_rw 1 [eq_prod_roots_of_splits_id (IsAlgClosed.splits p)]
212+
nth_rw 1 [(IsAlgClosed.splits p).eq_prod_roots]
213213
rw [logMahlerMeasure_mul_eq_add_logMahlerMeasure (by simp [hp, X_sub_C_ne_zero])]
214214
simp [posLog_eq_log_max_one, logMahlerMeasure_eq_log_MahlerMeasure,
215215
prod_mahlerMeasure_eq_mahlerMeasure_prod, log_multiset_prod this]

Mathlib/FieldTheory/AbelRuffini.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ theorem splits_X_pow_sub_one_of_X_pow_sub_C {F : Type*} [Field F] {E : Type*} [F
151151
rw [hb', zero_pow hn] at hb
152152
exact ha' hb.symm
153153
let s := ((X ^ n - C a).map i).roots
154-
have hs : _ = _ * (s.map _).prod := eq_prod_roots_of_splits h
155-
rw [leadingCoeff_X_pow_sub_C hn', map_one, C_1, one_mul] at hs
154+
have hs : _ = _ * (s.map _).prod := h.eq_prod_roots
155+
rw [leadingCoeff_map, leadingCoeff_X_pow_sub_C hn', RingHom.map_one, C_1, one_mul] at hs
156156
have hs' : Multiset.card s = n := (natDegree_eq_card_roots h).symm.trans natDegree_X_pow_sub_C
157157
apply @splits_of_exists_multiset F E _ _ i (X ^ n - 1) (s.map fun c : E => c / b)
158158
rw [leadingCoeff_X_pow_sub_one hn', map_one, C_1, one_mul, Multiset.map_map]
@@ -282,8 +282,8 @@ theorem induction3 {α : solvableByRad F E} {n : ℕ} (hn : n ≠ 0) (hα : P (
282282
· exact minpoly.ne_zero (isIntegral (α ^ n)) h'
283283
· exact hn (by rw [← @natDegree_C F, ← h'.2, natDegree_X_pow])
284284
apply gal_isSolvable_of_splits
285-
· exact ⟨splits_of_splits_of_dvd _ hp (SplittingField.splits (p.comp (X ^ n)))
286-
(minpoly.dvd F α (by rw [aeval_comp, aeval_X_pow, minpoly.aeval]))⟩
285+
· exact ⟨(SplittingField.splits (p.comp (X ^ n))).splits_of_dvd (map_ne_zero hp)
286+
((map_dvd_map' _).mpr (minpoly.dvd F α (by rw [aeval_comp, aeval_X_pow, minpoly.aeval])))⟩
287287
· refine gal_isSolvable_tower p (p.comp (X ^ n)) ?_ hα ?_
288288
· exact Gal.splits_in_splittingField_of_comp _ _ (by rwa [natDegree_X_pow])
289289
· obtain ⟨s, hs⟩ := splits_iff_exists_multiset.1 (SplittingField.splits p)
@@ -305,9 +305,9 @@ open IntermediateField
305305
theorem induction2 {α β γ : solvableByRad F E} (hγ : γ ∈ F⟮α, β⟯) (hα : P α) (hβ : P β) : P γ := by
306306
let p := minpoly F α
307307
let q := minpoly F β
308-
have hpq := Polynomial.splits_of_splits_mul _
309-
(mul_ne_zero (minpoly.ne_zero (isIntegral α)) (minpoly.ne_zero (isIntegral β)))
310-
(SplittingField.splits (p * q))
308+
have hpq := SplittingField.splits (p * q)
309+
rw [Polynomial.map_mul, splits_mul_iff (map_ne_zero (minpoly.ne_zero (isIntegral α)))
310+
(map_ne_zero (minpoly.ne_zero (isIntegral β)))] at hpq
311311
let f : ↥F⟮α, β⟯ →ₐ[F] (p * q).SplittingField :=
312312
Classical.choice <| nonempty_algHom_adjoin_of_splits <| by
313313
intro x hx

0 commit comments

Comments
 (0)