履歴: プログラミング/圏論入門
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 73 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2026/12/6 10:25:00 | プログラミング/圏論入門 最新版 | 124,596 | +1 | -1 | 表示 | 差分 | — |
| 2026/11/21 16:05:51 | プログラミング/圏論入門 | 124,600 | +2 | -3 | 表示 | 差分 | 選択 |
| 2026/11/15 12:38:08 | プログラミング/圏論入門 | 124,601 | +76 | -29 | 表示 | 差分 | 選択 |
| 2026/11/14 21:16:05 | プログラミング/圏論入門 | 123,185 | +62 | -31 | 表示 | 差分 | 選択 |
| 2026/11/14 13:10:31 | プログラミング/圏論入門 | 122,470 | +189 | -132 | 表示 | 差分 | 選択 |
| 2026/9/24 10:55:34 | プログラミング/圏論入門 | 119,835 | +3 | -3 | 表示 | 差分 | 選択 |
| 2026/9/10 15:42:28 | プログラミング/圏論入門 | 119,857 | +36 | -3 | 表示 | 差分 | 選択 |
| 2026/9/9 16:08:52 | プログラミング/圏論入門 | 119,032 | +153 | -249 | 表示 | 差分 | 選択 |
| 2026/8/28 22:32:51 | プログラミング/圏論入門 | 120,396 | +370 | -1 | 表示 | 差分 | 選択 |
| 2026/8/25 10:27:06 | プログラミング/圏論入門 | 110,927 | +8 | -6 | 表示 | 差分 | 選択 |
| 2026/8/24 21:57:25 | プログラミング/圏論入門 | 110,853 | +143 | -1 | 表示 | 差分 | 選択 |
| 2026/8/24 11:35:31 | プログラミング/圏論入門 | 107,041 | +117 | -8 | 表示 | 差分 | 選択 |
| 2026/8/23 14:37:27 | プログラミング/圏論入門 | 104,574 | +3 | -5 | 表示 | 差分 | 選択 |
| 2026/8/22 13:05:37 | プログラミング/圏論入門 | 104,549 | +23 | -1 | 表示 | 差分 | 選択 |
| 2026/8/21 23:11:51 | プログラミング/圏論入門 | 104,057 | +5 | -3 | 表示 | 差分 | 選択 |
| 2026/8/21 23:04:03 | プログラミング/圏論入門 | 104,009 | +184 | -114 | 表示 | 差分 | 選択 |
| 2026/8/18 23:27:06 | プログラミング/圏論入門 | 101,970 | +8 | -3 | 表示 | 差分 | 選択 |
| 2026/8/18 9:57:04 | プログラミング/圏論入門 | 101,820 | +91 | -41 | 表示 | 差分 | 選択 |
| 2026/8/17 20:20:20 | プログラミング/圏論入門 | 100,180 | +20 | -11 | 表示 | 差分 | 選択 |
| 2026/8/17 1:35:31 | プログラミング/圏論入門 | 99,726 | +334 | -247 | 表示 | 差分 | 選択 |
| 2026/8/16 14:22:17 | プログラミング/圏論入門 | 98,070 | +252 | -12 | 表示 | 差分 | 選択 |
| 2026/8/16 2:25:21 | プログラミング/圏論入門 | 91,460 | +266 | -5 | 表示 | 差分 | 選択 |
| 2026/8/15 12:34:45 | プログラミング/圏論入門 | 84,832 | +8 | -1 | 表示 | 差分 | 選択 |
| 2026/8/15 1:19:09 | プログラミング/圏論入門 | 84,652 | +45 | -3 | 表示 | 差分 | 選択 |
| 2026/8/14 19:35:08 | プログラミング/圏論入門 | 82,876 | +75 | -51 | 表示 | 差分 | 選択 |
| 2026/8/12 23:52:33 | プログラミング/圏論入門 | 82,014 | +201 | -34 | 表示 | 差分 | 選択 |
| 2026/8/12 10:17:25 | プログラミング/圏論入門 | 78,619 | +20 | -5 | 表示 | 差分 | 選択 |
| 2026/8/11 8:23:14 | プログラミング/圏論入門 | 78,497 | +9 | -10 | 表示 | 差分 | 選択 |
| 2026/8/6 14:47:08 | プログラミング/圏論入門 | 78,547 | +17 | -1 | 表示 | 差分 | 選択 |
| 2026/8/6 1:10:44 | プログラミング/圏論入門 | 78,282 | +22 | -6 | 表示 | 差分 | 選択 |
| 2026/8/4 19:58:47 | プログラミング/圏論入門 | 77,750 | +21 | -7 | 表示 | 差分 | 選択 |
| 2026/8/4 14:52:58 | プログラミング/圏論入門 | 77,577 | +154 | -13 | 表示 | 差分 | 選択 |
| 2026/8/4 11:44:38 | プログラミング/圏論入門 | 75,700 | +29 | -13 | 表示 | 差分 | 選択 |
| 2026/8/4 1:06:55 | プログラミング/圏論入門 | 75,173 | +24 | -13 | 表示 | 差分 | 選択 |
| 2026/7/29 22:49:12 | プログラミング/圏論入門 | 74,839 | +15 | -8 | 表示 | 差分 | 選択 |
| 2026/7/25 14:20:23 | プログラミング/圏論入門 | 74,658 | +37 | -5 | 表示 | 差分 | 選択 |
| 2026/7/25 3:47:07 | プログラミング/圏論入門 | 73,842 | +22 | -7 | 表示 | 差分 | 選択 |
| 2026/7/25 2:40:24 | プログラミング/圏論入門 | 73,414 | +48 | -3 | 表示 | 差分 | 選択 |
| 2026/7/23 3:49:50 | プログラミング/圏論入門 | 72,356 | +42 | -48 | 表示 | 差分 | 選択 |
| 2026/7/22 23:56:00 | プログラミング/圏論入門 | 72,799 | +209 | -3 | 表示 | 差分 | 選択 |
| 2026/7/22 16:27:25 | プログラミング/圏論入門 | 64,731 | +81 | -42 | 表示 | 差分 | 選択 |
| 2026/7/22 10:02:50 | プログラミング/圏論入門 | 63,069 | +10 | -2 | 表示 | 差分 | 選択 |
| 2026/7/22 0:45:50 | プログラミング/圏論入門 | 62,800 | +17 | -5 | 表示 | 差分 | 選択 |
| 2026/7/21 14:53:39 | プログラミング/圏論入門 | 62,475 | +92 | -2 | 表示 | 差分 | 選択 |
| 2026/7/21 11:06:44 | プログラミング/圏論入門 | 59,254 | +119 | -4 | 表示 | 表示中 | 選択 |
| 2026/7/21 0:50:53 | プログラミング/圏論入門 | 55,291 | +99 | -1 | 表示 | 差分 | 選択 |
| 2026/7/20 22:44:37 | プログラミング/圏論入門 | 50,988 | +20 | -2 | 表示 | 差分 | 選択 |
| 2026/7/20 16:34:20 | プログラミング/圏論入門 | 50,459 | +53 | -1 | 表示 | 差分 | 基準 |
| 2026/7/19 22:33:44 | プログラミング/圏論入門 | 47,752 | +3 | -3 | 表示 | 差分 | 選択 |
| 2026/7/19 16:51:31 | プログラミング/圏論入門 | 47,694 | +68 | -18 | 表示 | 差分 | 選択 |
| 2026/7/19 9:12:20 | プログラミング/圏論入門 | 44,453 | +43 | -1 | 表示 | 差分 | 選択 |
| 2026/7/18 23:55:08 | プログラミング/圏論入門 | 43,258 | +71 | -1 | 表示 | 差分 | 選択 |
| 2026/7/18 0:20:44 | プログラミング/圏論入門 | 40,851 | +4 | -4 | 表示 | 差分 | 選択 |
| 2026/7/17 22:55:07 | プログラミング/圏論入門 | 40,883 | +4 | -16 | 表示 | 差分 | 選択 |
| 2026/7/17 8:50:31 | プログラミング/圏論入門 | 41,234 | +9 | -6 | 表示 | 差分 | 選択 |
| 2026/7/14 17:56:39 | プログラミング/圏論入門 | 41,180 | +89 | -74 | 表示 | 差分 | 選択 |
| 2026/7/14 12:40:09 | プログラミング/圏論入門 | 40,589 | +66 | -35 | 表示 | 差分 | 選択 |
| 2026/7/14 0:06:11 | プログラミング/圏論入門 | 39,660 | +57 | -1 | 表示 | 差分 | 選択 |
| 2026/7/13 14:05:21 | プログラミング/圏論入門 | 38,100 | +9 | -2 | 表示 | 差分 | 選択 |
| 2026/7/12 19:50:25 | プログラミング/圏論入門 | 37,833 | +41 | -40 | 表示 | 差分 | 選択 |
| 2026/7/11 21:28:29 | プログラミング/圏論入門 | 37,740 | +53 | -15 | 表示 | 差分 | 選択 |
| 2026/7/11 9:10:13 | プログラミング/圏論入門 | 36,919 | +66 | -55 | 表示 | 差分 | 選択 |
| 2026/7/10 22:30:49 | プログラミング/圏論入門 | 36,454 | +89 | -12 | 表示 | 差分 | 選択 |
| 2026/7/10 19:50:54 | プログラミング/圏論入門 | 33,776 | +298 | -44 | 表示 | 差分 | 選択 |
| 2026/7/10 12:40:49 | プログラミング/圏論入門 | 27,561 | +177 | -73 | 表示 | 差分 | 選択 |
| 2026/7/9 23:58:56 | プログラミング/圏論入門 | 25,762 | +60 | -5 | 表示 | 差分 | 選択 |
| 2026/7/9 21:11:50 | プログラミング/圏論入門 | 24,438 | +55 | -16 | 表示 | 差分 | 選択 |
| 2026/7/9 7:39:19 | プログラミング/圏論入門 | 23,596 | +3 | -2 | 表示 | 差分 | 選択 |
| 2026/7/9 0:18:38 | プログラミング/圏論入門 | 23,597 | +92 | -1 | 表示 | 差分 | 選択 |
| 2026/7/8 15:41:14 | プログラミング/圏論入門 | 20,187 | +32 | -19 | 表示 | 差分 | 選択 |
| 2026/7/8 13:02:28 | プログラミング/圏論入門 | 19,915 | +239 | -65 | 表示 | 差分 | 選択 |
| 2026/7/8 0:05:09 | プログラミング/圏論入門 | 15,091 | +364 | -11 | 表示 | 差分 | 選択 |
| 2026/7/7 23:18:17 | プログラミング/圏論入門 | 1,024 | — | — | 表示 | — | 選択 |
基準: プログラミング/圏論入門 (2026/7/20 16:34:20) → 比較: プログラミング/圏論入門 (2026/7/21 11:06:44)
@@ -1,4 +1,4 @@
-#author("2026-07-20T07:34:20+00:00","default:administrator","administrator")
+#author("2026-07-21T02:06:44+00:00","","")
[[公開メモ]]
&katex();
@@ -701,6 +701,19 @@
射に関手を適用して、終域となる圏の上の射を得ることをしばしば「持ち上げる(lift)」と表現するようだ。~
例:「$f$ を $\mathcal F$ で持ち上げて $g$ を得る」
+** Cat 圏 [#f0b73142]
+
+関手を圏から圏への射であると捉え、圏と関手が作る構造を扱うのが Cat 圏の考え方である。
+
+Cat 圏の定義:
+- 対象は 任意の「小さな」圏
+- 射は 2つの圏を結ぶことが可能なすべての関手
+
+関手 $\mathcal F:\mathcal C\to\mathcal D$ と $\mathcal G:\mathcal D\to\mathcal E$ の合成
+$\mathcal G\circ\mathcal F$ は、$\mathcal C$ を $\mathcal F$ で移して作られる部分圏 $\mathcal F(\mathcal C)\in \mathcal D$ をさらに $\mathcal G$ で移して $\mathcal G(\mathcal F(\mathcal C))$ を作る関手と考えればよい。この変換が関手となることはほぼ自明だろう。
+
+Catの対象が任意の「小さな」圏と書かれているのは、ここを「任意の圏」としてしまうと、Cat自体が圏なので、自分を含む圏になってしまい、話がややこしくなるためだ。ここからはみ出す話はここではしない。大きな圏を含む場合は CAT と大文字で書かれるらしい。
+
** 同型関手 [#ad059c90]
関手 $\mathcal F:\mathcal C\to \mathcal C'$ が逆関手 $\mathcal F^{-1}:\mathcal C'\to \mathcal C$ を持つ、~
@@ -1520,6 +1533,9 @@
ここで見た自然変換の合成は垂直合成と呼ばれるものである。後に水平合成も出てくる。
+
+
+
** 圏の階層構造 [#ic7632b7]
ここまでの話を振り返ると圏が階層構造を作っていることに気づく。
@@ -1529,14 +1545,16 @@
3. で見た $\mathcal C$ から $\mathcal D$ への関手圏 $[\mathcal C, \mathcal D]$ は、Cat の $\mathrm{Hom}(\mathcal C,\mathcal D)$ に含まれる射を対象として、その間の自然変換を考える圏構造であったことを認識しよう。
-このように射の集合がそれ自身圏をなす構造は一般的に2-圏と呼ばれる。
+Cat 圏の持つこのような性質を公理化した構造は 2-圏 と呼ばれる。
-** Cat圏の関数対象は関手圏そのものである [#cc09b707]
+** Cat圏の性質 [#cc09b707]
2-圏の話を広げる前に Cat に特有な話を2つ見ておこう。
- 関手圏が Cat の関数対象そのものになること
- Cat がデカルト閉圏となること
+*** 積の存在 [#z8555f71]
+
まず、Cat圏は任意の圏の間に積が構成されている。~
Cat内の積として、例えば、次の構造がCatにおいて圏 $\mathcal C$ と $\mathcal D$ との積 $\mathcal C\times \mathcal D$ として働きうる。
- $\mathrm{Ob}(\mathcal C\times \mathcal D)=\mathrm{Ob}(\mathcal C)\times \mathrm{Ob}(\mathcal D)$ これは集合としての直積
@@ -1545,10 +1563,14 @@
Catはあらゆる小さな圏とその間の関手を含むため、任意の圏 $\mathcal C$ と $\mathcal D$ に対してこの圏 $\mathcal C\times \mathcal D$ もCatに必ず含まれる。つまり Cat は対象の積に対して閉じている。
-この積を使ってCat内に $\mathrm{Hom}(\mathcal C,\mathcal D)$ と対応する関数対象 $\mathcal C\Rightarrow\mathcal D$ を考えることができる。そのような関数対象(Cat圏の対象であるから圏になる)が存在するならば、どのような圏になるだろうか?
+*** 終対象は単元圏 [#r8bfd16c]
それを考える準備として、「対象を1つだけ持ち、その恒等射だけが存在する圏」を単元圏と呼ぶ。これが Cat の終対象となる(任意の圏の対象および射をすべて1つにつぶす関手だけが存在)。
+*** 関数対象は関手圏そのもの [#e9b7478a]
+
+この積を使ってCat内に $\mathrm{Hom}(\mathcal C,\mathcal D)$ と対応する関数対象 $\mathcal C\Rightarrow\mathcal D$ を考えることができる。そのような関数対象(Cat圏の対象であるから圏になる)が存在するならば、どのような圏になるだろうか?
+
指数対象の定理から、$\mathrm{Hom}(\mathcal C,\mathcal D)$ と $\mathrm{Hom}(1,\mathcal C\Rightarrow\mathcal D)$ とは一対一に対応する。
終対象である単元圏から圏 $\mathcal C\Rightarrow\mathcal D$ への関手は、唯一の対象を $\mathcal C\Rightarrow\mathcal D$ のどの対象へ移すかを決めるだけで決まってしまうため、$\mathcal C\Rightarrow\mathcal D$ の対象は $\mathrm{Hom}(1,\mathcal C\Rightarrow\mathcal D)$ に含まれる関手と一対一に対応し、さらにそれが $\mathrm{Hom}(\mathcal C,\mathcal D)$ に含まれる関手と一対一に対応する。
@@ -1559,6 +1581,215 @@
実は、関手圏 $[\mathcal C,\mathcal D]$ が関数対象 $\mathcal C\Rightarrow\mathcal D$ と見做せることを証明可能である。~
そのため関手圏 $[\mathcal C, \mathcal D]$ は、$\mathrm{Fun}(\mathcal C,\mathcal D)$ あるいはそのまま $\mathcal D\Rightarrow\mathcal C$ や ${\mathcal D}^{\mathcal C}$ とも書かれる。
+*** デカルト閉圏になる [#z7960dfb]
+
Cat圏は終対象を持ち、任意の対象間に積および関数対象を持つためデカルト閉圏となる。
Cat はそれ自身の任意の $\mathrm{Hom}(\mathcal C,\mathcal D)$ に対応する関手圏 $[\mathcal C,\mathcal D]=(\mathcal C\Rightarrow\mathcal D)$ を自分自身のうちに含むのである。Set がそれ自身の任意の $\mathrm{Hom}(C,D)$ を自分自身の内に含むのと対比して理解するとよい。
+
+*** 2-射の水平合成 [#u69f89dd]
+
+関手圏 $[\mathcal C,\mathcal D]$ 内の関手 $\mathcal F,\mathcal G,\mathcal H: \mathcal C\to \mathcal D$ に対して、~
+2つの自然変換 $\alpha: \mathcal F\to \mathcal G,\ \beta: \mathcal G\to \mathcal H$ を~
+通常の意味で射として合成する演算は垂直合成と呼ばれ、~
+$$\beta\cdot \alpha:\mathcal F\to \mathcal H$$
+と書かれることを上で見た。
+
+これに対して、自然変換の水平合成 $\beta\circ\alpha$ は異なる関手圏 $[\mathcal C,\mathcal D]$ と $[\mathcal D,\mathcal E]$ を結ぶ形で定義される。
+
+想定するのは図が示すような状況:
+- $\mathcal C\to \mathcal D$ に $\mathcal F,\mathcal F'$ の2つの関手がある
+- $\mathcal D\to \mathcal E$ に $\mathcal G,\mathcal G'$ の2つの関手がある
+- $\alpha$ は $\mathcal F$ から $\mathcal F'$ への自然変換
+- $\beta$ は $\mathcal G$ から $\mathcal G'$ への自然変換
+$$
+\begin{matrix}
+\mathcal C&\to&\to&\xrightarrow{\mathcal F}&\to&\to&\mathcal D&\to&\to&\xrightarrow{\mathcal G}&\to&\to&\mathcal E\\
+&\searrow&&\alpha\Downarrow\ \ &&\nearrow&&\searrow&&\beta\Downarrow\ \ &&\nearrow&\\
+&&\to&\xrightarrow{\mathcal F'}&\to&&&&\to&\xrightarrow{\mathcal G'}&\to&&\\
+\end{matrix}
+$$
+
+水平合成 $\beta\circ\alpha$ は、合成関手 $\mathcal G\circ \mathcal F$ から合成関手 $\mathcal G'\circ \mathcal F'$ への自然変換として定義される。
+$$
+\beta\circ\alpha:\ (\mathcal G\circ \mathcal F)\to(\mathcal G'\circ \mathcal F')
+$$
+垂直合成にドット $\cdot$ を使い、水平合成に白丸 $\circ$ を使う理由がここにある。
+
+とはいえ、具体的に成分で考えないと実体を思い浮かべられない。
+まず、任意の $X,Y\in\mathrm{Ob}(\mathcal C)$ とその間の射 $f:X\to Y$ が作る四辺形は、
+$$
+\begin{matrix}
+\mathcal F(X)&\xrightarrow{\mathcal F(f)}&\mathcal F(Y)\\[3mm]
+\alpha_X\Downarrow\hspace{10mm}&&\alpha_Y\Downarrow\hspace{10mm}\\[3mm]
+\mathcal F'(X)&\xrightarrow{\mathcal F'(f)}&\mathcal F'(Y)\\
+\end{matrix}
+$$
+であり、$\mathcal F(X)$ から $\mathcal F'(X)$ へ、右上を通るパスと左下を通るパスの2つで合成結果が等しいことが保証されている。
+$$
+\alpha_Y\circ\mathcal F(f)=\mathcal F'(f)\circ \alpha_X
+$$
+$\mathcal F(X),\mathcal F(Y),\mathcal F'(X),\mathcal F'(Y),\alpha_X,\alpha_Y$ はすべて圏 $\mathcal D$ の要素なので、関手 $\mathcal G,\mathcal G'$ によりそっくり $\mathcal E$ へ移すことができて、
+$$
+\begin{matrix}
+\mathcal G\circ\mathcal F(X)&\xrightarrow{\mathcal G\circ\mathcal F(f)}&\mathcal G\circ\mathcal F(Y)\\[3mm]
+\mathcal G(\alpha_X)\Downarrow\hspace{10mm}&&\mathcal G(\alpha_Y)\Downarrow\hspace{10mm}\\[3mm]
+\mathcal G\circ\mathcal F'(X)&\xrightarrow{\mathcal G\circ\mathcal F'(f)}&\mathcal G\circ\mathcal F'(Y)\\
+\end{matrix}
+\hspace{10mm}
+\begin{matrix}
+\mathcal G'\circ\mathcal F(X)&\xrightarrow{\mathcal G'\circ\mathcal F(f)}&\mathcal G'\circ\mathcal F(Y)\\[3mm]
+\mathcal G'(\alpha_X)\Downarrow\hspace{10mm}&&\mathcal G'(\alpha_Y)\Downarrow\hspace{10mm}\\[3mm]
+\mathcal G'\circ\mathcal F'(X)&\xrightarrow{\mathcal G'\circ\mathcal F'(f)}&\mathcal G'\circ\mathcal F'(Y)\\
+\end{matrix}
+$$
+
+一方、$\mathcal G$ についての自然変換 $\beta$ が作る四辺形はこれと直交する方向で、
+$$
+\begin{matrix}
+\mathcal G\circ\mathcal F(X)&\xrightarrow{\mathcal G\circ\mathcal F(f)}&\mathcal G\circ\mathcal F(Y)\\[3mm]
+\beta_{\mathcal F(X)}\Downarrow\hspace{10mm}&&\beta_{\mathcal F(Y)}\Downarrow\hspace{10mm}\\[3mm]
+\mathcal G'\circ\mathcal F(X)&\xrightarrow{\mathcal G'\circ\mathcal F(f)}&\mathcal G'\circ\mathcal F(Y)\\
+\end{matrix}\hspace{10mm}
+\begin{matrix}
+\mathcal G\circ\mathcal F'(X)&\xrightarrow{\mathcal G\circ\mathcal F'(f)}&\mathcal G\circ\mathcal F'(Y)\\[3mm]
+\beta_{\mathcal F'(X)}\Downarrow\hspace{10mm}&&\beta_{\mathcal F'(Y)}\Downarrow\hspace{10mm}\\[3mm]
+\mathcal G'\circ\mathcal F'(X)&\xrightarrow{\mathcal G'\circ\mathcal F'(f)}&\mathcal G'\circ\mathcal F'(Y)\\
+\end{matrix}
+$$
+両方を合わせると直方体的な構造が出来上がる。
+
+水平合成の作る四辺形は、
+$$
+\begin{matrix}
+\mathcal G\circ\mathcal F(X)&\xrightarrow{\mathcal G\circ\mathcal F(f)}&\mathcal G\circ\mathcal F(Y)\\[3mm]
+(\beta\circ\alpha)_X\Downarrow\hspace{10mm}&&(\beta\circ\alpha)_Y\Downarrow\hspace{10mm}\\[3mm]
+\mathcal G'\circ\mathcal F'(X)&\xrightarrow{\mathcal G'\circ\mathcal F'(f)}&\mathcal G'\circ\mathcal F'(Y)\\
+\end{matrix}
+$$
+であるから、直方体の体対角線を分解した形になる。
+
+水平合成は上記の四辺形と直交する四辺形の対角線方向の射であり、
+$$
+(\beta\circ\alpha)_X=\beta_{\mathcal F'(X)}\circ \mathcal G(\alpha_X)
+=\mathcal G'(\alpha_X)\circ\beta_{\mathcal F(X)}
+$$
+と定義可能。この中辺と右辺が等しいことは $\beta$ が自然変換であることから保証される。
+
+また、これが自然変換となることは、
+$$
+\begin{aligned}
+&\mathcal G'(\alpha_Y)\circ\beta_{\mathcal F(Y)}\circ(\mathcal G\circ\mathcal F(f))\\
+=&\mathcal G'(\alpha_Y)\circ(\mathcal G'\circ\mathcal F(f))\circ\beta_{\mathcal F(X)}\\
+=&(\mathcal G'\circ\mathcal F'(f))\circ\mathcal G'(\alpha_X)\circ\beta_{\mathcal F(X)}\\
+=&(\mathcal G'\circ\mathcal F'(f))\circ(\beta\circ\alpha)_X\\
+\end{aligned}
+$$
+として示される。
+
+*** 相互交換法則 [#i133c9b6]
+
+2-射の水平合成と垂直合成は相互交換法則 (interchange law) を満たすことを、~
+自然変換の性質を使って四辺形をたくさん書けば導ける。
+$$
+(\beta'\cdot\alpha')\circ(\beta\cdot\alpha)=(\beta'\circ\beta)\cdot(\alpha'\circ\alpha)
+$$
+
+この式は、垂直合成してから水平合成しても、水平合成してから垂直合成しても結果が変わらない、と読むように。
+
+** 2-圏 (2-category) [#u1b34826]
+
+Cat はその Hom 集合の中に圏の構造を持っており、そこでの2種類の射はある種の「自然性」の条件を満たしていた。 Cat のこの性質を公理化したのが 2-圏 の概念である。
+
+2-圏 $\mathcal K$ は次の内容で構成される:
+- 対象 $C,D,E\in\mathrm{Ob}(\mathcal K)$
+- 対象の順序対ごとに通常の射の集合 $f,g,h\in\mathrm{Hom}_{\mathcal C}(C,D)$ が存在~
+この射を 1-射 (1-morphism) と呼ぶ
+- 対象と1-射が通常の圏をなす
+-- 1-射の合成 $f:C\to D,g:D\to E$ に対して $g\circ f: C\to E$ が存在
+-- 1-射の結合律 $(f\circ g)\circ h=f\circ(g\circ h)$ が常に成り立つ
+-- 1-射の恒等射 対象 $D$ ごとに、任意の $f:C\to D,g:D\to E$ に対して $1_D\circ f=f$, $g\circ 1_D=g$ を満たす $1_D:D\to D$ が存在。
+- 対象の順序対ごとに、1-射 を対象とし、その間の射を持つ hom 圏 $\mathcal K(C,D)$ が存在
+-- ここでの射を 2-射 (2-morphism) と呼ぶ ($\alpha,\beta,\gamma,\dots$)
+-- 2-射の合成 $\alpha:f\Rightarrow g,\ \beta:g\Rightarrow h$ に対して $\beta\cdot \alpha: f\Rightarrow h$ が存在~
+これは垂直合成と呼ばれ、ドット $\cdot$ で書かれる~
+また2-射の始域と終域は $\Rightarrow$ で結ばれる
+-- 2-射の結合律 $(\alpha\cdot\beta)\cdot\gamma=\alpha\cdot(\beta\cdot\gamma)$ が常に成り立つ
+-- 2-射の恒等射 1-射 $g$ ごとに、任意の $\alpha:f\Rightarrow g,\beta:g\Rightarrow h$ に対して $1_g\cdot\alpha=\alpha$, $\beta\cdot1_g=\beta$ を満たす $1_g:g\Rightarrow g$ が存在。
+- 1-射の合成と2-射の水平合成が1つの双関手の形で書ける(以下に詳述)。
+
+1-射 $f:C\to D,\ g:D\to E$ の合成 $g\circ f:C\to E$ と、~
+2-射 $f,f':C\to D,\ g,g':D\to E$ の間を結ぶ $\alpha:f\Rightarrow f',\ \beta: g\Rightarrow g'$ の水平合成 $\beta\circ\alpha:g\circ f\Rightarrow g'\circ f'$ とが、~
+1つの双関手 $\circ_{C,D,E}$ (合成関手)と見做せる形で定義される。
+$$
+\circ_{C,D,E}:\mathcal K(D,E)\times\mathcal K(C,D)\to\mathcal K(C,E)
+$$
+これは何を言っているのか?
+
+この関手は、
+- 対象である1-射の組を1-射に移す移し方 $(g,f)\mapsto g\circ f$
+- 射である2-射の組を2-射に移す移し方 $(\beta,\alpha)\mapsto \beta\circ \alpha$
+
+の2つを与えるものであるが、その組み合わせが関手となるためには、関手の適用が2-射に対する垂直合成および恒等射を保存する必要がある。すなわち、垂直合成してから水平合成しても、水平合成してから垂直合成しても、結果が変わらないこと(垂直合成と水平合成が満たした相互交換法則)、
+$$
+(\beta'\cdot\beta)\circ(\alpha'\cdot\alpha)=
+(\beta'\circ\beta)\cdot(\alpha'\circ\alpha)
+$$
+恒等射を恒等射に移すこと、
+$$
+1_g\circ1_f=1_{g\circ f}
+$$
+がその条件となる。
+
+Cat の垂直合成と水平合成が満たした「相互交換法則」こそが 2-圏 の中核をなしていると読み取ればよい。
+
+*** 2-射 のイメージ [#j2234cb2]
+
+具体的な内容をイメージできた Cat とは異なり、一般の 2-圏 を考えるときに2-射に対するイメージをどう持つべきか。
+
+その際の注意点として、$\mathcal K(C,D)$ に含まれる2つの 1-射 $f,g:C\to D$ の間をつなぐ 2-射 は1つとは限らないことを指摘しておく。 2-射は2つの1-射 $f$ と $g$ とをつなぐ、つまり、始域と終域が1つに定まっているのだから、それってただ1つしかないのでは?と思えてしまうかもしれないのだが、実際には 2-射は $f,g$ により $D$ 内に作られる2つの像 $f(C),g(C)\subset D$ の間をつなぐものであると考えるべきであり、このため、$f,g$ を固定したとしても $f(C),g(C)$ が持つ内部構造の複雑さを反映してさまざまなバリエーションが考えられる。
+
+そのような可能な2-射をすべて集めた集合が Cat の $\mathrm{Hom}_{\mathcal K(C,D)}(f,g)$ である。
+
+*** 二重の矢印 $\Rightarrow$ [#g85f3e9c]
+
+1-射を $f:C\to D$ のように書くのに対して、~
+2-射を $\alpha:f\Rightarrow g$ のように二重矢印で書く。~
+この流儀では、後に出てくる 3-射 を $a:A\Rrightarrow B$ と書く、といったように、徐々に矢印を増やしていくことにより、それがどの $n$-射に対応するかを表しやすくする。
+
+この意味での $\Rightarrow$ は、関数対象を表す $\Rightarrow$ と同じ記号を使ってはいるものの、異なる意味を持つものであると理解しよう。
+
+*** whiskering (ひげを生やす関手) [#t8687f93]
+
+2-圏 の 合成関手
+$$\circ:\mathcal K(D,E)\times\mathcal K(C,D)\ \longrightarrow\ \mathcal K(C,E)$$
+の1つ目の引数をカリー化して、双関手ではない通常の関手を得ることを考える。
+$$g\circ-:\mathcal K(C,D)\ \longrightarrow\ \mathcal K(C,E)$$
+関手は対象から対象への変換と、射から射への変換とのセットであった。
+
+対象(1-射)から対象(1-射)への変換の引数 $g: D\to E$ を固定すると、$f:C\to D$ に対する
+$$g\circ-: f\mapsto g\circ f$$
+という変換が得られる。これは見たまんまであまり面白みがない。
+
+一方、射(2-射)を射(2-射)に変換する方は、関手が恒等射を恒等射に移さなければならないという制約から、
+$g$ を決めてしまうと固定に使える引数は $1_g$ に限られる。
+
+したがって、$\alpha:f\Rightarrow f'$ ただし $f,f': C\to D$ に対する
+$$
+g\circ-:\alpha\mapsto1_g\circ\alpha
+$$
+という変換が得られる。
+
+すなわち、
+$$
+g\circ\alpha:=1_g\circ\alpha
+$$
+である。
+
+この左辺はあたかも 2-射 $\alpha$ に 1-射 $g$ を合成しているかのように見えるが、その実体は右辺のように $g$ の恒等射との水平合成である。よく使われる記法であるため意味をしっかり理解しておく必要がある。
+
+この 2-射 に対する $g\circ-$ という演算は $\alpha\in\mathcal K(C,D)$ を $g$ で (本当は $1_g$ で) 延長して(ひげを生やして)、$g\circ\alpha\in\mathcal K(C,E)$ に伸ばすという意味で whiskering と呼ばれる。
+
+同様に、2つ目の引数を固定した $-\circ f$ の記法も良く使われる。
+
+* 極限と余極限 [#ia19de54]