Showing posts with label cosheaf. Show all posts
Showing posts with label cosheaf. Show all posts

Sunday, June 4, 2017

Sheaves and cosheaves

Let $X$ be a topological space with an open cover $\mathcal U = \{U_i\}$, and category $Op(X)$ of open sets of $X$. Let $C$ be any abelian category, most often groups.

Definition: A presheaf $\mathcal F$ over $X$ is a functor $Op(X)^{op}\to D$, and a sheaf if it satisfies the gluing axiom. A precosheaf $\widehat{\mathcal F}$ over $X$ is a functor $Op(X)\to D$, and a cosheaf if it satisfies the cutting axiom.

The gluing axiom may be interpreted as a colimit condition and the cutting axiom (thanks to Keaton Quinn for suggesting the name) may be interpreted as a limit condition. The components of sheaves and cosheaves are compared in the table below.
\[
\begin{array}{r|c|c}
& \text{sheaf} & \text{cosheaf} \\\hline
&&\\[-5pt]
\text{functoriality} & \begin{array}{r c l}
Op(S)^{op} & \to & D \\
U & \mapsto & \mathcal F(U)\\
(V\hookrightarrow U)^{op} & \mapsto & (\rho_{UV}:\mathcal F(U)\to \mathcal F(V))
\end{array}
&
\begin{array}{r c l}
Op(S) & \to & D \\
U & \mapsto & \widehat{\mathcal F}(U)\\
(V\hookrightarrow U) & \mapsto & (\varepsilon_{VU}:\widehat{\mathcal F}(V)\to \widehat{\mathcal F}(U))
\end{array}
\\&&\\
\text{gluing / cutting} &
\begin{array}{r l}
\text{if} &  s_i|_{U_i\cap U_j}=s_j|_{U_i\cap U_j},\\[5pt]
\text{then} & \begin{array}{c}\exists s\in \mathcal F(U_i\cup U_j) \text{ s.t.}\\ s|_{U_i}=s_i,s|_{U_j}=s_j. \end{array}
\end{array}
&
\begin{array}{r l}
\text{if} & s_i|^{U_i\cup U_j}=s_j|^{U_i\cup U_j},\\[5pt]
\text{then} & \begin{array}{c}\exists s\in \widehat{\mathcal F}(U_i\cap U_j) \text{ s.t.}\\ s|^{U_i}=s_i,s|^{U_j}=s_j. \end{array}
\end{array}
\\&&\\
\text{colimit / limit cond.} &
\mathcal F(U)\tov\cong \displaystyle\varprojlim_{V\subseteq U} \mathcal F(V)
&
\widehat{\mathcal F}(U)\xleftarrow{\hspace{3pt}\cong\hspace{3pt}} \displaystyle\varinjlim_{V\subseteq U} \widehat{\mathcal F}(V)
\end{array}
\]
The maps $\rho_{UV}$ are called restrictions and $\varepsilon_{VU}$ are called extensions. Above, $s_i$ is a (co)section over $U_i$ and $s_j$ is a (co)section over $U_j$. For $s$ a (co)section of $U$ with $V\subset U\subset W$, write $s|_V$ for $\rho_{UV}(s)$ and $s|^W$ for $\varepsilon_{UW}(s)$. The isomorphisms with the colimits and limits are the natural maps from the respective colimit and limit diagrams.

Now we relate sheaves to persistent homology. All cohomology is be taken over a field $k$.

