同调代数初步(Homological Algebra: A First Look)

阶段3.5 · 范畴论进阶 · 第6章 | 预计学习时间: 5 小时 | 难度: 🟡 进阶

📋 前置知识

同调代数(homological algebra)回答一个核心的哲学问题:当我们把一个"好"的函子作用到一个对象上时,有多少信息被悄悄丢掉了?它把"信息的遗漏"装进一族阿贝尔群中,称为导出函子(derived functor),并通过长正合列把不同对象之间的缺失"串"起来。

"同调,就是给'丢了的信息'一份户口。" —— 同调代数的精神

本章覆盖 6 个关键概念:正合列、短正合列、链复形、同调群、蛇形引理、导出函子。每一个都将在 Phase 8(层上同调)中以"几何 + 代数"双重身份重新登场。

1. 正合列:把"无缝衔接"写成等式

正合(Exact)

阿贝尔群(或 $R$-模)的两步序列 $A\xrightarrow{f} B\xrightarrow{g} C$ 称为在 $B$ 处正合,若 $$ \mathrm{Im}(f) \;=\; \ker(g). $$ 一段更长的序列 $\cdots\to A_{n-1}\to A_n\to A_{n+1}\to\cdots$ 称为正合列,若它在每一项都正合。

直观:上一支箭头"塞进 $B$ 的东西"恰好被下一支箭头"杀掉"——既不多也不少。

2. 短正合列(Short Exact Sequence, SES)

短正合列

形如 $$ 0 \longrightarrow A \xrightarrow{\,f\,} B \xrightarrow{\,g\,} C \longrightarrow 0 $$ 的正合列。它同时说三件事:

一句话:SES = "把 $A$ 嵌入 $B$,商出 $C$"的范畴语言

图解 1:短正合列与一个具体例子

短正合列 $\textcolor{5d6d7e}{0\to A\to B\to C\to 0}$:单射 + 满射 + $\textcolor{5d6d7e}{\mathrm{Im} = \ker}$
抽象形式
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{A}$
$\textcolor{1e5fa8}{B}$
$\textcolor{1e5fa8}{C}$
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{f}$
$\textcolor{1e5fa8}{g}$
单射
满射
$\textcolor{6b3d8a}{\mathrm{Im}(f) = \ker(g)}$
具体例子:$\textcolor{b85c10}{0\to \mathbb{Z}\xrightarrow{\times 2}\mathbb{Z}\to \mathbb{Z}/2\mathbb{Z}\to 0}$
$\textcolor{5d6d7e}{0}$
$\textcolor{b85c10}{\mathbb{Z}}$
$\textcolor{b85c10}{\mathbb{Z}}$
$\textcolor{b85c10}{\mathbb{Z}/2\mathbb{Z}}$
$\textcolor{5d6d7e}{0}$
$\textcolor{b85c10}{\times 2}$
mod $\textcolor{b85c10}{2}$
$\textcolor{6b3d8a}{\times 2}$ 是单射,$\textcolor{6b3d8a}{\bmod\, 2}$ 是满射,$\textcolor{6b3d8a}{\mathrm{Im}(\times 2) = 2\mathbb{Z} = \ker(\bmod\, 2)}$ —— 三项条件全部满足

例 1:常见的短正合列

3. 链复形与同调群

链复形(Chain Complex)

一族阿贝尔群(或模)$\{C_n\}_{n\in\mathbb{Z}}$ 配上"边缘算子" $d_n: C_n\to C_{n-1}$,满足 $$ d_{n}\circ d_{n+1} \;=\; 0,\qquad \text{即}\ \mathrm{Im}\, d_{n+1}\;\subseteq\;\ker d_n. $$ 这正是"正合的弱化"——只要求"前一像"装在"后一核"里,不一定相等。

同调群(Homology)

差距用商群度量: $$ H_n(C_\bullet)\;:=\;\frac{\ker d_n}{\mathrm{Im}\, d_{n+1}}. $$ $H_n = 0$ 意味着复形在第 $n$ 项"恰好正合"。同调群测量正合的失败

术语:$\ker d_n$ 中的元素叫闭链(cycle),$\mathrm{Im}\, d_{n+1}$ 中的元素叫边界(boundary)。$H_n$ = "闭链模边界" = "形似洞但不真是边界"的等价类。

图解 2:链复形与 $H_n$ 的"商"

链复形:$\textcolor{5d6d7e}{d^2 = 0}$ 让我们能定义 $\textcolor{5d6d7e}{H_n = \ker d_n / \mathrm{Im}\, d_{n+1}}$
$\textcolor{5d6d7e}{\cdots}$
$\textcolor{1e5fa8}{C_{n+1}}$
$\textcolor{1e5fa8}{C_n}$
$\textcolor{1e5fa8}{C_{n-1}}$
$\textcolor{5d6d7e}{\cdots}$
$\textcolor{1e5fa8}{d_{n+1}}$
$\textcolor{1e5fa8}{d_n}$
放大 $\textcolor{1e5fa8}{C_n}$ 内部
$\textcolor{1e5fa8}{C_n}$
$\textcolor{b85c10}{\ker d_n}$(闭链)
$\textcolor{1d7a45}{\mathrm{Im}\, d_{n+1}}$(边界)
$\textcolor{8e44ad}{H_n = }$ 橙 / 绿
"洞的代数"

