text:
\section{Classification of admissible subcategories of $\P^2$}
\label{sec: projective plane}

\subsection{Overview}

The goal of this chapter is to prove the following result about admissible subcategories in the derived category $\Dbcoh(\P^2)$ of coherent sheaves on $\P^2$. Since exceptional objects and exceptional collections in $\Dbcoh(\P^2)$ have been classified in \cite{gorodentsev-rudakov}, this theorem may be described as a classification of admissible subcategories.

\statemaintheoremPlane

This classification immediately implies the following.

\begin{restatable}{corollary}{statemaintheoremPlanePhantoms}
  \label{cor: no phantoms in the plane}
  There are no phantom subcategories in $\Dbcoh(\P^2)$.
\end{restatable}

\begin{proof}
  For any category $\mA$ with a full exceptional collection of length $n$ the Grothendieck group $K_0(\mA)$ is a free abelian group on $n$ generators. Thus by Theorem~\ref{thm: all admissible subcategories are standard} an admissible subcategory of $\Dbcoh(\P^2)$ is either a zero category, or has non-vanishing $K_0$.
\end{proof}

As mentioned in Lemma~\ref{lem: admissible subcategories are semiorthogonal decompositions}, any admissible subcategory $\mA \subset \Dbcoh(\P^2)$ leads to a semiorthogonal decomposition of that category, $\Dbcoh(\P^2) = \langle \mA, {}^\perp\mA \rangle$. Since the length of any full exceptional collection in $\Dbcoh(\P^2)$ is three, the result above implies that in any nontrivial decomposition at least one of the subcategories $\mA$ and ${}^\perp \mA$ is generated by a single exceptional object. In fact, in the proof of Theorem~\ref{thm: all admissible subcategories are standard} we do not construct nontrivial exceptional collections directly, but rather recognize which of the subcategories $\mA$ and ${}^\perp \mA$ is a simpler one. More precisely, Theorem~\ref{thm: all admissible subcategories are standard} is implied by the following statement:

\begin{theorem}
  \label{thm: reduction to B not locally free}
  Let $\Dbcoh(\P^2) = \langle \mA, \mB \rangle$ be a semiorthogonal decomposition such that $\mA \neq 0$ and~$\mB \neq 0$. Pick a point $p \in \P^2$. Consider a projection triangle for the skyscraper sheaf $\O_p$:
  \[
    B \to \O_p \to A \to B[1]
  \]
  with $B \caniso \mB_R(\O_p) \in \mB$ and $A \caniso \mA_L(\O_p) \in \mA$. Assume that $B$ is not locally free at $p$. Then the subcategory $\mA \subset \Dbcoh(\P^2)$ is generated by a single exceptional vector bundle.
\end{theorem}

The strategy of the proof of Theorem~\ref{thm: reduction to B not locally free} is discussed in Subsection~\ref{ssec: overview of the proof}. First we show how to deduce Theorem~\ref{thm: all admissible subcategories are standard} from this statement.

\begin{proof}[{Proof of the implication \textup{(\ref{thm: reduction to B not locally free})} $\implies$ \textup{(\ref{thm: all admissible subcategories are standard})}}]
  Let $\mA \subset \Dbcoh(\P^2)$ be an arbitrary admissible subcategory. Denote the orthogonal subcategory ${}^\perp\mA \subset \Dbcoh(\P^2)$ by $\mB$. Then $\Dbcoh(\P^2) = \langle \mA, \mB \rangle$ is a semiorthogonal decomposition. If either $\mA$ or $\mB$ is a zero subcategory, there is nothing to prove, so we assume that the decomposition is nontrivial. Let $p \in \P^2$ be a point. Consider a projection triangle
  \[
    B \to \O_p \to A \to B[1]
  \]
  of the skyscraper sheaf. By parts $(1)$ and $(2)$ of Lemma~\ref{lem: projections of a skyscraper} we know that at least one of projections $A$ and $B$ is not locally free at $p$.

  Suppose $B$ is not locally free. Then Theorem~\ref{thm: reduction to B not locally free} implies that there is an exceptional vector bundle $E \in \Dbcoh(\P^2)$ such that $\mA = \langle E \rangle$. By \cite[Th.~5.10]{gorodentsev-rudakov} there exists a mutation of the standard exceptional collection $\Dbcoh(\P^2) = \langle \O, \O(1), \O(2) \rangle$ which contains $E$, confirming Theorem~\ref{thm: all admissible subcategories are standard} in this case.

  Suppose now that $A$ is not locally free. Observe that the dualized and shifted triangle
  \[
    A^\dual[2] \to \O_p \to B^\dual[2] \to A^\dual[3]
  \]
  is the projection triangle of the skyscraper $\O_p$ corresponding to the dual semiorthogonal decomposition $\Dbcoh(\P^2) = \langle \mB^\dual, \mA^\dual \rangle$. Note that $A$ is locally free if and only if $A^\dual[2]$ is. By the same argument as above we see that $\mB^\dual = \langle E \rangle$ for some exceptional bundle $E \in \Dbcoh(\P^2)$. This implies that $\mB$ is generated by a single exceptional bundle $E^\dual$.

  By \cite[Th.~5.10]{gorodentsev-rudakov} any exceptional vector bundle $E^\dual$ on $\P^2$ is a member of some full exceptional collection $\langle E^\prime, E^{\prime \prime}, E^\dual \rangle$, which is moreover a mutation of the standard exceptional collection on $\P^2$. Therefore the category $\mA = \mB^\perp$ is equal to the subcategory $\langle E^\prime, E^{\prime \prime} \rangle$. Thus Theorem~\ref{thm: all admissible subcategories are standard} holds in this case as well.
\end{proof}

\subsection{Strategy of the proof}
\label{ssec: overview of the proof}

The proof of Theorem~\ref{thm: reduction to B not locally free} relies on the properties of the restriction of $B$ to a cubic curve passing through the point $p \in \P^2$. The proof is split into several parts. First in Subsection~\ref{ssec: restrictions to cubic curve satisfy the conditions} we use the results from Section~\ref{sec: numerical lemmas} to study the restriction of the object $B$ to a cubic curve, i.e., to an anticanonical divisor. We use the classification from Proposition~\ref{prop: numerical lemma without numbers} to deduce strong constraints on the object $B$ itself. For instance, in that subsection we show that $B$ is concentrated in at most two cohomology degrees. Then in Subsection~\ref{ssec: new reduction steps} we prove that the zeroth cohomology sheaf of $B$ is a skyscraper sheaf $\O_p$ and the minus first cohomology sheaf is locally free. Finally, in Subsection~\ref{ssec: exceptional bundles from local freeness} we conclude that $A$ is a direct sum of several copies of a single exceptional vector bundle, which lets us finish the proof by Lemma~\ref{lem: projection is rigid implies exceptional vector bundle}.

\subsection{Restricting projections of a skyscraper to a cubic curve}
\label{ssec: restrictions to cubic curve satisfy the conditions}

\begin{setting}
  \label{set: b-projector}
  From here on we fix the data involved in Theorem~\ref{thm: reduction to B not locally free}, namely a semiorthogonal decomposition $\Dbcoh(\P^2) = \langle \mA, \mB \rangle$ such that $\mA \neq 0$ and~$\mB \neq 0$, a point $p \in \P^2$, and the projection triangle for the skyscraper sheaf
  \[
    B \to \O_p \to A \to B[1]
  \]
  with $B \in \mB$ and $A \in \mA$, such that $B$ is not locally free at $p$. We also fix a smooth cubic curve $j\colon E \to \P^2$ cut out by an equation $s \in \Gamma(\P^2, \O(3))$ which passes through $p$.
\end{setting}

\begin{remark}
  In our approach to the proof of Theorem~\ref{thm: reduction to B not locally free} we often use the fact that $\PGL(3)$, the automorphism group of $\P^2$, acts doubly transitively on $\P^2$. For example, this implies that the stabilizer subgroup $\Stab(p) \subset \PGL(3)$ of the point $p \in \P^2$, which acts on the projections of the skyscraper sheaf by Lemma~\ref{lem: projections of a skyscraper} (2), has only two orbits in $\P^2$. It is possible to avoid most instances of relying on symmetry by using general cubic curves instead of fixing the curve $E$ in Setting~\ref{set: b-projector}. We use a strategy like that in some parts of Section~\ref{sec: del pezzos}, where we deal with del Pezzo surfaces. However, for Theorem~\ref{thm: reduction to B not locally free} we need some global geometric properties of $\P^2$ in any case, so there is no immediate benefit from circumventing the arguments based on symmetry.
\end{remark}

\begin{lemma}
  \label{lem: nontrivial decomposition is not pointwise}
  Let $B$ be as in Setting~\textup{\ref{set: b-projector}}. Then the support $\supp(B)$ is $\P^2$.
\end{lemma}
\begin{proof}
  The object $B$ is invariant under the action of the group $\Stab(p) \subset \PGL(3)$ by Lemma~\ref{lem: projections of a skyscraper}, so $\supp(B)$ is a closed $\Stab(p)$-invariant subset of $\P^2$. Thus it is either $\P^2$, or a point $p$.

  Assume that $B$ is an object set-theoretically supported only at the point $p \in \P^2$. Pick the smallest integer $i \in \Z$ such that $\mH^i(B) \neq 0$. Then there exists a morphism $\mH^i(B)[-i] \to B$ in the derived category inducing the identity map on the $i$'th cohomology sheaves. Since $\mH^i(B)$ is a nonzero torsion sheaf supported at a point $p$, there exists a inclusion $\O_p \monoarrow \mH^i(B)$ of sheaves. The composition $\O_p[-i] \to \mH^i(B)[-i] \to B$ is a map inducing a nonzero morphism on the $i$'th cohomology sheaves, so by Corollary~\ref{cor: maps from torsion cannot be nonzero on cohomology} this implies that $\mB = \Dbcoh(\P^2)$ and~$\mA = 0$. This is a contradiction with the assumption that $\mA \neq 0$.
\end{proof}

\begin{lemma}
  \label{lem: p2 numerical lemma}
  Let $B$ be as in Setting~\textup{\ref{set: b-projector}}. For any smooth cubic curve $j\colon E \to \P^2$ which passes through $p$, the derived restriction $j^*B$ is isomorphic to $\O_p[0] \oplus M[a]$ for some simple vector bundle $M$ on the curve $E$ and some shift $a \in \Z$.
\end{lemma}

\begin{proof}
  Note that we are exactly in the situation of Proposition~\ref{prop: numerical lemma without numbers}: we restrict a projection of a skyscraper to a smooth anticanonical divisor on a surface. It only remains to rule out all options except $\O_p[0] \oplus M[a]$.

  The object $B$ is $\Stab(p)$-invariant by Lemma~\ref{lem: projections of a skyscraper}. There are only two orbits of $\Stab(p)$ on $\P^2$, the point $p$ and the complement $\P^2 \setminus \{ p \}$. Thus if $B$ is not locally free at $p$, by Lemma~\ref{lem: locally free has many definitions} the length of the derived fiber at~$p$ is strictly larger than at any other point of $\P^2$. This implies that the restriction $j^*B$ to $E$ is also not locally free at $p \in E$ since the (derived) restriction does not change the lengths of derived fibers. By Lemma~\ref{lem: nontrivial decomposition is not pointwise} the support of $j^*B$ is the curve $E$, so the pullback $j^*B$ is not a torsion object. Among the options listed in Proposition~\ref{prop: numerical lemma without numbers}, only one is an object which is not torsion and not locally free at~$p$, and therefore $j^*B \iso \O_p[0] \oplus M[a]$ for a simple vector bundle $M$ on $E$, as claimed in the statement.
\end{proof}

\begin{lemma}
  \label{lem: cohomology sheaves do not disappear after a restriction}
  Let $B$ and $j\colon E \to \P^2$ be as in Setting~\textup{\ref{set: b-projector}}. If $\mathcal{H}^i(j^*B) = 0$, then $\mathcal{H}^i(B) = 0$.
\end{lemma}

\begin{proof}
  Since $j\colon E \to \P^2$ is an inclusion of a (Cartier) divisor, by Lemma~\ref{lem: derived restriction to a divisor} the vanishing of~$\mH^i(j^*B)$ implies that $\supp(\mH^{i}(B)) \cap E = \emptyset$. By Lemma~\ref{lem: projections of a skyscraper} the object $B$ is $\Stab(p)$-invariant, hence $\mH^i(B)$ is also $\Stab(p)$-invariant. Since $E$ passes through $p$ and $\Stab(p)$ acts transitively on $\P^2 \setminus \{ p \}$, we obtain that the nonderived restriction of $\mH^i(B)$ to any point of~$\P^2$ is zero, but this implies $\mH^i(B) = 0$.
\end{proof}

\begin{corollary}
  \label{cor: reduction to at most two cohomology sheaves}
  Let $B$ be as in Setting~\textup{\ref{set: b-projector}}. Then $B$ has at most two nonzero cohomology sheaves, and at most one of them is not a torsion sheaf supported at $p$.
\end{corollary}
\begin{proof}
  Pick an elliptic curve $j\colon E \to \P^2$ which passes through $p$. Then Lemmas~\ref{lem: p2 numerical lemma} and~\ref{lem: cohomology sheaves do not disappear after a restriction} imply that $B$ has at most two nonzero cohomology sheaves. Moreover, we see that the (derived) restriction of $B$ to some point $q \in E$ which is distinct from $p$ is concentrated in a single degree. Since $B$ is $\Stab(p)$-invariant, it is locally free away from $p$ and thus only one of cohomology sheaves is nonzero around the point $q$.
