\subsection{Nullable class field values}
\label{subsec:library_of_transformations:instance_level_transformations:nullable_class_field_values}

\begin{figure}
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics{images/05_library_of_transformations/03_instance_level_transformations/08_nullable_class_field_values/nullable_class_field_value.pdf}
        \caption{$Im_{NullableClassField}$ with examples of different nodes with different values for $\type{field}$}
        \label{fig:library_of_transformations:instance_level_transformations:nullable_class_field_values:visualisation:ecore}
    \end{subfigure}
    \\
    \begin{subfigure}{0.95\textwidth}
        \centering
        \input{images/05_library_of_transformations/03_instance_level_transformations/08_nullable_class_field_values/nullable_class_field_as_edge_type_value.tikz}
        \caption{$IG_{NullableClassField}$ with examples of different nodes with different values for $\type{field}$}
        \label{fig:library_of_transformations:instance_level_transformations:nullable_class_field_values:visualisation:groove}
    \end{subfigure}
    \caption{Visualisation of the transformation of field values from fields typed by nullable class types}
    \label{fig:library_of_transformations:instance_level_transformations:nullable_class_field_values:visualisation}
\end{figure}

This section introduces the instance level transformation belonging to the transformation of a nullable class field. The type level transformation for nullable class fields can be found in \cref{subsec:library_of_transformations:type_level_transformations:nullable_class_fields}. On the instance level, values for these fields are introduced.

\begin{defin}[Instance model $Im_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field}
Let $Im_{NullableClassField}$ be an instance model typed by $Tm_{NullableClassField}$ (\cref{defin:library_of_transformations:type_level_transformations:nullable_class_fields:tmod_nullable_class_field}). Define disjoint sets $valobjects$ and $nilobjects$. The objects in $valobjects$ will get a proper class value for the field introduced by $Tm_{NullableClassField}$, while the objects in $nilobjects$ get a $\type{nil}$ value for the same field. Furthermore, define a function $obids$ which maps each of these objects to their corresponding identifier and a function $values$, which maps the objects in $valobjects$ to its value for the field introduced by $Tm_{NullableClassField}$. $Im_{NullableClassField}$ is defined as:
\begin{align*}
Object =\ &nilobjects \cup valobjects \cup \{ values(ob) \mid ob \in valobjects \} \\
\mathrm{ObjectClass} =\ & \begin{cases}
    (ob, classtype) & \mathrm{if }\ ob \in nilobjects \cup valobjects\\
    (ob, fieldtype) & \mathrm{if }\ ob \in \{ values(ob) \mid ob \in valobjects \}
\end{cases}\\
\mathrm{ObjectId} =\ & \begin{cases}
    (ob, obids(ob)) & \mathrm{if }\ ob \in objects
\end{cases}\\
\mathrm{FieldValue} =\ & \begin{cases}
    ((ob, (classtype, name)), \type{nil}) & \mathrm{if }\ ob \in nilobjects\\
    ((ob, (classtype, name)), [\type{obj}, values(ob)]) & \mathrm{if }\ ob \in valobjects
\end{cases} \\
\mathrm{DefaultValue} =\ & \{\}
\end{align*}
\isabellelref{imod_nullable_class_field}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{defin}

\begin{thm}[Correctness of $Im_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_correct}
$Im_{NullableClassField}$ (\cref{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field}) is a valid instance model in the sense of \cref{defin:formalisations:ecore_formalisation:instance_models:model_validity}.
\isabellelref{imod_nullable_class_field_correct}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

A visual representation of $Im_{NullableClassField}$ with $valobjects = \{ob_a\}$ and $nilobjects = \{ob_b\}$ can be seen in \cref{fig:library_of_transformations:instance_level_transformations:nullable_class_field_values:visualisation:ecore}. In this visualisation, the field value for $ob_a$ is defined as $values(ob_a) = ob_x$. Furthermore, the value for $ob_b$ is $\type{nil}$, because it occurs within the set $nilobjects$. Like the previous transformations for field values, the value needs to be set for all objects that are typed by the class type corresponding to the field. Failing to do so would result in an invalid instance model after it is combined with another model, as the next definition will show. The correctness proof of $Im_{NullableClassField}$ only is already quite involved, but not be included here for conciseness. It can be found as part of the validated Isabelle proofs.

In order to make composing transformation functions possible, $Im_{NullableClassField}$ should be compatible with the instance model it is combined with.

\begin{thm}[Correctness of $\mathrm{combine}(Im, Im_{NullableClassField})$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_combine_correct}
Assume an instance model $Im$ that is valid in the sense of \cref{defin:formalisations:ecore_formalisation:instance_models:model_validity}. Then $Im$ is compatible with $Im_{NullableClassField}$ (in the sense of \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_instance_models:compatibility}) if:
\begin{itemize}
    \item All requirements of \cref{defin:library_of_transformations:type_level_transformations:nullable_class_fields:tmod_nullable_class_field_combine_correct} are met, to ensure the combination of the corresponding type models is valid;
    \item The class type on which the field is defined by $Tm_{NullableClassField}$ may not be extended by another class type in the type model corresponding to $Im$;
    \item All of the objects in the sets $nilobjects$ and $valobjects$ must already be objects in $Im$;
    \item All of the objects referenced by the objects in the set $valobjects$ must already be objects in $Im$;
    \item All objects typed by the class type on which the field is defined must occur in the set $nilobjects \cup valobjects$ and thus have a value in $Im_{NullableClassField}$;
    \item For all of the objects in the set $objects$, the identifier set by $obids$ must be the same identifier as set by $Im$ for that object;
    \item The sets $valobjects$ and $nilobjects$ must be disjoint, each object only gets a proper class value or a nil value, not both;
    \item For all objects in set $valobjects$, the value set by the $values$ function must be valid.
\end{itemize}
\isabellelref{imod_nullable_class_field_combine_correct}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

\begin{proof}
Use \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_instance_models:imod_combine_merge_correct}. It is possible to show that all assumptions hold. Now we have shown that $\mathrm{combine}(Im, Im_{NullableClassField})$ is consistent in the sense of \cref{defin:formalisations:ecore_formalisation:instance_models:model_validity}.
\end{proof}

As explained earlier, $Im_{NullableClassField}$ needs to introduce values for all objects that are typed by the class type on which the field is defined. This is enforced by the requirements of \cref{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_combine_correct}. The proof is not included here for conciseness, but can be found as part of the validated proofs in Isabelle.

The definitions and theorems for introducing values for fields of data types within Ecore are now complete.

\subsubsection{Encoding as edges and nodes}

In the type level transformation of nullable class fields, nullable class fields were encoded in GROOVE as edge types to a corresponding encoded node type. On the instance level, this edge type will be used and edges will be created to give a value to each node type that has the field defined. The encoding corresponding to $Im_{NullableClassField}$ can then be represented as $IG_{NullableClassField}$, defined in the following definition:

\begin{defin}[Instance graph $IG_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type}
Let $IG_{NullableClassField}$ be the instance graph typed by type graph $TG_{NullableClassField}$ (\cref{defin:library_of_transformations:type_level_transformations:nullable_class_fields:tg_nullable_class_field_as_edge_type}). Reuse the sets $nilobjects$ and $valobjects$ from $Im_{NullableClassField}$. Moreover, reuse the functions $obids$ and $values$ from $Im_{NullableClassField}$.

The objects in the sets $nilobjects$ and $valobjects$ are converted to nodes in $Im_{NullableClassField}$. For each of these objects, an edge of the encoded field is created. This edge targets a node that corresponds to the value set by $values$ for the corresponding object in $valobjects$. The outgoing multiplicity of the edge type created by $TG_{NullableClassField}$ is $0..1$, such that the objects in $nilobjects$ do not need to have this edge, representing the absence of a value. Finally, the identity of the objects is defined using $obids$. $IG_{NullableClassField}$ is defined as:
\begin{align*}
N =\ & nilobjects \cup valobjects \cup \{values(ob) \mid ob \in valobjects\} \\
E =\ & \big\{\big(ob, (\mathrm{ns\_\!to\_\!list}(classtype), \langle name \rangle, \mathrm{ns\_\!to\_\!list}(fieldtype)), values(ob)\big) \mid ob \in valobjects \big\} \\
\mathrm{ident} =\ & \begin{cases}
    (obids(ob), ob) & \mathrm{if }\ ob \in objects
\end{cases}
\end{align*}
with
\begin{align*}
\mathrm{type}_n =\ & \begin{cases}
    (ob, \mathrm{ns\_\!to\_\!list}(classtype)) & \mathrm{if }\ ob \in nilobjects \cup valobjects\\
    (ob, \mathrm{ns\_\!to\_\!list}(fieldtype)) & \mathrm{if }\ ob \in \{values(ob) \mid ob \in valobjects\}
\end{cases}
\end{align*}
\isabellelref{ig_nullable_class_field_as_edge_type}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{defin}

\begin{thm}[Correctness of $IG_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type_correct}
$IG_{NullableClassField}$ (\cref{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type}) is a valid instance graph in the sense of \cref{defin:formalisations:groove_formalisation:instance_graphs:instance_graph_validity}.
\isabellelref{ig_nullable_class_field_as_edge_type_correct}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

A visual representation of $IG_{NullableClassField}$ with $valobjects = \{ob_a\}$ and $nilobjects = \{ob_b\}$ can be seen in \cref{fig:library_of_transformations:instance_level_transformations:nullable_class_field_values:visualisation:groove}. Like the previous visualisation, the field value for $ob_a$ is defined as $values(ob_a) = ob_x$. Since $ob_b$ was in the set $nilobjects$, no edge has been created for this node. Like the previous field encodings, one needs to set the values for the field for all objects of the encoded class type at once. Failing to do so would result in an invalid instance graph after it is combined with another graph, as the next definition will show. The correctness proof of $IG_{NullableClassField}$ only is already quite involved, but not be included here for conciseness. It can be found as part of the validated Isabelle proofs.

In order to make composing transformation functions possible, $IG_{NullableClassField}$ should be compatible with the instance graph it is combined with.

\begin{thm}[Correctness of $\mathrm{combine}(IG, IG_{NullableClassField})$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type_combine_correct}
Assume an instance graph $IG$ that is valid in the sense of \cref{defin:formalisations:groove_formalisation:instance_graphs:instance_graph_validity}. Then $IG$ is compatible with $IG_{NullableClassField}$ (in the sense of \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_instance_graphs:compatibility}) if:
\begin{itemize}
    \item All requirements of \cref{defin:library_of_transformations:type_level_transformations:nullable_class_fields:tg_nullable_class_field_as_edge_type_combine_correct} are met, to ensure the combination of the corresponding type graphs is valid;
    \item The node type on which the corresponding field is defined is not extended by other node types within the type graph corresponding to $IG$;
    \item All nodes in $IG$ are also nodes in $IG_{NullableClassField}$;
    \item For all nodes shared between $IG$ and $IG_{NullableClassField}$, each node must have the same identifier in both $IG$ and $IG_{NullableClassField}$;
    \item The sets $valobjects$ and $nilobjects$ must be disjoint, each node gets either one edge to another node, or no edge at all;
    \item For all nodes for which the field is set, the $values$ function must define a valid value.
\end{itemize}
\isabellelref{ig_nullable_class_field_as_edge_type_combine_correct}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

\begin{proof}
Use \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_instance_graphs:ig_combine_merge_correct}. It is possible to show that all assumptions hold. Now we have shown that $\mathrm{combine}(IG, IG_{NullableClassField})$ is valid in the sense of \cref{defin:formalisations:groove_formalisation:instance_graphs:instance_graph_validity}.
\end{proof}

The next definitions define the transformation function from $Im_{NullableClassField}$ to $IG_{NullableClassField}$:

\begin{defin}[Transformation function $f_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_to_ig_nullable_class_field_as_edge_type}
The transformation function $f_{NullableClassField}(Im)$ is defined as:
\begin{align*}
N =\ & Object_{Im}  \\
E =\ & \big\{\big(ob, (\mathrm{ns\_\!to\_\!list}(classtype), \langle name \rangle, \mathrm{ns\_\!to\_\!list}(fieldtype)), values(ob)\big) \mid\\&ob \in Object_{Im} \land ob \in valobjects \big\} \\
\mathrm{ident} =\ & \begin{cases}
    (obids(ob), ob) & \mathrm{if }\ ob \in Object_{Im}
\end{cases}
\end{align*}
with
\begin{align*}
\mathrm{type}_n =\ & \begin{cases}
    (ob, \mathrm{ns\_\!to\_\!list}(name)) & \mathrm{if }\ ob \in Object_{Im} \land ob \in nilobjects \cup valobjects\\
    (ob, \mathrm{ns\_\!to\_\!list}(name)) & \mathrm{if }\ ob \in Object_{Im} \land ob \in \{values(ob) \mid ob \in valobjects\}
\end{cases}
\end{align*}
\isabellelref{imod_nullable_class_field_to_ig_nullable_class_field_as_edge_type}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{defin}

\begin{thm}[Correctness of $f_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_to_ig_nullable_class_field_as_edge_type_func}
$f_{NullableClassField}(Im)$ (\cref{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:imod_nullable_class_field_to_ig_nullable_class_field_as_edge_type}) is a valid transformation function in the sense of \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_transformation_functions:transformation_function_instance_model_instance_graph} transforming $Im_{NullableClassField}$ into $IG_{NullableClassField}$.
\isabellelref{imod_nullable_class_field_to_ig_nullable_class_field_as_edge_type_func}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

The proof of the correctness of $f_{NullableClassField}$ will not be included here. Instead, it can be found in the validated Isabelle theories.

Finally, to complete the transformation, the transformation function that transforms $IG_{NullableClassField}$ into $Im_{NullableClassField}$ is defined:

