# Local cohomology

In algebraic geometry, local cohomology is an algebraic analogue of relative cohomology. Alexander Grothendieck introduced it in seminars in Harvard in 1961 written up by Hartshorne (1967), and in 1961-2 at IHES written up as SGA2 - Grothendieck (1968), republished as Grothendieck (2005). Given a function (more generally, a section of a quasicoherent sheaf) defined on an open subset of an algebraic variety (or scheme), local cohomology measures the obstruction to extending that function to a larger domain. The rational function $1/x$, for example, is defined only on the complement of $0$ on the affine line $\mathbb {A} _{K}^{1}$ over a field $K$, and cannot be extended to a function on the entire space. The local cohomology module $H_{(x)}^{1}(K[x])$ (where $K[x]$ is the coordinate ring of $\mathbb {A} _{K}^{1}$) detects this in the nonvanishing of a cohomology class $[1/x]$. In a similar manner, $1/xy$ is defined away from the $x$ and $y$ axes in the affine plane, but cannot be extended to either the complement of the $x$-axis or the complement of the $y$-axis alone (nor can it be expressed as a sum of such functions); this obstruction corresponds precisely to a nonzero class $[1/xy]$ in the local cohomology module $H_{(x,y)}^{2}(K[x,y])$.
Outside of algebraic geometry, local cohomology has found applications in commutative algebra, combinatorics, and certain kinds of partial differential equations.

## Definition

In the most general geometric form of the theory, sections $\Gamma _{Y}$ are considered of a sheaf $F$ of abelian groups, on a topological space $X$, with support in a closed subset $Y$, The derived functors of $\Gamma _{Y}$ form local cohomology groups
    $H_{Y}^{i}(X,F)$
In the theory's algebraic form, the space X is the spectrum Spec(R) of a commutative ring R (assumed to be Noetherian throughout this article) and the sheaf F is the quasicoherent sheaf associated to an R-module M, denoted by ${\tilde {M}}$. The closed subscheme Y is defined by an ideal I. In this situation, the functor Γ$_Y$(F) corresponds to the I-torsion functor, a union of annihilators
    $\Gamma _{I}(M):=\bigcup _{n\geq 0}(0:_{M}I^{n}),$
i.e., the elements of M which are annihilated by some power of I. As a right derived functor, the ith local cohomology module with respect to I is the ith cohomology group $H^{i}(\Gamma _{I}(E^{\bullet }))$ of the chain complex $\Gamma _{I}(E^{\bullet })$ obtained from taking the I-torsion part $\Gamma _{I}(-)$ of an injective resolution $E^{\bullet }$ of the module $M$. Because $E^{\bullet }$ consists of R-modules and R-module homomorphisms, the local cohomology groups each have the natural structure of an R-module.
The I-torsion part $\Gamma _{I}(M)$ may alternatively be described as
    $\Gamma _{I}(M):=\varinjlim _{n\in N}\operatorname {Hom} _{R}(R/I^{n},M),$
and for this reason, the local cohomology of an R-module M agrees with a direct limit of Ext modules,
    $H_{I}^{i}(M):=\varinjlim _{n\in N}\operatorname {Ext} _{R}^{i}(R/I^{n},M).$
It follows from either of these definitions that $H_{I}^{i}(M)$ would be unchanged if $I$ were replaced by another ideal having the same radical. It also follows that local cohomology does not depend on any choice of generators for I, a fact which becomes relevant in the following definition involving the Čech complex.

### Using Koszul and Čech complexes

The derived functor definition of local cohomology requires an injective resolution of the module $M$, which can make it inaccessible for use in explicit computations. The Čech complex is seen as more practical in certain contexts. Iyengar et al. (2007), for example, state that they "essentially ignore" the "problem of actually producing any one of these [injective] kinds of resolutions for a given module" prior to presenting the Čech complex definition of local cohomology, and Hartshorne (1977) describes Čech cohomology as "giv[ing] a practical method for computing cohomology of quasi-coherent sheaves on a scheme." and as being "well suited for computations."
The Čech complex can be defined as a colimit of Koszul complexes $K^{\bullet }(f_{1},\ldots ,f_{m})$ where $f_{1},\ldots ,f_{n}$ generate $I$. The local cohomology modules can be described as:
    $H_{I}^{i}(M)\cong \varinjlim _{m}H^{i}\left(\operatorname {Hom} _{R}\left(K^{\bullet }\left(f_{1}^{m},\dots ,f_{n}^{m}\right),M\right)\right)$
