Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
78b6206
Update Basic.lean
Thmoas-Guan Aug 18, 2025
74b6e46
Merge branch 'master' into WithBot-ENat-lemmas
Thmoas-Guan Aug 18, 2025
0d9df37
define regular local ring
Thmoas-Guan Aug 19, 2025
58bfa3c
regular local ring is domain
Thmoas-Guan Aug 19, 2025
dbbc1d0
Update RegularLocalRing.lean
Thmoas-Guan Aug 19, 2025
cb08e01
Update RegularLocalRing.lean
Thmoas-Guan Aug 20, 2025
1409e55
rearrange lemmas
Thmoas-Guan Aug 20, 2025
f0eee47
fix lemma name
Thmoas-Guan Aug 20, 2025
df1e3df
Revert "Update Basic.lean"
Thmoas-Guan Aug 20, 2025
b63f40c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Aug 26, 2025
f525679
Move Regular Local ring into folder
Thmoas-Guan Aug 26, 2025
5bce000
fix lemma name
Thmoas-Guan Aug 26, 2025
64a6daf
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Sep 10, 2025
240a55d
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Sep 15, 2025
1c0b700
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Sep 20, 2025
b3bbcf7
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Sep 24, 2025
2b7d062
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Oct 3, 2025
39cda43
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Oct 11, 2025
6eaeeff
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Oct 13, 2025
48078f4
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Oct 29, 2025
9c9133f
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Nov 4, 2025
722d74c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Nov 12, 2025
5edab8a
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Nov 20, 2025
26a27a5
Update Mathlib.lean
Thmoas-Guan Nov 20, 2025
edeab4d
fix import
Thmoas-Guan Nov 20, 2025
3fca17c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Nov 27, 2025
b900b96
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Dec 4, 2025
11cffb8
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Dec 4, 2025
5ae2b50
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Dec 18, 2025
c220224
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Jan 5, 2026
e103dc9
move lemma and golf
Thmoas-Guan Jan 5, 2026
7868aeb
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Jan 6, 2026
6cbc6a6
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Jan 25, 2026
13ca00e
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Jan 28, 2026
d810ab7
golf
Thmoas-Guan Jan 28, 2026
7e3a308
golf
Thmoas-Guan Jan 28, 2026
88ebf95
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Feb 7, 2026
4f32eaa
add some lemma about spanRank
Thmoas-Guan Feb 15, 2026
6cf21b0
Update SpanRank.lean
Thmoas-Guan Feb 16, 2026
ca8bab0
move instance
Thmoas-Guan Feb 16, 2026
4547600
golf variable
Thmoas-Guan Feb 16, 2026
514f992
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Feb 16, 2026
60ce0cd
remove duplicated
Thmoas-Guan Feb 16, 2026
a22ad4c
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Feb 18, 2026
4c679e0
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Feb 18, 2026
7f4146c
fix
Thmoas-Guan Feb 18, 2026
c4e0ccd
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Feb 18, 2026
3b50eb9
add instance from field
Thmoas-Guan Feb 19, 2026
8311afc
add instance from DVR
Thmoas-Guan Feb 19, 2026
acd4141
golf
Thmoas-Guan Feb 20, 2026
6347803
golf
Thmoas-Guan Feb 20, 2026
d5141b3
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Feb 20, 2026
0c8ddc5
add span fin rank version lemma
Thmoas-Guan Feb 27, 2026
58ffb62
apply to maximalIdeal
Thmoas-Guan Feb 27, 2026
5d2512d
fix layout
Thmoas-Guan Feb 28, 2026
e2f91b2
add a version without fg
Thmoas-Guan Feb 28, 2026
2310be7
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Feb 28, 2026
80fcd13
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Mar 4, 2026
782bd75
Update Cotangent.lean
Thmoas-Guan Mar 5, 2026
1dc4e82
golf
Thmoas-Guan Mar 5, 2026
251a214
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 5, 2026
ab939df
fix
Thmoas-Guan Mar 5, 2026
d31c677
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Mar 6, 2026
fdd4742
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Mar 6, 2026
b12ab54
golf
Thmoas-Guan Mar 6, 2026
bd2a931
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 6, 2026
496f5a5
a temporary fix
Thmoas-Guan Mar 6, 2026
0691f4d
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 6, 2026
dd82339
fix
Thmoas-Guan Mar 6, 2026
c0cf3ae
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 6, 2026
54003cd
move decl
Thmoas-Guan Mar 13, 2026
ef5b60d
generalize universe
Thmoas-Guan Mar 13, 2026
c50145c
fix
Thmoas-Guan Mar 13, 2026
9076eeb
Update SpanRank.lean
Thmoas-Guan Mar 13, 2026
0d6b267
golf
Thmoas-Guan Mar 13, 2026
88a89b5
golf more
Thmoas-Guan Mar 13, 2026
f3b46bd
add base change version
Thmoas-Guan Mar 13, 2026
2e0beff
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Mar 14, 2026
ca5786a
fix variable
Thmoas-Guan Mar 15, 2026
cd54a09
fix naming and add spanFinrank version
Thmoas-Guan Mar 15, 2026
eea67d8
add lemma and golf
Thmoas-Guan Mar 15, 2026
6c59477
golf maximal ideal map
Thmoas-Guan Mar 16, 2026
435a579
remove lemma easy enough
Thmoas-Guan Mar 16, 2026
163291a
golf base change
Thmoas-Guan Mar 16, 2026
379c4ab
golf
Thmoas-Guan Mar 16, 2026
10bb149
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 16, 2026
0e42b01
fix
Thmoas-Guan Mar 16, 2026
ce937df
add simp attr
Thmoas-Guan Mar 18, 2026
201acfd
split file
Thmoas-Guan Mar 19, 2026
cd6c4d0
Update Mathlib.lean
Thmoas-Guan Mar 19, 2026
723f840
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 19, 2026
23bbe4e
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Mar 19, 2026
821e02e
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Mar 19, 2026
01211a7
move decl
Thmoas-Guan Mar 19, 2026
507efb1
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 19, 2026
6fc8258
fix import
Thmoas-Guan Mar 19, 2026
9236436
add doc
Thmoas-Guan Mar 19, 2026
3133352
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 19, 2026
46274e2
Merge branch 'master' into spanRank-lemma
Thmoas-Guan Mar 20, 2026
69c2bbd
add namespace
Thmoas-Guan Mar 20, 2026
0011ecf
fix doc
Thmoas-Guan Mar 20, 2026
bb90a75
restore open change
Thmoas-Guan Mar 20, 2026
f940521
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 20, 2026
fd3d647
fix doc
Thmoas-Guan Mar 20, 2026
19c1337
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan Mar 20, 2026
29fec98
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan Mar 21, 2026
3ddb6f3
fix naming
Thmoas-Guan Mar 21, 2026
a979108
refine def
Thmoas-Guan Mar 21, 2026
a5f4135
fix doc
Thmoas-Guan Mar 21, 2026
2410537
combine instances
Thmoas-Guan Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5642,6 +5642,7 @@ import Mathlib.RingTheory.Regular.Category
import Mathlib.RingTheory.Regular.Depth
import Mathlib.RingTheory.Regular.IsSMulRegular
import Mathlib.RingTheory.Regular.RegularSequence
import Mathlib.RingTheory.RegularLocalRing
import Mathlib.RingTheory.RingHom.Etale
import Mathlib.RingTheory.RingHom.FaithfullyFlat
import Mathlib.RingTheory.RingHom.Finite
Expand Down
117 changes: 117 additions & 0 deletions Mathlib/RingTheory/RegularLocalRing.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/-
Copyright (c) 2025 Nailin Guan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nailin Guan
-/
import Mathlib.RingTheory.Ideal.Cotangent
import Mathlib.RingTheory.Ideal.KrullsHeightTheorem
/-!
# Define Regular Local Ring

