field_theory.minpoly.is_integrally_closedMathlib.FieldTheory.Minpoly.IsIntegrallyClosed

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -101,7 +101,7 @@ theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p :
     rw [is_integrally_closed_eq_field_fractions K L hs]
     exact monic.map _ (minpoly.monic hs)
   rw [is_integrally_closed_eq_field_fractions _ _ hs,
-    map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this 
+    map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this
   rw [← dvd_iff_mod_by_monic_eq_zero (minpoly.monic hs)]
   refine' Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_mod_by_monic_lt p <| minpoly.monic hs)
   all_goals infer_instance
@@ -170,7 +170,7 @@ theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpo
           exact (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_is_unit h_contra).symm,
         fun a b h => or_iff_not_imp_left.mpr fun h' => _⟩⟩
   rw [← minpoly.isIntegrallyClosed_dvd_iff hx] at h' h ⊢
-  rw [aeval_mul] at h 
+  rw [aeval_mul] at h
   exact eq_zero_of_ne_zero_of_mul_left_eq_zero h' h
 #align minpoly.prime_of_is_integrally_closed minpoly.prime_of_isIntegrallyClosed
 -/
@@ -191,7 +191,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   by_cases hPzero : P = 0
   · simpa [hPzero] using hP.symm
   rw [← hP, minpoly.to_adjoin_apply', lift_hom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
-    SetLike.coe_mk, is_integrally_closed_dvd_iff hx] at hP₁ 
+    SetLike.coe_mk, is_integrally_closed_dvd_iff hx] at hP₁
   obtain ⟨Q, hQ⟩ := hP₁
   rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
Diff
@@ -72,8 +72,7 @@ theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsSca
   by
   let L := FractionRing S
   rw [← is_integrally_closed_eq_field_fractions K L hs]
-  refine'
-    minpoly.eq_of_algebraMap_eq (IsFractionRing.injective S L) (isIntegral_of_isScalarTower hs) rfl
+  refine' minpoly.eq_of_algebraMap_eq (IsFractionRing.injective S L) (IsIntegral.tower_top hs) rfl
 #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions'
 -/
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2019 Riccardo Brasca. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Paul Lezeau, Junyan Xu
 -/
-import Mathbin.RingTheory.AdjoinRoot
-import Mathbin.FieldTheory.Minpoly.Field
-import Mathbin.RingTheory.Polynomial.GaussLemma
+import RingTheory.AdjoinRoot
+import FieldTheory.Minpoly.Field
+import RingTheory.Polynomial.GaussLemma
 
 #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"2a0ce625dbb0ffbc7d1316597de0b25c1ec75303"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 Riccardo Brasca. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Paul Lezeau, Junyan Xu
-
-! This file was ported from Lean 3 source module field_theory.minpoly.is_integrally_closed
-! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.RingTheory.AdjoinRoot
 import Mathbin.FieldTheory.Minpoly.Field
 import Mathbin.RingTheory.Polynomial.GaussLemma
 
+#align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"2a0ce625dbb0ffbc7d1316597de0b25c1ec75303"
+
 /-!
 # Minimal polynomials over a GCD monoid
 
Diff
@@ -144,12 +144,12 @@ theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p
 #align minpoly.is_integrally_closed.degree_le_of_ne_zero minpoly.IsIntegrallyClosed.degree_le_of_ne_zero
 -/
 
-#print minpoly.IsIntegrallyClosed.Minpoly.unique /-
+#print IsIntegrallyClosed.minpoly.unique /-
 /-- The minimal polynomial of an element `x` is uniquely characterized by its defining property:
 if there is another monic polynomial of minimal degree that has `x` as a root, then this polynomial
 is equal to the minimal polynomial of `x`. See also `minpoly.unique` which relaxes the
 assumptions on `S` in exchange for stronger assumptions on `R`. -/
-theorem IsIntegrallyClosed.Minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
+theorem IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
     (hP : Polynomial.aeval s P = 0)
     (Pmin : ∀ Q : R[X], Q.Monic → Polynomial.aeval s Q = 0 → degree P ≤ degree Q) :
     P = minpoly R s := by
@@ -161,7 +161,7 @@ theorem IsIntegrallyClosed.Minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
   refine' degree_sub_lt _ (NeZero hs) _
   · exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s))
   · rw [(monic hs).leadingCoeff, hmo.leading_coeff]
-#align minpoly.is_integrally_closed.minpoly.unique minpoly.IsIntegrallyClosed.Minpoly.unique
+#align minpoly.is_integrally_closed.minpoly.unique IsIntegrallyClosed.minpoly.unique
 -/
 
 #print minpoly.prime_of_isIntegrallyClosed /-