\end{proof}

\subsection{The structure of $B$}
\label{ssec: new reduction steps}

\begin{lemma}
  \label{lem: lines detect point-torsion}
  Let $\mathcal{F}$ be a nonzero coherent sheaf on a smooth surface $S$ supported at a single point $p \in S$. Then for any curve $j\colon C \monoarrow S$ passing through~$p$ we have~$L_1j^*\mathcal{F} \neq 0$ and~$L_0j^*\mathcal{F} \neq 0$. Moreover, those two zero-dimensional sheaves have the same length.
\end{lemma}
\begin{proof}
  We may work locally and assume that $S$ is a spectrum of a local ring. Let $\mathfrak{m} \subset \O_S$ be the ideal sheaf of the point $p$. The curve $C$ is given by $f = 0$ for some $f \in \mathfrak{m}$. The derived pullback $j^*\mathcal{F}$ is computed by the complex $\mathcal{F} \xrightarrow{f \cdot -} \mathcal{F}$.
  Since $\mathcal{F}$ is set-theoretically supported at the point $p$, for some $n \gg 0$ we have $f^n \in \mathrm{Ann}(\mathcal{F})$. The multiplication by $f$ thus cannot be an automorphism of $\mathcal{F}$. Since $\mathcal{F}$ is a vector space of finite dimension, this means the kernel and cokernel of the multiplication map are both nonzero and have the same dimension.
\end{proof}

\begin{lemma}
  \label{lem: lines detect skyscrapers}
  Let $\mathcal{F}$ be a nonzero coherent sheaf on a smooth surface $S$ supported at a single point $p \in S$. Assume that for any tangent direction at $p$ there exists a smooth curve $j\colon C \monoarrow S$ passing through $p$ with that tangent direction such that the torsion sheaf $L_0j^*\mathcal{F}$ has length one. Then $\mathcal{F}$ is isomorphic to a skyscraper sheaf $\O_p$ on $S$.
\end{lemma}
\begin{proof}
  Let $A := \O_{S, p}$ be the local ring of the point $p \in S$, and denote by $\mathfrak{m}$ the maximal ideal of $A$. Let $C \subset S$ be one of the curves from the statement, and let $f \in \mathfrak{m}$ be an equation of the curve $C$. Then the nonderived restriction $L_0j^*\mathcal{F}$ is isomorphic to $\mathcal{F}/f \mathcal{F}$. Note that the quotient $\mathcal{F}/\mathfrak{m}\mathcal{F}$ is nonzero since $\mathcal{F}$ is a nonzero sheaf. Since the length of $\mathcal{F}/f \mathcal{F}$ is one, this implies that $\mathcal{F}/\mathfrak{m}\mathcal{F}$ is an one-dimensional vector space. By Nakayama's lemma $\mathcal{F}$ is a cyclic module, i.e., $\mathcal{F} \iso A/I$ for some ideal $I \subset A$ contained in $\mathfrak{m}$.

  Let $I_p$ be the image of $I \subset \mathfrak{m}$ in the cotangent space $T_p^\dual := \mathfrak{m}/\mathfrak{m}^2$. If $I_p = T_p^\dual$, then by Nakayama's lemma $I = \mathfrak{m}$ and then $\mathcal{F} \iso A/\mathfrak{m} \iso \O_p$, so the lemma is proved. Assume now that $I_p$ is a proper subset of $T_p^\dual$. For an equation $f \in \mathfrak{m}$ of a curve $C$ as in the statement let $[ f ] \in T_p^\dual$ denote its class in $T_p^\dual$. If $I_p$ is a nonzero subspace, choose a curve $C = \{ f = 0 \}$ such that $[ f ] \in I_p$, and if $I_p$ is zero, choose an arbitrary $C$. The assumption on the length of $L_0j^*\mathcal{F}$ implies that $(I, f) = \mathfrak{m}$. But by the choice of $f$ the image of the ideal $(I, f)$ in the cotangent space $T_p^\dual$ is a proper subset of $T_p^\dual$, a contradiction. Thus $I = \mathfrak{m}$ is the only option.
\end{proof}

\begin{lemma}
  \label{lem: always torsion in cohomology sheaves of B}
  Let $B$ be as in Setting~\textup{\ref{set: b-projector}}. At least one cohomology sheaf $\mH^i(B)$ has torsion.
\end{lemma}

\begin{proof}
  Assume that all cohomology sheaves are torsion-free. By Corollary~\ref{cor: reduction to at most two cohomology sheaves} the object $B$ has only one nonzero cohomology sheaf. Moreover, by Lemma~\ref{lem: projection triangle induces nonzero map on cohomology} the sheaf $\mH^0(B)$ is not zero. Hence $B \iso \mathcal{F}[0]$ for some $\Stab(p)$-invariant torsion-free coherent sheaf $\mathcal{F}$ on $\P^2$. By Lemma~\ref{lem: torsion-free sheaves and divisors} the derived restriction $j^*\mathcal{F}$ is concentrated in degree zero. From Lemma~\ref{lem: p2 numerical lemma} we conclude that $L_0j^*\mathcal{F} \iso \O_p \oplus M$ for a vector bundle $M$ on the curve $E$, and $L_1j^*\mathcal{F} = 0$.

  Since $\mathcal{F}$ is a torsion-free sheaf on a surface, we may consider the short exact sequence from Lemma~\ref{lem: torsion-free sheaves on a surface}:
  \begin{equation}
    \label{eqn: torsion-free sheaf on a surface}
    0 \to \mathcal{F} \to \mathcal{E} \to \mathcal{Q} \to 0
  \end{equation}
  where $\mathcal{E}$ is locally free and $\mathcal{Q}$ is a torsion sheaf. By $\Stab(p)$-invariance of $\mathcal{F}$ and the uniqueness of the short exact sequence the torsion sheaf $\mathcal{Q}$ is supported only at the point $p$.

  Consider the long exact sequence of derived pullbacks $L_\bullet j^*$ induced by the short exact sequence (\ref{eqn: torsion-free sheaf on a surface}):
  \[
    0 \to L_1 j^* \mathcal{Q} \to L_0 j^*\mathcal{F} \to L_0 j^*\mathcal{E} \to L_0 j^* \mathcal{Q} \to 0.
  \]
  The sheaf $L_1 j^* \mathcal{Q}$ is a nonzero torsion sheaf by Lemma~\ref{lem: lines detect point-torsion}. Since the torsion part of $L_0 j^*\mathcal{F}$ is isomorphic to a skyscraper $\O_p$, this implies that $L_1 j^* \mathcal{Q} \iso \O_p$. By Lemma~\ref{lem: lines detect point-torsion} the nonderived pullback $L_0 j^*\mathcal{Q}$ is also isomorphic to a skyscraper at $p$. Since $\mathcal{Q}$ is $\Stab(p)$-invariant, the same holds for cubic curves passing through $p$ in any direction. By Lemma~\ref{lem: lines detect skyscrapers} this implies that $\mathcal{Q} \iso \O_p$. Then one easily computes that
  \[
    \Ext^1(B, \O_p) = \Ext^1(\mathcal{F}, \O_p) \iso \Ext^2(\mathcal{Q}, \O_p) \iso \k.
  \]

  Since the object $B$ is the projection of a skyscraper sheaf, by Corollary~\ref{cor: universal property of projection triangles} the vector space $\Ext^1(B, \O_p)$ is isomorphic to $\Ext^1(B, B)$. On the other hand, $\mathcal{F}$ is not locally free at a single point $p \in \P^2$, so $\Ext^1(\mathcal{F}, \mathcal{F})$ is at least two-dimensional by Lemma~\ref{lem: objects with a special point have large ext1}. This is a contradiction, so at least one cohomology sheaf of $B$ is not torsion-free.
\end{proof}

\begin{remark}
  The first part of the argument in Lemma~\ref{lem: always torsion in cohomology sheaves of B} shows that if $B$ is a single coherent sheaf, then it is necessarily a torsion-free sheaf which is a kernel of a map between a vector bundle and a skyscraper. This does not happen in Setting~\ref{set: b-projector}, but sheaves like that appear as the \emph{left} projections $\mA_L(\O_p)$ of skyscraper sheaves for those semiorthogonal decompositions~$\Dbcoh(\P^2) = \langle \mA, \mB \rangle$ where the subcategory $\mB$ is generated by a single exceptional vector bundle. For example, if $\mB = \langle \O \rangle$, the projection triangle is
  \[
    \O \to \O_p \to \mathcal{I}_p[1].
  \]
  Here the ideal sheaf $\mathcal{I}_p$ is exactly the sheaf described by the first part of the argument in Lemma~\ref{lem: always torsion in cohomology sheaves of B}. Thus the second part of the argument may be considered as a way to distinguish the left projection and the right projection of a skyscraper sheaf.
\end{remark}

\begin{lemma}
  \label{lem: torsion case of cohomology sheaf}
  Let $B$ be as in Setting~\textup{\ref{set: b-projector}}. Then $B$ is concentrated in degrees $[-1; 0]$, $\mH^0(B)$ is isomorphic to $\O_p$, the sheaf $\mH^{-1}(B)$ is locally free, and the projection triangle
  \[
    B \to \O_p \to A
  \]
  from Setting~\textup{\ref{set: b-projector}} is isomorphic to a truncation triangle of $B$, with $A \iso \mH^{-1}(B)[2]$.
\end{lemma}
\begin{proof}
  By Lemma~\ref{lem: always torsion in cohomology sheaves of B} we know that there exists some $i \in \Z$ such that the sheaf $\mH^i(B)$ is not torsion-free. Let $T \subset \mH^i(B)$ be the torsion subsheaf. It is $\Stab(p)$-invariant, so it is supported only at the point $p$. Consider the short exact sequence
  \[
    0 \to T \to \mH^i(B) \to \mH^i(B)/T \to 0.
  \]
  Consider the long exact sequence of derived pullbacks $L_\bullet j^*$ induced by that short exact sequence. The quotient $\mH^i(B)/T$ is a torsion-free sheaf on a smooth surface, so using Lemma~\ref{lem: torsion-free sheaves and divisors} we see $L_1j^*(\mH^i(B)/T) = 0$, and hence $L_1j^*\mH^i(B) \iso L_1j^*T$. This space is nonzero by Lemma~\ref{lem: lines detect point-torsion}. We also see that $L_0j^*\mH^i(B)$ contains the nonzero torsion subsheaf isomorphic to $L_0j^*T$.

  The relation between cohomology sheaves of $j^*B$ and derived pullbacks $L_\bullet j^* \mH^i(B)$ is described in Lemma~\ref{lem: derived restriction to a divisor}. In particular, this lemma implies that $\mH^{i-1}(j^*B)$ has a quotient isomorphic to $L_1 j^* \mH^i(B)$, and $\mH^i(j^*B)$ has a subsheaf isomorphic to $L_0j^*\mH^i(B)$. Thus both $i$'th and $(i-1)$'th cohomology sheaves of $j^*B$ are nonzero, and moreover $\mH^i(j^*B)$ has a nonzero torsion subsheaf.

  By Lemma~\ref{lem: p2 numerical lemma} this implies that $i = 0$, the object $j^*B$ is concentrated in degrees $[-1; 0]$, the sheaf $\mH^0(j^*B)$ is isomorphic to a skyscraper sheaf $\O_p$, and the sheaf $\mH^{-1}(j^*B)$ is locally free. By Lemma~\ref{lem: cohomology sheaves do not disappear after a restriction} the cohomology sheaves of the complex $B$ are also zero outside of the range $[-1; 0]$. Since in this case $L_0j^*\mH^0(B) \iso \mH^0(j^*B) \iso \O_p$, and the sheaf $\mH^0(B)$ is $\Stab(p)$-invariant, by Lemma~\ref{lem: lines detect skyscrapers} this implies that $\mH^0(B) \iso \O_p$.

  Since the sheaf $\mH^{-1}(j^*B)$ is locally free on a curve, its subsheaf $L_0j^*\mH^{-1}(B)$ is also locally free. The sheaf $\mH^{-1}(B)$ is $\Stab(p)$-invariant, and the curve $j\colon E \to \P^2$ passes through $p$, so the nonderived rank of the sheaf $\mH^{-1}(B)$ is constant over $\P^2$. Therefore $\mH^{-1}(B)$ is locally free.

  Thus $B$ is concentrated in degrees $-1$ and $0$, with $\mH^0(B) \iso \O_p$ and $\mH^{-1}(B)$ locally free. Using Lemma~\ref{lem: morphisms from topmost cohomology sheaf extend} it is easy to compute that $\Hom(B, \O_p)$ is one-dimensional. Any nonzero map is proportional to the truncation morphism $B \to \tau_{\geq 0}(B) \iso \O_p[0]$, and the cone of this map is isomorphic to $\mH^{-1}(B)[2]$. This confirms the last claim of the statement.
\end{proof}

\subsection{Full description of $A$ and $B$}
\label{ssec: exceptional bundles from local freeness}

