Skip to content

Commit bc88f31

Browse files
committed
chore(Algebra/Polynomial/Splits): deprecate Splits.splits and splits_iff_splits (leanprover-community#33934)
After the big refactor of `Polynomial.Splits`, there were two clunky lemmas without good names. This PR deprecates them. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent b51890a commit bc88f31

6 files changed

Lines changed: 45 additions & 38 deletions

File tree

Mathlib/Algebra/Polynomial/Splits.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ theorem splits_prod_iff {ι : Type*} {f : ι → R[X]} {s : Finset ι} (hf : ∀
462462
fun h _ hx ↦ h.of_dvd (Finset.prod_ne_zero_iff.mpr hf) (Finset.dvd_prod_of_mem f hx),
463463
Splits.prod⟩
464464

465-
-- Todo: Remove or fix name once `Splits` is gone.
465+
@[deprecated "Use `Splits.degree_le_one_of_irreducible` instead." (since := "2026-01-13")]
466466
theorem Splits.splits (hf : Splits f) :
467467
f = 0 ∨ ∀ {g : R[X]}, Irreducible g → g ∣ f → degree g ≤ 1 :=
468468
or_iff_not_imp_left.mpr fun hf0 _ hg hgf ↦ degree_le_of_natDegree_le <|
@@ -588,11 +588,11 @@ theorem Splits.of_degree_eq_two {x : R} (h₁ : f.degree = 2) (h₂ : f.eval x =
588588
Splits.of_natDegree_eq_two (natDegree_eq_of_degree_eq_some h₁) h₂
589589

590590
open UniqueFactorizationMonoid in
591-
-- Todo: Remove or fix name.
591+
@[deprecated "Use `Splits.degree_eq_one_of_irreducible` instead." (since := "2026-01-13")]
592592
theorem splits_iff_splits {f : R[X]} :
593593
Splits f ↔ f = 0 ∨ ∀ {g : R[X]}, Irreducible g → g ∣ f → degree g = 1 := by
594-
refine ⟨fun hf ↦ hf.splits.imp_right (forall₃_imp fun g hg hgf ↦
595-
(le_antisymm · (Nat.WithBot.one_le_iff_zero_lt.mpr hg.degree_pos))), ?_⟩
594+
refine ⟨fun hf ↦ or_iff_not_imp_left.mpr fun h0 g hg hgf ↦
595+
(hf.of_dvd h0 hgf).degree_eq_one_of_irreducible hg, ?_⟩
596596
rintro (rfl | hf)
597597
· aesop
598598
classical

Mathlib/FieldTheory/AbelRuffini.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ theorem gal_X_pow_sub_C_isSolvable_aux (n : ℕ) (a : F)
114114
have mem_range : ∀ {c : (X ^ n - C a).SplittingField},
115115
(c ^ n = 1 → (∃ d, algebraMap F (X ^ n - C a).SplittingField d = c)) := fun {c} hc =>
116116
RingHom.mem_range.mp (minpoly.mem_range_of_degree_eq_one F c
117-
((splits_iff_splits.mp h).resolve_left (map_ne_zero hn''')
118-
(minpoly.irreducible ((SplittingField.instNormal (X ^ n - C a)).isIntegral c))
119-
(minpoly.dvd F c (by rwa [map_id, map_sub, sub_eq_zero, aeval_X_pow, aeval_one]))))
117+
(Splits.degree_eq_one_of_irreducible (h.of_dvd (map_ne_zero hn''')
118+
(minpoly.dvd F c (by rwa [map_id, map_sub, sub_eq_zero, aeval_X_pow, aeval_one])))
119+
(minpoly.irreducible ((SplittingField.instNormal (X ^ n - C a)).isIntegral c))))
120120
apply isSolvable_of_comm
121121
intro σ τ
122122
ext b hb

Mathlib/FieldTheory/IsAlgClosed/Basic.lean

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,25 @@ theorem exists_aeval_eq_zero {R : Type*} [CommSemiring R] [IsAlgClosed k] [Algeb
187187
[FaithfulSMul R k] (p : R[X]) (hp : p.degree ≠ 0) : ∃ x : k, p.aeval x = 0 :=
188188
exists_aeval_eq_zero_of_injective _ (FaithfulSMul.algebraMap_injective ..) _ hp
189189

190-
191190
/--
192191
If every nonconstant polynomial over `k` has a root, then `k` is algebraically closed.
193192
-/
194193
@[stacks 09GR "(3) ⟹ (4)"]
195194
theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p.eval x = 0) :
196195
IsAlgClosed k := by
197-
refine ⟨fun p ↦ splits_iff_splits.mpr <| Or.inr ?_⟩
198-
intro q hq _
199-
have : Irreducible (q * C (leadingCoeff q)⁻¹) := by
200-
classical
201-
rw [← coe_normUnit_of_ne_zero hq.ne_zero]
202-
exact (associated_normalize _).irreducible hq
203-
obtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) this
204-
exact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root this hx
196+
replace H (p : k[X]) (hp : Irreducible p) : ∃ x, p.eval x = 0 := by
197+
obtain ⟨x, hx⟩ := H (p * C (leadingCoeff p)⁻¹) (monic_mul_leadingCoeff_inv hp.ne_zero)
198+
(irreducible_mul_leadingCoeff_inv.mpr hp)
199+
exact ⟨x, by simpa [hp.ne_zero] using hx⟩
200+
refine ⟨fun p ↦ ?_⟩
201+
by_cases hp0 : p = 0
202+
· simp [hp0]
203+
obtain ⟨u, hu⟩ := UniqueFactorizationMonoid.factors_prod hp0
204+
rw [← hu]
205+
refine (Splits.multisetProd fun f hf ↦ ?_).mul u.isUnit.splits
206+
let h := UniqueFactorizationMonoid.irreducible_of_factor f hf
207+
obtain ⟨x, hx⟩ := H f h
208+
exact Splits.of_degree_eq_one (degree_eq_one_of_irreducible_of_root h hx)
205209

206210
theorem of_ringEquiv (k' : Type u) [Field k'] (e : k ≃+* k')
207211
[IsAlgClosed k] : IsAlgClosed k' := by

Mathlib/FieldTheory/IsSepClosed.lean

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,19 @@ variable (k) {K}
183183

184184
theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → Separable p → ∃ x, p.eval x = 0) :
185185
IsSepClosed k := by
186-
refine ⟨fun p hsep ↦ splits_iff_splits.mpr <| Or.inr ?_⟩
187-
intro q hq hdvd
188-
have hlc : IsUnit (leadingCoeff q)⁻¹ := IsUnit.inv <| Ne.isUnit <|
189-
leadingCoeff_ne_zero.2 <| Irreducible.ne_zero hq
190-
have hsep' : Separable (q * C (leadingCoeff q)⁻¹) :=
191-
Separable.mul (Separable.of_dvd hsep hdvd) ((separable_C _).2 hlc)
192-
(by simpa only [← isCoprime_mul_unit_right_right (isUnit_C.2 hlc) q 1, one_mul]
193-
using isCoprime_one_right (x := q))
194-
have hirr' := hq
195-
rw [← irreducible_mul_isUnit (isUnit_C.2 hlc)] at hirr'
196-
obtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) hirr' hsep'
197-
exact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root hirr' hx
186+
replace H (p : k[X]) (hp : Irreducible p) (hs : Separable p) : ∃ x, p.eval x = 0 := by
187+
obtain ⟨x, hx⟩ := H (p * C (leadingCoeff p)⁻¹) (monic_mul_leadingCoeff_inv hp.ne_zero)
188+
(irreducible_mul_leadingCoeff_inv.mpr hp) (hs.mul_unit (by aesop))
189+
exact ⟨x, by simpa [hp.ne_zero] using hx⟩
190+
refine ⟨fun p hp ↦ ?_⟩
191+
by_cases hp0 : p = 0
192+
· simp [hp0]
193+
obtain ⟨u, hu⟩ := UniqueFactorizationMonoid.factors_prod hp0
194+
rw [← hu]
195+
refine (Splits.multisetProd fun f hf ↦ ?_).mul u.isUnit.splits
196+
let h := UniqueFactorizationMonoid.irreducible_of_factor f hf
197+
obtain ⟨x, hx⟩ := H f h (hp.of_dvd (UniqueFactorizationMonoid.dvd_of_mem_factors hf))
198+
exact Splits.of_degree_eq_one (degree_eq_one_of_irreducible_of_root h hx)
198199