Diff
@@ -210,25 +210,25 @@ def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoi
 #align minpoly.equiv_adjoin minpoly.equivAdjoin
 -/
 
-#print minpoly.Algebra.adjoin.powerBasis' /-
+#print Algebra.adjoin.powerBasis' /-
 /-- The `power_basis` of `adjoin R {x}` given by `x`. See `algebra.adjoin.power_basis` for a version
 over a field. -/
 @[simps]
-def minpoly.Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
+def Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
     PowerBasis R (Algebra.adjoin R ({x} : Set S)) :=
   PowerBasis.map (AdjoinRoot.powerBasis' (minpoly.monic hx)) (minpoly.equivAdjoin hx)
-#align algebra.adjoin.power_basis' minpoly.Algebra.adjoin.powerBasis'
+#align algebra.adjoin.power_basis' Algebra.adjoin.powerBasis'
 -/
 
-#print minpoly.PowerBasis.ofGenMemAdjoin' /-
+#print PowerBasis.ofGenMemAdjoin' /-
 /-- The power basis given by `x` if `B.gen ∈ adjoin R {x}`. -/
 @[simps]
-noncomputable def minpoly.PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
+noncomputable def PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
     (hx : B.gen ∈ adjoin R ({x} : Set S)) : PowerBasis R S :=
-  (minpoly.Algebra.adjoin.powerBasis' hint).map <|
+  (Algebra.adjoin.powerBasis' hint).map <|
     (Subalgebra.equivOfEq _ _ <| PowerBasis.adjoin_eq_top_of_gen_mem_adjoin hx).trans
       Subalgebra.topEquiv
-#align power_basis.of_gen_mem_adjoin' minpoly.PowerBasis.ofGenMemAdjoin'
+#align power_basis.of_gen_mem_adjoin' PowerBasis.ofGenMemAdjoin'
 -/
 
 end AdjoinRoot
Diff
@@ -50,6 +50,7 @@ variable (K L : Type _) [Field K] [Algebra R K] [IsFractionRing R K] [Field L] [
 
 variable [IsIntegrallyClosed R]
 
+#print minpoly.isIntegrallyClosed_eq_field_fractions /-
 /-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
 polynomial over the fraction field. See `minpoly.is_integrally_closed_eq_field_fractions'` if
 `S` is already a `K`-algebra. -/
@@ -63,7 +64,9 @@ theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsInteg
   · rw [aeval_map_algebra_map, aeval_algebra_map_apply, aeval, map_zero]
   · exact (monic hs).map _
 #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions
+-/
 
+#print minpoly.isIntegrallyClosed_eq_field_fractions' /-
 /-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
 polynomial over the fraction field. Compared to `minpoly.is_integrally_closed_eq_field_fractions`,
 this version is useful if the element is in a ring that is already a `K`-algebra. -/
@@ -75,6 +78,7 @@ theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsSca
   refine'
     minpoly.eq_of_algebraMap_eq (IsFractionRing.injective S L) (isIntegral_of_isScalarTower hs) rfl
 #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions'
+-/
 
 end
 
@@ -82,6 +86,7 @@ variable [IsDomain S] [NoZeroSMulDivisors R S]
 
 variable [IsIntegrallyClosed R]
 
+#print minpoly.isIntegrallyClosed_dvd /-
 /-- For integrally closed rings, the minimal polynomial divides any polynomial that has the
   integral element as root. See also `minpoly.dvd` which relaxes the assumptions on `S`
   in exchange for stronger assumptions on `R`. -/
@@ -105,7 +110,9 @@ theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p :
   refine' Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_mod_by_monic_lt p <| minpoly.monic hs)
   all_goals infer_instance
 #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd
+-/
 
+#print minpoly.isIntegrallyClosed_dvd_iff /-
 theorem isIntegrallyClosed_dvd_iff [Nontrivial R] {s : S} (hs : IsIntegral R s) (p : R[X]) :
     Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p :=
   ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by
@@ -113,14 +120,18 @@ theorem isIntegrallyClosed_dvd_iff [Nontrivial R] {s : S} (hs : IsIntegral R s)
       Function.comp_apply, eval_map, ← aeval_def] using
       aeval_eq_zero_of_dvd_aeval_eq_zero hp (minpoly.aeval R s)⟩
 #align minpoly.is_integrally_closed_dvd_iff minpoly.isIntegrallyClosed_dvd_iff
+-/
 
+#print minpoly.ker_eval /-
 theorem ker_eval {s : S} (hs : IsIntegral R s) :
     ((Polynomial.aeval s).toRingHom : R[X] →+* S).ker = Ideal.span ({minpoly R s} : Set R[X]) := by
   ext p <;>
     simp_rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom,
       is_integrally_closed_dvd_iff hs, ← Ideal.mem_span_singleton]
 #align minpoly.ker_eval minpoly.ker_eval
+-/
 
+#print minpoly.IsIntegrallyClosed.degree_le_of_ne_zero /-
 /-- If an element `x` is a root of a nonzero polynomial `p`, then the degree of `p` is at least the
 degree of the minimal polynomial of `x`. See also `minpoly.degree_le_of_ne_zero` which relaxes the
 assumptions on `S` in exchange for stronger assumptions on `R`. -/
@@ -131,7 +142,9 @@ theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p
   norm_cast
   exact nat_degree_le_of_dvd ((is_integrally_closed_dvd_iff hs _).mp hp) hp0
 #align minpoly.is_integrally_closed.degree_le_of_ne_zero minpoly.IsIntegrallyClosed.degree_le_of_ne_zero
+-/
 
+#print minpoly.IsIntegrallyClosed.Minpoly.unique /-
 /-- The minimal polynomial of an element `x` is uniquely characterized by its defining property:
 if there is another monic polynomial of minimal degree that has `x` as a root, then this polynomial
 is equal to the minimal polynomial of `x`. See also `minpoly.unique` which relaxes the
@@ -149,7 +162,9 @@ theorem IsIntegrallyClosed.Minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
   · exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s))
   · rw [(monic hs).leadingCoeff, hmo.leading_coeff]
 #align minpoly.is_integrally_closed.minpoly.unique minpoly.IsIntegrallyClosed.Minpoly.unique