\begin{defin}[Transformation function $f'_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type_to_imod_nullable_class_field}
The transformation function $f'_{NullableClassField}(IG)$ is defined as:
\begin{align*}
Object =\ &N_{IG} \\
\mathrm{ObjectClass} =\ & \begin{cases}
    (ob, classtype) & \mathrm{if }\ ob \in N_{IG} \land ob \in nilobjects \cup valobjects \\
    (ob, fieldtype) & \mathrm{if }\ ob \in N_{IG} \land ob \in \{values(ob) \mid ob \in valobjects\}
\end{cases}\\
\mathrm{ObjectId} =\ & \begin{cases}
    (ob, obids(ob)) & \mathrm{if }\ ob \in N_{IG}
\end{cases}\\
\mathrm{FieldValue} =\ & \begin{cases}
    ((ob, (classtype, name)), \type{nil}) & \mathrm{if }\ ob \in N_{IG} \land ob \in nilobjects\\
    ((ob, (classtype, name)), [\type{obj}, values(ob)]) & \mathrm{if }\ ob \in N_{IG} \land ob \in valobjects
\end{cases} \\
\mathrm{DefaultValue} =\ & \{\}
\end{align*}
\isabellelref{ig_nullable_class_field_as_edge_type_to_imod_nullable_class_field}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{defin}

\begin{thm}[Correctness of $f'_{NullableClassField}$]
\label{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type_to_tmod_class_func}
$f'_{NullableClassField}(IG)$ (\cref{defin:library_of_transformations:instance_level_transformations:nullable_class_field_values:ig_nullable_class_field_as_edge_type_to_imod_nullable_class_field}) is a valid transformation function in the sense of \cref{defin:transformation_framework:instance_models_and_instance_graphs:combining_transformation_functions:transformation_function_instance_graph_instance_model} transforming $IG_{NullableClassField}$ into $Im_{NullableClassField}$.
\isabellelref{ig_nullable_class_field_as_edge_type_to_imod_nullable_class_field_func}{Ecore-GROOVE-Mapping-Library.NullableClassFieldValue}
\end{thm}

Once more, the correctness proof is not included here but can be found in the validated Isabelle proofs of this thesis.


\section{Increase Stamina}\label{perk:increasestamina}
\textbf{Cost:} 50 CP\\
\textbf{Requirements:} -\\
\textbf{Passive, Repeatable}\\
You increase your Stamina by 1D6 + Strength.
Each time you gain a higher Rank for this perk, your Stamina is increased again.\\
\\
Rank Progression: \textbf{Cost} = Current Perk Rank * 50 + Cost of previous Rank\\
\\
This  means the progression for the first 18 Ranks is as follows:\\
\\
\begin{minipage}{0.25\textwidth}
    \rowcolors{2}{lightgray}{white}
    \begin{tabular}{l | l}
        Rank & Cost\\
        II & 150\\
        III & 300\\
        IV & 500\\
        V & 750\\
    \end{tabular}
\end{minipage}
\begin{minipage}{0.25\textwidth}
    \rowcolors{2}{lightgray}{white}
    \begin{tabular}{l | l}
        Rank & Cost\\ \hline
        VI & 1.050\\
        VII & 1.400\\
        VIII & 1.800\\
        IX & 2.250\\
    \end{tabular}
\end{minipage}
\begin{minipage}{0.25\textwidth}
    \rowcolors{2}{lightgray}{white}
    \begin{tabular}{l | l}
        Rank & Cost\\ \hline
        X & 2.750\\
        XI & 3.300\\
        XII & 3.900\\
        XIII & 4.550\\
    \end{tabular}
\end{minipage}
\begin{minipage}{0.25\textwidth}
    \rowcolors{2}{lightgray}{white}
    \begin{tabular}{l | l}
        Rank & Cost\\ \hline
        XIV & 5.250\\
        XV & 6.000\\
        XVI & 6.800\\
        XVII & 7.650\\
    \end{tabular}
\end{minipage}


%auto-ignore
\providecommand{\MainFolder}{..}
\documentclass[\MainFolder/Text.tex]{subfiles}

\begin{document}

\section{Computation of Chern-Simons Maurer-Cartan element for spheres}
\allowdisplaybreaks
\label{Section:MCSphere}

We recall from Definition~\ref{Def:PushforwardMCdeRham} that the Chern-Simons Maurer-Cartan element~$\PMC$ is computed as a sum over trivalent ribbon graphs decorated with the admissible Hodge Propagator~$\Prpg$ at internal edges, integration variables $x_i$ at internal vertices and, in the case of $\Sph{n}$, with $\NOne$ or $\NVol$ at external vertices.
\begin{figure}[t]
\centering
\input{\GraphicsFolder/ygraph.tex}
\caption{The $Y$-graph for $\Sph{n}$.}\label{Fig:YGraph}
\end{figure}

The canonical Maurer-Cartan element $\MC$ is the contribution of the Y-graph (see Figure~\ref{Fig:YGraph}), and it is easy to see that
\begin{equation*}
 \MC_{10}(\Susp \NVol \NOne \NOne ) = (-1)^n \MC_{10}(\Susp\NOne \NVol \NOne) = \MC_{10}(\Susp \NOne \NOne \NVol) = (-1)^{n-2}.
\end{equation*}
%We fix an input $\omega_1$, $\dotsc$, $\omega_l \in \BCyc\Harm(\Sph{n})$ of $\PMC_{lg}$ and let $\Gamma \in $ be an admissible trivalent ribbon graph with $e\ge 1$. We let $L$ be an admissible labeling of $\Gamma$.
%$\Gamma \in \TRRG_{klg}$ with the input $\omega_1$, $\dotsc$, $\omega_l$
Throughout this section, we will be in the setting of Definition~\ref{Def:PushforwardMCdeRham}.
In particular, $\Gamma \in \TRG_{klg}$ is a ribbon graph, $L$ its compatible labeling admissible with respect to an input $\omega_1$, $\dotsc$, $\omega_l$ and $I(\sigma_L)$ the corresponding integral.
\begin{Lemma}[Condition $(V_{\NOne})$ holds] \label{Lemma:ABVanishing}
For the Hodge Propagator $\Prpg$ from~\eqref{Eq:GreenKernelMC1} for $\Sph{n}$ for $n\ge 1$, every graph $\Gamma \neq Y$ with~$\NOne$ at an external vertex vanishes.
\end{Lemma}
\begin{proof}
%Before we begin appeal to~\cite{Cieliebak2018} for the fact that the integrand of $I(\sigma_L)$ is $L^1$-integrable, so that we can apply Fubini's theorem and integrate out a single vertex.
The only contribution of an $A$-vertex which does not vanish for degree reasons is
\[ A_{\NVol,\NOne}(y) = \int_x \Prpg(x,y) \Vol(x). \]
From the symmetry of $\Prpg$ and $\Vol$ under the action of $O(n+1)$, we get
\[ R^* A_{\NVol, \NOne} = (-1)^R A_{\NVol, \NOne}\quad\text{for all }R\in O(n+1). \]
Therefore, it suffices to check that $A_{\NVol, \NOne}(\StdBasis_1) = 0$, where $\StdBasis_1$, $\dotsc$, $\StdBasis_{n+1}$ denotes the standard basis of $\R^{n+1}$.
Evaluation of~\eqref{Eq:FormOmega1} at $(x,\StdBasis_1)$ gives
\[ \omega_0(x,\StdBasis_1) = \frac{1}{(n-1)!} \sum_{\substack{\sigma\in\Perm_{n+1}\\ \sigma_2 = 1}} (-1)^\sigma x^{\sigma_1} \Diff{y^{\sigma_3}} \dotsm \Diff{y^{\sigma_{n+1}}}. \]
%\marginnote{Can I argue more geometrically without integrating out one variable?}
Therefore, we get
\begin{align*}
A_{\NVol, \NOne}(\StdBasis_1) &= (-1)^n \int_x g_0(x\cdot \StdBasis_1) \omega_0(x,\StdBasis_1) \Vol(x)  \\
&= (-1)^{n+1} \int_x g_0(x^1) \Bigl( \sum_{j=2}^{n+1} (-1)^{j} x^j\Bigr) \Vol(x) \Diff{y^2} \dotsm  \widehat{\Diff{y^j}} \dotsm \Diff{y^{n+1}},
\end{align*}
where we view $g_0$ as a function of $x\cdot y$.
Consider the cyclic permutation of $x^2$, $\dotsc$, $x^{n+1}$:
\begin{align*}
I:\Sph{n} &\longrightarrow \Sph{n} \\
   (x^1, x^2, \dotsc, x^n, x^{n+1}) &\longmapsto (x^1, x^{n+1}, x^2 \dotsc, x^{n}).
\end{align*}
Then we have
\begin{align*}
\int_x g_0(x^1) \sum_{j=2}^{n+1} (-1)^{j} x^j \Vol(x)  &= (-1)^{n-1}\int_x I^*\Bigl(g_0(x^1) \sum_{j=2}^{n+1} (-1)^{j} x^j \Vol(x)\Bigr) \\
& = (-1)^{n-1} \int_x g_0(x^1)\Bigl(-\sum_{j=2}^{n+1} (-1)^j x^j\Bigr)\bigl((-1)^{n-1}\Vol(x)\bigr) \\
& = - \int_x g_0(x^1) \sum_{j=2}^{n+1} (-1)^{j} x^j \Vol(x).
\end{align*}
It follows that $A_{\NVol,\NOne}(\StdBasis_1)=0$.\footnote{Notice that we avoided using $\sum \int = \int \sum$ because the convergence of single summands is not guaranteed.}

Let us now consider the contribution of a $B$-vertex with $\NOne$:
%\marginnote{In order to prove rotational symmetry of $\eta_B^{\NOne}$ rigorously, I have to lift the action to the double blowup. Can it be argued without blowing up?}
\[ B_{\NOne}(y,z) = \int_{x} \Prpg(y,x) \Prpg(x,z) = (-1)^n \int_x \Prpg(y,x) \Prpg(x,z). \]
For $n=1$, the degree of $\Prpg(y,x)\Prpg(x,z)$ is $0$, and hence $B_{\NOne}= 0$ trivially.
Suppose that $n\ge 2$.
As in the case of $A_{\NVol,\NOne}$, we get that
\[ R^* B_{\NOne} = (-1)^R B_{\NOne} \quad\text{for all }R\in O(n+1). \]
Therefore, it suffices to check that $B_{\NOne}(\StdBasis_1, c_1 \StdBasis_1 + c_2 \StdBasis_2) = 0$ for all $(c_1,c_2)\in \Sph{1}$.
We have
\[  B_{\NOne}(\StdBasis_1, c_1 \StdBasis_1 + c_2 \StdBasis_2) = \begin{multlined}[t] (-1)^n \int_x \sum_{a=1}^{n-1} g_a(x^1) g_{n-a}(c_1 x^1 + c_2 x^2)\omega_a(x,\StdBasis_1) \\ \omega_{n-a}(x,c_1 \StdBasis_1 + c_2 \StdBasis_2).\end{multlined}\]
We will show that for every $a=1$,~$\dotsc$, $n-1$ we can write
\begin{equation} \label{Eq:Mu}
\mu_a(x) \coloneqq \omega_a(x,\StdBasis_1) \omega_{n-a}(x,c_1 \StdBasis_1 + c_1 \StdBasis_2) = \Bigl(\sum_{i=3}^{n+1} \pm  x^i \Vol(x)\Bigr) \eta_a(y,z)
\end{equation}
with alternating signs for some form $\eta_a(y,z)$.
Then we can use the same argument as for~$A_{\NVol,\NOne}$ with the cyclic permutation of $x^3$, $\dotsc$, $x^{n+1}$ given by
\begin{align*}
I':\Sph{n} &\longrightarrow \Sph{n} \\
   (x^1, x^2, x^3,\dotsc, x^n, x^{n+1}) &\longmapsto (x^1, x^2, x^{n+1}, x^3 \dotsc, x^{n})
\end{align*}
%\begin{align*}
%& \int_x  g_a(x^1) g_{n-a}(c_1 x^1 + c_2 x^2) x^i \Vol(x) \\
%&\qquad = - \int_x I^*_i \bigl(g_a(x^1) g_{n-a}(c_1 x^1 + c_2 x^2) x^i \Vol(x)\bigr) \\
%&\qquad = - \int_x g_a(x^1) g_{n-a}(c_1 x^1 + c_2 x^2) (-x^i) (-\Vol(x))
%\end{align*}
%for all $3 \le i \le n+ 1$, and hence
to conclude that $B_{\NOne}(\StdBasis_1, c_1 \StdBasis_1 + c_2 \StdBasis_2) = 0$.

In order to show \eqref{Eq:Mu}, we have to study the product of $\omega_i$'s.
From~\eqref{Eq:FormOmega1} we get
\begin{equation}\label{Eq:GenProd}
\begin{aligned}
&\omega_a(x,y)\omega_{n-a}(x,z)\\
&\quad =\begin{multlined}[t] \frac{1}{a! (n-1-a)! (n-a)! (a-1)!} \sum_{\substack{\sigma,\,\mu\in \Perm_{n+1}}} (-1)^{\sigma + \mu} x^{\sigma_1} x^{\mu_1} y^{\sigma_2} z^{\mu_2}  \\ \Diff{x}^{\sigma_3} \dotsm \Diff{x}^{\sigma_{2+a}} \Diff{x}^{\mu_3}\dotsm\Diff{x}^{\mu_{2+n-a}}
\Diff{y}^{\sigma_{3+a}}\dotsm \Diff{y}^{\sigma_{n+1}}\\\Diff{z}^{\mu_{3+n-a}}\dotsm \Diff{z}^{\mu_{n+1}}.
\end{multlined}
\end{aligned}
\end{equation}
In order to simplify this expression, we decompose $\sigma\in \Perm_{n+1}$ as
\begin{equation} \label{Eq:Decomp}
 \sigma = \sigma^5 \circ \sigma^4 \circ \sigma^3 \circ \sigma^2 \circ \sigma^1,
 \end{equation}
where $\sigma^1$, $\dotsc$, $\sigma^5\in \Perm_{n+1}$ are permutations defined as follows:
\begin{itemize}
 \item The permutation $\sigma^1$ is a shuffle permutation $\sigma^1 \in \Perm_{2+a,n-a-1}$ such that its first block denoted by $\sigma^1(1) = (\sigma^1_1,\dotsc,\sigma^1_{2+a})$ is equal to the ordered set $\{\sigma_1, \dotsc, \sigma_{2+a}\}$.
 The second block $\sigma^1(2)$ is then the ordered set $\{\sigma_{3+a},\dotsc,\sigma_{n+1}\}$, which will be denoted by $J_\sigma$.
 \item The permutation $\sigma^2$ acts on the block $\sigma^1(1)$ by moving $\sigma_2$ in front.
 We denote the new block $\sigma^1(1)\backslash\{\sigma_2\}$ by $I_\sigma$, so that we can write $\sigma^2 : \sigma^1(1) \mapsto (\sigma_2, I_\sigma)$.
 \item The permutation $\sigma^3$ acts on the block $I_\sigma$ by moving $\sigma_1$ in front.
 Together with the previous step we get $\sigma^1(1)\mapsto (\sigma_2, \sigma_1,I_\sigma\backslash\{\sigma_1\})$.
 \item The permutation $\sigma^4$ is a transposition of $\sigma_1$ and $\sigma_2$.
 \item The permutation $\sigma^5$ is determined by the pair $(\sigma^{51},\sigma^{52}) \in \Perm_{a} \times \Perm_{n-1-a}$ of permutations $\sigma^{51}$ and $\sigma^{52}$ acting on blocks $I_\sigma\backslash\{\sigma_1\}$ and $J_\sigma$ to get $(\sigma_3,\dotsc,\sigma_{2+a})$ and $(\sigma_{3+a},\dotsc,\sigma_{n+1})$, respectively.
\end{itemize}

We define the decomposition $\mu^1$,~$\dotsc$, $\mu^5$ for $\mu\in \Perm_{n+1}$ from \eqref{Eq:GenProd} analogously with $a$ replaced by $n-a$.
Using~\eqref{Eq:Decomp}, the product~\eqref{Eq:GenProd} can be written as
\begin{align*}
  &\begin{multlined}\frac{1}{a! (n-1-a)! (n-a)! (a-1)!} \sum_{\substack{\sigma^1,  \dotsc,\, \sigma^5 \\ \mu^1, \dotsc,\, \mu^5}} (-1)^{\sigma^1 + \dotsb + \sigma^5 + \mu^1 + \dotsb + \mu^5} x^{\sigma_1} x^{\mu_1} y^{\sigma_2} z^{\mu_2} \\ \Diff{x}^{\sigma^{51}(I_\sigma\backslash \{\sigma_1\})} \Diff{x}^{\mu^{51}(I_\mu\backslash\{\mu_1\})} \Diff{y}^{\sigma^{52}(J_\sigma)} \Diff{z}^{\mu^{52}(J_\mu)} \end{multlined} \\[5pt]
 &\qquad =\begin{multlined}[t]- \sum_{\sigma^1,\, \mu^1} (-1)^{\sigma^1 + \mu^1} \Bigl(\sum_{\sigma^2,\, \mu^2} (-1)^{\sigma^2 + \mu^2} \sum_{\sigma^3,\, \mu^3} (-1)^{\sigma^3 + \mu^3} x^{\sigma_1} x^{\mu_1} y^{\sigma_2} z^{\mu_2} \\ \Diff{x}^{I_\sigma \backslash \{\sigma_1\}} \Diff{x}^{I_\mu\backslash \{\mu_1\}}\Bigr) \Diff{y}^{J_\sigma} \Diff{z}^{J_\mu},\end{multlined} \end{align*}
where $-1$ comes from $(-1)^{\sigma^4}$ and $\sigma^5$ is compensated by permutations of forms.
For fixed $\sigma^1$ and $\mu^1$, consider the coefficient at $\Diff{y}^{J_\sigma}\Diff{z}^{J_\mu}$ in the brackets.
If we evaluate it at $y=\StdBasis_1$, $z=c_1 \StdBasis_1 + c_2 \StdBasis_2$, we get
\begin{align*}
&  c_1 \overbrace{\sum_{\substack{\sigma^3,\, \mu^3 \\ \sigma_2 = 1 \\ \mu_2 = 1}} (-1)^{\sigma^3 + \mu^3} x^{\sigma_1} x^{\mu_1}  \Diff{x}^{I_\sigma\backslash\{\sigma_1\}} \Diff{x}^{I_\mu \backslash\{\mu_1\}}}^{=:\displaystyle\mathrm{I}} \\
& {} + (-1)^{\mu^2} c_2  \overbrace{\sum_{\substack{\sigma^3,\, \mu^3 \\ \sigma_2 = 1 \\ \mu_2 = 2}} (-1)^{\sigma^3 + \mu^3} x^{\sigma_1} x^{\mu_1}  \Diff{x}^{I_\sigma\backslash\{\sigma_1\}} \Diff{x}^{I_\mu \backslash\{\mu_1\}}}^{=:\displaystyle\mathrm{II}},
 \end{align*}
where $(-1)^{\mu^2} = -1$ if and only if $1\in I_{\mu}$.

More generally, for multiindices $I_1$, $I_2 \subset \{1,\dotsc, n+1\}$ of lengths $a+1$ and $n-a+1$,  respectively, consider the sum
\begin{equation} \label{Eq:Sum}
S(I_1,I_2) \coloneqq \sum_{\substack{i_1 \in I_1 \\ i_2 \in I_2}} (-1)^{(i_1,I_1) + (i_2,I_2)} x^{i_1} x^{i_2} \Diff{x}^{I_1\backslash\{i_1\}} \Diff{x}^{I_2\backslash\{i_2\}},
\end{equation}
where $(i_j, I_j)$ is the number of transpositions required to move $i_j$ in front of $I_j$.
The following implication holds:
\begin{equation*}
 S(I_1, I_2)\neq 0\; \Implies \; 1 \le \Abs{I_1 \cap I_2} \le 2.
\end{equation*}
We distinguish the two cases left:
\begin{description}[font=\normalfont\itshape]
\item[Case $I_1 \cap I_2 =\{i,j\}$ with $i < j$: ] We get
\begin{align*}
S(I_1, I_2) &= \begin{multlined}[t] (-1)^{(i,I_1) + (j,I_2)} x^{i} x^j \Diff{x}^{I_1 \backslash\{i\}} \Diff{x}^{I_2 \backslash \{j\}} \\ {}+ (-1)^{(j,I_1) + (i,I_2)} x^{j} x^i \Diff{x}^{I_1 \backslash\{j\}} \Diff{x}^{I_2 \backslash \{i\}} \end{multlined} \\
&=\begin{multlined}[t] (-1)^{(i,I_1) + (j,I_2) + (j,I_1)+1 + (i,I_2)} x^i x^j \Diff{x}^j \Diff{x}^{I_1\backslash\{i,j\}}\\\Diff{x}^i \Diff{x}^{I_2\backslash\{i,j\}} + (-1)^{(j,I_1) + (i,I_2)+(i,I_1)+ (j,I_2)+1} x^i x^j \\ \Diff{x}^i \Diff{x}^{I_1\backslash\{i,j\}}\Diff{x}^j \Diff{x}^{I_2\backslash\{i,j\}} \end{multlined} \\
&= \pm(-1 +  1) x^i x^j \Diff{x}^i \Diff{x}^{I_1\backslash\{i,j\}} \Diff{x}^j\Diff{x}^{I_2\backslash\{i,j\}},
\end{align*}
where in the last step we switched $\Diff{x}^i \leftrightarrow \Diff{x}^j$ in the first summand.
Therefore, it holds $S(I_1, I_2) = 0$.
\item[Case $I_1 \cap I_2 = \{i\}$:] We must have $I_1 \cup I_2 = \{1,\dotsc,n+1\}$.
A non-zero summand in~\eqref{Eq:Sum} has either $i_1 = i$ and $i_2\in I_2$, in which case \[I_1\backslash \{i_1\} \cup I_2\backslash\{i_2\}= \{1, \dotsc, \widehat{i_2}, \dotsc, n+1\}, \] or $i_2 = i$ and $i_1\in I_1$ with $i_1 \neq i$, in which case \[I_1\backslash \{i_1\} \cup I_2\backslash\{i_2\}= \{1, \dotsc, \widehat{i_1}, \dotsc, n+1\}.\] Indices $i_2$ from the first case and $i_1$ from the second case constitute $\{1,\dotsc,n+1\}$.
Therefore, for some signs $\pm$, we can write
\begin{equation*} \label{Eq:AlternatingSum}
S(I_1,I_2) = x^i \sum_{j=1}^{n+1}  \pm  x^j \Diff{x^1} \dotsm \widehat{\Diff{x^j}} \dotsm \Diff{x^{n+1}}.
\end{equation*}
%
We will prove that the signs alternate, and hence $S(I_1,I_2)= \pm x^i \Vol(x)$.
Suppose that $j$, $j+1 \in I_{1}$ for some $j\in \{1,\ldots,n\}$.
The two summands in~\eqref{Eq:Sum} with $(i_1, i_2)=(j, i)$ and $(i_1, i_2)= (j+1,i)$, respectively, give
\begin{align*}
& \begin{multlined}[t](-1)^{(j,I_1) + (i,I_2)} x^{j} x^{i} \Diff{x}^{I_1\backslash\{j\}} \Diff{x}^{I_2\backslash\{i\}} + (-1)^{(j+1,I_1) + (i,I_2)} x^{j+1} x^{i} \\ \Diff{x}^{I_1\backslash\{j+1\}}\Diff{x}^{I_2\backslash\{i\}} \end{multlined}
\\ &\quad= \begin{multlined}[t] (-1)^{(i,I_2)} x^{j} x^{i} \Diff{x}^{j+1}\Diff{x}^{I_1\backslash\{j, j+1\}} \Diff{x}^{I_2\backslash\{i\}}  \\ {}+ (-1)^{1 + (i,I_2)} x^{j+1} x^{i} \Diff{x}^j \Diff{x}^{I_1\backslash\{j, j+1\}} \Diff{x}^{I_2\backslash\{i\}} \end{multlined} \\
&\quad = (-1)^{(i,I_2)}x^i (x^j \Diff{x}^{j+1} - x^{j+1} \Diff{x}^j) \Diff{x}^{I_1\backslash\{j, j+1\}} \Diff{x}^{I_2\backslash\{i\}}.
\end{align*}
The signs clearly alternate.
A symmetric argument holds when $j$, $j+1\in I_2$.
Now assume that $j \in I_1$ and $j+1\in I_2$.
The two summands in~\eqref{Eq:Sum} which have $(i_1, i_2)=(j,i)$ and $(i_1, i_2) = (i,j+1)$, respectively, give
\begin{align*}
& \begin{multlined}[t] (-1)^{(j,I_1)+(i,I_2)} x^j x^i \Diff{x}^{I_1\backslash\{j\}}\Diff{x}^{I_2\backslash\{i\}} + (-1)^{(i,I_1) + (j+1,I_2)} x^i x^{j+1} \\ \Diff{x}^{I_1\backslash\{i\}}\Diff{x}^{I_2\backslash\{j+1\}} \end{multlined}\\
&\quad=\begin{multlined}[t]
(-1)^{(j,I_1)+(i,I_1\backslash\{j\}) + (a + 1)} x^j x^i \Diff{x^{I_1\backslash\{i, j\}}}\Diff{x}^{I_2} \\ {}+ (-1)^{(i,I_1) + (j+1,I_2) + (j,I_1\backslash\{i\})} x^i x^{j+1} \Diff{x}^j \Diff{x}^{I_1\backslash\{i, j\}} \Diff{x}^{I_2\backslash\{j+1\}}
\end{multlined}\\&\quad=
\begin{multlined}[t]
(-1)^{(j,I_1) + (i,I_1\backslash\{j\})+(j+1,I_2)} x^i x^j \Diff{x}^{j+1} \Diff{x}^{I_1\backslash\{i,j\}} \Diff{x}^{I_2\backslash\{j+1\}} \\ {}+ (-1)^{1 + (j,I_1) + (i,I_1\backslash\{j\})+(j+1,I_2)} x^i x^{j+1} \Diff{x}^j \Diff{x}^{I_1\backslash\{i,j\}} \Diff{x}^{I_2\backslash\{j+1\}}
\end{multlined}\\
&\quad= \begin{multlined}[t] (-1)^{(j,I_1) + (i,I_1\backslash\{j\})+(j+1,I_2)} x^i (x^j \Diff{x}^{j+1} - x^{j+1} \Diff{x}^j) \\ \Diff{x}^{I_1\backslash\{i,j\}} \Diff{x}^{I_2\backslash\{j+1\}}. \end{multlined}
\end{align*}
The signs alternate again.
A symmetric argument holds for $j\in I_2$ and $j+1\in I_1$.
\end{description}

 Back to the original problem, we have $\mathrm{I} = S(I_\sigma, I_\mu)$ with $I_\sigma, I_\mu \subset \{2,\dotsc, n+1\}$.
 It follows that the first case applies, and hence $\mathrm{I} = 0$.
 We have $\mathrm{II} = S(I_\sigma, I_\mu)$ with $I_\sigma \subset \{2,\dotsc, n+1\}$ and $I_\mu \subset \{1, \widehat{2}, \dotsc, n+1\}$.
 It follows that either the first case or the second case with $i\ge 3$ applies.
 This proves~\eqref{Eq:Mu} up to signs.
 Tracing back the signs, one can convince himself that the signs in \eqref{Eq:Mu} indeed alternate.

The last paragraph of the proof of Proposition~\ref{Prop:COne} finishes the proof.
\end{proof}

We summarize the consequences in the following proposition.
The main argument is the same as in the proof of Proposition~\eqref{Prop:GeomForm}.

\begin{Proposition}[Vanishing of graphs for $\Sph{n}$] \label{Prop:TotalVanishing}
Consider $\Sph{n}$ with the Hodge Propagator~\eqref{Eq:GreenKernelMC1}.
Only the following trivalent ribbon graphs $\Gamma \neq Y$ do not necessarily vanish:
\begin{description}[font=\normalfont\itshape]
 \item[($n=1$):] The $O_{k}$-graph with $k\in 2\N$ internal vertices of type $B$ with $\NVol$ at the external vertex (see Figure~\ref{Fig:Gamma0}).
 \item[($n=2$):] It must hold $A=0$, $C=2B$ and all $B$ vertices must have $\NVol$ at the external vertex.
 Moreover, if $\Gamma$ is reduced, it must have $g\ge 1$.
 \item[($n=3$):] There is no external vertex and $4 \mid C$ holds.
 \item[($n>3$):] All graphs vanish.
\end{description}
%The conclusion is that $\PMC_{10} = \MC_{10}$ and $\PMC_{klg} = 0$ for $(l,g) \ne (1,0)$ in any dimension $n$ with the possible exception of $\PMC_{20}$ for $n=1$ and $\PMC_{lg}$ with $g\ge 1$ for $n=2$.
\end{Proposition}
\begin{proof}
%Thanks to Lemma~\ref{Lemma:ABVanishing}, we can apply  Proposition~\ref{Prop:PMCEqualsMC} to get $\PMC_{10} = \MC_{10}$, $\PMC_{20} = 0$ for $n \ge 2$ as $H_{\mathrm{dR}}^1(\Sph{n}) = 0$, and $\PMC_{lg} = 0$ for all $(l,g)\neq (1,0)$, $(2,0)$ for $n>3$.
Lemma~\ref{Lemma:ABVanishing} implies that $A=0$ and that the total form-degree $D$ satisfies $D= n B$.
Therefore, we get from \eqref{Eq:VerticesEq} the following: for $n>3$ there is neither a $B$-vertex nor a $C$-vertex; for $n=3$, there is no $B$-vertex; for $n=2$, we have $C=2B$; and for $n=1$, there is no $C$-vertex.

Consider the pullback of $I(\sigma_L)$ along the (multi)diagonal action of an $R\in O(n+1)$ with $\Det(R)=-1$ on $(\Sph{n})^{\times k}$.
We get schematically
\[ \int_{(\Sph{n})^{\times k}} \Prpg^{e}\Vol^{s} = (-1)^{k +e + s} \int_{(\Sph{n})^{\times k}} G^{e}\Vol^{s}. \]
Therefore, $k+ e + s$ has to be even.
If we plug-in from~\eqref{Eq:ChangeOfVariables}, we get
\[ k+ e + s =  \begin{cases}
3 B & \text{for }n=1, \\
8 B & \text{for }n=2, \\
\frac{5}{2} C & \text{for }n=3.
\end{cases} \]

A non-vanishing reduced graph must have $B\ge l$.
For $n=2$, so that $C=2B$, the formula~\eqref{Eq:GenusFormulaa} gives $g\ge 1$.
\end{proof}

\begin{Remark}[Graphs for $\Sph{2}$]\phantomsection\label{Rem:GraphsTwoSphere}

{ \begingroup
\begin{figure}
\centering
\begin{subfigure}{0.45\textwidth}
\centering
\input{\GraphicsFolder/P1.tex}
\caption{$P_1$}
\end{subfigure}
\begin{subfigure}{0.45\textwidth}
\centering
\input{\GraphicsFolder/P2.tex}
\caption{$P_2$}
\end{subfigure}
\caption{Vanishing graphs $P_1$ and $P_2$ for $\Sph{2}$.}\label{Fig:P1P2}
\end{figure}
\endgroup }
The simplest possibly non-vanishing graph for $\Sph{2}$ has $A= 0$, $B=1$, $C=2$. If it is reduced, we must have $l = g = 1$, and hence it will contribute to $\PMC_{11}$. Up to an isomorphism, there is only one such graph, which we denote by $P_1$ (see Figure~\ref{Fig:P1P2}). However, we see that the pair of internal vertices $x_1$ and $x_2$ is connected by two edges, which implies that $P_1 =0$. Indeed, $\Prpg(x,y)$ has odd degree, and hence we have\footnote{We recall from Section~\ref{Section:Proof2} that the notation $\Prpg(x_i,x_j)$ means $(\pi_{i} \times \pi_j)^* \Prpg$ and not just the evaluation at $(x_i,x_j)$.}
\[ \Prpg(x,y)\Prpg(y,x) = \Prpg(x,y)^2 = 0 \]
by the symmetry on the pullback along the twist map. It follows that $\PMC_{11} = 0$.

The second simplest possibly non-vanishing reduced graph is the graph~$P_2$ from Figure~\ref{Fig:P1P2}. Let
\begin{equation*}
\eta(x_1,x_2,x_3,x_4,x_5) \coloneqq\begin{multlined}[t]\Prpg(x_1,x_2)\Prpg(x_1,x_3)\Prpg(x_4,x_2)\Prpg(x_4,x_3)\Prpg(x_3,x_5)\\ \Prpg(x_2,x_5)\Vol(x_5) \end{multlined}
\end{equation*}
denote the form in the integrand coming from the part of the graph on the right-hand side of the vertical axis going through $x_1$, $x_4$. If $\tau_{1,4}$ denotes the exchange of $x_1$ and $x_4$, then clearly $\tau_{1,4}^* \eta = \eta$ because the graph is symmetric with respect to the horizontal axis going through $x_5$, $x_6$. Using this, we compute
\begin{align*}
& \int_{x_1,x_2,x_3,x_4,x_5,x_6} \NVol(x_6)\Prpg(x_1,x_6)\Prpg(x_4,x_6) \eta(x_1,x_2,x_3,x_4,x_5) \\
& = \int_{\tau_{1,4}(x_1,x_2,x_3,x_4,x_5,x_6)} \tau_{1,4}^*\bigl(\NVol(x_6)\Prpg(x_1,x_6)\Prpg(x_4,x_6) \eta(x_1,x_2,x_3,x_4,x_5)\bigr) \\
& = \int_{x_4,x_2,x_3,x_1,x_5,x_6} \NVol(x_6)\Prpg(x_4,x_6)\Prpg(x_1,x_6) \eta(x_4,x_2,x_3,x_1,x_5)\\
& =
 -\int_{x_1,x_2,x_3,x_4,x_5,x_6} \NVol(x_6)\Prpg(x_1,x_6)\Prpg(x_4,x_6)  \eta(x_1,x_2,x_3,x_4,x_5),
\end{align*}
where the minus sign comes from switching the first two $\Prpg$'s. We see that $P_2$ vanishes. The other variants with $x_5$ moved on the edge $x_3$, $x_4$ and~$x_2$, $x_4$ vanish by a similar argument using the compositions $\tau_{1,3}\circ\tau_{5,6}$ and $\tau_{1,2}\circ\tau_{5,6}$, respectively. We conclude that $\PMC_{21} = 0$, and hence $\OPQ_{121}^\PMC = 0$.

We sum up some general observations about the integrals for $\Sph{2}$:

\begin{itemize}
\item We have $B_{\NOne} \neq 0$ and $C \neq 0$ for the corresponding forms.
\item We have the multiplication formula (c.f., Example~\ref{Example:Circle})
\[ \omega_1(x,y) \omega_1(x,z) = x\cdot(y\times z) \Vol(x). \]
\item The number $(-1)^{\sigma_L} I(\sigma_L)$ does not depend on the choice of $L_1$ provided a compatible $L_2$ is chosen.
\item It holds $\sum_{L_3^b} (-1)^{\sigma_L} I(\sigma_L) = 0$ whenever there is a boundary component with even number of $\NVol$'s.
\item If there is a $B$-vertex $x$ such that the underlying graph (after forgetting the ribbon structure) is symmetric on the reflection along an axis going through $x$, then $I(\sigma_L) = 0$. \qedhere
\end{itemize}
% Because of \eqref{Eq:NonVanishingOf}, we think that an argument for vanishing of $I(\sigma_L)$ can not be local as in the proof of Lemma~\ref{Lemma:ABVanishing} but must use the graph structure in some way.

\Correct[caption={DONE Nonsense about lower bound}]{$g\ge 1$ is equivalent to $B \ge l$ and moreover we must have $C=2B$. What else was I thinking here?}
%The lower bound $B\ge l$ for reduced graphs does not help either because it is easy to connect a given number of $C$-vertices which is divisible by $4$ to a trivalent ribbon graph with $l=2$ (and hence it needs only two $B$-vertices to become reduced) whose vanishing is for us not obvious.
%Some more thoughts about this problem and nice formulas for the integrals will be provided in \cite{MyPhD}.
\end{Remark}

\begin{Remark}[Graphs for $\Sph{3}$]\label{Rem:GraphsThreeSphere}
{ \begingroup
\begin{figure}
\centering
\begin{subfigure}{0.45\textwidth}
\centering
\input{\GraphicsFolder/K1.tex}
\caption{$K_1$}
\end{subfigure}
\begin{subfigure}{0.45\textwidth}
\centering
\input{\GraphicsFolder/K2.tex}
\caption{$K_2$}
\end{subfigure}
\begin{subfigure}{0.45\textwidth}
\centering
\input{\GraphicsFolder/Tadpole.tex}
\caption{Tadpole}
\end{subfigure}
\caption[Graphs $K_1$, $K_2$ and the tadpole graph from Chern-Simons theory.]{Graphs $K_1$ and $K_2$ from the Chern-Simons theory and the tadpole graph with $(l,g)=(2,0)$ for $n=3$.}\label{Fig:K1K2}
\end{figure}
\endgroup }

For $\Sph{3}$, we consider the non-reduced graphs $K_1$ and $K_2$ and the tadpole graph from Figure~\ref{Fig:K1K2}. The graphs $K_1$ and $K_2$ appear in the definition of the Chern-Simons topological invariant in~\cite{Kohno2002} (with a gauge group). The corresponding integrals from our theory vanish ``algebraically'', i.e., at the level of wedge products of $\omega_i$. Indeed, every summand in $K_1$ contains
\[ \omega_a(x_1,x_1) = 0\quad \text{for some }a=0, 1, 2, \]
and, for degree reasons, the form part of $K_2$ can contain   only
\[ \omega_1(x_1,x_2)^3=0\quad\text{or}\quad\omega_0(x_1,x_2)\omega_{1}(x_1,x_2)\omega_{2}(x_1,x_2)=0.\]
The tadpole graph contains only
\begin{equation*}
 \omega_2(x_1,x_3)\omega_1(x_1,x_2)\omega_2(x_2,x_3) = 0.\qedhere \end{equation*}
%These relations were checked by the computer.
%The precise relation to the integrals from perturbative Chern-Simons theory is one of our research goals and may be discussed more in~\cite{MyPhD}.
\qedhere
%It was checked numerically that there are graphs with $C=4$ which do not vanish algebraically.
\end{Remark}

Equations in Remark~\ref{Rem:GraphsThreeSphere} were checked by the computer---this is possible as the vanishing is purely algebraic.
Any author's attempts to show numerically that some integrals are non-zero or get a hint for ``analytic vanishing'' failed so far.
The program for Wolfram Mathematica~10.4 will be made available at \cite{sourcecode} and possibly updated.

We will now compute $\PMC_{20}$ for $\Sph{1}$, which according to Proposition~\ref{Prop:TotalVanishing} consists only of contributions from the $O_k$-graphs with $k$ even.
%$L_1, L_3^b$ such that the first boundary component has valency $a$.
By analogy with the finite dimensional case (see~Appendix~\ref{Section:Appendix}), we expect that the number $(-1)^{\sigma_L}I(\sigma_L)$ does not depend on $L$. All inputs are namely the same and the degrees even, i.e., $|m_2^+| = -2$, $|\SuspU^2\Prpg| = -2$ and $|\NVol| = 0$.

We fix $s_1$, $s_2\ge 1$ such that $k=s_1+s_2$ is even and make the ansatz
\begin{equation*}
n_{20}(\Susp \NVol^{s_1}\otimes  \Susp \NVol^{s_2}) \coloneqq \varepsilon(s_1,s_2) C(s_1,s_2) I(k),
\end{equation*}
where $I(k)$ is the integral
\begin{equation} \label{Eq:Ik}
\frac{1}{V^k}\int_{x_1, \dotsc, x_{k}} G(x_1,x_2) \dotsm G(x_{k-1},x_{k})G(x_{k},x_1)\Vol(x_1) \dotsm \Vol(x_{k}), \end{equation}
$\varepsilon(s_1,s_2)$ a sign and $C(s_1,s_2)$ a combinatorial coefficient to be determined.

We fix a circle in the plane with $k$ points (=\,internal vertices) and denote by $O(s_1,s_2)$ the set of ribbon graphs constructed by attaching external legs from which $s_1$ points in the interior and $s_2$ in the exterior, or the other way round, so that $O(s_1,s_2) = O(s_2, s_1)$ (see Figure~\ref{Fig:Gamma0}). Recall that the ribbon structure is induced from the counterclockwise orientation of the plane. It is easy to see that all graphs in $O(s_1,s_2)$ admit a labeling which is admissible with respect to $\Susp \NVol^{s_1} \otimes \Susp \NVol^{s_2}$, and that $O(s_1,s_2)$ contains a representative of every such $O_k$-graph.

\Correct[inline,caption={DONE Sign not necessary}]{There is no need to write $(-1)^{k+1}$ when we know that $k$ is even!!! Who cares? Let's keep it so that it is clear where the sign comes from.}
\begin{Lemma}[Integral for the $O_k$-graph for $\Sph{1}$] \label{Lemma:IntegralFor1}
For every even $k\ge 2$, the integral $I(k)$ is equal to
 \begin{equation}\label{Eq:TheFormulaForIk}
 (-1)^{k+1} \frac{1}{2^k}\sum_{i=2, 4, \dotsc ,k} \frac{i}{(i+1)!} \sum_{\substack{i_1+ \dotsb +i_r = k-i \\ i_1, \dotsc, i_r \in 2\N,\, r\in \N}} (-1)^r \frac{1}{(i_1+1)! \dotsm (i_r+1)!}.
 \end{equation}
\end{Lemma}

\begin{proof}
Denote $\bar{\Prpg} \coloneqq -2\pi \Prpg$. For all $k$, $l \ge 1$, we consider the more general integral
\[ I(k,l) \coloneqq \int_{x_1, \dotsc, x_k} \bar{\Prpg}(x_1,x_2) \dotsm \bar{\Prpg}(x_{k-1},x_k) \bar{\Prpg}(x_k,x_1)^l\Vol(x_1) \dotsm \Vol(x_k). \]
Taking the pullback along $(x_1, x_2, \dotsc, x_{k-1}, x_k) \mapsto (x_k, x_{k-1}, \dotsc, x_2, x_1)$ and using the antisymmetry of $\bar{\Prpg}(x,y)$, we get $I(k,l) = 0$ whenever $k+l$ is even. We will compute $I(k,1)$ for $k\in 2\N$ from a recursive relation which arises from successive integration.

For the recursion step, we need to evaluate the integral
\[\int_{y} \bar{\Prpg}(x,y)\bar{\Prpg}(y,z)^l \Vol(y)\]
for fixed $(x,z)\in (\Sph{1}\times \Sph{1})\backslash\Diag$. Pick the chart $g: \Sph{1}\backslash\{z\} \rightarrow (-\pi,\pi)$ defined by
\[ g(y)= \bar{\Prpg}(y,z) =  \pi - \alpha(y,z) \quad\text{for } y\in \Sph{1}\backslash\{z\}, \]
where the angle $\alpha$ was defined in Example~\ref{Example:Circle}. It holds $\Diff{g}(y) = \Vol(y)$ and
\[ \bar{\Prpg}(x,y) = \begin{cases} \bar{\Prpg}(x,z) - g(y) - \pi & \text{for }-\pi< g(y)< \bar{\Prpg}(x,z), \\
\bar{\Prpg}(x,z) - g(y) + \pi & \text{for }\bar{\Prpg}(x,z)<g(y)<\pi.
 \end{cases}\]
We compute
\begin{align*}
\int_{y} \bar{\Prpg}(x,y)\bar{\Prpg}(y,z)^l \Vol(y) &= \begin{multlined}[t] \int_{-\pi}^{\pi} (\bar{\Prpg}(x,z) - g)g^l \Diff{g} - \pi \int_{-\pi}^{\bar{\Prpg}(x,z)} g^l \Diff{g} \\ {}+ \pi \int_{\bar{\Prpg}(x,z)}^\pi g^l \Diff{g} \end{multlined} \\
 &=  \frac{2\pi}{l+1} \begin{cases}
  \pi^l \bar{\Prpg}(x,z) - \bar{\Prpg}(x,z)^{l+1} & \text{for }l\text{ even},\\[2ex]
  \dfrac{\pi^{l+1}}{l+2} - \bar{\Prpg}(x,z)^{l+1} & \text{for }l \text{ odd}.
 \end{cases}
\end{align*}

From now on, $\int$ will stand for the Riemannian integral, i.e., $\int f \coloneqq \int f\Vol$ for a function~$f$. We compute
%
\begin{align*}
I(2,l) &= \int_{x_1, x_2} \bar{\Prpg}(x_1,x_2)\bar{\Prpg}(x_2,x_1)^{l} \\
 &= - \int_{y z} \bar{\Prpg}(y,z)^{l+1} \\
 &=- 2\pi \int_{-\pi}^\pi g^{l+1} \Diff{g} \\
 &= \begin{cases} 0 & \text{for }l \text{ even}, \\[2ex]
 - \dfrac{4 \pi^{l+3}}{l+2} &\text{for }l\text{ odd}. \end{cases}
\end{align*}
For $k\ge 4$ even and $l$ odd, we compute % 10.10.17
\begin{align*}
 I(k,l) &= \begin{multlined}[t]\frac{2\pi}{l+1}\int_{x_1, \dotsc, x_{k-1}}\bar{\Prpg}(x_1,x_2)\dotsm \bar{\Prpg}(x_{k-2},x_{k-1}) \\ \Bigl(\frac{\pi^{l+1}}{l+2} - \bar{\Prpg}(x_{k-1},x_1)^{l+1}\Bigr) \end{multlined} \\
&\begin{multlined}
=\frac{-4\pi^2}{(l+1)(l+2)} \int_{x_1, \dotsc, x_{k-2}}\ \bar{\Prpg}(x_1,x_2) \dotsm \bar{\Prpg}(x_{k-3},x_{k-2})\\ \Bigl(\pi^{l+1} \bar{\Prpg}(x_{k-2},x_1)
 -\bar{\Prpg}(x_{k-2},x_1)^{l+2}\Bigr)
\end{multlined} \\
&= \frac{4\pi^2}{(l+1)(l+2)}\bigl(-\pi^{l+1} I(k-2,1)+I(k-2,l+2)\bigr).
\end{align*}
%
%where we used that $\int_{x_{k-1}} \bar{\Prpg}(x_{k-2},x_{k-1}) = 0$.
For the second equality, we used $\int_{x_1} \bar{\Prpg}(x_1,x_2) = 0$ to show that the term multiplied by $\frac{\pi^{l+1}}{l+2}$ vanishes. It follows that
%\[ I_{n,1} = -\frac{(2\pi^2)^n}{(n+1)(n-1)!}-\sum_{l=2,4,\ldots,n-2} \frac{(2\pi^2)^{n-l}}{(n-l+1)!} I_{l,1}\qquad\text{for all }n=2,4,\ldots\]
\begin{align*}
I(k,1) &= \frac{(2\pi)^{k-2}}{(k-1)!} I(2,k-1) - \sum_{l=2, 4, \dotsc, k-2} \frac{(2\pi^2)^{k-l}}{(k-l+1)!} I(l,1) \\
&=-\frac{k(2\pi^2)^k}{(k+1)!}-\sum_{l=2, 4, \dotsc, k-2} \frac{(2\pi^2)^{k-l}}{(k-l+1)!} I(l,1)\qquad\text{for all }k=2,\,4,\,\dotsc
\end{align*}
This is a recursive equation of the form $a_k = c_k + \sum_{l=1}^{k-1} d_{k-l} a_l$. Its solution is $a_k = \sum_{i=1}^k c_i D_{k-i}$ with $D_0\coloneqq 1$ and $D_i = \sum d_{i_1} \dotsm d_{i_r}$, where we sum over all $r=1$,~$\dotsc$, $i$ and $i_1$,~$\dotsc$, $i_r\in \N$ such that $i_1+ \dotsb + i_r = i$. Therefore, we get % Proved on 11.10.17, checked by Mathematica in CircularIntCircle.nb
\[ I(k,1) = -(2\pi^2)^k \sum_{i=2, 4, \dotsc, k} \frac{i}{(i+1)!} \sum_{\substack{i_1 + \dotsb + i_r = k-i \\ i_1, \dotsc, i_r \in 2\N, r\in \N}} (-1)^r \frac{1}{(i_1+1)! \dotsm (i_r+1)!}.\]
The result has to be multiplied by $(-1)^k(2\pi)^{-2k}$ in order to get $I(k)$.
\end{proof} % Checked on 24.3.18.

%\begin{figure}
%\begin{center}
%\includegraphics[width=0.5\textwidth, trim=0.1cm 26cm 15cm 0.1cm,clip]{\GraphicsFolder/circle_xab.pdf}
%\end{center}
%\caption{dasda}
%\end{figure}

\begin{Lemma}[Independence of labeling]\label{Lemma:Independence}
The summand $(-1)^{\sigma_L} I(\sigma_L)$ in the definition of $\PMC_{20}(\Susp\NVol^{s_1}\otimes \Susp\NVol^{s_2})$ for $\Sph{1}$ is independent of the choice of $\Gamma\in O(s_1,s_2)$ and its labeling $L$ which is compatible and admissible with respect to the input.
\end{Lemma}
\begin{proof}
Pick $\Gamma\in O(s_1,s_2)$ and its admissible labeling $L$. Let $L'$ be an other admissible labeling of $\Gamma$. We distinguish the following situations:
\begin{itemize}
 \item Suppose that $L$ and $L'$ differ by a permutation $\mu$ in $L_3^b$. A similar argument as in the proof of Lemma~\ref{Lem:MCCond} shows that $(-1)^{\sigma_{L'}} = (-1)^\mu (-1)^{\sigma_L}$ and $I(\sigma_L') = (-1)^\mu I(\sigma_L)$, where the sign in the integral comes from the permutation of $\Vol$'s, which have form-degree $1$. Hence $(-1)^{\sigma_{L'}}I(\sigma_{L'}) = (-1)^{\sigma_{L}}I(\sigma_{L})$.
\item Suppose that the boundaries are permuted, i.e., that~$L$ and~$L'$ differ in~$L_1^b$. Notice that~$s_1=s_2$ because otherwise one of~$L$ or~$L'$ would not be admissible. The sign from changing~$L_1^b$ cancels as in the previous case.
%In order to preserve compatibility with $L_1$ we must have $L_2' \neq L_2$. But this was handled in the previous case.
\item Suppose that $L$ and $L'$ differ in $L_2$. It was explained in the proof of Lemma~\ref{Lem:MCCond} that a single change of $L_2$ induces the sign $(-1)^{n-1} = 1$ in $(-1)^{\sigma_L} I(\sigma_L)$.
\item A cyclic permutation in $L_3^v$ induces a sign neither in $(-1)^{\sigma_L}$ nor in $I(\sigma_L)$.
 \item A permutation $\mu$ in $L_1^v$ induces $(-1)^\mu$ in $(-1)^{\sigma_L}$ and a change in $I(\sigma_L)$, which can be realized by taking the pullback along $\mu: (x_1,\ldots,x_k)\mapsto (x_{\mu_1},\ldots,x_{\mu_k})$. However, the sign of the Jacobian is $(-1)^\mu$, which cancels the sign from $(-1)^{\sigma_L}$.
\end{itemize}

\begin{figure}[t]
\centering
\input{\GraphicsFolder/twolegs.tex}
\caption[Swap of adjacent vertices on a circular graph.]{Swapping adjacent legs.}\label{Fig:TwoLegs}
\end{figure}

Next, we prove the independence of $\Gamma\in O(s_1,s_2)$. Let $L$ be an admissible and compatible labeling of $\Gamma$. Pick two adjacent internal vertices with external legs pointing to different regions, i.e., one to the interior of the circle and the other to the exterior. Suppose that the vertices are labeled by $\Vert_1$ and $\Vert_2$ and the legs by $l_1$ and $l_2$, respectively. Let $\Gamma'\in O(s_1,s_2)$ be the graph with the two legs turned inside out (see Figure~\ref{Fig:TwoLegs}). We can construct an admissible and compatible labeling $L'$ of $\Gamma'$ by making the following changes to $L$: The new leg at $\Vert_1$ will be labeled by $l_2$ and the new leg at $\Vert_2$ by $l_1$.
%This produces $-1$ in $(-1)^{\sigma_L - \sigma_{L'}}$.
The cyclic orderings at $\Vert_1$ and $\Vert_2$, respectively, have to be modified by a transposition in order to get compatibility with the new ribbon structure. All other labelings can be copied from $L$.
%This does not produce a sign as the change is in pair.
In total, we get
\[ (-1)^{\sigma_L - \sigma_{L'}} = -1. \]
This sign is compensated by swapping the one-forms in $I(\sigma_L)$:
\[ \Vol (x_{\Vert_1}) \dots \Vol(x_{\Vert_2}) \;\longleftrightarrow\;\Vol(x_{\Vert_2}) \dots \Vol(x_{\Vert_1}). \]
The independence of $\Gamma\in O(s_1,s_2)$ follows from the fact that we can span the entire $O(s_1,s_2)$ by repeating the swap-of-legs operation.
\end{proof}

\begin{Lemma}[Sign]\label{Lemma:SignForMCOnCircle}
We have
\[\varepsilon(s_1,s_2) = (-1)^{s_1+1}. \]
\end{Lemma}
\begin{proof}

\begin{figure}
\centering
\input{\GraphicsFolder/circle.tex}
%\includegraphics[width=0.6\textwidth, trim=5.6cm 20.6cm 5.3cm 1.2cm,clip]{\GraphicsFolder/reference_labeling_of_circle.pdf}
\caption[A fully labeled circular ribbon graph for $\Sph{1}$.]{The graph $\Gamma^*$ with the labeling $L^*$. It can be checked that~$L_1$ and~$L_2$ are compatible.}\label{Fig:Gamma0}
\end{figure}

By Lemma~\ref{Lemma:Independence}, in order to compute $(-1)^{\sigma_L}I(\sigma_L)$, we can pick $\Gamma^*\in O(s_1,s_2)$ and its admissible and compatible labeling $L^*$ from Figure~\ref{Fig:Gamma0}. We abbreviate $\sigma_0 = \sigma_{L^*}$. The corresponding integral \eqref{Eq:ISigma} reads
\[ I(\sigma_0) = \begin{multlined}[t] \frac{1}{V^k}\int_{x_1, \dotsc, x_k} G(x_{k-1},x_k) \dotsm G(x_{1},x_2)G(x_k,x_1) \Vol(x_{s_1}) \dotsm \Vol(x_1)\\ \Vol(x_{s_1+1}) \dotsm \Vol(x_k). \end{multlined} \]
It differs from $I(k)$ from~\eqref{Eq:Ik} in the order of $\Prpg$'s and $\Vol$'s. A reordering produces the sign
\[(-1)^{\frac{1}{2}s_1(s_1-1)}.\]
We will compute $(-1)^{\sigma_0}$ by ordering half-edges from the edge order back to the vertex order while looking at Figure~\ref{Fig:Gamma0}. The steps are as follows:
\begin{itemize}
 \item Transpose half-edges at internal vertices so that the first half-edge goes inside the vertex and the third outside with respect to the counterclockwise orientation. This gives $(-1)^a$.
 \item Permute external legs so that $\NVol_i$ is at $x_i$ for all $i=1$, $\dotsc$, $k$. This gives
 \[(-1)^{\frac{1}{2}s_1(s_1-1)}. \]
 \item Permute internal edges so that $\Prpg_i$ starts at the third half-edge of $x_i$ and ends at the first half-edge of $x_{i+1}$ for all $i=1$, $\dotsc$, $k-1$. This does not produce any sign as swapping of two $\Prpg$'s requires two transpositions.
 \item  At this point, we have the permutation
 \[\begingroup\setlength\arraycolsep{4pt}      \begin{pmatrix}
 1 & 2 &\dots & 2(e-1)-1 & 2(e-1) & 2e-1 & 2e & 2e + 1 & \dots & 3k \\
 3 & 4 &\dots & 3k-3 & 3k-2 &  3k &  1 & 2 & \dots & 3k-1
 \end{pmatrix}.\endgroup\]
We interpret the last line as $\Prpg_1\dots \Prpg_k \NVol_1\dots \NVol_k$ and permute it to the sequence $\NVol_1 \Prpg_1 \NVol_2 \Prpg_2\dots \NVol_k \Prpg_k$, which does not produce any sign. We end up with
\[ \sigma_0' = \begin{pmatrix}
 1 & 2 & 3 & \dots & 3k-1 & 3k \\
 2 & 3 & 4 & \dots & 3k & 1
\end{pmatrix}. \]
It is now easy to see that
\[ (-1)^{\sigma_0'} = (-1)^{3k-1}. \]
\end{itemize}
In total, we get
\[ (-1)^{\sigma_0} = (-1)^{s_1 + \frac{1}{2}s_1(s_1-1) + k + 1}. \]
As for the other signs in Definition~\ref{Def:PushforwardMCdeRham}, we have $s(k,l) = k + \frac{1}{2}k(k-1)$ and $P(\NVol^k) = \frac{1}{2}k(k-1)$. There is no sign from $\Susp^2 \NVol^{s_1}\otimes \NVol^{s_2} = \Susp \NVol^{s_1} \otimes \Susp \NVol^{s_2}$ since $\Abs{\Susp} = -2$. Multiplying everything together, we get $\varepsilon(s_1,s_2)$.
\end{proof}
\begin{figure}
\centering
\input{\GraphicsFolder/mirror.tex}
\caption[The mirror isomorphism for the $O_k$-graph.]{The mirror isomorphism $M: 1 \dots k \mapsto \bar{k} \dots\bar{1}$ is a composition of the inversion and the counterclockwise rotation by one place.}\label{Fig:Mirror}
\end{figure}
\begin{Lemma}[Combinatorial coefficient]
\label{Lemma:CombinatorialCoefficientForMCOnCircle}
It holds \[C(s_1,s_2) = \frac{1}{2} a k! \binom{k-1}{s_1}.\]
\end{Lemma}
\begin{proof}
Every isomorphism of ribbon graphs $\Gamma$ and $\Gamma'$ from $O(s_1,s_2)$ is a composition of the clockwise rotation $(r)$ for $r\in \Z$ and the mirror operation $M$ defined as follows: If $1$,~$\dotsc$, $k$ label internal vertices in the clockwise direction starting from the north-pole, then the result of $M$ is $\bar{k}$,~$\dotsc$, $\bar{1}$, where $\bar{i}$ means that the external leg is reversed (see Figure~\ref{Fig:Mirror}). These operations satisfy
\[ (r+k) = (r),\; (r)(-r)=\Id,\; M^2 = \Id,\; (r)M = M(-r), \]
and hence generate a group $\mathrm{G}$ which is isomorphic to the dihedral group $\Z_k \rtimes \Z_2$. The orbit space $O(s_1,s_2)/\mathrm{G}$ is in $1:1$ correspondence with isomorphism classes of admissible $O_k$-graphs and $\Aut(\Gamma)$ is in $1:1$ correspondence with $\Stab{\Gamma}$. From the orbit-stabilizer formula, we get
\begin{align*}
\sum_{\substack{[\Gamma] \text{ admiss. }\\O_k-\text{graph}}} \frac{1}{\Abs{\Aut(\Gamma)}} &= \sum_{[\Gamma]\in O(s_1,s_2)/\mathrm{G}} \frac{1}{\Abs{\Stab{\Gamma}}} \\
& = \sum_{\Gamma\in O(s_1,s_2)} \frac{1}{\Abs{\Orb{\Gamma}}\Abs{\Stab{\Gamma}}} \\[2ex]
&= \frac{\Abs{O(s_1,s_2)}}{\Abs{\mathrm{G}}}\\[1ex]
&= \frac{1}{2k}{\binom{k}{s_1}}\times\begin{cases} 1 & \text{for }s_1=s_2, \\ 2 & \text{for }s_1\neq s_2.\end{cases}
\end{align*}
The two cases are compensated in the sum over labelings: For $s_1=s_2$, both labelings $L_1^b$ are admissible, and hence we get the factor $2$.

Next, we multiply by $k! s_1(k-s_1)$, which is the number of $L_1^v$ and $L_3^b$. There is also the factor $\frac{1}{l!} = \frac{1}{2}$. Multiplying everything together, we get $C(s_1,s_2)$.
%In total we get
%\[ \frac{1}{2} a(k-a) k! \frac{1}{k}{{k}\choose{a}} = \frac{1}{2} a k! \binom{k-1}{a}. \]
\end{proof}

Before we summarize the results of our computations (see Proposition~\ref{Proposition:MCSphere} below), we show directly that $\PMC$ is a Maurer-Cartan element; i.e., in this special case, we do not need general results from \cite{Cieliebak2018} at all.

\begin{Lemma}[Maurer-Cartan equation for $\Sph{n}$] \label{Lem:MCEquation}
For $n\ge 1$, consider $\Sph{n}$ with the Hodge Propagator from~\eqref{Eq:GreenKernelMC1}. The collection $(\PMC_{lg})$ satisfies the Maurer-Cartan equation~\eqref{Eq:MaurerCartanEquation} for $\dIBL(\CycC(\Harm(\Sph{n})))$.
\end{Lemma}

\begin{proof}
%The degree and filtration conditions of Definition~\ref{Def:MaurerCartan} are satisfied by a general $\PMC=(\PMC_{lg})$ from Definition~\ref{Def:PushforwardMCdeRham}.
%
% We will now prove that $\PMC$ for $\Sph{n}$ satisfies the Maurer-Cartan equation~\eqref{Eq:MaurerCartanEquation} by
We will show that for every $l\ge 1$, $g\ge 0$ all summands in the relation corresponding to $(l,g)$ vanish. The summands for $(l,g)= (1,0)$ are $\OPQ_{110}(\PMC_{10})$ and $\frac{1}{2}\OPQ_{210}(\PMC_{10},\PMC_{10})$, and the summand for $(l,g)=(2,0)$ is $\OPQ_{120}(\PMC_{10})$.
The first term vanishes trivially as $\OPQ_{110}=0$, while the other two terms vanish by~\cite[Proposition 12.5]{Cieliebak2015} because $\PMC_{10} = \MC_{10}$
is the canonical Maurer-Cartan element. For $(l,g)\neq (1,0)$, we have the following four situations:
\begin{description}[font=\normalfont\itshape]
\item[$\OPQ_{210}\circ_2 \PMC_{lg}$, $l\ge 2$:]
%The idea is that $\OPQ_{210}$ from~\eqref{Eq:CanonicaldIBLSn} feeds $\NOne$ into one of its inputs, but all graphs with $\NOne$ at an exterior vertex are $0$ by Proposition~\ref{Prop:TotalVanishing}. The precise argument is as follows.
Let $\Psi = \Psi_1 \cdots \Psi_l\in \Ext_l \CycC$ be a summand of $\PMC_{lg}$.
 From Proposition~\ref{Prop:TotalVanishing} it follows that the summands can be chosen such that $\Psi_1$,~$\dotsc$, $\Psi_l \in \DBCycRed\Harm(\Sph{n})[3-n]$, i.e., such that $\Psi_i$ evaluates to $0$ whenever $\NOne$ is a part of its argument. From Definition~\ref{Def:CircS}, we compute
\[\OPQ_{210}\circ_2 (\Psi_1\cdots\Psi_l) = \sum_{\sigma\in \Perm_{2,l-2}} \varepsilon(\sigma,\Psi)\OPQ_{210}(\Psi_{\sigma_1^{-1}}\cdot\Psi_{\sigma_2^{-1}})\cdot\Psi_{\sigma_3^{-1}}\cdots \Psi_{\sigma_l^{-l}}. \]
We clearly have $\OPQ_{210}(\Psi_{\sigma_1^{-1}}\cdot\Psi_{\sigma_2^{-1}})=0$ because $\OPQ_{210}$ feeds $\NOne$ into one of its inputs. It follows that $\OPQ_{210}\circ_2 \PMC_{lg} = 0$.

\item[$\OPQ_{210}\circ_{1,1}(\PMC_{l_1 g_1} \odot \PMC_{l_2 g_2})$, $(l_i,g_i) \neq (1,0)$:] A similar argument as above.
\item[$\OPQ_{120}\circ_1 \PMC_{lg}$, $(l,g)\neq(1,0)$:] A similar argument as above using that $\OPQ_{120}$ also feeds~$\NOne$ into its input.
%also always feeds $\NOne$ into its input.
\item[$\OPQ_{210}\circ_{1,1} (\PMC_{10}\odot \PMC_{lg})$, $(l,g)\neq (1,0)$:]
As in the case of $\OPQ_{210}\circ_2 \PMC_{lg}$, suppose that $\Psi_1$,~$\dotsc$, $\Psi_l \in \DBCycRed\Harm(\Sph{n})[3-n]$. Recall that we write $\Omega_i = \Susp \omega_i \in \BCyc \Harm(\Sph{n})[3-n]$ and $\Omega = \Omega_1\otimes \dotsb \otimes \Omega_l$. From Definition~\ref{Def:CircS}, we compute
\begin{align*}
&[\OPQ_{210} \circ_{1,1}(\PMC_{10}\odot \Psi)](\Omega_1 \otimes \dotsb \otimes \Omega_l)
\\ &\quad = \begin{multlined}[t] \Bigl[ \sum_{i=1}^l (-1)^{\Abs{\Psi_i}(\Abs{\Psi_1} + \dotsb + \Abs{\Psi_{i-1}})} \OPQ_{210}(\PMC_{10}\Psi_i)\Psi_1\cdots \widehat{\Psi_i}\cdots \Psi_l\Bigr]\\ (\Omega_1 \otimes \dotsb \otimes \Omega_l) \end{multlined} \\
 &\quad = \begin{multlined}[t] \vphantom{\sum_{i}}\smash{\sum_{\substack{\mu \in \Perm_l \\ i=1, \dotsc, l}}} \frac{1}{l!} (-1)^{\Abs{\Psi_i}(\Abs{\Psi_1} + \dotsb + \Abs{\Psi_{i-1}})} \varepsilon(\mu,\Omega) (\OPQ_{210}(\PMC_{10}\cdot\Psi_i)\otimes \Psi_1\otimes \dotsb \\ \widehat{\Psi_i}\dotsb\otimes \Psi_l)(\Omega_{\mu_1^{-1}} \otimes \dotsb \otimes \Omega_{\mu_l^{-1}}). \end{multlined}
\end{align*}
For every $i=1$, $\dotsc$, $l$, we have
 \begin{align*}
 & \OPQ_{210}(\PMC_{10}\cdot \Psi_i)(\Omega) = \OPQ_{210}(\PMC_{10}\otimes \Psi_i)(\Omega) \\
 & \qquad = \begin{multlined}[t]- \sum \varepsilon(\omega\mapsto \omega^1 \omega^2)[(-1)^{(n-1)\Abs{\omega^1}} \PMC_{10}(\Susp \NOne \omega^1) \Psi_i(\Susp \NVol \omega^2) \\ {}+ (-1)^{\Abs{\omega^1}} \PMC_{10}(\Susp \NVol \omega^1) \Psi_i(\Susp \NOne \omega^2)] \end{multlined} \\
 & \qquad = - \sum \varepsilon(\omega\mapsto \omega^1 \omega^2)(-1)^{(n-1)\Abs{\omega^1}} \PMC_{10}(\Susp \NOne \omega^1) \Psi_i(\Susp \NVol \omega^2).
\end{align*}
This can be non-zero only if $\omega = \NOne \NVol^{s-1}$ for some $s\ge 2$ (up to a cyclic permutation). For this input, we get
\begin{align*} &\OPQ_{210}(\PMC_{10}\cdot \Psi_i)(\Susp \NOne \NVol^{s-1}) \\ &\quad = \begin{aligned}[t]
&-[\varepsilon(\NOne \NVol^{s-1} \mapsto \NOne\NVol^{s-1})\PMC_{10}(\Susp \NOne\NOne\NVol)\Psi_i(\Susp\NVol^{s-1}) \\
&{}+ \varepsilon(\NOne \NVol^{s-1} \mapsto \NVol\NOne\NVol^{s-2})\PMC_{10}(\Susp \NOne\NVol\NOne)  \Psi_i(\Susp\NVol^{s-1})] \end{aligned} \\
 &\quad= (-1)^{n-3}[1+(-1)^{ns+s-1}] \Psi_i(\Susp\NVol^{s-1}).
\end{align*}
The prefactor in brackets is $0$ for $n$ odd or $s$ even, whereas $\NVol^{s-1} = 0$ for $n$ even and~$s$ odd. Therefore,  we have $\OPQ_{210}\circ_{1,1} (\PMC_{10}\odot \PMC_{lg}) = 0$. \qedhere
\end{description}
\end{proof}

%We summarize our findings in the following proposition. Note that our result for $\Sph{n}$ is ``almost independent'' of the theory from \cite{Cieliebak2018}. We only needed $L^1$-integrability of the integrand of $I(\sigma_L)$ in the proof of Lemma~\ref{Lemma:ABVanishing} to justify application of the Fubini theorem.

\begin{Proposition}[Chern-Simons Maurer-Cartan element for $\Sph{n}$] \label{Proposition:MCSphere}
For $n\ge 1$, consider the round sphere $\Sph{n}$ with the Hodge Propagator~\eqref{Eq:GreenKernelMC1}. The Chern-Simons Maurer-Cartan element $\PMC$ is a strictly reduced Maurer-Cartan element for $\dIBL(\CycC(\Harm(\Sph{n})))$ which satisfies
\[ \PMC_{10} = \MC_{10}\quad\text{for all }n\in \N\]
plus the following properties depending on the dimension:
\begin{description}[font=\normalfont\itshape]
 \item[($n = 1$):] It holds $\PMC_{lg}=0$ for all $l\ge 1$, $g\ge 0$ such that $(l,g) \neq (1,0)$, $(2,0)$; the only non-trivial relation for $\PMC_{20}$ is
  \begin{equation}\label{Eq:MC20}
  \PMC_{20}(\Susp \NVol^{s_1}\otimes  \Susp \NVol^{s_2}) = (-1)^{s_1+1} \frac{1}{2} s_1 k! \binom{k-1}{s_1} I(k),
  \end{equation}
  where $s_1$, $s_2\ge 1$ are such that $k = s_1 + s_2$ is even, and $I(k)$ is given by~\eqref{Eq:TheFormulaForIk}.
 \item[($n=2$):] It holds $\PMC_{l0}=0$ for all $l\ge 2$. We also have $\PMC_{11}=0$.
 \item[($n\ge 3$):] It holds $\PMC_{lg} = 0$ for all $l\ge 1$, $g\ge 0$ such that $(l,g) \neq (1,0)$.
\end{description}
\end{Proposition}

Notice that $\PMC_{20}\not\in \Ext_2 \CycC(\Harm(\Sph{1}))$, i.e.~$\PMC_{20}$ is a ``long cochain'' because it is non-zero in infinitely many weights.
\end{document}


\subsection{Attributes}
\label{character-attributes}
\begin{description}
\item[Accuracy (0--100\%)] Likeliness to hit a still target.
\item[Critical Hit Chance (0--100\%)]
   Likeliness for each attack to be a critical hit (see~\ref{critical-hit}).
   From 0 to 100\%.
\item[Damage Modifier (0--300\%)] Multiplier for the damage.
\item[Dodge Chance (0--175\%)] Likeliness to dodge someone targetting you as if
you were standin still.
\item[Double Hit Chance (0--100\%)] Likeliness to perform a follow-up attack.
\item[Health Points (1--500)] Maximum health points.
\item[Movement Points (8--200)] Amount of movement points available every turn.
\item[Parry Chance (0--100\%)]
   Likeliness to perform a parry, should the circumstances allow it.
\end{description}


\subsubsection{\stid{3.13} CLOVER Sub-project PEEKS} \label{subsubsect:peeks}
\paragraph{Overview}
The PEEKS subproject is a focused team effort to advance the capabilities of the
ECP software stack in terms of communication-avoiding Krylov solvers and
advanced preconditioning techniques featuring fine-grained parallelism.
Previously developed techniques that are available as prototype codes -- as
well as novel algorithm developments -- are turned into production-quality
implementations and integrated into the ECP software ecosystem
as part of the Trilinos~\footnote{\url{https://trilinos.org/}} and the
Ginkgo~\footnote{\url{https://github.com/ginkgo-project/ginkgo}} software
stacks.
%With the PEEKS project focus being on algorithm development an software design
%and leading developers of the Trilinos and Ginkgo software packages being
%involved in the PEEKS project, a strong focus is on software interoperability
%and software sustainability. In consequence, there exists a strong link to the
%other ECP math libraries and the xSDK4ECP project coordinating the ECP
%mathematical library interoperability efforts. All technology developed in
%PEEKS is available and disseminated via the xSDK software stack.

\paragraph{Key  Challenges}
Developing preconditioned iterative solvers for the US flagship supercomputers
deployed in ECP, we acknowledge three major challenges coming from the hardware
architecture:
\begin{enumerate}
\item
Fine-grained parallelism in a single node that has to be exploited efficiently
by the iterative solver and the preconditioner.
\item
Rising communication and synchronization cost.
\item
Computational power growing much faster than memory power, resulting on
increased pressure on the bandwidth of all cache/memory levels.
\item
Low-precision special function units like Tensor cores that are increasingly
adopted by hardware architectures require sophisticated numerical schemes to be
useful for general purpose scientific computing.
\end{enumerate}

All challenges require the redesign of existing iterative solvers with respect
to higher parallelism, % within all building blocks
a reduced number of
communication and synchronization points, favoring computations over
communication, and adopting multiprecision algorithms for efficient hardware
utilization.
In the last few decades, numerous efforts
have investigated the potential of communication-avoiding (CA) and pipelined
Krylov solvers~\cite{yamazakiipdps2014,Cornelis2018TheCC},
% ; however, the implementations usually remained in prototype status and rarely made it into production code.
% Similarly, significant effort was put into developing
as well as new preconditioning
techniques that allow for the efficient parallelization of the preconditioner
setup and the preconditioner
application~\cite{chowisc2015,anzteuropa2015,ANZT20181}.
However, most implementations were experimental and rarely adopted by application
code.
Also the concept of accelerating iterative methods by using lower precision
formats for parts of the computations or memory access was extensively
investigated in literature~\cite{carson1,carson2,doi:10.1002/cpe.4460},
while production-ready implementations are still scarce.

%In the PEEKS project we address the challenge of turning prototype
%implementations into production-ready functionality by improving robustness
%and
%safeguarding against numerical breakdown, developing application- and
%architecture-specific optimizations, and integrating into ECP application
%projects and into a sustainable and extensible mathematical software stack.

\paragraph{Solution Strategy}

The primary thrusts of the PEEKS project are:
\begin{enumerate}
    \item \textbf{Architecture-portable software design:}
	In the Ginkgo C++ software, we design and develop a next-generation
	sparse linear algebra library able to run on multi- and manycore
	architectures. The library design decouples
	algorithm implementations from hardware-specific kernel implementations,
	thereby allowing extensibility as well as
	architecture-specific kernel optimization.
   \item \textbf{Sustainability efforts:}
	The Ginkgo software development cycle adheres the Better Scientific
	Software (BSSw) design principles~\cite{betterscientificsoftware} that
	ensure production-quality code by featuring unit testing, automated
	configuration and installation, Doxygen code documentation, as well as a
	continuous integration and continuous benchmarking
	framework~\cite{pasc_anzt}. Ginkgo is an
	open source effort licensed under BSD 3-clause and ships with the latest
	version of the xSDK package (v.0.5.0).
   \item \textbf{Pipelined and CA Krylov methods:}
    We realize pipelined and
	communication-avoiding Krylov methods in production-quality code, and
	we are actively collaborating with the ECP ExaWind project to integrate
        our new features into their application~\cite{Yamazaki-lowsynch}.
	\item \textbf{ParILUT -- A parallel threshold ILU:}  We are spearheading
	the manycore-parallel computation of threshold-based
	incomplete factorization preconditioners~\cite{sisc_anzt,ipdps_anzt}.
	\item \textbf{Adaptive precision block-Jacobi:}  We realized a
	production-ready block-Jacobi preconditioner that reduces the runtime by
	carefully selecting the storage format of the distinct block inverses
	without impacting the preconditioner quality~\cite{toms_anzt}.
   \item \textbf{Software-defined events (SDE):}  We team up with the ECP
    Exa-PAPI project to design and realize an ecosystem for software-defined
    events. The idea is to provide
% application scientists with
    easy access
    to library-, domain- and solver-specific metrics via the PAPI interface.
    This avoids cumbersome code instrumentation and library recompilation for
    debugging algorithm behavior or identifying performance
    bottlenecks~\cite{doi:10.1177/1094342019846287}.
\end{enumerate}

\paragraph{Recent Progress}
\begin{enumerate}
\item
For improving the Ginkgo software quality and performance reproducibility, we
realized a continuous benchmarking system permanently evaluating the
performance of central building blocks and archiving the data~\cite{pasc_anzt}.
We
also realized a web-based Ginkgo Performance Explorer that allows
interactively exploration of archived performance
data~\cite{gpewebpage}.
\item
We implemented and released five variations of communication-avoiding
and pipelined Krylov solvers in the Belos Trilinos package.
\item
We demonstrated the efficient use of communication-avoiding Krylov methods in Trilinos
inside wind turbine simulations of the ECP ExaWind project~\cite{Yamazaki-lowsynch}.
\item
We deployed ParILUT, the first production-ready manycore-parallel algorithm for
generating threshold-based incomplete factorization preconditioner and
demonstrated significant speedups over state-of-the-art
algorithms~\cite{ipdps_anzt} (see Figure~\ref{fig:ParILUTperf}).
%\item
%We released a production-ready adaptive precision block-Jacobi preconditioner
%in the Ginkgo software library. This preconditioner separates the memory
%format
%from the computation format, adapts the memory format to the numerical
%properties, and reduces the runtime cost on high-end GPUs by about 20\%
%without
%impacting the preconditioner quality~\cite{toms_anzt}.
\end{enumerate}

\begin{figure}[htb]
	\centering
	\includegraphics[width=5in]{projects/2.3.3-MathLibs/2.3.3.13-CLOVER/parilutspeedup}
	\caption{\label{fig:ParILUTperf}Speedup of the ParILUT over conventional
	threshold-ILU generation on different manycore architectures. Test problems
	are taken from the Suite Sparse Matrix Collection.}
\end{figure}

\paragraph{Next Steps}

Our next efforts are:
\begin{enumerate}
	\item \textbf{Low-synchronous orthogonalization:} The success of
	communication-avoiding Krylov methods motivates to push the synchronization
	limits further by deploying low-synchronous orthogonalization methods.
        (Collaboration with the ExaWind team at NREL.)
	\item \textbf{Parallel incomplete factorization preconditioner
	application:} With the advances in the parallel incomplete factorization
	preconditioner generation, the focus increasingly turns to the efficient
	preconditioner application. We enhance the concept of sparse approximate
	inverse approximation for incomplete factorization preconditioners, and
	extend the scope to novel hardware architectures featuring attractive
	performance in the low-precision regimes.
%	\item \textbf{Get-set usage of software-defined events:} Together with the
%	Exa-PAPI team, deployed software-defined events (SDE) in the Ginkgo sparse
%	linear algebra library. These provide the user with access to
%	domain-specific events like, e.g., preconditioner invocations,
%	synchronizations, precision format changes. With building blocks differing
%	in the resource usage, we investigate the possibility of instant power and
%%	frequency scaling for reducing the power and energy footprint.
%	\item \textbf{Graph analytics kernels:} Preconditioning techniques like
%	block Jacobi have a strong need for efficient and low-overhead graph
%	analytics tools identifying strongly-connected components. We deploy GPU
%	kernels providing this functionality while introducing only negligible
%	overhead to the preconditioner generation.
	\item \textbf{Multiprecision sparse matrix formats:} Operations with sparse
	matrices are memory-bound on virtually all architectures. We investigate
	how splitting the matrix int several operators stored in value-optimized
	less complex floating point precision formats can help improving
	performance.
	\item \textbf{Polynomial preconditioners:} The communication cost of
	numerical preconditions is high. In particular for communication-avoiding
	pipelined Krylov methods, the synchronization necessary by standard
	preconditioning can become a bottleneck. We will deliver a new
        polynomial preconditioner in Trilinos (Belos) and investigate their effectiveness
	for ECP applications.
\end{enumerate}


\setfolder{math01}
\section{Math Formulars}
\example{Math formulars in Normal Text}{simple_inline.tex}
\example{Math formulars as Separated Figures}{simple_figure.tex}


\newpage
\newcommand{\cwidth}{2.1cm}
\subsection{Frequency Domain Parameters}

\ifwelch \input{templates/frequency_fft.tex} \fi
\ifar \input{templates/frequency_ar.tex} \fi
\iflomb \input{templates/frequency_lomb.tex} \fi

\begin{table*}[h!]
	\centering
	\begin{tabular}{L{3.5cm}C{\cwidth}C{\cwidth}C{\cwidth}C{\cwidth}C{\cwidth}C{\cwidth}}
	    \hline\hline
		\multicolumn{6}{c}{\textbf{Selected Frequency Bands}}					\\
		\hline\hline
		\gcell{ULF Band}	& $Hz$	& \multicolumn{4}{c}{\ulflow\  - \ulfhigh} 	\\
		\gcell{VLF Band}   	& $Hz$  & \multicolumn{4}{c}{\vlflow\  - \vlfhigh}  \\
		\gcell{LF Band}		& $Hz$  & \multicolumn{4}{c}{\lflow\  - \lfhigh}	\\
		\gcell{HF Band}    	& $Hz$  & \multicolumn{4}{c}{\hflow\  - \hfhigh}	\\\hline
	\end{tabular}
\end{table*}

\newpage
\begin{figure}[t!]
	\centering
	% Welch PSD
	\ifwelch
		\includegraphics[width=\textwidth]{figures/fftplot.png}
		\vspace{-7mm}
		\caption{Welch's method with resampling frequency of \fftresamplingfrequency\ Hz, \fftwindow\ window, \fftinterpolation\ interpolation, and \fftnfft\ samples over the entire signal.}
		\vfill
	\fi
    % AR PSD
    \ifar
		\includegraphics[width=\textwidth]{figures/arplot.png}
		\vspace{-7mm}
		\caption{Autoregressive method with model order \arorder\ and \arnfft\ samples over the entire signal.}
		\vfill
	\fi
    % Lomb PSD
    \iflomb
		\includegraphics[width=\textwidth]{figures/lombplot.png}
		\vspace{-7mm}
		\caption{Lomb-Scargle method with moving average window size of \lombma\ samples and \lombnfft\ samples over the entire signal.}
		\vfill
	\fi
\end{figure}
\vfill
\clearpage


\documentclass[letter,10pt]{article}
\usepackage{TLCresume}
\begin{document}

\subsection{Mathematics for Machine Learning specialization}
\begin{zitemize}

\item Linear Algebra
\item multivariate calculus
\item Principal Component Analysis (PCA)

\end{zitemize}

\subsection{Deep Learning Specialization}
\begin{zitemize}

\item Neural Networks and Deep Learning
\item Hyperparameter Tuning, Regularization and Optimization
\item Convolutional Neural Networks

\end{zitemize}

\subsection{Cloud Application Developer 2019 - Mastery Award} \\*[20]

\subsection{Cloud Application Developer 2019 - Explorer Award}

\end{document}


\section{MPI Load Balancing}
\label{sec:mpi_bal}

To solve the load balance problem, a different strategy is sugested in \cite{paper} to implement the distribution of keys across each processor at the end of each iteration.

The original approach assigns each bucket to one processor. Since bucket have a wide range of sizes, this creates a big inbalance in key distribution. The approach used changes the division process. Each process is first required to receive all information about local bucket counts of all other processors, effectively getting information about how many elements are in every bucket of every process. With this information, a division can be mande across all this information, to equally distribute keys across each processor. \autoref{fig:mpi} illustrates this approach.

\begin{figure}[!htpb]
	\begin{center}
		\includegraphics[width=0.45\textwidth]{images/mpi_bal}
	\end{center}
	\caption{An illustration of the load balancing strategy used on the second MPI implementation}
	\label{fig:mpi}
\end{figure}


\documentclass{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
  \usetheme{Darmstadt}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{crane} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
  \usepackage{tikz}
  \usepackage{pgfplots}
  \usepackage{pgf}
  \usepackage{units}
  \usepackage{metalogo}
  \usepackage{graphicx}
  \usepackage{caption}
  \usepackage{subcaption}
  \usepackage[mode=buildnew]{standalone}% requires -shell-escape
  \usepgfplotslibrary{groupplots}
  \usepackage{amsmath}
}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\setbeamertemplate{footline}[frame number]

\title{Thesis Intermediate Presentation}
\author{Moritz Wolter}

\date{\today}

\begin{document}
\begin{frame}
  \titlepage
\end{frame}

% Uncomment these lines for an automatically generated outline.
\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\section{Overview}
\begin{frame}{Project Overview}
	\begin{itemize}
		\item Transcribe speech utterances to characters.
		\item Use a listen attend and spell (LAS) model to do this.
		\item Train model components jointly.
	\end{itemize}
\end{frame}

\section{Preprocessing}
\begin{frame}{Mel-Scale and Mel-Filter-Banks}
\begin{figure}
	\includestandalone[height=4 cm]{../tikz/melScale}
	\includestandalone[height=4 cm]{../tikz/melBank}
	\caption{The Mel scale and mel banks.}
	\label{fig:melBank}
\end{figure}
\end{frame}

\begin{frame}{Mel-Scale and Mel-Filter-Banks}
\begin{align}
	B(f) = 1125 ln(1 + f / 700)
\end{align}
\begin{align}
	H_m &= 0 				                       & \text{if}\;\; & k < f[m-1] \\
	H_m &= \frac{k      - f[m-1] }{f[m] - f[m-1]}  &\text{if}\;\; & f[m-1] \leq k \leq f[m] \\
	H_m &= \frac{f[m+1] - k      }{f[m + 1] - f[m]}&\text{if}\;\; & f[m] \leq k \leq f[m+1] \\
	H_m &= 0									   &\text{if}\;\; & k > f[m+1]
\end{align}
\end{frame}

\section{Tools from Deep Learning}

\begin{frame}{Recurrent Neural Nets}
\begin{figure}
	\includestandalone[height=4 cm]{../tikz/recNet}
	\caption{Unrolling a recurrent neural net.}
\end{figure}
\end{frame}

\begin{frame}{Simple Cell}
	\begin{figure}
		\includestandalone[height=4 cm]{../tikz/recurrentCell}
		\caption{Simple recurrent cell.}
	\end{figure}
\end{frame}

\begin{frame}{Long Short Term Memory (LSTM)}
	\begin{figure}
		\includestandalone[height=6.5 cm]{../tikz/lstm}
		\caption{Visualization of the LSTM architecture}
		\label{fig:lstm}
	\end{figure}
\end{frame}

\begin{frame}{Long Short Term Memory (LSTM)}
	\begin{align}
	\mathbf{i_t} &= \sigma (\mathbf{W}_i [\mathbf{x}_t \; \mathbf{h_{t-1}} \; \mathbf{c_{t-1}}]^T + \mathbf{b}_i) \\
	\mathbf{f_t} &= \sigma (\mathbf{W}_f [\mathbf{x}_t \; \mathbf{h_{t-1}} \; \mathbf{c_{t-1}}]^T + \mathbf{b}_f) \\
	\mathbf{c_t} &= \mathbf{f}_t \mathbf{c_{t-1}} + \mathbf{i}_t \tanh( \mathbf{W}_c [\mathbf{x}_t \; \mathbf{h_{t-1}}]^T + \mathbf{b}_c ) \\
	\mathbf{o_t} &= \sigma (\mathbf{W}_o [\mathbf{x}_t \; \mathbf{h_{t-1}} \; \mathbf{c_t}]^T + \mathbf{b}_o ) \\
	\mathbf{h_t} &= \mathbf{o_t} \tanh(\mathbf{c_t})
	\end{align}
\end{frame}

\begin{frame}{Bidirectional LSTM}
	\begin{figure}
		\includestandalone[height=6.5 cm]{../tikz/blstm2}
		\caption{BLSTM architecture}
		\label{fig:blstm}
	\end{figure}
\end{frame}

\section{Listen Attend and Spell}

\begin{frame}{The LAS-Architecture}
\begin{figure}
\includestandalone[height=6.5 cm]{../tikz/lasArcBottomUp}
\caption{The LAS architecture}
\label{fig:las}
\end{figure}
\end{frame}

\begin{frame}{Listener}
\begin{itemize}
	\item Pyramidal Bidirectional long short term memory (\textit{pBLSTM}).
	\item Pyramid structure compresses the features.
	\item Three \textit{pBLSTM}s on top of a \textit{BLSTM} layer $\Rightarrow$ compression factor $2^3 = 8 $.
	\item Pyramidal inputs concatenate the out put from previous layers:
		  \begin{align}
		  	\mathbf{h}_i^j = \text{pBLSTM}(\mathbf{h}_{i-1}^j, [\mathbf{h}_{2i}^{j-1}, \mathbf{h}_{2i+1}^{j-1}])
		  \end{align}
	\item $i$ denotes the time step (from $0$) and $j$ the layer.
\end{itemize}
\end{frame}

\begin{frame}{Attend and Spell}
\begin{itemize}
	\item attention based \textit{LSTM} transducer.
	\item Find the most likely character given the features and previously found letter-probabilities.
		  \begin{align}
			\mathbf{c}_i &= \text{AttentionContext}(\mathbf{s}_i,\mathbf{H}) \\
			\mathbf{s}_i &= \text{RNN}(\mathbf{s}_{i-1},\mathbf{y}_{i-1},\mathbf{c}_{i-1}) \\
			P(\mathbf{y}_i|\mathbf{x},y_{<i}) &= \text{CharacterDistribution}(\mathbf{s}_i,\mathbf{c}_{i})
		  \end{align}

\end{itemize}
\end{frame}
\begin{frame}{Attention Context}
	\begin{itemize}
		\item Produce a context vector $\mathbf{c}_i$, with alignment information.
			  \begin{align}
			  	e_{i,u} &= \phi(\mathbf{s}_i)^T \psi(\mathbf{h}_u) \\
			  	\alpha_{i,u} &= \frac{\exp(e_{i,u})}{\sum_u exp(e_{i,u})} \\
			  	\mathbf{c}_i &= \sum\limits_{u} \alpha_{i,u}\mathbf{h}_u
			  \end{align}
		\item $\phi$ and $\psi$ are feed-forward MLP networks.
		\item $\mathbf{s}_i$ is the decoder state.
		\item The $\alpha$s work like a sliding window.
		\item $U$ denotes the total number of feature vectors.
	\end{itemize}
\end{frame}

\begin{frame}{Decoding and Rescoring}
\begin{itemize}
	\item Humans do not read character distributions.
	\item Left to right beam search turns distributions into text.
	\item Generate a tree using the $n$ most likely characters.
	\item Select from the tree according to:
		\begin{align}
		s(\mathbf{y}|\mathbf{x}) = \frac{\log P(\mathbf{y}|\mathbf{x})}{ |\mathbf{y}|_c} + \lambda \log P_{LM}(\mathbf{y})
		\end{align}
	\item The first summand is the total probability found from the tree.
	\item The second summand is a weighted language model contribution.
\end{itemize}
\end{frame}

\begin{frame}{What is Tensorflow?}
	\begin{itemize}
		\item \textquotedblleft TensorFlow is an interface for expressing machine learning algoritms and an implementation for executing such algorithms. \textquotedblright \footnote{TensorFlow:
			  Large-Scale Machine Learning on Heterogeneous Distributed Systems, Abadi et al, Google Research.}
		\item Computations are described by directed graphs.
		\item Data-Tensors flow along graph edges.
		\item Graphs are constructed using user specified elementary
			  operations.
		\item Computations are started by requesting certain values, which leads
			  to (partial) evaluation of the graph.
	\end{itemize}
\end{frame}

\begin{frame}{Tensorflow}
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{../png/net1}
\caption{A simple linear node in tensorboard}
\label{fig:net1}
\end{figure}
\end{frame}

\section{Planning}
\begin{frame}{What happend so far? What will happen next?}
\begin{itemize}
\item What happend so far?
	\begin{enumerate}
		\item Literature overview.
		\item Learned how to use tensorflow.
		\item Looked into timit and aurora4.
	\end{enumerate}
\item What will happen next?
		\begin{enumerate}
			\item Finish implementing a skeleton LAS on Timit.
			\item Decoding with beam search.
			\item Port to aurora4.
		\end{enumerate}
\end{itemize}
\end{frame}

\section{Questions}
\begin{frame}{Summary and Questions}
	The presentation covered:
	\begin{itemize}
		\item Input feature generation.
		\item The LSTM building block.
		\item A LAS-Architecture overview.
		\item The tensorflow toolbox.
		\item The plan.
	\end{itemize}
	Thank you for your attention. Questions? \\
	\texttt{moritzalexander.wolter@student.kuleuven.be}
\end{frame}

\end{document}


% This is part of the TFTB Reference Manual.
% Copyright (C) 1996 CNRS (France) and Rice University (US).
% See the file refguide.tex for copying conditions.

\section*{Glossary and summary}

This section contains detailed descriptions of all the Time-Frequency Toolbox
functions. It begins with a glossary and a list of functions grouped by
subject area and continues with the reference entries in alphabetical
order. Information is also available through the online help facility.

\vspace*{1cm}

\begin{center}
\begin{tabular}{|c|c|}
\hline
AF & Ambiguity function\\
AR & Auto-regressive (filter or model)\\
ASK & Amplitude shift keyed signal\\
BJD & Born-Jordan distribution\\
BPSK & Binary phase shift keyed signal\\
BUD & Butterworth distribution\\
CWD & Choi-Williams distribution\\
FM & Frequency modulation\\
FSK & Frequency shift keyed signal\\
GRD & Generalized rectangular distribution\\
HT & Hough transform\\
MHD & Margenau-Hill distribution \\
MHSD & Margenau-Hill-Spectrogram distribution \\
MMCE & Minimum mean cross-entropy\\
NAF & Narrow-band ambiguity function\\
PMHD & Pseudo Margenau-Hill distribution\\
PWVD & Pseudo Wigner-Ville distribution\\
QPSK & Quaternary phase shift keyed signal\\
RID & Reduced interference distribution\\
STFT & Short-time Fourier transform\\
TFR & Time-frequency representation\\
WAF & Wide-band ambiguity function\\
WVD & Wigner-Ville distribution\\
ZAM & Zhao-Atlas-Marks distribution\\
\hline
\end{tabular}
\end{center}


% Option 2:
% not finished, it is missing the results together

\section{Coupled simulations}

This section sets the road-map for conducting neutronics and thermal-fluids coupled simulations of prismatic HTGRs in Moltres.

\subsection{Discussion}
\label{sec:discuss}

This section analyzes Moltres' flaws at conducting prismatic HTGR coupled simulations.
% Describe moltres heterogenous capabilities as an MSR solver
Moltres' initial development targeted MSRs, allowing it to rely on heterogeneous diffusion calculations.
In a heterogeneous solver, each mesh node holds the information of each variable.
In an MSR simulation, Moltres defines the neutron flux and the temperature on each node.
Each node uses its temperature to compute the thermal feedback on the neutron flux.

% Moltres should use average temperatures
As discussed in Chapter \ref{ch:neutronics}, in a prismatic HTGR simulation, the neutronics calculation requires an assembly-level homogenization of the group constants.
Because of the homogenization, a mesh node holds the group constants' combined information from the different materials in the assembly --- only the fuel and the moderator as the coolant does not contribute considerably.
As the fuel group constants depended on the fuel temperature, and the moderator group constants depended on the moderator temperature, the thermal feedback depends on both temperatures.
Hence, a mesh node should hold both temperatures.

Moltres uses a heterogeneous thermal-fluid model to solve the temperature in the reactor.
The problem with using a heterogeneous model is that each node only holds the temperature's value in that particular material.
A coolant node holds the coolant temperature information and computes the thermal feedback with such information instead of the moderator and fuel temperature.
For this reason, Moltres should use the average assembly-level fuel and moderator temperatures instead of the point-wise temperature to compute the thermal feedback.

% Moltres should differentiate Tmod and Tfuel
One possible strategy is to homogenize the fuel and the moderator into one material.
Such homogenization assumes that both the moderator and fuel are in thermal equilibrium, and therefore have the same temperature.
Consequently, the model does not differentiate the fuel temperature from the moderator temperature.
However, a coupling model cannot correctly calculate the thermal feedback if it does not differentiate between the moderator and the fuel temperatures \cite{damian_vhtr_2008}.

We denominate this issue as the 'homogenization dilemma.'
To correctly compute neutronics, the diffusion solver must use homogenized parameters which depend on both moderator and fuel temperatures.
Simultaneously, to accurately calculate the thermal feedback, a mesh node should differentiate the moderator temperature from the fuel temperature, which require a heterogeneous calculation in the thermal-fluids model.
A thermal-fluid heterogeneous calculation is still valid, but the thermal feedback should use fuel and moderator average temperatures instead.
Next section develops a model that relies on this strategy.

\subsection{OECD/NEA MHTGR-350 MW Benchmark: Phase I Exercise 3}
\label{sec:ph1ex3}

% description of the exercise
This section conducted Phase I Exercise 3 of the benchmark with Moltres/MOOSE.
Exercise 3 combines all the data from the first two exercises, in which the participants need to determine a coupled neutronic and thermal-fluids solution.
The exercise requires the reporting of the same parameters reported in Exercises 1 and 2 combined.
The benchmark specifies the group constants necessary to conduct the exercise.
The group constants depend on four state parameters: moderator and fuel temperature and xenon-135 and hydrogen concentration.
In addition to these data, the benchmark provides fluence maps to determine the thermal conductivity of graphite.

Two sub-cases compose Exercise 3:
\begin{itemize}
  \item Exercise 3a: Same thermal-fluids problem definition from Exercise 2c. This exercise prescribes the bypass flow distribution and the thermo-physical properties depend on different simulation parameters.
  \item Exercise 3b: Same thermal-fluids problem definition from Exercise 2d. This exercise solves the bypass flow distribution through the explicit modeling of the bypass gaps. The thermo-physical properties depend on different simulation parameters.
\end{itemize}

% initial coupling: description of what I've done
Section \ref{sec:ph1ex2} solved the thermal-fluids standalone problem using a global and a sub-channel model.
Those simulations required running two separate input files, where the output of the global model served as an input to the sub-channel model.
Exercise 3 requires modeling the temperature feedback.
Using Section \ref{sec:ph1ex2} approach for the temperature feedback would require the fully-coupled simulation of both input files.
However, MOOSE framework does not have the capability to couple these specific problem input files.
To solve Exercise 3, we created a different model that homogenizes the fuel and moderator materials.
The solution did not differentiate between moderator and fuel, thus requiring the simulation of only the global model.

% describe the model
Figure \ref{fig:coupled-mesh} presents the model geometry.
The model includes 28 fuel and 29 coolant rings.
We calculated the radii of the rings by preserving the assemblies' and the coolant volume.
The coolant ring pitch is the coolant channel pitch in a fuel assembly.
Exercise 3a requires using material properties from Exercise 2c.
The simplified model used the material properties from Exercise 2a, as shown in Table \ref{tab:th-ex2a}.
The benchmark prescribes the group constants of 232 regions in the reactor.
Table \ref{tab:coupled-rz} shows what benchmark sub-domains integrate each model region.
The model did not include the control rod region (sub-domain 232).
The simulations used a three energy-group structure.
Table \ref{tab:coupled-eg} indicates what benchmark group numbers integrate each model group.
Conducting this exercise required the development of a tool to translate the benchmark group constants to Moltres format.
The tool was responsible for homogenizing and collapsing the group constants as well.
The problem assumed the same boundary conditions from Section \ref{sec:ph1ex2}.

Because Moltres can decouple the neutronics from the thermal-fluid effects, for the sake of comparison, we conducted the exercise with and without thermal feedback.
The calculations without thermal feedback assumed the group constants at 550 $^{\circ}$C.
The thermal feedback calculations used two strategies: one uses the point-wise temperature, and the second the average temperature to compute the feedback.
Figure \ref{fig:coupled-results-flux} and \ref{fig:coupled-results-th} display the results on two arbitrary located lines across the core.

The thermal feedback affects the flux, which consequently affects the thermal-fluids.
The axial flux peak moves towards the reactor top, where the temperatures are lower than the bottom.
Thus, the heat production shifts towards the reactor top, and the temperatures near the reactor outlet decrease.
The radial flux does not change considerably, hence the temperature profile does not change much either.
The thermal feedback moves the radial temperature profile up because of the heat production shift towards the top.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=0.45\linewidth]{figures-thermal/ex3-mesh}
  \hfill
  \caption{Model geometry.}
  \label{fig:coupled-mesh}
\end{figure}

\begin{table}[htbp!]
\centering
      \caption{Homogenization scheme.}
      \label{tab:coupled-rz}
    \begin{tabular}{l c}
  \toprule
  Model homogenized region & Benchmark sub-domains \\
  \midrule
  Fuel               & 1-220   \\
  Bottom reflector   & 221-224 \\
  Top reflector      & 228-231 \\
  Inner reflector    & 225     \\
  Outer reflector    & 226-227 \\
  \bottomrule
  \end{tabular}
\end{table}

\begin{table}[htbp!]
\centering
      \caption{Energy group condensation scheme.}
      \label{tab:coupled-eg}
    \begin{tabular}{c c}
  \toprule
  Model group number & Benchmark group number \\
  \midrule
  1 & 1-4   \\
  2 & 5-15  \\
  3 & 16-26 \\
  \bottomrule
  \end{tabular}
\end{table}

\begin{figure}[htbp!]
  \centering
    \subfloat[Axial flux over the line at r=85 cm.]{
        \includegraphics[width=0.45\textwidth]{figures-thermal/coupledD-3G-axial}
    }
    \subfloat[Radial temperature at z=L/2=556.5 cm]{
        \includegraphics[width=0.45\textwidth]{figures-thermal/coupledD-3G-radial}
    }
  \hfill
  \caption{Flux profiles. F: thermal feedback, NF: no thermal feedback.}
  \label{fig:coupled-results-flux}
\end{figure}

\begin{figure}[htbp!]
  \centering
    \subfloat[Axial temperature at r=85 cm.]{
        \includegraphics[width=0.45\textwidth]{figures-thermal/coupledD-3G-axialT}
    }
    \subfloat[Radial temperature at z=L/2=556.5 cm]{
        \includegraphics[width=0.45\textwidth]{figures-thermal/coupledD-3G-radialT}
    }
  \hfill
  \caption{Temperature profiles. F: thermal feedback, NF: no thermal feedback.}
  \label{fig:coupled-results-th}
\end{figure}