\begin{lemma}
  \label{lem: exceptional projections are generators}
  Let $X$ be a smooth and proper variety, and let $\mA \subset \Dbcoh(X)$ be an admissible subcategory. Let $E \in \mA$ be an exceptional object and suppose that for any point $p \in X$ the projection $\mA_L(\O_p) \in \mA$ lies in the subcategory $\langle E \rangle \subset \mA$. Then $\mA = \langle E \rangle$.
\end{lemma}

\begin{proof}
  By Lemma~\ref{lem: exceptional collections are admissible} the subcategory $\langle E \rangle \subset \mA$ is admissible in $\mA$. Consider the induced semiorthogonal decomposition $\mA = \langle \mA^\prime, E \rangle$. Let $L_{\mA^\prime}\colon \Dbcoh(X) \to \mA^\prime$ be the left projection functor. It is equal to the composition of the left projection functor $\mA_L$ and the left projection to $\mA^\prime$ inside $\mA$. Thus the condition $\mA_L(\O_p) \in \langle E \rangle$ implies that $L_{\mA^\prime}(\O_p) = 0$ for all skyscrapers. Since $L_{\mA^\prime}$ is the left adjoint for the inclusion functor $\mA^\prime \monoarrow \Dbcoh(X)$, for any object $A \in \mA^\prime$ we have
  \[
    \RHom_{X}(A, \O_p) \caniso \RHom(A, L_{\mA^\prime}(\O_p)) = 0.
  \]
  This is true for all points $p \in X$, so the support of any object $A \in \mA^\prime$ is empty. Therefore the subcategory $\mA^\prime$ is a zero subcategory, which means that $\mA = \langle E \rangle$, as claimed.
\end{proof}

\begin{lemma}
  \label{lem: projection is rigid implies exceptional vector bundle}
  Let $A, B$ be as in Setting~\textup{\ref{set: b-projector}}. Then $\mA$ is generated by a single exceptional vector bundle.
\end{lemma}

\begin{proof}
  By Lemma~\ref{lem: torsion case of cohomology sheaf} we know that the object $A$ in the projection triangle $B \to \O_p \to A$ is isomorphic to $N[2]$ for some vector bundle $N$ on $\P^2$. Semiorthogonality of $A$ and $B$ implies that
  \[
    \RHom(N, N) \caniso \RHom(N[2], N[2]) \caniso \RHom(\O_p, N[2]).
  \]
  Since $N$ is locally free, the space $\RHom(\O_p, N[2])$ is concentrated in degree $0$. Therefore the graded vector space~$\Ext^*(N, N)$ is also concentrated in degree zero. Thus the bundle~$N$ is rigid. By \cite[Cor.~7]{drezet} all rigid vector bundles on $\P^2$ are direct sums of exceptional bundles. Suppose that $N$ is not a direct sum of several copies of the same exceptional bundle. Then it has two non-isomorphic direct summands $R_0$ and $R_1$, which are both exceptional bundles. It is known \cite[Lem.~4.3]{drezet-lepotier} that an exceptional vector bundle on $\P^2$ is uniquely determined by its slope, so without loss of generality we may assume that the slope of $R_0$ is strictly smaller than the slope of $R_1$.

  Since every exceptional bundle on $\P^2$ is stable \cite[Th.~4.1]{gorodentsev-rudakov}, the inequality of slopes implies that
  \[
    \mathrm{R}^0\Hom(R_1, R_0) = 0.
  \]
  Then the pair $R_0, R_1$ is semiorthogonal: indeed, $\Ext^*(N, N) = \Ext^0(N, N)$, so there are no higher $\Ext$s between the direct summands of $N$, and there are no $\mathrm{R}^0\Hom$s from $R_1$ to $R_0$ by semistability.

  The category $\mA$ is closed under direct summands, so both $R_0$ and $R_1$ lie in $\mA$. The orthogonal subcategory $\mB = {}^\perp \mA$ is contained inside ${}^\perp \langle R_0, R_1 \rangle$. By \cite[Th.~5.10]{gorodentsev-rudakov} the orthogonal to an exceptional pair on $\P^2$ is generated by a single exceptional vector bundle. In particular, this would imply that any object in $\mB$ is locally free, but we assumed from the very beginning in Setting~\ref{set: b-projector} that $B \in \mB$ is not a locally free object. This contradiction shows that $A \iso N[2] \iso \left(N^\prime\right)^{\oplus n}[2]$ is a direct sum of several copies of an exceptional vector bundle $N^\prime$.

  All exceptional bundles on $\P^2$ are rigid and therefore $\PGL(3)$-invariant. Thus by Proposition~\ref{prop: admissible subcategories are open} we know that the pullback of the projection triangle
  \[
    B \to \O_p \to A
  \]
  along some element $g \in \PGL(3)$ is a projection triangle for a skyscraper at the point $g^{-1}(p)$. Thus the projection of any skyscraper to $\mA$ is isomorphic to $\left(N^\prime\right)^{\oplus n}[2]$. By Lemma~\ref{lem: exceptional projections are generators} we see that the subcategory $\mA$ is generated by an exceptional vector bundle $N^\prime$. This establishes the second part of the statement.
\end{proof}

This lemma is the final step in the proof of Theorem~\ref{thm: reduction to B not locally free}, and hence it also establishes the main theorem of this chapter, Theorem~\ref{thm: all admissible subcategories are standard}.


TITLE: Action of the permutation group on the set of topologies on a continuum
QUESTION [1 upvotes]: Let $X$ be a set of continuum cardinality. The group of permutations of $X$ acts on the set of topologies on $X$.
What can be said about the fixed points of this action? Are manifolds fixed points?
What can be said about the finite orbits?

REPLY [3 votes]: Let $S(X)$ be the group of permutations of $X$, $X$ infinite. It is a classical consequence of the Baer theorem (Onofri for $X$ countable) that $S(X)$ has no nontrivial finite quotient [actually every nontrivial quotient has cardinal $2^{|X|}$]. Hence every finite orbit of $S(X)$ on $T(X)$, the set of topologies on $X$, is a singleton. [Edit: actually $S(X)$ has no proper subgroup of index $<|X|$ and hence this even applies to orbits of cardinal $<|X|$.]
The orbits of $S(X)$ on $2^X$ are indexed by pairs $(u,v)$ of cardinals such that $\max(u,v)=|X|$, namely $C(u,v)$ the set of subsets of cardinal $u$ with complement of cardinal $v$. Let $W$ be the set of such pairs $(u,v)$; it has an obvious total ordering.
Hence an $S(X)$-invariant subset $\tau$ of $2^X$ is determined by a subset $E_\tau$ of $W$. The condition that $\tau$ is stable under taking arbitrary unions means that $(u,v)\le (u',v')$ and $(0,|X|)\neq (u,v)\in E_\tau$ implies $(u',v')\in E_\tau$. In addition, the condition of being stable under taking finite intersection means that $(u,v)\in E_\tau$, $v=|X|$ implies $(u',v')\in E_\tau$ whenever $(u',v')\le (u,v)$, and $(|X|,n)\in E_\tau$ for $0<n<\omega$ implies $(|X|,n')\in E_\tau$ for all $n'\ge n$.
We deduce that every $S(X)$-invariant topology on $X$ is one of the following

the indiscrete topology $\{\emptyset,X\}$;
for some infinite $\alpha\le |X|$, the topology $\tau_\alpha$ for which open subsets are $\emptyset$ and subsets with complement of cardinal $<\alpha$;
the discrete topology (this is the only Hausdorff one).

Note: this is equivalent to ask what are the topologies on $X$ for which the self-homeomorphism group is the whole group of permutations.


text:
\section{Characteristic Classes}\label{ch:char_class}

\subsection{Mathematical Preliminaries}\label{sec:char:math}
There are a few equivalent definitions of characteristic classes. One of them is the following, characterized by the so-called naturality condition.
\begin{mydef}\label{def:char_class}
	Let $R$ be a commutative ring, $M$ a topological manifold and $E$ a topological vector bundle over $M$. A \defstyle{characteristic class} $\kappa(E)$ of $E$ is an element in the cohomology ring $H^*(M; R)$ with coefficients in $R$ such that for every continuous map $f: N \to M$, where $N$ is another topological manifold, the \defstyle{naturality condition} holds:
	\begin{align*}
		f^* \kappa(E) = \kappa(f^* E).
	\end{align*}
\end{mydef}
Roughly speaking, a characteristic class measures the vector bundle's \enquote{non-triviality} in a certain way. Typically, there are various methods to obtain characteristic classes. In this thesis, we make use of the so-called \defstyle{Chern--Weil method}, which utilizes connections on differentiable vector bundles to construct characteristic classes in the de Rham cohomology ring with complex coefficients of the underlying differentiable manifold. This seems to be a good approach since the curvature, in a sense, measures the local deviation from flatness. We give a brief review of Chern--Weil theory in this chapter, inspired by \cite{roe:elliptic, baer:charakteristisch}. A full discussion of characteristic classes in a more general setting can be found in~\cite{milnor:char_classes}. In what follows, unless stated otherwise, we consider manifolds and vector bundles to be smooth.

\paragraph{Chern--Weil Theory.} Let us first recall some fundamental definitions and theorems about invariant polynomials and finally introduce the Chern--Weil theory. We start with a definition:
\begin{mydef}

	Let $G$ be a compact Lie group and $\mathfrak{g}$ its Lie algebra. A polynomial $P : \mathfrak{g} \to \CC$ is called \defstyle{invariant} if
	\begin{align*}
		P(X) = P(\mathrm{Ad}_g(X))
	\end{align*}

	holds for every $X \in \mathfrak{g}$ and $g \in G$.
\end{mydef}
A canonical choice in our setting would be $G = \mathrm{GL}(n,\CC)$ and $\mathfrak{g}=\mathfrak{gl}(n,\CC)$ with the adjoint representation $\mathrm{Ad}_g(X) = g Xg^{-1}$. Famous examples of invariant polynomials on $\mathfrak{gl}(n,\CC)$ are the determinant and trace. However, we can consider $G$ being any other Lie group; for example, the group $G=\mathrm{SO}(2n)$ with the Lie algebra $\mathfrak{g}=\mathfrak{so}(2n)$ of skew-symmetric matrices. This special case plays an important role for oriented vector bundles when we discuss Pfaffian classes later in this section.

The following lemma is essential with respect to characteristic classes.
\begin{mylem}\label{lem:elem_sym_pol_gen}
	The ring of invariant polynomials on $\mathfrak{gl}(n,\CC)$ is a polynomial ring generated by the elementary symmetric functions $\sigma_k$ specified by the characteristic polynomial of a complex matrix $X \in \mathfrak{gl}(n,\CC)$ in the indeterminate~$t$:
	\begin{align}
		\det\left(1 + \frac{t X}{2 \pi i}\right) = \sum_{k=0}^{n} \sigma_k(X) \, t^k . \label{eq:elem_sym_pol}
	\end{align}
\end{mylem}
See \cite[p. 299, Lemma~6]{milnor:char_classes}, \cite[Lem.~2.19]{roe:elliptic} for proofs. We leave this lemma behind for the moment and focus on the fundamental theorem of Chern--Weil theory.
\begin{mythm}
	Let $E$ be a complex vector bundle over a manifold $M$ equipped with a connection $\nabla$, and let $\Omega$ be its curvature form matrix with respect to some frame. Suppose $P : \mathfrak{gl}(n,\CC) \to \CC$ is an invariant polynomial. Then the form $P(\Omega)$ is closed and
	\begin{align*}
		\left[ P(\Omega) \right] \in H^{2*}_{\mathrm{dR}}(M; \CC)
	\end{align*}
	is independent of the choice of connection $\nabla$.
	\label{thm:inv_ind_con}
\end{mythm}
Proofs can be found in \cite[296~ff.]{milnor:char_classes}, \cite[Lem.~1.8, Satz~1.9]{baer:charakteristisch}, \cite[297~ff.]{eguchi:grav}, \cite[Prop.~2.20]{roe:elliptic}. Notice that the form $P(\Omega)$ is a well-defined global form on $M$. This follows immediately from the transformation behavior of $\Omega$ together with the invariant nature of $P$. We can even consider $P$ to be an invariant formal power series. Due to the fact that $\Omega$ is always nilpotent, no convergence questions arise and the same statement still applies. Finally, from Theorem~\ref{thm:inv_ind_con}, we see that $\left[ P(\Omega) \right]$ defines a characteristic class in the sense of Definition~\ref{def:char_class}. This boils down to the fact that pullback operations pass through curvatures and polynomials up to cohomology level.

These are all the ingredients we need for the Chern--Weil method. The recipe manifests as follows: \enquote{Choose a connection, compute its curvature form matrix and apply an invariant formal power series to it}. Before we discuss the implementation details in \Sage, let us introduce some important types of classes constructed from the Chern--Weil method and investigate its properties.

\paragraph{Multiplicative Classes on Complex Bundles.}\label{para:mul_chern_genera}
Let $f$ be a holomorphic function near zero and $E$ be a complex vector bundle of rank $n$ over a manifold $M$. Furthermore, let $\nabla$ be a connection on $E$ and $\Omega$ its curvature form matrix with respect to some frame. We set
\begin{align*}
	\Pi_f(E, \nabla) := \det\left( f\left( \frac{\Omega}{2 \pi i} \right) \right) \in \Omega^{2*}(M; \CC)
\end{align*}
and define the \defstyle{multiplicative characteristic class associated to $\boldsymbol f$}:
\begin{align*}
	 \Pi_f(E) := \left[\Pi_f(E, \nabla)\right] \in H^{2*}_{\mathrm{dR}}(M; \CC).
\end{align*}
The form $\Pi_f(E, \nabla)$ is called \defstyle{characteristic form with respect to $\boldsymbol\nabla$} of the corresponding characteristic class $\Pi_f(E)$.

The most important multiplicative class is the so-called \defstyle{total Chern class} $c(E)$. It is defined as the multiplicative class associated to the function $$f(z) = 1+z.$$ The total Chern class is an element of the cohomology ring with purely real coefficients. This can be seen as follows. We equip $E$ with a Hermitian metric and compatible connection. Thus by choosing an orthonormal frame, the associated curvature form matrix is skew-Hermitian. Finally applying complex conjugation yields the assertion.
Comparison with~\eqref{eq:elem_sym_pol} reveals that the total Chern class breaks up as a sum of classes given by the elementary symmetric functions. The class $c_k(E)$ associated to the $k$-th elementary symmetric function $\sigma_k$ is called \defstyle{$\boldsymbol k$-th Chern class} of $E$. Its importance is seen by Lemma~\ref{lem:elem_sym_pol_gen}, which shows that every characteristic class constructed via the Chern--Weil method can be obtained from polynomials in the Chern classes $c_k(E)$.

Note the following two significant properties of multiplicative classes:
\begin{myenum}
	\item If $E$ is a complex line bundle, we have $\Pi_f(E) = f(c_1(E))$.
	\item If $E = E_1 \oplus E_2$, we have $\Pi_f(E) = \Pi_f(E_1)\, \Pi_f(E_2)$.
\end{myenum}
Property ii) can be easily seen by picking a direct sum connection and finally justifies the name \enquote{multiplicative}. In fact, both properties determine the characteristic class $\Pi_f(E)$ uniquely. This follows from the \defstyle{splitting principle}.
\begin{mythm}[Splitting Principle]
	Let $E$ be a complex vector bundle of rank $n$ over a manifold $M$ and $R$ be a commutative ring. Then, there exist another manifold $F(E)$, called \defstyle{flag manifold} associated to $E$, and a map $g: F(E) \to M$ such that
	\begin{myenum}
		\item the induced cohomology homomorphism $$g^* : H^*(M;R) \to H^*(F(E);R)$$ is injective and
		\item the pullback bundle $g^*E$ splits into the direct sum of line bundles: $$g^*E = L_1 \oplus \dots \oplus L_n.$$
	\end{myenum}