+-/
 
+#print minpoly.prime_of_isIntegrallyClosed /-
 theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpoly R x) :=
   by
   refine'
@@ -162,6 +177,7 @@ theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpo
   rw [aeval_mul] at h 
   exact eq_zero_of_ne_zero_of_mul_left_eq_zero h' h
 #align minpoly.prime_of_is_integrally_closed minpoly.prime_of_isIntegrallyClosed
+-/
 
 section AdjoinRoot
 
@@ -171,6 +187,7 @@ open Algebra Polynomial AdjoinRoot
 
 variable {R} {x : S}
 
+#print minpoly.ToAdjoin.injective /-
 theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.toAdjoin R x) :=
   by
   refine' (injective_iff_map_eq_zero _).2 fun P₁ hP₁ => _
@@ -182,30 +199,37 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   obtain ⟨Q, hQ⟩ := hP₁
   rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
+-/
 
+#print minpoly.equivAdjoin /-
 /-- The algebra isomorphism `adjoin_root (minpoly R x) ≃ₐ[R] adjoin R x` -/
 @[simps]
 def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R ({x} : Set S) :=
   AlgEquiv.ofBijective (Minpoly.toAdjoin R x)
     ⟨minpoly.ToAdjoin.injective hx, Minpoly.toAdjoin.surjective R x⟩
 #align minpoly.equiv_adjoin minpoly.equivAdjoin
+-/
 
+#print minpoly.Algebra.adjoin.powerBasis' /-
 /-- The `power_basis` of `adjoin R {x}` given by `x`. See `algebra.adjoin.power_basis` for a version
 over a field. -/
 @[simps]