Koszul complexes have the property that multiplication by $f_{i}$ induces a chain complex morphism $\cdot f_{i}:K^{\bullet }(f_{1},\ldots ,f_{n})\to K^{\bullet }(f_{1},\ldots ,f_{n})$ that is homotopic to zero, meaning $H^{i}(K^{\bullet }(f_{1},\ldots ,f_{n}))$ is annihilated by the $f_{i}$. A non-zero map in the colimit of the $\operatorname {Hom}$ sets contains maps from the all but finitely many Koszul complexes, and which are not annihilated by some element in the ideal.
This colimit of Koszul complexes is isomorphic to the Čech complex, denoted ${\check {C}}^{\bullet }(f_{1},\ldots ,f_{n};M)$, below.
   $0\to M\to \bigoplus _{i_{0}}M_{f_{i}}\to \bigoplus _{i_{0}<i_{1}}M_{f_{i_{0}}f_{i_{1}}}\to \cdots \to M_{f_{1}\cdots f_{n}}\to 0$
where the ith local cohomology module of $M$ with respect to $I=(f_{1},\ldots ,f_{n})$ is isomorphic to the ith cohomology group of the above chain complex,
    $H_{I}^{i}(M)\cong H^{i}({\check {C}}^{\bullet }(f_{1},\ldots ,f_{n};M)).$
The broader issue of computing local cohomology modules (in characteristic zero) is discussed in Leykin (2002) and Iyengar et al. (2007, Lecture 23).

## Basic properties

Since local cohomology is defined as derived functor, for any short exact sequence of R-modules $0\to M_{1}\to M_{2}\to M_{3}\to 0$, there is, by definition, a natural long exact sequence in local cohomology
    $\cdots \to H_{I}^{i}(M_{1})\to H_{I}^{i}(M_{2})\to H_{I}^{i}(M_{3})\to H_{I}^{i+1}(M_{1})\to \cdots$
There is also a long exact sequence of sheaf cohomology linking the ordinary sheaf cohomology of X and of the open set U = X \Y, with the local cohomology modules. For a quasicoherent sheaf F defined on X, this has the form
    $\cdots \to H_{Y}^{i}(X,F)\to H^{i}(X,F)\to H^{i}(U,F)\to H_{Y}^{i+1}(X,F)\to \cdots$
In the setting where X is an affine scheme ${\text{Spec}}(R)$ and Y is the vanishing set of an ideal I, the cohomology groups $H^{i}(X,F)$ vanish for $i>0$. If $F={\tilde {M}}$, this leads to an exact sequence
    $0\to H_{I}^{0}(M)\to M{\stackrel {\text{res}}{\to }}H^{0}(U,{\tilde {M}})\to H_{I}^{1}(M)\to 0,$
where the middle map is the restriction of sections. The target of this restriction map is also referred to as the ideal transform. For n ≥ 1, there are isomorphisms
    $H^{n}(U,{\tilde {M}}){\stackrel {\cong }{\to }}H_{I}^{n+1}(M).$
Because of the above isomorphism with sheaf cohomology, local cohomology can be used to express a number of meaningful topological constructions on the scheme $X=\operatorname {Spec} (R)$ in purely algebraic terms. For example, there is a natural analogue in local cohomology of the Mayer–Vietoris sequence with respect to a pair of open sets U and V in X, given by the complements of the closed subschemes corresponding to a pair of ideal I and J, respectively. This sequence has the form
    $\cdots H_{I+J}^{i}(M)\to H_{I}^{i}(M)\oplus H_{J}^{i}(M)\to H_{I\cap J}^{i}(M)\to H_{I+J}^{i+1}(M)\to \cdots$
