11/-
22Copyright (c) 2025 Jingting Wang. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
4- Authors: Jingting Wang
4+ Authors: Jingting Wang, Sihan Su, Yi Song, Christian Merten
55-/
66module
77
88public import Mathlib.Algebra.Polynomial.FieldDivision
99public import Mathlib.RingTheory.KrullDimension.PID
1010public import Mathlib.RingTheory.LocalRing.ResidueField.Fiber
11+ public import Mathlib.RingTheory.Ideal.KrullsHeightTheorem
12+ public import Mathlib.RingTheory.KrullDimension.NonZeroDivisors
1113
1214/-!
1315# Krull dimension of polynomial ring
1416
15- This file proves properties of the krull dimension of the polynomial ring over a commutative ring
17+ This file proves properties of the Krull dimension of the polynomial ring over a commutative ring
1618
1719## Main results
1820
19- * `Polynomial.ringKrullDim_le`: the krull dimension of the polynomial ring over a commutative ring
21+ * `Polynomial.ringKrullDim_le`: the Krull dimension of the polynomial ring over a commutative ring
2022 `R` is less than `2 * (ringKrullDim R) + 1`.
23+ For noetherian rings:
24+ * `Polynomial.ringKrullDim_of_isNoetherianRing`: the Krull dimension of `R[X]` is `dim R + 1`.
25+ * `MvPolynomial.ringKrullDim_of_isNoetherianRing`: the Krull dimension of `R[X₁, ..., Xₙ]` is
26+ `dim R + n`.
2127 -/
2228
2329public section
@@ -32,3 +38,92 @@ theorem Polynomial.ringKrullDim_le {R : Type*} [CommRing R] :
3238 ← ringKrullDim_eq_of_ringEquiv (polyEquivTensor R (p.asIdeal.ResidueField)).toRingEquiv,
3339 ← Ring.krullDimLE_iff]
3440 infer_instance
41+
42+ variable {R : Type *} [CommRing R] [IsNoetherianRing R]
43+
44+ namespace Polynomial
45+
46+ open Ideal IsLocalization
47+
48+ /--
49+ Let `p` be a maximal ideal of `A`. If `P` is a maximal ideal of `A[X]` lying above `p`,
50+ then `ht(P) = ht(p) + 1`.
51+ See `Polynomial.height_eq_height_add_one` for the more general version that does not assume `p` is
52+ maximal.
53+ -/
54+ private lemma height_eq_height_add_one_of_isMaximal (p : Ideal R) [p.IsMaximal] (P : Ideal R[X])
55+ [P.IsMaximal] [P.LiesOver p] : P.height = p.height + 1 := by
56+ let _ : Field (R ⧸ p) := Quotient.field p
57+ suffices h : (P.map (Ideal.Quotient.mk (Ideal.map (algebraMap R R[X]) p))).height = 1 by
58+ rw [height_eq_height_add_of_liesOver_of_hasGoingDown p, h]
59+ let e : (R[X] ⧸ (p.map C)) ≃+* (R ⧸ p)[X] := (polynomialQuotientEquivQuotientPolynomial p).symm
60+ let P' : Ideal (R ⧸ p)[X] := Ideal.map e <| P.map (Ideal.Quotient.mk <| p.map (algebraMap R R[X]))
61+ have : (P.map (Ideal.Quotient.mk <| p.map (algebraMap R R[X]))).IsMaximal := by
62+ refine .map_of_surjective_of_ker_le Quotient.mk_surjective ?_
63+ rw [mk_ker, LiesOver.over (P := P) (p := p)]
64+ exact map_comap_le
65+ have : P'.IsMaximal := map_isMaximal_of_equiv e
66+ have : P'.height = 1 := IsPrincipalIdealRing.height_eq_one_of_isMaximal P' polynomial_not_isField
67+ rwa [← e.height_map <| P.map (Ideal.Quotient.mk <| p.map (algebraMap R R[X]))]
68+
69+ /-- Let `p` be a maximal ideal of `R`. Then the height of `p[X]` equals the height of `p`. -/
70+ lemma height_map_C (p : Ideal R) [p.IsMaximal] : (p.map C).height = p.height := by
71+ have : (p.map C).LiesOver p := ⟨IsMaximal.eq_of_le inferInstance IsPrime.ne_top' le_comap_map⟩
72+ simp [height_eq_height_add_of_liesOver_of_hasGoingDown p]
73+
74+ attribute [local instance ] Polynomial.algebra Polynomial.isLocalization in
75+ /-- Let `p` be a prime ideal of `R`. If `P` is a maximal ideal of `R[X]` lying over `p`,
76+ `ht(P) = ht(p) + 1`. -/
77+ lemma height_eq_height_add_one (p : Ideal R)
78+ (P : Ideal R[X]) [P.IsMaximal] [P.LiesOver p] :
79+ P.height = p.height + 1 := by
80+ have : p.IsPrime := by rw [P.over_def p]; infer_instance
81+ let Rₚ := Localization.AtPrime p
82+ set p' : Ideal Rₚ := p.map (algebraMap R Rₚ) with p'_def
83+ have : p'.IsMaximal := by
84+ rw [p'_def, Localization.AtPrime.map_eq_maximalIdeal]
85+ exact IsLocalRing.maximalIdeal.isMaximal Rₚ
86+ let P' : Ideal Rₚ[X] := P.map (algebraMap R[X] Rₚ[X])
87+ have disj : Disjoint (p.primeCompl.map C : Set R[X]) P := by
88+ refine Set.disjoint_left.mpr fun a ⟨b, hb⟩ ha ↦ hb.1 ?_
89+ rwa [SetLike.mem_coe, LiesOver.over (P := P) (p := p), mem_comap, algebraMap_eq, hb.2 ]
90+ have eq := comap_map_of_isPrime_disjoint _ Rₚ[X] P ‹P.IsMaximal›.isPrime disj
91+ have : (comap (algebraMap R[X] Rₚ[X]) P').IsMaximal := eq.symm ▸ ‹P.IsMaximal›
92+ have : P'.IsMaximal := .of_isLocalization_of_disjoint (p.primeCompl.map C)
93+ have : P'.LiesOver p' := liesOver_of_isPrime_of_disjoint p.primeCompl _ _ disj
94+ have eq1 : p.height = p'.height := by
95+ rw [height_map_of_disjoint p.primeCompl]
96+ exact Disjoint.symm <| Set.disjoint_left.mpr fun _ a b ↦ b a
97+ have eq2 : P.height = P'.height := by
98+ rw [height_map_of_disjoint (Submonoid.map C <| p.primeCompl) _ disj]
99+ rw [eq1, eq2]
100+ apply height_eq_height_add_one_of_isMaximal p' P'
101+
102+ /-- If `R` is Noetherian, `dim R[X] = dim R + 1`. -/
103+ @[simp]
104+ lemma ringKrullDim_of_isNoetherianRing : ringKrullDim R[X] = ringKrullDim R + 1 := by
105+ refine le_antisymm ?_ ?_
106+ · nontriviality R[X]
107+ refine (ringKrullDim_le_iff_isMaximal_height_le (ringKrullDim R + 1 )).mpr fun M hM ↦ ?_
108+ rw [height_eq_height_add_one (M.under R) M, WithBot.coe_add, WithBot.coe_one]
109+ gcongr
110+ exact Ideal.height_le_ringKrullDim_of_ne_top Ideal.IsPrime.ne_top'
111+ · exact ringKrullDim_succ_le_ringKrullDim_polynomial
112+
113+ end Polynomial
114+
115+ /-- If `R` is Noetherian, `dim R[X₁, ..., Xₙ] = dim R + n`. -/
116+ @[simp]
117+ lemma MvPolynomial.ringKrullDim_of_isNoetherianRing {ι : Type *} [Finite ι] :
118+ ringKrullDim (MvPolynomial ι R) = ringKrullDim R + Nat.card ι := by
119+ induction ι using Finite.induction_empty_option with
120+ | of_equiv e H =>
121+ convert ← H using 1
122+ · exact ringKrullDim_eq_of_ringEquiv (renameEquiv _ e).toRingEquiv
123+ · rw [Nat.card_congr e]
124+ | h_empty => simp
125+ | h_option IH =>
126+ simp only [Nat.card_eq_fintype_card, Fintype.card_option, Nat.cast_add, Nat.cast_one,
127+ ← add_assoc] at IH ⊢
128+ rw [ringKrullDim_eq_of_ringEquiv (MvPolynomial.optionEquivLeft _ _).toRingEquiv,
129+ Polynomial.ringKrullDim_of_isNoetherianRing, IH]
0 commit comments