# Wednesday, February 23

:::{.remark}
Recall the definition of an additive category:

- $\Mor_{\cat C}(\wait, \wait)$ are abelian groups, 
- Compositions distribute
- A zero object
- Finite products $A\times B \iff$ finite coproducts $A \oplus B \iff$ finite biproducts:

\begin{tikzcd}
	A && {A \oplus B} && B
	\arrow["{i_1}", shift left=3, from=1-1, to=1-3]
	\arrow["{i_2}"', shift right=3, from=1-5, to=1-3]
	\arrow["{p_2}"', shift right=1, from=1-3, to=1-5]
	\arrow["{p_1}", shift left=1, from=1-3, to=1-1]
\end{tikzcd}

> [Link to Diagram](https://q.uiver.app/?q=WzAsMyxbMCwwLCJBIl0sWzIsMCwiQSBcXG9wbHVzIEIiXSxbNCwwLCJCIl0sWzAsMSwiaV8xIiwwLHsib2Zmc2V0IjotM31dLFsyLDEsImlfMiIsMix7Im9mZnNldCI6M31dLFsxLDIsInBfMiIsMix7Im9mZnNldCI6MX1dLFsxLDAsInBfMSIsMCx7Im9mZnNldCI6LTF9XV0=)

  where we require

  - $p_j i_j = \id$
  - $p_j i_k = 0$ for $i\neq j$
  - $i_1 p_1 + i_2 p_2 = \id_{A \oplus B}$.


- Abelian cats: additive, plus existence of kernels, cokernels, images.

:::

:::{.definition title="Additive Functors"}
A functor $F\in [\cat A, \cat B]$ is **additive** iff the induced map $F_*: \Mor_{\cat A}(A, B) \to \Mor_{\cat B}(FA, FB) \in \Ab\Grp$ is a morphism of groups.
:::

:::{.slogan}
Additive functors preserve 

- polynomial identities in morphisms,
- biproducts, so $F(A \oplus B) \cong FA \oplus FB$,
- complexes, so $d_{n+1} d_n = 0$,
- chain homotopy equivalences of complexes, which is a polynomial identity of the form $ds + sd = h$.

:::

:::{.example title="of additive functors"}
\envlist

- For $A\in \cat{A} \in \Add\Cat$, the functors $\Mor_{\cat A}(A, \wait): \cat A\to \Ab\Grp$ and $\Mor_{\cat A}(\wait, A):\cat{A}\to \opcat{\Ab\Grp}$.
- For $A\in \rmod$, $F_A(\wait) \da A\tensor_R(\wait): \rmod\to\Ab\Grp$.
  - If $R \in \CRing$, is commutative $F_A(\wait): \rmod\to\rmod$.
- For $\cat{I}$ and index category, recalling $\cat{A}^{\cat I} = [\cat I, \cat A]$, the functors $\cocolim \cat{A}^{\cat I} \to \cat A$ and $\colim: \cat{A}^{\cat I} \to \cat{A}$ when they exist.
- For $\Sh(X; \Ab\Grp)$, the global sections functor $\globsec{X; \wait}: \Sh(X, \Ab\Grp) \to \Ab\Grp$.
  - For $f\in \Top(X, Y)$, pushforward $f_*: \Sh(X) \to \Sh(Y)$ (which includes inclusion of a point, i.e. taking stalks at a point) and $f\inv: \Sh(Y)\to \Sh(X)$ (which includes restriction).
- Local homs $\Hom(\mcf, \wait): \Sh(X; \mods{\OO_X}) \to \Sh(X; \mods{\OO_X})$.
- $\st_x: \Sh(X; \Ab\Grp)\to \Ab\Grp$ where $\mcf\mapsto \mcf_x$.

:::

:::{.remark}
Recall the definition of exactness for chain complexes over abelian categories: $\im d^{n-1} = \ker d^n$.
Note that one can use epi-mono factorization to **splice**:

\begin{tikzcd}
	\cdots && {C^{n-1}} && {C^n} && {C^{n+1}} && \cdots \\
	\\
	&&& {Z^{n-1}} && {Z^n} \\
	&& 0 && 0 && 0
	\arrow["{d^{n-1}}", from=1-3, to=1-5]
	\arrow["{d^{n}}", from=1-5, to=1-7]
	\arrow[color={rgb,255:red,92;green,92;blue,214}, two heads, from=1-3, to=3-4]
	\arrow[color={rgb,255:red,214;green,92;blue,92}, hook, from=3-4, to=1-5]
	\arrow[color={rgb,255:red,92;green,92;blue,214}, two heads, from=1-5, to=3-6]
	\arrow[color={rgb,255:red,214;green,92;blue,92}, hook, from=3-6, to=1-7]
	\arrow["{d^{n-2}}", from=1-1, to=1-3]
	\arrow["{d^{n+1}}", from=1-7, to=1-9]
	\arrow[color={rgb,255:red,214;green,92;blue,92}, from=4-3, to=3-4]
	\arrow[color={rgb,255:red,92;green,92;blue,214}, from=3-4, to=4-5]
	\arrow[color={rgb,255:red,214;green,92;blue,92}, from=4-5, to=3-6]
	\arrow[color={rgb,255:red,92;green,92;blue,214}, from=3-6, to=4-7]
\end{tikzcd}

> [Link to Diagram](https://q.uiver.app/?q=WzAsMTAsWzIsMCwiQ157bi0xfSJdLFs0LDAsIkNebiJdLFs2LDAsIkNee24rMX0iXSxbMywyLCJaXntuLTF9Il0sWzUsMiwiWl5uIl0sWzgsMCwiXFxjZG90cyJdLFswLDAsIlxcY2RvdHMiXSxbMiwzLCIwIl0sWzQsMywiMCJdLFs2LDMsIjAiXSxbMCwxLCJkXntuLTF9Il0sWzEsMiwiZF57bn0iXSxbMCwzLCIiLDIseyJjb2xvdXIiOlsyNDAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJlcGkifX19XSxbMywxLCIiLDIseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoiaG9vayIsInNpZGUiOiJ0b3AifX19XSxbMSw0LCIiLDIseyJjb2xvdXIiOlsyNDAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJlcGkifX19XSxbNCwyLCIiLDIseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoiaG9vayIsInNpZGUiOiJ0b3AifX19XSxbNiwwLCJkXntuLTJ9Il0sWzIsNSwiZF57bisxfSJdLFs3LDMsIiIsMix7ImNvbG91ciI6WzAsNjAsNjBdfV0sWzMsOCwiIiwyLHsiY29sb3VyIjpbMjQwLDYwLDYwXX1dLFs4LDQsIiIsMix7ImNvbG91ciI6WzAsNjAsNjBdfV0sWzQsOSwiIiwyLHsiY29sb3VyIjpbMjQwLDYwLDYwXX1dXQ==)

This yields collections of SESs, 
\[
0\to Z^{n-1} \to C^n\to Z^{n}\to 0
.\]

Recall the definition of right/left/middle exactness: for $0\to A\to B\to C\to 0$ and covariant functors $F$:

- Right exact: $FA \to FB \to FC\to 0$,
- Long exact: $0\to FA \to FB \to FC$,
- Middle exact: $FA \to FB \to FC$.

For contravariant functors, e.g. left exactness means $0\to FC\to FB \to FA$, so injectivity is preserved.
Equivalently, $F: \cat{A}\to \cat{B}$ is left exact iff the covariant $F: \opcat{\cat A} \to \cat{B}$ is left-exact.
:::

:::{.example title="?"}
Of exactness:

- $\globsec{\wait}$ is left-exact,
- $\st_x$ is fully exact,
- $f_*$ is left exact,
- $f\inv$ is fully exact, since this preserves stalks,
- $A\tensor_R(\wait)$ is right exact,
- $\Hom_{\rmod}(A, \wait), \Hom_{\rmod}(\wait, A)$ are both left exact, which we'll prove.

:::

:::{.proposition title="?"}
$\Hom_{\rmod}(A, \wait), \Hom_{\rmod}(\wait, A)$ are both left exact.
:::

:::{.proof title="?"}
Use that kernels are monomorphisms:

\begin{tikzcd}
	0 && {B'} && B && {B''} && 0 \\
	\\
	&&&& A \\
	{?} && {\Hom(A, B')} && {\Hom(A, B)} && {\Hom(A, B'')}
	\arrow["\exists", dashed, from=3-5, to=1-3]
	\arrow[from=1-1, to=1-3]
	\arrow["i", hook, from=1-3, to=1-5]
	\arrow[""{name=0, anchor=center, inner sep=0}, "p", from=1-5, to=1-7]
	\arrow[from=1-7, to=1-9]
	\arrow[from=4-1, to=4-3]
	\arrow[from=4-3, to=4-5]
	\arrow[""{name=1, anchor=center, inner sep=0}, from=4-5, to=4-7]
	\arrow["f"', from=3-5, to=1-5]
	\arrow["{\Hom(A, \wait)}", shorten <=13pt, shorten >=13pt, Rightarrow, from=0, to=1]
\end{tikzcd}

> [Link to Diagram](https://q.uiver.app/?q=WzAsMTAsWzAsMCwiMCJdLFsyLDAsIkInIl0sWzQsMCwiQiJdLFs2LDAsIkInJyJdLFs4LDAsIjAiXSxbNCwyLCJBIl0sWzAsMywiPyJdLFsyLDMsIlxcSG9tKEEsIEInKSJdLFs0LDMsIlxcSG9tKEEsIEIpIl0sWzYsMywiXFxIb20oQSwgQicnKSJdLFs1LDEsIlxcZXhpc3RzIiwwLHsic3R5bGUiOnsiYm9keSI6eyJuYW1lIjoiZGFzaGVkIn19fV0sWzAsMV0sWzEsMiwiaSIsMCx7InN0eWxlIjp7InRhaWwiOnsibmFtZSI6Imhvb2siLCJzaWRlIjoidG9wIn19fV0sWzIsMywicCJdLFszLDRdLFs2LDddLFs3LDhdLFs4LDldLFs1LDIsImYiLDJdLFsxMywxNywiXFxIb20oQSwgXFx3YWl0KSIsMCx7InNob3J0ZW4iOnsic291cmNlIjoyMCwidGFyZ2V0IjoyMH19XV0=)

Then show $if=0 \implies f=0$, using that $B'\to B$ is mono.
Similarly $pf=0\implies f=ig$ for some $g$.
:::

:::{.remark}
A nice proof that $\globsec{\wait}$ is left-exact: realize $\globsec{X; \wait} \cong \Hom_{\Sh(X)}(\constantsheaf{\ZZ}, \wait)$, which is left-exact for free.
Use that the map $\constantsheaf{\ZZ} \to \mcf(X)$ is determined by $1\mapsto s$ and extend using $n = n\cdot 1$.
:::