TITLE: Is the t-truncation a functor?
QUESTION [6 upvotes]: One of the axioms of a t-structure in a triangulated category is that any object $X$ can be embedded inm a distingueshed triangle
$$
X_0\to X\to X_1\to^+
$$
The original work by Beilinson-Bernstein-Deligne seems to suggest that this decomposition can be chosen in a functorial way, but I'm not able to deduce why it should be true: in particular I'm trying to prove [KS], Prop 10.1.4.i, where it is claimed that the inclusion ${\bf D}^\le \to \bf D$ admits a right adjoint $T^{\le 0}$, which generalizes the definition of the truncation functor in ${\bf D}=D^b(\cal A)$, the derived category of $\cal A$ with the obvious $t$-structure.
Edit: A tentative proof goes like this (it was extremely simple!): suppose you have two ways to obtain natural (in $Y\in {\bf D}^\le$) isomorphisms
$$
{\bf D}^\le (Y, X_0)\cong {\bf D}(Y,X)
$$
and $$
{\bf D}^\le (Y, X_0')\cong {\bf D}(Y,X)
$$
Now you simply compare the isomorphism  ${\bf D}^\le (Y, X_0')\cong {\bf D}(Y,X)\cong {\bf D}^\le (Y, X_0)$ and conclude by Yoneda that there must be an isomoprhism $X_0\cong X_0'$. $\blacksquare$
Can you confirm that it is right?
[KS] : P. Schapira, M. Kashiwara, Sheaves on Manifolds, Grundlehren der Mathematischen Wissenschaften, 292, Berlin, New York: Springer-Verlag.

REPLY [3 votes]: Assume you have two triangles:
$A\rightarrow X\rightarrow B\rightarrow A[1]$
and
$C\rightarrow X\rightarrow D\rightarrow C[1]$
so that $A,C\in D^{\leq 0}$ and $B,D\in D^{\geq 1}$.
We have a distinguished triangle
$Hom(A,D[-1])\rightarrow Hom(A,C)\rightarrow Hom(A,X)\rightarrow Hom(A,D).$
We know by definition of the t-structure that $Hom(A,D)=Hom(A,D[-1])=0$. Therefore there exist unique morphisms $A\rightarrow C$ and $B\rightarrow D$ making all squares commute. But, wait a minute. We also have unique morphisms $C\rightarrow A$ and $D\rightarrow B$. By uniqueness we obtain that these morphisms are isomorphisms.Therefore $A$ and $B$ are unique up to isomorphism.
Ok. Now we can define the right adjoint $D\rightarrow D^{\leq 0}$ by taking the unique A (up to isomorphism) in our triangles. Similarly you get right adjoints of $D\rightarrow D^{\leq n}$ using the shift operator.