TITLE: Is this "snake lemma" true in derived category?
QUESTION [12 upvotes]: Suppose there is a diagram of cochain complexes
$$
\begin{array}{c}
0 & \to & X_1\phantom\alpha & \to & Y_1\phantom\beta & \to & Z_1\phantom\gamma & \to & 0 \\
& & \downarrow\alpha & & \downarrow\beta & & \downarrow\gamma \\
0 & \to & X_2\phantom\alpha & \to & Y_2\phantom\beta & \to & Z_2\phantom\gamma & \to & 0
\end{array}
$$
where the two rows are short exact sequences of cochain complexes, and the diagram is commutative up to homotopy.
I'm trying to prove that
(a) If $\alpha$ is a quasi-isomorphism, then $\mathrm{Cone}(\beta)$
and $\mathrm{Cone}(\gamma)$ are quasi-isomorphic. (This should be true; Nekovar's book Selmer Complexes uses this result implicitly. [EDIT] In fact the proof in it can be fixed so that the diagram actually commutes, not only up to homotopy.)
(b) More generally, there exists a distinguished triangle
$$
\mathrm{Cone}(\alpha)\to\mathrm{Cone}(\beta)\to\mathrm{Cone}(\gamma)\to
$$
in the derived category. (I'm not sure if it is true.)
I can only prove the case when the diagram itself actually commutes; when homotopy involved,

I can only construct natural chain  maps $\mathrm{Cone}(\alpha)\to\mathrm{Cone}(\beta)\to\mathrm{Cone}(\gamma)$, with the first map injective and the second map surjective, but the composition of these two maps is not zero.
Another attempt is trying to replace the second row by $0\to\mathrm{Cyl}(\alpha)\to\mathrm{Cyl}(\beta)\to\mathrm{Cyl}(\gamma)\to 0$ such that the diagram actually commutes; but again, I can't find a way to make this sequence exact.
The axiom (TR4) seems not enough even for (a): in this case there exists a distinguished triangle $Z_1\to Z_2\to\mathrm{Cone}(\beta)\to{}$ by (TR4), but it can't tell that this $Z_1\to Z_2$ is equal to $\gamma$.

Any ideas?

REPLY [5 votes]: In general, neither (a) nor (b) is true. I'll give three examples to illustrate various points. In all of these, $k$ will be a field, which I'll take to have characteristic two (just so that I don't need to be careful with signs; it's not really important!).
(1) In general, your diagram doesn't even have to induce a morphism of triangles in the derived category, as the "connecting" square
$$\require{AMScd}
\begin{CD}
  Z_1 @>>> X_1[1]\\
  @VVV @VVV\\
  Z_2 @>>> X_2[1] 
\end{CD}$$
may not commute. 
If you don't insist that it does commute, then there are very easy counterexamples to (a). For example, take $Y$ to be a contractible complex ($\dots\to0\to k\stackrel{1}{\to}k\to0\to\dots$, say) and $X$ a subcomplex such that $Y/X$ is not acyclic ($\dots\to0\to 0\to k\to0\to\dots$, say). Then
$$\begin{CD}
  0 @>>> X @>>> Y @>>> Y/X @>>>0\\
  @.@VV1V @VV1V @VV0V @.\\
  0 @>>> X @>>> Y @>>> Y/X @>>>0
\end{CD}$$
commutes up to homotopy, but the cone of the middle vertical arrow is acyclic, whereas the cone of the third arrow is not.
However, even if you insist that the connecting square commutes, (a) and (b) can still be false.
(2) Fairly simple counterexamples to (b) can be constructed by taking a map from a triangle to a rotation of itself, as in:
$$\begin{CD}
X @>>> Y @>>> Z @>\gamma >> X[1]\\
@VV0V @VV0V @VV\gamma V @VV0V\\
Y @>>> Z @>>> X[1] @>>> Y[1]
\end{CD}$$
The cones are $Y\oplus X[1]$, $Z\oplus Y[1]$ and $Y[1]$, and there are fairly easy examples where there is no triangle
$$Y\oplus X[1]\to Z\oplus Y[1]\to Y[1]\to Y[1]\oplus X[2].$$
For example, let $R=\mathbb{Z}[t]$, and $I$ the ideal $(2,t)$, and start with the obvious triangle
$$I\to R\to R/I\to I[1]$$
in the derived category of $R$-modules. Then there can't be a triangle
$$R\oplus I[1]\to R/I\oplus R[1]\to R[1]\to R[1]\oplus I[2],$$
as its cohomology exact sequence would be
$$\dots\to 0\to I\to R\to R\to R\to R/I\to0\to\dots,$$
and no such exact sequence exists, as the kernel of $R\to R/I$ would have to be $I$, and there is no surjective map $R\to I$.
(3) Let $S=k[x,t]/(xt^2)$, and in the derived category of $S$-modules form the "homotopy Cartesian square"
$$\begin{CD}
S @>xt >> S\\
@VxVV @V\alpha VV\\
S @>\beta >> Y
\end{CD}$$
(i.e., $Y$ is the complex $\dots\to0\to S\stackrel{
\begin{pmatrix}xt\\x\end{pmatrix}}{\to} S\oplus S\to0\to\dots$, with $S\oplus S$ in degree zero,
and $\alpha$ and $\beta$ are inclusions of the first and second summands). Completing to a morphism of triangles gives
$$\begin{CD}
S @>xt >> S @>>> Z @>>>S[1]\\
@VxVV @V\alpha VV @V1VV @VxVV\\
S @>\beta >> Y @>>> Z @>>> S[1]
\end{CD}$$
where the cones of the first two vertical maps are both quasiisomorphic to $\dots\to0\to S\stackrel{x}{\to}S\to0\to\dots$, so this is not yet a counterexample to (a). However, we can replace the first vertical arrow by multiplication by $x+xt$:
$$\begin{CD}
S @>xt >> S @>>> Z @>>>S[1]\\
@Vx+xt VV @V\alpha VV @V1VV @Vx+xt VV\\
S @>\beta >> Y @>>> Z @>>> S[1]
\end{CD}$$
and this is still a morphism of triangles, but now the cone of the first vertical map is $\dots\to0\to S\stackrel{x+xt}{\to}S\to0\to\dots$, whereas the cone of the second vertical map is still $\dots\to0\to S\stackrel{x}{\to}S\to0\to\dots$, and it can be checked that there is no quasiisomorphism between these.