\section{$t$-structures and gluing (Notes by Sabine Lang)}
In this lecture we explain how to glue t-structures. Following BBD, we axiomatize the situation. Let $\mc{D}$, $\mc{D}_U$, and $\mc{D}_Z$ be triangulated categories equipped with exact (i.e. preserving shifts and distinguished triangles) functors $i_* \colon \mc{D}_Z \to \mc{D}$ and $j^* \colon \mc{D} \to \mc{D}_U$. Set (for convenience) $i_!=i_*$ and $j^!=j^*$. Assume the following ``glueing axioms'' hold:
\begin{itemize}
 \item[(G1)] $i_*$ admits a left adjoint $i^*$ and a right adjoint $i^!$. $j^*$ admits a left adjoint $j_!$ and a right adjoint $j_*$.
\item[(G2)] $j^* i_*=0$. (By adjunction and Yoneda, we deduce from this $i^*j_!=0$ and $i^!j_*=0$; for instance,
\[
 \Hom(i^*j_!K, L)= \Hom(j_!K, i_*L)= \Hom(K, j^*i_*L)=0.)
\]
\item[(G3)] For all $K \in \mc{D}$, there are distinguished triangles (with the adjunction maps)
\[
 j_!j^*K \to K \to i_*i^*K \xrightarrow{+1}
\]
and
\[
 i_*i^!K \to K \to j_*j^*K \xrightarrow{+1}.
\]
\item[(G4)] $j_!$, $i_*$, and $j_*$ are fully faithful. (Exercise: deduce from this that the natural transformations $j^*j_* \to \mathrm{id}$, $\mathrm{id} \to j^*j_!$, $i^*i_* \to \mathrm{id}$, $\mathrm{id} \to i^!i_*$ are all isomorphisms.)
\end{itemize}
Before proceeding with the formalism, we check that the glueing axioms hold in the setting of sheaf theory:
\begin{prop}
 Working in the sheaf theory setting, let $U\subset X$ be open, $Z=X\backslash U$, and denote by $j:U\to X$, $i: Z\to X$ the inclusions. Then the axioms $G1$ to $G4$ are all satisfied by the associated (derived) functors, taking $\mathcal{D}=D_c^b(X)$, $\mathcal{D}_U=D_c^b(U)$ and $\mathcal{D}_Z=D_c^b(Z)$.
\end{prop}

\begin{proof}
 \begin{itemize}
  \item $G1$ : We have seen it before.
  \item $G2$ : It is clear from stalks.
  \item $G3$ : For the first triangle, for $\mathcal{F}\in \Sh(X)$, we already have that $$0\to j_!j^*\mathcal{F}\to \mathcal{F}\to i_*i^*\mathcal{F}\to 0 $$ is exact, by looking at stalks. The functors $j_!$, $j^*$, $i_*$ and $i^*$ are all exacts, so for $K\in D_c^b(X)$, we can compute $Rj_!j^*K$, etc $\dots$ just by applying the functors term by term. We get a short exact sequence of complexes : $$0\to j_!j^*K\to K\to i_*i^*K\to 0,$$ and this gives rise to an associated distinguished triangle in $D^b_c(X)$.

  For the second triangle, for all $\mathcal{F}\in \Sh(X)$, we have an exact sequence $$0\to i_*i^!\mathcal{F}\to\mathcal{F}\to j_*j^*\mathcal{F}.$$ Moreover, if $\mathcal{F}$ is injective, the last map is surjective (see our discussion of cohomology with supports). So for a general $K\in D_c^b(X)$, we take an injective replacement and apply this to get the distinguished triangle $$i_*Ri^!K\to K \to Rj_*j^*K\stackrel{+1}{\to} .$$
  \item $G4$ : We have seen some of this. For example, for $Rj_*$, we have $\Hom_{D(X)}(Rj_*K,Rj*L)=\Hom_{D(X)}(j^*Rj_*K,L)=\Hom_{D(X)}(K,L).$
 \end{itemize}
\end{proof}

\begin{thm}
 Let $\mathcal{D}$, $\mathcal{D}_U$, $\mathcal{D}_Z$, $i_*$, $j^*$ be as in the gluing axiomatics. Let $(\mathcal{D}_U^{\leq 0},\mathcal{D}_U^{\geq0})$ and $(\mathcal{D}_Z^{\leq 0},\mathcal{D}_Z^{\geq0})$ be $t$-structures on $\mathcal{D}_U$ and $\mathcal{D}_Z$. Define