\end{mythm}
For the proof, we refer to~\cite[Prop.~11.1]{lawson:spin},~\cite[Thm.~2.6.1]{randal:characteristic}. A full discussion with respect to $K$-theory can be found in~\cite{hatcher:vector_bundles}. As usual, we restrict ourselves to the case $R=\RR, \CC$. The first Chern classes $c_1(L_j)$ of the corresponding line bundles $L_j$ into which $g^*E$ splits are called \defstyle{Chern roots} of $E$. We find that they determine the $k$-th Chern class of $E$ in the following way:
\begin{align*}
	c_k(E) = \sigma_k \left( c_1(L_1), \ldots, c_1(L_n) \right).
\end{align*}
Now, suppose $(x_j)^n_{j=1}$ are the eigenvalues including multiple appearances of a complex matrix ${X}/{2 \pi i}$. Then we obtain
\begin{align}
	\det\left(f\left(\frac{X}{2 \pi i}\right)\right) = \prod_{j=1}^{n} f(x_j), \label{eq:chern_to_eigenvalues}
\end{align}
which is a symmetric formal power series in the variables $x_j$. Hence, we can express it in terms of the elementary symmetric functions in these indeterminates $x_j$. This means, each $x_j$ can be considered as representing the Chern root $c_1(L_j)$. This result again emphasizes the fundamental significance of Chern classes.

The theory needs to be handled with greater precaution in the real case. Let $E$ be a real vector bundle and $E \otimes_{\RR} \CC$ its complexification. Suppose $X$ is a real skew-symmetric matrix. Due to~\eqref{eq:elem_sym_pol}, we see that
\begin{align*}
	c_k(X) = c_k(X^t) = c_k(-X) = (-1)^k c_k(X)
\end{align*}
from which we immediately infer $c_{2k+1}(X) = 0$. Since every real vector bundle carries a metric and hence a compatible connection, the curvature form matrix can be chosen skew-symmetric. In conclusion, the odd Chern classes of $E \otimes_{\RR} \CC$ vanish. It is convenient to denote
\begin{align*}
	p_k := (-1)^k c_{2k}
\end{align*}
from which we gain a new class $p_k(E) \in H^{4k}(M;\RR)$ called \defstyle{$\boldsymbol k$-th Pontryagin class} of $E$. The corresponding sum $$p(E) = p_0(E) + p_1(E) + \ldots \in H^{4*}_{\mathrm{dR}}(M;\RR)$$ is called \defstyle{total Pontryagin class} of $E$. This leads to an analogous theory of multiplicative classes for real vector bundles.

\paragraph{Multiplicative Classes on Real Bundles.}
Suppose $E$ is a real vector bundle of rank $n$ and $g$ is a holomorphic function near zero with $g(0)=1$. We define
\begin{align}
	f(z) := \sqrt{g(z^2)}
	\label{eq:f_from_g_genus}
\end{align}
to be the branch satisfying $f(0)=1$. We call the multiplicative characteristic class $\Pi_f(E \otimes_{\RR} \CC)$ the \defstyle{multiplicative class associated to $\boldsymbol g$} on the \emph{real} vector bundle $E$.

Remember \eqref{eq:chern_to_eigenvalues} and its role for the splitting principle. We have a quite similar equation in terms of Pontryagin classes, explained by the following lemma.
\begin{mylem}
	The multiplicative class on a real vector bundle $E$ associated to a function $g$ as above is equal to
	\begin{align*}
		\prod^{\lfloor n/2 \rfloor}_{j=1} g(y_j)
	\end{align*}
	where the Pontryagin classes of $E$ are the elementary symmetric functions in the indeterminates $y_j$.
\end{mylem}
The proof can be found in~\cite[Lem.~2.27]{roe:elliptic}. This justifies the name \enquote{multiplicative} for real vector bundles. Moreover, this explains the choice of squares and roots in~\eqref{eq:f_from_g_genus}. Furthermore, this lemma can be interpreted in terms of a splitting principle: there is a pullback of $E$ such that it splits into a sum of suitable real 2-plane bundles (and additionally one line bundle when the rank is odd), where $y_j$ represents the first Pontryagin class of the $j$-th 2-plane bundle. For details see~\cite[Prop.~11.2, Obs.~11.8]{lawson:spin}.

\paragraph{Additive Classes on Complex Bundles.}
Let us introduce characteristic classes of additive type. For this, we assume $E$ to be a complex vector bundle over a manifold $M$ with connection $\nabla$ and curvature form matrix $\Omega$ again. We denote
\begin{align*}
	\Sigma_f(E, \nabla) := \tr\left( f\left( \frac{\Omega}{2 \pi i} \right) \right) \in \Omega^{2*}(M; \CC)
\end{align*}
and define the \defstyle{additive characteristic class associated to $\boldsymbol f$} to be
\begin{align*}
	\Sigma_f(E) := \left[ \Sigma_f(E, \nabla) \right] \in H^{2*}_{\mathrm{dR}}(M; \CC).
\end{align*}
The term \enquote{additive} comes from the obvious property
\begin{align*}
	\Sigma_f(E_1 \oplus E_2) = \Sigma_f(E_1) + \Sigma_f(E_2).
\end{align*}

The most prominent additive class is the so-called \defstyle{Chern character} $\mathrm{ch}(E)$ of $E$. It lives in $H^{2*}_{\mathrm{dR}}(M; \RR)$ and is associated to the function $$f(z) = \exp\left( z \right).$$
The Chern character plays an important role since it defines some sort of \enquote{ring homomorphism} via
\begin{align*}
	\mathrm{ch}(E_1 \oplus E_2) &= \mathrm{ch}(E_1) + \mathrm{ch}(E_2), \\
	\mathrm{ch}(E_1 \otimes E_2) &= \mathrm{ch}(E_1)\, \mathrm{ch}(E_2).
\end{align*}
The second equation can be obtained from the well-known behavior of the exponential map $\expe^{z_1}\expe^{z_2}=\expe^{z_1+z_2}$ and using the tensor product connection.

\paragraph{Additive Classes on Real Bundles.}
As previously discussed in the multiplicative case, real vector bundles need a special treatment in the additive case, too. Again, let $E$ be a real vector bundle over a manifold $M$ and $E \otimes_{\RR} \CC$ its complexification. Furthermore, let $g$ be a holomorphic function near zero with $g(0)=0$. We denote
\begin{align*}
	f(z) := \frac{g(z^2)}{2}
\end{align*}
and define $\Sigma_f(E \otimes_{\RR} \CC)$ to be the \defstyle{additive characteristic class associated to $\boldsymbol g$} of the \emph{real} vector bundle $E$. The following lemma adapted from \cite[Lem.~2.27]{roe:elliptic} explains the factor $1/2$.
\begin{mylem}
	The additive characteristic class associated to a function $g$ as above of a real vector bundle $E$ is equal to
	\begin{align*}
		\sum^{\lfloor n/2 \rfloor}_{j=1} g(y_j)
	\end{align*}
	where the Pontryagin classes of $E$ are the elementary symmetric functions in the indeterminates $y_j$.
\end{mylem}
\begin{proof}
	In the real case, the curvature matrix can be chosen skew-symmetric and is therefore similar to one in block diagonal form. The corresponding blocks are $2 \times 2$ and of the form
	\begin{align*}
		X = \begin{pmatrix}0 & \lambda \\ -\lambda & 0 \end{pmatrix}
	\end{align*}
	with eigenvalues $\pm i \lambda$ and possibly one $1 \times 1$ block equal to zero. Since both sides of the stated equality are additive for direct sums, it is sufficient to prove it for either block type. The zero case is trivial. For the case of block type $X$, we have
	\begin{align*}
		c_1(X) = 0, \quad c_2(X) = - \frac{\lambda^2}{4 \pi^2}
	\end{align*}
	and thus $y=p_1(X) = \frac{\lambda^2}{4 \pi^2}$. On the other hand, the matrix $X$ is similar to
	\begin{align*}
		\begin{pmatrix}- i \lambda & 0 \\ 0 & i \lambda \end{pmatrix}
	\end{align*}
	over the complex field, and
	\begin{align*}
		\tr\left( f({X}/{2\pi i}) \right) = f({\lambda}/{2 \pi}) + f(-{\lambda}/{2 \pi}) = 2 f({\lambda}/{2 \pi}) = g({\lambda^2}/{4 \pi^2}) = g(y)
	\end{align*}
	holds as required.
\end{proof}

\paragraph{Pfaffian Classes.}
On oriented real vector bundles with even rank, there is a characteristic class that cannot be directly expressed in terms of Pontryagin classes. Let $X \in \mathfrak{so}(2n)$ be a skew-symmetric matrix and $(e_1, \dots, e_{2n})$ be the standard basis of $\RR^{2n}$. We put
\begin{align*}
	\alpha = \sum_{i < j} X_{ij} \, e_i \wedge e_j
\end{align*}
and define the so-called \defstyle{Pfaffian} $\Pf(X) \in \RR$ via
\begin{align*}
	\frac{1}{n!} \alpha^n = \Pf(X) \; e_1 \wedge \dots \wedge e_{2n}.
\end{align*}
From this definition, we infer some essential properties stated by the following lemma.
\begin{mylem}\label{lem:pfaffian}
	Suppose $X\in \mathfrak{so}(2n)$ is a real skew-symmetric matrix. Then the following three statements hold:
	\begin{myenum}
		\item $\Pf(\lambda X) = \lambda^n \Pf(X)$ for $\lambda \in \RR$,
		\item $\Pf(B X B^t) = \det(B) \Pf(X)$ for $B \in \mathfrak{gl}(n, \RR)$,
		\item $\Pf(X)^2 = \det(X)$.
	\end{myenum}
