Skip to content

Commit c954df2

Browse files
committed
chore(FieldTheory/Adjoin): remove unnecessary assumptions in minpolynatDegree_le and minpoly.degree_le (#6152)
Also - fix the names of `minpoly.natDegree_le` and `minpoly.degree_le` - rename `minpoly.ne_zero_of_finite_field_extension` to `minpoly.ne_zero_of_finite` - reduce typeclass assumptions of some lemmas in `RingTheory/Algebraic` - add two lemmas `isIntegral_of_finite` and `isAlgebraic_of_finite` - move `Algebra.isIntegral_of_finite` to `RingTheory/IntegralClosure`
1 parent 1919f53 commit c954df2

File tree

6 files changed

+97
-46
lines changed

6 files changed

+97
-46
lines changed

Mathlib/FieldTheory/Adjoin.lean

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,16 @@ theorem adjoin.finrank {x : L} (hx : IsIntegral K x) :
884884
rfl
885885
#align intermediate_field.adjoin.finrank IntermediateField.adjoin.finrank
886886

887-
theorem minpoly.natDegree_le {x : L} [FiniteDimensional K L] (hx : IsIntegral K x) :
887+
theorem _root_.minpoly.natDegree_le (x : L) [FiniteDimensional K L] :
888888
(minpoly K x).natDegree ≤ finrank K L :=
889-
le_of_eq_of_le (IntermediateField.adjoin.finrank hx).symm K⟮x⟯.toSubmodule.finrank_le
890-
#align minpoly.nat_degree_le IntermediateField.minpoly.natDegree_le
889+
le_of_eq_of_le (IntermediateField.adjoin.finrank (isIntegral_of_finite _ _)).symm
890+
K⟮x⟯.toSubmodule.finrank_le
891+
#align minpoly.nat_degree_le minpoly.natDegree_le
891892

892-
theorem minpoly.degree_le {x : L} [FiniteDimensional K L] (hx : IsIntegral K x) :
893+
theorem _root_.minpoly.degree_le (x : L) [FiniteDimensional K L] :
893894
(minpoly K x).degree ≤ finrank K L :=
894-
degree_le_of_natDegree_le (minpoly.natDegree_le hx)
895-
#align minpoly.degree_le IntermediateField.minpoly.degree_le
895+
degree_le_of_natDegree_le (minpoly.natDegree_le x)
896+
#align minpoly.degree_le minpoly.degree_le
896897

897898
end PowerBasis
898899

Mathlib/FieldTheory/IsAlgClosed/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier =
309309
letI : Algebra N M := (maximalSubfieldWithHom K L M).emb.toRingHom.toAlgebra
310310
obtain ⟨y, hy⟩ := IsAlgClosed.exists_aeval_eq_zero M (minpoly N x) <|
311311
(minpoly.degree_pos
312-
(isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ _ hL x))).ne'
312+
(isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ hL x))).ne'
313313
let O : Subalgebra N L := Algebra.adjoin N {(x : L)}
314314
letI : Algebra N O := Subalgebra.algebra O
315315
-- Porting note: there are some tricky unfolds going on here:
@@ -549,7 +549,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
549549
haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
550550
haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
551551
haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| hFK x⟩
552-
let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base F Fx hK)
552+
let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base Fx hK)
553553
exact
554554
⟨ψ₀.restrictScalars F,
555555
(congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|

Mathlib/FieldTheory/Minpoly/Field.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ theorem degree_le_of_ne_zero {p : A[X]} (pnz : p ≠ 0) (hp : Polynomial.aeval x
4242
_ = degree p := degree_mul_leadingCoeff_inv p pnz
4343
#align minpoly.degree_le_of_ne_zero minpoly.degree_le_of_ne_zero
4444

45-
theorem ne_zero_of_finite_field_extension (e : B) [FiniteDimensional A B] : minpoly A e ≠ 0 :=
46-
minpoly.ne_zero <| isIntegral_of_noetherian (IsNoetherian.iff_fg.2 inferInstance) _
47-
#align minpoly.ne_zero_of_finite_field_extension minpoly.ne_zero_of_finite_field_extension
45+
theorem ne_zero_of_finite (e : B) [FiniteDimensional A B] : minpoly A e ≠ 0 :=
46+
minpoly.ne_zero <| isIntegral_of_finite _ _
47+
#align minpoly.ne_zero_of_finite_field_extension minpoly.ne_zero_of_finite
4848

4949
/-- The minimal polynomial of an element `x` is uniquely characterized by its defining property:
5050
if there is another monic polynomial of minimal degree that has `x` as a root, then this polynomial
@@ -178,7 +178,7 @@ def rootsOfMinPolyPiType (φ : E →ₐ[F] K)
178178
(x : range (FiniteDimensional.finBasis F E : _ → E)) :
179179
{ l : K // l ∈ (((minpoly F x.1).map (algebraMap F K)).roots : Multiset K) } :=
180180
⟨φ x, by
181-
rw [mem_roots_map (minpoly.ne_zero_of_finite_field_extension F x.val),
181+
rw [mem_roots_map (minpoly.ne_zero_of_finite F x.val),
182182
← aeval_def, aeval_algHom_apply, minpoly.aeval, map_zero]⟩
183183
#align minpoly.roots_of_min_poly_pi_type minpoly.rootsOfMinPolyPiType
184184

Mathlib/NumberTheory/NumberField/Embeddings.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ theorem coeff_bdd_of_norm_le {B : ℝ} {x : K} (h : ∀ φ : K →+* A, ‖φ x
8989
have hx := IsSeparable.isIntegral ℚ x
9090
rw [← norm_algebraMap' A, ← coeff_map (algebraMap ℚ A)]
9191
refine coeff_bdd_of_roots_le _ (minpoly.monic hx)
92-
(IsAlgClosed.splits_codomain _) (IntermediateField.minpoly.natDegree_le hx) (fun z hz => ?_) i
92+
(IsAlgClosed.splits_codomain _) (minpoly.natDegree_le x) (fun z hz => ?_) i
9393
classical
9494
rw [← Multiset.mem_toFinset] at hz
9595
obtain ⟨φ, rfl⟩ := (range_eval_eq_rootSet_minpoly K A x).symm.subset hz
@@ -107,7 +107,7 @@ theorem finite_of_norm_le (B : ℝ) : {x : K | IsIntegral ℤ x ∧ ∀ φ : K
107107
have h_map_ℚ_minpoly := minpoly.isIntegrallyClosed_eq_field_fractions' ℚ hx.1
108108
refine ⟨_, ⟨?_, fun i => ?_⟩, mem_rootSet.2 ⟨minpoly.ne_zero hx.1, minpoly.aeval ℤ x⟩⟩
109109
· rw [← (minpoly.monic hx.1).natDegree_map (algebraMap ℤ ℚ), ← h_map_ℚ_minpoly]
110-
exact IntermediateField.minpoly.natDegree_le (isIntegral_of_isScalarTower hx.1)
110+
exact minpoly.natDegree_le x
111111
rw [mem_Icc, ← abs_le, ← @Int.cast_le ℝ]
112112
refine (Eq.trans_le ?_ <| coeff_bdd_of_norm_le hx.2 i).trans (Nat.le_ceil _)
113113
rw [h_map_ℚ_minpoly, coeff_map, eq_intCast, Int.norm_cast_rat, Int.norm_eq_abs, Int.cast_abs]

Mathlib/RingTheory/Algebraic.lean

Lines changed: 62 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -199,67 +199,95 @@ protected theorem Algebra.isAlgebraic_iff_isIntegral :
199199

200200
end Field
201201

202-
namespace Algebra
202+
section
203203

204204
variable {K : Type _} {L : Type _} {R : Type _} {S : Type _} {A : Type _}
205205

206-
variable [Field K] [Field L] [CommRing R] [CommRing S] [CommRing A]
206+
section Ring
207207

208-
variable [Algebra K L] [Algebra L A] [Algebra K A] [IsScalarTower K L A]
208+
section CommRing
209209

210-
variable [Algebra R S] [Algebra S A] [Algebra R A] [IsScalarTower R S A]
210+
variable [CommRing R] [CommRing S] [Ring A]
211211

212-
/-- If L is an algebraic field extension of K and A is an algebraic algebra over L,
213-
then A is algebraic over K. -/
214-
theorem isAlgebraic_trans (L_alg : IsAlgebraic K L) (A_alg : IsAlgebraic L A) :
215-
IsAlgebraic K A := by
216-
simp only [IsAlgebraic, isAlgebraic_iff_isIntegral] at L_alg A_alg ⊢
217-
exact isIntegral_trans L_alg A_alg
218-
#align algebra.is_algebraic_trans Algebra.isAlgebraic_trans
219-
220-
variable (K L)
212+
variable [Algebra R S] [Algebra S A] [Algebra R A] [IsScalarTower R S A]
221213

222214
/-- If x is algebraic over R, then x is algebraic over S when S is an extension of R,
223215
and the map from `R` to `S` is injective. -/
224-
theorem _root_.isAlgebraic_of_larger_base_of_injective
216+
theorem isAlgebraic_of_larger_base_of_injective
225217
(hinj : Function.Injective (algebraMap R S)) {x : A}
226-
(A_alg : _root_.IsAlgebraic R x) : _root_.IsAlgebraic S x :=
218+
(A_alg : IsAlgebraic R x) : IsAlgebraic S x :=
227219
let ⟨p, hp₁, hp₂⟩ := A_alg
228220
⟨p.map (algebraMap _ _), by
229221
rwa [Ne.def, ← degree_eq_bot, degree_map_eq_of_injective hinj, degree_eq_bot], by simpa⟩
230222
#align is_algebraic_of_larger_base_of_injective isAlgebraic_of_larger_base_of_injective
231223

232224
/-- If A is an algebraic algebra over R, then A is algebraic over S when S is an extension of R,
233225
and the map from `R` to `S` is injective. -/
234-
theorem isAlgebraic_of_larger_base_of_injective (hinj : Function.Injective (algebraMap R S))
226+
theorem Algebra.isAlgebraic_of_larger_base_of_injective (hinj : Function.Injective (algebraMap R S))
235227
(A_alg : IsAlgebraic R A) : IsAlgebraic S A := fun x =>
236228
_root_.isAlgebraic_of_larger_base_of_injective hinj (A_alg x)
237229
#align algebra.is_algebraic_of_larger_base_of_injective Algebra.isAlgebraic_of_larger_base_of_injective
238230

231+
end CommRing
232+
233+
section Field
234+
235+
variable [Field K] [Field L] [Ring A]
236+
237+
variable [Algebra K L] [Algebra L A] [Algebra K A] [IsScalarTower K L A]
238+
239+
variable (L)
240+
239241
/-- If x is algebraic over K, then x is algebraic over L when L is an extension of K -/
240-
theorem _root_.isAlgebraic_of_larger_base {x : A} (A_alg : _root_.IsAlgebraic K x) :
241-
_root_.IsAlgebraic L x :=
242-
_root_.isAlgebraic_of_larger_base_of_injective (algebraMap K L).injective A_alg
242+
theorem isAlgebraic_of_larger_base {x : A} (A_alg : IsAlgebraic K x) :
243+
IsAlgebraic L x :=
244+
isAlgebraic_of_larger_base_of_injective (algebraMap K L).injective A_alg
243245
#align is_algebraic_of_larger_base isAlgebraic_of_larger_base
244246

245247
/-- If A is an algebraic algebra over K, then A is algebraic over L when L is an extension of K -/
246-
theorem isAlgebraic_of_larger_base (A_alg : IsAlgebraic K A) : IsAlgebraic L A :=
248+
theorem Algebra.isAlgebraic_of_larger_base (A_alg : IsAlgebraic K A) : IsAlgebraic L A :=
247249
isAlgebraic_of_larger_base_of_injective (algebraMap K L).injective A_alg
248250
#align algebra.is_algebraic_of_larger_base Algebra.isAlgebraic_of_larger_base
249251

250-
/-- A field extension is integral if it is finite. -/
251-
theorem isIntegral_of_finite [FiniteDimensional K L] : Algebra.IsIntegral K L := fun x =>
252-
isIntegral_of_submodule_noetherian ⊤ (IsNoetherian.iff_fg.2 inferInstance) x Algebra.mem_top
253-
#align algebra.is_integral_of_finite Algebra.isIntegral_of_finite
252+
variable (K)
253+
254+
theorem isAlgebraic_of_finite (e : A) [FiniteDimensional K A] : IsAlgebraic K e :=
255+
isAlgebraic_iff_isIntegral.mpr (isIntegral_of_finite K e)
256+
257+
variable (A)
254258

255259
/-- A field extension is algebraic if it is finite. -/
256-
theorem isAlgebraic_of_finite [FiniteDimensional K L] : IsAlgebraic K L :=
257-
Algebra.isAlgebraic_iff_isIntegral.mpr (isIntegral_of_finite K L)
260+
theorem Algebra.isAlgebraic_of_finite [FiniteDimensional K A] : IsAlgebraic K A :=
261+
Algebra.isAlgebraic_iff_isIntegral.mpr (isIntegral_of_finite K A)
258262
#align algebra.is_algebraic_of_finite Algebra.isAlgebraic_of_finite
259263

260-
variable {K L}
264+
end Field
265+
266+
end Ring
267+
268+
section CommRing
269+
270+
variable [Field K] [Field L] [CommRing A]
271+
272+
variable [Algebra K L] [Algebra L A] [Algebra K A] [IsScalarTower K L A]
261273

262-
theorem IsAlgebraic.algHom_bijective (ha : Algebra.IsAlgebraic K L) (f : L →ₐ[K] L) :
274+
/-- If L is an algebraic field extension of K and A is an algebraic algebra over L,
275+
then A is algebraic over K. -/
276+
theorem Algebra.isAlgebraic_trans (L_alg : IsAlgebraic K L) (A_alg : IsAlgebraic L A) :
277+
IsAlgebraic K A := by
278+
simp only [IsAlgebraic, isAlgebraic_iff_isIntegral] at L_alg A_alg ⊢
279+
exact isIntegral_trans L_alg A_alg
280+
#align algebra.is_algebraic_trans Algebra.isAlgebraic_trans
281+
282+
end CommRing
283+
284+
section Field
285+
286+
variable [Field K] [Field L]
287+
288+
variable [Algebra K L]
289+
290+
theorem Algebra.IsAlgebraic.algHom_bijective (ha : Algebra.IsAlgebraic K L) (f : L →ₐ[K] L) :
263291
Function.Bijective f := by
264292
refine' ⟨f.toRingHom.injective, fun b => _⟩
265293
obtain ⟨p, hp, he⟩ := ha b
@@ -271,15 +299,15 @@ theorem IsAlgebraic.algHom_bijective (ha : Algebra.IsAlgebraic K L) (f : L →
271299
exact ⟨a, Subtype.ext_iff.1 ha⟩
272300
#align algebra.is_algebraic.alg_hom_bijective Algebra.IsAlgebraic.algHom_bijective
273301

274-
theorem _root_.AlgHom.bijective [FiniteDimensional K L] (ϕ : L →ₐ[K] L) : Function.Bijective ϕ :=
302+
theorem AlgHom.bijective [FiniteDimensional K L] (ϕ : L →ₐ[K] L) : Function.Bijective ϕ :=
275303
(Algebra.isAlgebraic_of_finite K L).algHom_bijective ϕ
276304
#align alg_hom.bijective AlgHom.bijective
277305

278306
variable (K L)
279307

280308
/-- Bijection between algebra equivalences and algebra homomorphisms -/
281309
@[simps]
282-
noncomputable def IsAlgebraic.algEquivEquivAlgHom (ha : Algebra.IsAlgebraic K L) :
310+
noncomputable def Algebra.IsAlgebraic.algEquivEquivAlgHom (ha : Algebra.IsAlgebraic K L) :
283311
(L ≃ₐ[K] L) ≃* (L →ₐ[K] L) where
284312
toFun ϕ := ϕ.toAlgHom
285313
invFun ϕ := AlgEquiv.ofBijective ϕ (ha.algHom_bijective ϕ)
@@ -294,12 +322,14 @@ noncomputable def IsAlgebraic.algEquivEquivAlgHom (ha : Algebra.IsAlgebraic K L)
294322

295323
/-- Bijection between algebra equivalences and algebra homomorphisms -/
296324
@[reducible]
297-
noncomputable def _root_.algEquivEquivAlgHom [FiniteDimensional K L] :
325+
noncomputable def algEquivEquivAlgHom [FiniteDimensional K L] :
298326
(L ≃ₐ[K] L) ≃* (L →ₐ[K] L) :=
299327
(Algebra.isAlgebraic_of_finite K L).algEquivEquivAlgHom K L
300328
#align alg_equiv_equiv_alg_hom algEquivEquivAlgHom
301329

302-
end Algebra
330+
end Field
331+
332+
end
303333

304334
variable {R S : Type _} [CommRing R] [IsDomain R] [CommRing S]
305335

Mathlib/RingTheory/IntegralClosure.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,26 @@ end Ring
115115

116116
section
117117

118+
variable {K A : Type _}
119+
120+
variable [Field K] [Ring A] [Algebra K A] [FiniteDimensional K A]
121+
122+
variable (K)
123+
124+
theorem isIntegral_of_finite (e : A) : IsIntegral K e :=
125+
isIntegral_of_noetherian (IsNoetherian.iff_fg.2 inferInstance) _
126+
127+
variable (A)
128+
129+
/-- A field extension is integral if it is finite. -/
130+
theorem Algebra.isIntegral_of_finite : Algebra.IsIntegral K A := fun x =>
131+
isIntegral_of_submodule_noetherian ⊤ (IsNoetherian.iff_fg.2 inferInstance) x Algebra.mem_top
132+
#align algebra.is_integral_of_finite Algebra.isIntegral_of_finite
133+
134+
end
135+
136+
section
137+
118138
variable {R A B S : Type _}
119139

120140
variable [CommRing R] [CommRing A] [CommRing B] [CommRing S]

0 commit comments

Comments
 (0)