\begin{itemize}
 \item $\mathcal{D}^{\leq 0}=\{K \in \mathcal{D} \mid j^*K \in \mathcal{D}_U^{\leq 0}, i^*K \in \mathcal{D}_Z^{\leq 0}\}$,
 \item $\mathcal{D}^{\geq 0}=\{K \in \mathcal{D} \mid j^!K \in \mathcal{D}_U^{\geq 0}, i^!K \in \mathcal{D}_Z^{\geq 0}\}$.
\end{itemize}
Then $(\mathcal{D}^{\leq 0},\mathcal{D}^{\geq 0})$ is a $t$-structure on $\mathcal{D}$. 
\end{thm}

\begin{proof}
We need to check three things : 
\begin{enumerate}
\item $\mathcal{D}^{\leq 0}\subset \mathcal{D}^{\leq 1}$ and $\mathcal{D}^{\geq 0}\supset\mathcal{D}^{\geq 1}$,
\item $\Hom(\mathcal{D}^{\leq 0},\mathcal{D}^{\geq 1})=0$,
\item for all $X\in\mathcal{D}$, there exists $X_{\leq0}\in \mathcal{D}^{\leq 0}$ and $X_{\geq 1}\in \mathcal{D}^{\geq 1}$ so that we have a distinguished triangle $X_{\leq 0}\to X\to X_{\geq 1}\stackrel{+1}{\to}$.
\end{enumerate}
We use the following arguments :
\begin{enumerate}
\item Clear.
\item Let $X \in \mathcal{D}^{\leq 0}, Y \in \mathcal{D}^{\geq 1}$. We have a distinguished triangle 
$$j_!j^*X\to X \to i_*i^*X \stackrel{+1}{\to}.$$ Applying $\Hom(-,Y)$, we get the long exact sequence $$\dots \leftarrow \Hom(j_!j^*X,Y)\leftarrow \Hom(X,Y)\leftarrow \Hom(i_*i^*X,Y)\leftarrow \dots.$$
But we get $\Hom(j_!j^*X,Y)=\Hom_{\mathcal{D}_U}(j^*X,j^*Y)=0$ by the $t$-structure on $U$ since $j^*X \in \mathcal{D}_U^{\leq 0}$ and $j^*Y\in \mathcal{D}_U^{\geq 1}$. Similarly, $\Hom(i_*i^*X,Y)=\Hom_{\mathcal{D}_Z}(i^*X,i^!Y)=0$ using the $t$-structure on $Z$ and $i^*X\in\mathcal{D}_Z^{\leq0}$, $i^!Y\in\mathcal{D}_Z^{\geq 1}.$ So this shows that $\Hom(X,Y)=0$. 
\item The $t$-structures on $\mathcal{D}_U$, $\mathcal{D}_Z$ give rise to the associated truncation functors $\tau_U^{\leq n}$, $\tau_U^{\geq n}$, $\tau_Z^{\leq n}$, $\tau_Z^{\geq n}$. For all $X \in \mathcal{D}$, we have a map
$X \to j_*\tau_U^{\geq 1}j^*X$ given by the composition $X \to j_* j^*X\to j_*\tau_U^{\geq 1}j^*X$. We can complete this composite to a distinguished triangle in $\mathcal{D}$ : $Y \to X \to j_*\tau_U^{\geq 1}j^*X \stackrel{+1}{\to}$. Likewise, we have a map $Y \to i_*\tau_Z^{\geq 1}i^*Y$ from the composition $Y \to i_*i^*Y \to i_*\tau_Z^{\geq 1}i^*Y$. We obtain a distinguished triangle $A \to Y \to i_*\tau_Z^{\geq 1}i^*Y \stackrel{+1}{\to}$. Also, $A\to Y\to X$ gives a distinguished triangle $A \to X \to B \stackrel{+1}{\to}.$

\textbf{Claim:} this is the triangle we need, i.e., $A\in \mathcal{D}^{\leq 0}$ and $B \in \mathcal{D}^{\geq 1}$.

