forked from wenweili/AlJabr-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchapter6.tex
1994 lines (1747 loc) · 157 KB
/
chapter6.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% LaTeX source for book ``代数学方法'' in Chinese
% Copyright 2018 李文威 (Wen-Wei Li).
% Permission is granted to copy, distribute and/or modify this
% document under the terms of the Creative Commons
% Attribution 4.0 International (CC BY 4.0)
% http://creativecommons.org/licenses/by/4.0/
% To be included
\chapter{模论}\label{sec:modules}
模按纯量乘法的方式分成左右两种. 环 $R$ 上的左模 $M$ 粗看可以类比于向量空间, $M$ 本身对加法成群, 兼具 $R$ 的左纯量乘法 $R \times M \to M$. 从这个观点看, 向量空间是域上的模, 而交换群无非是 $\Z$-模.
模是数学中一种富于弹性, 用途特别广泛的结构; 例如
\begin{inparaenum}[(a)]
\item 主理想环上的有限生成模结构定理涵摄了有限生成交换群的分类, 以及线性变换的标准形理论;
\item 环 $R$ 上的模构成的范畴既是范畴论里的标准例子, 又是同调代数的原初样板;
\item 模的张量积则为对称幺半范畴提供了极佳的例证.
\end{inparaenum}
本章探讨的正合列, 投射模与内射模理论如进一步发展, 就导向交换环论和同调代数; 而半单模和不可分模的讨论则自然地通向群和代数的表示理论. 无论转向何方, 张量积都是必备工具, 也是初学模论的重点所在.
本章起将渐次增加范畴论的观点, 一方面固然是为了有效整理模的性质, 包括种种模范畴之间的函子, 与其间的自然变换, 另一方面也借此机会帮助读者熟悉范畴论的旨趣; 举凡伴随函子, 极限, 泛性质, 幺半范畴等概念都会在模论中找到合宜的位置, 表明这些抽象工夫既是自然的, 也是必要的.
\begin{wenxintishi}
张量积是模论的关键之一, 为了囊括一般情形, 我们将铺陈双模情形下的一般理论; 相关表述因而显得复杂, 读者不妨先从交换环上的情形切入, 参见例 \ref{eg:bimodule-comm}. 我们将使用幺半范畴和幺半函子的语言表述张量积的诸般性质, 读者不必为此逐条审视范畴论里的相关定义, 但是对幺半范畴的精神应当有切实的认识: 幺半范畴是带有``张量积'' $\otimes$ 的范畴 + 种种约束同构, 而幺半函子是在自然同构意义下保持 $\otimes$ 的函子.
本章关于正合列, 投射/内射模和链条件的讨论可视为走进交换环论和同调代数前的热身运动, 浅尝辄止. 适于考察这些概念的一般框架是 Abel 范畴; 环 $R$ 上的左模范畴就是 Abel 范畴的典型例子.
\end{wenxintishi}
\section{基本概念}
从形式观点看, 模是带有一族乘法算子的加法群. 回忆我们一贯的假设: 加法群意指交换群 $A$, 其二元运算记为 $+$, 幺元记为 $0$, 元素 $a \in A$ 的加法逆元记为 $-a$.
\begin{definition}\index{mo@模 (module)}
设 $R$ 为环, 所谓的左 $R$-\emph{模}意谓以下资料:
\begin{itemize}
\item 加法群 $(M, +)$;
\item 映射 $R \times M \to M$, 记为 $(r, m) \mapsto r \cdot m = rm$ (左乘), 满足以下性质:
\begin{align*}
r(m_1 + m_2) &= rm_1 + rm_2, \qquad r \in R, \; m_1, m_2 \in M, \\
(r_1 + r_2)m &= r_1 m + r_2 m, \qquad r_1, r_2 \in R, \; m \in M \\
(r_1 r_2)m & = r_1 (r_2 m), \\
1_R \cdot m & = m.
\end{align*}
\end{itemize}
若将定义中的左乘改为右乘 $(m, r) \mapsto mr$, 条件改为 $m(r_1 r_2) = (mr_1)r_2$ 等等, 得到的概念称为右 $R$-模. 一般简称 $M$ 是左或右 $R$-模.
\end{definition}
比照熟悉的向量空间情形, 我们也称运算 $R \times M \to M$ 为 $R$ 的纯量乘法. 由以上公理容易导出在左 $R$-模 $M$ 中有下述性质
\begin{equation}\label{eqn:multiples-in-module}\begin{aligned}
0 \cdot m & = 0, \quad m \in M, \\
(-1_R) \cdot m & = -m, \\
(n \cdot 1_R) \cdot m & = nm = \underbracket{m + \cdots + m}_{n\text{项}}, \quad n \in \Z_{\geq 0}, \\
(-n \cdot 1_R) \cdot m & = -(nm).
\end{aligned}\end{equation}
因此形如 $n \cdot m$ ($n \in \Z$) 的表达式没有歧义: 既可视之为 $(M,+)$ 中的倍数运算, 亦可视为 $n \cdot 1_R \in R$ 的乘法作用. 右模的情形类似.
\begin{remark}\label{rem:module-multiplication}
根据例 \ref{eg:End-ring}, 任意加法群 $(M, +)$ 的自同态集 $\End(M)$ 具备自然的环结构, 其乘法是同态的合成, 加法是同态的``逐点''加法. 赋予 $(M,+)$ 左 $R$-模结构相当于给定环同态
\begin{align*}
R & \longrightarrow \End(M) \\
r & \longmapsto [m \mapsto rm],
\end{align*}
而赋予右 $R$-模结构相当于给定环同态
\begin{align*}
R^\text{op} & \longrightarrow \End(M) \\
r & \longmapsto [m \mapsto mr].
\end{align*}
由此立得
\begin{center}
左 $R$-模 = 右 $R^\text{op}$-模.
\end{center}
交换环 $R$ 上的模不分左右, 可以简称为 $R$-模.
\end{remark}
\begin{example}
任意环 $R$ 对自身的左乘法构成左 $R$-模, 对右乘法构成右 $R$-模.
\end{example}
\begin{example}\label{eg:Z-modules}
整数环 $\Z$ 上的模无非是加法群, 这是由于 $\Z$ 在 $M$ 上仅有唯一一种乘法作用, 即 \eqref{eqn:multiples-in-module}. 所以交换群的理论可划为模论的一支.
\end{example}
\begin{definition}\label{def:submodule}\index{zimo@子模 (submodule)}
设 $M$ 为左 $R$-模, 子集 $M' \subset M$ 如满足
\begin{itemize}
\item 加法封闭性: $M'$ 是加法群 $(M, +)$ 的子群,
\item 纯量乘法封闭性: 对每个 $r \in R$, $m \in M'$ 皆有 $rm \in M'$,
\end{itemize}
则称 $M'$ 为 $M$ 的\emph{子模}. 右模的子模定义也是类似的.
若左或右 $R$-模 $M$ 没有除了 $\{0\}$ 和 $M$ 自身之外的子模, 而且 $M \neq \{0\}$, 则称 $M$ 为\emph{单模}.\index{mo!单 (simple)}
\end{definition}
以下假设 $M$ 为左$R$-模. 令 $\{M_i: i \in I\}$ 为 $M$ 的一族子模, 则其和
\[ \sum_{i \in I} M_i := \left\{
\begin{array}{ll}
m_{i_1} + \cdots + m_{i_r} : & r \in \Z_{\geq 1}, \; i_1, \ldots, i_r \in I \\
& \forall 1 \leq k \leq r, \; m_{i_k} \in M_{i_k}
\end{array} \right\} \]
(约定空和为 $\{0\}$) 与交 (设 $I \neq \emptyset$)
\[ \bigcap_{i \in I} M_i \]
仍为子模. 令 $S$ 为 $M$ 的子集, 我们可以定义由 $S$ 生成的子模 $\lrangle{S}$ 为 $M$ 中包含 $S$ 的最小子模, 亦即
\[ \lrangle{S} := \bigcap_{\substack{M': \text{子模} \\ M' \supset S}} M'. \]
当 $S$ 是独点集 $\{x\}$ 时, $\lrangle{S} = \lrangle{x}$ 有直截了当的描述 $Rx := \{rx : r \in R\}$; 对于一般情形, 容易验证 $\lrangle{S} = \sum_{x \in S} Rx \subset M$. 能表成 $Rx$ 的形式的模称为\emph{循环模}; 当 $R=\Z$ 时, 循环模无非就是循环群.
对于右$R$-模可以依样画葫芦来定义子模 $xR$ 等等, 不再赘述.
\begin{example}
环 $R$ 对本身的乘法具有自然的左模和右模结构. 比较子模和理想的定义 \ref{def:ideals} 可知
\begin{center}
$R$ 作为左 $R$-模的子模 = $R$ 的左理想, \\
$R$ 作为右 $R$-模的子模 = $R$ 的右理想.
\end{center}
模论本身搭建在环的概念上, 以后将看到如何从 $R$-模观点反推 $R$ 的环论性质.
\end{example}
\begin{definition}\index{tongtai}
设 $M_1$, $M_2$ 为左 $R$-模, 映射 $\varphi: M_1 \to M_2$ 若满足
\begin{itemize}
\item $\varphi$ 是加法群同态: 对所有 $x, y \in M_1$ 皆有 $\varphi(x+y)=\varphi(x) + \varphi(y)$,
\item $\varphi$ 保持纯量乘法: 对所有 $r \in R$, $x \in M_1$ 皆有 $\varphi(rx) = r\varphi(x)$,
\end{itemize}
则称 $\varphi$ 为 $M_1$ 到 $M_2$ 的\emph{模同态}. 恒等映射显然是同态, 而同态 $\varphi: M_1 \to M_2$, $\psi: M_2 \to M_3$ 的合成 $\psi\varphi: M_1 \to M_3$ 仍为同态, 由此得到左 $R$-模的范畴 $R\dcate{Mod}$, 以及同构, 自同构等诸般概念. 右 $R$-模范畴的定义类似, 记为 $\cated{Mod}R$.\index{tonggou}
对于如上的同态 $\varphi$, 定义其\emph{核}或曰零核为 $\Ker(\varphi) := \{x \in M_1 : \varphi(x)=0 \}$, 其\emph{像}为 $\Image(\varphi) := \{\varphi(x) : x \in M_1\}$, 两者分别是 $M_1$ 和 $M_2$ 的子模.\index{he}
\end{definition}
一如幺半群和环的情形, 同态 $\varphi: M_1 \to M_2$ 是同构当且仅当 $\varphi$ 是双射, 因为此时其逆映射 $\varphi^{-1}: M_2 \to M_1$ 也是模同态: 仅须对定义中 $\varphi$ 满足的等式取 $\varphi^{-1}$ 即可.
\begin{remark}\label{rem:Mod-cat-preadditive}
与交换群或 $\Z$-模的状况相同, 对于任意左 (或右) $R$-模 $M, M'$, 同态集 $\Hom_{R\dcate{Mod}}(M, M') =: \Hom_R(M, M')$ 构成加法群: 对任意 $\phi, \psi \in \Hom_R(M, M')$, 定义
\[ \phi + \psi := [m \mapsto \phi(m) + \psi(m) ] \in \Hom_R(M, M'). \]
群 $\Hom_R(M, M')$ 的零元是\emph{零态射} $\forall m \mapsto 0$. 而且同态的合成运算
\begin{align*}
\Hom_R(M', M'') \times \Hom_R(M, M') & \longrightarrow \Hom_R(M, M'') \\
(\phi, \psi) & \longmapsto \phi \psi
\end{align*}
是 $\Z$-双线性映射, 亦即:
\[ \phi(\psi_1 + \psi_2) = \phi\psi_1 + \phi\psi_2, \quad (\phi_1 + \phi_2)\psi = \phi_1\psi + \phi_2\psi. \]
由此亦可看出 $M$ 的自同态集 $\End_R(M)$ 具备自然的环结构, 乘法由合成给出. 以下且考虑右 $R$-模, 任意模 $M$ 于是获得自然的左 $D := \End_R(M)$-模结构如下
\begin{align*}
D \times M & \longrightarrow M \\
(\phi, m) & \longmapsto \phi(m).
\end{align*}
这里的要点是 $D$ 的乘法作用与 $R$ 的作用相``交换'', 如 $\phi(mr)=\phi(m)r$. 我们尔后将见证这种结构的妙用, 见约定 \ref{con:Hom-assoc}, \ref{con:left-right-End}.
\end{remark}
根据注记 \ref{rem:module-multiplication}, 范畴 $R\dcate{Mod}$ 与 $\cated{Mod}R^\text{op}$ 等价. 为了省事, 以下固定环 $R$, 并且仅考虑左模的情形.
我们考虑模的商结构. 简言之, 给定左 $R$-模 $M$ 上一个``保持模结构''的等价关系 $\sim$ 相当于给定一个子模 $N$, 其间的联系是
\[ x \sim y \iff x-y \in N. \]
细节可参看 \ref{sec:homomorphism} 的讨论. 以下只说明如何从给定的子模 $N \subset M$ 构造商模 $M \twoheadrightarrow M/N$. 首先注意到作为加法群的商 $(M/N, +)$ 已有了定义, 其元素是形如 $x+N$ 的加法陪集, 二元运算是 $(x+N) + (y+N) = x+y + N$; 眼下任务是添上 $R$ 的纯量乘法.
\begin{definition}\index{shang}
设 $N \subset M$ 为子模, 在加法商群 $M/N$ 上定义左 $R$-模结构
\[ r (x+N) = rx + N, \qquad r \in R, \; x \in M. \]
则商映射 $M \to M/N$ 是模同态, 称 $M/N$ 是 $M$ 对 $N$ 的\emph{商模}.
\end{definition}
商模满足与商群, 商环等类似的一些形式性质, 简要勾勒如次. 证明与群的情形类似, 而且由于不必考虑交换性, 其手法更为简单.
\begin{proposition}\label{prop:1st-homomorphism-module}
商模 $M \twoheadrightarrow M/N$ 满足以下泛性质: 对任意模同态 $\varphi: M \to M'$, 若 $N \subset \Ker(\phi)$, 则存在唯一的同态 $\bar{\varphi}: M/N \to M'$ 使得图表
\[ \begin{tikzcd}
M \arrow[rd, "\varphi"'] \arrow[r] & M/N \arrow[d, "{\exists! \; \bar{\varphi}}"]\\
& M'
\end{tikzcd}\]
交换.
\end{proposition}
\begin{proof}
唯一的取法是 $\bar{\varphi}(x + N) = \varphi(x)$, 易证此为良定的.
\end{proof}
\begin{proposition}\label{prop:quotient-image-module}
设 $\varphi: M_1 \to M_2$ 是模同态, 则 $\varphi$ 诱导出同构 $\bar{\varphi}: M_1/\Ker(\varphi) \rightiso \Image(\varphi)$, 它映 $m + \Ker(\varphi)$ 为 $\varphi(m)$.
\end{proposition}
\begin{proof}
应用命题 \ref{prop:1st-homomorphism-module}.
\end{proof}
\begin{proposition}\label{prop:2nd-homomorphism-module}
设 $\varphi: M_1 \to M_2$ 是满的模同态. 则有双射
\[ \begin{tikzcd}[row sep=tiny]
\left\{ \text{子模 } N_2 \subset M_2 \right\} \arrow[r, "1:1"] & \left\{ \text{子模 } N_1 \subset M_1 : N_1 \supset \Ker(\varphi) \right\} \\
N_2 \arrow[mapsto,r] & \varphi^{-1}(N_2) \\
\varphi(N_1) & N_1 \arrow[mapsto, l].
\end{tikzcd} \]
此双射满足 $N_2 \subset N'_2 \iff \varphi^{-1}(N_2) \subset \varphi^{-1}(N'_2)$. 而且合成态射 $M_1 \xrightarrow{\varphi} M_2 \twoheadrightarrow M_2/N_2$ 诱导出同构 $M_1/\varphi^{-1}(N_2) \rightiso M_2/N_2$.
\end{proposition}
如取 $\varphi$ 为商同态 $M \twoheadrightarrow M/N$, 断言的同构可写成熟悉的形式 $M/N' \rightiso (M/N) \big/ (N'/N)$, 其中 $N \subset N'$.
\begin{proof}
例行公事.
\end{proof}
\begin{proposition}\label{prop:3rd-homomorphism-module}
设 $M, N$ 是 $\mathcal{M}$ 的子模, 合成同态 $M \hookrightarrow M+N \twoheadrightarrow (M + N)/N$ 诱导出自然的模同构
\begin{align*}
M/(M \cap N) & \rightiso (M+N)/N, \\
m + (M \cap N) & \mapsto m + N, \quad m \in M.
\end{align*}
\end{proposition}
\begin{proof}
将商同态 $\pi: \mathcal{M} \to \mathcal{M}/N$ 限制到 $M$ 上, 其像显然为 $\pi(M) = M+N$, 核为 $M \cap \Ker(\pi) = M \cap N$. 应用命题 \ref{prop:quotient-image-module} 得到同构 $M/(M \cap N) \rightiso (M+N)/N$, 它映 $m + (M \cap N)$ 为 $m + N$.
\end{proof}
\begin{definition}\label{def:cokernel}
对于模同态 $f: M \to M'$, 定义其\emph{余核}为 $\Coker(f) := M'/\Image(f)$.
\end{definition}
模范畴 $R\dcate{Mod}$ 的进一步性质将在 \S\ref{sec:exactseq-module} 予以探讨.
\section{模的基本操作}\label{sec:mod-operations}
本节取定环 $R$, 所论的模皆为左 $R$-模. 右模的情形是完全类似的.
\begin{definition}\label{def:tor-ann}
设 $M$ 为 $R$-模.
\begin{itemize}\index[sym1]{ann@$\text{ann}_M$}
\item 元素 $x \in M$ 的\emph{零化子}定为 $R$ 的左理想如下
\[ \text{ann}_M(x) := \{r \in R : rx=0 \}. \]
若 $\text{ann}_M(x)=\{0\}$ 则称 $x$ 是\emph{无挠}的, 否则称之为\emph{挠元}, 所有非零元皆无挠的模称为\emph{无挠模}. \index{mo!无挠 (torsion-free)}
\item 模 $M$ 的零化子定为 $R$ 的双边理想如下
\[ \text{ann}(M) := \left\{r \in R: \forall x \in M, \; rx=0 \right\} = \bigcap_{x \in M} \text{ann}_M(x). \]
若 $R$ 的双边理想 $I$ 包含于 $\text{ann}(M)$, 则 $M$ 自然地成为 $R/I$-模: 加法不变, 纯量乘法按 $(r + I)m = rm$ 来定义, 其中 $(r,m) \in R \times M$.
\item 模 $M$ 对右理想 $\mathfrak{a} \subset R$ 的 $\mathfrak{a}$-\emph{挠部分}定为子模 \index[sym1]{$M[\mathfrak{a}]$}
\[ M[\mathfrak{a}] := \left\{ m \in M: \forall a \in \mathfrak{a}, \; am=0 \right\}. \]
\end{itemize}
\end{definition}
这些术语将在 \S\ref{sec:PID-module} 用到. 请读者验证 $M$ 作为 $R/\text{ann}(M)$-模自动是无挠的. % FIXME: 作为 $R/\text{ann}(M)$-模的零化子自动是 $\{0\}$.
本节的后续目标是以下定理. \index[sym1]{R-Mod@$R\dcate{Mod}$}
\begin{theorem}\label{prop:module-cat-completeness}
范畴 $R\dcate{Mod}$ 是完备且余完备的, 并且具有零对象.
\end{theorem}
零对象是兼为始, 终对象的对象, 见定义 \ref{def:universal-objects}. 关于完备性及余完备性请参见定义 \ref{def:completeness}, 说穿了, $R$-模范畴具有所有小极限; 关于形容词``小''请参看定义 \ref{def:U-cat}. 关于 $\Z$-模即交换群的特例, 在例 \ref{eg:complete-cocomplete} 中已有勾勒. 以下证明将一并引入关于直和与直积的一些标准记法.
\begin{proof}
注记 \ref{rem:Mod-cat-preadditive} 已说明了 $R\dcate{Mod}$ 是 $\cate{Ab}$-范畴: 这是说其中 $\Hom$-集有自然的加法群结构, 使得态射的合成是双线性的; 特别地, 对任意 $M$, $M'$ 存在零态射 $0: M \to M'$, 它将每个元素映到 $0$. 下面将循序渐进地构作各类极限.
\begin{asparaenum}
\item 范畴 $R\dcate{Mod}$ 的零对象是零模 $\{0\}$, 经常简记为 $0$. 其上的模结构只能是 $r \cdot 0 = 0$. 显然, 出入零模的态射恰好是零态射, 因此它确实是范畴 $R\dcate{Mod}$ 的零对象.
\item 我们接着在 $R\dcate{Mod}$ 中构造积和余积. 设 $I$ 为小集, 而 $\{M_i : i \in I\}$ 为一族 $R$-模. 定义其\emph{积} (或称\emph{直积}) $\prod_{i \in I} M_i$ 为
\begin{align*}
\prod_{i \in I} M_i & := \left\{ (m_i)_{i \in I} : \forall i \in I, \; m_i \in M_i \right\}, \\
(m_i)_{i \in I} + (m'_i)_{i \in I} & := (m_i + m'_i)_{i \in I}, \\
r(m_i)_{i \in I} & := (rm_i)_{i \in I}, \quad r \in R.
\end{align*}
显然 $\prod_{i \in I} M_i$ 成 $R$-模, 其零元由 $\forall i \in I, \; m_i = 0$ 给出. 它带有一族投影同态
\begin{align*}
p_j: \prod_{i \in I} M_i & \longrightarrow M_j, \qquad j \in I \\
(m_i)_{i \in I} & \longmapsto m_j.
\end{align*}
定义其\emph{余积} (惯称为\emph{直和}) 为 \index{zhihe@直和 (direct sum)}
\begin{gather*}
\bigoplus_{i \in I} M_i := \left\{ (m_i)_{i \in I} \in \prod_{i \in I} M_i : \text{仅至多有限个 } m_i \neq 0 \right\}
\end{gather*}
易见 $\bigoplus_{i \in I} M_i$ 为 $\prod_{i \in I} M_i$ 的子模. 它带有一族包含同态
\begin{align*}
\iota_j: M_j & \longrightarrow \prod_{i \in I} M_i \\
m_j & \longmapsto (m_i)_{i \in I}, \quad m_i :=
\begin{cases}
m_j, & i=j, \\
0, & i \neq j.
\end{cases}
\end{align*}
若每个 $M_i = M$, 相应的直积与直和常写作 $M^I$ 和 $M^{\oplus I}$. 当 $I=\{1, \ldots, n\}$ 时我们常采用 $M_1 \times \cdots \times M_n$ 和 $M_1 \oplus \cdots \oplus M_n$ 的写法; 两者作为 $R$-模显然是一回事, 读者可进一步参看 \ref{def:biproduct} 关于双积的讨论. 我们回到一般的 $I$ 的情形, 接着验证 \S\ref{sec:limits} 中积和余积的范畴论性质.
给定模 $M$ 和一族同态 $\phi_j: M \to M_j$, 我们希望存在唯一的 $\phi: M \to \prod_{i \in I} M_i$ 使得下图对每个 $j \in I$ 皆交换:
\[ \begin{tikzcd}
M \arrow[rd, "\phi_j"'] \arrow[r, "\phi"] & \prod_{i \in I} M_i \arrow[d, "p_j"] \\
& M_j
\end{tikzcd} \]
此图定下了 $\phi(m)$ 的第 $j$ 个坐标, 因而唯一的取法显然是 $\phi(m) = (\phi_i(m))_{i \in I}$. 此即所求泛性质.
类似地, 给定模 $M$ 和一族同态 $\psi_j: M_j \to M$, 使图表
\[ \begin{tikzcd}
\bigoplus_{i \in I} M_i \arrow[r, "\psi"] & M \\
M_j \arrow[u, "\iota_j"] \arrow[ru, "\psi_j"'] &
\end{tikzcd} \]
对每个 $j \in I$ 交换的同态 $\psi$ 有唯一的取法: $\psi((m_i)_{i \in I}) = \sum_{i \in I} \psi_i(m_i)$ (有限和), 这是因为 $\bigoplus_{i \in I} M_i = \sum_{i \in I} \Image(\iota_i)$. 至此完成积和余积的构造.
\item 下一步是在 $R\dcate{Mod}$ 中构造等化子和余等化子 (见 \S\ref{sec:limits}). 考虑一对同态 $f, g: X \to Y$. 等化子 $\Ker(f,g) \to X$ 的泛性质 \eqref{eqn:equalizer} 归结如下:
\begin{compactitem}
\item 同态 $\iota: \Ker(f,g) \to X$ 满足 $f\iota = g\iota$;
\item 假若 $\phi: L \to X$ 满足 $f\phi = g\phi$, 则存在唯一的分解 $\phi = [L \xrightarrow{\exists! \phi_0} \Ker(f,g) \xrightarrow{\iota} X]$.
\end{compactitem}
基于 $\Hom$ 集的加法群结构, 上述条件可以改写成 $(f-g)\iota = 0$, $(f-g)\phi = 0$, 因此构造 $\Ker(f,g) \to X$ 和构造 $\Ker(f-g, 0) \to X$ 是一回事. 我们立刻化约到 $g=0$ 的情形.
准此要领, 观察余等化子 $Y \to \Coker(f,g)$ 的泛性质 \eqref{eqn:coequalizer}, 可知它无非是 $Y \to \Coker(f-g, 0)$. 同样化约到 $g=0$ 的情形.
\item 现在描述等化子 $\Ker(f,0) \to X$, 其中 $f: X \to Y$ 是 $R$-模的同态. 泛性质化约为:
\[ \left[ \phi: L \to X, \; f \phi = 0 \right] \implies \phi \; \text{有唯一的分解} \; L \to \Ker(f,0) \to X. \]
注意到 $f\phi = 0 \iff \Image(\phi) \subset \Ker(f)$, 因此核 $\Ker(f) \hookrightarrow X$ 给出所求的等化子 $\Ker(f,0) \to X$.\index{denghuazi}
\item 余等化子 $Y \to \Coker(f,0)$ 的情形类似, 其泛性质化约为:\index{yudenghuazi}
\[ \left[ \psi: Y \to L, \; \psi f = 0 \right] \implies \psi \; \text{有唯一的分解} \; Y \to \Coker(f,0) \to L. \]
由于 $\psi f = 0 \iff \Image(f) \subset \Ker(\psi)$, 应用命题 \ref{prop:1st-homomorphism-module} 可知余核 $Y \to \Coker(f) := Y/\Image(f)$ 给出所求的余等化子.
\end{asparaenum}
根据上述构造和推论 \ref{prop:completeness-criterion}, 范畴 $R\dcate{Mod}$ 具有所有的小极限.
\end{proof}
\begin{remark}\label{rem:filtrant-mod-limit}
类似于集合情形, 模的滤过 $\varinjlim$ 具有更容易掌握的构造, 它涵摄了代数学中俗称的直极限. 设 $I$ 为滤过小范畴 (定义 \ref{def:filtrant-cat}) 并考虑函子 $\alpha: I \to R\dcate{Mod}$, 对象层面记作 $i \mapsto M_i$, 则 $\varinjlim_i M_i := \varinjlim \alpha$ 作为集合可以取为:
\[ \varinjlim_i M_i := \left( \bigoplus_{i \in \Obj(I)} M_i \right) \bigg/\sim \]
其中 $\sim$ 是由 \eqref{eqn:filtrant-equiv} 定义的等价关系; 换句话说, 它是合成函子 $I \xrightarrow{\alpha} R\dcate{Mod} \to \cate{Set}$ 的 $\varinjlim$. 与环的情形 (命题 \ref{prop:ring-filtrant-limit}) 类似, 要点在于选取 $R$-模结构使得 $M_j \to \varinjlim_i M_i$ 成为同态, 选取既是明显的也是唯一的. 请读者仿照环的情形进行论证. 当 $I$ 是全序集而所有转移同态 $i \leq j \implies M_i \to M_j$ 都是单射时, 极限可以合理地写作 $\bigcup_i M_i$.
\end{remark}
举例明之, 任何模 $M$ 皆可表为它的有限生成子模的 $\varinjlim$, 这个极限是滤过的, 写法 $M = \bigcup_{\substack{N \subset M \\ \text{有限生成子模}}} N$ 也是自明的.
\begin{corollary}\label{prop:Mod-cat-additive}
范畴 $R\dcate{Mod}$ 是加性范畴 (参看定义 \ref{def:additive-cat}). 特别地, $R$-模的有限直积与直和相等.
\end{corollary}
\begin{proof}
定理 \ref{prop:module-cat-completeness} 构作了积和余积; 根据双积的定义 \ref{def:biproduct} 和定理 \ref{prop:biproduct-criterion} 可知这蕴涵双积存在性, 故 $\cate{Ab}$-范畴 $R\dcate{Mod}$ 实为加性范畴. 有限直积与直和的等同是命题 \ref{prop:additive-prod-coprod}, 按构造看亦属显然.
\end{proof}
\begin{lemma}\label{prop:prod-module}
设环 $R$ 为直积 $R = \prod_{i \in I} R_i$, 其中 $I$ 是有限集. 对每个 $i \in I$ 定义 $R$ 的双边理想 $\mathfrak{b}_i := \prod_{\substack{j \in I \\ j \neq i}} R_j$, 以及
\[ e_i := (\delta_{i,j})_{j \in I} \; \in R, \quad \delta_{i,j} = \begin{cases} 1, & i=j \\ 0, & i \neq j. \end{cases} \]
对任意左 $R$-模 $M$ 定义 $M_i := \left\{ m \in M : \mathfrak{b}_i m = 0 \right\}$, 则有直和分解
\begin{equation*}\begin{tikzcd}[row sep=tiny]
\bigoplus_{i \in I} M_i \arrow[r, "\sim"] & M \\
(m_i)_{i \in I} \arrow[mapsto, r] \arrow[phantom, u, "\in" description, sloped] & \sum_{i \in I} m_i \arrow[phantom, u, "\in" description, sloped] \\
(e_i m)_{i \in I} & m \arrow[mapsto, l]
\end{tikzcd}\end{equation*}
\end{lemma}
\begin{proof}
运用性质 $\mathfrak{b}_i e_i = 0$, $\sum_i e_i = 1$ 和 $i \neq j \implies e_j \in \mathfrak{b}_i$ 来验证.
\end{proof}
在此亦可将 $M_i$ 视为 $R_i \simeq R/\mathfrak{b}_i$ 上的左模.
\begin{remark}
反之, 给定一族左 $R_i$-模 $M_i$, 透过投影同态 $R \to R_i$ 将之拉回为左 $R$-模, 可构造直和 $M = \bigoplus_i M_i$. 容易验证两种构造在精确到自然同构的意义下互逆. 是以给定一个 $R$ 模相当于给定一族 $R_i$-模. 用范畴论的语言说, 我们得到 $R\dcate{Mod}$ 和 $\prod_{i \in I} (R_i\dcate{Mod})$ 间的范畴等价.
\end{remark}
\section{自由模}\label{sec:free-modules}
仍固定环 $R$. 接着考虑模范畴 $R\dcate{Mod}$ 中的``自由''构造. 设 $X$ 为(小)集合. 对每个 $x \in X$ 定义循环模 $Rx$ 如下: 其元素是形如 $rx$ 的符号, 其中 $r \in R$; 加法和纯量乘法分别定为 $rx + r'x = (r+r')x$, $r(r'x) = (rr')x$. 换言之, $Rx$ 其实就是作为左 $R$-模的 $R$, 只是形式地在右侧添上符号 $x$.
\begin{definition}\label{def:free-module}\index{mo!自由模 (free module)}
以 $X$ 为基的\emph{自由模}定义为 $R^{\oplus X} = \bigoplus_{x \in X} Rx$. 作为集合有自然的包含映射
\begin{align*}
X & \longrightarrow R^{\oplus X} \\
x & \longmapsto 1 \cdot x.
\end{align*}
其中的元素可以写成有限和 $m = \sum_{x \in X} a_x x$ 或数组 $(a_x)_{x \in X}$, 其中 $a_x \in R$ 是唯一确定的, 至多有限项非零; 这与定理 \ref{prop:module-cat-completeness} 证明中介绍的符号一致.
\end{definition}
这是自由模与基的外在定义, 稍后将给出内在版本. 易见 $X \mapsto R^{\oplus X}$ 定义函子 $\cate{Set} \to R\dcate{Mod}$, 它由以下泛性质刻画.
\begin{proposition}\label{prop:free-module-property}
对任意 $R$-模 $M$ 和集合的映射 $\phi: X \to M$, 存在唯一的模同态 $\varphi: R^{\oplus X} \to M$ 使下图交换.
\[ \begin{tikzcd}
X \arrow[rd, "\phi"'] \arrow[r] & R^{\oplus X} \arrow[d, "{\exists! \, \varphi}"] \\
& M
\end{tikzcd} \]
\end{proposition}
\begin{proof}
显然对每个 $x \in X$ 必须有 $\varphi(rx) = r\varphi(x) = r\phi(x) \in M$, 这就完全确定了 $\varphi$.
\end{proof}
因此函子 $X \mapsto R^{\oplus X}$ 是忘却函子的左伴随函子: 换言之, 存在自然同构
\[ \Hom_R(R^{\oplus X}, M) \rightiso \Hom_\cate{Set}(X, M), \]
其中的变元 $X$ 取遍集合而 $M$ 取遍 $R$-模. 换个观点看, 给出始于 $R^{\oplus X}$ 的同态相当于对基 $X$ 的每个元素指派其像, 不需任何约束条件, 因而是``自由''的.
借此机会, 我们将线性代数中几个常见的概念推广到模上.
\begin{definition}
设 $X$ 为 $R$-模 $M$ 的子集. 根据命题 \ref{prop:free-module-property}, 包含映射 $X \hookrightarrow M$ 诱导出同态 $\sigma: R^{\oplus X} \to M$. 我们称
\begin{itemize}
\item $X$ 是\emph{线性无关}的或\emph{自由}的, 如果 $\sigma$ 是单射, 反之则称 $X$ 是\emph{线性相关}的;
\item $X$ 生成或张成 $M$, 如果 $\sigma$ 是满射, 此时称 $X$ 为 $M$ 的\emph{生成集}. 具有有限生成集的模成为\emph{有限生成模}.\index{youxianshengcheng}
\end{itemize}
线性无关生成集称为\emph{基}; 具有基的模亦称\emph{自由模}, 这是定义 \ref{def:free-module} 的内禀版本.
\end{definition}
注意到 $\sigma$ 单等价于 $\Ker(\sigma)=\{0\}$, 这相当于说
\[ \underbracket{\sum_{x \in X} r_x x}_{M \text{中有限和}} = 0 \iff \forall x \in X, \; r_x = 0. \]
而 $\sigma$ 满等价于每个元素皆可表作 $R$-线性组合 $\sum_{x \in X} r_x x$. 这都是线性代数熟知的定义. 显然 $X$ 是$R^{\oplus X}$ 的基, 故自由模的内禀和外在定义是兼容的.
举例明之. 设 $\Delta$ 为幺半群, 读者可以验证定义 \ref{def:monoidal-ring} 构作的幺半群环 $R[\Delta]$ 对 $R$ 的左乘作用 $r\cdot(\sum_{\delta \in \Delta} r_\delta \delta) = \sum_{\delta \in \Delta} rr_\delta \delta$ (其中 $r \in R$) 构成左 $R$-模, 而且 $\Delta \subset R[\Delta]$ 是基. 右乘情形依此类推. 作为特例, 多项式环 $R[X] = \bigoplus_{n \geq 0 }RX^n$ 是以 $\Delta := \{ X^n: n \geq 0 \}$ 为基的自由左 $R$-模.
\begin{corollary}
在同构意义下, 任意模 $M$ 皆可表成自由模的商.
\end{corollary}
\begin{proof}
取 $M$ 的子集 $X$ 和相应的同态 $\sigma: R^{\oplus X} \to M$, 则 $\Image(\sigma) \simeq R^{\oplus X}/\Ker(\sigma)$. 如取 $X$ 为 $M$ 的生成集 (譬如 $X=M$), 则 $\Image(\sigma)=M$.
\end{proof}
当基 $X$ 有限时, $R^{\oplus X}$ 的自同态环可以表成熟悉的矩阵环形式, 见例 \ref{eg:matrix-ring}. 不失一般性设 $X = \{1, \ldots, n\}$. 我们先从 $\cated{Mod}R$ 中一般的有限积说起, 关键在于应用推论 \ref{prop:Mod-cat-additive}; 事实上以下论证适用于任意加性范畴 (定义 \ref{def:additive-cat}). 选定
\begin{compactitem}
\item 正整数 $n, m$;
\item 对象 $M_1, \ldots, M_n$ 和 $M'_1, \ldots, M'_m$.
\end{compactitem}
此处 $\bigoplus_{i=1}^n M_i$ 兼有直积直和两种角色, 分别由两族态射 $\bigoplus_{i=1}^n M_i \xrightarrow{p_j} M_j$ 和 $M_j \xrightarrow{\iota_j} \bigoplus_{i=1}^n M_i$ 给出. 同理有 $p'_j, \iota'_j$ 等态射. 于是根据积和余积的泛性质,
\begin{align*}
\Hom \left( \bigoplus_{j=1}^n M_j, \bigoplus_{i=1}^m M'_i \right) & \xrightarrow[\sim]{\phi \mapsto (p'_i \phi)_i } \prod_{i=1}^m \Hom\left(\bigoplus_{j=1}^n M_j , M'_i \right) \\
& \xrightarrow[\sim]{(p'_i \phi)_i \mapsto (p'_i \phi \iota_j)_{i, j}} \prod_{j=1}^n \prod_{i=1}^m \Hom(M_j, M'_i).
\end{align*}
因此 $\phi: \bigoplus_{j=1}^n M_j \to \bigoplus_{i=1}^m M'_i$ 完全由同态族
\[ \phi_{ij} := p'_i \phi \iota_j: M_j \to M'_i, \quad 1 \leq i \leq m, \; 1 \leq j \leq n \]
确定, 表为矩阵
\[ \phi \longleftrightarrow \mathcal{M}(\phi) = (\phi_{ij})_{\substack{1 \leq i \leq m \\ 1 \leq j \leq n}} = \begin{pmatrix}
\phi_{11} & \cdots & \phi_{1n} \\
\vdots & \ddots & \vdots \\
\phi_{m1} & \cdots & \phi_{mn}
\end{pmatrix}. \]
回忆矩阵的乘法 $C=AB$ 由 $c_{ik} = \sum_j a_{ij} b_{jk}$ 确定. 对于矩阵 $\mathcal{M}(\phi)$, 尽管诸元取值在容或不同的 $\Hom$ (成加法群) 中, 下面涉及的运算仍是良定的.
\begin{lemma}\label{prop:Hom-matrix}
对于 $\phi: \bigoplus_{i=1}^n M_i \to \bigoplus_{i=1}^{n'} M'_i$ 和 $\psi: \bigoplus_{i=1}^{n'} M'_i \to \bigoplus_{i=1}^{n''} M''_i$, 相应的矩阵满足
\[ \mathcal{M}(\psi\phi) = \mathcal{M}(\psi) \mathcal{M}(\phi) \]
其中矩阵元的相乘由合成 $\Hom(M_k, M'_j) \times \Hom(M'_j, M''_i) \to \Hom(M_k, M''_i)$ 给出.
\end{lemma}
\begin{proof}
应用环 $\End_R(\bigoplus_i M'_i)$ 中的等式 $\sum_{j=1}^{n'} \iota'_j p'_j = 1$, $p'_i \iota'_i = \identity_{M'_i}$ 和 $i \neq j \implies p'_i \iota'_j = 0$ (双积定义 \ref{def:biproduct} 的多元版本) 计算 $\psi\phi$ 的第 $(i, k)$ 个矩阵系数 $\mathcal{M}(\psi\phi)_{ik}$: 根据同态合成的结合律与双线性, 可得
\begin{align*}
\mathcal{M}(\psi\phi)_{ik} = p''_i \psi\phi \iota_k & = \sum_{j=1}^{n'} p''_i \psi (\iota'_j p'_j) \phi \iota_k \\
& = \sum_{j=1}^{n'} (p''_i \psi \iota'_j) (p'_j \phi \iota_k) = \sum_{j=1}^{n'} \mathcal{M}(\psi)_{ij} \mathcal{M}(\phi)_{jk}.
\end{align*}
这正是矩阵乘法. 断言得证.
\end{proof}
上述论证和线性代数中用矩阵表示线性变换的办法如出一辙.
\begin{proposition}\label{prop:End-matrix}
模 $R^{\oplus n}$ 的自同态环自然地同构于 $n \times n$ 矩阵环 $M_n(R^\text{op})$, 此同构由 $\phi \mapsto \mathcal{M}(\phi)$ 导出. 进一步, 加法群 $\Hom_R(R^{\oplus n}, R^{\oplus m})$ 自然地同构于全体 $m \times n$ 矩阵的加法群 $M_{m \times n}(R^\text{op})$; 同态的合成对应到矩阵乘法.
如改用右 $R$-模, 则相应地有 $\Hom_R(R^{\oplus n}, R^{\oplus m}) \simeq M_{m \times n}(R)$.
\end{proposition}
\begin{proof}
视 $R$ 为左 $R$-模, 标作 ${}_R R$. 任意 $\phi \in \End({}_R R)$ 皆满足 $\phi(r) = r\phi(1)$, 由此可证
\begin{align*}
\End({}_R R) & \longrightarrow R^\text{op} \\
\phi & \longmapsto \phi(1)
\end{align*}
是环同构: 其逆将 $r \in R$ 映至右乘自同态 $x \mapsto xr$ (留意到乘法顺序将倒转). 在先前的讨论和引理 \ref{prop:Hom-matrix} 中代入 $M_i = M'_j = {}_R R$, 即得所求. 对于右模则有 $\End(R_R) \simeq R$, 其余相同.
\end{proof}
下述``生成引理''涉及 \S\ref{sec:cardinal-number} 简介的无穷基数.
\begin{lemma}\label{prop:generator-cardinal}
设 $I$ 为无穷集, $(M_i)_{i \in I}$ 为一族非零模, 则 $\bigoplus_{i \in I} M_i$ 的任意生成集 $S$ 皆满足 $|S| \geq |I|$.
\end{lemma}
\begin{proof}
任意 $s \in S$ 可写成 $(s_i)_{i \in I}$, 记 $E_s := \{i \in I: s_i \neq 0\}$. 根据直和定义 $E_s$ 有限, 而 $S$ 生成 $\bigoplus_{i \in I} M_i$ 蕴涵了 $\bigcup_{s \in S} E_s = I$, 因之 $S$ 无穷. 推论 \ref{prop:cardinal-max} 遂蕴涵基数不等式
\[ \max\{|S|, \aleph_0 \} = |S| \cdot \aleph_0 \geq \left| \bigcup_{s \in S} E_s \right| = |I|, \]
而最左端无非是 $|S|$.
\end{proof}
最后来探讨自由模的秩. 以下设 $R$ 非零. 自然的想法是定 $M \simeq R^{\oplus X}$ 的秩为 $|X|$, 然而须说明这和基 $X \subset M$ 的选择无关. 当 $R$ 为域时, 向量空间的理论说明秩确实是良定的, 读者应已熟知有限维情形, 而定义--定理 \ref{def:dimension-vector-space} 将给出一般的证明, 引理 \ref{prop:generator-cardinal} 会派上用场. 由此可以推得交换环上的自由模也具有类似性质.
\begin{proposition}
设 $R$ 为交换环, 则 $R^{\oplus X} \simeq R^{\oplus Y}$ 当且仅当 $|X|=|Y|$.
\end{proposition}
\begin{proof}
显然 $|X|=|Y|$ 蕴涵 $R^{\oplus X} \simeq R^{\oplus Y}$. 为证明另一个方向, 我们应用命题 \ref{prop:existence-maximal-ideal} 取 $R$ 的一个极大理想 $\mathfrak{m}$. 对任意 $R$-模 $M$, 定义 $\mathfrak{m} M$ 为形如 $am$ ($m \in M$, $a \in \mathfrak{m}$) 的元素生成的子模. 于是 $M/\mathfrak{m}M$ 是 $R/\mathfrak{m}$-模, 亦即域 $R/\mathfrak{m}$ 上的向量空间. 当 $M = R^{\oplus X}$ 时易见 $\mathfrak{m}M = \mathfrak{m}^{\oplus X}$, 故有向量空间的同构
\begin{align*}
M/\mathfrak{m}M & \stackrel{\sim}{\longrightarrow} (R/\mathfrak{m})^{\oplus X} \\
(a_x)_{x \in X} + \mathfrak{m}M & \longmapsto (a_x + \mathfrak{m})_{x \in X}.
\end{align*}
故 $|X| = \dim_{R/\mathfrak{m}} (M/\mathfrak{m}M)$, 等式右边只和 $M$ 的 $R$-模结构有关, 不依赖基的选取.
\end{proof}
\begin{definition}[自由模的秩]\label{def:rank-module}\index[sym1]{rank@$\rank_R(E)$}\index{zhi@秩 (rank)}
设 $E$ 为非零交换环 $R$ 上的自由模, 其\emph{秩}定义为 $\rank_R(E) := |X|$, 如果 $E \simeq R^{\oplus X}$. 根据前述命题, 这是良定的.
\end{definition}
\begin{remark}\label{rem:IBN}
对于一般的环 $R$, 如果 $I$ 为无穷集, $R^{\oplus I} \simeq R^{\oplus J}$, 则引理 \ref{prop:generator-cardinal} 蕴涵 $|J| \geq |I|$, 由对称性故 $|I|=|J|$. 因此环 $R$ 上的自由模有良定的秩当且仅当
\[ \forall n,m \in \Z_{\geq 0}, \; R^{\oplus n} \simeq R^{\oplus m} \iff n=m. \]
称此为左\emph{不变基数}性质 (英文简写为 IBN); 若考虑右模则谓右不变基数性质. 除环, 交换环和有限环皆有不变基数性质. 进一步的讨论可参看 \cite[\S 1]{Lam99}.
\end{remark}
\section{向量空间}\label{sec:vector-space}
读者理应接触过向量空间的理论. 从代数观点看, 向量空间大致是一种带有加法和纯量乘法的结构, 纯量乘法一般来自实数域 $\R$ 或复数域 $\CC$, 然而向量空间的代数性质实则可以建立在任意域上. 我们还能进一步舍弃乘法交换性, 进而考虑除环上的向量空间. 这既是一种自然又轻松的推广, 对于环论的研究也是必要的.
\begin{definition}\index{xiangliangkongjian@向量空间 (vector space)}
设 $D$ 为除环. 我们称右 $D$-模为 $D$-向量空间. 其子模, 商模等也称为子空间, 商空间.
\end{definition}
定义中选取左模或右模其实无关宏旨, 当 $D$ 为域时更可以不论左右. 这里选取右乘主要是为了符号的方便: 若 $\varphi: V \to V'$ 为 $D$-向量空间的态射 (亦即右 $D$-模的态射), 则态射对纯量乘法的性质可以写成类似结合律的形式:
\[ \varphi (vd) = (\varphi v)d, \quad v \in V, \; d \in D. \]
以下选定除环 $D$. 子空间, 基和维数等概念可以毫不费力地推广到 $D$-向量空间上.
\begin{definition-theorem}\index{ji@基 (basis)}
设 $V$ 为 $D$-向量空间, $X \subset V$, 以下性质等价:
\begin{enumerate}[(i)]
\item $X$ 是 $V$ 的极大线性无关子集;
\item 包含映射 $X \hookrightarrow V$ 诱导出同构 $D^{\oplus X} \rightiso V$;
\item $X$ 是 $V$ 的极小生成集;
\item $V$ 中的任意元素皆可表成形如 $\sum_{x \in X} x d_x$ 的有限和, 其中 $(d_x)_{x \in X}$ 是唯一的.
\end{enumerate}
满足以上任一性质的 $X$ 称为 $V$ 的\emph{基}.
\end{definition-theorem}
\begin{proof}
(i) $\implies$ (ii): 给定 $v \in V$, 由 $X$ 的极大性知 $X \sqcup \{v\}$ 必线性相关, 从而存在等式 $\sum_{x \in X \sqcup \{v\}} x d_x = 0$, 其中 $d_x$ 不全为零; 由 $X$ 的线性无关性可知 $d_v \neq 0$, 因此 $v = -\sum_{x \in X} x d_x d_v^{-1}$ 属于 $D^{\oplus X} \to V$ 的像. 既然 $D^{\oplus X} \to V$ 是单射, 它实为同构.
(ii) $\implies$ (iii): 不妨设 $V = D^{\oplus X}$. 显然 $X$ 生成 $V$; 假若 $X' \subset X \smallsetminus \{y\}$ (其中 $y \in X$), 则 $y$ 显然不属于 $X'$ 生成的子模 $D^{\oplus X'}$, 因而 $X$ 是极小生成集.
(iii) $\implies$ (iv): 由 $X$ 生成 $V$ 可知任意元素皆可表成有限和 $\sum_{x \in X} x d_x$. 假若
\[ \sum_{x \in X} x d_x = \sum_{x \in X} x d'_x, \quad \exists y \in X, \; d_y \neq d'_y, \]
则 $y = -\sum_{x \neq y} x (d_x - d'_x)(d_y - d'_y)^{-1}$, 由此导出 $X \smallsetminus \{y\}$ 也生成 $V$, 矛盾.
(iv) $\implies$ (i): 子集 $X$ 显然线性无关. 任意 $v \in V$ 可表为 $\sum_{x \in X} x d_x$, 亦即 $v - \sum_{x \in X} x d_x = 0$, 是以 $X \sqcup \{v\}$ 线性相关.
\end{proof}
\begin{proposition}\label{prop:existence-basis}
任意 $V$ 中的线性无关子集 $X$ 皆包含于某个基 $B$; 特别地, $V$ 有基.
\end{proposition}
\begin{proof}
选定 $X$, 令 $\mathcal{E} := \{Y \subset V: \text{线性无关}, \; Y \supset X \}$, 赋 $\mathcal{E}$ 以偏序 $Y \leq Y' \iff Y \subset Y'$. 今将运用 Zorn 引理 (定理 \ref{prop:Zorn}) 证明偏序集 $(\mathcal{E}, \leq)$ 有极大元, 从而得到所求之基: 仅须证明 $(\mathcal{E}, \leq)$ 中任意链 $\mathcal{E}'$ 有上界即可. 令 $Y \subset V$ 为 $\mathcal{E}'$ 中所有元素之并, 我们断言 $Y$ 线性无关: 假设等式
\[ \sum_{y \in Y} y d_y = 0 \quad \text{(有限和)} \]
成立, 由于 $\mathcal{E}'$ 为全序, 可取充分大的 $Y_0 \in \mathcal{E}'$ 使得 $y \notin Y_0 \implies d_y = 0$; 再利用 $Y_0$ 的线性无关性质, 即可导出$\forall y \in Y, \; d_y = 0$. 此 $Y$ 即为所求上界.
\end{proof}
\begin{lemma}[Steinitz 换元性质]\label{prop:exchange-vector-space}
设 $X$, $Y$ 为 $V$ 的两组有限基, $y \in Y \smallsetminus X$, 则存在 $x \in X \smallsetminus Y$ 使得 $(Y \smallsetminus \{y\}) \cup \{x\}$ 为基.
\end{lemma}
\begin{proof}
留意到 $X$ 非空确保 $Y$ 非空. 每个 $x \in X$ 可唯一地展为 $Y$ 的 $D$-线性组合, 我们断言 $y$ 必须出现在某个 $x$ 的展式中, 否则 $Y \smallsetminus \{y\}$ 将是 $V$ 的一组生成元, 与基的定义矛盾. 取如是 $x$ 并定义 $Z := (Y \smallsetminus \{y\}) \cup \{x\}$. 观察到
\begin{inparaenum}[(a)]
\item 每个 $Y$ 中元素都能展成 $Z$ 的线性组合, 考虑 $y$ 的情形并利用 $x$ 的展式即可;
\item $Z$ 必线性无关: 否则因为 $Y \smallsetminus \{y\}$ 线性无关故, $x$ 必能表成 $Y \smallsetminus \{y\}$ 的线性组合, 回忆上一步可知 $y$ 也能表成 $Y \smallsetminus \{y\}$ 的线性组合, 矛盾.
\end{inparaenum}
于是 $V$ 中元素能唯一地表成 $Z$ 的线性组合. 最后观察到 $x \notin Y$: 设若不然, 则 $y \notin X \implies y \neq x \implies Z = Y \smallsetminus \{y\}$, 与基是极大线性无关子集这一性质矛盾.
\end{proof}
换元性质是证明维数良定的关键. 由于类似论证在代数学中并非孤例, 在此乘势引入一套组合学的工具.
\begin{definition}[H.\ Whitney]\label{def:matroid}\index{nizhen@拟阵 (matroid)}
设 $E$ 为集合, $\text{Bs}$ 为 $E$ 的一族有限子集; 如下列条件满足则称资料 $(E, \text{Bs})$ 为\emph{拟阵}:
\begin{enumerate}[\bfseries {B}.1]
\item 集合 $\text{Bs}$ 非空;
\item 若 $X, Y \in \text{Bs}$ 而 $y \in Y \smallsetminus X$, 则存在 $x \in X \smallsetminus Y$ 使得 $(Y \smallsetminus \{y\}) \cup \{x\}\; \in \text{Bs}$.
\end{enumerate}
\end{definition}
举例来说, 只要 $D$-向量空间 $V$ 有一组有限基, 那么引理 \ref{prop:generator-cardinal} 蕴涵每个基皆有限, 这时运用引理 \ref{prop:exchange-vector-space}, 取 $E := V$ 和 $\text{Bs} := \{ V\;\text{的基} \}$ 便给出拟阵. 一般定义中还要求 $E$ 有限, 不过这点在此无关宏旨. 拟阵的奥妙在于它有种种等价然而面貌迥异的刻画, 感兴趣的读者可参阅专著 \cite{Oxl11}.
\begin{proposition}\label{prop:matroid-rank}
设 $(E, \mathrm{Bs})$ 为拟阵, 则 $\mathrm{Bs}$ 的每个元素都有相同的基数; 此基数称为该拟阵的秩.
\end{proposition}
\begin{proof}
设若不然, 取 $X, Y \in \text{Bs}$ 使得 $|Y| > |X|$ 且 $|Y \smallsetminus X|$ 尽可能小; 前一条件保证 $Y \smallsetminus X \neq \emptyset$. 根据换元性质 (\textbf{B.2}) 可取 $y \in Y \smallsetminus X$ 和 $x \in X \smallsetminus Y$ 使得 $Y' := (Y \smallsetminus \{y\}) \cup \{x\}\; \in \text{Bs}$. 从 $|Y|=|Y'| > |X|$ 和 $|Y' \smallsetminus X| < |Y \smallsetminus X|$ 导出矛盾.
\end{proof}
\begin{definition-theorem}[维数的不变性]\label{def:dimension-vector-space}\index[sym1]{dim@$\dim$}\index{xiangliangkongjian!维度 (dimension)}
设 $X, Y$ 为 $V$ 的两组基, 则 $|X|=|Y|$. 于是可定义 $V$ 的\emph{维数} 为基数 $|X|$, 记作 $\dim V$ 或 $\dim_D V$, 其中 $X$ 为 $V$ 的任意基.
\end{definition-theorem}
\begin{proof}
如先前观察到的, 引理 \ref{prop:generator-cardinal} 蕴涵 $V$ 的基或者全有限, 或全无限; 而且在无限情形有 $|X| \leq |Y| \leq |X|$, 此时配合定理 \ref{prop:Schröder-Bernstein} 立即导出 $|X|=|Y|$.
假设 $V$ 的基皆有限, 应用拟阵结构和命题 \ref{prop:matroid-rank} 即得 $|X|=|Y|$.
\end{proof}
我们在 \S\ref{sec:free-modules} 以此证明了非零交换环上的自由模有良定的秩.
\section{模的张量积}\label{sec:module-tensor-prod}
张量积是模论中最常用的构造之一. 不妨先从熟悉的向量空间情形入手: 令 $X, Y$ 为 $\CC$-向量空间; 考虑取值在某一 $\CC$-向量空间 $A$ 的函数 $B: X \times Y \to A$. 如果 $B(x, \cdot)$ 和 $B(\cdot, y)$ 对所有 $x,y$ 都是线性映射, 则 $B$ 称为双线性型. 所谓 $X$ 和 $Y$ 的张量积无非是``泛双线性型'' $X \times Y \to X \dotimes{\CC} Y$. 更精确地说, 我们要求每个双线性型 $B: X \times Y \to A$ 皆能按
$\begin{tikzcd}[row sep=small, column sep=small]
X \times Y \arrow[r] \arrow[rd, "B"'] & X \dotimes{\CC} Y \arrow[d, "\exists! \, f"] \\
& A
\end{tikzcd}$
分解, 其中 $f$ 是唯一确定的线性映射. 先不论构造, 记 $(x,y) \in X \times Y$ 在 $X \dotimes{\CC} Y$ 中的像为 $x \otimes y$. 双线性蕴涵
\begin{gather*}
(x+x') \otimes y = x \otimes y + x' \otimes y, \quad x \otimes (y+y') = x \otimes y + x \otimes y', \\
(tx) \otimes y = t(x \otimes y) = x \otimes (ty), \quad t \in \CC.
\end{gather*}
可以想见, 向量空间 $X \dotimes{\CC} Y$ 应当由所有 $x \otimes y$ 张成, 而且除上列性质外 $X \dotimes{\CC} Y$ 再无其它约束, 否则就不成其``泛''了.
对于一般的模, 问题的表述并无不同, 但是需要一系列的准备工作, 首先是双模的概念.
\begin{definition}[双模]\index{shuangmo@双模 (bimodule)}
设 $R, S$ 为环, 所谓 $(R, S)$-\emph{双模} 意谓一个兼具左 $R$-模与右 $S$-模结构的加法群 $M$, 满足下式
\[ r(ms) = (rm)s, \quad m \in M, \; r \in R, \; s \in S. \]
\end{definition}
此式遂可简写为 $rms$; 既可以把它理解为某种乘法的结合律, 又可视为 $R$ 左乘与 $S$ 右乘之间的交换性. 对 $(R, S)$-双模可以定义显然的同态, 同构, 商模等概念, 从而得到双模范畴 $(R, S)\dcate{Mod}$, 无须赘述. 注记 \ref{rem:bimodule-as-module} 将说明如何将双模理论化到单模的情形.
\begin{example}\label{eg:bimodule-Z}
存在范畴间的同构 $R\dcate{Mod} \simeq (R, \Z)\dcate{Mod}$. 这是因为任意左 $R$-模 $M$ 有唯一的 $\Z$-右乘结构 $ma := am$, 其中 $m \in M$, $a \in \Z$, 双模公理显然满足. 同理, $\cated{Mod}R \simeq (\Z, R)\dcate{Mod}$.
\end{example}
\begin{example}\label{eg:bimodule-comm}
当 $R$ 交换时, 任意左 $R$-模 $M$ 都自然地成为 $(R, R)$-双模: 置 $rmr' := rr' m$ 即可.
\end{example}
\begin{convention}\index[sym1]{R_M_S@${}_R M_S$}
今后我们将不时使用符号 ${}_R M$ (或 $M_S$, ${}_R M_S$) 表示 $M$ 带有左 $R$-模 (或右 $S$-模, $(R, S)$-双模) 结构.
\end{convention}
双模的语言便于研究张量积, 而张量积是由某种泛性质所刻画的``平衡积'', 后者是双线性型的非交换版本. 下面先从取值在一个交换群 $A$ 里的平衡积入手, $A$ 为双模的一般情形将在注记 \ref{rem:bimodule-balanced} 讨论.
\begin{definition}[平衡积: 单边情形]\label{def:balanced-product}\index{pinghengji@平衡积 (balanced product)}
设 $R$ 为环. 考虑模 $M_R$, ${}_R N$ 和交换群 $(A, +)$. 映射
\[ B: M \times N \to A \]
若满足以下条件则称为\emph{平衡积}:
\begin{compactenum}[(i)]
\item $B(x+x', y) = B(x, y) + B(x', y)$,
\item $B(x, y+y') = B(x, y) + B(x, y')$,
\item $B(xr, y) = B(x, ry)$,
\end{compactenum}
其中 $x, x' \in M$, $y, y' \in N$ 和 $r \in R$ 为任意元素. 所有平衡积 $B: M \times N \to A$ 所成集合记为 $\text{Bil}(M, N; A)$, 对加法构成交换群.
\end{definition}
给定 $M$, $N$, 所有从 $M \times N$ 出发的平衡积构成一个范畴 $\cate{Bil}(M, N; \ast)$: 从对象 $B$ 到 $B'$ 的态射定为如下形式的交换图表:
\[ \begin{tikzcd}[row sep=tiny]
{} & A \arrow[dd, "\text{群同态}"] \\
M \times N \arrow[ru, "B"] \arrow[rd, "B'"'] & \\
& A'
\end{tikzcd} \]
即将定义的张量积 $M \times N \to M \dotimes{R} N$ 无非是 $\cate{Bil}(M, N; \ast)$ 的始对象; 见定义 \ref{def:universal-objects}.
\begin{definition}\label{def:tensor-product}\index{zhangliangji@张量积 (tensor product)}\index[sym1]{1otimes}
满足下述泛性质的平衡积 $M \times N \to M \dotimes{R} N$ 称为 $M_R$ 和 ${}_R N$ 的\emph{张量积}: 对任意平衡积 $B: M \times N \to A$, 存在唯一的群同态 $M \dotimes{R} N \to A $ 使得下图交换
\[ \begin{tikzcd}[row sep=small]
M \times N \arrow[rd, "B"'] \arrow[r] & M \dotimes{R} N \arrow[d, "\exists!"] \\
& A
\end{tikzcd} \]
\end{definition}
既然 $M \times N \to M \dotimes{R} N$ 被泛性质刻画, 它是唯一确定的, 精确到一个唯一同构. 我们习惯省去箭头, 径称 $M \dotimes{R} N$ 为 $M$ 和 $N$ 的张量积; 有时连 $\otimes$ 的下标 $R$ 一并省去. 元素 $(x, y)$ 在 $M \dotimes{R} N$ 中的像记为 $x \otimes y$. 请留意: 单讨论 $M \dotimes{R} N$ 本身的结构并无多大意义, 下面探究张量积满足的种种函子性质时, 映射 $(x, y) \mapsto x \otimes y$ 总要一并考量.
\begin{lemma}
对任意 $M_R$, ${}_R N$, 张量积 $M \times N \to M \dotimes{R} N$ 存在.
\end{lemma}
\begin{proof}
受本节开头的讨论启发, 考虑集合 $M \times N$ 上的自由 $\Z$-模 $F$, 其中形如
\begin{gather*}
(x + x', y) - (x, y) - (x', y) \\
(x, y + y') - (x, y) - (x, y') \\
(xr, y) - (x, ry)
\end{gather*}
的元素生成一个 $\Z$-子模 $I$. 记 $M \dotimes{R} N := F/I$, 并记 $(x,y) \in M \times N$ 在 $F/I$ 中的像为 $x \otimes y$. 今将证明映射 $M \times N \to M \dotimes{R} N$ 即所求.
根据自由模的定义, 给定交换群 $A$ 及映射 $B: M \times N \to A$ 相当于给定同态 $\beta: F \to A$, 对应关系由
\[ \beta(x,y) = B(x,y), \quad (x,y) \in M \times N \]
唯一确定. 因此 $B$ 是平衡积当且仅当 $\beta$ 在 $I$ 上为零, 作为特例 $M \times N \to F/I$ 也是平衡积; 此时令 $\bar{\beta}: F/I \to A$ 为 $\beta$ 诱导的同态. 平衡积 $B: M \times N \to A$ 与同态 $\bar{\beta}: M \dotimes{R} N \to A$ 的对应遂由
\[ \bar{\beta}(x \otimes y) = B(x,y) \]
所刻画; 此式等价于定义 \ref{def:tensor-product} 中图表的交换性.
\end{proof}
\begin{lemma}\label{prop:functoriality-tensor}
张量积 $M \dotimes{R} N$ 对 $M, N$ 满足函子性: 设若 $\varphi: M \to M'$, $\psi: N \to N'$ 为模同态, 则存在唯一的同态 $\varphi \otimes \psi: M \dotimes{R} N \to M' \dotimes{R} N'$ 使下图交换.
\[ \begin{tikzcd}
M \times N \arrow[r] \arrow[d, "{\varphi \times \psi}"'] & M \dotimes{R} N \arrow[d, "{\exists! \varphi \otimes \psi}"] \\
M' \times N' \arrow[r] & M' \dotimes{R} N'
\end{tikzcd} \]
\end{lemma}
\begin{proof}
合成映射 $M \times N \xrightarrow{\phi \times \psi} M' \times N' \to M' \dotimes{R} N'$ 显然也是平衡积, 用定义 \ref{def:tensor-product} 便得到唯一之 $\varphi \otimes \psi: M \dotimes{R} N \to M' \dotimes{R} N'$ 使上图交换.
\end{proof}
以上引理的条件相当于要求
\[ (\varphi \otimes \psi) (x \otimes y) = \varphi(x) \otimes \psi(y). \]
这唯一确定了同态 $\varphi \otimes \psi$. 由此刻画可知同态的张量积与同态的合成兼容:
\[ (\varphi \otimes \psi) \circ (\varphi' \otimes \psi') = (\varphi \circ \varphi') \otimes (\psi \circ \psi'), \]
前提是合成同态 $\varphi \circ \varphi'$ 和 $\psi \circ \psi'$ 有定义.
\begin{proposition}\label{prop:tensor-bimodule-structure}
给定环 $Q, R, S$ 和双模 ${}_Q M_R$, ${}_R N_S$, 张量积 $M \dotimes{R} N$ 带有唯一的 $(Q, S)$-双模结构使得
\[ q(x \otimes y)s = qx \otimes ys, \quad q \in Q, \; s \in S. \]
\end{proposition}
不妨设想符号 $\dotimes{R}$ 的作用是缩并掉邻接的 $R$-模结构.
\begin{proof}
给定 $q \in Q$ 和 $s \in S$. 根据双模定义, $q$ 在 $M$ 上的左乘与 $s$ 在 $N$ 上的右乘分别给出 $M$ 和 $N$ 作为 $R$-模的自同态, 于是引理 \ref{prop:functoriality-tensor} 给出由下式刻画的群同态
\begin{align*}
M \dotimes{R} N & \longrightarrow M \dotimes{R} N \\
x \otimes y & \longmapsto qx \otimes ys.
\end{align*}
考虑所有 $q, s$ 便得到所求的双模结构.
\end{proof}
\begin{remark}[双模的平衡积]\label{rem:bimodule-balanced}
对于双模 ${}_Q M_R$, ${}_R N_S$, 同样可定义附加 $(Q, S)$-双模结构的平衡积 $B: M \times N \to A$, 其中我们要求 $A$ 是 $(Q, S)$-双模, 并对 $B$ 加上额外条件
\[ B(rx, ys) = r B(x, y)s, \quad r \in R, \; s \in S. \]
不难验证 $M \times N \to M \dotimes{R} N$ 便是这样的平衡积, 并且满足与定义 \ref{def:tensor-product} 类似的泛性质. 取 $Q = S = \Z$ 便回到原先情形.
引理 \ref{prop:functoriality-tensor} 断言的函子性也有直截了当的推广, 我们得到函子
\begin{align*}
\dotimes{R} : \left( (Q, R)\dcate{Mod} \right) \times \left( (R, S)\dcate{Mod} \right) & \longrightarrow (Q, S)\dcate{Mod} \\
(M, N) & \longmapsto M \dotimes{R} N \quad \text{(对象层次)} \\
(\varphi, \psi) & \longmapsto \varphi \otimes \psi \quad \text{(态射层次)}.
\end{align*}
当 $R$ 交换时, 按例 \ref{eg:bimodule-comm} 等同 $R\dcate{Mod}$ 与 $(R, R)\dcate{Mod}$, 可得函子
\[ \dotimes{R} : R\dcate{Mod} \times R\dcate{Mod} \longrightarrow R\dcate{Mod}; \]
进一步假设 $R=S$ 为域, 则一切化约到向量空间的张量积与双线性型.
\end{remark}
接着探讨张量积函子一些标准的函子性质, 这在应用中是十分要紧的.
\begin{proposition}[张量积保持直和]\label{prop:tensor-direct-sum}
对任意左, 右 $R$-模族 $(N_j)_{j \in J}$ 和 $(M_i)_{i \in I}$, 存在自然同态
\[\begin{tikzcd}[row sep=small]
\left( \prod_{i \in I} M_i\right) \dotimes{R} \left( \prod_{j \in J} N_j \right) \arrow[r] & \prod_{(i,j) \in I \times J} M_i \dotimes{R} N_j \\
\left( \bigoplus_{i \in I} M_i\right) \dotimes{R} \left( \bigoplus_{j \in J} N_j \right) \arrow[r, "\sim"] \arrow[phantom, u, sloped, "\subset" description] & \bigoplus_{(i,j) \in I \times J} M_i \dotimes{R} N_j \arrow[phantom, u, sloped, "\subset" description]
\end{tikzcd}\]
它对变元 $(N_j)_{j \in J}$ 和 $(M_i)_{i \in I}$ 具备函子性. 当 $M_i$, $N_j$ 具有双模结构时, 此性质可以延伸到注记 \ref{rem:bimodule-balanced} 版本的张量积.
\end{proposition}
\begin{proof}
首先观察到显然的平衡积
\begin{align*}
\prod_{i \in I} M_i \times \prod_{j \in J} N_j & \longrightarrow \prod_{(i,j) \in I \times J} M_i \dotimes{R} N_j \\
((x_i)_i, (y_j)_j) & \longmapsto (x_i \otimes y_j)_{i,j}
\end{align*}
它在 $\bigoplus_{i \in I} M_i \times \bigoplus_{j \in J} N_j$ 上的限制的像落在 $\bigoplus_{(i,j) \in I \times J} M_i \dotimes{R} N_j$ 中, 因为仅涉及有限个非零的 $x_i \otimes y_j$. 这就给出了断言中的两个同态, 且记涉及直和的同态为 $\Phi$.
为了证明 $\Phi$ 为同构, 仅须验证对每个交换群 $A$ 有以下交换图表 (可参看定理 \ref{prop:Yoneda-lemma})
\[\begin{tikzcd}
\Hom \left( (\bigoplus_{i \in I} M_i) \dotimes{R} (\bigoplus_{j \in J} N_j) , A \right) \arrow[r, "\sim"] & \text{Bil}\left( \bigoplus_i M_i, \bigoplus_j N_j; A \right) \arrow[d, "\text{限制}", "\simeq"'] \\
& \prod_{i,j} \text{Bil}(M_i, N_j; A) \\
\Hom\left( (\bigoplus_{i,j} M_i \dotimes{R} N_j), A \right) \arrow[r, "\sim"] \arrow[uu, "\Phi^*", "\text{拉回}"'] & \prod_{i,j} \Hom\left( M_i \dotimes{R} N_j, A \right) \arrow[u, "\simeq"]
\end{tikzcd}\]
其中 $\Hom = \Hom_{\cate{Ab}}$. 一切在注记 \ref{rem:bimodule-balanced} 的情形有显然的推广.
\end{proof}
\begin{proposition}[张量积的结合约束]\label{prop:tensor-assoc}\index{jieheyueshu}
设 $Q, R, S, T$ 为环. 存在典范同构
\begin{align*}
M \dotimes{R} (M' \dotimes{S} M'') & \longrightiso (M \dotimes{R} M') \dotimes{S} M'' \\
x \otimes (y \otimes z) & \longmapsto (x \otimes y) \otimes z.
\end{align*}
这里``典范同构''意味将双模 ${}_Q M_R$, ${}_R M'_S$, ${}_S M''_T$ 视为变元, 而同构的两端皆视为从
\[ \left( (Q, R)\dcate{Mod} \right) \times \left( (R, S)\dcate{Mod} \right) \times \left( (S, T)\dcate{Mod} \right) \]
到 $(Q, T)\dcate{Mod}$ 的函子.
\end{proposition}
\begin{proof}
为了简化论述, 取 $Q = T = \Z$. 注意到对任意交换群 $(A, +)$, 在范畴 $\cate{Ab}$ 中有
\[ \Hom\left( (M \dotimes{R} M') \dotimes{S} M'', A \right) = \text{Bil}\left( (M \dotimes{R} M') \times M''; A \right). \]
我们断言右项典范同构于``三元平衡积''所成的群, 亦即满足下述条件的映射 $D: M \times M' \times M'' \to A$:
\begin{compactenum}[(i)]
\item $D(x+x', y, z) = D(x, y, z) + D(x', y, z)$;
\item 同上, 但改为对变元 $y$, $z$ 操作;
\item $D(xr, y, sz) = D(x, rys, z)$, 其中 $r \in R$, $s \in S$.
\end{compactenum}
诚然, 给定如此的 $D$, 对每个固定的变元 $z \in Z$, 映射 $D(\cdot, \cdot, z)$ 属于 $\text{Bil}(M \times M'; A)$, 故存在同态 $B(\cdot, z): M \dotimes{R} M'' \to A$ 使得 $D(x,y,z) = B(x \otimes y, z)$. 现在变动 $z$. 从 $D$ 的性质与 $M \dotimes{R} M'$ 的右 $S$-模结构可知
\begin{align*}
B(x \otimes y, z + z') &= B(x \otimes y, z) + B(x \otimes y, z'), \\
B(x \otimes y, sz) &= B(x \otimes ys, z) = B((x \otimes y)s, z), \quad s \in S.
\end{align*}
进而 $B \in \text{Bil}\left( (M \dotimes{R} M') \times M''; A \right)$, 相应的同态 $\varphi: (M \dotimes{R} M') \dotimes{S} M'' \to A$ 由等式
\[ \varphi((x \otimes y) \otimes z) = D(x, y, z). \]
刻画. 以上每一步都可以倒转, 因而得到双射 $B \leftrightarrow D$. 同理,
\begin{align*}
\Hom\left( M \dotimes{R} (M' \dotimes{S} M''), A \right) & = \text{Bil}\left( M \times (M' \dotimes{S} M''); A \right)\\
& = \left\{ D: M \times M' \times M'' \to A, \; \text{三元平衡积} \right\},
\end{align*}
而且若首项里的同态 $\psi$ 对应末项的 $D$, 那么 $\psi(x \otimes (y \otimes z)) = D(x,y,z)$. 由于 $A$ 可任取, 从定理 \ref{prop:Yoneda-lemma} 遂得 $M \dotimes{R} (M' \dotimes{S} M'') \rightiso (M \dotimes{R} M') \dotimes{S} M''$ 使得 $(x \otimes y) \otimes z \mapsto x \otimes (y \otimes z)$. 此同构对 $M, M', M''$ 的函子性是自明的.
\end{proof}
\begin{proposition}[张量积的幺元]\label{prop:tensor-unit}
设 $R$, $S$ 为环. 利用环的乘法结构将 $R$ 和 $S$ 分别视为 $(R, R)$-双模和 $(S, S)$-双模, 则存在典范同构
\[ \begin{tikzcd}[row sep=tiny]
M \dotimes{S} S \arrow[r, "\sim"] & M & R \dotimes{R} M \arrow[l, "\sim"'] \\
m \otimes s \arrow[mapsto, r] & ms & \\
& rm & r \otimes m \arrow[mapsto, l]
\end{tikzcd} \]
其中 ${}_R M_S$ 视为变元, 上述三项皆视为 $(R, S)\dcate{Mod}$ 到自身的函子.
\end{proposition}
\begin{proof}
以下仅证明 $M \dotimes{S} S \rightiso M$, 另一侧完全类似. 以 $\Hom_{(R,S)}$ 表 $(R,S)\dcate{Mod}$ 的 $\Hom$. 对任意 $(R, S)$-双模 $A$ 都有
\[\begin{tikzcd}[column sep=small, row sep=tiny]
\Hom_{(R,S)}(M, A) \arrow[leftrightarrow, r, "1:1"] & \left\{ M \dotimes{S} S \xrightarrow{\text{平衡积}} A \right\} \arrow[leftrightarrow, r, "1:1"] & \Hom_{(R,S)}\left( M \dotimes{S} S, A \right) \\
\phi & B \arrow[mapsto, l] \arrow[mapsto, r, "{\varphi(m \otimes s)=B(m,s)}"'] & \varphi.
\end{tikzcd}\]
第一个双射由 $\phi(m)=B(m,1)$ 给出, 这是因为 $B(m,s) = B(ms,1)$ 故 $B$ 由 $\phi$ 确定, 而平衡积性质转译为双模同态的性质
\[ r\phi(m)s = r B(m, 1)s = B(rm, s) = B(rms, 1) = \phi(rms). \]
第二个双射是张量积的泛性质. 综上 $\varphi(m \otimes s) = \phi(ms)$. 于是加法群的同构 $\Hom_{(R,S)}(M, A) \xrightarrow[\sim]{\phi \mapsto \varphi} \Hom_{(R,S)}(M \dotimes{S} S, A)$ 无非是对 $m \otimes s \mapsto ms$ 作拉回; 应用定理 \ref{prop:Yoneda-lemma} 便完成证明.
\end{proof}
以下考虑的交换约束仅在 $R$ 交换时才有意义, 此时由例 \ref{eg:bimodule-comm} 可以将 $R$-模一律视为 $(R,R)$-双模.
\begin{proposition}[张量积的交换约束]\label{prop:tensor-comm}\index{jiaohuanyueshu}
设 $R$ 为交换环, 存在典范同构
\begin{align*}
c(M, N): M \dotimes{R} N & \longrightiso N \dotimes{R} M \\
x \otimes y & \longmapsto y \otimes x
\end{align*}
两边都视为以 $M$, $N$ 为变元的函子 $(R\dcate{Mod}) \times (R\dcate{Mod}) \to R\dcate{Mod}$. 它满足 $c(N, M) \circ c(M, N) = \identity_{M \otimes N}$.
\end{proposition}
\begin{proof}
对注记 \ref{rem:bimodule-balanced} 中考虑的满足 $B(rm, sn) = r B(m,n) s$ 的平衡积集合 $\text{Bil}(M,N;A)$ (其中 $A$ 是任意 $R$-模), 存在自然双射
\begin{align*}
c(M,N;A): \text{Bil}(M, N; A) & \rightiso \text{Bil}(N,M; A) \\
B & \mapsto [B^\text{op}: (n,m) \mapsto B(m,n)].
\end{align*}
根据该注记提及的泛性质, 立得自然同构 $c(M,N): M \dotimes{R} N \rightiso N \dotimes{R} M$, 满足 $c(M,N)(x \otimes y) = y \otimes x$. 由显然的等式 $c(N, M; A) \circ c(M, N; A) = \identity$ 得出 $c(N, M) \circ c(M, N) = \identity$.
\end{proof}
\begin{corollary}\label{prop:module-monoidal-cat}
对任意交换环 $R$, 资料 $R\dcate{Mod}$, $\dotimes{R}$, ${}_R R$ 连同上述典范同构构成对称幺半范畴 (见定义 \ref{def:monoidal-cat}, \ref{def:symm-monoidal-cat}).
\end{corollary}
\begin{proof}
运用例 \ref{eg:bimodule-comm}, 命题 \ref{prop:tensor-assoc}, \ref{prop:tensor-unit} 和 \ref{prop:tensor-comm}. 幺半范畴和辫结构的公理容易从上述同构的刻画 (如 $x \otimes (y \otimes z) \mapsto (x \otimes y) \otimes z$ 和 $x \otimes y \mapsto y \otimes x$ 等) 直接验证.
\end{proof}
上述各种性质并用, 就得到以下熟知的结果.
\begin{corollary}\label{prop:module-tensor-free}
设 $M$, $N$ 为交换环 $R$ 上的自由模, 分别取基 $X$, $Y$, 则 $M \dotimes{R} N$ 也是自由 $R$-模, 以 $X \times Y \stackrel{1:1}{\longleftrightarrow} \{x \otimes y: x \in X,\; y \in Y \}$为其基. 特别地, $\rank_R( M \dotimes{R} N) = \rank_R(M) \rank_R(N)$.
\end{corollary}
\section{环变换}\label{sec:change-of-rings}
对于给定的环 $R$, $S$, 如何以函子联系它们的模范畴 $R\dcate{Mod}$ 和 $S\dcate{Mod}$? 诸函子间又有何联系? 这类课题不单有理论上的兴趣, 在表示论, 交换代数等学科中的应用也无所不在. 本节将运用双模的语言, 就 $\Hom$ 和张量积函子予以剖析.
首先考虑 $\Hom$ 函子. 注记 \ref{rem:Mod-cat-preadditive} 表明模范畴中的 $\Hom$ 自然地形成加法群. 今考虑其上的模结构.
\begin{convention}\label{con:Hom-assoc}
取定环 $R$. 对于左模 ${}_R M$, ${}_R M'$, 本节将同态集 $\Hom({}_R M, {}_R M')$ 在 $M$ 上的作用以右乘表示:
\[ \Hom({}_R M, {}_R M') \ni f: m \longmapsto mf \in M'. \]
对于 $M_R$, $M'_R$ 的情形, 同态集 $\Hom(M_R, M'_R)$ 在 $M$ 上的作用以左乘表示:
\[ \Hom(M_R, M'_R) \ni f: m \longmapsto fm \in M'. \]
\end{convention}
在左模情形, 约定中同态的位置和一般惯例是颠倒的. 此处写法的优势在于模同态的性质可以看作乘法结合律: 对任意 $r \in R$ 和 $m \in M$,
\begin{gather*}
(rm)f = r(mf) \quad \text{(左模)} \\
f(mr) = (fm)r \quad \text{(右模)}.
\end{gather*}
\begin{definition}\label{def:Hom-bimodule}
设 $Q, R, S$ 为环. 对于双模 ${}_Q M_R$, ${}_Q M'_S$, 它们作为左 $Q$-模的 $\Hom$ 群 $\Hom({}_Q M, {}_Q M')$ 具备自然的 $(R, S)$-双模结构如下: 对任意 $f \in \Hom({}_Q M, {}_Q M')$,
\[ rfs: m \longmapsto \overbracket{( \underbracket{(mr)}_{\in M} f )}^{\in M'} s, \quad r \in R, \; s \in S. \]
类似地, 对于 ${}_R M_S$, ${}_Q M'_S$, 它们作为右 $S$-模的 $\Hom$ 群 $\Hom(M_S, M'_S)$ 具备自然的 $(Q, R)$-双模结构: 对任意 $f \in \Hom(M_S, M'_S)$,
\[ qfr: m \longmapsto q \overbracket{( f\underbracket{(rm)}_{\in M} )}^{\in M'}, \quad q \in Q, \; r \in R. \]
\end{definition}
从结合律诠释, 这些定义十分自然, 而双模性质的验证也是容易的; 显然 $\Hom(-,-)$ 给出从 $((Q,R)\dcate{Mod})^\text{op} \times (Q,S)\dcate{Mod}$ 到 $(R,S)\dcate{Mod}$ 的函子.
\begin{example}[对偶函子]
取 $M' = {}_R R_R$, 便得到函子 $\Hom(-, {}_R R): (R\dcate{Mod})^\text{op} \to \cated{Mod}R$ 和 $\Hom(-, R_R): (\cated{Mod}R)^\text{op} \to R\dcate{Mod}$. 这推广了线性代数中对偶空间的构造.
\end{example}
\begin{remark}\label{rem:module-internal-Hom} \index{neiHom@内 $\Hom$ (internal Hom)}
当 $Q=R=S$ 为交换环时, 范畴 $R\dcate{Mod}$ 里的 $\Hom$ 集不仅仅是加法群, 它本身还是 $R\dcate{Mod}$ 的对象 (参看例 \ref{eg:bimodule-comm}); 事实上, $R$ 在模同态 $f: M \to N$ 上的纯量乘法无非是 $rf: m \mapsto rf(m)$, 这是线性代数中熟知的构造. 由此可以直接验证同态的合成是 $R$-双线性型: 对于 $f \in \Hom_R(M,N)$, $g \in \Hom_R(L,M)$ 和 $r \in R$, 恒有 $(rf)g = r(fg) = f(rg)$.
从 $R\dcate{Mod}$ 标准的幺半范畴结构 (推论 \ref{prop:module-monoidal-cat}), 可径行验证它对自身构成充实范畴, 参看\S \ref{sec:enriched-cat}. 这种自为充实的 $\Hom$-结构在数学中十分常见, 惯称为内 $\Hom$.
\end{remark}
张量积最根本的性质之一在于它和 $\Hom$-函子的伴随性, 归根结底, 这无非是张量积泛性质的下述改写.
\begin{theorem}\label{prop:Hom-tensor-adjunction}\index{zhangliangji!伴随性}
设 $Q, R, S$ 为环. 存在典范同构
\begin{align*}
\Hom_{(Q,S)\dcate{Mod}} \left( M \dotimes{R} N, A \right) & \longrightiso \Hom_{(R,S)\dcate{Mod}} \left( N, \Hom({}_Q M, {}_Q A) \right) \\
\varphi & \longmapsto \left[ y \mapsto [x \mapsto \varphi(x \otimes y)] \right],
\end{align*}
和
\begin{align*}
\Hom_{(Q,S)\dcate{Mod}} \left( M \dotimes{R} N, A \right) & \longrightiso \Hom_{(Q,R)\dcate{Mod}} \left( M, \Hom(N_S, A_S) \right) \\
\varphi & \longmapsto \left[ x \mapsto [y \mapsto \varphi(x \otimes y)] \right],
\end{align*}
同构两端视为以 ${}_Q M_R$, ${}_R N_S$ 和 ${}_Q A_S$ 为变元的函子
\[ \left( (Q, R)\dcate{Mod}\right)^\text{op} \times \left((R, S)\dcate{Mod}\right)^\text{op} \times \left((Q, S)\dcate{Mod}\right) \to \cate{Ab}. \]
\end{theorem}
\begin{proof}
先证第一个断言. 根据注记 \ref{rem:bimodule-balanced}, $\Hom_{(Q,S)\dcate{Mod}} \left( M \dotimes{R} N, A \right)$ 等同于从 $M \times N$ 到 $A$ 的所有平衡积 $B$ (记入 $(Q, S)$-双模结构) 所成的加法群; 记此对应为 $\varphi \leftrightarrow B$. 给定平衡积 $B: M \times N \to A$ 相当于给定映射 $N \ni y \mapsto B(\cdot, y) = \varphi(\bullet \otimes y)$, 记之为 $\Phi$, 平衡积的定义转译为
\begin{compactitem}
\item $\Phi \in \Hom(N, \Hom(M, A))$ (右侧是加法群范畴 $\cate{Ab}$ 的 $\Hom$);
\item $qm$ 在 $\Phi(n)$ 下的像 (即 $B(qm, n)$) 等于 $m$ 在 $\Phi(n)$ 下的像 (即 $B(m, n)$) 左乘以 $q$, 简言之 $\Phi(n) \in \Hom({}_Q M, {}_Q A)$;
\item 对 $\Phi(n)$ 采取约定 \ref{con:Hom-assoc}, 则有 $ m \Phi(ns) = B(m, ns) = B(m, n)s = (m\Phi(n))s$;
\item 同上, $mr \Phi(n) = B(mr, n) = B(m, rn) = m\Phi(rn)$.
\end{compactitem}
根据定义 \ref{def:Hom-bimodule}, 末两条相当于说 $\Phi(n)s = \Phi(ns)$, $\Phi(rn) = r\Phi(n)$, 因此给定平衡积 $B: M \times N \to A$ 相当于给定 $(R,S)$-双模的同态 $\Phi: N \to \Hom({}_Q M, {}_Q A)$. 同构 $\varphi \mapsto B \mapsto \Phi$ 的函子性是自明的.
第二个断言的证明完全类似, 考虑映射 $x \mapsto B(x, \cdot) = \varphi(x \otimes \bullet)$ 即可.
\end{proof}
\begin{corollary}
设 $M$ 为 $(Q, R)$-双模, 则函子
\[ M \dotimes{R} -: (R, S)\dcate{Mod} \to (Q, S)\dcate{Mod} \]
有右伴随函子 $\Hom({}_Q M, {}_Q (-))$. 类似地, 设 $N$ 为 $(R, S)$-双模, 则函子
\[ - \dotimes{R} N: (Q, R)\dcate{Mod} \to (Q, S)\dcate{Mod} \]
有右伴随函子 $\Hom(N_S, (-)_S)$. 两者的伴随同构皆来自定理 \ref{prop:Hom-tensor-adjunction}.
\end{corollary}
\begin{proof}
回忆伴随函子之定义 \ref{def:adjunction-pair}.
\end{proof}
回归本节开始的设定: 令 $f: R \to S$ 为环同态, 则 $S$ 具有 $(R, S)$-双模和 $(S, R)$-双模结构: 律定 $R$ 在 $S$ 上的左, 右乘法分别为
\[ rs := f(r)s, \quad sr := sf(r), \]
等式右侧表示 $S$ 中的乘法. 因此函子 $- \dotimes{R} S$ 和 $S \dotimes{R} -$ 等有意义. 另一方面, 从定义 \ref{def:Hom-bimodule} 又可以得到函子 $\Hom(S_R, (-)_R): \cated{Mod}R \to \cated{Mod}S$ 和 $\Hom({}_R S, {}_R (-)): R\dcate{Mod} \to S\dcate{Mod}$; 与定义 \ref{def:Hom-bimodule} 不同的是此处只有 $S$ 是双模, 然而从例 \ref{eg:bimodule-Z} 可知 $(-)_R = {}_\Z (-)_R$, ${}_R (-) = {}_R (-)_\Z$ 等等, 故无妨碍.
另一方面, 由于任意左 $S$-模 $M$ 可借由 $rm := f(r)m$ 变成左 $R$-模, 右模亦同, 同态 $f$ 导出所谓的拉回或忘却函子 \index{lahui} \index{wangquehanzi}
\begin{align*}
\mathcal{F}_{R \to S}: \cated{Mod}S & \longrightarrow \cated{Mod}R, \\
{}_{R \to S} \mathcal{F}: S\dcate{Mod} & \longrightarrow R\dcate{Mod}.
\end{align*}
% 以下的观察必须用到环的幺元.
\begin{lemma}\label{prop:forgetful-as-tensor-Hom}
存在函子之间的同构
\begin{gather*}
\Hom({}_S S, {}_S (-)) \simeq {}_{R \to S} \mathcal{F} \simeq {}_R S \dotimes{S} - , \\
\Hom(S_S, (-)_S) \simeq \mathcal{F}_{R \to S} \simeq - \dotimes{S} S_R.
\end{gather*}
\end{lemma}
\begin{proof}
处理第二条即可. 考虑模 $M_S$, 模同态的定义蕴涵了交换群的同构
\begin{align*}
\Hom(S_S, M_S) & \longrightiso M \\
\varphi & \longmapsto \varphi(1).
\end{align*}
这里仍沿用约定 \ref{con:Hom-assoc}. 由于 $(\varphi r)(1) = \varphi(r \cdot 1) = \varphi(1 \cdot f(r)) = \varphi(1) f(r)$, 前述同构给出 $\Hom({}_S S, {}_S M) \rightiso \mathcal{F}_{R \to S}(M)$; 它对 $M$ 的函子性是容易验证的.
另一方面, 命题 \ref{prop:tensor-unit} 给出右 $S$-模的自然同构 $M \dotimes{S} S_S \rightiso M$ 映 $m \otimes s$ 为 $ms$. 回忆 $M \dotimes{S} S$ 的右模结构可知 $\mathcal{F}_{R \to S} (M \dotimes{S} S_S) = M \dotimes{S} \mathcal{F}_{R \to S}(S_S) = M \dotimes{S} S_R$.
\end{proof}
\begin{corollary}\label{prop:IP-vs-F}
设 $f: R \to S$ 为环同态. 以下每个图表
\[\begin{tikzcd}[column sep=large]
\cated{Mod}R \arrow[bend left=50, r, "{- \dotimes{R} S}"] \arrow[bend right=50, r, "{\Hom(S_R, (-)_R)}"'] & \cated{Mod}S \arrow[l, "{\mathcal{F}_{R \to S}}"]
\end{tikzcd} \quad
\text{和} \quad
\begin{tikzcd}[column sep=large]
R\dcate{Mod} \arrow[bend left=50, r, "{S \dotimes{R} -}"] \arrow[bend right=50, r, "{\Hom({}_R S, {}_R (-))}"'] & S\dcate{Mod} \arrow[l, "{ {}_{R \to S} \mathcal{F} }"]
\end{tikzcd}\]
中的函子皆具有如下所示的伴随关系:
\begin{center} \begin{tikzpicture}[entity/.style={draw, color=black!25, rectangle, rounded corners=3mm, minimum width=12mm, minimum height=7mm, outer sep=1mm, top color=white, bottom color=black!10} ]
\node[entity] (A) at (0,0) {};
\node[entity] (B) at (2.7, 0) {};
\draw (A) edge[->, bend left=40] node[above, inner sep=0.7em]{\scriptsize 左伴随} (B);
\draw (B) edge[->] node[below] {\scriptsize 右伴随} (A);
\node[entity] (C) at (5.3, 0) {};
\node[entity] (D) at (8, 0) {};
\draw (C) edge[->, bend right=40] node[below, inner sep=0.7em]{\scriptsize 右伴随} (D);
\draw (D) edge[->] node[above] {\scriptsize 左伴随} (C);
\end{tikzpicture}\end{center}
涉及的伴随同构皆来自定理 \ref{prop:Hom-tensor-adjunction}.
\end{corollary}
\begin{proof}
左模和右模情形的证明相同, 下面仅考虑左模 ${}_R M$, ${}_S N$. 引理 \ref{prop:forgetful-as-tensor-Hom} 配合定理 \ref{prop:Hom-tensor-adjunction} 蕴涵
\begin{align*}
\Hom\left( {}_R M, {}_{R \to S} \mathcal{F} ({}_S N) \right) & \simeq \Hom\left( {}_R M, \Hom({}_S S, {}_S N) \right) \\
& \simeq \Hom\left( S \dotimes{R} M, {}_S N \right)
\end{align*}
其中每一步都是典范同构, 因而给出了 $(S \dotimes{R} -, {}_{R \to S} \mathcal{F})$ 的伴随关系. 同理
\begin{align*}
\Hom\left({}_{R \to S} \mathcal{F} ({}_S N), {}_R M \right) & \simeq \Hom\left( {}_R S \dotimes{S} N, {}_R M \right) \\
& \simeq \Hom\left( {}_S N, \Hom( {}_R S, {}_R M) \right),
\end{align*}
每一步都是典范同构. 明所欲证.
\end{proof}
对给定的环同态 $f: R \to S$, 推论 \ref{prop:IP-vs-F} 中的函子也标作 \index[sym1]{P_RS@$P_{R \to S}$}\index[sym1]{I_RS@$I_{R \to S}$} \index{jibianhuan@基变换 (base change)}
\begin{gather*}
P_{R \to S} := - \dotimes{R} S, \quad I_{R \to S} := \Hom(S_R, (-)_R); \\
{}_{R \to S} P := {}_S S \dotimes{R} -, \quad {}_{R \to S} I := \Hom({}_R S, {}_R (-)).
\end{gather*}
字母 P 暗示``投射'', I 暗示``归纳'', 它们显然都是加性函子. 实践中往往需要上述伴随同构的显式描述. 以伴随对 $({}_{R \to S} P, {}_{R \to S}\mathcal{F})$ 为例, 证明中的同构按定义铺开为
\begin{equation}\label{eqn:IP-adjunction-explicit-1} \begin{tikzcd}[row sep=small]
\Hom\left( {}_R M, {}_{R \to S} \mathcal{F} ({}_S N)\right) \arrow[r, "\sim"] & \Hom\left( {}_R M, \Hom({}_S S, {}_S N) \right) \arrow[r, "\sim"] & \Hom\left( S \dotimes{R} M, {}_S N \right) \\
f \arrow[mapsto, r] & \left[ m \mapsto [s \mapsto s(mf)] \right] \arrow[mapsto, r] & \left[ s \otimes m \mapsto s(mf) \right] ;
\end{tikzcd}\end{equation}
右模情形亦同. 这是实际操作张量积时常用的公式.
\begin{lemma}\label{prop:IP-transitivity}
考虑环同态 $\begin{tikzcd} Q \arrow[r, "f"'] \arrow[rr, bend left=25, "gf"] & R \arrow[r, "g"'] & S \end{tikzcd}$. 相应的忘却函子满足等式
\begin{gather*}
\mathcal{F}_{Q \to R} \circ \mathcal{F}_{R \to S} = \mathcal{F}_{Q \to S}, \\
{}_{Q \to R} \mathcal{F} \circ {}_{R \to S} \mathcal{F} = {}_{Q \to S} \mathcal{F};
\end{gather*}
而函子 $P$, $I$ 满足同构
\[\begin{array}{ll}
P_{R \to S} \circ P_{Q \to R} \simeq P_{Q \to S}, & I_{R \to S} \circ I_{Q \to R} \simeq I_{Q \to S}, \\
{}_{R \to S} P \circ {}_{Q \to R} P \simeq {}_{Q \to S} P, & {}_{R \to S} I \circ {}_{Q \to R} I \simeq {}_{Q \to S} I.
\end{array}\]
\end{lemma}
\begin{proof}
忘却函子 $\mathcal{F}$ 的情形是自明的. 其余运用推论 \ref{prop:IP-vs-F} 和伴随函子的合成性质 (命题 \ref{prop:adjunction-composition}) 即可导出; 左模和右模的情形当然是类似的.
\end{proof}
以下考虑 $R$ 为交换环的情形, 推论 \ref{prop:module-monoidal-cat} 断言 $(R\dcate{Mod}, \otimes, \ldots)$ 构成幺半范畴. 关于幺半函子的概念见定义 \ref{def:monoidal-functor}.
\begin{proposition}
对交换环之间的同态 $R \to S$, 函子 $P_{R \to S}: R\dcate{Mod} \to S\dcate{Mod}$ 具备自然的幺半函子结构.
\end{proposition}
\begin{proof}
我们只给出幺半函子所需的函子同构 $P_{R \to S}(-) \dotimes{S} P_{R \to S}(-) \xrightarrow[\xi]{\sim} P_{R \to S}\left( - \dotimes{R} - \right)$. 回忆到 $P_{R \to S}(M) = M \dotimes{R} S$; 对于 $R$-模 $M$, $N$, 取以下诸同构的合成为 $\xi(M,N)$:
\[\begin{tikzcd}[row sep=small, column sep=tiny, every cell/.style={scale=0.93, transform shape, inner xsep=1ex, inner ysep=0.85ex}]
\left( M \dotimes{R} S \right) \dotimes{S} \left( N \dotimes{R} S \right) \arrow[r, "\sim"] & \left( M \dotimes{R} S \right) \dotimes{S} \left( S \dotimes{R} N \right) \arrow[r, "\sim"] & M \dotimes{R} \left( S \dotimes{R} N \right) \arrow[r, "\sim"] & \left( M \dotimes{R} N \right) \dotimes{R} S \\
(x \otimes s) \otimes (y \otimes t) \arrow[mapsto, r] & (x \otimes s) \otimes (t \otimes y) \arrow[mapsto, r] & (x \otimes st \otimes y) \arrow[mapsto, r] & (x \otimes y) \otimes st
\end{tikzcd}\]
其中第一步和最后一步是 $\otimes_R$ 的交换约束 (命题 \ref{prop:tensor-comm}), 中间是结合约束与幺元约束 $S \dotimes{S} S \rightiso S$ (命题 \ref{prop:tensor-unit}) 的应用. 从第二行的描述容易验证定义 \ref{def:monoidal-functor} 中的交换图表, 而条件 $P_{R \to S}(R) = S$ 是幺元约束的直接推论.
\end{proof}
\section{主理想环上的有限生成模}\label{sec:PID-module}
本节的环都是非零含幺交换整环. 为环 $R$ 的主理想引进标准的符号 $(a) := Ra$, 其中 $a \in R$. 留意到 $(a)(b) = (ab)$. 现在将关于挠元与挠部分的一般定义 \ref{def:tor-ann} 施于整环 $R$. 任意 $R$-模 $M$ 的所有挠元构成一个子模 $M_\text{tor} \subset M$, 称为\emph{挠子模}: 这是因为 $ax=0$, $by=0$ 蕴涵 $ab(x+y)=0$. 对于主理想 $(a)$, 相应的挠部分 $M[\mathfrak{a}] \subset M$ 简记为 $M[a]$.
\begin{definition}
设 $M$ 为 $R$-模. 其\emph{无挠商}定义为商模 \index[sym1]{$M_\text{tf}$}\index[sym1]{$M_\text{tor}$}
\[ M_\text{tf} := M/M_\text{tor}. \]
\end{definition}
注意到任意模同态 $\varphi: M \to N$ 都满足 $\varphi(M_\text{tor}) \subset N_\text{tor}$, 从而诱导 $\varphi_\text{tf}: M_\text{tf} \to N_\text{tf}$. 显然无挠商 $M \mapsto M_\text{tf}$ 实际给出一个函子.
\begin{lemma}
任意 $R$-模 $M$ 的无挠商 $M_\text{tf}$ 都是无挠模. 对商同态 $M \to M_\text{tf}$ 的拉回给出自然同构
\[ \Hom_R(M_\text{tf}, N) \rightiso \Hom_R(M, N), \quad \text{当 $N$ 为无挠 $R$-模.} \]
\end{lemma}
记 $R\dcate{Mod}_\text{tf}$ 为所有无挠 $R$-模构成的全子范畴, 那么函子 $M \mapsto M_\text{tf}$ 连同上述同构给出了包含函子 $R\dcate{Mod}_\text{tf} \to R\dcate{Mod}$ 的左伴随. 此即无挠商的泛性质.
\begin{proof}
设 $\bar{x} \in M_\text{tf}$ 为挠元, 并取原像 $x \in M$; 仅须证明 $x \in M_\text{tor}$ 即可得到第一个断言. 设 $r \in R$, $r \neq 0$ 且 $r\bar{x} = 0$, 则 $rx \in M_\text{tor}$; 再取非零的 $s \in R$ 使得 $srx=0$ 便导出 $x \in M_\text{tor}$.
今设 $N$ 无挠, $\varphi \in \Hom_R(M, N)$. 应用性质 $\varphi(M_\text{tor}) \subset N_\text{tor} = \{0\}$ 和命题 \ref{prop:1st-homomorphism-module} 立得分解 $\varphi = [M \to M_\text{tf} \xrightarrow{\varphi_\text{tf}} N]$.
\end{proof}
\begin{convention}
本节后续部分一律假设 $R$ 为主理想环 (见定义 \ref{def:PID}).
\end{convention}
\begin{lemma}\label{prop:PID-free-submodule}
设 $E$ 为自由 $R$-模, 则 $E$ 的任意子模 $M$ 皆自由, 而且 $\rank_R(M) \leq \rank_R(E)$.