-def Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
+def minpoly.Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
     PowerBasis R (Algebra.adjoin R ({x} : Set S)) :=
   PowerBasis.map (AdjoinRoot.powerBasis' (minpoly.monic hx)) (minpoly.equivAdjoin hx)
-#align algebra.adjoin.power_basis' Algebra.adjoin.powerBasis'
+#align algebra.adjoin.power_basis' minpoly.Algebra.adjoin.powerBasis'
+-/
 
+#print minpoly.PowerBasis.ofGenMemAdjoin' /-
 /-- The power basis given by `x` if `B.gen ∈ adjoin R {x}`. -/
 @[simps]
-noncomputable def PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
+noncomputable def minpoly.PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
     (hx : B.gen ∈ adjoin R ({x} : Set S)) : PowerBasis R S :=
-  (Algebra.adjoin.powerBasis' hint).map <|
+  (minpoly.Algebra.adjoin.powerBasis' hint).map <|
     (Subalgebra.equivOfEq _ _ <| PowerBasis.adjoin_eq_top_of_gen_mem_adjoin hx).trans
       Subalgebra.topEquiv
-#align power_basis.of_gen_mem_adjoin' PowerBasis.ofGenMemAdjoin'
+#align power_basis.of_gen_mem_adjoin' minpoly.PowerBasis.ofGenMemAdjoin'
+-/
 
 end AdjoinRoot
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Paul Lezeau, Junyan Xu
 
 ! This file was ported from Lean 3 source module field_theory.minpoly.is_integrally_closed
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.RingTheory.Polynomial.GaussLemma
 /-!
 # Minimal polynomials over a GCD monoid
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file specializes the theory of minpoly to the case of an algebra over a GCD monoid.
 
 ## Main results
Diff
@@ -97,7 +97,7 @@ theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p :
     rw [is_integrally_closed_eq_field_fractions K L hs]
     exact monic.map _ (minpoly.monic hs)
   rw [is_integrally_closed_eq_field_fractions _ _ hs,
-    map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this
+    map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this 
   rw [← dvd_iff_mod_by_monic_eq_zero (minpoly.monic hs)]
   refine' Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_mod_by_monic_lt p <| minpoly.monic hs)
   all_goals infer_instance
@@ -155,8 +155,8 @@ theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpo
         by_contra h_contra <;>
           exact (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_is_unit h_contra).symm,
         fun a b h => or_iff_not_imp_left.mpr fun h' => _⟩⟩
-  rw [← minpoly.isIntegrallyClosed_dvd_iff hx] at h' h⊢
-  rw [aeval_mul] at h
+  rw [← minpoly.isIntegrallyClosed_dvd_iff hx] at h' h ⊢
+  rw [aeval_mul] at h 
   exact eq_zero_of_ne_zero_of_mul_left_eq_zero h' h
 #align minpoly.prime_of_is_integrally_closed minpoly.prime_of_isIntegrallyClosed
 
@@ -175,7 +175,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   by_cases hPzero : P = 0
   · simpa [hPzero] using hP.symm
   rw [← hP, minpoly.to_adjoin_apply', lift_hom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
-    SetLike.coe_mk, is_integrally_closed_dvd_iff hx] at hP₁
+    SetLike.coe_mk, is_integrally_closed_dvd_iff hx] at hP₁ 
   obtain ⟨Q, hQ⟩ := hP₁
   rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
Diff
@@ -175,7 +175,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   by_cases hPzero : P = 0
   · simpa [hPzero] using hP.symm
   rw [← hP, minpoly.to_adjoin_apply', lift_hom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
-    [anonymous], is_integrally_closed_dvd_iff hx] at hP₁
+    SetLike.coe_mk, is_integrally_closed_dvd_iff hx] at hP₁
   obtain ⟨Q, hQ⟩ := hP₁
   rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
Diff
@@ -32,7 +32,7 @@ This file specializes the theory of minpoly to the case of an algebra over a GCD
 -/
 
 
-open Classical Polynomial
+open scoped Classical Polynomial
 
 open Polynomial Set Function minpoly
 
Diff
@@ -4,11 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Paul Lezeau, Junyan Xu
 
 ! This file was ported from Lean 3 source module field_theory.minpoly.is_integrally_closed
-! leanprover-community/mathlib commit 825edd3cd735e87495b0c2a2114fc3929eefce41
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Data.Polynomial.FieldDivision
 import Mathbin.RingTheory.AdjoinRoot
 import Mathbin.FieldTheory.Minpoly.Field
 import Mathbin.RingTheory.Polynomial.GaussLemma
Diff
@@ -178,7 +178,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   rw [← hP, minpoly.to_adjoin_apply', lift_hom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
     [anonymous], is_integrally_closed_dvd_iff hx] at hP₁
   obtain ⟨Q, hQ⟩ := hP₁
-  rw [← hP, hQ, RingHom.map_mul, mk_self, zero_mul]
+  rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
 
 /-- The algebra isomorphism `adjoin_root (minpoly R x) ≃ₐ[R] adjoin R x` -/

Changes in mathlib4

mathlib3
mathlib4
feat: Polynomial.mul_modByMonic (#11113)

Adds simp lemma for (p * q) %ₘ q = 0 and (q * p) %ₘ q = 0.

Also corrects a misspelling: dvd_iff_modByMonic_eq_zero should be modByMonic_eq_zero_iff_dvd

Diff
@@ -88,7 +88,7 @@ theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]}
     exact Monic.map _ (minpoly.monic hs)
   rw [isIntegrallyClosed_eq_field_fractions _ _ hs,
     map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this
-  rw [← dvd_iff_modByMonic_eq_zero (minpoly.monic hs)]
+  rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)]
   exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs)
 #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd
 