To prove this, we use the octahedral axiom to produce a fourth distinguished triangle:  

\begin{center}
\begin{tikzcd}[swap]
& & & . & & \\
& & i_*\tau^{\geq 1}_Zi^*Y \arrow[swap]{ur}{+1} \arrow[dashed]{dr} & & . & \\
& Y \arrow{ur} \arrow{dr} & & B \arrow[swap]{ur}{+1} \arrow[dashed]{ddr} & & \\
& & X \arrow{ur} \arrow{drr} & & & \\ 
A \arrow{uur} \arrow{urr} & & & & j_*\tau^{\geq 1}_Uj^*X \arrow[swap]{r}{+1} \arrow[dashed]{dr}{+1}  &. \\
& & & & &. \\
\end{tikzcd}
\end{center}

So the octahedral axiom gives us a distinguished triangle making this diagram commute (dotted lines in the picture). To establish the claim, we need to check four things.
\begin{enumerate}
\item We apply $j^*$ to the fourth triangle, and use the facts that $j^*j_*\cong id$ and $j^*i_*=0$. We obtain $j^*B\cong\tau_U^{\geq 1}j^*X \in \mathcal{D}_U^{\geq 1}$.
\item We apply $j^*$ to $A \to X \to B \stackrel{+1}{\to}$ to get a distinguished triangle $j^*A\to j^*X \to j^*B \stackrel{+1}{\to}.$ Since $j^*B \cong \tau_U^{\geq 1}j^*X$, we get $j^*A\cong\tau_U^{\leq 0}j^*X \in \mathcal{D}_U^{\leq 0}$.
\item We apply $i^*$ to $A \to Y \to i_*\tau_Z^{\geq 1}i^*Y \stackrel{+1}{\to}$ to get a distinguished triangle $i^*A \to i^*Y \to i^*i_*\tau_Z^{\geq 1}i^*Y \stackrel{+1}{\to}$. We have $i^*i_*\tau_Z^{\geq 1}i^*Y\cong \tau_Z^{\geq 1}i^*Y$ and therefore $i^*A\cong\tau_Z^{\leq 0}i^*Y \in \mathcal{D}_Z^{\leq 0}$.
\item We apply $i^!$ to the fourth triangle and we get a distinguished triangle $i^!i_*\tau_Z^{\geq 1}i^*Y \to i^!B \to i^!j_*\tau_U^{\geq 1}j^*B \stackrel{+1}{\to}$. Since $i^!j_*=0$, we have $i^!j_*\tau_U^{\geq 1}j^*B\cong 0$. Also, $i^!i_* \cong id$ gives us $i^!i_*\tau_Z^{\geq 1}i^*Y\cong \tau_Z^{\geq 1}i^*Y$. We conclude that $i^!B\cong \tau_Z^{\geq 1}i^*Y\in \mathcal{D}_Z^{\geq 1}$.
\end{enumerate}
This proves the claim.
\end{enumerate}
\end{proof}

\begin{cor}
Let $k$ be a perfect field. Let $X$ be a separated $k$-scheme of finite type. Then $(~^pD^{\leq 0}(X),~^pD^{\geq 0}(X))$ is a $t$-structure on $D_c^b(X)$.
\end{cor}

\begin{proof}
 For any $U \subset X$ open with $j: U \to X$ the inclusion, we set $D(X,U)=\{K \in D_c^b(X) \mid j^*K \in D_{loc}^b(U)\}$ (we will only use this construction for $U$ smooth open dense). We may assume that $X$ is reduced. Then, since $X$ has an open dense smooth subscheme and by definition of a constructible sheaf, we can write $D_c^b(X)=\cup D(X,U)$, where the union is taken over all the open smooth dense $U$. Now, for any such $U$, we write $Z=X\backslash U$. We have:
 \begin{enumerate}
 \item By induction on $\dim(X)$, $(~^pD^{\leq 0}(Z),~^pD^{\geq 0}(Z))$ is a $t$-structure on $D_c^b(Z)$. (Base case: $\dim(X)=0$, but then the perverse and standard $t$-structures are the same.) 
 \item $(~^pD^{\leq 0}(X) \cap D_{loc}(U),~^pD^{\geq 0}(X) \cap D_{loc}(U))$ is a $t$-structure on $D_{loc}(U)$, by a $\dim(X)$-translation of the standard $t$-structure.
 \item By $(1)$, $(2)$ and the gluing theorem, we deduce that $(~^pD^{\leq 0}(X) \cap D(X,U),~^pD^{\geq 0}(X) \cap D(X,U))$ is a $t$-structure.
 \item Since $D_c^b(X)=\cup D(X,U)$, for $U$ open smooth dense, we see that $(~^pD^{\leq 0}(X) ,~^pD^{\geq 0}(X) )$ is a $t$-structure (by checking the three axioms).
 \end{enumerate}