例 2:单纯链复形与拓扑同调

有限单纯复形 $K$ 给出 $C_n(K) = $ 以 $n$-单形为基的自由阿贝尔群;边缘算子 $d_n$ 取定向的"面"。这时 $$ H_n(K)\;\cong\;\text{$K$ 在第 $n$ 维的"洞"} $$ —— 这就是阶段 3 中提到的"同调群 $H_n$"。代数几何中类似的构造给出层上同调

4. 蛇形引理(Snake Lemma):本章的灵魂

蛇形引理把"两条短正合列之间的纵向映射"翻译成一条蜿蜒穿过的长正合列。它是同调代数最常用、也最美丽的诊断工具,被誉为"同调代数的瑞士军刀"。

蛇形引理

设有两条 SES 的交换图(行皆正合): $$ \begin{array}{ccccccccc} 0 & \to & A' & \xrightarrow{i'} & B' & \xrightarrow{p'} & C' & \to & 0 \\ & & \downarrow\!{\scriptstyle f} & & \downarrow\!{\scriptstyle g} & & \downarrow\!{\scriptstyle h} & & \\ 0 & \to & A & \xrightarrow{i} & B & \xrightarrow{p} & C & \to & 0 \end{array} $$ 则存在连接同态 $\delta: \ker h\to \mathrm{coker}\, f$ 使得下面的"蛇形"长正合列成立: $$ \ker f \to \ker g \to \ker h \xrightarrow{\;\delta\;} \mathrm{coker}\, f \to \mathrm{coker}\, g \to \mathrm{coker}\, h. $$

图解 3:蛇形引理 —— 整个同调代数的"核心图"