chore: avoid some unused variables (#11594)

These will be caught by the linter in a future lean version.

Diff
@@ -129,9 +129,8 @@ theorem _root_.IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Mon
   have hs : IsIntegral R s := ⟨P, hmo, hP⟩
   symm; apply eq_of_sub_eq_zero
   by_contra hnz
-  have := IsIntegrallyClosed.degree_le_of_ne_zero hs hnz (by simp [hP])
-  contrapose! this
-  refine' degree_sub_lt _ (ne_zero hs) _
+  refine IsIntegrallyClosed.degree_le_of_ne_zero hs hnz (by simp [hP]) |>.not_lt ?_
+  refine degree_sub_lt ?_ (ne_zero hs) ?_
   · exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s))
   · rw [(monic hs).leadingCoeff, hmo.leadingCoeff]
 #align minpoly.is_integrally_closed.minpoly.unique IsIntegrallyClosed.minpoly.unique
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -67,7 +67,6 @@ theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsSca
 end
 
 variable [IsDomain S] [NoZeroSMulDivisors R S]
-
 variable [IsIntegrallyClosed R]
 
 /-- For integrally closed rings, the minimal polynomial divides any polynomial that has the
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -90,7 +90,7 @@ theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]}
   rw [isIntegrallyClosed_eq_field_fractions _ _ hs,
     map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this
   rw [← dvd_iff_modByMonic_eq_zero (minpoly.monic hs)]
-  refine' Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs)
+  exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs)
 #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd
 
 theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) :
chore(RingTheory): golf, generalize, fix docs (#7500)

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -22,7 +22,7 @@ This file specializes the theory of minpoly to the case of an algebra over a GCD
  * `minpoly.isIntegrallyClosed_dvd` : For integrally closed domains, the minimal polynomial divides
     any primitive polynomial that has the integral element as root.
 
- * `minpoly.IsIntegrallyClosed.Minpoly.unique` : The minimal polynomial of an element `x` is
+ * `IsIntegrallyClosed.Minpoly.unique` : The minimal polynomial of an element `x` is
     uniquely characterized by its defining property: if there is another monic polynomial of minimal
     degree that has `x` as a root, then this polynomial is equal to the minimal polynomial of `x`.
 
@@ -39,8 +39,8 @@ variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S]
 
 section
 
-variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [Field L] [Algebra R L]
-  [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L]
+variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L]
+  [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L]
 
 variable [IsIntegrallyClosed R]
 
@@ -73,7 +73,7 @@ variable [IsIntegrallyClosed R]
 /-- For integrally closed rings, the minimal polynomial divides any polynomial that has the
   integral element as root. See also `minpoly.dvd` which relaxes the assumptions on `S`
   in exchange for stronger assumptions on `R`. -/
-theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p : R[X]}
+theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]}
     (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by
   let K := FractionRing R
   let L := FractionRing S
@@ -93,7 +93,7 @@ theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p :
   refine' Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs)
 #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd
 
-theorem isIntegrallyClosed_dvd_iff [Nontrivial R] {s : S} (hs : IsIntegral R s) (p : R[X]) :
+theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) :
     Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p :=
   ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by
     simpa only [RingHom.mem_ker, RingHom.coe_comp, coe_evalRingHom, coe_mapRingHom,
@@ -155,13 +155,9 @@ variable {x : S}
 
 theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.toAdjoin R x) := by
   refine' (injective_iff_map_eq_zero _).2 fun P₁ hP₁ => _
-  obtain ⟨P, hP⟩ := mk_surjective (minpoly.monic hx) P₁
-  by_cases hPzero : P = 0
-  · simpa [hPzero] using hP.symm
-  rw [← hP, Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
-    isIntegrallyClosed_dvd_iff hx] at hP₁
-  obtain ⟨Q, hQ⟩ := hP₁
-  rw [← hP, hQ, RingHom.map_mul, mk_self, zero_mul]
+  obtain ⟨P, rfl⟩ := mk_surjective P₁
+  rwa [Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
+    isIntegrallyClosed_dvd_iff hx, ← AdjoinRoot.mk_eq_zero] at hP₁
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
 
 /-- The algebra isomorphism `AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R x` -/
