Skip to content

Commit 490c92f

Browse files
committed
feat(FieldTheory/Separable): add some results regarding separable and no repeated roots (#9263)
- `nodup_[a]roots_iff_of_splits`: a polynomial has no repeated roots if and only if it is separable. - `card_rootSet_eq_natDegree_iff_of_splits`: a polynomial has number of roots equal to its degree if and only if it is separable. A converse to `card_rootSet_eq_natDegree`. Also add some convenience lemmas: - `Separable.ne_zero`: a separable polynomial is not zero. - `Separable.map_minpoly`: if an element is separable over a small field, then it's also separable over a large field.
1 parent ef974f8 commit 490c92f

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

Mathlib/FieldTheory/Separable.lean

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ theorem not_separable_zero [Nontrivial R] : ¬Separable (0 : R[X]) := by
5353
simp only [derivative_zero, mul_zero, add_zero, zero_ne_one] at h
5454
#align polynomial.not_separable_zero Polynomial.not_separable_zero
5555

56+
theorem Separable.ne_zero [Nontrivial R] {f : R[X]} (h : f.Separable) : f ≠ 0 :=
57+
(not_separable_zero <| · ▸ h)
58+
5659
theorem separable_one : (1 : R[X]).Separable :=
5760
isCoprime_one_left
5861
#align polynomial.separable_one Polynomial.separable_one
@@ -437,10 +440,32 @@ section Splits
437440
theorem card_rootSet_eq_natDegree [Algebra F K] {p : F[X]} (hsep : p.Separable)
438441
(hsplit : Splits (algebraMap F K) p) : Fintype.card (p.rootSet K) = p.natDegree := by
439442
simp_rw [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe]
440-
rw [Multiset.toFinset_card_of_nodup, ← natDegree_eq_card_roots hsplit]
441-
exact nodup_roots hsep.map
443+
rw [Multiset.toFinset_card_of_nodup (nodup_roots hsep.map), ← natDegree_eq_card_roots hsplit]
442444
#align polynomial.card_root_set_eq_nat_degree Polynomial.card_rootSet_eq_natDegree
443445

446+
/-- If a non-zero polynomial splits, then it has no repeated roots on that field
447+
if and only if it is separable. -/
448+
theorem nodup_roots_iff_of_splits {f : F[X]} (hf : f ≠ 0) (h : f.Splits (RingHom.id F)) :
449+
f.roots.Nodup ↔ f.Separable := by
450+
refine ⟨(fun hnsep ↦ ?_).mtr, nodup_roots⟩
451+
rw [Separable, ← gcd_isUnit_iff, isUnit_iff_degree_eq_zero] at hnsep
452+
obtain ⟨x, hx⟩ := exists_root_of_splits _
453+
(splits_of_splits_of_dvd _ hf h (gcd_dvd_left f _)) hnsep
454+
simp_rw [Multiset.nodup_iff_count_le_one, not_forall, not_le]
455+
exact ⟨x, ((one_lt_rootMultiplicity_iff_isRoot_gcd hf).2 hx).trans_eq f.count_roots.symm⟩
456+
457+
/-- If a non-zero polynomial over `F` splits in `K`, then it has no repeated roots on `K`
458+
if and only if it is separable. -/
459+
theorem nodup_aroots_iff_of_splits [Algebra F K] {f : F[X]} (hf : f ≠ 0)
460+
(h : f.Splits (algebraMap F K)) : (f.aroots K).Nodup ↔ f.Separable := by
461+
rw [← (algebraMap F K).id_comp, ← splits_map_iff] at h
462+
rw [nodup_roots_iff_of_splits (map_ne_zero hf) h, separable_map]
463+
464+
theorem card_rootSet_eq_natDegree_iff_of_splits [Algebra F K] {f : F[X]} (hf : f ≠ 0)
465+
(h : f.Splits (algebraMap F K)) : Fintype.card (f.rootSet K) = f.natDegree ↔ f.Separable := by
466+
simp_rw [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe, natDegree_eq_card_roots h,
467+
Multiset.toFinset_card_eq_card_iff_nodup, nodup_aroots_iff_of_splits hf h]
468+
444469
variable {i : F →+* K}
445470

446471
theorem eq_X_sub_C_of_separable_of_root_eq {x : F} {h : F[X]} (h_sep : h.Separable)
@@ -528,7 +553,7 @@ theorem Polynomial.Separable.isIntegral {x : K} (h : (minpoly F x).Separable) :
528553
cases subsingleton_or_nontrivial F
529554
· haveI := Module.subsingleton F K
530555
exact ⟨1, monic_one, Subsingleton.elim _ _⟩
531-
· exact of_not_not fun h' ↦ not_separable_zero (minpoly.eq_zero h' ▸ h)
556+
· exact of_not_not (h.ne_zero <| minpoly.eq_zero ·)
532557

533558
theorem IsSeparable.isIntegral [IsSeparable F K] :
534559
∀ x : K, IsIntegral F x := fun x ↦ (IsSeparable.separable F x).isIntegral
@@ -571,11 +596,18 @@ instance (priority := 100) IsSeparable.of_finite (F K : Type*) [Field F] [Field
571596

572597
section IsSeparableTower
573598

599+
/-- If `R / K / A` is an extension tower, `x : R` is separable over `A`, then it's also separable
600+
over `K`. -/
601+
theorem Polynomial.Separable.map_minpoly {A : Type*} [CommRing A]
602+
(K : Type*) [Field K] [Algebra A K] {R : Type*} [CommRing R] [Algebra A R] [Algebra K R]
603+
[IsScalarTower A K R] {x : R} (h : (minpoly A x).Separable) : (minpoly K x).Separable :=
604+
h.map.of_dvd (minpoly.dvd_map_of_isScalarTower _ _ _)
605+
574606
variable (F K E : Type*) [Field F] [Field K] [Field E] [Algebra F K] [Algebra F E] [Algebra K E]
575607
[IsScalarTower F K E]
576608

577609
theorem isSeparable_tower_top_of_isSeparable [IsSeparable F E] : IsSeparable K E :=
578-
fun x ↦ (IsSeparable.separable F x).map.of_dvd (minpoly.dvd_map_of_isScalarTower _ _ _)
610+
fun x ↦ (IsSeparable.separable F x).map_minpoly _
579611
#align is_separable_tower_top_of_is_separable isSeparable_tower_top_of_isSeparable
580612

581613
theorem isSeparable_tower_bot_of_isSeparable [h : IsSeparable F E] : IsSeparable F K :=

0 commit comments

Comments
 (0)