\end{proof}

\begin{cor}
The intersection $~^pD^{\leq 0}(X)\cap~^pD^{\geq 0}(X)$ is an abelian category.
\end{cor}

\begin{defn}
The abelian category $~^pD^{\leq 0}(X)\cap~^pD^{\geq 0}(X)$ is called the category of perverse sheaves and denoted by $\perv(X)$.
\end{defn}

\subsection{How to make perverse sheaves ?}
\begin{exmpl}
If $X$ is smooth of dimension $d$, then $\rats_l[d]$ is perverse and $\mathcal{F}[d]$ is perverse for any local system $\mathcal{F}$.
\end{exmpl}

In general, for any $U \subset X$ open smooth dense, and any local system $\mathcal{ª}$ on $U$, $\mathcal{F}[d] \in \perv(U)$. The main method for building perverse sheaves is to start with $(U,\mathcal{F})$ and apply the intermediate extension functor $j_{!*}: \perv(U) \to \perv(X)$. So constructing and studying $j_{!*}$ is our next task.

\subsection{Some preliminaries}
We can make this construction in the abstract gluing setup. Let $\mathcal{D}$,  $\mathcal{D}_U$, $\mathcal{D}_Z$, $\dots$ be as in the gluing theorem. We have $t$-structures on $\mathcal{D}_U$, $\mathcal{D}_Z$, and on $\mathcal{D}$ by gluing. We have perverse analogues of the standard functors between these triangulated categories.

\begin{exmpl} 
The functor $j_!:\mathcal{D}_U \to \mathcal{D}$ gives rise to a map $\mathcal{D}^{\heartsuit}_U \to \mathcal{D}^{\heartsuit}$ via the composition $\mathcal{D}^{\heartsuit}_U \subset \mathcal{D}_U \stackrel{j_!}{\to}\mathcal{D}\stackrel{~^pH^0}{\to} \mathcal{D}^{\heartsuit}$. We call this composite $j_!^{\heartsuit}$ or $~^pj_!$. We make similar definitions for the other basic functors.
\end{exmpl}
Here are the general t-exactness properties of our basic functors:
\begin{lem}
\begin{enumerate}
\item The functors $i_*$ and $j^*$ are $t$-exact and have both left and right adjoints.
\item The functors $j_!$ and $i^*$ are right-$t$-exact and have right adjoints.
\item The functors $j_*$ and $i^!$ are left-$t$-exact and have left adjoints.
\end{enumerate}
\end{lem}

\begin{proof}
 We will just give a sample argument in the case of $i_*$. We have $i^*i_*\mathcal{D}_Z^{\leq 0} \subset \mathcal{D}_Z^{\leq 0}$ and $j^*i_*\mathcal{D}_Z^{\leq 0}= 0 \subset \mathcal{D}_U^{\leq 0}$, so $i_*$ is right-$t$-exact. 
 
 The rest of the proof works in a similar way, using adjunctions and truncations.
\end{proof}
With this lemma in hand, we consider the perverse analogues:
\begin{lem}
We have adjoints (left on top, right on bottom) : 

\begin{center}
 \begin{tikzcd}[swap]
 \mathcal{D}_U^{\heartsuit} \arrow[swap,shift left=4]{r}{~^pj_!} \arrow[shift right=3]{r}{~^pj_*}&
 \mathcal{D}^{\heartsuit}
 \arrow{l}{~^pj^*}  \arrow[swap,shift left=4]{r}{~^pi^*} \arrow[shift right=3]{r}{~^pi^!}  &
 \mathcal{D}_Z^{\heartsuit} \arrow{l}{~^pi_*}
 \end{tikzcd}