\end{mylem}
\begin{proof}
	Claim i) is obvious and follows evidently from the definition. Now, assume $B \in \mathfrak{gl}(n, \RR)$ and set $f_i = \sum_{k} B_{ki}\, e_k$. Then we get:
	\begin{align*}
		n!\, \Pf(B X B^t) \, e_1 \wedge \dots \wedge e_{2n} &= \left( \frac{1}{2} \sum_{i,j} (B X B^t)_{ij} \, e_i \wedge e_j \right)^n \\
			&= \left( \frac{1}{2} \sum_{i,j} \sum_{k,l} B_{ik} X_{kl} B_{jl} \, e_i \wedge e_j \right)^n \\
			&= \left( \frac{1}{2} \sum_{k,l} X_{kl} \, f_k \wedge f_l \right)^n \\
			&= n!\, \Pf(X)\, f_1 \wedge \dots \wedge f_{2n} \\
			&= n!\, \Pf(X) \det(B) \, e_1 \wedge \dots \wedge e_{2n}.
	\end{align*}
	This yields the desired result of assertion ii). To deal with the remaining case iii), we make use of the fact that $X$ is similar~to
	\begin{align*}
		\mathrm{diag}\left( \begin{smallpmatrix} 0 & \lambda_1 \\ -\lambda_1 & 0 \end{smallpmatrix}, \dots, \begin{smallpmatrix} 0 & \lambda_n \\ -\lambda_n & 0 \end{smallpmatrix} \right)
	\end{align*}
	using an orthogonal transformation $T \in \mathrm{SO}(2n)$ which is orientation preserving. On the one hand, by using ii), we see
	\begin{align*}
		\Pf(X) \, e_1 \wedge \dots \wedge e_{2n} &= \Pf(TXT^t) \, e_1 \wedge \dots \wedge e_{2n} \\
			&= \frac{1}{n!} \left( \lambda_1 \, e_1 \wedge e_2 + \dots + \lambda_n \, e_{2n-1} \wedge e_{2n} \right)^n \\
			&= \left( \lambda_1 \cdot \ldots \cdot \lambda_n \right) \, e_1 \wedge \dots \wedge e_{2n}.
	\end{align*}
	On the other hand, we have
	\begin{align*}
		\det(X) = \det(TXT^t) = \lambda_1^2 \cdot \ldots \cdot \lambda_n^2.
	\end{align*}
	This confirms the required identity.
\end{proof}
Statement ii) reveals that the Pfaffian is an invariant polynomial on $\mathfrak{so}(2n)$ and gives rise to a characteristic class. Consider an oriented real vector bundle $E$ of rank $2n$ over a manifold $M$ and let $g$ be an odd, real analytic function near zero. We fix a metric on $E$ and choose a compatible connection $\nabla$. Restricted to oriented orthonormal frames on suitable subsets $U \subset M$, the corresponding curvature form matrix $\Omega$ is skew-symmetric; and so is $g(\Omega)$. If we change to another frame using $h: U \to \mathrm{SO}(2n)$, the curvature transforms as $h \Omega h^t$. Hence, we can define the global object
\begin{align*}
(\Pf)_g(E, \nabla) := \Pf\left( g\left( \frac{\Omega}{2 \pi} \right) \right) \in \Omega^{2n*}(M; \RR)
\end{align*}
and accordingly the \defstyle{Pfaffian class associated to $\boldsymbol g$}:
\begin{align*}
(\Pf)_g(E) := \left[\Pf_g(E, \nabla)\right] \in H_{\mathrm{dR}}^{2n*}(M; \RR).
\end{align*}
The proof of well-definedness is the same as before except in the use of invariant polynomials on $\mathfrak{so}(2n)$. Due to assertion i) of Lemma~\ref{lem:pfaffian}, we indeed see that the Pfaffian class lives in $H^{2n*}(M; \RR)$. Finally, the last property iii) is quite interesting in terms of the splitting principle. As the proof indicates, the Pfaffian class is equal to
\begin{align*}
	\prod_{j=1}^{n} g(\sqrt{y_j})
\end{align*}
where the Pontryagin classes are the elementary symmetric functions in the indeterminates $y_j$. So in a sense, the Pfaffian class describes a class of \enquote{square-root type}.

The most important Pfaffian class is induced by the function $g(x)=x$ and is called \defstyle{Euler class}, which is denoted by $e(E)$. Its prominent status is explained by the following theorem.
\begin{mythm}[Gauß--Bonnet--Chern]\label{thm:gauss_bonnet_chern}
	Let $M$ be a closed, oriented, $2n$-dimensional Riemannian manifold. Then we have
	\begin{align*}
		\chi(M) = \int_{M} e(TM),
	\end{align*}
	where $\chi(M)$ denotes the Euler characteristic of $M$ and $e(TM)$ the Euler class of the tangent bundle $TM$.
\end{mythm}
The original proof by Chern can be found in~\cite{chern:gauss_bonnet}. The \Sage example in Section~\ref{sec:char:euler} provides an application of this theorem for the 2-sphere.

\paragraph{Index Theorems.}
It would be an injustice to omit mentioning the connection between characteristic classes and indices of certain elliptic operators on closed manifolds via the Atiyah--Singer index theorem~\cite{atiyah:asii}. In the previous paragraph, we already saw a special case of this index theorem: Gauß--Bonnet--Chern, cf.\ Theorem~\ref{thm:gauss_bonnet_chern}. Another important subcase is devoted to the Dirac operator:
\begin{mythm}[Atiyah--Singer]
	Suppose $M$ is a closed, even-dimensional Riemannian spin manifold and $E$ a complex vector bundle over $M$. Then the index of the classical twisted Dirac operator~$D$ satisfies:
	\begin{align}
		\ind(D) = \int_{M} \mathrm{ch}(E) \hat{A}(TM).\label{eq:dirac_index}
	\end{align}
\end{mythm}
Here, $\hat{A}(TM)$ denotes the $\hat{A}$-class on the tangent bundle $TM$, cf. Table~\ref{tab:prominent_char}. In case of compact manifolds with boundary, the expression in~\eqref{eq:dirac_index} takes a slightly different form. In fact, the integral depends on the choice of the characteristic form and the Dirac operator in general fails to be Fredholm for an arbitrary boundary condition~\cite{atiyah-patodi-singer:aps001}. In the Lorentzian setting, Christian Bär and Alexander Strohmaier provide an index theorem for the Dirac operator on manifolds with compact spacelike Cauchy boundary~\cite{baer:math_chiral}. The formula still looks similar to~\eqref{eq:dirac_index}, but additional quantities are involved due to the boundary. This particular theorem plays a significant role in physical applications like chiral anomalies~\cite{baer:chiral}. In Section~\ref{sec:char:ch_char} and~\ref{sec:char:berger}, we present two examples within \Sage which are related to this theorem.
\begin{table}[t]
	\centering
	\def\arraystretch{1.4}
	\small
	\begin{tabular}{lcccl}
		\toprule
		\textbf{Class Name} & \textbf{Shortcut} & \textbf{Field} & \textbf{Type} & \textbf{Function} \\
		\midrule
		Chern & $c(E)$ & complex & multiplicative & $f(z) = 1+z$ \\
		Chern character & $\mathrm{ch}(E)$ & complex & additive & $f(z) = \exp(z)$ \\
		Todd & $\mathrm{Td}(E)$ & complex & multiplicative & $f(z) = \frac{z}{1-\expe^{-z}}$ \\
		Pontryagin & $p(E)$ & real & multiplicative & $g(z) = 1+z$ \\
		A-Hat & $\hat{A}(E)$ & real & multiplicative & $g(z) = \frac{\sqrt{z}/2}{\sinh(\sqrt{z}/2)}$ \\
		Hirzebruch & ${L}(E)$ & real & multiplicative & $g(z) = \frac{\sqrt{z}}{\tanh(\sqrt{z})}$ \\
		Euler & $e(E)$ & real & Pfaffian & $g(x) = x$ \\
		\bottomrule
	\end{tabular}
	\caption{Prominent characteristic classes on a vector bundle $E$.}\label{tab:prominent_char}
\end{table}

A whole bunch of other index formulas arises when using different kinds of characteristic classes. Although we omit details here, a list of the most prominent classes related to index theory can be found in Table~\ref{tab:prominent_char}.

\subsection{SageMath Implementation}
The idea of our implementation follows the subsequent maxim: a characteristic class in \Sage represents a \enquote{factory}, manufacturing its corresponding characteristic forms out of bundle connections.

Suppose $E$ is a vector bundle of rank $n$ over a manifold $M$, and consider a characteristic class $\kappa(E)$ of $E$, being one of the aforementioned types. Hence, we fix a suitable holomorphic function $g$ near zero, and let $P$ be the invariant polynomial on which the class is based. This is either the trace for \emph{additive classes}, the determinant for \emph{multiplicative classes} or the Pfaffian for \emph{Pfaffian classes}. Within \Sage, $\kappa(E)$ is represented by an instance of \texttt{CharacteristicClass}. This \Python class inherits from \texttt{UniqueRepresentation} and \texttt{SageObject}. It is uniquely determined by the vector bundle $E \to M$, the given class type resolving $P$ and a symbolic expression $g(x)$ reflecting the holomorphic function, but also by its name. The initialization is illustrated through the vertical axis in Figure~\ref{fig:char:general_workflow}. Thereby, we integrate a bunch of commonly used characteristic classes in \Sage, still following this construction procedure in the background. Table~\ref{tab:prominent_char} contains a list of all accessible characteristic classes implemented at this stage.