199200
theorem degree_eq_one_of_irreducible [IsSepClosed k] {p : k[X]}
200201
(hp : Irreducible p) (hsep : p.Separable) : p.degree = 1 :=

Mathlib/FieldTheory/Normal/Defs.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,9 @@ def AlgHom.restrictNormalAux [h : Normal F E] :
130130
rintro x ⟨y, ⟨z, hy⟩, hx⟩
131131
rw [← hx, ← hy]
132132
apply minpoly.mem_range_of_degree_eq_one E
133-
refine
134-
Or.resolve_left (splits_iff_splits.mp (h.splits z))
135-
(map_ne_zero (minpoly.ne_zero (h.isIntegral z))) (minpoly.irreducible ?_)
136-
(minpoly.dvd E _ (by simp [aeval_algHom_apply]))
133+
refine ((h.splits z).of_dvd (map_ne_zero (minpoly.ne_zero (h.isIntegral z)))
134+
(minpoly.dvd E _ (by simp [aeval_algHom_apply]))).degree_eq_one_of_irreducible
135+
(minpoly.irreducible ?_)
137136
simp only [AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom]
138137
suffices IsIntegral F _ by exact this.tower_top
139138
exact ((h.isIntegral z).map <| toAlgHom F E K₁).map ϕ⟩