\end{center}
and $~^pj^*\circ ~^pi_*=0$.
\end{lem}

\begin{rmk}
This is a generalization of the familiar relations for the standard $t$-structure. Some differences : for example, $~^pj_!$ is not necessarily $t$-exact.
\end{rmk}

\begin{proof}
 Let $X \in \mathcal{D}_U^{\heartsuit}$ and $Y \in \mathcal{D}^{\heartsuit}$. By definition, we have
 $$\Hom_{\mathcal{D}^{\heartsuit}}(~^pj_!X,Y)=\Hom_{\mathcal{D}}(~^pH^0(j_!X),Y).$$ We have $~^pH^0={}^p\tau^{\leq 0} \circ {}^p\tau^{\geq 0}$, and $\Hom(~^p\tau^{\leq -1}X,Y)=0$ since $Y \in \mathcal{D}^{\geq 0}$, so we get
 $$\Hom_{\mathcal{D}}(~^pH^0(j_!X),Y)=\Hom_{\mathcal{D}}(~^p\tau^{\leq 0}(j_!X),Y).$$
 Since $X \in \mathcal{D}_U^{\heartsuit}$, we have $j_!X \in \mathcal{D}^{\leq 0}$ and therefore $j_!X={}^p\tau^{\leq 0}j_!X$, so 
 $$\Hom_{\mathcal{D}}(~^p\tau^{\leq 0}(j_!X),Y)=\Hom_{\mathcal{D}}(j_!X,Y).$$
 By adjunction, we get
$$\Hom_{\mathcal{D}}(j_!X,Y) =\Hom_{\mathcal{D}_U}(X,j^*Y).$$
Finally, since $j^*$ is $t$-exact, we have $$\Hom_{\mathcal{D}_U}(X,j^*Y)=\Hom_{\mathcal{D}_U}(X,~^pj^*Y).$$ This shows that $~^pj_!$ is left-adjoint to $~^pj^*$. The other cases are similar.
\end{proof}

\begin{lem}\label{BLemma}
For $X \in \mathcal{D}^{\heartsuit}$, there exist two exact sequences in $\mathcal{D}^{\heartsuit}$ :
\begin{enumerate}
\item $$0 \to ~^pi_*~^pH^{-1}(i^*X)\to ~^pj_!~^pj^*X \to X \to ~^pi_*~^pi^*X \to 0.$$
\item $$0 \to ~^pi_*~^pi^!X\to X \to ~^pj_*~^pj^*X \to ~^pi_*~^pH^1(i^!X) \to 0.$$
\end{enumerate}
\end{lem}

\begin{proof}
We leave $(1)$ as an exercise.

Recall that we have a distinguished triangle $i_*i^!X \to X \to j_*j^*X \stackrel{+1}{\to}$. We take the corresponding long exact sequence in $~^pH^n$ :
$$\dots \to ~^pH^{-1}(j_*j^*X) \to ~^pH^0(i_*i^!X)\to ~^pH^0(X) \to ~^pH^0(j_*j^*X)\to ~^pH^1(i_*i^!X)\to ~^pH^1(X) \to \dots.$$

We have the following identifications :
\begin{itemize}
 \item We have $j^*X \in \mathcal{D}_U^{\heartsuit}$, so $j_*j^*X \in \mathcal{D}^{\geq 0}$ and consequently $~^pH^{-1}(j_*j^*X)=0$.   
 \item Because $i_*$ is $t$-exact, we have $~^pH^0(i_*i^!X)=~^pi_*({}^p H^0(i^!X))=~^pi_*~^pi^!X.$
 \item Since $X \in \mathcal{D}^{\heartsuit}$, we have $~^pH^0(X)=X$.
 \item Because $j^*$ is $t$-exact, $~^pH^0(j_*j^*X)=~^pj_*~^pj^*X$.
 \item We have $~^pH^1(i_*i^!X)=~^pi_*~^pH^1(i^!X)$.
 \item Since $X \in \mathcal{D}^{\heartsuit}$, we have $~^pH^1(X)=0$.
\end{itemize}
This gives us the exact sequence $$0 \to ~^pi_*~^pi^!X\to X \to ~^pj_*~^pj^*X \to ~^pi_*~^pH^1(i^!X) \to 0.$$
\end{proof}










