This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a
1 module 2 3 public import Mathlib.RingTheory.Support 4 public import Mathlib.RingTheory.Length 5 public import Mathlib.RingTheory.SimpleModule.Basic 6 public import Mathlib.Algebra.Module.LocalizedModule.Exact 7 8 @[expose] public section 9 10 /-! 11 # Definitions 4.4–4.6 and Lemma 4.7 12 13 The paper's localization, support and length are Mathlib's 14 `Localization S` / `LocalizedModule S N`, `Module.support` and `Module.length`. 15 Each `definition_4_*` below proves that the printed definition agrees with the 16 Mathlib one where the wording differs; the later proofs use these lemmas. 17 -/ 18 19 namespace Stafford38.Paper.Section4 20 21 noncomputable section 22 23 universe v 24 25 variable {R : Type*} [CommRing R] 26 27 /-- **Definition 4.4 (localization).** Mathlib's `Localization S` and 28 `LocalizedModule S N` are the rings and modules of fractions with 29 `a/s = a'/s' ↔ t(s'a − sa') = 0` and `y/s = y'/s' ↔ t(s'y − sy') = 0` for some 30 `t ∈ S`, and localization is exact. -/ 31 theorem definition_4_4 (S : Submonoid R) {N : Type v} [AddCommGroup N] [Module R N] : 32 (∀ (a a' : R) (s s' : S), 33 Localization.mk a s = Localization.mk a' s' ↔ 34 ∃ t : S, (t : R) * ((s' : R) * a - (s : R) * a') = 0) ∧ 35 (∀ (y y' : N) (s s' : S), 36 LocalizedModule.mk y s = LocalizedModule.mk y' s' ↔ 37 ∃ t : S, t • (s' • y - s • y') = 0) ∧ 38 ∀ {N₀ N₂ : Type v} [AddCommGroup N₀] [Module R N₀] [AddCommGroup N₂] [Module R N₂] 39 (g : N₀ →ₗ[R] N) (h : N →ₗ[R] N₂), Function.Exact g h → 40 Function.Exact (LocalizedModule.map S g) (LocalizedModule.map S h) := by 41 refine ⟨fun a a' s s' => ?_, fun y y' s s' => ?_, fun g h ex => ?_⟩ 42 · rw [Localization.mk_eq_mk_iff, Localization.r_iff_exists] 43 simp only [mul_sub, sub_eq_zero] 44 · rw [LocalizedModule.mk_eq] 45 simp only [smul_sub, sub_eq_zero] 46 · exact LocalizedModule.map_exact S g h ex 47 48 /-- **Definition 4.5 (support).** `Supp_R(M) = {𝔭 | M_𝔭 ≠ 0}`. -/ 49 theorem definition_4_5 {M : Type*} [AddCommGroup M] [Module R M] (p : PrimeSpectrum R) : 50 p ∈ Module.support R M ↔ 51 ∃ z : LocalizedModule p.asIdeal.primeCompl M, z ≠ 0 := by 52 rw [Module.mem_support_iff] 53 exact nontrivial_iff_exists_ne 0 54 55 /-- **Definition 4.6 (length).** `Module.length` is the number of steps of a 56 composition series `0 = N₀ ⊊ ⋯ ⊊ N_ℓ = N` (successive steps are coverings, 57 i.e. have simple quotients, `covBy_iff_quot_is_simple`), independent of the 58 series, and length is additive on short exact sequences. -/ 59 theorem definition_4_6 {T : Type*} {M : Type v} [Ring T] [AddCommGroup M] [Module T M] : 60 (∀ s : CompositionSeries (Submodule T M), s.head = ⊥ → s.last = ⊤ → 61 (s.length : ℕ∞) = Module.length T M) ∧ 62 ∀ {N P : Type v} [AddCommGroup N] [Module T N] [AddCommGroup P] [Module T P] 63 (f : N →ₗ[T] M) (g : M →ₗ[T] P), Function.Injective f → Function.Surjective g → 64 Function.Exact f g → Module.length T M = Module.length T N + Module.length T P := 65 ⟨fun s h₁ h₂ => Module.length_compositionSeries s h₁ h₂, 66 fun f g hf hg H => Module.length_eq_add_of_exact f g hf hg H⟩ 67 68 /-! ## Lemma 4.7 -/ 69 70 variable {N : Type*} [AddCommGroup N] [Module R N] 71 72 /-- In `N_𝔭`, `y/1 = 0` iff some `u ∉ 𝔭` kills `y`, i.e. iff 73 `Ann_R(y) ⊄ 𝔭`. -/ 74 theorem step_4_7_mk_one_eq_zero_iff (p : PrimeSpectrum R) (y : N) : 75 LocalizedModule.mk y (1 : p.asIdeal.primeCompl) = 0 ↔ 76 ¬ (R ∙ y).annihilator ≤ p.asIdeal := by 77 rw [← LocalizedModule.zero_mk (1 : p.asIdeal.primeCompl), 78 (definition_4_4 p.asIdeal.primeCompl (N := N)).2.1] 79 simp only [one_smul, smul_zero, sub_zero, IsConcreteLE.le_iff, 80 Submodule.mem_annihilator_span_singleton, not_forall] 81 constructor 82 · rintro ⟨⟨u, hu⟩, h⟩ 83 exact ⟨u, h, hu⟩ 84 · rintro ⟨u, h, hu⟩ 85 exact ⟨⟨u, hu⟩, h⟩ 86 87 /-- The contrapositive: `y/1 ≠ 0 ↔ Ann_R(y) ⊆ 𝔭`. -/ 88 theorem step_4_7_mk_one_ne_zero_iff (p : PrimeSpectrum R) (y : N) : 89 LocalizedModule.mk y (1 : p.asIdeal.primeCompl) ≠ 0 ↔ 90 (R ∙ y).annihilator ≤ p.asIdeal := by 91 rw [ne_eq, step_4_7_mk_one_eq_zero_iff, not_not] 92 93 /-- `s ∉ 𝔭` is invertible in `N_𝔭`, so `y/s = 0 ↔ y/1 = 0`. -/ 94 theorem step_4_7_mk_eq_zero_iff (p : PrimeSpectrum R) (y : N) (s : p.asIdeal.primeCompl) : 95 LocalizedModule.mk y s = 0 ↔ LocalizedModule.mk y (1 : p.asIdeal.primeCompl) = 0 := by 96 have h : LocalizedModule.mk y s = 97 (IsLocalization.mk' (Localization p.asIdeal.primeCompl) (1 : R) s) • 98 LocalizedModule.mk y (1 : p.asIdeal.primeCompl) := by 99 rw [← Localization.mk_eq_mk', LocalizedModule.mk_smul_mk, one_smul, mul_one] 100 rw [h] 101 constructor 102 · intro h0 103 have := congrArg (fun z => (algebraMap R (Localization p.asIdeal.primeCompl) s) • z) h0 104 simp only [smul_zero, smul_smul] at this 105 rwa [IsLocalization.mul_mk'_eq_mk'_of_mul, mul_one, IsLocalization.mk'_self, 106 one_smul] at this 107 · intro h0 108 rw [h0, smul_zero] 109 110 /-- **Lemma 4.7.** `𝔭 ∈ Supp_R(N)` iff there is `y ∈ N` with `Ann_R(y) ⊆ 𝔭`. -/ 111 theorem lemma_4_7 (p : PrimeSpectrum R) : 112 p ∈ Module.support R N ↔ ∃ y : N, (R ∙ y).annihilator ≤ p.asIdeal := by 113 rw [definition_4_5] 114 constructor 115 · -- (⇒) a nonzero `y/s` gives `y/1 ≠ 0` 116 rintro ⟨z, hz⟩ 117 induction z using LocalizedModule.induction_on with 118 | h y s => 119 refine ⟨y, (step_4_7_mk_one_ne_zero_iff p y).1 ?_⟩ 120 rwa [ne_eq, ← step_4_7_mk_eq_zero_iff p y s] 121 · -- (⇐) `y/1 ≠ 0` 122 rintro ⟨y, hy⟩ 123 exact ⟨_, (step_4_7_mk_one_ne_zero_iff p y).2 hy⟩ 124 125 #print axioms definition_4_4 126 #print axioms definition_4_5 127 #print axioms definition_4_6 128 #print axioms step_4_7_mk_one_eq_zero_iff 129 #print axioms step_4_7_mk_eq_zero_iff 130 #print axioms lemma_4_7 131 132 end 133 134 end Stafford38.Paper.Section4 135