Mathlib/FieldTheory/SeparableDegree.lean

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -892,12 +892,15 @@ end Field
892892
if and only if every separable degree one polynomial splits. -/
893893
theorem perfectField_iff_splits_of_natSepDegree_eq_one (F : Type*) [Field F] :
894894
PerfectField F ↔ ∀ f : F[X], f.natSepDegree = 1 → Splits f := by
895-
refine ⟨fun ⟨h⟩ f hf ↦ splits_iff_splits.2 <| or_iff_not_imp_left.2 fun hn g hg hd ↦ ?_,
896-
fun h ↦ ?_⟩
897-
· have := natSepDegree_le_of_dvd g f hd hn
898-
rw [hf, (h hg).natSepDegree_eq_natDegree] at this
899-
exact (degree_eq_iff_natDegree_eq_of_pos one_pos).2 <| this.antisymm <|
900-
natDegree_pos_iff_degree_pos.2 (degree_pos_of_irreducible hg)
895+
refine ⟨fun ⟨h⟩ f hf ↦ ?_, fun h ↦ ?_⟩
896+
· have hf0 : f ≠ 0 := by aesop
897+
obtain ⟨u, hu⟩ := UniqueFactorizationMonoid.factors_prod hf0
898+
rw [← hu]
899+
refine (Splits.multisetProd fun g hg ↦ ?_).mul u.isUnit.splits
900+
specialize h (UniqueFactorizationMonoid.irreducible_of_factor g hg)
901+
have key := natSepDegree_le_of_dvd g f (UniqueFactorizationMonoid.dvd_of_mem_factors hg) hf0
902+
rw [h.natSepDegree_eq_natDegree, hf] at key
903+
exact Splits.of_natDegree_le_one key
901904
obtain ⟨p, _⟩ := ExpChar.exists F
902905
haveI := PerfectRing.ofSurjective F p fun x ↦ by
903906
obtain ⟨y, hy⟩ := Splits.exists_eval_eq_zero

0 commit comments

Comments
 (0)