for any $R$-module $M$.
The vanishing of local cohomology can be used to bound the least number of equations (referred to as the arithmetic rank) needed to (set theoretically) define the algebraic set $V(I)$ in $\operatorname {Spec} (R)$. If $J$ has the same radical as $I$, and is generated by $n$ elements, then the Čech complex on the generators of $J$ has no terms in degree $i>n$. The least number of generators among all ideals $J$ such that ${\sqrt {J}}={\sqrt {I}}$ is the arithmetic rank of $I$, denoted $\operatorname {ara} (I)$. Since the local cohomology with respect to $I$ may be computed using any such ideal, it follows that $H_{I}^{i}(M)=0$ for $i>\operatorname {ara} (I)$.

### Graded local cohomology and projective geometry

When $R$ is graded by $\mathbb {N}$, $I$ is generated by homogeneous elements, and $M$ is a graded module, there is a natural grading on the local cohomology module $H_{I}^{i}(M)$ that is compatible with the gradings of $M$ and $R$. All of the basic properties of local cohomology expressed in this article are compatible with the graded structure. If $M$ is finitely generated and $I={\mathfrak {m}}$ is the ideal generated by the elements of $R$ having positive degree, then the graded components $H_{\mathfrak {m}}^{i}(M)_{n}$ are finitely generated over $R$ and vanish for sufficiently large $n$.
The case where $I={\mathfrak {m}}$ is the ideal generated by all elements of positive degree (sometimes called the irrelevant ideal) is particularly special, due to its relationship with projective geometry. In this case, there is an isomorphism
    $H_{\mathfrak {m}}^{i+1}(M)\cong \bigoplus _{k\in \mathbf {Z} }H^{i}({\text{Proj}}(R),{\tilde {M}}(k))$
where ${\text{Proj}}(R)$ is the projective scheme associated to $R$, and $(k)$ denotes the Serre twist. This isomorphism is graded, giving
    $H_{\mathfrak {m}}^{i+1}(M)_{n}\cong H^{i}({\text{Proj}}(R),{\tilde {M}}(n))$
in all degrees $n$.
This isomorphism relates local cohomology with the global cohomology of projective schemes. For example, the Castelnuovo–Mumford regularity can be formulated using local cohomology as
    ${\text{reg}}(M)={\text{sup}}\{{\text{end}}(H_{\mathfrak {m}}^{i}(M))+i\,|\,0\leq i\leq {\text{dim}}(M)\}$
where ${\text{end}}(N)$ denotes the highest degree $t$ such that $N_{t}\neq 0$. Local cohomology can be used to prove certain upper bound results concerning the regularity.

## Examples
### Top local cohomology

Using the Čech complex, if $I=(f_{1},\ldots ,f_{n})R$ the local cohomology module $H_{I}^{n}(M)$ is generated over $R$ by the images of the formal fractions
    $\left[{\frac {m}{f_{1}^{t_{1}}\cdots f_{n}^{t_{n}}}}\right]$
for $m\in M$ and $t_{1},\ldots ,t_{n}\geq 1$. This fraction corresponds to a nonzero element of $H_{I}^{n}(M)$ if and only if there is no $k\geq 0$ such that $(f_{1}\cdots f_{t})^{k}m\in (f_{1}^{t_{1}+k},\ldots ,f_{t}^{t_{n}+k})M$. For example, if $t_{i}=1$, then
    $f_{i}\cdot \left[{\frac {m}{f_{1}^{t_{1}}\cdots f_{i}\cdots f_{n}^{t_{n}}}}\right]=0.$
* If $K$ is a field and $R=K[x_{1},\ldots ,x_{n}]$ is a polynomial ring over $K$ in $n$ variables, then the local cohomology module $H_{(x_{1},\ldots ,x_{n})}^{n}(K[x_{1},\ldots ,x_{n}])$ may be regarded as a vector space over $K$ with basis given by (the Čech cohomology classes of) the inverse monomials $\left[x_{1}^{-t_{1}}\cdots x_{n}^{-t_{n}}\right]$ for $t_{1},\ldots ,t_{n}\geq 1$. As an $R$-module, multiplication by $x_{i}$ lowers $t_{i}$ by 1, subject to the condition $x_{i}\cdot \left[x_{1}^{-t_{1}}\cdots x_{i}^{-1}\cdots x_{n}^{-t_{n}}\right]=0.$ Because the powers $t_{i}$ cannot be increased by multiplying with elements of $R$, the module $H_{(x_{1},\ldots ,x_{n})}^{n}(K[x_{1},\ldots ,x_{n}])$ is not finitely generated.