Remark: Suppose we have a finite point sample $P$ and some $t>0$, for which we can construct the nerve $N_{t,P}$, a cellular complex, of the union of balls of radius $t$ around the points of $P$. If $t'<t$, then there is a natural inclusion $N_{t',P}\hookrightarrow N_{t,P}$, which induces a map $H_\ell(N_{t',P})\to H_\ell(N_{t,P})$ on degree $\ell$ homology groups. Define a sheaf $\mathcal F^\ell$ over $\R$ for which
\[
\mathcal F^\ell(U) = H^\ell(N_{\inf(U),P}),
\hspace{1cm}
\mathcal F^\ell_t = H^\ell(N_{t,P}).
\]
This is indeed a sheaf, as $V\subseteq U$ implies that $\inf(U)\leqslant \inf(V)$, giving a natural map $\mathcal F^\ell(U)\to \mathcal F^\ell(V)$. The gluing axiom is also satisfied: assume without loss of generality that $\inf(U_i)\leqslant \inf(U_j)$ and take $s_i\in \mathcal F^\ell(U_i)$, $s_j\in \mathcal F^\ell(U_j)$ with the assumptions as above. Then $\inf(U_i)=\inf(U_i\cup U_j)$ and $\inf(U_j) = \inf(U_i\cap U_j)$, so
\[
\mathcal F^\ell(U_i) = \mathcal F^\ell(U_i\cup U_j),
\hspace{1cm}
\mathcal F^\ell(U_j) = \mathcal F^\ell(U_i\cap U_j),
\]
hence $s_i=s\in \mathcal F^\ell(U_i\cup U_j)$ and $s|_{U_j} = s_i|_{U_j} = s_i|_{U_i\cap U_j} = s_j|_{U_i\cap U_j} = s_j|_{U_j} = s_j$. Therefore sheaves capture all the persistent homology data. Note we do not take the sheaf cohomology of $\mathcal F^\ell$, instead the usual sequence of homology groups is induced by any increasing sequence in $\R$.

References: Bredon (Sheaf theory, Section VI.4), Bott and Tu (Differential forms in algebraic topology, Section 10)

Sunday, May 28, 2017

Čech (co)homology

In this post we briefly recall the construction of Čech cohomology as well as compute a few examples. Let $X$ be a topological space with a cover $\mathcal U = \{U_i\}$, $\mathcal F$ a $C$-valued sheaf on $X$, and $\widehat{\mathcal F}$ a $C$-valued cosheaf on $X$, for some category $C$ (usually abelian groups).

Definition: The nerve $N$ of $\mathcal U$ is the simplicial complex that has an $r$-simplex $\rho$ for every non-empty intersection of $r+1$ opens of $\mathcal U$. The support $U_\rho$ of $\rho$ is this non-empty intersection. The $r$-skeleton $N_r$ of $N$ is the collection of all $r$-simplices.

Remark: The sheaf $\mathcal F$ and cosheaf $\widehat {\mathcal F}$ may be viewed as being defined either on the opens of $\mathcal U$ over $X$, or on the nerve $N$ of $\mathcal U$. Indeed, the inclusion map $V\hookrightarrow U$ on opens is given by the forgetful map $\partial$. That is, $\partial_i:N_r\to N_{r-1}$ forgets the $i$th open defining $\rho\in N_r$, so if $U_\rho = U_0\cap \cdots \cap U_r$, then $U_{\partial_0\rho} = U_1\cap\cdots \cap U_r$.

The Čech (co)homology will be defined as the (co)homology of a particular complex, whose boundary maps will be induced by, equivalently, the inclusion map on opens or $\partial_i$ on simplices.

Definition: In the context above:
  • a $p$-chain is a finite formal sum of elements $a_{\sigma_i}\in \widehat{\mathcal F}(U_{\sigma_i})$, for every $\sigma_i$ a $p$-simplex,
  • a $q$-cochain is a finite formal sum of elements $b_{\tau_j}\in \mathcal F(U_{\tau_j})$, for every $\tau_j$ a $q$-simplex,
  • the $p$-differential is the map $d_p:\check C_p(\mathcal U,\mathcal F) \to \check C_{p-1}(\mathcal U,\mathcal F)$ given by
\[
d_p(a_\sigma) = \sum_{i=0}^p (-1)^i \widehat{\mathcal F}(\partial_i)(a_\sigma),\]
  • the $q$-codifferential is the map $\delta^q:\check C^q(\mathcal U,\mathcal F) \to \check C^{q+1}(\mathcal U,\mathcal F)$ given by
\[
\delta^q(b_\tau) = \sum_{j=0}^{q+1} (-1)^j \mathcal F(\partial_j)(b_\tau).\]The collection of $p$-chains form a group $\check C_p(\mathcal U,\mathcal F)$ and the collection of $q$-cochains also form a group $\check C^q(\mathcal U,\mathcal F)$, both under the respective group operation in each coordinate. The Čech homology $H_*(\mathcal U,\mathcal F)$ is the homology of the chain complex of $\check C_p$ groups, and the Čech cohomology $H^*(\mathcal U,\mathcal F)$ is the cohomology of the cochain complex of $\check C^q$ groups.

Example: Let $X=S^1$ with a cover $\mathcal U = \{U,V,W\}$ and associated nerve $N_{\mathcal U}$ as below.
The cover is chosen so that all intersections are contractible. Let $k$ be a field. Let $\widehat{\mathcal F}$ be a cosheaf over $N$ and $\mathcal F$ a sheaf over $N$, with $\widehat {\mathcal F}(\text{0-cell})=\mathcal F(\text{1-cell}) = (1,1)\in k^2$ and $\widehat{\mathcal F}(\text{1-cell})=\mathcal F(\text{0-cell})=1\in k$, so that the natural extension and restriction maps work. Then all the degree 0 and 1 chain and cochain groups are $k^3$. Giving a counter-clockwise orientation to $X$, we easily see that
\begin{align*}
d_1\sigma_{U\cap V} & = \sigma_V-\sigma_U, & \delta^0\sigma_U & = \sigma_{U\cap V}-\sigma_{W\cap U}, \\
d_1\sigma_{V\cap W} & = \sigma_W-\sigma_V, & \delta^0\sigma_V & = \sigma_{V\cap W}-\sigma_{U\cap V}, \\
d_1\sigma_{W\cap U} & = \sigma_U-\sigma_W, & \delta^0\sigma_W & = \sigma_{W\cap U}-\sigma_{V\cap W}.\end{align*}If we give an ordered basis of $(\sigma_{U\cap V},\sigma_{V\cap W},\sigma_{W\cap U})$ to $\check C_1(\mathcal U,\widehat{\mathcal F})$ and $\check C^1(\mathcal U,\mathcal F)$, and $(\sigma_U,\sigma_V,\sigma_W)$ to $\check C_0(\mathcal U,\widehat{\mathcal F})$ and $\check C^0(\mathcal U,\mathcal F)$, we find that
\[
d_1 = \begin{bmatrix}
-1 & 0 & 1 \\ 1 & -1 & 0 \\ 0 & 1 & -1
\end{bmatrix}
\sim
\begin{bmatrix}
1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0
\end{bmatrix},
\hspace{1cm}
\delta^0 = \begin{bmatrix}
-1 & 1 & 0 \\ 0 & -1 & 1 \\ 1 & 0 & -1
\end{bmatrix}
\sim
\begin{bmatrix}
1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0
\end{bmatrix}.
\]
The Čech chain and cochain complexes are then
\[
0 \to \check C_1(\mathcal U,\widehat{\mathcal F}) \tov{d_1} \check C_0(\mathcal U,\widehat{\mathcal F}) \to 0,
\hspace{1cm}
0 \to \check C^0(\mathcal U,\mathcal F) \tov{\delta^0} \check C^1(\mathcal U,\mathcal F) \to 0,\]for which
\begin{align*}
H_1(\mathcal U,\widehat{\mathcal F}) & = \ker(d_1) = k,
& H^0(\mathcal U,\mathcal F) & = \ker(\delta^0) = k, \\
H_0(\mathcal U,\widehat{\mathcal F}) & = k^3/\im(d_1) = k^3/k^2 = k,
& H^1(\mathcal U,\mathcal F) & = k^3/\im(\delta^0) = k^3/k^2 = k.\end{align*}By the Čech-de Rham theorem, we know that the (co)homology groups should agree with the usual groups for $S^1$, as $\mathcal U$ was a good cover, which they do. Next we compute another example with a view towards persistent homology.

Definition: Let $X$ be a topological space and $f:X\to Y$ a map with $\mathcal U$ covering $f(X)$. The Leray sheaf $L^i$ of degree $i$ over $N_{\mathcal U}$ is defined by $L^i(\sigma) = H^i(f^{-1}(U_\sigma))$ and $L^i(\sigma\hookrightarrow \tau) = H^i(f^{-1}(U_\tau)\hookrightarrow f^{-1}(U_\sigma))$, whenever $\sigma$ is a face of $\tau$.

Theorem (Curry, Theorem 8.2.21): In the context above, if $N_{\mathcal U}$ is at most 1-dimensional, then for any $t\in \R$,
\[
H^i(f^{-1}(-\infty,t])\cong H^0((-\infty,t],L^i)\oplus H^1((-\infty,t],L^{i-1}).\]
The idea is to apply this theorem in a filtration, for different values of $t$, but in the example below we will have $t$ large enough so that $X\subset f^{-1}(-\infty,t]$.

Example: Let $f:S^1\to \R$ be a projection map, and let $X = f(S^1)$ with a cover $\mathcal U = \{U,V\}$ as below.
Note that although $f^{-1}(U)\cap f^{-1}(V)$ is not contractible, $U\cap V$ is, and the Čech cohomology will be over $\mathcal U\subset \R$, so we are fine in applying the Čech-de Rham theorem. It is immediate that the only non-zero Leray sheaves are $L^0$, for which
\[
L^0(\sigma_U) = k,\hspace{1cm}
L^0(\sigma_V) = k,\hspace{1cm}
L^0(\sigma_{U\cap V}) = k^2,\]hence $\check C^0(\mathcal U,L^0)=\check C^1(\mathcal U,L^0) = k^2$. Giving $\check C^0(\mathcal U,L^0)$ the ordered basis $(\sigma_U,\sigma_V)$ and noting the homology maps $H^0(f^{-1}(U)\hookrightarrow f^{-1}(U\cap V))$ and $H^0(f^{-1}(V)\hookrightarrow f^{-1}(U\cap V))$ are simply $1\mapsto (1,1)$, the \v Cech complex is
\[
0 \to \check C^0(\mathcal U,L^0) \tov{\left[\begin{smallmatrix}-1 & -1 \\ 1 & 1 \end{smallmatrix}\right]} \check C^1(\mathcal U,L^0) \to 0.
\]
Hence $H^0(\mathcal U,L^0)=\ker(\delta^0)=k$ and $H^1(\mathcal U,L^0)=k^2/\im(\delta^0)=k^2/k=k$, allowing us to conclude, using Curry's and the Čech--de Rham theorems, that
\begin{align*}
H^0(S^1) & \cong H^0(\mathcal U,L^0) \oplus H^1(\mathcal U,L^{-1}) = k\oplus 0 = k, \\
H^1(S^1) & \cong H^0(\mathcal U,L^1) \oplus H^1(\mathcal U,L^0) = 0\oplus k = k, \\
H^2(S^1) & \cong H^0(\mathcal U,L^2) \oplus H^1(\mathcal U,L^1) = 0\oplus 0=0,\end{align*}as expected.

References: Bott and Tu (Differential forms in algebraic topology, Section 10), Bredon (Sheaf theory, Section VI.4), Curry (Sheaves, cosheaves, and applications, Section 8)