蛇形引理的完整 3×3 交换图 + 连接同态 $\textcolor{5d6d7e}{\delta}$(虚线蛇形箭头)
$\textcolor{b85c10}{\ker f}$
$\textcolor{b85c10}{\ker g}$
$\textcolor{b85c10}{\ker h}$
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{A'}$
$\textcolor{1e5fa8}{B'}$
$\textcolor{1e5fa8}{C'}$
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{i'}$
$\textcolor{1e5fa8}{p'}$
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{A}$
$\textcolor{1e5fa8}{B}$
$\textcolor{1e5fa8}{C}$
$\textcolor{5d6d7e}{0}$
$\textcolor{1e5fa8}{i}$
$\textcolor{1e5fa8}{p}$
$\textcolor{5d6d7e}{f}$
$\textcolor{5d6d7e}{g}$
$\textcolor{5d6d7e}{h}$
$\textcolor{1d7a45}{\mathrm{coker}\, f}$
$\textcolor{1d7a45}{\mathrm{coker}\, g}$
$\textcolor{1d7a45}{\mathrm{coker}\, h}$
$\textcolor{c0392b}{\delta}$ 连接同态
"chase the diagram"
最终的长正合列:$\textcolor{6b3d8a}{\ker f\to \ker g\to \ker h\;\xrightarrow{\delta}\;\mathrm{coker}\, f\to \mathrm{coker}\, g\to \mathrm{coker}\, h}$ —— 整个图的"诊断报告"

"图追逐法"(diagram chasing)速览

$\delta$ 的构造直觉:取 $c'\in \ker h\subseteq C'$。由 $p'$ 满,存在 $b'\in B'$ 使 $p'(b') = c'$。考虑 $g(b')\in B$;由交换性,$p(g(b')) = h(p'(b')) = h(c') = 0$,故 $g(b')\in \ker p = \mathrm{Im}\, i$,存在唯一 $a\in A$ 使 $i(a) = g(b')$。最后定义 $\delta(c') := [a]\in \mathrm{coker}\, f$,验证不依赖 $b'$ 的选择。这就是chase the diagram的典型样板。

蛇形引理 → 同调长正合列

对一族链复形的短正合列 $0\to A_\bullet\to B_\bullet\to C_\bullet\to 0$,反复应用蛇形引理给出一条同调长正合列: $$ \cdots \to H_n(A)\to H_n(B)\to H_n(C)\xrightarrow{\delta} H_{n-1}(A)\to \cdots $$ 这是同调代数实际"输出"的最重要工具——计算 $H_n$ 时,几乎都靠它把"未知项"和"已知项"串成一条链。

5. 导出函子:测量"左/右正合"的失败

左正合 / 右正合(回顾)

函子 $F: \mathcal{A}\to \mathcal{B}$(阿贝尔范畴间,加性)称为

典型:$\mathrm{Hom}(M, -)$ 是左正合;$-\otimes M$ 是右正合;全局截面 $\Gamma$ 是左正合。

右导出函子 $R^n F$(左正合 $F$ 的情形)

想知道"$F(C)$ 后面缺了什么"。方法:取 $A$ 的内射消解 $$ 0\to A\to I^0\to I^1\to I^2\to\cdots $$ 其中 $I^k$ 均为内射对象,序列正合;然后抹掉 $A$ 一项,再应用 $F$,得到 $$ 0\to F(I^0)\to F(I^1)\to F(I^2)\to\cdots $$ 它不一定再正合,于是定义 $$ R^n F(A)\;:=\; H^n\bigl(F(I^\bullet)\bigr). $$ 可以证明 $R^n F$ 不依赖于消解的具体选取,并且 $R^0 F\cong F$($F$ 自己),$R^n F$($n\ge 1$)测量 $F$ 在何处"失正合"

图解 4:右导出函子构造的"四步流水线"

左正合函子 $\textcolor{5d6d7e}{F}$ 的右导出 $\textcolor{5d6d7e}{R^n F}$ 的标准计算流程
① 起点
对象 $\textcolor{2c3e50}{A\in \mathcal{A}}$
+ 左正合函子
$\textcolor{2c3e50}{F: \mathcal{A}\to\mathcal{B}}$
② 取内射消解
$\textcolor{2c3e50}{0\to A\to I^0\to}$
$\textcolor{2c3e50}{I^1\to I^2\to\cdots}$
所有 $\textcolor{2c3e50}{I^k}$ 是内射,
整体正合
③ 应用 $\textcolor{1d7a45}{F}$、抹去 $\textcolor{1d7a45}{A}$
$\textcolor{2c3e50}{0\to F(I^0)\to}$
$\textcolor{2c3e50}{F(I^1)\to F(I^2)}$
$\textcolor{2c3e50}{\to\cdots}$
可能不再正合
④ 取上同调
$\textcolor{6b3d8a}{R^n F(A)}$
$\textcolor{6b3d8a}{:= H^n F(I^\bullet)}$
关键事实:
· $\textcolor{2c3e50}{R^0 F(A)\cong F(A)}$;
· 短正合列 $\textcolor{2c3e50}{0\to A\to B\to C\to 0}$ 诱导长正合列 $\textcolor{2c3e50}{\;0\to R^0 F(A)\to R^0 F(B)\to R^0 F(C)\to R^1 F(A)\to R^1 F(B)\to R^1 F(C)\to R^2 F(A)\to\cdots}$;
· 类似定义:左导出 $\textcolor{2c3e50}{L_n F}$(对右正合函子,用射影消解)。$\textcolor{2c3e50}{L_n(-\otimes M) = \mathrm{Tor}_n(-, M)}$;$\textcolor{2c3e50}{R^n\mathrm{Hom}(M, -) = \mathrm{Ext}^n(M, -)}$。

例 3:$\mathrm{Ext}$ 和 $\mathrm{Tor}$

6. 生活实例:信息的"遗漏"= 同调的障碍

想象一个企业里有三层组织:基层 $A$、中层 $B$、高层 $C$。短正合列 $$ 0\to A\to B\to C\to 0 $$ 说"中层 = 基层 + 高层的合成"。当我们把"能直接给客户的服务"这样的函子 $F$ 作用上去时:

换言之:$R^n F$ 是一份"被悄悄丢掉的项"清单,让我们不致于以为 $F$ 已经把所有信息搬运完整。

7. 练习

练习 1(分裂正合列)

短正合列 $0\to A\xrightarrow{f} B\xrightarrow{g} C\to 0$ 称为分裂,若存在 $s: C\to B$ 使 $g\circ s = \mathrm{id}_C$。证明:分裂 ⟺ 存在 $r: B\to A$ 使 $r\circ f = \mathrm{id}_A$ ⟺ $B\cong A\oplus C$(自然分裂)。

练习 2(同调群计算)

设链复形 $\cdots\to 0\to \mathbb{Z}\xrightarrow{\times 2}\mathbb{Z}\to 0\to\cdots$(非零项位于 $C_1, C_0$)。计算 $H_0$ 与 $H_1$。

提示

$d_1$ 是 $\times 2$,单射故 $H_1 = \ker d_1 = 0$;$H_0 = \mathbb{Z}/\mathrm{Im}(\times 2) = \mathbb{Z}/2\mathbb{Z}$。

练习 3(蛇形引理的特殊情形)

若图中 $f, g$ 都是同构,证明 $h$ 也是同构。提示:把 $\ker f, \ker g, \mathrm{coker}\, f, \mathrm{coker}\, g$ 设为 $0$,看长正合列。

练习 4(一个简单的 Ext 计算)

用 $0\to\mathbb{Z}\xrightarrow{\times n}\mathbb{Z}\to \mathbb{Z}/n\to 0$ 作为 $\mathbb{Z}/n$ 的射影消解,对 $\mathrm{Hom}(\mathbb{Z}/n, -)$ 求导出,验证 $\mathrm{Ext}^1_\mathbb{Z}(\mathbb{Z}/n, \mathbb{Z}/m)\cong \mathbb{Z}/\gcd(n,m)$。

练习 5(直觉题:ResNet)

ResNet 中的残差块 $y = x + F(x)$ 让人联想到分裂短正合列 $0\to F(x)\to y\to x\to 0$($y\twoheadrightarrow x$ 由恒等映射给出,故必然分裂)。请用一段话解释:为什么"短正合 + 分裂"在工程上对应"梯度可以无损流动"?