AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163
1 module 2 public import Mathlib.RingTheory.FiniteLength 3 public import Mathlib.Algebra.Module.Torsion.Basic 4 public import Mathlib.RingTheory.Finiteness.Ideal 5 public import Mathlib.RingTheory.Ideal.MinimalPrime.Localization 6 public import Mathlib.RingTheory.Localization.Finiteness 7 public import Mathlib.RingTheory.Noetherian.Basic 8 public import Mathlib.RingTheory.Support 9 10 @[expose] public section 11 12 /-! 13 # Finite length at a minimal prime of a finite module 14 15 This file isolates the commutative-algebra localization statement used later: 16 if `P` is minimal over the annihilator of a finite module, then localization at 17 `P` is nonzero and has finite length. 18 -/ 19 20 namespace AlgebraicAnalysis.MinimalPrimeFiniteLengthLocalization 21 22 noncomputable section 23 24 open scoped Pointwise 25 26 variable {A M : Type*} [CommRing A] [AddCommGroup M] [Module A M] 27 28 /-- A finite module over a Noetherian local ring has finite length as soon as 29 a power of the maximal ideal annihilates it. -/ 30 theorem finiteLength_of_maximalIdeal_pow_smul_eq_bot 31 [IsLocalRing A] [IsNoetherianRing A] [Module.Finite A M] 32 {n : ℕ} 33 (hpow : (IsLocalRing.maximalIdeal A ^ n) • (⊤ : Submodule A M) = ⊥) : 34 IsFiniteLength A M := by 35 induction n generalizing M with 36 | zero => 37 have htop : (⊤ : Submodule A M) = ⊥ := by simpa using hpow 38 have : Subsingleton M := 39 ⟨fun x y ↦ by 40 have hx : x = 0 := by 41 have : x ∈ (⊥ : Submodule A M) := by rw [← htop]; trivial 42 simpa using this 43 have hy : y = 0 := by 44 have : y ∈ (⊥ : Submodule A M) := by rw [← htop]; trivial 45 simpa using this 46 exact hx.trans hy.symm⟩ 47 exact .of_subsingleton 48 | succ n ih => 49 let m : Ideal A := IsLocalRing.maximalIdeal A 50 let N : Submodule A M := m • (⊤ : Submodule A M) 51 have hNpow : (m ^ n) • (⊤ : Submodule A N) = ⊥ := by 52 rw [Submodule.eq_bot_iff] 53 intro x hx 54 apply Subtype.ext 55 change (x : M) = 0 56 have hx' : (x : M) ∈ (m ^ n) • N := 57 (Submodule.mem_smul_top_iff (I := m ^ n) N x).mp hx 58 have hxbot : (x : M) ∈ (⊥ : Submodule A M) := by 59 rw [← hpow, show IsLocalRing.maximalIdeal A = m from rfl, 60 pow_succ, mul_smul] 61 exact hx' 62 simpa using hxbot 63 have hNfinite : IsFiniteLength A N := ih hNpow 64 let hQtor : Module.IsTorsionBySet A (M ⧸ N) m := by 65 simpa only [N] using Module.isTorsionBySet_quotient_ideal_smul M m 66 let : m.IsMaximal := by dsimp [m]; infer_instance 67 let : Module (A ⧸ m) (M ⧸ N) := hQtor.module 68 let : IsScalarTower A (A ⧸ m) (M ⧸ N) := hQtor.isScalarTower 69 let : Field (A ⧸ m) := Ideal.Quotient.field m 70 have : Module.Finite A (M ⧸ N) := Module.Finite.quotient A N 71 have : Module.Finite (A ⧸ m) (M ⧸ N) := 72 Module.Finite.of_restrictScalars_finite A (A ⧸ m) (M ⧸ N) 73 have hQartinianQuot : IsArtinian (A ⧸ m) (M ⧸ N) := inferInstance 74 have hQartinian : IsArtinian A (M ⧸ N) := by 75 let e : Submodule (A ⧸ m) (M ⧸ N) ≃o Submodule A (M ⧸ N) := 76 { Submodule.restrictScalarsEmbedding A (A ⧸ m) (M ⧸ N) with 77 invFun := fun p ↦ 78 { carrier := p 79 add_mem' := p.add_mem 80 zero_mem' := p.zero_mem 81 smul_mem' := by 82 rintro ⟨a⟩ x hx 83 exact p.smul_mem a hx } 84 left_inv := by intro p; ext; rfl 85 right_inv := by intro p; ext; rfl } 86 exact e.symm.strictMono.wellFoundedLT 87 rw [isFiniteLength_iff_isNoetherian_isArtinian] 88 exact ⟨inferInstance, 89 (isArtinian_iff_submodule_quotient N).mpr 90 ⟨(isFiniteLength_iff_isNoetherian_isArtinian.mp hNfinite).2, hQartinian⟩⟩ 91 92 variable {R G : Type*} [CommRing R] 93 [AddCommGroup G] [Module R G] 94 95 /-- Localization preserves finite generation for the canonical localized 96 module. -/ 97 theorem localizedModule_finite [Module.Finite R G] 98 (P : Ideal R) [P.IsPrime] : 99 Module.Finite (Localization P.primeCompl) 100 (LocalizedModule P.primeCompl G) := by 101 exact Module.Finite.of_isLocalizedModule P.primeCompl 102 (LocalizedModule.mkLinearMap P.primeCompl G) 103 104 /-- A minimal prime over the annihilator belongs to the support, so the 105 corresponding localization is nonzero. -/ 106 theorem localizedModule_nontrivial 107 [Module.Finite R G] (P : Ideal R) [P.IsPrime] 108 (hP : P ∈ (Module.annihilator R G).minimalPrimes) : 109 Nontrivial (LocalizedModule P.primeCompl G) := by 110 let p : PrimeSpectrum R := ⟨P, inferInstance⟩ 111 have hp : p ∈ Module.support R G := 112 Module.mem_support_iff_of_finite.mpr hP.1.2 113 simpa [p] using (Module.mem_support_iff.mp hp) 114 115 /-- At a minimal prime over the module annihilator, the localized maximal 116 ideal lies in the radical of the mapped annihilator. -/ 117 theorem maximalIdeal_le_radical_map_annihilator 118 (P : Ideal R) [P.IsPrime] 119 (hP : P ∈ (Module.annihilator R G).minimalPrimes) : 120 IsLocalRing.maximalIdeal (Localization P.primeCompl) ≤ 121 (Ideal.map (algebraMap R (Localization P.primeCompl)) 122 (Module.annihilator R G)).radical := by 123 rw [← Localization.AtPrime.map_eq_maximalIdeal] 124 rw [Ideal.radical_eq_sInf, le_sInf_iff] 125 rintro q ⟨hmap, hqprime⟩ 126 obtain ⟨hcomapPrime, hcomapLe⟩ := 127 ((IsLocalization.AtPrime.orderIsoOfPrime 128 (Localization P.primeCompl) P) ⟨q, hqprime⟩).2 129 rw [Ideal.map_le_iff_le_comap] at hmap ⊢ 130 exact hP.2 ⟨hcomapPrime, hmap⟩ hcomapLe 131 132 /-- Mapping the original annihilator into the localization gives elements 133 that annihilate every localized fraction. -/ 134 theorem map_annihilator_le_localized_annihilator 135 (P : Ideal R) [P.IsPrime] : 136 Ideal.map (algebraMap R (Localization P.primeCompl)) 137 (Module.annihilator R G) ≤ 138 Module.annihilator (Localization P.primeCompl) 139 (LocalizedModule P.primeCompl G) := by 140 rw [Ideal.map_le_iff_le_comap] 141 intro r hr 142 rw [Ideal.mem_comap, Module.mem_annihilator] 143 intro z 144 induction z using LocalizedModule.induction_on with 145 | _ g s => 146 change Localization.mk r (1 : P.primeCompl) • 147 LocalizedModule.mk g s = 0 148 rw [LocalizedModule.mk_smul_mk] 149 have hrg : r • g = 0 := Module.mem_annihilator.mp hr g 150 rw [hrg, LocalizedModule.zero_mk] 151 152 /-- A power of the localized maximal ideal annihilates the localized finite 153 module. -/ 154 @[nolint unusedArguments] 155 theorem exists_maximalIdeal_pow_le_localized_annihilator 156 [IsNoetherianRing R] [Module.Finite R G] 157 (P : Ideal R) [P.IsPrime] 158 (hP : P ∈ (Module.annihilator R G).minimalPrimes) : 159 ∃ n : ℕ, IsLocalRing.maximalIdeal (Localization P.primeCompl) ^ n ≤ 160 Module.annihilator (Localization P.primeCompl) 161 (LocalizedModule P.primeCompl G) := by 162 let A := Localization P.primeCompl 163 have : IsNoetherianRing A := 164 IsLocalization.isNoetherianRing P.primeCompl A inferInstance 165 have hrad : IsLocalRing.maximalIdeal A ≤ 166 (Module.annihilator A (LocalizedModule P.primeCompl G)).radical := 167 (maximalIdeal_le_radical_map_annihilator P hP).trans 168 (Ideal.radical_mono (map_annihilator_le_localized_annihilator P)) 169 exact Ideal.exists_pow_le_of_le_radical_of_fg hrad 170 (Module.Finite.iff_fg.mp (inferInstance : 171 Module.Finite A (IsLocalRing.maximalIdeal A))) 172 173 /-- The localized module at a minimal prime over its annihilator has finite 174 length over the local ring. -/ 175 theorem localizedModule_isFiniteLength 176 [IsNoetherianRing R] [Module.Finite R G] 177 (P : Ideal R) [P.IsPrime] 178 (hP : P ∈ (Module.annihilator R G).minimalPrimes) : 179 IsFiniteLength (Localization P.primeCompl) 180 (LocalizedModule P.primeCompl G) := by 181 let A := Localization P.primeCompl 182 have : IsNoetherianRing A := 183 IsLocalization.isNoetherianRing P.primeCompl A inferInstance 184 have : Module.Finite A (LocalizedModule P.primeCompl G) := 185 localizedModule_finite P 186 obtain ⟨n, hn⟩ := exists_maximalIdeal_pow_le_localized_annihilator P hP 187 have hann : Module.annihilator A (LocalizedModule P.primeCompl G) • 188 (⊤ : Submodule A (LocalizedModule P.primeCompl G)) = ⊥ := by 189 rw [← Submodule.annihilator_top] 190 exact Submodule.annihilator_smul 191 (⊤ : Submodule A (LocalizedModule P.primeCompl G)) 192 apply finiteLength_of_maximalIdeal_pow_smul_eq_bot (n := n) 193 apply le_antisymm 194 · calc 195 IsLocalRing.maximalIdeal A ^ n • 196 (⊤ : Submodule A (LocalizedModule P.primeCompl G)) 197 ≤ Module.annihilator A (LocalizedModule P.primeCompl G) • 198 (⊤ : Submodule A (LocalizedModule P.primeCompl G)) := 199 Submodule.smul_mono hn le_rfl 200 _ = ⊥ := hann 201 · exact bot_le 202 203 /-- The load-bearing package: localization at a minimal prime over the 204 annihilator is simultaneously nonzero and of finite length. -/ 205 theorem localizedModule_nontrivial_and_isFiniteLength 206 [IsNoetherianRing R] [Module.Finite R G] 207 (P : Ideal R) [P.IsPrime] 208 (hP : P ∈ (Module.annihilator R G).minimalPrimes) : 209 Nontrivial (LocalizedModule P.primeCompl G) ∧ 210 IsFiniteLength (Localization P.primeCompl) 211 (LocalizedModule P.primeCompl G) := 212 ⟨localizedModule_nontrivial P hP, localizedModule_isFiniteLength P hP⟩ 213 214 #print axioms finiteLength_of_maximalIdeal_pow_smul_eq_bot 215 #print axioms maximalIdeal_le_radical_map_annihilator 216 #print axioms map_annihilator_le_localized_annihilator 217 #print axioms exists_maximalIdeal_pow_le_localized_annihilator 218 #print axioms localizedModule_isFiniteLength 219 #print axioms localizedModule_nontrivial_and_isFiniteLength 220 221 end 222 223 end AlgebraicAnalysis.MinimalPrimeFiniteLengthLocalization 224