### Examples of H$^1$

If $H^{0}(U,{\tilde {R}})$ is known (where $U=\operatorname {Spec} (R)-V(I)$), the module $H_{I}^{1}(R)$ can sometimes be computed explicitly using the sequence
    $0\to H_{I}^{0}(R)\to R\to H^{0}(U,{\tilde {R}})\to H_{I}^{1}(R)\to 0.$
In the following examples, $K$ is any field.
* If $R=K[X,Y^{2},XY,Y^{3}]$ and $I=(X,Y^{2})R$, then $H^{0}(U,{\tilde {R}})=K[X,Y]$ and as a vector space over $K$, the first local cohomology module $H_{I}^{1}(R)$ is $K[X,Y]/K[X,Y^{2},XY,Y^{3}]$, a 1-dimensional $K$ vector space generated by $Y$.
* If $R=K[X,Y]/(X^{2},XY)$ and ${\mathfrak {m}}=(X,Y)R$, then $\Gamma _{\mathfrak {m}}(R)=xR$ and $H^{0}(U,{\tilde {R}})=K[Y,Y^{-1}]$, so $H_{\mathfrak {m}}^{1}(R)=K[Y,Y^{-1}]/K[Y]$ is an infinite-dimensional $K$ vector space with basis $Y^{-1},Y^{-2},Y^{-3},\ldots$

## Relation to invariants of modules

The dimension dim$_R$(M) of a module (defined as the Krull dimension of its support) provides an upper bound for local cohomology modules:
    $H_{I}^{n}(M)=0{\text{ for all }}n>\dim _{R}(M).$
If R is local and M finitely generated, then this bound is sharp, i.e., $H_{\mathfrak {m}}^{n}(M)\neq 0$.
The depth (defined as the maximal length of a regular M-sequence; also referred to as the grade of M) provides a sharp lower bound, i.e., it is the smallest integer n such that
    $H_{I}^{n}(M)\neq 0.$
These two bounds together yield a characterisation of Cohen–Macaulay modules over local rings: they are precisely those modules where $H_{\mathfrak {m}}^{n}(M)$ vanishes for all but one n.

## Local duality

The local duality theorem is a local analogue of Serre duality. For a Cohen-Macaulay local ring $R$ of dimension $d$ that is a homomorphic image of a Gorenstein local ring (for example, if $R$ is complete), it states that the natural pairing
    $H_{\mathfrak {m}}^{n}(M)\times \operatorname {Ext} _{R}^{d-n}(M,\omega _{R})\to H_{\mathfrak {m}}^{d}(\omega _{R})$
is a perfect pairing, where $\omega _{R}$ is a dualizing module for $R$. In terms of the Matlis duality functor $D(-)$, the local duality theorem may be expressed as the following isomorphism.
    $H_{\mathfrak {m}}^{n}(M)\cong D(\operatorname {Ext} _{R}^{d-n}(M,\omega _{R}))$
The statement is simpler when $\omega _{R}\cong R$, which is equivalent to the hypothesis that $R$ is Gorenstein. This is the case, for example, if $R$ is regular.

## Applications

The initial applications were to analogues of the Lefschetz hyperplane theorems. In general such theorems state that homology or cohomology is supported on a hyperplane section of an algebraic variety, except for some 'loss' that can be controlled. These results applied to the algebraic fundamental group and to the Picard group.
Another type of application are connectedness theorems such as Grothendieck's connectedness theorem (a local analogue of the Bertini theorem) or the Fulton–Hansen connectedness theorem due to Fulton & Hansen (1979) and Faltings (1979). The latter asserts that for two projective varieties V and W in P$^r$ over an algebraically closed field, the connectedness dimension of Z = V ∩ W (i.e., the minimal dimension of a closed subset T of Z that has to be removed from Z so that the complement Z \ T is disconnected) is bound by
    c(Z) ≥ dim V + dim W − r − 1.
For example, Z is connected if dim V + dim W > r.
In polyhedral geometry, a key ingredient of Stanley’s 1975 proof of the simplicial form of McMullen’s Upper bound theorem involves showing that the Stanley-Reisner ring of the corresponding simplicial complex is Cohen-Macaulay, and local cohomology is an important tool in this computation, via Hochster’s formula.