forked from stacks/stacks-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dga.tex
6282 lines (5690 loc) · 217 KB
/
dga.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
\input{preamble}
% OK, start here.
%
\begin{document}
\title{Differential Graded Algebra}
\maketitle
\phantomsection
\label{section-phantom}
\tableofcontents
\section{Introduction}
\label{section-introduction}
\noindent
In this chapter we talk about differential graded algebras, modules,
categories, etc. A basic reference is \cite{Keller-Deriving}.
A survey paper is \cite{Keller-survey}.
\medskip\noindent
Since we do not worry about length of exposition in the Stacks project
we first develop the material in the setting of categories of differential
graded modules. After that we redo the constructions in the setting of
differential graded modules over differential graded categories.
\section{Conventions}
\label{section-conventions}
\noindent
In this chapter we hold on to the convention that {\it ring} means
commutative ring with $1$. If $R$ is a ring, then an {\it $R$-algebra $A$}
will be an $R$-module $A$ endowed with an $R$-bilinear map $A \times A \to A$
(multiplication) such that multiplication is associative and has a unit.
In other words, these are unital associative $R$-algebras
such that the structure map $R \to A$ maps into the center of $A$.
\section{Differential graded algebras}
\label{section-dga}
\noindent
Just the definitions.
\begin{definition}
\label{definition-dga}
Let $R$ be a commutative ring. A {\it differential graded algebra over $R$}
is either
\begin{enumerate}
\item a chain complex $A_\bullet$ of $R$-modules endowed with
$R$-bilinear maps $A_n \times A_m \to A_{n + m}$,
$(a, b) \mapsto ab$ such that
$$
\text{d}_{n + m}(ab) = \text{d}_n(a)b + (-1)^n a\text{d}_m(b)
$$
and such that $\bigoplus A_n$ becomes an associative and unital
$R$-algebra, or
\item a cochain complex $A^\bullet$ of $R$-modules endowed with
$R$-bilinear maps $A^n \times A^m \to A^{n + m}$, $(a, b) \mapsto ab$
such that
$$
\text{d}^{n + m}(ab) = \text{d}^n(a)b + (-1)^n a\text{d}^m(b)
$$
and such that $\bigoplus A^n$ becomes an associative and unital $R$-algebra.
\end{enumerate}
\end{definition}
\noindent
We often just write $A = \bigoplus A_n$ or $A = \bigoplus A^n$ and
think of this as an associative unital $R$-algebra endowed with a
$\mathbf{Z}$-grading and an $R$-linear operator $\text{d}$ whose square
is zero and which satisfies the Leibniz rule as explained above. In this case
we often say ``Let $(A, \text{d})$ be a differential graded algebra''.
\begin{definition}
\label{definition-homomorphism-dga}
A {\it homomorphism of differential graded algebras}
$f : (A, \text{d}) \to (B, \text{d})$ is an algebra map $f : A \to B$
compatible with the gradings and $\text{d}$.
\end{definition}
\begin{definition}
\label{definition-opposite-dga}
Let $R$ be a ring. Let $(A, \text{d})$ be a differential graded algebra
over $R$. The {\it opposite differential graded algebra} is the differential
graded algebra $(A^{opp}, \text{d})$ over $R$ where $A^{opp} = A$
as an $R$-module, $\text{d} = \text{d}$, and multiplication is
given by
$$
a \cdot_{opp} b = (-1)^{\deg(a)\deg(b)} b a
$$
for homogeneous elements $a, b \in A$.
\end{definition}
\noindent
This makes sense because
\begin{align*}
\text{d}(a \cdot_{opp} b)
& =
(-1)^{\deg(a)\deg(b)} \text{d}(b a) \\
& =
(-1)^{\deg(a)\deg(b)} \text{d}(b) a +
(-1)^{\deg(a)\deg(b) + \deg(b)}b\text{d}(a) \\
& =
(-1)^{\deg(a)}a \cdot_{opp} \text{d}(b) + \text{d}(a) \cdot_{opp} b
\end{align*}
as desired.
\begin{definition}
\label{definition-cdga}
A differential graded algebra $(A, \text{d})$ is {\it commutative} if
$ab = (-1)^{nm}ba$ for $a$ in degree $n$ and $b$ in degree $m$.
We say $A$ is {\it strictly commutative} if in addition $a^2 = 0$
for $\deg(a)$ odd.
\end{definition}
\noindent
The following definition makes sense in general but is perhaps
``correct'' only when tensoring commutative differential graded
algebras.
\begin{definition}
\label{definition-tensor-product}
Let $R$ be a ring.
Let $(A, \text{d})$, $(B, \text{d})$ be differential graded algebras over $R$.
The {\it tensor product differential graded algebra} of $A$ and $B$
is the algebra $A \otimes_R B$ with multiplication defined by
$$
(a \otimes b)(a' \otimes b') = (-1)^{\deg(a')\deg(b)} aa' \otimes bb'
$$
endowed with differential $\text{d}$ defined by the rule
$\text{d}(a \otimes b) = \text{d}(a) \otimes b + (-1)^m a \otimes \text{d}(b)$
where $m = \deg(a)$.
\end{definition}
\begin{lemma}
\label{lemma-total-complex-tensor-product}
Let $R$ be a ring.
Let $(A, \text{d})$, $(B, \text{d})$ be differential graded algebras over $R$.
Denote $A^\bullet$, $B^\bullet$ the underlying cochain complexes.
As cochain complexes of $R$-modules we have
$$
(A \otimes_R B)^\bullet = \text{Tot}(A^\bullet \otimes_R B^\bullet).
$$
\end{lemma}
\begin{proof}
Recall that the differential of the total complex is given by
$\text{d}_1^{p, q} + (-1)^p \text{d}_2^{p, q}$ on $A^p \otimes_R B^q$.
And this is exactly the same as the rule for the differential
on $A \otimes_R B$ in
Definition \ref{definition-tensor-product}.
\end{proof}
\section{Differential graded modules}
\label{section-modules}
\noindent
Just the definitions.
\begin{definition}
\label{definition-dgm}
Let $R$ be a ring.
Let $(A, \text{d})$ be a differential graded algebra over $R$.
A (right) {\it differential graded module} $M$ over $A$ is a right $A$-module
$M$ which has a grading $M = \bigoplus M^n$ and a differential $\text{d}$
such that $M^n A^m \subset M^{n + m}$, such that
$\text{d}(M^n) \subset M^{n + 1}$, and such that
$$
\text{d}(ma) = \text{d}(m)a + (-1)^n m\text{d}(a)
$$
for $a \in A$ and $m \in M^n$. A
{\it homomorphism of differential graded modules} $f : M \to N$
is an $A$-module map compatible with gradings and differentials.
The category of (right) differential graded $A$-modules is denoted
$\text{Mod}_{(A, \text{d})}$.
\end{definition}
\noindent
Note that we can think of $M$ as a cochain complex $M^\bullet$
of (right) $R$-modules. Namely, for $r \in R$ we have $\text{d}(r) = 0$
and $r$ maps to a degree $0$ element of $A$, hence
$\text{d}(mr) = \text{d}(m)r$.
\medskip\noindent
We can define {\it left differential graded $A$-modules} in exactly the same
manner. If $M$ is a left $A$-module, then we can think of $M$ as a
right $A^{opp}$-module with multiplication $\cdot_{opp}$ defined by
the rule
$$
m \cdot_{opp} a = (-1)^{\deg(a)\deg(m)} a m
$$
for $a$ and $m$ homogeneous. The category of left differential graded
$A$-modules is equivalent to the category of right differential
graded $A^{opp}$-modules. We prefer to work with right modules
(essentially because of what happens in Example \ref{example-dgm-dg-cat}), but
the reader is free to switch to left modules if (s)he so desires.
\begin{lemma}
\label{lemma-dgm-abelian}
Let $(A, d)$ be a differential graded algebra. The category
$\text{Mod}_{(A, \text{d})}$ is abelian and has arbitrary limits and colimits.
\end{lemma}
\begin{proof}
Kernels and cokernels commute with taking underlying $A$-modules.
Similarly for direct sums and colimits. In other words, these operations
in $\text{Mod}_{(A, \text{d})}$ commute with the forgetful functor to the
category of $A$-modules. This is not the case for products and limits.
Namely, if $N_i$, $i \in I$ is a family of
differential graded $A$-modules, then the product $\prod N_i$ in
$\text{Mod}_{(A, \text{d})}$ is given by setting $(\prod N_i)^n = \prod N_i^n$
and $\prod N_i = \bigoplus_n (\prod N_i)^n$. Thus we see that the product
does commute with the forgetful functor to the category of graded $A$-modules.
A category with products and equalizers has limits, see
Categories, Lemma \ref{categories-lemma-limits-products-equalizers}.
\end{proof}
\noindent
Thus, if $(A, \text{d})$ is a differential graded
algebra over $R$, then there is an exact functor
$$
\text{Mod}_{(A, \text{d})} \longrightarrow \text{Comp}(R)
$$
of abelian categories. For a differential graded module $M$ the
cohomology groups $H^n(M)$ are defined as the cohomology of the
corresponding complex of $R$-modules. Therefore, a short exact
sequence $0 \to K \to L \to M \to 0$ of differential graded modules
gives rise to a long exact sequence
\begin{equation}
\label{equation-les}
H^n(K) \to H^n(L) \to H^n(M) \to H^{n + 1}(K)
\end{equation}
of cohomology modules, see
Homology, Lemma \ref{homology-lemma-long-exact-sequence-cochain}.
\medskip\noindent
Moreover, from now on we borrow all the terminology used for
complexes of modules. For example, we say that a differential
graded $A$-module $M$ is {\it acyclic} if $H^k(M) = 0$ for
all $k \in \mathbf{Z}$. We say that a homomorphism $M \to N$
of differential graded $A$-modules is a {\it quasi-isomorphism}
if it induces isomorphisms $H^k(M) \to H^k(N)$ for all $k \in \mathbf{Z}$.
And so on and so forth.
\begin{definition}
\label{definition-shift}
Let $(A, \text{d})$ be a differential graded algebra.
Let $M$ be a differential graded module.
For any $k \in \mathbf{Z}$ we define the {\it $k$-shifted module}
$M[k]$ as follows
\begin{enumerate}
\item as $A$-module $M[k] = M$,
\item $M[k]^n = M^{n + k}$,
\item $\text{d}_{M[k]} = (-1)^k\text{d}_M$.
\end{enumerate}
For a morphism $f : M \to N$ of differential graded $A$-modules
we let $f[k] : M[k] \to N[k]$ be the map equal to $f$ on underlying
$A$-modules. This defines a functor
$[k] : \text{Mod}_{(A, \text{d})} \to \text{Mod}_{(A, \text{d})}$.
\end{definition}
\noindent
The remarks in Homology, Section \ref{homology-section-homotopy-shift} apply.
In particular, we will identify the cohomology groups of all shifts
$M[k]$ without the intervention of signs.
\medskip\noindent
At this point we have enough structure to talk about {\it triangles},
see Derived Categories, Definition \ref{derived-definition-triangle}.
In fact, our next goal is to develop enough theory to be able to
state and prove that the homotopy category of differential graded
modules is a triangulated category. First we define the homotopy category.
\section{The homotopy category}
\label{section-homotopy}
\noindent
Our homotopies take into account the $A$-module structure and the
grading, but not the differential (of course).
\begin{definition}
\label{definition-homotopy}
Let $(A, \text{d})$ be a differential graded algebra. Let
$f, g : M \to N$ be homomorphisms of differential graded $A$-modules.
A {\it homotopy between $f$ and $g$} is an $A$-module map $h : M \to N$
such that
\begin{enumerate}
\item $h(M^n) \subset N^{n - 1}$ for all $n$, and
\item $f(x) - g(x) = \text{d}_N(h(x)) + h(\text{d}_M(x))$ for
all $x \in M$.
\end{enumerate}
If a homotopy exists, then we say $f$ and $g$ are {\it homotopic}.
\end{definition}
\noindent
Thus $h$ is compatible with the $A$-module structure and the grading
but not with the differential. If $f = g$ and $h$ is a homotopy
as in the definition, then $h$ defines a morphism $h : M \to N[-1]$
in $\text{Mod}_{(A, \text{d})}$.
\begin{lemma}
\label{lemma-compose-homotopy}
Let $(A, \text{d})$ be a differential graded algebra.
Let $f, g : L \to M$ be homomorphisms of differential graded $A$-modules.
Suppose given further homomorphisms $a : K \to L$, and $c : M \to N$.
If $h : L \to M$ is an $A$-module map which defines a homotopy between
$f$ and $g$, then $c \circ h \circ a$ defines a homotopy between
$c \circ f \circ a$ and $c \circ g \circ a$.
\end{lemma}
\begin{proof}
Immediate from Homology, Lemma \ref{homology-lemma-compose-homotopy-cochain}.
\end{proof}
\noindent
This lemma allows us to define the homotopy category as follows.
\begin{definition}
\label{definition-complexes-notation}
Let $(A, \text{d})$ be a differential graded algebra.
The {\it homotopy category}, denoted $K(\text{Mod}_{(A, \text{d})})$, is
the category whose objects are the objects of
$\text{Mod}_{(A, \text{d})}$ and whose morphisms are homotopy classes
of homomorphisms of differential graded $A$-modules.
\end{definition}
\noindent
The notation $K(\text{Mod}_{(A, \text{d})})$ is not standard but at least is
consistent with the use of $K(-)$ in other places of the Stacks project.
\begin{lemma}
\label{lemma-homotopy-direct-sums}
Let $(A, \text{d})$ be a differential graded algebra.
The homotopy category $K(\text{Mod}_{(A, \text{d})})$
has direct sums and products.
\end{lemma}
\begin{proof}
Omitted. Hint: Just use the direct sums and products as in
Lemma \ref{lemma-dgm-abelian}. This works because we saw that
these functors commute with the forgetful functor to the category
of graded $A$-modules and because $\prod$ is an exact functor
on the category of families of abelian groups.
\end{proof}
\section{Cones}
\label{section-cones}
\noindent
We introduce cones for the category of differential graded modules.
\begin{definition}
\label{definition-cone}
Let $(A, \text{d})$ be a differential graded algebra.
Let $f : K \to L$ be a homomorphism of differential graded $A$-modules.
The {\it cone} of $f$ is the differential graded $A$-module
$C(f)$ given by $C(f) = L \oplus K$ with grading
$C(f)^n = L^n \oplus K^{n + 1}$ and
differential
$$
d_{C(f)} =
\left(
\begin{matrix}
\text{d}_L & f \\
0 & -\text{d}_K
\end{matrix}
\right)
$$
It comes equipped with canonical morphisms of complexes $i : L \to C(f)$
and $p : C(f) \to K[1]$ induced by the obvious maps $L \to C(f)$
and $C(f) \to K$.
\end{definition}
\noindent
The formation of the cone triangle is functorial in the following sense.
\begin{lemma}
\label{lemma-functorial-cone}
Let $(A, \text{d})$ be a differential graded algebra.
Suppose that
$$
\xymatrix{
K_1 \ar[r]_{f_1} \ar[d]_a & L_1 \ar[d]^b \\
K_2 \ar[r]^{f_2} & L_2
}
$$
is a diagram of homomorphisms of differential graded $A$-modules which is
commutative up to homotopy.
Then there exists a morphism $c : C(f_1) \to C(f_2)$ which gives rise to
a morphism of triangles
$$
(a, b, c) : (K_1, L_1, C(f_1), f_1, i_1, p_1) \to
(K_1, L_1, C(f_1), f_2, i_2, p_2)
$$
in $K(\text{Mod}_{(A, \text{d})})$.
\end{lemma}
\begin{proof}
Let $h : K_1 \to L_2$ be a homotopy between $f_2 \circ a$ and $b \circ f_1$.
Define $c$ by the matrix
$$
c =
\left(
\begin{matrix}
b & h \\
0 & a
\end{matrix}
\right) :
L_1 \oplus K_1 \to L_2 \oplus K_2
$$
A matrix computation show that $c$ is a morphism of differential
graded modules. It is trivial that $c \circ i_1 = i_2 \circ b$, and it is
trivial also to check that $p_2 \circ c = a \circ p_1$.
\end{proof}
\section{Admissible short exact sequences}
\label{section-admissible}
\noindent
An admissible short exact sequence is the analogue of termwise split exact
sequences in the setting of differential graded modules.
\begin{definition}
\label{definition-admissible-ses}
Let $(A, \text{d})$ be a differential graded algebra.
\begin{enumerate}
\item A homomorphism $K \to L$ of differential graded $A$-modules
is an {\it admissible monomorphism} if there exists a graded $A$-module
map $L \to K$ which is left inverse to $K \to L$.
\item A homomorphism $L \to M$ of differential graded $A$-modules
is an {\it admissible epimorphism} if there exists a graded $A$-module
map $M \to L$ which is right inverse to $L \to M$.
\item A short exact sequence $0 \to K \to L \to M \to 0$ of differential
graded $A$-modules is an {\it admissible short exact sequence}
if it is split as a sequence of graded $A$-modules.
\end{enumerate}
\end{definition}
\noindent
Thus the splittings are compatible with all the data except for
the differentials. Given an admissible short exact sequence we
obtain a triangle; this is the reason that we require our splittings
to be compatible with the $A$-module structure.
\begin{lemma}
\label{lemma-admissible-ses}
Let $(A, \text{d})$ be a differential graded algebra.
Let $0 \to K \to L \to M \to 0$ be an admissible short exact sequence
of differential graded $A$-modules. Let $s : M \to L$ and $\pi : L \to K$
be splittings such that $\Ker(\pi) = \Im(s)$.
Then we obtain a morphism
$$
\delta = \pi \circ \text{d}_L \circ s : M \to K[1]
$$
of $\text{Mod}_{(A, \text{d})}$ which induces the boundary maps
in the long exact sequence of cohomology (\ref{equation-les}).
\end{lemma}
\begin{proof}
The map $\pi \circ \text{d}_L \circ s$ is compatible with the $A$-module
structure and the gradings by construction. It is compatible with
differentials by Homology, Lemmas
\ref{homology-lemma-ses-termwise-split-cochain}.
Let $R$ be the ring that $A$ is a differential graded algebra over.
The equality of maps is a statement about $R$-modules. Hence this
follows from Homology, Lemmas
\ref{homology-lemma-ses-termwise-split-cochain} and
\ref{homology-lemma-ses-termwise-split-long-cochain}.
\end{proof}
\begin{lemma}
\label{lemma-make-commute-map}
Let $(A, \text{d})$ be a differential graded algebra. Let
$$
\xymatrix{
K \ar[r]_f \ar[d]_a & L \ar[d]^b \\
M \ar[r]^g & N
}
$$
be a diagram of homomorphisms of differential graded $A$-modules
commuting up to homotopy.
\begin{enumerate}
\item If $f$ is an admissible monomorphism, then $b$ is homotopic to a
homomorphism which makes the diagram commute.
\item If $g$ is an admissible epimorphism, then $a$ is homotopic to a
morphism which makes the diagram commute.
\end{enumerate}
\end{lemma}
\begin{proof}
Let $h : K \to N$ be a homotopy between $bf$ and $ga$, i.e.,
$bf - ga = \text{d}h + h\text{d}$. Suppose that $\pi : L \to K$
is a graded $A$-module map left inverse to $f$. Take
$b' = b - \text{d}h\pi - h\pi \text{d}$.
Suppose $s : N \to M$ is a graded $A$-module map right inverse to $g$.
Take $a' = a + \text{d}sh + sh\text{d}$.
Computations omitted.
\end{proof}
\begin{lemma}
\label{lemma-make-injective}
Let $(A, \text{d})$ be a differential graded algebra.
Let $\alpha : K \to L$ be a homomorphism of differential graded
$A$-modules. There exists a factorization
$$
\xymatrix{
K \ar[r]^{\tilde \alpha} \ar@/_1pc/[rr]_\alpha &
\tilde L \ar[r]^\pi & L
}
$$
in $\text{Mod}_{(A, \text{d})}$ such that
\begin{enumerate}
\item $\tilde \alpha$ is an admissible monomorphism (see
Definition \ref{definition-admissible-ses}),
\item there is a morphism $s : L \to \tilde L$
such that $\pi \circ s = \text{id}_L$ and such that
$s \circ \pi$ is homotopic to $\text{id}_{\tilde L}$.
\end{enumerate}
\end{lemma}
\begin{proof}
The proof is identical to the proof of
Derived Categories, Lemma \ref{derived-lemma-make-injective}.
Namely, we set $\tilde L = L \oplus C(1_K)$ and we use elementary
properties of the cone construction.
\end{proof}
\begin{lemma}
\label{lemma-sequence-maps-split}
Let $(A, \text{d})$ be a differential graded algebra.
Let $L_1 \to L_2 \to \ldots \to L_n$
be a sequence of composable homomorphisms of
differential graded $A$-modules.
There exists a commutative diagram
$$
\xymatrix{
L_1 \ar[r] &
L_2 \ar[r] &
\ldots \ar[r] &
L_n \\
M_1 \ar[r] \ar[u] &
M_2 \ar[r] \ar[u] &
\ldots \ar[r] &
M_n \ar[u]
}
$$
in $\text{Mod}_{(A, \text{d})}$ such that each $M_i \to M_{i + 1}$
is an admissible monomorphism and each $M_i \to L_i$
is a homotopy equivalence.
\end{lemma}
\begin{proof}
The case $n = 1$ is without content.
Lemma \ref{lemma-make-injective} is the case $n = 2$.
Suppose we have constructed the diagram
except for $M_n$. Apply Lemma \ref{lemma-make-injective} to
the composition $M_{n - 1} \to L_{n - 1} \to L_n$.
The result is a factorization $M_{n - 1} \to M_n \to L_n$
as desired.
\end{proof}
\begin{lemma}
\label{lemma-nilpotent}
Let $(A, \text{d})$ be a differential graded algebra.
Let $0 \to K_i \to L_i \to M_i \to 0$, $i = 1, 2, 3$
be admissible short exact sequence of differential graded $A$-modules.
Let $b : L_1 \to L_2$ and $b' : L_2 \to L_3$
be homomorphisms of differential graded modules such that
$$
\vcenter{
\xymatrix{
K_1 \ar[d]_0 \ar[r] &
L_1 \ar[r] \ar[d]_b &
M_1 \ar[d]_0 \\
K_2 \ar[r] & L_2 \ar[r] & M_2
}
}
\quad\text{and}\quad
\vcenter{
\xymatrix{
K_2 \ar[d]^0 \ar[r] &
L_2 \ar[r] \ar[d]^{b'} &
M_2 \ar[d]^0 \\
K_3 \ar[r] & L_3 \ar[r] & M_3
}
}
$$
commute up to homotopy. Then $b' \circ b$ is homotopic to $0$.
\end{lemma}
\begin{proof}
By Lemma \ref{lemma-make-commute-map} we can replace $b$ and $b'$ by
homotopic maps such that the right square of the left diagram commutes
and the left square of the right diagram commutes. In other words, we have
$\Im(b) \subset \Im(K_2 \to L_2)$ and
$\Ker((b')^n) \supset \Im(K_2 \to L_2)$.
Then $b \circ b' = 0$ as a map of modules.
\end{proof}
\section{Distinguished triangles}
\label{section-distinguished}
\noindent
The following lemma produces our distinguished triangles.
\begin{lemma}
\label{lemma-triangle-independent-splittings}
Let $(A, \text{d})$ be a differential graded algebra. Let
$0 \to K \to L \to M \to 0$ be an admissible short exact sequence
of differential graded $A$-modules. The triangle
\begin{equation}
\label{equation-triangle-associated-to-admissible-ses}
K \to L \to M \xrightarrow{\delta} K[1]
\end{equation}
with $\delta$ as in Lemma \ref{lemma-admissible-ses} is, up to canonical
isomorphism in $K(\text{Mod}_{(A, \text{d})})$, independent of the choices
made in Lemma \ref{lemma-admissible-ses}.
\end{lemma}
\begin{proof}
Namely, let $(s', \pi')$ be a second choice of splittings as in
Lemma \ref{lemma-admissible-ses}. Then we claim that $\delta$ and $\delta'$
are homotopic. Namely, write $s' = s + \alpha \circ h$ and
$\pi' = \pi + g \circ \beta$ for some unique homomorphisms
of $A$-modules $h : M \to K$ and $g : M \to K$ of degree $-1$.
Then $g = -h$ and $g$ is a homotopy between $\delta$ and $\delta'$.
The computations are done in the proof of
Homology, Lemma \ref{homology-lemma-ses-termwise-split-homotopy-cochain}.
\end{proof}
\begin{definition}
\label{definition-distinguished-triangle}
Let $(A, \text{d})$ be a differential graded algebra.
\begin{enumerate}
\item If $0 \to K \to L \to M \to 0$ is an admissible short exact sequence
of differential graded $A$-modules, then the {\it triangle associated
to $0 \to K \to L \to M \to 0$} is the triangle
(\ref{equation-triangle-associated-to-admissible-ses})
of $K(\text{Mod}_{(A, \text{d})})$.
\item A triangle of $K(\text{Mod}_{(A, \text{d})})$ is called a
{\it distinguished triangle} if it is isomorphic to a triangle
associated to an admissible short exact sequence
of differential graded $A$-modules.
\end{enumerate}
\end{definition}
\section{Cones and distinguished triangles}
\label{section-cones-and-triangles}
\noindent
Let $(A, \text{d})$ be a differential graded algebra.
Let $f : K \to L$ be a homomorphism of differential graded $A$-modules.
Then $(K, L, C(f), f, i, p)$ forms a triangle:
$$
K \to L \to C(f) \to K[1]
$$
in $\text{Mod}_{(A, \text{d})}$ and hence in $K(\text{Mod}_{(A, \text{d})})$.
Cones are {\bf not} distinguished triangles in general, but the difference
is a sign or a rotation (your choice). Here are two precise statements.
\begin{lemma}
\label{lemma-rotate-cone}
Let $(A, \text{d})$ be a differential graded algebra.
Let $f : K \to L$ be a homomorphism of differential graded modules.
The triangle $(L, C(f), K[1], i, p, f[1])$ is
the triangle associated to the admissible short exact sequence
$$
0 \to L \to C(f) \to K[1] \to 0
$$
coming from the definition of the cone of $f$.
\end{lemma}
\begin{proof}
Immediate from the definitions.
\end{proof}
\begin{lemma}
\label{lemma-rotate-triangle}
Let $(A, \text{d})$ be a differential graded algebra.
Let $\alpha : K \to L$ and $\beta : L \to M$
define an admissible short exact sequence
$$
0 \to K \to L \to M \to 0
$$
of differential graded $A$-modules.
Let $(K, L, M, \alpha, \beta, \delta)$
be the associated triangle. Then the triangles
$$
(M[-1], K, L, \delta[-1], \alpha, \beta)
\quad\text{and}\quad
(M[-1], K, C(\delta[-1]), \delta[-1], i, p)
$$
are isomorphic.
\end{lemma}
\begin{proof}
Using a choice of splittings we write $L = K \oplus M$ and we identify
$\alpha$ and $\beta$ with the natural inclusion and projection maps.
By construction of $\delta$ we have
$$
d_B =
\left(
\begin{matrix}
d_K & \delta \\
0 & d_M
\end{matrix}
\right)
$$
On the other hand the cone of $\delta[-1] : M[-1] \to K$
is given as $C(\delta[-1]) = K \oplus M$ with differential identical
with the matrix above! Whence the lemma.
\end{proof}
\begin{lemma}
\label{lemma-third-isomorphism}
Let $(A, \text{d})$ be a differential graded algebra.
Let $f_1 : K_1 \to L_1$ and $f_2 : K_2 \to L_2$ be homomorphisms of
differential graded $A$-modules. Let
$$
(a, b, c) :
(K_1, L_1, C(f_1), f_1, i_1, p_1)
\longrightarrow
(K_1, L_1, C(f_1), f_2, i_2, p_2)
$$
be any morphism of triangles of $K(\text{Mod}_{(A, \text{d})})$.
If $a$ and $b$ are homotopy equivalences then so is $c$.
\end{lemma}
\begin{proof}
Let $a^{-1} : K_2 \to K_1$ be a homomorphism of differential graded $A$-modules
which is inverse to $a$ in $K(\text{Mod}_{(A, \text{d})})$.
Let $b^{-1} : L_2 \to L_1$ be a homomorphism of differential graded $A$-modules
which is inverse to $b$ in $K(\text{Mod}_{(A, \text{d})})$.
Let $c' : C(f_2) \to C(f_1)$ be the morphism from
Lemma \ref{lemma-functorial-cone} applied to
$f_1 \circ a^{-1} = b^{-1} \circ f_2$.
If we can show that $c \circ c'$ and $c' \circ c$ are isomorphisms in
$K(\text{Mod}_{(A, \text{d})})$
then we win. Hence it suffices to prove the following: Given
a morphism of triangles
$(1, 1, c) : (K, L, C(f), f, i, p)$
in $K(\text{Mod}_{(A, \text{d})})$ the morphism $c$ is an isomorphism
in $K(\text{Mod}_{(A, \text{d})})$.
By assumption the two squares in the diagram
$$
\xymatrix{
L \ar[r] \ar[d]_1 &
C(f) \ar[r] \ar[d]_c &
K[1] \ar[d]_1 \\
L \ar[r] &
C(f) \ar[r] &
K[1]
}
$$
commute up to homotopy. By construction of $C(f)$ the rows
form admissible short exact sequences. Thus we see that
$(c - 1)^2 = 0$ in $K(\text{Mod}_{(A, \text{d})})$ by
Lemma \ref{lemma-nilpotent}.
Hence $c$ is an isomorphism in $K(\text{Mod}_{(A, \text{d})})$
with inverse $2 - c$.
\end{proof}
\noindent
The following lemma shows that the collection of triangles of the homotopy
category given by cones and the distinguished triangles are the same
up to isomorphisms, at least up to sign!
\begin{lemma}
\label{lemma-the-same-up-to-isomorphisms}
Let $(A, \text{d})$ be a differential graded algebra.
\begin{enumerate}
\item Given an admissible short exact sequence
$0 \to K \xrightarrow{\alpha} L \to M \to 0$
of differential graded $A$-modules there exists a homotopy equivalence
$C(\alpha) \to M$ such that the diagram
$$
\xymatrix{
K \ar[r] \ar[d] & L \ar[d] \ar[r] &
C(\alpha) \ar[r]_{-p} \ar[d] & K[1] \ar[d] \\
K \ar[r]^\alpha & L \ar[r]^\beta &
M \ar[r]^\delta & K[1]
}
$$
defines an isomorphism of triangles in $K(\text{Mod}_{(A, \text{d})})$.
\item Given a morphism of complexes $f : K \to L$
there exists an isomorphism of triangles
$$
\xymatrix{
K \ar[r] \ar[d] & \tilde L \ar[d] \ar[r] &
M \ar[r]_{\delta} \ar[d] & K[1] \ar[d] \\
K \ar[r] & L \ar[r] &
C(f) \ar[r]^{-p} & K[1]
}
$$
where the upper triangle is the triangle associated to a
admissible short exact sequence $K \to \tilde L \to M$.
\end{enumerate}
\end{lemma}
\begin{proof}
Proof of (1). We have $C(\alpha) = L \oplus K$ and we simply define
$C(\alpha) \to M$ via the projection onto $L$ followed by $\beta$.
This defines a morphism of differential graded modules because the
compositions $K^{n + 1} \to L^{n + 1} \to M^{n + 1}$ are zero.
Choose splittings $s : M \to L$ and $\pi : L \to K$ with
$\Ker(\pi) = \Im(s)$ and set
$\delta = \pi \circ \text{d}_L \circ s$ as usual.
To get a homotopy inverse we take
$M \to C(\alpha)$ given by $(s , -\delta)$. This is compatible with
differentials because $\delta^n$ can be characterized as the
unique map $M^n \to K^{n + 1}$ such that
$\text{d} \circ s^n - s^{n + 1} \circ \text{d} = \alpha \circ \delta^n$,
see proof of
Homology, Lemma \ref{homology-lemma-ses-termwise-split-cochain}.
The composition $M \to C(f) \to M$ is the identity.
The composition $C(f) \to M \to C(f)$ is equal to the morphism
$$
\left(
\begin{matrix}
s \circ \beta & 0 \\
-\delta \circ \beta & 0
\end{matrix}
\right)
$$
To see that this is homotopic to the identity map
use the homotopy $h : C(\alpha) \to C(\alpha)$
given by the matrix
$$
\left(
\begin{matrix}
0 & 0 \\
\pi & 0
\end{matrix}
\right) :
C(\alpha) = L \oplus K
\to
L \oplus K = C(\alpha)
$$
It is trivial to verify that
$$
\left(
\begin{matrix}
1 & 0 \\
0 & 1
\end{matrix}
\right)
-
\left(
\begin{matrix}
s \\
-\delta
\end{matrix}
\right)
\left(
\begin{matrix}
\beta & 0
\end{matrix}
\right)
=
\left(
\begin{matrix}
\text{d} & \alpha \\
0 & -\text{d}
\end{matrix}
\right)
\left(
\begin{matrix}
0 & 0 \\
\pi & 0
\end{matrix}
\right)
+
\left(
\begin{matrix}
0 & 0 \\
\pi & 0
\end{matrix}
\right)
\left(
\begin{matrix}
\text{d} & \alpha \\
0 & -\text{d}
\end{matrix}
\right)
$$
To finish the proof of (1) we have to show that the morphisms
$-p : C(\alpha) \to K[1]$ (see
Definition \ref{definition-cone})
and $C(\alpha) \to M \to K[1]$ agree up
to homotopy. This is clear from the above. Namely, we can use the homotopy
inverse $(s, -\delta) : M \to C(\alpha)$
and check instead that the two maps
$M \to K[1]$ agree. And note that
$p \circ (s, -\delta) = -\delta$ as desired.
\medskip\noindent
Proof of (2). We let $\tilde f : K \to \tilde L$,
$s : L \to \tilde L$
and $\pi : L \to L$ be as in
Lemma \ref{lemma-make-injective}. By
Lemmas \ref{lemma-functorial-cone} and \ref{lemma-third-isomorphism}
the triangles $(K, L, C(f), i, p)$ and
$(K, \tilde L, C(\tilde f), \tilde i, \tilde p)$
are isomorphic. Note that we can compose isomorphisms of
triangles. Thus we may replace $L$ by
$\tilde L$ and $f$ by $\tilde f$. In other words
we may assume that $f$ is an admissible monomorphism.
In this case the result follows from part (1).
\end{proof}
\section{The homotopy category is triangulated}
\label{section-homotopy-triangulated}
\noindent
We first prove that it is pre-triangulated.
\begin{lemma}
\label{lemma-homotopy-category-pre-triangulated}
Let $(A, \text{d})$ be a differential graded algebra.
The homotopy category $K(\text{Mod}_{(A, \text{d})})$
with its natural translation functors and distinguished triangles
is a pre-triangulated category.
\end{lemma}
\begin{proof}
Proof of TR1. By definition every triangle isomorphic to a distinguished
one is distinguished. Also, any triangle $(K, K, 0, 1, 0, 0)$
is distinguished since $0 \to K \to K \to 0 \to 0$ is
an admissible short exact sequence. Finally, given any homomorphism
$f : K \to L$ of differential graded $A$-modules the triangle
$(K, L, C(f), f, i, -p)$ is distinguished by
Lemma \ref{lemma-the-same-up-to-isomorphisms}.