-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Merged by Bors] - feat(RingTheory): definition of regular local ring #28682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Thmoas-Guan
wants to merge
110
commits into
leanprover-community:master
from
Thmoas-Guan:Regular-Local-Ring-Def
Closed
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 74b6e46
Merge branch 'master' into WithBot-ENat-lemmas
Thmoas-Guan 0d9df37
define regular local ring
Thmoas-Guan 58bfa3c
regular local ring is domain
Thmoas-Guan dbbc1d0
Update RegularLocalRing.lean
Thmoas-Guan cb08e01
Update RegularLocalRing.lean
Thmoas-Guan 1409e55
rearrange lemmas
Thmoas-Guan f0eee47
fix lemma name
Thmoas-Guan df1e3df
Revert "Update Basic.lean"
Thmoas-Guan b63f40c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan f525679
Move Regular Local ring into folder
Thmoas-Guan 5bce000
fix lemma name
Thmoas-Guan 64a6daf
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 240a55d
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 1c0b700
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan b3bbcf7
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 2b7d062
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 39cda43
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 6eaeeff
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 48078f4
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 9c9133f
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 722d74c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 5edab8a
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 26a27a5
Update Mathlib.lean
Thmoas-Guan edeab4d
fix import
Thmoas-Guan 3fca17c
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan b900b96
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 11cffb8
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 5ae2b50
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan c220224
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan e103dc9
move lemma and golf
Thmoas-Guan 7868aeb
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 6cbc6a6
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 13ca00e
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan d810ab7
golf
Thmoas-Guan 7e3a308
golf
Thmoas-Guan 88ebf95
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 4f32eaa
add some lemma about spanRank
Thmoas-Guan 6cf21b0
Update SpanRank.lean
Thmoas-Guan ca8bab0
move instance
Thmoas-Guan 4547600
golf variable
Thmoas-Guan 514f992
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 60ce0cd
remove duplicated
Thmoas-Guan a22ad4c
Merge branch 'master' into spanRank-lemma
Thmoas-Guan 4c679e0
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 7f4146c
fix
Thmoas-Guan c4e0ccd
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 3b50eb9
add instance from field
Thmoas-Guan 8311afc
add instance from DVR
Thmoas-Guan acd4141
golf
Thmoas-Guan 6347803
golf
Thmoas-Guan d5141b3
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 0c8ddc5
add span fin rank version lemma
Thmoas-Guan 58ffb62
apply to maximalIdeal
Thmoas-Guan 5d2512d
fix layout
Thmoas-Guan e2f91b2
add a version without fg
Thmoas-Guan 2310be7
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 80fcd13
Merge branch 'master' into spanRank-lemma
Thmoas-Guan 782bd75
Update Cotangent.lean
Thmoas-Guan 1dc4e82
golf
Thmoas-Guan 251a214
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan ab939df
fix
Thmoas-Guan d31c677
Merge branch 'master' into spanRank-lemma
Thmoas-Guan fdd4742
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan b12ab54
golf
Thmoas-Guan bd2a931
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 496f5a5
a temporary fix
Thmoas-Guan 0691f4d
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan dd82339
fix
Thmoas-Guan c0cf3ae
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 54003cd
move decl
Thmoas-Guan ef5b60d
generalize universe
Thmoas-Guan c50145c
fix
Thmoas-Guan 9076eeb
Update SpanRank.lean
Thmoas-Guan 0d6b267
golf
Thmoas-Guan 88a89b5
golf more
Thmoas-Guan f3b46bd
add base change version
Thmoas-Guan 2e0beff
Merge branch 'master' into spanRank-lemma
Thmoas-Guan ca5786a
fix variable
Thmoas-Guan cd54a09
fix naming and add spanFinrank version
Thmoas-Guan eea67d8
add lemma and golf
Thmoas-Guan 6c59477
golf maximal ideal map
Thmoas-Guan 435a579
remove lemma easy enough
Thmoas-Guan 163291a
golf base change
Thmoas-Guan 379c4ab
golf
Thmoas-Guan 10bb149
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 0e42b01
fix
Thmoas-Guan ce937df
add simp attr
Thmoas-Guan 201acfd
split file
Thmoas-Guan cd6c4d0
Update Mathlib.lean
Thmoas-Guan 723f840
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 23bbe4e
Merge branch 'master' into spanRank-lemma
Thmoas-Guan 821e02e
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 01211a7
move decl
Thmoas-Guan 507efb1
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 6fc8258
fix import
Thmoas-Guan 9236436
add doc
Thmoas-Guan 3133352
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 46274e2
Merge branch 'master' into spanRank-lemma
Thmoas-Guan 69c2bbd
add namespace
Thmoas-Guan 0011ecf
fix doc
Thmoas-Guan bb90a75
restore open change
Thmoas-Guan f940521
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan fd3d647
fix doc
Thmoas-Guan 19c1337
Merge branch 'spanRank-lemma' into Regular-Local-Ring-Def
Thmoas-Guan 29fec98
Merge branch 'master' into Regular-Local-Ring-Def
Thmoas-Guan 3ddb6f3
fix naming
Thmoas-Guan a979108
refine def
Thmoas-Guan a5f4135
fix doc
Thmoas-Guan 2410537
combine instances
Thmoas-Guan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| 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⟩⟩ | ||
|
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')) | ||
|
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 _ | ||
|
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 | ||
|
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] : | ||
|
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 | ||
|
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] : | ||
|
Thmoas-Guan marked this conversation as resolved.
Outdated
|
||
| IsRegularLocalRing R ↔ Module.finrank (ResidueField R) (CotangentSpace R) = ringKrullDim R := by | ||
| rw [isRegularLocalRing_def, spanFinrank_maximalIdeal] | ||
|
Thmoas-Guan marked this conversation as resolved.
Outdated
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.