chore: only four spaces for subsequent lines (#7286)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -180,7 +180,7 @@ def _root_.Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
 
 @[simp]
 theorem _root_.Algebra.adjoin.powerBasis'_dim (hx : IsIntegral R x) :
-  (Algebra.adjoin.powerBasis' hx).dim = (minpoly R x).natDegree := rfl
+    (Algebra.adjoin.powerBasis' hx).dim = (minpoly R x).natDegree := rfl
 #align algebra.adjoin.power_basis'_dim Algebra.adjoin.powerBasis'_dim
 
 @[simp]
chore: replace minpoly.eq_of_algebraMap_eq by algebraMap_eq (#7228)

Also changes the repetitive names minpoly.minpoly_algHom/Equiv to minpoly.algHom/Equiv_eq

Diff
@@ -50,8 +50,7 @@ polynomial over the fraction field. See `minpoly.isIntegrallyClosed_eq_field_fra
 theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) :
     minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by
   refine' (eq_of_irreducible_of_monic _ _ _).symm
-  · exact
-      (Polynomial.Monic.irreducible_iff_irreducible_map_fraction_map (monic hs)).1 (irreducible hs)
+  · exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs)
   · rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero]
   · exact (monic hs).map _
 #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions
@@ -62,9 +61,7 @@ this version is useful if the element is in a ring that is already a `K`-algebra
 theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S]
     {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by
   let L := FractionRing S
-  rw [← isIntegrallyClosed_eq_field_fractions K L hs]
-  refine'
-    minpoly.eq_of_algebraMap_eq (IsFractionRing.injective S L) (isIntegral_of_isScalarTower hs) rfl
+  rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)]
 #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions'
 
 end
fix: remove a bad Algebra instance in FractionRing (#6724)
Diff
@@ -80,6 +80,8 @@ theorem isIntegrallyClosed_dvd [Nontrivial R] {s : S} (hs : IsIntegral R s) {p :
     (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by
   let K := FractionRing R
   let L := FractionRing S
+  let _ : Algebra K L := FractionRing.liftAlgebra R L
+  have := FractionRing.isScalarTower_liftAlgebra R L
   have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %ₘ minpoly R s) := by
     rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div]
     refine' dvd_sub (minpoly.dvd K (algebraMap S L s) _) _
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -162,7 +162,7 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   rw [← hP, Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe,
     isIntegrallyClosed_dvd_iff hx] at hP₁
   obtain ⟨Q, hQ⟩ := hP₁
-  rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
+  rw [← hP, hQ, RingHom.map_mul, mk_self, zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
 
 /-- The algebra isomorphism `AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R x` -/
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -35,11 +35,11 @@ open Polynomial Set Function minpoly
 
 namespace minpoly
 
-variable {R S : Type _} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S]
+variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S]
 
 section
 
-variable (K L : Type _) [Field K] [Algebra R K] [IsFractionRing R K] [Field L] [Algebra R L]
+variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [Field L] [Algebra R L]
   [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L]
 
 variable [IsIntegrallyClosed R]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 Riccardo Brasca. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Paul Lezeau, Junyan Xu
-
-! This file was ported from Lean 3 source module field_theory.minpoly.is_integrally_closed
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.RingTheory.AdjoinRoot
 import Mathlib.FieldTheory.Minpoly.Field
 import Mathlib.RingTheory.Polynomial.GaussLemma
 
+#align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
+
 /-!
 # Minimal polynomials over a GCD monoid
 
chore: tidy various files (#5449)
Diff
@@ -127,7 +127,7 @@ theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p
 if there is another monic polynomial of minimal degree that has `x` as a root, then this polynomial
 is equal to the minimal polynomial of `x`. See also `minpoly.unique` which relaxes the
 assumptions on `S` in exchange for stronger assumptions on `R`. -/
-theorem IsIntegrallyClosed.Minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
+theorem _root_.IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
     (hP : Polynomial.aeval s P = 0)
     (Pmin : ∀ Q : R[X], Q.Monic → Polynomial.aeval s Q = 0 → degree P ≤ degree Q) :
     P = minpoly R s := by
@@ -139,14 +139,12 @@ theorem IsIntegrallyClosed.Minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
   refine' degree_sub_lt _ (ne_zero hs) _
   · exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s))
   · rw [(monic hs).leadingCoeff, hmo.leadingCoeff]
-#align minpoly.is_integrally_closed.minpoly.unique minpoly.IsIntegrallyClosed.Minpoly.unique
+#align minpoly.is_integrally_closed.minpoly.unique IsIntegrallyClosed.minpoly.unique
 
 theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpoly R x) := by
   refine'
     ⟨(minpoly.monic hx).ne_zero,
-      ⟨by
-        by_contra h_contra
-        exact (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_isUnit h_contra).symm,
+      ⟨fun h_contra => (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_isUnit h_contra).symm,
         fun a b h => or_iff_not_imp_left.mpr fun h' => _⟩⟩
   rw [← minpoly.isIntegrallyClosed_dvd_iff hx] at h' h ⊢
   rw [aeval_mul] at h
chore: don't use simps (#5423)

simps unfolds too much and it produces useless declarations. These are those present in mathlib3.

Diff
@@ -179,14 +179,24 @@ def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoi
 
 /-- The `PowerBasis` of `adjoin R {x}` given by `x`. See `Algebra.adjoin.powerBasis` for a version
 over a field. -/
-@[simps!]
 def _root_.Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
     PowerBasis R (Algebra.adjoin R ({x} : Set S)) :=
   PowerBasis.map (AdjoinRoot.powerBasis' (minpoly.monic hx)) (minpoly.equivAdjoin hx)
 #align algebra.adjoin.power_basis' Algebra.adjoin.powerBasis'
 
+@[simp]
+theorem _root_.Algebra.adjoin.powerBasis'_dim (hx : IsIntegral R x) :
+  (Algebra.adjoin.powerBasis' hx).dim = (minpoly R x).natDegree := rfl
+#align algebra.adjoin.power_basis'_dim Algebra.adjoin.powerBasis'_dim
+
+@[simp]
+theorem _root_.Algebra.adjoin.powerBasis'_gen (hx : IsIntegral R x) :
+    (adjoin.powerBasis' hx).gen = ⟨x, SetLike.mem_coe.1 <| subset_adjoin <| mem_singleton x⟩ := by
+  rw [Algebra.adjoin.powerBasis', PowerBasis.map_gen, AdjoinRoot.powerBasis'_gen, equivAdjoin,
+    AlgEquiv.ofBijective_apply, Minpoly.toAdjoin, liftHom_root]
+#align algebra.adjoin.power_basis'_gen Algebra.adjoin.powerBasis'_gen
+
 /-- The power basis given by `x` if `B.gen ∈ adjoin R {x}`. -/
-@[simps!]
 noncomputable def _root_.PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
     (hx : B.gen ∈ adjoin R ({x} : Set S)) : PowerBasis R S :=
   (Algebra.adjoin.powerBasis' hint).map <|
@@ -194,6 +204,18 @@ noncomputable def _root_.PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint :
       Subalgebra.topEquiv
 #align power_basis.of_gen_mem_adjoin' PowerBasis.ofGenMemAdjoin'
 
+@[simp]
+theorem _root_.PowerBasis.ofGenMemAdjoin'_dim (B : PowerBasis R S) (hint : IsIntegral R x)
+    (hx : B.gen ∈ adjoin R ({x} : Set S)) :
+    (B.ofGenMemAdjoin' hint hx).dim = (minpoly R x).natDegree := rfl
+#align power_basis.of_gen_mem_adjoin'_dim PowerBasis.ofGenMemAdjoin'_dim
+
+@[simp]
+theorem _root_.PowerBasis.ofGenMemAdjoin'_gen (B : PowerBasis R S) (hint : IsIntegral R x)
+    (hx : B.gen ∈ adjoin R ({x} : Set S)) :
+    (B.ofGenMemAdjoin' hint hx).gen = x := by
+  simp [PowerBasis.ofGenMemAdjoin']
+#align power_basis.of_gen_mem_adjoin'_gen PowerBasis.ofGenMemAdjoin'_gen
 
 end AdjoinRoot
 
chore: use _root_. as in mathlib3 (#5420)

These are the mathlib3 names.

Diff
@@ -180,19 +180,19 @@ def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoi
 /-- The `PowerBasis` of `adjoin R {x}` given by `x`. See `Algebra.adjoin.powerBasis` for a version
 over a field. -/
 @[simps!]
-def Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
+def _root_.Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
     PowerBasis R (Algebra.adjoin R ({x} : Set S)) :=
   PowerBasis.map (AdjoinRoot.powerBasis' (minpoly.monic hx)) (minpoly.equivAdjoin hx)
-#align algebra.adjoin.power_basis' minpoly.Algebra.adjoin.powerBasis'
+#align algebra.adjoin.power_basis' Algebra.adjoin.powerBasis'
 
 /-- The power basis given by `x` if `B.gen ∈ adjoin R {x}`. -/
 @[simps!]
-noncomputable def PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
+noncomputable def _root_.PowerBasis.ofGenMemAdjoin' (B : PowerBasis R S) (hint : IsIntegral R x)
     (hx : B.gen ∈ adjoin R ({x} : Set S)) : PowerBasis R S :=
   (Algebra.adjoin.powerBasis' hint).map <|
     (Subalgebra.equivOfEq _ _ <| PowerBasis.adjoin_eq_top_of_gen_mem_adjoin hx).trans
       Subalgebra.topEquiv
-#align power_basis.of_gen_mem_adjoin' minpoly.PowerBasis.ofGenMemAdjoin'
+#align power_basis.of_gen_mem_adjoin' PowerBasis.ofGenMemAdjoin'
 
 
 end AdjoinRoot
chore: tidy various files (#5355)
Diff
@@ -19,15 +19,15 @@ This file specializes the theory of minpoly to the case of an algebra over a GCD
 
 ## Main results
 
- * `is_integrally_closed_eq_field_fractions`: For integrally closed domains, the minimal polynomial
-    over the ring is the same as the minimal polynomial over the fraction field.
+ * `minpoly.isIntegrallyClosed_eq_field_fractions`: For integrally closed domains, the minimal
+    polynomial over the ring is the same as the minimal polynomial over the fraction field.
 
- * `is_integrally_closed_dvd` : For integrally closed domains, the minimal polynomial divides any
-    primitive polynomial that has the integral element as root.
+ * `minpoly.isIntegrallyClosed_dvd` : For integrally closed domains, the minimal polynomial divides
+    any primitive polynomial that has the integral element as root.
 
- * `is_integrally_closed_unique` : The minimal polynomial of an element `x` is uniquely
-    characterized by its defining property: if there is another monic polynomial of minimal degree
-    that has `x` as a root, then this polynomial is equal to the minimal polynomial of `x`.
+ * `minpoly.IsIntegrallyClosed.Minpoly.unique` : The minimal polynomial of an element `x` is
+    uniquely characterized by its defining property: if there is another monic polynomial of minimal
+    degree that has `x` as a root, then this polynomial is equal to the minimal polynomial of `x`.
 
 -/
 
@@ -48,7 +48,7 @@ variable (K L : Type _) [Field K] [Algebra R K] [IsFractionRing R K] [Field L] [
 variable [IsIntegrallyClosed R]
 
 /-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
-polynomial over the fraction field. See `minpoly.is_integrally_closed_eq_field_fractions'` if
+polynomial over the fraction field. See `minpoly.isIntegrallyClosed_eq_field_fractions'` if
 `S` is already a `K`-algebra. -/
 theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) :
     minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by
@@ -60,7 +60,7 @@ theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsInteg
 #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions
 
 /-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
-polynomial over the fraction field. Compared to `minpoly.is_integrally_closed_eq_field_fractions`,
+polynomial over the fraction field. Compared to `minpoly.isIntegrallyClosed_eq_field_fractions`,
 this version is useful if the element is in a ring that is already a `K`-algebra. -/
 theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S]
     {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by
@@ -157,8 +157,6 @@ noncomputable section AdjoinRoot
 
 open Algebra Polynomial AdjoinRoot
 
--- porting note: commented out because of redundant binder annotation update
---variable {R}
 variable {x : S}
 
 theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.toAdjoin R x) := by
@@ -172,14 +170,14 @@ theorem ToAdjoin.injective (hx : IsIntegral R x) : Function.Injective (Minpoly.t
   rw [← hP, hQ, RingHom.map_mul, mk_self, MulZeroClass.zero_mul]
 #align minpoly.to_adjoin.injective minpoly.ToAdjoin.injective
 
-/-- The algebra isomorphism `adjoin_root (minpoly R x) ≃ₐ[R] adjoin R x` -/
+/-- The algebra isomorphism `AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R x` -/
 @[simps!]
 def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R ({x} : Set S) :=
   AlgEquiv.ofBijective (Minpoly.toAdjoin R x)
     ⟨minpoly.ToAdjoin.injective hx, Minpoly.toAdjoin.surjective R x⟩
 #align minpoly.equiv_adjoin minpoly.equivAdjoin
 
-/-- The `power_basis` of `adjoin R {x}` given by `x`. See `algebra.adjoin.power_basis` for a version
+/-- The `PowerBasis` of `adjoin R {x}` given by `x`. See `Algebra.adjoin.powerBasis` for a version
 over a field. -/
 @[simps!]
 def Algebra.adjoin.powerBasis' (hx : IsIntegral R x) :
feat: port FieldTheory.Minpoly.IsIntegrallyClosed (#5076)

Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 10 + 660

661 files ported (98.5%)
274330 lines ported (98.8%)
Show graph

The unported dependencies are