For a noetherian local ring `R`, we define `IsRegularLocalRing` as
`(maximalIdeal R).spanFinrank = ringKrullDim R`

# Main Definition and Results

* `IsRegularLocalRing` : A noetherian local ring of dimesnion `d` `IsRegularLocalRing` if
`(maximalIdeal R).spanFinrank = ringKrullDim R`,
i.e. its maximal ideal can be generated by `d` elements.

* `isRegularLocalRing_iff` : the equivalence of `IsRegularLocalRing` and
`Module.finrank (ResidueField R) (CotangentSpace R) = ringKrullDim R`

-/

open IsLocalRing

variable (R : Type*) [CommRing R]

/-- A noetherian local ring of dimesnion `d` is said to be regular if its maximal ideal
can be generated by `d` elements. -/
class IsRegularLocalRing : Prop extends IsLocalRing R, IsNoetherianRing R where
Comment thread
chrisflav marked this conversation as resolved.
Outdated
reg : (maximalIdeal R).spanFinrank = ringKrullDim R

lemma isRegularLocalRing_def [IsLocalRing R] [IsNoetherianRing R] :
IsRegularLocalRing R ↔ (maximalIdeal R).spanFinrank = ringKrullDim R :=
⟨fun ⟨h⟩ ↦ h, fun h ↦ ⟨h⟩⟩
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated

lemma ringKrullDim_le_spanFinrank_maximalIdeal [IsLocalRing R] [IsNoetherianRing R] :
ringKrullDim R ≤ (maximalIdeal R).spanFinrank :=
le_of_eq_of_le IsLocalRing.maximalIdeal_height_eq_ringKrullDim.symm
(WithBot.coe_le_coe.mpr (Ideal.height_le_spanFinrank (maximalIdeal R) Ideal.IsPrime.ne_top'))
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated

namespace IsRegularLocalRing

lemma of_span_eq [IsLocalRing R] [IsNoetherianRing R] (S : Set R) (fin : S.Finite)
(span : Ideal.span S = maximalIdeal R) (card : S.ncard ≤ ringKrullDim R) :
IsRegularLocalRing R := by
apply (isRegularLocalRing_def _).mpr (le_antisymm _ (ringKrullDim_le_spanFinrank_maximalIdeal R))
apply le_trans _ card
rw [← span, ← Ideal.submodule_span_eq]
simpa using Submodule.spanFinrank_span_le_ncard_of_finite fin

variable {R} in
lemma of_ringEquiv [IsRegularLocalRing R] {R' : Type*} [CommRing R']
(e : R ≃+* R') : IsRegularLocalRing R' := by
let _ := e.isLocalRing
let _ := isNoetherianRing_of_ringEquiv R e
have fg : (maximalIdeal R).FG := (isNoetherianRing_iff_ideal_fg R).mp inferInstance _
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated
apply of_span_eq R' (e '' (maximalIdeal R).generators)
((Submodule.FG.finite_generators fg).image _)
· simp only [← Ideal.map_span]
rw [← Ideal.submodule_span_eq, Submodule.span_generators (maximalIdeal R), ← Ideal.comap_symm]
exact ((local_hom_TFAE e.symm.toRingHom).out 0 4).mp (e.symm.surjective.isLocalHom _)
· simpa [← ringKrullDim_eq_of_ringEquiv e, ← IsRegularLocalRing.reg,
← Submodule.FG.generators_ncard fg] using
Set.ncard_image_le (Submodule.FG.finite_generators fg)

end IsRegularLocalRing

lemma span_eq_top_iff [IsLocalRing R] (S : Set (maximalIdeal R)) :
Submodule.span R S = ⊤ ↔ Submodule.span R ((Submodule.subtype (maximalIdeal R)) '' S) =
maximalIdeal R := by
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated
rw [← Submodule.map_span]
refine ⟨fun h ↦ by simp [h], fun h ↦ ?_⟩
rw [← Submodule.comap_map_eq_of_injective (maximalIdeal R).injective_subtype
(Submodule.span R S), h, Submodule.comap_subtype_self]

open Set in
lemma spanFinrank_maximalIdeal [IsLocalRing R] [IsNoetherianRing R] :
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated
(maximalIdeal R).spanFinrank = Module.finrank (ResidueField R) (CotangentSpace R) := by
let fg : Module.Finite (ResidueField R) (CotangentSpace R) := inferInstance
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated
let fg' : (maximalIdeal R).FG := (isNoetherianRing_iff_ideal_fg R).mp inferInstance _
have : Submodule.spanFinrank (⊤ : Submodule (ResidueField R) (CotangentSpace R)) =
Module.rank (ResidueField R) (CotangentSpace R) := by
rw [← Submodule.fg_iff_spanRank_eq_spanFinrank.mpr fg.1, Submodule.rank_eq_spanRank_of_free]
simp only [← Module.finrank_eq_rank, Nat.cast_inj] at this
rw [← this]
apply le_antisymm
· have span : Submodule.span R
((⊤ : Submodule (ResidueField R) (CotangentSpace R)).generators.image Quotient.out) = ⊤ := by
apply IsLocalRing.CotangentSpace.span_image_eq_top_iff.mp
convert Submodule.span_generators (⊤ : Submodule (ResidueField R) (CotangentSpace R))
have : ⇑(maximalIdeal R).toCotangent ∘ Quotient.out = id := by
ext
exact Submodule.Quotient.mk_out _
rw [← Set.image_comp, this, image_id]
rw [span_eq_top_iff, ← Set.image_comp] at span
rw [← Submodule.FG.generators_ncard fg.1, ← congrArg Submodule.spanFinrank span]
apply le_trans (Submodule.spanFinrank_span_le_ncard_of_finite
(Finite.image _ fg.1.finite_generators)) (Set.ncard_image_le fg.1.finite_generators)
· let G := ({x | ↑x ∈ (maximalIdeal R).generators} : Set (maximalIdeal R))
have : Submodule.span R G = ⊤ := by
simp only [span_eq_top_iff, Submodule.subtype_apply, Ideal.submodule_span_eq, G]
convert (maximalIdeal R).span_generators
ext
simpa using fun a ↦ Submodule.FG.generators_mem (maximalIdeal R) a
have fin : G.Finite := Set.Finite.of_injOn (by simp [MapsTo, G]) injOn_subtype_val
(Submodule.FG.finite_generators fg')
rw [← IsLocalRing.CotangentSpace.span_image_eq_top_iff.mpr this,
← Submodule.FG.generators_ncard fg']
apply le_trans (Submodule.spanFinrank_span_le_ncard_of_finite (Finite.image _ fin))
exact le_trans (Set.ncard_image_le fin) (Set.ncard_le_ncard_of_injOn Subtype.val (by simp [G])
injOn_subtype_val (Submodule.FG.finite_generators fg'))

lemma isRegularLocalRing_iff [IsLocalRing R] [IsNoetherianRing R] :
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated
IsRegularLocalRing R ↔ Module.finrank (ResidueField R) (CotangentSpace R) = ringKrullDim R := by
rw [isRegularLocalRing_def, spanFinrank_maximalIdeal]
Comment thread
Thmoas-Guan marked this conversation as resolved.
Outdated