Skip to content

Commit 22a865f

Browse files
Calvin Lee4e554c4c
andcommitted
feat: port Algebra.Homology.LocalCohomology (#4749)
Co-authored-by: Calvin Lee <calvins.lee@utah.edu>
1 parent 011748b commit 22a865f

File tree

2 files changed

+218
-0
lines changed

2 files changed

+218
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ import Mathlib.Algebra.Homology.Homology
192192
import Mathlib.Algebra.Homology.Homotopy
193193
import Mathlib.Algebra.Homology.HomotopyCategory
194194
import Mathlib.Algebra.Homology.ImageToKernel
195+
import Mathlib.Algebra.Homology.LocalCohomology
195196
import Mathlib.Algebra.Homology.Opposite
196197
import Mathlib.Algebra.Homology.QuasiIso
197198
import Mathlib.Algebra.Homology.ShortComplex.Basic
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
/-
2+
Copyright (c) 2023 Emily Witt. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Emily Witt, Scott Morrison, Jake Levinson, Sam van Gool
5+
6+
! This file was ported from Lean 3 source module algebra.homology.local_cohomology
7+
! leanprover-community/mathlib commit 5a684ce82399d820475609907c6ef8dba5b1b97c
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.RingTheory.Ideal.Basic
12+
import Mathlib.Algebra.Category.ModuleCat.Colimits
13+
import Mathlib.Algebra.Category.ModuleCat.Projective
14+
import Mathlib.CategoryTheory.Abelian.Ext
15+
import Mathlib.RingTheory.Finiteness
16+
17+
/-!
18+
# Local cohomology.
19+
20+
This file defines the `i`-th local cohomology module of an `R`-module `M` with support in an
21+
ideal `I` of `R`, where `R` is a commutative ring, as the direct limit of Ext modules:
22+
23+
Given a collection of ideals cofinal with the powers of `I`, consider the directed system of
24+
quotients of `R` by these ideals, and take the direct limit of the system induced on the `i`-th
25+
Ext into `M`. One can, of course, take the collection to simply be the integral powers of `I`.
26+
27+
## References
28+
29+
* [M. Hochster, *Local cohomology*][hochsterunpublished]
30+
<https://dept.math.lsa.umich.edu/~hochster/615W22/lcc.pdf>
31+
* [R. Hartshorne, *Local cohomology: A seminar given by A. Grothendieck*][hartshorne61]
32+
* [M. Brodmann and R. Sharp, *Local cohomology: An algebraic introduction with geometric
33+
applications*][brodmannsharp13]
34+
* [S. Iyengar, G. Leuschke, A. Leykin, Anton, C. Miller, E. Miller, A. Singh, U. Walther,
35+
*Twenty-four hours of local cohomology*][iyengaretal13]
36+
37+
## Tags
38+
39+
local cohomology, local cohomology modules
40+
41+
## Future work
42+
43+
* Prove that this definition is equivalent to:
44+
* the right-derived functor definition
45+
* the characterization as the limit of Koszul homology
46+
* the characterization as the cohomology of a Cech-like complex
47+
* Prove that local cohomology depends only on the radical of the ideal
48+
* Establish long exact sequence(s) in local cohomology
49+
-/
50+
51+
52+
open Opposite
53+
54+
open CategoryTheory
55+
56+
open CategoryTheory.Limits
57+
58+
noncomputable section
59+
60+
universe u v
61+
62+
namespace localCohomology
63+
64+
-- We define local cohomology, implemented as a direct limit of `Ext(R/J, -)`.
65+
section
66+
67+
variable {R : Type u} [CommRing R] {D : Type v} [SmallCategory D]
68+
69+
/-- The directed system of `R`-modules of the form `R/J`, where `J` is an ideal of `R`,
70+
determined by the functor `I` -/
71+
def ringModIdeals (I : D ⥤ Ideal R) : D ⥤ ModuleCat.{u} R where
72+
obj t := ModuleCat.of R <| R ⧸ I.obj t
73+
map w := Submodule.mapQ _ _ LinearMap.id (I.map w).down.down
74+
-- Porting note: was 'obviously'
75+
map_comp f g := by apply Submodule.linearMap_qext; rfl
76+
#align local_cohomology.ring_mod_ideals localCohomology.ringModIdeals
77+
78+
-- TODO: Once this file is ported, move this file to the right location.
79+
instance moduleCat_enough_projectives' : EnoughProjectives (ModuleCat.{u} R) :=
80+
ModuleCat.moduleCat_enoughProjectives.{u}
81+
set_option linter.uppercaseLean3 false in
82+
#align local_cohomology.Module_enough_projectives' localCohomology.moduleCat_enough_projectives'
83+
84+
/-- The diagram we will take the colimit of to define local cohomology, corresponding to the
85+
directed system determined by the functor `I` -/
86+
def diagram (I : D ⥤ Ideal R) (i : ℕ) : Dᵒᵖ ⥤ ModuleCat.{u} R ⥤ ModuleCat.{u} R :=
87+
(ringModIdeals I).op ⋙ Ext R (ModuleCat.{u} R) i
88+
#align local_cohomology.diagram localCohomology.diagram
89+
90+
end
91+
92+
section
93+
94+
-- We momentarily need to work with a type inequality, as later we will take colimits
95+
-- along diagrams either in Type, or in the same universe as the ring, and we need to cover both.
96+
variable {R : Type max u v} [CommRing R] {D : Type v} [SmallCategory D]
97+
98+
/-
99+
In this definition we do not assume any special property of the diagram `I`, but the relevant case
100+
will be where `I` is (cofinal with) the diagram of powers of a single given ideal.
101+
102+
Below, we give two equivalent (to be shown) definitions of the usual local cohomology with support
103+
in an ideal `J`, `local_cohomology` and `local_cohomology.of_self_le_radical`.
104+
105+
TODO: Show that any functor cofinal with `I` gives the same result.
106+
-/
107+
/-- `local_cohomology.of_diagram I i` is the the functor sending a module `M` over a commutative
108+
ring `R` to the direct limit of `Ext^i(R/J, M)`, where `J` ranges over a collection of ideals
109+
of `R`, represented as a functor `I`. -/
110+
def ofDiagram (I : D ⥤ Ideal R) (i : ℕ) : ModuleCat.{max u v} R ⥤ ModuleCat.{max u v} R :=
111+
colimit (diagram.{max u v, v} I i)
112+
#align local_cohomology.of_diagram localCohomology.ofDiagram
113+
114+
end
115+
116+
section Diagrams
117+
118+
variable {R : Type u} [CommRing R]
119+
120+
/-- The functor sending a natural number `i` to the `i`-th power of the ideal `J` -/
121+
def idealPowersDiagram (J : Ideal R) : ℕᵒᵖ ⥤ Ideal R where
122+
obj t := J ^ unop t
123+
map w := ⟨⟨Ideal.pow_le_pow w.unop.down.down⟩⟩
124+
#align local_cohomology.ideal_powers_diagram localCohomology.idealPowersDiagram
125+
126+
/-- The full subcategory of all ideals with radical containing `J` -/
127+
def SelfLeRadical (J : Ideal R) : Type u :=
128+
FullSubcategory fun J' : Ideal R => J ≤ J'.radical
129+
--deriving Category
130+
131+
-- Porting note: `deriving Category` is not able to derive this instance
132+
instance (J : Ideal R) : Category (SelfLeRadical J) :=
133+
(FullSubcategory.category _)
134+
135+
#align local_cohomology.self_le_radical localCohomology.SelfLeRadical
136+
137+
instance SelfLeRadical.inhabited (J : Ideal R) : Inhabited (SelfLeRadical J)
138+
where default := ⟨J, Ideal.le_radical⟩
139+
#align local_cohomology.self_le_radical.inhabited localCohomology.SelfLeRadical.inhabited
140+
141+
/-- The diagram of all ideals with radical containing `J`, represented as a functor.
142+
This is the "largest" diagram that computes local cohomology with support in `J`. -/
143+
def selfLeRadicalDiagram (J : Ideal R) : SelfLeRadical J ⥤ Ideal R :=
144+
fullSubcategoryInclusion _
145+
#align local_cohomology.self_le_radical_diagram localCohomology.selfLeRadicalDiagram
146+
147+
end Diagrams
148+
149+
end localCohomology
150+
151+
/-! We give two models for the local cohomology with support in an ideal `J`: first in terms of
152+
the powers of `J` (`local_cohomology`), then in terms of *all* ideals with radical
153+
containing `J` (`local_cohomology.of_self_le_radical`). -/
154+
155+
156+
section ModelsForLocalCohomology
157+
158+
open localCohomology
159+
160+
variable {R : Type u} [CommRing R]
161+
162+
/-- `local_cohomology J i` is `i`-th the local cohomology module of a module `M` over
163+
a commutative ring `R` with support in the ideal `J` of `R`, defined as the direct limit
164+
of `Ext^i(R/J^t, M)` over all powers `t : ℕ`. -/
165+
def localCohomology (J : Ideal R) (i : ℕ) : ModuleCat.{u} R ⥤ ModuleCat.{u} R :=
166+
ofDiagram (idealPowersDiagram J) i
167+
#align local_cohomology localCohomology
168+
169+
/-- Local cohomology as the direct limit of `Ext^i(R/J', M)` over *all* ideals `J'` with radical
170+
containing `J`. -/
171+
def localCohomology.ofSelfLeRadical (J : Ideal R) (i : ℕ) : ModuleCat.{u} R ⥤ ModuleCat.{u} R :=
172+
ofDiagram.{u} (selfLeRadicalDiagram.{u} J) i
173+
#align local_cohomology.of_self_le_radical localCohomology.ofSelfLeRadical
174+
175+
/- TODO: Construct `local_cohomology J i ≅ local_cohomology.of_self_le_radical J i`. Use this to
176+
show that local cohomology depends only on `J.radical`. -/
177+
end ModelsForLocalCohomology
178+
179+
section LocalCohomologyEquiv
180+
181+
open localCohomology
182+
183+
variable {R : Type u} [CommRing R] (I J : Ideal R)
184+
185+
/-- Lifting `ideal_powers_diagram J` from a diagram valued in `ideals R` to a diagram
186+
valued in `self_le_radical J`. -/
187+
def localCohomology.idealPowersToSelfLeRadical (J : Ideal R) : ℕᵒᵖ ⥤ SelfLeRadical J :=
188+
FullSubcategory.lift _ (idealPowersDiagram J) fun k => by
189+
change _ ≤ (J ^ unop k).radical
190+
cases' unop k with n
191+
· simp [Ideal.radical_top, pow_zero, Ideal.one_eq_top, le_top, Nat.zero_eq]
192+
· simp only [J.radical_pow _ n.succ_pos, Ideal.le_radical]
193+
#align local_cohomology.ideal_powers_to_self_le_radical localCohomology.idealPowersToSelfLeRadical
194+
195+
/-- The composition with the inclusion into `ideals R` is isomorphic to `ideal_powers_diagram J`. -/
196+
def localCohomology.idealPowersToSelfLeRadicalCompInclusion (J : Ideal R) :
197+
localCohomology.idealPowersToSelfLeRadical J ⋙ selfLeRadicalDiagram J ≅ idealPowersDiagram J :=
198+
FullSubcategory.lift_comp_inclusion _ _ _
199+
#align local_cohomology.ideal_powers_to_self_le_radical_comp_inclusion localCohomology.idealPowersToSelfLeRadicalCompInclusion
200+
201+
/-- The lemma below essentially says that `ideal_powers_to_self_le_radical I` is initial in
202+
`self_le_radical_diagram I`.
203+
204+
PORTING NOTE: This lemma should probably be moved to `ring_theory/finiteness.lean`
205+
to be near `ideal.exists_radical_pow_le_of_fg`, which it generalizes. -/
206+
theorem Ideal.exists_pow_le_of_le_radical_of_fG (hIJ : I ≤ J.radical) (hJ : J.radical.FG) :
207+
∃ k : ℕ, I ^ k ≤ J := by
208+
obtain ⟨k, hk⟩ := J.exists_radical_pow_le_of_fg hJ
209+
use k
210+
calc
211+
I ^ k ≤ J.radical ^ k := Ideal.pow_mono hIJ _
212+
_ ≤ J := hk
213+
214+
#align ideal.exists_pow_le_of_le_radical_of_fg Ideal.exists_pow_le_of_le_radical_of_fG
215+
216+
end LocalCohomologyEquiv
217+

0 commit comments

Comments
 (0)