\begin{figure}[t]
	\centering
	\tikzstyle{arrow} = [thick,->,>=stealth]
	\tikzstyle{factory} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=strcolor!50, thin]
	\tikzstyle{obj} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=gray!30, thin]

	\begin{tikzpicture}[node distance=\textwidth / 3, >=latex', thick]
	\node (char-class) [factory, align=center] {{\scriptsize Characteristic class:} \\ $\kappa(E)$};
	\node (bundle) [obj, above of=char-class, align=center,yshift=-2.25cm] {{\scriptsize Vector Bundle:} \\ $E \to M$};
	\node (con) [obj, left of=char-class, align=center] {{\scriptsize Bundle connection:} \\ $\nabla$};
	\node (char-form) [obj, right of=char-class, align=center] {{\scriptsize Characteristic form:} \\ $\kappa(E,\nabla)$};
	\node (sym-expr) [obj, below of=char-class, align=center,yshift=.9cm] {{\scriptsize Symbolic expression:} \\ $g(x)$};
	\node (sign) [obj, below of=char-class, align=center,yshift=2.25cm] {{\scriptsize Class type:} \\ {\tiny \texttt{'multiplicative'} , \dots}};
	\node (dict) [obj, dashed, below of=con, align=center,opacity=.7,yshift=2.5cm] {{\scriptsize Dict. of curv. matr.:} \\ \scriptsize$\left\{ e_1 : \Omega_1 , \ldots , e_m : \Omega_m \right\}$};

	\draw [arrow,kwcolor] (bundle) -- (char-class) node[midway,right,kwcolor] {\small \itshape init};
	\draw [arrow,dashed,opacity=.7] (con) -- (dict);
	\draw [arrow,ccolor,dashed,opacity=.7] (dict) -- (char-class.west) node[midway,below,sloped,ccolor,opacity=.7] {\small \itshape in};
	\draw [arrow,ccolor] (char-class) -- (char-form) node[midway,above,sloped,ccolor] {\small \itshape out};
	\draw [arrow,kwcolor] (bundle.west) -- (con.north) node[midway,above,sloped,kwcolor] {\small \itshape init};
	\draw [arrow,ccolor] (con) -- (char-class) node[midway,above,ccolor,sloped] {\small \itshape in};
	\draw [arrow,kwcolor] (sign) -- (char-class) node[midway,right,kwcolor] {\small \itshape init};
	\draw [kwcolor] (sym-expr) -- (sign);
	\end{tikzpicture}

	\caption{In the vertical axis we see the initialization dependencies, while the horizontal axis illustrates the \enquote{factory} behavior of a characteristic class in \Sage.}\label{fig:char:general_workflow}
\end{figure}

We use the implemented method \texttt{get\_form} to initiate the building process by taking a bundle connection $\nabla$ on $E$. Usually, our \Sage implementation tries to compute its curvature forms automatically and puts them into a \Python\ dictionary to eventually assemble the characteristic form. The dictionary is of the form ${\{ e_1 : \Omega_1, \ldots, e_m : \Omega_m \}}$ and consists of curvature form matrices with their associated local frames as keys.\footnote{The choice using local frames as keys is principally motivated from mathematics. This has the advantage that it might be useful for internal checks or further computations in the future.} This automatic computation, however, is unwanted at some point. For instance, assume the curvature is barely computable but already known. Or suppose the class is of Pfaffian type where the curvature form matrices must be considered skew-symmetric at this stage. For that purpose, our implementation allows an optional input of such dictionaries by hand. Though, in order to allocate the characteristic form appropriately, stating a connection is still compulsory. The general workflow is illustrated on the horizontal axis of Figure~\ref{fig:char:general_workflow}. Notice that the result is stored because long computation times are usually expected.

\paragraph{Detailed Workflow.}
We want to take a further look at the workflow and unravel it in detail. Figure~\ref{fig:char:specific_workflow} provides a sketch of how characteristic forms are constructed in our \Sage implementation. As we can see, the diagram splits in two main parts.

\begin{figure}[t]
	\centering
	\tikzstyle{arrow} = [thick,->,>=stealth]
	\tikzstyle{factory} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=strcolor!50, thin]
	\tikzstyle{obj} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=gray!30, thin]

	\pgfdeclarelayer{background}
	\pgfdeclarelayer{foreground}
	\pgfsetlayers{background,main,foreground}

	\begin{tikzpicture}[node distance=\textwidth / 8, >=latex', thick]
	\node (sym-expr) [obj, align=center] {{\scriptsize Symbolic expression:} \\ $\displaystyle g(x)$};
	\node (sym-expr-mod) [obj, below of=sym-expr, align=center] {{\scriptsize Symbolic expression:} \\ $\displaystyle f(x)$};
	\node (taylor) [obj, below of=sym-expr-mod, align=center] {{\scriptsize List of coeff.:} \\ $\left[c_0, \ldots, c_k \right]$};
	\node (insert) [obj, below of=taylor, align=center,yshift=-.9cm] {{\scriptsize $\Omega^{2*}\!(U_\ell)$-valued matrix:} \\ $\scriptstyle f\left(\frac{\Omega_\ell}{2 \pi \varepsilon}\right) = c_0 1 + \ldots + c_{k} \left(\frac{\Omega_\ell}{2 \pi \varepsilon} \right)^{\!k}$};
	\node (inv-poly) [obj, below of=insert, align=center,yshift=-.25cm] {{\scriptsize Mixed form in $\Omega^{2*}\!(U_\ell)$:} \\ $\scriptstyle P\left(f\left(\frac{\Omega_\ell}{2 \pi \varepsilon}\right)\right)$};

	\begin{scope}[on background layer]
	\tikzset{loop/.style={draw,dashed,gray,rounded corners,fill=kwcolor!30,inner sep=10pt}}
	\tikzset{init/.style={draw,dashed,gray,rounded corners,fill=strcolor!30,inner sep=10pt}}
	\node[loop,fit=(insert) (inv-poly)] (l-box) {};
	\node[init,fit=(sym-expr) (taylor)] (i-box) {};
	\end{scope}

	\node (dict) [obj, right of=l-box, align=center,xshift=4cm] {{\scriptsize Dict. of curv. matr.:} \\ $\scriptstyle\left\{ e_1 \, : \, \Omega_1 , \, \ldots \, , \, e_m \, : \, \Omega_m \right\}$};

	\node (result) [obj, below of=inv-poly, align=center,yshift=-.5cm] {{\scriptsize Mixed form in $\Omega^{2*}\!(M)$:} \\ $\kappa(E, \nabla)$};

	\node [left of=i-box,darkgray,xshift=-1cm] {(1)};
	\node [left of=l-box,darkgray,xshift=-1.5cm] {(2)};

	\draw [arrow] (sym-expr) -- (sym-expr-mod) node[midway,right,darkgray] {\small \itshape transform};
	\draw [arrow] (sym-expr-mod) -- (taylor) node[midway,right,darkgray] {\small \itshape Taylor};
	\draw [arrow] (taylor) -- (insert) node[midway,right,darkgray] {\small \itshape functional calculus};
	\draw [arrow] (dict) -- (l-box) node[midway,above,darkgray] {\small\itshape for-loop} node[midway,below,darkgray] {$\scriptstyle \ell=1,\ldots, m$};
	\draw [arrow] (insert) -- (inv-poly) node[midway,right,darkgray] {\small \itshape apply $P$};
	\draw [arrow] (inv-poly) -- (result) node[midway,right,yshift=-5pt,darkgray] {\small \itshape set restriction};
	\end{tikzpicture}

	\caption{An illustration of the construction algorithm of a characteristic form in \Sage, starting from a symbolic expression and a dictionary of curvature matrices.}\label{fig:char:specific_workflow}
\end{figure}

Figure~\ref{fig:char:specific_workflow}\,(1) still belongs to the initialization process of the characteristic class. Here, the given symbolic expression $g(x)$ undergoes a transformation into a new symbolic expression $f(x)$.\footnote{In fact, a new symbolic variable on the complex domain is established at this point. This precaution is due to the fact that symbolic variables are globally defined throughout an entire \Sage session.} The transformation depends on the underlying field and class type. We simply have $f(x)=g(x)$ if $E$ is complex. However, the real case is more complicated as discussed above; a list is provided in Table~\ref{tab:trafo_expr}. Afterwards, the Taylor expansion is computed at $x=0$. Fortunately, \Sage already comes with suitable Taylor expansion algorithms. Since every $2$-form-valued matrix is nilpotent of degree $\left\lceil \frac{n}{2} \right\rceil$, it is reasonable to consider expansions only up to $k = \left\lfloor \frac{n}{2} \right\rfloor$. Finally, the coefficients are stored in a \Python\ list $[c_0, \ldots, c_k]$ ready for use.

\begin{table}[t]
	\centering
	\def\arraystretch{1.4}
	\begin{tabular}{ll}
		\toprule
		\textbf{Class Type} & \textbf{Transformation}\\
		\midrule
		multiplicative & $f(x) = \sqrt{g(x^2)}$ \\
		additive & $f(x) = \frac{1}{2} g(x^2)$ \\
		Pfaffian & $f(x) = \frac{g(x)-g(-x)}{2}$ \\
		\bottomrule
	\end{tabular}
	\caption{All transformations $g(x) \to f(x)$ depending on the class type for vector bundles over the real field.}\label{tab:trafo_expr}
\end{table}

Figure~\ref{fig:char:specific_workflow}\,(2) illustrates the input/output machinery of the characteristic class invoked by the method \texttt{get\_form}. Once the \Python\ dictionary ${\{e_1 : \Omega_1, \ldots, e_m : \Omega_m \}}$ is given, a for-loop is established iterating over each pair $(e_\ell, \Omega_\ell)$ for $\ell=1, \ldots, m$. If the curvature form matrix $\Omega_\ell$ has not been converted into a proper algebraic \texttt{Sage} element yet, i.\,e.\ a generic matrix over the algebra $\Omega^*(U_\ell)$, then it is done here. We denote by $U_\ell$ the domain of the local frame~$e_\ell$. By using the coefficients $[c_0, \ldots, c_k]$ established during the initialization process, the functional calculus is applied: $$f\!\left(\frac{\Omega_\ell}{2 \pi \varepsilon}\right) = c_0 1 + c_1 \frac{\Omega_\ell}{2 \pi \varepsilon} + \ldots + c_k \left(\frac{\Omega_\ell}{2 \pi \varepsilon}\right)^{\!k}.$$ The placeholder $\varepsilon$ depends on the given class type. If $\kappa(E)$ is of Pfaffian type, we obtain $\varepsilon=1$. In any other case we get $\varepsilon=i$. Next the invariant polynomial $P$ is evaluated at the result. \Sage luckily supports determinants, traces and Pfaffians of matrices over arbitrary (commutative) rings. Hence, we end up with a closed form $P\left(f\!\left(\frac{\Omega_\ell}{2 \pi \varepsilon}\right)\right)$ living in $\Omega^{2*}(U_\ell) \subset \Omega^{*}(U_\ell)$. Finally representing the characteristic form, these iterated results are glued together in the mixed differential form $\kappa(E, \nabla) \in \Omega^{2*}(M) \subset \Omega^{*}(M)$ by using the method \texttt{set\_restriction} (cf. Section~\ref{sec:mixed:impl}).

\subsection{Example: Chern Character over Minkowski Space}\label{sec:char:ch_char}
We want to illustrate the usage of characteristic classes within \Sage by computing the Chern character form $\mathrm{ch}(E, \nabla^E)$ on a complex trivial line bundle $E$ over the 2-dimensional Minkowski space $M$ equipped with a bundle connection $\nabla^E$. We start with the general setup:
\begin{NBin}
M = Manifold(2, 'M', structure='Lorentzian')
X.<t,x> = M.chart()
E = M.vector_bundle(1, 'E', field='complex'); print(E)
\end{NBin}
\begin{NBout}
Differentiable complex vector bundle E -> M of rank 1 over the base space 2-dimensional Lorentzian manifold M
\end{NBout}
To trivialize the vector bundle $E$, we fix a global frame $e$:
\begin{NBin}
e = E.local_frame('e') # trivialize
\end{NBin}
Let us declare an $\mathrm{U}(1)$-connection $\nabla^E$ on $E$ given by an electromagnetic potential $A(t)$:
\begin{NBin}
nab = E.bundle_connection('nabla^E', latex_name=r'\nabla^E')
A = function('A')
\end{NBin}
The corresponding connection form $\omega$ turns out as:
\begin{NBin}
omega = M.one_form(name='omega', latex_name=r'\omega')
omega[1] = I*A(t)
omega.display()
\end{NBin}
\begin{NBoutM}
$\omega = i \, A\left(t\right) \mathrm{d} x$
\end{NBoutM}
Let us put this into the connection:
\begin{NBin}
nab.set_connection_form(0, 0, omega)
\end{NBin}
Notice that the Chern character $\mathrm{ch}(E)$ is already predefined in the system. We can get it by the following command:
\begin{NBin}
ch = E.characteristic_class('ChernChar'); print(ch)
\end{NBin}
\begin{NBout}
Characteristic class ch of additive type associated to e^x on the Differentiable complex vector bundle E -> M of rank 1 over the base space 2-dimensional Lorentzian manifold M
\end{NBout}
The computation of the corresponding Chern character form $\mathrm{ch}(E,\nabla^E)$ can be invoked by the method \texttt{get\_form}:
\begin{NBin}
ch_form = ch.get_form(nab)
ch_form.display_expansion()
\end{NBin}
\begin{NBoutM}
$\mathrm{ch}(E, \nabla^E) = \left[ 1 \right]_0 + \left[ 0 \right]_1 + \left[ \frac{\frac{\partial\,A}{\partial t}}{2 \, \pi} \mathrm{d} t\wedge \mathrm{d} x \right]_2$
\end{NBoutM}
We can see that the resulting 2-form coincides with the Faraday tensor divided by~$2 \pi$ as expected.

\subsection{Example: Chern Class of the Tautological Line Bundle}\label{sec:char:taut}
This essential example is primarily adopted from \cite[Beispiel~1.17]{baer:charakteristisch} and resembles the example we discuss in Section~\ref{sec:vec:moebius}. Before we start with the code, we define the \defstyle{tautological line bundle} over the complex projective space $\CP^n$:
\begin{align*}
	\gamma_n := \left\{ (v, \ell) \in \CC^{n+1} \times \CP^n ~|~ v \in \ell \cup \{0\} \right\},
\end{align*}
together with the footpoint map $\pi:\gamma_n \to \CP^n$ given by $(v, \ell) \mapsto \ell$. For now, we restrict to the case $n=1$. We choose homogeneous coordinates $$\CP^1=\left\{ [z_0:z_1] ~|~ (z_0,z_1) \in \CC^2 \setminus \{(0,0)\} \right\}$$ and define $U:= \CP^1 \setminus \left\{ [1:0] \right\}$ so that $\CC \to U$ given by $z \mapsto [z:1]$ defines a diffeomorphism. We start our computation by initializing the complex projective space as 2-dimensional real manifold with coordinates on $U$:
\begin{NBin}
M = Manifold(2, 'CP^1', start_index=1)
U = M.open_subset('U')
c_cart.<x,y> = U.chart() # [1:x+I*y]
\end{NBin}
For the sake of convenience, we additionally declare the complex coordinates $z$ and $\bar{z}$ on $U$:
\begin{NBin}
c_comp.<z, zbar> = U.chart(r'z:z zbar:\bar{z}')
cart_to_comp = c_cart.transition_map(c_comp, (x+I*y, x-I*y))
cart_to_comp.display()
\end{NBin}
\begin{NBoutM}
$\left\{\begin{array}{lcl} {z} & = & x + i \, y \\ {\bar{z}} & = & x - i \, y \end{array}\right.$
\end{NBoutM}
\begin{NBin}
comp_to_cart = cart_to_comp.inverse()
comp_to_cart.display()
\end{NBin}
\begin{NBoutM}
$\left\{\begin{array}{lcl} x & = & \frac{1}{2} \, {z} + \frac{1}{2} \, {\bar{z}} \\ y & = & -\frac{1}{2} i \, {z} + \frac{1}{2} i \, {\bar{z}} \end{array}\right.$
\end{NBoutM}
Now, we are ready to construct the tautological line bundle $\gamma_1$:
\begin{NBin}
E = M.vector_bundle(1, 'gamma_1',
					latex_name=r'\gamma_1',
		    		field='complex')
\end{NBin}
Furthermore, we declare a local frame $e$ on $U$ naturally given by ${[z:1] \mapsto \begin{smallpmatrix} z \\ 1 \end{smallpmatrix}}$:
\begin{NBin}
e = E.local_frame('e', domain=U)
\end{NBin}
To compute the Chern class, we still need a connection. The tautological line bundle inherits a Hermitian metric from the overlying trivial bundle $\CC^2 \times \CP^1$. Supposing $\pi_\ell: \CC^2 \to \ell \cup \{0\}$ denotes the orthogonal projection onto the complex line $\ell \in \CP^1$, the induced connection is given by
\begin{align*}
	\nabla_X \sigma = \left( \pi_\ell(\partial_X \nu ), \ell \right)
\end{align*}
for each $X \in T \CP^1$ and each section $\sigma: U \to \gamma_1$ written as $\ell \mapsto (\nu(\ell), \ell)$. Inserting our local frame $e$, we observe:
\begin{align*}
	\nabla_{\frac{\partial}{\partial \bar{z}}}\, e = 0, \qquad
	\nabla_{\frac{\partial}{\partial z}} e = \frac{\bar{z}}{1+ \abs{z}^2} \, e.
\end{align*}
Hence, we have obtained a suitable connection:
\begin{NBin}
nab = E.bundle_connection('nabla', latex_name=r'\nabla')
omega = U.one_form(name='omega')
omega[c_comp.frame(), 1, c_comp] = zbar/(1+z*zbar)
nab.set_connection_form(1, 1, omega, frame=e)
\end{NBin}
It is time to initialize $c(\gamma_1)$. Fortunately, \Sage already knows the notion Chern classes:
\begin{NBin}
c = E.characteristic_class('Chern'); print(c)
\end{NBin}
\begin{NBout}
Characteristic class c of multiplicative type associated to x + 1 on the Differentiable complex vector bundle gamma_1 -> CP^1 of rank 1 over the base space 2-dimensional differentiable manifold CP^1
\end{NBout}
Let us execute the algorithm:
\begin{NBin}
c_form = c.get_form(nab)
c_form.display_expansion(c_comp.frame(), chart=c_comp)
\end{NBin}
\begin{NBoutM}
$c(\gamma_1, \nabla) = \left[ 1 \right]_0 + \left[ 0 \right]_1 + \left[ \frac{i}{2 \, {\left(\pi + \pi {z}^{2} {\bar{z}}^{2} + 2 \, \pi {z} {\bar{z}}\right)}} \mathrm{d} {z}\wedge \mathrm{d} {\bar{z}} \right]_2$
\end{NBoutM}
Since this particular representation is defined outside a set of measure zero, we can compute its integral over $\CP^1$ in real coordinates:
\begin{NBin}
integrate(integrate(c_form[2][[1,2]].expr(c_cart), x, -infinity, infinity).full_simplify(), y, -infinity, infinity)
\end{NBin}
\begin{NBoutM}
$1$
\end{NBoutM}
The result shows that $c_1(\gamma_1)$ generates the second integer cohomology $H^2(\CP^1, \ZZ)$. Assume $\iota: \CP^1 \hookrightarrow \CP^n$ is the canonical embedding of projective lines into $\CC^{n+1}$. Then we observe $\iota^* \gamma_n = \gamma_1$, and due to the naturality condition $\iota^* c_1(\gamma_n) = c_1(\gamma_1) \neq 0$. In fact, by applying the Gysin sequence, one can conclude that $c_1(\gamma_n)$ even generates the cohomology ring $H^*(\CP^n, \ZZ)$ for each $n\in\NN$, see~\cite[Thm.~14.4]{milnor:char_classes}.

The preceding example plays an important role in the context of characteristic classes. Namely, if $E$ is a complex line bundle over some manifold $M$, there exists a continuous map $f : M \to \CP^n$ such that $E \cong f^* \gamma_n$, supposing $n$ is sufficiently large.\footnote{This particular statement is a corollary of \cite[Thm.~7.1, p.~77]{walschap:metric_structures} where the proof can be easily adapted to the complex field. Notice that there is a more general result~\cite[Thm.~5.6]{milnor:char_classes} regarding vector bundles over arbitrary paracompact spaces.} Once such a map is known, all characteristic classes of $E$ are completely determined by~$\gamma_n$.

\subsection{Example: Euler Class of $\mathbb{S}^2$}\label{sec:char:euler}
In this example, we want to compute the Euler class of the 2-sphere $\mathbb{S}^2 \subset \RR^3$. As usual, we cover $\Sphere^2$ by two parallelizable open subsets $U:=\Sphere^2 \setminus \{(0,0,1)\}$ and $V:=\Sphere^2 \setminus \{(0,0,-1)\}$ for which the point $(0,0,1)$ is identified with the north pole. We define stereographic coordinates in \Sage:
\begin{NBin}
M = Manifold(2, name='S^2', latex_name=r'\mathbb{S}^2',
			 structure='Riemannian', start_index=1)
U = M.open_subset('U') ; V = M.open_subset('V')
M.declare_union(U,V)   # M is the union of U and V
stereoN.<x,y> = U.chart()
stereoS.<xp,yp> = V.chart("xp:x' yp:y'")
N_to_S = stereoN.transition_map(stereoS,
								(x/(x^2+y^2), y/(x^2+y^2)),
								intersection_name='W',
								restrictions1= x^2+y^2!=0,
								restrictions2= xp^2+yp^2!=0)
S_to_N = N_to_S.inverse()
\end{NBin}
Next we define the tangent bundle and its local frames induced by the charts:
\begin{NBin}
eU = stereoN.frame(); eV = stereoS.frame()
TM = M.tangent_bundle()
\end{NBin}
The Euler class is also one of the predefined classes. Thus, we can easily get it from the tangent bundle's instance:
\begin{NBin}
e_class = TM.characteristic_class('Euler'); print(e_class)
\end{NBin}
\begin{NBout}
Characteristic class e of Pfaffian type associated to x on the Tangent bundle TS^2 over the 2-dimensional Riemannian manifold S^2
\end{NBout}
To compute a form representing the Euler class, we need to state a suitable connection first. Here, we want to use the Levi--Civita connection induced by the standard metric. This is simply given by the pullback of the Euclidean scalar product of the ambient space $\RR^3$ along the canonical embedding $\iota: \Sphere^2 \hookrightarrow \RR^3$. Let us define the ambient space $\RR^3$ and its Euclidean scalar product $h$:
\begin{NBin}
E = Manifold(3, 'R^3', latex_name=r'\mathbb{R}^3', start_index=1)
cart.<X,Y,Z> = E.chart()
h = E.metric('h')
h[1,1], h[2,2], h[3, 3] = 1, 1, 1
h.display()
\end{NBin}
\begin{NBoutM}
$h = \mathrm{d} X\otimes \mathrm{d} X+\mathrm{d} Y\otimes \mathrm{d} Y+\mathrm{d} Z\otimes \mathrm{d} Z$
\end{NBoutM}
On that account, we declare the embedding $\iota: \Sphere^2 \hookrightarrow \RR^3$ in stereographic coordinates when one considers its projection from the north pole $(0, 0, 1)$ to the equatorial plane~${Z=0}$:
\begin{NBin}
iota = M.diff_map(E, {(stereoN, cart):
					  [2*x/(1+x^2+y^2), 2*y/(1+x^2+y^2),
					  (1-x^2-y^2)/(1+x^2+y^2)],
					  (stereoS, cart):
					  [2*xp/(1+xp^2+yp^2), 2*yp/(1+xp^2+yp^2),
					  (xp^2+yp^2-1)/(1+xp^2+yp^2)]},
				  name='iota', latex_name=r'\iota')
iota.display()
\end{NBin}
\begin{NBoutM}
$\begin{array}{llcl} \iota:& \mathbb{S}^2 & \longrightarrow & \mathbb{R}^3 \\ \mbox{on}\ U : & \left(x, y\right) & \longmapsto & \left(X, Y, Z\right) = \left(\frac{2 \, x}{x^{2} + y^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + 1}, \frac{x^{2} + y^{2} - 1}{x^{2} + y^{2} + 1}\right) \\ \mbox{on}\ V : & \left({x'}, {y'}\right) & \longmapsto & \left(X, Y, Z\right) = \left(\frac{2 \, {x'}}{{x'}^{2} + {y'}^{2} + 1}, \frac{2 \, {y'}}{{x'}^{2} + {y'}^{2} + 1}, -\frac{{x'}^{2} + {y'}^{2} - 1}{{x'}^{2} + {y'}^{2} + 1}\right) \end{array}$
\end{NBoutM}
We can define the standard metric $g$ on $\Sphere^2$ by setting it as the pullback metric~$\iota^*h$:
\begin{NBin}
g = M.metric()
g.set(iota.pullback(h))
g[1,1].factor(); g[2,2].factor() # simplifications
g.display()
\end{NBin}
\begin{NBoutM}
$g = \frac{4}{{\left(x^{2} + y^{2} + 1\right)}^{2}} \mathrm{d} x\otimes \mathrm{d} x + \frac{4}{{\left(x^{2} + y^{2} + 1\right)}^{2}} \mathrm{d} y\otimes \mathrm{d} y$
\end{NBoutM}
The corresponding Levi--Civita connection is computed automatically:
\begin{NBin}
nab = g.connection()
\end{NBin}
Since we have found the desired Levi--Civita connection, we want to compute the associated curvature forms and store them in a \Python\ list:
\begin{NBin}
cmatrix_U = [[nab.curvature_form(i,j,eU) for j in TM.irange()]
              for i in TM.irange()]
cmatrix_V = [[nab.curvature_form(i,j,eV) for j in TM.irange()]
              for i in TM.irange()]
\end{NBin}
Fortunately, the curvature form matrices are already skew-symmetric:
\begin{NBin}
for i in range(TM.rank()):
    for j in range(TM.rank()):
        show(cmatrix_U[i][j].display())
\end{NBin}
\begin{NBoutM}
$\Omega^1_{\ \, 1} = 0 \\
\Omega^1_{\ \, 2} = \left( \frac{4}{x^{4} + y^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, x^{2} + 1} \right) \mathrm{d} x\wedge \mathrm{d} y \\
\Omega^2_{\ \, 1} = \left( -\frac{4}{x^{4} + y^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, x^{2} + 1} \right) \mathrm{d} x\wedge \mathrm{d} y \\
\Omega^2_{\ \, 2} = 0$
\end{NBoutM}
\begin{NBin}
for i in range(TM.rank()):
	for j in range(TM.rank()):
		show(cmatrix_V[i][j].display())
\end{NBin}
\begin{NBoutM}
$\Omega^1_{\ \, 1} = 0 \\
\Omega^1_{\ \, 2} = \left( \frac{4}{{x'}^{4} + {y'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {x'}^{2} + 1} \right) \mathrm{d} {x'}\wedge \mathrm{d} {y'} \\
\Omega^2_{\ \, 1} = \left( -\frac{4}{{x'}^{4} + {y'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {x'}^{2} + 1} \right) \mathrm{d} {x'}\wedge \mathrm{d} {y'} \\
\Omega^2_{\ \, 2} = 0$
\end{NBoutM}
Hence, we can put them into a dictionary and apply the algorithm:
\begin{NBin}
cmatrices = {eU: cmatrix_U, eV: cmatrix_V}
e_class_form = e_class.get_form(nab, cmatrices)
e_class_form.display_expansion()
\end{NBin}
\begin{NBoutM}
$e(T\mathbb{S}^2, \nabla_g) = \left[ 0 \right]_0 + \left[ 0 \right]_1 + \left[ \left( \frac{2}{\pi + \pi x^{4} + \pi y^{4} + 2 \, \pi x^{2} + 2 \, {\left(\pi + \pi x^{2}\right)} y^{2}} \right) \mathrm{d} x\wedge \mathrm{d} y \right]_2$
\end{NBoutM}
We want to compute the Euler characteristic of $\Sphere^2$ now. Due to Theorem~\ref{thm:gauss_bonnet_chern}, this can be achieved by integrating the top form over $\Sphere^2$. Since $U$ and $\Sphere^2$ differ only by a point, and therefore a set of measure zero, it is sufficient to integrate over the subset $U$:
\begin{NBin}
integrate(integrate(e_class_form[2][[1,2]].expr(), x, -infinity, infinity).simplify_full(), y, -infinity, infinity)
\end{NBin}
\begin{NBoutM}
$2$
\end{NBoutM}
Thus, we have obtained the Euler characteristic of $\mathbb{S}^2$.

\subsection{Example: $\hat{A}$-Class of Lorentzian Foliation of Berger Spheres}\label{sec:char:berger}
We consider the space of unit quaternions $\Sphere^3 \subset \RR^4 \cong \HH$, where $\HH$ is endowed with the canonical basis $(\mathbf{1}, \mathbf{i}, \mathbf{j}, \mathbf{k})$. Note that the product $qp$ is tangent to $\Sphere^3$ for each $q \in \Sphere^3$ whenever $p$ is imaginary. This gives rise to the following vector fields on~$\Sphere^3$:
\begin{align*}
	\restrict{\varepsilon_1}{q} = q \,\mathbf{i}, \quad \restrict{\varepsilon_2}{q} = q \,\mathbf{j}, \quad \restrict{\varepsilon_3}{q} = q \,\mathbf{k}.
\end{align*}
It can be shown that $(\varepsilon_1, \varepsilon_2, \varepsilon_3)$ is a global vector frame and hence $\Sphere^3$ is a parallelizable manifold.

We introduce the following smooth family of the so-called \defstyle{Berger metrics}:
\begin{align*}
	g_t = a(t)^{2} \; \varepsilon^{1}\otimes \varepsilon^{1} +\varepsilon^{2}\otimes \varepsilon^{2} +\varepsilon^{3}\otimes \varepsilon^{3}.
\end{align*}
Here, $a(t)$ is a smooth positive function in $t \in \RR$ and $\varepsilon^i$ denotes the vector field dual to $\varepsilon_i$. This family can be used to define a globally hyperbolic manifold $M=\RR \times \Sphere^3$ equipped with the Lorentzian metric $g = - {\diffd t}^2 + g_t$. Hence, $M$ is foliated by Berger spheres.

In the following, we compute the $\hat{A}$-form of the corresponding Levi--Civita connection $\nabla_g$. Even though the $\hat{A}$-class vanishes, its characteristic form still plays an significant role in the index theory of the classical Dirac operator when one considers spacelike Cauchy boundary~\cite{baer:math_chiral}. We start the computation by declaring the Lorentzian manifold first:
\begin{NBin}
M = Manifold(4, 'M', structure='Lorentzian'); print(M)
\end{NBin}
\begin{NBout}
4-dimensional Lorentzian manifold M
\end{NBout}
We cover $M$ by two open subsets defined as $U := \RR \times \left( \Sphere^3 \setminus \{ -\mathbf{1} \} \right)$ and $V := \RR \times \left( \Sphere^3 \setminus \{ \mathbf{1} \} \right)$:
\begin{NBin}
U = M.open_subset('U'); V = M.open_subset('V')
M.declare_union(U,V)
\end{NBin}
We need to impose coordinates on $M$ and use stereographic projections with respect to the foliated 3-sphere:
\begin{NBin}
stereoN.<t,x,y,z> = U.chart()
stereoS.<tp,xp,yp,zp> = V.chart("tp:t' xp:x' yp:y' zp:z'")
N_to_S = stereoN.transition_map(stereoS,
								(t, x/(x^2+y^2+z^2),
									y/(x^2+y^2+z^2),
									z/(x^2+y^2+z^2)),
								intersection_name='W',
								restrictions1= x^2+y^2+z^2!=0,
								restrictions2= xp^2+yp^2+zp^2!=0)
W = U.intersection(V)
S_to_N = N_to_S.inverse()
N_to_S.display()
\end{NBin}
\begin{NBoutM}
$\left\{\begin{array}{lcl} {t'} & = & t \\ {x'} & = & \frac{x}{x^{2} + y^{2} + z^{2}} \\ {y'} & = & \frac{y}{x^{2} + y^{2} + z^{2}} \\ {z'} & = & \frac{z}{x^{2} + y^{2} + z^{2}} \end{array}\right.$
\end{NBoutM}
From above, we know that $M$ admits a global frame $(\varepsilon_0, \varepsilon_1, \varepsilon_2, \varepsilon_3)$:
\begin{NBin}
E = M.vector_frame('E', latex_symbol=r'\varepsilon')
E_U = E.restrict(U); E_U
\end{NBin}
\begin{NBoutM}
$\left(U, \left(\varepsilon_{0},\varepsilon_{1},\varepsilon_{2},\varepsilon_{3}\right)\right)$
\end{NBoutM}
The vector field $\varepsilon_0$ is simply given by $\frac{\partial}{\partial t}$. To obtain the global vector frame $(\varepsilon_1, \varepsilon_2, \varepsilon_3)$ on $\Sphere^3$ in stereographic coordinates, a computation within \Sage is performed in the \texttt{Jupyter} notebook \enquote{Sphere S3: vector fields and left-invariant parallelization} downloadable from~\cite{gour:examples}. This is done by embedding $\Sphere^3$ into $\RR^4 \cong \HH$, endowing it with the quaternionic structure. This eventually leads to:
\begin{NBin}
E_U[0][:] = [1,0,0,0]
E_U[1][:] = [0, (x^2-y^2-z^2+1)/2, x*y+z, x*z-y]
E_U[2][:] = [0, x*y-z, (1-x^2+y^2-z^2)/2, x+y*z]
E_U[3][:] = [0, x*z+y, y*z-x, (1-x^2-y^2+z^2)/2]
\end{NBin}
\begin{NBin}
for i in M.irange():
	show(E_U[i].display())
\end{NBin}
\begin{NBoutM}
$\varepsilon_{0} = \frac{\partial}{\partial t } \\
\varepsilon_{1} = \left( \frac{1}{2} \, x^{2} - \frac{1}{2} \, y^{2} - \frac{1}{2} \, z^{2} + \frac{1}{2} \right) \frac{\partial}{\partial x } + \left( x y + z \right) \frac{\partial}{\partial y } + \left( x z - y \right) \frac{\partial}{\partial z } \\
\varepsilon_{2} = \left( x y - z \right) \frac{\partial}{\partial x } + \left( -\frac{1}{2} \, x^{2} + \frac{1}{2} \, y^{2} - \frac{1}{2} \, z^{2} + \frac{1}{2} \right) \frac{\partial}{\partial y } + \left( y z + x \right) \frac{\partial}{\partial z } \\
\varepsilon_{3} = \left( x z + y \right) \frac{\partial}{\partial x } + \left( y z - x \right) \frac{\partial}{\partial y } + \left( -\frac{1}{2} \, x^{2} - \frac{1}{2} \, y^{2} + \frac{1}{2} \, z^{2} + \frac{1}{2} \right) \frac{\partial}{\partial z }$
\end{NBoutM}
\noindent To ensure evaluations in this particular frame, we must communicate the change-of-frame formula to \Sage:
\begin{NBin}
P = U.automorphism_field()
for i in M.irange():
	for j in M.irange():
		P[j,i] = E_U[i][j]
\end{NBin}
\begin{NBin}
U.set_change_of_frame(stereoN.frame(), E_U, P)
\end{NBin}
The subset $U$ differs from $M$ only by a one dimensional slit and is therefore dense in $M$. As we know that $\left(\varepsilon_{0},\varepsilon_{1},\varepsilon_{2},\varepsilon_{3}\right)$ defines a \emph{global} frame, its components can be easily and uniquely extended to all of $M$. For this, we use the method \texttt{add\_comp\_by\_continuation}:
\begin{NBin}
for i in M.irange():
	E[i].add_comp_by_continuation(stereoS.frame(), W)
\end{NBin}
And again, we declare the change of frame:
\begin{NBin}
P = V.automorphism_field()
for i in M.irange():
	for j in M.irange():
		P[j,i] = E.restrict(V)[i][j]
\end{NBin}
\begin{NBin}
V.set_change_of_frame(stereoS.frame(), E.restrict(V), P)
\end{NBin}
In order to reduce the computation time, we examine the $\hat{A}$-class on the open subset $U \subset M$ first. The final result can be obtained by continuation. For this purpose, we define the tangent bundle over $U$:
\begin{NBin}
TU = U.tangent_bundle(); print(TU)
\end{NBin}
\begin{NBout}
Tangent bundle TU over the Open subset U of the 4-dimensional Lorentzian manifold M
\end{NBout}
Notice that the $\hat{A}$-class is already predefined:
\begin{NBin}
A = TU.characteristic_class('AHat'); A
\end{NBin}
\begin{NBoutM}
$\hat{A}(TU)$
\end{NBoutM}
As discussed before, its holomorphic function is given by:
\begin{NBin}
A.function()
\end{NBin}
\begin{NBoutM}
$\frac{\sqrt{x}}{2 \, \sinh\left(\frac{1}{2} \, \sqrt{x}\right)}$
\end{NBoutM}
We are ready to define the Berger metric, at least on the subset $U$:
\begin{NBin}
a = function('a')
\end{NBin}
\begin{NBin}
g = U.metric()
g.add_comp(E_U)[0, 0] = - 1
g.add_comp(E_U)[1, 1] = a(t)^2
g.add_comp(E_U)[2, 2] = 1
g.add_comp(E_U)[3, 3] = 1
g.display(E_U)
\end{NBin}
\begin{NBoutM}
$g = -\varepsilon^{0}\otimes \varepsilon^{0} + a\left(t\right)^{2} \varepsilon^{1}\otimes \varepsilon^{1} +\varepsilon^{2}\otimes \varepsilon^{2} +\varepsilon^{3}\otimes \varepsilon^{3}$
\end{NBoutM}
The corresponding connection is automatically computed by \Sage:
\begin{NBin}
nab = g.connection(); nab
\end{NBin}
\begin{NBoutM}
$\nabla_g$
\end{NBoutM}
Finally, we perform the computation of the $\hat{A}$-form with respect to this connection~$\nabla_g$:
\begin{NBin}
A_form = A.get_form(nab) # long time
A_form.display_expansion(E_U, stereoN)
\end{NBin}
\begin{NBoutM}
$\hat{A}(TU, \nabla_g) = \left[ 1 \right]_0 + \left[ 0 \right]_1 + \left[ 0 \right]_2 + \left[ 0 \right]_3 \\ \phantom{\hat{A}(TU, \nabla_g) = \left[ 1 \right]_0 } + \left[ \left( \frac{4 \, {\left(a\left(t\right)^{3} - a\left(t\right)\right)} \frac{\partial\,a}{\partial t} - \frac{\partial\,a}{\partial t} \frac{\partial^2\,a}{\partial t ^ 2}}{24 \, \pi^{2}} \right) \varepsilon^{0}\wedge \varepsilon^{1}\wedge \varepsilon^{2}\wedge \varepsilon^{3} \right]_4$
\end{NBoutM}
To attain $\hat{A}(TM, \nabla_g)$ in all given coordinates, we still have to extend the result onto~$M$. With respect to the global frame $(\varepsilon_0, \varepsilon_1,\varepsilon_2,\varepsilon_3)$, the form $\hat{A}(TU, \nabla_g)$ only depends on the global coordinate $t$. This makes the continuation trivial. Besides, one is interested, for the most part, in characteristic forms outside a set of measure zero. Hence, we terminate our calculation at this point.

config: arxiv


TITLE: For which $n \in \mathbb N$ does $A = \mathbb Z/ n \mathbb Z$ has $\operatorname{Nil}(A) \neq 0$?
QUESTION [4 upvotes]: I want to try to answer the following question:
For which $n \in \mathbb N$ does $A = \mathbb Z/ n \mathbb Z$ has $\operatorname{Nil}(A) \neq 0$?
Here are my thoughts:
I know that $\operatorname{Nil}(A)$ is defined as the set of all nilpotent elements in the ring $A.$ Also, I know that $\operatorname{Nil}(A)$ is the intersection of all prime ideals of $A.$
Also, I know that $x \in A$ is nilpotent if $x^n = 0$ for some positive integer $n.$ And I know that a nilpotent element is a zero-divisor but not the converse.
Still, I am not sure how these ideas help me in solving this question, could anyone help me please?

REPLY [1 votes]: Following Geoffrey's comment, we prove that for $n > 1$, Nil$(\mathbb{Z}/n\mathbb{Z}) \neq 0$ iff $n$ is not squarefree (i.e., $n$ has a square factor). Let $n = \prod_{j=1}^r p_j^{v_j}$ be the prime factorization of $n$.
($\impliedby$): Suppose $n$ is not squarefree. Then it has a square factor--by taking the prime factorization of that square, we find that $p_i^2 | n$ for at least one $p_i$ in the factorization of $n$. Hence $c = n / p_i^2 \in \mathbb{Z}$. If we let $m = p_ic = n/p_i \in \mathbb{Z}$, then we see $0 < m \leq n-1$ and
$$
m^2 = \left(\frac{n}{p_i}\right)^2 = \frac{n^2}{p_i^2} = cn,
$$
hence $n|m^2$, yielding that $m^2 \equiv 0$ (mod $n$) and therefore $m \in$ Nil$(\mathbb{Z}/n\mathbb{Z})$. Because $m \neq 0$ in $\mathbb{Z}/n\mathbb{Z}$, we conclude Nil$(\mathbb{Z}/n\mathbb{Z}) \neq 0$ as desired.
($\implies$): Contrapositively assume $n$ is squarefree. Then none of its prime factors can have $v_j \geq 2$, lest we have $p_j^2|n$. But this means $v_j = 1$ for each $j$, that is, $n = \prod_{j=1}^r p_j$. Let $m \in\mathbb{Z}/n\mathbb{Z}$ be given, and suppose $m^k \equiv 0$ (mod $n$) for some positive $k \in \mathbb{Z}$. Then $n|m^k$, so there exists a $c \in \mathbb{Z}$ with $m^k = cn = c\prod_{j=1}^r p_j$.
We see that each $p_j$ divides $m^k$, so $p_j|m$ by primality. Because the $p_j$ are distinct primes, we see $\prod_{j=1}^r p_j | m$ also, that is, $n | m$. But then we have $m \equiv 0$ (mod $n$). Therefore Nil$(\mathbb{Z}/n\mathbb{Z}) = 0$ and we are done.


TITLE: Let's consider non-decreasing sequence of integer not negative numbers and $d_1 \geq d_2 \geq \cdots \geq d_n \geq 0$
QUESTION [0 upvotes]: Prove that such sequence is a graph sequence  of some graph $G$ which does not contain loops iff $d_1 \leq d_2 + d_3 + \cdots + d_n$.
IMPORTANT: by condition $d_1 + d_2 + \cdots + d_n = 2k$ for some integer $k$
I was trying to solve this one by assuming that $d_1 > d_2 + d_3 + \cdots + d_n$. I was planning on coming to contradiction. But I haven't managed to.
All ideas for solution will be much appreciated!

REPLY [2 votes]: For the forward (only if) direction, , let $G$ be a graph that does not contain any loops and has degree sequence $d_1,d_2,\ldots,d_n$. Any edge incident on the vertex of degree $d_1$ must also be incident on one of the vertices of degree $d_2,\ldots,d_n$. That is, the number of edges incident on this vertex is upper-bounded by the sum of the remaining degrees, which is exactly what we want.
For the backward (if) direction, consider the sequence $d_1-d_n,d_2,\ldots,d_{n-1}$. If $d_1-d_n$ is the largest element in this sequence, then we clearly have $$d_1-d_n\leq d_2+\cdots+d_{n-1}.$$
On the other hand, if $d_2$ is the largest element, then because $d_1\geq d_2$ and $d_{n-1}\geq d_n$, we have $$(d_1-d_n)+d_3+\cdots+d_{n-1}\geq d_2 + (d_{n-1}-d_n)\geq d_2.$$
Try using induction to complete the argument from here: construct a graph with this degree sequence, add a new vertex $v_n$, and add $d_n$ edges from the vertex with degree $d_1-d_n$ to $v_n$.