|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Nailin Guan. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Nailin Guan |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.Algebra.Module.SpanRankOperations |
| 9 | +public import Mathlib.RingTheory.DiscreteValuationRing.Basic |
| 10 | +public import Mathlib.RingTheory.Ideal.KrullsHeightTheorem |
| 11 | +public import Mathlib.RingTheory.KrullDimension.Field |
| 12 | +public import Mathlib.RingTheory.KrullDimension.PID |
| 13 | + |
| 14 | +/-! |
| 15 | +# Regular local rings |
| 16 | +
|
| 17 | +For a Noetherian local ring `R`, we define `IsRegularLocalRing` as |
| 18 | +`(maximalIdeal R).spanFinrank = ringKrullDim R`. This definition is equivalent to |
| 19 | +the dimension of the cotangent space over the residue field being equal to `ringKrullDim R`, |
| 20 | +(see `IsRegularLocalRing.iff_finrank_cotangentSpace`). |
| 21 | +
|
| 22 | +# Main Definition and Results |
| 23 | +
|
| 24 | +* `IsRegularLocalRing` : A Noetherian local ring is regular if |
| 25 | + `(maximalIdeal R).spanFinrank = ringKrullDim R`, |
| 26 | + i.e. its maximal ideal can be generated by `dim R` elements. |
| 27 | +
|
| 28 | +* `IsRegularLocalRing.iff_finrank_cotangentSpace` : the equivalence of `IsRegularLocalRing` and |
| 29 | + `Module.finrank (ResidueField R) (CotangentSpace R) = ringKrullDim R` |
| 30 | +
|
| 31 | +-/ |
| 32 | + |
| 33 | +@[expose] public section |
| 34 | + |
| 35 | +open IsLocalRing |
| 36 | + |
| 37 | +/-- A Noetherian local ring is said to be regular if its maximal ideal |
| 38 | +can be generated by `dim R` elements. -/ |
| 39 | +@[stacks 00KU] |
| 40 | +class IsRegularLocalRing (R : Type*) [CommRing R] : Prop extends |
| 41 | + IsLocalRing R, IsNoetherianRing R where |
| 42 | + spanFinrank_maximalIdeal : (maximalIdeal R).spanFinrank = ringKrullDim R |
| 43 | + |
| 44 | +variable (R : Type*) [CommRing R] |
| 45 | + |
| 46 | +lemma isRegularLocalRing_iff [IsLocalRing R] [IsNoetherianRing R] : |
| 47 | + IsRegularLocalRing R ↔ (maximalIdeal R).spanFinrank = ringKrullDim R := |
| 48 | + ⟨fun ⟨h⟩ ↦ h, fun h ↦ ⟨h⟩⟩ |
| 49 | + |
| 50 | +namespace IsRegularLocalRing |
| 51 | + |
| 52 | +lemma of_spanFinrank_maximalIdeal_le [IsLocalRing R] [IsNoetherianRing R] |
| 53 | + (le : (maximalIdeal R).spanFinrank ≤ ringKrullDim R) : IsRegularLocalRing R := |
| 54 | + (isRegularLocalRing_iff _).mpr (le_antisymm le (ringKrullDim_le_spanFinrank_maximalIdeal R)) |
| 55 | + |
| 56 | +variable {R} in |
| 57 | +lemma of_ringEquiv [IsRegularLocalRing R] {R' : Type*} [CommRing R'] |
| 58 | + (e : R ≃+* R') : IsRegularLocalRing R' := by |
| 59 | + have := e.isLocalRing |
| 60 | + have := isNoetherianRing_of_ringEquiv R e |
| 61 | + rwa [isRegularLocalRing_iff, ← ringKrullDim_eq_of_ringEquiv e, ← map_ringEquiv_maximalIdeal e, |
| 62 | + Ideal.spanFinrank_map_eq_of_ringEquiv, ← isRegularLocalRing_iff] |
| 63 | + |
| 64 | +lemma iff_finrank_cotangentSpace [IsLocalRing R] [IsNoetherianRing R] : |
| 65 | + IsRegularLocalRing R ↔ Module.finrank (ResidueField R) (CotangentSpace R) = ringKrullDim R := by |
| 66 | + rw [isRegularLocalRing_iff, spanFinrank_maximalIdeal_eq_finrank_cotangentSpace] |
| 67 | + |
| 68 | +set_option backward.isDefEq.respectTransparency false in |
| 69 | +instance [IsLocalRing R] [IsDomain R] [IsPrincipalIdealRing R] : IsRegularLocalRing R := by |
| 70 | + by_cases isf : IsField R |
| 71 | + · let _ := isf.toField |
| 72 | + simp [isRegularLocalRing_iff, maximalIdeal_eq_bot] |
| 73 | + · apply of_spanFinrank_maximalIdeal_le |
| 74 | + rcases IsPrincipalIdealRing.principal (maximalIdeal R) with ⟨x, hx⟩ |
| 75 | + simpa only [(IsPrincipalIdealRing.ringKrullDim_eq_one R) isf, |
| 76 | + Nat.cast_le_one, ← Set.ncard_singleton x, hx] using |
| 77 | + Submodule.spanFinrank_span_le_ncard_of_finite (Set.finite_singleton x) |
| 78 | + |
| 79 | +end IsRegularLocalRing |
0 commit comments