content
stringlengths 1
15.9M
|
---|
\section{Introduction}
Stern {\cite{stern-scalar-2020}} showed an interesting formula relating the
level set of harmonic functions and the scalar curvature of a 3-manifold. With
Bray {\cite{bray-scalar-2019}}, they generalized the result to 3-manifold with
boundary where a harmonic 1-form with vanishing normal component along the
boundary was studied. Different from {\cite{bray-scalar-2019}}, we send the
boundary to a point i.e. we study a Dirichlet boundary condition. We obtain a
similar formula, and then we combine the technique with
{\cite{stern-scalar-2020,bray-scalar-2019}} to study the dihedral rigidity of
standard cubes in $\mathbb{R}^3$.
\begin{theorem}
\label{dirichlet condition}For a harmonic map $u : N^3 \to \mathbb{S}^1$
with a Dirichlet condition $u|_{\partial N} = [0] \in \mathbb{S}^1$ and for
almost all $\theta \in \mathbb{S}^1$ the level set $\Sigma_{\theta} = u^{-
1} (\theta)$ being closed, we have the inequality
\begin{equation}
\int_N \tfrac{1}{2} [\tfrac{| \mathrm{Hess} u|^2}{| \mathrm{d} u|} + R_N |
\mathrm{d} u|_{}] + \int_{\partial N} H_{\partial N} | \mathrm{d} u|
\leqslant 2 \pi \int_{\mathbb{S}^1} \chi (\Sigma_{\theta}),
\label{dirichlet inequality}
\end{equation}
where $R_N$ is the scalar curvature of $N$ and $H_{\partial N}$ is the mean
curvature of $\partial N$.
\end{theorem}
\begin{remark}
The first author learned from Pengzi Miao that the theorem appeared in
general form {\cite[Proposition 2.2]{hirsch-mass-2020}} for harmonic
functions.
\end{remark}
This result and the one in {\cite{bray-scalar-2019}} suggest that it is
worthwhile to consider harmonic maps to $\mathbb{S}^1$ with mixed boundary
conditions. We study the problem on three dimensional cubes. We identify
$\mathbb{S}^1$ with $\mathbb{R}/\mathbb{Z}$ and use $[r]$, $r \in \mathbb{R}$
to denote an element of $\mathbb{S}^1$. Let $(Q^3, g)$ be a Riemannian
manifold diffeomorphic to a standard unit cube in $\mathbb{R}^3$, $T$ and $B$
be respectively the top and bottom face, $F$ be the union of side faces, $\nu$
be the outward unit normal to each face. The angle $\gamma$ formed by
neighboring two unit normals is called exterior dihedral angle and $\pi -
\gamma$ is called the dihedral angle between two neighboring faces. We assume
that the dihedral angles are everywhere equal to $\pi / 2$. For the general
case, we can use the bending construction of Gromov
({\cite{gromov-metric-2018}}, {\cite{li-dihedral-2020}}) to reduce to the case
where dihedral angles are everywhere equal to $\pi / 2$.
\begin{theorem}[{\cite{li-polyhedron-2020}}, {\cite{li-dihedral-2020}}]
\label{dihedral}Unless $(Q^3, g)$ is isometric (up to constant multiple of
the metric) to the standard Euclidean cube, the following three conditions
cannot be satisfied at the same time on the cube $(Q^3, g)$:
\begin{enumerate}
\item The scalar curvature of $Q^3$ is nonnegative;
\item Every face of $Q^3$ is mean convex;
\item The dihedral angle is equal to $\pi / 2$ everywhere along each edge.
\end{enumerate}
We assume that the metric is $C^{2, \alpha}$ for some $\alpha \in (0, 1)$.
\end{theorem}
This theorem was conjectured as the \text{{\itshape{dihedral rigidity}}} by
Gromov {\cite{gromov-dirac-2014}} and was verified by Li
{\cite{li-polyhedron-2020}}, {\cite{li-dihedral-2020}} using free boundary
minimal surfaces. {\color{blue}{We solve the Laplace equation with Dirichlet
condition on bottom and top faces, and with Neumann boundary condition along
side faces, then we apply the level set method of Stern. We address the
regularity of the problem in the Appendix.}}
We mention two interesting questions. For the cone type polyhedron, it seems
desirable to find a boundary condition which is analogue to the capillary
condition of the minimal surface. The second question is about the spacetime
version of the problem. Recently {\cite{bray-harmonic-2019}} proved the
Riemannian positive mass theorem using harmonic coordinate method, which later
was generalized to spacetime by {\cite{hirsch-spacetime-2020}}. Recall that a
function $u \in C^2 (Q)$ is called \text{{\itshape{spacetime harmonic}}} if
\[ \Delta_g u + \mathrm{tr}_g k | \nabla u| = 0\ \text{in } Q, \label{spacetime
harmonic} \]
where $k$ is a prescribed symmetric 2-tensor. The natural boundary condition
is $u = 0$ along bottom and top faces of $Q$ and $\tfrac{\partial u}{\partial
\nu} = 0$ along side faces. A preliminary calculation shows that with these
mixed boundary conditions it will give a spacetime version of the
{\cite{li-polyhedron-2020}} if we can control the level set topology and
assuming corresponding convexity conditions.
In the last section, we give one application to a hyperbolic 3-manifold, a
mapping torus by a pseudo-Anosov map. Usually, people use Kleinian group
theory to attack such a problem, but we use a simple differential geometric
approach of harmonic maps.
\begin{theorem}
\label{main1}Let $M_{\phi}$ be a mapping torus of a closed surface $S$ of
genus $g \geq 2$ via a pseudo-Anosov map $\phi$. Then
\[ g \leqslant \frac{3}{4 C\pi \| \phi \|} \mathrm{vol} (M_{\phi}) + 1, \]
where $\| \phi \|$ is the translation length of a hyperbolic isometry
defined by $\phi$ and $C$ is a constant depending only on $S$ and the injectivity
radius of $M_\phi$.
\end{theorem}
It seems there would be more applications to 3-manifold topology as in
{\cite{bray-scalar-2019}}, which should be explored more in a near future.
\text{{\bfseries{Acknowledgement}}} The first author would like to thank
Martin Li (CUHK) and Shanjiang Chen (CUHK) for discussions on mixed boundary
value problems, and Pengzi Miao (Miami University) for the reference
{\cite{hirsch-mass-2020}}. The second author thanks Y. Minsky for the
correspondence about the geometric model of the mapping torus, and S. Kojima
for answering questions about his work.
\section{Formula for Laplacian of energy of harmonic map to the circle}
In this section we collect some basic formulas for Laplacian of energy of
harmonic map to the circle. The reference is {\cite{stern-scalar-2020}}. Let
$u : N \to \mathbb{S}^1$ be a harmonic map from a closed Riemannian 3-manifold
to the unit circle.
Choose an orthonormal frame $e_1, e_2, e_3$ adapted to $\Sigma_{\theta} = u^{-
1} (\theta)$, so that $e_1, e_2$ are tangential to $\Sigma_{\theta}$, and $e_3
= \frac{\nabla u}{| \nabla u|}$. Let $R_{ij}$ denote the sectional curvature
of $N$ for the section $e_i \wedge e_j$. The symmetric quadratic tensor
$(h_{ij} = \langle D_{e_i} e_3, e_j \rangle)$ is the second fundamental form
$k_{\Sigma_{\theta}}$ for $\Sigma_{\theta}$. Note that $k_{\Sigma_{\theta}} =
(| \nabla u|^{- 1} D \mathrm{d} u) |_{\Sigma_{\theta}}$.
Then Gauss equation gives
\[ K = R_{12} + h_{11} h_{22} - h_{12}^2, \]
and the scalar curvature $R_N$ of $N$ is
\[ R_N = 2 (R_{12} + R_{13} + R_{23}) \]
and
\[ \mathrm{Ric} (e_3, e_3) = R_{13} + R_{23} . \]
The mean curvature $H_{\Sigma_{\theta}} = \mathrm{tr} k_{\Sigma_{\theta}}$ is
$h_{11} + h_{22}$ and the scalar curvature $R_{\Sigma_{\theta}}$ is $2 K$.
Hence
\[ \mathrm{Ric} (e_3, e_3) = \frac{1}{2} (R_N - R_{\Sigma_{\theta}} +
H^2_{\Sigma_{\theta}} - |k_{\Sigma_{\theta}} |^2) . \]
Using harmonicity of $u$, one can verify that
\[ | \nabla u|^2 (H^2_{\Sigma_{\theta}} - |k_{\Sigma_{\theta}} |^2) = 2 |
\mathrm{d} | h||^2 - |Dh|^2, \]
and one can rewrite
\begin{align}
& \mathrm{Ric} (\nabla u, \nabla u) \\
= & | \nabla u|^2 \mathrm{Ric} (e_3, e_3) \\
= & \frac{1}{2} | \nabla u|^2 (R_{\Sigma_{\theta}} - R_{\Sigma_{\theta}})
+ \frac{1}{2} (2| \mathrm{d} | \nabla u||^2 - |D \mathrm{d} u|^2) .
\label{schoen yau}
\end{align}
Then using the standard Bochner identity for $\mathrm{d} u$
\begin{equation}
\Delta_g \frac{1}{2} | \nabla u|^2 = |D \mathrm{d} u|^2 + \mathrm{Ric}
(\mathrm{d} u, \mathrm{d} u), \label{bochner harmonic one form}
\end{equation}
one can deduce the formula as in {\cite{stern-scalar-2020}}
\begin{equation}
2 \int_N \frac{| \mathrm{d} u|}{2} R_{\Sigma_{\theta}} = 4 \pi \int_{\theta}
\chi (\Sigma_{\theta}) \mathrm{d} \theta \geqslant \int_N R_N | \mathrm{d}
u|, \label{average}
\end{equation}
if $N$ is closed where the first equality follows from the coarea formula and
Gauss-Bonnet theorem. Let $\varphi_{\delta} = \sqrt{|h|^2 + \delta}$ with
$\delta > 0$, it follows that
\begin{equation}
\Delta \varphi_{\delta} = \tfrac{1}{\varphi_{\delta}} [\tfrac{1}{2} \Delta
|h|^2 - \tfrac{|h|^2}{\varphi_{\delta}^2} | \mathrm{d} |h||^2] \geqslant
\tfrac{1}{\varphi_{\delta}} [|Dh|^2 - | \mathrm{d} |h||^2 + \mathrm{Ric} (h,
h)] .
\end{equation}
Inserting \eqref{schoen yau} and Bochner formula \eqref{bochner harmonic one
form} into the above, we have that along regular level sets $\Sigma_{\theta}$
of $u$,
\begin{equation}
\Delta_g \varphi_{\delta} \geqslant \tfrac{1}{2 \varphi_{\delta}} [|
\mathrm{Hess} u|^2 + | \mathrm{d} u|^2 (R_N - R_{\Sigma_{\theta}})] .
\label{schoen-yau}
\end{equation}
\section{Application to rigidity of scalar curvature and mean curvature}
Let $N$ be a 3-manifold with boundary $\partial N \neq \emptyset$. We require
that $H_2 (N ; \mathbb{Z})$ is nontrivial. Let $\alpha$ be a nontrivial
element of $H_2 (N ; \mathbb{Z})$, then according to Poincar{\'e}-Lefschetz
duality that $H^1 (N, \partial N ; \mathbb{Z})$ is isomorphic to $H_2 (N,
\mathbb{Z})$. Let $\alpha^{\ast}$ be the corresponding element of $H^1 (N,
\partial N ; \mathbb{Z})$ under this isomorphism. \ Let $[N, \partial N :
\mathbb{S}^1]$ be the homotopy classes of maps from $N$ to $\mathbb{S}^1$
sending the boundary $\partial N$ to a point. Hence $\alpha$ determines a
nontrivial homotopy class in $[\tilde{u}] \in [N, \partial N : \mathbb{S}^1]$.
We minimize the energy in this homotopy class, we obtain a harmonic map $u \in
[\tilde{u}]$ satisfying the conditions in Theorem \ref{dirichlet condition}.
The Hodge-Morrey theory {\cite[Chapter 5]{giaquinta-cartesian-1998}} applied
to the relative cohomology class $[\tilde{u}^{\ast} (\mathrm{d} \theta)] \in
H^1 (N, \partial N ; \mathbb{Z})$ yields an energy minimizing representative
$u : N \to \mathbb{S}^1$.
\begin{proof}[Proof of Theorem \ref{dirichlet condition}]
Main computation was done already in {\cite{stern-scalar-2020}}. Note that
every level set $u^{- 1} (\theta)$ does not intersect the boundary $\partial
N$ except at the level $[0] \in \mathbb{S}^1$. Let $h = u^{\ast} (\mathrm{d}
\theta)$ be gradient 1-form, so $h$ is harmonic. Let $\varphi_{\delta} =
\sqrt{|h|^2 + \delta}$ with $\delta > 0$. From
{\cite[(14)]{stern-scalar-2020}}, we have that along regular level sets
$\Sigma$ of $u$,
\begin{equation}
\Delta_g \varphi_{\delta} \geqslant \tfrac{1}{2 \varphi_{\delta}} [|
\mathrm{Hess} u|^2 + | \mathrm{d} u|^2 (R_N - R_{\Sigma})] .
\end{equation}
Let $\mathcal{A} \subset \mathbb{S}^1$ be an open set containing the
critical values of $u$ and let $\mathcal{B}$ be the complement subset. So
$\mathcal{B}$ contains only regular values. We have
\begin{equation}
\int_{\partial N} \tfrac{\partial \varphi_{\delta}}{\partial \nu} =
\int_{u^{- 1} (\mathcal{A})} \Delta_g \varphi_{\delta} + \int_{u^{- 1}
(\mathcal{B})} \Delta_g \varphi_{\delta} . \label{integration by parts}
\end{equation}
Since $u$ is smooth by elliptic regularity, using local coordinates of
$\mathbb{S}^1$, $u$ is a harmonic function. By a direct calculation and
$u|_{\partial N} = [0]$ is constant along $\partial N$, so
\begin{equation}
\Delta_{\partial N} u = 0, \quad \Delta_g u = 0 = \Delta_{\partial N} u +
H_{\partial N} \langle h, \nu \rangle + \mathrm{Hess} (u) (\nu, \nu) .
\end{equation}
The above equality can be deduced via the following: Let $e_i$, $\nu$ be an
orthonormal frame of $N$, then
\begin{align}
\Delta u = & \sum_{e_i / / \partial N} \mathrm{Hess}_N u (e_i, e_i) +
\mathrm{Hess} u (\nu, \nu) \\
= & \sum_{e_i / / \partial N} (e_i e_i u - \nabla^N_{e_i} e_i u) +
\mathrm{Hess} u (\nu, \nu) \\
= & \sum_{e_i / / \partial N} (e_i e_i u - \nabla^{\partial N}_{e_i} e_i
u) - \langle \nabla^N_{e_i} e_i, \nu \rangle \langle \nabla u, \nu \rangle
+ \mathrm{Hess} u (\nu, \nu) \\
= & \Delta_{\partial N} u + H_{\partial N} \langle h, \nu \rangle +
\mathrm{Hess} (u) (\nu, \nu) .
\end{align}
Also, we have that
\begin{align}
\tfrac{\partial \varphi_{\delta}}{\partial \nu} & =
\tfrac{1}{\varphi_{\delta}} \mathrm{Hess} (u) (h, \nu) \\
& = \tfrac{\langle h, \nu \rangle}{\varphi_{\delta}} \mathrm{Hess} (u)
(\nu, \nu) \\
& = - \tfrac{|h|^2}{\varphi_{\delta}} H_{\partial N} . \label{boundary
mean curvature}
\end{align}
We have also globally on $N$ that (see {\cite{stern-scalar-2020}})
\begin{equation}
\Delta_g \varphi_{\delta} \geqslant - C_N |h|
\end{equation}
for some constant $C_N > 0$ depending only on $N$. We see that
\begin{equation}
- \int_{u^{- 1} (\mathcal{A})} \Delta \varphi_{\delta} \leqslant C_N
\int_{u^{- 1} (\mathcal{A})} |h| = C_N \int_{\mathcal{A}} |
\Sigma_{\theta} |, \label{critical estimate interior}
\end{equation}
where we have applied coarea formula. So we have from \eqref{schoen-yau},
\eqref{integration by parts} and taking limits as $\delta \to 0$,
\begin{align}
& \int_{u^{- 1} (\mathcal{B})} \tfrac{| \mathrm{d} u|}{2} (\tfrac{|
\mathrm{Hess} u|^2}{| \mathrm{d} u|^2} + R_N - R_{\Sigma}) \\
\leqslant & \lim_{\delta \to 0} \left[ \int_{\partial N} \tfrac{\partial
\varphi_{\delta}}{\partial \nu} - \int_{u^{- 1} (\mathcal{A})} \Delta_g
\varphi_{\delta} \right] \\
\leqslant & - \int_{\partial N} H_{\partial N} | \mathrm{d} u| + C_N
\int_{\mathcal{A}} | \Sigma_{\theta} | .
\end{align}
Rearranging and applying the coarea formula once again, we have that
\begin{align}
& \int_{u^{- 1} (\mathcal{B})} \tfrac{| \mathrm{d} u|}{2} (\tfrac{|
\mathrm{Hess} u|^2}{| \mathrm{d} u|^2} + R_N) + \int_{\partial N}
H_{\partial N} | \mathrm{d} u| \\
\leqslant & \tfrac{1}{2} \int_{\theta \in \mathcal{B}}
\int_{\Sigma_{\theta}} R_{\Sigma} + C_N \int_{\mathcal{A}} |
\Sigma_{\theta} | \\
= & 2 \pi \int_{\theta \in \mathcal{B}} \chi (\Sigma_{\theta}) + C_N
\int_{\mathcal{A}} | \Sigma_{\theta} | .
\end{align}
In the last line, we have used Gauss-Bonnet theorem. Since $\mathcal{H}^1
(\mathcal{A})$, the Hausdorff measure, can be made arbitrarily small using
the Sard theorem and $\theta \mapsto | \Sigma_{\theta} |$ is integrable over
$\mathbb{S}^1$ by coarea formula, sending $\mathcal{H}^1 (\mathcal{A})$ to
zero leads to our inequality \eqref{dirichlet inequality}.
\end{proof}
Now we discuss Theorem \ref{dihedral}. Let $(x_1, x_2, x_3)$ be the
coordinates on $Q = Q^3$ induced by the diffeomorphism $\Phi$ from $[0, 1]^3$,
and we identify the top face with $\{x_3 = 1, 0 \leqslant x_1, x_2 \leqslant
1\}$ and the bottom face with $\{x_3 = 0, 0 \leqslant x_1, x_2 \leqslant 1\}$.
We consider the class of maps which are homotopic to the map $\tilde{u} : Q
\to \mathbb{S}^1$ given by
\begin{equation}
\tilde{u} (x_1, x_2, x_3) = [x_3]
\end{equation}
and takes the value $[0] \in \mathbb{S}^1$ at $x_3 = 0$ and $x_3 = 1$. By
Poincar{\'e}-Lefschetz duality,
\begin{equation}
H^1 (Q, T \cup B ; \mathbb{Z}) \cong H_2 (Q, F ; \mathbb{Z}) .
\end{equation}
One can associate the homotopy class $[\tilde{u}]$ to an element $\alpha \in
H_2 (Q, F ; \mathbb{Z})$ where $\tilde{u}^{- 1} (\theta)$ represents $\alpha$.
We do minimization of the energy in this homotopy class. The Hodge-Morrey
theory {\cite[Chapter 5]{giaquinta-cartesian-1998}} slightly modified to mixed
boundary conditions applied to the relative cohomological class
$[\tilde{u}^{\ast} (\mathrm{d} \theta)] \in H^1 (Q, T \cup B ; \mathbb{Z})$
yields an energy minimizing representative $u : Q \to \mathbb{S}^1$ with
Sobolev regularity. The existence of a harmonic map is equivalent to the
existence of a solution $u$ to the following mixed boundary value problem
\begin{equation}
\Delta_g u = 0\ \text{in } Q, \tfrac{\partial u}{\partial \nu} = 0\
\text{along } F, u = 1\ \text{on } T, u = 0\ \text{on } B. \label{mvp}
\end{equation}
Indeed, if $0 \leqslant u \leqslant 1$ in $\bar{Q}$, after identifying 0 and
1, the solution to the above gives a harmonic map $u$ from $Q$ to
$\mathbb{S}^1$. In fact, we can show that $u \in C^{2, \alpha} (\bar{Q},
\mathbb{S}^1)$ (See Theorem \ref{general existence}).
\begin{proof}[Proof of Theorem \ref{dihedral}]
The harmonic map equation reduces to the harmonicity of the pull back 1-form
$h = u^{\ast} (\mathrm{d} \theta)$. That is, the harmonic map equation gives
\begin{equation}
\mathrm{d} h = 0, \quad \mathrm{d}^{\ast} h = 0\ \text{in } Q.
\label{harmonic 1-form}
\end{equation}
Since $u$ takes fixed values at top and bottom faces, the 1-form $h$ has
only a normal component along $T$ and $B$. The Dirichlet boundary condition
gives
\begin{equation}
h \wedge \nu = 0\ \text{on } T \cup B. \label{dirichlet}
\end{equation}
And $h$ satisfies the Neumann condition
\begin{equation}
\langle h, \nu \rangle = 0\ \text{on } F. \label{neumann}
\end{equation}
From Sard's theorem, the level set $u^{- 1} (\theta)$ is a $C^1$ submanifold
of $Q$ and hence multiple copies of squares.
Let $\mathcal{A} \subset \mathbb{S}^1$ be an open set containing the
critical values of $u$ and let $\mathcal{B}$ be the complement subset. So
$\mathcal{B}$ contains only regular values. From integration by parts,
\begin{equation}
\int_{T \cup B} \tfrac{\partial \varphi_{\delta}}{\partial \nu} + \int_F
\tfrac{\partial \varphi_{\delta}}{\partial \nu} = \int_{u^{- 1}
(\mathcal{A})} \Delta_g \varphi_{\delta} + \int_{u^{- 1} (\mathcal{B})}
\Delta_g \varphi_{\delta} . \label{integration by parts cube}
\end{equation}
Similar to \eqref{boundary mean curvature}, we have
\begin{equation}
\int_{T \cup B} \tfrac{\partial \varphi_{\delta}}{\partial \nu} = -
\int_{T \cup B} H_{\partial N} \tfrac{|h|^2}{\varphi_{\delta}} \to -
\int_{T \cup B} H_{\partial N} | \mathrm{d} u| \label{mean curvature top
and bottom}
\end{equation}
as $\delta \to 0$. Similar to {\cite{bray-scalar-2019}}, with
$\tfrac{\partial \varphi_{\delta}}{\partial \nu} = \langle \mathrm{d}
\varphi_{\delta}, \nu \rangle = - \varphi_{\delta}^{- 1} \langle h, D_h \nu
\rangle$ using the Neumann condition on $F$, and $(\kappa_{\partial
\Sigma_{\theta}} - H_{\partial N}) | \mathrm{d} u| = - |h|^{- 1} \langle h,
D_h \nu \rangle$ we have that
\begin{align}
& \lim_{\delta \to 0} \int_F \tfrac{\partial \varphi_{\delta}}{\partial
\nu} \\
= & \lim_{\delta \to 0} [\int_{F \cap u^{- 1} (\mathcal{A})}
\tfrac{\partial \varphi_{\delta}}{\partial \nu} + \int_{F \cap u^{- 1}
(\mathcal{B})} \tfrac{\partial \varphi_{\delta}}{\partial \nu}] \\
\leqslant & C_Q \int_{\theta \in \mathcal{A}} | \partial \Sigma_{\theta}
| + \int_{F \cap u^{- 1} (\mathcal{B})} (\kappa_{\partial \Sigma_{\theta}}
- H_{\partial N}) | \mathrm{d} u| \label{mean curvature side}
\end{align}
as $\delta \to 0$. From \eqref{schoen-yau}, \eqref{critical estimate
interior} and \eqref{integration by parts cube},
\begin{equation}
\int_{u^{- 1} (\mathcal{B})} \tfrac{| \mathrm{d} u|}{2} (\tfrac{|
\mathrm{Hess} u|^2}{| \mathrm{d} u|^2} + R_Q - R_{\Sigma}) \leqslant
\int_{T \cup B} \tfrac{\partial \varphi_{\delta}}{\partial \nu} + \int_F
\tfrac{\partial \varphi_{\delta}}{\partial \nu} + C_Q \int_A |
\Sigma_{\theta} | .
\end{equation}
Inserting \eqref{mean curvature top and bottom} and \eqref{mean curvature
side} into the above (with some re-ordering) and taking $\delta \to 0$,
using $\tfrac{\partial \varphi_{\delta}}{\partial \nu} = - |h| H_{\partial
Q}$ on $T \cup B$ we have
\begin{align}
& \int_{u^{- 1} (\mathcal{B})} \tfrac{| \mathrm{d} u|}{2} (\tfrac{|
\mathrm{Hess} u|^2}{| \mathrm{d} u|^2} + R_Q) + \int_{F \cap u^{- 1}
(\mathcal{B})} H_{\partial Q} | \mathrm{d} u| + \int_{T \cup B}
H_{\partial Q} | \mathrm{d} u| \\
\leqslant & \int_{u^{- 1} (\mathcal{B})} \tfrac{1}{2} R_{\Sigma} |
\mathrm{d} u| + \int_{F \cap u^{- 1} (\mathcal{B})} \kappa_{\partial
\Sigma_{\theta}} | \mathrm{d} u| + C_Q (\int_{\theta \in \mathcal{A}} |
\Sigma_{\theta} | + | \partial \Sigma_{\theta} |) \\
= & \int_{\theta \in \mathcal{B}} \int_{\Sigma_{\theta}} \tfrac{1}{2}
R_{\Sigma} + \int_{\theta \in \mathcal{B}} \int_{\partial \Sigma_{\theta}}
\kappa_{\partial \Sigma_{\theta}} + C_Q (\int_{\theta \in \mathcal{A}} |
\Sigma_{\theta} | + | \partial \Sigma_{\theta} |) \\
= & \int_{\theta \in \mathcal{B}} [2 \pi \chi (\Sigma_{\theta}) - \sum_j
\gamma_j] + C_Q (\int_{\theta \in \mathcal{A}} | \Sigma_{\theta} | + |
\partial \Sigma_{\theta} |) .
\end{align}
Here we have used the coarea formula and the Gauss-Bonnet theorem (with
turning angle). By definition of Euler characteristic, we have that $\chi
(\Sigma_{\theta}) \leqslant 1$. Now we analyze the turning angle $\gamma_i$.
Note that $\gamma_i$ is $\pi$ minus the interior turning angle. By coarea
formula, we get the integrability of $\theta \mapsto | \Sigma_{\theta} |$.
Let $F_1$ and $F_2$ be any pair of neighboring side faces, $E = F_1 \cap
F_2$, $\nu_i$ be the normal of the face $F_i$, $\tau$ be the tangent vector
of $E$. We pick a point $p \in E$ which is not a vertex. We analyze the
gradient vector field $\nabla u$. Since that $\nabla u$ has no component in
$\nu_i$ direction according to the boundary condition and the vector $\tau$
is normal to both $\nu_1$ and $\nu_2$, so $\nabla u$ must be parallel to
$\tau$ along $E$. Therefore, $E$ intersects the level set $u^{- 1} (\theta)$
orthogonally. So $\nu_i$ coincides with the tangent vector of $u^{- 1}
(\theta) \cap F_j$ along $E$, and the exterior turning angle of $u^{- 1}
(\theta) \cap F_i$ to $u^{- 1} (\theta) \cap F_j$ is the same as the angle
forming by $\nu_1$ and $\nu_2$. So we have that
\begin{equation}
\int_{\theta \in \mathcal{B}} [2 \pi \chi (\Sigma_{\theta}) - \sum_j
\gamma_j] \leqslant \int_{\theta \in \mathcal{B}} \sum_{j = 1}^4
(\tfrac{\pi}{2} - \gamma_j) \leqslant 0 \label{angle}
\end{equation}
using that the dihedral angle is everywhere equal to $\pi / 2$. Here
$\gamma_j$ is the four turning angles. By Sard type theorem, we can take
$\mathcal{H}^1 (\mathcal{A})$ arbitrarily small, we have that
\begin{equation}
\int_Q \tfrac{| \mathrm{d} u|}{2} (\tfrac{| \mathrm{Hess} u|^2}{|
\mathrm{d} u|^2} + R_Q) + \int_{\partial Q} H_{\partial Q} | \mathrm{d} u|
\leqslant 0.
\end{equation}
By nonnegativity of $R_Q$ and $H_{\partial Q}$, we have that $\mathrm{Hess}
(u) \equiv 0$. We have that $R_Q \equiv 0$, $H_{\partial Q} \equiv 0$ and
$\gamma_j \equiv \pi / 2$ and every regular level set intersect the vertical
edges only four times. Fixing any component $S$ of the regular level set
$u^{- 1} (\theta)$. The map
\begin{equation}
\Psi : S \times \mathbb{R} \to Q, \quad \tfrac{\partial \Psi}{\partial t}
= \tfrac{\mathrm{grad} u}{| \mathrm{grad} u|} \circ \Psi
\end{equation}
gives a local isometry. Then $\Sigma$ has vanishing curvature and $\partial
\Sigma$ has vanishing geodesic curvature. This says that $Q$ is a three
dimensional Euclidean cube (up to a constant multiple of the metric).
\end{proof}
\section{Application to hyperbolic mapping torus}
In his geometrization program, Thurston proved that a mapping torus of a
surface of genus at least 2 by a pseudo-Anosov map is hyperbolizable. By
Mostow rigidity, this mapping torus has a unique hyperbolic structure, and
hence it has an associated hyperbolic volume. Then it is a natural question to
find the genus bound of the surface in terms of the volume. As an application
of a current technique, we give an upper bound for the genus in terms of the
volume and the hyperbolic translation length of the pseudo-Anosov map. The
main estimate is
\begin{theorem}
\label{main}Let $M_{\phi}$ be a mapping torus of a closed surface $S$ of
genus $g \geq 2$ via a pseudo-Anosov map $\phi$. Then
\[ g \leqslant \frac{3}{4 C\pi \| \phi \|} \mathrm{vol} (M_{\phi}) + 1, \]
where $\| \phi \|$ is the translation length of a hyperbolic isometry
defined by $\phi$ and $C$ is a constant depending only on $S$ and the injectivity
radius of $M_\phi$.
\end{theorem}
In the last section, we compare $\| \phi \|$ to the entropy of the
pseudo-Anosov map $\phi$. The entropy of a pseudo-Anosov map is $\log \lambda
(\phi)$ where $\lambda (\phi)$ is the dilatation of $\phi$. Another
interpretation of the entropy is the translation length of the action of
$\phi$ on the Teichm{\"u}ller space with respect to the Teichm{\"u}ller
metric.
Using Minsky's geometric model, one can show that the entropy $\mathrm{ent}
(\phi)$ and $\| \phi \|$ are comparable once $S$ is fixed and the injectivity
radius of the mapping torus $M_{\phi}$ is bounded below. Hence we obtain
\begin{theorem}
\label{thm2}{$\mbox{}$}
\[ \frac{1}{3 \pi | \chi (S) |} \mathrm{ent} (M_{\phi}) \leqslant
\mathrm{ent} (\phi) \leqslant \frac{3}{2 \pi | \chi (S) | K} \mathrm{ent}
(M_{\phi}), \]
where $K$ depends only on $S$ and the injectivity radius of $M_{\phi}$.
\end{theorem}
In general, if the injectivity radius goes to zero, $K$ also tends to zero.
Since there exist families of pseudo-Anosov maps whose entropy tends to
infinity while the volume of the mapping torus remains bounded, this is the
best that we can hope for except the explicit calculation of $K$. This
inequality is obtained in {\cite{kin-entropy-2009}} using Brock's inequality
{\cite{brock-weil-petersson-2003}}. Our proof relies on the harmonic map
technique in {\cite{stern-scalar-2020}}, and it is simpler.
\subsection{Genus bound for mapping torus}
Let $M_{\phi}$ be a hyperbolic mapping torus of $S$ via a pseudo-Anosov map
$\phi$ and
\[ u : M_{\phi} = S \times [0, 1] / (x, 0) \sim (\phi (x), 1) \to [0, 1] / 0
\sim 1 \]
the projection. On the infinite cyclic cover $S \times \mathbb{R}$, $\phi$
acts as a translation. Since $\pi_1 (M_{\phi}) = \langle \pi_1 (S), t|t \gamma
t^{- 1} = \phi_{\ast} (\gamma), \gamma \in \pi_1 (S) \rangle$, $\phi$
corresponds to a hyperbolic isometry $t$, and we denote $\| \phi \|$ the
translation length of $t$ on $\mathbb{H}^3$. This is the hyperbolic
translation length of $\phi$ on the infinite cyclic cover $S \times
\mathbb{R}$. Hence $\| \phi \|$ denotes the width of the fundamental domain of
$M_{\phi}$ on the cyclic cover $S \times \mathbb{R}$ where the left and right
sides are identified by the action of $\phi$.
\begin{figure}[h]
\begin{center}
\begin{tikzpicture}[x=1cm,y=1cm]
\begin{scope}[shift={(2,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,0) circle [x radius=0.6, y radius=1.3];
\end{scope}
\begin{scope}[shift={(2,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,0.6) circle [x radius=0.1, y radius=0.5];
\end{scope}
\begin{scope}[shift={(2,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,-0.6) circle [x radius=0.1, y radius=0.5];
\end{scope}
\begin{scope}[shift={(-3,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,0) circle [x radius=0.6, y radius=1.3];
\end{scope}
\begin{scope}[shift={(-3,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,0.6) circle [x radius=0.1, y radius=0.5];
\end{scope}
\begin{scope}[shift={(-3,0)}, thick]
\clip(-1.8,-2)rectangle(3,2);
\draw (0,-0.6) circle [x radius=0.1, y radius=0.5];
\end{scope}
\draw[thick] (-4,-1.3) -- (4,-1.3);
\draw[thick] (-4,1.3) -- (4,1.3);
\draw[thick] (-2, -3) -- (1.5, -3);
\draw (-2, -2.8) node{{0}};
\draw (1.5, -2.8) node{{1}};
\draw(0.5, -2) node{{$u$}};
\draw(0, -2) node{{$\downarrow$}};
\draw (-0.5, -0.6) node{{$\Longrightarrow$}};
\draw (4, 0) node{{$S\times {\mathbb R}$}};
\draw (0,0) node{{$\phi$}};
\draw (-2.3,0) node{{$\rightarrow$}};
\draw (-1.85,0) node{{${\nabla u}$}};
\draw (-3, -1.6) node{{$u^{-1}(0)$}};
\draw (2, -1.6) node{{$u^{-1}(1)$}};
\draw (-5,0) node{{\tiny $-\infty$}};
\end{tikzpicture}
\end{center}
\
\caption{Lifted map of $u$ to $S \times \mathbb{R} \rightarrow [0, 1]
\subset \mathbb{R}$.}
\end{figure}
Choose orthonormal basis $e_1, e_2$ tangent to $\Sigma_{\theta} = u^{- 1}
(\theta)$, $e_3$ such that $e_3 = \frac{\nabla u}{| \nabla u|}$.
Note that for any $x\in S\times \{0\}$, along the gradient flow starting from $x$
in $u^{-1}(0)$ to $u^{-1}(1)$, $u$ behaves like the projection from $[0, \text{length of the gradient flow}]$ to $[0,1]$. Hence $|du|\leq \frac{1}{ \text{length of the gradient flow}}\leq \frac{1}{\text{W=width of the fundamental domain}}$ where the width means the smallest distance between points in
$S\times\{0\}$ and in $S\times\{1\}$.
Then $$\| \mathrm{d}
u\|_{L^2}\leq \frac{\sqrt{\ensuremath{\operatorname{vol}} (M_{\phi})}}{(\text{W=width of the fundamental domain})}.$$
Let $u'$ be a harmonic map homotopic to $u$. For each regular $\theta \in
\mathbb{S}^1$, $u^{- 1} (\theta) = S$ and $u^{\prime - 1} (\theta) =
\Sigma_{\theta}$ are homotopic in $M_{\phi}$. Since $M_{\phi}$ is a mapping
torus of $S$, the genus of $\Sigma_{\theta}$ is bigger than the genus of $S$. By Sard's theorem,
$|\chi(\Sigma_{\theta})| \geq |\chi(S)|$ for almost all $\theta$ in $\mathbb{S}^1$. Hence by
equation \eqref{average}, we get
\begin{equation}
- 4 \pi \chi (S) \leqslant \| \mathrm{d} u' \|_{L^2} \|- 6\|_{L^2}
\leqslant 6 \sqrt{\mathrm{vol} (M_{\phi})} \| \mathrm{d} u\|_{L^2} =
\tfrac{6}{W} \mathrm{vol} (M_{\phi}) . \label{genus}
\end{equation}
Hence we get the genus bound of $S$
\[ g \leqslant \frac{3}{4 \pi W} \mathrm{vol} (M_{\phi}) + 1. \]
Once $S$ is fixed and if there is a lower bound for the injectivity radius of $M_\phi$, the diameter of $S$ is bounded in $M_\phi$. Since $\phi$ identifies $S\times \{0\}$ to $S\times \{1\}$, $||\phi||$ and $W$ are comparable, i.e., there exists $C=C(inj M_\phi, S)$ such that $W\geq C ||\phi||$. Hence the above inequality becomes and prove Theorem \ref{main}
\[ g \leqslant \frac{3}{4 C\pi ||\phi||} \mathrm{vol} (M_{\phi}) + 1. \]
\subsection{Interpretation of $\| \phi \|$ and some applications}
In this section, we interpret $\| \phi \|$ as a quantity comparable to
$\mathrm{ent} (\phi)$ and give an independent proof of Theorem \ref{thm2}.
By Minsky {\cite{minsky-bounded-2001}}, it is known that the infinite cyclic
cover $\tilde{M}_{\phi} = S \times \mathbb{R}$ has a geometric model, the
universal curve over the Teichm{\"u}ller geodesic $\Gamma$ invariant by $\phi$
parametrized by the arc length. More precisely the geometric model is built as
follows. Fix a hyperbolic surface $X_0 = X$ on $\Gamma$. The universal curve
$C_{\Gamma}$ over $\Gamma$ is the collection of $X_t$ where $X_t$ is a
hyperbolic surface at time $t$. The fundamental domain of $\phi$ is the subset
over $[X, \phi (X)]$. The Teichm{\"u}ller distance $d_T (X, \phi (X))$ is
known to be $\mathrm{ent} (\phi)$. Then there exists a biLipschitz map $\Phi :
\tilde{M}_{\phi} \to C_{\Gamma}$ with biLipschitz constant $K$ depending only
on $S$ and the injectivity radius of $M_{\phi}$. Hence the hyperbolic
translation distance $\| \phi \|$ of $\phi$ on $\tilde{M}_{\phi}$ is
comparable to $\mathrm{ent} (\phi) K$, i.e.
\[ K (S, \mathrm{inj} M_{\phi}) \mathrm{ent} (\phi) \leqslant \| \phi \| . \]
By equation \eqref{genus}, we get
\begin{equation}
\mathrm{ent} (\phi) \leqslant \frac{3}{2 \pi | \chi (S) | K} \mathrm{vol}
(M_{\phi}) .
\end{equation}
By combining the result of Kojima-McShane {\cite{kojima-normalized-2018}}, we
obtain
\begin{equation}
\frac{1}{3 \pi | \chi (S) |} \mathrm{vol} (M_{\phi}) \leqslant \mathrm{ent}
(\phi) \leqslant \frac{3}{2 \pi | \chi (S) | K} \mathrm{vol} (M_{\phi}) .
\end{equation}
One can compare this inequality with the inequality obtained by Brock
{\cite{brock-weil-petersson-2003}} by relating the entropy to Weil-Petersson
translation length. Indeed, the Weil-Petersson metric $g_{WP}$ and the
Teichm{\"u}ller metric $g_T$ satisfy the inequality $g_{WP} \leqslant 2 \pi |
\chi (S) | g_T$ in general, once the injectivity radius of $M_{\phi}$ has a
lower bound, there exists a constant $C$ depending only on the topology of $S$
and the lower bound of the injectivity radius {\cite{kin-entropy-2009}} such
that
\[ C^{- 1} \| \phi \|_{WP} \leqslant \mathrm{ent} (\phi) \leqslant C \| \phi
\|_{WP} . \]
|
\section*{Acknowledgments}
M.G. and M.Z. acknowledge funding from the Alexander von Humboldt Foundation. T.L. acknowledges funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 949431). This work is supported by the German Research Foundation (DFG) within FOR2247 under Pf381/16-1 and Bu2247/1, Pf381/20-1, FUGG INST41/1056-1 and the QUANT:ERA collaborative project MAQS.
|
\section{Introduction}
\label{sec:intro}
Transient dynamics, those that occur over short timescales, can often be vastly different from the asymptotic or long term dynamics of ecological systems. However, throughout the history of mathematical biology much of the work has focused on determining the asymptotic dynamics of biological systems. While the study of long-term dynamics has given ecologists many tools to analyze the behaviour of populations, these tools are often not the same as those required to understand transient dynamics. Recently Hastings et al. \cite{Hastings2018} have shown that transient dynamics are much more ubiquitous than previously assumed and long transients occur in many different ecological systems, from plankton and coral to voles and grouse. Studying the transient dynamics of an ecological system can give useful insight into the different processes that may occur after a disturbance, change in environmental conditions, or change in human intervention to a system. In some marine systems that are driven by environmental fluctuations, such as the Dungeness crab, transient dynamics may in fact be key to understanding how these systems behave \cite{Higgins1997}.
There has also been a recent push to characterize the different types of systems which display long transient dynamics that differ significantly from their asymptotic dynamics \cite{Morozov2020, Hastings2018, Hastings2004, Hastings2001}. Hastings et al. \cite{Hastings2018} have loosely categorized four different drivers of long transient dynamics in ecological systems: ghost attractors and crawl-bys, slow-fast dynamics, high dimensionality, and stochastic noise. These categories are not always distinct and certain systems may indeed fall into multiple categories. For example, a predator prey system may have a crawl-by past a saddle node which drives the transient dynamics in this system, but this could also be thought of as a difference in timescales of the predator decline due to lack of prey. For metapopulations the main driver of transient dynamics is often the high dimensionality arising due to spatial structure, though often these transient dynamics are exacerbated by the other drivers as well.
Some of the earliest studies of systems that could generate long transients were systems with spatial structure \cite{Hastings1994, lloyd1996}. It seems intuitive that spatial structure or spatial heterogeneity can drive some sort of transient dynamics in a system. If individuals start in one location in a habitat, especially a poor habitat, then it will take time before they can spread over the entire habitat and the long-term population dynamics begin to emerge. What is surprising is that spatial structure can also give rise to so called long-lived transients, where the transient dynamics are extensive enough that they continue on timescales past which we typically measure biological populations \cite{Hastings1994}.
One method of adding spatial structure to a population is to formulate it as a metapopulation, where distinct populations live on habitat patches which are connected via dispersal or migration. Metapopulation models were originally proposed by Levins \cite{Levins1969} to model patch occupancy in habitats consisting of isolated habitat patches, but these early models used space implicitly rather than explicitly. Later metapopulation models have included space explicitly by allowing for differing habitat quality on patches or differing dispersal between patches \cite{Hanski1994, Gyllenberg1997b}, though often these models are focused on the proportion of occupied patches rather than the population size on each patch. However, many marine metapopulation models as well as epidemiological metapopulation models explicitly track the number of individuals on each patch as well as movement or dispersal between patches \cite{lloyd1996, Arino2003, Figueira2006, Armsworth2002}. In this paper we model the metapopulation structure following this spatially explicit framework where individuals are tracked rather than the proportion of occupied patches.
Another benefit of the metapopulation framework is that habitat patches can be classified into source patches and sink patches. This classification can occur in many different ways \cite{Figueira2006, Pulliam1988, Krkosek2010a}, but commonly a source is a productive habitat patch and a sink is a poor habitat patch. Early measures of sources and sinks were mainly focused on connectivity between patches, however more recently it has been understood that it is the interplay between patch connectivity and local patch productivity that characterizes patches as sources or sinks. One of the new and easily tractable metrics that embodies this relationship comes from the theory of next-generation matrices and the basic reproduction number, $R_0$. This framework, originally developed in epidemiology, has been used to characterize sources and sinks in populations of mussels, salmon, and sea lice on salmon farms \cite{Krkosek2010a, Huang2015, Harrington2020}.
While metapopulation theory has previously been used to classify patches as sources and sinks, other metrics have been used to characterize the transient dynamics of systems. Reactivity was initially introduced by Neubert and Caswell \cite{Caswell1997} to measure the maximum initial growth rate of a system over all possible perturbations from an equilibrium. If the maximum initial growth rate is positive, then the system is reactive. Complimenting reactivity is the amplification envelope, which is the maximum possible amplification at time $t$ that can be achieved by a perturbation. Later, Townley and Hodgson \cite{Townley2008} introduced attenuation as the opposite metric to measure initial decline of populations; a system attenuates if the minimum possible growth rate declines following a perturbation. Reactivity and attenuation are then most interesting when they are different from the stability of the equilibrium of a system --- when a system attenuates but is unstable, or is reactive but stable --- and it is in these situations that we focus this paper.
It should be noted that reactivity, attenuation and the amplification envelope are all defined from the linearization of a non-linear system about an equilibrium. These measures are therefore most useful around hyperbolic equilibria, where the dynamics of the non-linear system can be well approximated by the dynamics of the linear system. If an equilibrium is not hyperbolic then the trajectories in the non-linear system may no longer be similar to the linearization by which reactivity, attenuation, and the amplification envelope are defined. Even around a hyperbolic equilibrium the trajectories of the non-linear and linearsized systems may diverge as they move away from the equilibrium. Here we use the technique of linearization to determine reactivity and attenuation as others have before us, but want to emphasize these caveats as they are often brushed over in the transient literature.
In this paper we apply these transient measures of growth to a class of biological metapopulation models where there is no migration between population patches, only birth on new patches. These are a subset of birth-jump processes \cite{Hillen2015} and include models for marine meroplanktonic species, where larvae can travel through the ocean between population patches but adults remain confined to a habitat patch. Specific species that exhibit this structure include sea lice \cite{Adams2015}, corals and coral reef fish \cite{Cowen2006, Jones2009}, barnacles \cite{Roughgarden1988}, Dungeness crabs \cite{Botsford1994}, sea urchins \cite{Botsford1994}, and many other benthic marine species \cite{Cowen2009}. This type of system also encompasses many plant species where seeds are carried between suitable habitat patches \cite{Husband1996}, and depending on the census timing could also include insect species where there is one large dispersal event between habitat patches, such as the spruce budworm \cite{Ludwig1978, Morris1963, Williams2000} and mountain pine beetle \cite{Safranyik2007}. Lastly this class of models also includes multi-patch or multi-city epidemiological metapopulation models where infections can spread between patches, for example infected residents of a city may travel and infect residents of other cities before returning home \cite{Arino2003}.
The paper is structured as follows. First we extend the general theory of transients to marine and other birth-jump metapopulations. We then demonstrate that even for linear two-patch metapopulations it is possible to have transient dynamics that are vastly different than the asymptotic dynamics of these populations and moreover that the time for which these transient dynamics occur can extend for an arbitrarily long amount of time. Next, we examine how the structure of the metapopulation can enhance the transient dynamics of metapopulations. Then we demonstrate how to connect the transient behaviour of the metapopulation to its source-sink distribution. Finally, we discuss how to measure the transient dynamics of stage-structured metapopulations in a useful and biological meaningful manner.
\section{Extending the general theory of transients to metapopulations}
\label{sec:gentheory}
In this section we apply the metrics of reactivity \cite{Caswell1997} and attenuation \cite{Townley2008} to general systems of single-species metapopulations. We demonstrate that often reactivity and attenuation in metapopulations have simple closed forms, especially if we are analysing how population size responds to initial perturbations. In order to present our work in a general form, we model the dynamics of a metapopulation of a single species on $n$ patches around the zero equilibrium with the system:
\begin{equation}
x'=Ax,\label{eq:linear}
\end{equation}
where $A=[a_{ij}]$ is a real irreducible matrix of order $n$. This most often represents the linearization of a non-linear system, which more completely captures the dynamics of the population but could also represent the full dynamics of a linear system if density dependence was not important to the population dynamics.
For the analyses in this paper we focus on biologically realistic single-species metapopulations where the entries of $x(t)$ are non-negative when beginning with a non-negative initial condition, $x(0)$. This condition is equivalent to requiring that $A$ be an essentially non-negative (Metzler matrix), such that all the off-diagonal entries of $A$ are non-negative (Thm 2.4, \cite{Thieme2009}). Biologically this means that the presence of individuals on one patch cannot contribute to the decline of a population on another patch and that the population on each patch will not become negative.
\subsection{Reactivity and attenuation using the $\ell_1$ norm}
To analyze the transient dynamics of this metapopulation let us introduce some notation from Neubert and Caswell \cite{Caswell1997}. We say that a population is \textit{reactive} if there is an initial condition such that the initial growth rate of the total population is positive. Using notation from Lutscher and Wang \cite{Lutscher2020}, reactivity is formally defined as:
\begin{equation}
\bar{\sigma}=\max_{||x_0||\neq 0} \left[ \frac{1}{||x||}\frac{d||x||}{dt}\biggr\rvert_{t=0}\right].\label{eq:reactive}
\end{equation}
If $\bar{\sigma}>0$ then a system is reactive, and if $\bar{\sigma}\leq 0$ then the system is not reactive. Neubert and Caswell \cite{Caswell1997} use the $\ell_2$ norm to measure the population size, as this allows for the simplification that $\bar{\sigma}$ is the max eigenvalue of $(A+A^T)/2$. However, the $\ell_2$ norm lacks a reasonable biological interpretation, and so others have instead used the $\ell_1$ norm to define reactivity \cite{Huang2015, Townley2007, Stott2011}. Biologically, the $\ell_1$ norm,
\begin{equation*}
||x||_1= \sum_{i=1}^n |x_i|
\end{equation*}
can be interpreted as the total population on all patches of a metapopulation. Moreover in the metapopulation framework using the $\ell_1$ norm is also convenient to determine reactivity from the population matrix $A$.
Similar to reactivity, we also say that a population \textit{attenuates} if there is an initial condition for which the initial growth rate of the total population declines \cite{Townley2008}. This is formally defined as
\begin{equation}
\underline{\sigma}=\min_{||x_0||\neq 0} \left[ \frac{1}{||x||}\frac{d||x||}{dt}\biggr\rvert_{t=0}\right].
\end{equation}
If $\underline{\sigma}<0$ then the system attenuates, and if $\underline{\sigma}\geq 0$ then the system does not attenuate. Comparing the definitions of attenuation and reactivity we can see that it is possible for a system to be both reactive and to attenuate, if there are certain initial conditions for which $\bar{\sigma}>0$ is achieved and others such that $\underline{\sigma}<0$. In fact, reactivity and attenuation are most interesting when they are different from the stability of the system, as this is when the transient dynamics are different than the long term dynamics. This is when a system is reactive but stable, so that the total population initially grows but eventually declines, or when a system attenuates but is unstable, so that the total population declines but eventually grows. It should also be noted that the only systems which are not reactive and do not attenuate are those in which the total population size remains constant for all time.
The last measures that we define here to use in some later sections are the \textit{amplification envelope} and the \textit{maximum amplification}. The amplification envelope is the maximum possible amplification at time $t$ from a perturbation $x_0$ and is defined mathematically as:
\begin{equation}
\rho (t)= \max_{||x_0|| \neq 0} \frac{||x(t)||}{||x_0||}.
\label{eq:ampenv}
\end{equation}
The maximum amplification is simply the maximum of the amplification envelope over all time:
\begin{equation}
\rho_{\max}=\max_{t\geq 0} \rho(t)=\max_{\substack{ t \geq 0 \\ ||x_0||\neq 0}} \frac{||x(t)||}{||x_0||}.
\label{eq:maxamp}
\end{equation}
While reactivity and attenuation quantify the short time response to a perturbation, the amplification envelope and maximum amplification quantify how large a perturbation can become and how long growth can last. It is for these purposes that we use the amplification envelope and maximum amplification in subsection \ref{sec:largegrowth} and section \ref{sec:largepatch}.
Now before quantifying the reactivity and attenuation of the entire metapopulation, let us first determine the initial growth rate of the population if we begin with one individual on patch $j$. We call this initial growth rate $\lambda_j$, and mathematically we define
\begin{equation*}
\lambda_j=\sum_{i=1}^n x_i'(0),
\end{equation*}
with $x(0)=e_j$, where $e_j$ is the vector of length $n$ with $1$ in the $j$th entry and $0$s elsewhere. In terms of system (\ref{eq:linear}) this simplifies to the $j$th column sum of $A$,
\begin{equation*}
\lambda_j=\sum_{i=1}^n a_{ij}.
\end{equation*}
The initial growth rate for a given patch $j$, $\lambda_j$, can also be calculated from the lifecycle graph as the sum of all the outgoing birth rates from a patch minus the death rate on that patch, where any paths describing movement of individuals between patches are ignored.
We can then connect this patch specific initial growth rate with the total growth rate, or reactivity, using the following lemma.
\begin{lemma}
Assuming that population sizes are non-negative on each patch, so that $x_j\geq 0$ for all $j$, then for system (\ref{eq:linear}) under the $\ell_1$ norm,
\begin{equation*}
\bar{\sigma}=\max_{1\leq j\leq n} \lambda_j=\max_{1\leq j\leq n}\sum_i a_{ij}.
\end{equation*}
\label{lemma:reactive}
\end{lemma}
\begin{proof}
Since $x_j\geq 0$ for all $j$, the absolute value signs in (\ref{eq:reactive}) can be dropped and so
\begin{align*}
\bar{\sigma}&=\max_{||x_0||=1} \left[ \frac{d||x||}{dt}\biggr\rvert_{t=0}\right]\\
&=\max_{||x_0||=1} \left[ \frac{d}{dt}\sum_{i=1}^n x_i \biggr\rvert_{t=0}\right]\\
&=\max_{||x_0||=1} \left[ \sum_{i=1}^n \frac{d}{dt}x_i \biggr\rvert_{t=0}\right]\\
&=\max_{||x_0||=1} \left[ 1^T x'\biggr\rvert_{t=0}\right].
\end{align*}
Substituting $x'=Ax$ from system (\ref{eq:linear}) gives
\begin{align*}
\bar{\sigma}&=\max_{||x_0||=1} \left[ 1^T Ax_0 \right]\\
&=\max_{||x_0||=1} \left[ \sum_{j=1}^n \left(\sum_{i=1}^n a_{ij}\right)x_{0j} \right]
\end{align*}
Now let $k$, with $1\leq k\leq n$ maximize $\sum_{i=1}^n a_{ij}$, so that $\sum_{i=1}^n a_{ik}=\max_{1\leq j\leq n} \sum_{i=1}^n a_{ij}$. Then, under $||x_0||=1$,
\begin{align*}
\sum_{j=1}^n \left(\sum_{i=1}^n a_{ij}\right)x_{0j} &\leq \left(\sum_{i=1}^n a_{ik}\right) \sum_{j=1}^n x_{0j}\\
&=\left(\sum_{i=1}^n a_{ik}\right),
\end{align*}
because $||x_0||=1$, with equality when $x_{0j}=\begin{cases}
1 & j=k\\
0 & j\neq k
\end{cases}$. Therefore
\begin{align*}
\bar{\sigma}&=\max_{1\leq j\leq n} \left(\sum_{i=1}^n a_{ij}\right)\\
&=\max_{1\leq j\leq n} \lambda_j.
\end{align*}
\end{proof}
With a similar proof we can connect the patch specific initial growth rate to attenuation via the following lemma:
\begin{lemma}
Assuming that population sizes are non-negative on each patch, so that $x_j\geq 0$ for all $j$, then for system (\ref{eq:linear}) under the $\ell_1$ norm,
\begin{equation*}
\underline{\sigma}=\min_{1\leq j\leq n} \lambda_j=\min_{1\leq j\leq n} \sum_i a_{ij}.
\end{equation*}
\end{lemma}
\subsection{Comparing reactivity in the $\ell_1$ and $\ell_2$ norms}
\label{sec:reacl1l2}
In this section we present some examples of systems that are reactive in $\ell_1$ but not in $\ell_2$ and vice versa to illuminate the difference between measuring reactivity in the two norms. It has previously been noted that reactivity depends on the norm in which it is measured \cite{Caswell1997, Lutscher2020}, and the following examples help clarify the underlying biological and mathematical meaning of the two norms. The $\ell_1$ norm,
\begin{equation*}
||x||_1= \sum_{i=1}^n |x_i|,
\end{equation*}
represents the total population size of the metapopulation, whereas the $\ell_2$ norm,
\begin{equation*}
||x||_2= \sqrt{\sum_{i=1}^n x_i^2},
\end{equation*}
represents a sort of Euclidean distance of the metapopulation away from the origin.
\begin{figure}[!htb]
\centering
\includegraphics[width=9cm]{reactl2.eps}
\caption{The phase plane for system (\ref{eq:linear}) with
$A=\begin{bmatrix}
-1&0\\
1&0
\end{bmatrix},$ which is reactive in $\ell_2$ but not in $\ell_1$. The line $x_1+x_2=1$ and the circle $x_1^2+x_2^2=1$ geometrically depict $||x||=1$ in the $\ell_1$ and $\ell_2$ norms respectively. The derivative vectors for the phase plane are shown in red and two different initial trajectories are shown in green and blue. The green trajectory is an example that is reactive in $\ell_2$, but not in $\ell_1$, and the blue trajectory is another example that is not reactive in $\ell_1$.}
\label{fig:reactl1}
\end{figure}
\subsection*{Example 1}
First, we present an example that is reactive in $\ell_2$ but not in $\ell_1$. Take system (\ref{eq:linear}) with
\[A=\begin{bmatrix}
-1&0\\
1&0
\end{bmatrix}.\] This system simply redistributes individuals from patch 1 to patch 2, and the phase plane is shown in Figure \ref{fig:reactl1}. It is not reactive in the $\ell_1$ norm because the total population size is not increasing, but it is reactive in $\ell_2$. This highlights how measuring reactivity in the $\ell_2$ norm can at times defy our biological expectation of what reactivity should mean --- the growth of a population --- and reinforces our rationale for using the $\ell_1$ norm to measure reactivity in metapopulations. While the matrix $A$ is reducible and this system is only semi-stable, and thus may be considered a borderline example, if $a_{22}$ is replaced by a small negative number, $-\epsilon$, and $a_{12}$ is replaced by a small positive number, $\epsilon/2$, then for sufficiently small $\epsilon$, $A$ will be irreducible and the system will now be stable, but will still be reactive in $\ell_2$ and not in $\ell_1$.
\subsection*{Example 2}
The second example, which is reactive in $\ell_1$ but not in $\ell_2$ is system (\ref{eq:linear}) with
\[A=\begin{bmatrix}
-1&3/2\\
1/3&-1
\end{bmatrix},\] where the phase plane is shown in Figure \ref{fig:reactl2}. Now the system is reactive in $\ell_1$ because if we start with one individual on the second patch (the dynamics governed by the second row of $A$) the total population grows, but in such a way that it will not be reactive in $\ell_2$. This example demonstrates that again reactivity in $\ell_2$ can defy our biological expectation of reactivity, but now in the opposite way. Here the total population grows, yet the system is not reactive in $\ell_2$. Note that this system is equivalent to system (\ref{eq:asymgrow1}) with $\epsilon=3$.
Together, the two examples highlight the differences that can occur when measuring reactivity in different norms and the caution that should be taken when interpreting reactivity in the $\ell_2$ norm biologically. Here we only present examples which are reactive in $\ell_2$ but not in $\ell_1$ and vice versa but it is also possible to find examples of systems which attenuate in $\ell_2$ but not in $\ell_1$.
\begin{figure}[!htb]
\centering
\includegraphics[width=9cm]{reactl1.eps}
\caption{The phase plane for system (\ref{eq:linear}) with
$A=\begin{bmatrix}
-1&3/2\\
1/3&-1
\end{bmatrix},$ which is reactive in $\ell_1$ but not in $\ell_2$. The line $x_1+x_2=1$ and the circle $x_1^2+x_2^2=1$ geometrically depict $||x||=1$ in the $\ell_1$ and $\ell_2$ norms respectively. The derivative vectors for the phase plane are shown in red and two different initial trajectories are shown in green and blue. The green trajectory is an example that is reactive in $\ell_1$, but not in $\ell_2$, and the blue trajectory is another example that is not reactive in $\ell_2$.}
\label{fig:reactl2}
\end{figure}
\subsection{The relationship between stability and reactivity/attenuation}
Now that we have presented a couple of examples that demonstrate the difference between reactivity in the $\ell_1$ and $\ell_2$ norms, we show that in both norms if a system is stable it attenuates, and if a system is unstable it is reactive. While we hypothesize that this is true in all norms, these are necessary properties for a norm to be useful in measuring reactivity or attenuation and thus we present the proofs in $\ell_1$ and $\ell_2$ for completeness.
We begin by presenting the proof for the $\ell_1$ norm.
\begin{lemma}
If the $x=0$ equilibrium for \[x'=Ax\] is stable and $A$ is a Metzler matrix, then $\min \lambda_j<0$, where $\lambda_j=\sum_{i=1}^n a_{ij}$, and thus the system attenuates in the $\ell_1$ norm. Likewise if the $x=0$ equilibrium is unstable then $\max \lambda_j>0$ and so the system is reactive in the $\ell_1$ norm.
\end{lemma}
\begin{proof}
Let $A$ be a Metzler matrix, then \[\mu(A)=\max\{\Re (\lambda):\lambda \in \sigma(A)\},\] and $\mu(A)$ is an eigenvalue of $A$ with a non-negative normalized eigenvector $v$, with $\sum_{j=1}^n v_j=1$, such that $Av=\mu(A)v.$ (Thm A.43, \cite{Thieme2003}).
Therefore if the initial population is arranged according to the eigenvector $v$, then the initial growth rate is
\begin{align*}
\sum_{i=1}^n\frac{dx_i}{dt}&=1^Tx'|_{x_0=v}\\
&=1^TAv\\
&=1^T\mu(A)v.
\end{align*}
If the $x=0$ equilibrium for $x'=Ax$ is stable, then $\mu(A)<0$, and therefore \[\sum_{i=1}^n\frac{dx_i}{dt}=1^T\mu(A)v<0.\] Let $\lambda_k=\min_j \lambda_j$, then \[\lambda_k \leq \sum_{j=1}^n\lambda_jv_j = 1^TAv=1^T\mu(A)v<0,\] as $v$ is normalized. Thus if the $x=0$ equilibrium for $x'=Ax$ is stable, then $\min \lambda_j<0$, and so the system attenuates in the $\ell_1$ norm, and the minimum growth rate occurs when the initial population is all on a single patch.
Similarly if the $x=0$ equilibrium for $x'=Ax$ is unstable, then $\mu(A)>0$, and therefore \[\sum_{i=1}^n\frac{dx_i}{dt}=1^T\mu(A)v>0.\] Let $\lambda_k=\max_j \lambda_j$, then \[\lambda_k \geq \sum_{j=1}^n\lambda_jv_j = 1^TAv=1^T\mu(A)v>0.\] Thus if the $x=0$ equilibrium for $x'=Ax$ is unstable, then it is also reactive in the $\ell_1$ norm and the maximum growth rate occurs when the initial population is all on a single patch.
\end{proof}
In the $\ell_2$ norm the following lemma gives the corresponding result:
\begin{lemma}
If the $x=0$ equilibrium for $x'=Ax$ is stable then \[\min_{||x_0||_2\neq 0} \left(\frac{1}{||x||_2}\frac{d||x||_2}{dt}\right)\biggr\rvert_{t=0}<0\] and thus the system attenuates in $\ell_2$. Similarly if the $x=0$ equilibrium for $x'=Ax$ is unstable then
\[\max_{||x_0||_2\neq 0} \left(\frac{1}{||x||_2}\frac{d||x||_2}{dt}\right)\biggr\rvert_{t=0}>0\] and so the system is reactive in $\ell_2$.
\end{lemma}
\begin{proof}
In the $\ell_2$ norm
\begin{equation}
\left(\frac{1}{||x||_2}\frac{d||x||_2}{dt}\right)\biggr\rvert_{t=0}=\frac{x_0^TH(A)x_0}{x_0^Tx_0},
\label{eq:rayleigh}
\end{equation} where $H(A)=(A+A^T)/2$ is the Hermitian part of $A$ \cite{Caswell1997}. Furthermore the maximum of the right hand side of equation (\ref{eq:rayleigh}) over all $x_0$ is equal to $\lambda_{\max}(H(A))$, where $\lambda_{\max}(H(A))$ is the maximum eigenvalue of $H(A)$ (Thm 4.2.2, \cite{Horn2012}). Similarly the minimum of the right hand side of equation (\ref{eq:rayleigh}) over all $x_0$ is equal to $\lambda_{\min}(H(A))$, the minimum eigenvalue of $H(A)$. Since $A$ is real, $H(A)$ is real and symmetric and so $\lambda_{\max}(H(A))$ and $\lambda_{\min}(H(A))$ are real.
Therefore $x'=Ax$ is reactive in the $\ell_2$ norm if $\lambda_{\max}(H(A))>0$ and attenuates if $\lambda_{\min}(H(A))<0$. To relate stability to reactivity and attenuation, we use the fact that the real part of the dominant eigenvalue of $A$ (denoted by $\mu(A)$) is between the maximum and minimum eigenvalues of the Hermitian part of $A$ (Fact 5, pg 14-2, \cite{Hogben2006}), \[\lambda_{\min}(H(A))\leq \mu(A) \leq \lambda_{\max}(H(A)).\] If the $x=0$ equilibrium for $x'=Ax$ is unstable, then \[\lambda_{\max}(H(A))\geq \mu(A) \geq 0\] and so the system is reactive, and if the $x=0$ equilibrium for $x'=Ax$ is stable, then \[\lambda_{\min}(H(A))\leq \mu(A) \leq 0\] and so the system attenuates.
\end{proof}
In this section we have shown how to calculate reactivity and attenuation using the $\ell_1$ norm in metapopulations, proven that if the equilibrium of a system is unstable/stable then the system must be reactive/attenuate in both the $\ell_1$ and $\ell_2$ norms, and demonstrated the difference between reactivity in the $\ell_1$ and $\ell_2$ norms using a couple salient examples. We now return to the motivating feature of this paper --- systems that are reactive and stable or attenuate and are unstable --- and in the following section we provide examples of long lived transients in these systems.
\section{Metapopulations with arbitrarily large transient growth or decay}
\label{sec:arblarge}
Here we examine two different metapopulations, one of which is reactive and can exhibit arbitrarily large transient growth, and the other that attenuates and can decline to arbitrarily small levels. In each case this transient growth differs from the system's long term growth trajectory: the metapopulation that exhibits large growth eventually declines, and the system that declines eventually grows. Both of these example metapopulations are linear systems, and therefore the addition of non-linearities to construct more realistic models could further exacerbate the length of the transient period. These examples are not meant to imply that there are realistic biological metapopulations that can grow arbitrarily large before decaying, but rather to emphasize that the difference between transient dynamics and asymptotic dynamics can be quite stark even in linear systems.
\subsection{Arbitrarily large transient growth}
\label{sec:largegrowth}
First we present a reactive metapopulation that can exhibit arbitrarily large transient growth, but eventually declines. In this metapopulation individuals can either give birth to new individuals on the same patch, or give birth to individuals on the other patch, but there is no migration of individuals between patches. As mentioned in the introduction, this type of model is applicable to many marine metapopulations where adults are sedentary but larvae can disperse, to plant populations where seeds can be carried between habitat patches, or other populations governed by birth-jump processes. Let the metapopulation be described by:
\begin{align}
x'&=(b-d)x+b_{12}y\label{eq:arbgrow}\\
y'&=b_{21}x+(b-d)y\nonumber
\end{align}
so that $b$ is the on patch birth rate and $d$ is the on patch death rate, $b_{12}$ is the birth rate of individuals on patch 2 producing new individuals on patch 1, and $b_{21}$ is the birth rate of individuals on patch 1 producing new individuals on patch 2. The system is linear, so assuming that $(b-d)^2 \neq b_{12}b_{21}$ the only steady state is $x=y=0$.
For the metapopulation to eventually decline, both eigenvalues need to be negative. For system (\ref{eq:arbgrow}) the eigenvalues are
\begin{align*}
\lambda_1&=(b-d)+\sqrt{b_{12}b_{21}}\\
\lambda_2&=(b-d)-\sqrt{b_{12}b_{21}}
\end{align*}
and thus we require that $(b-d)<0$ and $(b-d)^2>b_{12}b_{21}$. Now in order for the metapopulation to be reactive we need either $b_{12}>-(b-d)$ or $b_{21}>-(b-d)$. Here we choose $b_{21}>-(b-d)$, so that if we start with one individual on patch 1, i.e. $x(0)=1$, $y(0)=0$, the metapopulation initially grows.
To prove that the metapopulation can grow arbitrarily large, we show that the limit as some parameter approaches 0 of $\max_t (x(t)+y(t))$ is unbounded. In terms of the maximum amplification defined by (\ref{eq:maxamp}), this is equivalent to showing that the limit of the maximum amplification in the $\ell_1$ norm, $\rho_{\max}$, becomes unbounded. This is because the initial condition chosen above is such that $x(t)+y(t)=\rho (t)$ in the $\ell_1$ norm . To take the limit, we must first reduce the parameters in our system until we are left with a single parameter which we can let approach 0, while still maintaining the inequalities above that govern the stability and reactivity of the system. Let $b-d=-1$, $b_{12}=\epsilon/2$, and $b_{21}=1/\epsilon$, where $\epsilon$ is a small positive parameter that approaches 0. Our reduced system can now be written as:
\begin{align}
x'&=-x+ \frac{{\epsilon}}{2} y\label{eq:asymgrow1}\\
y'&=\frac{1}{{{\epsilon}}} x-y\nonumber \\
x(0)&=1\nonumber\\
y(0)&=0\nonumber.
\end{align}
This system is stable and the digraph for this system is shown in Figure \ref{fig:asymgrow}. This system is reactive in $\ell_1$ and $\ell_2$ for small $\epsilon$ and the solution is:
\begin{align*}
x(t)&=\frac{1}{2} \left(e^{-(1-\frac{1}{\sqrt{2}})t}+ e^{-(1+\frac{1}{\sqrt{2}})t}\right)\\
y(t)&=\frac{1}{\sqrt{2}\epsilon}\left(e^{-(1-\frac{1}{\sqrt{2}})t}-e^{-(1+\frac{1}{\sqrt{2}})t}\right).
\end{align*}
\begin{figure}
\centering
\begin{tikzpicture}
\node (x) [stage] {$x$};
\node (y) [stage, right of=x, xshift=1cm] {$y$};
\draw [arrow] (x) to [out=30,in=150] node[above] {$\epsilon^{-1}$} (y);
\draw [arrow] (y) to [out=210,in=330] node[below] {$\epsilon/2$}(x);
\draw [arrow] (x) edge[out=210,in=150,loop] node[left] {$-1$} (x);
\draw [arrow] (y) edge[out=30,in =330,loop] node[right] {$-1$} (y);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:asymgrow1}). The directed edges represent the birth rate of individuals on the outgoing patch producing new individuals on the incoming patch. The self loops are the birth rate minus the death rate on a patch.}
\label{fig:asymgrow}
\end{figure}
We want to show that
\begin{equation*}
\lim_{\epsilon \rightarrow 0} \max_t \left(x(t)+y(t)\right)= \lim_{\epsilon \rightarrow 0} \rho_{\max} =\infty.
\end{equation*}
Normally to calculate the maximum we would take the derivative of $(x(t)+y(t))$, set it equal to 0, solve for $t$, and then evaluate $(x(t)+y(t))$ at this value of $t$. However it turns out this is rather complicated, so we will simplify this process by first noting that $x(t)>0$ for all $t$. Therefore
\begin{equation*}
\max_t \left(x(t)+y(t)\right)> \max_t y(t).
\end{equation*}
Now we only have to perform the above process on $y(t)$, rather than $(x(t)+y(t))$.
Setting $y'(t)=0$ and solving for $t$, we find that the time that the maximum of $y(t)$ is achieved, $t_{\rm max}$, along with the corresponding maximum in $y$, $y(t_{\rm max})$, are:
\begin{align*}
t_{\rm max}&= \frac{1}{\sqrt{2}}\left(\log(1+\sqrt{2})-\log(-1+\sqrt{2})\right)\\
y(t_{\rm max})&=\frac{\sqrt{2}}{\epsilon}(1+\sqrt{2})^{(-\frac{1}{2}-\frac{1}{\sqrt{2}})}(-1+\sqrt{2})^{(\frac{1}{\sqrt{2}}-\frac{1}{2})}.
\end{align*}
We can clearly see that $\lim_{\epsilon\rightarrow 0} y(t_{\rm max})=\infty$ and thus also
$\lim_{\epsilon\rightarrow 0} \max_t x(t)+y(t)= \allowbreak \lim_{\epsilon\rightarrow 0}\rho_{\max} \allowbreak =\infty$.
Therefore even in a two patch metapopulation that is asymptotically stable, there is always a parameter combination for which the total population, and thus also the maximum amplification in the $\ell_1$ norm, $\rho_{\max}$, can initially grow arbitrarily large before they decay. Again, this is not meant to imply that there are realistic biological metapopulations that can grow arbitrarily large before decaying, but to emphasize how different the transient and asymptotic dynamics of a system can be.
\subsection{Transient decay to arbitrarily small levels}
Similar to the previous section, we now present an example of a metapopulation that attenuates and can decay to an arbitrarily small population size before eventually growing. This metapopulation is unstable mathematically because it eventually grows, but biologically the metapopulation could first go extinct if the total population size decays below one individual before it eventually increases. We again use a metapopulation where individuals can either give birth to new individuals on their patch or on the other patch, but cannot migrate between patches. The difference between this metapopulation and the example used in the previous section, is that now the on patch birth and death rates differ between patches, but the between patch birth rates are the same. Let the metapopulation be described by:
\begin{align*}
x'&=(b_{1}-d_{1})x+\epsilon y\\
y'&=\epsilon x+(b_2-d_2)y
\end{align*}
where $b_1$ and $d_1$ are the birth and death rates on patch 1, $b_2$ and $d_2$ are the birth and death rates on patch 2, and $\epsilon$ is the interpatch birth rates for both patches.
\begin{figure}
\centering
\begin{tikzpicture}
\node (x) [stage] {$x$};
\node (y) [stage, right of=x, xshift=1cm] {$y$};
\draw [arrow] (x) to [out=30,in=150] node[above] {$\epsilon$} (y);
\draw [arrow] (y) to [out=210,in=330] node[below] {$\epsilon$}(x);
\draw [arrow] (x) edge[out=210,in=150,loop] node[left] {$-1$} (x);
\draw [arrow] (y) edge[out=30,in =330,loop] node[right] {$\epsilon$} (y);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:asymp}). The directed edges represent the birth rate of individuals on the outgoing patch producing new individuals on the incoming patch. The self loops are the birth rate minus the death rate on a patch.}
\label{fig:asymdecay}
\end{figure}
In order for the metapopulation to eventually grow, we assume that the birth rate is greater than the death rate on one of the patches. We choose this to be patch 2, thus we require $b_2-d_2>0$. We also want our population to initially decline when starting on patch 1, for this to occur we assume $b_1-d_1+\epsilon<0$. To prove that the metapopulation can decay to an arbitrarily small population size we reduce the system to have a single parameter and then show that the limit as the parameter approaches 0 of $\min_t (x(t)+y(t))=0$. Let $b_1-d_1=-1$ and $b_2-d_2=\epsilon$, then our system can be written in terms of a single positive parameter, $\epsilon$, as:
\begin{align}
x'&=- x+\epsilon y \label{eq:asymp}\\
y'&=\epsilon x+ \epsilon y\nonumber\\
x(0)&=1\nonumber\\
y(0)&=0.\nonumber
\end{align}
This system is unstable and the corresponding digraph is shown in Figure \ref{fig:asymdecay}. It attenuates in both the $\ell_1$ and $\ell_2$ norms for small $\epsilon$.
It is possible to show that the minimum population size can grow arbitrarily small in a manner similar to the previous section, though the calculations are somewhat more complicated. Instead in this section, we perform an asymptotic expansion in terms of $\epsilon$ to demonstrate the limiting behaviour of system (\ref{eq:asymp}). Let $x(t)=x_{0}(t)+\epsilon x_{1}(t)+O(\epsilon^2)$ and $y(t)=y_{0}(t)+\epsilon y_{1}(t)+O(\epsilon^2)$. Then the zero order system is:
\begin{align*}
x_{0}'(t)&=-x_{0}(t)\\
y_{0}'(t)&=0\\
x_{0}(0)&=1\\
y_{0}(0)&=0,
\end{align*}
that has the solution $x_{0}(t)=e^{-t}$ and $y_{0}=0$. We can proceed in a similar manner to solve the first order terms, and then our solution up to order $\epsilon$ is given by:
\begin{align*}
x(t)&=e^{-t}+O(\epsilon^2)\\
y(t)&=\epsilon(1-e^{-t})+O(\epsilon^2).
\end{align*}
This solution is valid for small $t$, and is therefore our inner approximation. To find our outer approximation for large $t$, we rescale $t=\tau/\epsilon$ and arrive at the system:
\begin{align*}
\epsilon X'&=-X+\epsilon Y\\
\epsilon Y'&=\epsilon X+\epsilon Y.
\end{align*}
We can again solve the zero order and first order equations and arrive at the following solution with two undetermined coefficients:
\begin{align*}
X(\tau)&=\epsilon C e^\tau+O(\epsilon^2)\\
Y(\tau)&=Ce^\tau+\epsilon(C\tau e^\tau+(C+K)e^\tau)+O(\epsilon^2).
\end{align*}
To solve our undetermined coefficients we require that $\lim_{t\rightarrow \infty} x(t)=\lim_{\tau \rightarrow 0} X(\tau)$, and $\lim_{t\rightarrow \infty} y(t)=\lim_{\tau \rightarrow 0} Y(\tau)$. From $x(\infty)=X(0^+)$, we find $C=0$. Substituting $C=0$ into $y(\infty)=Y(0^+)$ to solve for $K$ we find $K=1$. Adding our inner and outer solutions together and subtracting the overlap ($x(\infty)=X(0^+)=0$ and $y(\infty)=Y(0^+)=\epsilon$) we find
\begin{align*}
x(t)&=e^{-t}+O(\epsilon^2)\\
y(t)&=\epsilon(e^{\epsilon t}-e^{-t})+O(\epsilon^2),
\end{align*}
thus our total population size behaves as
\begin{equation}
x(t)+y(t)=e^{-t}+\epsilon(e^{\epsilon t}-e^{-t})+O(\epsilon^2).\label{eq:totalpop}
\end{equation}
We can see from equation (\ref{eq:totalpop}) and Figure \ref{fig:asympapprox} that for very small $\epsilon$, the total population size behaves similarly to $e^{-t}$ before eventually growing. Thus for an minimum population threshold, we can always find an $\epsilon$ small enough, such that the solution crosses the threshold before the population grows. We can prove this by solving the full system and taking the limit of the minimum, though we leave this out as the calculations become rather messy.
\begin{figure}
\centering
\includegraphics[width=9cm]{asymapprox3}
\caption{Asymptotic approximation of the total population size (red) compared to the true total population size (blue) for system (\ref{eq:asymp}), with $\epsilon=0.01$. The asymptotic approximation is given by equation (\ref{eq:totalpop}).}
\label{fig:asympapprox}
\end{figure}
Here we have shown that there are metapopulations for which the transient population can grow arbitrarily large or small, no matter the asymptotic stability of the system. In the next section we demonstrate how increasing the patch number can increase transient growth in advective metapopulations.
\section{Increasing patch number increases transient timescale}
\label{sec:largepatch}
In this section we examine the role that strong advection, coupled with a large number of patches, can have on the transient dynamics of metapopulations. In aquatic systems, habitat patches may be quite productive, but strong advection can sweep most larvae to the next patch, leading to large transient growth on downstream patches before the population eventually disappears from the last patch. This phenomenon can occur in metapopulations situated in rivers, ocean channels, or reef systems where reefs are arranged along a coastline with a directional current.
\begin{figure}
\centering
\begin{tikzpicture}
\node (x1) [stage2] {$x_1$};
\node (x2) [stage2, right of=x, xshift=1cm] {$x_2$};
\draw [arrow] (x1) to [out=30,in=150] node[above] {$b_2$} (x2);
\draw [arrow] (x2) to [out=210,in=330] node[below] {$\epsilon$}(x1);
\draw [arrow] (x1) edge[loop below] node[below] {$b-d$} (x1);
\draw [arrow] (x2) edge[loop below] node[below] {$b-d$} (x2);
\node (xj-1) [draw=none,fill=none, right of=x2, xshift=0.5cm,minimum size=1cm] {$\dots$};
\node (xj) [stage2, right of=xj-1, xshift=0.5cm] {$x_j$};
\node (xj+1) [draw=none,fill=none, right of=xj, xshift=0.5cm,minimum size=1cm] {$\dots$};
\node (xn-1) [stage2, right of=xj+1, xshift=0.5cm] {$x_{n-1}$};
\node (xn) [stage2, right of=xn-1, xshift=0.5cm] {$x_n$};
\draw [arrow] (xn-1) to [out=30,in=150] node[above] {$b_2$} (xn);
\draw [arrow] (xn) to [out=210,in=330] node[below] {$\epsilon$}(xn-1);
\draw [arrow] (xn-1) edge[loop below] node[below] {$b-d$} (xn-1);
\draw [arrow] (xn) edge[loop below] node[below] {$b-d$} (xn);
\draw [arrow] (xj) edge[loop below] node[below] {$b-d$} (xj);
\draw [arrow,dashed] (x2) to [out=30, in=150] node[above] {$b_2$} (xj-1);
\draw [arrow,dashed] (xj-1) to [out=210,in=330] node[below] {$\epsilon$}(x2);
\draw [arrow,dashed] (xj-1) to [out=30, in=150] node[above] {$b_2$} (xj);
\draw [arrow,dashed] (xj) to [out=210,in=330] node[below] {$\epsilon$}(xj-1);
\draw [arrow,dashed] (xj) to [out=30, in=150] node[above] {$b_2$} (xj+1);
\draw [arrow,dashed] (xj+1) to [out=210,in=330] node[below] {$\epsilon$}(xj);
\draw [arrow,dashed] (xj+1) to [out=30, in=150] node[above] {$b_2$} (xn-1);
\draw [arrow,dashed] (xn-1) to [out=210,in=330] node[below] {$\epsilon$}(xj+1);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:epspatch}). The directed edges represent the birth rate of individuals on the outgoing patch producing new individuals on the incoming patch. The self loops are the birth rate minus the death rate on a patch.}
\label{fig:longpatch}
\end{figure}
Consider a metapopulation on $n$ patches where the dynamics are described by the following system of equations:
\begin{align}
x'&=Ax \quad \label{eq:epspatch}\\
x(0)&=e_1\nonumber\\
A&=\begin{bmatrix}
b-d& \epsilon& 0 &\dots&0\\
b_2&b-d&\epsilon&\ddots&\vdots\\
0&b_2&b-d&\ddots&\\
\vdots& \ddots& \ddots&\ddots&\epsilon\\
0&\dots&0&b_2&b-d
\end{bmatrix},\nonumber
\end{align}
where $b$ is the on patch birth rate for each patch, $d$ is the death rate on each patch, $b_2$ is the birth rate of patch $j-1$ on patch $j$, $\epsilon$ is the birth rate from patch $j+1$ to patch $j$, and $e_1$ is a vector with 1 in the first entry and 0s elsewhere. The digraph for this system is shown in Figure \ref{fig:longpatch}.
The instantaneous measures of growth, $\lambda_j$, and the reactivity, $\bar{\sigma}$ in the $\ell_1$ norm, are therefore
\begin{align*}
\lambda_1&=b-d+b_2\\
\lambda_j&=b-d+b_2+\epsilon \quad j=2,\dots,n-1\\
\lambda_n&=b-d+\epsilon\\
\bar{\sigma}&=b-d+b_2+\epsilon.
\end{align*}
Let $b-d+\epsilon<0$ and $b-d+b_2>0$, then the system is reactive ($\bar{\sigma}>0$), and this maximum initial growth rate is achieved if the initial individual is on any patch except for patch 1 or $n$, though if the individual starts on patch 1 the initial growth rate is still positive. In system (\ref{eq:epspatch}) $A$ is a tridiagonal Toeplitz matrix, so it has eigenvalues \cite{Noschese2013}
\begin{align*}
\lambda_h&=b-d+2\sqrt{b_2 \epsilon}\cos\left(\frac{h \pi}{n+1}\right)&h=1,\dots,n,
\end{align*}
and corresponding right eigenvectors, $v_h$, where the $k$th entry is given by
\begin{align*}
v_{h,k}&=(b_2/\epsilon)^{k/2}\sin\left(\frac{hk\pi}{n+1}\right) &k=1,\dots,n;h=1,\dots,n.
\end{align*}
The solution to system (\ref{eq:epspatch}) can therefore be written as
\begin{equation*}
x(t)=We^{Jt}W^{-1}e_1,
\end{equation*}
where $W$ is a matrix containing the eigenvectors, $v_h$, and $J$ is a diagonal matrix with the eigenvalues, $\lambda_h$, on the diagonal. For all but very small $t$, this is equivalent to the amplification envelope in the $\ell_1$ norm, $\rho (t)$, defined by equation (\ref{eq:ampenv}). Through examination of the eigenvalues, this system is stable if $\epsilon$ is small enough such that
\begin{equation*}
b-d+2\sqrt{b_2\epsilon}<0.
\end{equation*}
Parameters that satisfy the inequalities that determine stability and reactivity in the $\ell_1$ norm can be found in the caption of Figure \ref{fig:patches}. In this case the maximum total population size, and also maximum amplification, are given by
\begin{equation*}
x_{\max}=\rho_{\max}=\max_{t\geq 0}1^TWe^{Jt}W^{-1}e_1,
\end{equation*}
with the corresponding time $t_{\max}$, which is the value of $t$ for which the maximum occurs. The last measure of transience that is useful in this system is the total transient time, $t_{\rm total}$, which we define as the time it takes for the population size to decline below one, after initially starting with one individual, or
\begin{equation*}
t_{\rm total}=\min \{t>0:1^TWe^{Jt}W^{-1}e_1\leq 1\}.
\end{equation*}
So how does the number of patches affect the magnitude and length of transients? In Figure \ref{fig:patches}, which compares a 5 and 15 patch system, we can see that increasing the patch number increases both the magnitude of growth and the duration.
\begin{figure}[!htb]
\centering
\subfloat[]{
\includegraphics[width=9cm]{5patchlog2}}
\subfloat[]{
\includegraphics[width=7.6cm]{5patchnew}}
\subfloat[]{
\includegraphics[width=7.6cm]{15patch2}}
\caption{The population sizes on each patch for the advective system (\ref{eq:epspatch}), starting with one individual on patch 1. In a) the population sizes are shown on a log scale for a metapopulation of 5 patches, and in b) and c) the population sizes are shown for a metapopulation of 5 and 15 patches respectively. On the untransformed scale only the population size on the last patch can be seen as it is far larger than on any of the other patches, whereas on the log scale the population sizes of all patches can be seen. Parameters for this simulation are $b =0.09655$, $\epsilon =0.000001$, $b_2 =2$, and $d =0.1$, chosen so that system (\ref{eq:epspatch}) is reactive but stable.}
\label{fig:patches}
\end{figure}
Here it can be difficult to see the duration of transience exhibited by all patches on a regular scale, but on the log scale we can see that all patches except for patch 1 experience a large period of transient growth, before they decay below 1 individual (dashed line). Patch 1 does not experience a large period of growth because the internal growth rate, $b-d$, is negative and the birth rate from patch 2 to patch 1, $\epsilon$, is too small to overcome this negative internal growth rate.
What cannot be seen from Figure \ref{fig:patches} is the dependence of transient growth on system parameters. We find that decreasing $b_2$ in system (\ref{eq:epspatch}) results in a large decrease in the maximum population size (and maximum amplification), $x_{\rm max}$ $(\rho_{max}$), and the total transient time, $t_{\rm total}$, but only a small decrease in the time at which the maximum population size is achieved, $t_{\max}$. Decreasing $b$ however, results in a large decrease in $x_{\rm max}$ ($\rho_{\max}$), $t_{\rm max}$, and $t_{\rm total}$.
The relationship between increased transient time and number of patches can also be found for a linear metapopulation where all patches have negative initial growth rates, $\lambda_j$, except for the last patch which has a positive initial growth rate. In this case the total population size decays for a long time before it eventually grows, and the time that it decays depends on the number of patches.
We can see then that for a linear metapopulation, the length of the linear array can accentuate the transient growth that is possible in the system and that this is especially true for advective systems where there is some sort of directed birth in one direction in the array. Systems with this type of advective flow include marine metapopulations located in channels near the mouth of rivers, or long coral reefs that are captured inside of a dominant coastal current flow.
Having presented some illuminating metapopulation examples that demonstrate the magnitude that transient dynamics can differ from asymptotic dynamics, we now turn back to the general theory of transients in metapopulations and connect it to the source-sink distribution of habitat patches.
\section{Connecting the source-sink dynamics to the transient dynamics}
In this section we demonstrate how to connect the transient measures of initial population growth to the source-sink distribution of the metapopulation. For the transient measure of the patch specific contribution to the initial growth of the total population we use $\lambda_j$, previously defined in section \ref{sec:gentheory}. To measure the source-sink distribution we use the the classification derived from the next-generation matrix, $K$.
This measure has previously been used to calculate the source-sink distribution in heterogenous environments \cite{Krkosek2010a, Mckenzie2012, Huang2016b, Harrington2020}. In order to calculate the next-generation matrix for system (\ref{eq:linear}) we decompose $A=F-V$, where $F$ is a non-negative matrix with positive entries that describe the birth of new individuals in the metapopulation, and $V$ is a non-singular $M$ matrix with entries that describe the transfer of individuals between compartments or in this case habitat patches, and also includes the death of individuals. Because $V$ is a non-singular $M$ matrix, $V^{-1}$ is non-negative. The next-generation matrix, $K=[k_{ij}]$, can then be calculated as $K=FV^{-1}$. This next generation matrix is then commonly used to calculate the basic reproduction number $R_0$, which is the average number of new individuals produced by one initial individual, as $R_0=\rho(K)$, where $\rho$ denotes the spectral radius. However we can also define $R_j$ as the number of new individuals produced on all patches from one initial individual starting on patch $j$, that can then be calculated as:
\[R_j=\sum_{i=1}^nk_{ij}.\] Using this measure we classify patch $j$ as a \textit{source} if $R_j>1$, as then one individual on patch $j$ would produce more than one individual in the total metapopulation. Likewise we classify patch $j$ as a \textit{sink} if $R_j<1$.
\subsection{Expressing $R_0$ as a weighted sum of $R_j$}
Before examining the connection between the source-sink distribution $R_j$ and the initial growth $\lambda_j$, we first highlight a connection betwen $R_j$ and $R_0$. It turns out, as shown in the following Lemma, that $R_0$ can be calculated as a weighted sum of each $R_j$, and surprisingly this relationship between the spectral radius and the column sums of a matrix does not require any further assumptions on the matrix structure, though if the matrix is not non-negative, the components of the right eigenvector need not be real. Here $1$ is the (column) vector with each entry equal to 1, and $e_j$ is the vector with the only non-zero entry being 1 in the $j$th row.
\begin{lemma}
Let $v=[v_i]$ be the right eigenvector associated with the dominant eigenvalue of the next-generation matrix, $\mathcal{R}_0=\rho(K)$, normalized so $\sum_{1\leq i\leq n} v_i=1$. Then the basic reproduction number $\mathcal{R}_0=\sum_{1\leq j \leq n} R_jv_j$, where $R_j=1^T K e_j=\sum_{i=1}^n k_{ij}.$
\label{lemma:R0Ri}
\end{lemma}
\begin{proof}
First, we can rewrite $\mathcal{R}_0$ as
\begin{align*}
\mathcal{R}_0&=\mathcal{R}_0 1^T v\\
&=1^T \mathcal{R}_0 v,
\end{align*}
because the eigenvector has been normalized to sum to 1. Then, as $\mathcal{R}_0$ is the eigenvalue of $K$ associated with $v$ and the column sums of $K$ are $R_j$,
\begin{align*}
\mathcal{R}_0&=1^T \mathcal{R}_0 v\\
&=1^T Kv\\
&=\begin{bmatrix} R_1 & R_2 & \dots & R_n \end{bmatrix} v\\
&=\sum_{j=1}^n R_j v_j
\end{align*}
\end{proof}
The entries $v_j$ of the right eigenvector can be interpreted as the probability that a new individual begins on patch $j$ \cite{Cushing2016}. Therefore $\mathcal{R}_0$ can be interpreted as the sum over all patches, of the probability that an individual is born on patch $j$, multiplied by the number of new individuals it will produce on all other patches over its lifetime.
Similarly, if we define $
\lambda_0$ to be the dominant eigenvalue of $A$, with the associated normalized eigenvector $u$, then
\begin{align*}
\lambda_0&=1^TAu\\
&=\sum_{j=1}^n \sum_{i=1}^n a_{ij} u_j\\
&=\sum_{j=1}^n \lambda_j u_j,
\end{align*}
where it should be noted that $\lambda_j$ is the $j$th column sum of $A$, rather than an eigenvalue of $A$.
\subsection{Connecting the source-sink distribution, $R_j$, to the initial growth rate, $\lambda_j$}
Now that we have decomposed the dominant eigenvalues, $R_0$ and $\lambda_0$, into weighted sums of the columns of $K$ and $A$ respectively, we proceed to connect the source-sink distribution of a particular patch, $R_j$, to the initial growth from an individual on that patch, $\lambda_j$. To do so there are some restrictions that we need to impose on our metapopulation system and this is where we limit our study to marine or birth-jump metapopulation models where juveniles or seeds can disperse between patches while adults remain confined to habitat patches. The mathematical restriction defined by this class of models comes from the decomposition of $A$ into $F-V$. Here $V$ contains all entries that describe the transfer of individuals between compartments or patches. For the results presented in this paper, we require that $V$ has the following reducible form:
\begin{equation*}
V=\begin{bmatrix}
V_{11} & 0\\
V_{21} & D
\end{bmatrix},
\end{equation*}
where $V_{11}$ is $k\times k$, $D=\diag(d_{k+1},\dots,d_n)$ with $d_{k+1},\dots,d_n$ all positive, $0\leq k\leq n-1$, and $V$ is a non-singular $M$ matrix.
With this structure, individuals on patches $j=k+1,\dots,n$ cannot migrate between patches, but can still give birth to new individuals on any patch. If $V$ is completely diagonal, then there is no migration between any patches, only birth on other patches. This is the case for models of plants with seed dispersal, or simplified marine metapopulation models if the juvenile stage is not explicitly modelled. Under this structure, we first present a proofs connecting our instantaneous and generational growth measures, $\lambda_j$ and $R_j$, before presenting a two patch example.
\begin{lemma}
Let $A=F-V$ for system (\ref{eq:linear}), where $F$ is non-negative, and $V$ is a non-singular $M$ matrix with the following form:
\begin{equation*}
V=\begin{bmatrix}
V_{11} & 0\\
V_{21} & D
\end{bmatrix},
\end{equation*}
where $V_{11}$ is $k\times k$, $D=\diag(d_{k+1},\dots,d_n)$ with $d_{k+1},\dots,d_n$ all positive, and $0\leq k\leq n-1$. For $k+1\leq j\leq n$, $\lambda_j$ is positive if and only if $R_j>1$.
\label{thm:Riyi}
\end{lemma}
\begin{proof}
First, we can write $\lambda_j$ as
\begin{align*}
\lambda_j&=\sum_{i=1}^n a_{ij}\\
&=1^TAe_j.
\end{align*}
Then decomposing $A$ into $F-V$, and inserting $V^{-1}V$
\begin{align*}
\lambda_j&=1^T(F-V) e_j\\
&=1^T(F-V)V^{-1}V e_j\\
&=1^T(FV^{-1}-I)Ve_j.
\end{align*}
For $k+1\leq j \leq n$, $V$ is diagonal, so \[Ve_j=d_je_j.\] Therefore
\begin{align*}
\lambda_j&=1^T(FV^{-1}-I)d_je_j\\
&=(R_j-1)d_j.
\end{align*}
Now $d_j>0$, and thus $\lambda_j>0$ if and only if $R_j>1$.
\end{proof}
\begin{corollary}
\label{cor:diag}
In the notation of Lemma \ref{thm:Riyi}, if $V$ is diagonal, then $\lambda_j>0$ if and only if $R_j>1$ for $j=1,\dots,n$.
\end{corollary}
\begin{corollary}
\label{lem:sigma}
Under the same conditions as Lemma \ref{thm:Riyi}, in the $\ell_1$ norm $\bar{\sigma}>0$ if \\ $\max_{k+1\leq j\leq n}R_j>1$, and $\underline{\sigma}<0$ if $\min_{k+1\leq i\leq n}R_i<1$.
\end{corollary}
\begin{proof}
Under the conditions in Lemma \ref{thm:Riyi}, we know that $R_j-1$ has the same sign as $\lambda_j$ for $k+1\leq j\leq n$. Therefore if $\max_{k+1\leq j\leq n} R_j>1$ then $\bar{\sigma}=\max_{1\leq j\leq n} \lambda_j>0$, i.e. the system is reactive. Similarly if $\min_{k+1\leq j\leq n} R_j<1$ then $\underline{\sigma}=\min_{1\leq j\leq n} \lambda_j<0$, i.e. the population attenuates.
\end{proof}
\begin{corollary}
\label{cor:max}
Under the same conditions of Lemma \ref{thm:Riyi}, only with $V$ diagonal, then in the $\ell_1$ norm $\bar{\sigma}>0$ if and only if $\max_{1\leq j\leq n}R_j>1$ and $\underline{\sigma}<0$ if and only if $\min_{1\leq j\leq n}R_j$.
\end{corollary}
\begin{proof}
From Corollary \ref{cor:diag}, $\lambda_j>0$ if and only if $R_j>1$ for each patch $j$. Therefore if $\bar{\sigma}=\max_{1\leq j\leq n}\lambda_j>0$, then $\max_{1\leq j\leq n}R_j>1$, and likewise if $\max_{1\leq j\leq n}R_j>1$, then $\bar{\sigma}>0$. The same argument holds for $\min_{1\leq j\leq n} \lambda_j$ and $\min_{1\leq j\leq n}R_j$.
\end{proof}
Now that we have presented theory connecting the initial growth rate, $\lambda_j$, and the source-sink distribution, $R_j$, we present an example to illustrate how to calculate these measures and how Lemma \ref{thm:Riyi} and the following corollaries can be used to connect them.
\subsection*{Example 3}\label{sec:2patch}
Here we present an example of a metapopulation consisting of two habitat patches, patch 1 and patch 2. New individuals can be born on either patch, but no individuals can migrate between patches. This system represents a simplification of the adult dynamics of many marine meroplanktonic metapopulations, where dispersal between patches occurs at the larval stage, rather than the sedentary adult stage. This system could also represent plant metapopulations that spread through seed dispersal, if the habitat landscape is patchy. The metapopulation dynamics can be represented with the following set of ODEs:
\begin{align}
x_1'&=b_{11}x_1+b_{12}x_2-d_1x_1\label{eq:patch1}\\
x_2'&=b_{21}x_1+b_{22}x_2-d_2x_2\nonumber,
\end{align}
where $b_{ij}$ is the birth rate for births from patch $j$ to patch $i$, and $d_i$ is the death rate on patch $i$. The lifecycle graph for this system is shown in Figure \ref{fig:patch1}.
\begin{figure}
\centering
\begin{tikzpicture}
\node (x1) [stage] {$x_1$};
\node (x2) [stage, right of=x, xshift=1cm] {$x_2$};
\draw [arrow] (x1) to [out=30,in=150] node[above] {$b_{21}$} (x2);
\draw [arrow] (x2) to [out=210,in=330] node[below] {$b_{12}$}(x1);
\draw [arrow] (x1) edge[out=210,in=150,loop] node[left] {$b_{11}-d_1$} (x1);
\draw [arrow] (x2) edge[out=30,in =330,loop] node[right] {$b_{22}-d_2$} (x2);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:patch1}). The directed edges represent the birth rate of individuals on the outgoing patch producing new individuals on the incoming patch. The self loops are the birth rate minus the death rate on a patch.}
\label{fig:patch1}
\end{figure}
We then decompose $A=F-V$ and construct the next generation matrix, $K=FV^{-1}$:
\begin{align*}
A&=\begin{bmatrix}
b_{11}-d_1 & b_{12}\\
b_{21} & b_{22}-d_2
\end{bmatrix}, \quad
F=\begin{bmatrix}
b_{11} & b_{12}\\
b_{21} & b_{22}
\end{bmatrix},\quad
V=\begin{bmatrix}
d_1 & 0\\
0 & d_2
\end{bmatrix},\\
K&=FV^{-1}=\begin{bmatrix}
b_{11}/d_1 & b_{12}/d_2\\
b_{21}/d_1 & b_{22}/d_2
\end{bmatrix}.
\end{align*}
For an initial individual starting on patch 1, the expected lifetime is $1/d_1$, and the rate that the individual is producing new individuals on both patches is $b_{11}+b_{21}$. Therefore $R_1=(b_{11}+b_{21})/d_1$ is the total number of individuals born onto both patch 1 and patch 2 over one generation. It is clear that $\lambda_1=b_{11}+b_{21}-d_1>0$ if and only if $R_1=\frac{b_{11}}{d_1}+\frac{b_{21}}{d_1}>1$, in accordance with Corollary \ref{cor:diag}. Similarly $\lambda_2=b_{12}+b_{22}-d_2>0$ if and only if $R_2=\frac{b_{12}}{d_2}+\frac{b_{22}}{d_2}>1$. The system is therefore reactive if $\max(R_1, R_2)>1$ (Corollary \ref{cor:max}).
At first glance it seems obvious that if an individual starts on a source patch the population should have a positive initial growth rate or if the population starts on a sink patch it should have a negative initial growth rate, and we have shown from Corollary \ref{cor:diag} and Example 3
that this is indeed the case for marine metapopulations. What is perhaps surprising is that this is not the case for general metapopulations when adults can migrate between habitat patches, and thus when the conditions of Lemma \ref{thm:Riyi} and Corollary \ref{cor:diag} are not met. In the general case it is possible to start with an individual on a source patch, but for the population to initially decline and likewise to start on a sink patch but for the population to initially grow. An example of such a metapopulation is shown in Appendix \ref{appendix:a}.
Here in this section we have shown that for marine metapopulations and other metapopulations where the population dynamics are defined by birth jump processes, there is a one-to-one relationship between the source-sink distribution of patches and the initial growth rate when starting with one adult on a patch. That is, the initial population growth rate is positive if we start with one adult on patch $j$ if and only if patch $j$ is a source, and the initial growth rate is negative if and only if patch $j$ is a sink. This is a useful relationship biologically as there are several marine metapopulations where patches have already been classified into sources and sinks, and thus the transient dynamics for these systems can now be better understood.
\section{Stage structure}
In this section we add stage structure to demonstrate some of the nuances in analysing transients in stage structured metapopulation models. The main issue with analysing reactivity and attenuation in models with stage structure is due to the fact that adults often give birth to many more juveniles than will survive to become adults, and that juveniles cannot normally give birth to new juveniles. This presents a few complications.
The first complication is the fact that if we want to analyse the initial growth or decay of a population, starting with an individual in a patch, it now depends if the individual is a juvenile or an adult. If we start with a juvenile, then there is no way that the total population, or even the patch population, can grow, given that the juvenile has to first survive to the adult stage to give birth to new juveniles. Thus we want to start with one adult on a patch.
However, if we start with an adult in a patch, and it gives birth to new juveniles, how do we count these new juveniles? If we are considering a marine metapopulation do we count every larvae as a new individual? If so, every marine metapopulation would exhibit transience, as each adult often produces thousands of larvae. This then begs the question: in a stage structured metapopulation, can we scale the juvenile population so that transient measures of population growth, such as reactivity and attenuation, are useful for stage structured models and measure the biologically relevant quantities?
To motivate the necessity of an honest scaling we highlight a discrete time example of transients in Dungeness crabs from Caswell and Neubert \cite{Caswell2005}. Dungeness crabs give birth to an enormous number of larvae, many of which do not survive to settle and become juveniles after 1 year. In this case the discrete time model requires a census time to measure new crabs after 1 year. If the census is taken pre breeding, then the system exhibits little reactivity, as many of the larvae that where initially born have not survived to become 1 year old juveniles. However, it the census is taken post breeding, then all of the eggs or larvae are counted and the initial amplification is increased by $10^5$. The models considered in this paper are continuous time and do not face this exact problem, but it is easy to see that the addition of a larvae stage in a marine stage structured metapopulation has large effects on the reactivity of the system.
Returning then to our stage structured model with only juvenile and adult stages, how should the juvenile stage be scaled so that an initial growth in juveniles also corresponds in some sense to growth in the total population? Ideally, we would scale the juvenile population so that each juvenile is scaled by the probability that it will become an adult. If we scale our population in this way then the measures of reactivity and attenuation regain their original meaning. If the maximum initial growth rate of our population, now scaled to be in terms of adults, is positive then our system is reactive, and if the minimum is negative then it attenuates.
A biologically relevant measure of reactivity in a stage structured model must then be focused on the initial growth rate of the population, calculated so that the growth rates of juveniles are scaled by their contribution to the adult population. Under this scaling if any adult on any habitat patch produces many juveniles, but less than one become viable adults, then such a metapopulation is not reactive. Whereas if there is a patch such that one adult produces many juveniles and more than one survive to adulthood then the metapopulation is reactive, because the stage structured population, where juveniles are scaled according to their contribution to the adult population, is growing.
In the following sections we formally define such a scaling using a weighted $\ell_1$ norm, and contrast it with the unweighted $\ell_1$ norm that we have previously been using to calculated reactivity in metapopulations without stage structure.
\subsection{Unweighted $\ell^1$}
We first present the unweighted $\ell^1$ measure of the initial growth rate to demonstrate the mathematical framework that we use to examine reactivity in a stage-structured population with juveniles and adults. Now that there are both juveniles and adults we want to measure reactivity and attenuation as the total initial growth rate of the population, measured using either the weighted or unweighted norm, when we start with one adult on a patch.
Consider a population on $n$ patches with a juvenile and adult stage. Let the population dynamics be described by
\begin{equation}x'=Ax,\label{eq:patch}
\end{equation} where $A$ is a $2n\times 2n$ matrix. Arrange $A$ so that all ODEs describing the change in the adult populations are in rows $n+1$ to $2n$. Assume that $A=F-V$, where $F$ is non-negative and $V$ is a non-singular M matrix so that $V^{-1}$ is non-negative. We are interested in metapopulations where adults can give birth to juveniles, but juveniles cannot give birth to new juveniles, so $F$ and $V$ can be written in block form as follows:
\begin{equation}
F=\begin{bmatrix}
0&F_{12}\\
0&0
\end{bmatrix}, \quad
V=\begin{bmatrix}
V_{11} & 0\\
V_{21} & V_{22}
\end{bmatrix}.\label{eq:vblock}
\end{equation}
With this decomposition $F_{12}$ contains all the new juvenile births from each adult patch, $V_{11}$ is a diagonal matrix that contains the rates of juvenile mortality on each patch as well as the maturation from juveniles to adults, $V_{22}$ is a diagonal matrix that contains the rates of adult mortality on each patch, and $V_{21}$ contains the negative of the rates of maturation/migration from juveniles to adults.
We define $\tilde{\lambda}_j$ to be the initial population growth rate, starting with one adult on patch $j$, measured using the $\ell_1$ norm. This can be defined mathematically for $1\leq j \leq n$ as
\begin{equation*}
\tilde{\lambda}_j=\underbrace{\sum_{i=1}^nx_i'(0)}_\text{juvenile}+\underbrace{\sum_{i=n+1}^{2n}x_i'(0)}_\text{adult}, \quad x(0)=e_{j+n}.
\end{equation*}
In terms of $F$ and $V$
\begin{equation*}
\tilde{\lambda}_j=\sum_{i=1}^n f_{12ij}-\sum_{i=1}^n v_{22ij},
\end{equation*}
where $f_{12ij}$ and $v_{22ij}$ are the $(i,j)$ entries of $F_{12}$ and $V_{22}$ respectively.
We use the tilde to differentiate the initial growth rate in the stage structured population, where we specifically begin with one adult on a patch, from the initial growth rate in a population without stage structure, where there is no difference in the type of individual that we start with. Having presented the mathematical framework that we use to measure reactivity in a stage structured population using the unweighted $\ell_1$ norm, we now use a weighted $\ell_1$ norm that better captures the biological meaning of reactivity.
\subsection{Weighted $\ell^1$ for each patch}
\label{sec:weight}
In order to measure reactivity in a biologically meaningful fashion, we introduce a new measure of the initial population growth rate, $\tilde{\lambda}_j^p$. This initial population growth rate is calculated using a weighted $\ell_1$ norm so that the adult population is still measured using the regular $\ell_1$ norm, but the juvenile population on each patch is scaled by the probability that the juveniles survive to adulthood; the patch specific nature of the weighing is why we denote the initial growth rate $\tilde{\lambda}_j^p$. In this fashion $\tilde{\lambda}_j^p$ measures the initial growth rate of the total population if every member of the metapopulation was weighted according to how much they will contribute to the adult population. Adults are therefore not weighted, and juveniles are weighted by the probability that they survive to adulthood. This weighting recaptures the biological meaning of reactivity, where a system will only be reactive if the adult population will grow, and a system will not be reactive if there is only an initial spike in the juvenile population.
We use the same framework as the previous section to mathematically calculate $\tilde{\lambda}_j^p$, where we decompose $A=F-V$ and $F$ and $V$ are shown in block form in equation (\ref{eq:vblock}). Then we weight the juvenile population growth on each patch $i$ by a factor $s_i$, where $s_i$ is the probability that a juvenile from patch $i$ eventually becomes an adult. From the block form $V$, $s_i$ can be calculated as
\begin{equation}
s_i=\sum_{k=1}^n(-V_{21}V_{11}^{-1})_{ki}.\label{eq:sj}
\end{equation}
To see how this corresponds to the probability of survival of a juvenile on patch $i$, consider the different block components of $F$ and $V$. The matrix $V_{11}^{-1}$ is diagonal, with the $(j,j)$ entry representing the average residence time of a juvenile born onto patch $j$. The matrix $-V_{21}$ contains the rates of maturation/migration of juveniles becoming adults on different patches, so the $(i,j)$ entry is the rate of maturation/migration of a juvenile on patch $j$ becoming an adult on patch $i$. This means that when we multiply $-V_{21}$ by $V_{11}^{-1}$ we are multiplying each of these rates by the residence times of the juveniles in the appropriate patches. In this way, the $(i,j)$ entry of $-V_{21}V_{11}^{-1}$ is then the probability that a juvenile leaving patch $j$ arrives on patch $i$. Therefore the $j$th column sum of $-V_{21}V_{11}^{-1}$ is the probability that a juvenile starting on patch $j$ becomes an adult on any other patch.
The initial growth rate using the weighted norm, $\tilde{\lambda}_j^p$, can then be calculated as the sum of the juvenile growth rates, each multiplied by the patch specific survival $s_i$, and the adult growth rates. Mathematically, this is defined as:
\begin{align*}\tilde{\lambda}_j^p&=\underbrace{\sum_{i=1}^ns_ix_i'(0)}_\text{juvenile}+\underbrace{\sum_{i=n+1}^{2n}x_i'(0)}_\text{adult}, \quad x(0)=e_{j+n}\\
&=\sum_{i=1}^ns_if_{12ij}-\sum_{i=1}^nv_{22ij}.
\end{align*}
In order to demonstrate that the initial growth rate calculated using the weighted $\ell_1$ norm, $\tilde{\lambda}_j^p$, indeed measures the growth rate of the population if all individuals are weighted according to their contribution to the adult population, we show that $\tilde{\lambda}_j^p$ is equivalent to scaling the juvenile population on each patch by the probability of survival to adulthood, and then measuring the initial growth rate using the unweighted $\ell_1$ norm, defined previously as $\tilde{\lambda}_j$.
\begin{lemma}
If each juvenile population on patch $j$ in system (\ref{eq:patch}) is rescaled by the patch specific survival probability, $s_i=\sum_{k=1}^n(-V_{21}V_{11}^{-1})_{ki}$, then the initial growth rate using the unweighted $\ell^1$ norm, $\tilde{\lambda}_j$, is equal to the patch specific weighted initial growth rate, $\tilde{\lambda}_j^p$ for the unscaled system.
\end{lemma}
\begin{proof}
Rescale the juvenile population on patch $i$ by the patch specific survival probability $s_i$ given in equation (\ref{eq:sj}). In terms of system (\ref{eq:patch}) this means that $x_i^*=s_ix_i$ for $i=1,\dots,n$, $x_i^*=x_i$ for $i=n+1,\dots,2n$. Rewriting the system of equations
\begin{align*}
x^{*\prime}&=A^*x^*\\
A^*=F^*-V^*,\quad
F^*&=\begin{bmatrix}
0 &SF_{12}\\
0 &0
\end{bmatrix},\quad
V^*=\begin{bmatrix}
V_{11} & 0 \\
V_{21}S^{-1} & V_{22}
\end{bmatrix},
\end{align*}
where $S=\diag(s_1,\dots,s_n)$. The unweighted initial growth rate for the scaled system is then
\begin{align*}
\tilde{\lambda}_j^*&=\sum_{i=1}^n(SF_{12})_{ij}-\sum_{i=1}^nv_{22ij}\\
&=\sum_{i=1}^n s_if_{12ij}-\sum_{i=1}^nv_{22ij}\\
&=\tilde{\lambda}_j^p.
\end{align*}
Thus the unweighted initial growth rate for the scaled system is equal to the patch-weighted initial growth rate of the unscaled system, $\tilde{\lambda}_j^p$.
\end{proof}
We believe that it is more intuitive to measure reactivity in a stage-structured system using a weighted norm, rather than scaling the juvenile population and using the unweighted $\ell_1$ norm, but for other systems this may not be the case. Recently Mari et al. \cite{Mari2017} have developed a new measure of reactivity called generalized reactivity, or g-reactivity, so that the reactivity of any specific combination of state variables in a system can be measured, and we demonstrate how to place our work in this context. The general framework of g-reactivity allows the reactivity of only the predator to be measured in a predator-prey system, or a single patch in a metapopulation model. Moreover in a stage-structured model, g-reactivity can be used to allow for a differential contribution of the juvenile and adult populations to the reactivity of the system, and so we can compare the calculation of g-reactivity to our calculation using the weighted $\ell_1$ norm. To calculate the g-reactivity of a system $x'=Ax$, a linear transformation is introduced, $y=Cx$, where $C$ is a matrix that defines the required contribution of each of the state variables, and then reactivity is calculated for $y$ using equation (\ref{eq:reactive}). For system (\ref{eq:patch}), g-reactivity is equivalent to reactivity in our weighted norm, $\max_j \tilde{\lambda}_j^p$, if $C$ is a $2n\times 2n$ identity matrix, but with the first $n$ diagonal entries replaced with $s_1,\dots,s_n$.
Returning to our measure of initial growth rate using a patch weighted norm, we present a couple of examples below to illustrate the calculation of $\tilde{\lambda}_j^p$ in different systems.
\subsection*{Example 4}
Consider a two patch system where juveniles are born onto all patches but only mature into adults on the patch where they were born:
\begin{align}
j_1'&=b_{11}a_1+b_{12}a_2-m_1j_1-d_{j1}j_1 \label{eq:ja1}\\
j_2'&=b_{21}a_1+b_{22}a_2-m_2j_2-d_{j2}j_2 \nonumber\\
a_1'&=m_1j_1-d_{a}a_1\nonumber\\
a_2'&=m_2j_2-d_{a}a_2.\nonumber
\end{align}
Here $j_i$ is the number of juveniles on patch $i$, $a_i$ is the number of adults on patch $i$, $b_{ij}$ is the birth rate of juveniles on patch $i$ from adults on patch $j$, $m_i$ is the maturation rate of juveniles on patch $i$ into adults on patch $i$, $d_{ji}$ is the death rate of juveniles on patch $i$, and $d_a$ is the death rate of adults, which is the same on both patches. The lifecycle graph for this system is shown in Figure (\ref{fig:ja1}).
\begin{figure}
\centering
\begin{tikzpicture}
\node (j1) [stage] {$j_1$};
\node (j2) [stage, right of=j1, xshift=1cm] {$j_2$};
\node (a1) [stage, below of=j1, yshift=-1cm] {$a_1$};
\node (a2) [stage, below of=j2, yshift=-1cm] {$a_2$};
\draw [arrow] (a1) to [out=150,in=210] node[left] {$b_{11}$} (j1);
\draw [arrow] (j1) to [out=270, in=90] node[left] {$m_1$} (a1);
\draw [arrow] (a1) edge node[left,pos=0.95, xshift=-0.1cm] {$b_{21}$} (j2);
\draw [arrow] (a2) edge node[left,pos=0.1] {$b_{12}$} (j1);
\draw [arrow] (j2) edge node[right] {$m_{2}$} (a2);
\draw [arrow] (a2) to [out=30,in=330] node[right] {$b_{22}$} (j2);
\node (j0) [draw=none,fill=none, left of=j1] {};
\node (a0) [draw=none,fill=none, left of=a1] {};
\node (j3) [draw=none,fill=none, right of=j2] {};
\node (a3) [draw=none,fill=none, right of=a2] {};
\draw [arrow] (j1) edge node[above] {$d_{j1}$} (j0);
\draw [arrow] (a1) edge node[below] {$d_{a1}$} (a0);
\draw [arrow] (j2) edge node[above] {$d_{j2}$} (j3);
\draw [arrow] (a2) edge node[below] {$d_{a2}$} (a3);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:ja1}). Here $b_{ij}$ is the birth rate of juveniles on patch $i$ from adults on patch $j$, $m_i$ is the maturation rate of juveniles on patch $i$ to adults on patch $i$, $d_{ji}$ is the death rate of juveniles on patch $i$ and $d_{ai}$ is the death rate of adults on patch $i$.}
\label{fig:ja1}
\end{figure}
In this case
\begin{align*}
F_{12}=\begin{bmatrix}
b_{11}&b_{12}\\
b_{21}&b_{22}
\end{bmatrix},\quad
V_{11}&=\begin{bmatrix}
m_1+d_{j1}&0\\
0&m_2+d_{j2}
\end{bmatrix},\quad
V_{21}=\begin{bmatrix}
-m_1&0\\
0&-m_2
\end{bmatrix},\\
V_{22}=\begin{bmatrix}
d_a & 0 \\ 0 & d_a
\end{bmatrix}, \quad
-V_{21}V_{11}^{-1}&=\begin{bmatrix}
\frac{m_1}{m_1+d_{j1}}&0\\
0&\frac{m_2}{m_2+d_{j2}}
\end{bmatrix},\\
\tilde{\lambda}_1^p&=s_1b_{11}+s_2b_{21}-d_{a}\\
\tilde{\lambda}_2^p&=s_1b_{12}+s_2b_{22}-d_{a}\\
s_1&=\frac{m_1}{m_1+d_{j1}}\\
s_2&=\frac{m_2}{m_2+d_{j2}}.
\end{align*}
If we look at $\tilde{\lambda}_1^p$, we see that $s_1$ is the probability that a juvenile born onto patch 1 survives to become an adult and it is multiplying $b_{11}$, the birth rate of juveniles onto patch 1 from adults on patch 1. Therefore the first component of $\tilde{\lambda}_1^p$ represents the rate of birth of new juveniles onto patch 1 from one adult on patch 1, but scaled by the probability that these juveniles survive to become adults. Likewise the second component, $s_2b_{21}$, is the rate of birth of new juveniles onto patch 2 from one adult on patch 1, scaled by the probability that those juveniles also become adults. Thus $\tilde{\lambda}_1^p$ is the initial growth rate of the total population, scaled in terms of the contribution to the adult population, when the population begins with one adult on patch 1.
\subsection*{Example 5}
We also consider a system in which juveniles are born onto the same patch as adults, but can then migrate between patches as they mature into adults:
\begin{align}
j_1'&=b_{11}a_1-m_{11}j_1-m_{21}j_1-d_{j1}j_1\label{eq:ja2}\\
j_2'&=b_{22}a_2-m_{22}j_2-m_{12}j_2-d_{j2}j_2\nonumber\\
a_1'&=m_{11}j_1+m_{12}j_2-d_{a}a_1\nonumber\\
a_2'&=m_{22}j_2+m_{21}j_1-d_{a}a_2.\nonumber
\end{align}
from which we calculate
\begin{align*}
F_{12}=\begin{bmatrix}
b_{11} & 0\\ 0 &b_{22}
\end{bmatrix}, \quad
&V_{11}=\begin{bmatrix}
m_{11}+m_{21}+d_{j1} & 0 \\ 0 & m_{12}+m_{22}+d_{j2}
\end{bmatrix}, \quad
V_{21}=\begin{bmatrix}
-m_{11} & -m_{12}\\ -m_{21} &-m_{22}
\end{bmatrix},\\
V_{22}=\begin{bmatrix}
d_a & 0 \\ 0 & d_a
\end{bmatrix}, \quad
-&V_{21}V_{11}^{-1}=\begin{bmatrix}
\frac{m_{11}}{m_{11}+m_{21}+d_{j1}} & \frac{m_{12}}{m_{12}+m_{22}+d_{j2}}\\
\frac{m_{21}}{m_{11}+m_{21}+d_{j1}} & \frac{m_{22}}{m_{12}+m_{22}+d_{j2}}
\end{bmatrix},\\
\tilde{\lambda}_1^p&=s_1b_{11}-d_a\\
\tilde{\lambda}_2^p&=s_2b_{22}-d_a\\
s_1&=\frac{m_{11}+m_{21}}{m_{11}+m_{21}+d_{j1}}\\
s_2&=\frac{m_{12}+m_{22}}{m_{12}+m_{22}+d_{j2}}.
\end{align*}
\begin{figure}
\centering
\begin{tikzpicture}
\node (j1) [stage] {$j_1$};
\node (j2) [stage, right of=j1, xshift=1cm] {$j_2$};
\node (a1) [stage, below of=j1, yshift=-1cm] {$a_1$};
\node (a2) [stage, below of=j2, yshift=-1cm] {$a_2$};
\draw [arrow] (a1) to [out=150,in=210] node[left] {$b_{11}$} (j1);
\draw [arrow] (j1) to [out=270, in=90] node[left, xshift=0.1cm] {$m_{11}$} (a1);
\draw [arrow] (j2) edge node[left,pos=0.05, xshift=-0.1cm] {$m_{12}$} (a1);
\draw [arrow] (j1) edge node[left,pos=0.9] {$m_{21}$} (a2);
\draw [arrow] (j2) edge node[right,xshift=-0.1cm] {$m_{22}$} (a2);
\draw [arrow] (a2) to [out=30,in=330] node[right] {$b_{22}$} (j2);
\node (j0) [draw=none,fill=none, left of=j1] {};
\node (a0) [draw=none,fill=none, left of=a1] {};
\node (j3) [draw=none,fill=none, right of=j2] {};
\node (a3) [draw=none,fill=none, right of=a2] {};
\draw [arrow] (j1) edge node[above] {$d_{j1}$} (j0);
\draw [arrow] (a1) edge node[below] {$d_{a1}$} (a0);
\draw [arrow] (j2) edge node[above] {$d_{j2}$} (j3);
\draw [arrow] (a2) edge node[below] {$d_{a2}$} (a3);
\end{tikzpicture}
\caption{Digraph for system (\ref{eq:ja2}). Here $b_{ii}$ is the birth rate of juveniles on patch $i$ from adults on patch $i$, $m_{ij}$ is the maturation rate of juveniles on patch $j$ to adults on patch $i$, $d_{ji}$ is the death rate of juveniles on patch $i$ and $d_{ai}$ is the death rate of adults on patch $i$.}
\label{fig:ja2}
\end{figure}
Now if we examine the first component of $\tilde{\lambda}_1^p$, $s_1=(m_{11}+m_{21})/(m_{11}+m_{21}+d_{j1})$, we can see that because juveniles from patch 1 can now migrate (as they mature) to both patches, $s_1$ is the probability that juveniles from patch 1 become adults on either patch. Likewise $s_2$ is the probability that juveniles from patch 2 become adults on either patch.
Here we have shown that if we use a weighted $\ell_1$ norm to scale the initial growth rate so that the juvenile population is scaled by the patch specific probability that juveniles become adults, then our scaled initial growth rate, $\tilde{\lambda}_j^p$ matches the biological intuition that we would like when measuring initial growth of the population. It is positive if the population, scaled so that every individual is measured by its contribution to the adult population, is growing, and negative if the population is decreasing. Measures of reactivity and attenuation then also represent their intuitive biological properties, and we are no longer in the situation (as if the initial growth rate was unscaled) that most marine metapopulations are reactive.
It is also possible to create a weighted norm where the juvenile populations on each patch are weighted by the same probability of survival, rather than by patch-specific probabilities $s_i$. In some cases it may be useful to scale all patches by the same survival probability, though under this weighted norm reactivity no longer corresponds exactly to the intuitive biological meaning mentioned previously.
\section{Discussion}
Transient dynamics often differ drastically from the asymptotic dynamics of a system and require different analytical tools. In this paper we have presented a unifying framework for analysing transient dynamics in marine and other birth-jump metapopulations, from the choice of norms to the incorporation of stage structure. We began by using the $\ell_1$ norm to define reactivity and attenuation in single species metapopulations and used examples to compare reactivity in the $\ell_1$ norm with reactivity in the more commonly used $\ell_2$ norm. We presented a couple of two patch models that gave rise to long transients: one stable system that exhibits a long period of growth before eventual decay, and one unstable system that exhibits a long period of decay before growth. In marine metapopulations, where patches are connected via larval dispersal, we examined how strong advective flow, coupled with a large number of patches, can lead to large transient growth. We then connected the initial growth rate of the metapopulation to the source-sink distribution of patches and lastly we demonstrated how to measure reactivity meaningfully in stage-structured marine metapopulations.
We are by no means the first to analyze the transient dynamics of systems, and in fact there has been an increase in the study of transient dynamics over the last couple of decades. In a pair of recent papers, several authors have identified certain mechanisms as the main causes of long transients in ecological systems \cite{Hastings2018, Morozov2020}. These identified mechanisms that cause the long transients present in the examples in this paper are slow-fast systems, crawl-bys, and high dimensionality. Slow-fast systems cause long transients when the system rapidly converges to a slow manifold, then moves slowly towards or away from an equilibrium, depending on the stability of the system. This occurs in both examples in section \ref{sec:arblarge}. The second example in section \ref{sec:arblarge} is also an instance of a crawl-by where the initial condition is near a saddle equilibrium but the movement away from the equilibrium occurs over a long timescale. Lastly in section \ref{sec:largepatch} we explicitly demonstrated how increasing the dimension of a system, by increasing the patch number in a linear metapopulation, leads to longer transients.
Our work also reinforces the fact that reactivity is a property specific to the norm under which it is measured. This has been mentioned in the first paper on reactivity by Neubert and Caswell\cite{Caswell1997}, who also recognize that it is always possible to find a norm such that a stable system is never reactive. It has also been noted by Lutscher and Wang \cite{Lutscher2020}, who mention that reactivity must be analysed in the dimensional version of a system rather than the non-dimensionalized version. The reactivity may be different between the two systems but the dimensional system is where the measure of reactivity is biologically meaningful. When analysing reactivity in metapopulations this fact is significant in two ways: first by using the $\ell_1$ norm rather than the $\ell_2$ norm to measure reactivity we can explicitly measure the growth rate of a population, and second by using a weighted $\ell_1$ norm we prevent the juvenile population from disproportionately affecting the reactivity of the system.
Differentially weighting certain classes of a population to calculate reactivity has been mentioned in passing by Verdy and Caswell \cite{Verdy2008}, and more extensively by Mari et al. \cite{Mari2017} who developed a new measure of reactivity called general reactivity, or g-reactivity. This is a method of only measuring the reactivity of the components of interest in a population, e.g. predators in a predator-prey model, and can also be used more generally to scale the contribution of different components of the population. Our method of using a weighted $\ell_1$ norm for stage-structured models has an equivalent formulation using g-reactivity that is discussed in section \ref{sec:weight}, though Mari et al. \cite{Mari2017} use the $\ell_2$ norm to measure reactivity, rather than the $\ell_1$ norm, and are thus using a different measure of population growth.
While we believe the $\ell_1$ norm is the most biologically relevant norm to measure reactivity, we are among the first to use it to analyse reactivity in continuous time models. Townley et al. \cite{Townley2007} show how to calculate reactivity for stage-structured models in continuous time using the $\ell_1$ norm, but in following papers proceed to analyse reactivity in the $\ell_1$ norm only in discrete time systems \cite{Townley2008, Stott2010, Stott2011, Stott2011a}. Most authors measure reactivity with the $\ell_2$ norm, presumably due to the nice mathematical property that reactivity in the $\ell_2$ norm can be measured simply as $\lambda(H(A))$, where $H(A)=(A+A^T)/2$ \cite{Caswell1997, Caswell2005, Neubert2002, Neubert2004, Verdy2008, Lutscher2020, Snyder2010}. But while mathematically tractable, the biological meaning of Euclidean distance ($\ell_2$) is less clear than population size ($\ell_1$) and as shown in section \ref{sec:reacl1l2}, there are times when reactivity in $\ell_2$ does not correspond to an increase in population size.
In addition to being biologically meaningful, reactivity in the $\ell_1$ norm is also simple to calculate for single species metapopulations due to the fact that the populations on each patch are non-negative, and thus the full solution remains in the non-negative cone. Mathematically, a metapopulation governed by $x'=Ax$ will be reactive in the $\ell_1$ norm if $\max_j \sum_{i=1}^n a_{ij}>0$. Geometrically, a system is reactive in the $\ell_1$ norm if the dot product of the derivative vector of any initial condition and the outward normal vector of the plane $x_1+x_2+\dots x_n=1$ is positive. If we instead want to consider the reactivity in a system where this assumption is relaxed, say a predator-prey metapopulation, then the mathematical calculation using the $\ell_1$ norm is no longer so simple, but our geometric intuition is similar. Instead of verifying if the dot product of the derivative vector of any initial condition and the outward normal vector of the plane $x_1+x_2+\dots x_n=1$ is positive, see for example Figure \ref{fig:reactl1}, we would instead need to take the dot product with the outward normal vector to the hypercube $|x_1|+|x_2|+\dots |x_n|=1$. If we continue to use $\max_j \sum_{i=1}^n a_{ij}>0$ to calculate reactivity for systems that do not remain in the non-negative cone then it is possible for systems to not be reactive and yet also be unstable, thus an interesting area for future work would be to mathematically formulate reactivity in terms of the matrix $A$ for these metapopulations.
No matter the norm in which reactivity and attenuation are measured, they are defined in terms of the linearization of a non-linear system around an equilibrium. As mentioned in the Introduction,
reactivity and attenuation are therefore most relevant around hyperbolic equilibria, where the dynamics of the non-linear system are well approximated by the linearized system. Another caveat is that it is possible for an equilibrium of a non-linear system to not be reactive, but for a perturbation of the non-linear system to still cause a large excursion away from the stable equilibrium before eventually returning. Excitable systems, such as the FitzHugh-Nagumo system, have stable equilibria with attracting regions, but small perturbations still trigger large excitations \cite{FitzHugh1961, Nagumo1962}. These systems may not be reactive from the linearized definition of reactivity, but can still exhibit similar behaviour to reactivity in the non-linear system, given a sufficient perturbation.
The final extension that we would like to highlight is the relationship between reactivity of continuous time models and reactivity of their discrete counterparts. Many marine metapopulations are modelled in discrete time due to yearly breeding cycles, however some are modelled in discrete time due to ease of simulation. For these models, where the time step is on the order of hours or days, we can connect the reactivity of the continuous time system with the discrete time system using a Taylor expansion. The continuous time system, $x'=Ax$, has the solution $x(t)=e^{At}x_0$ that could be sampled at discrete time steps $\tau$ to create the discrete time system $x(t+\tau)=B x(t),$ where $B=e^{A \tau}$.
The continuous time system $x'=Ax$ is reactive in $\ell_1$ if $A$ has a positive column sum (Lemma \ref{lemma:reactive}). In discrete time the system $x(t+\tau)=Bx(t)$ is reactive in $\ell_1$ if $B$ has a column sum that is greater than 1 \cite{Townley2007}. Assuming $\tau$ is a small timestep then we can approximate $B=e^{A \tau}=I+A \tau +O(\tau^2)$. Thus we can see that if the system is reactive in continuous time, i.e. there is a positive column sum of $A$, then we can find a sufficiently short time step $\tau$ such that the discrete time system is also reactive, i.e. there is a column sum of $B$ greater than 1. However for a predetermined time-step $\tau$ there are continuous time systems $x'=Ax$ that are reactive but for which their discrete counterparts $x(t+\tau)=e^{A\tau}x(t)$ are not reactive. One such example is system (\ref{eq:asymgrow1}) with $\epsilon=0.9$ and $\tau=1$.
Lastly, we hope our work can be used to better understand the transient dynamics in marine metapopulations for which habitat patches have already been classified as sources and sinks. For these systems the transient dynamics that may occur following a disturbance depend directly on the new distribution of the population. If the remaining population is distributed amongst sink patches then it initially declines, even if it eventually recovers. Likewise if the population is distributed amongst source patches then it initially grows, though this growth may not necessarily occur on the source patch itself. In addition, the relationship between transient dynamics and the source-sink distribution of marine metapopulations may also be useful when examining the dynamics that can occur following the protection of new marine environments, such as newly implemented Marine Protected Areas.
|
\section*{Abstract}
The article studies the transport equation that governes the motion of a fluid in a bounded domain, under the hypothesis of zero velocity at the boundary and supposing the incompressible nature of the fluid. Together with existence and uniqueness results, we study the DiPerna-Lions stability problem, in the case of a bounded domain.
\tableofcontents
\let\thefootnote\relax\footnotetext{\textsuperscript{1} \textit{Dipartimento di Matematica, Università degli Studi di Roma "Tor Vergata", e-mail: \href{mailto:<EMAIL>}{<EMAIL>}}}
\section{Introduction and classical theory}
In the following, we will always consider $\Omega$ to be an open, bounded, connected and simply connected domain in $\mathbb{R}^N$, with smooth boundary. For every time $t$, it is possible to consider the density (or \textit{concentration}) of a fluid over this domain, quantified by the function $\rho(t):\Omega\to\mathbb{R}$. Under the action of a vector field $u=u(x,t)\in\mathbb{R}^N$, that measures the velocity of the motion of the fluid at the point $x\in\Omega$ and the time $t$, the quantity $\rho$ varies under the law
\begin{equation}\label{trasportodiquestocap} \begin{cases}\rho_t(x,t)-u(x,t)\cdot \nabla \rho(x,t)=0\\
\rho(x,0)=\rho_0(x)
\end{cases}\end{equation}
that describes the evolution of the initial density $\rho_0$ via transport equation.
\paragraph{Classical theory} The transport equation in a bounded domain has a well-known regular theory, that assures the existence and uniqueness of the solution in the case of a regular velocity field $u=u(x,t)$ and a regular initial density $\rho_0$. In particular, solving the equation via characteristics method, it is straighforward that the initial values provide naturally upper and lower bound to the solution at every time. This facts are summarized by the following theorem, see \cite{Figueredo:2009dg2}.
\begin{theorem}\label{maintransportequation} Let $\Omega$ be a bounded domain. Let $u(x,t)\in C([0,T]; C^1(\overline\Omega)^N)$ with $\nabla \cdot u=0$ and $u(x,t)=0$ for every $(x,t)\in\partial\Omega\times[0,T]$. Let $\rho_0\in C^1(\overline\Omega;\mathbb{R})$. Then the problem \eqref{trasportodiquestocap} has a unique solution $\rho\in C^1([0,T]\times\overline\Omega;\mathbb{R})$. Moreover: \begin{enumerate}[label=(\roman*)]
\item if $\alpha,\beta\in \mathbb{R}$ are such that $\alpha\leq \rho_0(x)\leq\beta$ for every $x\in\overline\Omega$, then
$$\rho(x,t)\in [\alpha,\beta] \qquad \forall (x,t)\in [0,T]\times\overline\Omega$$
\item The density solution $\rho$ satisfies a mass incompressibility property, that is $\|\rho(t)\|_q=\|\rho_0\|_q$, for every $q\in[1,\infty]$ and $t\in [0,T]$.
\end{enumerate}
\end{theorem}
The necessity to consider a weaker formulation of the problem is due, among the other things, to the presence of this equation in the Navier-Stokes (density dependent) system, where the weak interpretation of the equations plays an important role, in order to study the well-posedness problem.
In this article we follow the seminal work \cite{Figueredo:2009dg} by DiPerna-Lions, to prove existence and uniqueness of weak solution to the transport equation, together with a fundamental stability theorem. DiPerna-Lions' work studies the transport equation in the whole space $\mathbb{R}^N$. However, in their work there is no mention of the bounded domain case. In the following, we will uniquely inspect this "new" case. In order to trace the hypothesis of the classical theory in a bounded domain, we will suppose that the velocity field is free-divergence and with zero boundary conditions, in weak (trace) sense. These hypothesis will be helpful in a moment, since we hope to apply a limit argument to the classical solutions. We will avoid the formalism of weak theory, always writing the distributional interpretation of the weak derivatives in the (rigorous) integral form.
The paper is concretely inspired by few lines in \cite{kimchoe1}, where the results of the work by DiPerna-Lions are applied to deduce a weak-* convergence. Through this paper, it will seem that the hypothesis on the initial data are a bit relaxed: in the stability theorem we will ask the velocity field to be continuous on $\overline\Omega$. In the context of the weak formulation theory of the $3$-dimensional Navier-Stokes system, this request is ensured by the typical hypothesis of the weak velocity field in the weak-strong theory, for example $u\in H^2(\Omega)$, that in $N=3$ assures the continuity until the boundary of $\Omega$ (see classical results, e.g. \cite{evans10}).
\subsection{Notations and preliminaries}
Given a domain $\Omega\subseteq\mathbb{R}^N$, we indicate with $W^{k,q}(\Omega)$ the standard Sobolev space over $\Omega$. The closure of the test functions in the topology of this space is $W_0^{k,q}(\Omega)$. For a function $v\in W^{k,q}(\Omega)$, we say that $\nabla \cdot v=0$, i.e. $v$ is divergence-free in the weak sense, if
\begin{equation}
\int_\Omega v\cdot \nabla \varphi \ dx=0
\end{equation}
for every $\varphi\in C_c^\infty(\Omega)$. We set $W_{0,\sigma}^{k,q}(\Omega):=\{v\in W_0^{k,q}(\Omega): \ \nabla\cdot v=0\}$. This space, equipped with the norm $\|\cdot\|_{W^{k,q}(\Omega)}$, is a Banach space. It will be useful the following theorem that collects various standard results about the convergence in measure.
\begin{theorem}\label{propositionconvmeas31} Let $(\Omega,\mathcal{M},\mu)$ be a measure space, with $\mu(\Omega)<\infty$. Let $f_n,f$ be measurable functions over $\Omega$. Then the following properties hold.
\begin{enumerate}[label=(\roman*)]
\item If $f_n\to f$ in measure and exists $g\in L^p(\Omega)$ such that $|f_n|\leq g$, then $f_n\to f$ in $L^p(\Omega)$.
\item If $f_n\to f$ in measure and $\beta$ is a continuous function over $\mathbb{R}$, then $\beta(f_n)\to \beta(f)$ in measure.
\item Let $f_n$ a sequence of measurable functions, such that for every $\beta_k$ piecewise differentiable such that
$$\beta_k(t):=\begin{cases}
\beta_k(t)=0 & |t|\leq \frac1k\\
\beta_k'(t)>0 & |t|>\frac1k\\
\beta_k, \ \beta_k' \ \text{are bounded}
\end{cases}$$
it exists $v_k$ measurable function such that
$$\beta_k(f_n)\to v_k \qquad \text{in measure as $n\to\infty$}$$
If moreover $f_n\in L^p(\Omega)$, with $\displaystyle \sup_{n\in\mathbb{N}}\|f_n\|_{L^p(\Omega)}<\infty$, it follows that exists $f$ measurable function such that
$$f_n\to f \qquad \text{in measure as $n\to\infty$}$$
\end{enumerate}
\end{theorem}
We also have to remember the following theorem about uniform convergence in time-dipendent Banach spaces (a Banach spaces version of Ascoli-Arzelà's theorem).
\begin{theorem}\label{lemmaan194} Let $X$ be a Banach space, and let $-\infty<a<b<\infty$. Let $f_n\in C([a,b];X)$ be a sequence such that, for every $t_0\in [a,b]$ and for every $[a,b]\ni t_n\to t_0$
\begin{equation}\label{limitconditionfntn94}\lim_{n\to\infty}\|f_n(t_n)-f(t_0)\|_X=0\end{equation}
with $f\in C([a,b];X)$. Then $f_n\to f$ in $C([a,b];X)$.
\end{theorem}
This easy integral estimate will be useful in the last part of the paper.
\begin{lemma}\label{teoremaunifintgfn1a} Let $p\in (1,\infty)$. Let $f_n\in L^p(\Omega)$ a sequence of function in $L^p(\Omega)$ such that $\displaystyle \sup_{n\in\mathbb{N}}\|f_n\|_p<\infty$. Then, for every $\varepsilon>0$ exists $M_\varepsilon>0$ such that
\begin{equation}\sup_{n\in\mathbb{N}}\left\{\int_{\{x\in\Omega: \ |f_n(x)|>M_\varepsilon\}}|f_n(x)| \ dx\right\}<\varepsilon\end{equation}
\end{lemma}
\section{Weak theory}
\begin{definition}[Linear transport equation] Let $\Omega$ be a bounded domain in $\mathbb{R}^N$ and $T>0$. Consider $p\in [1,\infty]$ and let $q$ be its conjugate, such that $\frac1p+\frac1q=1$. Let $u\in L^1(0,T;W_0^{1,q}(\Omega))$ be a velocity field over $(0,T)\times\Omega$, with $\nabla \cdot u=0$, i.e. $u$ satisfies the divergence-free property, in the weak sense. Let $\rho_0\in L^p(\Omega)$ be the initial density. We say that \textit{the density $\rho\in L^\infty(0,T;L^p(\Omega))$ satisfies the (weak) transport equation}
\begin{equation}\label{trasportodiqua}\begin{cases}\rho_t-u\cdot \nabla \rho=0 \quad & \text{in $(0,T)\times\Omega$}\\
\rho(0)=\rho_0
\end{cases}\end{equation}
if it is a solution of \eqref{trasportodiqua} in distributional sense, that is
\begin{equation}\label{trasportodistirbuzionale}-\int_0^T\bigg(\int_\Omega \rho\ \phi_t \ dx\bigg) \ dt -\int_\Omega \rho_0(x)\phi(0,x)\ dx+\int_0^T\bigg(\int_\Omega \rho\ (u\cdot \nabla\phi) \ dx\bigg) \ dt=0\end{equation}
for every test function $\phi\in C^\infty([0,T]\times \Omega;\mathbb{R})$ with compact support in $[0,T)\times\Omega$. This space can also be denoted by $\mathcal{D}([0,T)\times\Omega)$ or $C_c^\infty([0,T)\times\Omega;\mathbb{R})$.
\end{definition}
We first prove an existence theorem.
\begin{theorem}[Existence of weak solutions] \label{exsolweak5} Let $p\in(1,\infty]$, $\rho_0\in L^p(\Omega)$. Let $q$ be the conjugate exponent of $p$. Suppose that $u\in L^1(0,T;W_0^{1,q}(\Omega))$, with $\nabla \cdot u=0$. Then, there exists a solution of \eqref{trasportodiqua} in $L^\infty(0,T;L^p(\Omega))$ with initial density $\rho_0$.
\end{theorem}
\begin{figure}[tb]
\centering
\includegraphics[width=0.25\columnwidth]{disegno1}
\caption[An example of a floating figure]{The domains $\Omega_m$ approach $\Omega$ from the outside.}
\label{fig:gallery}
\end{figure}
\begin{proof}
The proof that we present here is based over a classical regularization argument. Using the density of test function in Lebesgue spaces we can find a sequence $u^n\in C_c^\infty(0,T;W_{0,\sigma}^{1,q}(\Omega))$ such that
\begin{equation}\label{convfortspbc1q0dv}\lim_{n\to\infty}\|u-u^n\|_{L^1(0,T;W_{0,\sigma}^{1,q}(\Omega))}=0\end{equation}
Since $u^n(t)\in W_0^{1,q}(\Omega)$, each element of the sequence can be extended to be zero outside $\Omega$. Moreover the initial density $\rho_0$ can be approached in $L^p(\Omega)$ with a sequence $\rho_n^0\in C_c^\infty(\Omega)$. We now set
\begin{equation} A_m:=\{x\in \Omega^c: \ \text{dist}(x,\partial\Omega)>\frac1m\}, \qquad \Omega_m:=A_m^c\end{equation}
See figure~\vref{fig:gallery}.
We define
\begin{equation}u^{m,n}(x,t):=\int_{\Omega_m} \eta_m(x-y) u^n(y,t) \ dy\end{equation}
For every $t\in [0,T]$ fixed, this convolution is smooth in $x\in\Omega_m$. Moreover, it is continuous as a function of two variables.
Thanks to the convolution properties, the $x$-derivative is continuous over $\overline\Omega_m$: in particular, the gradient $\nabla u^{m,n}$ has the same integral form of $u^{m,n}$. So $u^{m,n}\in C([0,T];C^1(\overline\Omega_m))$. We have, furthermore, a gradient estimate:
\begin{equation}\label{stimacontrolloconvoluzione}|\nabla u^{m,n}(x,t)|=\bigg|\int_{\Omega_m}\eta_m(x-y) \nabla u^n(y,t)\ dy\bigg|\leq \bigg(\int_{\Omega_m}|\eta_m(x-y)|^p\ dy\bigg)^\frac1p\|\nabla u^n(\cdot, t)\|_q\leq\end{equation}
$$\leq\bigg(\int_{\mathbb{R}^N}|\eta_m(x-y)|^p\ dy\bigg)^\frac1p\max_{t\in[0,T]}\|\nabla u^n(\cdot, t)\|_q\equiv \bigg(\int_{\mathbb{R}^N}|\eta_m(z)|^p\ dz\bigg)^\frac1p\max_{t\in[0,T]}\|\nabla u^n(\cdot, t)\|_q$$
so that
$$\sup_{t\in [0,T]}\|\nabla u^{m,n}(t)\|_\infty\leq \bigg(\int_{\mathbb{R}^N}|\eta_m(z)|^p\ dz\bigg)^\frac1p\max_{t\in[0,T]}\|\nabla u^n(\cdot, t)\|_q$$
We observe two properties of this approximation:
\begin{enumerate}[label=(\roman*)]
\item If $x\in\partial \Omega_m$, we have $\displaystyle u^{m,n}(x,t)=\int_{\Omega_m}\eta_m(x-y)u^n(y,t)\ dy=0$
since $u^n(y,t)=0$ if $y\in B(x,\frac1m)$;
\item Moreover,
\begin{equation}\nabla \cdot u^{m,n}(x,t)=\int_{\Omega_m}\eta_m(x-y)\nabla\cdot u^n(y,t)\ dy=0\end{equation}
since $\nabla \cdot u^n(y,t)=0$ by the definition of $u^n$.
\end{enumerate}
\begin{figure}[tb]
\centering
\includegraphics[width=0.4\columnwidth]{disegno2}
\caption[An example of a floating figure]{The regularized velocity fields have equilibrium points at the boundary, and thus the trajectories with starting point at the boundary remain constantly on this point for every time, while the interior trajectories, in example the flow $\varphi(t;t_0,x)$, never reach the boundary.}
\label{fig:boundary}
\end{figure}
So, we can use this velocity field to solve the transport problem
$$\begin{cases}\rho_t-u^{m,n}\cdot \nabla \rho=0 & \text{in $[0,T]\times\overline\Omega_m$}\\
\rho(0,x)=\rho_0^n
\end{cases}$$
\begin{remark} The zero boundary condition and the divergence-free condition are fundamental to apply Theorem \ref{maintransportequation}. As we will see in a moment, we need these conditions to avoid that the (regular) characteristic curves escape the domain $\Omega$, as we send them to limit in order to obtain weak solutions. See figure ~\vref{fig:boundary}.
\end{remark}
We name $\rho^{m,n}$ the solution of this classical transport equation. We know, according to the classical theory presented above, that, eventually renaming the sequence,
$$\|\rho^{m,n}(t)\|_p=\|\rho_0^n\|_p\leq \|\rho_0\|_p+1=: C_0$$
It follows that $\|\rho^{m,n}\|_{L^\infty(0,T;L^p(\Omega))}\leq C_0$. Observe that, since $p\in (1,\infty]$, $L^\infty(0,T;L^p(\Omega))\simeq(L^1(0,T;L^q(\Omega))^*$, where $q$ is such that $\frac1p+\frac1q=1$. Moreover $L^q(\Omega)$ is separable, since $q\in [1,\infty)$. So, $L^1(0,T;L^q(\Omega))$ is separable. Then, thanks to the sequential version of Hanh-Banach theorem, we have that exists a weak-star converging subsequence, that approaches to some $\rho^n\in L^\infty(0,T;L^p(\Omega))$, that is
\begin{equation}\label{weakstarconvergencerho37}\rho^{m_k,n}\stackrel{*}{\rightharpoonup} \rho^n \end{equation}
in $L^\infty(0,T;L^p(\Omega))\simeq(L^1(0,T;L^q(\Omega))^*$. In particular, the sequence satisfies
\begin{equation}\label{weaktranspformapprox1}-\int_\Omega(\rho^{m_k,n}\varphi)(0)\ dx-\int_0^{T}\int_\Omega\rho^{m_k,n} \varphi_t\ dx \ dt=\int_0^{T}\int_\Omega\rho^{m_k,n} u^{m_k,n}\cdot \nabla \varphi\ dx\ dt\end{equation}
for every $\varphi\in C_c^\infty(\Omega\times [0,T);\mathbb{R})$, since $\rho^{m,n}$ is a classical solution and $u^{m,n}$ has free-boundary condition. Our aim is to pass to the limit the equation \eqref{weaktranspformapprox1}. Observe, first of all, that
\begin{equation}\int_\Omega \big(\rho^{m_k,n}\varphi\big)(0) \ dx\equiv \int_\Omega \rho_0^n(x)\varphi(x,0) \ dx,\qquad \int_0^T\int_\Omega \rho^{m_k,n}\varphi_t \ dx \ dt\stackrel{k\to\infty}{\longrightarrow} \int_0^T \int_\Omega \rho^n \varphi_t \ dx\ dt\end{equation}
thanks to the weak-$*$ convergence \eqref{weakstarconvergencerho37}. Furthermore
$$\bigg|\int_0^{T}\int_\Omega\rho^{m_k,n} u^{m_k,n}\cdot \nabla \varphi\ dx\ dt-\int_0^{T}\int_\Omega\rho^{n} u^{n}\cdot \nabla \varphi\ dx\ dt\bigg|\leq$$
$$\leq \bigg|\int_0^T\int_\Omega (\rho^{m_k,n}-\rho^{n})u^{n}\cdot \nabla \varphi \ dx \ dt\bigg| + C\bigg(\int_0^T\|\rho^{m_k,n}\|_p\|u^n-u^{m_k,n}\|_q \ dt\bigg)\leq $$
$$\leq \bigg|\int_0^T\int_\Omega (\rho^{m_k,n}-\rho^{n})u^{n}\cdot \nabla \varphi \ dx \ dt\bigg| + C\bigg(\sup_{(0,T)}\|\rho^{m_k,n}\|_p\bigg)\bigg(\int_0^T\|u^n-u^{m_k,n}\|_q \ dt\bigg)\leq$$
\begin{equation}\leq \bigg|\int_0^T\int_\Omega (\rho^{m_k,n}-\rho^{n})u^{n}\cdot \nabla \varphi \ dx \ dt\bigg| + CC_0\|u^n-u^{m_k,n}\|_{L^1(0,T;L^q(\Omega)}\end{equation}
where $C$ is an upper bound for the derivative of the test function $\nabla\varphi$. Observe now that $\|u^n-u^{m_k,n}\|_{L^1(0,T;L^q(\Omega))}\to0$ as $k\to\infty$, thanks to \eqref{convfortspbc1q0dv}, and, moreover $\displaystyle \int_0^T\|u^n\cdot \nabla \varphi\|_q \ dt\leq C\int_0^T\|u^n\|_q\ dt<\infty$
that is, $u^n\cdot \nabla \varphi\in L^1(0,T;L^q(\Omega))$ and so the weak star convergence of $\rho^{m_k,n}$ implies that
\begin{equation}\int_0^T\int_\Omega (\rho^{m_k,n}-\rho^{n})u^{n}\cdot \nabla \varphi \ dx \ dt\stackrel{k\to\infty}{\longrightarrow} 0\end{equation}
It follows that equation \eqref{weaktranspformapprox1}, sent to the limit, becomes
\begin{equation}\label{limitsendrhon1a}-\int_\Omega\rho_0^{n}(x)\varphi(x,0)\ dx-\int_0^{T}\int_\Omega\rho^{n} \varphi_t\ dx \ dt=\int_0^{T}\int_\Omega\rho^{n} u^{n}\cdot \nabla \varphi\ dx\ dt\end{equation}
Moreover, by the weak-$*$ convergence property, we have
\begin{equation}\label{boundrhonc0}\|\rho^n\|_{L^\infty(0,T;L^p(\Omega))}\leq \liminf_{k\to\infty}\|\rho^{m_k,n}\|_{L^\infty(0,T;L^p(\Omega))}\leq C_0\end{equation}
We now want to send $n\to\infty$ in \eqref{limitsendrhon1a}. Clearly, if $C$ is an upper bound of $\varphi$,
\begin{equation}\bigg|\int_\Omega (\rho_0^n(x)-\rho^0(x))\varphi(x,0) \ dx\bigg|\leq C\|\rho_0^n-\rho^0\|_p\to0\end{equation}
By the bound \eqref{boundrhonc0}, we have that there exists a subsequence $n_h$ and $\rho \in L^\infty(0,T;L^p(\Omega))$ such that, as $h\to\infty$,
\begin{equation}\rho^{n_h}\stackrel{*}{\rightharpoonup} \rho \end{equation}
It follows that
$$\bigg|\int_0^{T}\int_\Omega\rho^{n_h} u^{n_h}\cdot \nabla \varphi\ dx\ dt-\int_0^{T}\int_\Omega\rho u\cdot \nabla \varphi\ dx\ dt\bigg|=\bigg|\int_0^T\int_\Omega (\rho -\rho^{n_h})u\cdot \nabla \varphi \ dx \ dt -\int_0^T\int_\Omega \rho^{n_h} (u^{n_h}-u)\cdot \nabla \varphi \ dx \ dt\bigg|\leq$$
$$\leq \bigg|\int_0^T\int_\Omega (\rho -\rho^{n_h})u\cdot \nabla \varphi \ dx \ dt\bigg|+C\int_0^T\|\rho^{n_h}\|_p\|u^{n_h}-u\|_q \ dt\leq \bigg|\int_0^T\int_\Omega (\rho -\rho^{n_h})u\cdot \nabla \varphi \ dx \ dt\bigg|+$$
\begin{equation}+C\bigg(\sup_{(0,T)}\|\rho^{n_h}\|_p\bigg)\int_0^T\|u^{n_h}-u\|_q \ dt\leq \bigg|\int_0^T\int_\Omega (\rho -\rho^{n_h})u\cdot \nabla \varphi \ dx \ dt\bigg|+CC_0\|u^{n_h}-u\|_{L^1(0,T;L^q(\Omega))}\end{equation}
Since $u\cdot \nabla \varphi \in L^1(0,T;L^q(\Omega))$ and since $\rho^{n_h}$ converges weakly star to $\rho$, we have
\begin{equation}\int_0^T\int_\Omega (\rho -\rho^{n_h})u\cdot \nabla \varphi \ dx \ dt\stackrel{k\to\infty}{\longrightarrow} 0\end{equation}
It follows that
\begin{equation}-\int_\Omega\rho^0(x)\varphi(x,0)\ dx-\int_0^{T}\int_\Omega\rho \varphi_t\ dx \ dt=\int_0^{T}\int_\Omega\rho u\cdot \nabla \varphi\ dx\ dt\end{equation}
So we have found $\rho\in L^\infty(0,T;L^p(\Omega))$ such that it is a weak solution to the trasport equation with velocity $u$ and initial density $\rho^0$. This proves the theorem.
\end{proof}
\subsection{Weak solutions and convolutions}
We now observe that, under suitable hypothesis on $u$, weak solution to equation \eqref{trasportodiqua} can be approached by smooth (in space) solution of \eqref{trasportodiqua}, plus an error term. In particular, we have the following theorem.
\begin{theorem}[Convolution in $x$ of weak solutions]\label{approxregularixazione} Let $\Omega$ be a bounded domain. Consider $p\in(1,\infty]$, and $\rho\in L^\infty(0,T;L^p(\Omega))$ a solution of \eqref{trasportodiqua} with initial density $\rho_0\in L^p(\Omega)$ and assume that $u\in L^1(0,T;W^{1,\alpha}(\Omega))$ for some $\alpha\geq q$, $\nabla \cdot u=0$, where $q$ is the conjugate exponent of $p$. Let $\eta_\varepsilon=\eta_\varepsilon(x)$ be a regularizing kernel over $\Omega$. In particular, for every $\varepsilon>0$, if $\Omega_\varepsilon:=\{x\in\Omega: \ \text{dist}(x,\partial\Omega)>\varepsilon\}$, we define
\begin{equation}\eta_\varepsilon(x):=\frac{1}{\varepsilon^{n}}\eta\bigg(\frac{x}{\varepsilon}\bigg)\end{equation}
with $C_c^\infty(\mathbb{R}^{n};\mathbb{R})\ni\eta\geq0$, $\text{supp}(\eta)\subset B(0,1)$. Let $\rho_\varepsilon(x,t):=\big(\rho(\cdot,t)*\eta_\varepsilon\big)(x,t)$. Let $\phi\in C_c^\infty([0,T)\times\Omega;\mathbb{R})$ and suppose $\phi(x,\cdot)=0$ for every $x\in \Omega_0^c$, with $\Omega_0$ a compact subset of $\Omega$. Then, if $\varepsilon<\text{dist}(\Omega_0,\partial\Omega)$,
\begin{equation}\label{weakformaaproxeps96}-\int_0^T\bigg(\int_{\Omega_\varepsilon} \rho_\varepsilon \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_{\Omega_\varepsilon} \rho_\varepsilon^0 \ \phi(0,x) \ dx +\int_0^T\bigg(\int_{\Omega_\varepsilon} \rho_\varepsilon u\cdot \nabla \phi \ dx\bigg) \ dt=\int_0^T\bigg(\int_{\Omega} r_\varepsilon\phi \ dx\bigg)\ dt
\end{equation}
where
\begin{equation}\label{restoapprossimazione} r_\varepsilon(x,t):=\int_\Omega \rho(y,t)(u(y,t)-u(x,t))\cdot \nabla \eta_\varepsilon(y-x) \ dy, \qquad \rho_\varepsilon^0(x):=(\rho_0*\eta_\varepsilon)(x)\end{equation}
Moreover, for every $\Omega_0\subseteq\Omega$, $r_\varepsilon$ goes to zero in $L^1(0,T;L^\gamma(\Omega_0))$ when $\varepsilon\to0$,
where $\gamma$ is such that
\begin{equation}\frac{1}{\gamma}=\frac{1}{\alpha}+\frac1p\end{equation}
\end{theorem}
\begin{remark}
The convergence to zero of $r_\varepsilon$ in $L^1(0,T;L^\gamma(\Omega_0))$ assures that
$$\bigg|\int_0^T \bigg(\int_\Omega r_\varepsilon \phi \ dx\bigg) \ dt\bigg|=\bigg|\int_0^T \bigg(\int_{\Omega_0} r_\varepsilon \phi \ dx\bigg) \ dt\bigg|\leq |\Omega|^{\frac{\gamma-1}{\gamma}}\bigg(\sup_{[0,T]\times\Omega}|\phi|\bigg)\int_0^T\|r_\varepsilon\|_{L^\gamma(\Omega_0)} \ dt\to0$$
for $\varepsilon\to 0$.
\end{remark}
\begin{proof}
The proof that the term \eqref{restoapprossimazione} goes to zero in the suitable norm as $\varepsilon\to0$ is based on the same arguments in \cite{Figueredo:2009dg}, with analogous calculations. We only remark that
$$\int_0^T\bigg(\int_{\Omega_\varepsilon} \rho_\varepsilon(x,t)\frac{\partial\phi}{\partial t}(x,t)\ dx\bigg)\ dt=\int_0^T\bigg\{\int_{\Omega_\varepsilon} \bigg(\int_\Omega \rho(y,t) \eta_\varepsilon(x-y) \ dy\bigg)\frac{\partial\phi}{\partial t}(x,t)\ dx\bigg\}\ dt=$$
$$=\int_0^T\bigg\{\int_\Omega \bigg(\int_{\Omega_\varepsilon} \eta_\varepsilon(x-y) \frac{\partial \phi}{\partial t}(x,t) \ dx\bigg)\ \rho(y,t) \ dy\bigg\}\ dt=\int_0^T\bigg\{\int_\Omega \frac{\partial}{\partial t}\phi_\varepsilon(y,t) \ \rho(y,t) \ dy\bigg\}\ dt$$
since $\eta_\varepsilon(x-y)=\eta_\varepsilon(y-x)$ by definition, and, being $\varepsilon<\text{dist}(\Omega_0,\partial\Omega)$, we have $\phi(x,t)\equiv0$ in $\Omega/\Omega_\varepsilon$, so that
$$\int_{\Omega_\varepsilon} \eta_\varepsilon(x-y) \frac{\partial \phi}{\partial t}(x,t) \ dx=\int_{\Omega}\eta_\varepsilon(x-y) \frac{\partial \phi}{\partial t}(x,t) \ dx=:\frac{\partial}{\partial t}\phi_\varepsilon(y,t)$$
In the same way, we have
$$\int_{\Omega_\varepsilon} \rho_\varepsilon^0(x)\phi(0,x) \ dx=\int_\Omega \phi_\varepsilon(0,y) \rho^0(y) \ dy$$
Analogously
$$\int_0^T\bigg(\int_{\Omega_\varepsilon} \rho_\varepsilon(x,t) u(x,t)\cdot \nabla \phi(x,t) \ dx\bigg) \ dt=\int_0^T\bigg\{\int_\Omega \rho(y,t) \ \bigg(\int_{\Omega_\varepsilon}\eta_\varepsilon(x-y) u(x,t)\cdot \nabla \phi(x,t) \ dx\bigg) \ dy\bigg\} \ dt=$$
and being $\phi(x,t)\equiv0$ on $\Omega_\varepsilon^c$, and since $\nabla \eta_\varepsilon(x-y)=-\nabla \eta_\varepsilon(y-x)$, and $\nabla\cdot u=0$,
$$=\int_0^T\bigg\{\int_\Omega \rho(y,t)\bigg(\int_\Omega \eta_\varepsilon(x-y) u(x,t)\cdot \nabla \phi(x,t) \ dx \bigg) \ dy\bigg\}\ dt=\int_0^T\bigg\{\rho(y,t)\bigg(\int_\Omega \phi(x,t) u(x,t)\cdot\nabla \eta_\varepsilon(y-x) \ dx\bigg)\ dy\bigg\} \ dt$$
\end{proof}
The riformulation obtained in theorem \ref{approxregularixazione} allows to prove important results concerning the weak transport equation. In particular, we now prove a theorem that paves the way to the proof of the uniqueness of the (weak) solution. It also introduces the concept of renormalized solution.
\begin{theorem}\label{lemmaapproxbeta} Let $\Omega$ be a bounded domain. Fix $p\in(1,\infty]$, and consider $\rho\in L^\infty(0,T;L^p(\Omega))$, a solution of \eqref{trasportodiqua} with initial density $\rho_0\in L^p(\Omega)$ and assume that $u\in L^1(0,T;W^{1,\alpha}(\Omega))$ for some $\alpha\geq q$, $\nabla \cdot u=0$. Let $\eta_\varepsilon=\eta_\varepsilon(x)$ be a regularizing kernel over $\Omega$. In particular, if $\Omega_\varepsilon:=\{x\in\Omega: \ \text{dist}(x,\partial\Omega)>\varepsilon\}$, define
$$\eta_\varepsilon(x):=\frac{1}{\varepsilon^{n}}\eta\bigg(\frac{x}{\varepsilon}\bigg)$$
with $C_c^\infty(\mathbb{R}^{n})\ni\eta\geq0$, $\text{supp}(\eta)\subset B(0,1)$. Let $\rho_\varepsilon(x,t):=\big(\rho(\cdot,t)*\eta_\varepsilon\big)(x,t)$. Let $\phi\in C_c^\infty([0,T)\times\Omega)$ and suppose that $\phi(x,\cdot)=0$ for every $x\in \Omega_0^c$, with $\Omega_0$ compact set. Let $\beta\in C^1(\mathbb{R})$ a function, with $\beta,\beta'$ bounded.
Then, if $\varepsilon<\text{dist}(\Omega_0,\partial\Omega)$, equation \eqref{weakformaaproxeps96} holds, and
$$-\int_0^T\bigg(\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon^0) \ \phi(0,x) \ dx +\int_0^T\bigg(\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon) u\cdot \nabla \phi \ dx\bigg) \ dt=$$
$$=\int_0^T\bigg(\int_{\Omega_\varepsilon} r_\varepsilon\beta'(\rho_\varepsilon)\phi \ dx\bigg)\ dt$$
where, as above,
$$r_\varepsilon(x,t)=\int_\Omega \rho(y,t)(u(y,t)-u(x,t))\cdot \nabla \eta_\varepsilon(y-x) \ dy$$
\end{theorem}
\begin{remark} In this theorem, as in the previous one, we prove \textit{a posteriori} results about a solution that we already know that exists. So, we only require that $u\in L^1(0,T;W^{1,\alpha}(\Omega))$, without any request at the boundary. We know, however, that in order to assure the existence of a solution, it is required a zero boundary condition, by the first theorem proved. \end{remark}
\begin{proof} Consider \eqref{weakformaaproxeps96},
and choose now $\phi(x,t):=\varphi(x)\psi(t)$, with $\psi\in C_c^\infty(0,T)$ and $\varphi$ to be fixed. Then we have, using that $\rho_\varepsilon u\phi\equiv0$ on $\partial\Omega_\varepsilon$ and the divergence theorem,
$$-\int_0^T\bigg(\int_{\Omega_\varepsilon}\rho_\varepsilon(x) \psi'(t) \varphi(x) \ dx\bigg) \ dt=\int_0^T\psi(t)\bigg(\int_{\Omega_\varepsilon}(u\cdot \nabla \rho_\varepsilon+r_\varepsilon)(x) \ \varphi(x)\bigg) \ dt$$
If we choose $\varphi$ as the unitary mass sequence $\varphi_y^m(x):=\eta_{\frac1m}(y-x)$, concentrated in $y$, it follows
in the sense of weak derivatives that
\begin{equation}\label{formulazionedobole28}(\rho_\varepsilon)_t(y,t)=u(y,t)\cdot \nabla \rho_\varepsilon(y,t)+r_\varepsilon(y,t)\end{equation}
since $\displaystyle \sup_{(0,T)}\|\rho_\varepsilon\|_\infty\leq \left(\int_{\mathbb{R}^N}|\eta_\varepsilon|^q\right)^\frac1q\sup_{(0,T)}\|\rho\|_p$, and $\displaystyle \sup_{(0,T)}\|\nabla \rho_\varepsilon\|_\infty\leq \varepsilon^{-1}C$, for some constant $C>0$ and $\varepsilon$ is fixed. The same bound holds for $r_\varepsilon$, while $\|u\|_q$ is integrabile in $t$. So the Lebesgue convergence theorem implies \eqref{formulazionedobole28}.
\\
In particular, equation \eqref{formulazionedobole28} is true for every $y\in\Omega_\varepsilon$. Moreover, we have $\rho_\varepsilon(y,\cdot)\in W^{1,1}(0,T)$, using exactly the same bounds we have deduced in order to apply the Lebesgue dominate convergence (since in both cases we are estimating a time integral). On the other hand,
using the Lebesgue differentiation theorem, we have that for almost every $t_0\in(0,T)$, with $y\in \Omega_\varepsilon$ fixed,
\begin{equation}\label{abscont910a}\rho_\varepsilon(y,t_0)=\rho_\varepsilon^0(y)+\int_0^{t_0}\big(u\cdot \nabla \rho_\varepsilon+r_\varepsilon\big)(y,t) \ dt\end{equation}
In particular, the right-side is a continuous version of $\rho_\varepsilon(y,\cdot)$. This means that $\rho_\varepsilon(y,\cdot)$ is absolutely continuous. Consider now $\beta\in C^1(\mathbb{R})$ with $\beta'$ bounded. The weak chain rule says that
$$(\beta(\rho_\varepsilon))_t=\beta'(\rho_\varepsilon)(\partial \rho_{\varepsilon})_t=\beta'(\rho_\varepsilon)(u\cdot \nabla \rho_\varepsilon+r_\varepsilon)=u\cdot \nabla (\beta(\rho_\varepsilon))+\beta'(\rho_\varepsilon) r_\varepsilon$$
since $\rho_\varepsilon$ has classical regularity in space. So, in particular, being $\beta'$ bounded, $\beta(\rho_\varepsilon)\in W^{1,1}(0,T)$ and so, moreover,
\begin{equation}\beta(\rho_\varepsilon)(y,t)=\beta(\rho^0_\varepsilon)(y)+\int_0^t\big(u\cdot \nabla (\beta(\rho_\varepsilon))+\beta'(\rho_\varepsilon) r_\varepsilon\big)(y,\tau) \ d\tau\end{equation}
is its continuous version. Consider now $\phi\in C_c^\infty([0,T)\times\Omega)$, so that $\phi(T,x)=0$. We know that, by the product rule,
$\beta(\rho_\varepsilon)\phi\in W^{1,1}(0,T)$. Moreover
$$0=\beta(\rho_\varepsilon(T))\phi(T)=\beta(\rho^0_\varepsilon)\phi(0)+\int_0^T(\beta(\rho_\varepsilon))_t \phi \ dt+\int_0^T\beta(\rho_\varepsilon) \phi_t \ dt$$
Then we have
$$\int_0^T\bigg(\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon) \phi_t \ dx\bigg) \ dt=\int_{\Omega_\varepsilon}\bigg(\int_0^T \beta(\rho_\varepsilon) \phi_t \ dt\bigg) \ dx=$$
$$=-\int_{\Omega_\varepsilon}\beta(\rho^0_\varepsilon)\phi(0) \ dx-\int_{\Omega_\varepsilon}\bigg(\int_0^T(u\cdot \nabla (\beta(\rho_\varepsilon))+\beta'(\rho_\varepsilon) r_\varepsilon) \phi \ dt \bigg) \ dx=$$
$$=-\int_{\Omega_\varepsilon}\beta(\rho^0_\varepsilon)\phi(0) \ dx+\int_0^T\bigg(\int_{\Omega_\varepsilon}\beta(\rho_\varepsilon) u\cdot \nabla \phi \ dx\bigg) \ dt-\int_0^T\bigg(\int_{\Omega_\varepsilon}\beta'(r_\varepsilon)r_\varepsilon \phi \ dx\bigg) \ dt$$
that is the thesis, using that $\nabla\cdot u=0$ and $\phi=0$ on the boundary of $\Omega_\varepsilon$, thanks to the choice of $\varepsilon$.
\end{proof}
\subsection{Uniqueness}
We finally prove a uniqueness theorem.
\begin{theorem}[Uniqueness]\label{unicitalemmarho0} Let $\Omega$ be a bounded domain. Consider $p\in(1,\infty]$, and $\rho\in L^\infty(0,T;L^p(\Omega))$ a solution of \eqref{trasportodiqua} with initial condition $\rho^0\equiv0$, $u\in L^1(0,T;W_0^{1,q}(\Omega))\cap L^1(0,T;C(\overline\Omega))$ and $\nabla \cdot u=0$, where $q$ is the conjugate of $p$. Then, $\rho\equiv 0$.
\end{theorem}
\begin{proof} First of all suppose $p<\infty$. It is not restrictive, since then $\rho\in L^{\infty}(0,T;L^p(\Omega))$, and if $p'=\infty$ the conjugate is $q'=1$, and so $q>q'$, since $\frac1p+\frac1q=1$. So we can apply theorem \ref{lemmaapproxbeta}. Letting $\varepsilon\to0$ in the statement of theorem \ref{lemmaapproxbeta}, with $\beta \in C^1(\mathbb{R})$ bounded, and with $\beta'$ bounded, we have that
\begin{equation}\label{eqrifth95a}-\int_0^T\bigg(\int_{\Omega} \beta(\rho) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_\Omega \beta(\rho_0) \phi(x,0) \ dx +\int_0^T\bigg(\int_{\Omega} \beta(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt=0\end{equation}
where we used that $r_\varepsilon\to 0$ in $L^1(0,T;L^1_{loc}(\Omega))$. Let now $M\in(0,\infty)$. We would choose $\beta(t):=(|t|^p\wedge M)$, where $a\wedge b:=\min\{a,b\}$. The function is clearly bounded, but it is not in $C^1(\mathbb{R})$. However, it is possible to choose $\beta_k(t)$ a sequence such that $\beta_k\in C^1(\mathbb{R})$ for every $k$, $\beta_k(t)\leq \beta(t)$ for every $k\in\mathbb{N}$ and $t\in \mathbb{R}$ and finally, for every $t\in \mathbb{R}$, $\beta_k(t)\leq \beta_{k+1}(t)$, with $\beta_k(t)\to \beta(t)$ as $k\to\infty$, for almost every $t\in \mathbb{R}$. So \eqref{eqrifth95a} implies that
\begin{equation}\label{equationrefpaslim912a}-\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt -\int_\Omega \beta_k(\rho_0) \phi(x,0) \ dx +\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt=0\end{equation}
for every $k\in\mathbb{N}$. It is clear that $\beta_k(t)\leq \beta(t)\leq M$. We now focus the attention on the last term of \eqref{equationrefpaslim912a}. We now choose $\phi(x,t)=\psi(t)\varphi(x)$ in a precise way. In particular, we choose a sequence $\varphi=\varphi_h\in C_c^\infty(\Omega)$ such that $\varphi_h\equiv 1$ over $\Omega_{\frac1h}$, and $|\nabla\varphi_h|\leq 2h$. See \cite{gilbarg2015elliptic}. Then, fixed $\psi$, and defined $\phi_h:=\psi \varphi_h$,
\begin{equation}
\left|\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt\right|\leq M\left(\sup_{t\in [0,T]}|\psi(t)|\right)\int_0^T 2h\int_{\Omega\setminus \Omega_{\frac1h}} |u| \ dx \ dt
\end{equation}
We remark that $u\in L^1(0,T;C(\overline\Omega))$ and there exists a constant $C>0$ such that $\displaystyle 2h\int_{\Omega\setminus\Omega_{\frac1h}}|u| \ dx\leq C\sup_{\overline\Omega}|u|$, where $C$ is such that $2h|\Omega\setminus \Omega_\frac1h|\leq C$. See the note below.\footnote{In fact, if $f(\varepsilon):=|\tilde \Omega_\varepsilon|$, where here $|\cdot|$ is the measure of the set, and $\tilde \Omega_\varepsilon:=\Omega\setminus\Omega_\varepsilon$, so that $|\tilde \Omega_\varepsilon|=|\Omega|-|\Omega_\varepsilon|$, then by the coarea formula
\begin{equation}
-\frac{d}{d\varepsilon}|\Omega_\varepsilon|=\int_{\partial\Omega_\varepsilon}d\sigma \ \Longrightarrow \ \frac{d}{d\varepsilon}|\tilde \Omega_\varepsilon|=-\frac{d}{d\varepsilon}|\Omega_\varepsilon|=\int_{\partial\Omega_\varepsilon}d\sigma
\end{equation}
so that $\displaystyle |\tilde\Omega_{\overline\varepsilon}|=\int_0^{\overline\varepsilon}|\partial\Omega_\varepsilon|_\sigma \ d\varepsilon$, where here $|\cdot|_\sigma$ is the surface measure. Clearly, $\displaystyle \sup_{\varepsilon\in I}|\partial\Omega_\varepsilon|_\sigma<\infty$, where $I$ is a small neighborhood of the origin, since $f$ is $C^1$ near the origin, extending the function to the negative values approaching the domain from the exterior. So $\displaystyle|\tilde \Omega_\varepsilon|\leq \varepsilon\left(\sup_{\delta\in I(0)}|\partial\Omega_\delta|_\sigma\right)$, for $\varepsilon<<1$. So the claim follows choosing $\varepsilon=\varepsilon_h=\frac1h$.} Since $\|u\|_\infty\in L^1((0,T))$, and $|u|\in C(\overline\Omega)$ for almost every $t\in (0,T)$, then $\displaystyle \lim_{h\to\infty} 2h\int_{\Omega\setminus \Omega_\frac1h} |u| \ dx=0$ for almost every $t\in (0,T)$, using the coarea formula. Then, for every $k\in\mathbb{N}$, and $\psi$ smooth, choosing $\phi=\phi_h$ and sending $h\to\infty$ in \eqref{equationrefpaslim912a} we have
\begin{equation}
-\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) \psi'(t) \ dx\bigg) \ dt -\int_\Omega \beta_k(\rho_0) \psi(0) \ dx =0
\end{equation}
We suppose now $\psi(0)=1$. Using again the boundedness of $\psi'$ and the fact that $\beta_k$ has been taken increasing, letting $k\to\infty$ we have, choosing $M=n\in\mathbb{N}$ fixed
$$-\int_0^T\psi'(t)\bigg(\int_\Omega |\rho|^p\wedge n \ dx\bigg) \ dt-\int_\Omega |\rho_0|^p\wedge n \ dx=0$$
Choosing now $\psi$ as an approximation of a Dirac-delta with mass in $t=t_0$ and $\psi(0)=1$, we find that exists $E_n\subseteq (0,T)$, $|E_n|=0$, such that for every $t_0\in (0,T)\setminus E_n$
\begin{equation}\label{integrat0eqtot1a}\int_\Omega |\rho(t_0)|^p\wedge n \ dx\equiv\bigg(\int_\Omega |\rho|^p\wedge n \ dx\bigg)(t_0)=\int_\Omega |\rho_0|^p\wedge n \ dx\end{equation}
Since the sequence $|\rho|^p\wedge n$ is increasing in $n$, and $|\rho|^p\wedge n\to |\rho|^p$ when $n\to\infty$, and \eqref{integrat0eqtot1a} holds for every $n\in\mathbb{N}$ and $\displaystyle t_0\in (0,T)/\bigcup_n E_n$, we have that for almost every $t_0\in (0,T)$
\begin{equation}\label{finalineq919a}\|\rho(t_0)\|_p=\|\rho_0\|_p\end{equation}
Since, by the hypothesis $\rho_0\equiv0$, this means that for almost every $t_0\in (0,T)$, $\rho(t_0)=0$ almost every $x\in \Omega$. This means that $\rho$ is zero in $L^\infty(0,T;L^p(\Omega))$, that is the thesis.
\end{proof}
The next corollary follows from the proof of theorem \ref{unicitalemmarho0}.
\begin{theorem}\label{corollariodatoinizialeconservato1a} Let $\Omega$ be a bounded domain. Consider $p\in(1,\infty]$, and $\rho_0\in L^p(\Omega)$, $u\in L^1(0,T;C(\overline\Omega))$, such that $u\big|_{\partial\Omega}\equiv0$. Let $\rho$ a measurable function on $\Omega\times(0,T)$ such that, for every $\beta\in C^1(\mathbb{R})$, with $\beta,\beta'$ bounded,
\begin{equation}-\int_0^T\bigg(\int_{\Omega} \beta(\rho) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_\Omega \beta(\rho_0) \phi(x,0) \ dx +\int_0^T\bigg(\int_{\Omega} \beta(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt=0\end{equation}
for every $\phi \in C_c^\infty(\Omega\times[0,T))$. Then, for almost every $t_0\in (0,T)$ we have
\begin{equation}
\|\rho(t_0)\|_p=\|\rho_0\|_p
\end{equation}
\end{theorem}
\begin{remark} The assumption on $\rho$ are very "weak" (only measurability is required).
Observe that in the proof above it is not used that $q$ is the conjugate of $p$ (if not in proving that the approximate integral equation can be send to limit, but this step is skipped in the present statement). The minimality of these hypothesis will be useful in a moment. \end{remark}
\section{Renormalized solutions}
In the previous section we studied the properties of weak solutions to the transport equation. However, there is another way to interpret solutions (that is equivalent to the one already defined, as we will see in a moment).
\begin{definition}[Renormalized solutions] Let $\Omega$ be a bounded domain in $\mathbb{R}^N$, and $T>0$. Let $p\in (1,\infty]$, $q$ its conjugate and $\rho_0\in L^p(\Omega)$ an initial density. Let $u\in L^1(0,T;W_0^{1,q}(\Omega))$, $\nabla \cdot u=0$ a velocity field. We will say that $\rho\in L^\infty(0,T;L^p(\Omega))$ is a \textit{renormalized solution} of
\begin{equation}\begin{cases} \rho_t-u\cdot \nabla \rho=0 & \text{in $(0,T)\times \Omega$}\\
\rho(0)=\rho_0
\end{cases}\end{equation}
if, for every $\beta\in C^1(\mathbb{R};\mathbb{R})$, with $\beta$ and $\beta'$ bounded, it holds
\begin{equation}\label{renormalizedweek96}-\int_0^T \bigg(\int_\Omega \beta(\rho) \frac{\partial \phi}{\partial t}\ dx\bigg) \ dt-\int_\Omega \beta(\rho_0(x))\phi(x,0) \ dx +\int_0^T\bigg(\int_\Omega \beta(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt=0\end{equation}
for every $\phi\in C_c^\infty([0,T)\times\Omega)$. Such a function $\beta$ is said \textit{admissible function}, and we will write $\beta\in\mathcal{A}$, with $\mathcal{A}$ the \textit{set of admissible functions}. For every $\beta\in\mathcal{A}$ we define
\begin{equation}C_\beta:=\sup_\mathbb{R}|\beta|+\sup_\mathbb{R}|\beta'|<\infty\end{equation}
\end{definition}
\begin{theorem}\label{lemma82weakren} Let $\Omega$ be a bounded domain in $\mathbb{R}^N$ and $T>0$ a positive time. Let $p\in (1,\infty]$ and $\rho\in L^\infty(0,T;L^p(\Omega))$ solution of \eqref{trasportodiqua} with initial density $\rho_0\in L^p(\Omega)$ and assume that $u\in L^1(0,T;W^{1,q}(\Omega))$, $\nabla \cdot u=0$. Then $\rho \in L^\infty(0,T;L^p(\Omega))$ is a renormalized solution to the problem for every admissible function $\beta$.
\end{theorem}
\begin{proof} By theorem \ref{lemmaapproxbeta} we know that
\begin{equation}-\int_0^T\bigg(\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon^0) \ \phi(0,x) \ dx +\int_0^T\bigg(\int_{\Omega_\varepsilon} \beta(\rho_\varepsilon) u\cdot \nabla \phi \ dx\bigg) \ dt=\int_0^T\bigg(\int_{\Omega_\varepsilon} r_\varepsilon\beta'(\rho_\varepsilon)\phi \ dx\bigg)\ dt\end{equation}
with $r_\varepsilon\to 0$ in $L^1(0,T;L^\gamma_{loc}(\Omega))$, with $\displaystyle \frac1\gamma=\frac1q+\frac1p=1 \Longrightarrow \gamma=1$. So, letting $\varepsilon\to0$, being $\beta$ bounded and $|\beta'(\rho_\varepsilon)|\leq C_\beta$, we have that the thesis follows.
\end{proof}
\subsection{Classical regularity}
Before introducing the \textit{stability problem}, we focus our attention to the regularity of the weak solution to the transport equation.
\begin{theorem}[Continuity (in time) of the solution]\label{lemmacorollario} Let $p\in(1,\infty)$ and $\rho_0\in L^p(\Omega)$. Assume that $u\in L^1(0,T;W^{1,q}(\Omega))$ with $\nabla \cdot u=0$. Then $\rho\in C([0,T];L^p(\Omega))$.
\end{theorem}
\begin{proof} By equation \eqref{finalineq919a} we have that $\|\rho(t)\|_p$ has a continuous version $\|\rho(t)\|_p=\|\rho_0\|_p\in C([0,T];\mathbb{R})$. If we show that, moreover, for every $[0,T]\ni t_n\to t_0\in [0,T]$, it holds
\begin{equation}\label{weakconvergenceLpLqtimetn1}\lim_{n\to\infty}\int_\Omega \big(\rho(x,t_n)-\rho(x,t_0)\big)\cdot \varphi(x)\ dx=0 \qquad \forall \ \varphi\in L^q(\Omega)\end{equation}
that is $\rho(t_n)\rightharpoonup \rho(t_0)$ in $L^p(\Omega)$, or in other words $\rho(t_n)$ converges weakly to $\rho(t_0)$ in $L^p(\Omega)$. Since moreover $\|\rho(t_n)\|_p\equiv \|\rho(t_0)\|_p$, we have that
\begin{equation}\lim_{n\to\infty}\|\rho(t_n)-\rho(t_0)\|_p=0\end{equation}
that is the continuity in $C([0,T];L^p(\Omega))$. So, we only have to prove \eqref{weakconvergenceLpLqtimetn1}. It proceeds as it follows. If in equation \eqref{trasportodistirbuzionale} we choose $\phi(x,t)=\psi(t)\varphi(x)$, we have
\begin{equation}-\int_0^T\psi(t)\bigg(\int_\Omega \rho(x,t)\varphi(x) \ dx\bigg) \ dt -\int_\Omega \rho_0(x)\psi(0)\varphi(x)\ dx +\int_0^T\psi(t)\bigg(\int_\Omega \rho(x,t)\ \big(u(x,t)\cdot \nabla\varphi(x)\big) \ dx\bigg) \ dt=0\end{equation}
Choosing $\psi(t)$ as a Dirac-delta as before, we have, for almost every $t_0\in [0,T]$,
\begin{equation}\label{reformofeq812813}\int_\Omega \rho(x,t_0)\varphi(x) \ dx=\int_\Omega \rho_0(x) \varphi(x) \ dx-\int_0^{t_0}\bigg(\int_\Omega \rho(x,t)\big(u(x,t)\cdot \nabla\varphi(x)\big) \ dx\bigg) \ dt\end{equation}
The continuity of the right side implies that $\displaystyle \int_\Omega \rho(x,t_0)\varphi(x) \ dx$ can be defined in the whole $[0,T]$. Consider now $h>0$. Then, for every $\varphi\in C_c^\infty(\Omega)$ we have
\begin{small}
$$\bigg|\int_\Omega \rho(x,t_0+h)\varphi(x) \ dx-\int_\Omega \rho(x,t_0)\varphi(x) \ dx\bigg|=\bigg|\int_{t_0}^{t_0+h}\bigg(\int_\Omega \rho(x,t)\big(u(x,t)\cdot \nabla \varphi(x)\big) \ dx\bigg) \ dt\bigg|\leq M_\varphi\int_{t_0}^{t_0+h}\|\rho(t)\|_p\|u(t)\|_q \ dt$$
\end{small}
where $\displaystyle M_\varphi:=\max_{\Omega}|\nabla\varphi|$. Since $\|\rho(t)\|_p\in L^\infty((0,T))$ and $\|u(t)\|_q\in L^1((0,T))$, by the Lebesgue dominated convergence it follows that, for every $\varphi\in C_c^\infty(\Omega)$, $\displaystyle \lim_{h\to0}\int_\Omega \rho(x,t_0+h)\varphi(x) \ dx=\int_\Omega \rho(x,t_0)\varphi(x) \ dx$. But moreover $\displaystyle \|\rho(t_0+h)\|_p\leq \max_{t\in[0,T]}\|\rho(t)\|_p$. So, by a classical argument in measure theory, we have that
\begin{equation}\lim_{h\to0}\int_\Omega \rho(x,t_0+h)g(x) \ dx=\int_\Omega \rho(x,t_0)g(x) \ dx\end{equation}
for every $g\in L^q(\Omega)$. This implies \eqref{weakconvergenceLpLqtimetn1} and thus the thesis.
\end{proof}
\section{Stability}
A fundamental question about transport equation is if the convergence to a certain limit of velocity fields and initial density implies the convergence (in a certain strong sense) of weak solutions. This fact holds, and it is known as \textit{stability theorem}. Before the statement of this theorem, we prove a result of consistence of the two notions of solution.
\begin{theorem}\label{lemmaconsistency} Let $\rho\in L^\infty(0,T;L^p(\Omega))$ and $u\in L^1(0,T;L^q(\Omega))$ with $p\in (1,\infty]$. If $\rho$ is a renormalized solution, then $\rho$ is a weak solution. Moreover, if $\rho$ is a solution and $u\in L^1(0,T;W^{1,q}(\Omega))$, with $\nabla\cdot u=0$, then $\rho$ is a renormalized solution.
\end{theorem}
\begin{proof} We already know that if $u\in L^1(0,T;W^{1,q}(\Omega))$ and $\nabla\cdot u=0$, then $\rho\in L^\infty(0,T;L^p(\Omega))$ is a renormalized solution, thanks to theorem \ref{lemma82weakren}. We have to prove the other implication. Suppose that $\rho\in L^\infty(0,T;L^p(\Omega))$ is a renormalized solution to the problem. We want to prove that it is a weak solution. We can consider a sequence $\beta_k$ of admissible solution such that
\begin{equation}|\beta_k(t)|\leq |t|, \qquad \beta_k(t)\to t\end{equation}
a $C^1$ approximation from below, bounded and with bounded derivatives. So we have
\begin{equation}\label{weakrenformapprox48}-\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) \frac{\partial \phi}{\partial t} \ dx\bigg) \ dt-\int_\Omega \beta_k(\rho_0) \phi(x,0) \ dx +\int_0^T\bigg(\int_{\Omega} \beta_k(\rho) u\cdot \nabla \phi \ dx\bigg) \ dt=0\end{equation}
We have now the bounds $|\beta_k(\rho)|\leq |\rho|$, and
\begin{equation}\int_0^T\bigg(\int_\Omega |\beta_k(\rho)|\left|\frac{\partial\phi}{\partial t}\right| \ dx\bigg) \ dt\leq \int_0^T\bigg(\int_\Omega |\rho|\left|\frac{\partial\phi}{\partial t}\right| \ dx\bigg) \ dt<\infty\end{equation}
since $\rho\in L^\infty(0,T;L^p(\Omega))$. Similarly, we have
\begin{equation}\int_\Omega |\beta_k(\rho_0)||\phi(x,0)| \ dx\leq \int_\Omega |\rho_0||\phi(x,0)| \ dx<\infty\end{equation}
\begin{equation}\int_0^T\bigg(\int_\Omega |\beta_k(\rho)||u||\nabla \phi|\ dx \bigg) \ dt\leq \int_0^T\bigg(\int_\Omega |\rho||u||\nabla \phi|\ dx \bigg) \ dt<\infty\end{equation}
Since $\beta_k(t)\to t$ as $k\to\infty$ for every $t\in\mathbb{R}$, letting $k\to\infty$ in \eqref{weakrenformapprox48}, we have equation \ref{trasportodistirbuzionale} that is the weak formulation.
\end{proof}
The following is the main theorem of the section. As typical, given a uniqueness result as the one in theorem \ref{unicitalemmarho0}, we expect a stability result
\begin{theorem}[Stability theorem] \label{teoremaglobalstability}
Let $\Omega$ be a bounded domain, let $T>0$ and $p\in(1,\infty)$. Let $u^n\in L^1(0,T;C(\overline\Omega))$ be a sequence of velocity fields such that $u^n\big|_{\partial\Omega}\equiv0$. Suppose that exists
\begin{equation}u\in L^1(0,T;W_0^{1,1}(\Omega))\cap L^1(0,T;C(\overline\Omega)), \quad \nabla\cdot u=0 \end{equation}
such that $u^n\to u$ in $L^1(0,T;L^1(\Omega))$. Let $\rho^n$ be a bounded sequence of measurable functions in $L^\infty(0,T;L^p(\Omega))$, that is $\displaystyle \sup_{n\in\mathbb{N}}\|\rho_n\|_{L^\infty(0,T;L^p(\Omega))}<\infty$, such that
\begin{equation}
-\int_0^T \bigg(\int_\Omega \beta(\rho^n) \frac{\partial \phi}{\partial t}\ dx\bigg) \ dt-\int_\Omega \beta(\rho_n^0)\phi(x,0) \ dx +\int_0^T\bigg(\int_\Omega \beta(\rho^n) u^n\cdot \nabla \phi \ dx\bigg) \ dt=0
\end{equation}
for every $\beta\in \mathcal{A}$ and $\phi\in C_c^\infty(\Omega\times [0,T))$, and for some initial condition $\rho_n^0\in L^p(\Omega)$. Assume that
\begin{equation}
\begin{cases}
\rho_n^0\to \rho^0 & \text{in $L^p(\Omega)$}\\
\beta(\rho_n^0)\to \beta(\rho^0) & \text{in $L^1(\Omega)$, $\forall \beta\in\mathcal{A}$}
\end{cases} \qquad n\to\infty
\end{equation}
Then $\rho^n$ converges, with respect to the norm of $L^\infty(0,T;L^p(\Omega))$, to some function $\rho\in L^\infty(0,T;L^p(\Omega))$ that is a renormalized solution of the transport equation with velocity field $u$ and initial density $\rho^0$, in $L^\infty(0,T;L^p(\Omega))$.
\end{theorem}
\begin{remark} We are supposing in this theorem the existence of a velocity field $u\in L^1(0,T;W_0^{1,1}(\Omega))$, with $\nabla \cdot u=0$, but asking merely the convergence $u^n\to u$ in $L^1(0,T;L^1(\Omega))$ and not in a more regular space. This is the crucial point of this approach.
\end{remark}
\begin{remark} The aim of the theorem is to prove that $\rho_n\to \rho$ in $C([0,T];L^p(\Omega))$, where $\rho$ is a renormalized solution of the weak transport equation with velocity field $u$ and initial density $\rho^0$. If we know \textit{a priori} that $\rho_n\stackrel{*}{\rightharpoonup} \overline \rho$ in $L^\infty(0,T;L^\infty(\Omega))$ to some $\overline \rho\in L^\infty(0,T;L^p(\Omega))$, with $\overline \rho$ weak solution to the transport equation with field $u$ and initial density $\rho^0$, then by uniqueness theorem $\rho\equiv \overline \rho$, and so $\rho_n\to \overline \rho$ in $C([0,T];L^p(\Omega))$. This is the main application of this stability theorem (and the reason that lead to this statement). For example, it is useful to prove a stronger convergence in the article \cite{kimchoe1}.
\end{remark}
\begin{proof} We start with pointwise stability. Let $\beta$ an admissible function, and define $v_n:=\beta(\rho_n)$, where $\rho^n$ is renormalized solution to the transport equation with velocity filed $u^n$ and initial density $\rho_0^n$. Then, since $\beta$ is bounded, we have that $v_n\in L^\infty(0,T;L^\infty(\Omega))$. Moreover, observe that, by the hypothesis,
$$-\int_0^T \bigg(\int_\Omega \beta(\rho^n) \frac{\partial \phi}{\partial t}\ dx\bigg) \ dt-\int_\Omega \beta(\rho_n^0)\phi(x,0) \ dx +\int_0^T\bigg(\int_\Omega \beta(\rho^n) u^n\cdot \nabla \phi \ dx\bigg) \ dt=0$$
and this can be rewritten as
\begin{equation}-\int_0^T \bigg(\int_\Omega v_n \frac{\partial \phi}{\partial t}\ dx\bigg) \ dt-\int_\Omega v_n^0\phi(x,0) \ dx +\int_0^T\bigg(\int_\Omega v_n \big(u^n\cdot \nabla \phi\big)\ dx\bigg) \ dt=0\end{equation}
where $\beta(\rho_n^0)=:v_n^0$. On the other hand, the function $\beta^2$ is admissible yet, and, as above, $w_n:=v_n^2\in L^\infty(0,T;L^\infty(\Omega))$. Moreover, as above,
\begin{equation}-\int_0^T \bigg(\int_\Omega w_n \frac{\partial \phi}{\partial t}\ dx\bigg) \ dt-\int_\Omega w_n^0\phi(x,0) \ dx +\int_0^T\bigg(\int_\Omega w_n \big(u^n\cdot \nabla \phi\big)\ dx\bigg) \ dt=0\end{equation}
and $w_n^0:=(v_n^0)^2$. Since the sequences are bounded in $L^\infty(0,T;L^\infty(\Omega))$, we have that exist $v,w\in L^\infty(0,T;L^\infty(\Omega))$ such that, up to extract a subsequence,
$$v_n\stackrel{*}{\rightharpoonup} v, \quad w_n\stackrel{*}{\rightharpoonup} w\quad \text{in $L^\infty(0,T;L^\infty(\Omega))$}$$
In particular
\begin{equation}\|v\|_{L^\infty(0,T;L^\infty(\Omega))}\leq \liminf_{n\to\infty}\|v_n\|_{L^\infty(0,T;L^\infty(\Omega))}\leq C_\beta\end{equation}
where $\beta(s)\leq C_\beta$ for every $s\in \mathbb{R}$.
Since $u^n\to u$ in $L^1(0,T;L^1(\Omega))$, we have that, considering for example the case of $v_n$ (that of $w_n$ is analogous),
\begin{equation}\int_0^T\bigg(\int_\Omega v_n \frac{\partial \phi}{\partial t} \ dx \bigg) \ dt\to \int_0^T\bigg(\int_\Omega v \frac{\partial \phi}{\partial t} \ dx \bigg) \ dt, \qquad \int_\Omega v_n^0 \phi(0,x) \ dx \to \int_\Omega v^0 \phi(0,x) \ dx\end{equation}
since $\partial_t \phi\in L^1(0,T;L^1(\Omega))$ and $\phi(0,x)\in L^1(\Omega)$, and using the convergence of the densities in the hypothesis. Moreover
$$\bigg|\int_0^T\bigg(\int_\Omega v_n \big(u^n\cdot \nabla \phi\big)\ dx\bigg) \ dt-\int_0^T\bigg(\int_\Omega v \big(u\cdot \nabla \phi\big)\ dx\bigg) \ dt\bigg|\leq$$
$$\leq \bigg|\int_0^T\bigg(\int_\Omega v_n \big((u^n-u)\cdot \nabla \phi\big)\ dx\bigg) \ dt-\int_0^T\bigg(\int_\Omega (v-v_n) \big(u\cdot \nabla \phi\big)\ dx\bigg) \ dt\bigg|\leq$$
$$\leq \int_0^T\int_\Omega |v_n||u^n-u||\nabla \phi| \ dx \ dt+\bigg|\int_0^T\bigg(\int_\Omega (v-v_n) \big(u\cdot \nabla \phi\big)\ dx\bigg) \ dt\bigg|\leq$$
\begin{equation}\leq M\|v_n\|_{L^\infty(0,T;L^\infty(\Omega))}\|u^n-u\|_{L^1(0,T;L^1(\Omega))}+\bigg|\int_0^T\bigg(\int_\Omega (v-v_n) \big(u\cdot \nabla \phi\big)\ dx\bigg) \ dt\bigg|\end{equation}
where $M$ is such that $|\nabla\phi|\leq M$. Since $\|v_n\|_{L^\infty(0,T;L^\infty(\Omega))}$ is bounded and $u^n\to u$ in $L^1(0,T;L^1(\Omega))$, we only have to prove that also the other term vanishes. But
\begin{equation}\int_0^T\int_\Omega |u||\nabla\phi|\ dx \ dt\leq M\|u\|_{L^1(0,T;L^1(\Omega))}<\infty\end{equation}
that is $u\cdot \nabla \phi\in L^1(0,T;L^1(\Omega))$, and since $v_n\stackrel{*}{\rightharpoonup} v$ in $L^\infty(0,T;L^\infty(\Omega))$, we have that also this term vanishes. So finally
\begin{equation}\label{traspeqforvren1}-\int_0^T\bigg(\int_\Omega v\frac{\partial \phi}{\partial t} \ dx\bigg)\ dt-\int_\Omega v^0(x) \ \phi(x,0) \ dx+\int_0^T\bigg(\int_\Omega v \ \big(u\cdot \nabla \phi\big) \ dx\bigg) \ dt=0\end{equation}
and, in the same way,
\begin{equation}-\int_0^T\bigg(\int_\Omega w\frac{\partial \phi}{\partial t} \ dx\bigg)\ dt-\int_\Omega w^0(x) \ \phi(x,0) \ dx+\int_0^T\bigg(\int_\Omega w \ \big(u\cdot \nabla \phi\big) \ dx\bigg) \ dt=0\end{equation}
Equation \eqref{traspeqforvren1} says that $v$ is a weak solution, with initial condition $v^0$; by the previous theorem it is a renormalized solution, since $u\in L^1(0,T;W^{1,q}(\Omega))$ and $\nabla\cdot u=0$.\\
\noindent Choosing $\alpha(t)=t^2$, approaching this function with admissible $\alpha_k(t)$ such that $\alpha_k(t)\leq t^2$ and $\alpha_k(t)\to t^2$ as $k\to\infty$, for every $t\in \mathbb{R}$. So we have that
\begin{equation}-\int_0^T\bigg(\int_\Omega \alpha_k(v)\frac{\partial \phi}{\partial t} \ dx\bigg)\ dt-\int_\Omega \alpha_k(v^0(x)) \ \phi(x,0) \ dx+\int_0^T\bigg(\int_\Omega \alpha_k(v) \ \big(u\cdot \nabla \phi\big) \ dx\bigg) \ dt=0\end{equation}
implies, letting $k\to\infty$,
\begin{equation}-\int_0^T\bigg(\int_\Omega v^2\frac{\partial \phi}{\partial t} \ dx\bigg)\ dt-\int_\Omega (v^0)^2(x) \ \phi(x,0) \ dx+\int_0^T\bigg(\int_\Omega v^2 \ \big(u\cdot \nabla \phi\big) \ dx\bigg) \ dt=0\end{equation}
since $|v|^2\leq \|v\|_{L^\infty(0,T;L^\infty(\Omega))}^2\leq C_\beta^2$ and $v^0=\beta(\rho^0)\leq C_\beta$, so that the integrals are well-posed.\\
\noindent So, $v^2$ is a weak solution to the transport equation with initial condition $(v^0)^2$. But also $w$ is a weak solution to the same transport equation with initial condition $(v^0)^2$. By uniqueness theorem \ref{unicitalemmarho0}, since $v,w\in L^\infty(0,T;L^\infty(\Omega))$ and $u\in L^1(0,T;W_0^{1,1}(\Omega))\cap L^1(0,T;C(\overline\Omega))$, with $\nabla\cdot u=0$, we have $v^2\equiv w$.\\
\noindent This conclusion leads to the fact that $v_n^2\stackrel{*}{\rightharpoonup} v^2$ in $L^\infty(0,T;L^\infty(\Omega))$. Moreover, notice that
\begin{equation}\|v_n-v\|_{L^2(0,T;L^2(\Omega))}^2=\langle v_n,v_n\rangle_{L^2(0,T;L^2(\Omega))}-2\langle v_n,v\rangle_{L^2(0,T;L^2(\Omega))}+\langle v,v\rangle_{L^2(0,T;L^2(\Omega))}\end{equation}
Observe that $\langle v_n,v\rangle_{L^2(0,T;L^2(\Omega))}\to \langle v,v\rangle_{L^2(0,T;L^2(\Omega))}$, since $v\in L^\infty(0,T;L^\infty(\Omega))\subset L^1(0,T;L^1(\Omega))$ and $v_n\stackrel{*}{\rightharpoonup} v$. Moreover, if we choose the function $\phi\equiv 1$ on $(0,T)\times \Omega$, that is in $L^1(0,T;L^1(\Omega))$, we have
\begin{equation}\label{scelgophipernorm1a}\|v_n\|_{L^2(0,T;L^2(\Omega))}^2=\int_0^T\bigg(\int_\Omega |v_n|^2 \ dx\bigg)\ dt\equiv \int_0^T\bigg(\int_\Omega v_n^2\ \phi \ dx\bigg)\ dt\to\int_0^T\bigg(\int_\Omega v^2 \ \phi \ dx\bigg)\ dt=\int_0^T\bigg(\int_\Omega v^2 \ dx\bigg)\ dt\end{equation}
as $n\to\infty$, since $\phi\in L^1(0,T;L^1(\Omega))$ and $v_n^2\stackrel{*}{\rightharpoonup} v^2$ in $L^\infty(0,T;L^\infty(\Omega))$. This means that $v_n\to v$ in $L^2(0,T;L^2(\Omega))$.
\begin{remark} We can choose $\alpha(t)=|t|^p$, with $p\in (1,\infty)$, and obtain the same result in $L^p(0,T;L^p(\Omega))$. In fact, this choice implies that $|v_n|^p\stackrel{*}{\rightharpoonup} |v|^p$ in $L^\infty(0,T;L^\infty(\Omega))$. Moreover, $L^p(0,T;L^p(\Omega))$ is the dual of $L^q(0,T;L^q(\Omega))$, with $q$ and $q$ conjugate exponents. So, for every $\nu\in L^q(0,T;L^q(\Omega))$, we have $\langle v_n,\nu\rangle_{p,q} \to \langle v,\nu \rangle_{p,q}$, as $n\to\infty$, where $\langle \cdot,\cdot \rangle_{p,q}\equiv\langle \cdot ,\cdot \rangle_{L^p(0,T;L^p(\Omega)),L^q(0,T;L^q(\Omega))}$ is the dual pairing between $L^p(0,T;L^p(\Omega))$ and $L^q(0,T;L^q(\Omega))$. In fact
$$\langle v_n,\nu\rangle_{p,q}=\int_0^T\bigg(\int_\Omega v_n\cdot \nu \ dx \bigg) \ dt\to \int_0^T\bigg(\int_\Omega v\cdot \nu \ dx \bigg) \ dt=\langle v,\nu \rangle_{p,q}$$
as $n\to\infty$, since $v_n\stackrel{*}{\rightharpoonup} v$ in $L^\infty(0,T;L^\infty(\Omega))$ and $\nu\in L^q(0,T;L^q(\Omega))\subseteq L^1(0,T;L^1(\Omega))$, being $q\geq1$. This means that $v_n\stackrel{*}{\rightharpoonup} v$ in $L^p(0,T;L^p(\Omega))$. Since, choosing $\phi\equiv 1$ as in \eqref{scelgophipernorm1a}, $|v_n|^p\stackrel{*}{\rightharpoonup} |v|^p$ in $L^\infty(0,T;L^\infty(\Omega))$ implies $\|v_n\|_{L^p(0,T;L^p(\Omega))}\to \|v\|_{L^p(0,T;L^p(\Omega))}$ as $n\to\infty$, it follows that $v_n\to v$ in $L^p(0,T;L^p(\Omega))$ in the strong sense.
\end{remark}
\noindent We now want to show that $v=\beta(\rho)$, for some $\rho\in L^\infty(0,T;L^p(\Omega))$, so that we have the convergence (in $L^p(0,T;L^p(\Omega))$) of $\beta(\rho_n)$ to $v$; this implies (since $v$ satisfies the weak transport equation) that $\rho$ is a renormalized solution (and so, if we assume also that $u\in L^1(0,T;L^q(\Omega))$, by theorem \ref{lemmaconsistency} a (unique) solution).\\
\noindent We know that $v_n=\beta(\rho_n)$ converges to $v\in L^2(0,T;L^2(\Omega))$ in $L^2(0,T;L^2(\Omega))\simeq L^2((0,T)\times \Omega)$. This implies that $v_n$ converges to $v$ in measure, that is $\beta(\rho_n)$ converges in measure to $v$. Since $|\Omega\times (0,T)|<\infty$ and, by the hypothesis,
\begin{equation}\|\rho_n\|_{L^p(0,T;L^p(\Omega))}\leq C\|\rho_n\|_{L^\infty(0,T;L^p(\Omega))}\leq C\left(\sup_{n\in\mathbb{N}}\|\rho_n\|_{L^\infty(0,T;L^p(\Omega))}\right)<\infty\end{equation}
using propistion \ref{propositionconvmeas31}, we have that exists $\rho$, measurable function on $\Omega\times(0,T)$, such that $\rho_n\to \rho$ in measure. But, if $\beta\in C^1(\mathbb{R})$ is an admissible function, we have, by theorem \ref{propositionconvmeas31}, that $v_n\equiv\beta(\rho_n)\to \beta(\rho)$ in measure. It follows that $v=\beta(\rho)$. In fact, we have
\begin{equation}\|\beta(\rho)-v\|_{L^2(0,T;L^2(\Omega))}\leq \|\beta(\rho)-\beta(\rho_n)\|_{L^2(0,T;L^2(\Omega))}+\|\beta(\rho_n)-v\|_{L^2(0,T;L^2(\Omega))}\end{equation}
We know from above that $\|\beta(\rho_n)-v\|_{L^2(0,T;L^2(\Omega))}\to0$ as $n\to\infty$. On the other hand, $\beta(\rho_n)$ converges to $\beta(\rho)$ in measure and $|\beta(\rho_n)|\leq C_\beta$ implies that $\beta(\rho_n)$ has an integrable bound (uniform in $n$) in $L^2(0,T;L^2(\Omega))$. So, again by theorem \ref{propositionconvmeas31}, $\|\beta(\rho_n)-\beta(\rho)\|_{L^2(0,T;L^2(\Omega))}\to 0$ as $n\to\infty$. So, $\beta(\rho)=v\in L^2(0,T;L^2(\Omega))$.
\begin{remark} The same argument holds if $L^2(0,T;L^2(\Omega))$ is replaced by $L^p(0,T;L^p(\Omega))$.
\end{remark}
\noindent So, the measurable function $\rho$ is a renormalized solution of the weak transport equation, since $v=\beta(\rho)$ is a solution. Now, using theorem \ref{corollariodatoinizialeconservato1a}, where only the measurability of $\rho$ is required, together with the fact that $u\in L^1(0,T;C(\overline\Omega))$, $u\big|_{\partial\Omega}\equiv0$, we deduce that $\|\rho(t_0)\|_p=\|\rho_0\|_p$ for almost every $t_0\in (0,T)$. So $\rho\in L^\infty(0,T;L^p(\Omega))$, and this implies that $\rho$ is a renormalized solution to the weak transport equation with initial density $\rho_0$, in the class $L^\infty(0,T;L^p(\Omega))$. That is, if $\beta$ is an admissible function, with $M>0$ such that $|\beta(s)|\leq M$ for every $s\in\mathbb{R}$, we have
\begin{equation}-\int_0^T\bigg(\int_\Omega \beta(\rho) \ \partial_t \phi \ dx\bigg) \ dt -\int_\Omega \beta(\rho^0(x)) \phi(0,x)\ dx+\int_0^T\bigg(\int_\Omega \beta(\rho) \ (u\cdot \nabla\phi) \ dx\bigg) \ dt=0\end{equation}
Choosing $\phi\in C_c^\infty([0,T)\times\Omega)$ as in \eqref{reformofeq812813}, we have, for every $t_0\in[0,T]$ (eventually redefining the function out of a zero measure set)
\begin{equation}\int_\Omega \beta(\rho(t_0,x))\varphi(x) \ dx=\int_\Omega \beta(\rho^0(x)) \varphi(x)-\int_0^{t_0}\bigg(\int_\Omega \beta(\rho(x,t)) u(x,t)\cdot \nabla \varphi(x) \ dx\bigg) \ dt\end{equation}
Moreover, by the hypothesis, $\rho_n$ is renormalized solution to the transport equation with velocity field $u^n$ and initial density $\rho_n^0$. It follows that, if $t_0\in[0,T]$, after rearranging over a zero measure set, we have
\begin{equation}\int_\Omega \beta(\rho_n(t_0,x))\varphi(x) \ dx=\int_\Omega \beta(\rho_n^0(x)) \varphi(x)-\int_0^{t_0}\bigg(\int_\Omega \beta(\rho_n(x,t)) u_n(x,t)\cdot \nabla \varphi(x) \ dx\bigg) \ dt\end{equation}
Let now $\{t_n\}_{n\in\mathbb{N}}\subseteq[0,T]$ be a sequence such that $t_n\to t_0\in [0,T]$, and consider that
$$\int_\Omega \beta(\rho_n(t_n,x))\varphi(x) \ dx=\int_\Omega \beta(\rho_n^0(x)) \varphi(x)-\int_0^{t_n}\bigg(\int_\Omega \beta(\rho_n(x,t)) u_n(x,t)\cdot \nabla \varphi(x) \ dx\bigg) \ dt$$
We want to show that
\begin{equation}\label{convergencebetaadmboundM1a}\lim_{n\to\infty}\int_\Omega \beta(\rho_n(t_n,x))\varphi(x) \ dx=\int_\Omega \beta(\rho(t_0,x))\varphi(x) \ dx\end{equation}
for every $\varphi\in C_c^\infty(\Omega)$.
\begin{remark} [Proof of \eqref{convergencebetaadmboundM1a}] It is a calculation. In fact
$$\int_\Omega \big(\beta(\rho_n(t_n,x))-\beta(\rho(t_0,x))\big) \varphi(x) \ dx=\int_\Omega \big(\beta(\rho_n^0(x))-\beta(\rho^0(x))\big) \varphi(x) \ dx-$$
$$-\bigg\{\int_0^{t_n}\bigg(\int_\Omega \beta(\rho_n(x,t)) u_n(x,t)\cdot \nabla \varphi(x) \ dx\bigg) \ dt-\int_0^{t_0}\bigg(\int_\Omega \beta(\rho(x,t)) u(x,t)\cdot \nabla \varphi(x) \ dx\bigg) \ dt\bigg\}=$$
$$=\int_\Omega \big(\beta(\rho_n^0(x))-\beta(\rho^0(x))\big) \varphi(x) \ dx-\int_{0}^{t_0}\bigg(\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx -\int_\Omega \beta(\rho) u\cdot \nabla \varphi \ dx\bigg) \ dt \ +$$
\begin{equation}-\int_{t_0}^{t_n}\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx \ dt\end{equation}
Observe, first of all, that
\begin{equation}\bigg|\int_\Omega \big(\beta(\rho_n^0(x))-\beta(\rho^0(x))\big) \varphi(x) \ dx\bigg|\leq \|\varphi\|_\infty \|\beta(\rho_n^0)-\beta(\rho^0)\|_1\to 0\end{equation}
as $n\to\infty$. Furthermore
$$\bigg|\int_{0}^{t_0}\bigg(\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx -\int_\Omega \beta(\rho) u\cdot \nabla \varphi \ dx\bigg) \ dt\bigg|=\bigg|\int_0^{t_0}\bigg(\int_\Omega \big(\beta(\rho_n)u_n-\beta(\rho) u\big) \cdot \nabla \varphi \ dx\bigg) \ dt\bigg|=$$
$$=\bigg|\int_0^{t_0}\bigg(\int_\Omega \beta(\rho_n)\big(u_n- u\big) \cdot \nabla \varphi \ dx\bigg) \ dt+\int_0^{t_0}\bigg(\int_\Omega \big(\beta(\rho_n)-\beta(\rho)\big) u \cdot \nabla \varphi \ dx\bigg) \ dt\bigg|\leq$$
\begin{equation}\leq M\|\nabla\varphi\|_\infty\int_0^T\int_\Omega |u_n-u| \ dx \ dt+\bigg|\int_0^{t_0}\bigg(\int_\Omega \big(\beta(\rho_n)-\beta(\rho)\big) u \cdot \nabla \varphi \ dx\bigg) \ dt\bigg|\to 0\end{equation}
as $n\to\infty$, since $u^n\to u$ in $L^1(0,T;L^1(\Omega))$ and $\beta(\rho_n)\stackrel{*}{\rightharpoonup}v=\beta(\rho)$ in $L^\infty(0,T;L^\infty(\Omega))$ and $\chi_{(0,t_0)}u\cdot \nabla \varphi\in L^1(0,T;L^1(\Omega))$. Moreover, we have
$$\bigg|\int_{t_0}^{t_n}\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx \ dt\bigg|\leq\bigg|\int_{t_0}^{t_n}\bigg(\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx -\int_\Omega \beta(\rho) u \cdot \nabla \varphi \ dx\bigg) \ dt\bigg|+$$
$$+\bigg|\int_{t_0}^{t_n}\bigg(\int_\Omega \beta(\rho) u\cdot \nabla \varphi\bigg) \ dt\bigg|\leq \bigg|\int_0^T\chi_{(t_0,t_n)}(t)\bigg(\int_\Omega \beta(\rho_n) u_n\cdot \nabla \varphi \ dx -\int_\Omega \beta(\rho) u \cdot \nabla \varphi \ dx\bigg) \ dt\bigg|+$$
$$+M\|\nabla\varphi\|_\infty\int_{t_0}^{t_n}\|u\|_1 \ dt\leq \bigg|\int_0^T\chi_{(t_0,t_n)}(t)\bigg(\int_\Omega \beta(\rho_n)(u_n-u)\cdot \nabla \varphi \ dx +\int_\Omega (\beta(\rho_n)-\beta(\rho))u\cdot \nabla \varphi \ dx\bigg) \ dt\bigg|+$$
\begin{equation}+M\|\nabla\varphi\|_\infty\int_{t_0}^{t_n}\|u\|_1 \ dt\leq M\|\nabla\varphi\|_\infty\|u_n-u\|_{L^1(0,T;L^1(\Omega))}+3M\|\nabla\varphi\|_\infty\int_{t_0}^{t_n}\|u\|_1 \ dt\to0\end{equation}
as $n\to\infty$, since $t_n\to t_0$, $u^n\to u$ in $L^1(0,T;L^1(\Omega)$ as $n\to\infty$. So we have proved \eqref{convergencebetaadmboundM1a}.
\end{remark}
\noindent Starting from \eqref{convergencebetaadmboundM1a}, we want to show that also
\begin{equation}\label{weakconvergencewoutbeta1a}\lim_{n\to\infty}\int_\Omega \rho_n(t_n,x) \varphi(x) \ dx =\int_\Omega \rho(t_0,x) \varphi(x) \ dx\end{equation}
for every $\varphi\in C_c^\infty(\Omega)$ and $t_n\to t_0$.
\begin{remark}\label{osservazioneconvdebpq1a} If \eqref{weakconvergencewoutbeta1a} holds, then it is true for every $\varphi\in L^q(\Omega)$. Moreover, we have that
\begin{equation}\|\rho_n(t_n)\|_p=\|\rho_0^n\|_p\stackrel{n\to\infty}{\longrightarrow} \|\rho_0\|_p=\|\rho_0(t_0)\|_p\end{equation}
thanks to the convergence of $\rho_0^n\to \rho_0$ in $L^p(\Omega)$ by hypothesis and using corollary \ref{corollariodatoinizialeconservato1a}.
So, it follows that $\rho_n(t_n)\to \rho(t_0)$ in $L^p(\Omega)$. From theorem \ref{lemmaan194} it follows that $\rho_n\to \rho$ in $C([0,T];L^p(\Omega))$, as $n\to\infty$, that is the thesis.
\end{remark}
\begin{remark}[Proof of \eqref{weakconvergencewoutbeta1a}] So we have to prove \eqref{weakconvergencewoutbeta1a}. Given $M\in (0,\infty)$, consider the function
\begin{equation}\beta_M(s):=\begin{cases} s & |s|\leq M\\
M & s>M\\
-M & s<-M
\end{cases}\end{equation}
We have to fix this $M$ in a precise way. Let $t_n\to t_0\in [0,T]$ and a consider the sequence $\{\rho_n(t_n),\rho(t_0)\}_{n\in \mathbb{N}}\subseteq L^p(\Omega)$. Moreover, this sequence is bounded in $L^p(\Omega)$,
since $\displaystyle \|\rho_n(t_n)\|_p\equiv \|\rho_0^n\|_p\leq C$ by the convergence in the hypothesis. So, using lemma \ref{teoremaunifintgfn1a}, we have that for every $\varepsilon>0$ exists $M_\varepsilon>0$ such that
\begin{equation}\label{unifintofthisseqdens1a}\int_{\{x\in\Omega: \ |\rho(t_0,x)|>M_\varepsilon\}}|\rho(t_0,x)| \ dx<\varepsilon, \quad \int_{\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}}|\rho_n(t_n,x)| \ dx<\varepsilon, \qquad \forall \ n\in\mathbb{N}\end{equation}
Notice that \eqref{unifintofthisseqdens1a} implies that
$$M_\varepsilon|\{x\in\Omega: \ |\rho(t_0,x)|>M_\varepsilon\}|<\varepsilon,\quad M_\varepsilon |\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}|<\varepsilon, \qquad \forall \ n\in\mathbb{N}$$
that will be useful in a moment. Fix $\varepsilon>0$ and choose $M_\varepsilon>0$ as above. Then we can consider $\beta_{M_\varepsilon}$. Moreover, let $\beta_{M_\varepsilon}^k$ an admissible functions that coincides with $\beta_{M_\varepsilon}$ except two neighbourhoods, of $s=\pm M_\varepsilon$, and such that
\begin{equation}|\beta_{M_\varepsilon}^{k}(s)|\leq |\beta_{M_\varepsilon}(s)|\leq M_\varepsilon, \qquad \sup_{s\in\mathbb{R}}|\beta_{M_\varepsilon}^k(s)-\beta_{M_\varepsilon}(s)|<\frac1k\end{equation}
We can choose $k_\varepsilon\in\mathbb{N}$ such that $\displaystyle \frac{|\Omega|\|\varphi\|_\infty}{k_\varepsilon}<\varepsilon$. So, we can write
\begin{equation}\label{scritturaspezzataintconvdebp1a}\int_\Omega \rho_n(t_n,x)\varphi(x) \ dx=\int_\Omega \beta_{M_\varepsilon}(\rho_n(t_n,x)) \varphi(x) \ dx +\int_\Omega \{\rho_n(t_n,x)-\beta_{M_\varepsilon}(\rho_n(t_n,x))\} \varphi(x) \ dx\end{equation}
We, at first, focus our attention to the second addend. We have
$$\bigg|\int_\Omega \{\rho_n(t_n,x)-\beta_{M_\varepsilon}(\rho_n(t_n,x))\} \varphi(x) \ dx\bigg|=\bigg|\int_{\{x\in\Omega: \ |\rho_n(t_n,x)|\leq M_\varepsilon\}} \{\rho_n(t_n,x)-\beta_{M_\varepsilon}(\rho_n(t_n,x))\} \varphi(x) \ dx+$$
$$+\int_{\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}} \{\rho_n(t_n,x)-\beta_{M_\varepsilon}(\rho_n(t_n,x))\} \varphi(x) \ dx\bigg|=\bigg|\int_{\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}} \{\rho_n(t_n,x)-M_\varepsilon\} \varphi(x) \ dx\bigg|\leq$$
\begin{equation}\leq \|\varphi\|_\infty\bigg(\int_{\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}}|\rho_n(t_n,x)| \ dx +M_\varepsilon |\{x\in\Omega: \ |\rho_n(t_n,x)|>M_\varepsilon\}|\bigg)<2\varepsilon\|\varphi\|_\infty\end{equation}
If in equation \eqref{scritturaspezzataintconvdebp1a} we subtract the term $\displaystyle \int_\Omega \rho(t_0,x)\varphi(x) \ dx$, we have also to consider
$$\bigg|\int_\Omega \beta_{M_\varepsilon}(\rho_n(t_n,x)) \varphi(x) \ dx- \int_\Omega \rho(t_0,x)\varphi(x) \ dx\bigg|\leq$$
\begin{equation}\leq\bigg|\int_\Omega \big(\beta_{M_\varepsilon}(\rho_n(t_n,x))-\beta_{M_\varepsilon}(\rho(t_0,x))\big) \varphi(x) \ dx\bigg|+\bigg| \int_\Omega \big(\beta_{M_\varepsilon}(\rho(t_0,x))-\rho(t_0,x)\big)\varphi(x) \ dx\bigg|\end{equation}
We deal at first with the second addend. Following the steps above, we have again
\begin{equation}\bigg|\int_\Omega \big(\beta_{M_\varepsilon}(\rho(t_0,x))-\rho(t_0,x)\big)\varphi(x) \ dx\bigg|\leq 2\varepsilon\|\varphi\|_\infty\end{equation}
The other term can be written as
$$\bigg|\int_\Omega \big(\beta_{M_\varepsilon}(\rho_n(t_n,x))-\beta_{M_\varepsilon}(\rho(t_0,x))\big) \varphi(x) \ dx\bigg|\leq$$
$$\leq\|\varphi\|_\infty\int_\Omega |\beta_{M_\varepsilon}(\rho_n(t_n,x))-\beta_{M_\varepsilon}^{k_\varepsilon}(\rho_n(t_n,x))| \ dx+\bigg|\int_\Omega \big(\beta_{M_\varepsilon}^{k_\varepsilon}(\rho_n(t_n,x))-\beta_{M_\varepsilon}^{k_\varepsilon}(\rho(t_0,x))\big) \varphi(x) \ dx\bigg| \ +$$
$$+ \ \|\varphi\|_\infty\int_\Omega |\beta_{M_\varepsilon}^{k_\varepsilon}(\rho(t_0,x))-\beta_{M_\varepsilon}(\rho(t_0,x))| \ dx\leq $$
\begin{equation}\leq \frac{2\|\varphi\|_\infty |\Omega|}{ k_\varepsilon}+\bigg|\int_\Omega \big(\beta_{M_\varepsilon}^{k_\varepsilon}(\rho_n(t_n,x))-\beta_{M_\varepsilon}^{k_\varepsilon}(\rho(t_0,x))\big) \varphi(x) \ dx\bigg|\end{equation}
We have that, for every admissible function, \eqref{convergencebetaadmboundM1a} holds, and so there exists $N=N(\beta_{M_\varepsilon}^{k_\varepsilon})\equiv N_\varepsilon$ such that, for every $n\geq N_\varepsilon$,
\begin{equation}\bigg|\int_\Omega \rho_n(t_n,x)\varphi(x) \ dx-\int_\Omega \rho(t_0,x)\varphi(x) \ dx\bigg|\leq 4\varepsilon\|\varphi\|_\infty+ \frac{2\|\varphi\|_\infty |\Omega|}{ k_\varepsilon} +\varepsilon\leq 4\varepsilon \|\varphi\|_\infty+3\varepsilon\end{equation}
that is
\begin{equation}\lim_{n\to\infty}\int_\Omega \rho_n(t_n,x)\varphi(x) \ dx=\int_\Omega \rho(t_0,x)\varphi(x) \ dx\end{equation}
\end{remark}
This concludes the proof.
\end{proof}
\renewcommand{\refname}{\spacedlowsmallcaps{References}}
\bibliographystyle{unsrt}
|
\section{Introduction and statement of results}
The study of representations of integers as sums of polygonal numbers has a long and storied history. For $m\in\mathbb N_{\geq 3}$ and $\ell\in\mathbb N_0$, let $p_m(\ell)$ be the \begin{it}$\ell$-th $m$-gonal number\end{it}
\begin{equation*}
p_m(\ell):=\frac12 (m-2)\ell^2-\frac12 (m-4)\ell,
\end{equation*}
which counts the number of points in a regular $m$-gon with side lengths $\ell$. Fermat famously conjectured in 1638 that every positive integer may be written as the sum of at most $m$ $m$-gonal numbers, or equivalently that for every $n\in\mathbb N_0$
\begin{equation}\label{eqn:Fermatsum}
\sum_{1 \leq j \leq m} p_m(\ell_j) = n
\end{equation}
is solvable. Lagrange proved the four-squares theorem in 1770, resolving the case $m=4$ of Fermat's conjecture. The case $m=3$ of triangular numbers was solved by Gauss in 1796 and is sometimes called the Eureka Theorem because Gauss famously marked in his diary ``EYPHKA! num=$\triangle+\triangle+\triangle$''. Cauchy \cite{Cauchy} finally completed the full proof of the conjecture in 1813, and Nathanson \cite{Nathanson} shortened Cauchy's proof in 1987; he also provided some additional history.
More generally, given $\bm{\alpha }\in \mathbb N^d$ (throughout we write vectors in bold letters) and $n\in\mathbb N$ one may consider Diophantine equations of the type
\begin{equation}\label{eqn:genpolysum}
\sum_{1 \leq j \leq d} \alpha_j p_m\left(\ell_j\right)=n.
\end{equation}
It is natural to ask for a classification of those $n\in\mathbb N$ for which \eqref{eqn:genpolysum} is solvable with $\bm{\ell}\in \mathbb N_0^{d}$.
The case $m=4$ is well-understood: by applying the theory of modular forms (see \cite[Proposition 11]{Zagier123}), for $m=4$ one not only knows the existence of a solution to \eqref{eqn:Fermatsum} but has a precise formula for the number of such solutions. Namely,
Jacobi showed in 1834 (see e.g. \cite[p. 119]{Williams}) that
\begin{equation}\label{eqn:sum4squares}
\#\left\{ \bm{\ell}\in \mathbb Z^4: \sum_{1\leq j \leq 4}\ell_j^2=n\right\} = 8\sum_{\substack{4\nmid d\mid n}} d.
\end{equation}
Although formulas like \eqref{eqn:sum4squares} are rare, they are often ``almost true'' in the sense that the number of solutions to equations like \eqref{eqn:genpolysum} with $\bm{\ell}\in\mathbb Z^d$ may be written in the shape of \eqref{eqn:sum4squares} up to an error term. For example, in the case $\bm{\alpha}=\bm{1}$ with arbitrary even $d$ and $m=4$, Ramanujan stated \cite[(146)]{Ramanujan} a formula for the number of solutions to \eqref{eqn:genpolysum} which was later proven by Mordell \cite{Mordell}.
Set
\[
r_{2k}(n):=\#\left\{\bm{\ell}\in\mathbb Z^{2k}: \sum_{1\leq j \leq 2k}\ell_j^2=n\right\}
\]
and suppose for simplicity that $k\geq 10$ is even. Ramanujan's claim \cite[(146)]{Ramanujan} together with \cite[(143)]{Ramanujan} implies that there exists $\delta>0$ such that for $n\in\mathbb N$
\begin{equation}\label{eqn:r2k}
r_{2k}(n)=\frac{2k
(-1)^{n+1}
}{\left(2^{k}-1\right)B_{k}} \sum_{d\mid n} (-1)^{d+\frac{n}{d}\frac{k}{2}} d^{k-1}+O\left(n^{k-1-\delta}\right),
\end{equation}
where $B_{k}$ is the $k$-th Bernoulli number.
More generally,
Kloosterman \cite[(I.3I)]{Kloosterman} applied
the Circle Method to show formulas resembling \eqref{eqn:r2k} (where the main term is the singular series from the Circle Method) in the case $m=4$ and $d=4$ of \eqref{eqn:genpolysum}.
The goal of this paper is to obtain formulas resembling \eqref{eqn:r2k} for the number of solutions
\begin{equation*}
r_{m,\bm{\alpha}}(n):=\#\left\{\bm{\ell}\in \mathbb N_0^d: \sum_{1\leq j \leq d}\alpha_j p_m\left(\ell_j\right)=n\right\}.
\end{equation*}
Note that in \eqref{eqn:sum4squares} and \eqref{eqn:r2k}, we are counting solutions with $\ell_j\in\mathbb Z$, while the goal in this paper is to restrict to solutions with $\ell_j\in\mathbb N_0$. The reason for this restriction is the connection with regular polygons. Although the formula defining $p_m(\ell_j)$ is still well-defined for $\ell_j\in\mathbb Z$, their interpretation as the number of points in a regular $m$-gon with side lengths $\ell_j$ is lost when $\ell_j<0$ because side-lengths cannot be negative. For $m\in\{3,4\}$, the restriction $\ell_j\in\mathbb N_0$ does not lead to a fundamentally different question than taking $\ell_j\in\mathbb Z$. Indeed, using that $p_3(-\ell-1)=p_3(\ell)$, we obtain for $m=3$ a bijection between solutions with $\ell_j\geq 0$ and those with $\ell_j<0$. Similarly, since $p_4(-\ell)=p_4(\ell)$, we have for $m=4$ a bijection between solutions with $\ell_j\geq 0$ and those with $\ell_j\leq 0$. The case $\ell_j=0$ is double-counted, but formulas for solutions with $\ell_j=0$ may be obtained by taking $d\mapsto d-1$ and removing $\alpha_j$ in \eqref{eqn:genpolysum}. Thus for $m\in\{3,4\}$, finding the number of solutions to \eqref{eqn:genpolysum} with $\ell_j\in\mathbb N_0$ is equivalent to finding the number of solutions with $\ell_j\in\mathbb Z$, and we hence assume $m\geq 5$ throughout. To the best of our knowledge, in this case formulas like \eqref{eqn:r2k} for the number of solutions to \eqref{eqn:genpolysum} if $\bm{\ell}\in\mathbb N_0^d$ are not known.
However, standard techniques yield formulas of this type for $\bm{\ell}\in\mathbb Z^d$. Completing the square in \eqref{eqn:genpolysum}, solutions to \eqref{eqn:genpolysum} are in one-to-one correspondence with solutions to certain sums of squares with fixed congruence conditions. Using this relationship, one finds that studying
\[
r_{m,\bm{\alpha}}^*(n):=\#\left\{\bm{x}\in\mathbb Z^d: \sum_{1\leq j \leq d}\alpha_jp_m(x_j) = n\right\}
\]
is equivalent to evaluating $s_{r,M,\bm\alpha}^*(An+B)$ (for some appropriate $A$, $B$, $r$, and $M$), where
\begin{equation*}\label{eqn:s*def}
s_{r,M,\bm{\alpha}}^*(n):=\#\left\{\bm{x}\in\mathbb Z^d: \sum_{1\leq j\leq d}\alpha_jx_j^2 = n,\ x_j\equiv r\pmod{M}\right\}.
\end{equation*}
The generating function ($q:=e^{2\pi i \tau}$ with $\tau\in\H:=\{\tau\in\mathbb C: \im{\tau}>0\}$)
\[
\Theta_{r,M,\bm{\alpha}}^*(\tau):=\sum_{n\geq 0}s_{r,M,\bm{\alpha}}^*(n) q^{\frac{n}{M}}
\]
is a modular form of weight $\frac{d}{2}$ for some congruence subgroup (see, e.g., \cite[Proposition 2.1]{Shimura}). Using the theory of modular forms, formulas like \eqref{eqn:r2k} may be obtained by splitting $\Theta_{r,M,\bm{\alpha}}^*$ into an Eisenstein series and a cusp form and using a result of Deligne \cite{Deligne} to bound the coefficients of the cusp form as an error term. As noted above, although one obtains formulas like \eqref{eqn:r2k} for $r_{m,\bm{\alpha}}^*(n)$ due to its connection with modular forms, one loses the interpretation for $p_{m}(\ell_j)$ in terms of regular $m$-gons.
The aim of this paper is to link the study of $r_{m,\bm{\alpha}}(n)$ to modular forms while simultaneously preserving the connection with regular $m$-gons by restricting to $\ell_j\in\mathbb N_0$.
However, the restriction of $\ell_j$ to $\mathbb N_0$ breaks an important symmetry and as a result the
generating function for $r_{m,\bm{\alpha}}(n)$ is unfortunately not a modular form, so one cannot employ standard methods to obtain a formula for $r_{m,\bm{\alpha}}(n)$.
Indeed, in his last letter to Hardy in 1920, Ramanujan commented that ``unlike the `False' theta functions'', the mock theta functions that he discovered ``enter into mathematics as beautifully as the ordinary theta functions''. However, contrary to Ramanujan's claims about the false theta functions,
recent work by Nazaroglu and the first author \cite{BringmannNazaroglu} shows that the generating function has some modular properties and in particular can be \enquote{completed} to a function transforming like a modular form. This gives that the generating function has some explicit ``obstruction to modularity''. The investigation of this obstruction to modularity plays a fundamental role in this paper and causes most of the technical difficulties.
Given the results in \cite{BringmannNazaroglu}, one approach to obtaining formulas like \eqref{eqn:r2k} would be to establish structure theorems or generalizing results on modular forms to extend to functions with this type of obstruction to modularity. In this paper, we instead link the $r_{m, \bm{\alpha}}(n)$ and $r_{m,\bm{\alpha}}^*(n)$, showing that they are essentially equal up to an error term. As above, by completing the square, one finds that this is equivalent to relating $s_{r,M,\bm{\alpha}}^*(An+B)$ to $s_{r,M,\bm\alpha,C}(An+B)$ (for some $A,B,C$), where
\[
s_{r,M,\bm{\alpha},C}(n):=\#\left\{\bm{x}\in\mathbb Z^d: \sum_{1\leq j\leq d}\alpha_jx_j^2 = n,\ x_j\equiv r\pmod{M},\ x_j\geq C\right\}.
\]
If $C=1$ (i.e., if $\bm{x}\in\mathbb N^d$), then we omit it in the notation.
Heuristically, one would expect that solutions with $\varepsilon_j x_j>0$ are equally distributed independent of the choice of $\varepsilon_j\in \{\pm 1\}$. Our main theorem shows that this is indeed the case.
\begin{theorem}\label{thm:rNrZ}
Let $\bm{\alpha}\in \mathbb N^4$ and $r,M\in\mathbb N$ be given.
\noindent
\noindent
\begin{enumerate}[leftmargin=*,label=\rm(\arabic*)]
\item We have
\begin{equation*}\label{eqn:sNsZ}
s_{r,M,\bm{\alpha}}(n)=\frac{1}{16}s_{r,M,\bm{\alpha}}^*(n)+O\left(n^{\frac{15}{16}+\varepsilon}\right).
\end{equation*}
\item
For $m>4$ we have
\begin{equation*}\label{eqn:rNrZ}
r_{m,\bm{\alpha}}(n) = \frac{1}{16} r_{m,\bm{\alpha}}^*(n) + O\left(n^{\frac{15}{16}+\varepsilon}\right).
\end{equation*}
\end{enumerate}
\end{theorem}
\noindent
\begin{remark}
The main term of $s_{r,M,\bm{\alpha}}^*(n)$ comes from the Eisenstein component of $\Theta_{r,M,\bm{\alpha}}^*$. The computation of the corresponding Eisenstein series appears throughout the literature in a variety of different shapes. In one direction,
Kloosterman \cite{Kloosterman} computed this component as the singular series coming from the Circle Method. On the other hand, the corresponding Eisenstein series appears in the work of Siegel \cite{Siegel1,Siegel2} and follow-up work of Weil \cite{Weil}, van der Blij \cite{vanderBlij}, and Shimura \cite{ShimuraCongruence} in two different forms. Firstly, the Eisenstein series may be realized as a certain weighted average of the solutions over the genus of the given sum of squares with congruence conditions. Secondly, Siegel computed its coefficients as certain $p$-adic limits. Finally, since the space of modular forms of a given weight and congruence subgroup is a finite-dimensional vector space, one may explicitly construct a basis and determine the Eisenstein series component using Linear Algebra.
\end{remark}
As noted above, combining Theorem \ref{thm:rNrZ} with known techniques from the theory of modular forms yields formulas resembling \eqref{eqn:r2k}. As a first corollary, we obtain such a formula for the number of representations of $n$ as a sum of four hexagonal numbers; the main term
\rm
is given in terms of the \emph{sum of divisors function} $\sigma(n):=\sum_{d\mid n} d$.
\begin{corollary}\label{cor:hexagonal}
We have
\[
r_{6,(1,1,1,1)}(n)=\frac{1}{16}\sigma(2n+1)+O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
\end{corollary}
\begin{remark}
Since $\sigma(2n+1)\geq 2n+1$, Corollary \ref{cor:hexagonal} implies that $r_{6,\bm{\alpha}}(n)>0$ for $n$ sufficiently large. Guy \cite{Guy} proposed a study of the numbers which are not the sum of four polygonal numbers. Moreover, Corollary \ref{cor:hexagonal} implies that the number of such solutions is $\gg n$.
\end{remark}
Another example is given by sums of five hexagonal numbers where the last hexagonal number is repeated at least twice.
To state the result, let $(\frac{\cdot}{\cdot})$ be the generalized Legendre symbol.
\begin{corollary}\label{cor:hexagonal2}
For $\bm{\alpha}={\(1,1,1,2\)}$ and $m=6$, we have
\[
r_{6,\bm{\alpha}}(n)=-\frac{1}{64}\sum_{d\mid (8n+5)} \left(\frac{8}{d}\right)d +O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
In particular, for $n$ sufficiently large
\[
r_{6,\bm{\alpha}}(n)>0.
\]
\end{corollary}
The proofs of Corollaries \ref{cor:hexagonal} and \ref{cor:hexagonal2} rely on formulas of Cho \cite{Cho} which use the fact that $\Theta_{-1,4,\bm{\alpha}}^*$ is an Eisenstein series in the cases
$\bm{\alpha}=(1,1,1,1)$ and $\bm{\alpha}=(1,1,1,2)$; indeed, as pointed out by Cho in \cite[Examples 3.3 and 3.4]{Cho}, the space of modular forms containing them is spanned by Eisenstein series in these cases. However, to obtain similar corollaries from Theorem \ref{thm:rNrZ}, we do not require the corresponding theta function to be an Eisenstein series. In order to exhibit how to use Theorem \ref{thm:rNrZ}, we give one such example.
\begin{corollary}\label{cor:pentagonal}
For $\bm{\alpha}={\(1,1,1,1\)}$ and $m=5$, we have
\[
r_{5,(1,1,1,1)}(n)= \frac{1}{24}\sigma(6n+1) + O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
\end{corollary}
The paper is organized as follows. In Section \ref{sec:setup}, we connect sums of squares and polygonal numbers, introduce partial theta functions, and relate them to theta functions and false theta functions. In Section \ref{sec:Farey}, we recall some facts about Farey fractions that are used for the Circle Method. In Section \ref{sec:modular}, we give modular transformation properties of the theta functions and the false theta functions in a shape that is useful for our application of the Circle Method. Section \ref{sec:IntBound} is devoted to studying the obstruction to modularity of the false theta functions and bounding them in a suitable way to use in the Circle Method. In Section \ref{sec:CircleMethod}, we apply the Circle Method to prove Theorem \ref{thm:rNrZ}. Finally, we prove Corollaries \ref{cor:hexagonal}, \ref{cor:hexagonal2}, and \ref{cor:pentagonal}
in Section \ref{sec:Corollaries} to demonstrate how to apply Theorem \ref{thm:rNrZ} to obtain identities resembling \eqref{eqn:r2k}.
\section{Sums of squares with congruence conditions and polygonal numbers} \label{sec:setup}
In this section, we relate sums of polygonal numbers and sums of squares and give a relationship between $s_{r,M,\bm{\alpha}}$ and $s_{r,M,\bm{\alpha}}^*$.
Without loss of generality, we pick the ordering $\alpha_j\geq \alpha_{j+1}$ for $j\in\{1,2,3\}$
in \eqref{eqn:genpolysum}. As noted in the introduction, we investigate sums of polygonal numbers via a connection with sums of squares satisfying certain congruence conditions.
Writing
\begin{equation}\label{pml}
p_m(\ell)=\frac12 (m-2)\left(\ell-\frac{m-4}{2(m-2)}\right)^2-\frac{(m-4)^2}{8(m-2)},
\end{equation}
one sees directly that
\[
r_{m,\bm{\alpha}}(n) = s_{-(m-4),2(m-2),\bm{\alpha},-(m-4)}\left(8(m-2)n+\sum_{1\leq j \leq 4} \alpha_j(m-4)^2\right).
\]
Using \eqref{pml}, we have the generating function
\begin{equation*}
\sum_{n\geq 0}r_{m, \bm{\alpha}}(n)q^n=\sum_{\bm{\ell}\in\mathbb N_0^4}q^{\sum_{j=1}^4\alpha_j p_m\left(\ell_j\right)
}=q^{-\sum_{j=1}^4\alpha_j\frac{(m-4)^2}{8(m-2)}}\prod_{j=1}^4 \sum_{\ell\in\mathbb N_0}q^{\alpha_j\frac{m-2}{2}\left(\ell-\frac{m-4}{2(m-2)}\right)^2}.
\end{equation*}
We restrict our investigation of solutions to \eqref{eqn:genpolysum} to the case $d=4$ and $\bm{\ell}\in\mathbb N_0^4$. We claim that most of the solutions to \eqref{eqn:genpolysum} come from solutions with $\ell_j\neq 0$, i.e., sums of precisely four polygonal numbers instead of at most four polygonal numbers. Defining $r_{m,\bm{\alpha}}^{+}(n)$ via the generating function
\begin{equation}\label{eqn:r+def}
\sum_{n\geq 0}r_{m, \bm{\alpha}}^{+}(n)q^n:=\sum_{\bm{\ell}\in\mathbb N^4}q^{\sum_{j=1}^4\alpha_j p_m\left(\ell_j\right)}=q^{-\sum_{j=1}^4\alpha_j\frac{(m-4)^2}{8(m-2)}}\prod_{j=1}^4 \sum_{\ell\in\mathbb N}q^{\alpha_j\frac{m-2}{2}\left(\ell-\frac{m-4}{2(m-2)}\right)^2},
\end{equation}
a direct calculation using \cite[Lemma 4.1(a)]{Blomer} shows the following.
\begin{lemma}\label{lem:rexactly}
{
For $\bm{\alpha}\in\mathbb N^4$, we}
have
\[
r_{m,\bm{\alpha}}(n)=r_{m,\bm{\alpha}}^{+}(n)+O\left(n^{\frac{1}{2}+\varepsilon}\right).
\]
\end{lemma}
Define the partial theta function
\[
\Theta_{r,M,\bm{\alpha}}^+(\tau):=\sum_{n\geq 0}s_{r,M,\bm{\alpha}}(n) q^{\frac{n}{M}},
\]
which is closely related to the generating function of $r_{m,\bm{\alpha}}^+(n)$ by \eqref{eqn:r+def}.
\begin{lemma}\label{lem:r+s+rel}
For $m\geq 5$ and $\bm{\alpha}\in \mathbb N^4$, we have
\[
\sum_{n\geq 0} r_{m,\bm{\alpha}}^+(n) q^n =q^{-\sum_{j=1}^4\alpha_j\frac{(m-4)^2}{8(m-2)}}\Theta_{m,2(m-2),\bm{\alpha}}^+\left(\frac{\tau}{4}\right).
\]
\end{lemma}
By Lemma \ref{lem:r+s+rel} and Lemma \ref{lem:rexactly}, to prove Theorem \ref{thm:rNrZ} it suffices to approximate the Fourier coefficients of $\Theta_{r,M,\bm{\alpha}}^+(\tau)$. These functions $\Theta_{r,M,\bm{\alpha}}^+$ are closely related to the usual (unary) theta functions $\vartheta(r,M;\tau)$ and false theta functions $F_{r,M}(\tau)$, defined for $0\leq r \leq M-1$, $M\in \mathbb N$ by
\begin{equation}\label{eqn:thetaFdef}
F_{r,M}(\tau):=\sum_{\nu\equiv r\pmod{2M}}\operatorname{sgn}(\nu)q^{\frac{\nu^2}{4M}},\qquad \vartheta(r,M; \tau):=\sum_{\nu\equiv r\pmod{M}}q^{\frac{\nu^2}{2M}}.
\end{equation}
A direct calculation shows the following.
\begin{lemma}\label{lem:ThetaFalse}
For $M\in\mathbb N$, $0<r<2M$, and $\bm{\alpha}\in\mathbb N^4$, we have
\[
\Theta_{r,2M,\bm{\alpha}}^+(\tau)=\frac{1}{16}\sum_{J\subseteq\{1,2,3,4\}} \prod_{j\in J}\vartheta\left(r, 2M; 2\alpha_{j}\tau\right)\prod_{\ell\in \{1,2,3,4\}\setminus J} F_{r,M}\left(2\alpha_{\ell}\tau\right).
\]
\end{lemma}
By Lemmas \ref{lem:r+s+rel} and \ref{lem:ThetaFalse}, for $J\subseteq\{1,2,3,4\}$ it is natural to define
\[
F_{r,M,\bm{\alpha},J}(q):=q^{-\frac{r^2}{2M}\sum_{j=1}^4 \alpha_j}\prod_{j\in J}\vartheta\left(r, 2M; 2\alpha_{j}\tau\right)\prod_{\ell\notin J} F_{r,M}\left(2\alpha_{\ell}\tau\right),
\]
where hereafter
$\ell \notin J$ means $\ell\in \{1,2,3,4\}\setminus J$.
Then for each $J\subseteq \{1,\dots,4\}$ we set
\begin{equation*}
F_{r,M,\bm{\alpha},J}(q)=: \sum_{n\geq 0} c_{r,M,\bm{\alpha},J}(n)q^n.
\end{equation*}
If $J=\{1,2,3,4\}$, then we omit $J$ in the notation. A straightforward calculation yields the following.
\begin{lemma}\label{lem:mainterm}
\noindent
\noindent
\begin{enumerate}[leftmargin=*,label=\rm(\arabic*)]
\item
For $M\in\mathbb N$, $0<r<2M$, and $\bm{\alpha}\in \mathbb N^4$, we have
\[
F_{r,M,\bm{\alpha}}(q)= q^{-\frac{r^2}{2M}\sum_{j=1}^4 \alpha_j}\Theta_{r,2M,\bm{\alpha}}^*(\tau).
\]
In particular, for every $n\in\mathbb N_0$
\[
c_{r,M,\bm{\alpha}}(n)=s_{r,2M,\bm{\alpha}}^*\left(2Mn+r^2\sum_{1\leq j \leq 4}\alpha_j\right).
\]
\item
For $m\geq 5$ and $\bm{\alpha}\in\mathbb N^4$, we have
\[
c_{m,m-2,\bm{\alpha}}\left(4\left(n-\sum_{1\leq j \leq 4} \alpha_j\right)\right)=r_{m,\bm{\alpha}}^*(n).
\]
\end{enumerate}
\end{lemma}
\section{Basic facts on Farey fractions}\label{sec:Farey}
The {\it Farey sequence of order $N$ $\in \mathbb N$} is the sequence of reduced fractions in $[0,1)$ whose denominator does not exceed $N$. If $\frac{h}{k}$, $\frac{h_1}{k_1}$ are adjacent elements in the Farey sequence then their {\it mediant} is $\frac{h+h_1}{k+k_1}$.
When computing mediants below, we consider $\frac{N-1}{N}$ to be adjacent to $\frac{0}{1}$ and take the mediant between $\frac{N-1}{N}$ and $\frac{1}{1}$.
The Farey sequence of order $N$ is then iteratively defined by placing the mediant between two adjacent Farey fractions of order $N-1$ if the denominator of the mediant in reduced terms is at most $N$. We see that two Farey fractions $\frac{h_1}{k_1}<\frac{h}{k}$ of order $N$ are adjacent if and only if the mediant in reduced terms has denominator larger than $N$. This implies that
\begin{equation}\label{eqn:adjacent}
h k_1-h_1k=1,
\end{equation}
and the converse is also true; if $hk_1-h_1k=1$, then $\frac{h}{k}$ and $\frac{h_1}{k_1}$ are adjacent Farey fractions of order $\max(k,k_1)$. For three adjacent Farey fractions $\frac{h_1}{k_1}<\frac{h}{k}<\frac{h_2}{k_2}$, we set for $j\in\{1,2\}$ (note that $k_j$ depends on $h$)
\begin{equation}\label{eqn:rhohdef}
\varrho_{k,j}(h):=k+k_j-N.
\end{equation}
Since the mediant between adjacent terms has denominator larger than $N$ and $k_j\leq N$, we have
\begin{equation}\label{eqn:varrhojbnd}
1\leq \varrho_{k,j}(h)\leq k.
\end{equation}
The following lemma is straightforward to prove.
\begin{lemma}\label{lem:AdjacentNeighbours}
If $\frac{h}{k}<\frac{h_2}{k_2}$ are adjacent Farey fractions of order $N$, then $1-\frac{h_2}{k_2}<1-\frac{h}{k}$ are also adjacent Farey fractions of order $N$ and
\[
\varrho_{k,2}(h)=\varrho_{k,1}(k-h).
\]
\end{lemma}
For $n\in \mathbb N$, set $N:=\lfloor\sqrt{n}\rfloor$ and define arcs along the circle of radius $e^{-\frac{2\pi}{N^2}}$ through $e^{2\pi i \tau}$ with $\tau=\frac{h}{k}+\frac{iz}{k}\in \H$.
Note that $\tau\in\H$ is equivalent to $\operatorname{Re}(z)>0$. Specifically, we choose
Farey fractions $\frac{h}{k}$ of order $N$ with $0\leqslant h<k\leqslant N$ and $\gcd(h,k)=1$
and set $z:=k(\frac{1}{N^2}-i\Phi)$ with $-\vartheta'_{h,k}\leqslant \Phi \leqslant \vartheta^{''}_{h,k}$. Here, for adjacent Farey fractions $\frac{h_1}{k_1}<\frac{h}{k}<\frac{h_2}{k_2}$ in the Farey sequence of order $N$, set
\begin{equation*}
\vartheta'_{h,k}:=\frac{1}{k(k+k_1)}, \quad \vartheta^{''}_{h,k}:=\frac{1}{k(k+k_2)}.
\end{equation*}
By \eqref{eqn:varrhojbnd}, we have
\begin{equation}\label{eqn:PhiBound}
|\Phi|\leq \max\left\{\vartheta_{h,k}^{'},\vartheta_{h,k}^{''}\right\}<\frac{1}{kN}.\quad \quad j\in\{1,2\}.
\end{equation}
\section{Modular Transformations}\label{sec:modular}
Kloosterman's version of the Circle Method \cite{Kloosterman} plays a fundamental role in the proof of Theorem \ref{thm:rNrZ}. In order to integrate along arcs from $-\vartheta_{h,k}'$ to $\vartheta_{h,k}''$, one requires the asymptotic behaviour of $F_{r,M,\bm{\alpha},J}(\tau)$ near $\frac{h}{k}$. Transformation properties relating the cusp $\frac{h}{k}$ to $i\infty$ thus play a pivotal role in determining the asymptotic growth near the cusp $\frac{h}{k}$.
To state these, for $a,b\in\mathbb Z$, $c\in\mathbb N$ define the \textit{Gauss sum}
\begin{equation*}
G(a,b;c):= \sum_{\ell\pmod{c}} e^{\frac{2\pi i}{c} \left(a\ell^2+b\ell\right)}.
\end{equation*}
\subsection{The theta functions}
We use the following modular transformation properties.
\begin{lemma}\label{lem:thetatrans}
We have
\begin{equation*}
\vartheta\left( r,2M;2\alpha_j\left(\frac{h}{k}+\frac{iz}{k}\right)\rp
=\frac{e^{\frac{\pi i \alpha_jhr^2}{Mk}}}{2\sqrt{Mk\alpha_jz}}\sum_{\nu\in\mathbb Z}e^{-\frac{\pi \nu^2}{4Mk\alpha_jz}+\frac{\pi i r \nu}{Mk}} G(2M\alpha_jh,2r\alpha_jh+\nu;k).
\end{equation*}
\end{lemma}
\begin{proof}
Writing $\nu=r+2M\alpha+2Mk\ell$ with $\alpha\pmod{k}$ and $\ell\in\mathbb Z$ in definition \eqref{eqn:thetaFdef}, we obtain
\begin{align*}
\vartheta\left( r,2M;2\alpha_j\left(\frac{h}{k}+\frac{iz}{k}\right)\rp
= \sum_{\alpha\pmod k} e^{
\frac{2\pi i \alpha_j h}{2Mk}
(r+2M\alpha)^2} \sum_{\ell\in\mathbb Z}
e^{
\frac{2\pi i \alpha_j}{2Mk}
(r+2M\alpha+2Mk\ell)^2 iz}.
\end{align*}
Using the modular inversion formula (see \cite[(2.4)]{Shimura})
\begin{equation*}
\vartheta\left( r,M;-\frac 1 \tau\right) = M^{-\frac 12} (-i\tau)^{\frac 12} \sum_{k\pmod{M}} e^{\frac{2\pi i rk}{M}}
\vartheta(k,M;\tau)
\end{equation*}
on the inner sum, the claim easily follows.
\end{proof}
\subsection{The false theta functions}
We next establish analogous modular properties for the false theta functions.
For $\mu\in\mathbb Z\setminus\{0\}$ set
\begin{equation}\label{defineint}
\mathcal{I}(\mu,k;z)=\mathcal{I}_{M,\alpha_j}(\mu,k;z):=\lim_{\varepsilon\to 0^+}\int_{-\infty}^\infty \frac{e^{-\frac{\pi x^2}{4Mk\alpha_jz}}}{x-(1+i\varepsilon)\mu}dx.
\end{equation}
Throughout we write $\sum^{*}_{\nu\geq 0}$ for the sum where the $\nu=0$ term is counted with a factor $\frac{1}{2}$
and moreover abbreviate
\[
\sideset{}{^*}\sum_{\bm{\nu}\in \mathbb N_0^4}:= \prod_{j=1}^4\sideset{}{^*}\sum_{\nu_j\geq 0}.
\]
For $d\in\mathbb N$, set
\[
\mathcal{L}_{d}:=[1-d,-1]\cup[1,d].
\]
\begin{lemma}\label{lem:Fmodular}
We have
\begin{multline*}
F_{r,M}\left( 2\alpha_j\left( \frac{h}{k}+\frac{iz}{k}\right)\rp=\frac{1}{2\sqrt{Mk\alpha_jz}}e^{\frac{\pi i \alpha_jhr^2}{Mk}}\sum_{\nu\in\mathbb Z}\operatorname{sgn}(\nu) e^{-\frac{\pi \nu^2}{4Mk\alpha_jz}+\frac{\pi i r \nu}{Mk}}G(2M\alpha_jh,2\alpha_jhr+\nu;k) \\
+ \frac{ie^{\frac{\pi i \alpha_jh r^2}{Mk}}}{2\sqrt{Mk\alpha_jz}\pi}
\sum_{\ell\in\mathcal{L}_{Mk}}
\sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm} e^{\frac{\pi i r \ell}{Mk}}G(2M\alpha_jh,2\alpha_jh+\ell;k)\mathcal{I}(\ell\pm 2Mk\nu,k;z).
\end{multline*}
\end{lemma}
\begin{proof}
We have, writing $\nu=r+2M\alpha +2Mk\ell$ ($0\leq\alpha\leq k-1$, $\ell\in\mathbb Z$)
\begin{align*}
F_{r,M}\lp2\alpha_j\left(\frac{h}{k}+\frac{iz}{k}\right)\rp
&=\sum_{\alpha=0}^{k-1} e^{\frac{\pi i \alpha_jh}{Mk}(r+2M\alpha)^2} F_{r+2M\alpha,Mk}(2\alpha_j i z).
\end{align*}
Choosing the $+$-sign in \cite[two displayed formulas after (4.5)]{BringmannNazaroglu} implies that
\begin{equation*}
F_{\beta,M}\left(-\frac 1\tau\right) -\tau^{\frac 12} \sum_{r=1}^{M-1}\psi_{\beta,r}\left( \begin{matrix}0& -1\\ 1 & 0\end{matrix}\right) F_{r,M}(\tau)=
\sqrt{2M} \int_{0}^{-\frac 1\tau +i\infty+\varepsilon} \frac{f_{\beta,M}(\mathfrak{z})}{\sqrt{i\left(\mathfrak{z}+\frac 1\tau\right)}}d\mathfrak{z},
\end{equation*}
where
\begin{equation*}
f_{r,M}(\tau) := \frac{1}{2M} \sum_{\nu\equiv r\pmod{2M}}\nu q^{\frac{\nu^2}{4M}},\qquad
\psi_{\beta,r}\left(\begin{matrix}0&-1\\ 1 &0\end{matrix}\right):= e^{-\frac{3\pi i}{4}}\sqrt{\frac{2}{M}}\sin\left(\frac{\pi \beta r}{M}\right).
\end{equation*}
Changing $\tau\mapsto-\frac 1\tau$, and using
\begin{equation*}
F_{0,M}(\tau)=F_{M,M}(\tau)=0, \qquad F_{2M-r,M}(\tau)=-F_{r,M}(\tau),
\end{equation*}
\begin{equation*}
\sum_{\beta \pmod{2M}} e^{\frac{2\pi i}{2M} (\ell+r)\beta} = \begin{cases}
0 & \text{ if } r \not\equiv -\ell \pmod{2M}, \\
2M & \text{ if } r \equiv -\ell \pmod{2M},
\end{cases}
\end{equation*}
we obtain, after a short calculation
\begin{multline}\label{eqn:Finverse}
F_{\ell,M}\left(-\frac{1}{\tau}\right)= e^{\frac{\pi i}{4}} \sqrt{-\frac{\tau}{2M}}\sum_{\beta\pmod{2M}} e^{\frac{2\pi i \ell \beta}{2M}} F_{\beta,M}(\tau)\\
+ e^{-\frac{3\pi i}{4}} \sqrt{-\tau}\sum_{\beta\pmod{2M}} e^{
\frac{2\pi i \ell \beta}{2M}} \int_{0}^{\tau+i\infty+\varepsilon}\frac{f_{\beta,M}(\mathfrak{z})}{\sqrt{i(\mathfrak{z}-\tau)}}d\mathfrak{z}
\end{multline}
Thus
\begin{multline*}\label{rewriteF}
F_{r+2M\alpha,Mk}(2\alpha_j iz) = \frac{e^{\frac{\pi i}{4}}}{2\sqrt{Mk\alpha_j iz}}
\sum_{\beta\pmod{2Mk}} e^{\frac{2\pi i (r+2M\alpha)\beta}{2Mk}} F_{\beta,Mk}\left( \frac{i}{2\alpha_jz}\right)\\
+ \frac{e^{-\frac{3\pi i}{4}}}{\sqrt{2\alpha_j iz}}\sum_{\beta\pmod{2Mk}} e^{
\frac{2\pi i (r+2M\alpha)\beta}{2Mk}} \int_{0}^{\frac{i}{2\alpha_j z}+i\infty+\varepsilon}\frac{f_{\beta,Mk}(\mathfrak{z})}{\sqrt{i\left(\mathfrak{z}-\frac{i}{2\alpha_jz}\right)}}d\mathfrak{z}.
\end{multline*}
The first term can easily be rewritten, giving the first summand claimed in the lemma.
In the second term of \eqref{eqn:Finverse}, $f_{0,Mk}=0$ and for $\beta\neq 0$ and $\tau=\frac{i}{2\alpha_j z}$ we write the integral as
\begin{align*}
\frac{i}{2M}\lim_{\delta\rightarrow 0^+}
\sum\limits_{\nu\equiv \beta \pmod{2M}} \nu e^{
\frac{\pi i \nu^2\tau}{2M}} \int_{i\tau+\delta}^{\infty-i\varepsilon} \frac{e^{-
\frac{\pi \nu^2\mathfrak{z}}{2M}
}}{\sqrt{-\mathfrak{z}}} d\mathfrak{z}.
\end{align*}
We split up the integral in a way that allows $\delta=0$ to be directly plugged in termwise by Abel's Theorem. For this, we use \cite[displayed formula after (3.4)]{BringmannNazaroglu} to obtain that
\begin{equation*}
\int_{i\tau+\delta}^{\infty-i\varepsilon}\frac{e^{-\frac{\pi r^2\mathfrak{z}}{2M}}}{\sqrt{-\mathfrak{z}}}d\mathfrak{z}=-\frac{i\sqrt{2M}}{\nu}\left(\operatorname{sgn}(\nu)+\operatorname{erf}\left(i \nu \sqrt{\frac{\pi}{2M} (-i\tau-\delta)}\right)\right).
\end{equation*}
We split the error function as
\begin{equation}\label{eqn:errorsplit}
\left( \operatorname{erf}\left( i\nu \left(\sqrt{\frac{\pi}{2M}(-i\tau-\delta)}\right)\rp -\frac{ie^{\frac{\pi \nu^2}{2M} (-i\tau-\delta)}}{\sqrt{2M}\pi \nu \sqrt{-i\tau-\delta}} \right) + \frac{ie^{\frac{\pi \nu^2}{2M} (-i\tau-\delta)}}{\sqrt{2M}\pi \nu \sqrt{-i\tau-\delta}}.
\end{equation}
Plugging in the asymptotic expansion of the error function towards $\infty$ for the error function, one finds that the series in $\nu$ of $\operatorname{sgn}(\nu)$ plus the first term of \eqref{eqn:errorsplit} converges absolutely for $\delta\geq 0$, and hence we may just take the limit $\delta\to 0^+$.
For the second term, we need to compute
\begin{align*}
\lim_{\delta\rightarrow 0^+} \frac{1}{\sqrt{-i\tau-\delta}}
\sum\limits_{\nu\equiv \beta \pmod{2M}}
\frac{e^{-\frac{\pi \nu^2\delta}{2M}}}{\nu} =\lim_{\delta\rightarrow 0^+} \frac{1}{\sqrt{-i\tau-\delta}}\left(
\sum_{\nu\geq 1} \sum_{\pm}\frac{e^{-\frac{\pi}{2M} \left(\beta \pm 2M\nu\right)^2 \delta}}{\beta \pm 2M \nu}
+\frac{e^{-\frac{\pi \beta^2}{2M} \delta}}{\beta}
\right).
\end{align*}
Using the fact that ${\sum\limits_{\pm}} \frac{1}{\beta\pm 2M\nu} = \frac{2\beta}{\beta^2-4M^2\nu^2}$, the above series converges absolutely for $\delta \geq 0$ and hence by Abel's Theorem we have, for $\beta\neq 0$
\begin{multline*}
\int_{0}^{\tau+i\infty+\varepsilon} \frac{f_{\beta,M}(\mathfrak{z})}{\sqrt{i(\mathfrak{z}-\tau)}}d \mathfrak{z}\\
= \frac{1}{\sqrt{2M}}
\sideset{}{^*}{\sum}_{\nu\geq 0}\sum_{\pm}
\left(\operatorname{sgn}(\beta\pm 2 M\nu)
+\operatorname{erf}\left(i(\beta \pm 2M\nu)\sqrt{-\frac{\pi i\tau}{2M}}\right)\right) e^{\frac{\pi i}{2M} (\beta \pm 2M\nu)^2\tau}\\
+\frac{1}{\sqrt{2M}}
\left(\operatorname{sgn}(\beta)+
\operatorname{erf}
\left(i\beta \sqrt{-\frac{\pi i\tau}{2M}}\right)
\right)
e^{\frac{\pi i}{2M} \beta^2\tau}.
\end{multline*}
We now use the following identity from \cite[(3.8)]{BringmannNazaroglu} ($s\in\mathbb R\setminus\{0\}$, $\operatorname{Re}(V)> 0$)
\begin{equation*
\left(\operatorname{sgn}(s)+\operatorname{erf}\left(is\sqrt{\pi V}\right)\right)e^{-\pi s^2 V}
= -\frac{i}{\pi} \lim_{\varepsilon\to 0^+} \int_{-\infty}^{\infty} \frac{e^{-\pi V x^2}}{x-s(1+i\varepsilon)}dx,
\end{equation*}
to obtain that
\begin{multline*}
\int_{0}^{\tau+i\infty+\varepsilon} \frac{f_{\beta,M}(\mathfrak{z})}{\sqrt{i(\mathfrak{z}-\tau)}}d \mathfrak{z} = -\frac{i}{\sqrt{2M}\pi} \sum_{\nu\geq 1}\sum_\pm \lim_{\varepsilon\to 0^+}
\int_{-\infty}^{\infty} \frac{e^{\frac{\pi i \tau x^2}{2M}}}{x-(1+i\varepsilon)(\beta \pm2M\nu)}dx\\
-\frac{i}{\sqrt{2M}\pi}
\lim_{\varepsilon\to 0^+}\int_{-\infty}^{\infty} \frac{e^{\frac{\pi i \tau x^2}{2M}}}{x-(1+i\varepsilon)\beta}dx.
\end{multline*}
From this the second claimed term in the lemma may directly be obtained.
\end{proof}
\section{Bounding $\mathcal{I}(\mu,k;z)$}\label{sec:IntBound}
\subsection{Rewriting $\mathcal{I}(\mu,k;z)$}
In the following lemma, we rewrite $\mathcal{I}(\mu,k;z)$. To state the lemma, set
\[
g(x):= e^{-\frac{\pi (x+\mu)^2}{4Mk\alpha_jz}},\qquad R_g(x):=\re{g(x)},\qquad I_g(x):=\im{g(x)}.
\]
\begin{lemma}\label{lem:inteval}
For every $\delta>0$ and $\mu\in\mathbb Z\setminus\{0\}$, we have
\begin{equation*}
\mathcal{I}(\mu,k;z)= \operatorname{sgn}(\mu)\pi i e^{-\frac{\pi \mu^2}{4Mk\alpha_j z}} +\int_{-\delta}^{\delta} \left(R_g'\left(y_{1,x}\right)+ iI_g'\!\left(y_{2,x}\right)\right)dx+\operatorname{sgn}(\mu)\sum_{\pm}\pm\int_{\delta}^{\infty}{\frac{1}{x} e^{-\frac{\pi\left(x\pm|\mu|\right)^2}{4Mk\alpha_jz}}}dx
\end{equation*}
for some $y_{1,x},y_{2,x}$ between $0$ and $x$ (in particular, $y_{\ell,x}\in (-\delta,\delta)$).
\end{lemma}
\begin{proof}
We make the change of variables $x\mapsto x+\mu$ in \eqref{defineint} to rewrite the integral as
\begin{equation*
\int_{-\infty}^{\infty}\frac{e^{-\frac{\pi x^2}{4Mk\alpha_j z}}}{x-(1+i\varepsilon)\mu} dx
=
\int_{-\infty}^{\infty}\frac{e^{-\frac{\pi \left(x+\mu\right)^2}{4Mk\alpha_j z}}}{x-i\varepsilon\mu} dx.
\end{equation*}
We then split the integral into three pieces as
\[
\int_{-\infty}^{\infty} =\int_{-\delta}^{\delta} + \int_{\delta}^{\infty}+ \int_{-\infty}^{-\delta}=:\mathcal{I}_1+\mathcal{I}_2+\mathcal{I}_3.
\]
To evaluate $\mathcal{I}_1$, we note that by Taylor's Theorem, there exist $y_{1,x}$ and $y_{2,x}$ between $0$ and $x$ such that
\[
R_g(x)=R_g(0)+R_g'\!\left(y_{1,x}\right)x \qquad \text{ and }\qquad I_g(x)=I_g(0)+I_g'\!\left(y_{2,x}\right)x.
\]
Therefore
\[
g(x)= e^{-\frac{\pi\mu^2}{4Mk\alpha_jz}}+\left(R_g'\!\left(y_{1,x}\right) + i I_g'\!\left(y_{2,x}\right)\right)x.
\]
Thus
\begin{align}\nonumber
\lim_{\varepsilon\to 0^+}\mathcal{I}_1&=\lim_{\varepsilon\to 0^+}\int_{-\delta}^{\delta} \frac{e^{-\frac{\pi\mu^2}{4Mk\alpha_jz}}+\left(R_g'\!\left(y_{1,x}\right) + i I_g'\!\left(y_{2,x}\right)\right)x}{x-i\varepsilon\mu}dx\\
\label{eqn:I1split}& = \lim_{\varepsilon\to 0^+}e^{-\frac{\pi \mu^2 }{4Mk\alpha_jz}} \int_{-\delta}^{\delta} \frac{1}{x-i\varepsilon\mu }dx+ \int_{-\delta}^{\delta}\left( R_g'\!\left(y_{1,x}\right) + i I_g'\!\left(y_{2,x}\right) \right) dx.
\end{align}
The second term on the right-hand side of \eqref{eqn:I1split} is precisely the second term in the claim.
Evaluating the integral explicitly, the first term in \eqref{eqn:I1split} equals
\begin{equation}\label{eqn:Logs}
e^{-\frac{\pi \mu^2}{4Mk\alpha_jz}} \lim_{\varepsilon\to 0^+}\int_{-\delta}^{\delta}\frac{1}{x-i\varepsilon\mu}dx =e^{-\frac{\pi\mu^2}{4Mk\alpha_jz}}\lim_{\varepsilon\to 0^+}\left(\operatorname{Log}\left(\delta-i\varepsilon\mu\right)-\operatorname{Log}\left(-\delta-i\varepsilon\mu\right)\right).
\end{equation}
Here and throughout, $\operatorname{Log}$ denotes the principal branch of the complex logarithm.
We then evaluate, using the fact that $\mu\neq 0$,
\begin{align*}
\lim_{\varepsilon\to 0^+}
\operatorname{Log}\left(\delta-i\varepsilon
\mu
\right)&=\log(\delta),\\
\lim_{\varepsilon\to 0^+}
\operatorname{Log}\left(-\delta-i\varepsilon\mu\right)&=
\begin{cases}
\operatorname{Log}(-\delta)=\log(\delta) +\pi i&\text{if }
\mu
<0,\\
\operatorname{Log}(-\delta)-2\pi i=\log(\delta)-\pi i&\text{if }\mu>0.
\end{cases}
\end{align*}
Therefore \eqref{eqn:Logs} becomes
\[
\pi i \operatorname{sgn}(\mu)e^{-\frac{\pi\mu^2}{4Mk\alpha_jz}}.
\]
Since the paths of integration in $\mathcal{I}_2$ and $\mathcal{I}_3$ do not go through zero, we can plug in $\varepsilon=0$ to obtain
\begin{equation}\label{eqn:I2+I3}
\lim_{\varepsilon\to 0^+}\left(\mathcal{I}_2+\mathcal{I}_3\right) = \int_{\delta}^{\infty} \frac{1}{x}{e^{-\frac{\pi (x+\mu)^2}{4Mk\alpha_j z}}} dx + \int_{-\infty}^{-\delta} \frac{1}{x}{e^{-\frac{ \pi(x+
\mu
)^2 }{4Mk\alpha_j z}}} dx.
\end{equation}
Making the change of variables $x\mapsto -x$ in the second integral, we see that \eqref{eqn:I2+I3} becomes
\[
\int_{\delta}^{\infty} \frac{1}{x}e^{-\frac{\pi(x+\mu)^2}{4Mk\alpha_j z}}dx
-\int_{\delta}^{\infty} \frac{1}{x} e^{-\frac{ \pi(x-\mu)^2}{4Mk\alpha_j z}} dx
=\operatorname{sgn}(\mu)\sum_{\pm}\pm\int_{\delta}^{\infty}\frac{1}{x} e^{{-\frac{\pi\left(x\pm|
\mu
|\right)^2}{4Mk\alpha_jz}}}dx.\qedhere
\]
\end{proof}
\subsection{Asymptotics for $\mathcal{I}(\mu,k;z)$}
The main result in this subsection is the following approximation of $\mathcal{I}(\mu,k;z)$.
\begin{proposition}\label{prop:intbound}
If $1\leq k\leq N$ and $|\Phi|\leq \frac{1}{kN}$, then
for $0<\delta<\frac{|
\mu
|}{2}$ we have, for some $c>0$
\[
\mathcal{I}(\mu,k;z)=- \frac{2\sqrt{Mk\alpha_jz}}{\mu}+O\left(\frac{k^{\frac 32}|z|^{\frac 32}}{\mu^3}+\left(1 + \frac{|\mu|\delta}{k|z|}+\log\left(\frac{|\mu|}{\delta}\right)\right)e^{-\frac{c\mu^2}{k}\re{\frac{1}{z}}}\right).
\]
\end{proposition}
Before proving Proposition \ref{prop:intbound}, we approximate the third term from Lemma \ref{lem:inteval}. We set
$
A:=\frac{\pi\mu^2}{4Mk\alpha_j|z|}
$
and make the change of variables $x\mapsto |\mu|x$ to obtain that the third term in Lemma \ref{lem:inteval} equals
\begin{equation}\label{eqn:thirdterm2}
\operatorname{sgn}(\mu)\sum_{\pm}\pm \int_{\frac{\delta}{|\mu|}}^{\infty}\frac{1}{x} e^{-\frac{A|z|}{z}(x\pm 1)^2}dx.
\end{equation}
We split the integral at $x=\frac 12$. To approximate the contribution from $x\geq \frac{1}{2}$, we define for $d\in\mathbb N_0$
\begin{equation}\label{eqn:Jddef}
\mathcal{J}_{d,\pm}:=C_d\left(\frac{z}{2A|z|}\right)^{d-1}\int_{\frac{1}{2}}^{\infty} \frac{1}{x^d}e^{-A\frac{|z|}{z} (x\pm 1)^2} dx,
\end{equation}
where
\begin{equation*}
C_d:= \begin{cases} (d-1)!&\text{if }d\geq1,\\ 1&\text{if }d=0.\end{cases}
\end{equation*}
Note that $\mathcal{J}_{1,\pm}$ is the contribution from $x\geq \frac{1}{2}$ to the integral in \eqref{eqn:thirdterm2}. The following trivial bound for
$\mathcal{J}_{d,\pm}$ follows immediately
by bringing the absolute value inside the integral.
\begin{lemma}\label{lem:Jbndtrivial}
For $d\in\mathbb N_0$, we have
\[
\left|\mathcal{J}_{d,\pm}\right|\leq \frac{2\sqrt{\pi}C_d A^{\frac{1}{2}-d}}{\sqrt{|z|\re{\frac{1}{z}}}}.
\]
\end{lemma}
To obtain a better approximation for $\mathcal{J}_{d,\pm}$, we next relate
$\mathcal{J}_{d,\pm}$
with
$\mathcal{J}_{d+1,\pm}$ and $\mathcal{J}_{d-1,\pm}$.
\begin{lemma}\label{lem:Jdtrick}
For $d\in\mathbb N$, we have
\[
\mathcal{J}_{d,\pm} =\mp\left(
-(d-1)!
\left(\frac{z}{A|z|}\right)^{d} e^{-\frac{A|z|}{z}\left(\frac{1}{2}\pm 1\right)^2} +\mathcal{J}_{d+1,\pm} +
\max(d-1,1)
\frac{z}{2A|z|}\mathcal{J}_{d-1,\pm}\right).
\]
\end{lemma}
\begin{proof}
We first rewrite
\begin{equation}\label{eqn:Jdtrick}
\mathcal{J}_{d,\pm} = \mathcal{J}_{d,\pm} \pm \frac{C_{d}}{C_{d-1}} \frac{z}{2A|z|}\mathcal{J}_{d-1,\pm}\mp \frac{C_{d}}{C_{d-1}} \frac{z}{2A|z|}\mathcal{J}_{d-1,\pm}.
\end{equation}
Using integration by parts, the first two terms in \eqref{eqn:Jdtrick} equal
\begin{equation*}
\pm C_d\left(\frac{z}{2A|z|}\right)^{d-1}\int_{\frac{1}{2}}^{\infty}\frac{1}{x^d}{(x\pm 1)}e^{-A\frac{|z|}{z} (x\pm 1)^2}dx=\pm C_d\left(\frac{z}{A|z|}\right)^{d} e^{-\frac{A|z|}{z}\left(\frac{1}{2}\pm 1\right)^2} \mp \mathcal{J}_{d+1,\pm}.
\end{equation*}
Plugging back into \eqref{eqn:Jdtrick} and using $C_d=(d-1)!$ and $\frac{C_{d}}{C_{d-1}}=\max(d-1,1)$ yields the claim.
\end{proof}
We also require an approximation for $\mathcal{J}_{0,\pm}$.
\begin{lemma}\label{lem:J0eval}
There exists $c>0$ such that
\[
\mathcal{J}_{0,\pm} =2\delta_{\pm 1=-1} \sqrt{\frac{\pi A|z|}{z}}+O\left(\frac{\sqrt{A} e^{-c A|z|\re{\frac{1}{z}}}}{\sqrt{|z|\re{\frac{1}{z}}}}\right).
\]
\end{lemma}
\begin{proof}
We first make the change of variables $x\mapsto x\mp 1$ in \eqref{eqn:Jddef} to obtain that
\[
\mathcal{J}_{0,\pm}=\frac{2A|z|}{z}\int_{\frac{1}{2}\pm 1}^{\infty}e^{-\frac{A|z|}{z}x^2}dx.
\]
For $\pm 1=-1$, we rewrite this as
\begin{align*}
\mathcal{J}_{0,-}&=\frac{2A|z|}{z}\left(\int_{-\infty}^{\infty}e^{-\frac{A|z|}{z}x^2}dx-\int_{\frac{1}{2}}^{\infty}e^{-\frac{A|z|}{z}x^2}dx\right)
\\&=\frac{2A|z|}{z}\int_{-\infty}^{\infty}e^{-\frac{A|z|}{z}x^2}dx+O\left(A\int_{\frac{1}{2}}^{\infty}e^{-A|z|\re{\frac{1}{z}} x^2}dx\right).
\end{align*}
Hence we have
\[
\mathcal{J}_{0,\pm}=2\delta_{\pm 1=-1} \frac{A|z|}{z}\int_{-\infty}^{\infty}e^{-\frac{A|z|}{z}x^2}dx+O\left(A\int_{1\pm \frac{1}{2}}^{\infty}e^{-A|z|\re{\frac{1}{z}} x^2}dx\right).
\]
Noting that $\operatorname{Re}(\frac{1}{z})>0$, we then bound
\begin{align*}
\int_{1\pm \frac{1}{2}}^{\infty}e^{-A|z|\re{\frac{1}{z}} x^2}dx&\leq
\frac{\sqrt{\pi}e^{-\frac{1}{4}A|z|\re{\frac{1}{z}}}}{2\sqrt{A|z|\re{\frac{1}{z}}}}.
\end{align*}
The claim follows, evaluating
\[
\int_{-\infty}^{\infty} e^{-\frac{A|z|}{z} x^2} dx = \sqrt{\frac{\pi z}{A |z|}}. \qedhere
\]
\end{proof}
\noindent
We next combine Lemmas \ref{lem:Jdtrick} and \ref{lem:J0eval} to obtain an approximation for $J_{1,\pm}$. To compare the asymptotic growth of different terms, we note that by \eqref{eqn:PhiBound} and the fact that $k\leq N$
\begin{align}\label{realbound}
\sqrt{\frac{\re{\frac{1}{z}}}{k}}&=\frac{1}{kN\sqrt{\frac{1}{N^4}+\Phi^2}}\geq \frac{1}{\sqrt{2}},\\
\label{eqn:k|z|bound}
\frac{k^2}{N^2}&\leq k|z|=k^2\left(\frac{1}{N^4}+\Phi^2\right)^{\frac{1}{2}}\leq \sqrt{2}.
\end{align}
\begin{lemma}\label{lem:J1bnd}
If $1\leq k\leq N$ and $|\Phi|<\frac{1}{kN}$, then we have
\[
\mathcal{J}_{1,\pm}=
\delta_{\pm 1 =-1}
\sqrt{\frac{\pi z}{A|z|}}+O\left(A^{-\frac{3}{2}}+e^{-cA|z|\re{\frac{1}{z}}}\right).
\]
\end{lemma}
\begin{proof}
By Lemma \ref{lem:Jdtrick} with $d=1$, we have
\begin{equation*}\label{eqn:J1evalstart}
\mathcal{J}_{1,\pm} =\mp \left(-\frac{z}{A|z|} e^{-\frac{A|z|}{z}\left(\frac{1}{2}\pm 1\right)^2} +\mathcal{J}_{2,\pm} + \frac{z}{2A|z|}\mathcal{J}_{0,\pm}\right).
\end{equation*}
We then plug in Lemma \ref{lem:Jdtrick}
again twice (once with $d=2$ and then once with $d=1$)
to obtain that
\begin{align*}
\nonumber
\mathcal{J}_{1,\pm}
&
=\mp\Bigg( \left(-\frac{z}{A|z|} +\left(-\frac{1}{2}\pm 1\right)\left(\frac{z}{A|z|}\right)^2\right) e^{-\frac{A|z|}{z}\left(\frac{1}{2}\pm 1\right)^2} \mp \mathcal{J}_{3,\pm}\\
\label{eqn:J1eval3}
&\hspace{2.5in}+ \frac{z}{2A|z|} \mathcal{J}_{2,\pm} +\left(\frac{z}{2A|z|}+\left(\frac{z}{2A|z|}\right)^2\right)\mathcal{J}_{0,\pm}\Bigg).
\end{align*}
The first term can be bounded against
\[
O\left(\left(\frac{1}{A}+\frac{1}{A^2}\right)e^{-c A|z|\re{\frac1\tau}}\right)=O\left(\frac{1}{A}e^{-c A|z|\re{\frac{1}{z}}}\right),
\]
using that $A\gg 1$ by \eqref{eqn:k|z|bound}. Moreover, by Lemma \ref{lem:Jbndtrivial}, we have
\[
\left|\mathcal{J}_{3,\pm}\right|,\
\frac{z}{2A|z|} \left|\mathcal{J}_{2,\pm}\right|
\ll \frac{A^{-2}}{\sqrt{A|z|\re{\frac{1}{z}}}}.
\]
For the terms with $\mathcal{J}_{0,\pm1}$, we use Lemma \ref{lem:J0eval} to approximate these by
\begin{align*}
\mp \delta_{\pm 1=-1}\sqrt{\frac{\pi z}{A|z|}}+O\left(A^{-\frac 32}+
\frac{e^{-cA|z|\re{\frac 1z}}}{\sqrt{A|z|\re{\frac{1}{z}}}}\right).
\end{align*}
Noting that $\mp \delta_{\pm 1=-1}=\delta_{\pm 1=-1}$, this gives
\[
\mathcal{J}_{1,\pm}=\delta_{\pm 1=-1}\sqrt{\frac{\pi z}{A|z|}} +O\left(A^{-\frac{3}{2}} + \left(\frac{1}{A}+\frac{1}{\sqrt{A|z|\re{\frac{1}{z}}}}\right)e^{-c A|z|\re{\frac{1}{z}}} + \frac{A^{-2}}{\sqrt{A|z|\re{\frac{1}{z}}}}\right).
\]
We then use \eqref{realbound} and the trivial bound $|z|\operatorname{Re}(\frac{1}{z})\leq 1$ to compare the $O$-terms, obtaining
\[
\frac{A^{-2}}{\sqrt{A|z|\re{\frac{1}{z}}}}\ll A^{-\frac{3}{2}}\qquad\text{ and }\qquad \frac{1}{A}\ll \frac{1}{\sqrt{A|z|\re{\frac{1}{z}}}}\ll 1.
\]
This gives the claim.
\end{proof}
We are now ready to prove Proposition \ref{prop:intbound}.
\begin{proof}[Proof of Proposition \ref{prop:intbound}]
The first term in Lemma \ref{lem:inteval} yields the second error term in Proposition \ref{prop:intbound}. For the second term in Lemma \ref{lem:inteval}, we note that
\begin{align*}
R_g(y)&=e^{-\frac{\pi (y+\mu)^2}{4Mk\alpha_j}\re{\frac{1}{z}}}\cos\left(-\frac{\pi(y+\mu)^2}{4Mk\alpha_j}\mathrm{Im}\hspace{-.1cm}\left(\frac 1z\right)\right)\\
I_g(y)&=e^{-\frac{\pi (y+\mu)^2}{4Mk\alpha_j}\re{\frac{1}{z}}}\sin\left(-\frac{\pi(y+\mu)^2}{4Mk\alpha_j}\mathrm{Im}\hspace{-.1cm}\left(\frac 1z\right)\right)
\end{align*}
and then explicitly take the derivatives and bound $|\mathrm{Re}(z)|<|z|$, $|\mathrm{Im}(z)|<|z|$, and the absolute value of the sines and cosines that occur against $1$. This yields
\[
\left|R_g'\left(y_{1,x}\right)+iI_g'\left(y_{2,x}\right)\right|\leq \frac{\pi}{Mk\alpha_j|z|}\sum_{\ell=1}^2 \left|y_{\ell,x}+\mu\right|e^{-\frac{\pi (y_{\ell,x}+\mu)^2}{4Mk\alpha_j}\re{\frac{1}{z}}}.
\]
To bound the right-hand side, we use $y_{\ell,x}<\delta<\frac{|\mu|}{2}$ to conclude that $\frac{|\mu|}{2}\leq |y_{\ell,x}+\mu|\leq \frac{3|\mu|}{2}$. Noting that $\operatorname{Re}(\frac{1}{z})>0$ yields that the second term in Lemma \ref{lem:inteval} contributes the third error term in Proposition \ref{prop:intbound}. We rewrite the third term in Lemma \ref{lem:inteval} as in \eqref{eqn:thirdterm2} and split the integral in \eqref{eqn:thirdterm2} at $\frac{1}{2}$. For $\frac{\delta}{|\mu|}\leq x\leq \frac{1}{2}$, we bring the absolute value inside and note that for $x\leq \frac{1}{2}$ we have $|x\pm 1|\geq \frac{1}{2}$ to bound
\begin{equation}\label{eqn:smallxintparts}
\int_{\frac{\delta}{|\mu|}}^{\frac{1}{2}} \frac{1}{x}e^{-\frac{A|z|}{z} (x\pm 1)^2}dx\leq e^{-\frac{A|z|}{4} \re{\frac{1}{z}}}\int_{\frac{\delta}{|\mu|}}^{\frac{1}{2}} \frac{1}{x} dx \ll \left( 1+\log\left(\frac{\delta}{|\mu|}\right)\right)e^{-\frac{A|z|}{4} \re{\frac{1}{z}}}.
\end{equation}
We next turn to the contribution from $x\geq \frac 12$. By Lemma \ref{lem:J1bnd}, we have \begin{equation}\label{eqn:pluginJ0}
\operatorname{sgn}(\mu)\sum_{\pm}\pm\mathcal{J}_{1,\pm}=-\operatorname{sgn}(\mu)\sqrt{\frac{\pi z}{A|z|}} +O\left(A^{-\frac{3}{2}} + e^{-c A|z|\re{\frac{1}{z}}}\right).
\end{equation}
As noted below \eqref{eqn:Jddef}, $\mathcal{J}_{1,\pm}$ is precisely the contribution from $x\geq \frac{1}{2}$ to the integral in \eqref{eqn:thirdterm2}. Therefore, combining \eqref{eqn:pluginJ0} with \eqref{eqn:smallxintparts} yields
\[
\operatorname{sgn}(\mu)\sum_{\pm}\pm\int_{\frac{\delta}{|\mu|}}^{\infty} \frac{1}{x}e^{-\frac{A|z|}{z}(x\pm 1)^2}dx = -\operatorname{sgn}(\mu)\sqrt{\frac{\pi z}{A|z|}} +O\left(A^{-\frac{3}{2}} + \left(1+\log\left(\frac{\delta}{|\mu|}\right)\right) e^{-c A|z|\re{\frac{1}{z}}}\right).
\]
Plugging in $A=\frac{\pi \mu^2}{4Mk\alpha_j|z|}$ gives that this equals
\begin{align*}
-\frac{2\sqrt{Mk\alpha_j z}}{\mu} +O\left(\frac{k^{\frac 32}|z|^{\frac 32}}{|\mu|^3}+\left(1+\log\left(\frac{\delta}{|\mu|}\right)\right)e^{-\frac{c\mu^2}{k}\re{\frac{1}{z}}}\right),
\end{align*}
where the value of $c$ is changed from the previous line.
These correspond to the main term and the first, second, and fourth error terms in Proposition \ref{prop:intbound}.
\end{proof}
We directly obtain the following corollary by choosing $\delta:=\frac{k|z|}{2\sqrt{2}|\mu|}$ in Proposition \ref{prop:intbound}.
\begin{corollary}\label{cor:intbound}
We have, for some $c>0$
\[
\mathcal{I}(\mu,k;z)=- \frac2{\sqrt{Mk\alpha_jz}}{\mu}+O\left(\frac{k^{\frac 32}|z|^{\frac 32}}{|\mu|^{3}}+\log\left(\frac{\mu^2}{k|z|}\right)e^{-\frac{c\mu^2}{k}\re{\frac{1}{z}}}\right).
\]
\end{corollary}
\subsection{Summing $\mathcal{I}(\mu,k;z)$}
We next approximate the sum over $\nu$ in the second term of Lemma \ref{lem:Fmodular}.
\begin{lemma}\label{lem:intsumbound}
There exists $c>0$ such that for all $0<k\leq N$ and $\ell\in\mathcal{L}_{Mk}$ we have
\begin{align}
\label{eqn:intsumboundmain}
\sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm} \mathcal{I}\left(\ell\pm 2Mk\nu,k;z\right)&=-\pi \sqrt{\tfrac{\alpha_jz}{Mk}}\cot\left(\tfrac{\pi\ell}{2Mk}\right)\!+\! O\left(\tfrac{k^{\frac{3}{2}}|z|^{\frac{3}{2}}}{|\ell|^3}\right)\!+\!O\left(\log(k|z|)e^{-\frac{c\ell^2}{k}\re{\frac{1}{z}}}\right)\\
\label{eqn:intsumboundO2}
&=O\left(\tfrac{\sqrt{k|z|}}{|\ell|}+\log(k|z|)e^{-\frac{c\ell^2}{k}\re{\frac{1}{z}}}\right)\\
\label{eqn:intsumboundO3}
&=O\left(\tfrac{n^{\varepsilon}}{|\ell|}\right).
\end{align}
\end{lemma}
\begin{remark}
Note that the first term on the right-hand side
of \eqref{eqn:intsumboundmain}
is always finite because $1-Mk\leq\ell \leq Mk$ with $\ell\neq 0$ implies that the parameter is never an integer multiple of $\pi$.
\end{remark}
\begin{proof}[Proof of Lemma \ref{lem:intsumbound}]
Plugging Corollary \ref{cor:intbound} with $\mu=\ell\pm 2Mk\nu$ into the left-hand side of Lemma \ref{lem:intsumbound} and using
\begin{equation*} \label{415}
\pi \cot(\pi x) = \lim\limits_{N \rightarrow \infty} \left(\frac{1}{x} + \sum_{n=1}^{N} \left(\frac{1}{x+n}+\frac{1}{x-n}\right)\right),
\end{equation*}
the main term in \eqref{eqn:intsumboundmain} becomes the claimed main term.
To obtain \eqref{eqn:intsumboundmain}, we are left to bound the error terms. Note that since
$1-Mk\leq \ell \leq Mk$ (with $\ell\neq 0$), we have $\frac{2Mk}{|\ell|}\geq 2$. We conclude that since $|\frac{2Mk}{\ell}\nu-1|\geq 2\nu-1\geq \nu$ for $\nu\geq 1$, the sum of the first $O$-term in Corollary \ref{cor:intbound} is
\[
\sideset{}{^*}{\sum}_{\nu\geq 0}\sum_{\pm} \frac{1}{|\ell\pm 2Mk\nu|^3}\leq \frac{1}{|\ell|^3}+ \frac{2}{|\ell|^3} \sum_{ \nu\geq 1} \frac{1}{\nu^3}\ll \frac{1}{|\ell|^3},
\]
yielding the first error-term in the lemma.
For the final error-term, we write
\begin{multline}\label{eqn:absconv}
\sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm}\log\left(\frac{|\ell\pm 2Mk\nu|^2}{k|z|}\right)e^{-\frac{c(\ell\pm 2Mk\nu)^2}{k}\re{\frac{1}{z}}}\\
=-\log\left(k|z|\right)\sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm} e^{-\frac{c(\ell\pm 2Mk\nu)^2}{k}\re{\frac{1}{z}}} +2 \sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm}\log\left(|\ell\pm 2Mk\nu|\right) e^{-\frac{c(\ell\pm 2Mk\nu)^2}{k}\re{\frac{1}{z}}}.
\end{multline}
Since $1-Mk\leq \ell\leq Mk$, we have $d:=|\ell\pm 2Mk\nu|\geq |\ell|$ for every $\nu$ and the terms in all sums in \eqref{eqn:absconv} are non-negative. Hence we may bound \eqref{eqn:absconv} against a constant multiple of
\begin{align*}
e^{-\frac{c\ell^2}{2k}\re{\frac{1}{z}}}\log(k|z|)\sum_{d\geq |\ell|}e^{-\frac{cd^2}{2\sqrt{2}}} + e^{-\frac{c\ell^2}{2k}\re{\frac{1}{z}}}\sum_{d\geq |\ell|}\log(d) e^{-\frac{cd^2}{2\sqrt{2}}}.
\end{align*}
Each of the sums is absolutely convergent and may be bounded by the sum with $|\ell|=1$, giving a uniform bound independent of $\ell$. The first term is dominant because $\log(k|z|)\gg 1$,
yielding \eqref{eqn:intsumboundmain}.
\noindent The approximation \eqref{eqn:intsumboundO2} follows by showing that
\begin{align*}
\label{eqn:errortomain1}
\frac{k^{\frac{3}{2}}|z|^{\frac{3}{2}}}{|\ell|^3}, \qquad
\sqrt{\frac{|z|}{k}}\left|\cot\left(\frac{\pi \ell}{2Mk}\right)\right|\ll \frac{\sqrt{k|z|}}{\ell}.
\end{align*}
Finally \eqref{eqn:intsumboundO3} follows by \eqref{realbound}, \eqref{eqn:k|z|bound}, and \eqref{eqn:intsumboundO2}.
\end{proof}
\section{Proof of Theorem \ref{thm:rNrZ}}\label{sec:CircleMethod}
\subsection{Kloosterman's Fundamental Lemma}
To describe Kloosterman's Fundamental Lemma \cite[Lemma 6]{Kloosterman}, we note that for each $
0\leq h
<k$
with $\gcd(h,k)=1$,
there exists a unique $\varrho(h)=\varrho_{k}(h)$ with $0<\varrho(h)\leq k$ for which
\begin{equation*}\label{cong}
h\left(N+\varrho(h)\right)\equiv -1\pmod{k}.
\end{equation*}
\begin{lemma}\label{lem:KloostermanFundamental}
For any $\bm{\nu}\in\mathbb Z^4$, $k\in\mathbb N$, $0<\varrho< k$, and $n\in\mathbb Z$, we have
\[
\left|\sum_{\substack{
0\leq h
<k\ \\ \gcd(h,k)=1\\
\varrho(h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}} \prod_{j=1}^{4} G(2M\alpha_jh,\nu_j;k)\right|=O\left(k^{2+\frac{7}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{4}}\right).
\]
Here the $O$-constants is absolute (and in particular independent of $\bm{\nu}$ and $\varrho$).
\end{lemma}
One obtains the value of $\varrho(h)$ by \eqref{eqn:adjacent} and \eqref{eqn:varrhojbnd}.
\begin{lemma}\label{lem:rhoh}
We have
\[
\varrho(h) =\varrho_{k,1}(h).
\]
\end{lemma}
\subsection{Setting up the Circle Method}
Fix $J\subseteq\{1,2,3,4\}$ and write $F(q):=F_{r,M,\bm{\alpha},J}(q)$.
By Cauchy's Theorem, we have
\begin{equation*}
c(n):=c_{r,M,\bm{\alpha},J}(n)=\frac{1}{2\pi i}\int_{\mathcal{C}}\frac{F(q)}{q^{n+1}}dq,
\end{equation*}
where $\mathcal{C}$ is an arbitrary path inside the unit circle that loops around zero in the counterclockwise direction. We choose the circle with radius $e^{-\frac{2\pi}{N^2}}$ with $N:=\lfloor\sqrt{n} \rfloor$ and the parametrization $q=e^{-\frac{2\pi}{N^2}+2\pi i t}$ with $0\leqslant t\leqslant 1$. Thus
\begin{equation*}
c(n)=\int_{0}^{1}F\left(e^{-\frac{2\pi}{N^2}+2\pi i t}\right)e^{\frac{2\pi n}{N^2}-2\pi i n t} dt.
\end{equation*}
Decomposing the path of integration along the Farey arcs $-\vartheta'_{h,k}\leqslant \Phi \leqslant \vartheta^{''}_{h,k}$ with $\Phi=t-\frac{h}{k}$,
\begin{equation}\label{eqn:c(n)}
c(n)=\sum_{\substack{0\leqslant h<k\leqslant N\\ \gcd(h,k)=1}}
e^{-\frac{2\pi i n h}{k}}\int_{-\vartheta'_{h,k}}^{\vartheta^{''}_{h,k}} F\left(e^{\frac{2\pi i}{k}(h+iz)}\right)e^{\frac{2\pi n z}{k}} d\Phi,
\end{equation}
where $z=k(\frac{1}{N^2}-i\Phi)$ as above.
Since for $J=\{1,2,3,4\}$ we may use Lemma \ref{lem:mainterm}, we consider the case that $J\neq \{1,2,3,4\}$. For $1\leq\ell \leq 4$, $\bm{ \nu}\in\mathbb N_0^4$, $\bm{ \lambda}\in \mathcal{L}_{Mk}^4$, and $\bm{ \varepsilon}\in\{\pm\}^4$, set
\begin{align*}
\mathcal{I}_{\bm{ \nu},\bm{ \lambda},\bm{ \varepsilon},\ell}(z)&=\mathcal{I}_{\bm{ \nu},\bm{\lambda},\bm{\varepsilon},\ell,M,k}(z):=\begin{cases}
\frac{1 }{2Mk-1}&\text{if }\ell\in J,\\
\frac{\varepsilon_{\ell} }{2Mk-1}&\text{if }\ell\notin J\text{ and }\nu_{\ell}\neq 0,\\
\displaystyle{\sideset{}{^*}\sum_{\nu\geq 0}\sum_{\pm}}\mathcal{I}( \lambda_{\ell} \pm 2Mk \nu,k;z)&\text{if }\ell\notin J \text{ and }\nu_{\ell}=0,
\end{cases} \\
d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},\ell}&:=\varepsilon_{\ell} \nu_{\ell}+\delta_{\nu_{\ell}=0}\delta_{\ell\notin J} \lambda_{\ell}.
\end{align*}
\noindent
By Lemmas \ref{lem:thetatrans} and \ref{lem:Fmodular}, we have
\begin{align}\label{eqn:expandnus}
&16M^2 F\left(e^{{\frac{2\pi i}{k}(h+iz)}}\right)\prod_{j=1}^{4}\sqrt{\alpha_j}\\
& \notag =\frac{e^{\frac{\pi z r^2}{Mk}\sum_{j=1}^4\alpha_j}}{k^2z^2}\sideset{}{^*}\sum_{\bm{\nu}\in \mathbb N_0^4}\sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}\sum_{\bm{\varepsilon}\in\{\pm\}^4} \prod_{j=1}^{4} e^{-\frac{\pi \nu_j^2}{4Mk\alpha_{j} z}+\varepsilon_j\frac{\pi i r \nu_j}{Mk}}G\!\left(2M\alpha_j h,2r\alpha_jh+d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j};k\right)\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z).
\end{align}
Plugging \eqref{eqn:expandnus} back into \eqref{eqn:c(n)}, we see that the contribution to $c(n)$ from the term $\bm{\nu}\in\mathbb N_0^4$ is $\frac{1}{16M^2\prod_{j=1}^4\sqrt{\alpha_j}} \frac{1}{2^{\sum_{j=1}^4\delta_{\nu_j=0}}}$ times
\begin{align*}
\bm{I}_{\bm{\nu}}(n)=\bm{I}_{\bm{\nu},\bm{\alpha},M,J}(n):=&
\sum_{\substack{0\leq h<k\leq N \\ \gcd(h,k)=1}} \frac{e^{-\frac{2\pi i n h}{k}}}{k^2}\sum_{\bm{\lambda}\in\mathcal{L}_{Mk}^4}\sum_{\bm{\varepsilon}\in\{\pm\}^4}\prod_{j=1}^4 e^{\varepsilon_j\frac{\pi i r \nu_j}{Mk}}G\!\left(2M\alpha_j h,2r\alpha_jh+d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}
;k\right)
\\
&\times \int_{-\vartheta'_{h,k}}^{\vartheta''_{h,k}} \frac{1}{z^2}e^{\frac{2\pi}{k} \left(n+\frac{r^2}{2M}\sum_{j=1}^4\alpha_j\right)z -\sum_{j=1}^4\frac{\pi \nu_j^2}{4Mk\alpha_jz}}\prod_{j=1}^4
\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)
d\Phi.
\end{align*}
\subsection{Bounding $\sum_{\bm{\nu}\in\mathbb N_0^4\setminus\{\bm{0}\}}\bm{I}_{\bm{\nu}}(n)$}\label{sec:nointegral}
The following lemma proves useful for bounding the sum of $\bm{I}_{\bm{\nu}}(n)$ with $\bm{\nu}\neq \mathbf{{0}}$.
\begin{lemma}\label{lem:CircleNoIntegral}
Suppose that $0\leq \varrho_1\leq \varrho_2\leq \infty$, $c>0$, and for each $0<k\leq N$ let a subset $\Lambda_k\subseteq \mathbb Z^4\setminus \{\bm{0}\}$ be given. Then, with $\|\bm{\nu}\|^2:=\sum_{1\leq j\leq 4} \nu_j^2$,
\begin{align*}
\sum_{0<k\leq N} \frac{1}{k^2}
\sum_{\bm{\nu}\in \Lambda_k}\sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}
\prod_{j=1}^4\frac{1}{\lambda_j}
&\sum_{\bm{\varepsilon}\in \{\pm\}^4}
\sum_{\varrho=\varrho_1}^{\varrho_2} \int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}\frac{1}{|z|^2}e^{-c\|\bm{\nu}\|^2 \frac{\re{\frac{1}{z}}}{k}} d\Phi \\
&\times\left|\sum_{\substack{0<h<k\\ \gcd(h,k)=1\\ \varrho(h)\leq \varrho }} e^{-\frac{2\pi inh}{k}} \prod_{j=1}^4 G\!\left(2M\alpha_jh,2\alpha_j h\pm
d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j};k\right)\right| \ll n^{\frac{15}{16}+\varepsilon}.
\end{align*}
\end{lemma}
\begin{proof}
We first use
Lemma \ref{lem:KloostermanFundamental}
and the fact that
\begin{equation}\label{eqn:lambdasum}
\sum_{\lambda_j\in\mathcal{L}_{Mk}}\frac{1}{\lambda_j} \ll \log(k)\ll k^{\varepsilon}.
\end{equation}
Uniformly bounding against the cases $\varrho_1=0$ and $\varrho_2=\infty$ in the lemma, the left-hand side of the lemma may be bounded against
\begin{equation}\label{eqn:CircleAfterFundamental}
\ll
\sum_{0<k\leq N} k^{\frac{7}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{4}}
\sum_{\bm{\nu}\in \Lambda_k}
\int_{0}^{\frac{1}{kN}}\frac{1}{|z|^2}e^{ -c\|\bm{\nu}\|^2\frac{ \re{\frac{1}{z}}}{k}}d\Phi.
\end{equation}
\noindent
By assumption, for every $\bm{\nu}\in \Lambda_k$ we have $\|\bm{\nu}\|\geq 1$ and using \eqref{realbound} we obtain that \eqref{eqn:CircleAfterFundamental} may be bounded against
\begin{equation}\label{eqn:CircleAfterFundamental2}
\ll \sum_{0<k\leq N} k^{\frac{7}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{4}}
\sum_{\bm{\nu}\in \Lambda_k}e^{-\frac{c}{4}\|\bm{\nu}\|^2}
\int_{0}^{\frac{1}{kN}}\frac{1}{|z|^2}e^{ -\frac{c}{2}\frac{ \re{\frac{1}{z}}}{k}}d\Phi.
\end{equation}
It remains to show that \eqref{eqn:CircleAfterFundamental2} is $O(n^{\frac{15}{16}+\varepsilon})$.
Since $\Lambda_k\subseteq\mathbb Z^4\setminus \{\bm{0}\}$, we may bound the sum over $\bm{\nu}$ uniformly by
\[
\sum_{\bm{\nu}\in \Lambda_k} e^{-\frac{c}{4}\|\bm{\nu}\|^2}\leq \sum_{\bm{\nu}\in \mathbb Z^4\setminus\{\bm{0}\}} e^{-\frac{c}{4}\|\bm{\nu}\|^2}\ll 1.
\]
We then split the sum and integral in \eqref{eqn:CircleAfterFundamental2} into three pieces:
\begin{equation*}
\sum\nolimits_1 : \quad \sum_{0<k\leq N^{1-\ell}} \int_{0}^{\frac{1}{kN^{1+\ell}}} ,\qquad
\sum\nolimits_2 : \quad \sum_{0<k\leq N^{1-\ell}} \int_{\frac{1}{kN^{1+\ell}}}^{
\frac{1}{kN}
} ,\qquad
\sum\nolimits_3 : \quad \sum_{ N^{1-\ell}<k\leq N} \int_{0}^{\frac{1}{kN}}
\end{equation*}
for $\ell$ some (arbitrary small) number.
We first consider $\sum\nolimits_1$. Plugging $0<|\Phi|<\frac{1}{kN^{1+\ell}}$ into the right-hand side of the equality in \eqref{realbound}, we have
\begin{equation*}
\operatorname{Re}\left(\frac{1}{z}\right)> \frac{k N^{2\ell}}{2}.
\end{equation*}
Combining this with the first inequality in \eqref{eqn:k|z|bound},
the contribution from $\sum_1$ to \eqref{eqn:CircleAfterFundamental2} is $O(e^{-\frac{c}{8}N^{2\ell}})$.
We next turn to $\sum\nolimits_2$. Using
the fact $\operatorname{Re}(\frac{1}{z})>0$,
we bound
\begin{equation*}
\sum\nolimits_2\ll \sum_{0<k\leq N^{1-\ell}} k^{\frac{7}{8}+\varepsilon} \gcd(n,k)^{\frac{1}{4}} \int_{\frac{1}{kN^{1+\ell}}}^{\frac{1}{kN}}\frac{1}{|z|^2}d\Phi.
\end{equation*}
One can show that the integral is $O( \frac{N^{1+\ell}}{k})$, yielding
$
\sum\nolimits_2 \ll N^{\frac{15}{8}+\frac{\ell}{8}+\varepsilon}.
$
Choosing $\ell$ sufficiently small (depending on $\varepsilon$), we obtain $\sum\nolimits_2 = O( n^{\frac{15}{16}+\varepsilon} )$.
We finally turn to $\sum\nolimits_3$.
We bound, choosing $\ell \leq 8\varepsilon$
\begin{equation*}
\sum\nolimits_3 \ll N^2\sum_{ N^{1-\ell}<k\leq N} k^{-\frac{9}{8}+\varepsilon} \gcd(n,k)^\frac{1}{4}
\arctan\left(\frac{N}{k}\right)\ll n^{\frac{15}{16}+\varepsilon}. \qedhere
\end{equation*}
\end{proof}
We next bound the contribution from the sum over all $h$, $k$ of the terms $\bm{\nu}\neq \bm{0}$ from \eqref{eqn:expandnus}.
\begin{proposition}\label{prop:CircleNoIntegral}
If $J\neq \{1,2,3,4\}$, then
\[
\sideset{}{^*}\sum_{\bm{\nu}\in\mathbb N_0^4\setminus \{\bm{0}\}}\bm{I}_{\bm{\nu}}(n)=O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
\end{proposition}
\begin{proof}
Writing $k+k_j=N+\varrho_{k,j}(h)$ as in \eqref{eqn:rhohdef},
we split the integral in $\bm{I}_{\bm{\nu}}(n)$ as
\begin{equation}\label{eqn:thetasplit}
\int_{-\vartheta'_{h,k}}^{\vartheta''_{h,k}}=
\int_{-\frac{1}{k\left(N+\varrho_{k,1}(h)\right)}}^{0} +\int_{0}^{\frac{1}{k\left(N+\varrho_{k,2}(h)\right)}}
=\sum_{\varrho=\varrho_{k,1}(h)}^{\infty}
\int_{-\frac{1}{k(N+\varrho)}}^{-\frac{1}{k(N+\varrho+1)}}
+\sum_{\varrho=\varrho_{k,2}(h)}^{\infty}
\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}.
\end{equation}
\noindent
Interchanging the sums on $h$ and $\varrho$ for the first sum in \eqref{eqn:thetasplit}, its contribution to $\bm{I}_{\bm{\nu}}(n)$ equals
\begin{multline}\label{eqn:NoIntegralFirstSum1}
\sum_{0<k\leq N} \frac{1}{k^2}\sum_{\bm{\lambda} \in \mathcal{L}_{Mk}^4}\sum_{\bm{\varepsilon} \in\{\pm\}^4} e^{\frac{\pi i r}{Mk}\sum_{j=1}^4\varepsilon_j\nu_j} \sum_{\varrho=0}^{\infty}
\int_{-\frac{1}{k(N+\varrho)}}^{-\frac{1}{k(N+\varrho+1)}}\frac{1}{z^2} e^{\frac{2\pi}{k} \left(n+\frac{r^2}{2M}\sum_{j=1}^4\alpha_j\right)z -\sum_{j=1}^4\frac{\pi \nu_j^2}{4Mk\alpha_j z}}\\
\times \prod_{j=1}^4
\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)
d\Phi\sum_{\substack{0\leq h<k \\ \gcd(h,k)=1\\ \varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}}\prod_{j=1}^4
G\!\left(2M\alpha_jh,2\alpha_jh +d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j};k\right).
\end{multline}
Similarly, interchanging the sums over $h$ and $\varrho$ in the second sum in \eqref{eqn:thetasplit} and then applying Lemma \ref{lem:AdjacentNeighbours} yields a contribution to $\bm{I}_{\bm{\nu}}(n)$ of
\begin{multline}\label{eqn:NoIntegralSecondSum}
\sum_{0<k\leq N} \frac{1}{k^2}\sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}\sum_{\bm{\varepsilon}\in\{\pm\}^4} e^{\frac{\pi i r}{Mk}\sum_{j=1}^4\varepsilon_j\nu_j} \sum_{\varrho=0}^{\infty}
\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}\frac{1}{z^2} e^{\frac{2\pi}{k} \left(n+\frac{r^2}{2M}\sum_{j=1}^4\alpha_j\right)z -\sum_{j=1}^4\frac{\pi \nu_j^2}{4Mk\alpha_j z}}\\
\times \prod_{j=1}^4
\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)
d\Phi\sum_{\substack{0\leq h<k \\ \gcd(h,k)=1\\ \varrho_{k,1}(k-h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}}
\prod_{j=1}^4
G\!\left(2M\alpha_jh,2\alpha_jh +
d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}
;k\right).
\end{multline}
Making the change of variables $h\mapsto k-h$ in the inner sum, the inner sum becomes
\begin{equation*}\label{eqn:conjG}
\overline{\sum_{\substack{0\leq h<k\leq N \\ \gcd(h,k)=1\\ \varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}}\prod_{j=1}^{4}G\!\left(2M\alpha_jh,2\alpha_jh -d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}
;k\right)}.
\end{equation*}
We then take the absolute value inside all of the sums except the sum on $h$ in both \eqref{eqn:NoIntegralFirstSum1} and \eqref{eqn:NoIntegralSecondSum}. Noting that $|z|^2$ and $\operatorname{Re}(\frac{1}{z})$ are the same for $\Phi$ and $-\Phi$, we may make the change of variables $\Phi\mapsto -\Phi$ in \eqref{eqn:NoIntegralFirstSum1} to bound both \eqref{eqn:NoIntegralFirstSum1} and \eqref{eqn:NoIntegralSecondSum} against
\begin{multline}\label{eqn:NoIntegralFirstSum}
\ll \sum_{0<k\leq N}\frac{1}{k^2} \sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}\sum_{\bm{\varepsilon}\in \{\pm\}^4}
\sum_{\varrho=0}^{\infty}
\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}
\frac{1}{|z|^2} e^{\frac{2\pi}{k} \left(n+\frac{r^2}{2M}\sum_{j=1}^4\alpha_j\right)\re{z} -\sum_{j=1}^4\frac{\pi \nu_j^2}{4Mk\alpha_j}\re{\frac{1}{z}}} \\
\times \left|\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)\right|
d\Phi
\left|\sum_{\substack{0\leq h<k \\ \gcd(h,k)=1\\ \varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}}G\!\left(2M\alpha_jh,2\alpha_jh \pm d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j};k\right)\right|,
\end{multline}
\noindent where $\pm$ is chosen as ``$+$'' for \eqref{eqn:NoIntegralFirstSum1} and ``$-$'' for \eqref{eqn:NoIntegralSecondSum}.
\rm
We note that since $\operatorname{Re}(z)=\frac{k}{N^2}\sim \frac{k}{n}$, we have
\begin{equation}\label{eqn:trivialexponential}
e^{\frac{2\pi}{k}\left(n+\frac{r^2}{2M}\sum_{j=1}^{4} \alpha_j\right)\re{z}}\ll 1.
\end{equation}
We next bound $|\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)|$. In the case that $j\in J$ or $\nu_j\neq 0$, we trivially bound (using $\lambda_j\in\mathcal{L}_{Mk}$)
\[
\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)=\frac{1}{2Mk-1}<\frac{1}{|\lambda_j|}.
\]
If both $j\notin J$ and $\nu_j=0$, then we use \eqref{eqn:intsumboundO3} to bound
\begin{equation}\label{eqn:Itrivial}
\left|\mathcal{I}_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}(z)\right|
\ll \frac{n^{\varepsilon}}{|\lambda_j|}.
\end{equation}
Hence, setting $c:=\frac{\pi}{4M\min_{j}(|\alpha_j|)}$, \eqref{eqn:NoIntegralFirstSum} may be bounded against
\begin{multline*}
\ll n^{\varepsilon}
\sum_{0<k\leq N}\frac{1}{k^2}\sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}\prod_{j=1}^{4}\frac{1}{|\lambda_{j}|}\sum_{\bm{\varepsilon}\in \{\pm\}^4}
\sum_{\varrho=0}^{\infty}\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}\frac{1}{|z|^2} e^{-c \|\bm{\nu}\|^2\frac{\re{\frac{1}{z}}}{k}} d\Phi\\
\times \left|\sum_{\substack{0\leq h<k\leq N \\ \gcd(h,k)=1\\ \varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi i n h}{k}}
\prod_{j=1}^{4}
G\!\left(2M\alpha_jh,2\alpha_jh \pm
d_{\bm{\nu},\bm{\lambda},\bm{\varepsilon},j}
;k\right)\right|.
\end{multline*}
By Lemma \ref{lem:rhoh}, we have $\varrho(h)=\varrho_{k,1}(h)$.
Summing over $\bm{\nu}\in \mathbb N_0^4\setminus\{\bm{0}\}$, we may therefore use Lemma \ref{lem:CircleNoIntegral} with $\Lambda_k=\mathbb N_0^4\setminus\{\bm{0}\}$, $\varrho_1=0$, and $\varrho_2=\infty$ to conclude that $\sideset{}{^*_{\bm{\nu}\neq 0}}\sum \bm{I}_{\bm{\nu}}(n)$ is $O(n^{\frac{15}{16}+\varepsilon})$, giving the bound claimed in the proposition.
\end{proof}
\subsection{Bounding $\bm{I}_{\bm{0}}(n)$}
This subsection is devoted to bounding $\bm{I}_{\bm{0}}(n)$.
\begin{proposition}\label{prop:CircleConstantTerms}
If $J\neq \{1,2,3,4\}$, then
\[
\bm{I}_{\bm{0}}(n)=O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
\end{proposition}
\begin{proof}
As in the proof of Proposition \ref{prop:CircleNoIntegral}, we first split the sum as in \eqref{eqn:thetasplit} and interchange the sums on $h$ and $\varrho$ and then take the absolute value inside all of the sums other than the sum on $h$. Since $J\neq \{1,2,3,4\}$, without loss of generality we have $4\notin J$. For $1\leq j\leq 3$, we use \eqref{eqn:Itrivial} and we bound $\mathcal{I}_{\bm{0},\bm{\lambda},\bm{\varepsilon},4}(z)$ with \eqref{eqn:intsumboundO2}.
Plugging in \eqref{eqn:trivialexponential}, we hence obtain
\begin{multline}
\bm{I}_{\bm{0}}(n)\ll n^{\varepsilon}\sum_{0<k\leq N} \frac{1}{k^2} \sum_{\varrho=0}^{\infty}\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}\!\frac{1}{|z|^2
\sum_{\bm{\lambda}\in \mathcal{L}_{Mk}^4}\!O\left(\frac{\sqrt{k|z|}}{|\lambda_4|}+\log(k|z|)e^{-\frac{c\lambda_4^2\re{\frac{1}{z}}}{k}}\right)d \Phi\\
\times
\prod_{j=1}^3\frac{1}{|\lambda_j|}
\left| \sum_{\substack{0\leq h<k \\ \text{gcd}(h,k)=1\\
\varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi inh}{k}} \prod_{j=1}^{4} G\!\left(2M\alpha_jh, 2\alpha_j h\pm \delta_{j\notin J}\lambda_{j}
;k\right) \right|. \label{eqn:oneintegral2}
\end{multline}
Plugging in Lemma \ref{lem:rhoh}, the contribution to $\bm{I}_{\bm{0}}(n)$ from the first term in the $O$-constant in \eqref{eqn:oneintegral2} is bounded by
\[
\ll n^{\varepsilon}\hspace{-1pt}\sum_{0<k\leq N} \frac{1}{k^{\frac{3}{2}}} \sum_{\bm{\lambda}\in\mathcal{L}_{Mk}^4}\prod_{j=1}^4\frac{1}{|\lambda_j|}
\sum_{\varrho=0}^{\infty} \int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}
\hspace{-2pt} \frac{d\Phi}{|z|^{\frac{3}{2}}}
\left|\sum_{\substack{0\leq h<k \\ \gcd(h,k)=1\\
\varrho(h)\leq \varrho}} \hspace{-4pt} e^{-\frac{2\pi inh}{k}} \prod_{j=1}^{4} G\!\left(2M\alpha_jh, 2\alpha_j h\pm\delta_{j\notin J}\lambda_j;k\right)\right|.
\]
Using Lemma \ref{lem:KloostermanFundamental} and \eqref{eqn:lambdasum}, we can bound this against
\begin{align}\label{eqn:mainintbound}
\nonumber &\ll n^{\varepsilon} \sum_{0<k\leq N} k^{\frac{11}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{2}}
\sum_{\bm{\lambda}\in\mathcal{L}_{Mk}^4}\prod_{j=1}^4\frac{1}{|\lambda_j|}
\sum_{\varrho=0}^{\infty}
\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}
\frac{d\Phi}{|z|^{\frac{3}{2}}} \\
&\ll n^{\varepsilon} \sum_{0<k\leq N} k^{\frac{11}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{2}}
\int_{0}^{\frac{1}{kN}}
\frac{d\Phi}{|z|^{\frac{3}{2}}}.
\end{align}
We split the integral in \eqref{eqn:mainintbound} into the ranges $\Phi<\frac{1}{N^2}$ and $\Phi\geq \frac{1}{N^2}$. Using that for $\Phi\geq \frac{1}{N^2}$, we have $|z|^{\frac{3}{2}}\gg k^{\frac{3}{2}}\Phi^{\frac{3}{2}}$, the contribution from $\Phi\geq \frac{1}{N^2}$ to \eqref{eqn:mainintbound} may be bounded against
\[
\ll n^{\varepsilon}\sum_{0<k\leq N} k^{-\frac{1}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{2}}
\int_{\frac{1}{N^2}}^{\infty}
\Phi^{-\frac{3}{2}}d\Phi
\ll n^{\varepsilon} N\sum_{0<k<N} k^{-\frac{1}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{2}}.
\]
For $0<\Phi<\frac{1}{N^2}$, we use the trivial bound $|z|^{\frac{3}{2}}\gg \frac{k^{\frac{3}{2}}}{N^3}$,
to obtain that the contribution from $0<\Phi<\frac{1}{N^2}$ to \eqref{eqn:mainintbound} is
\[
\ll n^{\varepsilon} N\sum_{0<k\leq N} k^{-\frac{1}{8}+\varepsilon}\gcd(n,k)^{\frac{1}{2}}.
\]
Therefore \eqref{eqn:mainintbound} is $O(n^{\frac{15}{16}+\varepsilon})$.
We next consider the contribution to \eqref{eqn:oneintegral2} coming from the second $O$-term. Using \eqref{eqn:k|z|bound} to bound $\log(k|z|)\ll n^{\varepsilon}$, the contribution to \eqref{eqn:oneintegral2} from the second term in the $O$-constant is
\begin{align*}
\ll n^{\varepsilon}\sum_{0<k\leq N} \frac{1}{k^2}
\sum_{\bm{\lambda}\in\mathcal{L}_{Mk}^4}\prod_{j=1}^3\frac{1}{|\lambda_j|}\sum_{\bm{\varepsilon}\in \{\pm\}^4}
&\sum_{\varrho=0}^{\infty}
\int_{\frac{1}{k(N+\varrho+1)}}^{\frac{1}{k(N+\varrho)}}
\frac{1}{|z|^2} e^{-\frac{c \lambda_4^2\re{\frac{1}{z}}}{k}} d\Phi\\
& \times\left| \sum_{\substack{0\leq h<k \\ \text{gcd}(h,k)=1\\ \varrho_{k,1}(h)\leq \varrho}} e^{-\frac{2\pi inh}{k}} \prod_{j=1}^{4} G\!\left(2M\alpha_jh, 2\alpha_j h+\delta_{j\notin J}\lambda_j;k\right) \right| \ll n^{\frac{15}{16} + \varepsilon},
\end{align*}
using Lemma \ref{lem:CircleNoIntegral} with $\varrho_1=0$, $\varrho_2=\infty$, and $
\Lambda_k=\{(0\ 0\ 0\ \lambda_4)^T: \lambda_4\in \mathcal{L}_{Mk}\}$ yields that this may be bounded against $O(n^{\frac{15}{16}+\varepsilon}).$
\end{proof}
\subsection{Proof of Theorem \ref{thm:rNrZ}}
We are now ready to prove the main theorem.
\begin{proof}[Proof of Theorem \ref{thm:rNrZ}]
(1)
We first use Lemma \ref{lem:ThetaFalse}. If $M$ is odd, then we use the fact that
\begin{equation*}\label{eqn:ThetaModd}
\Theta_{r,M,\bm{\alpha}}^+(\tau)=\Theta_{2r,2M,\bm{\alpha}}^+\left(\frac{\tau}{4}\right).
\end{equation*}
Thus we may assume without loss of generality that $M$ is even. We deal with the terms from Lemma \ref{lem:ThetaFalse} termwise for each $J\subseteq\{1,2,3,4\}$.
Plugging Propositions \ref{prop:CircleNoIntegral} and \ref{prop:CircleConstantTerms} into \eqref{eqn:expandnus}, we conclude that for $J\neq \{1,2,3,4\}$ we have
\[
c_{r,M,\bm{\alpha},J}(n)=O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
Thus by Lemma \ref{lem:ThetaFalse}, we have
\[
s_{r,2M,\bm{\alpha}}\left(2Mn+r^2\sum_{1\leq j \leq 4}\alpha_j\right)= \frac{1}{16}c_{r,M,\bm{\alpha}}(n)+ O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
Plugging in Lemma \ref{lem:mainterm} (1) then yields
\[
s_{r,2M,\bm{\alpha}}\left(2Mn+r^2\sum_{1\leq j \leq 4}\alpha_j\right)= \frac{1}{16}s_{r,2M,\bm{\alpha}}^*\left(2Mn+r^2\sum_{1 \leq j \leq 4}\alpha_j\right)+ O\left(n^{\frac{15}{16}+\varepsilon}\right).
\]
Since
\[
s_{r,2M,\bm{\alpha}}(n)=s_{r,2M,\bm{\alpha}}^*(n)=0
\]
if $n\not\equiv r^2\sum_{j=1}^4\alpha_j\pmod{2M}$, the claim follows.
\rm
\noindent (2) By Lemma \ref{lem:rexactly}, we have
\[
r_{m,\bm{\alpha}}(n)=r_{m,\bm{\alpha}}^+(n)+O\left(n^{\frac{1}{2}+\varepsilon}\right).
\]
Lemma \ref{lem:r+s+rel} then yields
\[
r_{m,\bm{\alpha}}^+(n)=s_{m,2(m-2),\bm{\alpha}}\left(8(m-2)\left(n-\sum_{1\leq j \leq 4}\alpha_j\right)+m^2\sum_{1 \leq j \leq 4}\alpha_j\right).
\]
Thus by part (1) and Lemma \ref{lem:mainterm} we have
\begin{align*}
r_{m,\bm{\alpha}}^+(n)&=\frac{1}{16}s_{m,2(m-2),\bm{\alpha}}^*\left(8(m-2)\left(n-\sum_{1\leq j\leq 4}\alpha_j\right)+m^2\sum_{1\leq j \leq 4}\alpha_j\right)+O\left(n^{\frac{15}{16}+\varepsilon}\right)\\
&=\frac{1}{16}r_{m,\bm{\alpha}}^*(n)+ O\left(n^{\frac{15}{16}+\varepsilon}\right). \qedhere
\end{align*}
\end{proof}
\rm
\section{Proof of Corollary \ref{cor:hexagonal} and Corollary \ref{cor:hexagonal2}}\label{sec:Corollaries}
In this section, we prove Corollaries \ref{cor:hexagonal} and \ref{cor:hexagonal2}.
\begin{proof}[Proof of Corollary \ref{cor:hexagonal}]
By Theorem \ref{thm:rNrZ} (2), we have
\begin{equation}\label{eqn:hexagonal1}
r_{6,\bm{\alpha}}(n)=\frac{1}{16} r_{6,\bm{\alpha}}^*(n)+O\left(n^{\frac{15}{16}+\varepsilon}\right).
\end{equation}
Completing the square in the special case $\bm{\alpha}=(1,1,1,1)$, we obtain
\[
r_{6,(1,1,1,1)}^*(n)= s_{3,4,(1,1,1,1)}^*(8n+4).
\]
Note that by the change of variables $x_j\mapsto \varepsilon_j x_j$ with $\bm{\varepsilon}\in \{\pm\}^4$, we have
\[
s_{3,4,(1,1,1,1)}^*(8n+4)=\frac{1}{16}s_{1,2,(1,1,1,1)}^*(8n+4).
\]
Cho \cite[Example 3.3]{Cho} computed
\[
s_{1,2,(1,1,1,1)}^*(8n+4)=16 \sigma(2n+1).
\]
Thus
\[
r_{6,(1,1,1,1)}^*(n)= \sigma(2n+1).
\]
Plugging this back into \eqref{eqn:hexagonal1} yields the claim.
\end{proof}
We next prove Corollary \ref{cor:hexagonal2}.
\begin{proof}[Proof of Corollary \ref{cor:hexagonal2}]
Using \cite[Example 3.4]{Cho}, the argument is essentially identical to the proof of Corollary \ref{cor:hexagonal}, except that in this case it is not immediately obvious that the main term is always positive. For this we use multiplicativity to bound
\[
-\sum_{d\mid (8n+5)} \left(\frac{8}{d}\right) d\geq \varphi(8n+5)\gg n^{1-\varepsilon},
\]
where $\varphi$ denotes the Euler totient function.
\rm
\end{proof}
We finally prove Corollary \ref{cor:pentagonal}.
\begin{proof}[Proof of Corollary \ref{cor:pentagonal}]
By Theorem \ref{thm:rNrZ} (2), we have
\begin{equation}\label{eqn:pentagonal}
r_{5,(1,1,1,1)}(n)=\frac{1}{16} r_{5,(1,1,1,1)}^*(n)+O\left(n^{\frac{15}{16}+\varepsilon}\right).
\end{equation}
Completing the square, we obtain
\begin{equation}\label{eqn:rspentagonal}
r_{5,(1,1,1,1)}^*(n)= s_{5,6,(1,1,1,1)}^*(24n+4).
\end{equation}
Using \cite[Proposition 2.1]{Shimura}, it is not hard to show that the generating function $\Theta_{5,6,(1,1,1,1)}^*$ for $s_{5,6,(1,1,1,1)}^*$ is a modular form of weight two on $\Gamma_0(144)$.
We next claim that
\begin{equation}\label{eqn:Thetamin16split}
\Theta_{5,6,(1,1,1,1)}^*(\tau)= \frac{2}{3}E(4\tau)+\frac{1}{3}\eta^4(24\tau),
\end{equation}
where
\begin{align*}
E(\tau)&:=\sum_{n\equiv 1\pmod{6}} \sigma(n) q^n,& \eta(\tau)&:=q^{\frac{1}{24}}\prod_{n\geq 1}\left(1-q^n\right).
\end{align*}
For this we note first that $\tau\mapsto\eta^4(24\tau)$ is a cusp form of weight two on $\Gamma_0(144)$. We next recall that for a translation-invariant function $f$ with Fourier expansion
$
f(\tau)=\sum_{n\geq 0} c_f(v;n) q^n,
$
the \emph{quadratic twist of $f$ with a character $\chi$} is given by
\[
f\otimes \chi(\tau):=\sum_{n\geq 0} \chi(n) c_{f}(v;n) q^n.
\]
For $\delta\in\mathbb N$, one also defines the \emph{$V$-operator} and \emph{$U$-operator} by
\begin{equation*}
f\big| V_{\delta}(\tau):=\sum_{n\geq 0} c_{f}\left(\delta v;n\right)q^{\delta n},\qquad
f\big| U_{\delta}(\tau):=\sum_{n\geq 0} c_{f}\left(\frac{v}{\delta};\delta n\right)q^{n}.
\end{equation*}
A straightforward generalization of the proof for holomorphic modular forms (see \cite[Proposition 17 (b) of Section 3]{Koblitz} and \cite[Lemma 1]{LiWinnie}) yields that if $f$ satisfies weight $k\in\mathbb Z$ modularity on $\Gamma_0(N)$ and $\chi$ is a character with modulus $M$, then $f\otimes \chi$ satisfies weight $k$ modularity on $\Gamma_0(\operatorname{lcm}(N,M^2))$ with character $\chi^2$, $f|U_{\delta}$ satisfies weight $k$ modularity on
$\Gamma_0(\operatorname{lcm}(\frac{N}{\gcd(N,\delta)},\delta))$, and $f|V_{\delta}$ satisfies weight $k$ modularity on $\Gamma_0(\delta N)$.
Recall the weight two Eisenstein series
\[
E_2(\tau):=1-24\sum_{n\geq 1} \sigma(n) q^n
\]
and set $\chi_D(n):=(\frac{D}{n})$. We see that
\[
E=-\frac{1}{48}\left(E_2\otimes \chi_{-3}+E_2\otimes \chi_{-3}^2\right)\big|\left(1-U_2V_2\right).
\]
Letting $\widehat{E}_2(\tau):=E_2(\tau)-\frac{3}{\pi v}$ be the completed weight two Eisenstein series, we easily conclude
\[
E=-\frac{1}{48}\left(\widehat{E}_2\otimes \chi_{-3}+E_2\otimes\chi_{-3}^2\right)\big|\left(1-U_2V_2\right).
\]
Since $\widehat{E}_2$ is modular of weight two on $\operatorname{SL}_2(\mathbb Z)$, we see that $E$ is modular of weight two on $\Gamma_0(36)$. Since it is holomorphic, we conclude that the right-hand side of \eqref{eqn:Thetamin16split} is a weight two modular form on $\Gamma_0(144)$. By the valence formula, \eqref{eqn:Thetamin16split} is true as long as it is true for the first 48 Fourier coefficients, which is easily checked with a computer.
By work of Deligne \cite{Deligne}, we know that the $n$-th coefficient of $\eta^4(24\tau)$ is $\ll n^{\frac{1}{2}+\varepsilon}$. Therefore, writing the $n$-th coefficient of $E$ as $c_E(n)$, we conclude from \eqref{eqn:Thetamin16split} that
\[
s_{5,6,(1,1,1,1)}^*(24n+4)=\frac{2}{3}c_E(6n+1)+O\left(n^{\frac{1}{2}+\varepsilon}\right)= \frac{2}{3}\sigma(6n+1) + O\left(n^{\frac{1}{2}+\varepsilon}\right).
\]
Plugging back into \eqref{eqn:rspentagonal} and then plugging this into \eqref{eqn:pentagonal} implies that
\[
r_{5,(1,1,1,1)}(n)=\frac{1}{16}r_{5,(1,1,1,1)}^*(n)+O\left(n^{\frac{15}{16}+\varepsilon}\right) = \frac{1}{24}\sigma(6n+1) + O\left(n^{\frac{15}{16}+\varepsilon}\right).\qedhere
\]
\end{proof}
|
\section{Introduction}
Implementations of automated driving functions in prototypes and test drives have already been demonstrated in the past. Still, despite several announcements by the automotive industry, Level 3 automated driving systems (L3-ADS) \cite{J3016} or higher have not yet been introduced to the market. One of the reasons is the long-standing lack of a legal and regulatory basis for safety assessment of these systems.
For the introduction of L3-ADS, there must be proof of a positive impact on traffic safety, resulting in a tremendous testing effort \cite{winner2015quo, LindmannTestKm}. With an increasing level of automation, the driver’s responsibilities decrease and the complexity of the automated driving function grows. Complementing prototype-based real-world tests with virtual tests helps to diminish those efforts, though without replacing prototype tests entirely \cite{VirtuelleTests}.
Several research projects like PEGASUS \cite{PegasusOverview}, ENABLE-S3 \cite{EnableS3Overview}, SAKURA \cite{SAKURA} or CATAPULT \cite{CATAPULT} have developed frameworks for the safety assessment process of these vehicles based on traffic scenarios. The central element of their frameworks is a database combining different data sources and a processing chain that generates test specifications. Through a variety of data sources like accident databases, field operational tests (FOT) or driving simulator studies, relevant scenarios are extracted and fed into the database. Those scenarios are used, among other things, to generate test cases either for simulated environments or real-world test tracks.
The UNECE Regulation \textit{Proposal for a new UN Regulation on uniform provisions concerning the approval of vehicles with regards to Automated Lane Keeping System} \cite{ALKS} provides the first regulatory framework for the introduction of L3-ADS into the market in Europe. The Regulation provides a minimum set of scenarios for safety validation. A technical service is supposed to select and vary the concrete parameters of these test scenarios in a reasonable manner. This is often linked to the risk of a test scenario based on concrete parameters \cite{thorn2018framework}. As risk is typically dependent on the probability of exposure and potential severity of a scenario, it is an important step to determine the exposure for scenarios \cite{ISO26262}. The exposure is used to quantify the probability of occurrence for certain characteristics of a scenario.
A valid methodology to get the exposure is the analysis of real-world data, which has not been conducted for the ALKS scenarios. Thus, this paper contributes an approach to extract concrete scenarios, i.e. concrete parameter sets of a scenario, from measured trajectory datasets. From this, a dataset of concrete scenarios is created and made publicly available. The presented methodology intends to enrich the Automated Lane-Keeping System (ALKS) scenarios with information on realistic scenario parameters derived from real-world data. As it offers recordings of naturalistic traffic behavior, highD \cite{highDdataset}, a large-scale trajectory dataset from German Autobahn by fka and ika, is utilized to get the exposure on the behavior of the traffic participants. The concrete scenarios are provided in the OpenX standards OpenSCENARIO and OpenDRIVE for flexible usage in diverse simulation tools.
This paper is structured in the following way: Section II gives a short introduction into relevant related work regarding the use of scenarios during the safety assessment process, the Regulation on L3-ADS systems, scenario simulation standards and finally the used dataset. Section III highlights our method for the extraction of concrete scenarios from real-world data and its transformation process to the simulation using ASAM OpenX. Section IV describes the extracted scenarios as they are transferred into the simulation and presents the differences between the real-world scenarios and their counterparts in the simulation. Finally, section V gives a conclusion.
\section{Related Work}
\subsection{Scenario Definition}
Due to the extensive use of scenario based testing, it is important to have a common understanding of the term "scenario". In general, a scenario refers to the abstraction and general description of a temporal and spatial traffic constellation \cite{SAE91381}. Since an easy definition is not possible, several contributions have extended the definition.
In \cite{bagschik2017szenarien} three abstraction levels called functional, logical and concrete have been established to describe a scenario in terms of different level of detail. Functional scenarios can either be described with an informal way of description like pictograms, free text or based on a predefined machine-readable scheme. The transfer from the linguistic description to a state-space description enables the derivation of technical requirements including valid and non-valid value ranges (logical scenarios). Finally, concrete scenarios not only represent the lowest level of abstraction with the highest variety of scenarios but also shape executable test cases. In concrete scenarios an explicit assignment of parameters from the state space to a concrete scenario unambiguously describes all entities and their relationships. Depending on the discretization of parameters, a logical scenario can be the origin for an infinite number of concrete scenarios. The outcome of the scenario is, as already in the case of the logical scenario, hypothetical and not further defined since the behavior of the ego vehicle is not specified \cite{SAE91381}. Therefore, concrete scenarios in particular are used to generate test cases and test specifications.
\subsection{Gathering of Concrete Scenarios}
Two main approaches are used to identify scenarios: knowledge-based and data-driven. While in the former experts define scenarios from top-down the latter identifies scenarios as a result of clustering measurement data. However, neither of the approaches excludes experts’ knowledge or support of data and measurements \cite{riedmaier2020survey}.
Knowledge-based approaches implement a knowledge representation, e.g. in the form of an ontology, and generate a scenario catalog based on the ontology \cite{bagschik2018wissensbasierte}. The completeness of the scenario catalog can be considered using the ontology, which can generally be implemented more efficiently. Though, the derived scenarios could lack real-life representation.
Data-driven approaches leverage the iterative improvement by collecting new data to create extensive and plausible scenario catalogs. Nevertheless, the approach could perform poorly in covering high diversity if a bad database is used. While most of the data-driven approaches identify logical scenarios based on a parameterizable model \cite{weber2019framework}, some are utilizing machine-learning methods \cite{krajewski2019beziervae, wang2020clustering}. For this purpose, the method of unsupervised machine learning is used, which divides a data set into scenarios without previously defined knowledge. When using machine learning, the completeness of the scenario catalog depends on the traffic situations contained in the data set. Furthermore, an additional effort is required to assign a meaning to the individual scenarios, for example, to evaluate the relevance of the scenarios for the safety assessment.
\subsection{OpenSCENARIO \& OpenDRIVE}
For the unambiguous description of scenarios and the efficient integration into different simulation environments, standards are developed for their description. With OpenSCENARIO and OpenDRIVE two standards for the harmonization of simulation interfaces in the field of automotive simulation are being pushed by the Association for Standardization of Automation and Measuring Systems (ASAM) \cite{asamOD, asamOS}. Since both standards are used in this research, they are briefly introduced. OpenDRIVE allows the description of a static environment including e.g. roads and signs. This enables that individual road elements such as straight lines and curves can be parameterized and combined with other elements to form entire routes.
Unlike OpenDRIVE, OpenSCENARIO is used to describe the temporally dynamic elements of a scenario. For example, the position of a traffic light is defined in OpenDRIVE, while the switching times are defined in OpenSCENARIO. The main focus is on the road users. Vehicles can be defined in catalogs and positioned on a route that is referenced in OpenDRIVE. The behavior of vehicles in the scenario can be described by a storyboard, which includes actions that can be triggered when predefined conditions are met. The simulative use case does not directly translate to an evidence-based use case. For example, actors in the simulation often perform maneuvers when certain conditions are met. Examples of such triggering conditions (triggers) are:
\begin{itemize}
\item Position in longitudinal or lateral direction of a traffic participant
\item Distance between two traffic participants
\item Absolute and relative velocity
\item Time gap, Time-to-Collision
\end{itemize}
If a vehicle is given a new target lane, then the lateral motion can be described by geometric primitives or precisely specified by a trajectory in the form of a list of positions.
\subsection{Simulation Tools and Interfaces}
For simulating OpenDRIVE and OpenSCENARIO files a multitude of simulation environments with different strengths and capabilities exist. Among them are several commercial tools like VTD \cite{VTD}, dSPACE ASM \cite{dSpaceASM} and multiple open-source tools like esmini \cite{esmini}, openPASS \cite{dobberstein2017eclipse}, and Carla \cite{dosovitskiy2017carla}.
In order to enable a wide accessibility and applicability of the generated database, the two open-source tools esmini and CARLA were picked for testing the generated scenario files.
Esmini is a basic and lightweight OpenSCENARIO player. It is the result of the Swedish research project Simulation Scenarios \cite{SimS} and has the advantage of a very good OpenSCENARIO coverage, offers however only basic 3D visualization capabilities. The 3D view is based on OpenSceneGraph, an open-source graphics library that focuses more on stability and performance than on complex and accurate 3D visualizations.
CARLA is an open-source driving simulator for autonomous driving research \cite{dosovitskiy2017carla}. It serves multiple purposes like learning driving policies, training perception algorithms, etc. It is based on Unreal Engine and thus enables a much more complex graphical representation of the environment than esmini. An extension available for CARLA is the ScenarioRunner \cite{CarlaSR}, which is a module allowing the definition, simulation, and evaluation of complex traffic scenarios.
It is important to mention that, at the time of writing, the various tools do not support all the attributes of the OpenSCENARIO standard. Therefore specific adaptations have to be made for the tool in question.
\subsection{Regulation on ALKS}
With the adoption of the UN Regulations on the requirements for ALKS \cite{ALKS} by UNECE's World Forum for Harmonization of Vehicle Regulations, the first binding international regulatory basis on Level 3 automation has been set. The intention of the Regulation is to establish uniform provisions concerning the approval of vehicles with regard to ALKS and its administrative processes suitable for e.g. type approval, technical requirements, audit and testing provisions.
ALKS controls the lateral and longitudinal movement of the vehicle for extended periods without further driver command meaning that the activated system is in primary control. The system can only be activated under certain conditions on roads including segments, where pedestrians and cyclists are prohibited and which are equipped with a physical separation. The application is limited to an operational speed of up to 60 km/h maximum and passenger cars \cite{ALKS}.
In order to verify the technical requirements of the ALKS system, the Regulation defines tests outlined in Annex 5 at a functional level, which are to be carried out in close coordination with a technical service, who is in charge for selecting the specific test parameters. According to the document, the manufacturer shall declare the system boundaries and define different combinations of test parameters (e.g. speed, type and offset of target, curvature of lane) in order to cover scenarios in which a collision shall be avoided by the system as well as those in which a collision is not expected to be avoided, where applicable. However, the parameter selection remains to the manufacturer technical service, which have to find a reasonable parameterization that represent real-world traffic. Additionally, the Regulation also states requirements on pass-fail-criteria that allow the derivation not only for a given set of test parameters, but for any combination of parameters in which the system is designed to work.
The test scenarios are foreseen to assess the performance of the system with regard to the dynamic driving task regarding six different groups of tests. The groups are focusing on aspects like lane keeping, object blocking the lane, follow lead vehicle, cut-in, cut-out and field of view. Tests involving avoidable as well as unavoidable collisions must be conducted to examine the behavior of an ALKS under test.
In \cite{BmwALKS} test scenarios derived from the ALKS Regulation have been implemented in a bundle of XML files according to the standards OpenSCENARIO and OpenDRIVE, which are executable with standard compliant simulators. Since the Regulation leaves room for interpretation, the coordination of a common interpretation has been pushed with this work. The publication provides 15 executable test scenarios derived from the six subject areas analogous to Annex 5, Chapter 4.1-4.6 as an initial attempt to clarify the described set of functional scenarios. For each of the 15 test cases one specific parameter set has been uploaded. Due to the heterogeneous behavior of the traffic participants, a greater number of scenarios for each test case must be implemented to test the ALKS system and to account for the exposure of these scenarios.
\begin{figure}[t]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/highDAccuracy.png}
\caption{Example of vehicle positions that have been extracted from recordings of the highD dataset \cite{highDdataset}.}
\label{fig:dronedetections}
\end{figure}
\subsection{highD Dataset}
The highD dataset \cite{highDdataset} consists of vehicle trajectories on German highways. Using a quadcopter, highway traffic has been recorded from a bird's eye perspective at six different sites around Cologne, Germany in 2017 and 2018. As a road segment of more than 400~m is covered, more than 20 vehicles in both directions are recorded on average at the same time (see Fig.~\ref{fig:dronedetections}). Finally, the road user behavior recorded with the drone videos is naturalistic. While measurement vehicles with e.g. 360° LiDAR on top could influence surrounding vehicles with their conspicuous sensors, the drone is not noticeable to drivers. The highD dataset includes 60 recordings with a total length of more than 16 hours on highways with two or three driving lanes per direction. The recordings contain about 110~000 vehicles split into about 90~000 cars and 20~000 trucks resulting in about 44~500 driven kilometers. The highD dataset \cite{highDdataset} is currently the largest publicly available naturalistic trajectory dataset of vehicles on highways.
However, the highD dataset does mainly contain rather higher speed scenarios, while the ALKS Regulation is defined for an operational speed of up to 60 km/h. Although the highD datasets provides a useful data basis for the proposed analysis, it would be more suitable to have a similar dataset containing lower speed scenarios caused by e.g. traffic jams or lower speed limits.
\section{Method}
\subsection{Overview}
We implemented the extraction scenarios from trajectory data as a multi-step process, see Fig.~\ref{fig:pipeline}. First, a generic database of scenarios is created, which is set up independently from any specific use case but instead aims for maximum comprehensiveness. The input data are the aforementioned recordings from the highD dataset, consisting of trajectories for every vehicle as well as lane assignments and relational information to surrounding road users. This time series data is analyzed from the point of view of every vehicle with respect to specific events like lane changes of the respective ego vehicle, lane changes of other (challenging) vehicles, brake maneuvers, etc. With the help of these events, various types of scenarios can be detected, including those defined in the ALKS Regulation. For each of these, there is a set of specific parameters describing the concrete scenario. Apart from the initial scene these also cover averages and extrema of the vehicles' motion states during the duration of the scenario. The parameter values are extracted and added to the database.
The subsequent step takes the Operational Design Domain (ODD) of the system under test into account, i.e. the database entries are filtered according to the system boundaries of ALKS systems as specified by the UNECE Regulation. Additional filter criteria can be applied to ensure relevance of the derived scenarios.
The parameters of the remaining scenarios are used to populate previously created scenario templates and generate individual OpenSCENARIO files. As the implementations of that standard by today's simulation tools are not (yet) fully compatible, separate output files are created for each supported tool. For now, this includes esmini and CARLA.
Finally, the generated OpenSCENARIO files can be used in simulation. There, apart from the OpenSCENARIO file two other building blocks are required: an OpenDRIVE file and a file containing the 3D visual information, like textures, posts, buildings and leafage.
The process for the creation of the OpenDRIVE map is based on an orthophoto of the recording location from the highD dataset. This orthophoto is used within the Mathworks RoadRunner \cite{roadrunner} software to create the OpenDRIVE file and the 3D visual database, both using the same point of origin as the highD dataset to get consistent coordinate systems.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/pipeline.png}
\caption{Methodology to generate concrete scenarios from highD for ALKS testing.}
\label{fig:pipeline}
\end{figure}
\subsection{Scenario Selection}
There are six main categories of test scenarios specified in Annex 5, Chapter 4 of the ALKS Regulation. They have been split up into several sub-scenarios in order to satisfy the variations within each of the categories. Not all of them are equally well-suited to be derived from highD:
\begin{itemize}
\item The field of view tests cover forward and lateral detection ranges regarding other road users and are not directly related to any specific driving scenario, thus do not benefit from real-world data. The same is true for free driving without immediate influence of surrounding traffic.
\item Other scenarios involve one or multiple stationary vehicles or road users blocking the lane. As highD focuses on regular traffic flow on German highways, these situations do not exist in any considerable quantity within the recorded trajectories.
\item Crossing pedestrians and road user behavior inducing unavoidable collisions, i.e. actual accidents, are not contained at all in the dataset.
\end{itemize}
As a result of these considerations, the following scenarios were determined to benefit most from naturalistic real-world measurements:
\begin{itemize}
\item "Lead Vehicle Brake": The ego vehicle drives at a constant speed, the preceding challenging vehicle in the same lane drives at a different or the same speed. At a trigger time point the latter decelerates abruptly.
\item "Cut-In": The ego vehicle drives at a constant speed, the challenging vehicle in an adjacent lane drives at a different or the same speed. At a trigger time point the challenging vehicle changes into the ego vehicle's lane.
\item "Swerving Lead Vehicle", "Swerving Side Vehicle": A vehicle in the same or an adjacent lane to the ego vehicle shows continuous oscillations in lateral position within the lane.
\end{itemize}
The two scenarios described in the last bullet point are of long-term nature and can be observed only partially by a stationary drone. As the brake and cut-in scenarios are event-oriented, they can be recorded in their entirety and are thus the focus of the published scenario set as well as this paper.
\subsection{Scenario Parameters}
The OpenSCENARIO standard offers the possibility to specify parameters for a scenario in a dedicated \emph{\textless ParameterDeclaration\textgreater}\space section at the beginning of the file \cite{asamOS}. This allows easy variation and separates them from the storyboard definition, which is constant within each type of scenario. For the method presented here, a file was created manually for each logical scenario and then used as a template for the generation of concrete scenarios by updating its parameters according to the database. The most relevant are listed in Table~\ref{table_parameters_brake}:
\begin{table}[h]
\caption{Parameters for scenario "Lead Vehicle Brake"}
\label{table_parameters_brake}
\begin{center}
\begin{tabular}{|l|c|}
\hline
Initial ego velocity & m/s\\
\hline
Initial challenging vehicle velocity & m/s\\
\hline
Initial distance to challenging vehicle & m\\
\hline
Challenging vehicle brake trigger distance & m\\
\hline
Challenging vehicle brake duration & s\\
\hline
Final challenging vehicle velocity & m/s\\
\hline
\end{tabular}
\end{center}
\end{table}
The brake scenario starts with the ego and the challenging vehicle driving at a defined distance in the same lane, but at different velocities. This initial scene is defined by the first three parameters. The duration of the deceleration is used as the defining quantity for the actual brake action. Also, while the UN Regulation mentions lead vehicle decelerations until standstill, this does not occur in highD recordings. Therefore, the list includes a parameter for the lead vehicle's final velocity at the end of the maneuver.
One general difference between the scenario definition used for the database and a file used as an input for a simulation tool is its starting time point. The former regards the start of the scenario with the initiation of the action defining it, i.e. the deceleration of the lead vehicle or the start of lateral motion for a vehicle cutting into the ego lane. The initial parameters are sampled at that time. In contrast, the corresponding actions in a simulation are usually supposed to happen after a short time span in order to give a system under test some initialization time. The initial distance from the database is therefore used as the trigger criteria for the maneuver, while the initial values exported to the OpenSCENARIO file are calculated so the trigger distance is reached at a simulation time of five seconds, under the assumption of constant velocities up to that point.
\begin{table}[h]
\caption{Parameters for scenario "Cut-In"}
\label{table_example}
\begin{center}
\begin{tabular}{|l|c|}
\hline
Initial ego velocity & m/s\\
\hline
Initial challenging vehicle velocity & m/s\\
\hline
Initial distance to challenging vehicle & m\\
\hline
Initial challenging vehicle relative lane & {-1,+1}\\
\hline
Initial challenging vehicle lane offset & m/s\\
\hline
Challenging vehicle cut-in trigger distance & m\\
\hline
Challenging vehicle cut-in distance & m\\
\hline
Final challenging vehicle velocity & m/s\\
\hline
Final challenging vehicle lane offset & m/s\\
\hline
\end{tabular}
\end{center}
\end{table}
As in the previous scenario, the definition of the cut-in scenario along with its list of parameters accounts for different initial velocities of the ego and the challenging vehicle as well as an initial distance. The sinusoidal lane-change itself is parameterized by the traveled distance during the lane change, which proved to generate trajectories matching the real-world measurements best, see Section~\ref{section:results}. As vehicles do not typically drive perfectly at the center of the lane, the challenging vehicle's offset in its initial as well as in its final lane can be specified. A parallel change of velocity of the challenging vehicle is also supported via the respective parameters. Again, the initial distance is calculated to trigger the actual maneuver at a simulation time of five seconds.
The parameters for the two "Swerving Vehicle" scenarios incorporate the variation range of the lateral offset within the lane and the maximum lateral acceleration of the lead or side vehicle.
Not included in either table are additional parameters for localizing the vehicles in the correct OpenDRIVE lanes with respect to the real-world observation.
Furthermore, highD data includes the dimensions of all vehicles with respect to length and width as well as their classification like car, bus or truck. As a consequence, the vehicles referenced in the generated concrete scenarios are not taken from standard vehicle catalog definitions but instead match their features from the respective real-world measurements.
\subsection{Scenario Extraction Conditions}
In order to generate test cases relevant for ALKS verification, the specified system boundaries in the UNECE Regulation provide a way to narrow down the number of scenarios. While the highD dataset covers German highways and thus matches the ALKS requirements regarding road and infrastructure very well, the vast majority of vehicles travel at typical velocities of 100 to 130~km/h, exceeding the ALKS limit of 60 km/h. To remove scenarios deviating too much from that limit, the database has been filtered using a threshold of 70 km/h for the initial velocity of the ego vehicle. For the lead vehicle brake scenario, an additional filter condition is applied: to differentiate deliberate braking from regular velocity adjustments, only scenarios in which the lead vehicle exceeds a certain deceleration threshold are considered as relevant. Here, this value has been chosen as 2~m/s² \cite{haas2004use}. A swerving vehicle scenario is detected if a vehicle's lateral position shows a variation range of at least 1.2 m within the measurement area. The resulting numbers of all scenarios are displayed in Fig. \ref{fig:scenario_numbers}:
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/scenario_numbers.png}
\caption{Number of scenarios in total and after the application of various velocity thresholds.}
\label{fig:scenario_numbers}
\end{figure}
Another condition for event-centric scenarios to be extracted was their completion within the measurement area. Cut-in and brake scenarios whose start and/or end is not visible have been discarded. This was necessary to exclude canceled or double lane-changes that would have skewed the data, and to reliably determine the initial and final velocity of the lead vehicle.
\subsection{Simulation of Scenarios}
As mentioned above, esmini and CARLA were picked for the exemplary replay of the generated scenarios in simulation. Running the extracted scenarios in esmini only requires the parameterized OpenSCENARIO file, the OpenDRIVE file and the OpenSceneGraph file. In contrast to esmini, CARLA version 0.9.10 does not support all OpenSCENARIO attributes that were used \cite{carlaOSC}. Therefore, the files had to be adapted as follows.
For CARLA a role type had to be added to each actor and an environment description specifying weather and road conditions was inserted.
One of the main differences between esmini and CARLA is the inverse interpretation of the relative lane ID, which is used both during the initialization of the challenging vehicle and the lane change.
Additionally, CARLA only supports the assignment of a target lane relative to the actor itself and the sinusoidal lane change had to be alternated to linear. For improved usability of the scenarios in CARLA, a set of CARLA specific triggers, who e.g. check for wrong lanes or collisions, and allow to test a function and evaluate the scenarios, were added to the templates.
Finally, as the the generated scenarios are intended to optimize and validate different Automated Lane-Keeping Systems the OpenSCENARIO files contain placeholders for the definition and parameterization of actor controllers. As defined in OpenSCENARIO, these controllers are intended to specify how vehicles or pedestrians should be controlled and define the specific behavior of smart actors \cite{asamOS}.
After the parameterization of the OpenSCENARIO files, XML checker was applied and the scenarios were replayed in the two simulation environments. As an example, Fig.~\ref{fig:deceleration_dist_max} shows the simulation of a cut-in scenario in CARLA OpenDRIVE standalone mode and esmini.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/carla_cutin_screenshot.PNG}
\includegraphics[width=0.48\textwidth]{images/esmini_cutin2_screenshot.PNG}
\caption{Simulation of a cut-in scenario with CARLA [upper image] in OpenDRIVE standalone mode and esmini [lower image].}
\label{fig:sim_screenshot}
\end{figure}
\section{Results}
\label{section:results}
After filtering the scenario database according to ALKS system boundaries as well as criticality requirements, 136 cut-in scenarios and 38 brake scenarios are ultimately extracted. For the former, the distributions of the longitudinal distance between the ego vehicle and the lead vehicle as well the maximum deceleration of the lead vehicle are shown in Fig.~\ref{fig:deceleration_dist_max}.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/deceleration_distance.png}
\includegraphics[width=0.48\textwidth]{images/deceleration_max.png}
\caption{Histogram of longitudinal distance and maximum deceleration in the "Lead Vehicle Brake" scenario.}
\label{fig:deceleration_dist_max}
\end{figure}
Only in very few instances the deceleration surpasses 2.5~m/s². As the greatest deceleration is 3.3~m/s², the value of 6~m/s² specified in the Regulation (Annex~5, Chapter~4.3 (f)) is not reached at all. These magnitudes are required for collision avoidance situations. Even though the highD data contains deceleration scenarios with a deceleration greater than 6~m/s², the velocity range of 70~km/h excludes a significant quantity of such highD recordings.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/esmini_brake.png}
\caption{Challenging vehicle velocity in esmini simulation and highD during the deceleration phase for ten concrete brake scenarios.}
\label{fig:esmini_brake}
\end{figure}
Fig.~\ref{fig:esmini_brake} displays a comparison between the change of velocity of the real-world and the simulated challenging vehicle for a subset of ten randomly chosen concrete scenarios. The tool of choice was esmini, as its simplistic physics and controller implementation results in an exact realization of the specified geometric primitives, thus allowing a study of the scenario description itself without influence of controller quality. The velocity change of the lead vehicle within the parametrized duration was modeled using a cubic function, which results in a root mean square error (RMSE) of 4.49~km/h for the difference in velocity between the source data and esmini simulation as an average for all brake scenarios. This value is driven up by individual scenarios where the deceleration is applied stepwise or in comparable ways that can not be described adequately in OpenSCENARIO.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/cutin_distance.png}
\includegraphics[width=0.48\textwidth]{images/cutin_thw.png}
\caption{Histogram of longitudinal distance and time headway at maneuver start in the "Cut-In" scenario.}
\label{fig:cutin_dist_thw}
\end{figure}
For the cut-in scenario, distributions of longitudinal distance and time headway (THW) at the start of the cut-in maneuver are shown in Fig.~\ref{fig:cutin_dist_thw}. As expected for the limited range of velocities, the distances include close ranges and even eight cut-ins starting at under 5~m distance. The peak of the THW distribution is found between one and two seconds.
Fig.~\ref{fig:esmini_cutin} shows ten exemplary lateral motion trajectories for the real-world challenging vehicles and their simulated counterparts. The parameterization of the sinusoidal curve using the length of the maneuver guarantees matching end points. In between, the simulated symmetric curves do differ from their source data and tend to result in slightly less aggressive lane changes. The RMSE for the deviation of lateral position is 0.40~m as an average for all cut-in scenarios. Better fitting would require the availability of more complex shapes with more parameters.
\begin{figure}[h]
\vspace*{0.2cm}
\centering
\includegraphics[width=0.48\textwidth]{images/esmini_cutin.png}
\caption{Lateral position of the challenging vehicle in esmini simulation and highD for ten concrete cut-in scenarios.}
\label{fig:esmini_cutin}
\end{figure}
\section{Conclusion}
To overcome the need of a reasonable parameterization that is required for the test scenarios of the ALKS Regulation, this paper highlights a methodology to derive meaningful parameters based on real-world data. The results proof the methodology's capability to generate representative scenarios in the simulation describing similar vehicle trajectories. The use of real-world data underlines the validity of the scenarios due to considering the heterogeneous behavior of the relevant traffic participants. The derived scenarios are published in OpenSCENARIO and OpenDRIVE to be replayed in frequently used simulation tools like CARLA and esmini. These scenarios can be useful for the development of driving functions, but also for testing an implemented ALKS function in simulations. The dataset is available at https://www.levelXdata.com/scenarios. For the future, we plan to analyze additional real-world data to increase the validity. We will also conduct analyses to perform a statistically representative survey of the ALKS parameters in order to be able to prove a saturation of the data. The goal is to ensure that extreme values, such as the deceleration in the braking scenario, but also the general distribution of other parameters like weather are taken into account. In addition, it is foreseeable that complexity of scenarios needs to be increased e.g. by adding features like occlusions and action constraints.
\bibliographystyle{IEEEtran}
|
\section*{Comments}
\section{Introduction}
\label{sec:introduction}
In this paper we study both the chemical and Euclidean distances in the
\textit{ellipses model} introduced in~\cite{teixeira2017ellipses}. It is a
Boolean percolation in the plane with defects given by random ellipses centered
at points given by a Poisson point process with intensity $u > 0$. Given the
position of the centers, the eccentricities and orientations of the ellipses
are independent. The minor axes always have length one and they make uniformly
distributed angles with the horizontal direction. The lengths of the major axes
are drawn independently from a heavy-tailed distribution $\rho$ supported on
$[1, \infty)$ that satisfies $\rho[r,\infty) = c r^{-\alpha}$ for $r \geq 1$.
Therefore, while the parameter $u$ controls the amount of ellipses appearing in
the picture, the parameter $\alpha$ controls how eccentric they are.
In~\cite{teixeira2017ellipses}, phase transition and connectivity properties
for the ellipses model were studied as functions of these two parameters. Here
we will focus on $\alpha \in (1,2)$, the regime in which, for any choice of $u
> 0$, there exists a unique infinite cluster of ellipses that, in addition,
satisfies what we refer to as the \textit{highway property}. Roughly, it means
that after scaling the probability of connecting two regions using a single
ellipse becomes close to one.
Let $\ensuremath{\mathscr{D}}(x, y)$ denote the minimum length of a polygonal path from $x$ to $y$
which lies entirely inside the set covered by the ellipses. We call $\ensuremath{\mathscr{D}}
(\cdot \, , \cdot)$ the \emph{Euclidean distance} restricted to the set of
ellipses or sometimes the \emph{internal distance}. Also, for any two points
$x$ and $y$ in the infinite cluster of ellipses, denote by $D(x,y)$ the
\textit{chemical distance} between them, i.e.\ the minimum number of ellipses
that a continuous path from $x$ to $y$ contained entirely inside the cluster of
ellipses has to intersect. The Euclidean distance in the plane, sometimes
called the unrestricted Euclidean distance, is denoted by $|x-y|$.
Let us now state our main results
\begin{teo}[Euclidean distance]
\label{teo:distance_ellipses_l2}
Consider the ellipses model with parameters $u>0$ and $\alpha \in (1, 2)$.
For $x, y \in \ensuremath{\mathbb{R}}^{2}$ and $\delta > 0$,
\begin{equation}
\label{eq:distance_ellipses}
\lim_{|x-y| \to \infty}
\ensuremath{\mathbb{P}}\Bigl(
1 \le \frac{\ensuremath{\mathscr{D}}(x,y)}{|x-y|} \le 1 + |x-y|^{\frac{\alpha-2}{4} + \delta}\,
\Bigm| \, x \leftrightarrow y
\Bigr)
= 1.
\end{equation}
\end{teo}
\begin{teo}[Chemical distance]
\label{teo:chem_distance_ellipses}
Consider the ellipses model with parameters $u>0$ and $\alpha \in (1, 2)$.
For $x, y \in \ensuremath{\mathbb{R}}^{2}$ and $\delta > 0$,
\begin{equation}
\label{eq:chem_distance_ellipses}
\lim_{|x-y| \to \infty} \ensuremath{\mathbb{P}}\Bigl(
\frac{1-\delta}{\log (\frac{2}{\alpha - 1})}
\le \frac{D(x,y)}{\log \log |x-y|}
\le \frac{2 + \delta}{\log (\frac{2}{\alpha})} \, \Bigm| \, x \leftrightarrow y
\Bigr)
= 1.
\end{equation}
\end{teo}
To understand geometric properties of infinite clusters is
a problem of major interest in percolation theory. Models for which the
chemical distance was studied include Bernoulli percolation and first-passage
percolation~\cite{antal1996chemical, garet2004asymptotic,
garet2007large}; random interlacements~\cite{cerny2012internal}; random walk
loop soup~\cite{chang2017supercritical}; and Gaussian free
field~\cite{ding2018chemical, drewitz2014chemical}. General conditions for a
percolation model on $\ensuremath{\mathbb{Z}}^{d}$ to have a unique infinite cluster in which
Euclidean and chemical distances are comparable are provided
in~\cite{drewitz2014chemical}.
Theorems~\ref{teo:distance_ellipses_l2} and~\ref{teo:chem_distance_ellipses}
show that ellipses model does not fit into the conditions
of~\cite{drewitz2014chemical}. This is due to the presence of long ellipses.
A similar behavior can be observed in Poisson cylinder
model~\cite{tykesson2012percolation} and long-range
percolation~\cite{newman1986one, biskup2004scaling}, as we discuss next.
\subsection{Comparing with long-range models}
\label{sub:comparing_long_range_models}
Ellipses model is closely related to other two percolation models that allow for
arbitrarily long connections: \textit{Poisson cylinders model} on
$\ensuremath{\mathbb{R}}^d$ and \textit{long-range percolation} on $\ensuremath{\mathbb{Z}}^{d}$. In principle
one could try to leverage these relations in order to obtain estimates for the
distances in ellipses model, and indeed some of our results are obtained this
way.
We emphasize that the highway property is shared by these three models, with
the immediate adaptations that connection of far away regions is accomplished
using a single cylinder or a single open edge for Poisson cylinders and long-range model, respectively.
The highway property is the main tool to ensure that, in all three models, the distance
inside the infinite cluster is asymptotically equivalent to the unrestricted
Euclidean distance in the plane.
However, the behavior of the chemical distance differs completely in each of
these models.
Before elaborating on these differences, we give a quick
introduction to Poisson cylinder model and long-range percolation.
\medskip
\noindent
\textbf{Poisson Cylinders.}
Poisson cylinders model consists of a random collection of bi-infinite
cylinders of radius one whose axes are given by a Poisson point process on the
space of all the lines (i.e.\ affine one-dimensional subspaces) in $\ensuremath{\mathbb{R}}^{d}$
with $d \geq 3$, see~\cite{tykesson2012percolation} for details.
Distances within clusters of cylinders were studied
in~\cite{broman2016connectedness} and ~\cite{hilario2019shape}.
In~\cite{broman2016connectedness} the authors prove that almost surely any two
cylinders are linked by a sequence composed of at most $d-2$ other intersecting
cylinders, implying that the chemical distance is bounded.
For the Euclidean distance on the other hand, in~\cite{hilario2019shape} the
authors prove a shape theorem showing that if $x, y \in \ensuremath{\mathbb{R}}^{d}$ are points in
the infinite cluster then the internal distance between $x$ and $y$ is
asymptotically $|x-y| + O(|x-y|^{1/2 + \varepsilon})$, for any $\varepsilon > 0$.
One straightforward connection between Poisson cylinders and ellipses model is
to study the intersection of the random cylinders with any given
$2$-di\-men\-sion\-al plane. As shown in~\cite{ungaretti2017phdthesis} this
intersection is a collection of ellipses whose law is an instance of the
ellipses model with $\alpha=2$ when $d=3$ and, with $\alpha > 2$ in
higher dimensions. Thus, this natural coupling between ellipses model and
Poisson cylinder model is not helpful to draw conclusions when $\alpha$ ranges
in $(1,2)$.
\medskip
\noindent
\textbf{Long-range percolation.}
Fix $\beta, s > 0 $ and consider the bond percolation model, known as
long-range percolation, in which for each $x \neq y \in \ensuremath{\mathbb{Z}}^{d}$ an open edge
connects $x$ and $y$ with probability
\begin{equation*}
p_{xy} = 1 - \exp[ -\beta |x-y|^{-s} ].
\end{equation*}
Different expressions for $p_{xy}$ may be considered but it is usually assumed
that it decays roughly as $\beta |x-y|^{-s + o(1)}$ for some positive $\beta$
and $s$.
Let us now explain how long-range percolation and ellipses model relate to each
other. Notice that both models have one parameter that controls the density
($u$ and $\beta$, respectively) and another that controls the distribution of
long connections ($\alpha$ and $s$, respectively). Essentially, a
discretization of ellipses model leads to a long-range percolation with
parameters satisfying the following relations
\begin{equation}
\label{eq:parameters_relation}
s= 2+ \alpha
\quad \text{and} \quad
u = \frac{\pi \beta}{\alpha 2^{\alpha}}.
\end{equation}
The coupling is given as follows.
Take $B:=[-1/2, 1/2)^{2}$ and for $x \in \ensuremath{\mathbb{R}}^{2}$ write $B_x = x + B$ so that
$(B_x)_{x \in \mathbb{Z}^2}$ forms a tiling of $\mathbb{R}^2$. For a
realization of the ellipses model with parameters $u$ and $\alpha$ associate
with every ellipse the two extremities of its major axis. Now embed
$\mathbb{Z}^2$ in $\mathbb{R}^2$ in the natural way and define two sites $x
\neq y \in \ensuremath{\mathbb{Z}}^{2}$ to be $\xi$-connected and write $x \sim_\xi y$ if there is
an ellipse whose major axis has one extremity in $B_x$ and the other in $B_y$.
Inserting open
edges between pairs of $\xi$-connected sites leads to a long-range percolation
model whose parameters $s$ and $\beta$ satisfy~\eqref{eq:parameters_relation},
as we show in Section~\ref{sec:preliminaries}.
We will explore this coupling to translate results about long-range percolation
to results about ellipses model. However, there are some key points that must
be dealt with when comparing connectivity in these models using the coupling
described above.
A first issue is that, in some situations, connectivity is favored in ellipses
model. In fact, when two long ellipses cross each other it may occur that the
resulting open edges in the long-range model belong to different components.
This suggests that connectivity properties in these two models may differ.
Indeed in~\cite[Theorem~1.2]{teixeira2017ellipses} it is shown that in ellipses
model with $\alpha \in (1,2)$ the covered set percolates for any intensity $u>0$.
The corresponding long-range percolation (with $s \in (3,4)$
by~\eqref{eq:parameters_relation}) does not percolate for sufficiently small
$\beta$, since when $\sum_{z\in \ensuremath{\mathbb{Z}}^{2}} p_{0z} < 1$ the open cluster of the
origin is dominated by a subcritical Galton-Watson tree.
A second issue affects connectivity in the opposite direction. Notice that
having $x \sim_{\xi} y \sim_{\xi} z$ does not ensure that, in the underlying
ellipses model, the corresponding ellipses overlap since it may occur that two
ellipses intersect the box $B_y$ without touching each other, see
Figure~\ref{fig:coupling_fails}.
\begin{figure}[ht]
\centering
\begin{tikzpicture}[scale=1]
\draw (0, 0) rectangle ++(1, 1);
\draw (2, 1) rectangle ++(1, 1);
\draw (-3, 1) rectangle ++(1, 1);
\filldraw[gray, opacity=.3,rotate around={25:(1.5,1.4)}]
(1.5,1.4) ellipse (1 and .3);
\filldraw[gray, opacity=.3,rotate around={-15:(-1.3, .7)}]
(-1.3, .7) ellipse (1.6 and .3);
\begin{scope}[shift={(9,0)}]
\draw (0, 0) rectangle ++(1, 1);
\draw (-5, 1) rectangle ++(1, 1);
\filldraw[gray, opacity=.3,rotate around={-10:(-2.3, .7)}]
(-2.3, .7) ellipse (2.7 and .3);
\draw (-4, 0) rectangle ++(1, 1);
\draw (-2, 1) rectangle ++(1, 1);
\filldraw[gray, opacity=.3,rotate around={30:(-2.7,1)}]
(-2.7,1) ellipse (1.2 and .3);
\end{scope}
\end{tikzpicture}
\caption{Possible problems when coupling ellipses model and long-range.
On the left, ellipses that do not intersect lead to a single connected component of $\xi$-edges; on
the right, ellipses that do intersect lead to disjoint components of $\xi$-edges.}
\label{fig:coupling_fails}
\end{figure}
We now present the results about long-range percolation that we use.
We refer the reader
to~\cite[Section~1.3]{biskup2004scaling} for a summary on
the chemical distance for different regimes of $s$.
We will be mainly interested in the case $d=2$ and $s \in (3, 4)$, which
corresponds to ellipses model with $\alpha\in (1,2)$. Results for any $d \geq 2$
and $s \in (d,2d)$ are discussed in
papers~\cite{biskup2004scaling, biskup2011graph, biskup2019sharp}.
Our estimate for Euclidean distance in Theorem~\ref{teo:distance_ellipses_l2}
builds on a construction from~\cite{biskup2004scaling} that relies on the above
mentioned highway property. Let us exemplify this property for the long-range
model with $d \geq 2$ and $s \in (d, 2d)$. Denote ${|x-y| = N}$ and for
$\gamma \in \bigl( s/2d, 1 \bigr)$ consider ${\mathsf B} = \ensuremath{\mathbb{Z}}^{d} \cap [-N^{\gamma}/2,
N^{\gamma}/2]^d$. Then, the probability of the event $\{{\mathsf B}_x
\leftrightarrow_1 {\mathsf B}_y\}$ that there is an open edge connecting a site in
${\mathsf B}_x = x + {\mathsf B}$ to another site in ${\mathsf B}_y = y + {\mathsf B}$ can be estimated using
\begin{equation}
\label{eq:highway}
\ensuremath{\mathbb{P}}\bigl(\{{\mathsf B}_x \leftrightarrow_1 {\mathsf B}_y\}^{{\mathsf c}}\bigr)
= \prod_{\mathclap{x' \in {\mathsf B}_x,y' \in {\mathsf B}_y}} (1 - p_{x'y'})
= \exp\biggl[
- \frac{\beta |{\mathsf B}_x| |{\mathsf B}_y|}{\bigl(N + O(N^{\gamma})\bigr)^{s}}
\biggr]
\sim e^{- \beta N^{2d\gamma - s}}
\end{equation}
as $N \to \infty$.
The estimate in~\eqref{eq:highway} is in the core of the hierarchical
construction from~\cite{biskup2004scaling} which leads to the main result
therein: the chemical distance between two points $x,y$ on the infinite cluster
behaves asymptotically as
\begin{equation*}
D(x,y) = (\log |x-y|)^{\Delta + o(1)}
\quad \text{as $|x-y| \to \infty$,}
\quad \text{where $\Delta=\frac{\log 2}{\log (2d/s)}$.}
\end{equation*}
This same argument shows that ${\ensuremath{\mathscr{D}}(x,y) \sim |x-y|}$, although not mentioned
in~\cite{biskup2004scaling}. We present (a simplified version of) their
hierarchical construction in Section~\ref{sec:bounding_euclidean_distance}, and
use it as a fundamental tool for controlling the Euclidean distance traversed
by a path in ellipses model.
\medskip
As we have seen above, in all three models the Euclidean distance restricted to
the covered set and the unrestricted distance are asymptotically the same.
The chemical distance can be seen as an alternative measure of connectedness for
these models and through this lens they behave very differently, presenting
different orders of magnitude.
For Poisson cylinders the chemical distance is
bounded by a constant, for ellipses model it grows as $\log \log |x-y|$, and
for the long-range model it grows as $(\log |x-y|)^{\Delta}$.
We will see that
this discrepancy between ellipses model and long-range percolation may be
explained as a consequence of the first issue above.
\subsection{Idea of proofs}
\label{sub:idea_of_proofs}
We need to obtain lower and upper bounds on the distance between points $x$ and
$y$ that belong to the same cluster of ellipses.
Our estimates for the lower bounds are simpler to obtain. The lower bound for
the internal distance appearing in~\eqref{eq:distance_ellipses} is simply
the unrestricted distance $|x-y|$ in the plane, and although obvious, we do not
have any improvement for it. The lower bound for the chemical distance
appearing in \eqref{eq:chem_distance_ellipses}, follows from an elementary
induction argument. One could try to improve the bounds using the BK inequality
like in the lower bound in~\cite{biskup2011graph} but our argument seems to
provide the correct order of magnitude in a simpler way.
The proofs for the upper bounds appearing in both
Theorems~\ref{teo:distance_ellipses_l2} and~\ref{teo:chem_distance_ellipses}
follow similar strategies. The first step is to show that, with high
probability, there exists a set of few overlapping ellipses that allows us to
traverse from a local region containing $x$ to another local region containing
$y$ without deviating too much. The second step consists of connecting locally
the points $x$ and $y$ to this structure. This is the content of a
deterministic construction in Lemma~\ref{lema:distance_small_scales}.
Let us discuss some details of each proof. The proof of
Theorem~\ref{teo:distance_ellipses_l2} is based on a coupling of ellipses model
and site-bond long-range percolation model on a renormalized lattice. The
probability of an edge being open will be given by the coupling with long-range
percolation described above. Only a subset of the underlying Poisson point
process defining the ellipses model is used for this coupling. The remaining
(independent) part is used for defining a site percolation model on a lattice
of renormalized sites that correspond to boxes in the original lattice.
Roughly, a site is considered open (or \textit{good}) if the corresponding box
is good meaning that the cluster of ellipses near this box is sufficiently
well-connected. This definition is based on an idea
from~\cite{antal1996chemical}.
On the event that $x \leftrightarrow y$ in ellipses model, the bond percolation
part and the site percolation part are then combined to create a short path
connecting $x$ to $y$. This is done in two steps:
\begin{description}
\item[Hierarchical construction.] This is essentially the construction
from~\cite{biskup2004scaling} based on the highway
property~\eqref{eq:highway}.
When $|x-y| = N$ is large, with very
high probability, there is an open edge connecting small
neighborhoods around $x$ and $y$.
This idea can be iterated to build what
we call a \textit{hierarchy}, see Definition~\ref{defi:hierarchy} and
Figure~\ref{fig:hierarchy}.
In words, a hierarchy is a collection of
long edges (or \textit{highways}) that essentially connects $x$ to $y$,
leaving only some gaps that are much shorter than the highways.
\item[Gluing procedure.]
Given that we have found a hierarchy the original problem is then replaced
by the problem of building connections across the remaining gaps. For
that, we use the site percolation part of our coupling. The definition
of good boxes will ensure that neighboring good boxes have intersecting
clusters of ellipses. Moreover, the renormalization scheme is
performed so that the probability of a box being good is highly
supercritical. Therefore, even when a gap that we want to cross has
some bad boxes around it, we can still contour these bad boxes by
paying a low price in terms of distance and probability. This is
accomplished through a large deviation bound on the size of bad
clusters, see Section~\ref{sub:gluing_highways}.
\end{description}
After these two steps are completed, we have with high probability a path of
ellipses connecting $x$ and $y$ whose length is well-controlled. This
establishes the upper bound in Theorem~\ref{teo:distance_ellipses_l2}.
The reader who is familiar with the hierarchical construction
of~\cite{biskup2004scaling} and the renormalization procedure
of~\cite{antal1996chemical} may notice that, in our proof of
Theorem~\ref{teo:distance_ellipses_l2}, we define events that are much simpler
than the ones appearing in the original constructions. This is possible
due to the existence of long overlapping ellipses that overlap, a phenomenon
with no counterpart in long-range or Bernoulli percolation.
The proof for the upper bound for the chemical distance in
Theorem~\ref{teo:chem_distance_ellipses} does not rely on the same coupling
with long-range percolation as in Theorem~\ref{teo:distance_ellipses_l2} since
this coupling does not explore the possibility of using long ellipses to its
full potential.
Instead, our argument involves choosing a rapidly increasing sequence
of rectangles and studying the event that they are crossed in the hardest
direction by a single ellipse. By a Borel-Cantelli argument, this construction
provides `enhanced highways' that cross large distances more efficiently.
\medskip
\noindent
\textbf{Remarks on the notation.} Throughout the paper we use $c, C$ to denote
generic positive constants that can change from line to line. Numbered
constants $\uc{c:cross_one_ellipse}, \uc{c:annulus_bound},
\uc{c:ellipse_length}$, are kept fixed.
Also, our asymptotic notation uses
\begin{itemize}
\setlength{\itemsep}{1.5pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\item both $f = o(g)$ and $f \ll g$ to denote
$\lim_{n \to \infty} \tfrac{f(n)}{g(n)} = 0$;
\item $f = O(g)$ to denote $|f| \le C |g|$ for some constant $C$;
\item $f = \Theta(g)$ to denote $c |g| \le |f| \le C |g|$;
\item $f \sim g$ to denote $\lim_{n \to \infty} \tfrac{f(n)}{g(n)} = 1$.
\end{itemize}
\section{Couplings, highways and hierarchies}
\label{sec:preliminaries}
In this Section we collect some results from the literature that will be used in
the proofs of Theorems~\ref{teo:distance_ellipses_l2}
and~\ref{teo:chem_distance_ellipses}.
\medskip
\noindent
\textbf{Ellipses model.} Ellipses model is defined via a Poisson point process
(PPP) on $\ensuremath{\mathbb{R}}^{2} \times \ensuremath{\mathbb{R}}^{+} \times (-\pi/2, \pi/2]$ with intensity
measure
\begin{equation}
\label{eq:ellipses_measure}
u \cdot \mathrm{d}z
\otimes \alpha R^{-(1+\alpha)}\, \mathrm{d}R
\otimes \frac{1}{\pi}\mathrm{d}V,
\end{equation}
For each point $(z, R, V)$ in the PPP, place an ellipse centered at $z$ whose
minor axis has length $1$ and whose major axis has length $R$ and forms an
angle $V$ with respect to the horizontal direction. The multiplicative
parameter $u >0$ controls the density of ellipse whereas the exponent $\alpha
>0$ controls the tail of major axis' distribution. We refer the reader
to~\cite{teixeira2017ellipses} for an account on the phase transition for
percolation on the covered set with respect to parameters $u$ and $\alpha$.
Define the event $LR_1(l;k)$ that an ellipse crosses the box $[0,l] \times
[0,kl]$ from left to right. The next lemma uncovers the range of parameters in
which ellipses model presents the highway property:
\begin{lema}[Proposition~5.1 of \cite{teixeira2017ellipses}]
\label{lema:cross_box_one_ellipse}
\newconstant{c:cross_one_ellipse}
Let $\alpha >1$. There is a constant
$\uc{c:cross_one_ellipse} = \uc{c:cross_one_ellipse}(\alpha) > 0$
such that for every $k, l > 0 $ with $lk > 2$
\begin{equation}
\label{eq:cross_box_one_ellipse}
1 - e^{ -\uc{c:cross_one_ellipse}^{-1} u (k \wedge k^{-\alpha}) l^{2 - \alpha}}
\le \ensuremath{\mathbb{P}}(LR_1(l;k))
\le 1 -
e^{ -\uc{c:cross_one_ellipse} u
(k^{2-\alpha}\vee k^{-\alpha}) l^{2 - \alpha}}.
\end{equation}
\end{lema}
Therefore, when $\alpha \in (1,2)$ and $k$ is fixed, we have $\ensuremath{\mathbb{P}}(LR_1(l;k))
\to 1$ as $l \to \infty$, showing that the highway property holds in this range
of $\alpha$.
A second useful estimate is a similar bound for the probability that there is
an ellipse that traverses an annulus. Let $B(l)$ denote the Euclidean ball of
radius $l$ centered at the origin in $\ensuremath{\mathbb{R}}^{2}$ and denote its boundary by
$\partial B(l)$. For two disjoint regions $A_1$ and $A_2$ write $A_1
\leftrightarrow_1 A_2$ if there is one ellipse that intersects both $A_1$ and
$A_2$. We have:
\begin{lema}
\label{lema:annulus_bound}
\newconstant{c:annulus_bound}
Let $\alpha > 1$.
There is a constant $\uc{c:annulus_bound} = \uc{c:annulus_bound}(\alpha) > 0$
such that for every $l_1$, $l_2$ with $l_2 - l_1 \geq 2$ and $l_1 \geq 1$
we have
\begin{equation}
\label{eq:annulus_bound}
\ensuremath{\mathbb{P}} (B(l_1) \leftrightarrow_1 \partial B(l_2))
\le 1 - \exp\bigl[ - u \uc{c:annulus_bound} l_1
\cdot (l_2 - l_1)^{1-\alpha}\bigr].
\end{equation}
\end{lema}
\begin{proof}
See~\cite[Lemma~6.1]{teixeira2017ellipses}.
The estimate for $\mu(\Gamma_{12})$ implies~\eqref{eq:annulus_bound}.
\end{proof}
\medskip
\noindent
\textbf{Coupling long-range with continuous model.}
There is a canonical coupling mentioned in~\cite{newman1986one}
and used in~\cite{biskup2019sharp} between long-range percolation
model and a Poisson Point Process $\xi$ on $\ensuremath{\mathbb{R}}^d \times \ensuremath{\mathbb{R}}^d$ with
intensity measure
\begin{equation}
\label{eq:cont_long_rang_inte}
\mu_{\beta, s} := \frac{\beta}{|x-y|^{s}} \,\mathrm{d} x \,\mathrm{d} y.
\end{equation}
We may interpret each point $(x, y) \in \xi$ as giving rise to a segment connecting $x$ and $y$.
This coupling is useful to make the renormalization scaling more transparent.
In fact, for $a > 0$ if ${\xi' := \{(ax,ay);\; (x,y) \in \xi\}}$ then the intensities of
$\xi$ and $\xi'$ are related by
\begin{equation}
\label{eq:scaling_mu}
\mu_{\beta}(\mathrm{d} x' \,\mathrm{d} y')
= \frac{\beta}{|x'-y'|^s} \mathrm{d} x' \,\mathrm{d} y'
= \frac{\beta}{a^s |x-y|^s} \, a^d \mathrm{d} x \, a^d \mathrm{d} y
= \mu_{\beta a^{2d-s}}(\mathrm{d} x \,\mathrm{d} y).
\end{equation}
This scaling property is behind the highway property in case $s \in (d, 2d)$,
since the intensity appearing on the right-hand side tends to infinity as $a$
grows. Also notice that when $s=2d$ the model is scale-invariant and there is
no hope that a similar property is satisfied in that case.
For disjoint regions $A_1$ and $A_2$ we write $A_1 \sim_{\xi} A_2$ and say that
$A_1$ and $A_2$ are connected if there is $(\tilde{x}, \tilde{y}) \in (A_1
\times A_2) \cap \xi$. Take $B:=[-1/2, 1/2)^{d}$ and for $x \in \ensuremath{\mathbb{Z}}^{d}$
consider $B_x = x + B$. We say that two sites $x \neq y \in \ensuremath{\mathbb{Z}}^{d}$ are
$\xi$-connected if $B_x \sim_{\xi} B_y$ and denote this event by $x \sim_{\xi}
y$.
Lemma~\ref{lema:continuous_coupling} below yields estimates on the probability
of connecting two distant boxes and shows that this coupling indeed produces a
long-range percolation model.
\begin{lema}[Connecting boxes]
\label{lema:continuous_coupling}
Let $B(l) = [-l/2,l/2]^{d}$ and $z \in \ensuremath{\mathbb{R}}^{d}$ and $B_z(l)= z+B(l)$.
We have that $\ensuremath{\mathbb{P}}(B(l) \sim_{\xi} B_z(l)) = 1$ if and only if
$B(l) \cap B_z(l) \neq \varnothing$. Moreover, we have
\begin{equation}
\label{eq:continuous_coupling}
\ensuremath{\mathbb{P}}(B(l) \sim_{\xi} B_z(l)) \sim \beta l^{2d} |z|^{-s}
\quad \textup{as $z \to \infty$}.
\end{equation}
\end{lema}
\begin{proof}
We begin by noticing that for $x \in B(l)$ and $y \in B_z(l)$
we have that
\begin{equation*}
|x-y|
\geq |-z + x + (z-y)|_{\infty}
\geq |z|_{\infty} - l.
\end{equation*}
Thus, when $|z|_{\infty} > l$ we can write
\begin{align*}
\ensuremath{\mathbb{P}}\bigl(B(l) \sim_{\xi} B_z(l)\bigr)
&= 1 - \exp\Bigl[
- \beta \int_{B(l)\times B_z(l)}
\hspace{-6mm}|x-y|^{-s} \,\mathrm{d}x \,\mathrm{d}y
\Bigr] \\
&\le 1 - \exp\Bigl[ - \beta(|z|_{\infty} - l)^{-s} \cdot l^{2d} \Bigr]
< 1
\end{align*}
and as $|z| \to \infty$ we have
$|x-y|^{-s} = |z|^{-s} \bigl(1 + O(|z|^{-1})\bigr)$, implying
\begin{equation*}
\ensuremath{\mathbb{P}}(B(l) \sim_{\xi} B_z(l))
= 1 - \exp\Bigl[
- |z|^{-s} \bigl(\beta + O(|z|^{-1})\bigr) \cdot l^{2d}
\Bigr]
\sim \beta l^{2d} |z|^{-s}
\end{equation*}
with implied constants depending on $d$, $s$ and $l$. Also, when
$|z|_{\infty}=l$ one can verify that $\ensuremath{\mathbb{P}}(B(l) \sim_{\xi} B_z(l))=1$.
The fact that boxes $B(l)$ and $B_z(l)$ must share at least a corner will
imply the integral diverges for $s \in (d, 2d)$.
\end{proof}
Also, if we restrict our intensity measure to only allow for segments whose
lengths are larger than some fixed value, say $\mu_{\beta, s} :=
{\beta}{|x-y|^{-s}} \mathds{1}_{|x-y|> \kappa}\,\mathrm{d} x \,\mathrm{d} y$ we
get a model in which nearest neighbors are no longer connected with probability
1, but that has the same behavior on long edges.
\medskip
\noindent
\textbf{Change of variables and ellipses model.}
Now, let us restrict ourselves to the case $d=2$.
Here we use a change of variables to verify that the PPP's with intensity
measures \eqref{eq:cont_long_rang_inte} and~\eqref{eq:ellipses_measure}
may be viewed as reparametrizations of each other.
Instead of parametrizing a line segment in $\mathbb{R}^2$ specifying its
endpoints $x$ and $y$, we can use its middle point $z = (z_1, z_2)$, its radius
$R$ and the angle if forms with a given direction, $V$. This change of
variables is given by
$\Psi: \ensuremath{\mathbb{R}}^2 \times \ensuremath{\mathbb{R}}^{+} \times [-\tfrac{\pi}{2}, \tfrac{\pi}{2})
\to \ensuremath{\mathbb{R}}^{4}$ such that
\begin{equation*}
\Psi(z_1, z_2, R, V)
= (z_1 + R \cos V, z_2 + R \sin V, z_1 - R \cos V, z_2 - R \sin V).
\end{equation*}
It is straightforward to check that the Jacobian matrix $J$ satisfies
\begin{equation*}
J =
{\footnotesize
\begin{bmatrix}
\begin{array}{rrrr}
1 & 0 & \cos V & - R \sin V \\
0 & 1 & \sin V & R \cos V \\
1 & 0 & - \cos V & R \sin V \\
0 & 1 & - \cos V & - R \cos V
\end{array}
\end{bmatrix}
}
\quad \text{and} \quad
\det J = 4R.
\end{equation*}
Therefore, for any measurable $A \subset
\ensuremath{\mathbb{R}}^4$
\begin{align*}
\int_{A} \frac{\beta}{|x-y|^s} \,\mathrm{d} x \,\mathrm{d} y
&= \int_{\Psi^{-1}(A)} \frac{\beta}{(2R)^s} \cdot (4R)
\,\mathrm{d} z \,\mathrm{d} R \,\mathrm{d} V \\
&= \int_{\Psi^{-1}(A)} \frac{4 \beta}{2^s} \cdot R^{1-s}
\,\mathrm{d} z \,\mathrm{d} R \,\mathrm{d} V.
\end{align*}
The usual parametrization of ellipses percolation is based on measure
\begin{equation*}
u \,\mathrm{d} z \otimes
\alpha R^{-(1+\alpha)} \,\mathrm{d} R \otimes
\frac{\mathrm{d} V}{\pi}.
\end{equation*}
Comparing these measures, we obtain that we can
relate parameters $\beta, s$ used in the endpoint parametrization with the
$u, \alpha$ parametrization of ellipses model, which leads
to the relations in~\eqref{eq:parameters_relation}:
\begin{equation*}
s= 2+ \alpha
\quad \text{and} \quad
u = \frac{\pi \beta}{\alpha 2^{\alpha}}.
\end{equation*}
Using relation~\eqref{eq:parameters_relation} we see that
Lemma~\ref{lema:continuous_coupling} can also be used to estimate connection
probabilities on ellipses model.
\medskip
\noindent
\textbf{Hierarchical construction.} Consider long-range percolation on
$\ensuremath{\mathbb{Z}}^{d}$ with parameters $\beta$ and $s$. The highway property
in~\eqref{eq:highway} ensures that, for fixed $\gamma \in (s/2d,1)$ and
$|x-y| =: N$ large, there is an open edge connecting points in
neighborhoods of size $N^\gamma$ around $x$ and $y$ with high probability.
This idea can be iterated to build what we call a \textit{hierarchy}, see
Definition~\ref{defi:hierarchy} and Figure~\ref{fig:hierarchy}. When a
hierarchy exists the problem of finding a path from $x$ to $y$ can be replaced
by finding paths between well-separated pairs of points that are however much
closer than the original pair $(x,y)$. This construction, introduced
by~\cite{biskup2004scaling}, is reproduced below.
We use $\sigma \in \{0,1\}^{k}$ to encode the leaves of a binary tree of depth
$k$, by considering that $\varnothing$ is the root vertex, and $0$ and $1$
denote the left and right children of $\varnothing$, respectively. We append
digits to the right of a word $\sigma \in \{0,1\}^k$ in order to create longer
words, e.g., $\sigma1 \in \{0,1\}^{k+1}$ is the word that encodes the right
child of $\sigma$.
\begin{defi}[Hierarchy]
\label{defi:hierarchy}
For $n \geq 1$ and $x, y \in \ensuremath{\mathbb{Z}}^{d}$ we say that a collection
\begin{equation}
\ensuremath{\mathcal{H}}_n(x, y)
= \{(z_{\sigma});
\sigma \in \big\{0,1\}^{k}, 1 \le k \le n,
z_{\sigma} \in \ensuremath{\mathbb{Z}}^{d}\big\}
\end{equation}
is a \textit{hierarchy of depth $n$} if
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\item $z_0 = x$ and $z_1 = y$.
\item For all $0 \le k \le n-2$ and all $\sigma \in \{0,1\}^{k}$$, z_{\sigma 00} = z_{\sigma 0}$ and $z_{\sigma 11} = z_{\sigma 1}$.
\item For all $0 \le k \le n-2$ and all $\sigma \in \{0,1\}^{k}$ with
$z_{\sigma 01} \neq z_{\sigma 10}$ the edge
$(z_{\sigma 01}, z_{\sigma 10})$ is open.
\item Each edge $(z_{\sigma 01}, z_{\sigma 10})$ as in 3.\ appears
exactly once in $\ensuremath{\mathcal{H}}_k(x, y)$.
\end{enumerate}
\end{defi}
\begin{figure}
\centering
\begin{tikzpicture}[scale=.18,
dot/.style={
draw,circle,minimum size=1mm,inner sep=0pt,outer
sep=0pt,fill=black},
highway/.style={blue, very thick},
gap/.style={red, very thick, out=-90, in=-90}
]
\node at (-4, 0) {$1$};
\coordinate [dot] (0) at ( 0,0)
node at (0) [below] {$z_{0}$}
node at (0) [above] {$x$};
\coordinate [dot] (1) at (64,0)
node at (1) [below] {$z_{1}$}
node at (1) [above] {$y$};
\node at (-4, -4) {$2$};
\foreach \zlabel/\pos in {00/0, 01/16, 10/48, 11/64}{
\coordinate [dot] (\zlabel) at ( \pos,-4)
node at (\zlabel) [below] {$z_{\zlabel}$};
}
\node at (-4,-8) {$3$};
\foreach \zlabel/\pos in {
000/0, 011/16, 100/48, 111/64,
001/4, 010/12, 101/52, 110/60
}{
\coordinate [dot] (\zlabel) at ( \pos,-8)
node at (\zlabel) [below] {$z_{\zlabel}$};
}
\node at (-4,-11) {$\vdots$};
\node at (-4,-14) {$n$};
\foreach \pos in {
0, 16, 48, 64,
4, 12, 52, 60,
1, 15, 49, 63,
3, 13, 51, 61
}{
\node [dot] at ( \pos,-14) {};
}
\foreach \ipos/\fpos in {
1/3, 4/12, 13/15, 16/48, 49/51, 52/60, 61/63
}{
\draw[highway] (\ipos, -14)
arc (180:0:{(\fpos - \ipos)/2} and {(\fpos - \ipos)/8});
}
\draw[highway] (01) arc (180:0:16 and 4);
\draw[highway] (001) arc (180:0:4 and 1);
\draw[highway] (101) arc (180:0:4 and 1);
\foreach \ipos in {
0, 3, 12, 15, 48, 51, 60, 63
}{
\draw[gap] (\ipos, -14) arc (-180:0:.5 and 1);
}
\end{tikzpicture}
\caption{Hierarchy $\ensuremath{\mathcal{H}}_n(x, y)$ provides a collection of highways connecting
all pairs $(z_{\sigma 01}, z_{\sigma 10})$ with $\sigma \in \{0,1\}^{n-2}$. To
ensure $x$ is connected to $y$ it suffices to connect the remaining $2^{n-1}$
gaps, that are either of the form $(z_{\sigma 00}, z_{\sigma 01})$ or
$(z_{\sigma 10}, z_{\sigma 11})$.}
\label{fig:hierarchy}
\end{figure}
Note that the definition of a hierarchy does not take into account the distances between the points $z_{\sigma}$.
It will be useful to think of hierarchies as being constructed successively.
In view of the computation in \eqref{eq:highway}, in the first step we may try
to link a pair of sites $z_{01}$ and $z_{10}$ that belong to neighborhoods of
size roughly $N^{\gamma}$ around $z_0$ and $z_1$, respectively (recall that we
are assuming $\gamma \in (s/2d, 1)$ as in the paragraph
above~\eqref{eq:highway}). Having succeeded to do so in the first $k$ steps,
for each $\sigma \in \{0,1\}^k$ we try to link $z_{\sigma 01}$ and $z_{\sigma
10}$ belonging to neighborhoods of size roughly $ N^{\gamma^k}$ around
$z_{\sigma 0}$ and $z_{\sigma 1}$ respectively. Ideally, when we reach depth
$n$ we will be left with $2^{n-1}$ gaps which are pairs of sites of type
$(z_{\sigma 00}, z_{\sigma 01})$ or $(z_{\sigma 10}, z_{\sigma 11})$ with sites
in each pair at a distance of order $N^{\gamma^{n}}$. The reader may
consult Figure \ref{fig:hierarchy} for an illustration of this iterative
procedure. Note that, by the discrete nature of the long-range model the
procedure cannot be iterated indefinitely.
The above discussion motivates the definition of the event $\ensuremath{\mathcal{B}}_n(x, y)$ that
there is a hierarchy $\ensuremath{\mathcal{H}}_n(x,y)$ of depth $n$ satisfying that, for all $0 \le
k \le n-2$ and all $\sigma \in \{0,1\}^{k}$
\begin{equation}
\label{eq:cB_n_definition}
|z_{\sigma 01} - z_{\sigma 00}|_{\infty}
\quad \text{and} \quad
|z_{\sigma 10} - z_{\sigma 11}|_{\infty}
\quad \text{belong to $\Bigl[\tfrac{1}{2} N_{k+1}, N_{k+1}\Bigr]$,}
\end{equation}
where $N_k:= N^{\gamma^k}$. The following lemma is a simplified version
of~\cite[Lemmas~4.2 and 4.3]{biskup2004scaling} and provides appropriate
choices of parameters so that the above idealized picture is achieved with high
probability.
\begin{lema}[Hierarchy]
\label{lema:hierarchy}
Fix $\varepsilon > 0$ and $\gamma \in \bigl(\frac{s}{2d}, 1\bigr)$.
For $x, y \in \ensuremath{\mathbb{Z}}^{d}$ and $N := |x-y|$, let $n \in \ensuremath{\mathbb{N}}$ be the greatest
positive integer such that
\begin{equation}
n \log (1/\gamma) \le \log^{(2)} N - \varepsilon \log^{(3)} N.
\label{eq:relation_n_N}
\end{equation}
There is $N'(\varepsilon, \gamma, d)$ and
$b = b(d) \in (0,1)$ such that if $N \geq N'$ then for any hierarchy
$\ensuremath{\mathcal{H}}_n (x,y)$ satisfying~\eqref{eq:cB_n_definition} we have
\begin{equation}
\label{eq:highway_dist_bounds}
\forall\, 0 \le k \le n-2, \text{ and } \sigma \in \{0,1\}^{k},\,\,\,
|z_{\sigma 01} - z_{\sigma 10}| \in [b N_{k}, b^{-1} N_{k}].
\end{equation}
Moreover, there is a positive constant $c = c(\beta, d, s)$ such that
\begin{equation}
\label{eq:prob_cB_n_bound}
\ensuremath{\mathbb{P}}\bigl(\ensuremath{\mathcal{B}}_n(x,y)^{{\mathsf c}}\bigr)
\le 2^{n-1} \cdot e^{ - c N_n^{(2d\gamma - s)} }
\le \exp\bigl[ - c e^{(2d\gamma - s) (\log^{(2)} N)^{\varepsilon}} \bigr].
\end{equation}
\end{lema}
\begin{remark}
Let $\Delta' := \frac{\log 2}{\log (1/\gamma)}$.
The definition of $n$ yields:
\begin{equation}
\label{eq:n_defi_consequences}
2^{n}
\le (\log N)^{\Delta'}
\quad \text{and} \quad
e^{(\log^{(2)} N)^{\varepsilon}}
\le N_n \le e^{(1/\gamma)(\log^{(2)} N)^{\varepsilon}}.
\end{equation}
In fact, by the definition of $n$ and $N_n$ we can write
\begin{align*}
N_n
&:= N^{\gamma^{n}}
= \exp\bigl[ \exp[ \log^{(2)} N + n \log \gamma ] \bigr], \\
\text{and also} \qquad
\varepsilon \log^{(3)} N
&\le \log^{(2)} N + n \log \gamma
\le \varepsilon \log^{(3)} N + \log (1/\gamma).
\end{align*}
Therefore,
\begin{equation*}
e^{(\log^{(2)} N)^{\varepsilon}}
= e^{\exp[ \varepsilon \log^{(3)} N ]}
\le N_n
\le e^{\exp[ \varepsilon \log^{(3)} N + \log (1/\gamma) ]}
= e^{(1/\gamma)(\log^{(2)} N)^{\varepsilon}}.
\end{equation*}
The other inequality in~\eqref{eq:n_defi_consequences} follows from
$n \log (1/\gamma) \le \log^{(2)} N$.
\end{remark}
\begin{proof}[Proof of Lemma \ref{lema:hierarchy}]
By~\eqref{eq:n_defi_consequences}, we have that scales $N_k$ are
well-separated meaning that, for $0 \le k \le n-1$,
\begin{equation}
\label{eq:scale_ratio}
\frac{N_k}{N_{k+1}}
= N_k^{1 - \gamma}
\geq N_{n}^{1-\gamma}
\geq e^{(1-\gamma) (\log^{(2)} N)^{\varepsilon}}.
\end{equation}
Let $0 \le k \le n-2$ and $\sigma \in \{0,1\}^{k}$.
By~\eqref{eq:cB_n_definition} we have that
\begin{equation*}
|z_{\sigma 0} - z_{\sigma 1}|_{\infty} = \Theta(N_k)
\quad \text{and} \quad
|z_{\sigma 0} - z_{\sigma 01}|_{\infty},
|z_{\sigma 1} - z_{\sigma 10}|_{\infty} = \Theta(N_{k+1})
\end{equation*}
and thus the triangular inequality and \eqref{eq:scale_ratio} imply
\begin{equation*}
|z_{\sigma 01} - z_{\sigma 10}|_{\infty}
= \Theta(N_{k}) + 2\Theta(N_{k+1})
= \Theta(N_k),
\end{equation*}
and~\eqref{eq:highway_dist_bounds} follows.
To obtain~\eqref{eq:prob_cB_n_bound} we partition $\ensuremath{\mathcal{B}}_n^{{\mathsf c}}$ according to
the first depth $k$ at which we fail to find highways. For that value of
$k$ the event $\mathcal{B}_{k-1}$ occurs and there is a hierarchy
$\mathcal{H}_{k-1}$ satisfying \eqref{eq:cB_n_definition}.
Let us fix a gap in $\ensuremath{\mathcal{H}}_{k-1}$, which is either the form
$(z_{\sigma 00}, z_{\sigma 01})$ or $(z_{\sigma 10}, z_{\sigma 11})$ with
$\sigma \in \{0,1\}^{k-3}$. For the corresponding pair of neighborhoods, say
\begin{equation*}
\{z' \colon \tfrac{1}{2} N_{k-1} \le |z_{\sigma 00}-z'|_{\infty} \le
N_{k-1}\}
\quad \text{and} \quad
\{z' \colon \tfrac{1}{2} N_{k-1} \le |z_{\sigma
01}-z'|_{\infty} \le N_{k-1}\},
\end{equation*}
none of the edges between these neighborhoods must be open.
By~\eqref{eq:cB_n_definition} these neighborhoods are centered at sites
whose distance belongs to $\bigl[\tfrac{1}{2}N_{k-2}, N_{k-2}\bigr]$.
Moreover, each neighborhood has $c N_{k-1}^{d}$ vertices.
A straightforward adaptation of the argument leading
to~\eqref{eq:highway} applied to scale $N_{k-2}$ shows that the probability
of not finding an open edge linking a fixed pair of neighborhoods is
bounded above by
\begin{align*}
& \exp\bigl[ - \beta c N_{k-1}^{2d} N^{-s}_{k-2} \bigr]
\le \exp\bigl[ - c N_{n}^{2d\gamma - s} \bigr],
\end{align*}
where $c = c(\beta, d, s) > 0$.
Since there are $2^{k-2}$ pairs of neighborhoods we have:
\begin{equation*}
\ensuremath{\mathbb{P}}(\ensuremath{\mathcal{B}}_n^{{\mathsf c}})
= \sum_{k=2}^{n} \ensuremath{\mathbb{P}}(\ensuremath{\mathcal{B}}_{k-1} \cap \ensuremath{\mathcal{B}}_{k}^{{\mathsf c}})
\le \sum_{k=2}^{n} 2^{k-2}
e^{ - c N_{n}^{2d\gamma - s} }
\le 2^{n-1} \cdot e^{ - c N_{n}^{2d\gamma - s} }.
\end{equation*}
The last bound in~\eqref{eq:prob_cB_n_bound} follows
from~\eqref{eq:n_defi_consequences}.
\end{proof}
\section{Bounding the Euclidean distance}
\label{sec:bounding_euclidean_distance}
Using the hierarchical construction from Biskup~\cite{biskup2004scaling} we
obtain a collection of highways that provides the main contribution for finding
open paths between two distant sites. However, the remaining gaps must still
be connected in order to find an open path between the original two points that
actually uses these highways. In~\cite{biskup2004scaling} this is accomplished
by requiring that the vertices $z_{\sigma}$ in $\ensuremath{\mathcal{H}}_n(x,y)$ belong to
sufficiently large but local clusters. For our model we take a similar but
different strategy.
The idea is to make a hybrid approach, considering a renormalized lattice to
define a site-bond percolation model. The bond percolation part will be
coupled to a long-range percolation model. Independently of this bond
percolation part we define a site percolation that will be used to glue
together these highways, using an idea from Antal and
Pisztora~\cite{antal1996chemical}.
\subsection{Renormalization scheme}
We begin describing the renormalization procedure. Partition $\ensuremath{\mathbb{Z}}^2$ into a
collection of boxes $(B_x;\; x \in \ensuremath{\mathbb{Z}}^2)$ where $B_x = B_x(K) := Kx +
[-K/2,K/2]^{2}$. The exact choice of $K$ will depend on the parameters $u,
\alpha$ of the model and is deferred till
Lemma~\ref{lema:renormalized_properties}. Each box $B_x$ is assigned an
\textit{enlarged box} and a \textit{core}, defined respectively as
\begin{equation*}
B'_x := Kx + \bigl[-\tfrac{9K}{10}, \tfrac{9K}{10}\bigr]^{2}
\quad \text{and} \quad
B''_x := Kx + \bigl[-\tfrac{K}{10}, \tfrac{K}{10}\bigr]^{2}.
\end{equation*}
We say that the box of the origin $B_o$ is \textit{good} if the event
\begin{equation}
\label{eq:event_for_good_box}
\Bigl\{
\bigl[\tfrac{5K}{10}, \tfrac{7K}{10}\bigr] \times
\bigl[-\tfrac{9K}{10},-\tfrac{7K}{10}\bigr]
\sim_{\xi}
\bigl[\tfrac{5K}{10}, \tfrac{7K}{10}\bigr] \times
\bigl[ \tfrac{7K}{10}, \tfrac{9K}{10}\bigr]
\Bigr\}
\end{equation}
occurs, as well as the three similar events resulting from
\eqref{eq:event_for_good_box} by rotations by $\tfrac{\pi}{2}$, $\pi$ and
$\tfrac{3\pi}{2}$ around the origin, see Figure~\ref{fig:good_box}. The events
$\{\text{$B_x$ is good}\}$ are defined analogously; in words, a box $B_x$ is
good if it is enclosed by a well-positioned circuit of overlapping ellipses
contained in its enlarged box, see Figure~\ref{fig:good_box}. We also say that
a site $x$ is good if its respective renormalized box, $B_x$, is good.
If $B_x$ is good, we denote by $O_x$ a circuit of ellipses that realizes
such event, chosen according to some predetermined rule.
Our site-bond percolation model is defined via the following configurations:
\begin{description}
\item[\textbf{Site percolation:}]
$\bigl(\omega_{x}\bigr)
:= \bigl(\mathds{1}\{\text{$B_x$ is good}\}; x \in \ensuremath{\mathbb{Z}}^{2} \bigr)$;
\item[\textbf{Bond percolation:}]
$\bigl(\omega_{xy}\bigr)
:= \bigl(\mathds{1}\{B''_x \sim_{\xi} B''_y\};\;
x,y \in \ensuremath{\mathbb{Z}}^{2}, x \neq y \bigr)$.
\end{description}
It follows from our construction that $\bigl(\omega_{x}\bigr)$ and
$\bigl(\omega_{xy}\bigr)$ are independent processes since they are defined in
terms of the PPP $\xi$ restricted to disjoint regions of $\ensuremath{\mathbb{R}}^4$. For the same
reason, $(\omega_x)$ is an independent (Bernoulli) site percolation process on
$\mathbb{Z}^2$.
\begin{figure}
\centering
\begin{tikzpicture}[scale=0.3]
\draw[ultra thick] (-5,-5) rectangle (5,5);
\draw (-9,-9) rectangle (9,9);
\filldraw[gray, opacity=.7] (-1,-1) rectangle (1,1);
\foreach \x in {0, 90, 180, 270}{
\begin{scope}[rotate=\x]
\draw[dashed] (5,7) rectangle (7,9)
(7,5) rectangle (9,7);
\filldraw[gray, opacity=.7,rotate around={ 1:(0,6)}]
(0,6) circle (7.3 and .2);
\end{scope}
}
\draw[|<->|] (10,-9) -- (10,-7) node[midway, right] {$K/5$};
\draw[|<->|] (10,-7) -- (10,-5) node[midway, right] {$K/5$};
\draw[|<->|] (10,-5) -- (10, 5) node[midway, right] {$K$};
\draw[|<->|] (10, 5) -- (10, 9) node[midway, right] {$2K/5$};
\end{tikzpicture}%
\hspace{3mm}
\begin{tikzpicture}[scale=0.3]
\clip (-9,-9) rectangle (9,9);
\foreach \x/\y in {0/blue, 90/red, 180/green, 270/magenta}{
\begin{scope}[rotate=\x]
\draw[color=\y,dashed, thick] (0,3) rectangle (3,6)
(3,0) rectangle (6,3);
\filldraw[color=\y,opacity=.7] (-9,-9) rectangle (-6,-6);
\filldraw[rotate around={ 1:(1,-9)},color=\y,opacity=.7]
(1,-9) circle (.5 and 13);
\filldraw[rotate around={ 1:(-9,2)},color=\y,opacity=.7]
(-9,2) circle (13 and .5);
\end{scope}
}
\draw[line width=1mm] (-9,0) -- (9,0) (0,-9) -- (0,9);
\end{tikzpicture}
\caption{A renormalized box $B_x$ is good if there is a carefully
positioned surrounding circuit of ellipses $O_x$ contained in its enlarged box $B'_x$;
we also highlight its core $B''_x$.
On the right, we emphasize that
$\ast$-neighboring good boxes must have their respective outer
circuits interlaced.
Outer circuits and cores of a same box are shown in
matching colors to help visualization.}
\label{fig:good_box}
\end{figure}
Our definition of a good box is close to the definition of good boxes used
in~\cite{antal1996chemical}. Essentially, it ensures that in a cluster of good
boxes one is able to move from one box to a neighboring one remaining inside
the covered set. This holds not only when moving along the coordinate
directions (to a box that shares a side) but also when moving diagonally (to a
box that shares a single vertex). We briefly discuss this notion of
connectivity now introducing notation that is very similar to that
of~\cite{antal1996chemical}.
\textbf{On $\ast$-connected sets.}
For $x, y \in \ensuremath{\mathbb{Z}}^{d}$ define
\begin{equation*}
x \sim y \quad \text{if $|x-y|=1$}
\quad \text{and} \quad
x \stackrel{\ast}{\sim} y \quad \text{if $|x-y|_{\infty}=1$}.
\end{equation*}
Given a configuration ${\omega \in \{0,1\}^{\ensuremath{\mathbb{Z}}^{d}}}$, we say that a site $x
\in \mathbb{Z}^d$ is good if $\omega_x=1$. Otherwise $x$ is said bad. Denote
by $\textup{\textbf{C}}^{\ast}_x$ the bad cluster (with respect to $\stackrel{\ast}{\sim}$) containing $x$.
We use the convention that $\textup{\textbf{C}}^{\ast}_x = \varnothing$ if $x$ is good.
For a finite subset $\Lambda \subset \ensuremath{\mathbb{Z}}^{d}$
define its \textit{outer} and \textit{inner} boundaries by
\begin{equation*}
\partial^{o} \Lambda
:= \{x \in \Lambda^{c};\; \exists y \in \Lambda, x \sim y\}
\quad \text{and} \quad
\partial^{i} \Lambda
:= \{x \in \Lambda;\; \exists y \in \Lambda^{c}, x \sim y\},
\end{equation*}
respectively.
We use the convention that $\partial^{o} \textup{\textbf{C}}^{\ast}_x = \{x\}$ when $x$ is good.
For $\Lambda$ finite, its complementary set $\Lambda^{c}$ contains a finite
number of connected components $\Lambda_1, \ldots, \Lambda_k$. Exactly one of
them, say $\Lambda_1$ is infinite; the other ones, if any, are called
\textit{holes}. When holes exist, we define $\smash{\widehat{\Lambda}} := \Lambda \cup
\Lambda_2 \cup \ldots \cup \Lambda_k$ which may be regarded as the result of
filling all holes in $\Lambda$. We also define the \textit{external outer
boundary} and the \textit{external inner boundary} of $\Lambda$ respectively as
\begin{equation*}
\partial^{o}_{e} \Lambda := \partial^{o} \smash{\widehat{\Lambda}}
\quad \text{and} \quad
\partial^{i}_{e} \Lambda := \partial^{i} \smash{\widehat{\Lambda}}.
\end{equation*}
An important topological fact is given
by~\cite[Statement (3.35)]{antal1996chemical}:
\begin{display}
\label{eq:ast_connect_property}
for any finite $\Lambda$ that is $\ast$-connected we have that\\
$\partial^{o}_{e} \Lambda$ and $\partial^{i}_{e} \Lambda$
are both $\ast$-connected.
\end{display}
This is important because whenever we find a region composed of bad sites, we
can contour that bad region using its exterior boundary of good sites.
\medskip
\noindent
\textbf{On the renormalized model.}
Recall that the PPP $\xi$ can be parametrized using either $(s, \beta)$ or
$(u, \alpha)$, by~\eqref{eq:parameters_relation}.
\begin{lema}
\label{lema:renormalized_properties}
The following properties hold for the renormalized model:
\begin{itemize}
\item[\textbf{\textup{P1}}.] Fix $p \in (0,1)$ and $\beta_0 > 0$.
There is $K(u, \alpha, p, \beta_0)$ large enough such that
$(\omega_x)$ dominates independent site percolation with parameter $p$ and
$(\omega_{xy})$ dominates long-range percolation with
$p_{xy} = 1 - e^{-\beta_0 |x-y|^{-s}}$.
\item[\textbf{\textup{P2}}.] If $W$ is a $\ast$-connected set of good sites then all
the surrounding circuits $O_x$, $x\in W$ are contained in the same connected component of ellipses.
\item[\textbf{\textup{P3}}.] If $\textup{\textbf{C}}^{\ast}_x$ is finite, then
$\partial^{o}_{e} \textup{\textbf{C}}^{\ast}_x$ is a $\ast$-connected set of good sites.
\end{itemize}
\end{lema}
\begin{proof}
Property \textbf{P2} is a straightforward geometric consequence of the
definition (see Figure~\ref{fig:good_box}) and Property \textbf{P3}
follows from~\eqref{eq:ast_connect_property}.
We now prove Property \textbf{P1}. Denote by $A_0$ the event
in~\eqref{eq:event_for_good_box} and by $A_i$, for $1 \le i \le 3$ the
three similar events resulting from \eqref{eq:event_for_good_box} by
rotations by $\tfrac{\pi}{2}$, $\pi$ and $\tfrac{3\pi}{2}$ around the
origin, respectively. Since $\xi$ is invariant with respect to
translations and rotations, any $A_i$ has probability
\begin{equation*}
\ensuremath{\mathbb{P}}(A_i)
= \ensuremath{\mathbb{P}}\bigl([-\tfrac{K}{10}, \tfrac{K}{10}]^2 \sim_{\xi}
(\tfrac{8K}{5}, 0) + [-\tfrac{K}{10}, \tfrac{K}{10}]^2\bigr)
\geq 1 - e^{
- \beta \, \smash{(\max\limits_{x,y}} {|x-y|)}^{-s} \cdot
{(\frac{K}{5})}^{4}
}
\end{equation*}
where the maximum runs over all points $x$ and $y$ in the first and second
boxes, respectively. The maximum is a constant multiple of $K$, so we can write
\begin{equation*}
\ensuremath{\mathbb{P}}(A_i)
\geq 1 - e^{ - c K^{4-s} } \to 1
\quad \text{as $K \to \infty$}
\end{equation*}
for some constant $c = c(\beta, s) > 0$, since we are assuming
$s \in (3, 4)$. Then, FKG inequality implies $\ensuremath{\mathbb{P}}(\text{$B_o$ is good})$ also
tends to $1$.
For the probability of an edge being open, we notice that
$B''_x \sim_{\xi} B''_y$ is a scaling by $K/5$ of event
\begin{equation}
\label{eq:rescaled_crossing}
\Bigl\{ \bigl[-\tfrac{1}{2}, \tfrac{1}{2}\bigr]^{2} \sim_{\xi}
5(y-x) + \bigl[-\tfrac{1}{2}, \tfrac{1}{2}\bigr]^{2} \Bigr\}.
\end{equation}
By~\eqref{eq:scaling_mu} we can relate the probability of $B''_x \sim_{\xi}
B''_y$ with that of the event in \eqref{eq:rescaled_crossing} under a
rescaled long-range model whose intensity can be made as high as we want by
increasing $K$. This completes the proof of Property \textbf{P1}.
\end{proof}
\subsection{Gluing highways}
\label{sub:gluing_highways}
Given two fixed sites $x, y \in \ensuremath{\mathbb{R}}^2$, Lemma~\ref{lema:hierarchy} roughly
states that, for the long-range model in the renormalized lattice, hierarchies
exist with very high probability. On the event $x \leftrightarrow y$ we want
to use the highway structure entailed by one of these hierarchies in order to
find a path that connects $x$ to $y$ efficiently.
For $z \in \mathbb{R}^2$, let $a(z) \in \ensuremath{\mathbb{Z}}^{2}$ be the unique site in
$\ensuremath{\mathbb{Z}}^{2}$ such that $z \in Ka(z) + [-K/2,K/2)^{2}$. The distance between the
original points $x$ and $y$ and the distance between their respective
counterparts $a(x)$ and $a(y)$ in the renormalized lattice can be compared as
\begin{align}
|x-y|
&= \bigl|(x - Ka(x)) - (y - Ka(y)) + K(a(x) - a(y))\bigr| \nonumber\\
\label{eq:relation_points_sites}
&= K \cdot \bigl|a(x) - a(y)\bigr| + KO(1).
\end{align}
Here the $L_2$-norm could be replaced by any other norm on $\ensuremath{\mathbb{R}}^2$.
Lemma~\ref{lema:hierarchy} implies that $\ensuremath{\mathcal{B}}_n(a(x), a(y))$
has probability close to 1 (provided that $N$ is large and $n$ satisfies
\eqref{eq:relation_n_N}). Conditional on $\ensuremath{\mathcal{B}}_n$, we can find a collection of
sites $\bigl(z_{\sigma}; \sigma \in \{0,1\}^{n}\bigr)$ together with the
endowed highway structure connecting some of them. If there is more than one
choice, just pick one of them according to a predetermined rule.
We still have to ensure that all the remaining gaps, that is, all the $2^{n-1}$
edges of type $(z_{\sigma 00}, z_{\sigma 01})$ or $(z_{\sigma 10}, z_{\sigma
11})$ for $\sigma \in \{0,1\}^{n-2}$ are connected with high probability.
This can be done with the aid of an argument from~\cite{antal1996chemical}.
We can specify each gap uniquely as $(z_{\sigma 0}, z_{\sigma 1})$, with
$\sigma \in \{0,1\}^{n-1}$. Writing $\tilde{N} := |a(x) - a(y)|$ and
$\tilde{N}_k = \tilde{N}^{\gamma^{k}}$, on the event $\ensuremath{\mathcal{B}}_n(a(x), a(y))$ we
have
\begin{equation}
\label{eq:dist_gaps}
|z_{\sigma 1} - z_{\sigma 0}|_{\infty}
\in \Bigl[\tfrac{1}{2} \tilde{N}_{n-1}, \tilde{N}_{n-1}\Bigr]
\quad \text{for every $\sigma \in \{0,1\}^{n-1}$,}
\end{equation}
see \eqref{eq:cB_n_definition}.
Moreover, \eqref{eq:highway_dist_bounds}
guarantees that the highways of the form $(z_{\sigma 01}, z_{\sigma 10})$ with
$\sigma \in \{0,1\}^{k}$ and $0\leq k \leq n-2$ have length
$|z_{\sigma 01} - z_{\sigma 10}| = \Theta(\tilde{N}_{k})$.
From the point of view of our original ellipses model, a highway connecting
$z_{\sigma 01}$ and $z_{\sigma 10}$ represents an actual ellipse $E_{\sigma}$
that realizes the event $B''_{z_{\sigma 10}} \sim_{\xi} B''_{z_{\sigma 01}}$. Thus,
\newconstant{c:ellipse_length}
\begin{equation}
\label{eq:highway_diam}
\mathop{\mathrm{diam}}\nolimits (E_{\sigma})
= K \cdot \bigl(|z_{\sigma 10} - z_{\sigma 01}| + O(1)\bigr)
\end{equation}
and consequently the
\begin{equation}
\label{eq:highway_boxes_touched}
\text{(number of renormalized boxes intersected by $E_{\sigma}$)}
\in \bigl[
\uc{c:ellipse_length} \tilde{N}_{k},
\uc{c:ellipse_length}^{-1} \tilde{N}_{k}
\bigr]
\end{equation}
for a positive constant $\uc{c:ellipse_length}$ that will remain fixed from now
on. Also, the site percolation process $(\omega_x)$ is independent of the
collection $\bigl(z_{\sigma}; \sigma \in \{0,1\}^{n}\bigr)$.
For each gap $(z_{\sigma 0}, z_{\sigma 1})$, with $\sigma \in \{0,1\}^{n-1}$
write $m_{\sigma} := |z_{\sigma 0} - z_{\sigma 1}|_1$ and fix a deterministic
path (according to a predetermined rule) of $m_{\sigma} + 1$ neighboring sites
that realize this distance, meaning
\begin{equation*}
z_{\sigma 0} = z^{(\sigma)}_{0}, z^{(\sigma)}_{1}, \ldots,
z^{(\sigma)}_{m_{\sigma}} = z_{\sigma 1}
\quad \text{
with \quad $z^{(\sigma)}_{j} \sim z^{(\sigma)}_{j+1}$ for $0 \le j < m_{\sigma}$.
}
\end{equation*}
Recall that $\textup{\textbf{C}}^{\ast}_z$ denotes the $\ast$-connected cluster of bad sites
containing $z$ and define $\smash{\bar{\textup{\textbf{C}}}}^{\ast}(z) := \textup{\textbf{C}}^{\ast}_z \cup \partial^{o}\textup{\textbf{C}}^{\ast}_z$. We
look at the random subset of $\ensuremath{\mathbb{R}}^{2}$ composed by the boxes associated to the
bad clusters of the sites along the path $(z^{(\sigma)}_j)$:
\begin{equation}
\label{eq:defi_W_sigma}
W_{\sigma}
:= \bigcup_{j=0}^{m_{\sigma}} \Bigl(
\bigcup_{z \in \smash{\bar{\textup{\textbf{C}}}}^{\ast}(z^{(\sigma)}_j)} B'_{z} \Bigr).
\end{equation}
Denoting by $\# W_{\sigma}$ the number of sites in the renormalized lattice
that one needs to explore to find $W_{\sigma}$, we have:
\newconstant{c:W}
\begin{lema}
\label{lema:control_W_sigma}
For every $a > 0$ there exists $\uc{c:W} = \uc{c:W}(a, p) > 0$
such that
\begin{equation}
\label{eq:control_W_sigma}
\ensuremath{\mathbb{P}} \Bigl(
\ensuremath{\mathcal{B}}_{n} \cap \Bigl(\hspace{-3mm}
\bigcup_{\sigma \in \{0,1\}^{n-1}} \hspace{-3mm}
\bigl\{\# W_{\sigma} \geq a \tilde{N}_{n-2} \bigr\}
\Bigr)
\Bigr)
\le 2^{n-1} \cdot e^{-\uc{c:W} \tilde{N}_{n-2}} \ll 1.
\end{equation}
\end{lema}
\begin{proof}
We have $\# \smash{\bar{\textup{\textbf{C}}}}^{\ast}_z = 1$ when $z$ is good.
Otherwise, since each site of $\textup{\textbf{C}}^{\ast}_z$ has at most 8 neighbors
\begin{equation*}
\# W_{\sigma}
\le \sum_{j=0}^{m_{\sigma}} \# \smash{\bar{\textup{\textbf{C}}}}^{\ast}(z^{(\sigma)}_j)
\le 1 + m_{\sigma} + 8 \sum_{j=0}^{m_{\sigma}} \# \textup{\textbf{C}}^{\ast}(z^{(\sigma)}_j).
\end{equation*}
Also, using an argument from~\cite{antal1996chemical} based on a previous
construction in Fontes and Newman~\cite{fontes1993first} (see the proof of
Theorem~4), if $(\smash{\tilde{\textup{\textbf{C}}}}^{\ast}_z)_{z\in \ensuremath{\mathbb{Z}}^{2}}$ is a collection of independent
random subsets of $\ensuremath{\mathbb{Z}}^{2}$ with $\smash{\tilde{\textup{\textbf{C}}}}^{\ast}_z \ensuremath{\stackrel{\scriptstyle d}{=}} \textup{\textbf{C}}^{\ast}_o$, then
$(\smash{\tilde{\textup{\textbf{C}}}}^{\ast}_z)$ dominates stochastically $(\textup{\textbf{C}}^{\ast}_z)$.
Defining $Y_z := \# \smash{\tilde{\textup{\textbf{C}}}}^{\ast}_z$, we have that $(Y_z, z\in \ensuremath{\mathbb{Z}}^{2})$ are
i.i.d.\ random variables with the same distribution as $\# \textup{\textbf{C}}^{\ast}_o$.
We have for $Y_j := \smash{Y_{z_j^{(\sigma)}}}$ that
\begin{equation*}
\# W_{\sigma}
\preccurlyeq 1 + m_{\sigma} +
8 \sum_{j=0}^{m_{\sigma}} \# \smash{\tilde{\textup{\textbf{C}}}}^{\ast}(z^{(\sigma)}_j)
\ensuremath{\stackrel{\scriptstyle d}{=}} 1 + m_{\sigma} + 8 \sum_{j=0}^{m_{\sigma}} Y_j.
\end{equation*}
Notice that $\textup{\textbf{C}}^{\ast}_o$ is a $\ast$-cluster of bad sites in a Bernoulli site
percolation of parameter $p$ and by Lemma~\ref{lema:renormalized_properties}
we can start the construction with $p$ sufficiently close to 1 so that
the probability of a site being bad, $1-p$, is subcritical, and then choose
$K(u, \alpha, p, \beta_0)$ accordingly. Exponential decay of cluster size (see
e.g.~\cite[Theorem~(6.75)]{grimmett1999percolation}) yields
$\psi(p) > 0$ such that $h(p) := \ensuremath{\mathbb{E}}\bigl[e^{\psi(p) Y_j}\bigr] < \infty$.
Hence, for any fixed $\sigma \in \{0,1\}^{n-1}$, an application of Markov's Inequality yields
\begin{align*}
\ensuremath{\mathbb{P}} \bigl(\ensuremath{\mathcal{B}}_{n} \cap \{\# W_{\sigma} \geq a \tilde{N}_{n-2}\} \bigr)
&\le \ensuremath{\mathbb{P}} \Bigl(
\sum_{j=0}^{m_{\sigma}} Y_j
\geq \frac{a}{8} \tilde{N}_{n-2} + O(m_{\sigma})
\Bigr) \\
&\le \exp\Bigl[- \frac{a\psi(p)}{8} \tilde{N}_{n-2} + O(m_{\sigma})\Bigr] \cdot
\ensuremath{\mathbb{E}} \bigl[ e^{\psi(p) \sum_{j=0}^{m_{\sigma}} Y_j} \bigr] \\
&= \exp\Bigl[
- \frac{a\psi(p)}{8} \tilde{N}_{n-2} + O(m_{\sigma}) +
\log h(p) \cdot m_{\sigma}
\Bigr].
\end{align*}
Finally, by~\eqref{eq:dist_gaps} we can write
\begin{equation*}
m_{\sigma}
= |z_{\sigma 0} - z_{\sigma 1}|_1
= \Theta(\tilde{N}_{n-1})
\ll \tilde{N}_{n-2}.
\end{equation*}
The estimate on~\eqref{eq:control_W_sigma} follows from a union bound and the
bounds obtained in~\eqref{eq:n_defi_consequences}.
\end{proof}
Recall the definition of $\uc{c:ellipse_length}$
in~\eqref{eq:highway_boxes_touched} and take
$a = \frac{1}{3}\uc{c:ellipse_length}$ at Lemma~\ref{lema:control_W_sigma}.
Define
\begin{equation}
\ensuremath{\mathcal{W}}_n :=
\hspace{-3mm}
\smash{\bigcap_{\sigma \in \{0,1\}^{n-1}}} \hspace{-3mm}
\bigl\{\# W_{\sigma} \le \tfrac{\uc{c:ellipse_length}}{3}
\tilde{N}_{n-2} \bigr\}.
\end{equation}
We have $\ensuremath{\mathbb{P}}(\ensuremath{\mathcal{B}}_{n} \cap \ensuremath{\mathcal{W}}_{n}^{{\mathsf c}}) \ll 1$, meaning that with high
probability every $W_{\sigma}$ is too small to contain any highway. Fix some
$\sigma \in \{0,1\}^{n-1}$. By \textbf{P2} and \textbf{P3} on
Lemma~\ref{lema:renormalized_properties} we can use the external inner boundary
$\partial^{i}_{e} W_{\sigma}$, a $\ast$-connected set of good boxes, to glue
together the highways that arrive at $z_{\sigma 0}$ and $z_{\sigma 1}$, the
procedure is illustrated in Figure~\ref{fig:gluing_highways}.
\begin{figure}
\centering
\begin{tikzpicture}[scale=1.2,
dot/.style={
draw,circle,minimum size=1mm,inner sep=0pt,outer
sep=0pt,fill=black}
]
\clip (-2,-.5) rectangle (9, 4.5);
\draw (-2,-.5) grid (9, 4.5);
\filldraw[gray, opacity=.8]
(0,0) rectangle ++(1,2)
(1,0) rectangle ++(1,1)
(3,0) rectangle ++(1,2)
(4,2) rectangle ++(3,1)
(7,1) rectangle ++(1,1);
\filldraw[gray, opacity=.3]
(-1,-1) rectangle ++(6,1)
(-1, 0) rectangle ++(10,3)
(3,3) rectangle ++(5,1);
\filldraw[blue, opacity=.7,rotate around={147:(9,2)}] (9, 2) circle (3 and .2);
\filldraw[blue, opacity=.7,rotate around={-95:(1,5)}] (1, 5) circle (4.5 and .2);
\node at (0.5,0.3) {$B_{z_{\sigma 1}}$};
\node at (6.5,3.3) {$B_{z_{\sigma 0}}$};
\draw[ultra thick] (0,0) grid (7,1) (6,1) grid (7, 4);
\end{tikzpicture}
\caption{Region $W_{\sigma}$ (light gray) explores
bad boxes (dark gray) on a deterministic path of boxes (thick lines) and
$\partial^{i}_{e} W_{\sigma}$ is made of good boxes. When
$\# W_{\sigma}$ is small, the highways arriving at
$B_{z_{\sigma 0}}$ and $B_{z_{\sigma 1}}$ can be connected through
$\partial^{i}_{e} W_{\sigma}$.}
\label{fig:gluing_highways}
\end{figure}
Suppose that we know that $\{x \leftrightarrow y\} \cap \ensuremath{\mathcal{B}}_n\bigl(a(x),
a(y)\bigr) \cap \ensuremath{\mathcal{W}}_{n}$ has occurred and fix a path $\ensuremath{\mathcal{P}}$ connecting $x$ to
$y$. Although $\ensuremath{\mathcal{P}}$ can be arbitrarily long, after the gluing process we can
build a path $\ensuremath{\mathcal{P}}'$ from $x$ to $y$ whose length is controlled. Let
$\underline{0}, \underline{1} \in \{0,1\}^{n-1}$ be the all zeroes and all ones
words, respectively.
\begin{defi}
\label{defi:path_cP_prime}
Path $\ensuremath{\mathcal{P}}'$ is defined as follows:
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\item Follow $\ensuremath{\mathcal{P}}$ from $x$ till it hits the first outer circuit $O_z$ of a good box $B_z$, with $z \in \partial^{i}_{e} W_{\underline{0}}$.
\item When $\ensuremath{\mathcal{P}}'$ first gets to $\partial^{i}_{e} W_{\sigma}$ with
$\sigma \neq \underline{1}$, use outer circuits to move towards the next highway.
\item When $\ensuremath{\mathcal{P}}'$ arrives at a highway, move in a straight line till
intersecting the next $\partial^{i}_{e} W_{\sigma}$.
\item When $\ensuremath{\mathcal{P}}'$ gets to $\partial^{i}_{e} W_{\underline{1}}$, use outer
circuits to move to the last point of $\ensuremath{\mathcal{P}}$ that intersects a circuit
$O_z$ in $\partial^{i}_{e} W_{\underline{1}}$ and then use
$\ensuremath{\mathcal{P}}$ to move to $y$.
\end{enumerate}
\end{defi}
We have good estimates for the length of path $\ensuremath{\mathcal{P}}'$ when moving on highways or
when using outer circuits of some $W_{\sigma}$.
However, some parts of $\ensuremath{\mathcal{P}}'$ could be wiggly (when following along $\ensuremath{\mathcal{P}}$) and
that could possibly add a considerable amount to the total length.
The next lemma allows us to improve the estimate on the length of
a path inside the covered set $\ensuremath{\mathcal{E}}$ when we move inside a bounded region.
\begin{lema}[Distance on small scales]
\label{lema:distance_small_scales}
Let $W \subset \ensuremath{\mathbb{R}}^{2}$ be a bounded connected set and let $x \in W$.
If $x \leftrightarrow \partial W$ then
\begin{equation}
\label{eq:chem_distance_small_scales}
D(x, \partial W) \le \frac{2}{\pi} \mathop{\mathrm{Vol}}\nolimits(W) + 1,
\end{equation}
and consequently
\begin{equation}
\label{eq:distance_small_scales}
\ensuremath{\mathscr{D}}(x, \partial W)
\le \Bigl(\frac{2}{\pi} \mathop{\mathrm{Vol}}\nolimits(W) + 1\Bigr) \cdot \mathop{\mathrm{diam}}\nolimits(W).
\end{equation}
\end{lema}
\begin{proof}
Denote by $\{e_i; 1 \le i \le m\}$ the set of all ellipses that intersect
$W$, which is almost surely finite since $W$ is bounded. Since
$x \leftrightarrow \partial W$ there is some point $y \in \partial W$
that can be reached from $x$ by a path contained in $\ensuremath{\mathcal{E}}$.
Take a path $\ensuremath{\mathcal{P}}$ that connects $x$ and $y$ without self-intersections.
For any fixed ellipse $e$ used by $\ensuremath{\mathcal{P}}$, if $\ensuremath{\mathcal{P}} \cap e$ is not a straight line
we can reduce the length of $\ensuremath{\mathcal{P}}$ by connecting its first and last visit to
that ellipse directly. This modified path may intersect $\partial W$ before
reaching $y$, but in this case we simply replace $y$ by the first point
of $\partial W$ that was reached. Thus, we can restrict ourselves to
polygonal paths.
Let $f : [0,1] \to \ensuremath{\mathbb{R}}^{2}$ be a continuous and injective parametrization
of $\ensuremath{\mathcal{P}}$ with $f(0) = x$ and $f(1) = y$, and define $I_j = f^{-1}(e_j)$. By the
properties of $\ensuremath{\mathcal{P}}$, we know that each $I_j$ is a closed interval and that
$[0,1] = \cup_{j=1}^{m} I_j$. We build a minimal set of ellipses that covers
$\ensuremath{\mathcal{P}}$ by doing a greedy exploration. We can assume that $x \in e_1$ and define
$i_1 := 1$. Then, inductively define $i_{j+1}$ as the
index of an ellipse that intersects $e_{i_{j}}$ and with rightmost point of
$I_{i_{j+1}}$ closest to 1. Since we have a finite collection,
the process ends on some index $i_n$; relabeling if necessary, we can consider
$i_j = j$ for $1 \le j \le n$.
By construction we have that $\ensuremath{\mathcal{P}} \subset \cup_{j=1}^{n} e_j$ and
each $e_j$ only intersects $e_{j-1}$ and $e_{j+1}$.
Finally,
by the same reasoning as in the beginning of the proof we can assume that $e_n$
is the first ellipse to intersect $\partial W$.
We can bound the size of $n$ by using the fact that
$\{e_{i};\; \text{$i$ odd}, 1 \le i \le n-1\}$ and
$\{e_{i};\; \text{$i$ even}, 1 \le i \le n-1\}$ are disjoint collections inside
$W$. Since each $e_i$ contains a ball of radius 1, we have that
\begin{equation*}
n-1 \le 2 \cdot \frac{\mathop{\mathrm{Vol}}\nolimits(W)}{\pi},
\end{equation*}
and we proved~\eqref{eq:chem_distance_small_scales}.
The bound on~\eqref{eq:distance_small_scales} follows by using that on each $e_i$
the length of $\ensuremath{\mathcal{P}}$ is bounded by $\mathop{\mathrm{diam}}\nolimits(W)$.
\end{proof}
\subsection{Proof of Theorem~\ref{teo:distance_ellipses_l2}}
\label{sub:proof_of_teo_distance_ellipses}
We now have all the ingredients to bound the Euclidean
distance between distant points inside a same cluster of ellipses.
\begin{proof}[Proof of Theorem~\ref{teo:distance_ellipses_l2}]
We can assume $\delta \in (0, 1 - \frac{2+\alpha}{4})$
and define ${\gamma := \frac{2+\alpha}{4} + \delta}$.
We analyze the probability of $\ensuremath{\mathscr{D}}(x,y)$ being large by decomposing
this event with respect to ${\ensuremath{\mathcal{B}}_n(a(x), a(y)) \cap \ensuremath{\mathcal{W}}_n}$,
obtaining
\begin{align*}
\ensuremath{\mathbb{P}}\bigl(x \leftrightarrow y,
&\,\ensuremath{\mathscr{D}}(x,y) > N + N^{\frac{2+\alpha}{4} + \delta}\bigr) \\
&= \ensuremath{\mathbb{P}}\bigl(
\{x \leftrightarrow y\} \cap \ensuremath{\mathcal{B}}_n \cap \ensuremath{\mathcal{W}}_n, \,
\ensuremath{\mathscr{D}}(x,y) > N + N^{\gamma}
\bigr) + o(1),
\end{align*}
since both $\ensuremath{\mathbb{P}} \bigl( \ensuremath{\mathcal{B}}_n^{{\mathsf c}} \bigr)$ and
$\ensuremath{\mathbb{P}} \bigl( \ensuremath{\mathcal{B}}_n \cap \ensuremath{\mathcal{W}}_n^{{\mathsf c}} \bigr)$ tend to zero with $N$ by
Lemmas~\ref{lema:hierarchy} and \ref{lema:control_W_sigma}, respectively.
On event $\{x \leftrightarrow y\} \cap \ensuremath{\mathcal{B}}_n \cap \ensuremath{\mathcal{W}}_n$
there is a path $\ensuremath{\mathcal{P}}$ between $x$ and $y$ and we use $\ensuremath{\mathcal{P}}$ to build a path
$\ensuremath{\mathcal{P}}'$ as in Definition~\ref{defi:path_cP_prime}.
Using Lemma~\ref{lema:distance_small_scales} we replace the parts of $\ensuremath{\mathcal{P}}'$
that use $\ensuremath{\mathcal{P}}$ on steps 1. and 4. by a path satisfying the bound
on~\eqref{eq:distance_small_scales}. Actually, we do not lose much by
applying~\eqref{eq:distance_small_scales} at every $W_{\sigma}$, since
\begin{equation*}
\mathop{\mathrm{Vol}}\nolimits(W_{\sigma})
\le {\bigl(\tfrac{9}{5}K\bigr)}^2 \cdot \# W_{\sigma}
\quad \text{and} \quad
\mathop{\mathrm{diam}}\nolimits(W_{\sigma})
\le \bigl(\tfrac{9\sqrt{2}}{5} K\bigr) \cdot \# W_{\sigma}.
\end{equation*}
By~\eqref{eq:n_defi_consequences} we have that
$\# W_{\sigma}
\le \tfrac{1}{3} \uc{c:ellipse_length} \tilde{N}_{n-2}
\le \tfrac{1}{3} \uc{c:ellipse_length} \cdot
e^{(1/\gamma)^{3}(\log^{(2)} \tilde{N})^{\varepsilon}}
$, implying
\begin{equation*}
\mathop{\mathrm{Vol}}\nolimits(W_{\sigma}) \cdot \mathop{\mathrm{diam}}\nolimits(W_{\sigma})
\le c \cdot K^3 \cdot e^{2/\gamma^{3} \cdot (\log^{(2)} \tilde{N})^{\varepsilon}}.
\end{equation*}
The length of $\ensuremath{\mathcal{P}}'$ can be estimated by
\begin{equation*}
l(\ensuremath{\mathcal{P}}')
\le c \sum_{\sigma} \mathop{\mathrm{Vol}}\nolimits(W_{\sigma}) \cdot \mathop{\mathrm{diam}}\nolimits(W_{\sigma})
+ \sum_{\sigma'} \mathop{\mathrm{diam}}\nolimits (E_{\sigma'})
\end{equation*}
where the index in the second sum runs over all highways.
Since there are $2^{n-1}$ gaps,
the bounds on~\eqref{eq:n_defi_consequences} imply
\begin{equation*}
\sum_{\sigma} \mathop{\mathrm{Vol}}\nolimits(W_{\sigma}) \cdot \mathop{\mathrm{diam}}\nolimits(W_{\sigma})
\le c K^3 \cdot (\log \tilde{N})^{\Delta'}
e^{2/\gamma^{3} \cdot (\log^{(2)} \tilde{N})^{\varepsilon}}.
\end{equation*}
For the second sum, notice that in the long-range model, for each $0 \le k \le n-2$ there are $2^{k}$ highways of size about $\tilde{N}_k$.
We can therefore write
\begin{align*}
\smash{\sum_{\sigma'}} \mathop{\mathrm{diam}}\nolimits (E_{\sigma'})
&\mathmakebox[1cm]{=} \mathop{\mathrm{diam}}\nolimits (E_{\varnothing}) +
\smash{\sum_{k=1}^{n-2}} 2^{k} \cdot K \Theta(\tilde{N}_k) \\[3mm]
&\mathmakebox[1cm]{
\smash{\stackrel{\eqref{eq:highway_diam}}{=}}
}
K \cdot \bigl(|z_{10} - z_{01}| + O(1)\bigr) +
K 2^{n-1} O(\tilde{N}_1) \\
&\mathmakebox[1cm]{
\smash{\stackrel{\eqref{eq:n_defi_consequences}}{=}}}
K \cdot \bigl( \tilde{N} + \Theta(\tilde{N}_{1})\bigr) +
K O \bigl((\log \tilde{N})^{\Delta'} \tilde{N}_1\bigr) \\
&\mathmakebox[1cm]{
\smash{\stackrel{\eqref{eq:relation_points_sites}}{=}}}
N + O \bigl((\log N)^{\Delta'} N^{\gamma} \bigr),
\end{align*}
implying the bound
$
l(\ensuremath{\mathcal{P}}')
\le N + O \bigl((\log N)^{\Delta'} N^{\gamma} \bigr).
$
Since $\gamma = \frac{2+\alpha}{4} + \delta$ and $\delta$ can be taken
arbitrarily small, we conclude the proof of~\eqref{eq:distance_ellipses}.
\end{proof}
\section{Bounding chemical distance}
\label{sec:bounding_chemical_distance}
Now we turn to investigating the chemical distance.
The same construction as in the proof of Theorem~\ref{teo:distance_ellipses_l2}
also provides an upper bound for the chemical distance
between $x$ and $y$, since it implies
\begin{align}
D(x,y)
&\le c \sum_{\sigma} \mathop{\mathrm{Vol}}\nolimits(W_{\sigma}) + \sum_{\sigma'} 1
\le c K^2 e^{(1/\gamma)^{3}(\log^{(2)} \tilde{N})^{\varepsilon}} + 2^{n-1}
\nonumber \\
\label{eq:chem_dist_up_worse}
&\le (\log |x-y|)^{\Delta' + o(1)}.
\end{align}
However, we can actually achieve a better bound.
In fact, although our collection of highways provides a structure of long ellipses that links far away points efficiently in terms of their Euclidean distance, it may be conceivable that the optimal strategy to minimize the chemical distance might differ.
An improvement to the bound in~\eqref{eq:chem_dist_up_worse} is given in the next result:
\begin{prop}
\label{prop:chem_dist_up}
For any $\delta > 0$ it holds that
\begin{equation}
\label{eq:chem_dist_up}
\lim_{|x-y| \to \infty}
\ensuremath{\mathbb{P}}
\Bigl(
D(x,y) \le \frac{2 + \delta}{\log (2/\alpha)} \cdot \log \log |x-y|
\Bigm| x \leftrightarrow y
\Bigr)
= 1.
\end{equation}
\end{prop}
\begin{proof}
The main construction for this bound is a way of moving faster than through
highways, see Figure~\ref{fig:chem_up_bound}. This construction has no
counterpart on discrete long-range model, since it leverages on the
property that two ellipses that cross in their middle section are
connected.
We consider a sequence $(l_n; n \geq 0)$ of increasing lengths which is defined
recursively by $l_n = l_{n-1}^{2/\alpha}(\log l_{n-1})^{-1}$. The value of
$l_0$ is fixed later. Consider also the following collection of boxes
\begin{equation*}
B_n =
\begin{cases}
[0, l_n] \times [0, l_{n-1}] & \text{if $n$ odd} \\
[0, l_{n-1}] \times [0, l_{n}] & \text{if $n$ even}
\end{cases}
\end{equation*}
and define event $A_n$ in which box $B_n$ is crossed in its
longest direction by one ellipse. By Lemma~\ref{lema:cross_box_one_ellipse}
and our choice of sequence $(l_n)$ we have
\begin{equation*}
\sum_{n\geq 1} \ensuremath{\mathbb{P}}(A_n^{{\mathsf c}})
\le \sum_{n\geq 1}
\exp\bigl[ - u \uc{c:cross_one_ellipse}^{-1}
l_n^{-\alpha} l_{n-1}^{2}\bigr]
= \sum_{n\geq 1}
\exp\bigl[ - u \uc{c:cross_one_ellipse}^{-1}
(\log l_{n-1})^{\alpha}\bigr]
\end{equation*}
Now, we check that the series above converges by estimating the growth rate of
sequence $(l_n)$. Notice that
$l_n \le l_{n-1}^{2/\alpha} \le l_0^{(2/\alpha)^{n}}$ and also that
this upper bound implies
\begin{align*}
l_n
= l_{n-1}^{2/\alpha} \cdot (\log l_{n-1})^{-1}
&\geq l_{n-1}^{2/\alpha} \cdot (2/\alpha)^{-(n-1)} (\log l_0)^{-1} \\
&\geq l_{n-2}^{(2/\alpha)^{2}} (2/\alpha)^{-(n-1) - (2/\alpha) (n-2)} (\log
l_0)^{-(1 + (2/\alpha))} \\
&\geq
l_{0}^{(2/\alpha)^{n}}
(2/\alpha)^{-\sum_{j=1}^{n} (n-j)(2/\alpha)^{j-1}}
(\log l_0)^{-\sum_{j=1}^{n} (2/\alpha)^{j-1}}.
\end{align*}
Computing the sums on the last line one obtains as $n \to \infty$ that
\begin{align*}
\sum_{j=1}^{n} (n-j)(2/\alpha)^{j-1}
&= (2/\alpha)^{n}
\bigl( \tfrac{2/\alpha}{((2/\alpha) - 1)^2} + o(1) \bigr), \\
\smash{\sum_{j=1}^{n}} (2/\alpha)^{j-1}
&= (2/\alpha)^{n} \bigl( \tfrac{1}{(2/\alpha) - 1} + o(1) \bigr),
\end{align*}
which leads to
\begin{equation*}
l_n
\geq
\exp\Bigl[
\Bigl(\frac{2}{\alpha}\Bigr)^{n}
\Bigl\{ \log l_0
- \frac{(2/\alpha)\log (2/\alpha)}{((2/\alpha) - 1)^2}
- \frac{\log \log l_0}{(2/\alpha) - 1}
+ o(1)
\Bigr\}
\Bigr]
\end{equation*}
and thus for some large $l_0 = l_0(\alpha)$ the coefficient in curly
brackets can be estimated from below by $2 + o(1)$, which implies
\begin{equation*}
\sum_{n\geq 1} \ensuremath{\mathbb{P}}(A_n^{{\mathsf c}})
\le \sum_{n\geq 1}
\exp\bigl[ - u c \bigl((2/\alpha)^{\alpha}\bigr)^{n-1}\bigr]
< \infty
\end{equation*}
since $(2/\alpha)^{\alpha} > 1$. This means we can make $\ensuremath{\mathbb{P}}(\cap_{n \geq n_0} A_n)$
arbitrarily close to one by taking $n_0$ sufficiently large. Notice that on
this event we move faster than when using highways, since we can get from
$B_{n_0}$ to distance $l_n$ using only $n - n_0$ ellipses.
Besides faster highways, we also build a useful collection of circuits.
Let $U^{0}_n$ be the event in which box
$[-2l_n, 2l_n] \times [l_n, 2l_n]$ is crossed in its longest direction
with one ellipse and let $U^{j}_n$ be the analogous events obtained by
rotating this box counterclockwise by $j \cdot \pi/2$, $j=1, 2, 3$.
Defining events $C_n := \cap_{j=1}^4 U^{j}_{n}$, we have by
Lemma~\ref{lema:cross_box_one_ellipse}
\begin{equation*}
\sum_{n\geq 1} \ensuremath{\mathbb{P}}(C_n^{{\mathsf c}})
\le \sum_{n\geq 1} 4 \ensuremath{\mathbb{P}}\bigl((U^{0}_{n})^{{\mathsf c}}\bigr)
\le 4 \sum_{n\geq 1} \exp[ -u c \cdot l_n^{2-\alpha} ] < \infty.
\end{equation*}
Moreover, on $C_n$ we have a circuit made of four ellipses, whose
supporting lines form a convex quadrilateral $Q_n$ that surrounds
$[-l_{n}, l_{n}]^2$ but stays inside $[-2l_{n_0}, 2l_{n_0}]^2$.
Now we are ready to prove~\eqref{eq:chem_dist_up}.
Without loss of generality, we can assume $y$ is the origin.
Fix any $\varepsilon > 0$ and choose $n_0$ sufficiently large such that
\begin{equation*}
\ensuremath{\mathbb{P}} \bigl( \cap_{n \geq n_0} A_n \bigr) \geq 1 - \varepsilon
\quad \text{and} \quad
\ensuremath{\mathbb{P}} \bigl( \cap_{n \geq n_0} C_n \bigr) \geq 1 - \varepsilon.
\end{equation*}
Let us also define $A_n(x)$ and $C_n(x)$ as the events analogous to
$A_n$ and $C_n$ but considering that $x$ is the origin.
Thus, if we define event
\begin{equation*}
V := \smash{
\Bigl(\bigcap_{n \geq n_0} A_n\Bigr) \cap
\Bigl(\bigcap_{n \geq n_0} C_n\Bigr) \cap
\Bigl(\bigcap_{n \geq n_0} A_n(x)\Bigr) \cap
\Bigl(\bigcap_{n \geq n_0} C_n(x)\Bigr)},
\end{equation*}
we can write
\begin{equation*}
\bigl|\ensuremath{\mathbb{P}}(o \leftrightarrow x) - \ensuremath{\mathbb{P}}(\{o \leftrightarrow x\} \cap V)\bigr|
\le \ensuremath{\mathbb{P}}(V^{{\mathsf c}}) \le 4 \varepsilon.
\end{equation*}
On event $\{o \leftrightarrow x\} \cap V$ we have
some path $\ensuremath{\mathcal{P}}$ of ellipses connecting $o$ to $x$. For $|x| > 2 l_{n_0}$ path
$\ensuremath{\mathcal{P}}$ intersects quadrilaterals $Q_{n_0}$ and $Q_{n_0}(x)$.
Let us define $n_1 = n_1(x)$ as the first index $k$
such that $x + B_{n_0} \subset [-l_{k}, l_{k}]^2$. We have that
\begin{equation*}
l_{n_1} \geq |x| + l_{n_0} > l_{n_1 - 1},
\quad \text{implying}\quad
n_1 = \frac{\log \log |x|}{\log (2/\alpha)} + O(1).
\end{equation*}
Finally, notice that event $\cap_{n \geq n_0} A_n$ ensures $Q_{n_0}$
is connected to $Q_{n_1}$ by a path $P$ of at most $n_1$ ellipses.
We can also find a path $P(x)$ of at most $n_1$ ellipses connecting
$Q_{n_0}(x)$ to $Q_{n_1}$, when we consider event $\cap_{n \geq n_0} A_n(x)$.
Thus, we can bound the chemical distance of $o$ and $x$ by the number of
ellipses in the following path $\ensuremath{\mathcal{P}}'$:
\begin{enumerate}[(i)]
\item Move from $o$ to $Q_{n_0}$ using the minimal number of ellipses and then
follow circuit $Q_{n_0}$ till meeting $P \cap Q_{n_0}$.
\item Move from $P \cap Q_{n_0}$ to $P \cap Q_{n_1}$ and then follow circuit
$Q_{n_1}$ till you meet $P(x) \cap Q_{n_1}$. Move from
$P(x) \cap Q_{n_1}$ to $P(x) \cap Q_{n_0}(x)$.
\item Follow circuit $Q_{n_0}(x)$ till you meet a point of $Q_{n_0}(x)$
connected to $x$ by a path inside $Q_{n_0}(x)$ that uses a
minimal number of ellipses.
\end{enumerate}
By Lemma~\ref{lema:distance_small_scales} we can bound the number of ellipses
used in each of the steps (i) and (iii) by
$\frac{2}{\pi} (2l_{n_0})^{2} + 1$. Moreover, moving between points in a same
quadrilateral takes at most $4$ ellipses. This leads to
\begin{equation*}
D(o, x)
\le 2 \cdot \Bigl(\frac{2}{\pi} \cdot 4l_{n_0}^{2} + 1\Bigr) + 3 \cdot 4 + 2 n_1
\le \frac{2}{\log (2/\alpha)} \log \log |x| + O(1).
\end{equation*}
Taking the limit as $|x|$ tends to infinity, one obtains for arbitrary
$\varepsilon > 0$ that
\begin{equation*}
\varlimsup_{|x| \to \infty}
\ensuremath{\mathbb{P}}
\Bigl(
x \leftrightarrow o,\
D(x,o) > \frac{2 + \delta}{\log (2/\alpha)} \cdot \log \log |x|
\Bigr)
\le 4 \varepsilon. \qedhere
\end{equation*}
\end{proof}
\begin{figure}
\centering
\begin{tikzpicture}[scale=0.31]
\clip (-3.5,-3) rectangle (18,19);
\draw (-16,-16) rectangle ++(32,32);
\draw[very thick, green] (17, -3) --
(16.5,17) node[black, above] {$Q_{n_1(x)}$} -- (-3, 17.5);
\coordinate (o) at (0,0);
\coordinate (x) at (7,9);
\foreach \site in {o, x}{
\begin{scope}[shift={(\site)}]
\foreach \x in {0, 1, 2, 3}{
\draw[dashed, rotate={90*\x}] (-2,1) rectangle ++(4,1);}
\draw[thick] (-1,-1) rectangle ++(2,2);
\filldraw (\site) circle (.15) node[below] {$\site$};
\draw[very thick, green] (-1.7, -1.5) -- (1.3, -1.8) --
(1.2, 1.6) -- (-1.8, 1.5) -- cycle;
\draw[very thick, blue]
(0, .5) -- (3, .7) (1.8,0) -- (1.3,6) (0,3) -- (18,2.6);
\end{scope}}
\draw [very thick, decorate, decoration={name=zigzag, amplitude=1.5pt}] {
(o) -- (1.6, .6) -- (1.5,3) -- (17,2.6) -- (16.5, 11.8) -- (8.5, 12)
-- (8.6, 9.6) -- (x)};
\node at (-1.8, 2.8) {$Q_{n_0}$};
\node at ($(-1.8, 2.8) + (x)$) {$Q_{n_0}(x)$};
\node at (13, 1.7) {$P$};
\node at (13, 10.7) {$P(x)$};
\end{tikzpicture}%
\hspace{2mm}%
\begin{tikzpicture}[scale=0.5]
\clip (-2,-1.4) rectangle (9.5,11);
\draw (0,0) rectangle (2,1);
\draw (0,0) rectangle (2,4);
\draw (0,0) rectangle (8,4);
\draw (0,0) rectangle (8,16);
\fill[blue, opacity=.7, rotate around={10:(1,.6)}]
(1,.6) circle (1.4 and .1);
\fill[blue, opacity=.7, rotate around={92:(0.5,2)}]
(0.5,2) circle (2.8 and .1);
\fill[blue, opacity=.7, rotate around={-15:(4,2)}]
(4,2) circle (5.6 and .1);
\fill[blue, opacity=.7, rotate around={80:(6,4)}]
(6,4) circle (11 and .1);
\node[left] at (0,1) {$l_{n_0 - 1}$};
\node[left] at (0,4) {$l_{n_0 + 1}$};
\node[left] at (0,8) {$\vdots$};
\node[below] at (2,0) {$l_{n_0}$};
\node[below] at (8,0) {$l_{n_0 + 2}$};
\node[below] at (9,0) {$\ldots$};
\end{tikzpicture}
\caption{Construction of short path $\ensuremath{\mathcal{P}}'$, depicted by a zigzag line.
On the right, we show event $\cap_{n \geq n_0} A_n$ in which we have an
`improved highway'. On the left, the improved highways $P$ and $P(x)$ are
connected to quadrilaterals $Q_{n_0}, Q_{n_0}(x)$ and $Q_{n_1(x)}$ to form
$\ensuremath{\mathcal{P}}'$.}
\label{fig:chem_up_bound}
\end{figure}
\subsection{Lower bound for chemical distance}
\label{sub:lower_bound_for_chemical_distance}
The argument from~\cite{biskup2011graph}, due originally to
Trapman~\cite{trapman2010growth}, cannot provide us a lower bound
for the chemical distance since we already have an upper bound for
$D(x,y)$ of order $\log \log |x-y|$. It is possible to employ a
similar strategy based on BK
inequality~\cite{van1985inequalities, van1996note}, but here
we are able to use a more elementary approach.
For $0 < l_1 < l_2$, we make a slight abuse of notation by denoting the
chemical distance between sets $B(l_1)$ and $\partial B(l_2)$ by
$D(l_1, l_2)$. Instead of working with $D(o,x)$ directly,
we investigate the quantity $D(1, |x|)$.
\begin{prop}
\label{prop:chem_dist_low_induction}
Let $\gamma := \frac{\alpha - 1}{2}$ and define
$C := \max\{15, u 2^{\alpha -1} \uc{c:annulus_bound}\}$, where $\uc{c:annulus_bound}$
is given by Lemma~\ref{lema:annulus_bound}.
For every $n \geq 0$ we have
\begin{equation}
\label{eq:chem_dist_bound}
\ensuremath{\mathbb{P}}(D(1, |x|)
\le 2^{n}) \le C^{n} |x|^{- 2 \gamma^{2^{n}}},
\quad \text{for $|x| > 2^{\gamma^{1 -n - 2^{n}}}$}.
\end{equation}
\end{prop}
\begin{proof}
The proof is by induction.
By Lemma~\ref{lema:annulus_bound} we have for $|x| > 2$ that
\begin{equation*}
\ensuremath{\mathbb{P}}(D(1, |x|) = 1)
\le u \uc{c:annulus_bound} (|x| - 1)^{1-\alpha}
\le u \uc{c:annulus_bound} 2^{\alpha - 1} |x|^{1-\alpha}
\le C |x|^{- 2 \gamma},
\end{equation*}
and we proved case $n=0$.
For the induction step, we notice that for $n \geq 0$
\begin{align*}
\ensuremath{\mathbb{P}}(D(1, |x|) \le 2^{n+1})
&\le \ensuremath{\mathbb{P}}(D(1, l) \le 2^{n}) + \ensuremath{\mathbb{P}}(D(l, |x|) \le 2^{n})\\
&\le \ensuremath{\mathbb{P}}(D(1, l) \le 2^{n}) +
(7l) \cdot \ensuremath{\mathbb{P}}(D(1, |x|-l) \le 2^{n}),
\end{align*}
where in the last inequality we used union bound and the fact that any
$\partial B(l)$ with $l > 2$ can be covered by at most $7l$ balls of
radius $1$ and some of these balls must be connected to $\partial B(|x|)$.
If the induction hypothesis can be applied, the choice
\begin{equation*}
l = \exp\Bigl[
(\log |x|) \cdot
\frac{2 \gamma^{2^{n}}}{1 + 2 \gamma^{2^{n}}}
\Bigr]
\end{equation*}
ensures that the two terms in the sum above are approximately the
same size, since it makes
\begin{equation*}
l^{-2 \gamma^{2^{n}}}
= l \cdot |x|^{-2 \gamma^{2^{n}}}
= \exp\Bigl[
(\log |x|) \cdot
\frac{-4 \gamma^{2^{n+1}}}{1 + 2 \gamma^{2^{n}}}
\Bigr].
\end{equation*}
Let us denote $b_n = 2^{\gamma^{1 - n - 2^{n}}}$ and suppose
$|x| > b_{n+1}$. Then, it is easy to check that our choice of
$l$ satisfies $l > b_{n}$ if and only if
\begin{equation}
\label{eq:low_bound_induction}
\exp
\Bigl[
(\log 2) \gamma^{- n - 2^{n+1}} \cdot
\frac{2 \gamma^{2^{n}}}{1 + 2 \gamma^{2^{n}}}
\Bigr]
\geq
\exp
\Bigl[
(\log 2) \gamma^{1 - n - 2^{n}}
\Bigr].
\end{equation}
Inequality~\eqref{eq:low_bound_induction} is equivalent to
\begin{equation*}
\gamma^{-1-2^{n}}
= \gamma^{- n - 2^{n+1} - (1 - n - 2^{n})}
\geq 1 + \frac{1}{2\gamma^{2^{n}}},
\quad \text{or} \quad
1
\geq \gamma^{1 + 2^{n}} + \frac{\gamma}{2}.
\end{equation*}
Since $\gamma = \frac{\alpha -1}{2} \in (0, 1/2)$ and $n \geq 0$,
we have that~\eqref{eq:low_bound_induction} is satisfied. Analogously,
we must check that $|x| - l \geq b_{n}$. This can be done by noticing
\begin{equation*}
\frac{l}{|x|}
= |x|^{- \frac{1}{1 + 2 \gamma^{2^{n}}}}
< \exp\Bigl[
- (\log 2)
\frac{\gamma^{- n - 2^{n+1}}}{1 + 2\gamma^{2^{n}}}
\Bigr]
\le 2^{ - \frac{1}{\gamma^{2} + 2\gamma^{3}} }
\le 2^{-2},
\end{equation*}
which implies that
$|x| - l \geq \frac{3}{4}|x| \geq \frac{3}{4} b_n > b_{n-1}$. Thus, we are
allowed to use the induction hypothesis. Using the bound
\begin{equation*}
{\bigl(1 - l/|x|\bigr)}^{-\smash{2\gamma^{2^{n}}}}
\le \bigl(1 - 1/4 \bigr)^{-\smash{2\gamma^{2^{n}}}}
\le (4/3)^{2\gamma}
< 2,
\end{equation*}
we can write
\begin{align*}
\ensuremath{\mathbb{P}}(D(1, |x|) \le 2^{n+1})
&\le C^{n} l^{-2 \gamma^{2^{n}}} +
7l \cdot C^{n} (|x| - l)^{-2 \gamma^{2^{n}}}
\le \bigl(1 + 14 \bigr) \cdot C^{n} \cdot l^{-2 \gamma^{2^{n}}} \\
&\le C^{n+1}
\exp\Bigl[
(\log |x|) \cdot
\frac{-4 \gamma^{2^{n+1}}}{1 + 2 \gamma^{2^{n}}}
\Bigr].
\end{align*}
Finally, we can estimate
\begin{equation*}
\frac{
\ensuremath{\mathbb{P}}(D(1, |x|) \le 2^{n+1})
}{
C^{n+1} |x|^{- 2 \gamma^{2^{n+1}}}
}
\le \exp\Bigl[
(\log |x|) \cdot 2 \gamma^{2^{n+1}}
\Bigl(
1 - \frac{2}{1 + 2 \gamma^{2^{n}}}
\Bigr)
\Bigr]
\le 1,
\end{equation*}
since $1 - \frac{2}{1 + 2 \gamma^{2^{n}}} \in (-1, 0)$.
\end{proof}
From Proposition~\ref{prop:chem_dist_low_induction}, we can conclude the
following
\begin{coro}
Let $0 < \delta < \frac{1}{\log (1/\gamma)}$, where
$\gamma := \frac{\alpha - 1}{2}$. Then we have
\begin{equation}
\lim_{|x| \to \infty}
\ensuremath{\mathbb{P}}\bigl(D(1, |x|) \le \delta \log \log |x|\bigr) = 0.
\end{equation}
\end{coro}
\begin{proof}
Let us choose
\vspace{-3mm}
\begin{equation*}
n = \lfloor
(\log 2)^{-1} \cdot \bigl(\log \delta + \log \log \log |x|\bigr)
\rfloor,
\end{equation*}
which makes
$2^{n} \in \bigl[\frac{\delta}{2} \log \log |x|, \delta \log \log |x|\bigr]$.
Notice that $|x| > 2^{\gamma^{1 - n - 2^{n}}}$ for large $|x|$, since
$1/\delta > \log (1/\gamma)$ implies
\begin{align*}
\log \log 2^{\gamma^{1 - n - 2^{n}}}
&= \log \log 2 + (2^{n}+n-1) \log (1/\gamma) \\
&\le \frac{2^{n}}{\delta} \le \log \log |x|.
\end{align*}
Hence, by Proposition~\ref{prop:chem_dist_low_induction} we have
\begin{align*}
\ensuremath{\mathbb{P}}(D(1, |x|) \le 2^{n})
&\le C^{n} |x|^{-2 \gamma^{2^{n}}} \\
&\le \exp\bigl[
\log C \cdot n - 2 \log |x| \cdot \gamma^{\delta \log \log |x|}
\bigr] \\
&\le \exp\biggl[
\frac{\log C}{\log 2} \cdot \log \log \log |x| + O(1)
- 2 (\log |x|)^{1 - \delta \log (1/\gamma)}
\biggr]
\end{align*}
which tends to zero since $\delta \log (1/\gamma) < 1$.
\end{proof}
\bibliographystyle{plain}
|
\section{CATHODOLUMINESCENCE HYPERSPECTRAL FITTING}
\label{hyp_fit_sec}
As mentioned in the main text, \gls{qw} \gls{cl} integrated intensity and peak energy maps were obtained from hyperspectral maps by fitting the \gls{cl} spectrum at each pixel. All fitting was done using the \textit{hyperspy} package for Python.\cite{Pena2020} An example \gls{cl} spectrum taken from a hyperspectral map of P16 is shown in Fig.\ \ref{fitting}. The emission shape is very characteristic for InGaN/GaN \glspl{qw} with significant inhomogeneous broadening and clear \gls{lo} phonon replicas at lower energies. Due to the large inhomogeneous broadening, the spectra are well fitted by using three Gaussians: one for the main peak, and two for the subsequent \gls{lo} phonon replicas. To minimise free parameters, we fixed the peak energy separation of these three Gaussians at 92 meV to agree with the \gls{lo} phonon energy in wurtzite GaN.\cite{Harima2002} The peak intensities of the phonon replicas were fixed to that of the main peak using the Huang-Rhys factor as a fitting parameter.\cite{Zhang2001} Finally, the \glspl{fwhm} of the phonon replicas were fixed to be equal---this left the model with only five free fitting parameters. The best fit using this model is shown in Fig.\ \ref{fitting}, with each individual Gaussian component also plotted.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI1_fitting}
\caption{ \normalsize Example of a measured \glsentryshort{cl} spectrum acquired at one pixel in a hyperspectral map of sample P16 at 10 K, along with its respective best fit from the triple-Gaussian model.}
\refstepcounter{SIfig}\label{fitting}
\end{figure}
With accurate heteroscedastic noise estimation, we obtained reduced chi-squared ($\chi^2_R$) values for every spectrum fitted. All hyperspectral maps fitted in this study had an average $\chi^2_R$ in the range 0.9--1.6, confirming the suitability of our model.
\section{CARRIER INJECTION IN CATHODOLUMINESCENCE}
\label{carr_inj_sec}
Fig.\ \ref{injection}a shows the interaction volume of the electron beam at an acceleration voltage of 1.5 kV, gained from a Monte-Carlo simulation. For this simulation, we estimated the electron probe diameter at the sample surface by inspecting the \gls{se} images in Fig.\ \ref{pd_cl} of the main text. Specifically, we set the \gls{fwhm} of the probe to the average \gls{fwhm} of surface step-edges ($\sim25$ nm), since these step-edges should be near-atomically sharp. Although this is a conservative estimate, the probe diameter is expected to be larger at low acceleration voltages due to enhanced chromatic aberration, particularly in a system lacking beam deceleration such as ours. The potential loss in \gls{cl} signal resolution due to the increased probe diameter compared to higher acceleration voltages is negligible given the reduction in interaction volume this low acceleration voltage provides.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI2_injection}
\caption{ \normalsize \textbf{a} Interaction volume at 1.5 kV calculated by Monte-Carlo simulation (using \textit{Casino})\protect\cite{Drouin2007}, with the position of the InGaN/GaN \glsentryshort{qw} highlighted. Energy absorbed is in units of energy per unit volume, normalised to the maximum value. \textbf{b} Experimental \glsentryshort{cl} \glsentryshort{qw} intensity profile measured across a single \glsentryshort{pd} at 10 K in P8. The profile is fitted with a Gaussian, resulting in a \glsentryshort{fwhm} of 76 nm.}
\refstepcounter{SIfig}\label{injection}
\end{figure}
From Fig.\ \ref{injection}a, we can see that the vast majority of the excitation energy (95 \%) is absorbed in the top 20 nm of the sample, hence the InGaN/GaN single \gls{qw} is placed only 15 nm below the surface. This design ensures all generated carriers are able to reach the \gls{qw} in the entire temperature range we explore, since the carrier diffusion length in GaN is always above 15 nm from 10 K up to 300 K.\cite{Kaganer2019, Brandt2020, Lahnemann2020} In addition, using thin top layers limits any lateral carrier spreading that can occur before the carriers relax to the \gls{qw}. The radial \gls{fwhm} of the interaction volume in Fig.\ \ref{injection}a is around 25 nm, which indicates the maximum achievable \gls{cl} resolution if there were no lateral carrier diffusion. Thus we could expect this to match the \gls{cl} resolution of our 10 K images, since the diffusion length should be near-zero in the \gls{qw} as emphasised in the main text.
To compare the results of the Monte-Carlo simulation to our experiments, we inspect the 10 K \gls{qw} \gls{cl} intensity across one \gls{pd} as shown in Fig.\ \ref{injection}b (taken from Fig.\ \ref{pd_cl}m in the main text). Since the \gls{pd} itself is localised on one point in the \gls{qw}, the \gls{fwhm} of this profile indicates the real resolution in the \gls{qw} at 10 K. The experimentally measured resolution, at 76 nm, is larger than the 25 nm that was expected from Fig. \ref{injection}a. This discrepancy is confirmed by repeating the analysis for different \glspl{pd}, with an average 10 K intensity profile \gls{fwhm} of $80 \pm 10$ nm.
The mismatch is explained by two factors. Firstly, a recent study by Jahn \textit{et al.}\ has evidenced an increase in \gls{cl} interaction volumes compared to Monte-Carlo simulations,\cite{Jahn2020} since \gls{cl} generates hot carriers which can only radiatively recombine once they have lost excess energy through phonon emission. They well-described the interaction volume broadening in GaN by convoluting the Monte-Carlo radial profile by a Gaussian with \gls{fwhm} of about 50 nm. Secondly, as previously mentioned, there will be some lateral carrier diffusion in the top barrier of the sample before carriers fully relax to the \gls{qw}. With random diffusion, we expect this effect to broaden the final 2-D carrier distribution in the \gls{qw} on the order of the thickness of the barrier, i.e., 15 nm. Combining both of these factors with our original 25 nm Monte-Carlo \gls{fwhm}, we arrive at a more realistic resolution estimate of $\sim60$ nm, much closer to our measured value of $80 \pm 10$ nm. The remaining difference of 10--30 nm could then be due to the limited diffusion possible within the \gls{qw} at 10 K, with a diffusion coefficient of far less than 0.01 \si{\centi\metre\squared\per\second}.\cite{Solowan2013} Such low levels of diffusion at 10 K would only slightly impact our calculated \gls{qw} diffusion lengths at 170 K, since these are mainly on the order of 100s of nanometres.
The $80 \pm 10$ nm \gls{fwhm} of the \gls{cl} intensity profile around single \glspl{pd} should also be close to the \gls{fwhm} of the carrier density distribution at 10 K in the \gls{qw}. Meanwhile we can estimate the total generation rate, $G_{\textnormal{tot}}$ (\si{\per\second}), of carriers in \gls{cl} through the well known equation:\cite{Guthrey2020}
\begin{equation}
G_{\textnormal{tot}} = \frac{I_{\rm p}}{q} . \frac{E_{\textnormal{dep}}}{3 E_{\rm g}} \hspace{3mm},
\end{equation}
\noindent where $I_{\rm p}$ is the electron beam probe current, $q$ is the charge of an electron, $E_{\rm g}$ is the bandgap of the sample, and $E_{\textnormal{dep}}$ is the average energy deposited per electron in the sample, which is equivalent to the beam energy minus the energy lost through backscattered electrons (calculated from Monte-Carlo simulations).\cite{Drouin2007} Using our estimated steady-state carrier distribution \gls{fwhm}, $\Gamma$, and assuming this distribution is Gaussian-like, we can then write the peak steady-state carrier density in the \gls{qw}, $n_{\textnormal{QW}}$, as:
\begin{equation}
n_{\textnormal{QW}} = G_{\textnormal{tot}} \tau. \frac{4 \ln(2)}{\pi \Gamma^2} = \frac{I_{\rm p}}{q} . \frac{E_{\textnormal{dep}}}{3 E_{\rm g}} \tau. \frac{4 \ln(2)}{\pi \Gamma^2} \hspace{3mm},
\label{nss}
\end{equation}
\noindent if we assume all generated carriers relaxed to the \gls{qw}, with $\tau$ being the carrier lifetime. Into eq.\ \ref{nss} we input $I_{\rm p} = 200$ pA, $E_{\rm g} = E_{g, \textnormal{GaN}} = 3.50$ eV, $\Gamma = 80 \pm 10$ nm, and the calculated $E_{\textnormal{dep}} = 1.12$ keV. For $\tau$, we use the effective lifetime gained from \gls{trpl} results at 10 K ( $\sim 1.5$ ns, see \hyperref[trpl_sec]{next section}). The resulting $n_{\textnormal{QW}}$ is found to be $2.8 \pm 0.5 \times 10^{12}$ \si{\per\centi\metre\squared}. This calculated density is important when considering the comparison of \gls{cl} diffusion lengths and \gls{trpl} effective lifetimes in Fig.\ \ref{diff} of the main text, as described in the \hyperref[trpl_sec]{next section}. We note that peak \gls{iqe} for high-quality \mbox{InGaN/GaN} \glspl{qw} commonly occurs at about this carrier density,\cite{David2020} which is in good agreement with what we observe in Fig.\ \ref{current} of the main text, in which the highest \gls{cl} intensity-probe current ratio is achieved at $I_{\rm p} = 200$ pA. Conversely, at $I_{\rm p} = 50$ pA we expect a carrier density in the range $10^{11}$ \si{\per\centi\metre\squared} while for $I_{\rm p} = 500$ pA it should be closer to $10^{13}$ \si{\per\centi\metre\squared}---these densities are further into the defect dominated and Auger recombination regimes, respectively.\cite{David2020}
\section{TIME-RESOLVED PHOTOLUMINESCENCE}
\label{trpl_sec}
In Fig.\ \ref{sample_info} of the main text, data extracted from \gls{qw} \gls{trpl} decay curves are presented: here we show the original curves in Figs.\ \ref{trpl_fig}a--e. The evolution of PL intensity, $I$, with time, $t$, in these decay curves is described by the function:
\begin{equation}
I = A \frac{n_0}{\tau_{\rm r}} \exp\bigg(\frac{-t}{\tau}\bigg) \hspace{3mm},
\label{overall_trpl}
\end{equation}
\noindent where $n_0$ is the initial carrier density in the well, $\tau_{\rm r}$ is the carrier radiative lifetime, $\tau$ is the total carrier lifetime, and $A$ is a constant related to the collection efficiency, area of sample excited, and integration time. $\tau$ is related to $\tau_{\rm r}$ and the non-radiative lifetime, $\tau_{\rm nr}$, through:
\begin{equation}
\frac{1}{\tau} = \frac{1}{\tau_{\rm r}} + \frac{1}{\tau_{\rm nr}} \hspace{3mm}.
\label{tot_lifetime}
\end{equation}
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI3_trpl}
\caption{ \normalsize \textbf{a--e} Temperature-dependent \glsentryshort{trpl} decay curves of P0, P4, P8, P16, and P24, respectively. $\tau_{\textnormal{eff}}$ are extracted from mono-exponential fitting of \glsentryshort{trpl} intensities at early delays, displayed in \textbf{f--j} for all samples along with calculated $\tau_{\rm r, 0}$ and $\tau_{\rm nr, 0}$ values.}
\refstepcounter{SIfig}\label{trpl_fig}
\end{figure}
Unfortunately, $\tau_{\rm r}$ and $\tau_{\rm nr}$ often depend on carrier density in a non-straightforward manner.\cite{Liu2016, David2020} Since the carrier density in \gls{trpl} decreases as time progresses, this dependence leads to deviation from mono-exponential decay as we see in Figs.\ \ref{trpl_fig}a--e. To simplify our analysis, we obtained the effective lifetime, $\tau_{\textnormal{eff}}$, for each curve by fitting intensity at early delay times with a mono-exponential decay convoluted with the instrument response function. $\tau_{\textnormal{eff}}$ is then equivalent to the true carrier lifetime, $\tau$, only when the carrier density is around $n_0$. With an excitation density of 5 \si{\micro\joule\per\centi\metre\squared} at a laser wavelength of 266 nm, and making the simplifying assumption that nearly all carriers relax to the \gls{qw}, $n_0$ is on the order of $10^{12}$ \si{\per\centi\metre\squared}. Crucially, this is the same order of magnitude as the steady-state carrier densities in our \gls{cl} measurements (see \hyperref[carr_inj_sec]{previous section}), allowing us to use our calculated $\tau_{\textnormal{eff}}$ as a reasonable approximation for the carrier lifetime in \gls{cl}, as we did in the \hyperref[diff_sec]{diffusion analysis} of the main text and in the \hyperref[carr_inj_sec]{previous section} of this supplementary. As mentioned previously, this carrier density should also be near peak-\gls{iqe} conditions for high-quality \mbox{InGaN/GaN} \glspl{qw}.\cite{Liu2016, David2020}
To calculate the macroscopic \glspl{iqe} as presented in Fig.\ \ref{sample_info}e of the main text, we used a method first applied by Langer \textit{et al}.\cite{Langer2013} Eq.\ \ref{overall_trpl} indicates that using the initial intensity of a decay curve, $I_0$, we can calculate the initial radiative lifetime, $\tau_{\rm r, 0}$, at any temperature, $T$, through:
\begin{equation}
\tau_{\rm r, 0}(T) = \frac{A n_0}{I_0(T)} \hspace{3mm}.
\end{equation}
\noindent Since excitation and detection conditions aren't changed, $A$ and $n_0$ will be near-constant across all temperatures as long as the intensity rise time is much less than $\tau_{\textnormal{eff}}$. Hence, if we have $\tau_{\rm r, 0}$ at one temperature, we can compute $A n_0$, which then lets us calculate $\tau_{\rm r, 0}$ for all temperatures. Having already found $\tau_{\textnormal{eff}}$, we can then determine $\tau_{\rm nr, 0}$ through eq.\ \ref{tot_lifetime}. Finally, the \gls{iqe} is given by:
\begin{equation}
\textnormal{IQE}(T) =\frac{\tau_{\textnormal{eff}}(T)}{\tau_{\rm r, 0}(T)} \hspace{3mm}.
\label{iqe_eq}
\end{equation}
The next step is to estimate $\tau_{\rm r, 0}$ at one temperature. To this end, we look more closely at the temperature-dependence of P24 $\tau_{\textnormal{eff}}$ (Fig.\ \ref{trpl_fig}j). The lifetime of P24 increases linearly above $\sim$ 90 K from 1.6 \si{\nano\second} up to 3.7 \si{\nano\second} at room temperature. Such behaviour is expected for $\tau_{\rm r}$ in any direct bandgap semiconductor \gls{qw} for both free electron/hole pairs and excitons.\cite{Matsusue1987, Andreani1991} Meanwhile below 90 K, the lifetime is temperature-independent, indicating that the majority of carriers are localised in this temperature range due to alloy disorder in the \mbox{InGaN/GaN} \gls{qw}.\cite{Feldmann1987, Hangleiter2017} The consistency of P24's $\tau_{\textnormal{eff}}$ behaviour with that expected for $\tau_{\rm r}$ indicates this sample is dominated by radiative recombination across the full temperature range we explore. Given that defect-assisted non-radiative recombination is a thermally-activated process,\cite{Henry1977} we can safely assume that $\tau_{\textnormal{eff}}$ for P24 is very close to $\tau_{\rm r, 0}$ at 10 K ($\sim 1.5$ ns). We use this value as $\tau_{\rm r, 0}(T = 10 \textnormal{ K})$ for all samples, since they are expected to have the same radiative lifetime behaviour due to identically grown \gls{qw} structures.
With this key, we can now calculate $\tau_{\rm r, 0}(T)$ for all samples using the process described above. The main source of random error in this method derives from small changes in optical alignment altering the value of $A n_0$. We minimise the error by averaging $\tau_{\rm r, 0}(T)$ across the samples, which is reasonable since they should all have similar radiative lifetimes. P0 is excluded from this average since at high temperatures its $\tau_{\textnormal{eff}}$ becomes very short (Fig.\ \ref{trpl_fig}f). This leads to highly inaccurate $\tau_{\rm r, 0}$ estimation since (i) $\tau_{\textnormal{eff}}$ is on the order of the rise time, significantly decreasing $n_0$ from its low-temperature value, and (ii) $\tau_{\textnormal{eff}}$ reaches the resolution limit of the detection system, and is therefore an overestimation of the true lifetime.
All measured and calculated lifetimes are shown in Figs.\ \ref{trpl_fig}f--j. $\tau_{\rm nr, 0}$ is shorter at high temperatures and for thinner underlayer samples as expected. With these data, we calculated \gls{iqe}(T) with eq.\ \ref{iqe_eq} as displayed in Fig.\ \ref{sample_info}e of the main text.
\section{ATOMIC FORCE MICROSCOPY}
\label{afm_sec}
Fig.\ \ref{afm_fig} presents complementary \gls{afm} images for all samples in this study. The observed morphology matches that of the \gls{se} images in Figs.\ \ref{pd_cl}a--e of the main text, with step-edges evenly spaced by about 80--100 nm. The step-edge height is $\sim 0.52$ nm, equivalent to two molecular monolayers of GaN.\cite{Vurgaftman2003} This places the substrate misorientation in the range 0.3$^{\circ}$--0.4$^{\circ}$, close to the nominal misorientation of 0.2$^{\circ}$. \gls{afm} underscores the low density of threading dislocations in these samples, with no surface V-pits visible at this scale of $2\times2$ \si{\micro\metre\squared}.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI4_afm}
\caption{ \normalsize \textbf{a--e} \glsentryshort{afm} images of the surface for P0, P4, P8, P16, and P24, respectively (scale bars 500 nm, $\Delta z = 2$ nm). All samples present an evenly spaced step-flow structure.}
\refstepcounter{SIfig}\label{afm_fig}
\end{figure}
\section{POINT DEFECT COUNTING DETAILS}
\label{pd_sec}
\begin{figure}[b!]
\centering
\includegraphics[width=1\columnwidth]{SI5_pd_method}
\caption{ \normalsize \textbf{a} Histograms of the 170 K \glsentryshort{qw} \glsentryshort{cl} intensity images shown in Figs.\ \ref{pd_cl}f--j of the main text. The results for P4 and P8 have been fitted with two Gaussian distributions to separate the contribution from type-I and type-II defects---the lower intensity Gaussian (red dashed line) peak position is taken as $I_\textnormal{lim}$ for type-I \glsentryshort{pd} counting. Large-scale integrated \gls{cl} intensity images acquired at 300 K with $I_{\rm p}=50$ pA are required to count type-I \glsentryshortpl{pd} for \textbf{b} P16 and \textbf{d} P24. The positions of threading dislocations are highlighted by red dots to show the lack of correlation with low \glsentryshort{cl} intensity areas. These images are repeated with detected type-I \glsentryshortpl{pd} indicated by red targets in \textbf{c} and \textbf{e}. (All scale bars are 1 \si{\micro\metre}).}
\refstepcounter{SIfig}\label{pd_method}
\end{figure}
The \gls{pd} identification and counting procedure used in the main text involves three parameters: the \gls{fwhm} of the Gaussian filter ($\Gamma_{\rm G}$) and the detection threshold ($I_\textnormal{det}$) involved in the \gls{log} method applied at 10 K, along with the intensity limit ($I_{\textnormal{lim}}$) defined for the 170 \si{\kelvin} data. $\Gamma_{\rm G}$ is linked to the size of the dark regions that will be detected by the \gls{log} method. $I_\textnormal{det}$ was always fixed at 0.025 to avoid detecting random noise in the \gls{cl} images as defects.
To define a reasonable $I_\textnormal{lim}$ for each sample, we calculated the 170 \si{\kelvin} \gls{cl} intensity histograms from the $2 \times 2$ \si{\micro\metre\squared} images in Figs.\ \ref{pd_cl}f--j of the main text. P4 and P8 show distinct double-humped distributions (Fig.\ \ref{pd_method}a), as is expected from the influence of two different types of \gls{pd}. Fitting both distributions with two Gaussians then separates the contribution from type-I and type-II defects. The peaks of the lower intensity Gaussians are taken to define $I_\textnormal{lim}$ for each sample, in accordance with the greater impact of type-I defects on 170 \si{\kelvin} \gls{cl} intensity.
The other samples do not exhibit double-peaked distributions since they are dominated by only one type of defect. P0 exhibits a distribution skewed to low intensities, due to the high density of type-I \glspl{pd} overwhelming any impact from type-II \glspl{pd}. In this case, we make the simplifying assumption that all 10 K intensity fluctuations detected by \gls{log} correspond to type-I defects for P0. The results in Fig.\ \ref{pd_dens} of the main text for the P0/P4/P8 type-I and type-II \gls{pd} densities were obtained by applying our method to the $2 \times 2$ \si{\micro\meter\squared} images in Fig.\ \ref{pd_cl} of the main text, with the errors estimated by varying $\Gamma_{\rm G}$ in the range $70\leq\Gamma_{\rm G}\leq90$ nm---this range matches the \gls{cl} resolution at 10 K ($80 \pm 10$ nm, see Sec.\ \ref{carr_inj_sec}).
On the other hand, the P16/P24 170 K images have distributions skewed towards high intensity, since (i) there are nearly no type-I \glspl{pd} at this $2 \times 2$ \si{\micro\metre\squared} scale and (ii) the higher carrier density in these samples minimises the impact of \glspl{pd} (see Fig.\ \ref{current} in the main text). To counteract both of these effects, we analysed larger $7 \times 7$ \si{\micro\metre\squared} \gls{cl} intensity images of P16/P24 at a low probe current, $I_{\rm p}$, of 50 pA (Figs.\ \ref{pd_method}b--e). We further enhanced the impact of type-I \glspl{pd} by heating the samples to room temperature. At this temperature type-II \glspl{pd} will have no resolvable effect on the intensity, so dark areas will correspond to type-I defects and we do not need to define $I_\textnormal{lim}$. This option was not available for the other samples since the longer diffusion length at high temperature combined with the high density of type-I \glspl{pd} would have made individual defects unresolvable.
At this large scale, there are more threading dislocations in the analysed area which we must not falsely identify as \glspl{pd}, hence we highlight dislocation positions in Figs.\ \ref{pd_method}b \& d (as linked to V-pits in the corresponding \gls{se} images). There is no clear spatial correlation between the dislocation positions and any dark spots in the \gls{cl} intensity. This emphasises the dominant role played by \glspl{pd} in these \glspl{qw} compared to dislocations, and allows us to safely apply \gls{log} detection to these images to calculate type-I \gls{pd} density without counting any dislocations (Figs.\ \ref{pd_method}c \& e). For error estimation, $\Gamma_{\rm G}$ was varied in the range $250\leq\Gamma_{\rm G}\leq350$ nm accounting for the much greater diffusion length at higher temperatures (c.f., P24 has diffusion length $254 \pm 10$ nm at 170 K, see Fig.\ \ref{diff} in the main text). Taking the difference between this type-I density and the density of 10 \si{\kelvin} dark areas in Figs.\ \ref{pd_cl}n \& o of the main text then allowed us to calculate the P16/P24 type-II \gls{pd} densities.
The final number of type-I and type-II \glspl{pd} counted in this work, and the area they were counted over, is listed for each sample in Table \ref{pd_count}. We note that the low uncertainty for the P8 type-I density is a consequence of the low number of defects counted for this sample, and is very likely an underestimation.
\begin{table}[h!]
\caption{ \normalsize \label{pd_count}Number of type-I and type-II \glspl{pd} counted for each sample in this work, along with the area these point defects were counted within; these values were used to calculate the \gls{pd} densities for each sample. The uncertainties arise from varying the $\Gamma_{\rm G}$ value used in the \gls{log} dark region detection method.}
\begin{ruledtabular}
\begin{tabular}{lccr}
Sample & Type-I \gls{pd} counted & Type-II \gls{pd} counted & Area analysed (\si{\micro\metre\squared})\\
P0 & $151 \pm 41$ & 0 (No $I_{\rm lim}$) & 4 \\
P4 & $39 \pm 5$ & $71 \pm 21$ & 4\\
P8 & $12 \pm 1$ & $70 \pm 16$ & 4\\
P16 & $68 \pm 10$ & $54 \pm 2$ & 49 (type-I); 4 (type-II)\\
P24 & $50 \pm 6$ & $58 \pm 4$ & 49 (type-I); 4 (type-II)\\
\end{tabular}
\end{ruledtabular}
\end{table}
\section{TRANSMISSION ELECTRON MICROSCOPY AND TRANSITION ENERGY SIMULATIONS}
\label{tem_sec}
To confirm the exact structure of our three-\gls{ml} \glspl{qw}, samples P0 and P24 were characterised by \gls{stem} \gls{eds}. The cross-section samples for \gls{stem} analysis were prepared by focused Ga ion beam lift-out using a Zeiss NVision 40. Before milling, the top surface was protected by depositing an amorphous carbon layer using an electron beam and then the ion beam. The samples were sectioned within a few degrees of the $\langle 1 1 \bar{2} 0\rangle$ zone axis. Primary milling was made using a 30 kV ion beam, with final cleaning made using a 5 kV ion beam. The atomic resolution \gls{stem} imaging and \gls{eds} spectroscopy were done using a double-aberration corrected FEI Titan Themis 60-300, using a convergence semi-angle of 20 \si{\milli\radian} and a high tension of 80 kV in order to prevent electron-beam damage by the knock-on mechanism.\cite{Smeeton2003, Baloch2013} A Fischione photomultiplier tube detector was used for taking the high-angle annular dark-field images, using an inner collection semi-angle of ~50 \si{\milli\radian}. The resolution of the images is $\sim$1.25--1.5 \si{\angstrom}. \Gls{eds} hyperspectral data were acquired using FEI Super-X ChemiSTEM detectors with FEI/Thermo Scientific Velox software; this software was also used to record the \gls{stem} images and for making the \gls{eds} data analysis. In order to gauge the thickness of the \gls{stem} samples, and as a check on \gls{eds} results, complementary \gls{stem} electron energy-loss spectra were acquired using a Gatan GIF Quantum ERS spectrometer: the measured thicknesses were 70 \si{\nano\metre} and 40 \si{\nano\metre} for P0 and P24, respectively.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI6_TEM}
\caption{ \normalsize \glsentryshort{stem}-\glsentryshort{haadf} images of the \gls{qw} in \textbf{a} P0 and \textbf{b} P24, both taken down the $\langle 11\bar20\rangle$ axis (scale bars 2 nm). \textbf{c} \glsentryshort{stem}-\glsentryshort{haadf} image of the P24 sample structure down the $\langle 11\bar20\rangle$ axis, showing the InAlN/GaN superlattice and the InGaN/GaN single \glsentryshort{qw} (scale bar 20 nm). \textbf{d} \glsentryshort{haadf} contrast profile across the QW of P0 compared with the indium content profile extracted from the same region using \glsentryshort{eds}. Dashed lines mark the boundary of an artefactual contrast fluctuation unrelated to indium. Indium profiles across the \gls{qw} ($z$ axis) for \textbf{e} P0 and \textbf{f} P24 from \gls{eds}. The Muraki fit is shown as a shaded area.}
\refstepcounter{SIfig}\label{tem_fig}
\end{figure}
Fig.\ \ref{tem_fig} presents the results, starting with atomic-resolution \gls{haadf} images of the P0 and P24 \glspl{qw} [Figs.\ \ref{tem_fig}a \& b]. The \glspl{qw} are close to the nominal thickness of three \glspl{ml}, but their interfaces are not completely sharp. However, this observation may be affected by contrast fluctuations which are unrelated to indium content. Fig.\ \ref{tem_fig}c shows a large scale \gls{haadf}-\gls{stem} image of P24 with contrast fluctuations across the entire sample, seemingly having no correlation with any individual part of the structure. These fluctuations are almost certainly an artefact: comparing indium content extracted from \gls{eds} spectroscopy with the \gls{haadf} profile across the \gls{qw} (Fig.\ \ref{tem_fig}d) near a typical fluctuation, we observe that the \gls{haadf} contrast fluctuation does not correspond to any change in indium concentration. These fluctuations may be due to surface relaxation or contamination from sample preparation; at an acceleration voltage of only 80 kV, the electron beam is sensitive to any potential surface effects. To avoid this artefact, we rely on \gls{eds} measurements rather than \gls{haadf} images: Figs.\ \ref{tem_fig}e \& f display indium content profiles across the \glspl{qw} of P0 and P24, obtained by averaging the \gls{eds} signal over the regions in Figs.\ \ref{tem_fig}a \& b. Indeed there is a high plateau in the profiles exactly three \glspl{ml} thick, but the \gls{qw} top interface is not sharp---a characteristic of indium segregation during growth.
To quantify the indium surface segregation, we can apply a model developed by Muraki \textit{et al.}\cite{Muraki1992} In this model, during the growth of one molecular \gls{ml} of InGaN a certain fraction $(1-R)$ of the indium atoms at the surface are incorporated into the \gls{ml} while the remaining fraction $R$ segregates to the new surface. As such, $R$ represents the degree of segregation that occurred during growth. The In content in the \textit{n}\textsuperscript{th} \gls{ml}, $x_n$, is then given by:
\begin{align}
x_n &=x_0 (1-R^n) &(1\leq n\leq N_{\textnormal{QW}}; \textnormal{well}),\\
x_n &=x_0 (1-R^{N_{\textnormal{QW}}})R^{n-N_{\textnormal{QW}}} &(n> N_{\textnormal{QW}}; \textnormal{barrier}),
\end{align}
\noindent where $N_{\textnormal{QW}}$ and $x_0$ are the nominal width and indium content of the \gls{qw}, respectively. This model was fitted to the \gls{stem}-\gls{eds} results for the \glspl{qw} of P0 and P24, as shown in Figs.\ \ref{tem_fig}e \& f. Only the data for which the measured In content was greater than 5 \% were considered for the fitting process; this was to avoid the $\sim 1$ \% zero error present in the \gls{eds} measurement. The zero error arises from noise in the \gls{eds} spectra which is falsely quantified when the indium content is below the detection limit. The derived fit could then be extrapolated into the spurious regions, eliminating the error in subsequent analyses. $N_{\textnormal{QW}}$ was the same for both samples at 4.3, close to the target value of 3; meanwhile $x_0$ was 26 \% for both samples. The values of $R$ extracted (0.82 and 0.86) are in line with previous estimations of the segregation coefficient in InGaN/GaN \glspl{qw}.\cite{Dussaigne2003} Crucially, the \gls{qw} of P0 possesses a slightly larger $R$ value than that of P24, indicating that greater indium segregation occurred in this sample. This could explain the $\sim66$ \si{\milli\electronvolt} \glsentryshort{pl} redshift between P0 and P24 seen in Fig.\ \ref{sample_info}c of the main text---to confirm, we carried out Schrödinger-Poisson calculations.
\begin{table}[h!]
\caption{ \normalsize \label{simresults}Comparison of P0 and P24 emission energies gained from room-temperature \glsentryshort{pl} measurements (experiment) versus transition energies predicted by \textit{nextnano} Schrödinger-Poisson calculations (simulation) at 300 K. The difference between the experimental/simulation energies of P0 and P24 are given in the final column.}
\begin{ruledtabular}
\begin{tabular}{lccr}
&P0 energy (eV) & P24 energy (eV) & Difference $\Delta E_{\textnormal{P0-P24}}$ (meV)\\
Experiment & 3.006 & 2.940 & 66\\
Simulation & 3.117 & 3.068 & 49
\end{tabular}
\end{ruledtabular}
\end{table}
For these calculations, the entire structures of P0 and P24 were simulated at 300 \si{\kelvin} using \textit{nextnano},\cite{Birner2007} including the accurate \gls{ml}-by-\gls{ml} \gls{qw} indium profiles obtained from the Muraki fit. We can compare the simulated results for P0 and P24 to those gained from \glsentryshort{pl} at room temperature using a HeCd laser (Table \ref{simresults}). The difference in transition energies between the \glspl{qw} of P0 and P24 is predicted to be 49 \si{\milli\electronvolt} at room temperature, which accounts quite well for the $\sim66$ \si{\milli\electronvolt} \glsentryshort{pl} redshift observed between P0 and P24, supporting our structural analysis. However, a noticeable discrepancy exists between the experiment and simulated absolute values for each sample ($\sim110$ \si{\milli\electronvolt}). Multiple factors contribute to this discrepancy. Firstly, the simulation does not consider the exciton binding energy in the \gls{qw}, which lowers the emission energy relative to the calculated transition energy. Taking GaN as an example, in the limiting exact 2D case of an infinitely deep \gls{qw} the exciton binding energy is increased by a factor of four relative to the bulk value, placing it at around 100 \si{\milli\electronvolt}.\cite{Vurgaftman2003} Secondly, a Stokes shift is expected between absorption and emission energies due to tail states within the bandgap; this effect is further exacerbated by alloy disorder in the InGaN/GaN \gls{qw}.\cite{Glauser2014} Finally, \gls{eds} quantification is never absolutely precise, and there is at least a $\pm 1$ at.\% systematic error involved. All of these factors should be roughly constant for both samples, and hence do not impede the comparison between them.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI7_power}
\caption{ \normalsize \textbf{a} Transition energies calculated by \textit{nextnano} for the P24 \gls{qw} as the GaN spacer thickness between the SL and the QW was varied. The temperature was set to 300 K. \textbf{b} \glsentryshort{qw} \glsentryshort{pl} series on P24 at 300 \si{\kelvin} obtained using a 325 \si{\nano\metre} HeCd laser, varying the power density from 2 \si{\milli\watt\per\centi\meter\squared} to 20 \si{\watt\per\centi\meter\squared}. Spectra are individually normalised and offset along the \textit{y}-axis for clarity. No shift in peak energy occurs across the entire power density range.}
\refstepcounter{SIfig}\label{power}
\end{figure}
Finally, it was worth ruling out any effect on the fundamental \gls{qw} transition energy from the electric field induced by the InAlN/GaN \gls{sl}; as can be seen in Fig.\ \ref{power}a, at our GaN spacer thickness of 25 \si{\nano\metre} between the \gls{sl} and \gls{qw} the electric field of the \gls{sl} has been mostly screened. Increasing the spacer thickness to 35 nm would result in a change in the transition energy of only $\sim1$ \si{\milli\electronvolt}. Furthermore, the absence of any impact from the built-in electric field can be verified experimentally by measuring \glsentryshort{pl} spectra for P24 under various excitation power densities (Fig.\ \ref{power}b). Any effect from the electric field would be revealed as a blueshift in \gls{qw} emission energy at higher power densities due to carriers screening the field. Conversely, we see that the peak emission energy remains constant across the entire power range, confirming that the 66 \si{\milli\electronvolt} discrepancy in peak emission energy between P0 and P24 is not due to any electric field from the \gls{sl}. Furthermore, this clearly demonstrates the limited effect of the quantum-confined Stark effect in our ultra-thin \glspl{qw}; consequently, we do not need to consider any field-screening effects in in our probe current study (Fig.\ \ref{current} of the main text).
In summary, this complete analysis ensures we can be confident in the segregated indium profiles measured by \gls{eds} and their corresponding Muraki fits. The analysis identifies marginally greater segregation in the \gls{qw} of P0 compared to P24, which explains the observed \gls{pl} peak energy difference between the samples (with any effect from the built-in electric field being ruled out experimentally and theoretically). Slight changes in segregation can then explain the small variances in peak energy between the samples seen in the room-temperature \gls{qw} \gls{pl} (Fig.\ \ref{sample_info}c of the main text). For our calculation of \gls{pd} 3-D densities (\si{\per\centi\metre\cubed}) from 2-D values (\si{\per\centi\metre\squared}), we use the average \gls{fwhm} of the \gls{eds} indium profiles at $\sim1.8$ nm.
\section{COMPLETE DIFFUSION ANALYSIS}
\label{comp_diff_sec}
In Fig.\ \ref{diff}e of the main text we presented the diffusion lengths calculated for all samples from the Gaussian convolution fitting method. Here we show the peak energy images used to obtain these diffusion lengths in Fig.\ \ref{diffusion}. Step-edge directions were calculated by Fourier transform analysis of the \gls{se} images (Figs.\ \ref{diffusion}a--e). The impact of the step-edges on the peak energy is evident for P4--P24 in Figs.\ \ref{diffusion}g--j, which leads to strongly anisotropic diffusion in all of these samples. This is confirmed by the diffusion lengths parallel ($L_{D, \parallel}$) and perpendicular ($L_{D, \perp}$) to the step-edges extracted by Gaussian convolution (Figs.\ \ref{diffusion}p--t). These convoluted images are in good agreement with the real 170 K peak energy images (Figs.\ \ref{diffusion}k--o), confirming the validity of our simple diffusion analysis. The error bars in diffusion length shown in Fig.\ \ref{diff} of the main text were estimated by varying the initial parameters of the Gaussian convolution fit.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI8_diffusion}
\caption{ \normalsize \textbf{(a--e)} \glsentryshort{se} images for all samples as presented in the main text (Figs.\ \ref{pd_cl}a--e) with the step-edge direction marked by an angle as calculated by Fourier transform analysis (scale bars 500 nm). \textbf{(f--j)} 10 K and \textbf{(k--o)} 170 K \glsentryshort{qw} \glsentryshort{cl} peak energy images from the same areas as in the \glsentryshort{se} images. Peak energy is plotted relative to the mean energy of each image as in the main text. \textbf{(p--t)} Images obtained from the Gaussian convolution procedure applied to the 10 K \glsentryshort{cl} images in f--j, with calculated diffusion lengths indicated.}
\refstepcounter{SIfig}\label{diffusion}
\end{figure}
\clearpage
\twocolumngrid
\pdfbookmark[0]{References}{sec:ref}
\textbf{References}
\normalsize
\section{CATHODOLUMINESCENCE HYPERSPECTRAL FITTING}
\label{hyp_fit_sec}
As mentioned in the main text, \gls{qw} \gls{cl} integrated intensity and peak energy maps were obtained from hyperspectral maps by fitting the \gls{cl} spectrum at each pixel. All fitting was done using the \textit{hyperspy} package for Python.\cite{Pena2020} An example \gls{cl} spectrum taken from a hyperspectral map of P16 is shown in Fig.\ \ref{fitting}. The emission shape is very characteristic for InGaN/GaN \glspl{qw} with significant inhomogeneous broadening and clear \gls{lo} phonon replicas at lower energies. Due to the large inhomogeneous broadening, the spectra are well fitted by using three Gaussians: one for the main peak, and two for the subsequent \gls{lo} phonon replicas. To minimise free parameters, we fixed the peak energy separation of these three Gaussians at 92 meV to agree with the \gls{lo} phonon energy in wurtzite GaN.\cite{Harima2002} The peak intensities of the phonon replicas were fixed to that of the main peak using the Huang-Rhys factor as a fitting parameter.\cite{Zhang2001} Finally, the \glspl{fwhm} of the phonon replicas were fixed to be equal---this left the model with only five free fitting parameters. The best fit using this model is shown in Fig.\ \ref{fitting}, with each individual Gaussian component also plotted.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI1_fitting}
\caption{ \normalsize Example of a measured \glsentryshort{cl} spectrum acquired at one pixel in a hyperspectral map of sample P16 at 10 K, along with its respective best fit from the triple-Gaussian model.}
\refstepcounter{SIfig}\label{fitting}
\end{figure}
With accurate heteroscedastic noise estimation, we obtained reduced chi-squared ($\chi^2_R$) values for every spectrum fitted. All hyperspectral maps fitted in this study had an average $\chi^2_R$ in the range 0.9--1.6, confirming the suitability of our model.
\section{CARRIER INJECTION IN CATHODOLUMINESCENCE}
\label{carr_inj_sec}
Fig.\ \ref{injection}a shows the interaction volume of the electron beam at an acceleration voltage of 1.5 kV, gained from a Monte-Carlo simulation. For this simulation, we estimated the electron probe diameter at the sample surface by inspecting the \gls{se} images in Fig.\ \ref{pd_cl} of the main text. Specifically, we set the \gls{fwhm} of the probe to the average \gls{fwhm} of surface step-edges ($\sim25$ nm), since these step-edges should be near-atomically sharp. Although this is a conservative estimate, the probe diameter is expected to be larger at low acceleration voltages due to enhanced chromatic aberration, particularly in a system lacking beam deceleration such as ours. The potential loss in \gls{cl} signal resolution due to the increased probe diameter compared to higher acceleration voltages is negligible given the reduction in interaction volume this low acceleration voltage provides.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI2_injection}
\caption{ \normalsize \textbf{a} Interaction volume at 1.5 kV calculated by Monte-Carlo simulation (using \textit{Casino})\protect\cite{Drouin2007}, with the position of the InGaN/GaN \glsentryshort{qw} highlighted. Energy absorbed is in units of energy per unit volume, normalised to the maximum value. \textbf{b} Experimental \glsentryshort{cl} \glsentryshort{qw} intensity profile measured across a single \glsentryshort{pd} at 10 K in P8. The profile is fitted with a Gaussian, resulting in a \glsentryshort{fwhm} of 76 nm.}
\refstepcounter{SIfig}\label{injection}
\end{figure}
From Fig.\ \ref{injection}a, we can see that the vast majority of the excitation energy (95 \%) is absorbed in the top 20 nm of the sample, hence the InGaN/GaN single \gls{qw} is placed only 15 nm below the surface. This design ensures all generated carriers are able to reach the \gls{qw} in the entire temperature range we explore, since the carrier diffusion length in GaN is always above 15 nm from 10 K up to 300 K.\cite{Kaganer2019, Brandt2020, Lahnemann2020} In addition, using thin top layers limits any lateral carrier spreading that can occur before the carriers relax to the \gls{qw}. The radial \gls{fwhm} of the interaction volume in Fig.\ \ref{injection}a is around 25 nm, which indicates the maximum achievable \gls{cl} resolution if there were no lateral carrier diffusion. Thus we could expect this to match the \gls{cl} resolution of our 10 K images, since the diffusion length should be near-zero in the \gls{qw} as emphasised in the main text.
To compare the results of the Monte-Carlo simulation to our experiments, we inspect the 10 K \gls{qw} \gls{cl} intensity across one \gls{pd} as shown in Fig.\ \ref{injection}b (taken from Fig.\ \ref{pd_cl}m in the main text). Since the \gls{pd} itself is localised on one point in the \gls{qw}, the \gls{fwhm} of this profile indicates the real resolution in the \gls{qw} at 10 K. The experimentally measured resolution, at 76 nm, is larger than the 25 nm that was expected from Fig. \ref{injection}a. This discrepancy is confirmed by repeating the analysis for different \glspl{pd}, with an average 10 K intensity profile \gls{fwhm} of $80 \pm 10$ nm.
The mismatch is explained by two factors. Firstly, a recent study by Jahn \textit{et al.}\ has evidenced an increase in \gls{cl} interaction volumes compared to Monte-Carlo simulations,\cite{Jahn2020} since \gls{cl} generates hot carriers which can only radiatively recombine once they have lost excess energy through phonon emission. They well-described the interaction volume broadening in GaN by convoluting the Monte-Carlo radial profile by a Gaussian with \gls{fwhm} of about 50 nm. Secondly, as previously mentioned, there will be some lateral carrier diffusion in the top barrier of the sample before carriers fully relax to the \gls{qw}. With random diffusion, we expect this effect to broaden the final 2-D carrier distribution in the \gls{qw} on the order of the thickness of the barrier, i.e., 15 nm. Combining both of these factors with our original 25 nm Monte-Carlo \gls{fwhm}, we arrive at a more realistic resolution estimate of $\sim60$ nm, much closer to our measured value of $80 \pm 10$ nm. The remaining difference of 10--30 nm could then be due to the limited diffusion possible within the \gls{qw} at 10 K, with a diffusion coefficient of far less than 0.01 \si{\centi\metre\squared\per\second}.\cite{Solowan2013} Such low levels of diffusion at 10 K would only slightly impact our calculated \gls{qw} diffusion lengths at 170 K, since these are mainly on the order of 100s of nanometres.
The $80 \pm 10$ nm \gls{fwhm} of the \gls{cl} intensity profile around single \glspl{pd} should also be close to the \gls{fwhm} of the carrier density distribution at 10 K in the \gls{qw}. Meanwhile we can estimate the total generation rate, $G_{\textnormal{tot}}$ (\si{\per\second}), of carriers in \gls{cl} through the well known equation:\cite{Guthrey2020}
\begin{equation}
G_{\textnormal{tot}} = \frac{I_{\rm p}}{q} . \frac{E_{\textnormal{dep}}}{3 E_{\rm g}} \hspace{3mm},
\end{equation}
\noindent where $I_{\rm p}$ is the electron beam probe current, $q$ is the charge of an electron, $E_{\rm g}$ is the bandgap of the sample, and $E_{\textnormal{dep}}$ is the average energy deposited per electron in the sample, which is equivalent to the beam energy minus the energy lost through backscattered electrons (calculated from Monte-Carlo simulations).\cite{Drouin2007} Using our estimated steady-state carrier distribution \gls{fwhm}, $\Gamma$, and assuming this distribution is Gaussian-like, we can then write the peak steady-state carrier density in the \gls{qw}, $n_{\textnormal{QW}}$, as:
\begin{equation}
n_{\textnormal{QW}} = G_{\textnormal{tot}} \tau. \frac{4 \ln(2)}{\pi \Gamma^2} = \frac{I_{\rm p}}{q} . \frac{E_{\textnormal{dep}}}{3 E_{\rm g}} \tau. \frac{4 \ln(2)}{\pi \Gamma^2} \hspace{3mm},
\label{nss}
\end{equation}
\noindent if we assume all generated carriers relaxed to the \gls{qw}, with $\tau$ being the carrier lifetime. Into eq.\ \ref{nss} we input $I_{\rm p} = 200$ pA, $E_{\rm g} = E_{g, \textnormal{GaN}} = 3.50$ eV, $\Gamma = 80 \pm 10$ nm, and the calculated $E_{\textnormal{dep}} = 1.12$ keV. For $\tau$, we use the effective lifetime gained from \gls{trpl} results at 10 K ( $\sim 1.5$ ns, see \hyperref[trpl_sec]{next section}). The resulting $n_{\textnormal{QW}}$ is found to be $2.8 \pm 0.5 \times 10^{12}$ \si{\per\centi\metre\squared}. This calculated density is important when considering the comparison of \gls{cl} diffusion lengths and \gls{trpl} effective lifetimes in Fig.\ \ref{diff} of the main text, as described in the \hyperref[trpl_sec]{next section}. We note that peak \gls{iqe} for high-quality \mbox{InGaN/GaN} \glspl{qw} commonly occurs at about this carrier density,\cite{David2020} which is in good agreement with what we observe in Fig.\ \ref{current} of the main text, in which the highest \gls{cl} intensity-probe current ratio is achieved at $I_{\rm p} = 200$ pA. Conversely, at $I_{\rm p} = 50$ pA we expect a carrier density in the range $10^{11}$ \si{\per\centi\metre\squared} while for $I_{\rm p} = 500$ pA it should be closer to $10^{13}$ \si{\per\centi\metre\squared}---these densities are further into the defect dominated and Auger recombination regimes, respectively.\cite{David2020}
\section{TIME-RESOLVED PHOTOLUMINESCENCE}
\label{trpl_sec}
In Fig.\ \ref{sample_info} of the main text, data extracted from \gls{qw} \gls{trpl} decay curves are presented: here we show the original curves in Figs.\ \ref{trpl_fig}a--e. The evolution of PL intensity, $I$, with time, $t$, in these decay curves is described by the function:
\begin{equation}
I = A \frac{n_0}{\tau_{\rm r}} \exp\bigg(\frac{-t}{\tau}\bigg) \hspace{3mm},
\label{overall_trpl}
\end{equation}
\noindent where $n_0$ is the initial carrier density in the well, $\tau_{\rm r}$ is the carrier radiative lifetime, $\tau$ is the total carrier lifetime, and $A$ is a constant related to the collection efficiency, area of sample excited, and integration time. $\tau$ is related to $\tau_{\rm r}$ and the non-radiative lifetime, $\tau_{\rm nr}$, through:
\begin{equation}
\frac{1}{\tau} = \frac{1}{\tau_{\rm r}} + \frac{1}{\tau_{\rm nr}} \hspace{3mm}.
\label{tot_lifetime}
\end{equation}
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI3_trpl}
\caption{ \normalsize \textbf{a--e} Temperature-dependent \glsentryshort{trpl} decay curves of P0, P4, P8, P16, and P24, respectively. $\tau_{\textnormal{eff}}$ are extracted from mono-exponential fitting of \glsentryshort{trpl} intensities at early delays, displayed in \textbf{f--j} for all samples along with calculated $\tau_{\rm r, 0}$ and $\tau_{\rm nr, 0}$ values.}
\refstepcounter{SIfig}\label{trpl_fig}
\end{figure}
Unfortunately, $\tau_{\rm r}$ and $\tau_{\rm nr}$ often depend on carrier density in a non-straightforward manner.\cite{Liu2016, David2020} Since the carrier density in \gls{trpl} decreases as time progresses, this dependence leads to deviation from mono-exponential decay as we see in Figs.\ \ref{trpl_fig}a--e. To simplify our analysis, we obtained the effective lifetime, $\tau_{\textnormal{eff}}$, for each curve by fitting intensity at early delay times with a mono-exponential decay convoluted with the instrument response function. $\tau_{\textnormal{eff}}$ is then equivalent to the true carrier lifetime, $\tau$, only when the carrier density is around $n_0$. With an excitation density of 5 \si{\micro\joule\per\centi\metre\squared} at a laser wavelength of 266 nm, and making the simplifying assumption that nearly all carriers relax to the \gls{qw}, $n_0$ is on the order of $10^{12}$ \si{\per\centi\metre\squared}. Crucially, this is the same order of magnitude as the steady-state carrier densities in our \gls{cl} measurements (see \hyperref[carr_inj_sec]{previous section}), allowing us to use our calculated $\tau_{\textnormal{eff}}$ as a reasonable approximation for the carrier lifetime in \gls{cl}, as we did in the \hyperref[diff_sec]{diffusion analysis} of the main text and in the \hyperref[carr_inj_sec]{previous section} of this supplementary. As mentioned previously, this carrier density should also be near peak-\gls{iqe} conditions for high-quality \mbox{InGaN/GaN} \glspl{qw}.\cite{Liu2016, David2020}
To calculate the macroscopic \glspl{iqe} as presented in Fig.\ \ref{sample_info}e of the main text, we used a method first applied by Langer \textit{et al}.\cite{Langer2013} Eq.\ \ref{overall_trpl} indicates that using the initial intensity of a decay curve, $I_0$, we can calculate the initial radiative lifetime, $\tau_{\rm r, 0}$, at any temperature, $T$, through:
\begin{equation}
\tau_{\rm r, 0}(T) = \frac{A n_0}{I_0(T)} \hspace{3mm}.
\end{equation}
\noindent Since excitation and detection conditions aren't changed, $A$ and $n_0$ will be near-constant across all temperatures as long as the intensity rise time is much less than $\tau_{\textnormal{eff}}$. Hence, if we have $\tau_{\rm r, 0}$ at one temperature, we can compute $A n_0$, which then lets us calculate $\tau_{\rm r, 0}$ for all temperatures. Having already found $\tau_{\textnormal{eff}}$, we can then determine $\tau_{\rm nr, 0}$ through eq.\ \ref{tot_lifetime}. Finally, the \gls{iqe} is given by:
\begin{equation}
\textnormal{IQE}(T) =\frac{\tau_{\textnormal{eff}}(T)}{\tau_{\rm r, 0}(T)} \hspace{3mm}.
\label{iqe_eq}
\end{equation}
The next step is to estimate $\tau_{\rm r, 0}$ at one temperature. To this end, we look more closely at the temperature-dependence of P24 $\tau_{\textnormal{eff}}$ (Fig.\ \ref{trpl_fig}j). The lifetime of P24 increases linearly above $\sim$ 90 K from 1.6 \si{\nano\second} up to 3.7 \si{\nano\second} at room temperature. Such behaviour is expected for $\tau_{\rm r}$ in any direct bandgap semiconductor \gls{qw} for both free electron/hole pairs and excitons.\cite{Matsusue1987, Andreani1991} Meanwhile below 90 K, the lifetime is temperature-independent, indicating that the majority of carriers are localised in this temperature range due to alloy disorder in the \mbox{InGaN/GaN} \gls{qw}.\cite{Feldmann1987, Hangleiter2017} The consistency of P24's $\tau_{\textnormal{eff}}$ behaviour with that expected for $\tau_{\rm r}$ indicates this sample is dominated by radiative recombination across the full temperature range we explore. Given that defect-assisted non-radiative recombination is a thermally-activated process,\cite{Henry1977} we can safely assume that $\tau_{\textnormal{eff}}$ for P24 is very close to $\tau_{\rm r, 0}$ at 10 K ($\sim 1.5$ ns). We use this value as $\tau_{\rm r, 0}(T = 10 \textnormal{ K})$ for all samples, since they are expected to have the same radiative lifetime behaviour due to identically grown \gls{qw} structures.
With this key, we can now calculate $\tau_{\rm r, 0}(T)$ for all samples using the process described above. The main source of random error in this method derives from small changes in optical alignment altering the value of $A n_0$. We minimise the error by averaging $\tau_{\rm r, 0}(T)$ across the samples, which is reasonable since they should all have similar radiative lifetimes. P0 is excluded from this average since at high temperatures its $\tau_{\textnormal{eff}}$ becomes very short (Fig.\ \ref{trpl_fig}f). This leads to highly inaccurate $\tau_{\rm r, 0}$ estimation since (i) $\tau_{\textnormal{eff}}$ is on the order of the rise time, significantly decreasing $n_0$ from its low-temperature value, and (ii) $\tau_{\textnormal{eff}}$ reaches the resolution limit of the detection system, and is therefore an overestimation of the true lifetime.
All measured and calculated lifetimes are shown in Figs.\ \ref{trpl_fig}f--j. $\tau_{\rm nr, 0}$ is shorter at high temperatures and for thinner underlayer samples as expected. With these data, we calculated \gls{iqe}(T) with eq.\ \ref{iqe_eq} as displayed in Fig.\ \ref{sample_info}e of the main text.
\section{ATOMIC FORCE MICROSCOPY}
\label{afm_sec}
Fig.\ \ref{afm_fig} presents complementary \gls{afm} images for all samples in this study. The observed morphology matches that of the \gls{se} images in Figs.\ \ref{pd_cl}a--e of the main text, with step-edges evenly spaced by about 80--100 nm. The step-edge height is $\sim 0.52$ nm, equivalent to two molecular monolayers of GaN.\cite{Vurgaftman2003} This places the substrate misorientation in the range 0.3$^{\circ}$--0.4$^{\circ}$, close to the nominal misorientation of 0.2$^{\circ}$. \gls{afm} underscores the low density of threading dislocations in these samples, with no surface V-pits visible at this scale of $2\times2$ \si{\micro\metre\squared}.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI4_afm}
\caption{ \normalsize \textbf{a--e} \glsentryshort{afm} images of the surface for P0, P4, P8, P16, and P24, respectively (scale bars 500 nm, $\Delta z = 2$ nm). All samples present an evenly spaced step-flow structure.}
\refstepcounter{SIfig}\label{afm_fig}
\end{figure}
\section{POINT DEFECT COUNTING DETAILS}
\label{pd_sec}
\begin{figure}[b!]
\centering
\includegraphics[width=1\columnwidth]{SI5_pd_method}
\caption{ \normalsize \textbf{a} Histograms of the 170 K \glsentryshort{qw} \glsentryshort{cl} intensity images shown in Figs.\ \ref{pd_cl}f--j of the main text. The results for P4 and P8 have been fitted with two Gaussian distributions to separate the contribution from type-I and type-II defects---the lower intensity Gaussian (red dashed line) peak position is taken as $I_\textnormal{lim}$ for type-I \glsentryshort{pd} counting. Large-scale integrated \gls{cl} intensity images acquired at 300 K with $I_{\rm p}=50$ pA are required to count type-I \glsentryshortpl{pd} for \textbf{b} P16 and \textbf{d} P24. The positions of threading dislocations are highlighted by red dots to show the lack of correlation with low \glsentryshort{cl} intensity areas. These images are repeated with detected type-I \glsentryshortpl{pd} indicated by red targets in \textbf{c} and \textbf{e}. (All scale bars are 1 \si{\micro\metre}).}
\refstepcounter{SIfig}\label{pd_method}
\end{figure}
The \gls{pd} identification and counting procedure used in the main text involves three parameters: the \gls{fwhm} of the Gaussian filter ($\Gamma_{\rm G}$) and the detection threshold ($I_\textnormal{det}$) involved in the \gls{log} method applied at 10 K, along with the intensity limit ($I_{\textnormal{lim}}$) defined for the 170 \si{\kelvin} data. $\Gamma_{\rm G}$ is linked to the size of the dark regions that will be detected by the \gls{log} method. $I_\textnormal{det}$ was always fixed at 0.025 to avoid detecting random noise in the \gls{cl} images as defects.
To define a reasonable $I_\textnormal{lim}$ for each sample, we calculated the 170 \si{\kelvin} \gls{cl} intensity histograms from the $2 \times 2$ \si{\micro\metre\squared} images in Figs.\ \ref{pd_cl}f--j of the main text. P4 and P8 show distinct double-humped distributions (Fig.\ \ref{pd_method}a), as is expected from the influence of two different types of \gls{pd}. Fitting both distributions with two Gaussians then separates the contribution from type-I and type-II defects. The peaks of the lower intensity Gaussians are taken to define $I_\textnormal{lim}$ for each sample, in accordance with the greater impact of type-I defects on 170 \si{\kelvin} \gls{cl} intensity.
The other samples do not exhibit double-peaked distributions since they are dominated by only one type of defect. P0 exhibits a distribution skewed to low intensities, due to the high density of type-I \glspl{pd} overwhelming any impact from type-II \glspl{pd}. In this case, we make the simplifying assumption that all 10 K intensity fluctuations detected by \gls{log} correspond to type-I defects for P0. The results in Fig.\ \ref{pd_dens} of the main text for the P0/P4/P8 type-I and type-II \gls{pd} densities were obtained by applying our method to the $2 \times 2$ \si{\micro\meter\squared} images in Fig.\ \ref{pd_cl} of the main text, with the errors estimated by varying $\Gamma_{\rm G}$ in the range $70\leq\Gamma_{\rm G}\leq90$ nm---this range matches the \gls{cl} resolution at 10 K ($80 \pm 10$ nm, see Sec.\ \ref{carr_inj_sec}).
On the other hand, the P16/P24 170 K images have distributions skewed towards high intensity, since (i) there are nearly no type-I \glspl{pd} at this $2 \times 2$ \si{\micro\metre\squared} scale and (ii) the higher carrier density in these samples minimises the impact of \glspl{pd} (see Fig.\ \ref{current} in the main text). To counteract both of these effects, we analysed larger $7 \times 7$ \si{\micro\metre\squared} \gls{cl} intensity images of P16/P24 at a low probe current, $I_{\rm p}$, of 50 pA (Figs.\ \ref{pd_method}b--e). We further enhanced the impact of type-I \glspl{pd} by heating the samples to room temperature. At this temperature type-II \glspl{pd} will have no resolvable effect on the intensity, so dark areas will correspond to type-I defects and we do not need to define $I_\textnormal{lim}$. This option was not available for the other samples since the longer diffusion length at high temperature combined with the high density of type-I \glspl{pd} would have made individual defects unresolvable.
At this large scale, there are more threading dislocations in the analysed area which we must not falsely identify as \glspl{pd}, hence we highlight dislocation positions in Figs.\ \ref{pd_method}b \& d (as linked to V-pits in the corresponding \gls{se} images). There is no clear spatial correlation between the dislocation positions and any dark spots in the \gls{cl} intensity. This emphasises the dominant role played by \glspl{pd} in these \glspl{qw} compared to dislocations, and allows us to safely apply \gls{log} detection to these images to calculate type-I \gls{pd} density without counting any dislocations (Figs.\ \ref{pd_method}c \& e). For error estimation, $\Gamma_{\rm G}$ was varied in the range $250\leq\Gamma_{\rm G}\leq350$ nm accounting for the much greater diffusion length at higher temperatures (c.f., P24 has diffusion length $254 \pm 10$ nm at 170 K, see Fig.\ \ref{diff} in the main text). Taking the difference between this type-I density and the density of 10 \si{\kelvin} dark areas in Figs.\ \ref{pd_cl}n \& o of the main text then allowed us to calculate the P16/P24 type-II \gls{pd} densities.
The final number of type-I and type-II \glspl{pd} counted in this work, and the area they were counted over, is listed for each sample in Table \ref{pd_count}. We note that the low uncertainty for the P8 type-I density is a consequence of the low number of defects counted for this sample, and is very likely an underestimation.
\begin{table}[h!]
\caption{ \normalsize \label{pd_count}Number of type-I and type-II \glspl{pd} counted for each sample in this work, along with the area these point defects were counted within; these values were used to calculate the \gls{pd} densities for each sample. The uncertainties arise from varying the $\Gamma_{\rm G}$ value used in the \gls{log} dark region detection method.}
\begin{ruledtabular}
\begin{tabular}{lccr}
Sample & Type-I \gls{pd} counted & Type-II \gls{pd} counted & Area analysed (\si{\micro\metre\squared})\\
P0 & $151 \pm 41$ & 0 (No $I_{\rm lim}$) & 4 \\
P4 & $39 \pm 5$ & $71 \pm 21$ & 4\\
P8 & $12 \pm 1$ & $70 \pm 16$ & 4\\
P16 & $68 \pm 10$ & $54 \pm 2$ & 49 (type-I); 4 (type-II)\\
P24 & $50 \pm 6$ & $58 \pm 4$ & 49 (type-I); 4 (type-II)\\
\end{tabular}
\end{ruledtabular}
\end{table}
\section{TRANSMISSION ELECTRON MICROSCOPY AND TRANSITION ENERGY SIMULATIONS}
\label{tem_sec}
To confirm the exact structure of our three-\gls{ml} \glspl{qw}, samples P0 and P24 were characterised by \gls{stem} \gls{eds}. The cross-section samples for \gls{stem} analysis were prepared by focused Ga ion beam lift-out using a Zeiss NVision 40. Before milling, the top surface was protected by depositing an amorphous carbon layer using an electron beam and then the ion beam. The samples were sectioned within a few degrees of the $\langle 1 1 \bar{2} 0\rangle$ zone axis. Primary milling was made using a 30 kV ion beam, with final cleaning made using a 5 kV ion beam. The atomic resolution \gls{stem} imaging and \gls{eds} spectroscopy were done using a double-aberration corrected FEI Titan Themis 60-300, using a convergence semi-angle of 20 \si{\milli\radian} and a high tension of 80 kV in order to prevent electron-beam damage by the knock-on mechanism.\cite{Smeeton2003, Baloch2013} A Fischione photomultiplier tube detector was used for taking the high-angle annular dark-field images, using an inner collection semi-angle of ~50 \si{\milli\radian}. The resolution of the images is $\sim$1.25--1.5 \si{\angstrom}. \Gls{eds} hyperspectral data were acquired using FEI Super-X ChemiSTEM detectors with FEI/Thermo Scientific Velox software; this software was also used to record the \gls{stem} images and for making the \gls{eds} data analysis. In order to gauge the thickness of the \gls{stem} samples, and as a check on \gls{eds} results, complementary \gls{stem} electron energy-loss spectra were acquired using a Gatan GIF Quantum ERS spectrometer: the measured thicknesses were 70 \si{\nano\metre} and 40 \si{\nano\metre} for P0 and P24, respectively.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI6_TEM}
\caption{ \normalsize \glsentryshort{stem}-\glsentryshort{haadf} images of the \gls{qw} in \textbf{a} P0 and \textbf{b} P24, both taken down the $\langle 11\bar20\rangle$ axis (scale bars 2 nm). \textbf{c} \glsentryshort{stem}-\glsentryshort{haadf} image of the P24 sample structure down the $\langle 11\bar20\rangle$ axis, showing the InAlN/GaN superlattice and the InGaN/GaN single \glsentryshort{qw} (scale bar 20 nm). \textbf{d} \glsentryshort{haadf} contrast profile across the QW of P0 compared with the indium content profile extracted from the same region using \glsentryshort{eds}. Dashed lines mark the boundary of an artefactual contrast fluctuation unrelated to indium. Indium profiles across the \gls{qw} ($z$ axis) for \textbf{e} P0 and \textbf{f} P24 from \gls{eds}. The Muraki fit is shown as a shaded area.}
\refstepcounter{SIfig}\label{tem_fig}
\end{figure}
Fig.\ \ref{tem_fig} presents the results, starting with atomic-resolution \gls{haadf} images of the P0 and P24 \glspl{qw} [Figs.\ \ref{tem_fig}a \& b]. The \glspl{qw} are close to the nominal thickness of three \glspl{ml}, but their interfaces are not completely sharp. However, this observation may be affected by contrast fluctuations which are unrelated to indium content. Fig.\ \ref{tem_fig}c shows a large scale \gls{haadf}-\gls{stem} image of P24 with contrast fluctuations across the entire sample, seemingly having no correlation with any individual part of the structure. These fluctuations are almost certainly an artefact: comparing indium content extracted from \gls{eds} spectroscopy with the \gls{haadf} profile across the \gls{qw} (Fig.\ \ref{tem_fig}d) near a typical fluctuation, we observe that the \gls{haadf} contrast fluctuation does not correspond to any change in indium concentration. These fluctuations may be due to surface relaxation or contamination from sample preparation; at an acceleration voltage of only 80 kV, the electron beam is sensitive to any potential surface effects. To avoid this artefact, we rely on \gls{eds} measurements rather than \gls{haadf} images: Figs.\ \ref{tem_fig}e \& f display indium content profiles across the \glspl{qw} of P0 and P24, obtained by averaging the \gls{eds} signal over the regions in Figs.\ \ref{tem_fig}a \& b. Indeed there is a high plateau in the profiles exactly three \glspl{ml} thick, but the \gls{qw} top interface is not sharp---a characteristic of indium segregation during growth.
To quantify the indium surface segregation, we can apply a model developed by Muraki \textit{et al.}\cite{Muraki1992} In this model, during the growth of one molecular \gls{ml} of InGaN a certain fraction $(1-R)$ of the indium atoms at the surface are incorporated into the \gls{ml} while the remaining fraction $R$ segregates to the new surface. As such, $R$ represents the degree of segregation that occurred during growth. The In content in the \textit{n}\textsuperscript{th} \gls{ml}, $x_n$, is then given by:
\begin{align}
x_n &=x_0 (1-R^n) &(1\leq n\leq N_{\textnormal{QW}}; \textnormal{well}),\\
x_n &=x_0 (1-R^{N_{\textnormal{QW}}})R^{n-N_{\textnormal{QW}}} &(n> N_{\textnormal{QW}}; \textnormal{barrier}),
\end{align}
\noindent where $N_{\textnormal{QW}}$ and $x_0$ are the nominal width and indium content of the \gls{qw}, respectively. This model was fitted to the \gls{stem}-\gls{eds} results for the \glspl{qw} of P0 and P24, as shown in Figs.\ \ref{tem_fig}e \& f. Only the data for which the measured In content was greater than 5 \% were considered for the fitting process; this was to avoid the $\sim 1$ \% zero error present in the \gls{eds} measurement. The zero error arises from noise in the \gls{eds} spectra which is falsely quantified when the indium content is below the detection limit. The derived fit could then be extrapolated into the spurious regions, eliminating the error in subsequent analyses. $N_{\textnormal{QW}}$ was the same for both samples at 4.3, close to the target value of 3; meanwhile $x_0$ was 26 \% for both samples. The values of $R$ extracted (0.82 and 0.86) are in line with previous estimations of the segregation coefficient in InGaN/GaN \glspl{qw}.\cite{Dussaigne2003} Crucially, the \gls{qw} of P0 possesses a slightly larger $R$ value than that of P24, indicating that greater indium segregation occurred in this sample. This could explain the $\sim66$ \si{\milli\electronvolt} \glsentryshort{pl} redshift between P0 and P24 seen in Fig.\ \ref{sample_info}c of the main text---to confirm, we carried out Schrödinger-Poisson calculations.
\begin{table}[h!]
\caption{ \normalsize \label{simresults}Comparison of P0 and P24 emission energies gained from room-temperature \glsentryshort{pl} measurements (experiment) versus transition energies predicted by \textit{nextnano} Schrödinger-Poisson calculations (simulation) at 300 K. The difference between the experimental/simulation energies of P0 and P24 are given in the final column.}
\begin{ruledtabular}
\begin{tabular}{lccr}
&P0 energy (eV) & P24 energy (eV) & Difference $\Delta E_{\textnormal{P0-P24}}$ (meV)\\
Experiment & 3.006 & 2.940 & 66\\
Simulation & 3.117 & 3.068 & 49
\end{tabular}
\end{ruledtabular}
\end{table}
For these calculations, the entire structures of P0 and P24 were simulated at 300 \si{\kelvin} using \textit{nextnano},\cite{Birner2007} including the accurate \gls{ml}-by-\gls{ml} \gls{qw} indium profiles obtained from the Muraki fit. We can compare the simulated results for P0 and P24 to those gained from \glsentryshort{pl} at room temperature using a HeCd laser (Table \ref{simresults}). The difference in transition energies between the \glspl{qw} of P0 and P24 is predicted to be 49 \si{\milli\electronvolt} at room temperature, which accounts quite well for the $\sim66$ \si{\milli\electronvolt} \glsentryshort{pl} redshift observed between P0 and P24, supporting our structural analysis. However, a noticeable discrepancy exists between the experiment and simulated absolute values for each sample ($\sim110$ \si{\milli\electronvolt}). Multiple factors contribute to this discrepancy. Firstly, the simulation does not consider the exciton binding energy in the \gls{qw}, which lowers the emission energy relative to the calculated transition energy. Taking GaN as an example, in the limiting exact 2D case of an infinitely deep \gls{qw} the exciton binding energy is increased by a factor of four relative to the bulk value, placing it at around 100 \si{\milli\electronvolt}.\cite{Vurgaftman2003} Secondly, a Stokes shift is expected between absorption and emission energies due to tail states within the bandgap; this effect is further exacerbated by alloy disorder in the InGaN/GaN \gls{qw}.\cite{Glauser2014} Finally, \gls{eds} quantification is never absolutely precise, and there is at least a $\pm 1$ at.\% systematic error involved. All of these factors should be roughly constant for both samples, and hence do not impede the comparison between them.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI7_power}
\caption{ \normalsize \textbf{a} Transition energies calculated by \textit{nextnano} for the P24 \gls{qw} as the GaN spacer thickness between the SL and the QW was varied. The temperature was set to 300 K. \textbf{b} \glsentryshort{qw} \glsentryshort{pl} series on P24 at 300 \si{\kelvin} obtained using a 325 \si{\nano\metre} HeCd laser, varying the power density from 2 \si{\milli\watt\per\centi\meter\squared} to 20 \si{\watt\per\centi\meter\squared}. Spectra are individually normalised and offset along the \textit{y}-axis for clarity. No shift in peak energy occurs across the entire power density range.}
\refstepcounter{SIfig}\label{power}
\end{figure}
Finally, it was worth ruling out any effect on the fundamental \gls{qw} transition energy from the electric field induced by the InAlN/GaN \gls{sl}; as can be seen in Fig.\ \ref{power}a, at our GaN spacer thickness of 25 \si{\nano\metre} between the \gls{sl} and \gls{qw} the electric field of the \gls{sl} has been mostly screened. Increasing the spacer thickness to 35 nm would result in a change in the transition energy of only $\sim1$ \si{\milli\electronvolt}. Furthermore, the absence of any impact from the built-in electric field can be verified experimentally by measuring \glsentryshort{pl} spectra for P24 under various excitation power densities (Fig.\ \ref{power}b). Any effect from the electric field would be revealed as a blueshift in \gls{qw} emission energy at higher power densities due to carriers screening the field. Conversely, we see that the peak emission energy remains constant across the entire power range, confirming that the 66 \si{\milli\electronvolt} discrepancy in peak emission energy between P0 and P24 is not due to any electric field from the \gls{sl}. Furthermore, this clearly demonstrates the limited effect of the quantum-confined Stark effect in our ultra-thin \glspl{qw}; consequently, we do not need to consider any field-screening effects in in our probe current study (Fig.\ \ref{current} of the main text).
In summary, this complete analysis ensures we can be confident in the segregated indium profiles measured by \gls{eds} and their corresponding Muraki fits. The analysis identifies marginally greater segregation in the \gls{qw} of P0 compared to P24, which explains the observed \gls{pl} peak energy difference between the samples (with any effect from the built-in electric field being ruled out experimentally and theoretically). Slight changes in segregation can then explain the small variances in peak energy between the samples seen in the room-temperature \gls{qw} \gls{pl} (Fig.\ \ref{sample_info}c of the main text). For our calculation of \gls{pd} 3-D densities (\si{\per\centi\metre\cubed}) from 2-D values (\si{\per\centi\metre\squared}), we use the average \gls{fwhm} of the \gls{eds} indium profiles at $\sim1.8$ nm.
\section{COMPLETE DIFFUSION ANALYSIS}
\label{comp_diff_sec}
In Fig.\ \ref{diff}e of the main text we presented the diffusion lengths calculated for all samples from the Gaussian convolution fitting method. Here we show the peak energy images used to obtain these diffusion lengths in Fig.\ \ref{diffusion}. Step-edge directions were calculated by Fourier transform analysis of the \gls{se} images (Figs.\ \ref{diffusion}a--e). The impact of the step-edges on the peak energy is evident for P4--P24 in Figs.\ \ref{diffusion}g--j, which leads to strongly anisotropic diffusion in all of these samples. This is confirmed by the diffusion lengths parallel ($L_{D, \parallel}$) and perpendicular ($L_{D, \perp}$) to the step-edges extracted by Gaussian convolution (Figs.\ \ref{diffusion}p--t). These convoluted images are in good agreement with the real 170 K peak energy images (Figs.\ \ref{diffusion}k--o), confirming the validity of our simple diffusion analysis. The error bars in diffusion length shown in Fig.\ \ref{diff} of the main text were estimated by varying the initial parameters of the Gaussian convolution fit.
\begin{figure}[h]
\centering
\includegraphics[width=1\columnwidth]{SI8_diffusion}
\caption{ \normalsize \textbf{(a--e)} \glsentryshort{se} images for all samples as presented in the main text (Figs.\ \ref{pd_cl}a--e) with the step-edge direction marked by an angle as calculated by Fourier transform analysis (scale bars 500 nm). \textbf{(f--j)} 10 K and \textbf{(k--o)} 170 K \glsentryshort{qw} \glsentryshort{cl} peak energy images from the same areas as in the \glsentryshort{se} images. Peak energy is plotted relative to the mean energy of each image as in the main text. \textbf{(p--t)} Images obtained from the Gaussian convolution procedure applied to the 10 K \glsentryshort{cl} images in f--j, with calculated diffusion lengths indicated.}
\refstepcounter{SIfig}\label{diffusion}
\end{figure}
\clearpage
\twocolumngrid
\pdfbookmark[0]{References}{sec:ref}
\textbf{References}
\normalsize
|
\section*{Acknowledgments}
We are grateful for helpful discussions with Andrei Alexandru, Tom Cohen, Daniel Hackett, Julian Mu$\tilde{\mathrm{n}}$oz, Jessie Shelton, and Xiaojun Yao. We especially thank Benjamin Svetitsky for his collaboration in early stages of this project. We also thank Yonit Hochberg, Graham Kribs, Rebecca Leane, Michele Redi, and Kai Schmidt-Hoberg for constructive comments on the draft. We especially thank Filippo Sala for raising the question of quark pressure effects.
The work of PA, GWR, and TRS was supported by the U.S. Department of Energy, Office of Science, Office of High Energy Physics, under grant Contract Number DE-SC0012567.
The work of PA is also supported by the MIT Department of Physics.
GWR was also supported by an NSF GRFP and the U.S. Department of Energy, Office of Science, Office of Nuclear Physics under grant Contract Number DE-SC0011090.
The work of EK is supported by the Israel Science Foundation (grant No.1111/17), by the Binational Science Foundation
(grant No. 2016153), and by the I-CORE Program of the Planning Budgeting Committee (grant No. 1937/12).
The work of EDK was supported by the Zuckerman STEM Leadership Program, and by ISF and I-CORE grants of EK.
JS is primarily supported by a Feodor Lynen Fellowship from the Alexander von Humboldt foundation.
\footnotesize
\bibliographystyle{abbrv}
|
\section{Introduction}
\label{sec:intro}
Clustering is the process of finding underlying group structure in heterogeneous data.
Although many methods exist for clustering, one of the most prevalent in the literature is model-based, and makes use of the $G$ component finite mixture model.
The finite mixture model assumes that the density of a random vector $\mathbf{X}$ is
$$
f(\mathbf{x}~|~{\boldsymbol{\vartheta}})=\sum_{g=1}^G\pi_gf(\mathbf{x}~|~{\boldsymbol{\theta}}_g)
$$
where $\pi_g>0$ are the mixing proportions, with $\sum_{g=1}^G\pi_g=1$, $f(\cdot)$ are the component densities parameterized by ${\boldsymbol{\theta}}_g$ and ${\boldsymbol{\vartheta}}$ contains all the parameters of the model.
As discussed by \cite{mcnicholas16a}, the relationship between the finite mixture model and clustering was initially proposed by \citet{tiedeman55}.
Some years after, \citet{wolfe65} first utilized a Gaussian mixture model for model-based clustering.
Since then, there have been a myriad of contributions to this branch of the literature, mainly considering mixtures of non-Gaussian distributions \citep[a recent review is given by][]{mcnicholas16b}.
Some of these include mixtures of $t$ distributions (\citealp{peel00,andrews11a,andrews12,steane12,lin14}) and power exponential distributions \citep{dang15}, both of which parameterize tail weight and may be useful for modelling data with outliers.
Additionally, many distributions that parameterize both skewness and tail weight have also been proposed.
These include, but are not limited to, work where mixture components follow a skew-$t$ distribution \citep{lin10,vrbik12,vrbik14,lee14,murray14a,murray14b}, a normal inverse Gaussian distribution \citep{karlis09}, a variance-gamma \citep{mcnicholas17}, a generalized hyperbolic \citep{browne15}, a hidden truncation hyperbolic distribution \citep{murray17b,murray20}, or a skewed power exponential distribution \citep{dang19}.
All of these allow for the modelling of skewed data, which when modelled by a Gaussian distribution has a tendency to over fit the true number of components.
One drawback of the non-Gaussian mixture models mentioned thus far is that they do not typically account for dependencies via covariates.
When there is a clear regression relationship between the variables, important insight can be gained by accounting for functional dependencies between them.
In such scenarios, the finite mixture of regressions \citep[FMR:][]{desarbo88} may be employed.
As in traditional regression analysis, the FMR model assumes that the covariates are fixed, and therefore the distribution of the covariates is not taken into consideration when performing the cluster analysis.
Indeed, such a model is also known as finite mixture of regression with fixed covariates.
Unlike the FMR, the cluster weighted model (CWM) offers far more flexibility in that the distribution of the covariates is taken into account.
First introduced by \cite{gershenfeld97}, it is also sometimes referred to as a finite mixture of regression with random covariates.
As discussed in Section~\ref{sec:back}, several CWMs have been introduced in the literature.
Most of them consider a univariate response variable and a set of covariates, modelled by a univariate and a multivariate distribution, respectively.
To our knowledge, only \citet{dang17} consider multiple response variables and covariates, both modelled via multivariate Gaussian distributions.
Herein, we extend this branch of the literature by considering multivariate skewed distributions for both the responses and the covariates.
Specifically the skew-$t$, the generalized hyperbolic, the variance gamma, and the normal inverse Gaussian distributions will be used.
By also considering the Gaussian distribution, we will compose a family of 24 new CWMs, that are flexible enough to consider scenarios in which both the responses and the covariates are skewed, or in which one of the two sets of variables is normally distributed and the other is skewed.
The remainder of this paper is laid out as follows.
In Section~\ref{sec:back}, a detailed background is given for the cluster weighted model, and the four skewed distributions that will be utilized herein.
Section~\ref{sec:meth} discusses the use of the four skewed distributions in the CWM setting including parameter estimation.
Section~\ref{sec:sim} considers two simulated analyses, in which the parameter recovery and the classification performances for our models are evaluated.
A comparison between FMRs and CWMs is also discussed.
Section~\ref{sec:real} applies our CWMs, along with the Gaussian CWM and the FMRs, to two real datasets.
Lastly, we provide a summary and discuss possible avenues for future work in Section~\ref{sec:end}.
\section{Background}
\label{sec:back}
\subsection{Cluster Weighted Models}
\label{sec:cwms}
Assume we observe a continuous random response variables $Y_i$ and continuous random covariate vectors $\mathbf{X}_i$ of dimension $d$, for a sample of $N$ observations, with $i\in\{1,\ldots,N\}$.
Also assume the sample can be partitioned into $G$ groups.
In the CWM framework, the joint density of $Y_i$ and $\mathbf{X}_i$ can be written as
\begin{equation}
p(\mathbf{x}_i,y_i~|~{\boldsymbol{\vartheta}})=\sum_{g=1}^G\pi_gp_\mathbf{X}(\mathbf{x}_i~|~\mbox{\boldmath$\phi$}_g)p_Y(y_i~|~\mathbf{x}_i,\mbox{\boldmath$\theta$}_g),
\label{eq:cwmg}
\end{equation}
where $p_\mathbf{X}(\cdot)$ is density function for $\mathbf{X}_i$ parameterized by $\mbox{\boldmath$\phi$}_g$ and $p_Y(\cdot)$ is the density function of $Y_i~|~\mathbf{x}_i$ parameterized by $\mbox{\boldmath$\theta$}_g$.
Note that ${\boldsymbol{\vartheta}}=\{\pi_1,\ldots,\pi_G,\mbox{\boldmath$\phi$}_1,\ldots,\mbox{\boldmath$\phi$}_G,{\boldsymbol{\theta}}_1,\ldots,{\boldsymbol{\theta}}_G\}$ represents the set of all parameters.
The CWM is very flexible, and has been thoroughly studied in the literature.
In its simplest form, it is assumed that $p_\mathbf{X}(\cdot)=\Phi_d(\mathbf{x}~|~\mbox{\boldmath$\mu$}_g,\mathbf\Psi_g)$ and $p_Y(\cdot)=\Phi_1(y~|~\boldsymbol{\beta}_g'\mathbf{x}_i^*,\sigma_g)$, where $\Phi_r(\cdot)$ represents the $r$-dimensional Gaussian density, $\boldsymbol{\beta}$ is a $(d+1)$ dimensional vector of coefficients, and $\mathbf{x}_i^*=(1,\mathbf{x}_i')'$.
Many extensions of this model have been proposed.
For example, \cite{ingrassia12} propose the use of $t$ distributions for the response and covariates for data with potential outliers.
Other extensions include high dimensional covariates \citep{subedi13}, non-linear functional relationships \citep{punzo14c}, detecting outliers using the contaminated normal distribution \citep{punzo14b}, and a general approach that allows various types of response variables as well as covariates of mixed-type \citep{ingrassia15}.
\cite{pocuca20} consider a further extension of \cite{ingrassia15} by further splitting the continuous covariates into Gaussian and non-Gaussian covariates.
Unlike the CWMs just described, \cite{dang17} consider a multivariate response model.
In this case it is assumed that the response $\mathbf{Y}_i$ is of dimension $p$, so that $p_\mathbf{Y}(\cdot)=\Phi_p(\mathbf{y}~|~\mathbf{B}_g'\mathbf{x}_i^*,\mathbf\Sigma_g)$, where $\mathbf{B}$ is a $(1+d)\times p$ matrix of coefficients.
This multivariate response CWM will be the basis for our family of 24 models, where both or just one of $\mathbf{Y}_i$ and $\mathbf{X}_i$ are allowed to follow a skewed distribution.
\subsection{Generalized Inverse Gaussian Distribution}
\label{subsec:gig}
Before introducing the four skewed distributions which will be used in this paper, the generalized inverse Gaussian distribution is first introduced.
A random variable $Y$ has a generalized inverse Gaussian (GIG) distribution parameterized by $a, b$ and $\lambda$, denoted herein by $\text{GIG}(a,b,\lambda)$, if its probability density function can be written as
$$
f(y|a, b, \lambda)=\frac{\left({a}/{b}\right)^{\frac{\lambda}{2}}y^{\lambda-1}}{2K_{\lambda}(\sqrt{ab})}\exp\left\{-\frac{ay+{b}/{y}}{2}\right\},
$$
where
$$
K_{\lambda}(u)=\frac{1}{2}\int_{0}^{\infty}y^{\lambda-1}\exp\left\{-\frac{u}{2}\left(y+\frac{1}{y}\right)\right\}dy
$$
is the modified Bessel function of the third kind with index $\lambda$.
Expectations of some functions of a GIG random variable are mathematically tractable, e.g.:
\begin{equation}
\mathbb{E}(Y)=\sqrt{\frac{b}{a}}\frac{K_{\lambda+1}(\sqrt{ab})}{K_{\lambda}(\sqrt{ab})},
\label{eq:ai}
\end{equation}
\begin{equation}
\mathbb{E}\left({1}/{Y}\right)=\sqrt{\frac{a}{b}}\frac{K_{\lambda+1}(\sqrt{ab})}{K_{\lambda}(\sqrt{ab})}-\frac{2\lambda}{b},
\label{eq:bi}
\end{equation}
\begin{equation}
\mathbb{E}(\log Y)=\log\left(\sqrt{\frac{b}{a}}\right)+\frac{1}{K_{\lambda}(\sqrt{ab})}\frac{\partial}{\partial \lambda}K_{\lambda}(\sqrt{ab}).
\label{eq:ci}
\end{equation}
An alternative parameterization of the generalized inverse Gaussian distribution, as used by \cite{browne15} is given by
\begin{equation}
g(y|\omega,\eta,\lambda)= \frac{\left({w}/{\eta}\right)^{\lambda-1}}{2\eta K_{\lambda}(\omega)}\exp\left\{-\frac{\omega}{2}\left(\frac{w}{\eta}+\frac{\eta}{w}\right)\right\},
\label{eq:I}
\end{equation}
where $\omega=\sqrt{ab}$ and $\eta=\sqrt{a/b}$.
For notational clarity, we will denote the parameterization given in \eqref{eq:I} by $\text{I}(\omega,\eta,\lambda)$.
\subsection{Skewed Distributions}
\label{subsec:skewed}
Many skewed distributions may be derived by using a normal variance-mean mixture model.
This model assumes that a random vector $\mathbf{X}$ can be written
\begin{equation}
\mathbf{X}=\mbox{\boldmath$\mu$}+W\boldsymbol{\alpha}+\sqrt{W}\mathbf{U},
\label{eq:vmm}
\end{equation}
where $\mbox{\boldmath$\mu$}$ is a location parameter, $\boldsymbol{\alpha}$ is a skewness parameter, $W$ is a positive random variable, and $\mathbf{U}\sim\text{N}({\bf 0},\mathbf\Sigma)$, with $\text{N}(\cdot)$ identifying the multivariate normal distribution.
Herein, we will focus on four different skewed distributions that are special cases of the variance mean mixture model and have been successfully used in model based clustering.
Namely we will focus on the skew-$t$ (ST), the generalized hyperbolic (GH), the variance gamma (VG) and the normal inverse Gaussian distribution (NIG).
The $p$-dimensional skew-$t$ distribution, denoted by $\text{ST}(\mbox{\boldmath$\mu$},\boldsymbol{\alpha},\mathbf\Sigma,\nu)$, arises with $W\sim\text{IGamma}(\nu/2,\nu/2)$, where $\text{IGamma}(\cdot)$ is the inverse gamma distribution.
The resulting density is
\begin{align*}
f_{\text{ST}}(\mathbf{x}~|~{\boldsymbol{\vartheta}})=&\frac{2\left(\frac{\nu}{2}\right)^{\frac{\nu}{2}}\exp\left\{(\mathbf{x}-\mbox{\boldmath$\mu$})'\mathbf\Sigma^{-1}\boldsymbol{\alpha}) \right\} }{(2\pi)^{\frac{p}{2}}| \mathbf\Sigma |^{\frac{1}{2}}\Gamma(\frac{\nu}{2})} \left(\frac{\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+\nu}{\rho(\boldsymbol{\alpha},\mathbf\Sigma)}\right)^{-\frac{\nu+p}{4}} \\ & \qquad\qquad\qquad\qquad\times
K_{-\frac{\nu+p}{2}}\left(\sqrt{\left[\rho(\boldsymbol{\alpha},\mathbf\Sigma)\right]\left[\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+\nu\right]}\right),
\end{align*}
where
$$
\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)=(\mathbf{x}-\mbox{\boldmath$\mu$})'\mathbf\Sigma^{-1}(\mathbf{x}-\mbox{\boldmath$\mu$}), \quad \rho(\boldsymbol{\alpha};\mathbf\Sigma)=\boldsymbol{\alpha}'\mathbf\Sigma^{-1}\boldsymbol{\alpha},
$$
and $\nu>0$.
The $p$-dimensional generalized hyperbolic distribution, denoted by $\text{GH}(\mbox{\boldmath$\mu$},\boldsymbol{\alpha},\mathbf\Sigma,\lambda,\omega)$, arises with $W\sim\text{I}(\omega,1,\lambda)$, and the resulting density is
\begin{align*}
f_{\text{GH}}(\mathbf{x}|{\boldsymbol{\vartheta}})=&\frac{\exp\left\{(\mathbf{x}-\mbox{\boldmath$\mu$})'\mathbf\Sigma^{-1}\boldsymbol{\alpha}) \right\}}{(2\pi)^{\frac{p}{2}}| \mathbf\Sigma |^{\frac{1}{2}}K_{\lambda}(\omega)} \left(\frac{\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+\omega}{\rho(\boldsymbol{\alpha},\mathbf\Sigma)+\omega}\right)^{\frac{\left(\lambda-\frac{p}{2}\right)}{2}} \\ & \times
K_{\left(\lambda-{p}/{2}\right)}\left(\sqrt{\left[\rho(\boldsymbol{\alpha},\mathbf\Sigma)+\omega\right]\left[\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+\omega\right]}\right),
\end{align*}
$\lambda\in \mathbb{R}$, $\omega\in\mathbb{R}^+$.
The $p$-dimensional variance gamma distribution, denoted by $\text{VG}(\mbox{\boldmath$\mu$},\boldsymbol{\alpha},\mathbf\Sigma,\gamma)$, arises with $W\sim\text{Gamma}(\gamma,\gamma)$, and the probability density function is
\begin{align*}
f_{\text{VG}}(\mathbf{x}|{\boldsymbol{\vartheta}})=&\frac{2\gamma^{\gamma}\exp\left\{(\mathbf{X}-\mbox{\boldmath$\mu$})\mathbf\Sigma^{-1}\boldsymbol{\alpha}' \right\}}{(2\pi)^{\frac{p}{2}}| \mathbf\Sigma |^{\frac{1}{2}}\Gamma(\gamma)} \left(\frac{\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)}{\rho(\boldsymbol{\alpha},\mathbf\Sigma)+2\gamma}\right)^{\frac{\left(\gamma-{p}/{2}\right)}{2}} \\
&\times K_{\left(\gamma-\frac{p}{2}\right)}\left(\sqrt{\left[\rho(\boldsymbol{\alpha},\mathbf\Sigma)+2\gamma\right]\left[\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)\right]}\right),
\end{align*}
where $\gamma\in\mathbb{R}^+$.
Finally, the normal inverse Gaussian, denoted herein by $\text{NIG}(\mbox{\boldmath$\mu$},\boldsymbol{\alpha},\mathbf\Sigma,\kappa)$, is derived with $W\sim\text{IG}(1,\kappa)$ \citep{ohagan16} where $\text{IG}(\cdot)$ denotes the inverse Gaussian distribution.
\begin{align*}
f_{\text{NIG}}(\mathbf{x}|{\boldsymbol{\vartheta}})&=\frac{2\exp\left\{(\mathbf{x}-\mbox{\boldmath$\mu$})\mathbf\Sigma^{-1}\boldsymbol{\alpha})+\kappa\right\}
}{(2\pi)^{\frac{p+1}{2}}| \mathbf\Sigma |^{\frac{1}{2}}}\left(\frac{\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+1}{\rho(\boldsymbol{\alpha},\mathbf\Sigma)+\kappa^2}\right)^{-{\left(1+p\right)}/{4}}\\
&\times K_{-{(1+p)}/{2}}\left(\sqrt{\left[\rho(\boldsymbol{\alpha},\mathbf\Sigma)+\kappa^2\right]\left[\delta(\mathbf{x};\mbox{\boldmath$\mu$},\mathbf\Sigma)+1\right]}\right),
\end{align*}
where $\kappa\in\mathbb{R}^+$.
\section{Methodology}
\label{sec:meth}
\subsection{Cluster Weighted Models With Skewed Distributions}
\label{subsec:cwm_skew}
The cluster weighted model using skewed distributions is now presented.
For the purposes of this paper, the densities $p_\mathbf{X}$ and $p_\mathbf{Y}$ can be any of the four multivariate skewed distributions previously presented or the multivariate normal distribution.
In addition, $p_\mathbf{X}$ and $p_\mathbf{Y}$ need not be the same, thus creating a family of 24 new CWMs, plus the completely unconstrained normal CWM of \cite{dang17}.
For notational clarity, each model will be labeled by separating with a ``-'' the acronyms used for $p_\mathbf{X}$ and $p_\mathbf{Y}$, respectively.
For example, the unconstrained normal CWM of \cite{dang17} is herein called N-N CWM.
Recalling the variance mean mixture model in \eqref{eq:vmm}, for an observation in group $g$ the response vector $\mathbf{Y}_i$, conditional on the covariate vector $\mathbf{X}_i$, can be written
$$
\mathbf{Y}_i|\mathbf{x}_i=\mathbf{B}_g'\mathbf{x}_i^*+V_{ig}{\boldsymbol{\alpha}_Y}_g+\sqrt{V_{ig}}{\mathbf{U}_Y}_{i},
$$
where $\mathbf{B}_g$ is a $(1+d)\times p$ matrix of coefficients, $\mathbf{x}_i^*=(1,\mathbf{x}_i')'$, ${\mathbf{U}_Y}_{i}\sim\text{N}({\bf 0},{\mathbf\Sigma_Y}_g)$.
In the case that $\mathbf{Y}_i$ is modelled using a multivariate normal distribution then it is assumed $\mathbf{Y}_i~|~\mathbf{x}_i\sim \text{N}(\mathbf{B}_g'\mathbf{x}_i^*,{\mathbf\Sigma_Y}_g)$.
If modelling the covariate vector using a skewed distribution, then the random covariate vector, $\mathbf{X}_i$, can be written
$$
\mathbf{X}_i=\mbox{\boldmath$\mu$}_g+W_{ig}{\boldsymbol{\alpha}_X}_g+\sqrt{W_{ig}}{\mathbf{U}_X}_{i},
$$
with ${\mathbf{U}_X}_{i}\sim \text{N}({\bf 0},{\mathbf\Sigma_X}_{g})$.
Otherwise, if $\mathbf{X}_i$ is modelled using a normal distribution, then $\mathbf{X}_i\sim\text{N}(\mbox{\boldmath$\mu$}_g,{\mathbf\Sigma_X}_g)$.
\subsection{Parameter Estimation}
\label{sec:EM}
The expectation-maximization (EM) algorithm is now utilized for parameter estimation.
For the purposes of this section, we introduce the latent variables $z_{ig}$, where $z_{ig}=1$ if observation $i$ is in group $g$, and $0$ otherwise.
We also introduce the latent variables $W_{ig}$ and $V_{ig}$ if the distributions of $\mathbf{X}_i$ and $\mathbf{Y}_i$, respectively, are skewed.
The complete data log-likelihood is then
$$
l({\boldsymbol{\vartheta}})=l_1(\mbox{\boldmath$\pi$})+l_2(\mbox{\boldmath$\phi$})+l_3({\boldsymbol{\theta}}),
$$
where $\mbox{\boldmath$\pi$}=(\pi_1,\ldots,\pi_G)$, $\mbox{\boldmath$\phi$}=\{\mbox{\boldmath$\phi$}_1,\ldots,\mbox{\boldmath$\phi$}_G\}$, $\mbox{\boldmath$\theta$}=\{\mbox{\boldmath$\theta$}_1,\ldots,\mbox{\boldmath$\theta$}_G\}$, and
$$
l_1(\mbox{\boldmath$\pi$})=\sum_{g=1}^G\sum_{i=1}^Nz_{ig}\pi_g.
$$
If $\mathbf{X}_i$ follows one of the skewed distributions,
\begin{align*}
l_2(\mbox{\boldmath$\phi$}) & =\sum_{g=1}^G\sum_{i=1}^N\log(h_W(w_{ig}~|~{\boldsymbol \phi_W}_g))+C_X-\frac{1}{2}\sum_{g=1}^G\sum_{i=1}^N z_{ig}[\log(|{\mathbf\Sigma_X}_g|)\\& +(1/w_{ig})(\mathbf{x}_i-{\mbox{\boldmath$\mu$}}_g)'{\mathbf\Sigma_X}_g^{-1}(\mathbf{x}_i-{\mbox{\boldmath$\mu$}}_g)-(\mathbf{x}_i-{\mbox{\boldmath$\mu$}}_g)'{\mathbf\Sigma_X}_g^{-1}{\boldsymbol{\alpha}_X}_g-{\boldsymbol{\alpha}_X}_g'{\mathbf\Sigma_X}_g^{-1}(\mathbf{x}_i-{\mbox{\boldmath$\mu$}}_g)\\& +w_{ig}{\boldsymbol{\alpha}_X}_g'{\mathbf\Sigma_X}_g^{-1}{\boldsymbol{\alpha}_X}_g],
\end{align*}
where $h_W(\cdot)$ is the density function of $W_{ig}$ parameterized by ${\mbox{\boldmath$\phi$}_W}_g$, and $C_X$ is constant with respect to the parameters.
On the other hand, if $\mathbf{X}_i$ is normally distributed then
$$
l_2(\mbox{\boldmath$\phi$})=C_{XN}-\frac{1}{2}\sum_{g=1}^G\sum_{i=1}^Nz_{ig}[\log(|{\mathbf\Sigma_X}_g|)+(\mathbf{x}_i-\mbox{\boldmath$\mu$}_g)'{\mathbf\Sigma_X}_g^{-1}(\mathbf{x}_i-\mbox{\boldmath$\mu$}_g)],
$$
where $C_{XN}$ is constant with respect to the parameters.
If $\mathbf{Y}_i$ is distributed according to one of the skewed distributions,
\begin{align*}
l_3(\mbox{\boldmath$\theta$}) & =\sum_{g=1}^G\sum_{i=1}^N\log(h_V(v_{ig}~|~{{\boldsymbol{\theta}}_V}_g))+C_Y-\frac{1}{2}\sum_{g=1}^G\sum_{i=1}^N z_{ig}[\log(|{\mathbf\Sigma_Y}_g|)\\& +(1/v_{ig})(\mathbf{y}_i-{\mathbf{B}_g'\mathbf{x}_i^*})'{\mathbf\Sigma_Y}_g^{-1}(\mathbf{y}_i-{\mathbf{B}_g'\mathbf{x}_i^*})-(\mathbf{y}_i-{\mathbf{B}_g'\mathbf{x}_i^*})'{\mathbf\Sigma_Y}_g^{-1}{\boldsymbol{\alpha}_Y}_g-{\boldsymbol{\alpha}_Y}_g'{\mathbf\Sigma_Y}_g^{-1}(\mathbf{y}_i-{\mathbf{B}_g'\mathbf{x}_i^*})\\& +v_{ig}{\boldsymbol{\alpha}_Y}_g'{\mathbf\Sigma_Y}_g^{-1}{\boldsymbol{\alpha}_Y}_g],
\end{align*}
where $h_V(\cdot)$ is the density function of $V_{ig}$ parameterized by ${{\boldsymbol{\theta}}_V}_g$, and $C_Y$ is a constant with respect to the parameters.
If $\mathbf{Y}_i$ is normally distributed,
$$
l_3(\mbox{\boldmath$\theta$})=C_{YN}-\frac{1}{2}\sum_{g=1}^G\sum_{i=1}^Nz_{ig}[\log(|{\mathbf\Sigma_Y}_g|)+(\mathbf{x}_i-\mbox{\boldmath$\mu$}_g)'{\mathbf\Sigma_Y}_g^{-1}(\mathbf{x}_i-\mbox{\boldmath$\mu$}_g)],
$$
where $C_{YN}$ is constant with respect to the parameters.
After initialization, the EM algorithm proceeds as follows.\\
\noindent {\bf E Step:} Update the group memberships $z_{ig}$ given by
$$
\hat{z}_{ig}=\frac{\pi_gp(\mathbf{y}_i,\mathbf{x}_i~|~\hat{\mbox{\boldmath$\phi$}}_g,\hat{{\boldsymbol{\theta}}}_g)}{\sum_{h=1}^G\pi_hp(\mathbf{y}_i,\mathbf{x}_i~|~\hat{\mbox{\boldmath$\phi$}}_h,\hat{{\boldsymbol{\theta}}}_h)}.
$$
If the distribution of $\mathbf{X}_i$ is skewed, then in addition, the following values need to be updated
\begin{equation*}
\begin{split}
a_{ig}&\colonequals\mathbb{E}[W_{ig}~|~z_{ig}=1,\mathbf{x}_i,\hat{\mbox{\boldmath$\phi$}}_g]\\
b_{ig}&\colonequals\mathbb{E}[1/W_{ig}~|~z_{ig}=1,\mathbf{x}_i,\hat{\mbox{\boldmath$\phi$}}_g]\\
c_{ig}&\colonequals\mathbb{E}[\log(W_{ig})~|~z_{ig}=1,\mathbf{x}_i,\hat{\mbox{\boldmath$\phi$}}_g]\\
\end{split}
\end{equation*}
If the distribution of $\mathbf{Y}_i$ is skewed, then the following values are also updated
\begin{equation*}
\begin{split}
k_{ig}&\colonequals\mathbb{E}[V_{ig}~|~z_{ig}=1,\mathbf{y}_i,\hat{{\boldsymbol{\theta}}}_g]\\
m_{ig}&\colonequals\mathbb{E}[1/V_{ig}~|~z_{ig}=1,\mathbf{y}_i,\hat{{\boldsymbol{\theta}}}_g]\\
n_{ig}&\colonequals\mathbb{E}[\log(V_{ig})~|~z_{ig}=1,\mathbf{y}_i,\hat{{\boldsymbol{\theta}}}_g]\\
\end{split}
\end{equation*}
These updates are dependent upon the distribution; however, we have the following properties of the conditional distributions of the latent variables for each of the four distributions.
\begin{align*}
W_{ig}^{\text{ST}}~|~\mathbf{x}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_X}_g,{\mathbf\Sigma_X}_g),\delta(\mathbf{x}_i;\mbox{\boldmath$\mu$}_g,{\mathbf\Sigma_X}_g)+{\nu_{X}}_g,-({\nu_{X}}_g+p)/2\right)\\
W_{ig}^{\text{GH}}~|~\mathbf{x}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_X}_g,{\mathbf\Sigma_X}_g)+{\omega_{X}}_{g},\delta(\mathbf{x}_i;\mbox{\boldmath$\mu$}_g,{\mathbf\Sigma_X}_g)+{\omega_{X}}_g,{\lambda_{X}}_g-{p}/{2}\right)\\
W_{ig}^{\text{VG}}~|~\mathbf{x}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_X}_g,{\mathbf\Sigma_X}_g)+2{\gamma_{X}}_g,\delta(\mathbf{x}_i;\mbox{\boldmath$\mu$}_g,{\mathbf\Sigma_X}_g),{\gamma_{X}}_g-{p}/{2}\right)\\
W_{ig}^{\text{NIG}}~|~\mathbf{x}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_X}_g,{\mathbf\Sigma_X}_g)+{\kappa^2_{X}}_g,\delta(\mathbf{x}_i;\mbox{\boldmath$\mu$}_g,{\mathbf\Sigma_X}_g)+1,-{(1+p)}/{2}\right)
\end{align*}
and
\begin{align*}
V_{ig}^{\text{ST}}~|~\mathbf{x}_i, \mathbf{y}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_Y}_g,{\mathbf\Sigma_Y}_g),\delta(\mathbf{y}_i;\mathbf{B}_g'\mathbf{x}_i,{\mathbf\Sigma_Y}_g)+{\nu_{Y}}_g,-({\nu_{Y}}_g+p)/2\right)\\
V_{ig}^{\text{GH}}~|~\mathbf{x}_i, \mathbf{y}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_Y}_g,{\mathbf\Sigma_Y}_g)+{\omega_{Y}}_g,\delta(\mathbf{y}_i;\mathbf{B}_g'\mathbf{x}_i,{\mathbf\Sigma_Y}_g)+{\omega_{Y}}_g,{\lambda_{Y}}_g-{p}/{2}\right)\\
V_{ig}^{\text{VG}}~|~\mathbf{x}_i, \mathbf{y}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_Y}_g,{\mathbf\Sigma_Y}_g)+2{\gamma_{Y}}_g,\delta(\mathbf{y}_i;\mathbf{B}_g'\mathbf{x}_i,{\mathbf\Sigma_Y}_g),{\gamma_{Y}}_g-{p}/{2}\right)\\
V_{ig}^{\text{NIG}}~|~\mathbf{x}_i, \mathbf{y}_i, z_{ig}=1&\sim \text{GIG}\left(\rho({\boldsymbol{\alpha}_Y}_g,{\mathbf\Sigma_Y}_g)+{\kappa^2_{Y}}_g,\delta(\mathbf{y}_i;\mathbf{B}_g'\mathbf{x}_i,{\mathbf\Sigma_Y}_g)+1,-{(1+p)}/{2}\right).
\end{align*}
Therefore, all of the required expectations can be calculated using \eqref{eq:ai}--\eqref{eq:ci}.
\noindent {\bf M Step:} In the M step, we update all of the parameters.
Specifically, the parameters for the distribution of $\mathbf{X}_i$ are updated as follows.
If $\mathbf{X}_i$ is normally distributed then
\begin{equation*}
\hat{\mbox{\boldmath$\mu$}}_g=\frac{1}{T_g}\sum_{g=1}^G\hat{z}_{ig}\mathbf{x}_i, \qquad \hat{{\mathbf\Sigma}}_{X_g}=\frac{1}{T_g}\sum_{g=1}^G\hat{z}_{ig}(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)',
\end{equation*}
with $T_g=\sum_{i=1}^N\hat{z}_{ig}$.
On the other hand, if $\mathbf{X}_i$ follows one of the skewed distributions, then we have the following updates for the related parameters
\begin{equation*}
\hat{\mbox{\boldmath$\mu$}}_g=\frac{\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i\left(\overline{a}_gb_{ig}-1\right)}{\sum_{i=1}^N\hat{z}_{ig}\overline{a}_gb_{ig}-T_g},\qquad
\hat{{\boldsymbol{\alpha}}}_{X_g}=\frac{\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i\left(\overline{b}_g-b_{ig}\right)}{\sum_{i=1}^N\hat{z}_{ig}\overline{a}_gb_{ig}-T_g},
\end{equation*}
where $\overline{a}_g=(1/T_g)\sum_{i=1}^N\hat{z}_{ig}a_{ig}$ and $\overline{b}_g=(1/T_g)\sum_{i=1}^N\hat{z}_{ig}b_{ig}$.
The update for ${\mathbf\Sigma_X}_g$ in this case is
$$
\hat{{\mathbf\Sigma}}_{X_g}=\frac{1}{T_g}\sum_{i=1}^N\hat{z}_{ig}\left[b_{ig}(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)'-(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)\hat{{\boldsymbol{\alpha}}}_{X_g}'-\hat{{\boldsymbol{\alpha}}}_{X_g}(\mathbf{x}_i-\hat{\mbox{\boldmath$\mu$}}_g)'+a_{ig}\hat{{\boldsymbol{\alpha}}}_{X_g}\hat{{\boldsymbol{\alpha}}}_{X_g}'\right]
$$
If $\mathbf{Y}_i$ is modelled using a multivariate normal distribution, the update for $\mathbf{B}_g$ is given by
$$
\hat{\mathbf{B}}_g=\left(\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i^*{\mathbf{x}_i^*}'\right)^{-1}\left(\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i^*{\mathbf{y}_i}'\right),
$$
and the update for ${\mathbf\Sigma_Y}_g$ is
$$
\hat{{\mathbf\Sigma}}_{Y_g}=\frac{1}{T_g}\sum_{i=1}^N\hat{z}_{ig}(\mathbf{y}_i-\hat{\mathbf{B}}_g'\mathbf{x}_i)(\mathbf{y}_i-\hat{\mathbf{B}}_g'\mathbf{x}_i)'.
$$
If, however, $\mathbf{Y}_i$ follows one of the skewed distributions, the updates for $\mathbf{B}_g$ and $\boldsymbol{\alpha}_{Y_g}$ are given by
$$
\hat{\mathbf{B}}_g=\mathbf{P}_g^{-1}\mathbf{R}_g, \qquad \hat{{\boldsymbol{\alpha}}}_{Y_g}=\frac{1}{T_g\overline{k}_g}\left(\sum_{i=1}^N\hat{z}_{ig}\mathbf{y}_i-\mathbf{R}_g'\mathbf{P}_g^{-1}\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i^*\right),
$$
where
$$
\mathbf{P}_g=\sum_{i=1}^N\hat{z}_{ig}m_{ig}\mathbf{x}_i^*{\mathbf{x}_i^*}'-\frac{1}{T_g\overline{k}_g}\left(\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i^*\right)\left(\sum_{i=1}^N\hat{z}_{ig}{\mathbf{x}_i^*}'\right)
$$
and
$$
\mathbf{R}_g=\sum_{i=1}^N\hat{z}_{ig}m_{ig}\mathbf{x}_i^*{\mathbf{y}_i}'-\frac{1}{T_g\overline{k}_g}\left(\sum_{i=1}^N\hat{z}_{ig}\mathbf{x}_i^*\right)\left(\sum_{i=1}^N\hat{z}_{ig}{\mathbf{y}_i}'\right),
$$
with $\overline{k}_g=(1/T_g)\sum_{i=1}^N\hat{z}_{ig}k_{ig}$.
The update for ${\mathbf\Sigma_Y}_g$ in this case is
\begin{equation*}\begin{split}
\hat{{\mathbf\Sigma}}_{Y_g} & =\\&\frac{1}{T_g}\sum_{i=1}^N\hat{z}_{ig}\left[m_{ig}\left(\mathbf{y}-\hat{\mathbf{B}}_g'\mathbf{x}_i^*\right)\left(\mathbf{y}-\hat{\mathbf{B}}_g'\mathbf{x}_i^*\right)'-\left(\mathbf{y}-\hat{\mathbf{B}}_g'\mathbf{x}_i^*\right)\hat{{\boldsymbol{\alpha}}}_{Y_g}'-\hat{{\boldsymbol{\alpha}}}_{Y_g}\left(\mathbf{y}-\hat{\mathbf{B}}_g'\mathbf{x}_i^*\right)' +k_{ig}\hat{{\boldsymbol{\alpha}}}_{Y_g}\hat{{\boldsymbol{\alpha}}}_{Y_g}'\right].
\end{split}\end{equation*}
Finally, if either $\mathbf{X}_i$ or $\mathbf{Y}_i$ follows one of the skewed distributions, then there are the additional concentration and, in the case of the generalized hyperbolic distribution, the index parameters that need to be updated.
The updates for each distribution are now given.
\subsubsection*{Skew-$t$ Distribution}
\label{sec:st}
In the case of the skew-$t$ distribution, we need to update the degrees of freedom, $\nu_g$. This update cannot be obtained in closed form, and thus needs to be performed numerically. When $\mathbf{X}_i$ is considered, the update $\nu_{X_g}^{(t+1)}$ is obtained by solving \eqref{eq:nugup} for $\nu_{X_g}$,
\begin{equation}
\log\left(\frac{\nu_{X_g}}{2}\right)+1-\varphi\left(\frac{\nu_{X_g}}{2}\right)-\frac{1}{T_g}\sum_{i=1}^N\hat{z}_{ig}^{(t+1)}(b^{(t+1)}_{ig}+c^{(t+1)}_{ig})=0,
\label{eq:nugup}
\end{equation}
where $\varphi(\cdot)$ denotes the digamma function.
When $\mathbf{Y}_i$ is considered, the update for $\nu_{Y_g}^{(t+1)}$ is obtained via~\eqref{eq:nugup}, after the replacement of $\nu_{X_g}$, $b_{ig}$ and $c_{ig}$ with $\nu_{Y_g}$, $m_{ig}$ and $n_{ig}$, respectively.
\subsubsection*{Generalized Hyperbolic Distribution}
\label{sec:gh}
For the generalized hyperbolic distribution, we would update $\lambda_g$ and $\omega_g$.
These updates are derived from \cite{browne15}, and rely on the log convexity of $K_{s}(t)$, \cite{baricz10}, in both $s$ and $t$.
For notational purposes in this section, the superscript $t$ denotes the update at the previous iteration.
The resulting updates, when $\mathbf{X}_i$ is considered, are
\begin{align}
\hat{\lambda}_{X_g}^{(t+1)}&=\bar{c}_g\hat{\lambda}_{X_g}^{(t)}\left[\left.\frac{\partial}{\partial s}\log(K_{s}(\hat{\omega}_{X_g}^{(t)}))\right|_{s=\hat{\lambda}_{X_g}^{(t)}}\right]^{-1} \label{eq:lamup}\\
\hat{\omega}_{X_g}^{(t+1)}&=\hat{\omega}_{X_g}^{(t)}-\left[\left.\frac{\partial}{\partial s}q(\hat{\lambda}_{X_g}^{(t+1)},s)\right|_{s=\hat{\omega}_{X_g}^{(t)}}\right]\left[\left.\frac{\partial^2}{\partial s^2}q(\hat{\lambda}_{X_g}^{(t+1)},s)\right|_{s=\hat{\omega}_{X_g}^{(t)}}\right]^{-1}
\label{eq:omup}
\end{align}
where the derivative in \eqref{eq:lamup} is calculated numerically,
$$
q(\lambda_{X_g},\omega_{X_g})=\sum_{i=1}^Nz_{ig}\left[\log(K_{\lambda_{X_g}}(\omega_{X_g}))-\lambda_{X_g}\overline{c}_{ig}-\frac{1}{2}\omega_{X_g}\left(\overline{a}_{ig}+\overline{b}_{ig}\right)\right],
$$
and $\bar{c}_g=({1}/{T_g})\sum_{i=1}^N\hat{z}_{ig}c_{ig}$.
When $\mathbf{Y}_i$ is considered, $\omega_{X_g}, \lambda_{X_g}$, $\bar{a}_g, \bar{b}_g$, and $\bar{c}_g$ are replaced with $\omega_{Y_g}, \lambda_{Y_g}$, $\bar{k}_g, \bar{m}_g$, and $\bar{n}_g$, respectively.
\subsubsection*{Variance-Gamma Distribution}
\label{sec:vg}
For the variance-gamma, the update for $\gamma_g$, like the generalized hyperbolic case, cannot be obtained in closed form.
For the $\mathbf{X}_i$, this update is obtained by solving \eqref{eq:gammup} for $\gamma_{X_g}$
\begin{equation}
\log\gamma_{X_g}+1-\varphi(\gamma_{X_g})+\bar{c}_g-\bar{a}_g=0.
\label{eq:gammup}
\end{equation}
When $\mathbf{Y}_i$ is considered, $\gamma_{X_g}$, $\bar{a}_g$ and $\bar{c}_g$ are replaced with $\gamma_{Y_g}$, $\bar{k}_g$ and $\bar{n}_g$, respectively.
\subsubsection*{Normal Inverse Gaussian Distribution}
\label{sec:nig}
When we consider $\mathbf{X}_i$, the update of $\kappa_g$ has the following closed form
$$
\kappa_{X_g}^{(t+1)}=\frac{1}{\overline{a}^{(t+1)}_g}.
$$
If $\mathbf{Y}_i$ is considered, we replace $\kappa_{X_g}$ and $\bar{a}_g$ with $\kappa_{Y_g}$ and $\bar{k}_g$, respectively.
\subsection{Initialization of the Algorithm}
\label{sec:init}
To initialize the EM algorithm, we followed the approach discussed in \citet{dang17}.
Specifically, the $z_{ig}$ are initialized in two different ways: 10 times using a random soft initialization and once with a $k$-means hard initialization.
Therefore, for each $G$, the algorithms are run 11 times, and the solution producing the highest log-likelihood value is chosen.
Notice that, for the $k$-means initialization, the initial $z_{ig}$ are selected from the best k-means clustering results from 10 random starting values, and it is implemented by using the \texttt{kmeans()} function of the R statistical software \citep{R19}.
For a better comparability with the competing models, the same $z_{ig}$ are also used to initialize the FMRs considered herein.
\section{Simulated Data Analyses}
\label{sec:sim}
In this section, several aspects related to our models are analyzed.
First, in Section~\ref{sec:pr} the parameter recovery, classification performance, and selection of the number of groups is discussed.
Classification performance is evaluated by computing the adjusted Rand index (ARI; \citealp{hubert85}), which calculates the agreement between the true classification and the one predicted by the model. An ARI of 1 indicates perfect agreement between the two partitions, whereas the expected value of the ARI under random classification is 0.
The Bayesian information criterion (BIC; \citealp{schwarz78}) is used to assess the selection of the true number of groups.
In Section~\ref{sec:cc}, our models and their competitors are tested under different scenarios.
Specifically, a comparison between the CWMs and the FMRs is conducted. In addition, a comparison between our CWMs and the N-N CWM is performed, and the capability of the BIC in detecting the data generating model is evaluated.
\subsection{Parameter Recovery and Classification Evaluation}
\label{sec:pr}
Because of the high number of CWMs introduced in this manuscript, we will focus our attention on four of the 24 novel CWMs.
Specifically, we analyze four models that can cover the following different scenarios:
\begin{enumerate}
\item $p_{\mathbf{X}}$ and $p_{\mathbf{Y}}$ are the same skewed density;
\item $p_{\mathbf{X}}$ and $p_{\mathbf{Y}}$ are different skewed densities,
\item $p_{\mathbf{X}}$ is skewed and $p_{\mathbf{Y}}$ is normal;
\item $p_{\mathbf{X}}$ is normal and $p_{\mathbf{Y}}$ is skewed.
\end{enumerate}
As illustrative examples, we consider the (1) GH-GH CWM, (2) VG-NIG CWM, (3) ST-N CWM and (4) N-NIG CWM.
Note that the models are chosen so that all the distributions considered in this manuscript are incorporated in some capacity.
According to the CWM literature (see, e.g.~\citealp{punzo14c,ingrassia15,punzo15b,punzo14b}), and because of the high number of parameters that should be otherwise reported, we limit our analysis to the recovery of the regression coefficients.
We consider the case with $p=2$, $r=3$ and $N=400$.
The parameters used to generate the data, and are equal for the four CWMs, are displayed in~\tablename~\ref{tab:param}.
The additional parameters, specific for each model, are: $\omega_{X_1}=4.00$, $\omega_{X_2}=10.00$, $\omega_{Y_1}=10.00$, $\omega_{Y_2}=4.00$ and $\lambda_{X_1}=\lambda_{X_2}=\lambda_{Y_1}=\lambda_{Y_2}=0.30$ for the GH-GH CWM, $\gamma_{X_1}=\gamma_{Y_1}=4.00$, $\gamma_{X_2}=20.00$ and $\gamma_{Y_2}=10.00$ for the VG-NIG CWM, $\nu_{X_1}=\nu_{X_2}=7.00$ for the ST-N CWM, $\kappa_{Y_1}=4.00$ and $\kappa_{Y_2}=10.00$ for the N-NIG CWM.
\begin{table}[!ht]
\centering
\caption{Common parameters between the four CWMs used to generate the simulated datasets.}
\label{tab:param}
\begin{tabular}{lcc}
\hline\noalign{\smallskip}
Parameter & Group 1 & Group 2 \\
\hline\noalign{\smallskip}
$\pi_g$ & 0.50 & 0.50 \\
$\mbox{\boldmath$\mu$}_g$ & $(0.00,0.00,0.00)'$ & $(3.00,3.00,3.00)'$ \\
$\boldsymbol{\alpha}_{X_g}$ & $(2.00,2.00,2.00)'$ & $(-3.00,-3.00,-3.00)'$ \\
$\mathbf\Sigma_{X_g}$ & $\begin{pmatrix} 1.00 & 0.10 & 0.20 \\
0.10 & 3.00 & 0.10 \\
0.20 & 0.10 & 2.00 \end{pmatrix}$ & $\begin{pmatrix} 1.00 & 0.10 & 0.10 \\
0.10 & 1.00 & 0.20 \\
0.10 & 0.20 & 1.00 \end{pmatrix}$ \\[+10mm]
$\mathbf{B}_g$ & $\begin{pmatrix} -6.00 & 1.00 \\
-1.50 & -1.50 \\
-0.50 & -1.50 \\
2.50 & 1.50 \end{pmatrix}$ & $\begin{pmatrix} 10.00 & -7.50 \\
-6.00 & 4.00 \\
4.00 & 5.50 \\
-3.50 & -3.00 \end{pmatrix}$\\
$\boldsymbol{\alpha}_{Y_g}$ & $(2.00,-2.00)'$ & $(-2.00,2.00)'$ \\
$\mathbf\Sigma_{Y_g}$ & $\begin{pmatrix} 1.00 & 0.20 \\
0.20 & 1.00 \end{pmatrix}$ & $\begin{pmatrix} 1.00 & 0.30 \\
0.30 & 1.00 \end{pmatrix}$ \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}
For each of the four CWMs, 100 datasets are generated and the corresponding model is fitted with $G=2$.
The average and the standard deviation of the regression coefficient estimates of each model, over the 100 datasets, are reported in~\tablename~\ref{tab:res_par}.
\begin{table}[!ht]
\centering
\caption{Average ($\overline{\mathbf{B}}_g$) and standard deviation ($\sigma_{\mathbf{B}_g}$) of the regression coefficients estimates over 100 datasets for each CWM.}
\label{tab:res_par}
\begin{tabular}{lcc|cc}
\hline\noalign{\smallskip}
CWM & \multicolumn{2}{c}{$\overline{\mathbf{B}}_g$} & \multicolumn{2}{c}{$\sigma_{\mathbf{B}_g}$} \\
& Group 1 & Group 2 & Group 1 & Group 2 \\
\hline\noalign{\smallskip}
GH-GH & $\begin{pmatrix*}[r] -6.26 & 1.12 \\
-1.49 & -1.51 \\
-0.49 & 1.50 \\
2.49 & 1.51 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 10.73 & -8.14 \\
-6.02 & 4.00 \\
4.01 & 5.50 \\
-3.50 & -3.00 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.74 & 0.78 \\
0.06 & 0.06 \\
0.05 & 0.04 \\
0.05 & 0.06\end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.87 & 0.82 \\
0.09 & 0.07 \\
0.08 & 0.08 \\
0.09 & 0.08 \end{pmatrix*}$\\ [+14mm]
VG-NIG & $\begin{pmatrix*}[r] -6.30 & 1.32 \\
-1.50 & -1.50 \\
-0.50 & 1.50 \\
2.50 & 1.50 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 9.96 & -7.44 \\
-6.00 & 4.00 \\
4.00 & 5.50 \\
-3.50 & -3.00 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.41 & 0.40 \\
0.03 & 0.03 \\
0.02 & 0.02 \\
0.03 & 0.03 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.17 & 0.16 \\
0.02 & 0.02 \\
0.02 & 0.02 \\
0.02 & 0.02 \end{pmatrix*}$\\ [+14mm]
ST-N & $\begin{pmatrix*}[r] -6.00 & 1.00 \\
-1.50 & -1.49 \\
-0.50 & 1.50 \\
2.50 & 1.49 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 10.00 & -7.50 \\
-6.00 & 4.00 \\
4.00 & 5.50 \\
-3.51 & -3.00 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.13 & 0.13 \\
0.05 & 0.05 \\
0.03 & 0.03 \\
0.04 & 0.04\end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.08 & 0.08 \\
0.06 & 0.05 \\
0.06 & 0.06 \\
0.05 & 0.05 \end{pmatrix*}$\\ [+14mm]
N-NIG & $\begin{pmatrix*}[r] -5.98 & 1.03 \\
-1.50 & -1.50 \\
-0.50 & 1.50 \\
2.50 & 1.50 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 9.93 & -7.43 \\
-6.00 & 4.00 \\
3.99 & 5.50 \\
-3.50 & -3.00 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.17 & 0.17 \\
0.03 & 0.04 \\
0.02 & 0.02 \\
0.03 & 0.03\end{pmatrix*}$ & $\begin{pmatrix*}[r] 0.18 & 0.18 \\
0.02 & 0.02 \\
0.02 & 0.02 \\
0.02 & 0.02 \end{pmatrix*}$\\ [+14mm]
\noalign{\smallskip}\hline
\end{tabular}
\end{table}
Overall, the average estimates for the coefficient matrices are very close to their true values; however, the estimates for the intercepts are a little less accurate.
From the analysis of the standard deviations, we can see those related to the GH-GH CWM are slightly higher than the other CWMs, which may be due to the added complexity of the index parameter.
The average ARI estimates, and the classification performance, is very good for all models considered (\tablename~\ref{tab:classbic}). Finally, we note that when fitting the models for $G=1,2,3$ on the same 100 datasets, the correct number of groups ($G=2$) is always selected by the BIC.
\begin{table}[!ht]
\centering
\caption{Average ARI values ($\overline{\text{ARI}}$) computed over the 100 datasets for the CWMs.}
\label{tab:classbic}
\begin{tabular}{lccc|c}
\hline\noalign{\smallskip}
CWM & $\overline{\text{ARI}}$ \\
\hline\noalign{\smallskip}
GH-GH & 0.96 \\
VG-NIG & 1.00 \\
ST-N & 0.99 \\
N-NIG & 1.00 \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}
\subsection{Comparison Between CWMs and FMRs}
\label{sec:cc}
For illustrative purposes, the CWMs based on the ST distribution namely the ST-ST CWM, ST-N CWM and N-ST CWM are now considered.
These models are examples of the scenarios 1, 3 and 4 described in the previous section.
For each of these three models, 100 datasets are generated and all the CWMs, as well as the FMRs for which the distribution of the responses given the covariates is one of those considered in this manuscript. Furthermore these are fitted for $G\in\left\{1,2,3\right\}$.
We set $p = 2$, $r = 3$, $N = 400$ and the parameters displayed in~\tablename~\ref{tab:param2} to generate the datasets.
An example of generated dataset from each CWM is displayed in~\figurename~\ref{fig:sim2} and it is clear that there is a grouping structure in the covariates.
\begin{table}[!ht]
\centering
\caption{Parameters used to generate the simulated datasets based on the ST distribution.}
\label{tab:param2}
\begin{tabular}{lcc}
\hline\noalign{\smallskip}
Parameter & Group 1 & Group 2 \\
\hline\noalign{\smallskip}
$\pi_g$ & 0.50 & 0.50 \\
$\mbox{\boldmath$\mu$}_g$ & $(-2.50,4.00,3.00)'$ & $(2.50,-3.00,-3.00)'$ \\
$\boldsymbol{\alpha}_{X_g}$ & $(-3.00,2.50,-2.00)'$ & $(2.50,3.00,-1.50)'$ \\
$\mathbf\Sigma_{X_g}$ & $\begin{pmatrix*}[r] 2.90 & -0.50 & -0.05 \\
-0.50 & 0.45 & -0.75 \\
-0.05 & -0.75 & 1.95 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 2.30 & -0.90 & -0.35 \\
-0.90 & 1.55 & 0.25 \\
-0.35 & 0.25 & 1.00 \end{pmatrix*}$ \\
$\nu_{X_g}$ & 7.00 & 7.00 \\
$\mathbf{B}_g$ & $\begin{pmatrix*}[r] -6.00 & 1.00 \\
-1.50 & -1.50 \\
-0.50 & 1.50 \\
2.50 & 1.50 \end{pmatrix*}$ & $\begin{pmatrix*}[r] -10.00 & 7.50 \\
-1.00 & -1.00 \\
-0.50 & 1.50 \\
2.00 & 2.00 \end{pmatrix*}$\\
$\boldsymbol{\alpha}_{Y_g}$ & $(2.00,-2.50)'$ & $(-1.00,2.00)'$ \\
$\mathbf\Sigma_{Y_g}$ & $\begin{pmatrix*}[r] 1.80 & -0.30 \\
-0.30 & 2.00 \end{pmatrix*}$ & $\begin{pmatrix*}[r] 2.00 & -0.35 \\
-0.35 & 2.80 \end{pmatrix*}$ \\
$\nu_{Y_g}$ & 7.00 & 7.00 \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}
\begin{figure}[!ht]
\centering
\subfigure[\label{fig:CWM1}]
{\includegraphics[width=0.495\textwidth]{Images/ST-ST.eps}}
\subfigure[\label{fig:CWM2}]
{\includegraphics[width=0.495\textwidth]{Images/ST-N.eps}}
\subfigure[\label{fig:CWM3}]
{\includegraphics[width=0.495\textwidth]{Images/N-ST.eps}}
\caption{Pairwise plots of example datasets generated by (a) ST-ST CWM, (b) ST-N CWM and (c) N-ST CWM.
}
\label{fig:sim2}
\end{figure}
The results are illustrated in the radar plots of~\figurename~\ref{fig:CWM_BIC} and~\figurename~\ref{fig:FMR_BIC}, for the CWMs and FMRs, respectively.
In detail, each sub-plot shows the number of times each $G$ is chosen by the BIC for each model over the 100 datasets.
\begin{figure}[!ht]
\centering
\subfigure[\label{fig:cwm1}]
{\includegraphics[width=0.495\textwidth]{Images/ST-ST_CWM.eps}}
\subfigure[\label{fig:cwm2}]
{\includegraphics[width=0.495\textwidth]{Images/ST-N_CWM.eps}}
\subfigure[\label{fig:cwm3}]
{\includegraphics[width=0.495\textwidth]{Images/N-ST_CWM.eps}}
\caption{Radar plots of the number of times each $G$ is chosen by the BIC, for the CWMs, when the data are generated from (a) ST-ST CWM, (b) ST-N CWM and (c) N-ST CWM.
Each sub-plot refers to 100 datasets.}
\label{fig:CWM_BIC}
\end{figure}
\begin{figure}[!ht]
\centering
\subfigure[\label{fig:fmr1}]
{\includegraphics[width=0.495\textwidth]{Images/ST-ST_FMR.eps}}
\subfigure[\label{fig:fmr2}]
{\includegraphics[width=0.495\textwidth]{Images/ST-N_FMR.eps}}
\subfigure[\label{fig:fmr3}]
{\includegraphics[width=0.495\textwidth]{Images/N-ST_FMR.eps}}
\caption{Radar plots of the number of times each $G$ is chosen by the BIC, for the FMRs, when the data are generated from (a) ST-ST CWM, (b) ST-N CWM and (c) N-ST CWM.
Each sub-plot refers to 100 datasets.}
\label{fig:FMR_BIC}
\end{figure}
Starting with the CWM results, in~\figurename~\ref{fig:cwm1} we can see that when the data are generated by the ST-ST CWM, all the CWMs for which either $p_{\mathbf{X}}$, $p_{\mathbf{Y}}$, or both are assumed to be normal, problems arise in detecting the true number of groups in the data.
As discussed in Section~\ref{sec:intro}, when the normal distribution is used for modelling skewed data, it has has a tendency to over fit the true number of groups.
This is confirmed by our results, but it is also interesting to notice that this issue has a different magnitude depending on which one of $p_\mathbf{X}$ or $p_\mathbf{Y}$ is modelled using the normal density.
Specifically, when $p_\mathbf{X}$ is assumed to be skewed and $p_\mathbf{Y}$ assumed to be normal, most of the time $G=2$ is still properly selected, although it is still not as accurate as the CWMs where both $p_\mathbf{X}$ and $p_\mathbf{Y}$ are assumed to be skewed.
On the other hand, when $p_\mathbf{X}$ is assumed normal and $p_\mathbf{Y}$ assumed skewed, $G=3$ is nearly always chosen.
When the datasets are generated from an ST-N CWM, the only models having serious problems are those when the covariates are assumed to be normally distributed, as shown in~\figurename~\ref{fig:cwm2}.
Because of their greater flexibility, all the CWMs that assume a skewed density for $p_\mathbf{Y}$ are able to accurately model symmetric data.
The results for the N-ST CWM are displayed in~\figurename~\ref{fig:cwm3}.
Here, the only CWMs that present issues are those for which $p_\mathbf{Y}$ is assumed normal.
Regarding the capability of the BIC in detecting the exact data generating model, we observed that over the 100 datasets generated by the ST-ST and N-ST CWMs, the BIC selects the correct model 78 and 82 times, respectively.
The occasions in which it fails are due to a wrong distribution chosen for only one of the covariates or the conditional distribution of the responses.
Under no circumstances are both distributions incorrectly chosen.
When the ST-N CWM is considered, the BIC performance is even better than before, as it selects the correct model 99 times.
From the analysis of the FMR results, we can see that in all the three cases illustrated in~\Cref{fig:fmr1,fig:fmr2,fig:fmr3}, when the skewed FMRs are considered, $G=1$ is repeatedly selected. Despite the clear separation between the two groups, the FMR approach is unable to correctly identify them.
The classification results of the CWMs are shown in~\figurename~\ref{fig:classCWM}.
Here, the models that have the lowest ARI values are those assuming normal covariates for the datasets generated from the ST-N and ST-ST models.
All the other CWMs produce very good classifications for all three of the data generating models considered.
\begin{figure}[!ht]
\centering
\includegraphics{Images/classCWM.eps}
\caption{Average ARI values of the CWMs, computed over 100 datasets for each of the three data generating models.}
\label{fig:classCWM}
\end{figure}
\section{Real Data Applications}
\label{sec:real}
\subsection{Overview}
In this section, all the CWMs discussed herein, as well as the FMRs for comparison purposes, are applied to two real datasets.
\subsection{Data}
\label{sec:data}
The first application considers the \texttt{AIS} dataset included in the {\tt sn} package \citep{sn}.
It contains measurements of $N_1=102$ male and $N_2=100$ female athletes (then, $N=202$ and $G=2$) collected at the Australian Institute of Sport.
The subset of seven variables, used recently in the mixtures of regression literature (\citealp{soffritti2011multivariate, dang17}) is now analyzed. Specifically, we consider red cell count (RCC), white cell count (WCC), plasma ferritin concentration (FE), body mass index (BMI), sum of skin folds (SSF), body fat percentage (BFT), and lean body mass (LBM).
As in \citet{dang17}, the blood composition variables (RCC, WCC and FE) are selected as the response variables, while the biometrical variables (BMI, SSF, BFT and LBM) are the covariates.
For this dataset, we know the true group memberships, and can therefore evaluate the clustering results of the competing models by computing the ARI.
The second application considers the \texttt{pulpfiber} dataset included in the \textbf{robustbase} package \citep{robustbase}.
The data contains measurements related to the properties of $N=62$ pulp fibers and the resultant paper produced.
The following subset of four variables is analyzed here: elastic modulus (EM), stress at failure (SF), long fiber fraction (LFF) and zero span tensile (ZST).
The paper properties (EM and SF) are selected as the response variables, while the pulp fiber characteristics (LFF and ZST) are the covariates.
As opposed to the AIS data, the group structure is completely unknown.
Although we cannot compute the ARI to evaluate the partitions of the competing models, from the investigation of the pairwise plot, it will be quite evident the existence of a grouping structure in the data.
\subsection{Results}
\label{sec:res}
In both applications, all the CWMs and the FMRs considered in this manuscript are fitted with $G\in\left\{1,2,3\right\}$.
When the \texttt{AIS} dataset is considered, the best CWM according to the BIC is the GH-ST with $G=2$, whereas the best FMR model is the VG with $G=1$.
The classification results give an ARI of 0.96 for the GH-ST CWM, i.e., an almost perfect classification, and an ARI of 0 for the VG FMR.
Our results are similar to those in \citet{dang17}, where the FMR model, based on the normal distribution, detected only one group in the data.
This means that, even if skewed distributions are used for the FMR models, they are unable to correctly model this data.
However, the GH-ST CWM performs better than the best N-N parsimonious CWM reported as 0.92 in \cite{dang17}.
This aspect can be better understood by looking at the pairwise plot of the dataset in~\figurename~\ref{fig:ais_col}, and coloured according to the classification produced by the GH-ST CWM.
As we can see, many of the variables seem to present a skewed behaviour, so that our distributions are able to model the data in a more accurate way than the normal distribution.
\begin{figure}[!ht]
\centering
\includegraphics[width=0.95\textwidth]{Images/ais_col.eps}
\caption{Pairwise plot of the \texttt{AIS} dataset coloured according to the classification produced by the best fitting CWM.}
\label{fig:ais_col}
\end{figure}
For the \texttt{pulpfiber} dataset, the best CWM according to the BIC is the VG-N with $G=2$, whereas the best FMR model is the ST with $G=1$.
Similar to the previous application, the best CWM detects two groups in the data, while the best FMR model only finds one group.
By looking at the pairwise plot of the dataset in~\figurename~\ref{fig:pulp_col}, coloured according to the classification produced by the VG-N CWM, it seems clear that there is more than one group in the data.
Specifically, it appears that there are two seemingly skewed and separated groups with possible mild outliers. Moreover, it is interesting to note that the linear relationship between the response variables and covariates appear to be similar between the two groups found by the CWMs, which may explain why the FMR only finds one group.
\begin{figure}[!ht]
\centering
\includegraphics[width=0.7\textwidth]{Images/pulp_col.eps}
\caption{Pairwise plot of the \texttt{pulpfiber} dataset colored according to the classification produced by the best fitting CWM.}
\label{fig:pulp_col}
\end{figure}
\section{Summary}
\label{sec:end}
A novel family of 24 multivariate CWMs was introduced.
Extending the completely unconstrained normal CWM of \citet{dang17}, the distributions of the responses and of the covariates were allowed to be skewed.
For illustrative purposes the following four skewed distributions were considered: the generalized hyperbolic, the skew-$t$, the variance-gamma and the normal inverse Gaussian.
Additionally, by also considering the normal distribution, our models were flexible enough to consider scenarios in which the covariates and the responses conditioned on the covariates are skewed, or in which one of the two sets of variables is normally distributed and the other one is skewed.
An EM algorithm was discussed for parameter estimation, and its capability of recovering the parameters of the data generating model was tested in a simulation study.
A comparison among the CWMs and the FMRs was also investigated via simulated data.
Specifically, it was shown that by ignoring the distribution of the covariates, the FMRs may fail to detect the correct number of groups in the data, even if they are well separated.
All our CWMs, as well as the normal CWM and the FMRs, were additionally fitted to two real datasets.
The results of the first application are in line with those present in the literature in the sense that the FMRs are not able to model this dataset, even by using skewed distributions; however, one of the skewed CWMs outperformed the classification result obtained by \cite{dang17}.
In the second application, despite lacking a true classification, an underlying group structure is evident by a graphical analysis.
In such a case, one of our CWMs seems to properly identify these groups, while the FMRs find just one group, similar to the first application.
Possible extensions of this work might be to consider a parsimonious structure for the covariance matrices, in the fashion of \citet{dang17}, as well as restraining the parameters governing the tail behaviour.
|
\section{Introduction}
The current note is based on \cite{Grumiller:2019fmp} which mainly shows that any non-extremal\footnote{The metric can be brought into a Rindler form.} (finite temperature) horizon has an infinite set of near horizon symmetries and associated soft hair excitations in the sense of Hawking, Perry and Strominger \cite{HPS}. Defining suitable near horizon boundary conditions while working in Hamiltonian formalism (providing the near horizon conditions for spatial part of metric and its canonical momentum) \cite{Dirac,Arnowitt,Regge}, integrable finite near horizon charges (associated to non-trivial diffeomorphisms) are calculated. It is also shown that for horizons that are either flat or non-rotating, the near horizon symmetry can be represented as infinitely many copies of Heisenberg algebras in any spacetime dimensions. In this note, we consider an explicit example in higher dimensions than four. Near horizon supertranslation and superrotation charges are calculated and it is shown that five dimensional Myers-Perry black hole with $a=b$ does satisfy the results presented in \cite{Grumiller:2019fmp} as an example in higher dimensions. However, we consider only a very maximally symmetric case for the Myers-Perry black holes, which is the case with two equal rotation parameter. We only focus to find the charges here rather than near horizon algebra as the near horizon metric obviously satisfy the boundary conditions in \cite{Grumiller:2019fmp} and therefore, the near horizon algebra consists of infinitely many copies of the Heisenberg algebra which extends the results from lower dimensions \cite{Afshar1,Afshar2}. We start with the known Kerr case and re-derive the near horizon Heisenberg-like generators which we call them supertranslation and superrotation charges. We then generalise the method to the five dimensional case by finding the Heisenberg-like near horizon generators for the Myers-Perry black holes with $a=b$ by presenting a detailed calculation in Hamiltonian formulation of General Relativity.
\section{Setup}
The metric at the near horizon of a regular metric with the surface gravity $\kappa$ can be written in a Rindler-like form as ($a$ and $b$ shows the angular coordinates and runs from one in case of a three dimensional black hole to higher dimensions)
\begin{eqnarray}
ds^2=-\kappa \rho^2 dt^2+d\rho^2+\Omega_{ab} dx^a dx^b+...,
\end{eqnarray}
where, $\Omega_{ab}$ is the metric transverse to the horizon\footnote{The determinant of $\Omega$ is non-zero to guarantee a non-singular metric on the horizon. Therefore, the Tylor expansion in the near horizon region is allowed as we will use such expansions in the calculations.}. In the Hamiltonian formulation of GR the metric can be written in the following form ($i,j=\text{radial coordinate and angular coordinates}$)
\begin{eqnarray}
ds^2=-N^2 dt^2+g_{ij} (dx^i+N^i dt)(dx^j+N^j dt),
\end{eqnarray}
where, $N$ is the laps function, $N^i$s are shift functions and $g_{ij}$ is the spatial part of the metric. One needs to provide near horizon conditions for the spatial part of metric\footnote{These conditions are defined in the boundary conditions (II.2) of \cite{Grumiller:2019fmp}. However, we only need the conditions for $g_{ij}$ and the defined boundary conditions in (\ref{ex}).}. The associated canonical momenta $\pi^{ij}$ is found as
\begin{eqnarray}\label{ex}
&&\pi^{\rho a}=\frac{\Pi^{\rho a}}{16\pi G}+\mathcal{O}(\rho^2), \ \ \pi^{\rho \rho}=\mathcal{O}(\rho), \ \ \pi^{ab}=\mathcal{O}(\rho),\nonumber\\
&& N=\kappa \rho +\mathcal{O}(\rho^3),\ \ N^\rho=\mathcal{O}(\rho^3), \ \ N^a=\mathcal{O}(\rho^2).
\end{eqnarray}
The above near horizon boundary conditions are preserved by a set of diffeomorphisms generated by a set of vector field $\xi^\mu$ ($\mu=0,1,2,...$) described by the vector field introduced in (II.3) of \cite{Grumiller:2019fmp}. It can be shown that the canonical charges can be defined as
\begin{eqnarray}
\mathcal{P}:=\frac{\sqrt{\Omega}}{8\pi G},\ \ \mathcal{J}_a:=\Omega_{ab} \frac{\Pi^{\rho b}}{8\pi G \sqrt{\Omega}},
\end{eqnarray}
where, $\mathcal{P}$ and $\mathcal{J}_a$ are near horizon supertranslations and superrotations. $\mathcal{P}$ is a scalar and $\mathcal{J}_a $ is a one-form that can be decomposed into an exact, coexact and a harmonic part\footnote{Refer to \cite{Afshar:2018apx} for detailed discussion on the decomposition of $p$-forms.}. It is shown that if $\mathcal{J}_a$ is locally exact $\mathcal{J}_a=8\pi G \partial_a \mathcal{Q}$, which means the associated field strength $F_{ab}^H:=(d \mathcal{J}^H)_{ab}$ is zero.\\
Then the following Poisson bracket construct the Heisenberg algebra as
\begin{eqnarray}\label{algebra}
\{ \mathcal{Q}(x), \mathcal{P}(y)\}=\frac{1}{8\pi G} \delta (x-y).
\end{eqnarray}
We try to present the Heisenberg-like generators in Hamiltonian formalism, $\mathcal{P}$ and $\mathcal{J}_a$ for the Kerr metric in details which is consistent with the calculations in \cite{Grumiller:2019fmp}. Then, we generalise this calculations to the simplest possible rotating black hole in higher dimensions, five dimensional Myers-Perry black hole with two equal angular momenta.
\section{Kerr black holes}
The Kerr metric in Boyer-Lindquist coordinates $(t,r,\theta, \phi)$ is as fallows
\begin{eqnarray}\label{kerrmetric}
ds^2=-dt^2 +\frac{2M r}{\Sigma} \left(a\ \text{sin}^2 \theta \ d\phi -dt \right)^2 +\Sigma \left(\frac{dr^2}{\Delta}+d\theta^2 \right) +\left(r^2 +a^2\right) \text{sin}^2 \theta \ d\phi^2,
\end{eqnarray}
with
\begin{eqnarray}\label{detsig}
\Delta:= r^2 -2M r +a^2, \ \ \ \ \ \Sigma:= r^2+a^2 \text{cos}^2 \theta.
\end{eqnarray}
To find the location of Killing horizons, one has to find roots of $\Delta=0$ where we have infinite red shift as
\begin{eqnarray}
\Delta=0 \ \ \Longrightarrow \ \ \ r_\pm = M \pm \sqrt{M^2 -a^2}.
\end{eqnarray}
Introducing the new parameter $R=r_- / r_+$, mass, rotation parameter and the surface gravity can be found as
\begin{eqnarray}\label{mak}
&&M=\frac{r_+ +r_-}{2}=\frac{r_+}{2} (1+R),\ \ \ a^2 =r_+ r_- = r_+^2 R,\ \ \ \kappa=\frac{r_+}{a^2 +r_+^2}-\frac{1}{2 r_+}=\frac{1-R}{2 r_+(1+R)}.\nonumber\\
\end{eqnarray}
Now we should look for a coordinate transformation such that shifts the outer horizon of Kerr black hole $r=r_+$ to $\rho=0$ and brings it to a form where the near horizon metric has a Rindler form. Choosing the following coordinate transformations with introducing the parameter $\alpha(\theta)=\frac{1-R}{2 r_+ (1+R\text{cos}^2 \theta)} $,
\begin{eqnarray}\label{cochange}
&&r= r_{+}+ \frac{\alpha(\theta)}{2}\ \rho^2, \ \ \phi=\varphi+\frac{2\kappa \sqrt{R}}{1-R} t.
\end{eqnarray}
Therefore, the boosted Kerr metric in the coordinates $(t,\rho, \theta, \varphi)$ reads as
\begin{eqnarray}\label{bmetric}
ds^2&=&\left(-1 +\frac{8M r}{\Sigma} \frac{\kappa^2 R}{(1-R)^2} a^2 \text{sin}^4 \theta +\frac{2M r}{\Sigma} -\frac{8M r}{\Sigma} \frac{\kappa \sqrt{R}}{1-R} \ a \ \text{sin}^2 \theta+ (r^2 +a^2) \frac{4 \kappa^2 R \text{sin}^2 \theta }{(1-R)^2}\right) d\tau^2\nonumber\\
&&+\left(\frac{8M r}{\Sigma} \frac{\kappa \sqrt{R}}{1-R} a^2 \text{sin}^4 \theta-\frac{4M r}{\Sigma} a\ \text{sin}^2 \theta +(r^2 +a^2) \frac{4\kappa \sqrt{R}}{1-R} \text{sin}^2 \theta \right) d\tau d \varphi\nonumber\\
&&+\left(\frac{\Sigma}{\Delta} \alpha^2 \ \rho^2 \right)\ d\rho^2+\left(\frac{\Sigma}{\Delta} \alpha \alpha^{\prime}\rho^3\right) d\rho \ d\theta+\left( \Sigma+\frac{\Sigma}{\Delta}\frac{{\alpha^{\prime}}^2}{4} \rho^4\right) d\theta^2\nonumber\\
&&+ \left(\frac{2M r}{\Sigma} a^2 \text{sin}^4 \theta +(r^2 +a^2) \ \text{sin}^2 \theta \right) d\varphi^2.
\end{eqnarray}
We are interested to know how the Kerr metric looks like in the near horizon region at $\rho\rightarrow0$. Using the following expansions in this limit,
\begin{eqnarray}\label{rsigmadelta}
&&\frac{r}{\Sigma}=\frac{1}{r_{+} \ (1+R\ \text{cos}^2 \theta)}+\mathcal{O}(\rho^2),\nonumber\\
&&\frac{\Sigma}{\Delta}=\frac{2 r_{+} \ (1+R\ \text{cos}^2 \theta) }{(1-R) \ \alpha \ \rho^2}+\frac{1-2R-R\ \text{cos}^2 \theta}{(1-R)^2}+\frac{(R-3) \ \alpha \ \rho^2}{2 r_{+} \ (1-R)^2}+\mathcal{O}(\rho^4),
\end{eqnarray}
the near horizon expansion of the components of the metric (\ref{bmetric}) reads as
\begin{eqnarray}\label{tt}
&&g_{tt}=-\frac{(1-R)^2}{4 r_{+}^2 \ (1+R)^2}\rho^2 +\mathcal{O} (\rho^4),\nonumber\\
&&g_{t\varphi}=-\frac{(1-R) \ \sqrt{R} \ (-6 +(-3+R)\ R -(1-R) \ R \ \text{cos} [2\theta]) \ \text{sin}^2 \theta}{8 (1+R) r_{+} (1+R\ \text{cos}^2 \theta)^2 }\rho^2+\mathcal{O} (\rho^4),\nonumber\\
&&g_{\rho\rho}=1+\mathcal{O}(\rho^2),\nonumber\\
&&g_{\rho \theta} =\frac{R\ \text{sin}\theta \ \text{cos}\theta \ \ }{ (1+R \ \text{cos}^2 \theta)} \ \rho +\mathcal{O}(\rho^3),\nonumber\\
&&g_{\theta \theta}= r_+^2 (1+R \ \text{cos}^2 \theta) +\mathcal{O}(\rho^2),\nonumber\\
&&g_{\varphi \varphi}=\frac{ r_+^2 \ \text{sin}^2 \theta \ (1+R)^2 }{(1+R\ \text{cos}^2 \theta)}
+\mathcal{O} (\rho^2).\nonumber\\
\end{eqnarray}
\subsection{Three-plus-one dimensional decomposition of the Kerr metric in the near horizon region}
In the context of Arnowitt-Deser-Misner (ADM) decomposition, the Laps and shift functions, and the spatial part of the metric can be obtained by (Note that $i,j=\rho, \theta, \phi$)
\begin{eqnarray}\label{34}
{}^3 g_{ij}\equiv{}^4 g_{ij}, \ \ \ \ \ \ N_i\equiv{}^4 g_{0i}, \ \ \ \ N\equiv (-{}^4 g^{tt})^{(-1/2)}.
\end{eqnarray}
The conjugate momenta can be found by
\begin{eqnarray}
\pi^{ij}=\sqrt{-{}^4g} \ ({}^4\Gamma_{pq}^0 -g_{pq} \ {}^4\Gamma_{rs}^0 \ g^{rs} ) \ g^{ip}\ g^{jq}.
\end{eqnarray}
Thus, one can easily find
\begin{eqnarray}\label{33}
&&N_\varphi=-\frac{(1-R) \ \sqrt{R} \ (-6 +(-3+R)\ R -(1-R) \ R \ \text{cos} [2\theta]) \ \text{sin}^2 \theta}{8 (1+R) r_{+} (1+R\ \text{cos}^2 \theta)^2 }\rho^2+\mathcal{O} (\rho^4),\nonumber\\
&&N_\rho=N_\theta= 0,\nonumber\\
&&N=\kappa \ \rho +\mathcal{O}(\rho^3).\nonumber\\
\end{eqnarray}
The inverse of the spatial part of the near horizon metric in three dimensions, ${}^3 g^{ij}$ reads as
\begin{eqnarray}
{}^3 g^{ij}={}^4 g^{ij}+(N^i \ N^j/N^2).
\end{eqnarray}
Therefore,
\begin{eqnarray}
&&{}^3 g^{\rho \rho}=1+\mathcal{O} (\rho^2),\nonumber\\
&&{}^3 g^{\rho \theta}=-\frac{R \ \text{sin}\theta \ \text{cos}\theta}{r_{+}^2 \ (1+R \ \text{cos}^2 \theta)^2} \rho+\mathcal{O} (\rho^3),\nonumber\\
&&{}^3 g^{\theta \theta}=\frac{1}{r_{+}^2 \ (1+R \ \text{cos}^2 \theta)}+\mathcal{O} (\rho^2),\nonumber\\
&&{}^3 g^{\varphi \varphi}=\frac{1+R \ \text{cos}^2 \theta}{r_{+}^2 \ (1+R)^2 \ \text{sin}^2 \theta}+\mathcal{O} (\rho^2).\nonumber\\
\end{eqnarray}
Since $\sqrt{-{}^4 g}=N \sqrt{{}^3 g}$ we have ${}^3g=r_{+}^4 (1+R)^2 \ \text{sin}^2 \theta$, where $g$ is the determinant of the metric.
The associated momenta reads as
\begin{eqnarray}
&&\pi^{\rho \varphi}=-\frac{\sqrt{R} \ \text{sin}\theta \ (3+R+(R-R^2) \ \text{cos}^2 \theta) }{(1+R) \ (1+R \ \text{cos}^2 \theta)}+\mathcal{O}(\rho^2),\nonumber\\
&&\pi^{\theta \varphi}=\mathcal{O}(\rho),\nonumber\\
&&\pi^{\rho \rho}=\pi^{\theta \theta}=\pi^{\varphi \varphi}=0.\nonumber\\
\end{eqnarray}
The horizon metric is obtained as
\[
\Omega_{ab}=\left({\begin{array}{cc}
r_+^2 (1+R\ \text{cos}^2 \theta)&0\\
0&r_+^2 \frac{ \ \text{sin}^2 \theta \ (1+R)^2 }{1+R\ \text{cos}^2 \theta}\\
\end{array}}\right).
\]
with the determinant
\begin{eqnarray}\label{deter}
\Omega=r_+^4 \text{sin}^2 \theta \ (1+R)^2.
\end{eqnarray}
The state-dependent Heisenberg-like generators $\mathcal{P}$ and $\mathcal{J}_a^H$ thus, read as
\begin{eqnarray}\label{p}
&&\mathcal{P}=\frac{\sqrt{\Omega}}{8\pi G}=\frac{r_+^2 \ (1+R)}{8\pi G}\ \text{sin} \theta,\\
&&\mathcal{J}_a^H=\delta_{a}^{\varphi} \Omega_{\varphi \varphi} \frac{\pi^{\rho \varphi}}{8\pi G \sqrt{\Omega}}=-\delta_{a}^{\varphi} \sqrt{R} \frac{3+R+(R-R^2)\text{cos}^2 \theta}{ \ 8\pi G \ (1+R \text{cos}^2 \theta)^2 }\text{sin}^2 \theta.
\end{eqnarray}
The associated field strength for the Kerr black holes reads as
\begin{eqnarray}
F_{\theta\varphi}^H=\frac{\sqrt{R}(1+R)^2 (R\text{cos}^2\theta-3)\ \text{sin}[2\theta]}{(1+R\text{cos}^2\theta)^3}.
\end{eqnarray}
Therefore, due to the non-vanishing value of $F_{\theta\varphi}^H$, the Kerr black hole does not satisfy the gauge flatness condition $F_{ab}^H=0$. However, the flux through the horizon associated with $F_{\theta\varphi}^H$ is zero due to a regular horizon\footnote{For the case with NUT charges, the flux through the horizon is non-zero.}. As noted in \cite{Grumiller:2019fmp}, the superrotation generator $\mathcal{J}_a^H$ has a coexact part with together with $\mathcal{P}$ makes the charge algebra denoted in (\ref{algebra}). In the next section, we generalise a similar calculation for the five dimensional case.
\section{Five dimensional Myers-Perry black holes with $a=b$}
The five dimensional Myers-Perry metric reads as
\begin{eqnarray}\label{MP5}
&&ds^2= -dt^2 +\frac{M}{\Sigma} \left(dt-a\ \text{sin}^2 \theta \ d\phi -b\ \text{cos}^2 \theta \ d\psi \right)^2 \nonumber\\
&&+ \Sigma \left(\frac{r^2}{\Delta} dr^2 +d\theta^2 \right)+(r^2 +a^2) \ \text{sin}^2 \theta \ d\phi^2 +(r^2 +b^2)\ \text{cos}^2 \theta \ d\psi^2,
\end{eqnarray}
where, $M$ is the mass and $a$ and $b$ are rotation parameters. Assuming a very special case with $a=b$, $\Sigma$, $\Delta$ and the inner and outer horizons read as
\begin{eqnarray}\label{pisigab}
&&\Sigma=r^2 +a^2, \ \
\Delta=(r^2 +a^2) \ (r^2 +a^2)- M r^2,\nonumber\\
&&r_{\pm}^2 = \frac{1}{2} \left(M-2a^2 \pm \sqrt{M^2 -4 M \ a^2 }\right).
\end{eqnarray}
Introducing a new parameter $R=r_-/r_+$, the rotation parameter, mass and the surface gravity can be read as
\begin{eqnarray}\label{mak}
\noindent{a^2=r_+^2 R},\ \
M=r_+^2 (1+R)^2, \ \
\kappa=\frac{1-R}{r_+ (1+R)}.
\end{eqnarray}
Using the following coordinate change with $\gamma=\frac{\sqrt{R}}{r_{+} \ (1+R)}$ and $\beta=\frac{1-R}{2 r_{+}}$ brings in the Rindler form and shifts the outer horizon $r=r_+$ to $\rho=0$.
\begin{eqnarray}\label{cochange}
r=r_{+} +\beta (\theta) \ \rho^2,\ \
\phi=\varphi+ \gamma (\theta) \ t, \ \
\psi=\chi+ \gamma (\theta) \ t.
\end{eqnarray}
Using the above coordinate transformations, the components of the metric (\ref{MP5}) in $(t,\rho,\theta,\varphi,\chi)$ coordinates in the near horizon region are as follows
\begin{eqnarray}
&&g_{tt}=-\frac{(1-R)^2}{r_{+}^2 \ (1+R)^2} \rho^2 +\frac{(1-R)^2 \ (3+R^2)}{4 \ r_{+}^4 \ (1+R)^3}\rho^4 +\mathcal{O}(\rho^6),\nonumber\\
&&g_{\rho\rho}=1+\frac{(3-4R+3R^2)}{4\ r_{+}^2 \ (1+R)}\rho^2+\frac{(2R^3+R^2-3)}{2 r_{+}^4 \ (1+R)^2}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\theta \theta}=r_+^2 (1+R) +(1-R)\rho^2+\frac{(1-R)^2}{4 r_{+}^2}+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\varphi\varphi}=r_+^2 (1+R)\ \text{sin}^2 \theta \ (1+R \text{sin}^2 \theta )+\frac{1}{2} (1-R)\ (2-R+R\ \text{cos}[2\theta])\ \text{sin}^2 \theta \rho^2 \nonumber\\
&&+\frac{(1-R)^2 \ (2+(R-5)\ R +(R-3) \ R\ \text{cos}[2\theta]) \text{sin}^2 \theta}{8 \ r_{+}^2 \ (1+R)}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\chi\chi}=r_+^2 (1+R) \ \text{cos}^2 \theta \ (1+R \text{cos}^2 \theta )-\frac{1}{2} (1-R) (-2+R+R\ \text{cos}[2\theta]) \ \text{cos}^2 \theta \rho^2\nonumber\\
&&-\frac{(1-R)^2 \ (-2-(R^2-5R) +(R-3) \ R\ \text{cos}[2\theta])\ \text{cos}^2 \theta}{8 \ r_{+}^2 \ (1+R)}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\varphi\chi}=R r_+^2 \ (1+R) \ \text{sin}^2 \theta \ \text{cos}^2 \theta -(1-R) \ R \ \text{sin}^2 \theta \ \text{cos}^2 \theta \ \rho^2\nonumber\\
&& -\frac{(R-3) \ (1-R)^2 \ R \ \text{sin}^2 [2\theta]}{16 \ r_{+}^2 \ (1+R)}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\varphi t}=\frac{2 \ (1-R) \ \sqrt{R} \ \text{sin}^2 \theta}{r_{+} \ (1+R)}\rho^2+\frac{(1-R)^3 \ \sqrt{R} \ \text{sin}^2 \theta}{2 \ r_{+}^3 (1+R)^2}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\chi t}=\frac{2 \ (1-R)\ \sqrt{R} \ \text{cos}^2 \theta}{r_{+} \ (1+R)}\rho^2+\frac{(1-R)^3 \ \sqrt{R} \ \text{cos}^2 \theta}{2 \ r_{+}^3 \ (1+R)^2}\rho^4+\mathcal{O}(\rho^6),\nonumber\\
&&g_{\rho\theta}=g_{\varphi\theta}=g_{\chi\theta}=0.
\end{eqnarray}
We can find the metric on the horizon as
\begin{eqnarray}\label{horizonmet}
&&\Omega_{ab} dx^a dx^b =r_+^2 [ (1+R)\ \text{sin}^2 \theta \ (1+R \text{sin}^2 \theta ) \ d\varphi^2 +2 R \text{sin}^2 \theta \ \text{cos}^2 \theta d\varphi d\chi \nonumber\\
&& + (1+R) \ \text{cos}^2 \theta \ (1+R \text{cos}^2 \theta ) d\chi^2 + (1+R) d\theta^2 ],
\end{eqnarray}
with the determinant
\begin{eqnarray}\label{det}
\Omega=r_+^6 (1+R)^4\ \text{sin}^2 \theta \ \text{cos}^2 \theta.
\end{eqnarray}
Thus, using Eq. (\ref{det}), the near horizon supertranslation charge can be found as
\begin{eqnarray}\label{p}
\mathcal{P}=\frac{\sqrt{\Omega}}{8\pi G}=\frac{r_+^3 (1+R)^2}{8\pi G}\ \text{sin} \theta \ \text{cos} \theta.
\end{eqnarray}
The horizon metric (\ref{horizonmet}) is topologically a 3-sphere with Ricci scalar
\begin{eqnarray}\label{ricci}
\mathcal{R}=\frac{2 (\mathcal{R} -3)}{r_+^2 (\mathcal{R}+1)}.
\end{eqnarray}
The Euler characteristic is
\begin{eqnarray}\label{euler}
\int_{0}^{2\pi} d\varphi \ \int_{0}^{2\pi} d\chi \ \int_{0}^{\pi} d\theta \sqrt{\Omega} \ \mathcal{R}=0.
\end{eqnarray}
\subsection{Four-plus-one dimensional decomposition of the metric}
To find the near horizon superrotation generators, we need the conjugate momenta. Therefore, we do a four plus one decomposition in the context of ADM decomposition. The spatial components of the metric, the laps and shift functions together with the conjugate momenta can be obtained using (Note that $i,j=\rho, \theta, \varphi, \chi$)
\begin{eqnarray}\label{34}
&&{}^4 g_{ij}\equiv{}^5 g_{ij}, \ \ \ \ \ \ N_i\equiv{}^5 g_{0i}, \ \ \ \ N\equiv (-{}^5 g^{tt})^{(-1/2)},\nonumber\\
&&\pi^{ij}=\sqrt{-{}^5g} \ ({}^5\Gamma_{pq}^0 -g_{pq} \ {}^5\Gamma_{rs}^0 \ g^{rs} ) \ g^{ip}\ g^{jq}.
\end{eqnarray}
Thus, the laps function reads as
\begin{eqnarray}\label{laps}
N= (-{}^5 g^{tt})^{(-1/2)}= \kappa \rho^2 \ (1+\mathcal{O}(\rho^2).
\end{eqnarray}
Since $N^i=N^2 \ {}^{5} g^{ti}$, one can find the shift functions as
\begin{eqnarray}\label{nphi}
&&N^{\varphi}=\frac{2 \ (1-R) \ \sqrt{R}}{r_{+}^3\ (1+R)^3 }\rho^2+\mathcal{O}(\rho^4),\\
&&N^{\chi}=\frac{2 \ (1-R) \ \sqrt{R}}{r_{+}^3\ (1+R)^3 }\rho^2+\mathcal{O}(\rho^4),\\
&&N^\rho=N^\theta=0.
\end{eqnarray}
The spatial components of the metric ${}^4g^{ij}$ can be obtained as
\begin{eqnarray}
{}^4 g^{ij}={}^5 g^{ij}+(N^i \ N^j/N^2).
\end{eqnarray}
Thus,
\begin{eqnarray}
&&{}^4 g^{\rho\rho}=1+\mathcal{O}(\rho^2),\nonumber\\
&&{}^4 g^{\theta\theta}=\frac{1}{r_{+}^2 \ (1+R)}-\frac{(1-R)}{r_{+}^4 \ (1+R)^2}\rho^2+\mathcal{O}(\rho^4),\nonumber\\
&&{}^4 g^{\varphi\chi}=-\frac{R}{r_{+}^2 \ (1+R)^2}+\mathcal{O}(\rho^2),\nonumber\\
&&{}^4 g^{\varphi\varphi}=\frac{ \ (1+R \ \text{cos}^2 \theta)}{\ r_{+}^2 \ (1+R)^2 \ \text{sin}^2 \theta}+\mathcal{O}(\rho^2),\nonumber\\
&&{}^4 g^{\chi\chi}=\frac{ \ (1+R \ \text{sin}^2 \theta)}{\ r_{+}^2 \ (1+R)^2 \ \text{cos}^2 \theta}+\mathcal{O}(\rho^2).\nonumber\\
\end{eqnarray}
The conjugate momenta can be found by
\begin{eqnarray}\label{con}
&&\pi^{\rho \varphi}=2 \ \sqrt{R} \ \text{sin}\theta \ \text{cos}\theta+\mathcal{O}(\rho^ 2).\\
&&\pi^{\rho \chi}=2 \ \sqrt{R} \ \text{sin}\theta \ \text{cos}\theta+\mathcal{O}(\rho^ 2).\label{con2}
\end{eqnarray}
Using the associated conjugate momenta mentioned in (\ref{con}) and (\ref{con2}), the superrotation generators
$\mathcal{J}_a^H=\Omega_{ab}\frac{\pi^{\rho b}}{8\pi G \sqrt{\Omega}}$, can be found as
\begin{eqnarray}
&&\mathcal{J}_\varphi^H=2\ \sqrt{R} \ \text{sin}^2 \theta,\\
&&\mathcal{J}_\chi^H=2\ \sqrt{R} \ \text{cos}^2 \theta.
\end{eqnarray}
Thus, the one-form superrotaion reads as
\begin{eqnarray}\label{oneform}
\mathcal{J}^H=2 \ \sqrt{R}\ (\text{sin}^2 \theta \ d\varphi+ \text{cos}^2 \theta \ d\chi).
\end{eqnarray}
Myers-Perry black hole does not satisfy the gauge flatness condition due to non-vanishing associated field strength as
\begin{eqnarray}
F_{\theta \varphi}^H=(d \mathcal{J}^H)_{\theta \varphi}=- F_{\theta \chi}^H=2 \ \sqrt{R} \ \text{sin}[2\theta].
\end{eqnarray}
However, similar to the Kerr case, the flux through the 3-sphere horizon associated with $F_{ab}^H$ is zero. The coexact part of the Heisenberg-like generator (\ref{oneform}) together with the supertranslation charge (\ref{p}), construct the charge algebra introduced in \cite{Grumiller:2019fmp} as the near horizon boundary conditions are satisfied. It should be noted that, here we only considered a very maximally symmetric Myers-Perry black hole with two equal rotation parameter which is an explicit example of metric which satisfies the boundary conditions defined in \cite{Grumiller:2019fmp} in higher dimensions than four.
\section*{Acknowledgements}
We are grateful of Daniel Grumiller, Behrouz Mirza, Hamideh Nadi, Mahsa Salimi and especially Aditya Mehra for the comments on the draft. We also acknowledge the Erwin Schr\"{o}dinger Institute where this work started through JRF support.
|
\section{Conclusion}
\label{sc:concl}
In this paper, we design DeepIDEA, a novel intrusion detection and classification system based on imbalanced deep learning. To deal with the imbalanced class problem, we design a new loss function named attack-sharing loss to eliminate the bias towards the majority/benign class. We also integrate DeepIDEA ~with a new optimization algorithm to facilitate efficient training. Experimental results on three benchmark datasets show the superiority of DeepIDEA ~compared to seven baseline approaches.
In the future, we plan to extend this work from the following perspectives. First, we plan to apply the attack-sharing loss to recurrent neural networks that take the network context into consideration. We also plan to use generative adversarial networks to improve the detection accuracy.
\section{Experiments}
\label{sc:exp}
\subsection{Dataset}
In our experiments, we use three datasets, namely {\em KDD99}, {\em CICIDS17} and {\em CICIDS18} dataset. Next, we briefly introduce these datasets.
\begin{table}[!htbp]
\vspace{-0.15in}
\centering
\caption{Class distribution in KDD99 dataset}
\label{tab:dist_99}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{Label} & \multicolumn{2}{|c|}{Training} & \multicolumn{2}{|c|}{Testing} \\\cline{2-5}
& Number & Fraction & Number & Fraction \\\hline
Benign & 972,781 & 19.86\% & 60,593 & 19.48\% \\
DoS & 3,883,390 & 79.28\% & 231,455 & 74.42\% \\
Probing & 41,102 & 0.84\% & 4,166 & 1.34\% \\
U2R & 52 & 0.01\% & 245 & 0.08\%\\
R2L & 1,106 & 0.02\% & 14,570 & 4.68\%\\\hline
Total & 4,898,431 & 100\% & 311,029 & 100\% \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table}
\noindent{\bf KDD99 dataset} is built by Stolfo et al. \cite{stolfo2000cost}, as a part of the DARPA Intrusion Detection Evaluation Program.
To prepare this dataset, a military network environment was deployed to acquire nine weeks of raw TCP dump data from a local-area network (LAN). The LAN was operated as if it were a typical U.S. Air Force LAN, except that it was hacked by a sequence of cyber attacks.
In this dataset, each connection record is described by 41 features and 1 label.
The features include information in three aspects, namely basic connection information (e.g., duration, protocol type (tcp, udp, icmp), number of wrong fragments, number of urgent packets, etc), content information (e.g., number of failed login attempts, number of shell prompts, number of operations on access control files, etc), and traffic information (e.g., number of connections to the host in the past two seconds, fraction of connections that have ``SYN'' errors, etc).
The attacks in the dataset fall into 4 categories, i.e., DoS, Probing, U2R (normal users illegally gain root access to the system), and R2L (remote attackers exploit some vulnerabilities to obtain local access to the host).
We show the distribution of these attacks in the training and testing set in Table \ref{tab:dist_99}.
\begin{table}[!htbp]
\vspace{-0.15in}
\centering
\caption{Class distribution in CICIDS17 dataset}
\label{tab:dist_17}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{Label} & \multicolumn{2}{|c|}{Training} & \multicolumn{2}{|c|}{Testing} \\\cline{2-5}
& Number & Fraction & Number & Fraction \\\hline
Benign & 1,911,674 & 81.57\% & 361,399 & 74.84\% \\
DoS & 170,508 & 7.27\% & 82,151 & 17.01\% \\
DDoS & 101,024 & 4.31\% & 27,003 & 5.59\% \\
Brute-Force & 10,494 & 0.45\% & 3,341 & 0.69\%\\
Infiltration & 149,934 & 6.40\% & 9,032 & 1.87\%\\\hline
Total & 2,343,634 & 100\% & 482,926 & 100\% \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table}
\noindent{\bf CICIDS17 dataset} is collected by Canadian Institute for Cybersecurity and is publicly available\footnote{\url{https://www.unb.ca/cic/datasets/ids-2017.html}}.
Two networks, namely the attack network and victim network were constructed. Each network is a infrastructure that consists of routers, switches and a set of PCs running most of the common operating systems. In total, there are 2.83 million network connection instances, where each instance is described by 81 features. The features are similar to those of the KDD99 dataset dataset, but include more statistical information. We omit the details due to the space limit.
We manually split the dataset into a training set and a testing set with a $5:1$ size ratio.
The launched attacks include DoS, DDoS, Infiltration and Brute-Force attacks.
We show the distribution of these attacks in the training and testing set in Table \ref{tab:dist_17}.
\begin{table}[!htbp]
\vspace{-0.15in}
\centering
\caption{Class distribution in CICIDS18 dataset}
\label{tab:dist_18}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{Label} & \multicolumn{2}{|c|}{Training} & \multicolumn{2}{|c|}{Testing} \\\cline{2-5}
& Number & Fraction & Number & Fraction \\\hline
Benign & 4,197,451 & 82.62\% & 814,704 & 76.62\% \\
DoS & 517,691 & 10.19\% & 158,098 & 14.87\% \\
Infilteration & 131,844 & 2.60\% & 38,787 & 3.65\%\\
Botnet & 233,085 & 4.59\% & 51,753 & 4.87\%\\\hline
Total & 5,080,071 & 100\% & 1,063,342 & 100\% \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table}
\noindent{\bf CICIDS18 dataset} is also constructed by Canadian Institute for Cybersecurity and is publicly available\footnote{\url{https://www.unb.ca/cic/datasets/ids-2018.html}}.
To simulate a real-world network, a common LAN network topology is implemented on the AWS computing platform.
The attacking infrastructure includes 50 machines and the victim organization has 5 departments and includes 420 machines and 30 servers.
The dataset includes 6.3 million network connection instances, and each instance has 77 features. Again, we manually split the dataset into a training set and a testing set with a $5:1$ size ratio.
The attacks in this dataset includes DoS, Infiltration and Botnet.
The class distribution of these attacks can be found in Table \ref{tab:dist_18}.
\begin{table}[!htbp]
\vspace{-0.15in}
\centering
\caption{Summary of the datasets}
\label{tb:data_sum}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Dataset & \# of & Training Size & Testing Size & \# of & $\Omega_{imb}$ \\
& Features & & & Classes & \\\hline
KDD99 & 41 & 4,898,431 & 311,029 & 5 & 2.96 \\\hline
CICIDS17 & 81 & 2,343,634 & 482,926 & 5 & 3.08 \\\hline
CICIDS18 & 77 & 5,080,071 & 1,063,342 & 4 & 2.31 \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table}
We summarize the characteristics of these three datasets in Table \ref{tb:data_sum}. To evaluate the level of class imbalance in each dataset, we also report the {\em class imbalance measure} $\Omega_{imb}$ \cite{dong2018imbalanced} in the training set, which is defined as
\begin{equation}
\Omega_{imb} = \frac{\sum_{i=1}^{c} n_{max}-n_i}{n},
\end{equation}
where $n$ denotes the number of instances in the datast, $n_i$ denotes the number of instances that belong to the $i$-th class, and $n_{max} = max_{i=1}^c n_i$. Intuitively, $\Omega_{imb}$ measures the minimum percentage count of data samples required over all classes in order to form an overall balanced/uniform distribution. A larger $\Omega_{imb}$ value indicates higher level of class imbalance.
\begin{table*}[!htbp]
\centering
\caption{Detection accuracy comparison between DeepIDEA ~and the baselines on the KDD99 dataset}
\label{tab:accu_99}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Classifier} & \multicolumn{2}{|c|}{Benign} & \multicolumn{2}{|c|}{DoS} & \multicolumn{2}{|c|}{Probe} & \multicolumn{2}{|c|}{U2R} & \multicolumn{2}{|c|}{R2L} &
\multirow{2}{*}{CBA} \\\cline{2-11}
& Pre & Rec & Pre & Rec & Pre & Rec & Pre & Rec & Pre & Rec & \\\hline
SVM & {30.2} & 70.04 & 96.66 & 98.55 & 13.68 & 27.71 & 21.87 & 6.76 & {84.4} & 5.91 & 41.23 \\\hline
KNN & 23.51 & 55.16 & 90.97 & 100 & 100 & 26.91 & 0 & 0 & 0 & 0 & 16.41 \\\hline
DT & 20.64 & 48.23 & 88.9 & 99.87 & 0 & 0 & 0 & 0 & 0 & 0 & 29.49 \\\hline
MLP+CE & 0 & 0 & 70.92 & {100} & 5.36 & 15.33 & 0 & 0 & 72.29 & 6.4 & 24.27 \\\hline
MLP+OverSampling \cite{japkowicz2002class} & 27.15 & 11.68 & {95.5} & 83.14 & 5.64 & {74.64} & 11.83 & 1.97 & 62.79 & 19.15 & 38.12 \\\hline
MLP+UnderSampling \cite{kubat1997addressing} & 19.21 & 45.95 & {95.52} & 83.57 & 9.43 & 33.87 & {20.83} & 8.09 & 68.3 & {29.78} & 40.25 \\\hline
Cost-Sensitive \cite{khan2018cost} & 33.15 & 10.59 & 0 & 0 & 4.82 & 8.27 & 2.55 & 73.76 & 0 & 0 & 18.26 \\\hline
CNN \cite{chowdhury2017few} & 20.50 & 64.79 & 94.88 & 82.81 & 10.53 & 27.27 & 7.14 & 1.3 & 60.87 & 4.67 & 36.17 \\\hline
DeepIDEA (Our approach) & 19.46 & {85.82} & 93.03 & 85.68 & 7.14 & 47.87 & 0 & 0 & 62.09 & 8.89 & {\bf 45.31} \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table*}
\begin{table*}[!htbp]
\centering
\caption{Detection accuracy comparison between DeepIDEA ~and the baselines on the CICIDS17 dataset}
\label{tab:accu_17}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Classifier} & \multicolumn{2}{|c|}{Benign} &
\multicolumn{2}{|c|}{DoS} &
\multicolumn{2}{|c|}{DDoS} & \multicolumn{2}{|c|}{Brute-Force} & \multicolumn{2}{|c|}{Infiltration} &
\multirow{2}{*}{CBA} \\\cline{3-12}
& Pre & Rec & Pre & Rec & Pre & Rec & Pre & Rec & Pre & Rec & \\\hline
SVM & 86.42 & 76.38 & {96.58} & 53.74 & {92.62} & 16.03 & 0 & 0 & 7.27 & {86.18} & 46.47 \\\hline
KNN & 91.92 & 85.05 & 75.88 & 48.22 & 72.56 & 86.23 & 0 & 0 & 10.92 & 84.75 & 60.85 \\\hline
DT & 66.51 & {100} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 20 \\\hline
MLP+CE & 87.04 & 90.76 & 74.12 & {63.69} & 74.73 & 79.53 & 7.37 & 4.8 & 28.03 & 61.54 & 60.06 \\\hline
MLP+OverSampling \cite{japkowicz2002class} & 86.03 & 95.05 & 80.14 & 52.5 & 56.68 & 76.06 & 3.65 & 1.63 & {28.18} & 53.62 & 55.45 \\\hline
MLP+UnderSampling \cite{kubat1997addressing} & 86.88 & 54.9 & 50.91 & 59.31 & 26.13 & 11.32 & 7.17 & {27.39} & 13.8 & 58.03 & 42.19 \\\hline
Cost-Sensitive \cite{khan2018cost} & 61.58 & 61.17 & 17.69 & 28.09 & 0 & 0 & 0 & 0 & 0 & 0 & 17.85 \\\hline
CNN \cite{chowdhury2017few} & 0 & 0 & 23.42 & 96.04 & 0 & 0 & 8.07 & 11.07 & 0 & 0 & 21.42 \\\hline
DeepIDEA (Our approach) & 88.5 & 94.06 & 88.77 & 62.97 & 76.31 & 83.19 & {8.29} & 4.1 & 26.46 & 64.53 & {\bf 61.77} \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table*}
\begin{table*}[!htbp]
\centering
\caption{Detection accuracy comparison between DeepIDEA ~and the baselines on the CICIDS18 dataset}
\label{tab:accu_18}
\vspace{-0.1in}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Classifier} & \multicolumn{2}{|c|}{Benign} & \multicolumn{2}{|c|}{DoS} & \multicolumn{2}{|c|}{Infiltration} & \multicolumn{2}{|c|}{Botnet} &
\multirow{2}{*}{CBA} \\\cline{2-9}
& Pre & Rec & Pre & Rec & Pre & Rec & Pre & Rec & \\\hline
SVM & {76.59} & 42.59 & 44.97 & 26.23 & {26.57} & 20.64 & 13.70 & 29.14 & 29.65 \\\hline
KNN & 75.46 & 30.05 & 31.2 & 28.05 & 11.53 & 6.45 & {17.32} & 28.14 & 23.18\\\hline
DT & 64.77 & {100.0} & 0 & 0 & 0 & 0 & 0 & 0 & 25.00 \\\hline
MLP+CE & 67.42 & 71.73 & 31.92 & 45.23 & 0 & 0 & 18.52 & 0.42 & 29.35 \\\hline
Cost-Sensitive \cite{khan2018cost} & 54.52 & 19.6 & 0 & 0 & 5.44 & {71.42} & 10.38 & 6.54 & 24.39 \\\hline
CNN \cite{chowdhury2017few} & 0 & 0 & 22.44 & 98.52 & 7.08 & 8.19 & 0 & 0 & 26.68 \\\hline
DeepIDEA (Our approach) & 70.96 & 39.7 & 45.47 & 49.94 & 6.88 & 21.0 & 11.86 & {33.64} & {\bf 36.07} \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table*}
\subsection{Setup}
We implement DeepIDEA ~in Python by using the {\em tensorflow} framework.
In our neural network, we include 100 units in each hidden layer. We try various number of hidden layers. Our results suggest that the performance is reasonably good as long as the network consists of at least 6 layers. In the following section, we only show the results with 10 hidden layers.
The keep probability of each dropout layer is 0.8. The source code is available in a public repository\footnote{\url{https://github.com/bxdong7/MLP-D}}.
In our experiments, we group 100 consecutive network connection instances as a training sample. We set the learning rate as $10^{-4}$, the minibatch size as 128, and the number of epoches as 10. We use cross-validation to avoid overfitting.
We run DeepIDEA ~on a workstation with 1 NVIDIA RTX 2080 Ti GPU and 1 Intel i7-7700K @ 4.2GHz CPU. On average, the training process halts within 3 hours.
\subsection{Baseline}
We compare DeepIDEA ~ with the following baseline approaches.
\begin{itemize}
\item SVM (support vector machine) with 100 iterations
\item KNN (k-nearest neighbor) with 5 neighbors and minkowski distance
\item DT (decision tree) with 10 layers at most
\item MLP+CE (multi-layer perceptron with cross-entropy loss function (Formula (\ref{eq:loss})))
\item MLP+OverSampling \cite{japkowicz2002class}: In this approach, the training data is transformed to balanced class distribution by applying over-sampling.
\item MLP+UnderSampling \cite{kubat1997addressing}: In this approach, the training data is transformed to balanced class distribution by applying over-sampling.
\item Cost-Sensitive \cite{khan2018cost}: This approach uses cost-sensitve loss function to train the neural network. We follow \cite{khan2018cost} to set up the cost matrix.
\item CNN \cite{chowdhury2017few}: This approach classifies the network connections with 2 convolution layers, 2 maxpooling layers and 6 fully-connected layers.
\end{itemize}
We implement these machine learning-based baselines by using the {\em scikit-learn} library,
and the deep learning-based baselines by using the {\em tensorflow} framework.
We also implement a baseline approach based on recurrent neural network with LSTM units \cite{hochreiter1997long}. However, the training process does not complete within 5 days. Therefore, we do not include the results in this section.
\subsection{Evaluation Metrics}
In this paper, we are mostly interested in evaluating the detection accuracy. In the experiments, we collect the following statistics: TP (true positive), FP (false positive), TN (true negative) and FN (false negative).
\nop{
\begin{itemize}
\item True Positive (TP): number of true attacks that are successfully identified.
\item False Positive (FP): number of false alerts signified by the detection approach.
\item True Negative (TN): number of benign connections that are correctly classified.
\item False Negative (FN): number of true attacks that are missed by the detection approach.
\end{itemize}
}
We measure the following the {\em precision} and {\em recall} for each class. In particular, $precision = \frac{TP}{TP+FP}$ measures the fraction of alerts indicated by the detection approach that are correct, and $recall = \frac{TP}{TP+FN}$ measures the fraction of attacks that are successfully identified by the detection approach.
\nop{
\begin{itemize}
\item Precision: the fraction of alerts indicated by the detection approach that are correct, i.e.,
\[precision = \frac{TP}{TP+FP}.\]
\item Recall: the fraction of attacks that are successfully identified by the detection approach, i.e.,
\[recall = \frac{TP}{TP+FN}.\]
\end{itemize}
}
In addition, we measure the overall class-balanced accuracy (CBA) \cite{dong2018imbalanced} for all classes. CBA is calculated as the average recall for all classes. By taking all classes equally important, it avoids inflated performance estimates on imbalanced datasets. If the classifier performs equally well on every class, this term is equivalent to the conventional accuracy (i.e., the number of correct predictions divided by the total number of predictions). On the contrary, if the model only performs well on the majority class, CBA drops to $\frac{1}{c}$.
Therefore, CBA is an effective metric in measuring the accuracy of a classifier for imbalanced dataset.
\nop{
\begin{figure}[!hbtp]
\centering
\includegraphics[width=0.45\textwidth]{figs/accuracy_vs_layers.eps}
\caption{Accuracy v.s. number of hidden layers}
\label{fig:accuracy_vs_layers}
\end{figure}
}
\vspace{-0.05in}
\subsection{Evaluation of DeepIDEA}
\noindent{\bf KDD99 Dataset.}
We present the classification accuracy of DeepIDEA ~ and the baseline approaches on the KDD99 dataset in Table \ref{tab:accu_99}. First, we observe that DeepIDEA ~yields the highest CBA. This demonstrates that DeepIDEA ~is effective in detecting intrusion attack incidents from imbalanced dataset.
Second, KNN, DT and MLP+CE only focus on the majority classes, and produces unsatisfactory performance on the minority classes. For instance, KNN and DT fail to catch any U2R and R2L attack instance.
In contrast, the cost-sensitive classifier associates too much cost for the U2R and R2L classes, as they are extremely under-represented. This makes the classifier lean too much toward these classes, and performs poorly on the KDD99 dataset.
Over-sampling and under-sampling mitigate the side-effect of the class imbalance problem, but the improvement is not comparable with DeepIDEA.
\noindent{\bf CICIDS17 Dataset.}
We report the accuracy of all the classifiers in Table \ref{tab:accu_17}.
First, we observe that DeepIDEA ~produces similar and satisfying precision and recall on every class, except for the {\em Brute-Force}. Consequently, DeepIDEA ~yields the best CBA among all the classifiers. In Table \ref{tab:dist_17}, it is easy to see that {\em Brute-Force} is the most under-represented class. The {\em Brute-Force} attack instances only takes around 0.5\% of the dataset. Even though the attack-sharing loss function aims at dragging the decision boundary toward the attack classes, it does not help much with this class.
Second, the performance of KNN and MLP+CE are close to that of DeepIDEA. We further investigate the reason and find that a large fraction of the attack instances are present in both the training and testing set.
DT simply labels every test instance as benign connection. Similarly, CNN \cite{chowdhury2017few} almost recognizes every connection as DoS attack. The cost-sensitive classifier only focuses on the benign and DoS class. Naturally, the CBA of these three baselines are low.
\noindent{\bf CICIDS18 Dataset.}
In Table \ref{tab:accu_18}, we compare the accuracy of DeepIDEA ~with the baselines on the CICIDS18 dataset.
DeepIDEA ~performs the second best in addressing the class imbalance problem. It has similar recall on every class. Again, it shows the effectiveness of the class-sharing loss function.
No baseline approach produces a CBA higher than 30\%.
Again, the cost-sensitive baseline concentrates all the attention to the most under-represented class, i.e., infilteration, and neglects the other classes. DT simply recognizes every testing instance as benign.
\nop{
\begin{table}[!hbtp]
\centering
\caption{2-class detection accuracy comparison}
\label{tab:2class}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Classifier} &
\multicolumn{3}{|c|}{KDD99} &
\multicolumn{3}{|c|}{CICIDS17} &
\multicolumn{3}{|c|}{CICIDS18} \\\cline{2-10}
& Acc & Pre & Rec & Acc & Pre & Rec & Acc & Pre & Rec \\\hline
SVM & 85.89 & 65.75 & 95.92 \\\hline
KNN & 87.54 & 68.65 & 96.14 \\\hline
DT & 96.03 & 89.99 & 95.41 \\\hline
NB \cite{belouch2018performance} & 74.19 & N/A & 92.16 \\\hline
MLP & 80.10 & 56.83 & {\bf 98.77} \\\hline
CNN + SVM \cite{chowdhury2017few} & 95.51 & N/A & N/A \\\hline
LSTM \cite{kim2017effective} & 95.92 & {\bf 96.75} & N/A \\\hline
DeepIDEA (Our approach) & {\bf 96.47} & 91.50 & 95.33 \\\hline
\end{tabular}
\vspace{-0.1in}
\end{table}
}
\subsection{Insights}
On all datasets, DeepIDEA ~delivers the best CBA. The CBA of DeepIDEA ~is always better and can as twice high as that of MLP+CE. Compared with the sampling-based approaches, the accuracy of DeepIDEA ~on all classes is more balanced. DeepIDEA ~significantly outperforms the cost-sensitive classifier \cite{khan2018cost}, which only focuses on a few classes. CNN \cite{chowdhury2017few} is inferior to DeepIDEA~ in classification accuracy mainly because network events that are close in time do not exhibit similar behaviors. All these observations demonstrate the effectiveness of our attack-sharing loss function in dealing with class imbalance in intrusion detection dataset.
However, we must acknowledge the weakness of DeepIDEA. It does not concentrate sufficiently on the extremely under-represented classes. For example, the U2R class in the KDD99 dataset and the Brute-Force class in the CICIDS17 dataset are rarely detected by DeepIDEA. Both classes take no more than 1\% in the training and testing set. The reason is that the attack-sharing loss only pulls the decision boundary towards the attack classes. However, the tow direction is still biased towards the majority attack classes. In specific, the regularization term in Formula (\ref{eq:as}) does not differentiate different types of attacks. In order to minimize the $J_{AS}$ loss, the classifier tends to classify every attack instance as a majority attack class.
This limitation makes DeepIDEA ~more suitable for the scenarios where the benign instances dominate the dataset, and different types of attacks are balanced. In other words, DeepIDEA ~works well when the imbalance only exists between the benign class and attack classes.
\section{Introduction}
\label{sc:intro}
Recent years witness an expeditious outbreak of cyber attacks. Online Trust Alliance \cite{cyber} revealed that 2017 is ``the worst year ever'' in data breaches and cyber attacks around the world.
The amount of disclosed cyber incidents targeting businesses nearly doubled from 82,000 in 2016 to 159,700 in 2017.
The penetration attack at Equifax leaked the financial credit report of 145 million consumers, which constitutes 45\% of the total population in the U.S.
The WannaCry ransomware attack infected 300,000 computer systems within four days, and severely disrupted the medical appointments in the U.K..
These catastrophic attacks bring forth the most intensive aspirations for an effective intrusion detection system (IDS) that can identify the intrusion with high accuracy.
Traditional signature-based IDS techniques heavily depend on the signature database constructed by security experts, and thus fail to detect novel attacks.
A wide variety of data mining and machine learning models, e.g., decision tree, support vector machine (SVM), and graph mining algorithms \cite{almseidin2017evaluation,biswas2018intrusion,dong2017efficient}, have been adapted to discover anomaly from the network monitoring data. However, they are not favorable at representing intrusion detection classification functions that have many complex variations \cite{bengio2009learning}.
Recently, deep learning emerges as a favorable solution to dealing with complicated input-output mappings. Its application in computer vision and natural language processing leads to breakthroughs in these areas.
Specifically, it builds a neural network by stacking a certain number of layers of neurons. With sufficiently large number of layers and units, a deep network can represent functions of high complexity.
Compared with traditional machine learning models, it avoids the need for feature extraction. Most importantly, it produces the best-in-class accuracy by learning from a large amount of labeled data.
Quite a few latest research in intrusion detection resort to deep learning. Most of them \cite{javaid2016deep,chowdhury2017few} simply learn a new feature representation by using various deep neural networks (e.g., deep autoencoder and convolutional networks), and then rely on traditional classifiers such as SVM and k-nearest neighbor (KNN) to detect attacks.
Kitsune \cite{mirsky2018kitsune} is the most recent work that detects network intrusion attacks with deep neural networks. It applies an ensemble of autoencoders to learn the identify function of the original data distribution. For any new instance, its anomaly score is calculated based on the distance between the autoencoders' output and its feature values.
However, we argue that such a design only employs deep learning to discover inherent/generic features in network connections, but fails to take advantage of its capacity to learn complex classification functions. \Wendy{I don't fully understand this sentence. Do you mean the following: "However, Kistune only can discover inherent/generic features in network connections that can be used for intrusion detection. It does not support classification of intrusion attacks."}
\begin{figure}[!htbp]
\centering
\includegraphics[width=0.4\textwidth]{./figs/class_dist.eps}
\vspace{-0.15in}
\caption{Class distribution of the CICIDS17 dataset. There are five classes, including the benign event and four types of attacks, namely DoS, DDoS, brute-force (BF), and infiltration attacks. }
\label{fig:dist}
\vspace{-0.15in}
\end{figure}
There are two major challenges of designing a deep neural network based intrusion detection system. We discuss these two challenges below.
\noindent{\bf Challenge 1: diversity of intrusion attacks.} There are many types of intrusion attacks, each exploiting a wide range of techniques to conduct the invasion.
Even the same type of attacks can exhibit different behavior patterns.
\noindent{\bf Challenge 2: imbalanced class distribution.} In a healthy network environment, a majority of the connections are benign. This makes the network connection instances follow a long-tail class distribution.
Moreover, different types of intrusion attacks are unevenly distributed in practice. As an example, consider a real-world network intrusion detection dataset named CICIDS17, which is collected and released by Canadian Institute for Cybersecurity. The data is labeled with 5 classes, including the benign class and four types of attacks, namely DoS, DDoS, brute-force (BF), and infiltration attacks. The distribution of the intrusion attacks is illustrated in Figure \ref{fig:dist}. Apparently, the classes are highly imbalanced.
The imbalanced class distribution forces the classifier models to be biased toward the majority class, and thus lead to poor accuracy on the minority classes (i.e., the intrusions).
To address these two challenges, we build a new intrusion detection and classification framework named DeepIDEA ~(a \underline{Deep} Neural Network-based \underline{I}ntrusion \underline{De}tector with \underline{A}ttack-sharing Loss). DeepIDEA ~takes full advantage of deep learning to extract features and learn the classification boundary. Besides, we design a new loss function named {\em attack-sharing loss function} that eliminates the bias towards the majority/benign class by moving the decision boundary towards the attack classes. To our best knowledge, this is the first work on imbalanced deep learning for intrusion detection. Specifically, we make the following contributions.
First, we construct a deep feedforward network to learn intricate patterns of benign communications and malicious connections from the training data. To expedite the learning process on large data, we adapt a novel optimization algorithm that keeps track of an exponentially decaying average of the first-order and second-order moment of past gradients to dynamically adjust the learning rate.
Second, to address the class imbalance problem in intrusion detection, we design a new loss function named attack-sharing loss for our deep feedforward network. The attack-sharing loss function takes the discrepancy penalty of different types of mis-classification (e.g., mis-classifying attack types versus mis-classifying intrusion as normal) into consideration, so that the mis-classification of intrusions as benign receives more penalty than the mis-classification of attacks.
It can be integrated with any deep neural network to mitigate the bias towards the majority class.
Last but not least, we launch an extensive set of experiments on three benchmark datasets. The comparison with 8 baseline approaches demonstrate the effectiveness of DeepIDEA. In particular, DeepIDEA ~produces the best detection accuracy on every dataset.
The rest of the paper is organized as follows. Section \ref{sc:pre} discusses the background information. Section \ref{sc:method} presents our the design of DeepIDEA. Section \ref{sc:exp} shows the experiment results. Section \ref{sc:related} introduces the related work. Finally, Section \ref{sc:concl} concludes the paper.
\section{Our Approach}
\label{sc:method}
In this section, we present the details of our intrusion detector, namely DeepIDEA. In particular, we will discuss the model, loss function, and the optimization procedure of DeepIDEA.
\subsection{Model}
At high level, DeepIDEA~is built as a fully-connected neural network with one input layer, $L>1$ hidden layers, and one output layer. The input layer consists of $d$ units, each representing an input feature.
The architecture of DeepIDEA~is illustrated in Figure \ref{fig:structure}. Next, we explain the details of the model.
\begin{figure*}[!hbtp]
\centering
\includegraphics[width=0.7\textwidth]{./figs/structure.eps}
\vspace{-0.15in}
\caption{\label{fig:structure}The model structure of DeepIDEA~(Tildes indicate regularized layers)}
\vspace{-0.2in}
\end{figure*}
We denote each input data point as $(\bm{x}, y)$, where $\bm{x}$ is the set of features, and $y$ is the label.
The input layer of DeepIDEA~consists of $d$ neurons that take input features.
For the sake of simplicity, for any instance $(\bm{x}, y)$, we assume $\bm{h}^{(0)}=\bm{x}$.
We use $\bm{h}^{(\ell)}$ to denote the output of the $\ell$-th hidden layer ($1\leq \ell \leq L$). \Wendy{Does $\ell$ start from 0 or 1?}
Let $n^{(\ell)}_i$ be the $i$-th unit of the $\ell$-th hidden layer. The output of $n^{(\ell)}_i$ is computed as:
\begin{equation}
h^{(\ell)}_i = g(\bm{w}^{(\ell)}_i \tilde{\bm{h}}^{(\ell-1)} + b_i^{(\ell)}),
\end{equation}
where $g(x)=max\{0, x\}$ is the {\em rectified linear units} (ReLU) activation function, $\bm{w}^{(\ell)}_i$ is the $i$-th row in the weight matrix that connects the $(\ell-1)$-th and $\ell$-th layer, $b^{(\ell)}$ is the bias vector at the $\ell$-th layer, and $\tilde{\bm{h}}^{(\ell-1)}$ is the thinned output from the $(i-1)$-th layer by using dropout. In particular,
\begin{equation}
\tilde{\bm{h}}^{(\ell-1)} = {\bm{h}}^{(\ell-1)} \ast \bm{r},
\end{equation}
where $\ast$ is the Hadamard product operator, $\bm{r}$ is a mask vector that specifies which units to be used. In particular, $\bm{r}$ consists of independent Bernoulli random variables, each of which has probability $p$ of being 1, i.e., $r_i \sim Bernoulli(p)$.
The output layer of the neural network includes $c$ {\em softmax} units, where $c$ is the number of classes. For any instance $(\bm{x}^{(i)}, y^{(i)})$, the predicted probability that it belongs to the $j$-th class $p_j^{(i)}$ is computed as
\begin{equation}
\label{eq:p}
p_j^{(i)} = softmax(\bm{z})_j =\frac{exp(z_j)}{\sum_{k=1}^{c} exp(z_k)},
\end{equation}
where $\bm{z}$ is a vector of linear activations of the output layer.
\subsection{Attack-sharing Loss Function}
Most modern neural networks use {\em cross-entropy loss} $J_{CE}$ to describe the discrepancy between the ground-truth labels and the model predictions. In particular, the loss $J_{CE}$ is calculated as:
\begin{align}
\vspace{-0.1in}
\label{eq:loss}
J_{CE}(\bm{\theta}) & = \mathbb{E}_{(\bm{x}^{(i)},y^{(i)})\sim \hat{p}_{data}} L(f(\bm{x}^{(i)};\bm{\theta}), y^{(i)}) \nonumber \\
& = -\mathbb{E}_{(\bm{x}^{(i)},y^{(i)})\sim \hat{p}_{data}} \log p(y^{(i)}|\bm{x}^{(i)};\bm{\theta}) \nonumber \\
& = -\frac{1}{N} \sum_{i=1}^N \sum_{j=1}^c \mathbf{I}(y^{(i)},j)\log p_j^{(i)},
\vspace{-0.1in}
\end{align}
where $\bm{\theta}$ consists of the weight matrix between consecutive layers in the neural network, $\hat{p}_{data}$ is the empirical data distribution in the training set, $p(y^{(i)}|\bm{x}^{(i)};\bm{\theta})$ is the probability that the neural network correctly classifies the input $\bm{x}^{(i)}$, $N$ is the number of training samples, $c$ is the number of classes, and $\mathbf{I}$ is the indicator function s.t.
\begin{equation}
\mathbf{I}(a, b) = \begin{cases}
1 &\text{if } $a=b$\\
0 &\text{otherwise.}
\end{cases}
\end{equation}
The parameters $\bm{\theta}$ in the network are optimized so as to minimize $J_{CE}(\bm{\theta})$ and obtain the desired classification accuracy.
One weakness of the cross-entropy loss function is that it does not take the type of mis-classification into consideration, and thus penalizes the classification error for all classes equally. There are two types of mis-classification for the intrusion detection system:
\begin{itemize}
\item {\em Intrusion mis-classification}: an intrusion attack is mis-classified as benign event; and
\item{\em Attack mis-classification}: an intrustion attack of type A (e.g., DoS attack) is mis-classified as an intrution attack of type B (e.g., probing attack).
\end{itemize}
In practice, the intrusion mis-classification should be penalized more than the attack mis-classification, as the attack mis-classification still triggers an alert to the IT security team, and enables the incident to be further inspected, whereas the intrusion mis-classification enables the attack incidents to bypass the security check and cause potentially critical damage.
Therefore, the intrusion mis-classification should have higher penalty than the attack mis-classification. \Wendy{I revised this part (starting from "One weakness of the basic...". Please double check if my understanding is correct.}
To address the issue of discrepancy penalty of different types of mis-classification, we improve the basic cross-entropy loss function. In particular, for any instance $(\bm{x}^{(i)}, y^{(i)})$, if it is a benign incident, $y^{(i)}=1$; otherwise, $y^{(i)} \in \{2, \dots, c\}$.
Inspired by \cite{shen2015deepcontour}, we design the {\em attack-sharing loss function}, $J_{AS}$, with an additional regularization term that penalizes intrusion mis-classification, i.e., the wrong estimation between the benign label and attack labels. In particular, we have
\begin{align}
\vspace{-0.1in}
\label{eq:as}
J_{AS} & = J_{CE} -\frac{1}{N} \sum_{i=1}^N \lambda \big(\mathbf{I}(y^{(i)},1)\log p_1^{(i)} \nonumber \\
& + \sum_{j=2}^c \mathbf{I}(y^{(i)},j)\log (1 - p_1^{(i)})\big),
\vspace{-0.1in}
\end{align}
where $\lambda$ is a control parameter. When $\lambda$ is small, $J_{AS}$ is similar to the vanilla cross-entropy loss unction; when $\lambda$ is large, $J_{AS}$ tends to be an objective function for addressing the binary classification problem, benign versus attack. In our experiments, we set $\lambda=10$.
Compared with the basic cross-entropy loss, the attack-sharing loss function eliminates the bias towards the majority/benign class by moving the decision boundary towards the attack classes. It also respects the discrepancy penalty of different types of mis-classification.
\subsection{Optimization Procedure}
In deep learning, the most widely-used optimization algorithm is {\em stochastic gradient descent} (SGD). In each round, it uses a minibatch of samples to estimate the gradient, and updates the parameters. Although simple, SGD suffers from slow asymptotic convergence, especially when there exist saddle points (i.e. points where one dimension slopes up and another slopes down) and plateaus (i.e., areas where the gradients keep stably high) in the parameter space. Due to the complicated nature of intrusion detection classification boundary, saddle points and plateaus widely exist. To expedite the learning process, we adapt the {\em Adam} optimizer, which adaptively updates the learning rate.
In particular, we employ two variables, $\bm{s}$ and $\bm{r}$, to store an exponentially decaying average of past gradients and squared gradients respectively. Initially, we set $\bm{s}=\bm{0}$ and $\bm{r}=\bm{0}$. In the $t$-th round of feedforward and backpropagation, we take a minibatch of $m$ samples from the training set, and calculate the stochastic gradient:
\begin{equation}
\label{eq:sgb}
\bm{g}_t \leftarrow \nabla_{\bm{\theta}_{t-1}} J(\bm{\theta}_{t-1}).
\end{equation}
Next, we update the first-order moment and second-order moment:
\begin{equation}
\bm{s}_t = \rho_1 \bm{s}_{t-1} + (1-\rho_1) \bm{g}_t,
\end{equation}
\begin{equation}
\bm{r}_t = \rho_2 \bm{r}_{t-1} + (1-\rho_2) \bm{g}_t^2,
\end{equation}
where $\rho_1, \rho_2\in (0,1)$ are the hyperparameters that determine the decay rate.
We also perform bias corrections to both moments to account for their initialization at the origin:
\begin{equation}
\bm{s}_t = \frac{\bm{s}_t}{1-\rho_1^t},
\end{equation}
\begin{equation}
\bm{r}_t = \frac{\bm{r}_t}{1-\rho_2^t}.
\end{equation}
Finally, the parameters are updated as
\begin{equation}
\label{eq:adam}
\bm{\theta}_t = \bm{\theta}_{t-1} - \frac{\zeta \bm{s}_t}{\sqrt{\bm{r}_t} + \delta},
\end{equation}
where $\zeta$ is the step size, and $\delta$ is a small stabilization factor. By using Equation (\ref{eq:adam}), we make greater evolution in the more gently sloped directions of parameter space. This facilitates faster convergence compared with SGD.
Another attractive property of the {\em Adam} optimizer is that it is robust to the choice of hyperparameters.
\section{Background}
\label{sc:pre}
In this section, we introduce the background knowledge, including the concepts of deep neural network, intrusion attacks, and imbalanced classification.
\subsection{Deep Neural Network}
\label{sc:mlp}
Multi-layer perceptrons (MLPs), also known as deep feedforward network, is a network that consists of an input layer, multiple hidden layers, and an output layer. Each layer includes a certain number of neurons/units. The neurons in consecutive layers are connected by links with certain weights.
Besides MLPs, other specialized architectures have been proposed in recent years. For example, convolutional networks are known for image processing, while recurrent neural networks are specialized at capturing long term dependencies \cite{goodfellow2016deep}.
Learning the parameters (i.e., weights and bias) of a neural network is typically solved by using gradient descent.
Back propagation provides an efficient way to calculate the gradients so as to optimize the weights associated with the connections.
Various optimization algorithms were proposed to acclerate the learning process, e.g., stochastic gradient descent (SGD) \cite{lecun1998gradient}, Nesterov Momentum \cite{mikolov2013distributed}, and Adam optimizer \cite{kingma2014adam}.
\nop{
Regularization is an effective strategy to reduce the generalization error, i.e., the difference between the expected and empirical error of a trained model.
The most widely-used method is parameter regularization, which introduces norm penalty of the parameters to the loss function.
Another well-known method in deep learning is dropout \cite{srivastava2014dropout}, which provides a computationally inexpensive method to regularize a broad family of deep neural networks. In particular, in each epoch of learning, it follows a certain probability to include a hidden unit in the forward and backward propagation process.
}
\nop{
Among them, SGD is the most popular optimizer. In each iteration, it randomly samples a minibatch of training data and estimate the gradient, and updates the parameters by using a constant learning rate. Even though simple, SGD suffers from slow asymptotic convergence, especially if plateaus and saddle points exist in the parameter space \cite{bottou2008tradeoffs}. The Adam optimizer, coupled with adaptive learning rate, demonstrates the best performance. In particular, Adam incorporates bias corrections to the estimates of both the first-order moments and the second-order moments, and dynamically adjusts the learning progress. Moreover, it is robust to the choice of hyperparameters.
}
\subsection{Intrusion Attacks}
Numerous types of network intrusion attacks make it intricate to design an effective detection method. Next, we briefly introduce five prevailing attacks that are investigated in this paper.
\begin{itemize}
\item {{\em Brute-Force} attack} is the most simple attack to gain illegal access to a site or server. The most common brute-force attack is the dictionary attack that cracks user passwords. There have been a few successful brute-force attacks. For example, in 2016, a massive brute-force attack against Alibaba Inc, a Chinese e-commerce giant, compromised 20.6 million accounts \cite{alibaba}.
\item {{\em Botnet} attack} exploits a number of Internet-connected devices (zombies) to carry out malicious and criminal tasks. As an example, a recent study \cite{echeverria2017star} of 6 million Twitter accounts reveals that 350,000 of them are zombies of the Star Wars botnet.
\item {{\em Probing} attack} scans a victim device in order to determine the vulnerabilities that can be exploited to compromise the system. It usually uses a network mapper (e.g., Nmap\footnote{\url{https://nmap.org/}}) to send TCP packets to discover vulnerable hosts and services.
\item {{\em DoS/DDoS} attack} overloads the target machine and prevents it from serving the intended users.
DDoS is different from DoS mainly in that it leverages multiple systems to exhaust the resources of the victim. The famous 2016 DDoS attack against Dyn DNS \cite{dyn} made it impossible for users to connect to Amazon, GitHub, Spotify, etc.
\item {{\em Infiltration} attack} leverages the vulnerability in particular software such as Adobe Acrobat Reader to execute a backdoor on the target computer. Once the attack is successful, the attacker can launch various types of attacks against the victim's network, including IP sweep and port scan.
\end{itemize}
\subsection{Imbalanced Classification}
In general, the intrusion detection problem can be modeled as a classification problem in machine learning, by which the classification model outputs if the network system is intruded or not.
In most real-world datasets, the data labels follow a long tail distribution, i.e., some specific classes are represented by a very small number of instances compared to other classes. In the scenario of intrusion detection, the data is also imbalanced, as the benign network behaviors dominate the collected dataset, while the intrusion events are rarely observed.
To improve the overall accuracy, the imbalanced data forces the classification model to be biased toward the majority classes.
This class imbalance problem renders poor accuracy on detecting intrusion attacks, as intrusion classes are under-represented.
Several approaches \cite{zhou2006training} try to mitigate the negative effects of imbalanced data for general classification problems.
One solution is to do {\em over-sampling} \cite{japkowicz2002class} or {\em under-sampling} \cite{kubat1997addressing}. In particular, over-sampling on the under-represented classes duplicates these instances, while {\em under-sampling} \cite{kubat1997addressing} eliminates samples in the over-sized classes. However, over-sampling often leads to over-fitting and longer training time, and under-sampling degrades the overall accuracy since it discards potentially useful training instances.
Another solution is to make the loss function cost-sensitive by associating larger error penalty with under-represented classes \cite{khan2018cost}. However, in deep learning, such cost-sensitive loss function can make the loss of a minibatch highly sensitive to the label distribution. As the consequence, it leads to non-convergence of the training process, and potentially inferiors the decision boundary of the classifier.
\nop{
\subsection{Convolutional Neural Network}
\label{sc:cnn}
Convolution is a special operation in deep neural network that applies a kernel function over the input data. Typically, the input is a multidimensional array of data, while the kernel is a multidimensional array of parameters that are tuned via the learning process.
Any neural network that exploits convolution at any place is called a {\em convolutional neural network} \cite{krizhevsky2012imagenet}.
A convolution layer consists of three stages, namely the {\em convolution stage} that performs linear combination of the input neurons, the {\em detector stage} that applies non-linear activation, and the {\em pooling stage} that summarizes the response over a neighborhood by using an aggregation function such as {\em max pooling} and {\em average pooling}.
Since it allows for parameter sharing and equivalence representations, convolutional neural network is more efficient to optimize, and is invariant to small variation in the input.
To further improve training efficiency, strided convolution \cite{long2015fully} is proposed to sample a small fraction of output from the convolution layer.
}
\section{Related Work}
\label{sc:related}
\subsection{Intrusion Detection based on Deep Learning}
\cite{almseidin2017evaluation,biswas2018intrusion} conducted a thorough comparison of a variety of classifiers, including J48 tree, Naive Bayes, decision tree, support vector machine (SVM) and k-nearest neighbor (KNN), on the accuracy of intrusion detection.
To reduce the generalization error of the classifiers and avoid overfitting, Rigaki et al.
Javaid et al. \cite{javaid2016deep} developed a novel intrusion detection approach based on {\em self-taught learning}. It is a deep neural network that consists of two stages. In the first stage, a new feature representation of the input data is learned from a sparse auto-encoder. After that, the new features are taken by a soft-max regression for classification. The experiment results demonstrate the effectiveness of the new feature representation in improving classification accuracy.
Chowdhury et al. \cite{chowdhury2017few} applied 'few-shot learning' to improve the detection accuracy. In specific, they first train a convolutional neural network and then extract features from various layers. Those features are fed into various classifiers such as SVM or 1-nearest neighbor (1-NN). Experimental results suggest that the class-wise accuracy can reach 65.8\%. However, it is not clear what is the rationale behind the choice of SVM and 1-NN over a softmax activation in the last layer of a deep neural network.
Kitsune \cite{mirsky2018kitsune} is the most recent work that detects network intrusion attacks with deep neural networks. It applies an ensemble of autoencoders to learn the identify function of the original data distribution. For any new instance, its anomaly score is calculated based on the distance between the autoencoders' output and its feature values.
However, we argue that such a design only employs deep learning to discover inherent/generic features in network connections, but fails to take advantage of its capacity to learn complex classification functions.
\subsection{Anomaly Detection based on Deep Learning}
Quite a few work concentrate on applying deep neural networks to detect abnormal behaviors that are not essentially intrusion attacks.
Zhang et al. \cite{zhang2016automated} propose to detect IT system failures from system log files. Clustering analysis is used to extract frequent patterns in the log files. Then the log files are embedded by counting the number of occurrences of these patterns. To cope with the lack of labeled data, a LSTM is trained to capture the long-range dependency across sequences.
Du et al. \cite{du2017deeplog} also applied LSTM to detect anomalies and diagnoze failures from system logs. Different from previous work, they aim at abnormal execution paths to improve the confidence and help with further investigation.
Kiran et al. \cite{kiran2018overview} provide a comprehensive survey on the application of deep learning over anomaly detection in videos.
Recently, Chalapathy et al. \cite{chalapathy2018anomaly} show that it is advantageous to directly train deep networks to extract progressively rich representation of data with the classification objective, rather than utilizing a hybrid approach where deep features are firstly learned by using an autoencoder and then fed into a separate anomaly detection method like SVM.
Our work is consistent with this proposition, and thus produces higher accuracy compared with traditional hybrid approaches.
|
\section{Chapter 1: Introduction.}
\setcounter{equation}{0}
\subsection{An equivalence problem in $\mathbb R^D$.}
We begin with an equivalence problem in $\mathbb R^D$.
\begin{itemize}
\item eee
\item eee
\end{itemize}
Visual-object recognition is the ability to perceive properties (such as shape, color and texture) of a visual object in $\mathbb R^{D}$ and to apply semantic attributes to it (such as identifying the visual object).
This process includes the understanding of the visual object's use, previous experience with the visual object, and how it relates to the containing space $\mathbb R^{D}$. Regardless of the object's position or illumination, the ability to effectively identify an object, makes the object a "visual" object.
One significant aspect of visual-object recognition is the ability to recognize an visual object across varying viewing conditions. These varying conditions include object orientation, lighting, object variability for example size, color and other within-category differences just to name a few. Visual-object recognition includes viewpoint-invariant, viewpoint-dependent and multiple view theories just to name a few examples. Visual information gained from an object is often divided into simple geometric components, then matched with the most similar visual-object representation that is stored in memory to provide the object's identification.
With this in mind, we define what we mean by an equivalence problem in $\mathbb R^D$. Imagine we are given two visual objects $O$ and $O'$ in $\mathbb R^D$. An equivalence and symmetry map $g:O\to O'$ when well defined is an element of a group often refered to as a vision group. See \cite{O}.
Some examples of vision groups.
\begin{itemize}
\item[(a)] Affine maps: A map $A:\mathbb R^{D}\to \mathbb R^{D}$ is an affine map if there exists a linear transformation $M:\mathbb R^D\to \mathbb R^D$ and $x_0\in \mathbb R^D$ so that for every $x\in \mathbb R^D$, $A(x)=Mx+x_0$. Affine maps preserve area (volume) ratios. If $M$ is invertible (i.e., $A$ is then invertible affine), then $A$ is either proper or improper. If $M$ is not invertible, the map $A$ is neither proper or improper.
\item[(b)] Euclidean motions: An affine map $A$ is an improper Euclidean motion if $M\in O(D)$ and a proper (orientation preserving) Euclidean motion if $M\in SO(D)$. Euclidean motions can only be proper or improper. Here, Here, $O(D)$ and $SO(D)$ are respectively the orthogonal and special orthogonal groups.
\item Rotations and translations are examples of isometries: A map $f:\mathbb R^D\to \mathbb R^D$ is an isometry (rigid map)
(preserves distances) if $|f(x)-f(y)|=|x-y|$ for every $x,y\in \mathbb R^D$.
\item[(c)] Reflections: A reflection $A:\mathbb R^{D}\to \mathbb R^{D}$ is an isometry with a hyperplane as a set of fixed points.
\item[(d)] Similarity maps: A Euclidean motion plus a scaling. Similarity maps preserve length ratios.
\item[(e)] Projective motions. $(x,y)\to \left(\frac{ax+by+d}{a_{1}x+b_{1}y+d_{1}},\, \frac{a_{2}x+b_{2}y+d_{2}}{a_{3}x+b_{3}y+d_{3}}\right)$ with
\[
{\rm det}
\begin{bmatrix}
a & b & d\\
a_{1}& b_{1} & d_{1} \\
a_{2} & b_{2} & d_{2} \\
a_{3} & b_{3} & d_{3}
\end{bmatrix}=1.
\]
\item[(f)] Camera rotations, projective orthogonal transformation:
\[
\begin{bmatrix}
a & b & d\\
a_{1} & b_{1} & d_{1} \\
a_{2} & b_{2} & d_{2}.
\end{bmatrix}
\]
$\in SO(3)$.
\item[(g)] Motion tracking (video group). $(x,y,t)\to (x+at, y+bt, t)$.
\item Here, in (e,f,g): $a,b,d$ and $a_i, b_i, d_i,\, 1\leq i\leq 3$ are certain real constants. See for example \cite{O}.
\end{itemize}
Let us look at the figures below.
\newpage
\begin{figure}[hbt]
\centering\includegraphics[width=0.24\textwidth]{drw1}
\centering\includegraphics[width=0.24\textwidth]{drw2}
\caption{Two flat 2-dimensional min-max camera images of a chess board.}
\centering\includegraphics[width=0.24\textwidth]{drw3}
\centering\includegraphics[width=0.24\textwidth]{drw4}
\caption{Two flat 2-dimensional min-max camera images of a wall.}
\centering\includegraphics[width=0.24\textwidth]{ultra1}
\centering\includegraphics[width=0.24\textwidth]{ultra2}
\caption{Two painted bi-harmonic map image approximants of a peripheral human nerve sheath. See our work
in \cite{DH34, ADB} with an implementation of our algorithm in \cite{DH34} the Scikit-image list of popular image inpainting methods.}
\end{figure}
\newpage
\begin{figure}[hbt]
\centering\includegraphics[width=0.24\textwidth]{hyper1}
\centering\includegraphics[width=0.24\textwidth]{hyper2}
\caption{Two hyperspectral images of a cuprite scene taken from an airborne visible infrared imaging spectrometer. See our papers \cite{CDRS, Kerry20}.}
\centering\includegraphics[width=0.24\textwidth]{IMG_0075}
\caption{Two images of a liver molecule in a certain human body.}
\centering\includegraphics[width=0.24\textwidth]{IMG_0074}
\caption{Two images of a certain man's face.}
\end{figure}
\newpage
Suppose the chess boards have many identifying features. Examples of features might be a given number of chess pieces on the board which must be positioned in certain orders, in certain squares, by different colors and in different combinations of these. The chess boards are moving at different orientations, the movement created for example by multiple cameras. So, there are notions of "near" distance and "near orderings". Similar problems exist for a large piece of a wall. Here for example, identifying features might be "loose" and "near loose" bricks moving at different orientations.
Differences of size, color and ordering and combinations of bricks. The problems of the chess board and wall arise for example in molecule reconstruction and morphing of cell tissue in the human body.
The medical imaging and hyperspectral data problems are similar, named coregistration data problems from multiple cameras. The facial images are examples of small local perturbations of shifting gaze, movement of mouth, tilting head, moving face.
One objective in this memoir is to investigate rigorous and well defined mathematical frameworks towards understanding equivalence between virtual objects. In computer vision, "equivalence" in this framework is called broadly "shape matching" or "registration."
It is clear that this objective generates challenging and important problems across many areas of study.
[\cite{K1}-\cite{Ki39}], [\cite{H1}-\cite{H12}], [\cite{Can}-\cite{Can19}].
Machinery towards this end has already been established in our work, see our surveys \cite{D7, D8}. For example, work in these aforementioned papers incliudes discrepancy and minimal energy partitions in various group theoretic frameworks. For example, in a framework of compact sometimes non-Abelian groups which act transitively, say the $D$-dimensional sphere $S^D$ embedded in $\mathbb R^{D+1} $ arising from an orbit of a unit vector in the group $SO(D+1) $.
\subsection{A note on notation.}
We will work in $\mathbb R^D$ with dimension $D\geq 2$ unless stated otherwise. By $|.|$ we will mean Euclidean norm unless stated otherwise and $|.|_2$ $l_2$ norm.
All constants depend on the dimension $D$ unless stated otherwise.
$c, c', c'', c_1,...$ are always positive constants which depend on possibly other quantities. This will be made clear. $X, X_1, X', ...$ are compact subsets of $\mathbb R^D, D\geq 1$ unless stated otherwise. The symbols $f, f_{1}, ...$ are used for maps.
We will sometimes write for a map $f$, $f(x)$. It will be clear from context what we mean.
The notation for constants, sets and maps may denote the same or different constant, set and map at any given time. The context will be clear. Before a precise definition, we sometimes, as a convention moving forward, use imprecise words or phrases such as "close", "local", "global", "rough", "smooth", thin" and others. We do this deliberately for motivation and easier reading before the reader needs to absorb a precise definition. \footnote{The letter $c$ is unfortunately
commonly used in numbering. It will be clear moving forward if $c$ is used for a numbering or a constant.}
We will sometimes write that a particular compact set $X$ (class of compact sets $X$) has a certain geometry (has certain geometries). We ask the reader to accept such phrases until the exact geometry (geometries) on the given set $X$ (given class of sets $X$) is defined precisely. Geometries refer to one of many different geometries to be defined precisely when needed.
When we speak to a constant $c$ being small enough, we mean that $c$ is less than a small positive constant.
Throughout, we often work with special sets and constants. These then have their own designated symbols, for example the set $E$, the constants $\varepsilon, \delta, \eta$ and so forth. It will be clear what these sets/constants are, when used. The special constants $\varepsilon$ and $\delta$ will always be small enough. We do however remind the reader of this often.
Given the enormous literature on some of the
topics mentioned in this paper, any relevant omissions in our reference listed is unintentional.
\subsection{Acknowledgments.}
It is a pleasure to give an enormous thanks to Professor Emmanuel Candese, Barnum-Simons Chair in Mathematics and Statistics, Stanford for his enormous support re this project. In addition, it is a pleasure to give thanks to Professor Keaton Hamm for his generous and diligent help with Sections (2.7-2.14) and to Professor Joe Kileel and Professor Keaton Hamm for their wealth of support.
I acknowledge joint work with the following University of Michigan students:
Yan Guo (\cite{DGWX}), Neo Charalambides and Bradley Swartz (\cite{FD5}), Safal Bora, Daniel Kaiser and Jeffrey Sun (\cite{D38}) and Gupreet Kalsi (present).
Financial support from the National Science Foundation is gratefully acknowledged.
\section{Chapter 2: Building $\varepsilon$-distortions: Slow twists, Slides.}
\setcounter{equation}{0}
We begin this chapter with the
\subsection{Procrustes alignment problem.}
Let us be given two sets of $k\geq 1$ distinct points in $\mathbb R^D$ with some geometry. Let us call the first set $\left\{y_{1},...,y_{k}\right\}$ and the second set $\left\{z_{1},...,z_{k}\right\}$.
The following optimization problem, when it is known that a solution $M\in O(D)$ exists, is a well-known example of a Procrustes problem in $\mathbb R^{D}$:
\[
{\rm inf }_{M\in O(D)}
\sum_{i=1}^{k} |(z_{i}-M(y_{i}))|.
\]
The correspondence is label wise and we say that the sets of points are aligned with each other. In the absence of labels, alignment problems are challenging, given it is often unclear which point to map to which. See for example our work in Chapter 20.
A known method called Iterative Closet Point (ICP) establishes the existence of a solution $M$ for sets of points with certain geometry, in particular, for sets of points with pairwise equal distances.
This optimization problem (for points with equal pairwise distances) is encountered in many applications for example in X-ray crystallography and in the mapping of restriction sites of DNA. In the case of one dimension, this problem is commonly referred to as the "turnpike" problem or in molecular biology, it is commonly referred to as the partial digest problem.
Geometric problems regarding distances between distinct points in $\mathbb R^{D}$ are interesting from many points of view. A classic example is the following problem (in algebraic combinatorics) of distinct distances formulated and first posed by Paul Erd\H{o}s in \cite{E}. He conjectured that for any arrangement of $k\geq 2$ points in the plane, the number of distinct distances is bounded below by $O\left(\frac{k}{\sqrt{\log k}}\right)$. In particular, a lower bound known of $O\left(\frac{k}{\log k}\right)$ has been proved by Guth and Katz.
Here, for real sequences $x_n,y_n,\, n\geq 1$, $x_n=O(y_n)$ if there exists an absolute constant $c$ (independent of $n$) so that
$\frac{x_n}{y_n}\leq c.$. Similar notation holds for sequences of functions.
Variants of the Procrustes optimization problem with different operator norms and for points in $\mathbb R^D$ with various geometry have been successfully formulated and studied in some depth.
\subsection{A classical problem in geometry; pairwise equal distances.}
Let us look more carefully at sets of points with pairwise equal distances.
We consider the following problem.
\begin{problem}
Let us be given two sets of $k\geq 1$ distinct points in $\mathbb R^D$. Let us call the first set $\left\{y_{1},...,y_{k}\right\}$ and the second set $\left\{z_{1},...,z_{k}\right\}$.
Let us suppose that the pairwise distances between all points in the first set and all points in the second set are equal. That is, the sets of points are isometric and we write
$|y_{i}-y_{j}|=|z_{i}-z_{j}|$ for every $1\leq i,j\leq k$.
How to understand the following?
\begin{itemize}
\item[(1)] Can the above "correspondence" be extended to an isometry of the containing Euclidean space $\mathbb R^{D}$? What this means is that
there exists a map $f:\mathbb R^D\to \mathbb R^D$, $f$ an isometry which obeys $f(y_i)=z_i,\, 1\leq i\leq k$. (Unlabeled alignment problems are in the absence of labels challenging given it is often unclear which point to map to which. See for example Chapter 14.
\item[(2)] In addition, is it possible to also find a Euclidean motion $A:\mathbb R^D\to \mathbb R^D$ which
aligns the points? That is, the map $A$ obeys $A(y_{i})=z_{i},\, 1\leq i\leq k$.
\end{itemize}
\label{p:isom}
\end{problem}
In this form Problem~\ref{p:isom} is interesting as one for example in the subjects of harmonic analysis, complex analysis, geometry and data science and the answer is known, see for example, \cite{WW1}.
Indeed, we summarize the answer to Problem~\ref{p:isom}which will be proved in the following theorem.
\begin{thm}
Let $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$ be two collections of $k\geq 1$ distinct points in $\mathbb R^{D}$.
Suppose that the pairwise distances between the points are equal, that is, the two sets of points are isometric. That is
\begin{equation}
|z_{i}-z_{j}|=|y_{i}-y_{j}|,\, 1\leq i,j\leq k.
\label{e:Pr1}
\end{equation}
\begin{itemize}
\item[(1)] Then, there exists a isometry $f:\mathbb R^{D}\to \mathbb R^{D}$ with
\begin{equation}
f(y_{i})=z_{i},\, 1\leq i\leq k.
\label{e:Pr2}
\end{equation}
\item[(2)] There exists a Euclidean motion $A$, with
\begin{equation}
A(y_{i})=z_{i},\, 1\leq i\leq k.
\label{e:Pr3}
\end{equation}
\end{itemize}
\label{t:procrustes}
\end{thm}
A central theme in this paper is to study analogues of Theorem~\ref{t:procrustes} for "near" isometries in various ways.
A map $f:\mathbb R^D\to \mathbb R^D$ is bi-Lipschitz if there exists a constant $c\geq 1$ so that for every $x,y\in \mathbb R^D$,
$|x-y|c^{-1}\leq |f(x)-f(y)|\leq c|x-y|$. ($c$ does not depend on $D$). A map $f:\mathbb R^D\to \mathbb R^D$ is a $c'$-distortion (near isometry) if there exists a constant $c'$ small enough depending on $D$ such that for every $x,y\in \mathbb R^D$,
$|x-y|(1+c')^{-1}\leq |f(x)-f(y)|\leq (1+c')|x-y|$. $c'$-distortions near distort distances by a factor of $1+c'$. Thus $c'$-distortions are bi-Lipschitz maps with Lipschitz constant $1+c'$ where
$c'$ is small enough.
We remark that a bi-Lipschitz map with Lipschitz constant $1+c$ cannot in general extend to a bi-Lipschitz map with Lipschitz constant $1+c'$ to all of $\mathbb R^D$,
unless $c,c'$ are small enough.
\subsection{Analogues of Theorem~\ref{t:procrustes} to near pairwise distances.}
Let us agree now to formulate analogues of Theorem~\ref{t:procrustes}(equal pairwise distances) to near pairwise distances via the following two problems.
\begin{problem}
Let us be given a constant $c$ small enough. Does there exist $c'$ small enough depending on $c$ so that the following holds.
Given two sets of $k\geq 1$ distinct points in $\mathbb R^D$, $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$.
Suppose for every $1\leq i,j\leq k$,
\begin{equation}
(1+c')^{-1}<\frac{|z_{i}-z_{j}|}{|y_{i}-y_{j}|}\leq (1+c').
\label{e:near}
\end{equation}
\begin{itemize}
\item[(1)] Does there exist a smooth $c$-distortion $\Phi:\mathbb R^D\to \mathbb R^D$
which obeys $\Phi(y_i)=z_i,\, 1\leq i\leq k$?
\item[(2)] Is it possible that $\Phi$ at the same time agrees with a Euclidean motion "globally away from" the points $\left\{y_{1},...,y_{k}\right\}$ and sometimes also with Euclidean motions "locally close" to each point in $\left\{y_{1},...,y_{k}\right\}$
as well?
\item[(3)] Can one say something about how $c,c',k,D$ are related?
\end{itemize}
\label{p:near1}
\end{problem}
\begin{problem}
Let us be given a constant $c>0$ small enough. Does there exist $c'$ small enough depending on $c$ so that the following holds.
Given two sets of $k\geq 1$ distinct points in $\mathbb R^D$, $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$.
Suppose for every $1\leq i,j\leq k$, (\ref{e:near}) holds.
\begin{itemize}
\item[(1)] Is it possible to find a Euclidean motion $A$ which
"near aligns" the points $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$. That is, the map $A$ obeys $A(y_{i})$ is "close" to $z_{i}$ for every $1\leq i\leq k$. Here "close" depends on $c$ and
the points $\left\{y_{1},...,y_{k}\right\}$. ( Moving forward we will use the phrases "near alignment" "near aligns" interchangeably.)
\item[(2)] Can one say something about how $c, c', k, D$ are related?
\end{itemize}
\label{p:near2}
\end{problem}
\begin{remark}
A central remark, at this juncture, is needed moving forward. Problem~\ref{p:near1} and Problem~\ref{p:near2} are fundamentally different in the sense that Problem~\ref{p:near1} is a problem dealing with the existence of near isometry extensions with various properties. Problem~\ref{p:near2} does not ask for an extension map. It asks for a near alignment. This fact translates itself in many ways, for example in how the constants
$c,c,k,D'$ relate to each other.
\end{remark}
We now begin to look at Problem~\ref{p:near1} and Problem~\ref{p:near2}. We will translate "smooth" into the idea of a $c$-distorted diffeomorphism.
\subsection{$c$-distorted diffeomorphisms.}
A diffeomorphism $f:\mathbb R^D\to \mathbb R^D$ is a smooth and bijective map with a smooth inverse. Given $c$ small enough, a diffeomorphism $f:\mathbb R^{D}\to \mathbb R^{D}$ is a $c$-distorted diffeomorphism if for every $x,y\in \mathbb R^D$,
$(1+c)^{-1}I\leq (f'(x))^{T}f'(x)\leq (1+c)I$ as matrices. Here, for $D\times D$ matrices, $M_1$, $M_2$, $M_3$, the ordering
$M_{2}\leq M_3\leq M_{1}$ means as usual that the matrices $M_{1}-M_{3}$ and $M_{2}-M_{3}$ are respectively positive semi-definite and negative semi-definite. Here, also $I$ denotes the identity matrix in $\mathbb R^D$.
Moving forward, we will need the following properties of $c$-distorted maps:
\begin{itemize}
\item[(1)] If $f$ is $c$-distorted and $c<c'$, then $f$ is $c'$-distorted.
\item[(2)] If $f$ is $c$-distorted, then so is $f^{-1}$
\item[(3)] If $f$ and $f_1$ are $c$-distorted, then the composition map $fof_1$ is $c'c$-distorted for some constant $c'$.
\item[(4)] If $f$ is a $c$-distorted diffeomorphism, then $f$ is 1-1 and onto and satisfies $|x-y|(1-c)\leq |f(x)-f(y)|\leq (1+c)|x-y|,\, x,y \in \mathbb R^D$.\footnote{Since $c$ is small enough we interchange throughout
$(1+c)^{-1}$ and $(1-c)$ depending on context.}
\item[(5)] If $f$ is $c$-distorted, then $|(f'(x))^{T}f'(x)-I|\leq c_1c,\, x\in \mathbb R^D$ for some constant $c_1$.
\end{itemize}
Properties (1-3,5) from the definition. Property (4) follows for example from Bochner's theorem. See for example \cite{WW1}.
We are now going to provide two examples of $c$-distorted diffeomorphisms which will take the form of "near" rotation and "near" translation.
\subsection{Slow twists.}
\begin{exm}
{\rm Let $\varepsilon>0$ and $x\in \mathbb R^D$. Let $St(x)$ be the block-diagonal matrix given by
\[
\begin{bmatrix}
St_{1}(x) & 0 & 0 & 0 & 0 & 0 \\
0 & St_{2}(x) & 0 & 0 & 0 & 0 \\
0 & 0 & . & 0 & 0 & 0 \\
0 & 0 & 0 & . & 0 & 0 \\
0 & 0 & 0 & 0 & . & 0 \\
0 & 0 & 0 & 0 & 0 & St_{r}(x).
\end{bmatrix}
\]
where for each $i$ either $St_{(i,f_i)}=St_i$ is the $1\times 1$ identity matrix or else
\[
St_i(x)=\begin{bmatrix}
\cos f_i(|x|) & \sin f_i(|x|) \\
-\sin f_i(|x|) & \cos f_i(|x|)
\end{bmatrix}
\]
where $f_i:\mathbb R^D\to \mathbb R$ are maps satisfying the following condition: For each $i$
\[
A: t|f'_{i}(t)|<c\varepsilon,\, t\geq 0.
\]
Here $c>0$ is small enough. Let $M$ in $SO(D)$. Then the map $f_{St}:=M^TStM:\mathbb R^D\to \mathbb R^D$ is a $\varepsilon$-distorted diffeomorphism and we call it a {\it Slow twist} (in analogy to rotations). }
\label{e:Example1}
\end{exm}
Here are two examples: Take a function $f:\mathbb R^2\to \mathbb R$ and suppose (A) holds.
Then
\[
St(x)=\begin{bmatrix}
\cos f(|x|) & \sin f(|x|) \\
-\sin f(|x|) & \cos f (|x|)
\end{bmatrix}.
\]
Take a function $f:\mathbb R^3\to \mathbb R$ and suppose (A) holds. Then
\[
St(x)=\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos(f(|x|)) & \sin(f(|x|))\\
0 & -\sin(f(|x|)) & \cos(f(|x|))\\
\end{bmatrix}.
\]
\subsection{Slides.}
\begin{exm}
{\rm Let $\varepsilon>0$ and let $f:\mathbb R^{D}\to \mathbb R$ be a smooth map satisfying the following condition:
\[
B: |f'(t)|<c\varepsilon,\, t\geq 0.
\]
Here, $c$ is small enough. Consider the map $f_{Sl}(t)=t+f(t):\mathbb R^D\to \mathbb R^D$. Then $f_{SL}$ is a $\varepsilon$-distorted diffeomorphism and we call it a {\it Slide} (in analogy to translations)}.
\label{e:Example2}
\end{exm}
\subsection{Slow twists: action.}
Here we illustrate the concept of a Slow twist on $\mathbb R^2$. Given a $\varepsilon>0$ and a map $f:\mathbb R^2\to\mathbb R$ so that (A) holds with the map $f$. Define the Slow twist matrix $St(x)$ for any $x\in\mathbb R^2$ via
\[ St(x):=\begin{bmatrix}\cos f(|x|) & \sin f(|x|) \\ -\sin f(|x|) & \cos f(|x|)\\ \end{bmatrix}.\]
Then given any pure rotation $M\in\text{SO}(2)$, the following map $f_{St}(x):=M^{T}StM(x):\mathbb R^2\to\mathbb R^2$ is a Slow twist.
In $2$ dimensions, the rotation $M$ does not affect anything since rotations are commutative on $\mathbb{R}^2$. However, for higher dimensions this is not the case, and hence we leave them in the formulas, but for now we always fix $M$ to be the identity matrix.
For a first set of illustrations, we will look only at one application of a Slow twist with $f$ being an exponential map with differing scaling parameter.
\begin{figure}[h!]
\centering \includegraphics[scale=0.25]{SlowTwistExp10_1step.png}
\centering \includegraphics[scale=0.25]{SlowTwistExp1_1step.png}
\centering \includegraphics[scale=0.25]{SlowTwistExp01_1step.png}
\caption{Initial points lying on the line $y=x$, and the application of a Slow twist with $f(x)=\exp(-c|x|)$, with $c=10$ (top left), $c=1$ (top middle), and $c=0.1$ top right).}
\end{figure}
For large values of $c$ depending on $D$ it can be seen that the twist is near isometric, and even outside a small enough cube centered at the origin, the points are left essentially fixed. On the other hand, as $c$ tends to $0$, the twist becomes closer to a pure rotation near the origin. Nevertheless, at a far enough distance, the Slow twist $f_{ST}$ will leave the points essentially unchanged. Indeed, the next figures illustrate this:
\begin{figure}[h!]
\centering \includegraphics[scale=0.25]{SlowTwistExp1Long_1step.png} \centering \includegraphics[scale=0.25]{SlowTwistExp01Long_1step.png}
\caption{Large scale for Slow twists with $f(x)=\exp(-c|x|)$. Left: $c=1$, the twist leaves the points essentially static outside $[-5,5]^2$; Right: $c=0.1$, the twist only starts to leave the points static outside about $[-30,30]^2$.}
\end{figure}
\subsection{Fast twists.}
Let us pause to consider what happens when the decay condition on the twist map $f$ (A) is not satisfied; in this case we will dub the twist map a Fast twist for reasons that will become apparent presently.
\begin{figure}[h!]
\centering \includegraphics[scale=0.4]{FastTwistt.png}
\caption{Fast twist with map $f(x)=|x|$.}\label{FIG:FastTwist}
\end{figure}
\begin{figure}[h!]
\centering \includegraphics[scale=0.25]{FastTwistt2_Short.png} \centering \includegraphics[scale=0.25]{FastTwistt2.png} \caption{Fast twist with $f(x)=|x|^2$ for a small enough interval $[-3,3]$ (left) and large interval $[-10,10]$.}\label{FIG:FastTwistSquared}
\end{figure}
From Figure \ref{FIG:FastTwist}, one can see that when $f$ is the identity map, the rate of twisting is proportional to the distance away from the origin, and hence there is no way that the twist map will leave points fixed outside of any ball centered at the origin. Likewise, one sees from Figure \ref{FIG:FastTwistSquared} that the Fast twist with map $f(x)=|x|^2$ rapidly degenerates points into a jumbled mess.
\subsection{Iterated Slow twists.}
Here we illustrate what happens when one iteratively applies a Slow twist to a fixed initial point.
\begin{figure}[h!]
\centering \includegraphics[scale=0.5]{SlowTwistExp05_3step.png} \caption{Iterated Slow twist with $f(x)=\exp(-0.5|x|)$. Shown is the initial points along the line $y=x$, $f_{St}(x)$, $f_{St}\circ f_{St}(x)$, and $f_{St}\circ f_{St}\circ f_{St}(x)$.} \label{FIG:SlowTwistIterated}
\end{figure}
In Figure \ref{FIG:SlowTwistIterated}, we see an illustration of the fact that the composition of Slow twists remains a Slow twist, but the distortion changes slightly; indeed notice that as we take more iterations of the exponential Slow twist, we have to go farther away from the origin before the new twist leaves the points unchanged.
\begin{figure}
\centering
\animategraphics[loop,autoplay,scale=0.5]{1}{./Twist_}{0}{15}.
\end{figure}
\subsection{Slides: action.}
We illustrate some simple examples of Slides on $\mathbb{R}^2$.
First consider equally spaced points on the line $y=-x$, and the Slide given by the map \[ f(t):=\begin{bmatrix}\frac{1}{1+|t_1|^2}\\ \\ \frac12 e^{-|t_2|} \end{bmatrix}.\]
This is illustrated in Figure \ref{FIG:SlideBasic}.
\begin{figure}[h!]
\centering
\includegraphics[scale=0.35]{Slide_basic.png}
\caption{Slide with the map $f$ given above.}
\label{FIG:SlideBasic}
\end{figure}
To give some more sophisticated examples, we consider first the Slide map
\[ f(t) := \begin{bmatrix} e^{-|t_1|} \\ \\ e^{-0.1|t_2|}\end{bmatrix},\] acting iteratively on uniform points along both the lines $y=x$ and $y=-x$.
\begin{figure}[h]
\centering
\includegraphics[scale=0.35]{Slide_Iterated1.png}
\caption{Lines $y=x$ and $y=-x$ along with $f_{SL}(x)$, $f_{SL}\circ f_{SL}$ and $f_{SL}\circ f_{SL}\circ f_{SL}(x)$ for $f$.}
\label{FIG:Slide1}
\end{figure}
Similarly, the following figure shows the Slide map
\[ f_2(t) := \begin{bmatrix} 1-e^{-|t_1|} \\ \\ 1-e^{-0.1|t_2|}\end{bmatrix}\]
acting iteratively on uniform points along the lines $y=x$ and $y=-x$.
\begin{figure}
\centering
\includegraphics[scale=0.35]{Slide_Iterated2.png}
\caption{Lines $y=x$ and $y=-x$ along with $f_{SL}(x)$, $f_{SL}\circ f_{SL}$ and $f_{SL}\circ f_{SL}\circ f_{SL}(x)$ for $f_2$.}
\label{FIG:Slide2}
\end{figure}
\subsection{Slides at different distances.}
To illustrate the effect of the distance of points from the origin, we illustrate here how Slides affect uniform points on circles of different radii.
We use again the asymmetric sliding map
\[ f(t)=\begin{bmatrix}\frac{1}{1+|t_1|^2}\\ \\ \frac12 e^{-|t_2|} \end{bmatrix}.\]
\begin{figure}
\centering\includegraphics[scale=0.25]{Slide_CircleRadius1.png}
\centering\includegraphics[scale=0.25]{Slide_CircleRadius2.png}
\centering \includegraphics[scale=0.25]{Slide_CircleRadius4.png}
\caption{Circles under 3 iterated Slides with the map $g$ above, beginning with a circle of radius 1 (top left), 2 (top right) and 4 (bottom).}
\label{FIG:CircleSlides}
\end{figure}
We see from Figure \ref{FIG:CircleSlides} that the farther out the points are; i.e. the larger the radius of the initial circle, the less the effect of the Slide, which makes sense given the definition and the fact that the Slides must be $\varepsilon$--distortions of $\mathbb{R}^2$.
\newpage
\subsection{3D motions.}
Here we illustrate some of the motions above in $\mathbb{R}^3$.
Here, we construct a generic rotation matrix in $SO(3)$ by specifying parameters $a,b,a_1,d$ satisfying $a^2+b^2+a_{1}^2+d^2=1$, and the rotation matrix $M$ is defined by
\[M = \begin{bmatrix}
a^2+b^2-a_{1}^2-d^2 & 2(ba_{1}-ad) & 2(bd+aa_{1})\\
2(ba_{1}+ad) & a^2-b^2+a_{1}^2-d^2 & 2(a_{1}d- ab)\\
2(bd-aa_{1}) & 2(a_{1}d+ab) & a^2-b^2-a_{1}^2+d^2\\
\end{bmatrix}.\]
As a reminder, our Slow twist on $\mathbb{R}^3$ is thus $M^TStM$.
\begin{example}\label{EX:3Dslowtwist.}
Our first example is generated by the rotation matrix $M$ as above with parameters $a=b=\frac{1}{\sqrt{3}}$ and $a_{1}=d=\frac{1}{\sqrt{6}}$, and the Slow twist matrix $St$ as
\[\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos(f(|x|)) & \sin(f(|x|))\\
0 & -\sin(f(|x|)) & \cos(f(|x|))\\
\end{bmatrix},\]
where $f(t) = e^{-\frac{t}{2}}$. Figures \ref{FIG:3DSlowTwist} and \ref{FIG:3DSlowTwistView2} show two views of the twisted motions generated by these parameters.
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{3DTwist_Exp_half.png}
\caption{Slow twist in $\mathbb{R}^3$.}
\label{FIG:3DSlowTwist}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{3DTwist_Exp_half_View2.png}
\caption{Alternate View of Slow twist in $\mathbb{R}^3$.}
\label{FIG:3DSlowTwistView2}
\end{figure}
\end{example}
\begin{figure}
\centering
\animategraphics[loop,autoplay,scale=0.5]{1}{./3DTwist_}{0}{5}
\end{figure}
\subsection{3D Slides.}
Here we generate 1000 random points on the unit sphere in $\mathbb{R}^3$ and allow them to move under a Slide formed by
\[ f(x) = x+\begin{bmatrix}e^{-0.5|x_{1}|}\\ e^{-|x_{2}|}\\ e^{-\frac{3}{2}|x_3|}\\
\end{bmatrix}.\]
The results are shown in Figure \ref{FIG:3DSlide}
\newpage
\newpage
\begin{figure}
\centering
\includegraphics[scale=0.5]{3DSlideSphere.png}
\caption{Anisotropic Slide on the $2$--sphere.}
\label{FIG:3DSlide}
\end{figure}
\subsection{Slow twists and Slides: Theorem~\ref{t:mainfd6}. }
From the definition of the Slow twists and Slides, the following remarkable result holds.
\begin{thm}
\begin{itemize}
\item[(1)] Let $\varepsilon>0$. There exists $\delta_{1}$ small enough depending on $\varepsilon$ so that the following holds.
Let $M\in SO(D)$ and let $c_{1}<\delta_{1} c_{2}$. Then there exists a $\varepsilon$- distorted diffeomorphism $f$ with $f(x)=M(x),\, |x|\leq c_{1}$ and
$f(x)=x,\, |x|\geq c_{2}.$
\item[(2)] Let $\varepsilon>0$. There exists $\delta_{1}$ small enough depending on $\varepsilon$ so that the following holds.
Let $A(x):=M(x)+x_{0}$ be a proper Euclidean motion and let $c_{3}<\delta_{1} c_{4}$, $|x_{0}|\leq c_5\varepsilon c_{3}$. Then there exists a $\varepsilon$- distorted diffeomorphism $f$ with
$f(x)=A(x),\, |x|\leq c_{3}$ and $f(x)=x,\, |x|\geq c_{4}$.
\item[(3)] Let $\varepsilon>0$. There exists $\delta_{1}$ small enough depending on $\varepsilon$ such that the following holds. Let $c_{6}\leq \delta_{1} c_{7}$ and let $x,x'\in \mathbb R^{D}$ with
$|x-x'|\leq c_{8}\varepsilon c_{6}$ and
$|x|\leq c_{6}$. Then, there exists a $\varepsilon$-distorted diffeomorphism $f$ with:
\item[(a)] $f(x)=x'$.
\item[(b)]$f(y)=y,\, |y|\geq c_{7}.$
\end{itemize}
\label{t:mainfd6}
\end{thm}
\begin{remark}
\begin{itemize}
\item[(1)] Theorem~\ref{t:mainfd6} (part(1)) follows from the definition of a Slow twist.
\item[(2)] Theorem~\ref{t:mainfd6} (part(2)) follows from the definition of a Slide.
\item[(3)] Theorem~\ref{t:mainfd6} (part(3)) follows from Theorem~\ref{t:mainfd6} (part(1)) and Theorem~\ref{t:mainfd6} (part(2)). It means the following. Suppose that for $x, x'\in \mathbb R^D$, we have $|x|=|x'|$. Then we know from Theorem~\ref{t:procrustes} (equal pairwise distances)
that there exists an isometry $f_{1}:\mathbb R^D\to \mathbb R^D$ with $f_{1}(x)=x'.$
If we force $x$ and $x'$ to live in a ball with small enough radius, then Slow twists and respectively Slides are “local" smooth rotations and respectively "local" smooth translations.
On the other hand, far out Slow twists and Slides agree with the identity.
\item[(4)] Procrustes optimization problems for Slow twists and Slides are challenging with numerous applications in learning, computer vision and signal processing. For example in remote sensing or photometry, this problem is the well-known coregistration problem in multiple camera hyperspectral data sets.
\end{itemize}
\end{remark}
\subsection{Theorem~\ref{t:mainfd3} and Theorem~\ref{t:mainfd1}.}
We are now ready for our first two main results, Theorem~\ref{t:mainfd3} and Theorem~\ref{t:mainfd1}. Throughout, the diameter of a compact set $X\subset \mathbb R^D$ is: ${\rm diam} (X):={\rm sup}_{x,y\in X}|x-y|$.
Our first result is given in
\begin{thm}
Let $\varepsilon>0$.
\begin{itemize}
\item[(1)] There exists $\delta$ small enough depending on $\varepsilon$ such that the following holds.
Let $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$ be two sets of $k\geq 1$ distinct points of $\mathbb R^{D}$. Suppose
\begin{equation}
|y_{i}-y_{j}|(1+\delta)^{-1}\leq|z_{i}-z_{j}|\leq (1+\delta)|y_{i}-y_{j}|,\, 1\leq i,j\leq k.
\label{e:emotionsa}
\end{equation}
If $k\leq D$, there exists a $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ with: $\Phi(y_{i})=z_{i}$ for each $1\leq i\leq k$.
\item[(2)] There exists $\delta_{1}$ such that the following holds. Let $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$ be two sets of $k\geq 1$ distinct
points of $\mathbb R^{D}$. Suppose (\ref{e:emotionsa}) holds with $\delta_{1}$.
There exists a Euclidean motion $A$ so that for $1\leq i\leq k$,
\begin{equation}
|A(y_{i})-z_{i}|\leq \varepsilon{\rm diam}(y_{1},...,y_{k}).
\label{e:emotionsaa}
\end{equation}
If $k\leq D$, then $A$ can be taken as proper.
\end{itemize}
\label{t:mainfd3}
\end{thm}
Our second result is given in
\begin{thm}
Let $\varepsilon>0$.
Then there exist $\delta$ and $\hat{\delta}$ depending on $\varepsilon$ both small enough such that the following holds. Let $E\subset \mathbb R^{D}$ be a collection of distinct
$k\geq 1$ points $E:=\left\{y_{1},...,y_{k}\right\}$. Suppose we are given a map
$\phi:E\to \mathbb R^{D}$ with
\begin{equation}
|x-y||(1+\delta)^{-1}\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|,\, x,y\in E.
\label{e:emotionssa}
\end{equation}
\begin{itemize}
\item[(1)] If $k\leq D$, there exists a $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ so that:
\item[(a)] $\Phi$ agrees with $\phi$ on $E$.
\item[(b)] Suppose $y_{i_0}=\phi(y_{i_0})$ for one $i=i_0,\, 1\leq i\leq k$. Then $\Phi(x)=x$, $|x-y_{i_{0}}|\geq \hat{\delta}^{-1/2}{\rm diam}\left\{y_{1},...,y_{k}\right\}$.
\item[(2)] There exists $\delta_{1}$ such that the following holds. Let $E\subset \mathbb R^{D}$ be a collection of distinct
$k\geq 1$ points $E:=\left\{y_{1},...,y_{k}\right\}$. Suppose that (\ref{e:emotionssa}) holds with $\delta_{1}$. There exists a Euclidean motion $A$ with
\begin{equation}
|\phi(x)-A(x)|\leq\varepsilon{\rm diam}(E),\, x\in E.
\label{e:emotionssaa}
\end{equation}
If $k\leq D$, then $A$ can be taken as proper.
\end{itemize}
\label{t:mainfd1}
\end{thm}
\subsection{An extension problem.}
Theorem~\ref{t:mainfd3} (part (1)) and Theorem~\ref{t:mainfd1} (part (1)) are examples of extension maps.
\subsection{Theorem~\ref{t:mainfd3} and Theorem~\ref{t:mainfd1}}
Note again that: The map $\phi$ with distortion $\delta$ is extended to a $\varepsilon$-distorted diffeomorphism $\Phi$. Both $\varepsilon$ and $\delta$ are small enough and depend on $D$. $\delta$ depends on $\varepsilon$ as it should. These are near interpolation results.
\subsection{An important observation in Theorem~\ref{t:mainfd1}.}
An important observation in Theorem~\ref{t:mainfd1} is that the extension $\Phi$ agrees with an apriori given Euclidean motion away from the set $E$ provided $y_{i}=\phi(y_i)$ for one $i=i_0,\, 1\leq i_0\leq k$.
What this says in particular is that if the map $\phi$ has a fixed point then the map $\Phi$ must be essentially rigid away from the set $E$. Thus, fixed points only allow the map $\Phi$ to be essentially non-rigid near the set $E$.
\section{Chapter 3: Counterexample to Theorem~\ref{t:mainfd1} (part (1)) for ${\rm card}(E)>D$.}
\setcounter{equation}{0}
Moving forward, for $X\subset \mathbb R^D$ finite, ${\rm card}(X)$ denotes the cardinality of the set $X$. We adopt the conventions of writing sometimes $k$ for ${\rm card}(X)$ or we say "cardinality of the set $X$". All conventions are used for easier reading and it will be clear what set $X$ is for the constant $k$ used.
When we speak to the set $E$ in particular, $k:={\rm card}(E)$.
We observe immediately the restriction $k\leq D$ for the existence of the extension $\Phi$ in Theorem~\ref{t:mainfd1} (part (1)).
Is this simply a "technical issue"? The answer to this “optimistic” guess is unfortunately no.
The $k\leq D$ sufficient condition for the existence of the extension $\Phi$ turns out to be deeper than merely "sufficient" as a tool. In fact, under the geometry of $E$ given by Theorem~\ref{t:mainfd1}, the extension $\Phi$ does not always
exist for $k>D$. In this chapter we will provide the required counterexample.
In fact, the $k>D$ case under the geometry of the finite set $E$ for Theorem~\ref{t:mainfd1} (part(1)), seems indeed to create a "barrier" to the existence of the extension $\Phi$.
Observe also that there is no such restriction for the existence of the Euclidean motion $A$ in Theorem~\ref{t:mainfd1} (part (2)). Indeed, the relationships between the cardinality of the set $E$ and the dimension $D$ have no bearing on Theorem~\ref{t:mainfd1} (part (2)).
\subsection{Theorem~\ref{t:mainfd1} (part (1)), counterexample: $k>D$.}
Let us now look at the counterexample.
\medskip
We fix $2D+1$ points as follows. Let $\delta$ be a small enough
positive number depending on $D$. Let $y_{1},...,y_{D+1}\in \mathbb R^{D}$
be the vertices of a regular simplex, all lying on the
sphere of radius $\delta$ about the origin.
Then define $y_{D+2} \cdots y_{2D+1}\in \mathbb R^{D}$ such that
$y_{D+1},...,y_{2D+1}$ are the vertices of a regular simplex, all lying in a sphere of radius 1, centered at some point $x_0\in \mathbb R^{D}$. Next, we define a map
\[
\phi:\left\{y_{1},...,y_{2D+1}\right\}\to \left\{y_{1},...,y_{2D+1}\right\}
\]
as follows. We take $\phi|_{\left\{y_{1},...,y_{D+1}\right\}}$
to be an odd permutation that fixes
$y_{D+1} $, and take $\phi|_{\left\{y_{D+1},...,y_{2D+1}\right\}}$ to be the identity.
The map $\phi$ distorts distances by at most a factor $1+c\delta$. Here, we can take $\delta$
arbitrarily small enough. On the other hand, for small enough $\varepsilon$, we will show that $\phi$ cannot be extended to a map $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ satisfying
\[
(1+\varepsilon)^{-1}|x-x'|\leq|\Phi(x)-\Phi(x')|\leq |x-x'|(1+\varepsilon),\, x,x'\in \mathbb R^{D}.
\]
In fact, suppose that such a $\Phi$ exists.
Then $\Phi$ is continuous. Note that there exists
$M\in O(D)$ with ${\rm det}M=-1$ such that $\phi(y_{i})=My_{i}$ for $i=1,...,D+1$. It will be convenient to parametrize the $D-1$-dimensional sphere $S^{D-1}$ embedded in $\mathbb R^D$.
So let $S_t$ be the sphere of radius $r_t:=\delta\cdot(1-t)+1\cdot t$ centered at
$t \cdot x_0$ for $t\in [0,1] $
and let
$S_t'$ be the sphere of radius $r_t$ centered at
$\Phi(t \cdot x_0)$. Also, let $Sh_t$ be the spherical shell
\[
\left\{x\in \mathbb R^{D}:\, r_t\cdot(1+\varepsilon)^{-1}\leq |x-
\Phi(t \cdot x_0)|\leq r_t\cdot(1+\varepsilon)\right\}
\]
and let $f_t:Sh_t\to S_t'$ be the projection
defined by
\[
f_t(x)-\Phi(t \cdot x_0)=
\frac{x-\Phi(t \cdot x_0)}{|x-\Phi(t \cdot x_0)|} \cdot r_t.
\]
Since $\Phi$ agrees with $\phi$, we know that
\begin{equation}
\left|\Phi(x)-Mx\right|\leq c\varepsilon\delta,\, |x|=\delta.
\label{e:counterone}
\end{equation}
Since $\Phi$ agrees with $\phi$, we know that
\begin{equation}
\left|\Phi(x)-x\right|\leq c\varepsilon,\, |x-x_0|=1.
\label{e:countertwo}
\end{equation}
Our assumption that $\Phi$ is a near isometry shows that
\[
\Phi: S_t\to Sh_t,\, 0\leq t\leq 1
\]
and
\begin{equation}
(f_t)o(\Phi):S_t\to S_t',\, 0\leq t\leq 1.
\label{e:counterthree}
\end{equation}
We can therefore define a one-parameter family of maps $\hat{f}_t,\, t\in [0,1]$ from the unit sphere
to itself by setting
\[
\hat{f}_t(x)=\frac{(f_t o\Phi)(tx_0+r_tx)-\Phi(tx_0)}
{\left|(f_t o\Phi)(tx_0+r_tx)-\Phi(tx_0)\right|}=
\frac{(f_t o\Phi)(tx_0+r_tx)-\Phi(tx_0)}{r_t}.
\]
From (\ref{e:counterone}), we see that $\hat{f}_0$ is a small enough perturbation
of the map $M:S^{D-1}\to S^{D-1}$ which has degree -1. From (\ref{e:countertwo}), we see that
$\hat{f}_1$ is a small enough perturbation of the identity.
Consequently, the following must hold:
\begin{itemize}
\item Degree $\hat{f}_t$ is independent of $t\in [0,1]$.
\item Degree $\hat{f}_0=-1$.
\item Degree $\hat{f}_1=+1$.
\end{itemize}
This gives the required contradiction. $\Box$.
\subsection{Removing the barrier $k> D$.}
Moving forward we are going to devote a lot of time studying how to remove the barrier of $k> D$. Indeed, studying the counterexample in Section (3.1) carefully, we make the optimistic guess that the following new geometry on the finite set $E$ may be needed to circumvent this barrier. Roughly put:
\begin{itemize}
\item[(1)] {\rm card}(E) cannot be too large.
\item[(2)] The diameter of the set $E$ is not too large.
\item[(3)] The points of the set $E$ cannot be too close to each other.
\item[(4)] The points of the set $E$ are close to a hyperplane in $\mathbb R^D$.
\end{itemize}
Moving forward, we will make (1-4) rigorous.
\section{Chapter 4: Manifold learning, near-distorted embeddings.}
\setcounter{equation}{0}
\subsection{Manifold learning.}
One of the main challenges in high dimensional data analysis is dealing with the exponential growth of the computational and sample complexity of several needed generic inference tasks as a function of dimension, a phenomenon termed “the curse of dimensionality”.
One intuition that has been put forward to lessen or even obviate the impact of this curse is a manifold hypothesis
that the data tends to lie near a low dimensional submanifold of the ambient space. Algorithms and analyses that are based on this hypothesis constitute the subfield of learning theory known as manifold learning. One may, under certain frameworks, view the manifold hypothesis as a problem of fitting manifolds to data. In that sense, this is an extension problem.
Many relationships between the manifold hypothesis and extension problems are now known.
We recall in the sense of $E\subset \mathbb R^D$ finite, the extension problem is an interpolation problem in $\mathbb R^D$. The problem we study is an almost fit.
Classical linear methods for manifold learning include principal component analysis (PCA), linear multidimensional scaling (MDS) and singular value decomposition.
Some classical non-linear manifold learning algorithms include Isomap, local linear embedding, Laplacian eigenmaps, diffusions maps and
local linear embedding-via Hessians.
Many of these algorithms rely on spectral graph theory and start off by constructing a graph which is then used to produce a lower-dimensional embedding of the data. The theoretical guarantees are centered around proving that asymptotically certain values such as the geodesic distance can be approximated to arbitrary precision. For example, in Isomap, geodesics distances are approximately preserved for finite sampled data from a manifold. Existing theory shows, under certain conditions, that the Laplacian matrix of the constructed graph converges to the Laplace-Beltrami operator of the data manifold. However, this result assumes the Euclidean norm is used for measuring distances. It is known now that the limiting differential operator for graph Laplacians can be constructed using any norm.
In traditional manifold learning, for instance, by using the Isomap algorithm (the seminal paper \cite{TSL}
(J. Tenenbaum, V. de Silva, J. Langford), one often maps appropriate data $E_k$ to data $F(E_j)$, where $F:\mathbb R^m\to \mathbb R$ is
a smooth extension of a restriction to the data $E_k\in \mathbb R^m$. Here,
$m\geq D$ is as small as possible so that the Euclidean
distances $|F(E)_k-F(E)_j|_{\mathbb R^m}$ are close
enough to the appropriate intrinsic distances denoted $d_{(M,g)}(E_k-E_j)$
and finding a submanifold in $\mathbb R^m$ that is close (defined appropriately) to the data $F(E_j)$. Here $M=(M,g)$ is the noted manifold with tensor $g$.
One contribution of the Isomap algorithm is finding the topological manifold structure.
Another is that if the noted manifold has vanishing Riemannian curvature and satifies some convexity conditions, the mainfold constructed by Isomap approaches, defined appropriately, the original manifold as the size of the sample grows without bound.
The construction of abstract manifolds from the distances of sampled data
points has also been considered by diffusion maps and eigenmaps
where the
data points are mapped to the values of the approximate eigenfunctions or diffusion kernels
at the sample points. These methods construct a non-isometric embedding of the manifold $(M,g)$ into $\mathbb R^m$, where $m$ is large enough. It is fairly well known how this construction is computed.
For example, this is understood if the discrete set is randomly sampled, the distances have (possibly large) random
errors and when some distance information is missing.
\subsection{Near-distorted embeddings, compressive sensing and geodesics.}
Consider now the following framework question.
The topic of embeddings that preserve all pairwise distances between data points has been studied in depth and much of the work on this topic is now classical.
See the following references and many therein for good overview of manifold learning and embeddings.
The following embedding is interesting and obeys the following $L_{2}$ relaxed notion of isometry.
Given $D'\geq 2$ with $D'<D$. Find an embedding $f:\mathbb R^D\to \mathbb R^{D'}$ with the following property: There exists $c>0$ small enough depending on $D,D'$ with
\[
|x-y|_2^2(1-c)\leq |f(x)-f(y)|_2^2\leq (1+c)|x-y|_2^2,\, x,y\in \mathbb R^D.
\]
The condition on the map $f$ above is called the "Restricted isometry property (RIP)".
Applications of such embeddings $f$, occur for example in random projection methods for data dimension reduction for example, In signal processing, (RIP) arises in compressive sensing in the following way. See for example
\cite{Can, Can1, D21}. Compressive sensing is a well known
processing of $l$ sparse signals that can be expressed as the sum of only $l$ elements from a certain basis. An important result in compressive sensing is that if a
matrix $M\in \mathbb R^{D\times D'}$ satisfies (RIP) on a certain set $X$ of all $l$ sparse signals, then it is possible to stably recover a sparse signal $x$ from
measurements $y-f(x)$, $x\in X$ iff $D'$ is of the order of $l\log(D/l)$.
The existence of the embedding $f$ follows from the "The Johnson Lindenstrauss Lemma" which gives an $L_2$ relationship between
the size of a set of points, to the size of $D$ for a smooth dimension reduction problem. Here is its statement.
\begin{thm}
Let $s\in (0,1)$. Let $E\subset \mathbb R^{D}$, a finite set of cardinality $l>1$. Let $m\geq 1$ satisfy $m=O\left(s^{-2}{\rm log}(l)\right)$.
\begin{itemize}
\item[(1)] Then there exists $f:E\to \mathbb R^{m}$ satisfying
\[
|x-y|_{2(\mathbb R^{D})}(1-s)\leq |f(x)-f(y)|_{2(\mathbb R^m)}\leq (1+s)|x-y|_{2(\mathbb R^{D})}, x\in E,\, y\in \mathbb R^{D}.
\]
\item[(2)] Suppose in addition we demand that $m=O(D)$ as well as $m=O\left(s^{-2}{\rm log}(l)\right)$. Then we obtain a quantitative relation between $l$ and $D$ and the theorem is sharp with $s:=\frac{1}{{\rm min}(D,l)}$.
\end{itemize}
\end{thm}
\subsection{Restrictive isometry, (RIP).}
\begin{figure}[hbt]
\centering
\includegraphics[width=0.4\textwidth]{manifoldtorus}
\caption{Points on or "close" to a 2-dimensional torus embedded in $\mathbb R^3$. See Chapter 19 where we "discretize" a torus by extremal configurations.
}
\end{figure}
Now that we have a good idea what near isometric embeddings may look like, what kinds of invariants do they have? We choose one of interest to us namely “reach” (injectivity radius) which would be interesting
to study regarding connections to our work and manifold learning with (RIP).
Suppose that $f: \mathbb R^D\to \mathbb R^{D'}$ is a near isometry
in the sense that $f$ satisfies (RIP). Here, $D'<D$, $D'\geq 2$.
{\bf Reach (Injectivity radius)}:\, Let $X\subset \mathbb R^D$ be a $D'$-dimensional smooth submanifold embedded in $\mathbb R^D$. The reach of $X$, ${\rm reach} (X)$ measures how regular the manifold $X$ is and roughly it captures valuable local and global properties of the manifold $X$.
Reach is defined as follows: Any point in $\mathbb R^D$ within a distance ${\rm reach} (X)$ to $X$ has a unique nearest point on $X$. For example, the
reach of the unit circle is 1 given any point in $\mathbb R^2$ whose distance from the unit circle is less than $1$
has a unique nearest point on the unit circle. More generally, if $X$ is a $D-1$-dimensional ellipsoid with principal axes
$r_1\geq r_2...\geq r_D>0$, then ${\rm reach}(X)=\frac{r_{D}^2}{r_{1}}.$ Roughly, the reach of $X$ controls how "close" the manifold $X$ may curve back on itself.
The following holds.
\begin{itemize}
\item[(1)] If $X$ is now a smooth, bounded and boundary-less $D'$-dimensional submanifold embedded in $\mathbb R^D$, then so is $f(X)$.
\item[(2)] $ \frac{{\rm diam}(f(X))}{{\rm diam}(X)}$ is close to 1.
\item[(3)] $ \frac{{\rm vol}_{D'}(f(X))}{{\rm vol}_{D'}(X)}$ is close to 1.
\item[(4)] If $f$ is in addition a rank-$D'$ linear map with its $D'$ nonzero singular values satisfying
$[\sigma_{{\rm min}}, \sigma_{{\rm max}}]\subset (0,\infty)$, then:
${\rm reach}(f(X))\geq c\left(\frac{\sigma^2_{{\rm min}}}{\sigma^{3}_{{\rm max}}}\right)({\rm reach}(X))$ for some $c$ close enough to 1 depending on $D,D'$.
\item[(5)] Regarding (4), ${\rm reach}(f(X))$ and ${\rm reach}(X)$ are typically not close to each other. However, the following below replaces the statement of only a lower bound in (4) by a statement that
${\rm reach} (f(X))$ and ${\rm reach}(X)$ are close.
Suppose the manifold $X$ is concentrated on or "close" to a $D'$-dimensional subspace of $\mathbb R^D$ and $f$ is an orthogonal projection
onto an orthogonal basis for that subspace. These types of orthogonal projections appear in PCA. If $D'$ nonzero singular values of $f$ equal 1 then
${\rm reach} (f(X))$ is close to ${\rm reach}(X)$.
\item[(6)] Suppose that $f_{1}:\mathbb R^{D}\to \mathbb R^{D'}$ is an isometry then ${\rm reach}(f(X))={\rm reach}(X)$
\end{itemize}
It would be interesting to investigate connections of the work in Chapter 4 with that of Chapter 3 and Chapter 2. For example near fit interpolation and near fit manifold fitting. Clearly this is an interesting but cetainly an important and worthy problem to study.
\section{Chapter 5: Clusters and Partitions.}
\setcounter{equation}{0}
An important tool needed for the proof of Theorem~\ref{t:mainfd1} (part (1)), we are going to need is to have to break up the set $E$ into suitable clusters.
This chapter discusses clustering and partitions from various points of view.
\subsection{Clusters and partitions.}
On an intuitive level, let us suppose that for example we are given a $D$-dimensional compact set $X$ embedded in $\mathbb R^{D+1}$ and suppose
one requires to produce say 10000 points which "represent" the set $X$. How to do this if the set $X$ is described by some geometric property? We may think of a process of "breaking up" a compact set roughly as a "discretization"
Clustering and partitions of sets $X\subset \mathbb R^D$ with certain geometry roughly put are ways to "discretize" the set $X$ and are used in many mathematical subjects for example harmonic analysis, complex analysis,
geometry, approximation theory, data science, number theory and many more.
When we think of clustering we typically speak to finite sets and when we think of partitions, we typically speak to sets which are not finite.
We provide some examples below with appropriate references. \cite{Ha} is a classic reference for some foundations of the subject of clustering in statistics. Loosely: We think of a clustering of a finite subset
$X\subset \mathbb R^{D}$ as a finite union of subsets $X_{i}\subset \mathbb R^{D}$, $i\in I$ some index set $I$ where roughly "similar" points live in one or a few $X_i$. We will define "similar" in a moment. Clustering is also affected by the curse of dimensionality. For example, the concept of distance between points in $\mathbb R^{D}$ in a given cluster may easily become distorted as the number of dimensions grows. For example, the distance between any two points in a given cluster may converge in some well-defined sense as the number of dimensions increase. A discrimination then, of the nearest and farthest point in a given cluster can become meaningless.
\subsection{Similarity kernels.}
We define, the notion of a "similarity kernel". We take this from our work \cite{D11}.
\begin{dfn}
In this section, we take $D\geq 1$. Let $X^D$ be a $C^{\infty}$, compact homogeneous $D$-dimensional manifold, embedded as the orbit of a compact group $G$ of isometries of $\mathbb R^{D'},\, D'>D$. That is, there exists $x\in X^D$ (a pole) with $G:=\left\{g\cdot x:\, g\in G\right\}$. For example, each $D$-dimensional sphere $S^D$ embedded
in $\mathbb R^{D+1}$ is the orbit of any unit vector under the action of SO(D+1). A "similarity" kernel
$K: X^D\times X^D\to (0,\infty)$ satisfies typically:
\begin{itemize}
\item[(1)] $K$ is continuous off the diagonal of $X^D\times X^D$ and is lower-semi continuous on $X^D\times X^D$. Here, the diagonal of $X^D\times X^D$
is the set $\left\{(x,y)\in X^D\times X^D:\, x=y\right\}$.
\item[(2)] For each $x\in X^D$, $K(x,\cdot)$ and $K(\cdot,y)$ are integrable with respect to surface measure, $\mu_{Su}$, i.e. $K(x,\cdot)$ and $K(\cdot,y)$ are in
$L_{1}(\mu_{Su})$.
\item[(3)] For each non-trivial finite signed measure $\mu\in X^D$, we have for the energy functional
\[
\int_{X^D}\int_{X^D}K(x,y)d\mu(x)d\mu(y)>0
\]
where the iterated integral maybe infinite. This says that $K$ is strictly positive definite.
\item[(4)] $x,y\in X^D$ are "similar" if $K(x,y)$ is small enough.
\end{itemize}
\label{d:kernel}
\end{dfn}
A well-known example of a "similarity" kernel involves the Gaussian kernel $K(x,y):=\exp(-c|x-y|),\, x,y\in \mathbb R^D$ where $c$ is scaled data wise. It is an example of a kernel heavily used in non-linear dimension reduction with diffusion maps. We have used this kernel in our work on hyperspectral image processing,
neural net learning, discrepancy and shortest path clustering for example. Consider the Newtonian: $f(x,y):= f_1(x,y)|x-y|^{-s},\, 0<s<D,\, x,y\in X^D, x\neq y$.
Here, $X^D$ is a certain rectifiable $D$-dimensional compact set embedded in $\mathbb R^{D'}$, $D<D'$ and
$f_{1}: X^{D}\times X^{D}\to (0,\infty)$ is chosen so that $f$ is a "similarity" kernel. For example, $X^D$ can be taken as the $D$-dimensional sphere, $S^D$ embedded in $\mathbb R^{D+1}$. Such kernels are used for example to study extremal configurations on certain $D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ (for example $S^D$) which form good partitions of these sets useful in many applications in several subjects for example approximation theory. See Chapter 19 for more details. See also \cite{Mh,LL} and the references cited therein.
\subsection{Shortest paths and clustering.}
In this section, we give a rough and brief desciption of our work in \cite{MD} on clustering using shortest paths. The work in \cite{MD} made use of our work in \cite{WDH} on shortest paths through random points drawn from a smooth density supported on a certain set of Riemannian manifolds. We refer the reader to our paper \cite{WDH} for details.
For this section, given we keep our discussion rough, imagine we have a finite set $X\in \mathbb R^D$ we wish to cluster into subsets $X_1,...X_l$.
We assume the manifold hypothesis in the following sense. Assume that $X$ is drawn from a smooth density supported on a certain low dimensional manifold.
Relying on the details in \cite{MD}, we are going to choose $X$ so that what is below is consistent and well defined. So roughly, let say $x_i$ and $x_j$ be two different points in $X$ for an appropriate $i,j\in I$, $I$ an index set. We want to construct clusters of $X$ so that for an appropriate distance the following is true: If $x_i$ and $x_j$ are in the same cluster, the distance between $x_i$ and $x_j$ is small and if $x_i$ and $x_j$ are in different clusters then the distance between $x_i$ and $x_j$ is bounded away from zero. We are going to do this using two distances called the
$p$-weighted shortest path distance and the longest-leg path distance.
\subsection{$p$-weighted shortest path distance and longest-leg path distance.}
Let us look at two kernels suitably scaled.
\medskip
Given a smooth path $\gamma:x_{i}\to x_j$, define the $p>1$-weighted length of $\gamma$ to be:
\[
L^{(p)}(\gamma) := \left(\sum_{i,j}|x_{i} - x_{j}|^{p}\right)^{1/p}.
\]
The $p$-weighted shortest path distance ($p$-WSPM) through $X$ is the minimum weighted length (as above) over all such smooth paths in the sense of
\[
K^{(p)}_{X}(x_{i},x_{j}) := \min\left\{L^{(p)}(\gamma) \ : \ \gamma \text{ a smooth path from $x_{i}$ to
$x_{j}$ through } X \right\}.
\]
Analogously, given a smooth path $\gamma:x_{i}\to x_j$, define the longest-leg length of $\gamma$ as:
$$
L^{(\infty)}(\gamma) = \max_{i,j} |x_{i} - x_{j}|.
$$
The longest-leg path distance (LLPD) through $X$ is the minimum longest-leg length (as above) over all such smooth paths in the sense of
\[
K^{(\infty)}_{X}(x_i,x_j) = \min \left\{L^{(\infty)}(\gamma): \gamma \text{ a smooth path from $x_{i}$ to $x_{j}$ through $X$}\right\}
\]
Both kernels $K^{(p)}_{\mathcal{X}}(x_{i},x_{j})$ and $K^{(\infty)}_{X}(x_i,x_j)$ have well defined continuous analogues.
The following is known for a fixed scaled similarity Gaussian kernel.
\begin{itemize}
\item The maximum distance between points in the same cluster is small with high probability, and tends to zero as the number of data points grows without bound. On the other hand, the maximum distance between points in different clusters remains bounded away from zero.
\item There exists a modified version of Dijkstra's algorithm that computes $k$ nearest neighbors, with respect to any $p$-WSPM or the LLPD, in $O(k^{2}\mathcal{T}_{Enn})$ time, where $\mathcal{T}_{Enn}$ is the cost of a well defined Euclidean nearest-neighbor query.
\end{itemize}
\subsection{Hierarchical clustering in $\mathbb R^{D}$.}
In this last section in this chapter, we provide the following interesting result we need, in particular for proof of Theorem~\ref{t:mainfd1} (part (1)) (and used first there) on hierarchical clustering in $\mathbb R^{D}$ taken from the paper \cite{FD1}.
\begin{thm}
Let $k\geq 2$ be a positive integer and let $0<\eta\leq 1/10$. Let $X\subset \mathbb R^{D}$ be a set consisting of $k$
distinct points. Then, we can partition $X$ into sets $X_{1}, X_{2},...,X_{{j'}_{\rm max}}$ and we can find a positive integer $l$
$(10\leq l\leq 100+\binom{k}{2})$ such that the following hold:
\begin{equation}
{\rm diam}(X_{j'})\leq \eta^{l}{\rm diam}(X), \quad {\rm each}\, j'
\end{equation}
\begin{equation}
{\rm dist}(X_{j'},X_{j''})\geq \eta^{l-1}{\rm diam}(X), \quad {\rm for}\, j''\neq j'
\end{equation}
\label{t:Lemmathree}
\end{thm}
\noindent
{\bf Proof} \ We define an equivalence relation on $X$ as follows. Define a relation $\sim$ on $X$ by saying that
$x\sim x'$, for $x,x'\in X$ if and only if $|x-x'|\leq \eta^{l}{\rm diam}(X)$ for a fixed positive integer $l$ to be defined in a moment. By the pigeonhole principle, we can always find a positive integer $l$ such that
\[
|x-x'| \notin (\eta^l{\rm diam}(X),\eta^{l-1}{\rm diam}(X)], \, x,x'\in X.
\]
and such that $10\leq l\leq 100+\binom{k}{2}$. Let us choose and fix such an $l$ and use it for $\sim$ as defined above.
Then $\sim$ is an equivalence relation and the equivalence classes of $\sim$ partition $X$
into the sets $X_1,...,X_{{j'}_{\rm max}}$ with the properties as required.
$\Box$
\section{Chapter 6: The proofs of Theorem~\ref{t:mainfd1} and Theorem~\ref{t:mainfd3}.}
\setcounter{equation}{0}
In this chapter we are going to provide the proofs of Theorem~\ref{t:mainfd1} and Theorem~\ref{t:mainfd3}. We will prove Theorem~\ref{t:mainfd3}. The proof of
Theorem~\ref{t:mainfd1} is similar.
\subsection{Proof of Theorem~\ref{t:mainfd3} (part(2)).}
We begin with the proof of Theorem~\ref{t:mainfd3} (part(2)).
\medskip
\noindent
{\bf Proof} \ Suppose not. Then for each $l\geq 1$, we can find points $y_1^{(l)},...,y_k^{(l)}$ and $z_1^{(l)},...,z_k^{(l)}$ in
$\mathbb R^D$ satisfying (\ref{e:emotionsa}) with $\delta=1/l$ but not satisfying (\ref{e:emotionsaa}). Without loss of generality, we may suppose that ${\rm diam}\left\{y_1^{(l)},...,y_k^{(l)}\right\}=1$ for each $l$ and that $y_1^{(l)}=0$ and
$z_l^{(1)}=0$ for each $l$. Thus $|y_i^{(l)}|\leq 1$ for all $i$ and $l$ and
\[
(1+1/l)^{-1}\leq \frac{|z_i^{(l)}-z_j^{(l)}|}{|y_i^{(l)}-y_j^{(l)}|}\leq (1+1/l)
\]
for $i\neq j$ and any $l$.
However, for each $l$, there does not exist an Euclidean motion
$\Phi_0$ such that
\begin{equation}
|z_i^{(l)}-\Phi_0(y_i^{(l)})|\leq \varepsilon
\label{e:emotionsc}
\end{equation}
for each $i$. Passing to a subsequence, $l_1,l_2,l_3,...,$ we may assume
\[
y_i^{(l_{\mu})}\to y_i^{\infty},\, \mu\to \infty
\]
and
\[
z_i^{(l_{\mu})}\to z_i^{\infty},\, \mu\to \infty.
\]
Here, the points $y_i^{\infty}$ and $z_i^{\infty}$ satisfy
\[
|z_i^{\infty}-z_j^{\infty}|=|y_i^{\infty}-y_j^{\infty}|
\]
for $i\neq j$. Hence, by Theorem~\ref{t:procrustes}, there is an Euclidean motion $\Phi_0:\mathbb R^D\to \mathbb R^D$ such that $\Phi_0(y_i^{\infty})=z_i^{\infty}$. Consequently,
for $\mu$ large enough, (\ref{e:emotionsc}) holds with $l_{\mu}$. This contradicts the fact that for each $l$, there does not exist a $\Phi_0$ satisfying (\ref{e:emotionsc}) with $l$.
Thus, we have proved all the assertions of the theorem except that we can take $\Phi_0$ to be proper if $k\leq D$. To see this, suppose that $k\leq D$ and let $\Phi_0$ be an improper Euclidean motion such that
\[
|z_i-\Phi_0(y_i)|\leq \varepsilon{\rm diam}\left\{y_1,...,y_k\right\}
\]
for each $i$. Then, there exists an improper Euclidean motion $\Psi_0$ that fixes $y_1,...,y_k$ and in place of $\Phi_0$, we may use $\Psi_0 o\Phi_0$ in the conclusion of
Theorem~\ref{t:mainfd3} (part(2)). The proof of Theorem~\ref{t:mainfd3} (part(2)). is complete. $\Box$.
\begin{remark}
We recall at the begining of Chapter 3, we stated the following:
\begin{itemize}
\item[(a)] There is no such restriction for the existence of the Euclidean motion $A$ in Theorem~\ref{t:mainfd3} (part (2)). Indeed, the condition $k\leq D$ implies that $A$ can be taken as proper. We see this clearly in the proof of Theorem~\ref{t:mainfd3} (part (2)).
\item[(b)] We are going to see in the proof of Theorem~\ref{t:mainfd3} (part (1)) below that we will need to use Theorem~\ref{t:mainfd3} (part (2)) and in fact the case when the Euclidean motion $A$ is proper. Then then forces the sufficiency of the restriction $k\leq D$ for the exisence of the extension $\Phi$. As we have seen though from
Chapter 3 (the counterexample), the restriction $k\leq D$ in Theorem~\ref{t:mainfd3} (part (2)) is not only a sufficient condition.
\end{itemize}
\label{r:kd}
\end{remark}
\subsection{A special case of the proof of Theorem~\ref{t:mainfd3} (part (1)).}
We now prove a special case of Theorem~\ref{t:mainfd3} (part (1)). This is given in the following theorem.
\begin{thm}
Let $\varepsilon>0$ and let $m$ be a positive integer. Let $\lambda>0$ be less than a small enough constant depending only on $\varepsilon$, $m$ and $D$. Let $\delta>0$ be less than a small enough constant depending only on
$\lambda$, $\varepsilon$, $m$ and $D$. Then the following holds: Let $E:=y_1,...y_k$ and $E':=z_1,...z_k$ be $k\geq 1$ distinct points in $\mathbb R^D$ with $k\leq D$ and assume that $y_l=z_l$ for some fixed $1\leq j\leq k$. Assume moreover the following:
\begin{equation}
|y_i-y_j|\geq \lambda^m{\rm diam}\left\{y_1,...,y_k\right\},\, i\neq j
\label{e:exactone}
\end{equation}
and
\begin{equation}
(1+\delta)^{-1}\leq \frac{|z_i-z_j|}{|y_i-y_j|}\leq (1+\delta),\, i\neq j.
\label{e:exacttwo}
\end{equation}
Then, there exists an $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
\Phi(y_i)=z_i, 1\leq i\leq k
\label{e:exactthree}
\end{equation}
and
\begin{equation}
\Phi(x)=x \ \mbox{for} \ |x-y_1|\geq \lambda^{-1/2}{\rm diam}\left\{y_1,...,y_k\right\}.
\label{e:exactfour}
\end{equation}
\label{t:theorem3exact}
\end{thm}
\noindent
{\bf Proof} \ Without loss of generality, we may take $y_1=z_1=0$ and ${\rm diam}\left\{y_1,...,y_k\right\}=1$.
Applying Theorem~\ref{t:mainfd3} (part (2)) with $10^{-9}\varepsilon \lambda^{m+5}$ in place of $\varepsilon$, we obtain a proper Euclidean motion
\begin{equation}
A:x\to Mx+x_0
\label{e:exactfive}
\end{equation}
such that
\begin{equation}
|\Phi_0(y_i)-z_i|\leq 10^{-9}\varepsilon \lambda^{m+5}
\label{e:exactsix}
\end{equation}
for each $i$. In particular, taking $i=1$ and recalling that $y_1=z_1=0$, we find that
\begin{equation}
|x_0|\leq 10^{-9}\varepsilon \lambda^{m+5}.
\label{e:exactseven}
\end{equation}
For each $i$, we consider the balls
\begin{equation}
B_i=B(\Phi_0(y_i),\lambda^{m+3}),\, B_i^{+}=B(\Phi_0(y_i),\lambda^{m+1}).
\label{e:exacteight}
\end{equation}
Note that (\ref{e:exactone}) shows that the balls $B_i^{+}$
have pairwise disjoint closures since $\Phi_0$
is an Euclidean motion. Applying Theorem~\ref{t:mainfd6} (part (3))
we obtain for each $i$,
a $\varepsilon$-distorted diffeomorphism
$\Psi_i:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
(\Psi_i o\Phi_0)(y_i)=z_i
\label{e:exactnine}
\end{equation}
and
\begin{equation}
\Psi_i(x)=x
\label{e:exactten}
\end{equation}
outside $B_i^{+}$.
In particular, we see that
\begin{equation}
\Psi_i:B_i^+\to B_i^+
\label{e:exacteleven}
\end{equation}
is one to one and onto. We may patch the $\Psi_i$ together into a single map $\Psi:\mathbb R^D\to \mathbb R^D$ by setting
\begin{equation}
\Psi(x):=\left\{
\begin{array}{ll}
\Psi_i(x), & x\in B_i^{+} \\
x, & x\notin \cup_j B_j^{+}
\end{array}
\right\}.
\label{e:exacttwelve}
\end{equation}
Since the $B_i^{+}$ have pairwise disjoint closures (\ref{e:exactten}) and (\ref{e:exacteleven}) show that
$\Psi$ maps $\mathbb R^D$ to $\mathbb R^D$ and is one to one and onto. Moreover, since each
$\Psi_i$ is $\varepsilon$-distorted, it now follows easily that
\begin{equation}
\Psi:\mathbb R^D\to \mathbb R^D
\label{e:exactthirteen}
\end{equation}
is an $\varepsilon$-distorted diffeomorphism.
From (\ref{e:exacteight}), (\ref{e:exactnine}) and (\ref{e:exacttwelve}),
we also see that
\begin{equation}
(\Psi o\Phi_0)(y_i)=z_i, \forall i.
\label{e:exactforteen}
\end{equation}
Suppose $x\in \mathbb R^D$ with $|x|\geq 5$.
Then (\ref{e:exactfive}) and (\ref{e:exactseven}) show that
$|\Phi_0(x)|\geq 4$. On the other hand, each $y_i$ satisfies
\[
|y_i|=|y_i-y_1|\leq {\rm diam}\left\{y_1,..,y_k\right\}=1
\]
so another application of (\ref{e:exactfive}) and (\ref{e:exactseven})
yields $|\Phi_0(y_i)|\leq 2$. Hence,
$\Phi_0(x)\notin B_i^{+}$,
see (\ref{e:exacteight}). Consequently, (\ref{e:exacttwelve}) yields
\begin{equation}
(\Psi o\Phi_0)(x)=\Phi_0(x),\, |x|\geq 5.
\label{e:exactfifteen}
\end{equation}
From (\ref{e:exactthirteen}), we obtain that
\begin{equation}
\Psi o\Phi:\mathbb R^D\to \mathbb R^D
\label{e:exactsixteen}
\end{equation}
is an $\varepsilon$-distorted diffeomorphism since $\Phi_0$ is an Euclidean motion.
Next, applying Theorem~\ref{t:mainfd6} (part (2))
with $r_1=10$ and $r_2=\lambda^{-1/2}$,
we obtain an $\varepsilon$-distorted diffeomorphism
$\Psi:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
\Psi_1(x)=\Phi_0(x),\, |x|\leq 10
\label{e:exactseventeen}
\end{equation}
and
\begin{equation}
\Psi_1(x)=x,\, |x|\geq \lambda^{-1/2}.
\label{e:exacteighteen}
\end{equation}
Note that Theorem~\ref{t:mainfd6} (part (2)) applies, thanks to (\ref{e:exactseven}) and because we may assume
$\frac{\lambda^{-1/2}}{10}>\delta_{1}^{-1}$
with $\delta_{1}$ as in Theorem~\ref{t:mainfd6} (part (2)), thanks to our
small $\lambda$ condition.
We now define
\begin{eqnarray}
\tilde{\Psi}(x):=
\left\{
\begin{array}{ll}
(\Psi o\Phi_0)(x), & |x|\leq 10 \\
\Psi_1(x), & |x|\geq 5.
\end{array}
\right\}.
\label{e:exactnineteen}
\end{eqnarray}
In the overlap region $5\leq |x|\leq 10$,
(\ref{e:exactfifteen}) and (\ref{e:exactseventeen}) show that
$(\Psi o\Phi_0)(x)=\Phi_0(x)=\Psi_1(x)$
so (\ref{e:exactnineteen}) makes sense.
We now check that $\tilde{\Psi}:\mathbb R^D\to \mathbb R^D$
is one to one and onto. To do so, we introduce the sphere
$S:=\left\{x:\, |x|=7\right\}\subset \mathbb R^D$ and partition $\mathbb R^D$ into $S$, inside($S$) and outside($S$).
Since $\Psi_1:\mathbb R^D\to \mathbb R^D$ is one to one and onto, (\ref{e:exactseventeen}) shows that the map
\begin{equation}
\Psi_1: {\rm outside}\, (S)\to {\rm outside}\, (\Phi_0(S))
\label{e:exacttwenty}
\end{equation}
is one to one and onto. Also, since $\Psi o\Phi_0:\mathbb R^D\to \mathbb R^D$ is one to one and onto, (\ref{e:exactfifteen}) shows that the map
\begin{equation}
\Psi o \Phi_0: {\rm inside}\,
(S)\to {\rm inside}\, (\Phi_0(S))
\label{e:exacttwentyone}
\end{equation}
is one to one and onto. In addition,
(\ref{e:exactfifteen}) shows that the map
\begin{equation}
\Psi o\Phi_0: (S)\to (\Phi_0(S))
\label{e:exacttwentytwo}
\end{equation}
is one to one and onto. Comparing (\ref{e:exactnineteen}) with (\ref{e:exacttwenty}), (\ref{e:exacttwentyone}) and
(\ref{e:exacttwentytwo}), we see that
$\tilde{\Psi}:\mathbb R^D\to \mathbb R^D$
is one to one and onto. Now since, also $\Psi o\Phi_0$ and $\Psi_1$ are
$\varepsilon$-distorted, it follows at once from (\ref{e:exactnineteen})
that $\tilde{\Psi}$ is smooth and
\[
(1+\varepsilon)^{-1}I\leq
(\tilde{\Psi'}(x))^{T}\tilde{\Psi'}(x)
\leq (1+\varepsilon)I,\, x\in \mathbb R^D.
\]
Thus,
\begin{equation}
\tilde{\Psi}:\mathbb R^{D}\to \mathbb R^{D}
\label{e:exacttwentythree}
\end{equation}
is an $\varepsilon$-distorted diffeomorphism.
From (\ref{e:exacteighteen}), (\ref{e:exactnineteen}),
we see that $\tilde{\Psi}(x)=x$
for $|x|\geq \lambda^{-1/2}$.
From ({\ref{e:exactforteen}), (\ref{e:exactnineteen}),
we have $\tilde{\Psi}(y_i)=z_i$ for each $i$, since, as we recall,
\[
|y_i|=|y_i-y_1|\leq {\rm diam}\left\{y_1,...,y_k\right\}=1.
\]
Thus, $\tilde{\Psi}$ satisfies
all the assertions in the statement of the
Theorem and the proof of the Theorem is complete.
$\Box$
\subsection{The remaining proof of Theorem~\ref{t:mainfd3} (part (1)).}
Theorem~\ref{t:mainfd3} (part (1)) will now follow from the theorem below.
\begin{thm}
Given $\varepsilon>0$, there exist $\lambda,\delta>0$ depending on $\varepsilon$ such that the following holds. Let $E:=\left\{y_1,...,y_k\right\}$
and $E':=\left\{z_1,...,z_k\right\}$ be $k\geq 1$ distinct points of $\mathbb R^D$ with $1\leq k\leq D$ and $y_1=z_1$.
Suppose
\begin{equation}
(1+\delta)^{-1}\leq\frac{|z_i-z_j|}{|y_i-y_j|}\leq (1+\delta),\, i\neq j.
\label{e:lemmasixone}
\end{equation}
Then, there exists an $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
\Phi(y_i)=z_i
\label{e:lemmasixtwo}
\end{equation}
for each $i$ and
\begin{equation}
\Phi(x)=x
\label{e:lemmasixthree}
\end{equation}
for
\[|x-y_1|\geq \lambda^{-1}{\rm diam}\left\{y_1,...,y_k\right\}.\]
\label{l:lemmasix}
\end{thm}
\medskip
\noindent
{\bf Proof} \ We use induction on $k$. For the case $k=1$, we can take
$\Phi$ to be the identity map. For the induction step, we fix $k\geq 2$ and suppose we already know the Theorem holds when $k$ is replaced by $k'<k$. We will prove the Theorem holds for the given $k$.
Let $\varepsilon>0$ be given. We pick small positive numbers $\delta'$, $\lambda_{1}$, $\delta$ as follows.
\begin{itemize}
\item[(a)] $\delta'$ is less than a small enough constant determined by $\varepsilon, D$.
\item[(b)] $\lambda_{1}$ is less than a small enough constant determined by $\delta', D, \varepsilon$.
\item[(c)] $\delta$ is less than a small enough constant determined by $\lambda_{1}, \delta', D, \varepsilon$.
\end{itemize}
Now let $y_1,...,y_k,z_1,...,z_k\in \mathbb R^D$ satisfy (\ref{e:lemmasixone}). We must produce an $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to\mathbb R^D$ satisfying
(\ref{e:lemmasixtwo}) and (\ref{e:lemmasixthree}) for some $\lambda$ depending only on
$\delta,\lambda_{1},\delta',\varepsilon, D$. That will complete the proof of the Theorem.
We apply Theorem~\ref{t:Lemmathree} to $E=\left\{y_1,...,y_k\right\}$ with $\lambda_1$ in place of
$\lambda$. Thus, we obtain an integer $l$ and a partition of $E$ into subsets
$E_1,E_2,...,E_{\mu_{\rm max}}$ with the following properties:
\begin{equation}
10\leq l\leq 100+\binom{k}{2}.
\label{e:Lemmasixseven}
\end{equation}
\begin{equation}
{\rm diam}(E_{\mu})\leq \lambda_{1}^l{\rm diam}(E)
\label{e:lemmasixeight}
\end{equation}
for each $\mu$.
\begin{equation}
{\rm dist}(E_{\mu},E_{\mu'})\geq \lambda_{1}^{l-1}{\rm diam}(E)
\label{e:lemmasixnine}
\end{equation}
for $\mu\neq \mu'$. Note that
\begin{equation}
{\rm card}(E_{\mu})<{\rm card}(E)=k
\label{e:lemmasixten}
\end{equation}
for each $\mu$ thanks to (\ref{e:lemmasixeight}). For each $\mu$, let
\begin{equation}
I_{\mu}:=\left\{i:\, y_i\in E_{\mu}\right\}.
\label{e:lemmasixeleven}
\end{equation}
For each $\mu$, we pick a ``representative'' $i_{\mu}\in I_{\mu}$. The
$I_1,...,I_{\mu_{\rm max}}$ form a partition of $\left\{1,...,k\right\}$. Without loss of generality, we may suppose
\begin{equation}\label{eq lemmasixtwelve}
i_1=1.
\end{equation}
Define
\begin{eqnarray}\label{eq lemmasixthirteen}
&& I_{\rm rep}:=\left\{i_{\mu}:\mu=1,...,\mu_{\rm max}\right\} \\
&& E_{\rm rep}:=\left\{y_{i_{\mu}}:\, \mu=1,...,\mu_{\rm max}\right\}.
\end{eqnarray}
From (\ref{e:lemmasixeight}), (\ref{e:lemmasixnine}), we obtain
\[
(1-2\lambda_1^l){\rm diam}(E)\leq {\rm diam}(E_{\rm rep})\leq {\rm diam}(E),
\]
and
\[
|x'-x''|\geq \lambda_1^{l-1}{\rm diam}(E)
\]
for $x,x'\in S_{\rm rep}$, $x'\neq x''$.
Hence,
\begin{equation}
(1/2){\rm diam}(E)\leq {\rm diam}(E_{\rm rep})\leq {\rm diam}(E)
\label{e:lemmasixforteen}
\end{equation}
and
\begin{equation}
|x'-x''|\geq \lambda_1^m{\rm diam}(E_{\rm rep})
\label{e:lemmasixfifteen}
\end{equation}
for $x',x''\in E_{\rm rep},\, x'\neq x''$ where
\begin{equation}
m=100+\binom{D}{2}.
\label{e:lemmasixsixteen}
\end{equation}
See (\ref{e:Lemmasixseven}) and recall that $k\leq D$.
We now apply Theorem~\ref{t:theorem3exact}
to the points $y_i,\,i\in I_{\rm rep}$, $z_i,\,i\in I_{\rm rep}$ with $\varepsilon$ in Theorem~\ref{t:theorem3exact} replaced by our present $\delta'$. The hypothesis of Theorem~\ref{t:theorem3exact} holds, thanks to the smallness assumptions on $\lambda_1$ and $\delta$. See also
(\ref{e:lemmasixsixteen}), together with our present hypothesis (\ref{e:lemmasixone}).
Note also that $1\in I_{\rm rep}$ and $y_1=z_1$.
Thus we obtain a $\delta'$-distorted diffeomorphism $\Phi_0:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
\Phi_0(y_i)=z_i,\, i\in I_{\rm rep}
\label{e:lemmasixseventeen}
\end{equation}
and
\begin{equation}
\Phi_0(x)=x \ \mbox{for} \ |x-y_1|\geq \lambda_{1}^{-1/2}{\rm diam}\left\{y_1,...,y_k\right\}.
\label{e:lemmasixeighteen}
\end{equation}
Define
\begin{equation}
y_i'=\Phi_0(y_i),\, i=1,...,k.
\label{e:lemmasixnineteen}
\end{equation}
Thus,
\begin{equation}
y_{i_{\mu}}'=z_{i_{\mu}}
\label{e:lemmasixtwenty}
\end{equation}
for each $\mu$ and
\begin{equation}
(1+C\delta')^{-1}\leq \frac{|z_i-z_j|}{|y_i'-y_j'|}\leq (1+C\delta'),\, i\neq j
\label{e:lemmasixtwentyone}
\end{equation}
thanks to (\ref{e:lemmasixone}), the definition of $\delta$, (\ref{e:lemmasixnineteen})
and the fact that $\Phi_0:\mathbb R^D\to \mathbb R^D$ is a $\delta'$-distorted diffeomorphism.
Now fix $\mu (1\leq \mu\leq \mu_{{\rm max}})$.
We now apply our inductive hypothesis with $k'<k$ to the points $y_i',z_i,\, i\in I_{\mu}$. (Note that the inductive
hypothesis applies, thanks to (\ref{e:lemmasixten})).
Thus, there exists
\begin{equation}
\lambda_{\rm indhyp}(D, \varepsilon)>0,\, \delta_{\rm indhyp}(D, \varepsilon)>0
\label{e:lemmasixtwentytwo}
\end{equation}
such that the following holds: Suppose
\begin{equation}
(1+\delta_{\rm indhyp})^{-1}|y_i'-y_j'|\leq |z_i-z_j|\leq |y_i'-y_j'|(1+\delta_{\rm indhyp}),\, i,j\in I_{\mu}
\label{e:lemmasixtwentythree}
\end{equation}
and
\begin{equation}
y_{i_{\mu}}'=z_{i_{\mu}}.
\label{e:lemmasixtwentyfour}
\end{equation}
Then there exists a $\varepsilon$ distorted diffeomorphism $\Psi_{\mu}:\mathbb R^D\to \mathbb R^D$ such that
\begin{equation}
\Psi_{\mu}(y_i')=z_i,\, i\in I_{\mu}
\label{e:lemmasixtwentyfive}
\end{equation}
and
\begin{equation}
\Psi_{\mu}(x)=x,\ \mbox{for} \ |x-y_{i_{\mu}}'|\geq \lambda_{\rm indhyp}^{-1}{\rm diam}(S_{\mu}).
\label{e:lemmasixtwentysix}
\end{equation}
We may suppose $C\delta'<\delta_{\rm indhyp}$
with $C$ as in (\ref{e:lemmasixtwentyone}),
thanks to (\ref{e:lemmasixtwentytwo}) and our smallness assumption on $\delta'$.
Similarly, we may suppose that $\lambda_{\rm indhyp}^{-1}<1/2\lambda_{1}^{-1/2}$,
thanks to (\ref{e:lemmasixtwentytwo}) and our smallness assumption on $\lambda_1$. Thus (\ref{e:lemmasixtwentythree}) and (\ref{e:lemmasixtwentyfour}) hold, by virtue of (\ref{e:lemmasixtwentyone}) and (\ref{e:lemmasixtwenty}). Hence, for each $\mu$, we obtain an $\varepsilon$-distorted diffeomorphism $\Psi_{\mu}:\mathbb R^{D}\to \mathbb R^{D}$, satisfying
(\ref{e:lemmasixtwentyfive}) and (\ref{e:lemmasixtwentysix}). In particular,
(\ref{e:lemmasixtwentysix}) yields
\begin{equation}
\Psi_{\mu}(x)=x,\ \mbox{for} \ |x-y_{i_{\mu}}'|\geq 1/2\lambda_{1}^{-1/2}{\rm diam}(E_{\mu}).
\label{e:lemmasixtwentyseven}
\end{equation}
Taking
\begin{equation}
B_{\mu}=B(y_{i_{\mu}}^\prime, 1/2\lambda_{1}^{-1/2}{\rm diam}(E_{\mu}) ),
\label{e:lemmasixtwentyeight}
\end{equation}
we see from (\ref{e:lemmasixtwentyseven}), that
\begin{equation}
\Psi_{\mu}:B_{\mu}\to B_{\mu}
\label{e:lemmasixtwentynine}
\end{equation}
is one to one and onto since $\Psi_{\mu}$ is one to one and onto.
Next, we note that the balls $B_{\mu}$ are pairwise disjoint.* (Note that the closed ball $B_{\mu}$
is a single point if $E_{\mu}$ is a single point.) This follows from (\ref{e:lemmasixeight}), (\ref {e:lemmasixnine}) and the definition (\ref{e:lemmasixtwentyeight}).
We may therefore define a map $\Psi:\mathbb R^D\to \mathbb R^D$ by setting
\begin{equation}
\Psi(x):=\left\{
\begin{array}{ll}
\Psi_{\mu}(x), & x\in B_{\mu}\, , \ {\rm any} \ \mu \\
x, & x\notin \cup_{\mu} B_{\mu}
\end{array}
\right\}.
\label{e:lemmasixthirty}
\end{equation}
Thanks to (\ref{e:lemmasixtwentynine}), we see that $\Psi$ maps $\mathbb R^D$ to $\mathbb R^D$
one to one and onto. Moreover, since each $\Psi_{\mu}$ is an $\varepsilon$-distorted diffeomorphism
satisfying (\ref{e:lemmasixtwentyseven}), we see that $\Psi$ is smooth on $\mathbb R^D$ and that
\[
(1+\varepsilon)^{-1}I\leq (\Psi'(x))^{T}\Psi'(x)\leq (1+\varepsilon)I,\, x\in \mathbb R^D.
\]
Thus,
\begin{equation}
\Psi:\mathbb R^D\to \mathbb R^D
\label{e:lemmasixthirtyone}
\end{equation}
is an
$\varepsilon$-distorted diffeomorphism. From (\ref{e:lemmasixtwentyfive}) and
(\ref{e:lemmasixthirty}), we see that
\begin{equation}
\Psi(y_i')=z_i,\, i=1,...,k.
\label{e:lemmasixthirtytwo}
\end{equation}
Let us define
\begin{equation}
\Phi=\Psi o\Phi_0.
\label{e:lemmasixthirtythree}
\end{equation}
Thus
\begin{equation}
\Phi \,
\mbox{is a} \ C \varepsilon \ \mbox{-distorted diffeomorphism of} \
\mathbb R^D\to \mathbb R^D
\label{e:lemmasixthirtyfour}
\end{equation}
since $\Psi,\Phi_0:\mathbb R^D\to \mathbb R^D$ are
$\varepsilon$ distorted diffeomorphisms.
Also
\begin{equation}
\Phi(y_i)=z_i,\, i=1,...,k
\label{e:lemmasixthirtyfive}
\end{equation}
as we see from (\ref{e:lemmasixnineteen}) and (\ref{e:lemmasixthirtytwo}). Now suppose that
\[
|x-y_1|\geq \lambda_{1}^{-1}{\rm diam}\left\{y_1,...,y_k\right\}.
\]
Since $\Phi_0:\mathbb R^D\to \mathbb R^D$ is a $\varepsilon$-distorted diffeomorphism, we have
\begin{equation}
\left|\Phi_0(x)-y_1'\right|\geq (1+\varepsilon)^{-1}\lambda_{1}^{-1}{\rm diam}\left\{y_1,...,y_k\right\}
\label{e:lemmasixthirtysix}
\end{equation}
and
\[
{\rm diam}\left\{y_1',...,y_k'\right\}\leq (1+\varepsilon){\rm diam}\left\{y_1,...,y_k\right\}.
\]
See (\ref{e:lemmasixnineteen}).
Hence for each $\mu$,
\begin{eqnarray*}
&& \left|\Phi_0(x)-y_{i_{\mu}}'\right|\geq \left[(1+\varepsilon)^{-1}\lambda_{1}^{-1}-(1+\varepsilon)
\right]{\rm diam}\left\{y_1,...,y_k\right\} \\
&& >1/2\lambda_{1}^{-1/2}{\rm diam}(E_{\mu}).
\end{eqnarray*}
Thus, $\Phi_0(x)\notin \cup_{\mu}B_{\mu}$, see (\ref{e:lemmasixtwentyeight}), and therefore
$\Psi o\Phi_{0}(x)=\Phi_{0}(x)$, see (\ref{e:lemmasixthirty}). Thus,
\begin{equation}
\Phi(x)=\Phi_0(x).
\label{e:lemmasixthirtyseven}
\end{equation}
From (\ref{e:lemmasixeighteen}) and
(\ref{e:lemmasixthirtyseven}), we see that $\Phi(x)=x$.
Thus, we have shown that
\[
|x-y_1|\geq \lambda_{1}^{-1}{\rm diam}\left\{y_1,...,y_k\right\}
\]
implies $\Phi(x)=x$. That is,
(\ref{e:lemmasixthree}) holds with $\lambda=\lambda_{1}$. Since
also (\ref{e:lemmasixthirtyfour}) and (\ref{e:lemmasixthirtyfive}) hold we have carried out
our inductive step and hence, the proof of the Theorem $\Box$.
\section{Chapter 7: Tensors, hyperplanes, near reflections, constants ($\eta, \tau, K$).}
\setcounter{equation}{0}
In Chapter 3, we presented a counterexample showing that with $k:={\rm Card}(E)$,
the case $k>D$ in Theorem~\ref{t:mainfd1} (part(1)) provides a barrier to the existence of the extension $\Phi$ there.
In moving forward, we now wish to study geometries on the finite set $E$ which remove such a barrier. Indeed, we have already
made an optimistic guess for the following geometry on the set $E$. Roughly, put: (a) ${\rm card}(E)$ is not too large. (b) The diameter of the set $E$ is not too large. (c) The points of the set $E$ cannot be too close to each other. (d) The points of the set $E$ are close to a hyperplane in $\mathbb R^D$. In this chapter, we will make (a-d) precise.
We mention that as in the role played by Theorem~\ref{t:mainfd1} (part(2)) in the proof of Theorem~\ref{t:mainfd1} (part(1)), we are going to, in this chapter, establish a variant of Theorem~\ref{t:mainfd1} (part(2)) which will involve what we call "near reflections".
\subsection{Hyperplane; we meet the positive constant $\eta$.}
In this section, we will make mathematically precise
what we mean by a finite set say $S$ lying close to a hyperplane
in $\mathbb R^D$. For this we will use a special constant $\eta$.
\begin{dfn}
For a set of $l+1$ points in $\mathbb R^{D}$, with $l\leq D$, say $z_{0},…,z_{l}$ we define
$V_{l}(z_{0},..., z_{l}):={\rm vol}_{l\leq D}({\rm simplex}_{l})$ where ${\rm simplex}_{l}$ is the $l$-simplex with vertices at the points $z_{0},...,z_{l}$.
Thus $V_{l}(z_{0},..., z_{l})$ is the $l\leq D$-dimensional volume of the $l$-simplex with vertices at the points $z_{0},...,z_{l}$.
For a finite set $S\subset \mathbb R^{D}$, we write $V_{l}(S)$ as the maximum of $V_{l}(z_0,...,z_l)$ over all
points $z_{0},z_{1},...,z_{l}$ in $S$. If $V_{D}(S)$ is small enough, then we expect that $S$ will be close to a hyperplane in $\mathbb R^{D}$. We meet the constant $0<\eta<1$, which we will use primarily for an upper bound for $V_{D}(E)$.
\label{d:VD}
\end{dfn}
\subsection{"Well separated"; we meet the positive constant $\tau$. }
It is going to be important that the points of the set $E$ are not too close to each other. We will assume they are "well separated". We meet the constant $0<\tau<1$ which we primarily use as a lower bound for the distance $|x-y|,\, x,y\in E$.
\subsection{Upper bound for ${\rm card}(E)$; we meet the positive constant $K$.}
At the same time we fix the dimension $D$, we are going to fix the constant $K$ which will bound ${\rm card}(E)$ from above.
To bound ${\rm diam}(E)$ from above, we will use various absolute constants which will vary from time to time.
Our variant of Theorem~\ref{t:mainfd1} (part (2)) is the following:
\subsection{Theorem~\ref{t:mainfd4}.}
\begin{thm}
\begin{itemize}
\item[(1)] Choose $\varepsilon>0$.
Then there exists $\delta$ depending on $\varepsilon$ small enough such that the following holds. Let $E\subset \mathbb R^{D}$ be a collection of distinct $k\geq 1$ points $E:=\left\{y_{1},...,y_{k}\right\}$. Suppose we are given a map
$\phi: E\to \mathbb R^{D}$ with (\ref{e:emotionssa}) holding. Then, there exists a Euclidean motion $A$ with (\ref{e:emotionssaa}) holding.
If $k\leq D$, then $A$ can be taken as proper.
\item[(2)] Let $0<\eta<1$ and $E\subset \mathbb R^{D}$ a finite set with ${\rm diam}(E)=1$. ($\eta$ recall depends on $D, E$). Assume that $V_{D}(E)\leq \eta^D$. Then, there exists a improper Euclidean motion $A$ and constant $c>0$ such that
\begin{equation}
|A(x)-x|\leq c\eta,\, x\in E.
\label{e:mainfd4a}
\end{equation}
\end{itemize}
\label{t:mainfd4}
\end{thm}
Theorem~\ref{t:mainfd4} (part (1)) is just Theorem~\ref{t:mainfd1} (part(2)) so we will only focus on Theorem~\ref{t:mainfd4} part (2)). We need to introduce a near reflection.
\subsection{Near reflections.}
Suppose that $X$ is a finite subset of a affine hyperplane $X'' \subset \mathbb R^{D}$ with not too large diameter. Thus $X''$ has dimension $D-1$. Let $A_{1}$ denote reflection through $X''$. Then
$A_{1}$ is an improper Euclidean motion and $A_{1}(x)=x$ for each $x\in X$.
For easy understanding: Suppose $D=2$ and $X''$ is a line with the set $X$ on the line. Let $A_{1}$ denote reflection of the lower half plane to the upper half plane through $X$. Then $A_{1}$ is a Euclidean motion and fixes points on $X$ because it is an isometry. Now Theorem~\ref{t:mainfd4} (part(2)) constructs an improper Euclidean motion $A(x)$ close to $x$ on the set $E$ where the set $E$ has not too large diameter and is close enough to a hyperplane. $A$ is called a near reflection.
\subsection{Tensors, wedge product and tensor product.}
For the proof of Theorem~\ref{t:mainfd4}(Part (2)), we need to recall some facts about tensors in $\mathbb R^{D}$, wedge product and tensor product. We take $D\geq 1$.
We recall that $\mathbb R^{D}\otimes \mathbb R^{D'}$ is a subspace of $\mathbb R^{DD'}$ of dimension $DD'$. Here, if $e_1,...,e_D$ and $f_{1},...,f_{D'}$ are the standard
basis vectors of $\mathbb R^{D}$ and $\mathbb R^{D'}$ respectively, then if $x=(x_{1},...,x_{D})\in \mathbb R^{D}, \, x_i\in \mathbb R$ and
$y=(y_{1},...,y_D')\in \mathbb R^{D'},\, y_{i}\in \mathbb R$, $x\otimes y$ is a vector in $\mathbb R^{DD'}$ spanned by the basis vectors $e_i\otimes f_j$ with coefficients $x_iy_{j}$.
For example if $D=2, D'=3$, then $x\otimes y$ is the vector in $\mathbb R^6$ with 6 components $(x_{1}y_{1}, x_{1}y_{2}, x_{1}y_{3}, y_{2}x_{1}, y_{2}x_{2}, y_{2}x_3).$
The wedge product of $x,y$, $x\wedge y$ is the antisymmetric tensor product $x\otimes y-y\otimes x$. A tensor in $\mathbb R^{D}$ consists of components and also basis vectors associated to each component. The number of components of a tensor in $\mathbb R^{D}$ need not be $D$.
The rank of a tensor in $\mathbb R^{D}$ is the minimum number of basis vectors in $\mathbb R^{D}$ associated to each component of the tensor. ($\mathbb R^{D}$ is realized as the set of all vectors $(p_{1}...,p_{n})$ where each
$p_i\in \mathbb R,\, 1\leq i\leq n$ are rank-1 tensors
given each corresponding component $p_i$ has 1 basis corresponding vector $e_i$ associated to it). A rank-l tensor in $\mathbb R^{D}$ has associated to each of its components $l$ basis vectors out of $e_1,e_2,e_3,...,e_D$. Real numbers are 0-rank tensors.
Let now $v_1, ...,v_l\in \mathbb R^{D}$. Writing
$v_1=M_{11}e_1+...+M_{l1}e_l,v_2=M_{12}e_1+...+M_{l2}, ..,v_l=M_{1l}e_1+...+M_{ll}e_l$ the following holds:
\begin{itemize}
\item $v_1\wedge...\wedge v_l=({\rm det}M)e_1\wedge e_2...\wedge e_l$ where $M$ is the matrix
\[
\left(
\begin{array}{llll}
M_{11} & M_{12} &...& M_{1l} \\
M_{21} & M_{22} &...& M_{2l} \\
.& .& . & . \\
M_{l1}& M_{l2} & ... & M_{ll}
\end{array}
\right).
\]
\item $|v_1\wedge v_2...\wedge v_l|^2={\rm det}(M_{1})={\rm vol}_l(v_1,v_2,...,v_l)$.
Here, $M_{1}$ is the matrix
\[
\left(
\begin{array}{llll}
v_1.v_1 & v_1.v_2 &...& v_1.v_l \\
v_2.v_1& v_2.v_2 &...& v_2.v_l \\
.& .& . & . \\
v_l.v_1& v_l.v_2 & ... & v_l.v_l
\end{array}
\right)
\]
and \[
{\rm vol}_l(v_1,v_2,...,v_l)=\left\{\sum_{i=1}^{l}c_{i}v_{i}:\, 0\leq c_i\leq 1,\, c_i\in \mathbb R\right\}
\]
is the l-volume of the parallelepiped determined by $v_1,...,v_l$. $|\cdot|$ is understood here as the rotationally invariant norm on alternating tensors of any rank.
\end{itemize}
We now prove Theorem~\ref{t:mainfd4} (part(2)).
{\bf Proof:}\, We are going to use tensors and the quantity $V_{D}(E)$ defined in Definition~\ref{d:VD}.
We have $V_1(E)=1$ and $V_{D}(E)\leq \eta^D$. Hence, there exists $l$ with $2\leq l\leq D$ such that
$V_{l-1} (E)>\eta^{l-1}$ but $V_{l}(E)\leq \eta^l$. Fix such a $l$. Then there exists a $(l-1)$ simplex with vertices
$z_0,...,z_{l-1}\in E$ and with $(l-1)$-dimensional volume $>\eta^{l-1}$. Fix $z_0,...,z_{l-1}$. Without loss of generality, we may suppose $z_0=0$. Then
\[
|z_{1}\wedge,...,\wedge z_{l-1}|>c\eta^{l-1}.
\]
yet
\[
|z_{1}\wedge,...,\wedge z_{l-1}\wedge x|\leq c'\eta^{l},\, x\in E.
\]
Now,
\[
|z_{1}\wedge,...,\wedge z_{l-1}\wedge x|=|f(x)||z_{1}\wedge...\wedge z_{l-1}|,\, x\in E
\]
where $f$ denotes the orthogonal projection from $\mathbb R^{D}$ onto the space of vectors orthogonal to $z_{1},...,z_{l-1}$. Consequently, we have for $x\in E$,
\[
c'\eta^l\geq |z_{1}\wedge,...,\wedge z_{l-1}\wedge x|=|f(x)||z_{1}\wedge,...,\wedge z_{l-1}|\geq c\eta^{l-1}|f(x)|.
\]
We deduce that we have $|f(x)|\leq c'\eta$ for any $x\in E$. Equivalently, we have shown that every $x\in E$ lies within a distance $c'\eta$ from ${\rm span}\left\{z_{1},...,z_{l-1}\right\}$.
This span has dimension $l-1\leq D-1$. Letting $H$ be the hyperplane containing that span and letting $A$ denote the reflection through $H$, we see that
${\rm dist}(x,H)\leq c'\eta,\, x\in E.$
Hence,
\[
|A(x)-x|\leq c'\eta,\, x\in E.
\]
Since $A$ is an improper Euclidean motion, the proof is complete. $\Box$.
\section{Chapter 8: Quantification: ($\varepsilon$, $\delta$)-Theorem~\ref{t:mainfd1} (part (2)).}
\setcounter{equation}{0}
In this chapter, we are now going to formulate and prove a variant of Theorem~\ref{t:mainfd1} ((part (2)), namely Theorem~\ref{t:mainfd2} where we are able to now give quantifications of relations
between $\varepsilon$ and $\delta$ in Theorem~\ref{t:mainfd1} ((part (2)).
Theorem~\ref{t:mainfd2} consists of two parts. (Part (1)) deals with the case when we force the distinct points $E:=\left\{y_{1},...,y_{k}\right\}$ and $\phi(E):=\left\{z_{1},...,z_{k}\right\}$
for some suitable $\phi:E\to \mathbb R^D$, to have almost equal pairwise distances and to lie on a certain ellipse.
Then we can take $\delta=c\varepsilon^{c'}$, $c,c'$ small enough depending on $D$ only. In (part (2)), we fix the constant $K$ given by Section (7.3) at the same time as we fix $D$.
We then force the points $E$ and $\phi(E)$ not to be too close to each other. This effect is controlled by the constant $\tau$ given in Section (7.2). We require that
the points $E$ and $\phi(E)$ to have not too large diameter and
with $k:={\rm card}(E)$ having upper bound the constant $K$. Then we can take $\delta=c''_{K}\varepsilon^{c'''_{K}}$ for some $c''_{K},c'''_{K}$ small enough. Here $c''_{K},c'''_{K}$ depend on both $D$ and $K$.
Here, is our result:
\begin{thm}
The following holds:
\begin{itemize}
\item[(1)] Let $\delta$ be small enough depending on $D$. There exist $c,c'$ small enough depending on $D$ such the following holds. Let $E$ and $\phi(E)$ satisfy
\begin{equation}
\sum_{i\neq j}|y_{i}-y_{j}|^2+\sum_{i\neq j}|z_i-z_j|^2=1,\quad y_{1}=z_{1}=0
\label{e:fourpoints}
\end{equation}
and with ${\rm diam}\left\{y_1, ..., y_k\right\}=1,\, 1\leq i\leq k.$
Suppose that
\begin{equation}
||z_{i}-z_j|-|y_{i}-y_{j}||<\delta, \, 1\leq i,j\leq k.
\label{e:fourpointssa}
\end{equation}
Then, there exists a Euclidean motion $A$ such that for $1\leq i\leq k$
\begin{equation}
|z_i-A(y_i)|\leq c\delta^{c'}.
\label{e:emotionsu}
\end{equation}
\item[(2)] Let $0<\tau<1$. There exist $c''_K$ and $c'''_K$ small enough depending on $D$ and $K$ so that the following holds.
\item[(a)] Given $E$:
\item[(b)] Suppose that ${\rm diam}(E)\leq 1$,\, ${\rm card}(E)\leq K$, \, $|x-y|\geq \tau$ for any $x,y\in E$ distinct.
\item[(c)] Let $\delta\leq c''_K\tau^{c'''_K}$ small enough.
\item[(d)] Let $\phi:E\to \mathbb R^{D}$ with $\phi$ satisfying (\ref{e:emotionssa}).
Then there a Euclidean motion $A$ with
\[
|\phi(x)-A(x)|\leq c''_{K}\delta^{c'''_K},\, x\in E.
\]
\end{itemize}
\label{t:mainfd2}
\end{thm}
\subsection{Min-max optimization and algebraic geometry.}
Various problems in approximation theory related to smooth varieties have become increasingly popular for various broad interdisciplinary problems
for example, molecule reconstruction and cell morphing, vision and shape space. More specifically let us mention the following. Let $|\cdot|$ be a norm on $\mathbb R^D$. We let $V$ be a smooth variety in $\mathbb R^{D}$.
A min-max approximation to $V$ from a point $x\in \mathbb R^{D}$ when it exists is
${\rm Inf}_{v \in V}|(x,v)|$. An example of existence and uniqueness of min-max approximants to $V$ is the following.
min-max approximants to $V$ from $\mathbb R^{D}$ are
unique up to points where $|\cdot|$ is not differentiable and in the latter case the set of points where one does not have uniqueness are nowhere dense in $\mathbb R^{D}$ and lie on some hypersurface in $\mathbb R^{D}$. For $|\cdot|$, the Euclidean norm on $\mathbb R^D$, min-max approximants exist to $V$ from $\mathbb R^{D}$ and are essentially unique if $V$ is
smooth enough.
It turns out that the proof of Theorem~\ref{t:mainfd4} takes us into an interesting world of algebraic geometry and approximation alongs these lines.
For example, as we will see, the proof of Theorem~\ref{t:mainfd2} is going to use an interesting approximation result, the Lojasiewicz inequality in algebraic geometry.
The Lojasiewicz inequality, \cite{SJS}, gives an upper bound estimate for the distance between a point in $\mathbb R^{D}$ to the zero set (if non empty) of a given real analytic map.
Specifically, let $f:U\to \mathbb R$ be a real analytic map on an open set $U$ in $\mathbb R^{D}$. Let $X'$ be the zero locus of $f$. Assume that $X'$ is not empty. Let $X\subset U$ be a compact set. Let $x$ in $X$.
Then there exist constants $c,c_1$ depending on $D$ with
\begin{equation}
dist(x, X')^{c_{1}}\leq c|f(x)|.
\label{e:L}
\end{equation}
An important point regarding Theorem~\ref{t:mainfd2} (part (1)) is that (9.1)
forces the points $\left\{y_{1},...,y_{k}\right\}$ and $\left\{z_{1},...,z_{k}\right\}$ to live on a ellipse. This is useful. The primary reason being that suddenly, we have convexity. A convex set is up to a certain equivalence an ellipse. Min-max approximation and convexity "like each other". This fact allows Lojasiewicz to be used in a clever way which gives Theorem~\ref{t:mainfd2} (part (1)) as we show.
Geometrically, Theorem~\ref{t:mainfd2} (parts (2(a-d)) provide a geometry on the set $E$ so that again allow Lojasiewicz to be used to obtain similarly Theorem~\ref{t:mainfd2} (part (2)).
{\bf Proof of Theorem~\ref{t:mainfd2}} (part (1). Let us suppose we can find points $y'_{1},...,y'_{k}$ distinct and $z'_{1},...,z'_{k}$ distinct both in $\mathbb R^D$
satisfying the following.
\begin{itemize}
\item[(1)] $|y_{i}-y'_{j}|\leq c\varepsilon^{c_{1}}$, for $1\leq i,j\leq k$.
\item[(2)] $|z_{i}-z'_{j}|\leq c_{2}\varepsilon^{c_{3}}$, for $1\leq i,j\leq k$.
\item[(3)] $|y'_{i}-y'_{j}|=|z'_{i}-z'_{j}|$ for $1\leq i,j\leq k$.
\item[(4)] Here, the constants $c, c_{i}$ and $\varepsilon$ are small enough, $i=1,2,3$.
\item[(5)] By (3) using Theorem~\ref{t:procrustes}, we may choose a Euclidean motion $A$ so that $A(y'_{i})= z'_{i}$ for each $1\leq i\leq k$ and we then write
\[
|A(y_{i})-z_{i}|=|A(y_{i})-A(y'_{i})+A(y'_{i})-z_{i}+z'_{i}-z'_{i}|.
\]
\end{itemize}
Since $A$ is an isometry, $|A(y_{i})-A(y'_{i})|= |y_{i}-y'_{i}|$. So this implies that $|A(y_{i})-z_{i}|$ is bounded above by $2\left(|y_{i}-y'_{j}|+|z_{i}-z'_{j}|\right)$ and (1-2) give the result.
So, we need to construct the approximation points $y'_{1},...,y'_{k}$ and $z'_{1},...,z'_{k}$. This follows easily from (9.1), (9.2) and Lojasiewicz. Here in particular, (9.1) is used to construct the needed map $f$.
The proof of Theorem~\ref{t:mainfd2} (part (2)) follows by the same argument as Theorem~\ref{t:mainfd2} (part (1)). All that is needed is to observe that under the given conditions on the set $E$,
Lojasiewicz may be applied exactly as in Theorem~\ref{t:mainfd2} (part (1)).
\subsection{Min-max optimization and convexity.}
We have spent some time discussing min-max optimization and convexity. Here we study:
\[ \displaystyle\inf_{f_{1}\in {\cal F}} \displaystyle\max_{x\in X}|f(x)-f_{1}(x)|.
\]
$X \subset \mathbb R^D$ is a certain compact set and $f:X\to \mathbb R$ is defined globally and is a continuous map. The approximation of $f$ is via a family ${\cal F}$ of continuous maps
$f_{1}:X\to \mathbb R$. See also \cite{W6}.
\begin{thm}
Given a continuous map $f$ on a certain simplex say $X$ (depending on $f$) in some
$\mathbb R^{D},\, D\geq 1$ with the following property: the graph of $f$ is either weak convex or
weak concave over $X$. Then an expression for the min-max uniform affine approximation of
$f$ on the simplex $X$ has graph given by $f_{1}+Y$ where $2Y$ is the nonzero extremum
value of $f-f_{1}$ on $X$ and where $f_{1}$ is the secant hyperplane to $f$ through the
vertices of the simplex $X$. $f_{1}$ is also the interpolant to $f$ at the $D+1$ vertices of the
simplex $X$.
\label{t:davemike}
\end{thm}
This generalizes the well-known Chebyshev equioscillation theorem for the case of $D=1$.
\section{Chapter 9: Building $\varepsilon$-distortions: near reflections.}
\setcounter{equation}{0}
\subsection{Theorem~\ref{t:lemmareflection3}.}
Using Slow twists and Slides from Chapter (4), we recall Theorem~\ref{t:mainfd6} (parts (1-3)) which told us the following.
\begin{itemize}
\item[(a)] Slow twists: We are given an $M\in SO(D)$. Then there exists a $\varepsilon$-distorted diffeomorphism which agrees with $M$ in a small ball around the origin and with the identity far out. Here, $\varepsilon$ is small enough.
\item[(b)] Slow twists and Slides: We are given a proper Eucldean motion $A$. Then there exists a $\varepsilon$-distorted diffeomorphism which agrees with $A$ in a small ball around the origin and with the identity far out. Here, $\varepsilon$ is small enough.
\item[(c)] Suppose that for $x, x'\in \mathbb R^D$, we have $|x|=|x'|$. Then we know from Theorem~\ref{t:procrustes}
that there exists an isometry (rigid) $f:\mathbb R^D\to \mathbb R^D$ with $f(x)=x'.$ Theorem~\ref{t:mainfd6} (part (3)) tells us
that if $x,x'$ are in a small ball around the origin then there exists a $\varepsilon$-distorted diffeomorphism $f:\mathbb R^D\to \mathbb R^D$ with
$f(x)=x'$ and which agrees with the identity far out.
\end{itemize}
We recall that we saw in Theorem~\ref{t:mainfd1} (whose building blocks included Slow twists and Slides) that if the map $\phi$ has a fixed point, then the map $\Phi$ must be essentially rigid away from the set $E$.
Our main result in this chapter is going to be a finer result than Theorem~\ref{t:mainfd6} when we assume more on the geometry of the set $E$.
Here is our result.
\begin{thm}
Let $\varepsilon$ be small enough depending on $D$ and $K$. Let $0<\tau<1$, $E\subset \mathbb R^{D}$ be a finite set with ${\rm diam}(E)=1$ and $|z-z'|\geq \tau$ for all $z,z'\in E$ distinct. Assume that $V_{D}(E)\leq \eta^{D}$
where $0<\eta<c\tau\varepsilon$ for small enough $c$.
Here we recall $V_{D}$ is given by Definition~\ref{d:VD}. Then, there exists a $c'\varepsilon$-distorted diffeomorphism $f:\mathbb R^{D}\to \mathbb R^{D}$ with the following properties:
\begin{itemize}
\item[(1)] $f$ coincides with an improper Euclidean motion on $\left\{x\in \mathbb R^{D}:\, {\rm dist}(x, E)\geq 20\right\}$.
\item[(2)] $f$ coincides with an improper Euclidean motion $A_{z}$ on $B(z,\tau/100)$ for each $z\in E$.
\item[(3)] $f(z)=z$ for each $z\in E$.
\end{itemize}
\label{t:lemmareflection3}
\end{thm}
Notice that (2) tells us that the aqgreement is pointwise $z$ dependent. This is finer that what we have in Theorem~\ref{t:mainfd6}.
\subsection{Proof of Theorem~\ref{t:lemmareflection3}.}
We provide now a proof of Theorem~\ref{t:lemmareflection3}. We do this in three steps.
{\bf Step 1}: We establish the following:
\begin{lem}
Let $\varepsilon$ be small enough depending on $D,K$. Let $0<\tau<1$ and $E\subset \mathbb R^{D}$ be finite set.
Assume that ${\rm diam}(E)\leq 1$ and $|z-z'|\geq \tau$ for $z,z'\in E$ distinct. Let $A: \mathbb R^{D}\to \mathbb R^{D}$ be an improper Euclidean motion and assume one
has $|A(z)-z|\leq \delta$ for all $z\in E$ where
$\delta<c\varepsilon\tau$ for small enough $c$. Then, there exists a $\varepsilon$-distorted diffeomorphism
$f_{1}$ such that:
\begin{itemize}
\item[(1)] $f_{1}(x)=x$ whenever ${\rm dist}(x, E)\geq 10$, $x\in\mathbb R^{D}$.
\item[(2)] $f_{1}(x)=x+[z-A(z)],\, x\in B(z, \tau/10)$, $z\in E$.
\end{itemize}
\label{l:Lemmareflection1}
\end{lem}
{\bf Proof}\, Let $\theta(y)$ be a smooth cutoff function on $\mathbb R^D$ such that $\theta(y)=1$ for
$|y|\leq 1/10$, $\theta(y)=0$ for $|y|\geq 1/5$ and $|\nabla \theta|\leq C$ on $\mathbb R^D$.
Let
\[
f(x)=\sum_{z\in E}(z-A(z))\theta\left(\frac{x-z}{\tau}\right),\, x\in \mathbb R^D.
\]
Let $x\in \mathbb R^D$. We observe that if ${\rm dist}(x, E)\geq 10$, then $\frac{|x-z|}{\tau}\geq 1/5$ for each $z\in E$ and so $\theta\left(\frac{x-z}{\tau}\right)=0$
for each $z\in E$. Thus $f(x)=0$ if ${\rm dist}(x, E)\geq 10$. Next if $x\in B(z,\tau/10)$ for each $z\in E$, then for a given $z\in E$, say $z_i$ and for $x\in B(z_i,\tau/10)$, $\frac{|x-z_i|}{\tau}\leq 1/10$ and so $\theta\left(\frac{x-z_i}{\tau}\right)=1$. However since $|z-z'|\geq \tau$ for $z,z'\in E$ distinct, we also have for $x\in B(z_,\tau/10), z\in E,\, z\neq z_i$, $\frac{|x-z|}{\tau}\geq 1/5$ and so $\theta\left(\frac{x-z}{\tau}\right)=0$ for $z\neq z_i$.
Thus $f(x)=z-A(z)$ for $x\in B(z, \tau/10)$, $z\in E$. Finally
$|\nabla f|\leq \frac{\eta}{C\tau}<c\varepsilon$ where $c$ is small enough. Then the map $x\to x+f(x),\, x\in \mathbb R^D$ is a Slide, (see Chapter 4) and thus a $\varepsilon$-distorted diffeomorphism. Thus Lemma~\ref{l:Lemmareflection1} holds. $\Box$.
{\bf Step 2}:
Using Theorem~\ref{t:mainfd4} (part (2)), there exists an improper Euclidean motion $A$ such that for $z\in E$, $|A(z)-z|\leq c'\eta.$ Recall, here $A$ is a near reflection.
{\bf Step 3}:
Lemma~\ref{l:Lemmareflection1} applies. Let $f_{1}$ be a $c''\varepsilon$-distorted diffeomorphism as in the conclusion of Lemma~\ref{l:Lemmareflection1}.
Define $f(x)= f_{1}\left(A(x)\right),\, x\in \mathbb R^D$ and we are done $\Box$.
\section{Chapter 10: Approximation in volume measure and BMO.}
\setcounter{equation}{0}
We recall that in Chapter 3 and Chapter 10, we built $\varepsilon$-distorted diffeomorphisms from elements of $SO(D)$ and Euclidean motions. Here $\varepsilon$ was small enough.
In this chapter, we are going to study the reverse problem, namely, given a $\varepsilon$-distorted diffeomorphism, how well can one approximate it essentially by
elements of $O(D)$. Here $\varepsilon$ is small enough. We will study this problem in volume measure.
Interestingly in studying this problem, we find
interesting connections of this problem to the space of maps $f_{1}:\mathbb R^{D}\to \mathbb R$ of bounded mean oscillation (BMO) and the John-Nirenberg inequality.
Here, ${\rm vol}_{D}(\cdot)$ is as usual $D$-dimensional volume which in this section we write as
${\rm vol}(\cdot)$.
We also need for this chapter the following:
\begin{itemize}
\item[(1)] Suppose that $f:\mathbb R^D\to \mathbb R^D$ is a $c$-distorted diffeomorphism for some small enough $c$. Then $|(f'(x))^{T}f'(x)-I|\leq c'c$.
\item[(2)] If $M$ is real and symmetric
and if $(1-c)I\leq M\leq (1+c)I$ as matrices for some $0<c<1$, then $|M-I|\leq c''c$. This follows from working in an orthonormal basis for which $M$ is diagonal.
\end{itemize}
\subsection{BMO.}
A map $f_{1}:\mathbb R^{D}\to \mathbb R$ is BMO, if there exists a constant $c_{NN}\geq 0$ depending on $D$ such that for every ball $B\subset \mathbb R^{D}$, there exists a real number $c'_{RB}:=c'(B,f_{1})$ with
\[
\frac{1}{{\rm vol}(B)}\int_{B}|f_{1}(y)-c'_{RB}|dy\leq c_{NN}.
\]
The least such constant $c_{NN}$ s denoted by $|f_{1}|_{{\rm BMO}}$. This norm turns BMO into a Banach space. BMO was first introduced and studied
in the context of elasticity. See \cite{J,JN}. (BMO is often called a John-Nirenberg space and may be understood in a probabilistic framework as is apparent from its definition). $B=B(z,r)$ is as usual the ball of of radius $r$ and center $z$.
The space BMO appears in two classical results. The first shows that as Banach spaces, BMO and the Hardy space $H^{1}$ are dual to each other.
The second classical result is called:
\subsection{The John-Nirenberg inequality.}
The John-Nirenberg inequality asserts the following: Let $f_{1}$ be in the space BMO and let $B\subset \mathbb R^{D}$ be a ball. Then there exists a real number $c_{RB}:=c(B,f_{1})$ and $c'>0$ depending on $D$ such that
\begin{equation}
{\rm vol}\left\{x\in B:\, |f_{1}(x)-c_{RB}|>cc'|f_{1}|_{BMO}\right\}\leq \exp(-c){\rm Vol}(B),\, c\geq 1.
\label{e:JN}
\end{equation}
As a consequence of (\ref{e:JN}), we have:
\begin{equation}
\left(\frac{1}{{\rm vol}(B)}\int_{B}|f_{1}(x)-c_{RB}|^{4}\right)^{1/4}\leq c'|f_{1}|_{BMO}.
\label{e:JN1}
\end{equation}
The definitions of BMO and the notion of the BMO norm can be modified so that the definition of BMO allows $f_{1}$
to take its values in the space of $D\times D$ matrices. Then the John-Nirenburg inequality and (\ref{e:JN1}) hold again.
See our work in \cite{D9, DD2, D32} for $D=1$.
\subsection{Main results of the paper \cite{FD4}.}
For all our results below, $\varepsilon$ is small enough and depends on $D$.
\medskip
{\bf BMO Theorem 1.}
\begin{thm}
Let $f:\mathbb R^{D}\to \mathbb R^{D}$ be an $\varepsilon$-distorted diffeomorphism. Let $B\subset \mathbb R^{D}$ be a ball. Then, there exists $M_B\in O(D)$ such that
\begin{equation}
{\rm vol}\left\{x\in B:\, \left|f'(x)-M_B\right|>cc'\varepsilon\right\}\leq \exp(-c){\rm vol}(B),\, c\geq 1.
\end{equation}
\label{t:Theorem1}
\end{thm}
Moreover, Theorem~\ref{t:Theorem1} is sharp (in the sense of small enough volume) by a Slow twist.
\medskip
{\bf BMO Theorem 2a.}
\begin{thm}
Let $f:\mathbb R^{D}\to \mathbb R^{D}$ be an $\varepsilon$-distorted diffeomorphism and let
$B\subset \mathbb R^{D}$ be a ball. Then there exists $M_B\in O(D)$ such that
\begin{equation}
\frac{1}{{\rm vol}(B)}\int_{B}\left|f'(x)-M_B\right|dx\leq c'\varepsilon^{1/2}.
\end{equation}
\label{t:Theorem2a}
\end{thm}
{\bf BMO Theorem 2b.}
\begin{thm}
Let $f:\mathbb R^{D}\to \mathbb R^{D}$ be an $\varepsilon$-distorted diffeomorphism and let
$B\subset \mathbb R^{D}$ be a ball. Then, there exists $M_B\in O(D)$ such that
\begin{equation}
\left(\frac{1}{{\rm vol}(B)}\int_{B}\left|f'(x)-M_B\right|^{4}dx\right)^{1/4}\leq c'\varepsilon^{1/2}.
\end{equation}
\label{t:Theorem2b}
\end{thm}
{\bf BMO Theorem 3.}
\begin{thm}
Let $f:\mathbb R^{D}\to \mathbb R^{D}$ be an $\varepsilon$-distorted diffeomorphism and let
$B\in \mathbb R^{D}$ be a ball. Then, there exists $M_B\in O(D)$ such that
\begin{equation}
\frac{1}{{\rm vol}(B)}\int_{B}\left|f'(x)-M_B\right|dx\leq c'\varepsilon.
\end{equation}
\label{t:Theorem3}
\end{thm}
We mention that Theorem~\ref{t:Theorem3} is a refinement of Theorem~\ref{t:Theorem2a}.
We also mention that the work of the paper \cite{FD4} gives an interesting application of Theorem~\ref{t:Theorem3}, Theorem~\ref{t:Theorem2b}
and Theorem~\ref{t:Theorem1}to music.
\subsection{Proof of Theorem~\ref{t:Theorem2a}.}
{\bf Proof}\, (10.6) is preserved by translations and dilations. Hence we may assume without loss of generality that $B=B(0,1)$.
We know that there exists an Euclidean motion $A$ such that $\left|f(x)-A(x)\right|\leq c\varepsilon,\, x\in B(0,1)$. Also, our desired conclusion holds for
$f$ iff it holds for the composition $A^{-1}o f$ (with possibly a different A). Hence, without loss of generality, we may assume that $A=I$. Thus, we have
$\left|f(x)-x\right|\leq c\varepsilon,\, x\in B(0,1)$.
We write $f(x_{1},...,x_{D})=(y_{1},...,y_{D})$ where for each $i$, $1\leq i\leq D$, $y_{i}=f_{i}(x_{1},...,x_{D})$, some smooth family $f_{i}:\mathbb R^{D}\to \mathbb R^{D},\, 1\leq i\leq D.$
First claim: For each $i=1,...,D,$
\[
\int_{B(0,1)}\left|\frac{\partial f_{i}(x)}{\partial x_{i}}-1\right|\leq c'\varepsilon.
\]
Let $B'$ denote the ball of radius 1 about the origin in $\mathbb R^{D-1}$.
For this, for fixed $(x_{2},...,x_{D})\in B'$, we know that defining $x^{+}=(1,x_{2}..,x_{D})$ and $x^{-}=(-1,.x_{2}..,x_{D})$ we have:
\[
\left|f_{1}(x^{+})-1\right|\leq c'\varepsilon
\]
and
\[
\left|f_{1}(x^{-})+1\right|\leq c'\varepsilon.
\]
Consequently,
\[
\int_{-1}^{1}\frac{\partial f_{1}}{\partial x_{1}}(x_{1},...,x_{D})dx_{1}\geq 2-c'\varepsilon.
\]
for $(x_{2},...,x_{D})\in B'$. Here $c'$ depends on $D$.
On the other hand, since,
\[
\left(f'(x)\right)^{T}\left(f'(x)\right)\leq (1+\varepsilon)I,
\]
we have the inequality for all $(x_{1},...,x_{D})$ in $\mathbb R^{D}$,
\[
\left|\frac{\partial f_{i}}{\partial x_{i}}(x_{1},...,x_{D})\right|\leq 1+c'\varepsilon.
\]
Now if $c''$ (depending on $D$) is large enough, from the above, we see now that in $\mathbb R^{D}$
\[
\left[1+c''(\varepsilon)-\frac{\partial f_{1}}{\partial x_{1}}(x_{1},...,x_{D})\right]\geq 0
\]
and for $(x_{2},...,x_{D})\in B'$,
\[
\int_{-1}^{1}\left|1+c''(\varepsilon)-\frac{\partial f_{1}}{\partial x_{1}}(x_{1},...,x_{D})\right|dx_{1}\leq 10 c''\varepsilon.
\]
Hence for $(x_{2},...,x_{D})\in B'$
\[
\int_{-1}^{1}\left|1-\frac{\partial f_{1}}{\partial x_{1}}(x_{1},...,x_{D})\right|dx_{1}\leq c'\varepsilon.
\]
Noting that $B(0,1)\subset [-1,1]\times B'$, we see that for each $i=1,2,...,D$,
\[
\int_{B(0,1)}\left|\frac{\partial f_{i}}{\partial x_{i}}-1\right|dx\leq c'\varepsilon.
\]
This is claim 1.
Since
\[
(1-\varepsilon)I\leq (f(x))^{T}(f'(x))\leq (1+\varepsilon)I,
\]
we have for each $i$
\[
\left|\frac{\partial f_i}{\partial x_{i}}\right|\leq 1+c'\varepsilon
\]
and
\[
{\rm trace}\left[(f'(x))^{T}(f'(x))\right]\leq (1+c'\varepsilon)D.
\]
So,
\[
\sum_{i,j=1}^D \left(\frac{\partial f_i}{\partial x_{j}}\right)^2\leq (1+C\varepsilon)D.
\]
Therefore, we have:
\[
\begin{array}{ll}
\sum_{i\neq j}\left(\frac{\partial f_i}{\partial x_{j}}\right)^2 \\
\leq (1+c'(\varepsilon))D-\sum_{i=1}^{D}\left(\frac{\partial f_i}{\partial x_{j}}\right)^2 \\
=c'(\varepsilon)+\sum_{i=1}^{D}\left[1-\left(\frac{\partial f_i}{\partial x_{j}}\right)^2\right].
\end{array}
\]
Moreover, for each $i$, we now have
\[
\begin{array}{ll}
\left|\left(1-\frac{\partial f_i}{\partial x_{j}}\right)^2\right| \\
=\left|\left(1-\frac{\partial f_i}{\partial x_{j}}\right)\right|\left|\left(1+\frac{\partial f_i}{\partial x_{j}}\right)\right|\\
\leq 3\left|\left(1-\frac{\partial f_i}{\partial x_{j}}\right)\right|.
\end{array}
\]
And so everywhere on $\mathbb R^{D}$,
\[
\sum_{i\neq j}\left(\frac{\partial f_i}{\partial x_{j}}\right)^2 \leq c'(\varepsilon)+3\sum_{i}\left|\frac{\partial f_i}{\partial x_{j}}-1\right|.
\]
Now integrating, we find that for $i\neq j$
\[
\int_{B(0,1)}\left|\frac{\partial f_i}{\partial x_{j}}\right|^2dx\leq c'\varepsilon.
\]
Consequently, by the Cauchy-Schwartz inequality, we have for $i\neq j$
\[
\int_{B(0,1)}\left|\frac{\partial f_i}{\partial x_{j}}\right|dx\leq c'\varepsilon^{1/2}.
\]
Recalling that $f'(x)$ is just the matrix $\frac{\partial f_i}{\partial x_{j}}$,
\[
\int_{B(0,1)}\left|f'(x)-I\right|dx \leq c'\varepsilon^{1/2}.
\]
Thus, we have proved what we need with $A=I$. The proof of Theorem~\ref{t:Theorem2a} is complete. $\Box$
\subsection{Proof of Theorem~\ref{t:Theorem2b}.}
Theorem~\ref{t:Theorem2b} follows from Theorem~\ref{t:Theorem2a}and (\ref{e:JN1}). $\Box$.
\subsection{Proof of Theorem~\ref{t:Theorem3}.}
We now prove Theorem~\ref{t:Theorem3}.
{\bf Proof}\, We may assume without loss of generality that
\[
B=B(0,1).
\]
From Theorem~\ref{t:Theorem2b}, we know the following: There exists $M_B\in O(D)$ such that
\[
\left(\int_{B(0,10)}\left|f'(x)-M_{B}\right|^{4} dx\right)^{1/4}\leq c'\varepsilon^{1/2}.
\]
Our desired conclusion holds for $f$ iff it holds for the composition $M_{B}^{-1}o f$. Hence without loss of generality, we may assume that $M_{B}=I$. Thus, we have
\[
\left(\int_{B(0,10)}\left|f'(x)-I\right|^{4} dx\right)^{1/4}\leq c'\varepsilon^{1/2}.
\]
Let now
$F(x)=\left(F_1(x),F_2(x),....,F_{D}(x)\right)=f(x)-x,\, x\in \mathbb R^{D}.$
Then we have:
\[
\left(\int_{B(0,10)}\left|\nabla (F(x))\right|^{4}dx\right)^{1/4}\leq c'\varepsilon^{1/2}.
\]
We know that
\[
(1-c'(\varepsilon))I\leq (f'(x))^{T}(f'(x))\leq (1+c'\varepsilon)I
\]
and so
\[
\left|(f'(x))^{T}(f'(x))-I\right|\leq c'\varepsilon,\, x\in \mathbb R^{D}.
\]
Now, in coordinates, $f'(x)$ is the matrix
$\left(\delta_{ij}+\frac{\partial F_i(x)}{\partial x_{j}}\right)$, hence
$f(x)^{T}f'(x)$ is the matrix whose $ij$ entry is
\[
\begin{array}{ll}
\sum_{l=1}^{D}\left(\delta_{li}+\frac{\partial F_{l}(x)}{\partial x_{i}}\right)\left(\delta_{lj}+\frac{\partial F_{l}(x)}{\partial x_{j}}\right) \\
=\left(\delta_{li}+\frac{\partial F_{j}(x)}{\partial x_i}+\frac{\partial F_{i}(x)}{\partial x_{j}}\)
\(\sum_{l=1}^{D}\frac{\partial F_{l}(x)}{\partial x_i}+\frac{\partial F_{l}(x)}{\partial x_{j}}\right).
\end{array}
\]
Thus
\[
\left|\frac{\partial F_i}{\partial x_{j}}+\frac{\partial F_j}{\partial x_i}
+\sum_{l=1}^{D}\frac{\partial F_l}{\partial x_i}\frac{\partial F_l}{\partial x_{j}}\right|\leq c'
\varepsilon
\]
on $\mathbb R^{D},\, i,j=1,...,D.$
Using the Cauchy Schwartz inequality, we then learn the estimate
\[
\left|\sum_{l=1}^{D}\frac{\partial F_{l}}{\partial x_{j}}+\frac{\partial F_{j}}{\partial x_{i}}\right|_{2(B(0,10))}\leq c'\varepsilon.
\]
Continuing we make the following claim: There exists, for each $i,j$, an antisymmetric matrix $M=(M)_{ij}$, such that
\[
\left|\frac{\partial F_i}{\partial x_{j}}-M\right|_{2(B(0,1))}\leq c'\varepsilon.
\]
We know that if true, we have
\[
\left|f'-(I+M)\right|_{2(B(0,1))}\leq c'\varepsilon.
\]
We also know that
\[
|M|\leq c'\varepsilon^{1/2}
\]
and thus,
\[
\left|\exp(M)-(I+M)\right|\leq c'\varepsilon.
\]
Invoking Cauchy Schwartz, we have
\[
\int_{B}\left|f'(x)-\exp(M)(x)\right|dx \leq c'\varepsilon.
\]
This implies Theorem~\ref{t:Theorem3} because $M$ is antisymmetric which means that $\exp(M)\in O(D)$. $\Box$.
So, to prove Theorem~\ref{t:Theorem3} we need to establish our claim. This follows by the analysis of a certain overdetermined system which is Theorem~\ref{t:Theorem4}.
\subsection{An overdetermined system}
We study the following overdetermined system of partial differential equations.
\begin{equation}
\frac{\partial \Omega_i}{\partial x_j}+\frac{\partial \Omega_j}{\partial x_i}=f_{ij}, i,j=1,...,D
\label{e:3.1}
\end{equation}
on $\mathbb R^D$. Here, $\Omega_i$ and $f_{ij}$ are $C^{\infty}$ functions on $\mathbb R^D$.
Here is:
\begin{thm}
Let $\Omega_1$,...,$\Omega_D$ and $f_{ij}$, $i,j=1,...,D$ be smooth functions on $\mathbb R^D$. Assume that (3.1) holds and suppose that
\begin{equation}
||f_{ij}||_{L^2(B(0,4))}\leq 1.
\end{equation}
Then, there exist real numbers $\Delta_{ij}$, $i,j=1,...,D$ such that
\begin{equation}
\Delta_{ij}+\Delta_{ji}=0,\, \forall i,j
\end{equation}
and
\begin{equation}
\left\|\frac{\partial \Omega_i}{\partial x_j}-\Delta_{ij}\right\|_{L^2(B(0,1))}\leq C.
\end{equation}
\label{t:Theorem4}
\end{thm}
{\bf Proof}\, From (\ref{e:3.1}) we see at once that
\[
\frac{\partial \Omega_i}{\partial x_i}=\frac{1}{2}f_{ii}
\]
for each $i$. Now, by differentiating (\ref{e:3.1}) with respect to $x_j$ and then summing on $j$, we see that
\[
\Delta \Omega_i +\frac{1}{2}\frac{\partial}{\partial x_i}\left(\sum_j f_{jj}\right)=\sum_j \frac{\partial f_{ij}}{\partial x_j}
\]
for each $i$.
Therefore, we may write
\[
\Delta \Omega_i=\sum_j \frac{\partial}{\partial x_j} g_{ij}
\]
for smooth functions $g_{ij}$ with
\[
||g_{ij}||_{L^2(B(0,4)}\leq C.
\]
This holds for each $i$. Let $\chi$ be a $C^{\infty}$ cutoff function on $\mathbb R^D$ equal to 1 on $B(0,2)$ vanishing outside $B(0,4)$ and satisfying $0\leq \chi\leq 1$ everywhere. Now let
\[
\Omega_i^{{\rm err}}=\Delta^{-1}\sum_j\frac{\partial}{\partial x_j}\left(\chi g_{ji}\right)
\]
and let
\[
\Omega_i^*=\Omega_i-\Omega_i^{err}.
\]
Then,
\begin{equation}
\Omega_i=\Omega_i^*+ \Omega_i^{err}
\end{equation}
each $i$.
\begin{equation}
\Omega_i^*
\end{equation}
is harmonic on $B(0,2)$ and
\begin{equation}
\left||\nabla \Omega_i^{{\rm err}}\right||_{L^2(B(0,2))}\leq c.
\end{equation}
We can now write
\begin{equation}
\frac{\partial \Omega_i^*}{\partial x_j}+\frac{\partial \Omega_j^*}{\partial x_i}=f_{ij}^*, i,j=1,...,D
\end{equation}
on $B(0,2)$ and with
\begin{equation}
\left||f_{ij}^*\right||_{L^2(B(0,2)}\leq c_1.
\end{equation}
We see that each $f_{ij}^*$ is a harmonic function on $B(0,2)$. Consequently,
\begin{equation}
sup_{B(0,1)}\left|\nabla f_{ij}^*\right|\leq c_2..
\end{equation}
We thus have for each $i,j,k$,
\begin{eqnarray}
&& \frac{\partial^2 \Omega_i^*}{\partial x_{j}\partial x_k}+ \frac{\partial^2 \Omega_k^*}{\partial x_{i}\partial x_j}=\frac{\partial f_{ik}^*}{\partial x_j}; \frac{\partial^2 \Omega_i^*}{\partial x_{j}\partial x_k}+ \frac{\partial^2 \Omega_j^*}{\partial x_{i}\partial x_k}=\frac{\partial f_{ij}^*}{\partial x_k} \\
&& \frac{\partial^2 \Omega_j^*}{\partial x_{i}\partial x_k}+ \frac{\partial^2 \Omega_k^*}{\partial x_{i}\partial x_j}=\frac{\partial f_{jk}^*}{\partial x_i}.
\end{eqnarray}
Now adding the first two equations above and subtracting the last, we obtain:
\begin{equation}
2\frac{\partial^2 \Omega_i^*}{\partial x_{j}\partial x_k}=\frac{\partial f_{ik}^*}{\partial x_j}+\frac{\partial f_{ij}^*}{\partial x_k}-\frac{\partial f_{jk}^*}{\partial x_i}
\end{equation}
on $B(0,1)$. Thus we obtain the estimate
\begin{equation}
\left|\frac{\partial^2 \Omega_i^*}{\partial x_{j}\partial x_k}\right|\leq c_3
\end{equation}
on $B(0,1)$ for each $i,j,k$.
Now for each $i,j$, let
\begin{equation}
\Delta_{ij}^*=\frac{\partial \Omega_i^*}{\partial x_j}(0).
\end{equation}
We have then
\begin{equation}
\left|\frac{\partial \Omega_i^*}{\partial x_j}-\Delta_{ij}^*\right|\leq c_4
\end{equation}
on $B(0,1)$ for each $i,j$ and
\begin{equation}
\left\|\frac{\partial \Omega_i}{\partial x_j}-\Delta_{ij}^*\right\|_{L^2(B(0,1))}\leq c_5,.
\end{equation}
We have the estimate
\[
\left|\Delta_{ij}^*+\Delta_{ji}^*\right|\leq c_5
\]
for each $i,j$. Hence, there exist real numbers $\Delta_{ij}$, $(i,j=1,...,D)$ such that
\begin{equation}
\Delta_{ij}+\Delta_{ji}=0
\end{equation}
and
\begin{equation}
\left|\Delta_{ij}^*-\Delta_{ij}\right|\leq C
\end{equation}
for each $i,j$. Thus we see that
\begin{equation}
\left\|\frac{\partial \Omega_i}{\partial x_j}-\Delta_{ij}\right\|_{L^2(B(0,1))}\leq c_6
\end{equation}
for each $i$ and $j$.
We have proved the theorem. $\Box$
\subsection{Proof of Theorem~\ref{t:Theorem1}.}
{\bf Proof}\, The proof of Theorem~\ref{t:Theorem1} follows from (\ref{e:JN1}) and Theorem~\ref{t:Theorem3}.
$\Box$.
\section{Chapter 11: Results: A revisit of Theorem~\ref{t:mainfd1} (part (1).}
\setcounter{equation}{0}
In this chapter we are going to revisit Theorem~\ref{t:mainfd1} (part (1) with a collection of finer results using a new geometry on the set $E$.
We have seen this new geometry and already one fine result in Chapters (8-10). In particular: In Chapter (9), we studied a quantitative relationship $\delta=c\varepsilon^{c'}$ where $c,c'$ depend on $D$ and are small enough. As part of our finer results, we will study a refined quantitative: $\delta=\exp\left(-\frac{C_K}{\varepsilon}\right)$ where the constant $C_K$ depends on $D$ and
the constant $K$. $\varepsilon$ is small enough and depends on both $D$ and the constant $K$. Recall that the constant $K$ is introduced in Chapter (8), and is chosen when $D$ is chosen and controls ${\rm Card} (E)$. (Recall its motivation was the barier problem ${\rm Card} (E)>D$ in Theorem~\ref{t:mainfd1} (part (1)).
Chapter (13) will be devoted to proofs.
\subsection{Theorem~\ref{t:Theorememotionapprox}.}
We first formulate and prove a comprehensive result which will allow a construction we develop called an $\eta$ block. (Recall from Chapter (8) the constant
$\eta$ controlled how close the set $E$ is to a certain hyperplane.) We need, moving forward the following more general definition than what we have had before:
A map $f:\mathbb R^{D}\to \mathbb R^{D}$ is proper or improper if ${\rm det}(f')(x)$ exists and ${\rm det}(f')(x)>0$ or respectively ${\rm det}(f')(x)<0$ for every $x\in \mathbb R^D$.
We will prove:
\begin{thm}
\item[(1)] Let $\varepsilon$ be small enough and depends on $D$. Let $f:\mathbb R^{D}\to \mathbb R^{D}$ be a $\varepsilon$-distorted diffeomorphism. Let $B:=B(z,r)$ be a ball in $\mathbb R^D$. Then, there exists a Euclidean motion $A=A_B$ such that:
\begin{itemize}
\item[(a)] $|f(x)-A(x)|\leq c\varepsilon r,\, x\in B.$ Here $c$ depends on $D$.
\item[(b)] Moreover, $A$ is proper iff $f$ is proper.
\end{itemize}
\item[(2)] Let $\left\{x_{0},...,x_{D}\right\}$ with ${\rm diam}\left\{x_{0},...,x_{D}\right\}\leq 1$ and $V_{D}(x_{0},...,x_{D})\geq \eta^D$ where
$0<\eta<1$ and let $0<\varepsilon<c'\eta^D$ for a small enough $c'$. Let $f:\mathbb R^{D}\to\mathbb R^{D}$ be a $\varepsilon$-distorted diffeomorphism. Finally let $A^{*}$ be the unique affine map that agrees with
$f$ on $\left\{x_{0},...,x_{D}\right\}$. Then $f$ is proper iff $A^{*}$ is proper. Here, $\varepsilon$ is small enough and depends on $D$ and $K$.
$c'$ depends on $D$.
\label{t:Theorememotionapprox}
\end{thm}
{\bf Proof:}\, We begin with (part (1a)). Without loss of generality, we may assume that $B(z,r)=B(0,1)$ and $f(0)=0$. Let $e_1,...,e_D\in \mathbb R^{D}$ be unit vectors. Then, $|f(e_i)|=|f(e_i)-f(0)|$. Hence, for each $i$,
\[
(1+\varepsilon)^{-1}\leq |f(e_i)|\leq (1+\varepsilon).
\]
Also, for $i\neq j$,
\[
(1+\varepsilon)^{-1}\sqrt{2}\leq |f(e_i)-f(e_j)|\leq (1+\varepsilon)\sqrt{2}.
\]
Hence,
\[
f(e_i)\cdot f(e_j) =1/2\left(|f(e_i)|^2+|f(e_j)|^2-|f(e_i)-f(e_i)|^2\right)
\]
satisfies
\[
|f(e_i)\cdot f(e_j)-\delta_{ij}|\leq c\varepsilon
\]
for all $i,j$ where $\delta_{ij}$ denotes the Kronecker delta and "." denotes the Euclidean dot product.
Applying the Gram-Schmidt process to $f(e_1),....,f(e_D)$, we obtain orthonormal vectors $e_1^*,...,e_D^*\in \mathbb R^{D}$ such that $|f (e_i)-e_i^*|\leq c\varepsilon$ for each $i$.
Using Theorem~\ref{t:procrustes}, we let $A$ be the (proper or improper) rotation such that $Ae_i=e_i^*$ for each $i$. Then $f^{**}:=A^{-1}o f$ is an $\varepsilon$-distorted diffeomorphism,
$f^{**}(0)=0$ and $|f^{**}(e_i)-e_i|\leq c\varepsilon$ for each $i$. Now let $x=(x_{1},...,x_{D})\in B(0,1)$ and let $y=(y_{1},...,y_D)=f^{**}(x)$. Then $2x_i=1+|x-0|^2-|x-e_i|^2$ and also
$2y_{i}=1+|y-0|^2-|y-e_i|^2$ for each i. Hence, by the above-noted properties of $f^{**}$, we have $|y_{i}-x_i|\leq c\varepsilon$. Then, $|f^{**}(x)-x|\leq c\varepsilon$ for all $x\in B(0,1)$, i.e.,
$|f(x)-A(x)|\leq c\varepsilon$ for all $x\in B(0,1)$. Thus, we have proved (a) but not yet (b). For each $(z,r)$, (a) provides an Euclidean motion $A_{(z,r)}$ such that $|f(x)-A_{(z,r)}(x)|\leq c\varepsilon r$ for $x\in B(z,r)$.
Now for $r$ small enough, we have using the mean value theorem for vector valued maps and the substitution rule with Jacobian determinants as expansions of volumes,
\[
|f(x)-[f(z)+f'(z)(x-z)]|\leq c\varepsilon r, \, x\in B(z,r).
\]
Hence,
\[
|A_{(z,r)}(x)-[f(z)+f'(z)(x-z)]|\leq c\varepsilon r, \, x\in B(z,r).
\]
Thus we have established for small enough $r$ that $A_{(z,r)}$ is proper iff ${\rm det}f'(z)>0$ ie, iff $f$ is proper.
Observe that we have $|f(x)-A_{(z,r/2)}(x)|\leq c\varepsilon r$ for $x\in B(z,r/2)$. Thus
$|A_{(z,r)}-A_{(z,r/2)}(x)|\leq c\varepsilon r$ for $x\in B(z,r/2)$.
Hence $A_{(z,r)}$ is proper iff $A_{(z,r/2)}$ is proper. Thus we may deduce that for all $r$, $A_{(z,r)}$ is proper iff $f$ is proper. This completes the proof of (b) and (part (1)) of Theorem~\ref{t:Theorememotionapprox}.
We now prove (part (2)). Without loss of generality, we may assume that $x=0$ and $f(x_{0})=0$. Then $A^{*}$ is linear, not just affine. By (part (1a)), there exists a
Euclidean motion $A_{(0,1)}$ such that
\[
|f(x)-A_{(0,1)}(x))|\leq c\varepsilon
\]
for all $x\in B(0,1)$ and $f$ is proper iff $A_{(0,1)}$ is proper. We know that
\[
|A^{*}(x_i)-A_{(0,1)}(x_i)|\leq c\varepsilon, i=0,1,...D.
\]
since $A^{*}(x_i)=f(x_i)$ and also since $x_i\in B(0,1)=B(x_{0},1)$. (The latter follows because ${\rm diam}\left\{x_{0},...,x_{D}\right\}\leq 1$). In particular, $|A_{(0,1)}(0)|\leq c\varepsilon$ since $x_{0}=0$.
Hence,
\[
|A^{*}(x_i)-[A_{(0,1)}(x_i)-A_{(0,1)}(0)]|\leq c'\varepsilon
\]
for $i=1,...,D$.
Now, the map $x\mapsto Ax:=A_{(0,1)}(x)-A_{(0,1)}(0)$ is a proper or improper rotation and ${\rm det}(A)>0$ iff
$A_{(0,1)}$ is proper iff $f$ is proper. Thus, we have the following:
\begin{itemize}
\item $|(A^{*}-A)x_i|\leq c'\varepsilon$, $i=1,...,D$.
\item $|x_{1}\wedge...\wedge x_{D}|\geq c\eta^D$. (See Section (7.6)).
\item ${\rm det}A>0$ iff $f$ is proper.
\item $A$ is a proper or improper rotation.
\end{itemize}
Now let $L$ be the linear map that sends the $i$th unit vector $e_i$ to $x_i$. Then the entries of $L$ are at most $1$ in absolute value since each $x_i$ belongs to $B(0,1)$. Letting
$|\cdot|$ be understood, appropriately,
we have from the discussion in Section (7.6) and the above,
\[
|{\rm det}(L)|=|x_{1}\wedge...\wedge x_{D}|\geq c\eta^D.
\]
Hence by Cramer’s rule, $|L^{-1}|\leq c\eta^{-D}$. We now have for each $i$,
\[
|(A^{*}-A)Le_i|=|(A^{*}-A)x_i|\leq c'\varepsilon.
\]
Hence,
\[
|(A^{*}-A)L|\leq c''\varepsilon
\]
and thus
\[
|A^{*}-A|\leq c|(A^{*}-A)L||L^{-1}|\leq c\varepsilon \eta^{-D}.
\]
Since $A$ is a (proper or improper) rotation, it follows that
\[
|A^{*}A^{-1}-I|\leq c\varepsilon \eta^{-D}.\]
Therefore if $\varepsilon \eta^{-D}\leq c'$ for small enough $c'$, then $A^{*}A^{-1}$ lies in a
small enough neighborhood of $I$ and therefore ${\rm det}(A^{*}A^{-1})>0$. Hence ${\rm det}A^{*}$ and ${\rm det}(A)$ have the same sign.
Thus, ${\rm det}(A^{*})>0$ iff $f$ is proper. So, we have proved (2) and the Theorem. $\Box$
We are now ready for:
\subsection{$\eta$ blocks.}
\begin{dfn}
Let $S\subset \mathbb R^{D}$ finite. Let $f:S\to \mathbb R^{D}$ and let $0<\eta<1$. A positive (resp. negative) $\eta$-block for $f$ is a $D+1$ tuple $(x_{0},...,x_{D})\in \mathbb R^{D}$ such that the following two conditions hold:
\begin{itemize}
\item[(1)] $V_{D}(x_{0},...,x_{D})\geq (\leq) \eta^D{\rm diam}(x_{0},...,x_{D})$.
\item[(2)] Let $A^{*}$ be the unique affine map which agrees with $f$ on $S$. See Theorem 14.17 ((part (2)). Then we assume that $A*$ is proper(improper). (Note that if the map $A*$ is not invertible then $(x_{0},...,x_{D})$ is not an
$\eta$ block).
\end{itemize}
\label{d:block}
\end{dfn}
It follows immediately from the definition of an $\eta$ block that we have the following:
\begin{thm}
\begin{itemize}
\item[(1)] Let $\phi:E\to \mathbb R^{D}$ where $E\in \mathbb R^{D}$ is finite and let $0<\eta<1$. Suppose that $\phi$ satisfies $(\ref{e:emotionssa})$ and has a positive $\eta$ block and a negative
$\eta$ block. Let $0<\varepsilon<c\eta^{D}$ for small enough $c>0$ depending only on $D$. Then $\phi$ does not extend to a
$\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$. Here, $\varepsilon$ depends on $D$ and $K$ and is small enough.
\item[(2)] Let $\phi:E\to \mathbb R^{D}$ where $E\subset \mathbb R^{D}$ is finite. Assume that $\phi$ has a positive (resp. negative) $0<\eta<1$ block and let $0<\varepsilon<c\eta^{D}$ for small enough $c>0$
depending on $D$. Suppose $\phi$ extends to a $\varepsilon$-distorted diffeomorphism $\Phi$. Here $\varepsilon$ depends on $D$ and $K$ and is small enough.
Then $\Phi$ is proper (resp. improper).
\end{itemize}
\label{t:cextensionblock2}
\end{thm}
We now have the following collection:
\begin{thm}
Let $\phi:E\to \mathbb R^{D}$ with $E\subset \mathbb R^{D}$ finite and let $0<\tau<1$.
\begin{itemize}
\item Assumptions on the set $E$:\, ${\rm diam}(E)\leq 1$, $|x-y|\geq \tau$, for any $x,y\in E$ distinct, ${\rm card}(E)\leq K$.
\item Assumptions on parameters: \, $\delta\leq c_{K}\tau^{C_K}$, $C_{K}$ is large enough and $c_K$ is small enough. $\delta$ is small enough and depends on $D$ and $K$.
\item Assumption on $\phi$:\, $\phi$ satisfies (6.6). We recall (6.6) is in Theorem 6.4.? Check
\begin{equation}
|x-y||(1+\delta)^{-1}\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|,\, x,y\in E.
\end{equation}
\end{itemize}
Then there exists a small enough constant $c'_K$ and a $c'_{K}\delta^{1/C_{K}}\tau^{-1}$- distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ with the following
properties:
\begin{itemize}
\item $\Phi=\phi$ on $E$.
\item $\Phi$ agrees with a Euclidean motion on
$\left\{x\in \mathbb R^{D}:\, {\rm dist}(x,E)\geq 100\right\}.$
\item For each $z\in E$, $\Phi$ agrees with a Euclidean motion $A_{z}$ on $B(z,\tau/100)$.
\end{itemize}
\label{t:lemmareflectionex1}
\end{thm}
We now worry about whether the map $\Phi$ in Theorem~\ref{t:lemmareflectionex1} is proper or improper. Thus, we have:
\begin{thm}
Let $\phi:E\to \mathbb R^{D}$ with $E\subset \mathbb R^{D}$ finite and let $0<\tau,\eta<1$. Let $\varepsilon$ depend on $D$ and $K$.
\begin{itemize}
\item Assumptions on the set $E$:\, ${\rm diam}(E)=1$, $|x-y|\geq \tau$, for any $x,y\in E$ distinct, ${\rm card}(E)\leq K$, $V_{D}(E)\leq \eta^D$, see Definition 7.6.
\item Assumption on $\phi$:\, $\phi$ satisfies (6.6).
\item Assumptions on $\eta,\tau$: $0<\eta<c\varepsilon \tau$, $c$ small enough (depending on $D$), $C'_{K}\delta^{\frac{1}{C_{K}}}\leq \varepsilon \tau$,
$C_{K}$ and $C'_K$ large enough.
\end{itemize}
Then, there exists a proper $c'\varepsilon$-distorted diffeomorphism (c' depending on $D$) $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ with the following
properties:
\begin{itemize}
\item $\Phi=\phi$ on $E$.
\item $\Phi$ agrees with a proper Euclidean motion on
$\left\{x\in \mathbb R^{D}:\, {\rm dist}(x,E)\geq 1000\right\}.$
\item For each $z\in E$, $\Phi$ agrees with a proper Euclidean motion $A_{z}$ on $B(z,\tau/100)$.
\end{itemize}
\label{t:lemmareflectionex2}
\end{thm}
\begin{thm}
Let $\phi:E\to \mathbb R^{D}$ with $E\subset \mathbb R^{D}$ finite, $0<\tau,\eta<1$. Let $\varepsilon>0$ depend on $D$ and the constant $K$ and be small enough.
\begin{itemize}
\item Assumptions on the set $E$:\, ${\rm diam}(E)=1$,\, $|x-y|\geq \tau$, for any $x,y\in E$ distinct, ${\rm card}(E)\leq K$, $V_{D}(E)\geq \eta^D $.
\item Assumption on $\phi$: $\phi$ satisfies (6.6) with no negative $\eta$ blocks.
\item Assumptions on parameters $\varepsilon, \tau, \eta, \delta$.
\item (1):\, $C'_{K}\delta^{1/C _{K}}\tau^{-1}< \eta^{D}<1$ with
$C_{K}$ and $C'_K$ large enough. Recall that $C_K,\, C'_K$ depend on $D$ and the geometry of the set $E$ (via the constant $K$).
\item (2):\, $C'_{K}\delta^{1/C_{K}}\tau^{-1}<\varepsilon$. Here the constants $C_K$ and $C_K'$ are the same as (1).
\end{itemize}
Then, there exists a proper $c\varepsilon$-distorted diffeomorphism ($c$ depends on $D$) $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ with the following
properties:
\begin{itemize}
\item $\Phi=\phi$ on $E$.
\item $\Phi$ agrees with a proper Euclidean motion $A_{\infty}$ on
$\left\{x\in \mathbb R^{D}:\, {\rm dist}(x,E)\geq 1000\right\}.$
\item For each $z\in E$, $\Phi$ agrees with a proper Euclidean motion $A_{z}$ on $B(z,\tau/1000)$.
\end{itemize}
\label{t:lemmareflectionex3}
\end{thm}
\begin{thm}
Let $\phi:E\to \mathbb R^{D}$ with $E\subset \mathbb R^{D}$ finite and let $0<\tau,\eta<1$. Let $\varepsilon>0$ depend on $D$ and $K$ and be small enough.
We make the following assumptions:
\begin{itemize}
\item Assumptions on the set $E$:\, ${\rm diam}(E)=1$,\, $|x-y|\geq \tau$, for any $x,y\in E$ distinct, ${\rm card}(E)\leq K$.
\item Assumption on $\phi$:\, $\phi$ satisfies (6.6) with no negative $\eta$ blocks.
\item Assumptions on parameters: \, $0<\eta<c\varepsilon \tau$, $c$ small enough depending on $D$, $c_{K}\delta^{1/c'_{K}}\tau^{-1}
\leq {\rm min}(\varepsilon, \eta^D)$, $c_{K}$ and $c'_{K}$ large enough.
\end{itemize}
Then, there exists a proper $c\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ with the following
properties:
\begin{itemize}
\item $\Phi=\phi$ on $E$.
\item $\Phi$ agrees with a proper Euclidean motion $A_{\infty}$ on
$\left\{x\in \mathbb R^{D}:\, {\rm dist}(x,E)\geq 1000\right\}.$
\item For each $z\in E$, $\Phi$ agrees with a proper Euclidean motion $A_{z}$ on $B(z,\tau/1000)$.
\end{itemize}
\label{t:lemmareflectionex4}
\end{thm}
We remark that it follows immediately from the theorem that $A_z=\Phi$ for each $z\in E$ (if $z\in E$, then trivially $z\in B(z,\tau/1000)$ and also $\Phi=\phi$ for each $z\in E$ and so $\Phi=\phi=A_z$ on $E$.
\begin{thm}
Choose $K$ with $D$. There exist positive constants $c_{K}$, $c'_{K}$, $c''_{K}$ such that the
following holds: Set $\eta=\exp(-c'_{K}/\varepsilon)$ and $\delta=\exp(-c''_{K}/\varepsilon)$ with $0<\varepsilon<c_{K}$. Let $E\subset \mathbb R^{D}$ be finite with
${\rm card}(E)\leq K$. Let $\phi:E\to \mathbb R^{D}$ satisfy
\begin{equation}
(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|, \, x, y\in E.
\label{e:deltadistortion}
\end{equation}
Then if $\phi$ has no negative $\eta$ block, there exists a proper $\varepsilon$-distorted diffeomorphism
$\Phi:\mathbb R^{D}\to \mathbb R^{D}$ such that $\phi=\Phi$ on $E$ and $\Phi$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^{D}:\, {\rm dist}(x,S)\geq 10^4{\rm diam}(E)\right\}.
\]
\label{t:Theorem2a}
\end{thm}
\begin{thm}
Choose $K$ with $D$. There exist positive constants $c_{K}$, $c'_{K}$, $c''_{K}$ such that the
following holds: Set $\eta=\exp(-c'_{K}/\varepsilon)$ and $\delta=\exp(-c''_{K}/\varepsilon)$ with $0<\varepsilon<c_{K}$. Let $E\subset \mathbb R^{D}$ be finite with
${\rm card} (E)\leq K$. Let $\phi:E\to \mathbb R^{D}$ satisfy (\ref{e:deltadistortion}).
Then if $\phi$ has a negative $\eta$ block, $\phi$ cannot be extended to a proper $\delta$-distorted diffeomorphism on $\mathbb R^{D}$.
\label{t:Theorem2b}
\end{thm}
\subsection{$D+1$: $\delta=\exp(-c/\varepsilon)$ and the barier ${\rm card} (E)>D$ settled.}
\begin{thm}
Let $E\subset \mathbb R^{D}$ with ${\rm card}(E)\leq D+1$. There exist $c,c'$ depending on $D$ such that the following holds: Set
$\delta=\exp\left(\frac{-c'}{\varepsilon}\right)$ with $0<\varepsilon<c$ and let $\phi:E\to \mathbb R^{D}$ satisfy
$(\ref{e:deltadistortion})$.
Then there exists a $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ such that $\Phi=\phi$ on $E$. $\varepsilon$ is small enough depending on $D$.
\label{t:Theorem4}
\end{thm}
\begin{thm}
Choose $K$ with $D$. There exist positive constants $c_{K}$, $c'_{K}$, $c''_{K}$ such that the
following holds: Set $\eta=\exp(-c'_{K}/\varepsilon)$ and $\delta=\exp(-c''_{K}/\varepsilon)$ with $0<\varepsilon<c_{K}$. Let $E\subset \mathbb R^{D}$ be finite with
${\rm card}(E)\leq K$. Let $\phi:E\to \mathbb R^{D}$ satisfy (\ref{e:deltadistortion}).
Suppose $\phi$ has a positive $\eta$ block say $\left\{x_0,..., x_D\right\}$ and a negative $\eta$ block, $\left\{y_0,..., y_D\right\}$. Then the restriction of $\phi$ to
$\left\{x_0,...,x_D, y_0,...,y_D\right\}$ cannot extend to a $\delta$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$.
\label{t:Theorem2d}
\end{thm}
\subsection{Finiteness principle.}
Let $E\subset \mathbb R^2$ be finite and let $f:E\to \mathbb R$. Suppose that for every subset $S\subset E$ with at most 6 points there exists $F^{S}\in C^{2}(\mathbb R^{2})$ with norm
at most 1 such that
$F^{S}=f$ on $S$. Then there exists $F\in C^{2}(\mathbb R^{2})$ with norm at most an absolute constant with $F=f$ on $E$.
As a consequence of Theorem~\ref{t:Theorem2a}, we now have Theorem~\ref{t:Theorem3} which is a finiteness principle.
\begin{thm}
Let $E\subset \mathbb R^{D}$ be finite. There exist positive constants $c_{K}$, $c'_{K}$ such that the
following holds: Set $\delta=\exp(-\frac{c'_{K}}{\varepsilon})$ with $0<\varepsilon<c_{K}$. Let $\phi:E\to \mathbb R^{D}$ satisfy
$(\ref{e:deltadistortion})$. Suppose that for any $E_{0}\subset E$ with at most $2D+2$ points, there exists a $\delta$-distorted diffeomorphism $\Phi^{E_{0}}:\mathbb R^{D}\to \mathbb R^{D}$ such that
$\Phi^{E_{0}}=\phi$ on $E_{0}$. Then, there exists an $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^{D}\to \mathbb R^{D}$ such that $\Phi=\phi$ on $E$.
\label{t:Theorem3}
\end{thm}
\section{Chapter 12: Proofs: A revisit of Theorem~\ref{t:mainfd1} (part (1)).}
\setcounter{equation}{0}
The material in this chapter will prove all needed results in Chapter (12).
\subsection{Theorem~\ref{t:lemmareflectionex1}, Theorem~\ref{t:lemmareflectionex2}, Theorem~\ref{t:lemmareflectionex3} and Theorem~\ref{t:lemmareflectionex4}.}
Theorem~\ref{t:lemmareflectionex4} will follow from Theorem~\ref{t:lemmareflectionex1}, Theorem~\ref{t:lemmareflectionex2} and Theorem~\ref{t:lemmareflectionex3}.
We begin with Theorem~\ref{t:lemmareflectionex1}.
{\bf Proof:} Using the Lojasiewicz inequality, (see Chapter (9) ), there exists a Euclidean motion $A$ for which we have
\[
|\phi(x)-A(x)|\leq C_K\delta^{1/\rho_K},\, x\in E.
\]
Without loss of generality, we may replace $\phi$ by $\phi^*:=\phi o A^{-1}$. Hence, we may suppose that
\[
|\phi(x)-x|\leq C_k\delta^{1/\rho_{k}}, \, x\in E.
\]
Now we will employ a similar technique to the proof of Lemma~\ref{l:Lemmareflection1}.
Let $\theta(y)$ be a smooth cut off function on $\mathbb R^D$ such that $\theta(y)=1$ for $|y|\leq 1/100$, $\theta(y)=0$
for $|y|\geq 1/50$ and with $|\nabla\theta(y)|\leq C$ for all $y$. Then set
\[
f(x)=\sum_{z\in E}(\phi(z)-z)\theta(x-z/\tau),\, x\in \mathbb R^D.
\]
The summands are smooth and have pairwise disjoint supports and thus $f$ is smooth. As in the proof of Lemma~\ref{l:Lemmareflection1},
$f(x)=0$ for ${\rm dist}(x,E)\geq 100$, $f(x)=\phi(z)-z$ for $x\in B(z,\frac{\tau}{100})$, $z\in E$ and $|\nabla f(x)|\leq C_k\delta^{1/\rho_k}C\tau^{-1}$.
If $CC_k\delta^{1/\rho_k}\tau^{-1}$ is small enough the map $\Phi(x)=f(x)+x$ is a Slide and thus $\Phi$ is a $C_k\delta^{1/\rho_k}\tau^{-1}$ distorted diffeomorphism and has all the desired properties. Thus, we are done. $\Box$.
We now worry about whether the map $\Phi$ in Theorem~\ref{t:lemmareflectionex1} is proper or improper. Thus we have
Theorem~\ref{t:lemmareflectionex2}
{\bf Proof:}\, Start with $\Phi$ from Theorem~\ref{t:lemmareflectionex1}. If $\Phi$ is proper, then we are done. (Note that
$C_K\delta^{1/\rho_K}\tau^{-1}<\varepsilon$.). If $\Phi$ is improper, then Theorem~\ref{t:lemmareflection3} applies; letting
$\Psi$ be as in Theorem~\ref{t:lemmareflectionex3}, we see that $\Phi o\Psi$ satisfies all the assertions of Theorem~\ref{t:lemmareflectionex2}. $\Box$.
Finally we have Theorem~\ref{t:lemmareflectionex3}:
{\bf Proof:}\, We apply Theorem~\ref{t:lemmareflectionex1}. The map $\Phi$ in Theorem~\ref{t:lemmareflectionex1} is a $C_K\delta^{1/\rho_K}\tau^{-1}$ distorted diffeomorphism; hence is a $C\varepsilon$-distorted diffeomorphism.
If $\Phi$ is proper, then it satisfies all the conditions needed
and we are done. Thus let us check $\Phi$ is proper. By hypothesis, we can find $z_1,...,z_D\in E$ such that
\[
V_D(z_0,...,z_D)\geq \eta^D.
\]
Let $T$ be the one and only affine map that agrees with $\phi$ on $\left\{z_0,...,z_D\right\}$. Since $\phi$ has no negative $\eta$ blocks (by hypothesis), we know that $T$ is proper. Applying Theorem~\ref{t:Theorememotionapprox} (b) with $\delta$ replaced by
$C_K\delta^{1/\rho_K}\tau^{-1}$, we find that $\Phi $ is proper as needed. Note that Theorem~\ref{t:Theorememotionapprox}
applies here since we assumed that $C_K\delta^{1/\rho_K}\tau^{-1}<\eta^D$
for large enough $C_K$ and $\rho_K$ depending only on $K$ and $D$. The proof of Theorem~\ref{t:lemmareflectionex3} is complete. $\Box$.
\medskip
Combining Theorem~\ref{t:lemmareflectionex2} and Theorem~\ref{t:lemmareflectionex3} we are able to give the proof of
Theorem~\ref{t:lemmareflectionex4}.
\medskip
{\bf Proof}\, If $V_D(E)\leq \eta^D$, then Theorem~\ref{t:lemmareflectionex4} follows from Theorem~\ref{t:lemmareflectionex2}. If instead, $V_D(E)>\eta^D$, then Theorem~\ref{t:lemmareflectionex4} follows from Theorem~\ref{t:lemmareflectionex3} $\Box$.
\subsection{The Gluing theorem.}
Given a finite $E$ with some special geometry and a $\delta$ distortion $\phi$ on $E$, we have investigated in detail up to now how to produce smooth $\varepsilon$-distortions which agree with $\phi$ on the set $E$ and which agree
with Euclidean motions and elements of $O(D)$ inside and outside different sets in $\mathbb R^D$. We need now to "Glue" these results together. This is the subject of this section.
We prove:
\begin{thm}
Let $E$ be finite, $\varepsilon>0$, $0<\tau<1$, $\phi:E\to \mathbb R^D$ and suppose $|x-y|\geq \tau>0$ for $x,y\in E$ distinct. Suppose also that
\[
1/2|x-y|\leq |\phi(x)-\phi(y)|\leq 2|x-y|
\]
for $x,y\in E$ distinct. For $i=1,...,4$ and $z\in E$, define
\[
B_i(z)=B\left(z,\exp\left((i-5)/\varepsilon\right)\tau\right).
\]
For each $z\in E$, suppose we are given a $C\varepsilon$-distorted diffeomorphism $\Phi_z$ such that $\Phi_z(z)=\phi(z)$ on $E$ and $\Phi_z$ agrees with a proper Euclidean motion $A_z$ outside $B_{1}(z)$ for each $z\in E$.
Moreover, suppose we are given a $C\varepsilon$-distorted diffeomorphism
$\Psi$ such that $\phi=\Psi$ on $E$ and $\Psi$ agrees with a proper Euclidean motion $A_{z}^*$ in $B_4(z)$ for each $z\in E$. Then there exists a $C’\varepsilon$-distorted diffeomorphism $\Phi$ such that:
\begin{itemize}
\item $\Phi=\Phi_z$ in $B_2(z)$ for $z\in E$ (in particular $\Phi=\phi$ on $E$) and
\item $\Phi=\Psi$ outside $\cup_{z\in E}B_3(z)$.
\end{itemize}
\label{t:lemmagl}
\end{thm}
{\bf Proof:}\, We first investigate how well $A_z(z)$ approximates $A_z^*(z)$. Let $z\in E$. Then $A_z^*(z)=\Psi(z)=\phi(z)$ since $z\in B_4(z)$. Moreover, for any $x\in \mathbb R^D$ such that
$|x-z|=\exp(-4/z)\tau$, we have $x\notin B_1(z)$, hence
$\Phi _z(x)=A_z(x). $ We recall that $\Phi_z$ is a $C\varepsilon$ diffeomorphism and that $\Phi_z(z)=\phi(z)$. Thus,
\[
(1+C\varepsilon)^{-1}|x-z|\leq |\Phi_z(x)-\Phi_z(z)|\leq (1+C\varepsilon)|x-z|
\]
ie,
\[
(1+C\varepsilon)^{-1}\exp(-4/\varepsilon)\tau\leq |A_z(x)-\phi(z)|\leq (1+C\varepsilon)\exp(-4/\varepsilon)\tau. \]
This holds whenever $|x-z|=\exp(-4/\varepsilon)\tau.$ Since $A_z$ is an Euclidean motion, it follows that
\[
|A_z(z)-\phi(z)|\leq C\varepsilon \exp(-4/\varepsilon)\tau.
\]
Recalling that $A_z^*=\phi(z)$, we conclude that for $z\in E$,
\[
|A_z(z)-A_z^*(z)|\leq C \varepsilon \exp(-4/\varepsilon)\tau.
\]
Also, both $A_z$ and $A_z^*$ are proper Euclidean motions and so we obtain for each $z\in E$, a $C\varepsilon$ diffeomorphism $\Phi_z^*$ such that:
\begin{itemize}
\item $\Phi_z^*$ agrees with $A_z$ on $B_2(z)$.
\item $\Phi_z^*$ agrees with $A_z^*$ outside $B_3(z)$.
\end{itemize}
Let us define a map $\Phi:\mathbb R^D \to \mathbb R^D$ in overlapping regions as follows:
\begin{itemize}
\item $\Phi=\Phi_z$ in $B_2(z)$ for $z\in E$.
\item $\Phi=\Phi_z^*$ in $B_4(z)\setminus B_1(z),\, z\in E$.
\item $\Phi=\Psi$ in $\mathbb R^D\setminus \cup_{z\in E} B_3(z)$.
\end{itemize}
Let us check that the above definitions of $\Phi$ in overlapping regions are mutually consistent.
\begin{itemize}
\item On $B_2(z)\cap [B_4(z')\setminus B_1(z')], z,z'\in E$: To have a non empty intersection, we must have $z'=z$ (since otherwise $|z-z'|\geq \tau$). In the region in question,
$\Phi_z^*=A_z$ (since we are in $B_2(z)$)=$\Phi_z$ (since we are outside $B_1(z)$).
\item On $[B_4 (z)\setminus B_1(z)]\cap [\mathbb R^D\setminus \cup_{z'\in E}B_3(z')],\, z\in E.$ $\Psi=A_z^*$(since we are in $B_4(z))=\Phi_z^*$(since we are outside $B_3(z)$).
\item Note that the balls $B_2(z),\, z\in E$ are pairwise disjoint as are the regions $B_4(z)\setminus B_1(z)$, $z\in E$ since $|z-z'|\geq \tau$ for $z,z'\in E$ distinct.
\end{itemize}
Moreover,
$B_2(z)\cap [\mathbb R^D\setminus \cup_{z'\in E} B_3(z')]=\emptyset.$ Thus, we have already discussed all the non empty intersections of the various regions in which $\Phi$ was defined. This completes the verification that $\Phi$ is defined consistently.
Since $\Psi$, $\Phi_z$, $\Phi_z^*$ (each $z\in E$) are $C\varepsilon$-distorted diffeomorphisms, we conclude that
$\Phi:\mathbb R^D\to \mathbb R^D$ is a smooth map and that
\[
(1+C'\varepsilon)^{-1}\leq (\Phi'(x)^T(\Phi'(x))\leq 1+C'\varepsilon,\, x\in \mathbb R^D.
\]
We have also $\Phi=\Phi_z$ on $B_2(z)$ for each $z\in E$ and $\Phi=\Psi$ outside $\cup_{z\in E}B_3(z)$ by definition of $\Phi$.
To complete the proof of the Gluing theorem, it remains only to check that $\Phi:\mathbb R^D\to \mathbb R^D$ is one to one and onto. To see this, we argue as follows. Recall that the $A_z$ and $A_z^*$ are Euclidean motions and that
\[
|A_z-A_z^*|\leq C\varepsilon\exp(-4/\varepsilon)\tau=C\varepsilon{\rm radius}(B_1(z)),\, z\in E.
\]
Outside $B_2(z)$, we have $\Phi_z=A_z$. Since $\Phi_z:\mathbb R^D\to \mathbb R^D$ is one to one and onto, it follows that
$\Phi_z: B_2(z)\to A_z(B_2(z))$ is one to one and onto. Consequently, since $\Phi=\Phi_z$ on $B_2(z)$, we have that:
\begin{itemize}
\item $\Phi: B_2(z)\to A_z (B_2(z))$ is one to one and onto for each $z\in E$.
\end{itemize}
Next, recall that $\Phi_z^*=A_z$ on $B_2(z)$, in particular
\[
\Phi_z^*: B_2(z)\to A_z( B_2(z))
\]
is one to one and onto. Also, $\Phi_z^*:\mathbb R^D\to \mathbb R^D$ is one to one and onto and $\Phi_z^*=A_z^*$ outside $B_4(z)$ so it follows that
\[
\Phi_z^*:B_4(z)\to A_z^*(B_4(z))
\]
is one to one and onto. Consequently
\[
\Phi_z^*:B_4(z)\setminus B_2(z)\to A_z^{*}(B_4(z))\setminus A_z (B_2(z))
\]
is one to one and onto. Since $\Phi=\Phi^{*}$ on $B_4(z)\setminus B_2(z)$, we conclude that
\begin{itemize}
\item $\Phi: B_4(z)\setminus B_2(z)\to A_z^* (B_4(z))\setminus A_z (B_2(z))$ is one to one and onto for $z\in E$.
\end{itemize}
Next, recall that $\Psi:\mathbb R^D\to\mathbb R^D$ is one to one and onto and that $\Psi=A_z^*$ on $B_4(z)$ for each
$z\in E$. Hence,
\[
\Psi:\mathbb R^D\setminus \cup_{z\in E}B_4(z)\to \mathbb R^D\setminus \cup_{z\in E}A_z^* (B_4(z))
\]
is one to one and onto. Since $\Phi=\Psi$ on $\mathbb R^D\setminus \cup_{z\in E}B_4(z)$, we conclude that
\begin{itemize}
\item
\[
\Phi:\mathbb R^D\setminus \cup_{z\in E}B_4(z) \to \mathbb R^D\setminus \cup_{z\in E}A_z^*(B_4(z))
\]
is one to one and onto.
\end{itemize}
Recall that $B_2(z)\subset B_4(z)$ for each $z\in E$ and that the balls $B_4(z), z\in E$ are pairwise disjoint. Hence the following sets constitute a partition of $\mathbb R^D$:
\begin{itemize}
\item $B_2(z)$ (all $z\in E$); $B_4(z)\setminus B_2(z)$ (all $z\in E$); $\mathbb R^D\setminus \cup_{z\in E}B_4(z)$.
\end{itemize}
Moreover, we recall that $A_z,A_z^*$ are Euclidean motions, $B_2(z), B_4(z)$ are balls centered at $z$ with radii $\exp(-3/\varepsilon)\tau$ and $\exp(-1/\varepsilon)\tau$ respectively and
\[
|A_z(z)-A_z^*(z)|\leq C\varepsilon\exp(-4/\varepsilon)\tau.
\]
It follows that $A_z (B_2(z))\subset A_z^* (B_4(z))$ for $z\in E$. Moreover, $A_z^*=\phi(z)$ for $z\in E$. For $z,z'\in E$ distinct, we have
\[
|\phi(z)-\phi(z')|\geq 1/2|z-z'|\geq 1/2\tau.
\]
Since, $A_z^* (B_4(z))$ is a ball of radius $\exp(-1/\varepsilon)\tau$ centered at $\phi(z)$ for each $z\in E$, it follows that the balls $A_z^* (B_4(z))\, (z\in E)$ are pairwise disjoint. Therefore the
following sets constitute a partition of $\mathbb R^D$:
\begin{itemize}
\item $A_z (B_2(z))(z\in E)$,\, $A_z* (B_4(z))\setminus A_z (B_2(z))(z\in E)$,\, $\mathbb R^D\setminus \cup_{z\in E}A_z^*( B_4(z))$.
\end{itemize}
In view of the 5 bullet points regarding the partitions of $\mathbb R^D$ and the bijective character of $\Phi$ restricted appropriately, we conclude that $\Phi:\mathbb R^D\to\mathbb R^D$ is one to one and onto.
The proof of the Gluing theorem is complete. $\Box$.
\subsection{Hierarchical clusterings of finite subsets of $\mathbb R^D$ revisted.}
We are almost ready for the proofs of Theorem~\ref{t:Theorem2a} and Theorem~\ref{t:Theorem2b}. We need one more piece of machinery,
Hierarchical clusterings which have seen already in Chapter (6). We need the following modified form of the result there whose proof is identical.
\begin{lem}
Let $S\subset \mathbb R^D$ with $2\leq {\rm card}(S)\leq K$. Let $\varepsilon>0$. Then there exists $\tau$ satisfying
\[\exp(-C_K/\varepsilon){\rm diam}(S)\leq \tau\leq \exp(-1/\varepsilon){\rm diam}(S)\]
and a partition of $S$ into subsets $S_{\nu}(\nu=1,...,\nu_{(max)})$ with the following properties:
\begin{itemize}
\item ${\rm card}(S_{\nu})\leq K-1,\, \forall \nu.$
\item ${\rm diam}(S_{\nu})\leq \exp(-5/\varepsilon)\tau,\, \forall \nu.$
\item ${\rm dist}(S_{\nu}, S_{\nu'})\geq \tau,\, \forall \nu.$
\label{l:clustering}
\end{itemize}
\end{lem}
\subsection{Proofs of Theorem~\ref{t:Theorem2a} and Theorem~\ref{t:Theorem2b}.}
We begin with the
\medskip
{\bf Proof of Theorem~\ref{t:Theorem2a}}:\, We use induction on $K$. If $K=1$, the theorem holds trivially. For the induction step
we will fix $K\geq 2$ and assume that our result holds for $K-1$. We now establish the theorem for the given
$K$. Thus, we are making the following inductive assumptions. For suitable constants $c_{\rm old}$, $C_{\rm old}', C_{\rm old}''$ depending only on
$D,K$ the following holds: Inductive hypothesis: Suppose that $0<\varepsilon<c_{\rm old}$, define
$\eta_{\rm old}=\exp(-C_{\rm old}'/\varepsilon)$ and $\delta_{\rm old}=\exp(-C_{\rm old}''/\varepsilon)$. Let $\phi^*:S^*\to \mathbb R^D$ with $S^*\subset \mathbb R^D$ and ${\rm card}(S^*)\leq K-1$. Suppose \[
(1+\delta_{\rm old})^{-1}|x-y|\leq |\phi^*(x)-\phi^*(y)|\leq (1+\delta_{\rm old})|x-y|,\, x,y\in S. \]
Then the following holds: If $\phi^*$ has no negative $\eta_{\rm old}$ block, then there exists a proper $\varepsilon$-distorted diffeomorphism $\Phi^*:\mathbb R^D\to \mathbb R^D$ such that $\phi^*=\Phi^*$ on $S$ and $\Phi^*$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^D:{\rm dist}(x,S^*)\geq 10^4{\rm diam}(S^*)\right\}.
\]
Now let $L$, $L'$, $L''$ be positive constants to be fixed later. (Eventually we will let them depend on $D$ and $K$ but not yet). Now suppose that
\begin{itemize}
\item[(1)] $0<\varepsilon<L$.
\item[(2)] We set $\eta=\exp(-L'/\varepsilon)$
\item[(3)] and we set $\delta=\exp(-L''/\varepsilon)$.
\item[(4)] Let $\phi:S\to \mathbb R^D$
\item[(5)] where $S\subset \mathbb R^D$
\item[(6)] ${\rm card}(S)=K$ and
\item[(7)] $(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|,\, x,y\in S.$
\item[(8)] Suppose that $\phi$ has a negative $\eta$ block.
\end{itemize}
We will construct a proper $C\varepsilon$-distorted diffeomorphism
$\Phi$ that agrees with $\phi$ on $S$ and with a proper Euclidean motion away from $S$. To do, so we first apply the clustering lemma,
Lemma~\ref{l:clustering}. Recall that ${\rm card}(S)=K\geq 2$ so the clustering lemma applies. Let $\tau$ and $S_{\nu}(\nu=1,...,\nu_{\rm max})$ be as in the clustering lemma. Thus,
\begin{itemize}
\item[(9)] $S$ is the disjoint union of $S_{\nu}(\nu=1,...,\nu_{\rm max})$.
\item[(10)] ${\rm card}(S_{\nu})\leq K-1$ for each $\nu(\nu=1,...,\nu_{\rm max})$.
\item[(11)] ${\rm diam}S_{\nu}\leq \exp(-5/\varepsilon)\tau$ for each $\nu(\nu=1,...,\nu_{\rm max})$.
\item[(12)] ${\rm dist}(S_{\nu}, S_{\nu'})\geq \tau{\rm diam}(S)$, for $\nu\neq \nu'$,
for each $\nu,\nu'(\nu,\nu'=1,...,\nu_{\rm max})$.
\item[(13)] $\exp(-C_K/\varepsilon){\rm diam}(S)\leq \tau\leq \exp(-1/\varepsilon){\rm diam}(S).$
\item[(14)] Assuming that $L'>C'_{\rm old}$ and $L''>C''_{\rm old}$, we see that $\eta<\eta_{\rm old}$ and $\delta<\delta_{\rm old}$. Hence by (7) and (8) we have:
\item[(15)] $\phi|S_\nu$ does not have an $\eta_{\rm old}$ block and
\[
(1+\delta_{\rm old})^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta_{\rm old})|x-y|,\, x,y\in S_{\nu} \]
Consequently (10) and the induction hypothesis
\item[(16)] produce a proper $\varepsilon$-distorted diffeomorphism $\Phi_{\nu}:\mathbb R^D\to \mathbb R^D$ such that
\item[(17)] $\Phi_{\nu}=\phi$ on $S_{\nu}$ and
\item[(18)] $\Phi_{\nu}=A_{\nu}$ on
$\left\{x\in \mathbb R^D: {\rm dist}(x, S_{\nu})\geq 10^4{\rm diam}(S_{\nu})\right\}$
where $A_{\nu}$ is a proper Euclidean motion.
\end{itemize}
Next, for each $\nu$ $(1\leq \nu\leq \nu_{{\rm max}})$, we pick a representative $y_{\nu}\in S_{\nu}$. Define
\begin{itemize}
\item[(19)] $E=\left\{y_{\nu}:\, 1\leq \nu\leq \nu_{{\rm max}}\right\}$.
\item[(20)] Thus $E\subset \mathbb R^D$, \, $2\leq {\rm card}(E)\leq K$,
\item[(21)] $\frac{1}{2}{\rm diam}(S)\leq {\rm diam}(E)\leq {\rm diam}(S)$ and by (12) and (13),
\item[(22)]
\[
|x-y|\geq \tau \geq \exp(-C_K/\varepsilon){\rm diam}(S)
\]
for $x,y\in E$ distinct.
\end{itemize}
We prepare to apply a rescalled version of Theorem~\ref{t:lemmareflectionex4}. For easier reading, let us note the assumptions and conclusions with the same notation there as we will need to verify and use them here.
\begin{itemize}
\item {\bf Assumptions on E}.
\item[(23)] ${\rm card}(E)\leq K$
\item[(24)] $|x-y|\geq \tau$ for $x,y\in E$ distinct.
\item {\bf Assumptions on $\phi$.}
\item[(25)] \[
(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|,\ , x,y\in E.
\]
\item[(26)] $\phi$ has no negative $\eta$ blocks.
\item {\bf Assumptions on the parameters.}
\item[(27)] $0<\eta<c\varepsilon\tau/{\rm diam}(E)$ for small enough $c$
\item[(28)] $C_K\delta^{1/\rho_K}\tau^{-1}{\rm diam}(E)\leq {\rm min}(\varepsilon,\eta^D)$ for large enough $C_K, \rho_K$ depending only on $K$ and $D$.
\item {\bf Conclusion.}
\item[(28a)] There exists a proper $C\varepsilon$-distorted diffeomorphism $\Psi:\mathbb R^D\to \mathbb R^D$ with the following properties:
\item[(29)] $\Psi=\phi$ on $E$.
\item[(30)] $\Psi$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^D:\, {\rm dist}(x,E)\geq 1000{\rm diam}(E)\right\}.
\]
\item[(31)] For each $z\in E$, $\Phi$ agrees with a proper Euclidean motion on $B(z,\tau/1000)$.
\end{itemize}
Let us check that our present $\phi:E\to \mathbb R^D$, $\delta, \varepsilon, \eta, \tau$ satisfy the hypotheses of
Theorem~\ref{t:lemmareflectionex4}. In fact: Hypothesis (23) is (20). Hypothesis (24) is (22),
Hypothesis (25) is immediate from (7).
Hypothesis (26) is immediate from (8).
Let us check hypotheses (27) and (28). From
(13) and (21) we have
\begin{itemize}
\item[(32)]
\[
\exp(-C_K/\varepsilon)\leq \tau/{\rm diam}(E). \]
Hence (27) and (28) will follow if we can show that the following two things:
\item[(33)] $0<\eta<c\exp(-C_K/\varepsilon)$ for small enough $c$.
\item[(34)] $C_K\delta^{1/\rho_k}\exp(C_K/\varepsilon)\leq {\rm min}(\varepsilon,\eta^D)$.
However, we now recall that $\delta$ and $\eta$ are defined by (2) and (3). Thus (33) holds provided
\item[(35)] $L<c_K$ for small enough $c_K$ and $L'>C_K$ for large enough $C_K$.
\item[(36)] Similarly (34) holds provided $L<c_K$ for small enough $c_K$ and $1/\rho_K L''-C_K\geq {\rm max}(1, DL')$.
Assuming we can choose $L,L',L''$ as we wish, we have (33) and (34) hence also (27) and (28). This completes our verification of the hypothesis of Theorem~\ref{t:lemmareflectionex4} for our present $\Phi$ and $E$. Applying Theorem~\ref{t:lemmareflectionex4}, we now obtain a proper $C\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$ satisfying (28a-31). For each $z\in E$, we now define a proper $\varepsilon$-distorted diffeomorphism $\Phi_z$ by setting:
\item[(37)] $\Phi_z=\Phi_{\nu}$ if $z=y_{\nu}$. (Recall (16), (19) and note that the $y_{\nu}$, $1\leq \nu\leq \nu_{{\rm max}}$ are distinct). From (17), (18), (37) we have the following:
\item[(38)] $\Phi_z=\phi$ on $S_{\nu}$ if $z=y_{\nu}$. In particular,
\item[(39)] $\Phi_z(z)=\phi(z)$ for each $z\in E$. Also
\item[(40)] $\Phi_z=A_z$ (a proper Euclidean motion) outside $B(z, 10^5{\rm diam}(S_{\nu}))$ if $z=y_{\nu}$. Recalling
(11), we see that
\item[(41)] $\Phi_z=A_z$ (a proper Euclidean motion) outside $B(z, 10^5\exp(-5/\varepsilon)\tau)$. We prepare to apply Theorem~\ref{t:lemmagl}, the Gluing lemma to the present $\phi$, $E$, $\Phi_z(z\in E)$, $\Psi$, $\varepsilon$ and $\tau$. Let us check the hypotheses of the Gluing lemma. We have $\phi:E\to \mathbb R^D$ and
$1/2|x-y|\leq |\phi(x)-\phi(y)|\leq 2|x-y|$ for $x,y\in E$ thanks to (7) provided
\item[(41a)] $L\leq 1$ and $L''\geq 10$. See also (3). Also $|x-y|\geq \tau$ for $x,y\in E$ distinct, see (22). Moreover, for each $z\in E$, $\Phi_z$ is a proper $\varepsilon$ distorted diffeomophism (see (16) and (37)). For each $z\in E$, we have $\Phi_z(z)=\phi(z)$ by (39) and
$\Phi_z=A_z$ (a proper Euclidean motion) outside $B_1(z)=B(z,\exp(-4/\varepsilon)\tau)$, see (41). Here, we assume that,
\item[(42)] $L\leq c_k$ for a small enough $c_k$.
Next, recall that $\Psi$ satisfies (28a-31). Then $\Psi$ is a $C\varepsilon$-distorted diffeomorphism, $\Psi=\Phi$ on $E$ and for $z\in E$, $\Psi$ agrees with a proper Euclidean motion $A_z^*$ on $B(z,\frac{\tau}{1000})$, hence on
$B_4(z)=B(z, \exp(-1/\varepsilon)\tau)$. Here, again, we assume that $L$ satisfies (42). This completes the verification of the hypotheses of the Gluing lemma. Applying that lemma, we obtain:
\item[(43)] a $C' \varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$ such that
\item[(44)] $\Phi=\Phi_z$ on $B_2(z)=B(z,\exp(-3/\varepsilon)\tau)$, for each $z\in E$ and
\item[(45)] $\Phi=\Psi$ outside $\cup_{z\in E}B_3(z)=\cup_{z\in E}B(z,\, \exp(-2/\varepsilon)\tau).$
Since $\Psi$ is proper, we know that
\item[(46)] $\Phi$ is proper.
Let $z=y_{\mu}\in E$. Then (11) shows that $S_{\mu}\subset B(z,\, \exp(-5/\varepsilon)\tau)$ and therefore (44) yields
$\Phi=\Phi_z$ on $S_{\mu}$ for $z=y_{\mu}$. Together, with (38), this yields $\Psi=\phi$ on $S_{\mu}$ for each $\mu (1\leq \mu\leq \mu_{\rm max})$. Since the $S_{\mu}(1\leq \mu\leq \mu_{\rm max})$ form a partition of $S$, we conclude that
\item[(47)] $\Phi=\phi$ on $S$. Moreover, suppose that
\[
{\rm dist}(x, S)\geq 10^4{\rm diam}(S).
\]
Then $x$ does not belong to $B(z, \, \exp(-2/\varepsilon)\tau)$ for any $z\in E$ as we see from (13). (Recall that $E\subset S$).
Consequently (45) yields $\Phi(x)=\Psi(x)$ and therefore (30) tells us that $\Psi(x)=A_{\infty}(x)$. Since
${\rm dist}(x, S)\geq 10^4{\rm diam}(S)$, we have
\[
{\rm dist}(x, E)\geq {\rm dist}(x, S)\geq 10^4{\rm diam}(S)\geq 10^3{\rm diam E}.
\]
Hence (30) applies. Thus,
\item[(48)] $\Phi$ agrees with a proper Euclidean motion $A_{\infty}^*$ on
\[
\left\{x\in \mathbb R^D:\, {\rm dist}(x, S)\geq 10^4{\rm diam}(S)\right\}.
\]
Collecting our results (43), (46), (47), (48), we have the following:
\item[(49)] There exists a proper $C’\varepsilon$-distorted diffeomorphism $\Phi$ such that $\Phi=\phi$ on $S$ and $\Phi$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^D:\, {\rm dist}(x, S)\geq 10^4{\rm diam}(S)\right\}.
\]
We have established (49) assuming that the small constant $L$ and the large constants $L'$, $L''$ satisfy the conditions (14), (35), (36), (41a), (42). By picking $L$ first, $L'$ second and $L''$ third, we can satisfy all those conditions with $L=c_K$, $L'=C'_K$,
$L''=C''_K$. With these $L, L', L''$ we have shown that (1)-(8) together imply that (49) holds. Thus, we have proven the following:
\item[(50)] For suitable constants $C$, $C_K$, $C_K'$, $C_K''$ depending only on $D$ and $K$ the following holds: Suppose that
$0<\varepsilon<c_k$. Set $\eta=\exp(-C_K'/\varepsilon)$ and $\delta=\exp(-C_K''/\varepsilon)$. Let $\phi:S\to \mathbb R^D$
with ${\rm card}(S)=K$, $S\subset \mathbb R^D$. Assume that
\[
(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|, \, x, y\in S.
\]
Then if $\phi$ has no negative $\eta$ block, then there exists a proper $C\varepsilon$-distorted diffeomorphism
$\Phi:\mathbb R^D\to \mathbb R^D$ such that $\phi=\Phi$ on $S$ and $\Phi$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^D:\, {\rm dist}(x, S)\geq 10^4{\rm diam}(S)\right\}.
\]
Taking $\varepsilon$ to be $\varepsilon/C$, we thus deduce:
\item[(51)] For suitable constants $C_{{\rm new}}$, $C_{{\rm new}}'$, $C_{{\rm new}}''$ depending only on $D$ and $K$ the following holds: Suppose that
$0<\varepsilon<c_{\rm new}$. Set $\eta=\exp(-C_{{\rm new}}'/\varepsilon)$ and $\delta=\exp(-C_{{\rm new}}''/\varepsilon)$. Let $\phi:S\to \mathbb R^D$
with ${\rm card}(S)=K$, $S\subset \mathbb R^D$. Assume that
\[
(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|, \, x, y\in S.
\]
Then if $\phi$ has no negative $\eta$ block, then there exists a proper $\varepsilon$-distorted diffeomorphism
$\Phi:\mathbb R^D\to \mathbb R^D$ such that $\phi=\Phi$ on $S$ and $\Phi$ agrees with a proper Euclidean motion on
\[
\left\{x\in \mathbb R^D:\, {\rm dist}(x, S)\geq 10^4{\rm diam}(S)\right\}.
\]
\end{itemize}
Thats almost Theorem~\ref{t:Theorem2a} except we are assuming ${\rm card}(S)=K$ rather than ${\rm card}(S)\leq K$. Therefore we proceed as follows: We have our result (50) and we have an inductive hypothesis. We now take
$C'={\rm max}(C_{{\rm old}}', C_{{\rm new}}')$, $C''={\rm old}(C_{{\rm max}}'', C_{{\rm new}}'')$ and
$c'={\rm min}(c_{{\rm old}}', c_{{\rm new}}')$. These constants are determined by $D$ and $K$. We now refer to
$\eta_{{\rm old}}$, $\eta_{{\rm new}}$, $\eta$, $\delta_{{\rm old}}$, $\delta_{{\rm new}}$, $\delta$ to denote
$\exp(-C_{{\rm old}}'/\varepsilon)$, $\exp(-C_{{\rm new}}'/\varepsilon)$, $\exp(-C'/\varepsilon)$, $\exp(-C_{{\rm old}}''/\varepsilon)$, $\exp(-C_{{\rm new}}''/\varepsilon)$, $\exp(-C''/\varepsilon)$ respectively.
Note that $\delta\leq \delta_{{\rm old}}$, $\delta\leq \delta_{{\rm new}}$, $\eta\leq \eta_{{\rm old}}$ and $\eta\leq \eta_{{\rm new}}$. Also
if $0<\varepsilon<c$, then $0<\varepsilon<c_{{\rm old}}$ and $0<\varepsilon<c_{{\rm new}}$. If
\[
(1+\delta)^{-1}|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|, x,y\in S
\]
then the same holds for $\delta_{{\rm old}}$ and $\delta_{{\rm new}}$. Also if $\phi$ has no negative $\eta$-block, then it has no negative
$\eta_{{\rm old}}$-block and it has no negative $\eta_{{\rm new}}$-block. Consequently by using (51) and the induction hypothesis, we have proved Theorem~\ref{t:Theorem2a}. $\Box$
\medskip
We now give
\medskip
{\bf The Proof of Theorem~\ref{t:Theorem2b}}:\, To see this, we simply observe that increasing $C_K''$ in the Theorem~\ref{t:Theorem2a} above merely weakens the result so we may increase $C_K''$ and achieve that $0<\delta<c\eta^D$ for small enough $c$ and $0<\delta<\varepsilon$. The desired result then follows by using Theorem~\ref{t:cextensionblock2}. $\Box$
\subsection{Proofs of Theorem~\ref{t:Theorem3} and Theorem~\ref{t:Theorem4}.}
It remains to give the proofs of Theorem~\ref{t:Theorem3} and Theorem~\ref{t:Theorem4}.
\medskip
{\bf The Proof of Theorem~\ref{t:Theorem3}}:\, Pick $c_K$, $C_K$, $C_K''$ as in Theorem~\ref{t:Theorem2a} and Theorem~\ref{t:Theorem2b}. Let $\delta$ and $\eta$ be as in Theorem~\ref{t:Theorem2a} and let us take $S_0=\left\{x,y\right\}$. Then we see that
\[
(1+\delta)|x-y|\leq |\phi(x)-\phi(y)|\leq (1+\delta)|x-y|, x, y\in S.
\]
Now, if $\phi$ has no negative $\eta$-block, then by Theorem~\ref{t:Theorem2a}, $\Phi$ exists with the properties claimed. Similarly,
if $\phi$ has no positive $\eta$-block, then applying Theorem~\ref{t:Theorem2a} to the map $\phi o({\rm reflection})$ we obtain the $\Phi$ we need with the properties claimed. Suppose that $\phi$ has a positive $\eta$-block $(x_0,...x_D)$ and a negative $\eta$-block $(y_0,...y_D)$.
Then by Theorem~\ref{t:Theorem2b}, $\phi|_{\left\{x_0,...,x_D, y_0,...,y_D\right\}}$ cannot be extended to a $\delta$ distorted diffeomorphism
$\Phi:\mathbb R^D\to \mathbb R^D$. Indeed, the $\eta$-block $(x_0,...,x_D)$ forces any such $\Phi$ to be proper while the $\eta$-block $(y_0,...y_D)$ forces $\Phi$ to be improper. Since ${\rm card}\left\{x_0,...,x_D,y_0,...y_D\right\}\leq 2(D+1)$, the proof of Theorem~\ref{t:Theorem3} is complete. $\Box$
\medskip
{\bf The Proof of Theorem~\ref{t:Theorem4}}:\, Take $k\leq D+1$ and apply Theorem~\ref{t:Theorem2a}. Let $\eta$ and $\delta$ be determined by
$\varepsilon$ as in Theorem~\ref{t:Theorem2a}. If $\phi$ has no negative $\eta$-block then applying Theorem~\ref{t:Theorem2a} to $\phi$ or
$\phi o({\rm reflection})$, we see that $\phi$ extends to a $\varepsilon$-distorted diffeomorphism $\Phi:\mathbb R^D\to \mathbb R^D$.
However since $({\rm card})(S)\leq D+1$, the only possible (negative or positive) $\eta$-block for $\phi$ is all of $S$. Thus either $\phi$ has a negative $\eta$-block or it has no positive $\eta$-block. $\Box$
\section{Chapter 13: Smooth extensions of smooth distortions: Introduction.}
\setcounter{equation}{0}
Up until now we have been extending near distortions from finite subsets of $\mathbb R^D$. In doing so, we have discovered in particular, quantitative
relationships between distortion constants $\varepsilon$ and $\delta$ : (a) First from \cite{FD1}: $\delta=c\varepsilon^{c'}$ where $c,c'$ depend on $D$ and are small enough and (b) Second from \cite{FD2} $\delta=\exp\left(-\frac{C_K}{\varepsilon}\right)$ where the constant $C_K$ depends on $D$ and
the constant $K$ given in Chapter (4) and chosen at the same time as $D$. As part of the work in this chapter, we will achieve the optimal
$c\delta=\varepsilon$, $c$ depending bon $D$.
\subsection{Class of sets $E$.}
Given a compact set $X\subset \mathbb R^D$ and given an $x \in {\mathbb R}^{D}$, we write for convenience $d(x):={\rm dist}(x, X)$.
Let $U\subset \mathbb R^D$ be an open set. We recall that given $m\geq 1$ an integer, $C^m(U)$ is the space of functions $f:U\to \mathbb R^D$ where the derivatives $f^{i},\, i=1,...k$ exist and are continuous and
$C^{\infty}(U)$ is the space of functions $f:U\to \mathbb R^D$ where $f$ has derivatives of all orders. for some open set $U\subset \mathbb R^D$ and $m\geq 1$ an integer.
A compact set $X\subset U$ is admissible if the set $X$ has the following geometry rendering it "not too thin".
For certain positive constants $c_{0}$, $c_{1}$, $c_{2}$ depending on $D$, the following holds:
Let $x \in {\mathbb R}^{D} \backslash X$. If $d(x) \leq c_{0} \, {\rm diam}(X)$, then there exists a ball $B(z,r) \subset X$ such that $| z-x|\leq c_{1} \, d(x)$ and $r \geq c_{2} \, d(x)$.
When we talk to a set $E$, we now mean an admissible set.
When we speak to $\varepsilon$ "small enough" moving forward, we assume that it is smaller than a small positive constant determined by $c_i$, $i=0,1,2$ and $D$.
Examples of admissible sets $E'$ are the following: (1) Balls with not too small radii, (2) convex sets $X$ with the following property: There exists at least one ball $B$ with not too large radius so that
$B\subset X$ and at least one ball $ B_1$ with not too small radius so that $X\subset B_1$. Examples of compact sets which are not admissible. (1) Rods with small enough thickness. (2) Sets with isolated points.
Here is our main result of this chapter.
\subsection{Main result.}
\begin{thm}
\label{t:0.1}
Let $U\subset \mathbb R^D$ be an open set. Let $E'\subset U\subset \mathbb R^D$ be admissible. Let $\varepsilon$ be small enough.
Let $\phi:U\to \mathbb R^D$ be a $C^1(U)$ map satisfying for all $x,y\in E'$,
\begin{equation}
(1-\varepsilon) \left| x-y \right| \leq \left| \phi(x) - \phi(y) \right| \leq (1+\varepsilon) \left| x-y \right|.
\label{e:6epsilondistortion}
\end{equation}
There exists a $C^{1}$ map $\Phi: {\mathbb R}^{D} \to {\mathbb R}^{D}$ and a Euclidean motion $A: {\mathbb R}^{D} \to {\mathbb R}^{D}$, with the following properties:
\begin{itemize}
\item \label{i:0.4} \textit{$(1-c'\varepsilon)\left| x-y \right| \leq \left| \Phi(x) - \Phi(y) \right| \leq (1+c'\varepsilon)\left| x-y \right|$ for all $x,y \in {\mathbb R}^{D}$}.
\item \label{i:0.5} \textit{$\Phi = \phi$ in a neighborhood of $E'$}.
\item \label{i:0.6} \textit{$\Phi = A$ outside $\left\{ x \in {\mathbb R}^{n}: d(x) < c_{0} \right\}$}.
\item \label{i:0.7} \textit{$\Phi: {\mathbb R}^{D} \to {\mathbb R}^{D}$ is one-to-one and onto}.
\item \label{i:0.8} \textit{If $\phi \in C^{m}(U)$ for some given $m>1$, then $\Phi \in C^{m}\({\mathbb R}^{D}\)$}.
\item \label{i:0.9} \textit{If $\phi \in C^{\infty}(U)$, then $\Phi \in C^{\infty}({\mathbb R}^{D})$}.
\end{itemize}
\label{t:section6exten}
\end{thm}
Here the constant $c'$ depends on $c_i, D$, $i=0,1,2$.
\subsection{Some remarks regarding Theorem~\ref{t:section6exten}.}
\begin{itemize}
\item[(1)] Notice that Theorem~\ref{t:section6exten} allows $\phi$ (extended to the map $\Phi$) to be smooth. $E$ is not finite.
\item[(2)] The maps $\phi$ and $\Phi$ have distortion constants $\varepsilon$ and respectively $c'\varepsilon$. This is optimal.
\item[(3)] A natural question to ask regarding (2) is to classify all sets $E\subset \mathbb R^D$ which yield the optimal distortions $\varepsilon$ and respectively $c\varepsilon$. This question has been studied partially.
The geometric properties on some of the sets are not too different from ours in Theorem~\ref{t:section6exten} but finite sets are also allowed. There are often no demands for smooth extensions which makes the problems studied then different to ours in this paper.
\end{itemize}
We now proceed to prove Theorem~\ref{t:section6exten}.
\section{Chapter 14: Smooth extensions of smooth distortions: First results.} \label{s:1}
\setcounter{thm}{0}
\setcounter{equation}{0}
\begin{lem}
\label{l:1.1}
\addcontentsline{toc}{subsection}{Lemma 1.1}
Let $B(z,r) \subset E$. Then there exists a Euclidean motion $A$, such that for every $K \geq 1$, and for every
\begin{equation}
\label{eq:1.1}
y \in B(z, Kr) \cap E, \text{ we have } \left| \phi(y) - A(y) \right| \leq CK^{2}\varepsilon r.
\end{equation}
\end{lem}
\begin{proof}
Without loss of generality, we may assume $z=0$, $r=1$, and $\phi(0)=0$. Let $e_{1},\cdots,e_{n}$ be the unit vector in ${\mathbb R}^{n}$.
We have $1-\varepsilon \leq \left| \phi(e_{i}) \right| \leq 1+\varepsilon$ for each $i$, and $(1-\varepsilon)\sqrt{2} \leq \left| \phi(e_{i}) - \phi(e_{j}) \right| \leq (1+\varepsilon)\sqrt{2}$ for $i \neq j$. Since $-2\phi(e_{i})\cdot\phi(e_{j}) = \left| \phi(e_{i}) - \phi(e_{j}) \right|^{2} - \left| \phi(e_{i}) \right|^{2} - \left| \phi(e_{j}) \right|^{2}$, it follows that
\begin{equation}
\label{eq:1.2}
\left| \phi(e_{i}) \cdot \phi(e_{j}) - \delta_{ij} \right| \leq C\varepsilon \text{ for each $i,j$, where $\delta_{ij}$ is the Kronecker delta function}.
\end{equation}
Let $A \in {\mathcal O}(n)$ be the orthogonal matrix whose columns arise by applying the Gram-Schmidt process to the vectors $\phi(e_{1}),\,\phi(e_{2}),\,\cdots,\,\phi(e_{n})$. Then \eqref{eq:1.2} implies the estimate
\[
\left| \phi(e_{i}) - Ae_{i} \right| \leq C\varepsilon \text{ for each $i$}.
\]
Replacing $\phi$ by $A^{-1}\circ\phi$, we may therefore assume without loss of generality that
\begin{equation}
\label{eq:1.3}
\left| \phi(e_{i}) - e_{i} \right| \leq C\varepsilon \text{ for each $i$}.
\end{equation}
Assume \eqref{eq:1.3}, and recalling that $\phi(0) = 0$, we will prove \eqref{eq:1.1} with $A = I$. Thus, let $K \geq 1$, and let $y \in B(0,K) \cap E$. We have $(1-\varepsilon)\left| y \right| \leq \left| \phi(y) \right| \leq (1+\varepsilon)\left| y \right|$, hence
\begin{equation}
\label{eq:1.4}
\Big| | \phi(y) | - | y | \Big| \leq \varepsilon K.
\end{equation}
In particular,
\begin{equation}
\label{eq:1.5}
\left| \phi(y) \right| \leq zK.
\end{equation}
We have
\[
(1-\varepsilon)\left| y-e_{i} \right| \leq \left| \phi(y)-\phi(e_{i}) \right| \leq (1+\varepsilon) \left| y-e_{i} \right| \text{ for each $i$}.
\]
Hence, by \eqref{eq:1.3} and \eqref{eq:1.5}, we have
\begin{equation}
\label{eq:1.6}
\Big| |\phi(y)-e_{i}| - |y-e_{i}| \Big| \leq C\varepsilon K \text{ for each $i$}.
\end{equation}
From \eqref{eq:1.4}, \eqref{eq:1.5}, \eqref{eq:1.6}, we see that
\begin{equation}
\label{eq:1.7}
\Big| |\phi(y)|^{2} - |y|^{2} \Big| = \Big( |\phi(y)| + |y| \Big) \cdot \Big| |\phi(y)| - |y| \Big| \leq CK^{2}\varepsilon,
\end{equation}
and similarly,
\begin{equation}
\label{eq:1.8}
\Big| |\phi(y)-e_{i}|^{2} - |y-e_{i}|^{2} \Big| \leq CK^{2}\varepsilon.
\end{equation}
Since
\begin{align*}
-2\phi(y) \cdot e_{i} &= |\phi(y)-e_{i}|^{2} - |\phi(y)|^{2} - 1 \text{ and} \\
-2y \cdot e_{i} &= |y-e_{i}|^{2} - |y|^{2} - 1,
\end{align*}
it follows from \eqref{eq:1.7} and \eqref{eq:1.8} that
\[
\Big| \big[ \phi(y) - y \big] \cdot e_{i} \Big| \leq CK^{2}\varepsilon \text{ for each $i$}.
\]
Consequently, $|\phi(y) - y| \leq CK^{2}e$, proving \eqref{eq:1.1} and $A =$ identity.
\end{proof}
When we apply Lemma \ref{l:1.1}, we will always take $K$ to be a controlled constant.
The proof of the following Lemma is straightforward, and may be left to the reader. Note that $\nabla A(x)$ is independent of $x \in {\mathbb R}^{n}$ when $A: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is an affine map. We write $\nabla A$ in this case without indicating $x$.
\begin{lem}
\label{l:1.2}
\addcontentsline{toc}{subsection}{Lemma 1.2}
Let $B(z,r)$ be a ball, let $A: {\mathbb R}^{n} \to {\mathbb R}^{n}$ be an affine map, and let $M > 0$ be a real number. If $|A(y)| \leq M$ for all $y \in B(z,r)$, then $|\nabla A| \leq CM/r$, and for any $K \geq 1$ and $y \in B(z,Kr)$ we have
\[
\big| A(y) \big| \leq CKM.
\]
\end{lem}
When we apply Lemma \ref{l:1.2}, we will always take $K$ to be a controlled constant.
\begin{lem}
\label{l:1.3}
\addcontentsline{toc}{subsection}{Lemma 1.3}
For $\eta > 0$ small enough, we have
\begin{equation}
\label{eq:1.9}
\big(1-C\varepsilon\big)I \leq \Big(\nabla\phi(y)\Big)^{+}\Big(\nabla\phi(y)\Big) \leq (1+C\varepsilon)I \text{ for all $y\in{\mathbb R}^{n}$ s.t. $d(y) < \eta$}.
\end{equation}
\end{lem}
\begin{proof}
If $y$ is an interior point of $E$, then we have \eqref{eq:1.9}. Suppose $y$ is a boundary point of $E$. Arbitrarily close to $y$, we can find $x \in {\mathbb R}^{n} \backslash E$. We have an interior point $z$ in $E$ such that $|z-x| \leq C_{1}d(x) \leq C_{1}|y-x|$, hence $|z-y| \leq (1+C_{1})|y-x|$. Since $z$ is an interior point of $E$, we have
\begin{equation}
\label{eq:1.10}
\big(1-C\varepsilon\big)I \leq \Big( \nabla\phi(z) \Big)^{+}\Big( \nabla\phi(z) \Big) \leq (1+C\varepsilon),
\end{equation}
as observed above. However, we can make $|z-y|$ as small as we like here, simply by taking $|y-x|$ small enough. Since $\phi \in C^{1}(U)$, we may pass to the limit, and deduce \eqref{eq:1.9} from \eqref{eq:1.10}. Thus, \eqref{eq:1.9} holds for all $y \in E$.
Since $E \subset U$ is compact and $\phi \in C^{1}(U)$, the lemma now follows.
\end{proof}
\begin{lem}
\label{l:1.4}
\addcontentsline{toc}{subsection}{Lemma 1.4}
For $\eta > 0$ small enough, we have
\[
\Big| \phi(y) - \big[ \phi(x) + \nabla\phi(x)\cdot(y-x) \big] \Big| \leq \varepsilon \big|y-x\big|
\]
for all $x,y \in U$ such that $d(x) \leq \eta$ and $|y-x| \leq \eta$.
\end{lem}
\begin{proof}
If $\eta$ is small enough and $d(x) \leq \eta$, then $B(x,\eta) \subset U$ and $|\nabla\phi(y) - \nabla\phi(x)| \leq \varepsilon$ for all $y \in B(x,\eta)$. (These remarks follow from the fact that $E \subset U$ is compact and $\phi \in C^{1}(U)$.)
The lemma now follows from the fundamental theorem of calculus.
\end{proof}
\begin{lem}
\label{l:1.5}
\addcontentsline{toc}{subsection}{Lemma 1.5}
Let $\Psi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ be a $C^{1}$ map. Assume that $\det\nabla\Psi\neq 0$ everywhere on ${\mathbb R}^{n}$, and assume that $\Psi$ agrees with a Euclidean motion outside a ball B. Then $\Psi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is one-to-one and onto.
\end{lem}
\begin{proof}
Without loss of generality, we may suppose $\Psi(x) = x$ for $|x| \geq 1$. First we show that $\Psi$ is onto. Since $\det\nabla\Psi \neq 0$, we know that $\Psi({\mathbb R}^{n})$ is open, and of course $\Psi({\mathbb R}^{n})$ is non-empty. If we can show that $\Psi({\mathbb R}^{n})$ is closed, then it follows that $\Psi({\mathbb R}^{n}) = {\mathbb R}^{n}$, i.e., $\Psi$ is onto.
Let $\{x_{\nu}\}_{\nu \geq 1}$ be a sequence converging to $x_{\infty} \in {\mathbb R}^{n}$, with each $x_{\nu} \in \Psi({\mathbb R}^{n})$. We show that $x_{\infty} \in \Psi({\mathbb R}^{n})$. Let $x_{\nu} = \Psi(y_{\nu})$. If infinitely many $y_{\nu}$ satisfy $|y_{\nu}| \geq 1$, then infinitely many $x_{\nu}$ satisfy $|x_{\nu}| \geq 1$, since $x_{\nu} = \Psi(y_{\nu}) = y_{\nu}$ for $|y_{\nu}| \geq 1$. Hence, $|x_{\infty}| \geq 1$ in this case, and consequently
\[
x_{\infty} = \Psi(x_{\infty}) \in \Psi({\mathbb R}^{n}).
\]
On the other hand, if only finitely many $y_{\nu}$ satisfy $|y_{\nu}| \geq 1$, then there exists a convergent subsequence $y_{\nu_{i}} \to y_{\infty}$ as $i \to \infty$. In this case, we have
\[
x_{\infty} = \lim_{i \to \infty}\Psi(y_{\nu_{i}}) = \Psi(y_{\infty}) \in \Psi({\mathbb R}^{n}).
\]
Thus, in all cases, $x_{\infty} \in \Psi({\mathbb R}^{n})$. This proves that $\Psi({\mathbb R}^{n})$ is closed, and therefore $\Psi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is onto.
Let us show that $\Psi$ is one-to-one. We know that $\Psi$ is bounded on the unit ball. Fix $M$ such that
\begin{equation}
\label{eq:1.11}
\big|\Psi(y)\big| \leq M \ \text{for} \ |y| \leq 1.
\end{equation}
We are assuming that $\Psi(y) = y$ for $|y| \geq 1$. For $|x| > \max(M,1)$, it follows that $y=x$ is the only point $y \in {\mathbb R}^{n}$ such that $\Psi(y) = x$. Now let $Y = \{ y'\in{\mathbb R}^{n}: \Psi(y') = \Psi(y'') \text{ for some } y'' \neq y' \}$. The set $Y$ is bounded, thanks to \eqref{eq:1.11}. Also, the inverse function theorem shows that $Y$ is open. We will show that $Y$ is closed. This implies that $Y$ is empty, proving that $\Psi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is one-to-one.
Thus, let $\{y_{\nu}'\}_{\nu \geq 1}$ be a convergent sequence, with each $y_{\nu}' \in Y$; suppose $y_{\nu}' \to y_{\infty}'$ as $\nu \to \infty$. We will prove that $y_{\infty}' \in Y$.
For each $\nu$, pick $y_{\nu}'' \neq y_{\nu}'$ such that
\[
\Psi(y_{\nu}'') = \Psi(y_{\nu}').
\]
Each $y_{\nu}''$ satisfies $|y_{\nu}''| \leq \max(M.1)$, thanks to \eqref{eq:1.11}.
Hence, after passing to a subsequence, we may assume $y_{\nu}'' \to y_{\infty}''$ as $\nu \to \infty$. We already know that $y_{\nu}' \to y_{\infty}'$ as $\nu \to \infty$.
Suppose $y_{\infty}' = y_{\infty}''$. Then arbitrarily near $y_{\infty}'$ there exist pairs $y_{\nu}',\,y_{\nu}''$, with $y_{\nu}' \neq y_{\nu}''$ and $\Psi(y_{\nu}') = \Psi(y_{\nu}'')$. This contradicts the inverse function theorem, since $\det\nabla\Psi(y_{\infty}') \neq 0$.
Consequently, we must have $y'_{\infty} \neq y''_{\infty}$. Recalling that $\Psi(y'_{\nu}) = \Psi(y''_{\nu})$, and passing to the limit, we see that $\Psi(y'_{\infty}) = \Psi(y''_{\infty})$.
By definition, we therefore have $y'_{\infty} \in Y$, proving that $Y$ is closed, as asserted above. Hence, $Y$ is empty, and $\Psi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is one-to-one.
\end{proof}
From now on, we assume without loss of generality that
\begin{equation}
\label{eq:1.12}
{\rm diam} E = 1.
\end{equation}
\section{Chapter 15: Smooth extensions of smooth distortions} \label{s:2}
\setcounter{thm}{0}
\setcounter{equation}{0}
\subsection{Cubes.}
${\mathbb R}^{n} \backslash E$ is partitioned into ``cubes'' $\{Q_{\nu}\}$. We write $\beta_{\nu}$ to denote the sidelength of $Q_{\nu}$, and we write $Q_{\nu}^{*}$ to denote the cube $Q_{\nu}$, dilated about its center by a factor of 3. The cubes have the following properties,
\begin{equation}
\label{eq:2.1} \text{$c\beta_{\nu} \leq d(x) \leq C\beta_{\nu}$ for all $x \in Q_{\nu}^{*}$}.
\end{equation}
\begin{equation}
\label{eq:2.2} \text{Any given $x \in {\mathbb R}^{n}$ belongs to $Q_{\nu}^{*}$ for at most $C$ distinct $\nu$}.
\end{equation}
\subsection{Partition of unity.}
For each $Q_{\nu}$, we have a cutoff function $\Theta_{\nu} \in C^{\infty}({\mathbb R}^{n})$, with the following properties,
\begin{equation}
\label{eq:2.3} \text{$\Theta_{\nu} \geq 0$ on ${\mathbb R}^{n}$}.
\end{equation}
\begin{equation}
\label{eq:2.4} \text{supp}\,\Theta_{\nu} \subset Q_{\nu}^{*}.
\end{equation}
\begin{equation}
\label{eq:2.5} \text{$|\nabla\Theta_{\nu}| \leq C\beta_{\nu}^{-1}$ on ${\mathbb R}^{n}$}.
\end{equation}
\begin{equation}
\label{eq:2.6} \text{$\sum_{\nu}\Theta_{\nu} = 1$ on ${\mathbb R}^{n} \backslash E$}.
\end{equation}
\subsection{Regularized distance.}
A function $\delta(x)$, defined on ${\mathbb R}^{n}$, has the following properties,
\begin{equation}
\label{eq:2.7} \text{$cd(x) \leq \delta(x) \leq Cd(x)$ for all $x \in {\mathbb R}^{n}$}.
\end{equation}
\begin{equation}
\label{eq:2.8} \text{$\delta(\cdot)$ belongs to $C_{\text{loc}}^{\infty}({\mathbb R}^{n} \backslash E)$}.
\end{equation}
\begin{equation}
\label{eq:2.9} \text{$|\nabla\delta(x)| \leq C$ for all $x \in {\mathbb R}^{n} \backslash E$}.
\end{equation}
Thanks to \eqref{eq:2.1} and \eqref{eq:2.7}, the following holds,
\begin{equation}
\label{eq:2.10}
\left[\begin{array}{l}
\text{Let $x \in {\mathbb R}^{n}$, and let $Q_{\nu}$ be one of the cubes}. \\
\text{If $d(x) \geq c_{0}$ and $x \in Q_{\nu}^{*}$, then $\beta_{\nu} > c_{3}$}.
\end{array}\right.
\end{equation}
Recall that ${\rm diam} E = 1$.
Let $Q_{\nu}$ be a cube such that $\beta_{\nu} \leq c_{3}$. Then $d(x) < c_{0}$ for all $x \in Q_{\nu}^{*}$, as we see from \eqref{eq:2.10}. Let $x_{\nu}$ be the center of $Q_{\nu}$. Since $d(x_{\nu}) < c_{0}$, take $x = x_{\nu}$ and obtain a ball
\begin{equation}
\label{eq:2.11} B(z_{\nu},r_{\nu}) \subset E,
\end{equation}
such that
\begin{equation}
\label{eq:2.12} cd(x_{\nu}) < r_{\nu} \leq Cd(x_{\nu}),
\end{equation}
and
\begin{equation}
\label{eq:2.13} |z_{\nu} - x_{\nu}| \leq Cd(x_{\nu}).
\end{equation}
The ball $B(z_{\nu},r_{\nu})$ has been defined whenever $\beta_{\nu} \leq c_{3}$. \big(To see that $r_{\nu} \leq Cd(x_{\nu})$, we just note that $B(z_{\nu},r_{\nu}) \subset E$ but $x_{\nu} \notin E$; hence $|z_{\nu}-x_{\nu}| > r_{\nu}$, and therefore \eqref{eq:2.13} implies $r_{\nu} \leq Cd(x_{\nu})$.\big)
From \eqref{eq:2.12}, \eqref{eq:2.13} and \eqref{eq:2.1}, \eqref{eq:2.7}, we learn the following,
\begin{equation}
\label{eq:2.14} Q_{\nu}^{*} \subset B(z_{\nu},Cr_{\nu}).
\end{equation}
\begin{equation}
\label{eq:2.15} \text{$c\delta(x) < r_{\nu} < C\delta(x)$ for any $x \in Q_{\nu}^{*}$}.
\end{equation}
\begin{equation}
\label{eq:2.16} \text{$|z_{\nu} - x| \leq C\delta(x)$ for any $x \in Q_{\nu}^{*}$}.
\end{equation}
These results \big(and \eqref{eq:2.11}\big) in turn imply the following,
\begin{equation}
\label{eq:2.17} \text{Let $x \in Q_{\mu}^{*} \cap Q_{\nu}^{*}$. Then $B(z_{\nu},r_{\nu}) \subset B(z_{\mu},Cr_{\mu}) \cap E$}.
\end{equation}
Here, \eqref{eq:2.14}, \eqref{eq:2.15}, \eqref{eq:2.16} hold whenever $\beta_{\nu} \leq c_{3}$; while \eqref{eq:2.17} holds whenever $\beta_{\mu},\beta_{\nu} \leq c_{3}$.
We want an analogue of $B(z_{\nu},r_{\nu})$ for cubes $Q_{\nu}$ such that $\beta_{\nu} > c_{3}$.
There exists $x \in {\mathbb R}^{n}$ such that $d(x) = c_{0}/2$. Using this $x$, we obtain a ball
\begin{equation}
\label{eq:2.18} B(z_{\infty}, r_{\infty}) \subset E,
\end{equation}
such that
\begin{equation}
\label{eq:2.19} c < r_{\infty} \leq 1/2.
\end{equation}
(We have $r_{\infty} \leq 1/2$, simply because ${\rm diam} E = 1$.)
From \eqref{eq:2.18}, \eqref{eq:2.19} and the fact that ${\rm diam} E = 1$, we conclude that
\begin{equation}
\label{eq:2.20} E \subset B(z_{\infty}, Cr_{\infty}).
\end{equation}
\section{Chapter 16: Smooth extensions of smooth distortions: Picking motions.} \label{s:3}
\setcounter{thm}{0}
\setcounter{equation}{0}
For each cube $Q_{\nu}$, we pick a Euclidean motion $A_{\nu}$, as follows,
\vspace{-1em}
\begin{description}[leftmargin=0em]
\item[Case I] (``Small'' $Q_{\nu}$). Suppose $\beta_{\nu} \leq c_{3}$. Applying Lemma \ref{l:1.1} to the ball $B(z_{\nu},r_{\nu})$, we obtain a Euclidean motion $A_{\nu}$ with the following property.
\begin{equation}
\label{eq:3.1}
\text{For $K \geq 1$ and $y \in B(z_{\nu},Kr_{\nu}) \cap E$, we have $\big| \phi(y) - A_{\nu}(y) \big| \leq CK^{2}\varepsilon r_{\nu}$}.
\end{equation}
\item[Case II] (``Not-so-small'' $Q_{\nu}$). Suppose $\beta_{\nu} > c_{3}$. Applying Lemma \ref{l:1.1} to the ball $B(z_{\infty},r_{\infty})$, we obtain a Euclidean motion $A_{\infty}$ with the following property.
\begin{equation}
\label{eq:3.2}
\text{For $K \geq 1$ and $y \in B(z_{\infty},Kr_{\infty}) \cap E$, we have $\big| \phi(y) - A_{\infty}(y) \big| \leq CK^{2}\varepsilon r_{\infty}$}.
\end{equation}
In case II, we define
\begin{equation}
\label{eq:3.3}
A_{\nu} = A_{\infty}.
\end{equation}
Thus, $A_{\nu} = A_{\nu'}$ whenever $\nu$ and $\nu'$ both fall into Case II. Note that \eqref{eq:3.2} together with \eqref{eq:2.19} and
\eqref{eq:2.20} yield the estimate
\begin{equation}
\label{eq:3.4}
\big| \phi(y) - A_{\infty}(y) \big| \leq C\varepsilon \text{ for all } y \in E.
\end{equation}
\end{description}
The next result establishes the mutual consistency of the $A_{\nu}$.
\begin{lem}
\label{l:3.1}
\addcontentsline{toc}{subsection}{Lemma 3.1}
For $x \in Q_{\mu}^{*} \cap Q_{\nu}^{*}$, we have
\begin{equation}
\label{eq:3.5}
\big| A_{\mu}(x) - A_{\nu}(x) \big| \leq C\varepsilon\delta(x),
\end{equation}
and
\begin{equation}
\label{eq:3.6}
\big| \nabla A_{\mu} - \nabla A_{\nu} \big| \leq C\varepsilon.
\end{equation}
\end{lem}
\begin{proof}
We proceed by cases.
\vspace{-1em}
\begin{description}[leftmargin=0em]
\item[Case 1:] Suppose $\beta_{\mu},\,\beta_{\nu} \leq c_{3}$. Then $A_{\nu}$ satisfies \eqref{eq:3.1}, and $A_{\mu}$ satisfies the analogous condition for $B(z_{\mu},r_{\mu})$. Recalling \eqref{eq:2.17}, we conclude that
\begin{equation}
\label{eq:3.7}
\big| \phi(y) - A_{\mu}(y) \big| \leq C\varepsilon r_{\mu} \text{ for } y \in B(z_{\nu},r_{\nu}),
\end{equation}
and
\begin{equation}
\label{eq:3.8}
\big| \phi(y) - A_{\nu}(y) \big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z_{\nu},r_{\nu}).
\end{equation}
Moreover, \eqref{eq:2.15} gives
\begin{equation}
\label{eq:3.9}
c\delta(x) < r_{\mu} < C\delta(x) \text{ and } c\delta(x) < r_{\nu} < C\delta(x).
\end{equation}
By \eqref{eq:3.7}, \eqref{eq:3.8}, \eqref{eq:3.9}, we have
\begin{equation}
\label{eq:3.10}
\big| A_{\mu}(y) - A_{\nu}(y) \big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z_{\nu},r_{\nu}).
\end{equation}
Now, $A_{\mu}(y) - A_{\nu}(y)$ is an affine function. Hence, Lemma \ref{l:1.2} and inclusion \eqref{eq:2.14} allow us to deduce from \eqref{eq:3.10} that
\begin{equation}
\label{eq:3.11}
\big| A_{\mu}(y) - A_{\nu}(y) \big| \leq C\varepsilon r_{\nu} \text{ for all } y \in Q_{\nu}^{*},
\end{equation}
and
\begin{equation}
\label{eq:3.12}
\big| \nabla A_{\mu} - \nabla A_{\nu} \big| \leq C\varepsilon.
\end{equation}
Since $x \in Q_{\nu}^{*}$, the desired estimates \eqref{eq:3.5}, \eqref{eq:3.6} follow at once from \eqref{eq:3.9}, \eqref{eq:3.11} and \eqref{eq:3.12}. Thus, Lemma \ref{l:3.1} holds in Case 1.
\item[Case 2:] Suppose $\beta_{\nu} \leq c_{3}$ and $\beta_{\mu} > c_{3}$. Then by \eqref{eq:3.1} and \eqref{eq:2.11}, $A_{\nu}$ satisfies
\begin{equation}
\label{eq:3.13}
\big| \phi(y) - A_{\nu}(y) \big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z_{\nu},r_{\nu});
\end{equation}
whereas $A_{\mu} = A_{\infty}$, so that \eqref{eq:3.4} and \eqref{eq:2.11} give
\begin{equation}
\label{eq:3.14}
\big| \phi(y) - A_{\mu}(y) \big| \leq C\varepsilon \text{ for all } y \in B(z_{\nu},r_{\nu}).
\end{equation}
Since $x \in Q_{\mu}^{*} \cap Q_{\nu}^{*}$, \eqref{eq:2.1} and \eqref{eq:2.7} give
\[
c\delta(x) \leq \beta_{\mu} \leq C\delta(x) \text{ and } c\delta(x) \leq \beta_{\nu} \leq C\delta(x).
\]
In this case, we have also $\beta_{\nu} \leq c_{3}$ and $\beta_{\mu} > c_{3}$. Consequently,
\begin{equation}
\label{eq:3.15}
c < \beta_{\mu} < C, c < \beta_{\nu} < C, \text{ and } c < \delta(x) < C.
\end{equation}
By \eqref{eq:2.15}, we have also
\begin{equation}
\label{eq:3.16}
c < r_{\nu} < C.
\end{equation}
From \eqref{eq:3.13}, \eqref{eq:3.14}, \eqref{eq:3.16}, we see that
\begin{equation}
\label{eq:3.17}
\big| A_{\mu}(y) - A_{\nu}(y) \big| \leq C\varepsilon \text{ for all } y \in B_{\nu}(z_{\nu},r_{\nu}).
\end{equation}
Lemma \ref{l:1.2}, estimate \eqref{eq:3.16} and inclusion \eqref{eq:3.14} let us deduce from \eqref{eq:3.17} that
\begin{equation}
\label{eq:3.18}
\big| A_{\mu}(y) - A_{\nu}(y) \big| \leq C\varepsilon \text{ for all } y \in Q_{\nu}^{*},
\end{equation}
and
\begin{equation}
\label{eq:3.19}
\big| \nabla A_{\mu} - \nabla A_{\nu} \big| \leq C\varepsilon.
\end{equation}
Since $x \in Q_{\nu}^{*}$, the desired estimates \eqref{eq:3.5}, \eqref{eq:3.6} follow at once from \eqref{eq:3.15}, \eqref{eq:3.18}, \eqref{eq:3.19}. Thus, Lemma \ref{l:3.1} holds in Case 2.
\item[Case 3:] Suppose $\beta_{\nu} > c_{3}$ and $\beta{\mu} \leq c_{3}$. Reversing the roles of $Q_{\mu}$ and $Q_{\nu}$, we reduce matters to Case 2. Thus, Lemma \ref{l:3.1} holds in Case 3.
\item[Case 4:] Suppose $\beta_{\mu},\,\beta_{\nu} > c_{3}$. Then by definition $A_{\mu} = A_{\nu} = A_{\infty}$, and estimates \eqref{eq:3.5}, \eqref{eq:3.6} hold trivially. Thus, Lemma \ref{l:3.1} holds in Case 4.
\end{description}
We have proved the desired estimates \eqref{eq:3.5}, \eqref{eq:3.6} in all cases.
\end{proof}
The following lemma shows that $A_{\nu}$ closely approximates $\phi$ on $Q_{\nu}^{*}$ when $Q_{\nu}^{*}$ lies very close to $E$.
\begin{lem}
\label{l:3.2}
\addcontentsline{toc}{subsection}{Lemma 3.2}
For $\eta > 0$ small enough, the following holds. \\
Let $x \in Q_{\nu}^{*}$, and suppose $\delta(x) \leq \eta$. Then $x \in U$, $|\phi(x) - A_{\nu}(x)| \leq C\varepsilon\delta(x)$, and $|\nabla\phi(x) - \nabla A_{\nu}| \leq C\varepsilon$.
\end{lem}
\begin{proof}
We have $\beta_{\nu} < C\delta(x) \leq C\eta$ by \eqref{eq:2.1} and \eqref{eq:2.7}. If $\eta$ is small enough, it follows that $\beta_{\nu} < c_{3}$, so $Q_{\nu}$ falls into Case I, and we have
\begin{equation}
\label{eq:3.20}
\big| \phi(y) - A_{\nu}(y) \big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z_{\nu},r_{\nu})
\end{equation}
by \eqref{eq:3.1}. Also, \eqref{eq:2.15}, \eqref{eq:2.16} show that
\begin{equation}
\label{eq:3.21}
B(z_{\nu},r_{\nu}) \subset B\big(x, C\delta(x)\big) \subset B(x,C\eta).
\end{equation}
We have
\begin{equation}
\label{eq:3.22}
d(x) \leq C\delta(x) \leq C\eta
\end{equation}
by \eqref{eq:2.7}. (In particular, $x \in U$ if $\eta$ is small enough.) If $\eta$ is small enough, then \eqref{eq:3.21}, \eqref{eq:3.22} and Lemma \ref{l:1.4} imply
\[
y \in U \text{ and } \Big| \phi(y) - \big[ \phi(x) + \nabla\phi(x) \cdot (y-x) \big] \Big| < \varepsilon \big| y-x \big| \text{ for } y \in B(z_{\nu},r).
\]
Hence, by \eqref{eq:3.21} and \eqref{eq:2.15}, we obtain the estimate
\begin{equation}
\label{eq:3.23}
\Big| \phi(y) - \big[ \phi(x) + \nabla\phi(x) \cdot (y-x) \big] \Big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z_{\nu},r_{\nu}).
\end{equation}
Combing \eqref{eq:3.20} with \eqref{eq:3.23}, we find that
\begin{equation}
\label{eq:3.24}
\Big| A_{\nu}(y) - \big[ \phi(x) + \nabla\phi(x) \cdot (y-x) \big] \Big| \leq C\varepsilon r_{\nu} \text{ for } y \in B(z,r_{\nu}).
\end{equation}
The function $y \to A_{\nu}(y) - [ \phi(x) + \nabla\phi(x) \cdot (y-x) ]$ is affine. Hence, estimate \eqref{eq:3.24}, inclusion \eqref{eq:2.14}, and Lemma \ref{l:1.2} together tell us that
\begin{equation}
\label{eq:3.25}
\Big| A_{\nu}(y) - \big[ \phi(x) + \nabla\phi(x) \cdot (y-x) \big] \Big| \leq C\varepsilon r_{\nu} \text{ for } y \in Q_{\nu}^{*},
\end{equation}
and
\begin{equation}
\label{eq:3.26}
\big| \nabla A_{\nu} - \nabla\phi(x) \big| \leq C\varepsilon.
\end{equation}
Since $x \in Q_{\nu}^{*}$. we learn from \eqref{eq:3.25} and \eqref{eq:2.15} that
\begin{equation}
\label{eq:3.27}
\big| A_{\nu}(x) - \phi(x) \big| \leq C\varepsilon\delta(x).
\end{equation}
Estimates \eqref{eq:3.26} and \eqref{eq:3.27} (and an observation that $x \in U$) are the conclusions of Lemma \ref{l:3.2}.
\end{proof}
\section{Chapter 17: Smooth extensions of smooth distortions: Unity partitions.} \label{s:4}
\setcounter{thm}{0}
\setcounter{equation}{0}
Our plan is to patch together the map $\phi$ and the Euclidean motion $A_{\nu}$, using a partition of unity on ${\mathbb R}^{n}$. Note that the $\Theta_{\nu}$ in Section \ref{s:2} sum to 1 only on ${\mathbb R}^{n} \backslash E$.
Let $\eta > 0$ be a small enough number. Let $\chi(t)$ be a $C^{\infty}$ function on ${\mathbb R}$, having the following properties.
\begin{equation}
\label{eq:4.1}
\left\{\begin{array}{rl}
0 \leq \chi(t) \leq 1 & \text{ for all } t; \\
\chi(t) = 1 & \text{ for } t \leq \eta; \\
\chi(t) = 0 & \text{ for } t \geq 2\eta; \\
|\chi'(t)| \leq C\eta^{-1} & \text{ for all } t.
\end{array}\right.
\end{equation}
We define
\begin{equation}
\label{eq:4.2}
\widetilde{\Theta}_{in}(x) = \chi\big(\delta(x)\big) \text{ and (for each $\nu$) } \widetilde{\Theta}_{\nu}(x) = \big( 1 - \widetilde{\Theta}_{in}(x) \big) \cdot \Theta_{\nu}(x) \text{ for } x \in {\mathbb R}^{n}.
\end{equation}
Thus
\begin{equation}
\label{eq:4.3}
\widetilde{\Theta}_{in}, \widetilde{\Theta}_{\nu} \in C^{\infty}({\mathbb R}^{n}), \qquad \widetilde{\Theta}_{in} \geq 0 \text{ and } \widetilde{\Theta}_{\nu} \geq 0 \text{ on } {\mathbb R}^{n};
\end{equation}
\begin{equation}
\label{eq:4.4}
\widetilde{\Theta}_{in}(x) = 1 \text{ for } \delta(x) \leq \eta;
\end{equation}
\begin{equation}
\label{eq:4.5}
\text{supp}\,\widetilde{\Theta}_{in} \subset \{ x \in {\mathbb R}^{n}: \delta(x) \leq 2\eta \};
\end{equation}
\begin{equation}
\label{eq:4.6}
\text{supp}\,\widetilde{\Theta}_{\nu} \subset Q_{\nu}^{*} \text{ for each } \nu;
\end{equation}
and
\begin{equation}
\label{eq:4.7}
\widetilde{\Theta}_{in} + \sum_{\nu}\widetilde{\Theta}_{\nu} = 1 \text{ everywhere on } {\mathbb R}^{n}.
\end{equation}
Note that \eqref{eq:2.2} and \eqref{eq:4.6} yield the following.
\begin{equation}
\label{eq:4.8}
\text{Any given $x \in {\mathbb R}^{n}$ belongs to supp$\,\widetilde{\Theta}_{\nu}$ for at most $C$ distinct $\nu$}.
\end{equation}
In view of \eqref{eq:4.5}, we have
\begin{equation}
\label{eq:4.9}
\text{supp}\,\widetilde{\Theta}_{in} \subset U,
\end{equation}
if $\eta$ is small enough. This tells us in particular that $\widetilde{\Theta}_{in}(x)\cdot\phi(x)$ is a well-defined map from ${\mathbb R}^{n}$ to ${\mathbb R}^{n}$.
We establish the basic estimates for the gradients of $\widetilde{\Theta}_{in},\,\widetilde{\Theta}_{\nu}$. By \eqref{eq:4.4}, \eqref{eq:4.5} we have $\nabla\widetilde{\Theta}_{in}(x) = 0$ unless $\eta < \delta(x) < 2\eta$. For $\eta < \delta(x) < 2\eta$, we have
\[
\big| \nabla\widetilde{\Theta}_{in}(x) \big| = \big| \chi'\big( \delta(x) \big) \big| \cdot \big| \nabla\delta(x) \big| \leq C\eta^{-1}
\]
by \eqref{eq:4.1} and \eqref{eq:2.9}. Therefore,
\begin{equation}
\label{eq:4.10}
\big| \nabla\widetilde{\Theta}_{in}(x) \big| \leq C(\delta(x))^{-1} \text{ for all } x \in {\mathbb R}^{n} \backslash E.
\end{equation}
We turn our attention to $\nabla\widetilde{\Theta}_{\nu}(x)$. Recall that $0 \leq \Theta_{\nu}(x) \leq 1$ and $0 \leq \widetilde{\Theta}_{in}(x) \leq 1$ for all $x \in {\mathbb R}^{n}$. Moreover, \eqref{eq:2.1}, \eqref{eq:2.4}, \eqref{eq:2.5} and \eqref{eq:2.7} together yield
\[
\big| \nabla\Theta_{\nu}(x) \big| \leq C\big( \delta(x) \big)^{-1} \text{ for all } x \in {\mathbb R}^{n}\backslash E \text{ and for all } \nu.
\]
The above remarks \big(including \eqref{eq:4.10}\big), together with the definition \eqref{eq:4.2} of $\widetilde{\Theta}_{\nu}$, tell us that
\begin{equation}
\label{eq:4.11}
\big| \nabla\widetilde{\Theta}_{\nu}(x) \big| \leq C(\delta(x))^{-1} \text{ for } x \in {\mathbb R}^{n}\backslash E, \text{ each } \nu.
\end{equation}
\section{Chapter 18: Smooth extensions of smooth distortions: Map extension.} \label{s:5}
\setcounter{thm}{0}
\setcounter{equation}{0}
We now define
\begin{equation}
\label{eq:5.1}
\Phi(x) = \widetilde{\Theta}_{in}(x)\cdot\phi(x) + \sum_{\nu}\widetilde{\Theta}_{\nu}(x)\cdot A_{\nu}(x) \text{ for all } x \in {\mathbb R}^{n}.
\end{equation}
This makes sense, thanks to \eqref{eq:4.8} and \eqref{eq:4.9}. Moreover, $\Phi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is a $C^{1}$-map. We will prove that $\Phi$ satisfies all the conditions \ref{i:0.4} $\cdots$ \ref{i:0.9} of Theorem~\ref{t:0.1}.
First of all, for $\delta(x) < \eta$, \eqref{eq:4.3}, \eqref{eq:4.4}, \eqref{eq:4.7} give $\widetilde{\Theta}_{in}(x) = 1$ and all $\widetilde{\Theta}_{\nu}(x) = 0$; hence \eqref{eq:5.1} gives $\Phi(x) = \phi(x)$. Thus, $\Phi$ satisfies \ref{i:0.5}.
Next suppose $d(x) \geq c_{0}$. Then $\delta(x) > c > 2\eta$ if $\eta$ is small enough; hence $\widetilde{\Theta}_{in}(x) = 0$ and $\widetilde{\Theta}_{\nu}(x) = \Theta_{\nu}(x)$ for each $\nu$. (See \eqref{eq:4.3} and \eqref{eq:4.5}.) Also, \eqref{eq:2.10} shows that $\beta_{\nu} > c_{3}$ for all $\nu$ such that $x \in \text{supp}\,\Theta_{\nu}$. For such $\nu$, we have defined $A_{\nu} = A_{\infty}$; see \eqref{eq:3.3}. Hence, in this case,
\[
\Phi(x) = \sum_{\nu}\Theta_{\nu}(x)\cdot A_{\infty}(x) = A_{\infty}(x),
\]
thanks to \eqref{eq:2.6}. Thus, $\Phi$ satisfies \ref{i:0.6}.
Next, suppose $\phi \in C^{m}(U)$ for some given $m \geq 1$. Then since $\widetilde{\Theta}_{in}$ and each $\widetilde{\Theta}_{\nu}$ belong to $C^{\infty}({\mathbb R}^{n})$, we learn from \eqref{eq:4.8}, \eqref{eq:4.9} and \eqref{eq:5.1} that $\Phi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is a $C^{m}$ map.
Similarly, if $\phi \in C^{\infty}(U)$, then $\Phi: {\mathbb R}^{n} \to {\mathbb R}^{n}$ is a $C^{\infty}$ map. Thus, $\Phi$ satisfies \ref{i:0.8} and \ref{i:0.9}.
It remains to show that $\Phi$ satisfies \ref{i:0.4} and \ref{i:0.7}. To establish these assertions, we first control $\nabla\Phi$.
\begin{lem}
\label{l:5.1}
\addcontentsline{toc}{subsection}{Lemma 5.1}
For all $x \in {\mathbb R}^{n}$ such that $\delta(x) \leq 2\eta$, we have
\[
\big| \nabla\Phi(x) - \nabla\phi(x) \big| \leq C\varepsilon.
\]
\end{lem}
\begin{proof}
We may assume $\delta(x) \geq \eta$, since otherwise we have $|\nabla\Phi(x) - \nabla\phi(x)| = 0$ by \ref{i:0.5}. For $\delta(\underline{x}) \leq 3\eta$, we have $\underline{x} \in U$, and \eqref{eq:5.1} gives
\begin{equation}
\label{eq:5.2}
\Phi(\underline{x}) - \phi(\underline{x}) = \sum_{\nu}\widetilde{\Theta}_{\nu}(\underline{x})\big[ A_{\nu}(\underline{x}) - \phi(\underline{x}) \big],
\end{equation}
since $\phi(\underline{x}) = \widetilde{\Theta}_{in}(\underline{x})\phi(\underline{x}) + \sum_{\nu}\widetilde{\Theta}_{\nu}(\underline{x})\phi(\underline{x})$. If $ \delta(x) \leq 2\eta$, then \eqref{eq:5.2} holds on a neighborhood of $x$; hence
\begin{equation}
\label{eq:5.3}
\nabla\Phi(x) - \nabla\phi(x) = \sum_{\nu}\nabla\widetilde{\Theta}_{\nu}(x) \cdot \big[ A_{\nu}(x) - \phi(x) \big] + \sum_{\nu}\widetilde{\Theta}_{\nu}(x)\cdot \big[ \nabla A_{\nu} - \nabla\phi(x) \big].
\end{equation}
There are at most $C$ nonzero terms on the right in \eqref{eq:5.3}, thanks to \eqref{eq:4.8}. Moreover, if $\eta$ is small enough, then Lemma \ref{l:3.2} and \eqref{eq:4.6} show that $|A_{\nu}(x) - \phi(x)| \leq C\varepsilon\delta(x)$ and $|\nabla A_{\nu} - \nabla\phi(x)| \leq C\varepsilon$ whenever supp$\,\widetilde{\Theta}_{\nu} \ni x$. Also, for each $\nu$, we have $0 \leq \widetilde{\Theta}_{\nu}(x) \leq 1$ by \eqref{eq:4.3} and \eqref{eq:4.7}; and $|\nabla\widetilde{\Theta}_{\nu}(x)| \leq C\cdot(\delta(x))^{-1}$, by \eqref{eq:4.11}. Putting these estimates into \eqref{eq:5.3}, we obtain the conclusion of Lemma \ref{l:5.1}.
\end{proof}
\begin{lem}
\label{l:5.2}
\addcontentsline{toc}{subsection}{Lemma 5.2}
Let $x \in Q_{\mu}^{*}$, and suppose $\delta(x) > 2\eta$. Then
\[
\big| \nabla\Phi(x) - \nabla A_{\mu} \big| \leq C\varepsilon.
\]
\end{lem}
\begin{proof}
Since $\delta(x) > 2\eta$, we have $\widetilde{\Theta}_{in}(x) = 0$, $\nabla\widetilde{\Theta}_{in} = 0$, and $\widetilde{\Theta}_{\nu}(x) = \Theta_{\nu}(x)$, $\nabla\widetilde{\Theta}_{\nu}(x) = \nabla\Theta_{\nu}(x)$ for all $\nu$; see \eqref{eq:4.5} and \eqref{eq:4.3}. Hence, \eqref{eq:5.1} yields
\[
\nabla\Phi(x) = \sum_{\nu} \nabla\Theta_{\nu}(x)A_{\nu}(x) + \sum_{\nu}\Theta_{\nu}(x)\nabla A_{\nu}.
\]
Since also
\[
\nabla A_{\mu} = \sum_{\nu}\nabla\Theta_{\nu}(x)A_{\mu}(x) + \sum_{\nu}\Theta_{\nu}(x)\nabla A_{\mu},
\]
\big(as $\sum_{\nu}\nabla\Theta_{\nu}(x) = 0$, $\sum_{\nu}\Theta_{\nu}(x) = 1\big)$, we have
\begin{equation}
\label{eq:5.4}
\nabla\Phi(x) - \nabla A_{\mu} = \sum_{\nu} \nabla\Theta_{\nu}(x) \cdot \big[ A_{\nu}(x) - A_{\mu}(x) \big] + \sum_{\nu} \Theta_{\nu}(x) \cdot \big[ \nabla A_{\nu} - \nabla A_{\mu} \big].
\end{equation}
There are at most $C$ nonzero terms on the right in \eqref{eq:5.4}, thanks to \eqref{eq:4.8}. By \eqref{eq:2.1}, \eqref{eq:2.4}, \eqref{eq:2.5} and \eqref{eq:2.7}, we have $|\nabla\Theta_{\nu}(x)| \leq C(\delta(x))^{-1}$; and \eqref{eq:2.3}, \eqref{eq:2.6} yield $0 \leq \Theta_{\nu}(x) \leq 1$. Moreover, whenever $Q_{\nu}^{*} \ni x$, Lemma \ref{l:3.1} gives $|A_{\nu}(x) - A_{\mu}(x)| \leq C\varepsilon\delta(x)$, and $|\nabla A_{\mu} - \nabla A_{\nu}| \leq C\varepsilon$. When $Q_{\nu}^{*} \notniFromTxfonts x$, we have $\Theta_{\nu}(x) = 0$ and $\nabla\Theta_{\nu}(x) = 0$, by \eqref{eq:2.4}. Using the above remarks to estimate the right-hand side of \eqref{eq:5.4}, we obtain the conclusion of Lemma \ref{l:5.2}.
\end{proof}
Using Lemma \ref{l:5.1} and \ref{l:5.2}, we can show that
\begin{equation}
\label{eq:5.5}
(1-C\varepsilon)I \leq \big( \nabla\Phi(x) \big)^{+}\big( \nabla\Phi(x) \big) \leq (1+C\varepsilon)I \text{ for all } x \in {\mathbb R}^{n}.
\end{equation}
Indeed, if $\delta(x) \leq 2\eta$, then \eqref{eq:5.5} follows from Lemma \ref{l:1.3} and \ref{l:5.1}. If instead $\delta(x) > 2\eta$, then $x \in {\mathbb R}^{n} \backslash E$, hence $x \in Q_{\mu}$ for some $\mu$. Estimate \eqref{eq:5.5} then follows from Lemma \ref{l:5.2}, since $(\nabla A_{\mu})^{+}(\nabla A_{\mu}) = I$ for the Euclidean motion $A_{\mu}$. Thus, \eqref{eq:5.5} holds in all cases.
From \eqref{eq:5.5} and \ref{i:0.6}, together with Lemma \ref{l:1.5}, we see that
\begin{equation}
\label{eq:5.6}
\text{$\Phi:{\mathbb R}^{n} \to {\mathbb R}^{n}$ is one-to-one and onto, hence $\Phi^{-1}:{\mathbb R}^{n} \to {\mathbb R}^{n}$ is a $C^{1}$ diffeomorphism},
\end{equation}
by \eqref{eq:5.5}. Thus $\Phi$ satisfies \ref{i:0.7}. It remains only to prove \ref{i:0.4}.
To do so, we use \eqref{eq:5.5} and \eqref{eq:5.6} as follows. Let $x,y \in {\mathbb R}^{n}$. Then $|x-y|$ is the minimum of length($\Gamma$) over all $C^{1}$ curves $\Gamma$ joining $x$ to $y$. Also, by \eqref{eq:5.6}, $|\Phi(x) - \Phi(y)|$ is the infimum of length\big($\Phi(\Gamma)$\big) over all $C^{1}$ curves $\Gamma$ joining $x$ to $y$. For each $\Gamma$, \eqref{eq:5.5} yields
\[
(1-C\varepsilon) \,\text{length}\,(\Gamma) \leq \,\text{length}\,\big(\Phi(\Gamma)\big) \leq (1+C\varepsilon) \,\text{length}\,(\Gamma).
\]
Taking the minimum over all $\Gamma$, we conclude that $\Phi$ satisfies \ref{i:0.4}, completing the proof of our theorem. \hfill $\blacksquare$
\section{Chapter 19: Equidistribution, finite fields and discrepancy.}
\setcounter{equation}{0}
We now discuss interesting and related work on partitioning of certain $D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ via extremal Newtonian like configurations and finite fields.
We work with $\mathbb R^{D}$ with $D\geq 1$. We use the notation $\mu$ and $\nu$ for measures.
In analogy to the constant $\tau$ we say that two sets of points admit a good separation if the diameter of each set is relatively small enough compared to the distance between the sets.
An interesting algorithm known more to the computer science community produces points which admit a good separation and is called the "well separated pair decomposition algorithm".
In this section, we present numerous ways to partition and make sense of "well separated". We begin as follows.
The problem of "distributing well" a large number of points on certain $D\geq 1$-dimensional compact sets embedded in $\mathbb R^{D+1}$ is an interesting
problem with numerous wide applications in diverse areas for example approximation theory, zeroes of extremal polynomials in all kinds of settings, singular operators for example Hilbert transforms, random matrix theory, crystal and molecule structure, electrostatics, special functions, Newtonian energy, extensions, alignment, number theory, manifold learning, clustering, shortest paths, codes and discrepancy, vision, signal processing and many others.
In this section, we discuss our work dealing with extremal Newtonian like configurations and finite field generated point sets as "distributing well" on certain $D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ where "distributing well" has several precise mathematical definitions.
For our finite field constructions, we look at related combinatorial designs, codes and $t$-designs. All of this work provides interesting and useful partitions of different sets.
We mention that here, we will use the words set/configuration/point rather than the conventional physics terms conductor/electron.
We only consider compact sets in this section although one can develop a theory for closed sets using weighted energy and weights which "push" points (electrons) to compact sets (conductors).
\subsection{"Distributing well", $s$-extremal configurations and Newtonian $s$-energy.}
Consider the circle $S^1$ and a configuration of $k\geq 2$ points on $S^1$ being the vertices of the regular k-gon. How to make sense of the following generalization:
"A configuration with $k\geq 2$ points is " distributed well" on a compact set, an element of a certain class of $D\geq 1$-dimensional compact sets embedded in $\mathbb R^{D+1}$ ?"
Let us be given a $D$-dimensional compact set $X$ embedded in $\mathbb R^{D+1}$ and a $k\geq 2$ configuration
$\omega_{k}=\left\{x_1,\ldots,x_k\right\}$
on $X$. The discrete Newtonian $s$-energy associated with $\omega_{k}$ is
given by \[
E_s(X,\omega_{k}):=\sum_{1\leq i<j\leq k}|x_i-x_j|^{-s}.
\]
when $s>0$ and
\[
E_s(X,\omega_{k}):=\sum_{1\leq i<j\leq k}\log |x_i-x_j|^{-1}
\]
when $s=0$.
Let
$\omega_{s}^{*}(X,k):=\left\{x_1^*,\ldots,x_k^*\right\}\subset X$ be a
configuration for which $E_s(X,\omega_{k})$ attains its minimal value,
that is,
\[
{\mathcal E}_s(X,k):=\min_{\omega_k\subset X}E_s(X,\omega_{k})=E_s(X,\omega_{s}^{*}(X,k)).
\]
We call such minimal configurations $s$-extremal configurations.
It is well known that in general $s$-extremal configurations are not always unique.
For example, in the case of the $D$-dimensional unit sphere $S^D$ embedded in $\mathbb R^{D+1}$ they are invariant under rotations.
In this section, we are interested in how $s$-extremal configurations distribute (for large enough $k$) on the interval $[-1, 1]$, on the $D$-dimensional sphere $S^D$ embedded in $\mathbb R^{D+1}$
and on the $D$-dimensional torus embedded in $\mathbb R^{D+1}$. We are also interested in separation radius and mesh norm estimates of $k\geq 2$ $s$-extremal configurations
on a class of $D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ with positive Hausdorff measure. We will define this class of compact sets, and terms separation radius and mesh norm in Section (19.5)). Asymptotics of energies ${\mathcal E}_s(X,k)$ for large enough $k$ on certain $D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ is an interesting topic of study, see our work, \cite{D7, D8, D11} but we do not address this topic in this paper.
\subsection{$[-1,1]$.}
\subsubsection{Critical transition.}
Let us look at the interval $[-1,1] $. Here, identifying as usual $[-1,1] $ as the circle $S^1$, $[-1,1] $ has dimension $D=1$ and is embedded in $\mathbb R^2$. $[-1, 1] $ has Hausdorff measure 1.
\begin{itemize}
\item[(1)] In the limiting $s$ cases,
i.e., $s=0$ (logarithmic interactions) and $s=\infty$ (best-packing
problem), $s$-extremal configurations are Fekete points and
equally spaced points, respectively.
\item[(2)] Fekete
points are distributed on $[-1,1] $ for large enough $k$ according to the arcsine measure,
which has the density $\mu_0^\prime(x):=(1/\pi)(1-x^2)^{-1/2}$.
\item[(3)] Equally spaced points, $-1+2(i-1)/(k-1)$, $i=1,\ldots,k$,
have the arclength distribution for large enough $k$.
\item[(4)] $s=1$ is a critical transition in the sense that $s$-extremal
configurations are distributed on $[-1,1] $ for large enough $k$ differently for $s<1$ and
$s\geq 1$. Indeed, for $s<1$, the limiting distribution of $s$-extremal configurations for large enough $k$ is an arcsin type density
$\mu_{s}(x)=\frac{\Gamma(1+s/2)}{\sqrt{\pi}\Gamma((1+s/2)/2)}(1-x^2)^{(s-1)/2}$ where $\Gamma$ is as usual the Gamma function.
\end{itemize}
\subsubsection{Distribution of $s$-extremal configurations.}
The dependence of the distribution of $s$-extremal configurations
over $[-1,1]$ for large enough $k$ and asymptotics for minimal discrete $s$-energy can be easily explained from a potential theory point of view as follows.
For a probability Borel measure $\nu$ on $[-1,1]$, its
$s$-energy integral is defined to be \[
I_s([-1,1],\nu):=\iint\limits_{[-1,1]^2}|x-y|^{-s}d\nu(x)d\nu(y)
\] (which can be finite or infinite).
Let now, for a $k\geq 2$ configuration $\omega_{k}=\left\{x_1,\ldots,x_k\right\}$ on $[-1,1]$,
\[
\nu^{\omega_k}:=\frac 1k\sum_{i=1}^k{\mbox{\boldmath$\de$}}_{x_i}
\]
denote the normalized counting measure of $\omega_{k}$ so that
$\nu^{\omega_k}([-1,1])=1$. Then the discrete Newtonian $s$-energy,
associated to $\omega_{k}$ can be written
as \[
E_s([-1,1],\omega_{k}) =(1/2)k^2\iint\limits_{x\ne
y}|x-y|^{-s}d\nu^{\omega_k}(x)d\nu^{\omega_k}(y)
\] where the integral represents a discrete analog of the
$s$-energy integral for the point-mass measure
$\nu^{\omega_k}$.
We observe the following: If $s<1$, then the energy integral is minimized uniquely by an
arcsine-type measure $\nu_s^{\ast}$, with density $\mu_s^\prime(x)$
with respect to the Lebesgue measure.
On the other hand, the normalized counting
measure $\nu_{s,k}^{\ast}$ of an $s$-extreme configuration minimizes
the discrete energy integral over all
configurations $\omega_{k}$ on $[-1,1] $. Thus, one can reasonably expect
that for $k$ large enough $\nu_{s,k}^{\ast}$ is ``close'' to
$\nu_s^{\ast}$ for certain $s$.
Indeed, we find that for $s\geq 1$, the energy integral diverges for
every measure $\nu$. Concerning the distribution of $s$-extremal points over
$[-1,1]$ for very large $k$, the interactions are now strong enough to force the points to
stay away from each other as far as possible.
Of course, depending
on $s$, ``far'' neighbors still incorporate some energy in
${\mathcal E}_s([-1,1],k)$, but the closest neighbors are dominating. So,
$s$-extremal points distribute themselves over $[-1,1] $ in an
equally spaced manner for large enough $k$.
See below where we study this idea on the sphere $S^D$ as a discrepancy of measures.
\subsubsection{Equally spaced points for interpolation.}
As an indication of how "equally spaced" points can be far from ideal in many approximation frameworks, it is well known that equally spaced points for example on the interval $[-1,1] $ can be disastrous for certain one variable approximation processes such as interpolation. Indeed, a classical result of Runge for example shows this. See for example \cite{L}.
\subsection{The $D$-dimensional sphere, $S^D$ embedded in $\mathbb R^{D+1}$.}
\subsubsection{Critical transition.}
$S^D$ has positive Hausdorff measure $D$. It turns out that
for any $s$ the limiting distribution of $s$-extremal
configurations on $S^D$ for large enough $k$ is given by the normalized area measure on $S^D$. This is due to rotation invariance.
Consider the sphere $S^2$ embedded in
$\mathbb R^3$. The $s$-extremal configurations presented are close
to global minimum. In the table below, $\rho$ denotes mesh norm (fill distance), $2\hat{\rho}$ denotes separation angle which is twice
the separation (packing) radius and $a$ denotes mesh ratio which is
$\rho/\rho'$. We define as already stated, separation radius and mesh norm in Section (19.5).
The $s$-extremal configurations for $s=1,2,3,4$ ($s<D$, $s=D$, $s>D$, $D=2$) given in plots 1-4 are
for 400 points respectively. Given the symmetry, the points are similar for all
values of $s$ considered. See Figures 15-17.
\[
\begin{array}{llll}
s, & \rho, & 2\hat{\rho}, & a \\
1, & 0.113607, & 0.175721, & 1.2930 \\
2, & 0.127095, & 0.173361, & 1.4662 \\
3, & 0.128631, & 0.173474, & 1.4830 \\
4, & 0.134631, & 0.172859, & 1.5577 \\
\end{array}
\]
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1sphere1}}
\caption{$S^2$, $s=1$}
\end{figure}
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1sphere2}}
\caption{$S^2$, $s=2$}
\end{figure}
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1sphere3}} \caption{$S^2$,
$s=3$}
\end{figure}
\subsection{Torus.}
\begin{itemize}
\item Consider a torus embedded in $\mathbb R^3$ with
inner radius 1 and outer radius 3. In this case, we no longer have
symmetry and we have three transition cases. The $s$-extremal configurations for $s=1,2,3$ ($s<D$, $s=D$, $s>D$, $D=2$) respectively are not similar. Again, we have 400
points. See Figures 18-20.
\end{itemize}
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1torus1}}
\caption{Torus, $s=1$}
\end{figure}
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1torus2}}
\caption{Torus, $s=2$}
\end{figure}
\begin{figure}[hbt]
\centerline{\includegraphics[width=6cm]{dm1torus3}}
\caption{Torus, $s=3$}
\end{figure}
\subsection{Separation radius and mesh norm for $s$-extremal configurations.}
We are now interested in the separation radius (packing radius) and mesh norm (fill-distance) of $k\geq 2$ $s$-extremal configurations on
$D$-dimensional compact sets embedded in $\mathbb R^{D+1}$ with positive $D$-dimensional Hausdorff measure and which are a finite union of bi-Lipschitz images of compact sets in $\mathbb R^D$. (See an interesting similarity in Section (13.1) and in the work of \cite{ATV}). We call any element of this class of compact sets $Y^D$ where as usual the notation $Y^D$ may denote the same or different set in different occurrences.
Examples of compact sets $Y^D$ are $D$-dimensional spheres, $D$-dimensional tori and in fact $D$-dimensional ellipsoids embedded in $\mathbb R^{D+1}$. Other examples are $D$-dimensional balls, $D$-dimensional cubes and parallelepipeds, $D$-dimensional Cantor sets having positive $D$-dimensional Hausdorff measure and quasi smooth (chord-arc) curves in $\mathbb R^{D+1}$.
For $j=1,\ldots,k$ and a configuration $\omega_{k}=\{x_1,\ldots,x_k\}$ of distinct
points on a given set $Y^D$, we let
\begin{equation}
\hat{\rho}_j\(\omega_{k}\):=\min_{i\ne j}\left\{\left| x_i-x_j\right|\right\}
\end{equation}
and define
\begin{equation}
\hat{\rho}\(\omega_{k}\):=\min_{1\leq j\leq k}\delta_j\(\omega_{k}\).
\end{equation}
The quantity $\hat{\rho}\(\omega_{k}\)$ is called the {\em separation radius or
packing radius} of the configuration $\omega_{k}$ and gives the minimal distance between points in the configuration
$\omega_{k}$ on the given set $Y^D$.
We also define the {\em mesh norm or fill distance} of the given configuration $\omega_{k}$ on the given set $Y^D$ denoted by $\rho\(Y^D,\omega_{k}\)$ to be the maximal radius of a cap on $Y^D$, which does not contain points from $\omega_{k}$. It is defined as
\begin{equation} \rho\(Y^D,\omega_{k}\):=\max_{y\in
Y^D}\min_{x\in\omega_k}|y-x|.
\end{equation}
Here are our results for $k\geq 2$ $s$-extremal configurations.
\subsubsection{Separation radius of $s>D$-extremal configurations on a set $Y^D$.}
The following hold:
\begin{thm}
Let a $Y^D$ be given. For any $s>D$-extremal configuration $\omega_{s}^{*}(Y^D,k)$
on $Y^D$,
\begin{equation}
\hat{\rho}_{s}^{\ast}(Y^D,k):=\hat{\rho}\(\omega_{s}^{*}(Y^D,k)\)\geq ck^{-1/D}.
\end{equation}
\end{thm}
\subsubsection{Separation radius of $s<D-1$-extremal configurations on $S^D$.}
Separation results for weak interactions $s<D$ are far more difficult to find in the
literature for sets $Y^D$. A reason for such a lack of results
is that this case requires delicate considerations based on the minimizing property of $\omega_{s}^{*}(Y^D,k)$
while strong interactions ($s>D$) prevent points to be very close to
each other without affecting the total energy.
\begin{thm}
\begin{itemize}
\item[(1)] For $D\geq 2$ and $s<D-1$,
\begin{equation} \hat{\rho}_s^{\ast}(S^D,k)\geq
ck^{-1/(s+1)}.
\end{equation}
\item[(2)] The estimate above can be improved for $D\geq 3$
and $s\leq D-2$ in the following sense.
\begin{equation}
\hat{\rho}_s^{\ast}(S^D,k)\geq
ck^{-1/(s+2)}.
\end{equation}
\end{itemize}
\end{thm}
\subsubsection{Mesh norm of $s$-extremal configurations on a set $Y^D$.}
In this section, we will obtain for $s>D$ an upper bound of $O(k^{-1/D})$ for $\rho_s^{*}(Y^D,k):=\rho\(Y^D,\omega_{s}^{*}\)$ matching the lower bound given for
$\hat{\rho}_s^{\ast}(Y^D,k)$ in (17.4) for a given $Y^D$. To do this, we will need to define the notion of a cap on a set $Y^D$. Let a set $Y^D$ be given, let $x\in Y^D$ and let a radius $r>0$ be given.
Then we define a cap on the set $Y^D$ with center $x$ and radius $r$ by ${\rm cap}(x,r):=\left\{y\in Y^D:\, |y-x|<r\right\}$.
The problem in getting upper bounds for $\rho_s^{*}(Y^D,k)$ is the following observation. For any $s>0$ and any $k\geq 2$ configuration $\omega_{k}$ on $Y^D$ with
\begin{equation}
\lim_{k\to \infty}\frac{E_s(Y^D,\omega_{k})}{{\mathcal E}_s(Y^D,k)}=1
\end{equation}
it follows that
\begin{equation}
\lim_{k\to \infty}\rho\(Y^D,\omega_{k}\)=0.
\end{equation}
Thus an "optimistic" guess is that we require an additional assumption on $Y^D$ to get a
reasonable upper bound for $\rho_s^{*}(Y^D,k)$ and indeed a matching one of $O(k^{-1/D})$. This turns out to be case.
We have:
\begin{thm}
Let a $Y^D$ be given Then the following holds:
\begin{itemize}
\item[(1)] Choose $x\in Y^D$ and a radius $r$. Then the $D$-dimensional Hausdorff measure of
${\rm cap}(x,r)$ is $O(r^D)$ uniformly in $x,r$.
\item[(2)] Suppose now we have the matching lower bound in (1) in the sense of the following assumption:
Choose $x\in Y^D$ and a radius $r$. Suppose there exists $c>0$ depending on $D$ but independent of $x,r$ so that the $D$-dimensional Hausdorff measure of
${\rm cap}(x,r)$ is bounded below by $cr^D$ uniformly in $x,r$. Then the following matching bound for $\hat{\rho}_s^{\ast}(Y^D,k)$ in (17.4) holds.
\begin{equation}
\rho\(Y^D,\omega_{s}^{*}(Y^D,k)\)=O(k^{-1/D}).
\end{equation}
\end{itemize}
\end{thm}
We refer the reader to the papers \cite{D7, D8, D11} for more details re the work in this section. For example, as already stated, we provide no analysis on the behavior of $E_s(Y^D,\omega_{k})$ and ${{\mathcal E}_s(Y^D,k)}$
for different $s, Y^D, \omega_k$ which provides some very interesting results.
Sarnak and his collaborators have studied local statistics of lattice points.
An interesting question would be to see if any of their work can be applied to our work.
For a configuration $\omega_k,\, k\geq 1$ of points randomly and independently distributed by area measure on $S^D$, it is known that
\begin{equation}
{\rm Expect}((\rho(S^D, \omega_k))=O((\log k)^{-1/D}))
\end{equation}
uniformly for large enough $k$. Here ${\rm Expect} (\cdot)$ is statistical expectation.
\subsection{Discrepancy of measures.}
Recalling Section (19.2.2) we guess optimistically that for certain $s>0$ and $k$ large enough, the measures $\nu_{s,k}^{\ast}$ should be "close" to
$\nu_s^{\ast}=\mu$ on the sphere $S^D$. Here $\mu$ is the normalized surface measure on the sphere $S^D$. We write $\omega_s^{*}(S^D,k)=\left\{x_1,...,x_k\right\}$. We define
\begin{equation}
R(f,\omega_s^{*}(S^D,k),\mu):=\left|\int_{S^D}f(x)d\mu(x)-\frac{1}{k}\sum_{1\leq i\leq k}f(x_i)\right|
\end{equation}
where $f:S^D\to \mathbb R$ is continuous.
Indeed, we have as one of our results:
\begin{thm}
Let $D\geq 1$ and $\omega_s^{*}(S^D,k)=\left\{x_1,...,x_k\right\}$ an $s$-extremal configuration on the $D$-dimensional sphere $S^D$. Suppose that $s>D$,
$f:S^D\to \mathbb R$ is continuous, $R(f,\omega_s^{*}(S^D,k),\mu)$ is defined by (17.10) and $\mu$ is the normalized surface measure on the sphere $S^D$. Then for $k$ large enough,
\begin{equation}
R(f,\omega_s^{*}(S^D,k),\mu)=O(\left(\frac 1{\sqrt{\log k}}\right).
\end{equation}
\end{thm}
The constant in the upper bound depends on $f,s,D$. The error $R(\cdot, \cdot)$ in (17.10) is called the discrepancy of the two measures: $\nu_{s,k}^{\ast}$ and
$\nu_s^{\ast}=\mu$. Discrepancy theory is a large subject of study with many applications, for example, numerical analysis, approximation theory, number theory, probability, ergodic theory and many others. Regarding some of our work on discrepancy, see the papers \cite{D7, D10}.
\subsection{Finite field algorithm.}
In this section, we provide a description of some of our work in \cite{BDLM}. Here, we show from \cite{BDLM} a finite field algorithm to generate "well distributed" point sets on the
$D$-dimensional sphere $S^D$ for $D\geq 1$. Well distributed for us is measured via discrepancy.
We proceed as follows.
Fix a $D\geq 1$.
For an odd prime $\hat{p}$, let $F_{\hat{p}}$ denote the
finite field of integers modulo $\hat{p}$.
We consider the quadratic form
\begin{equation}
x_{1}^2+...+x_{D+1}^2=1.
\label{e:form}
\end{equation}
over $F_{\hat{p}}$ for a given prime $\hat{p}$.
{\bf Step 1}\, Let $k(D,\hat{p})$ denote the number of solutions of this quadratic form (17.12) for such $\hat{p}$. The number of solutions is known to be given as
\[
k(D,\hat{p})=
\left\{ \begin{array}{cc}
\hat{p}^{D}-{\hat{p}}^{(D-1)/2} \eta ((-1)^{(D+1)/2}) & {\rm if}\, D \mbox{ is odd} \\
{\hat{p}}^D + {\hat{p}}^{D/2} \eta((-1)^{D/2}) & {\rm if}\, D \mbox{ is even}
\end{array} \right.
\]
Here $\eta$ is the quadratic character defined on $F_{\hat{p}}$ by $\eta(0)=0,$
$\eta(a )=1 $ if $a$ is a square in
$F_{\hat{p}}$, and $\eta(a)=-1$ if $a$ is a non-square in $F_{\hat{p}}$.
Thus for $D\geq 1$, the number of solutions to (17.12) for a given prime $\hat{p}$ is given by the number $k(D,\hat{p})$
{\bf Step 2}\, We now scale and center around the origin. Given a prime $\hat{p}$, we let
$X(D,\hat{p})$ be a solution vector of (17.12). We write it as
\[
X(D,\hat{p})= (x_1, \dots, x_{D+1}),\, x_i\in F_{\hat{p}},\, 1\leq i\leq D+1,
\]
with coordinates $x_{i},\, 1\leq i\leq D+1$. We may assume without loss of generality that all coordinates $x_i$ of the vector $ X(D,\hat{p})$ are scaled
so that
they
are centered around the origin and are contained in the set
\[
\{-(\hat{p}-1)/2,...,(\hat{p}-1)/2\}.
\]
More precisely given a coordinate $x_i$ of the vector $ X(D,\hat{p})$ for some $1\leq i\leq D+1$, define
\begin{displaymath}
x'_i=
\left\{\begin{array}{cc}
x_i,& x_i\in \{0,...,(\hat{p}-1)/2)\} \\
x_i-\hat{p}, & x_i\in \{(\hat{p}+1)/2,...,\hat{p}-1\}.
\end{array} \right.
\end{displaymath}
Then $x'_i\in \{-(\hat{p}-1)/2,...,(\hat{p}-1)/2\}$ and
the scaled vector
\[
X'(D,\hat{p})=(x'_1, \dots, x'_{D+1}),\,1\leq i\leq D+1
\]
solves (17.12) if and only if the vector $X(D,\hat{p})$ solves (17.12).
{\bf Step 3}\, We now simply normalize the coordinates of the vector $X'(D,\hat{p})$ so that the vector we end up with is on $S^D$. We for convenience denote this vector by
$X(D,\hat{p})$. We have $k(D,\hat{p})$ such vectors as $\hat{p}$ varies.
Use of the finite field $F_{\hat{p}}$
provides a method to increase the number $k(D,\hat{p})$ of vectors $X(D,\hat{p})$ for $D\geq 1$ as $\hat{p}$ increases. For increasing values of
$\hat{p}$, we obtain an
increasing number $k(D,\hat{p})= O({\hat{p}}^D)$ of vectors scattered on
$S^D$. In particular, as $\hat{p}\rightarrow \infty$ through all odd primes, it
is clear that $k(D,\hat{p}) \rightarrow \infty$.
\subsubsection{Examples.}
We begin by seeing a straightforward one way to produce a full set of vectors $X(D,\hat{p})$ for a given prime $\hat{p}$. Fix a prime $\hat{p}$ and consider its corresponding vectors $X''(D,\hat{p})$.
Now take $\pm 1$ times all coordinates of the vectors $X''(D,\hat{p})$ permuting each coordinate in all
possible ways. This procedure produces the required full set of $k(D,\hat{p})$ vectors $X(D,\hat{p})$ for the given prime $\hat{p}$.
The table below produces vectors $X''(D,\hat{p})$ and the number $k''(D,\hat{p})$ of the full set of vectors $X(D,\hat{p})$ for the three odd primes $3,5,7$ and for dimensions $D=1,2$
$$\begin{array}{||c|c||c|c||} \hline \hline
D & \hat{p} & k(D,\hat{p}) & X''(D,\hat{p}) \\ \hline \hline
1 & 3 & 4 & \{(1,0)\} \\ \hline
1 & 5 & 4 & \{(1,0)\} \\ \hline
1 & 7 & 8 & \{(1,0), \frac{1}{\sqrt{2}} (1,1) \} \\ \hline \hline
2 & 3 & 6 & \{(1,0,0)\} \\ \hline
2 & 5 & 30 & \{(1,0,0),\frac{1}{\sqrt{2}} (2,1,1)\} \\ \hline
2 & 7 & 42 & \{(1,0,0),\frac{1}{\sqrt{2}} (1,1,0),\frac{1}{\sqrt{22}}
(3,3,2)\} \\ \hline \hline
\end{array}$$
Observe that for $\hat{p}=3,5,7$ and $D=1$, the finite field algorithm gives the optimal point set of vectors $X(1,\hat{p})$ in the sense that the $k(1,\hat{p}$ ) vectors
$X(1,\hat{p})$ are precisely the vertices of the regular $k(1,\hat{p})$-gon on $S^1$. The $k(1,\hat{p}$ ) vectors $X(1,\hat{p})$ for $\hat{p}>7$ do not always exhibit this feature.
\subsubsection{Spherical $\hat{t}$-designs.}
Let $\hat{t}$ be a positive integer. A finite set of points $X$ on $S^D$ is a \emph{spherical
$\hat{t}$-design} or a \emph{spherical design of strength $\hat{t}$}, if for every
polynomial $f$ of total degree $\hat{t}$ or less, the average value of $f$ over
the whole sphere $S^D$ is equal to the arithmetic average of its values on $X$.
If this only holds for
homogeneous polynomials of degree $\hat{t}$, then $X$ is called a \emph{spherical
design of index $\hat{t}$}.
The following holds:
\begin{thm}
For every odd positive integer $\hat{t}$, odd prime $\hat{p}$, and dimension $D\geq
1$, the set of $k(D,\hat{p})$ vectors $X(D,\hat{p})$ obtained from the finite field algorithm
is a spherical design of index $\hat{t}$. Furthermore, each vector $X(D,\hat{p})$ is a spherical
3-design.
\label{t:design}
\end{thm}
We see then that in the sense of discrepancy, the set of $k(D,\hat{p})$ vectors $X(D,\hat{p})$ is well distributed over $S^D$.
\subsubsection{Extension to finite fields of odd prime powers.}
We now study a finite field algorithm to finite fields of odd prime powers. We proceed as follows.
Fix $D\geq 1$ and solve the same quadratic form (17.12)
over a finite field $F_{\hat{q}}$, where $\hat{q}=(\hat{p})^{\hat{e}}$ and where $\hat{e}$ is an odd prime.
The field $F_{\hat{q}}$ is a $\hat{e}$-dimensional vector space over the field
$F_{\hat{p}}$. Thus, let $e _1, \dots, e_{\hat{e}}$ be a basis of $F_{\hat{q}}$ over $F_{\hat{p}}$.
If
$x\in F_{\hat{q}}$, then $x$ can be uniquely written as
$x= (\hat{e'})_{1}e _1 +\dots + (\hat{e'})_{\hat{e}}e_{\hat{e}}$, where each ${\hat{e'}}_{i}\in F_p,\, 1\leq i\leq \hat{e}$.
Moreover, we may assume as before that each $(\hat{e'})_{i},\, 1\leq i\leq \hat{e}$ satisfies $-(p-1)/2 \leq {\hat{e'}}_{i}\leq
(p-1)/2$ for $1\leq i\leq \hat{e}$.
If the vector $(x_1, \dots ,x_{D+1})$ is a solution to the quadratic form (17.12) over
$F_{\hat{q}}$,
then each coordinate $x_i,\, 1\leq i\leq D+1$ of this vector can be associated to an integer
$(\hat{e''})_{i} = (\hat{e'})_{1,i} +(\hat{e'})_{2,i}(\hat{p})+\dots +(\hat{e'})_{\hat{e},i}(\hat{p})^{\hat{e}-1}$ for
$1\leq i\leq D+1$. It is an easy exercise to check that
indeed $ -(p^{\hat{e}}-1)/2 \leq (\hat{e''})_{i}\leq (p^{\hat{e}}-1)/2$ for each $1\leq i\leq D+1$.
We then map the vector $((\hat{e''})_1, \dots, (\hat{e''})_{D+1})$ to the surface of the unit
sphere $S^D$ by normalizing. For increasing values of $\hat{e}$, we obtain an
increasing number $k_{\hat{e}}$ points scattered on the surface of
$S^D$, so that as $\hat{e} \rightarrow \infty$, it is clear that
$k_{\hat{e}} \rightarrow \infty$. We note that when $\hat{e}=1$, our new construction reduces
to our original construction.
\subsubsection{Codes, combinatorial designs.}
Our work in \cite{BDLM, DMM, DMM12, D38} relates to combinatorial designs and codes which we only cite here. See also Niederreiter et al. \cite{KN} for related work.
\section{Chapter 20: The unlabeled correspondence configuration problem.}
\setcounter{equation}{0}
In Chapter 2, we spoke to the unlabeled problem briefly. In this last section, we discuss this problem. The work comes from our paper \cite{FD5}.
The work below is motivated by the difficulty in trying to match point sets in the absence of labels in the sense that often one does not know which point to map to which.
This is refered to commonly as the unlabeled problem.
In the paper \cite{FD5}, we investigate ways to align two point configurations by first finding a correspondence between points and then constructing a map which aligns the configurations. The terms reordering and relabeling are used interchangeably. Examples are given in \cite{FD5} to show for example in $\mathbb R^2$, when in certain configurations, some distributions of distances do not allow good alignment and how we can partition certain configurations into polygons in order to construct maximum possible correspondences between these configurations, considering their areas. Algorithms are described for certain configurations with matching points along with examples where we find a permutation which gives us a relabeling, and also the required affine transformation which aligns certain configurations.
Ultimately our aim is to develop a possible framework to begin a study of Problem (1). We provide a taste below with the hope to whet the readers appetite for more by reading the paper \cite{FD5}.
Some of the notation we use in this section does not follow the same conventions as that used in other chapters. We find this convenient given common convention.
For what we present, we assume $D=2$ and $n\geq 2$.
We begin with:
\subsection{Non-reconstructible configurations.}
For the definition below, we will call two finite subsets $P,Q\subset \mathbb R^2$ congruent if there exists an isometry $f:\mathbb R^2\to \mathbb R^2$ with $f(P)=Q$.
We then have:
\begin{Def}
\textit{
By a relabeling, we mean that if there is an initial labeling of ordered points in two congruent configurations, we reorder them in such a way that there is a correspondence between the points}.
\end{Def}
An example: Suppose we are given 2 configurations of 5 points and there is an initial labeling of ordered points $\{a,b,c,d,e\}$ in
the first set and $\{a*,b*,c*,d*,e*\}$ in the second set where $a$ corresponds to $a*$, $b$ to $b*$, $c$ to $e*$, $d$ to $d*$ and $e$ to $c*$, one such relabeling will come from the permutation $\bigl(\begin{smallmatrix} 1 & 2 & 3 & 4 & 5\\ 1 & 2 & 5 & 4 & 3 \end{smallmatrix}\bigr)$.\\
We have:
\begin{Prop}
\cite{BK} \textit{Suppose } $n \neq 4.$ \textit{A permutation} $f \in S_{\binom{n}{2}}$ \textit{is a relabeling if and only if for all pairwise distinct indices} $i,j,k \in \{1,...,n\}$ \textit{we have:}
$$f\cdot\{i,j\} \cap f\cdot\{i,k\} \neq \emptyset.$$
\end{Prop}
In other words, we need to take the edges of equal length between the two configurations we are considering and check if there is a mutual vertex between all such pairs for a given permutation $f\in S_{\binom{n}{2}}$. This permutation is what will give us the labeling if it does exist.\\
\medskip
{\bf Question "QU".}
In the context of our work, we consider two given $n$-point configurations $P:=\{p_1,...,p_n\}$ and $Q:=\{q_1,...,q_n\}$ with their corresponding pairwise distances $D_P = \{dp_{ij} | dp_{ij}=|p_i-p_j|, 1\leq i,j\leq n\}$ and $D_Q = \{dq_{ij} | dq_{ij}=|q_i-q_j|, 1\leq i,j\leq n\}$ with $D_P = D_Q$ up to some reordering and $|D_P|=|D_Q|=\binom{n}{2}$.\\
\\
We then want to find if $\exists \{i,k\},\{j,l\}$ such that $dp_{ik} = dq_{jl} \text{ }\forall i,j,k,l \in \{1,...,n\}$ for a permutation $f \in S_{\binom{n}{2}}$. In the case where this isn't true, we hope to disregard a certain number of $\textit{bad points}$ from both configurations in order to achieve this.\\
Let us call this this question "QU".
\subsubsection{Example.}
Below is an example of question QU with two different 4-point configurations in $\mathbb{R}^2$ which have the same \textit{distribution of distances}. The corresponding equal distances between the 2 configurations are represented in the same color, and we have two edges with distances $1, 2 \text{ and } \sqrt{5}$, but it's obvious that there doesn't exist a Euclidean transformation corresponding the two
configurations.
From this example we can construct infinitely many sets of 2 different configurations with the same distribution of distances. This can be done by simply adding as many points as desired on the same location across the dashed line in both the configurations of Figure 22.
\pagebreak
\begin{figure}[h]
\centerline{\includegraphics[width=15cm]{Boutin_counterexample.jpg}}
\caption{Two different 4-point configurations with the same distribution of distances.}
\end{figure}
\begin{figure}[h]
\centerline{\includegraphics[width=15cm]{Boutin_counterexample_dashed.jpg}}
\caption{Configurations with the same distribution of distances for $n\geq4$.}
\end{figure}
In this example, it suffices to exclude one point from the two configurations to be able to obtain a Euclidean motion to correspond them.
We note that if it suffices to exclude a single bad-point from both configurations $P$ and $Q$, so that $P$ and $Q$ differ only by a Euclidean motion action, then iterating through the potential pairs of bad-points
will take $\mathcal{O}(n^2)$ complexity. The issue still arises in determining whether the points we excluded results in two congruent configurations.
We explore question QU more.
\subsection{Partition into polygons.}
We consider the following approach for question QU to see which points can be excluded if possible, from 2 configurations $P$ and $Q$ with some geometry.
Our idea is to partition the configurations into polygons and compare polygons of the \textit{same area}, in order to determine existing point correspondences between $P$ and $Q$. For any subsets $\{i,j,...\}\subseteq\{1,...,n\}$ or $\{s,t\}\subseteq\{1,...,k\}$ we consider in the upcoming sections, the elements of each to be distinct.
\subsubsection{Considering areas of triangles - \textit{10-step algorithm.}}
Considering our two $n$-point configurations which we write as $P=\{p_1,...,p_n\}$ and $Q=\{q_1,...,q_n\}$, we partition them into a total of $\binom{n}{3} \textit{ triangles }$ and considering the distance between our 3 vertex points in each case, let's say indexed $i,j,k$, we have the distances $dp_{ij},dp_{ik},dp_{jk}$ and analogously $dq_{i'j'},dq_{i'k'},dq_{j'k'}$.\\
We now compute the areas as follows:
$$A_{ijk} = \sqrt{s(s-dp_{ij})(s-dp_{ik})(s-dp_{jk})} \qquad \text{where } s:=\frac{dp_{ij}+dp_{ik}+dp_{jk}}{2}$$
$$B_{i'j'k'} = \sqrt{s'(s'-dq_{i'j'})(s'-dq_{i'k'})(s'-dq_{j'k'})} \qquad \text{where } s':=\frac{dq_{i'j'}+dq_{i'k'}+dq_{j'k'}}{2}$$
and consider the sets of areas
$$\mathcal{A}=\big\{A_{ijk} | \forall \{i,j,k\}\subseteq\{1,...,n\}\big\}$$ and
$$\mathcal{B}=\big\{B_{i'j'k'} | \forall \{i',j',k'\}\subseteq\{1,...,n\}\big\}\}$$
\smallskip
where $|\mathcal{A}|=|\mathcal{B}|=\binom{n}{3}=\frac{n(n-1)(n-2)}{6}$.
\vspace{5mm}
We further partition the above sets as follows:
$$\mathcal{A}_1 = \big\{A_{ijk} | A_{ijk}\in \mathcal{A} \text{ and } \exists B_{i'j'k'} \in \mathcal{B} \text{ s.t. } A_{ijk}=B_{i'j'k'} \big\}$$.
$$\mathcal{B}_1 = \big\{B_{i'j'k'} | B_{i'j'k'}\in \mathcal{B} \text{ and } \exists A_{ijk} \in \mathcal{A} \text{ s.t. } B_{i'j'k'}=A_{ijk} \big\}$$.
$$\mathcal{A}_2 = \mathcal{A} \backslash \mathcal{A}_1 \qquad \qquad \mathcal{B}_2 = \mathcal{B} \backslash \mathcal{B}_1$$.
Note that it may not be true that $|\mathcal{A}_1| = |\mathcal{B}_1|$, as the areas need not all be distinct. We essentially want the $\textit{shapes}$ formed by our points in the two sets which are "$\textit{identical}$". Let's assume our sets $\mathcal{A}_1$ and $\mathcal{B}_1$ are in ascending order with respect to the modes of the areas. We undertake the following steps in order to check which points to disregard and permutations are valid:
\begin{itemize}
\item Disregard all points from from $P$ and $Q$ which are vertices of triangles in $\mathcal{A}_2$ and $\mathcal{B}_2$ respectively, but at the same time not vertices of any triangle in $\mathcal{A}_1$ and $\mathcal{B}_1$.
\item In order we take $A_{ijk} \in \mathcal{A}_1$ and the corresponding triangles in $\mathcal{B}_1$, with $A_{ijk} = B_{i'j'k'}$.
\item If the distances of the sides of the triangles corresponding to $A_{ijk}$ and $B_{i'j'k'}$ don't match, disregard the triangles with area $B_{i'j'k'}$.
\item If the distances match up, we assign the points the corresponding points from $P$ to $Q$ and essentially start constructing our permutation. So thus far we have
$$\bigl(\begin{smallmatrix}
i & j & k & \cdots \\
i' & j' & k' & \cdots
\end{smallmatrix}\bigr)$$
Alternatively, we can match the points between $A_{ijk}$ and $B_{i'j'k'}$ which have the same corresponding \textit{angles}.
\item Note that we might have more than 1 possible permutation, so for now we keep track of all of them and list them as $\alpha_s^{(t)}= \bigl(\begin{smallmatrix}
i & j & k & \cdots \\
i' & j' & k' & \cdots
\end{smallmatrix}\bigr)$ for $s$ being the indicator of the triangle we take from $\mathcal{A}_1$, and $t$ being the indicator of the corresponding triangle in $\mathcal{B}_1$ in order (so if 3 triangles correspond, we have $t \in \{1,2,3\}$).
\begin{itemize}
\item For triangles with 3 distinct inner angles we will have 1 permutation, for \textit{isosceles} triangles 2 permutations, and for \textit{equilateral} triangles 3!=6 permutations.
\item In the case of \textit{squares} when considering quadrilaterals, we will have 4!=24 permutations which will be discussed more carefully in \cite{FD5}.
\item This can be thought of as \textit{matching angles} between equidistant edges of our polygons.
\end{itemize}
\item Go to the next triangle in $\mathcal{A}_1$ (which might have the same area as our previous triangle), and repeat steps 2-4.
\begin{itemize}
\item If the distances of our current triangle match with those of our previous triangle, simply take all previous permutations and "$\textit{concatenate}$" them. (We use the the term "$\textit{combine}$"). So for example $\big(\alpha_1^{(1)}\big)_{2} = \bigl(\begin{smallmatrix} \alpha_1^{(1)} \alpha_1^{(2)} \end{smallmatrix}\bigr) $, where the index $v$ in $\big(\alpha_s^{(t)}\big)_{v}$ indicates the combination we have with $\alpha_s^{(t)}$ being the first \textit{element} of the permutation as above. We therefore get a total of $\prod_{\iota=0}^{\nu-1}(t-\iota)$ permutations we are currently keeping track of, where $\nu$ is the number of \textit{elements} in the constructions thus far. Note that in the above procedure we assume no common points, and the case where mutual points exist is described below.
\end{itemize}
\item If our current and previous triangles $\textit{share points}$, we consider the combination of two triangles in $\mathcal{B}_1$ with the same corresponding areas and shapes and matching points as the combination of the two triangles taken from $\mathcal{A}_1$, so we'll either get a quadrilateral (if they share 2 points) or two triangles sharing an vertex (not a pentagon), and check whether all $\binom{4}{2}$ or $\binom{5}{2}$ distances between our 2 shapes match up. If they do, we replace the permutations we are keeping track of, and disregard any permutations from before which don't satisfy the conditions of this bullet-point.
\item If our current and previous triangles $\textit{don't share points}$, we essentially repeat steps 2-5 and $\textit{repeat}$ the permutations we are keeping track of, in a similar manner to that shown in step 6.
\item At this point we have traversed through all triangles in both $\mathcal{A}_1$ and $\mathcal{B}_1$ with the same area, and have constructed permutations (not necessarily all of the same size) which can be considered as $\textit{sub-correspondence}$ of points between $P$ and $Q$ (meaning that more points may be included to the correspondences). We are now going to be considering the triangles with area of the next lowest mode and repeat steps 2-8, while keeping track of the permutations we have thus far. Some steps though will be slightly modified as now we are considering various "shapes" (corresponding to our permutations), and in the above steps when referring to our "$\textit{previous triangle}$", we will now be considering our "$\textit{previous shapes}$".
\item Repeating the above until we traverse through all triangles in $\mathcal{A}_1$ and $\mathcal{B}_1$ will give us a certain number of permutations, and for our problem we can simply take the permutations of the largest size (we might have multiple) and the points which aren't included in that permutation can be considered as $\textit{bad points}$ for the problem. Note that certain points might be considered as $\textit{bad}$ for certain permutations and not for others, which depends entirely on the configurations $P$ and $Q$.
\end{itemize}
\subsubsection*{A Brief explanation on the above approach.}
The idea of the above approach is to disregard non-identical shapes and configurations of the point sets $P$ and $Q$, while simultaneously constructing the desired permutations of $\textit{sub-configurations}$ which have the same shape. Note that we start off with the triangle areas which have the smallest mode in order to simplify the implementation of this algorithm.
We guess that at least one framework to study smooth extensions in a setting of small distorted pairwise distances will require
that the maximum permutations constructed have size $n$, where all points will be included. A drawback of this approach, is that we keep track of a relatively large number of permutations through this process, but when going through each set of triangles of the same area, a lot of them are disregarded.
\subsubsection{Graph point of view.}
Another way to view this problem is as a graph problem, where our points correspond to vertices and the distances correspond to weighted edges between the vertices of a fully-connected graph. Considering the two graphs $G_P$ and $G_Q$ constructed by $P$ and $Q$ respectively, our goal is to find existing \textit{subgraph isomorphisms}. This is known to be an \textit{NP-Complete} problem. The triangles we were using above will correspond to 3-node cliques, while quadrilaterals will correspond to 4-node cliques.\\
\\
Considering this idea will actually make the problem significantly easier to implement, by taking advantage of the adjacency of matrices of the two graphs. In \cite{FD5} we use this concept to find the correspondence between the points, when it's known that there exists one for all points in $P$ and $Q$. This is the \textit{Graph Isomorphism} problem, and belongs in the \textit{NP-Intermediate} complexity class.
We do not present it here.
\subsubsection{Considering areas of quadrilaterals.}
Specifically aiming now at Problem (1) we find the following idea interesting.
We can partition $P=\{p_1,...,p_n\}$ and $Q=\{q_1,...,q_n\}$, by partitioning them into a total of $\binom{n}{4} \textit{ quadrilaterals }$, and consider the $\binom{4}{2}=6$ distances between our 4 vertex points in each case. If we take 4 distinct points indexed $i,j,k,l$, we have the set of distances $\mathcal{DP}_{ijkl}=\{dp_{ij},dp_{ik},dp_{il},dp_{jk},dp_{jl},dp_{kl}\}$ and analogously $\mathcal{DQ}_{i'j'k'l'}=\{dq_{i'j'},dq_{i'k'},dq_{i'l'},dq_{j'k'},dq_{j'l'},dq_{k'l'}\}$.\\
\\
We now compute the areas as follows: Define the following:
$$r:=\text{max}\{d \in \mathcal{DP}_{ijkl}\} \text{ , } s:=\text{max}\{d \in \mathcal{DP}_{ijkl} \backslash \{r\}\}$$
$$\{a,b,c,d\}:=\mathcal{DP}_{ijkl}\backslash\{r,s\} \text{, where \textit{a,c} correspond to distances of edges which don't share a vertex}$$
$$A_{ijkl} = \frac{1}{4}\sqrt{4r^2s^2-(a^2+c^2-b^2-d^2)^2}$$
$$r':=\text{max}\{d \in \mathcal{DQ}_{i'j'k'l'}\} \text{ , } s':=\text{max}\{d \in \mathcal{DQ}_{ijkl} \backslash \{r'\}\}$$
$$\{a',b',c',d'\}:=\mathcal{DQ}_{i'j'k'l'}\backslash\{r',s'\} \text{, where \textit{a',c'} correspond to distances of edges which don't share a vertex}$$
$$B_{i'j'k'l'} = \frac{1}{4}\sqrt{4r'^2s'^2-(a'^2+c'^2-b'^2-d'^2)^2}$$
Consider the sets of areas
$$\mathcal{A}=\big\{A_{ijkl} | \forall \{i,j,k,l\}\subseteq\{1,...,n\}\big\}$$.
$$\mathcal{B}=\big\{B_{i'j'k'l'} | \forall \{i',j',k',l'\}\subseteq\{1,...,n\}\big\}$$.
\smallskip
Here, $|\mathcal{A}|=|\mathcal{B}|=\binom{n}{4}=\frac{n(n-1)(n-2)(n-3)}{24}$.
\vspace{5mm}
We further partition the above sets as follows:
$$\mathcal{A}_1 = \big\{A_{ijkl} | A_{ijkl}\in \mathcal{A} \text{ and } \exists B_{i'j'k'l'} \in \mathcal{B} \text{ s.t. } A_{ijkl}=B_{i'j'k'l'} \big\}$$.
$$\mathcal{B}_1 = \big\{B_{i'j'k'l'} | B_{i'j'k'l'}\in \mathcal{B} \text{ and } \exists A_{ijkl} \in \mathcal{A} \text{ s.t. } B_{i'j'k'l'}=A_{ijkl} \big\}$$.
$$\mathcal{A}_2 = \mathcal{A} \backslash \mathcal{A}_1 \qquad \qquad \mathcal{B}_2 = \mathcal{B} \backslash \mathcal{B}_1$$.
We can now follow the same algorithm described in Section (20.2.1), with the exception that now we'll be considering 4 points at a time, rather than 3. Depending on the point-configurations $P$ and $Q$, either this approach or the previous approach might be more efficient, but this cannot be determined a priori.
\pagebreak
\subsection{Partition into polygons for small distorted pairwise distances.}
The purpose of this section is to see now what can be done related to possible frameworks for Problem (1) using this circle of ideas.
\subsubsection{Areas of triangles for small distorted pairwise distances.}
For notational convenience we will be using the same notation used in Section (20.2.1) as well as the fact that our sets will have the following property we will call "EP":
$$(1-\varepsilon_{ij}) \leq \frac{dp_{ij}}{dq_{i'j'}} \leq (1+\varepsilon_{ij}) \text{, } \forall \{i,j,i',j'\} \subseteq \{1,...,n\},\, i\neq j,\, i'\neq j'$$
Here, $\varepsilon_{ij}>0$ are small enough.
\vspace{5mm}
Property EP replaces: $dp_{ij} = dq_{i'j'}, \forall \{i,j,i',j'\} \subseteq \{1,...,n\}$.
Let us state the following below as an intereresting result (although quite computational).
\begin{Thm}
\textit{For our usual setup, it holds that for three points in our two point configurations $P$ and $Q$ with indices and areas $\{i,j,k\}$, $A_{ijk}$ and $\{i',j',k'\}$, $B_{i'j'k'}$ respectively,
the following holds: Given $\varepsilon_{ij}>0$ small enough. Then property EP holds iff}
$$\sqrt{(B_{i'j'k'})^2-\frac{1}{4}\cdot H_{1}} \leq A_{ijk} \leq \sqrt{(B_{i'j'k'})^2+\frac{1}{4}\cdot H_{2}}$$
\textit{where $H_1,H_2$ depend on} $E := max\big\{\varepsilon_{st}|\{s,t\} \subseteq \{i,j,k\}\big\}$, \textit{and the elements of the distribution of distances of} $B_{i'j'k'}$.\\
\end{Thm}
\begin{proof}
Considering the area of the triangles defined by the points $p_i,p_j,p_k$ and the corresponding points $q_i',q_j',q_k'$, we define $\varepsilon_{ij-} := (1-\varepsilon_{ij})$, $\varepsilon_{ij+} := (1+\varepsilon_{ij})$, and obtain the following 3 inequalities for each triangle:
$$dq_{i'j'} \cdot \varepsilon_{ij-} \leq dp_{ij} \leq dq_{i'j'} \cdot \varepsilon_{ij+}$$.
$$dq_{i'k'} \cdot \varepsilon_{ik-} \leq dp_{ik} \leq dq_{i'k'} \cdot \varepsilon_{ik+}$$.
$$dq_{j'k'} \cdot \varepsilon_{jk-} \leq dp_{jk} \leq dq_{j'k'} \cdot \varepsilon_{jk+}$$.
In order to simplify our computations, we define:
$$E := max\big\{\varepsilon_{st}|\{s,t\} \subseteq \{i,j,k\}\big\}$$ and
$$E_{-}:=(1-E) \qquad E_{+}:=(1+E)$$ We then have:
$$dq_{s't'} \cdot E_{-} \leq dp_{st} \leq dq_{s't'} \cdot E_{+}$$ for all pairs $$\{s,t\} \subseteq \{i,j,k\}$$
and the following:
$$s := dp_{ij}+dp_{ik}+dp_{jk}$$
$$s' := dq_{i'j'}+dq_{i'k'}+dq_{j'k'}$$
\vspace{2mm}
It then follows that for all pairs $\{s,t\} \subseteq \{i,j,k\}$, that
$$(2dq_{s't'}) \cdot E_{-} \leq 2dp_{st} \leq (2dq_{s't'}) \cdot E_{+}$$ and
$$(-2dq_{s't'}) \cdot E_{+} \leq -2dp_{st} \leq (-2dq_{s't'}) \cdot E_{-}$$ which give
$$(dq_{i'j'}+dq_{i'k'}+dq_{j'k'}) \cdot E_{-} \leq dp_{ij}+dp_{ik}+dp_{jk} \leq (dq_{i'j'}+dq_{i'k'}+dq_{j'k'}) \cdot E_{+}$$ and so
$$s' \cdot E_{-} \leq s \leq s' \cdot E_{+}$$ which means that
$$(s'\cdot E_{-} -2dq_{i'j'}\cdot E_{+}) \leq (s-2dq_{ij}) \leq (s'\cdot E_{+} -2dq_{i'j'}\cdot E_{-})$$
\vspace{2mm}
Taking advantage of the $\textit{triangle inequality}$, $s'\leq 2dq_{i'j'}$, we get the following $\textit{bounds}$
$$2dq_{i'j'}\cdot(E_{-} - E_{+}) \leq (s'\cdot E_{-} -2dq_{i'j'}\cdot E_{+}) \leq (s-2dq_{ij}) \leq (s'\cdot E_{+} -2dq_{i'j'}\cdot E_{-}) \leq 2s'\cdot(E_{+} - E_{-})$$
$$2dq_{i'j'}\cdot(E_{-} - E_{+}) \leq (s-2dq_{ij}) \leq 2s'\cdot(E_{+} - E_{-})$$
$$(-4E)\cdot dq_{i'j'} \leq (s-2dq_{ij}) \leq (4E)\cdot s'$$
$$0 \leq (s-2dq_{ij}) \leq (4E)\cdot s'$$
\vspace{2mm}
We know that the area of the triangle defined by the points in the configurations $P$ and $Q$ are respectively
$$A_{ijk} = \sqrt{\frac{s(\frac{s}{2}-dp_{ij})(\frac{s}{2}-dp_{ik})(\frac{s}{2}-dp_{jk})}{2}} = \frac{1}{2}\sqrt{s(s-2dp_{ij})(s-2dp_{ik})(s-2dp_{jk})}$$
and so $$A_{ijk} = \frac{1}{2}\cdot\sqrt{S} \text{ for } S:= s(s-2dp_{ij})(s-2dp_{ik})(s-2dp_{jk})$$
$$B_{i'j'k'} = \sqrt{\frac{s'(\frac{s'}{2}-dq_{i'j'})(\frac{s'}{2}-dq_{i'k'})(\frac{s'}{2}-dq_{j'k'})}{2}} = \frac{1}{2}\sqrt{s'(s'-2dq_{i'j'})(s'-2dq_{i'k'})(s'-2dq_{j'k'})}$$
and so $$B_{i'j'k'} = \frac{1}{2}\cdot\sqrt{S'} \text{ for } S':= s'(s'-2dq_{i'j'})(s'-2dq_{i'k'})(s'-2dq_{j'k'})$$
We don't undertake any simplifications, and from the above inequalities considering the indices $\{i,j,k\}$ and $\{i',j',k'\}$, we perform the following computations with suitable
symbols for ease of analysis.
$$s'\prod_{\iota'\neq\kappa'}(s'\cdot E_{-}-2dq_{\iota'\kappa'}\cdot E_{+}) \leq s\prod_{\iota\neq\kappa}(s-2dp_{\iota\kappa}) \leq s'\prod_{\iota'\neq\kappa'}(s'\cdot E_{+}-2dq_{\iota'\kappa'}\cdot E_{-})$$
$$s'\prod_{\iota'\neq\kappa'}[(s'-2dq_{\iota'\kappa'})-(s'+2dq_{\iota'\kappa'})\cdot E] \leq s\prod_{\iota\neq\kappa}(s-2dp_{\iota\kappa}) \leq s'\prod_{\iota'\neq\kappa'}[(s'-2dq_{\iota'\kappa'})+(s'+2dq_{\iota'\kappa'})\cdot E]$$
$$s'(\alpha_1-\beta_1)(\alpha_2-\beta_2)(\alpha_3-\beta_3) \leq s\prod_{\iota\neq\kappa}(s-2dp_{\iota\kappa}) \leq s'(\alpha_1+\beta_1)(\alpha_2+\beta_2)(\alpha_3+\beta_3)$$
$$s'\Big[\alpha_1\alpha_2\alpha_3-[\alpha_3\beta_2(\alpha_1-\beta_1)+\alpha_1\beta_3(\alpha_2-\beta_2)+\alpha_2\beta_1(\alpha_3-\beta_3)]-\beta_1\beta_2\beta_3\Big] \leq s\prod_{\iota\neq\kappa}(s-2dp_{\iota\kappa}) \leq$$
$$\leq s'\Big[\alpha_1\alpha_2\alpha_3+[\alpha_3\beta_2(\alpha_1+\beta_1)+\alpha_1\beta_3(\alpha_2+\beta_2)+\alpha_2\beta_1(\alpha_3+\beta_3)]+\beta_1\beta_2\beta_3\Big]$$
$$S'-s'\Big[\alpha_3\beta_2(\alpha_1-\beta_1)+\alpha_1\beta_3(\alpha_2-\beta_2)+\alpha_2\beta_1(\alpha_3-\beta_3)+\beta_1\beta_2\beta_3\Big] \leq S \leq$$
$$\leq S'+s'\Big[\alpha_3\beta_2(\alpha_1+\beta_1)+\alpha_1\beta_3(\alpha_2+\beta_2)+\alpha_2\beta_1(\alpha_3+\beta_3)+\beta_1\beta_2\beta_3\Big]$$
$$S'-H_{1} \leq S \leq S'+H_{2}$$
Comparing the areas of two corresponding triangles from the 2 point-configurations we then get:
$$4\cdot (B_{i'j'k'})^2-H_{1} \leq 4\cdot (A_{ijk})^2 \leq 4\cdot (B_{i'j'k'})^2+H_{2} $$
$$(B_{i'j'k'})^2-\frac{1}{4}\cdot H_{1} \leq (A_{ijk})^2 \leq (B_{i'j'k'})^2+\frac{1}{4}\cdot H_{2} $$
$$\sqrt{(B_{i'j'k'})^2-\frac{1}{4}\cdot H_{1}} \leq A_{ijk} \leq \sqrt{(B_{i'j'k'})^2+\frac{1}{4}\cdot H_{2}}$$
This gives the required upper and lower bounds.
\end{proof}
\subsubsection{Considering areas of triangles (part 2).}
For areas of triangles with property EP, we construct the sets of areas of the partitioned triangles as follows:
$$\mathcal{A}=\{A_{ijk} | \forall \{i,j,k\}\subseteq\{1,...,n\}\}$$
$$\mathcal{B}=\{B_{i'j'k'} | \forall \{i',j',k'\}\subseteq\{1,...,n\}\}$$
$$\mathcal{A}_1 = \big\{A_{ijk} | A_{ijk}\in \mathcal{A} \text{ w/ \textit{E} and } \exists B_{i'j'k'} \in \mathcal{B} \text{, s.t. } |\sqrt{(B_{i'j'k'})^2-\frac{H_{1}}{4}}| \leq A_{ijk} \leq |\sqrt{(B_{i'j'k'})^2+\frac{H_{2}}{4}}|\big\}$$
$$\mathcal{B}_1 = \big\{B_{i'j'k'} | B_{i'j'k'}\in \mathcal{B} \text{ and } \exists A_{ijk} \in \mathcal{A} \text{ w/ \textit{E}, s.t. } |\sqrt{(B_{i'j'k'})^2-\frac{H_{1}}{4}}| \leq A_{ijk} \leq |\sqrt{(B_{i'j'k'})^2+\frac{H_{2}}{4}}|\big\}$$
$$\mathcal{A}_2 = \mathcal{A} \backslash \mathcal{A}_1 \qquad \qquad \mathcal{B}_2 = \mathcal{B} \backslash \mathcal{B}_1$$
Here, we use suitable constants when needed.
We then follow the exact same $\textit{10-step algorithm}$ in Section (20.2.1) to get the desired result although now it is very unlikely that 2 or more triangles will have the exact same area.
\subsubsection{Areas of quadrilaterals for small distorted pairwise distances.}
Just as above, for notational convenience we will be using the same notation used in Section (20.2.1), as well as the fact that our sets will have property EP.
\vspace{5mm}
Let us state the following below as an interesting result.
\begin{Thm}
\textit{For our usual setup, it holds that for four points in our two point configurations $P$ and $Q$ with indices and areas $\{i,j,k\}$, $A_{ijk}$ and $\{i',j',k'\}$, $B_{i'j'k'}$ respectively,
the following holds: Given $\varepsilon_{ij}>0$ small enough. Then property EP holds iff}
$$\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2-\frac{\hat{H}_{2}}{16}} \leq A_{ijkl} \leq \sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2+\frac{\hat{H}_{2}}{16}}$$
\textit{where $\hat{H}_{1},\hat{H}_{2}$ depend on $E := max\big\{\varepsilon_{st}|\{s,t\} \subseteq \{i,j,k,l\}\big\}$, \textit{and the elements of the distribution of distances of} $B_{i'j'k'l'}$}.
\end{Thm}
\vspace{2mm}
\begin{proof}
Our proof is as computational as Theorem 18.1 and similar. As before, we perform the following computations with suitable
symbols for ease of analysis.
We consider our two $n$-point configurations $P=\{p_1,...,p_n\}$ and $Q=\{q_1,...,q_n\}$, and partition them into a total of $\binom{n}{4} \textit{ quadrilaterals }$, and take into account $\binom{4}{2}=6$ distances between our 4 points in each case. If we take the 4 points indexed $i,j,k,l$, we have the set of distances $\mathcal{DP}_{ijkl}=\{dp_{ij},dp_{ik},dp_{il},dp_{jk},dp_{jl},dp_{kl}\}$ and analogously $\mathcal{DQ}_{i'j'k'l'}=\{dq_{i'j'},dq_{i'k'},dq_{i'l'},dq_{j'k'},dq_{j'l'},dq_{k'l'}\}$ for our 2nd configuration. We also define $\varepsilon_{ij-} := (1-\varepsilon_{ij})$, $\varepsilon_{ij+} := (1+\varepsilon_{ij})$, and get the following 6 inequalities for each triangle:
$$dq_{i'j'} \cdot \varepsilon_{ij-} \leq dp_{ij} \leq dq_{i'j'} \cdot \varepsilon_{ij+} \qquad \qquad dq_{j'k'} \cdot \varepsilon_{jk-} \leq dp_{jk} \leq dq_{j'k'} \cdot \varepsilon_{jk+}$$
$$dq_{i'k'} \cdot \varepsilon_{ik-} \leq dp_{ik} \leq dq_{i'k'} \cdot \varepsilon_{ik+} \qquad \qquad dq_{j'l'} \cdot \varepsilon_{jl-} \leq dp_{jl} \leq dq_{j'l'} \cdot \varepsilon_{jl+}$$
$$dq_{i'l'} \cdot \varepsilon_{il-} \leq dp_{il} \leq dq_{i'l'} \cdot \varepsilon_{il+} \qquad \qquad dq_{k'l'} \cdot \varepsilon_{kl-} \leq dp_{kl} \leq dq_{k'l'} \cdot \varepsilon_{kl+}$$
Following a similar approach to what was shown previously, we define the following parameters and compute the areas:
$$E := max\big\{\varepsilon_{st}|\{s,t\} \subseteq \{i,j,k,l\}\big\}$$
$$E_{-}:=(1-E) \qquad E_{+}:=(1+E)$$ which gives
$$dq_{s't'} \cdot E_{-} \leq dp_{st} \leq dq_{s't'} \cdot E_{+} \text{ , for all pairs \{s,t\}} \subseteq \{i,j,k,l\}$$
and
$$r:=\text{max}\{d \in \mathcal{DP}_{ijkl}\} \qquad s:=\text{max}\{d \in \mathcal{DP}_{ijkl} \backslash \{r\}\}$$
$$\{a,b,c,d\}:=\mathcal{DP}_{ijkl}\backslash\{r,s\} \text{, where \textit{a,c} correspond to distances of edges which don't share a vertex}$$
$$S:=(a^2+c^2-b^2-d^2) \qquad \tilde{S}:=(a^2+b^2+c^2+d^2)$$
$$A_{ijkl} = \frac{1}{4}\sqrt{4r^2s^2-(a^2+c^2-b^2-d^2)^2}$$ and so $$A_{ijkl} = \frac{1}{4}\sqrt{4r^2s^2-S^2}$$
$$r':=\text{max}\{d \in \mathcal{DQ}_{i'j'k'l'}\} \qquad s':=\text{max}\{d \in \mathcal{DQ}_{i'j'k'l'} \backslash \{r'\}\}$$
$$\{a',b',c',d'\}:=\mathcal{DQ}_{i'j'k'l'}\backslash\{r',s'\} \text{, where \textit{a',c'} correspond to distances of edges which don't share a vertex}$$
$$S':=(a'^2+c'^2-b'^2-d'^2) \qquad \tilde{S'}:=(a'^2+b'^2+c'^2+d'^2)$$
$$B_{i'j'k'l'} = \frac{1}{4}\sqrt{4r'^2s'^2-(a'^2+c'^2-b'^2-d'^2)^2} \Longrightarrow B_{i'j'k'l'} = \frac{1}{4}\sqrt{4r'^2s'^2-S'^2}$$
\vspace{2mm}
It then follows that for all pairs $\{s,t\} \subseteq \{i,j,k\}$
$$(dq_{s't'})^2 \cdot (E_{-})^2 \leq (dp_{st})^2 \leq (dq_{s't'})^2 \cdot (E_{+})^2$$
$$-(dq_{s't'})^2 \cdot (E_{+})^2 \leq -(dp_{st})^2 \leq -(dq_{s't'})^2 \cdot (E_{-})^2$$
which implies that
$$(r's')^2\cdot (E_{-})^4 \leq (rs)^2 \leq (r's')^2\cdot (E_{+})^4$$
and
$$\Big[(a'^2+c'^2)\cdot (E_{-})^2-(+b'^2+d'^2)\cdot (E_{+})^2\Big] \leq (a^2+c^2-b^2-d^2) \leq \Big[(a'^2+c'^2)\cdot (E_{+})^2-(+b'^2+d'^2)\cdot (E_{-})^2\Big]$$
$$\Big[(a'^2+c'^2)\cdot (1-2E+E^2)-(+b'^2+d'^2)\cdot (1+2E+E^2)\Big] \leq (a^2+c^2-b^2-d^2) \leq$$
$$\leq \Big[(a'^2+c'^2)\cdot (1+2E+E^2)-(+b'^2+d'^2)\cdot (1-2E+E^2)\Big]$$
$$\Big[(a'^2+c'^2-b'^2-d'^2)\cdot(1+E^2)-2E\cdot(a'^2+c'^2+b'^2+d'^2)\Big] \leq (a^2+c^2-b^2-d^2) \leq$$
$$\leq \Big[(a'^2+c'^2-b'^2-d'^2)\cdot(1+E^2)+2E\cdot(a'^2+c'^2+b'^2+d'^2)\Big]$$
$$\Big[S'\cdot(1+E^2)-\tilde{S'}\cdot(2E)\Big] \leq S \leq \Big[S'\cdot(1+E^2)+\tilde{S'}\cdot(2E)\Big]$$
$$-\Big[S'\cdot(1+E^2)+\tilde{S'}\cdot(2E)\Big]^2 \leq -S^2 \leq -\Big[S'\cdot(1+E^2)-\tilde{S'}\cdot(2E)\Big]^2$$
$$-S'^2\cdot(1+E^2)^2-\Big[\tilde{S'}\cdot(2E)\cdot[2E\tilde{S'}+S'(1+E^2)]\Big] \leq -S^2 \leq$$
$$\leq -S'^2\cdot(1+E^2)^2-\Big[\tilde{S'}\cdot(2E)\cdot[2E\tilde{S'}-S'(1+E^2)]\Big]$$
$$-S'^2\cdot(1+E^2)^2-H_1 \leq -S^2 \leq -S'^2\cdot(1+E^2)^2-H_2$$
Comparing the areas of two corresponding quadrilaterals from the 2 point-configurations we then get:
$$4(r's')^2\cdot(E_{-})^4-S'^2\cdot(1+E^2)^2-H_1 \leq 4(rs)^2-S^2 \leq 4(r's')^2\cdot(E_{+})^4 -S'^2\cdot(1+E^2)^2-H_2$$
$$4(r's')^2\cdot[(1+E^2)^2-4E(1-E+E^2)]-S'^2\cdot(1+E^2)^2-H_1 \leq 4(rs)^2-S^2 \leq$$
$$\leq 4(r's')^2\cdot[(1+E^2)^2+4E(1+E+E^2)] -S'^2\cdot(1+E^2)^2-H_2$$
$$\Big[4(r's')^2-S'^2\Big]\cdot(1+E^2)^2-\Big[16(r's')^2\cdot(E-E^2+E^3)+H_1\Big] \leq 4(rs)^2-S^2 \leq$$
$$\leq \Big[4(r's')^2-S'^2\Big]\cdot(1+E^2)^2+\Big[16(r's')^2\cdot(E+E^2+E^3)-H_2\Big]$$
$$\Big[4(r's')^2-S'^2\Big]\cdot(1+E^2)^2-\hat{H}_{1} \leq 4(rs)^2-S^2 \leq \Big[4(r's')^2-S'^2\Big]\cdot(1+E^2)^2+\hat{H}_{2}$$
$$(B_{i'j'k'l'})^2\cdot(1+E^2)^2-\frac{\hat{H}_{1}}{16} \leq (A_{ijkl})^2 \leq B_{i'j'k'l'}^2\cdot(1+E^2)^2+\frac{\hat{H}_{2}}{16}$$
$$\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2-\frac{\hat{H}_{1}}{16}} \leq A_{ijkl} \leq \sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2+\frac{\hat{H}_{2}}{16}}$$
\end{proof}
Finally, we have for this section the following.
\subsubsection{Considering areas of quadrilaterals (part 2).}
For areas of quadrilaterals with property EP we construct the sets of areas of the partitioned quadrilaterals as follows.
$$\mathcal{A}=\big\{A_{ijkl} | \forall \{i,j,k,l\}\subseteq\{1,...,n\}\big\}$$
$$\mathcal{B}=\big\{B_{i'j'k'l'} | \forall \{i',j',k',l
'\}\subseteq\{1,...,n\}\big\}$$
$$\mathcal{A}_1 = \big\{ A_{ijkl} | A_{ijkl}\in \mathcal{A} \text{ w/ \textit{E} and } \exists B_{i'j'k'l'} \in \mathcal{B} \text{, s.t. } |\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2-\frac{\hat{H}_{1}}{16}}|\leq$$
$$\leq A_{ijkl} \leq |\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2+\frac{\hat{H}_{2}}{16}}|\big\}$$
$$\mathcal{B}_1 = \big\{B_{i'j'k'l'} | B_{i'j'k'l'}\in \mathcal{B} \text{ and } \exists A_{ijkl} \in \mathcal{A} \text{ w/ \textit{E}, s.t. } |\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2-\frac{\hat{H}_{1}}{16}}|\leq$$
$$\leq A_{ijkl} \leq |\sqrt{(B_{i'j'k'l'})^2\cdot(1+E^2)^2+\frac{\hat{H}_{2}}{16}}|\big\}$$
$$\mathcal{A}_2 = \mathcal{A} \backslash \mathcal{A}_1 \qquad \qquad \mathcal{B}_2 = \mathcal{B} \backslash \mathcal{B}_1$$
We then follow a similar $\textit{10-step algorithm}$ to get the desired result although now it is very unlikely that 2 or more quadrilaterals will have the exact same area. We use suitable constants when needed as before.
\pagebreak
In\cite{FD5}, we study further topics for example of reconstruction from distances, relabeling, visulization and algorithms
in great detail using much machinary for example the Kabsch algorithm.
\section{Concluding remark.}
\setcounter{equation}{0}
It is clear that there are many problems and connections to pursue regarding the work in this memoir.
|
\section{Introduction}
Betweenness and similar measures are important concepts in network analysis \citep{borgatti2009network}. For example, the closeness centrality of a node quantifies the degree of closeness of the node to other nodes by summing up the lengths of shortest path, also known as geodesic, from the node to each of all other nodes \citep{bavelas1950communication}. It can be considered as a measure of broadcasters. Betweenness centrality is a related but distinct measure. It aims to find potential ``bridges'' rather than ``broadcasters''. Mathematically, the betweenness centrality of a node is defined as the number of times that it is on the shortest path between other pairs of nodes \citep{freeman1977set, bavelas1948mathematical}. These metrics have been widely used to understand the roles of individual vertices in a social network by examining the positions of vertices in a graphical network model \citep{borgatti2009network}.
Betweenness is also of high relevance in comparing multiple items or populations. A motivating example for the methodology developed here is a set of electrophysiological measurements collected from two neuronal populations with distinct functional and physiological characteristics, and a novel population believed to have a functional role overlapping with both of the existing populations. The two existing populations are parvalbumin(PV) expressing neurons, which tend to be fast-spiking, and cholecystokinin(CCK) expressing neurons that are non-fast-spiking. Recently, our collaborator Dr. Xu at the department of Neurology of UCI and his team found that PV/CCK double positive cells exist in adult mice. An important question is whether the PV/CCK neuronal population ``lies between'' PV and CCK populations with respect to a set of electrophysiological characteristics.
Another interesting example is the iris data, which is a classical multivariate data set that has been widely used to illustrate various statistical analysis and machine learning, such as clustering and classification, of multivariate data. Fisher introduced the data to illustrate linear discriminant analysis \citep{fisher1936use}. It is perhaps less well known that the data were collected by Edgar Anderson to quantify the morphological features of three iris species: Iris setosa, Iris versicolor, and Iris virginica \citep{anderson1936species}. Based on four morphological features, namely petal length, petal width, sepal length, and sepal width, Anderson hypothesized that \textit{Iris versicolor} is ``in an intermediate position morphologically'' between \textit{Iris virginica} and \textit{Iris setosa}. In this case, the geometric relationship of interest falls into the general idea of in-betweenness.
In both examples, multiple features were measured on each subject. Although various dimension reduction methods have been used to visualize the geometric relationship between different subtypes of data, there is a lack of formal definition, quantification, and statistical framework to make inference of in-betweenness with respect to a set of observed features. We introduce a general method for statistical inference of in-betweenness, and consider two statistics motivated by random triangle theory. We also consider the construction of bootstrap confidence regions for shape space parameters, which are of use when the relative positioning of three subgroup centroids is of interest.
This rest of this chapter is outlined as follows. In Section 2 we introduce the notations and several coordinates for random triangles and derive the distribution of random triangles formed from iid $N(0,1)$ observations. Metrics for quantifying in-betweenness and their statistical inference are provided in Section 3. The statistical approaches to make inference of in-betweenness are illustrated using simulations and three real examples in Section 4. We conclude this chapter with a discussion of the advantages, limitations, and future work in Section 5.
\section{Statistical Shape Theory of Random Triangles}
Interests in random triangles date back to at least 1884 with the publication of Lewis Carroll's ``Pillow Problem" \citep{carroll1893curiosa}. Paraphrased, this problem asks: what is the probability that a randomly generated triangle in the plane is obtuse? Despite its simplicity (and ambiguity), this question exemplifies the perspective of statistical shape theory, which is concerned with the stochastic properties of random configurations of points (landmarks) when location, scale, and orientation have been removed.
A modern development of statistical shape theory was initially motivated by applications to studying the relationships of shape and size in biological specimens. In this setting, the goal is to conduct inference regarding the geometric characteristics of biological features, such as skull shape across samples of closely related species. For this analysis, relevant landmarks are labeled on each biological specimen, yielding a sample of observed shapes. Given such a sample, the tools of statistical shape theory can be used to test equality of shapes across species, or quantify the morphological similarity of different subpopulations. Other examples of previous applications of shape analysis include the study of vertebrae from a sample of specimens from the same species \citep{mardia1989shape}, protein molecules \citep{green2006bayesian}, and magnetic resonance images \citep{dequardo1996spatial}. In these settings, the shapes under consideration are two- or three-dimensional, with the landmarks chosen to sufficiently describe the physical features of scientific interest.
Different from the usual application of shape theory to a sample of observed, physical objects, the present work instead applies the results of classical shape theory to analyze the relationship of three subpopulations measured across a set of common variables. This approach is similar in some ways to correlation analysis of two feature sets, where the joint relationship is quantified by a scale-, location-, and rotation-free triangle, rather than a correlation coefficient.
\subsection{Triangle Shape Space}
In this section, we review the relevant definitions for general shape theory and some of the existing results regarding triangle shape space. We mostly follow the terminology and definitions established in \cite{dryden2016statistical}, which provides a comprehensive introduction to statistical shape theory.
\begin{definition}
A \textbf{configuration} is a set of $k$ points (landmarks) in $\mathbb{R}^p$. The \textbf{configuration matrix} $X$ is the $k \times p$ matrix of the landmark coordinates. The \textit{configuration space} is the space of all configuration matrices.
\end{definition}
To construct a formal definition of \textit{shape}, we first consider the \textit{pre-shape} of a configuration, which is the remaining information after location and scale have been removed.
\begin{definition}
For a $k \times p$ configuration matrix $X$, the \textbf{pre-shape} $Z$ is
\begin{equation}
Z = \frac{H X}{\|H X\|}
\label{eqn:preshape}
\end{equation}
where $\|H X\| = \sqrt{\text{tr}(X'H'H X)}$, for $H$ the $(k - 1) \times k$ Helmert submatrix.
The \textbf{pre-shape} space of $k$ landmarks in $p$ dimensions, denoted $S^k_p$, is the set of all possible pre-shapes $Z$ over configurations $X \in \mathbb{R}^{k \times p}$.
\label{def:pre-shape}
\end{definition}
\textbf{\textit{Remark}} In the case of triangular configurations, we denote the $2 \times 3$ Helmert submatrix $\Delta$, that has entries
\begin{equation}
\label{eqn:helmert}
\Delta = \begin{pmatrix}\frac{1}{\sqrt{2}} & \frac{-1}{\sqrt{2}} & 0 \\
\frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} & \frac{-2}{\sqrt{6}}\end{pmatrix}.
\end{equation}
$\Delta$ can be viewed as the edge matrix of an equilateral triangle, and plays an important role in the construction of triangle shape coordinates given in Section \ref{shape_coordinates}.
The \textit{shape} of a configuration is formally defined as the equivalence class of the pre-shape over all possible rotations.
\begin{definition}
The \textbf{shape} of configuration $X$ with pre-shape $Z$ is the equivalence class
\begin{equation}
[X] = \{Z\Gamma ~|~ \Gamma \in SO(p)\},
\end{equation}
where $SO(p)$ is the group of $p\times p$ orthogonal matrices with positive unit determinant.
\end{definition}
\begin{definition}
The \textbf{shape space} of $k \times p$ configurations, denoted $\Sigma_k^p$ is the set of all equivalence classes $[X]$ for configurations $X \in \mathbb{R}^{k \times p}$.
\end{definition}
\begin{theorem}[\cite{dryden2016statistical}]\label{thm:triangle_shape_space}
For the case of triangular configurations ($k = 3, p \geq 2$), the pre-shape space is a hypersphere embedded in $\mathbb{R}^{2p}$. Triangular shape space can be identified with the unit disk in $\mathbb{R}^2$, or, equivalently, with the upper hemisphere of radius 1/2 in $\mathbb{R}^3$.
\end{theorem}
A detailed discussion and derivation of the properties of triangle shape and pre-shape spaces is given in \cite{dryden2016statistical}. The triangle shape coordinates in Section \ref{shape_coordinates} provide explicit mappings from a triangular configuration $X$ to triangle shape space.
\subsection{Triangle Shape Coordinates}
\label{shape_coordinates}
Many formulations of triangle shape coordinates are possible, such as those developed by \cite{bookstein1986size}, \cite{kendall1984shape}, and \cite{dryden1991general}. We adopt a set of polar shape coordinates based on the formulation of Kendall's spherical coordinates presented in \cite{edelman2015random}, which are the natural result of a specific mapping from configuration space to shape space, and which have a linear relationship with the squared triangle side lengths (after scaling). The relationship of these coordinates to other shape coordinate systems is discussed in Section ~\ref{shape_coordinates}, with further details given in \cite{dryden2016statistical}.
To define triangle polar coordinates, we consider a transformation from a configuration $X$ to coordinates $(r, \phi), 0 \leq r \leq 1, 0 \leq \phi < 2\pi$ constructed by successively removing the location, orientation, and scale information. To remove location information we can simply center the columns of $X$, and hereafter assume that $X$ has been centered. To remove the scale and orientation, it is convenient to instead work with the \textit{edge matrix}, $E$, which contains the edge vectors defined by the configuration $X$. $E$ can be calculated from $X$ by $E = X'T$, where $T$ is the pairwise difference matrix
\begin{equation}
T = \begin{pmatrix}
1 & -1 & 0\\
0 & 1 & -1\\
-1 & 0 & 1
\end{pmatrix}.
\end{equation}
Let $M=E\Delta'$ where $\Delta$ is the Helmert matrix given in \ref{eqn:helmert}. To remove location and reflection, consider the singular value decomposition of $M$
\begin{align}
M &= UD V' \\
&= U\begin{pmatrix}d_1 & 0\\0 & d_2\end{pmatrix}\begin{pmatrix}\cos(\phi/2) & \sin(\phi/2)\\-\sin(\phi/2) & \cos(\phi/2)\end{pmatrix}\label{eqn:svd},
\end{align}
\noindent where we assume $d_1 \geq d_2 \geq 0$. Discarding the left eigenvectors $U$ removes the rotation and reflection information from the configuration. The polar shape coordinates are then obtained from the residual transformation $DV'$.
\begin{definition}
\label{def:polar}
\textbf{Polar shape coordinates} for a triangular configuration with decomposition in Equation \ref{eqn:svd} are $(r, \phi) \in [0, 1] \times [0, 2\pi)$, with $$r = \sqrt{1 - 4d_1^2d_2^2/(d_1^2 + d_2^2)^2}$$\\
The corresponding \textbf{rectangular shape coordinates} are $u = r\cos\phi, v = r\sin\phi$.
\end{definition}
This mapping verifies the result that triangle shape space is identifiable with the unit circle in $\mathbb{R}^2$, and is independent of the dimension of the ambient space of $X$. By construction, the shape representation of a given triangle is invariant to translation, rotation, and scaling of the original triangle, thus the transformation $X \to E \to M \to (r, \phi)$ associates every triangular configuration with a point on the unit disk such that configurations with the same shape are mapped to the same shape space point. The singular exception is the case when all landmarks are coincident, which does not have defined shape space coordinates.
Triangle shape space is structured with many intuitive properties. Circles centered at the origin with radius $\leq 1$ describe triangles of equal area, with the boundary consisting of degenerate triangles of area 0, and the origin equal to the unique equilateral triangle. A radius in shape space (of points with equal angular measure $\phi$) represents different scalings of the same rotation of the equilateral triangle, which follows from the equality $d_1^2 = (r + 1) / 2$, after standardization. Importantly, shape space is continuous with respect to shape, i.e., points close together in shape space represent approximately similar triangles. \cite{edelman2015random} provides additional details on the structure of triangle shape space, and discusses the transformation from the configuration to shape space coordinates from multiple theoretical perspectives for the two-dimensional case. Figure \ref{fig:triangle_examples} shows the locations of some example triangles in triangle shape space.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{figures/triangle_examples.png}
\caption[Example triangles and their shape space locations.]{(\textit{left}) A depiction of triangle shape space as the unit disc, with some example triangles labeled. The dashed line indicates the circle of radius $\frac{1}{2}$. Triangles with equal shape space radius have equal standardized areas. (\textit{right}) The configurations corresponding to the labeled triangles. The shape space boundary consists of the degenerate triangles. Shape space is continuous with respect to $r$ and $\phi$; small changes in coordinates correspond to small changes in triangle shape, as shown by the configurations for triangles 5 -- 9.}
\label{fig:triangle_examples}
\end{figure}
The shape space coordinates can also be viewed as a linear transformation of standardized edge lengths, which are defined as
\begin{align}
a^2 &= \frac{\|X_B - X_C\|^2}{\|X_B - X_C\|^2 + \|X_A - X_C\|^2 + \|X_A - X_B\|^2}\\
b^2 &= \frac{\|X_A - X_C\|^2}{\|X_B - X_C\|^2 + \|X_A - X_C\|^2 + \|X_A - X_B\|^2}\\
c^2 &= \frac{\|X_A - X_B\|^2}{\|X_B - X_C\|^2 + \|X_A - X_C\|^2 + \|X_A - X_B\|^2},
\end{align}
\noindent for a configuration with landmarks $X_A, X_B, X_C$. From \cite{edelman2015random}, the standardized edge lengths are related to the shape space coordinates by
\begin{equation}
\label{eq:uv_ab}
\begin{pmatrix}
a^2 \\ b^2 \\ c^2
\end{pmatrix} =
\frac{1}{3}\left[
\begin{pmatrix}
\frac{1}{2} & \frac{-\sqrt{3}}{2}\\
\frac{1}{2} & \frac{\sqrt{3}}{2}\\
-1 & 0
\end{pmatrix}
\begin{pmatrix}
u \\ v
\end{pmatrix} +
\begin{pmatrix}
1 \\ 1 \\ 1
\end{pmatrix}
\right].
\end{equation}
\subsubsection{Example of Triangle Shape Coordinate Transformation}
The following example using Fisher's Iris data illustrates the transformation from a configuration to shape space. We consider the triangle formed by the mean sepal length and mean sepal width stratified by species. The configuration matrix is
\begin{align}
X &= \begin{pmatrix}5.01 & 5.94 & 6.59\\
3.43 & 2.77 & 2.97
\end{pmatrix}
\end{align}
Multiplying the pairwise difference matrix $T$ produces the edge matrix
\begin{equation}
E = \begin{pmatrix}
-1.582 & 0.930 & 0.652\\
0.454 & -0.658 & 0.204.
\end{pmatrix}
\end{equation}
The corresponding transformation matrix $M = E\Delta'$ is
\begin{align}M &= \begin{pmatrix}
0.915 & 0.319\\
0.081 & -0.233
\end{pmatrix}
= U\begin{pmatrix}0.969 & 0 \\ 0 & 0.247\end{pmatrix}
\begin{pmatrix}\cos(0.107\pi) & -\sin(0.107\pi)\\
\sin(0.107\pi) & \cos(0.107\pi)\end{pmatrix}.\end{align}
Figure \ref{fig:triangle_transformation} shows the observed triangle and the identification of $\phi$ and $d_1, d_2$ to map the triangle to shape space. The polar shape coordinates for this triangle are $(0.877, .214 \pi)$, representing a clockwise rotation of the equilateral edges by $0.107\pi$, and scaling along the new coordinates by $d_1 = 0.97, d_2 = 0.25$.
\begin{figure}[h!]
\centering
\includegraphics[width=\textwidth]{figures/iris_transformation_plot.png}
\caption[Iris example of mapping from a triangular configuration to shape space]{\textit{(left)} Observations from the Iris data set and the observed triangle formed by the group centroids for sepal width and sepal length. \textit{(right)} The observed triangle is mapped to polar shape coordinates by identifying the rotation ($\phi / 2$) and scaling ($d_1, d_2$) from the transformation matrix $M$.}
\label{fig:triangle_transformation}
\end{figure}
\subsection{Shape and Side Length Distributions}
\label{shape_and_side_distributions}
\noindent In this section, we present distributional results for triangles with landmarks generated by $X_A, X_B, X_C \overset{iid}\sim \mathcal{N}(\mu, \sigma^2I_p)$. For the purposes of shape space analysis, this is equivalent to assuming the configuration matrix $X$ follows a standard $3 \times p$ matrix normal distribution, $X\sim \mathcal{N}(0, I_3, I_p)$.
\begin{lemma}
When the configuration distribution is $X \sim \mathcal{N}(0, I_3, I_p)$, the transformation matrix $M$ has distribution $\mathcal{N}(0, I_p, I_2)$.
\end{lemma}
\begin{lemma}
When the configuration distribution is $X \sim \mathcal{N}(0, I_3, I_p)$, the joint density of the polar shape coordinates $(r, \phi)$ is
\begin{equation}
\label{eq:r_phi_pdf}
f(r, \theta) = \frac{(p - 1)}{2\pi}r(1 - r^2)^{(p - 3)/2},
\end{equation}
with support $\{(r, \phi) | r \in [0, 1], \phi \in \mathbb{R}\}$.
\end{lemma}
\textit{Proof} Assume $X \sim \mathcal{N}(0, I_3, I_p)$, and let $d_1, d_2$ be the scaled eigenvalues of $M$. In this case, the ellipticity statistic has the form $2d_1d_2 = \sqrt{1 - r^2}$, with distribution function $P(\sqrt{1 - r^2} < x) = x^{p - 1}$ \citep{muirhead2009aspects}. The pdf of $r$ can then be computed via variable transformation as
\begin{equation}
\label{eq:r_pdf}
f_r(r) = (p - 1)r(1 - r^2)^{(p - 3)/2}.
\end{equation}
The distribution of $\phi$ can be deduced by observing that the distribution of $M$ is invariant under orthogonal transformations, thus the density $f_{\phi}$ must be constant; restricting the range gives $\phi \sim Unif(0, 2\pi)$. The result then follows from Equation \ref{eq:r_pdf} and the independence of $r$ and $\phi$ in the spherical case \citep{muirhead2009aspects}.
\begin{theorem}
When the landmark, the joint shape space distribution is
\begin{equation}
f_{u, v}(u, v) = \frac{(p - 1)}{2\pi}(1 - u^2 - v^2)^{(p - 3)/2},
\end{equation}
\end{theorem}
where $u$ and $v$ are defined in Definition \ref{def:polar}.
\noindent \textit{Proof} The distribution of $(u, v)$ induced by the iid normal configuration can be derived by computing the multivariate variable transformation of $(r, \phi)$ using the identities
\begin{align}
r &= \sqrt{u^2 + v^2}\\
\phi &= \arcsin\left(\frac{v}{\sqrt{u^2 + v^2}}\right).
\end{align}
The Jacobian of this transformation is
\begin{align}
J &= \begin{vmatrix}
\frac{u}{\sqrt{u^2 + v^2}} & \frac{v}{\sqrt{u^2 + v^2}}\\
\frac{-v}{u^2 + v^2} & \frac{u}{u^2 + v^2}
\end{vmatrix}\\
&= (u^2 + v^2)^{-1/2}
\end{align}
This gives
\begin{align}
f_{u, v}(u, v) &= f_{r, \phi}(\sqrt{u^2 + v^2}, \arcsin\left(\frac{v}{\sqrt{u^2 + v^2}}\right))|J|\\
&= \frac{1}{2\pi}(p - 1)\sqrt{u^2 + v^2}(1 - u^2 - v^2)\cdot \frac{1}{\sqrt{u^2 + v^2}}\\
&= \frac{(p - 1)}{2\pi}\left(1 - u^2 - v^2\right)^{(p - 3)/2}.
\end{align}
\noindent The joint distribution of the squared side lengths follows from $f_{u, v}$ and the linear transformation relating $(a^2, b^2, c^2)$ and $(u, v)$ given by Equation \ref{eq:uv_ab}.
\begin{corollary}
When the configuration distribution is $X \sim \mathcal{N}(0, I_3, I_p)$, the joint squared side length distribution is
$$f_{a^2, b^2, c^2}(a^2, b^2, c^2) = \frac{3(p - 1)}{2\pi} \left(-\frac{1}{4} + a^2b^2 + a^2c^2 + b^2c^2\right)^{(p - 3)/2}.$$
\end{corollary}
The joint shape space distribution for $(u, v)$ is a form of square root Dirichlet distribution, i.e., the distribution of $(u^2, v^2)$ can be shown to follow a Dirichlet.
The marginal distribution of squared lengths can be derived using existing results about distributions of quadratics and their ratios \citep{gurland1953distribution}. However, for the joint distribution it is easier to obtain by transforming the joint distribution of $u$ and $v$. These results are equivalent to existing results of shape distributions in other coordinate systems, but the explicit forms of these distributions for triangle polar coordinates and the scaled squared side lengths have not been previously presented to our knowledge.
The above results can be considered as the standard distribution of triangle shapes, as the observations are iid from the standard normal distribution. For non-isotropic cases, such as those caused by non-standard variance-covariance of the features or different sample sizes, one can first standardize the observations. For example, suppose $x_{ij} \overset{iid} \sim \mathcal{N}(\mu, \Sigma)$ for $i = A, B, C, j = 1, \dots, n_i$. One can first subtract the mean $\bar x_{\dot\dot}$ and then standardize the variance-covariance by defining the transformed data: $\tilde x_{ij}=\Sigma^{-1/2} (x_{ij}-\mu)$. The triangle configuration will be defined using $X_i$'s,
where $X_i=\sqrt{n_i}\sum_{j=1}^{n_i}\tilde x_{ij}$ and all the distributional results hold asymptotically. The distribution with non-coincident landmark centroids will be deferred to a later section, as its distribution can be compactly expressed using Riemannian distance, which will be introduced in \ref{subsubsection:Riemannian}.
We have derived the distribution of the shapes of random triangles and expressed the distribution as functions of side lengths ($a^2$, $b^2$, $c^2$), unit disk polar coordinates $(r, \phi)$, or rectangular coordinates $(u,v)$. Although the distribution is theoretically important, the geometric characteristic of interest in our motivating examples is whether a particular group is in the middle of two other groups. In the following section, we propose metrics to quantify in-betweenness and study their statistical properties.
\section{Quantifying In-betweenness and Shape Space Inference}
Recall that our purpose is to quantify in-betweenness and make statistical inference of it. We consider two measures of ``in-betweenness" for quantifying the hybridity of subpopulation B with respect to A and C: cosine of the supplementary angle corresponding to subpopulation B, denoted $\gamma$ and referred to as \textit{cosine in-betweenness}; and a shape space hybrid similarity statistic $\tau$, which is based on the intrinsic distance in the shape space. We refer to $\tau$ as the \textit{shape in-betweenness index (IBI)}.
\subsection{Cosine In-betweenness}
\noindent For a simple geometric approach to quantifying in-betweenness, we observe that degenerate triangles with $X_B$ in-between $X_A$ and $X_C$ have angle $B = \pi$, whereas degenerate triangles with $X_B$ not in-between $X_A$ and $X_C$ have $B = 0$. This suggests the in-betweenness measure $\gamma = \cos(\pi - B)$, which yields $\gamma = 1$ for degenerate triangles with $X_B$ in-between $X_A$ and $X_C$, and $\gamma = -1$ for all other degenerate triangles. Triangles for which $B$ is close to $\pi$ are approximately degenerate with $X_B$ in-between $X_A$ and $X_C$, while triangles with $B$ close to 0 will be approximately degenerate with $X_B$ not in-between $X_A$ and $X_C$. Cosine similarity is 0 for right triangles with $B = \pi / 2$. The values of $\gamma$ over triangle shape space are shown in Figure \ref{fig:iris_cosine_similarity}.
\noindent The value of cosine in-betweenness can be computed in terms of the squared side lengths from the law of cosines:
\begin{align}
\cos B &= \frac{a^2 + c^2 - b^2}{2ac}\\
\gamma &= \cos(\pi - B) = \frac{2b^2 - 1}{2ac}\label{eq:gamma}
\end{align}
From this expression, we see that $\gamma$ has two discontinuities at $a = 0$ and $c = 0$, which are points on the disk boundary where $\gamma$ switches from -1 to 1. Thus, although cosine in-betweenness is a simple and intuitive indicator of in-betweenness, it is not able to detect different degrees of in-betweenness, assigning values of 1 and -1 to triangles arbitrarily close together.
\begin{figure}[h!]
\centering
\includegraphics[width=0.8\textwidth]{figures/iris_cosine_similarity.png}
\caption[Definition of cosine in-betweenness]{Cosine in-betweenness to measure the hybridity of population 2 with respect to 1 and 3 is calculated as $\gamma = \cos(\pi - B)$.}
\label{fig:iris_cosine_similarity}
\end{figure}
\subsection{Shape Space In-betweenness Index $\tau$}
\noindent To address the above issues with the cosine index, we instead propose an IBI that is continuous over shape space and sensitive to different degrees of in-betweenness. Again considering the in-betweenness of subpopulation B with respect to A and C, we motivate the definition by first assuming that the triangle with maximum in-betweenness should be the degenerate triangle with $B$ as the midpoint of $A$ and $C$ (or $b = 2a = 2c$), which we refer to as the midpoint triangle. When the triangle sides are scaled so that $a^2 + b^2 + c^2 = 1$, the side lengths of the $B$-midpoint triangle are $a^2 = c^2 = \frac{1}{6}, b^2 = \frac{2}{3}$, with polar shape coordinates $(r, \phi) = (1, \pi/3)$ and Cartesian shape coordinates $(1/2, \sqrt{3}/2)$. We propose a shape space in-betweenness index defined as a transformation of the Riemannian shape distance between an observed triangle and the $B$-midpoint triangle.
\iffalse
\begin{definition}
\label{eqn:IBI_def}
The \textbf{in-betweenness index (IBI)} $\tau$ measuring the in-betweenness of group B with respect to groups A and C from an observed triangle with shape distance to the $B$-midpoint triangle $\rho^*$ is:
\begin{equation}
\tau = \cos(2\rho^*).
\end{equation}
\end{definition}
\fi
\subsubsection{Riemannian Distance for Triangle Shape}
\label{subsubsection:Riemannian}
A useful notion of distance for triangle shapes can be defined via the Riemannian distance in the pre-shape space. From the geometric perspective, shapes are fibres on the pre-shape sphere, which inherit the pre-shape space Riemannian distance via projection of the fibres to points in shape space. The formulation of pre-shape space given here is such that the projection is an isometric submersion of shape space in the pre-shape manifold, so that distances are preserved. This distance is thus referred to as the \textit{Riemannian shape distance}, even though shape space is not a Riemannian manifold itself. Thus, the Riemannian distance for triangle shape is defined in terms of the \textit{pre-shape}, which is defined as the remaining information after location and scale have been removed from a configuration \citep{dryden2016statistical}.
Pre-shape space is a hypersphere in $\mathbb{R}^{(k - 1)p}$. To see this, we observe from the definition of the pre-shape (Definition \ref{def:pre-shape}) that the coordinates of the pre-shape $Z = HX / \|HX\|$ are the standardized Helmertized coordinates of the configuration $X$, thus $Z$ has dimensions $(k - 1) \times p$ and satisfies $\|Z\| = 1$, and consequently pre-shape space is a sphere in $\mathbb{R}^{(k - 1)p}$. We can therefore consider pre-shape space as a Riemannian manifold, and use its intrinsic Riemannian metric to induce a metric on shape space, which is a quotient space of the pre-shape sphere.
Geodesics on the pre-shape sphere are great circles, with the geodesic distance between pre-shapes $Z_1, Z_2$ defined as the shortest arc length along a great circle between $Z_1$ and $Z_2$ \citep{terras2013harmonic}. For two configurations $X_1, X_2$ with pre-shapes $Z_1, Z_2$ respectively, the Riemannian shape distance is then defined as the minimum pre-shape distance between $Z_1$ and $Z_2\Gamma$, where the minimum is taken over $\Gamma \in SO(p).$ The following lemma from \cite{kendall1984shape} provides a representation of the optimal rotation in terms of the SVD of the pre-shape inner product $Z_1'Z_2 = U\Lambda V'$, $U, V \in SO(p)$.
\begin{lemma}[\cite{kendall1984shape}]
For pre-shapes $Z_1, Z_2$ with inner product SVD $Z_1'Z_2 = U\Lambda V', \Lambda = \mathrm{diag}(\lambda_1, \cdots, \lambda_p)$, the \textit{optimal rotation} $\Gamma \in SO(p)$ is
\begin{equation}\label{eqn:optimal_rotation}
\hat \Gamma = \mathrm{argsup}~\mathrm{tr}\left(Z_1'Z_2\Gamma\right) = UV'.
\end{equation}
The value at the optimal rotation is
\begin{equation}\label{eqn:optimal_value}
\sup_{\Gamma \in SO(p)} \mathrm{tr}\left(Z_1'Z_2\Gamma\right) = \sum_{i = 1}^p \lambda_i.
\end{equation}
\end{lemma}
\begin{proof}
We first prove Equation \ref{eqn:optimal_value}, and then show that $\hat\Gamma$ in Equation \ref{eqn:optimal_rotation} attains this value. Assume $\Gamma \in SO(p)$ has diagonal entries $\gamma_{ij}$.
\begin{align}
\sup_{\Gamma \in SO(p)} \mathrm{tr}\left(Z_1'Z_2\Gamma\right) &= \sup_{\Gamma \in SO(p)} \mathrm{tr}\left(\Gamma\Lambda\right)\\
&= \sup_{\Gamma \in SO(p)} \sum_{i = 1}^p \gamma_{ii}\lambda_i.
\end{align}
The set of diagonals of $\Gamma \in SO(p)$ is a convex set with extreme points $\{(\pm 1, \pm 1, \cdots, \pm 1)\}$ with $-1$ occurring an even number of times \citep{horn1954doubly}. Consequently the maximum occurs for $\gamma_{ii} = 1$ for all $i = 1, \cdots, p$, giving the desired result.
From this result, plugging in $\hat\Gamma = UV'$ verifies Equation \ref{eqn:optimal_rotation}:
\begin{equation}
\mathrm{tr}\left(Z_1'Z_2\hat\Gamma\right) = \mathrm{tr}\left(V\Lambda U'UV'\right) = \mathrm{tr}\left(\Lambda\right).
\end{equation}
\end{proof}
\begin{definition}
The \textbf{Riemannian shape distance} between two configurations $X_1$ and $X_2$ is equal to
\begin{equation}
\rho(X_1, X_2) = \arccos\left(\sum_{i = 1}^p \lambda_i\right),
\end{equation}
where $\lambda_i$ are the singular values of $Z_1'Z_2$ for the corresponding pre-shapes $Z_1, Z_2$.
\end{definition}
Intuitively, the shape distance of configurations $X_1, X_2$ is found by aligning the pre-shapes $Z_1, Z_2$ as closely as possible in the pre-shape sphere, and computing the arc length distance of the aligned pre-shapes. In the language of manifold geometry, this is the geodesic distance between the fibers in the pre-shape space corresponding to the shapes $[X_1]$ and $[X_2]$.
\begin{theorem}
\label{th:Riemannian}
For configuration $X$ with unit disk polar representation $(r, \phi)$ and $X^*$ a configuration with shape equal to the B-midpoint triangle, the Riemannian shape distance between $X$ and $X^*$ is
\begin{equation}
\label{eqn:Riemannian}
\rho(X,X^*) = \frac{1}{2}\arccos \{r \cos(\phi-\pi/3)\}.
\end{equation}
\end{theorem}
To establish the proof of Theorem \ref{th:Riemannian}, we first introduce two forms of Kendall's triangle coordinates to make use of previous results relating shape space representations and the Riemannian shape distance. To define the Kendall spherical coordinates, we first define rectangular Kendall coordinates for the case $p = 2$, which encompasses the general $p \geq 2$ case by mapping the plane containing a given triangle in $\mathbb{R}^p$ to $\mathbb{R}^2$. Kendall's coordinates can be compactly expressed by considering the landmarks as points in the complex plane, $(z_1, z_2, z_3) \in \mathbb{C}^3$.
\begin{definition}
The \textbf{Kendall's rectangular coordinates} for a triangular configuration $(z_1, z_2, z_3) \in \mathbb{C}^3$ are $(u_K, v_K)$ defined by $u_K + iv_K = \frac{z_{2}}{z_1}$.
\end{definition}
\begin{definition}
The \textbf{Kendall's spherical coordinates} $(\theta, \psi)$, $0 \leq \theta \leq \pi / 2, 0 \leq \psi \leq 2\pi$ are defined as a transformation of Kendall's rectangular coordinates
\begin{align}
&\frac{1}{2}\sin\theta\sin\psi = \frac{u_K}{1 + r_K^2}\\
&\frac{1}{2}\cos\theta = \frac{v_K}{1 + r_K^2},
\end{align}
where $r_K^2 = u_K^2 + v_K^2$.
\end{definition}
The vector of Cartesian coordinates in $\mathbb{R}^3$ for Kendall's spherical coordinates is
\begin{align}
\ell &= \begin{pmatrix}
\frac{1}{2}\sin\theta\cos\psi\\
\frac{1}{2}\sin\theta\sin\psi\\
\frac{1}{2}\cos\theta\end{pmatrix}.
\end{align}
Kendall's spherical coordinates are a representation of triangle shape space on the hemisphere with radius $\frac{1}{2}$ rather than the unit disk. We focus on the disk representation in this work, as it provides for easier visualization of inferential results. The relation of the two representations is given in the following lemma.
\begin{lemma}
\label{lem:kendall_disk}
Kendall's spherical coordinates and the unit disk polar coordinates from Definition \ref{def:polar} are related by
\begin{align}
r &= \sin(\theta)\label{eqn:r_theta}\\
\phi &= \frac{2\pi}{3} - \psi\label{eqn:phi_psi}
\end{align}
\end{lemma}
Letting $\ell_1$ and $\ell_2$ be the Kendall coordinate vectors of the triangles $X_1, X_2$ respectively, we can write the Riemannian shape distance between $X_1$ and $X_2$ in terms of $\ell_1, \ell_2$ as
\begin{equation}
\cos \left(2\rho(X_1, X_2)\right) = 4\ell_1'\ell_2.
\end{equation}
Substituting the mappings \ref{eqn:r_theta} and \ref{eqn:phi_psi} yields the following proposition.
\begin{proposition}
\label{prop:r_rho}
For configurations $X_1, X_2$ with unit disk polar representation $(r_1, \phi_1), (r_2, \phi_2)$, the Riemannian distance is
\begin{equation}\label{eqn:r_rho}
\rho(X_1, X_2) = \frac{1}{2}\arccos \left\{r_1r_2\cos(\phi_1 - \phi_2) + \sqrt{(1 - r_1^2)(1 - r_2^2)}\right\}.
\end{equation}
\end{proposition}
\begin{proof}[Proof of Theorem \ref{th:Riemannian}]
The result of Theorem \ref{th:Riemannian} is a direct consequence of Proposition \ref{prop:r_rho}, which is obtained by substituting $[X]=(r,\phi)$ and $[X^*]=(1,\pi/3)$ into Equation \ref{eqn:r_rho}.
\end{proof}
\subsubsection{Shape Space In-betweenness Index}
Note that the Riemannian distance $\rho(X,X^*)$ is between $0$ and $\pi/2$ with the minimum distance $0$ occurring uniquely when the configuration has shape equal to the B-midpoint triangle. Since this distance is intrinsic to shape space, it provides a natural and theoretically motivated means of defining a shape space similarity measure.
When quantifying the strength of a relationship via a similarity metric, it is desirable for practical interpretation to have a measurement with 1 for the strongest positive relationship and -1 for the strongest negative relationship. For example, both the cosine in-betweenness in Equation \ref{eq:gamma} and the Pearson's correlation coefficient satisfy this requirement. For this purpose, we transform the Riemannian distance in Equation \ref{eqn:Riemannian} using the decreasing function $\cos(2\rho(X,X^*))$. This transformation of the Riemannian shape distance also has compact alternative representations in terms of the Euclidean inner product in shape space, and the triangle side lengths, which are detailed below.
\begin{definition}
\label{eqn:IBI_def}
The \textbf{shape space in-betweenness index (IBI)} $\tau$ measuring the in-betweenness of group B with respect to groups A and C from an observed triangle $X$:
\begin{equation}
\tau = \cos(2\rho(X, X^*)),
\end{equation}
where $X^*$ is a configuration of the B-midpoint triangle.
\end{definition}
\noindent By definition, the maximum $\tau$ is uniquely attained when $(r, \phi) = (1, \pi / 3)$. The minimum $\tau = -1$ is uniquely attained at $(1, -\pi / 2 + \pi / 3)$, which corresponds to $X_A = X_C \neq X_B$. All triangles with $\tau = 0$ lie on the line defined by $\phi = \pi/ 3 \pm \pi / 2$ (or equivalently $u = -\sqrt 3 v$), which includes the equilateral triangle at $(0, 0)$.
We note that, as a consequence of Proposition \ref{prop:r_rho}, when one of the two triangles is degenerate, i.e., the radius is $1$, the Riemannian distance between the two triangles equals the Euclidean inner product of their unit disk shape space representations.
\begin{corollary}\label{cor:rho}
When at least one of the triangles determined by $X_1, X_2$ is degenerate, say $r_2 = 1$, the Riemannian distance reduces to
\begin{equation}
\rho(X_1, X_2) = \frac{1}{2}\arccos \langle X_1, X_2\rangle_{\mathcal{U}},
\end{equation}
\noindent where $\langle X_1, X_2\rangle_{\mathcal{U}} = r_1r_2\cos(\phi_1 - \phi_2)$ is the Euclidean inner product of the unit disk shape space representations of $X_1$ and $X_2$.
\end{corollary}
\noindent $\tau$ is initially motivated from the pre-shape space Riemannian distance, as the distance is intrinsic in the pre-shape Riemannian manifold. It has several alternative forms that are of interest. Firstly, rewriting Definition \ref{eqn:IBI_def} in terms of rectangular shape coordinates in Definition \ref{def:polar} gives $\tau = \frac{1}{2}u + \frac{\sqrt{3}}{2}v$. Secondly, substituting the expressions for $u, v$ in terms of $a^2, b^2$ yields the simplification $\tau = 3b^2 - 1$, which indicates that the hybridity measure is a transformation of the scaled side length $b^2$. These connections are summarized in the follow theorem.
\begin{theorem}
\label{prop:tau_pdf}
For a triangle with configuration $X$, scaled side lengths $a^2, b^2, c^2$, coordinates $(r\cos\phi, r\sin\phi)$, and Riemannian distance to the $B$-midpoint triangle $\rho$, the shape space IBI $\tau = \cos(2\rho(X, X^*))$ has the equivalent forms:
\begin{enumerate}
\item $\tau = r\cos(\pi / 3 - \phi)$
\item $\tau = \frac{1}{2}u+\frac{\sqrt{3}}{2}v$
\item $\tau = 3b^2 - 1$
\end{enumerate}
\end{theorem}
\begin{proof}
\begin{enumerate}
\item This is from Theorem \ref{th:Riemannian}
\item \begin{align*}
\tau &= r\cos\left(\phi - \frac{\pi}{3}\right)\\
&= r\cos\phi\cos\frac{\pi}{3} + r\sin\phi\sin\frac{\pi}{3}\\
&= \frac{1}{2}u + \frac{\sqrt{3}}{2}v
\end{align*}
\item Computing $b^2$ from Equation \ref{eq:uv_ab} gives $b^2 = \frac{1}{3}(\frac{1}{2}u + \frac{\sqrt{3}}{2}v) + \frac{1}{3}$, which implies $\tau = 3b^2 - 1$.
\end{enumerate}
\end{proof}
\begin{corollary} When the configuration $X$ has landmark distribution $X_i \sim \mathcal{N}(0, \sigma^2I_p)$, $i = A, B, C$, the density of $\tau$ is $f_{\tau}(t) = \frac{\Gamma(\frac{p + 1}{2})}{\sqrt{\pi}\Gamma(\frac{p}{2})} (1 - t^2)^{(p - 2)/2}$ for $-1 \leq t \leq 1$.
\end{corollary}
\noindent \textbf{Proof} From Theorem \ref{prop:tau_pdf}, the null distribution of $\tau$ is straightforward to compute as a transformation of $3/2 b^2 \sim \text{Beta}(p/2, p/2)$ \citep{edelman2015random}.
\textbf{Remark} A comparison of the values of $\gamma$ and $\tau$ the unit disk is shown in Figure \ref{fig:IBI_values}. Because of the discontinuities and insensitivity to different forms of in-betweenness, the $\tau$ in-betweenness measure should generally be preferred, although $\gamma$ may be of use when the positioning of $B$ along the $AC$ edge is not important.
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{figures/cosine_tau_axes.png}
\caption[Shape space plot of $\gamma$ and $\tau$ in-betweenness indices]{(\textit{left}) Value of cosine IBI over triangle shape space. This measure has discontinuities on the boundary at $\phi = 0$ and $\phi = 2\pi / 3$, where $B$ switches from in-between $A$ and $C$ to outside the $AC$ segment. (\textit{right}) Value of $\tau$ IBI over triangle shape space. This measure is continuous in the entire space. The maximum $\tau = 1$ occurs at $(r, \phi) = (1, \pi / 3)$, which corresponds to the $B$-midpoint triangle.}
\label{fig:IBI_values}
\end{figure}
\subsubsection{Offset-Normal Distributions}
The Riemannian distance result can also be used to derive the distribution for isotopic case with non-coincident landmark centroids. In the isotropic case with non-coincident landmark centroids, $X \sim \mathcal{N}(\mu, \sigma^2 I_3, I_p)$, the \textit{off-set normal shape density} in terms of the Riemannian shape distance $\rho(X, \mu)$ is
\begin{equation}
\left\{1 + \kappa\left[1 + \cos(2\rho(X, \mu))\right]\right\}\exp\left\{-\kappa\left[1 - \cos(2\rho(X, \mu))\right]\right\},
\end{equation}
where $\kappa = S^2(\mu) / (4\sigma^2)$, for population centroid size $S(\mu)$ \citep{mardia1989statistical}. The density in terms of polar shape coordinates can be derived via variable transformation and using the results from Proposition \ref{prop:r_rho}. In the context of analyzing three-group data, this distribution is only applicable when the sample is balanced across the groups. In the unbalanced case, the isotropic assumption is violated for the group centroids, thus limiting the practical use of the isotropic offset normal distribution.
Some results for distributions with general covariances have been derived, but known expressions of the shape distribution are complicated, involving finite sums of generalized Laguerre polynomials. A detailed discussion of the offset normal distribution is given in \cite{dryden2016statistical}, which includes the density function for triangle shape when $p = 2$ and the configuration distribution is a complex normal with general covariance. In practice, resampling methods are often adequate for most inference purposes. In the following, we propose a bootstrap procedure to make inference on shape space parameters such as $\tau$ and shape space location.
\subsection{Stratified Bootstrap Procedure for Shape Space Inference}
A bootstrap approach for creating $\tau$ confidence intervals is suitable when the covariance structure in each stratum can be assumed to be exchangeable. Although we focus here on inference for $\tau$, the same algorithm can be extended to provide inference for the cosine in-betweenness $\gamma$, shape space coordinates, and side lengths.
IBI quantification is of greatest interest when it is suspected that the three group centroids are not coincident; when the centroids are in fact nearly coincident (relative to the variance in the data), the bootstrap distribution closely approximates the null distribution for the IBI statistic, rather than concentrating around $\tau = 0$.
\begin{algorithm}
\caption{Stratified Bootstrap for Shape Analysis}\label{alg:ibt_bootstrap}
\begin{algorithmic}[1]
\State Input: $X_1, X_2, X_3$, $K$
\For{$k$ in $1:K$}
\State Create stratified bootstrap replicate $X_1^{(k)}, X_2^{(k)}, X_3^{(k)}$.
\State Compute bootstrap configuration $\bar X_1^{(k)}, \bar X_2^{(k)}, \bar X_3^{(k)}$.
\State Compute normalized side lengths $a_k^2, b_k^2, c_k^2$.
\State Compute bootstrap IBI statistic $\tau^{(k)} = 3 b_k^2 - 1$.
\EndFor
\State Compute the bootstrap IBI $100(1 - \alpha)\%$ confidence interval as the $\alpha/2$ and $1 - \alpha/2$ percentiles of $\{\tau^{(k)} | k = 1, \dots, K\}.$
\end{algorithmic}
\end{algorithm}
Confidence regions for the shape space coordinates can be computed as a byproduct of the bootstrap procedure by recording the bootstrap sample quantities $(u^{(k)}, v^{(k)})$. Confidence regions from these bootstrap samples can then be computed using a data depth metric, such as Tukey data depth \citep{di2004multivariate}. The shape space confidence region can provide greater insight into the likely relationship of the three subpopulations through inspection of the extreme triangles.
\textbf{Remark} Similar to principal components analysis, the question of whether to standardize the features to unit variance before conducting shape space inference should be considered carefully with respect to the scientific meaning of the features and the inference goal. Unless the observed features have equal sample variance, standardization will scale each feature different, with the potential to substantially alter the estimated shape and confidence region. Throughout this work we consider standardized features, but note that not standardizing may be more appropriate in some settings, particularly when all of the features are of a similar type and measured on the same scale.
\section{Simulations \& Applications}
\subsection{Simulations}
\label{triangles:simulations}
To evaluate the proposed bootstrap method for IBI quantification, we simulate data with features generated from: i) a standard normal distribution with (potentially) different group centroids; ii) a standard normal distribution with varying sample sizes across groups.
The size and coverage of bootstrap 95\% confidence regions for shape space location and confidence intervals for $\tau$ were assessed using $1000$ replications of balanced data generated from an isotropic normal distribution with mean configuration specified by $r = 0.5, \phi = \pi / 3$, for $n = 90, 300$ and $\sigma^2 = 0.1, 1, 5$. The simulation results (Table \ref{tab:coverage_simulation_results}) show approximately correct coverage for the $\tau$ confidence intervals across all settings; the confidence regions for shape space location perform slightly worse, with coverage around 93\% for most settings. The results also show substantial contraction of the confidence regions and intervals as $n$ increases and $\sigma^2$ decreases.
\begin{table}
\caption{Simulation results for coverage of stratified bootstrap. Simulation results for data sample iid from a normal distribution with mean configuration specified by $r = 0.5, \phi = \pi / 3, p = 2$. Confidence intervals for $\tau$ and confidence regions for $(u, v)$ were calculated with the stratified bootstrap with 1000 simulation replications and $2000$ bootstrap replications per simulation.}
\label{tab:coverage_simulation_results}
\centering
\begin{tabular}{cccccc}
\toprule
$n$ & $\sigma^2$ & CI Cover. & CI Length & CR Cover. & CR Area\\
\midrule
90 & 5 & 0.952 & 1.233 & 0.978 & 1.951\\
300 & 5 & 0.956 & 0.795 & 0.949 & 0.839\\
90 & 1 & 0.938 & 0.662 & 0.939 & 0.574\\
300 & 1 & 0.953 & 0.381 & 0.933 & 0.193\\
90 & 0.1 & 0.938 & 0.22 & 0.927 & 0.064\\
300 & 0.1 & 0.952 & 0.123 & 0.932 & 0.02\\
\bottomrule
\end{tabular}
\end{table}
\subsection{Shape Analysis of Iris Data}
For a simple illustration of the statistical shape analysis and the IBI statistics, we consider the classic iris data set \citep{fisher1936use, anderson1936species}. This data set provides a convenient example of in-betweenness analysis, as it consists of three iris species, one of which (\textit{versicolor}) is believed to be a genetic hybrid of the others (\textit{setosa} and \textit{virginica}). To quantify this relationship as manifested in physical characteristics, we calculate 95\% bootstrap confidence region for shape, and confidence intervals for $\tau$ and $\gamma$, for the four standardized features (sepal width and length, and petal width and length), using $10000$ bootstrap replications. The 80\% and 95\% bootstrap confidence region and the extreme triangles from the 95\% with the maximum and minimum $\tau$ are shown in Figure \ref{fig:iris_extreme}. While the $\tau$ measure provides one indication of position in shape space, it can be difficult to interpret directly, thus we recommend also examining the confidence region boundary shapes and median shape estimate in order to better understand the range of likely shapes.
\begin{table}
\caption{Confidence intervals for in-betweenness indices for iris data. Observed $\tau$ and $95\%$ CI for different subsets of features from the iris data set, measuring \textit{versicolor} as a hybrid of \textit{setosa} and \textit{virginica}. Features include sepal length (SL), sepal width (SW), petal length (PL), and petal width (PW). There is strong evidence that the mean \textit{versicolor} features lie between the centroids for \textit{setosa} and \textit{virginica}, with $\tau = 0.909$ over all four features.}
\label{tab:iris_IBI}
\centering
\begin{tabular}{lcc}
\toprule
Features & Obs. $\tau$ (95\% CI) & Obs. $\gamma$ (95\% CI)\\
\midrule
SL, SW & 0.817 (0.732, 0.872) & 0.103 (-0.182, 0.448)\\
SL, PL & 0.922 (0.885, 0.949) & 0.979 (0.936, 0.9996)\\
SL, PW & 0.974 (0.936, 0.990) & 0.999 (0.997, 0.999)\\
All features & 0.909 (0.879, 0.931) & 0.624 (0.444, 0.795)\\
\bottomrule
\end{tabular}
\end{table}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{figures/iris_extreme.png}
\caption[Shape space confidence regions for iris data, all features]{80\% and 95\% bootstrap CRs for iris data, for \textit{versicolor} as group $B$, using all four features. There is some indication that the mean \textit{versicolor} features lie approximately between the mean features for \textit{setosa} and \textit{virginica}, corroborating previous evidence that the mean \textit{versicolor} features are approximately in-between two other species.}
\label{fig:iris_extreme}
\end{figure}
From our simulations and real-world analyses, we have observed that the bootstrap confidence regions are elliptically shaped when the observed triangle is not near the shape space boundary and the variance in the data is not too large relative to the observed centroids. When the observed triangle is instead close to the shape space boundary (i.e.~approximately degenerate) and the variance is not too large, the estimated confidence regions tend to be distributed as a narrow band along the boundary. As an example of is, Figure \ref{fig:iris_extreme_max_features} shows the confidence region and extreme triangles for iris features with maximum $\tau$, sepal length and petal width.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{figures/iris_extreme_max_features.png}
\caption[Shape space confidence regions for iris data, selected features with maximum collinearity]{80\% and 95\% bootstrap CRs for the sepal length and petal width features, with \textit{versicolor} as group $B$. The observed triangle is very close to degenerate, resulting in the confidence regions being distributed as narrow bands along the shape space boundary. The confidence regions are strongly indicative of near collinearity of centroids.}
\label{fig:iris_extreme_max_features}
\end{figure}
\subsection{PAM50 Breast Cancer Data}
In our second application example, we investigate a data set from an analysis of hormone receptor-positive breast cancer subtypes and risk of relapse \citep{prat2017pam50}. The subtypes considered include Luminal A (\textit{LumA}), Luminal B (\textit{LumB}), and Basal-like. This study conducted a meta-analysis of the relation of a genomic-based chemoendocrine score (CES) with risk of relapse (ROR) across 6007 tumors, finding that CES estimates of chemoendocrine sensitivity beyond what is indicated by the intrinsic cancer subtype and clinical covariates. A primary result of this study is evidence that sensitivity to endocrine therapy and chemotherapy is linked to the biological differences in Basal-like versus Luminal A subtypes. Given the strong association with chemosensitivity and risk of relapse, there is interest in better understanding the relative relationships of these three subtypes \citep{prat2017pam50}. Toward this end, we generate the shape space stratified bootstrap confidence regions to describe the relative relationships of the three subtypes with respect to the CES and ROR measures.
A plot of the PAM50 data set from \cite{prat2017pam50} is given in Figure \ref{fig:pam50_obs}. The joint centroids across the CES and ROR features are clearly non-coincident for the three groups, with each subtype forming a distinct cluster. Overall lower risk of relapse is apparent in the \textit{LumA} group, with approximately similar distribution of ROR for \textit{LumB} and \textit{Basal}. Chemosensitivity shows an approximate linear relationship with ROR across the \textit{LumA} and \textit{LumB} groups, with the \textit{LumA} group showing a higher mean CES than \textit{LumB}, but is distinctly lower for the \textit{Basal} group.
We construct the shape space bootstrap confidence region for the PAM50 data set, taking \textit{LumA, LumB,} and \textit{Basal} as the $A, B,$ and $C$ groups respectively, using $5000$ bootstrap permutations. The 95\% bootstrap confidence region and corresponding extreme triangles are shown in Figure \ref{fig:pam50_extreme}. The bootstrap median and 95\% confidence interval for $\tau$ is $0.810$ $(0.800, 0.819)$, with an observed $\tau = 0.810$; the $\gamma$ median and 95\% confidence interval are $0.522$ $(0.502, 0.541)$, with an observed $\gamma = 0.522$. The concentration of the confidence region and similarity of the extreme triangles in this region (Figure \ref{fig:pam50_extreme}) provide strong evidence that the observed shape is very close to the true mean shape. Compared to the iris example above, we see the confidence region from the PAM50 results is much more concentrated due to the larger sample size.
\begin{figure}
\centering
\includegraphics[scale=0.6]{figures/pam50_obs.png}
\caption[Plot of observations from PAM50 breast cancer meta-analysis]{Data from the meta-analysis of breast cancer subtypes identified by the PAM50 genetic indicator.}
\label{fig:pam50_obs}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{figures/pam50_extreme.png}
\caption[Shape space inference results for PAM50 data]{The observed triangle, and the median, and extreme triangles in the 95\% bootstrap CR for the PAM50 data set show little variation, indicating strong evidence that the three group centroids are approximately collinear, with the \textit{LumB} mean close to the \textit{LumA} mean, and between the centroids for \textit{LumA} and \textit{Basal} groups.}
\label{fig:pam50_extreme}
\end{figure}
\subsection{CCK/PV Cell Data}
The development of the IBI methodology here is motivated by a study of mouse hippocampal CCK and PV neurons. Novel cells co-expressing CCK and PV are have been discovered in mice, but not rats. It is of interest to evaluate the ``in-betweenness'' of the electrophysiological characteristics of CCK/PV cells with respect the individually expressing CCK and PV cells. For this study, the 12 measured electrophysiological features are action potential (AP) frequency, AP amplitude, AP threshold, AP adaptation index, AP risetime, AP half width, AP falltime, after hyperpolarization potential (AHP), AHP time, resting membrane potential (RMP), input resistance and hyperpolarization current (-100pA) induced inward rectification ``sag.'' Sample sizes of measured interneurons from each group are $n = 23$ CCK+/PV+, $n = 26$ CCK+/PV-, and $n = 20$ CCK-/PV+ (n=19). Figure \ref{fig:cell_obs} shows the CCK/PV observations for AP half width against AP threshold, and for the first two principal components calculated from all features. We note that the cell type groups are not clearly clustered, and that, for most of the measured features, the variance of the observations is large relative to the distance between group centroids.
\begin{figure}
\centering
\includegraphics{figures/cell_obs.png}
\caption[Plots of observations from the CCK/PV data set]{(\textit{left}) Plot of observations from the CCK/PV data set for AP threshold and AP half-width features. (\textit{right}) Plot of observations for the first two principal components calculated from all 12 measured features.}
\label{fig:cell_obs}
\end{figure}
We consider this data from the shape space perspective, and compare $\tau$ to the cosine similarity. To assess the strong null hypothesis that all moments across the three cell groups are equal, we conduct a permutation hypothesis test by shuffling group labels to generate 5000 permuted data sets and calculate the cosine similarity and IBI statistic for each permutation. The resulting $P$-values are $P_{\gamma} = 6 \times 10^{-4}, P_{\tau} = 0.0072$, indicating strong evidence that the cell group centroids are not coincident.
The shape space stratified bootstrap procedure (Algorithm \ref{alg:ibt_bootstrap}) provides a description of the likely triangles formed by the cell group centroids. The shape space confidence regions (Figure \ref{fig:cell_extreme}) show a wide range of possible shapes, resulting from the large variance in the data and relatively small sample sizes. Examining the extremal triangles in the 95\% CR, we see that there is wide variation in the possible mean shapes. From the median triangle and 95\% CR triangle with maximum $\tau$, there is some indication that the CP mean is approximately between the C and P centroids, however the minimum $\tau$ triangle is not suggestive of collinearity of centroids. Thus, although the observed triangle is approximately collinear with the CP mean between the C and P centroids, the data do not provide sufficient evidence to conclude that the CP group mean lies approximately between the other group centroids.
\begin{table}
\caption[Confidence intervals for in-betweenness indices for CCK/PV data]{95\% confidence intervals for $\gamma$ and $\tau$ in-betweenness indices for the CCK/PV data, computed with 20000 bootstrap replications. The $\tau$ confidence interval does not contain 0, allowing us to conclude that the CCK/PV centroids do not have an equilateral relationship. However, the width of this interval makes it difficult to say more regarding the relationship of the group centroids.} \centering
\begin{tabular}{cccc}
\toprule
IBI Type & Median (95\% CI) & Observed IBI\\\midrule
$\gamma$ & 0.461 (-0.562, 0.837) & 0.820\\
$\tau$ & 0.722 (0.213, 0.915) & 0.789\\
\bottomrule
\end{tabular}
\label{tab:cell_results}
\end{table}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{figures/cell_extreme.png}
\caption[Shape space inference results for CCK/PV data]{Observed shape, and median and extreme shapes from the 95\% bootstrap CR for CCK/PV cell data. Due to the variance in the observed features, and small sample sizes across groups, there is significant variation in the likely shapes. There is some indication that the CP mean is approximately between the C and P centroids (as in the maximum $\tau$ triangle), but the minimum $\tau$ triangle is not suggestive of collinearity of centroids.}
\label{fig:cell_extreme}
\end{figure}
\section{Discussion}
Although the theory of statistical shape analysis has been thoroughly developed in the context of observed samples of shapes, relatively little attention has been given to the study of configurations of summary statistics arising from multiple observed subpopulations. The proposed $\tau$ IBI provides a one-dimensional measure of shape space location such that the $B$-midpoint triangle maximizes $\tau$, thus $\tau$ values close to 1 indicate triangles for which the $B$ subpopulation mean is approximately equal to the midpoint of centroids for subpopulations $A$ and $C$. Similar in spirit to correlation measures, the $\tau$ IBI provides a point of reference in evaluating the in-betweenness exhibited by a particular sample, and may be useful as a point of comparison across studies or samples. However, since interpretation of $|\tau| << 1$ may be difficult, it is useful to also consider shape space confidence regions to describe the range of likely triangles. These shape space confidence regions, as constructed by the stratified bootstrap procedure used here, provide greater insight into the possible shapes formed by the subpopulation centroids. Specifically, through consideration of the extremal and median triangles in the confidence region, one may investigate the relative orderings and range of likely relationships of the subpopulation centroids. In ideal situations, with small variation in confidence region triangles, it may be possible for researchers to conclude that the subpopulation centroids exhibit a particular relationship of interest.
The shape space framework offers many advantages when the scientific question of interest concerns the relative positioning. The inference methods developed here can be applied to an arbitrary number of features, and allow for convenient visualization of the uncertainty in relative mean positions regardless of the ambient dimension of the feature space. As the above simulation results show, the performance of the shape space methods are robust to increasing dimension, and in fact the permutation test for coincident centroids using $\tau$ or cosine IBI show increased power as dimension increases, as a result of the null distribution concentrating around the shape space origin.
A potential drawback of shape space approaches is the need for bootstrap or other randomization methods for the construction of confidence regions, due to the complexity of the shape space distributions in the non-null cases. However, for sample sizes common in many biological and medical studies, the required computation is generally tractable. As the underlying computations are routine linear algebra operations, greater computational efficiency can be achieved through the use of specialized hardware and linear algebra software packages.
There are many possible extensions and improvements on the methods developed here. While the present work has focused solely on triangle shape space methods for the analysis of three subgroups, the ideas may be extended to study the relative relationships of more than three groups. Although the coverage of the stratified bootstrap shows good performance in the simulation settings considered here, alternative bootstrap procedures may be considered to reduce bias in the bootstrap estimates, e.g. a double bootstrap or bias-corrected bootstrap.
\bibliographystyle{rss}
|
\section{Acknowledgements}
We acknowledge support from the Singapore National Research Foundation (NRF) NRF-Investigatorship (No. NRFNRFI2015-04) and Singapore MOE Academic Research Fund Tier 3 Grant MOE2018-T3-1-002. M.\,Raju thanks the National University of Singapore E6NanoFab laboratory and the Data Storage Institute, Singapore, for access to sample growth facilities. C.R. acknowledges financial support from the Swiss National Science Foundation (Grant No.\,182652) and thanks A. Guipet for technical assistance. The work of R.M.M., M.J.W. and M.V.M. was supported by Research Foundation Flanders (FWO), the University of Antwerp (BOF), and the VSC (Flemish Supercomputer Center), funded by the FWO and the Flemish Government - department EWI. The collaboration in this work has been fostered in part by EU-COST Action CA16218 NANOCOHYBRI.
|
\section{Introduction}
Bright submillimetre galaxies \citep[SMGs;][]{1997ApJ...490L...5S, 1998Natur.394..241H} are prime laboratories for investigating the physical processes involved in high redshift star formation.
With total luminosities that imply star-formation rates (SFRs) of hundreds to thousands of solar masses per year \citep[e.g.][]{1998Natur.394..248B, 2017MNRAS.469..492M} -- relative to the Milky Way's $\sim1\,M_{\odot}~\text{yr}^{-1}$ \citep[e.g.][]{2011AJ....142..197C} -- these sources are the locations of the most extreme star formation in the Universe.
Understanding the nature of SMGs and the star formation mechanisms at play within them is an important step in beginning to address several open questions in the formation and evolution of massive galaxies.
In the local Universe, galaxies with very high infrared (IR) luminosities ($L_{\rm IR} > 10^{11}\, L_{\odot}$ and $L_{\rm IR} > 10^{12}\, L_{\odot}$ -- luminous and ultraluminous infrared galaxies, LIRGs and ULIRGs, respectively) and therefore high inferred SFRs ($> 10 - 100 \, M_{\odot} \rm{yr}^{-1}$) are rare and usually the result of recent major mergers \citep{1996ARA&A..34..749S, 1999AJ....118.2625R, 2013MNRAS.430.1901H}.
This fits into an evolutionary picture in which mergers trigger episodes of extreme star formation, which is subsequently quenched by, for example, feedback from an active galactic nucleus (AGN), leaving a `red and dead' massive elliptical galaxy \cite[e.g.][]{2006ApJS..163....1H}.
This picture can be expanded to describe more comprehensively the diversity of star-forming galaxy populations and physical processes observed in galaxy evolution across a range of redshifts, with secular evolutionary processes also playing a role as star-formation triggers, and including galaxies with more extended, clumpy star-forming regions.
While evidence from gas kinematics suggests that at high redshift ($z > 1$) some episodes of high SFRs in galaxies may also be triggered by mergers \citep[e.g.][]{2008ApJ...680..246T}, the average SFR of the whole galaxy population is significantly higher than at low redshift \citep[e.g.][]{2014ARA&A..52..415M}.
Not only are galaxies with SFRs comparable to local LIRGs and ULIRGs the dominant galaxy population \citep{2001ApJ...556..562C, 2005ApJ...632..169L, 2013A&A...553A.132M, 2013MNRAS.429.3047B}, but a population of rare galaxies with extremely high SFRs appears at the same epoch.
The fact that such intensely star-forming galaxies are common at high redshift ($z > 1$) suggests they may play a crucial role in galaxy evolution by rapidly assembling the high stellar masses required for the formation of the most massive galaxies we see in the nearby Universe. In this evolutionary picture, SMGs at high redshift ($z > 2$) are attractive candidates for the progenitors of massive elliptical galaxies at $z=0$ (\citealp{1999ApJ...518..641L, 2008ApJ...680..246T, 2012MNRAS.421..284H, 2014ApJ...782...68T}, but see \citealp{2020arXiv201001133G}).
Studying how this extreme star-forming phase shapes galaxy populations at high redshift is therefore crucial in uncovering the origins and nature of massive galaxy populations in the local Universe.
To gain an understanding of the mechanisms driving star formation in these galaxies, we require observations spanning a range of wavelengths, from ultraviolet (UV) to radio, to trace physical processes occurring at different energy scales.
Star-forming galaxies can emit prodigious amounts of energy from the far-infrared (FIR) to millimetre range due to the thermal heating of dust by UV photons from massive young stars \citep{1998ARA&A..36..189K}.
This re-processed emission is a robust tracer of star-formation activity in star-forming galaxies, and observations of the shape of the FIR spectral energy distribution (SED) have long been used to characterise SFRs in galaxies \citep[e.g.][]{1992ApJ...396L..69S, 1997AJ....113..599D, 2010MNRAS.409L..13C, 2012A&A...539A.155M}.
While much of the UV and optical emission is obscured in the most dusty sources, star formation may also be traced using radio continuum emission, which is not obscured by dust.
The radio spectrum arising from star formation consists of two components: thermal, free-free emission from H~{\sc ii} regions and non-thermal synchrotron emission.
The contribution of free-free emission is only significant at high frequencies ($>10 $ GHz), and so in this study we focus on radio synchrotron emission, which dominates the spectrum at the low frequencies considered here.
This synchrotron continuum results from supernovae exploding after a delay of several megayears following the births of populations of O and B stars, which produce cosmic rays that interact with the galaxy's magnetic field.
Since both thermal FIR emission and non-thermal radio continuum emission trace physical processes associated with star formation, one would expect these quantities to correlate.
Indeed there is a well-known tight correlation between the FIR and radio luminosities of star-forming sources, the far-infrared to radio correlation \citep[FIRC;][]{1971A&A....15..110V, 1985A&A...147L...6D, 1985ApJ...298L...7H, 2010MNRAS.402..245I}, which is observed consistently across over four orders of magnitude of galaxy luminosities \citep{2001ApJ...554..803Y}.
The synchrotron radio emission of star-forming galaxies is observed to follow approximate power law behaviour at gigahertz frequencies, with a typical spectral index of $\alpha \simeq -0.7$ \citep{2013MNRAS.435..650M}\footnote{We note that the sign convention varies: In this work we use notations such that $S_{\nu} \propto \nu^{\alpha}$ and $\alpha$ is usually negative.}.
The sources, acceleration, and propagation mechanisms of the cosmic ray electrons responsible for the radio continuum emission of star-forming galaxies are still not well understood, but there are several large-scale effects that can be observed to impact the shape of the radio spectrum due to conditions of the interstellar medium (ISM).
Over time, a synchrotron spectrum will steepen at high frequencies due to radiative losses as high-energy electrons lose energy more rapidly than low-energy electrons \citep{1962SvA.....6..317K, 1968ARA&A...6..321S}.
In the low-frequency regime, free-free absorption can flatten the spectrum below a turnover frequency at which the ISM becomes optically thick \citep{1992ARA&A..30..575C, 2010MNRAS.405..887C, 2013MNRAS.431.3003L}.
Therefore, the shape of the radio synchrotron spectrum and its divergence from a simple power law hold clues as to the conditions of the ISM in and around star-forming regions.
Single-dish submillimetre observations are currently limited by the resolving power of relatively small telescopes operating at such long wavelengths, resulting in much lower-resolution observations than, for example, optical imaging.
However, observations at these wavelengths also benefit from a negative {\it K}-correction \citep{1993MNRAS.264..509B}: As galaxies are redshifted, the observed-frame 850 $\mu$m\xspace emission traces an increasingly bright part of the galaxy's FIR to millimetre spectrum due to the shape of the Rayleigh-Jeans tail, in effect compensating for cosmological dimming.
This results in the observed submillimetre flux density remaining roughly constant for a galaxy of a given luminosity between $0.5 < z < 10$ at 850 $\mu$m, enabling the detection of submillimetre sources out to very high redshifts.
Both optical and radio wavelengths, however, suffer a positive {\it K}-correction across the majority of the spectrum, meaning that the flux density of sources of the same luminosity decreases with distance.
Many studies have identified SMGs without counterparts at optical to near-infrared wavelengths \citep{2014ApJ...788..125S, 2019Natur.572..211W, 2020MNRAS.494.3828D}.
Radio observations provide a view of star formation that is not biased by dust; however, due to the positive {\it K}-correction, observing galaxies in the radio at the high redshifts at which SMGs are most numerous ($z > 2$) is very challenging.
To obtain a more complete picture of the physical processes that shape star formation in the early Universe, very deep radio surveys over wide areas of sky are required to complement deep submillimetre surveys.
Previous work has used high-resolution radio observations, typically at 1.4 GHz, as a method of pinpointing the position of submillimetre sources detected in single-dish surveys \citep{2002MNRAS.337....1I, 2005ApJ...622..772C}; however, such work has been limited by the depth of available radio sky surveys, with dedicated deep surveys over only small regions of sky, resulting in a view biased towards the brighter radio sources.
Studies have largely included limited radio spectral coverage of SMGs, focusing on the nature of the FIRC and its relation to properties such as stellar mass and redshift \citep[e.g.][]{2001ApJ...554..803Y, 2010MNRAS.402..245I, 2014MNRAS.445.2232S}.
The Low Frequency Array \citep[LOFAR;][]{2013A&A...556A...2V} has opened up new ways of studying galaxies in the radio, and a number of studies have used LOFAR's capabilities to investigate this relationship between star formation and radio luminosity in the low-frequency regime -- for example \citet{2018MNRAS.475.3010G}, \citet{2018MNRAS.480.5625R}, \citet{2020arXiv201108196S}, and \citet{2019A&A...631A.109W}.
However, these studies generally investigate the statistical properties of large samples of galaxies, in optically selected samples at low redshift (z $\lesssim$ 2), rather than probing the shapes of individual radio spectra.
\citet{2019ApJ...883..204T} conducted an in-depth study of high-frequency (> 610 GHz) spectral curvature in SMGs, finding evidence of curved spectra that they attributed to spectral ageing of the synchrotron emission from star formation; their results implied estimated starburst ages consistent with expected SMG lifetimes.
Studies at low frequencies, where we may be able to observe absorption processes affecting the shape of the spectrum, have been hampered by a lack of sufficiently deep, wide-area data.
More comprehensive observations of the shape of the radio spectrum, extending to lower frequencies, can provide a probe of the physical conditions that give rise to extreme star formation in SMGs.
\citet{2017MNRAS.469.3468C} exploit LOFAR's frequency range to investigate the spectral shapes of star-forming galaxies and AGN, finding evidence of low-frequency spectral flattening in the star-forming sample. This sample is also constrained in redshift, focusing on local galaxies rather than the peak of star formation at z > 2, and so does not probe the bulk of the highly star-forming SMG population.
\citet{2018A&A...619A..36C} also find weak spectral flattening in local star-forming galaxies with LOFAR but largely attribute this slight effect to synchrotron losses, predicting stronger low-frequency spectral flattening due to free-free absorption at high redshift, where galaxies with high SFRs are more common.
In this study, we make use of new LOFAR deep field observations.
Reaching ${\sim}$22\,$\mu$Jy\,beam$^{-1}$, these observations have the potential to reveal the faint radio counterparts to high-redshift submillimetre sources at low frequencies.
We select a sample of SMGs using observations from the SCUBA-2 Cosmology Legacy Survey \citep[S2CLS;][]{2017MNRAS.465.1789G}, currently the largest area sky survey of its kind, which allows us to limit our study to the sites of the most extreme star formation.
Selecting sources from the Lockman Hole field, for which we have survey coverage with both LOFAR and S2CLS, we characterise their radio spectra with additional radio data from the Jansky Very Large Array (JVLA) and the Giant Metrewave Radio Telescope (GMRT).
We describe the data in Sect.~\ref{sec:data}, our sample selection in Sect.~\ref{subsec:sample}, and how we measure radio fluxes in Sect.~\ref{subsec:radio_phot}.
We briefly comment on two bright S2CLS sources that are undetected at every other wavelength in Sect.~\ref{subsec:nondetections}.
In Sects.~\ref{subsec:SEDs} onwards, we focus on the radio spectra in more detail.
We investigate the diversity of radio spectral shapes and luminosities exhibited by sources in Sect.~\ref{sec:radspec}.
Throughout this paper we assume a flat Lambda cold dark matter ($\Lambda$CDM) cosmology with $H_0 = 69.3$\,km\,s$^{-1}$ Mpc$^{-1}$ and $\Omega_{\rm m} = 0.287$ \citep{2013ApJS..208...19H}.
\section{Data}
\label{sec:data}
\subsection{S2CLS}
The S2CLS observed approximately 5\,square degrees of extragalactic sky across several well-studied fields at 850 $\mu$m to a depth of ${\sim}$1\,mJy\,beam$^{-1}$, close to the SCUBA-2 confusion limit.
In this work we focus on the Lockman Hole North field, centred at $(\alpha,\delta)$ = 10$^{\rm h}$46$^{\rm m}$07$^{\rm s}$, $+$59$^\circ$01$'$17$''$.
The mapping strategy resulted in an approximately circular map of diameter 30$'$, with nearly uniform noise coverage over 0.28 square degrees, at an rms depth of 1.1\,mJy\,beam$^{-1}$.
This results in 126 submillimetre sources detected at a significance of $>4$.
Full details of the SCUBA-2 data reduction, catalogue, and source statistics are given by \citet{2017MNRAS.465.1789G}.
In this work we use the S2CLS source catalogue, and throughout we employ the de-boosted 850 $\mu$m flux densities.
\subsection{LOFAR}
\label{subsec:LOFAR}
We used the deep Lockman Hole image described by Tasse et al.\ (Paper I of the accompanying series), which is based on 112 hours of LOFAR observations.
The image has a central rms noise level of 22 $\mu$Jy beam$^{-1}$ at a central frequency of 144 MHz and a resolution of 6 arcsec.
Together with the images in the Bo\"otes and European Large Area Infrared Space Observatory Survey-North 1 (ELAIS-N1) fields (not covered by S2CLS) this comprises the first data release of the LOFAR Two-metre Sky Survey (LoTSS) Deep Fields and is one of the deepest images ever made at this frequency.
It offers us the best opportunity yet available to study the low-frequency properties of distant submillimetre sources.
Of all sources in the LOFAR catalogue, ${\sim} 98$ per cent have a candidate optical identification, selected by a combination of likelihood ratio and visual inspection using new matched-aperture multi-wavelength catalogues, as described by Kondapally et al.\ (paper III).
For the Lockman Hole, optical data are provided by the The Spitzer Adaptation of the Red-Sequence Cluster Survey (SpARCS) and The Red Cluster Sequence Lensing Survey (RCSLenS) with the Canada France Hawaii Telescope \citep[CFHT;][]{2009ApJ...698.1943W, 2009ApJ...698.1934M, 2016MNRAS.463..635H}, and there are near-infrared data from the UKIRT Infrared Deep Sky Survey - Deep Extragalactic Survey \citep[UKIDSS DXS;][]{2007MNRAS.379.1599L} as well as mid-infrared (MIR) data from the {\it Spitzer} Wide-Area Infrared Extragalactic Survey (SWIRE) and the {\it Spitzer} Extragalactic Representative Volume Survey \citep[SERVS;][]{2003PASP..115..897L,2012PASP..124..714M}.
Additional FIR data come from the {\it Spitzer} Multiband Imaging Photometer (MIPS) and the {\it Herschel} Multi-tiered Extragalactic Survey \citep[HerMES;][]{2012MNRAS.424.1614O}.
The {\it Herschel} catalogues use the optical, IR, or radio positions as a prior to obtain de-convolved flux densities for blended sources. (McCheyne et al. in prep.).
Spectroscopic redshifts were used where available, but the majority of redshifts were generated photometrically from the optical through MIR data in the manner described by Duncan et al (Paper IV).
The broad spectral coverage in this range allows reasonable estimates of photometric redshift to be made (see Table~\ref{table:sources}).
\subsection{Additional radio data}
\label{subsec:additiona_data}
We supplemented the LOFAR catalogue with deep archival JVLA observations at 324 MHz and 1.4 GHz \citep{2009AJ....137.4846O, 2002MNRAS.337....1I}, and at 610 MHz from the GMRT \citep{2009MNRAS.397..281I}.
The Very Large Array (VLA) observations reach central rms noise levels of ${\sim}70\mu$Jy beam$^{-1}$ and ${\sim}4.8\mu$Jy beam$^{-1}$ at 324 MHz and 1.4 GHz, respectively, with resolutions of 6 arcsec and 1.4 arcsec.
Observations from \citet{2009MNRAS.397..281I} at 610 MHz reach a central rms noise level of $\sim14\mu$Jy beam$^{-1}$, with a resolution of ${\sim}6$ arcsec.
These survey footprints cover the S2CLS Lockman Hole coverage in its entirety.
Combined, these observations are the deepest available of the Lockman Hole field across the radio spectrum, and among the deepest radio observations to date for any extragalactic survey field.
\section{Sample selection and FIR properties}
\subsection{Sample}
\label{subsec:sample}
Our sample consists of the 53 point sources detected at $>$5$\sigma$ -- at which significance the false detection rate falls below 1 per cent -- at 850 $\mu$m\xspace in the S2CLS Lockman Hole North field, with a median flux density of $S_{850} = 6.45$ mJy (details in Tables~\ref{table:sources} and~\ref{table:fluxes}).
For each submillimetre source we extracted a thumbnail image cutout in the SCUBA-2 map and at the same position in each radio map.
Figure~\ref{fig:cutouts} shows an example source with cutouts at all four radio frequencies.
Due to the large beam size of SCUBA-2 (${\sim}15$ arcsec full width at half maximum, FWHM), there is a risk of blending, where submillimetre flux from several galaxies that is unresolved within the large beam contributes to the source flux measurement \citep[e.g.][]{2018MNRAS.476.2278H}.
We checked that each S2CLS source corresponds to a single point source in the high-resolution radio images via a visual inspection of the cutout images.
By doing so, we were able to constrain any possible multiplicity to within the 1.4 arcsec resolution of the 1.4 GHz images.
There are a number of sources that split up into multiple components in the 1.4 GHz images, and we discuss our treatment of them below.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{radio_001.png}
\caption{Cutouts of an example S2CLS source (ID 1 in our numbering system, an 11.91 mJy 850 $\mu$m source) in each radio frequency used in this study. Each square is 50 arcsec across, with the approximate S2CLS beam size (${\sim}$15 arcsec FWHM) marked with an orange circle. Image contrast is scaled arbitrarily for clarity.}
\label{fig:cutouts}
\end{figure}
Given the 6 arcsec resolution of the LOFAR image, we ran a simple positional cross-match between each submillimetre source and the LOFAR catalogue, identifying the closest LOFAR source within a generous 15 arcsec radius, equivalent to the size of the SCUBA-2 beam, and approximately corresponding to the 5$\sigma$ positional error on SCUBA-2 sources at the limit of the S2CLS catalogue \citep{2017MNRAS.465.1789G}. This results in 44 matched LOFAR sources and nine sources for which there is no clear LOFAR counterpart.
We calculated the corrected Poissonian probability, $p$, of serendipitous LOFAR matches within the search radius following \citet{2011MNRAS.413.2314B} and using the LOFAR source surface density calculated above the detection threshold of the LOFAR catalogue sources.
For identifications with $p < 0.05$, we assumed that this is a robust cross-match.
Three identifications were found to have $p > 0.05$ and were excluded, reducing the final sample size of robust S2CLS--LOFAR matches to 41 sources.
Only three of these sources (7 per cent) have spectroscopic redshifts available in the LOFAR catalogue, and we used photometric redshifts where spectroscopic were not available.
Ten of the 53 objects in the original sample break up into multiple sources in the LOFAR image such that it is unclear whether the closest positional match corresponds to the correct counterpart.
This gives a multiplicity fraction of ${\sim} 20$ per cent.
Estimates of multiplicity based on high-resolution Atacama Large Millimeter/submillimeter Array (ALMA) follow-up of previous single-dish submillimetre surveys range from $15 - 40$ per cent \citep[e.g.][]{2012ApJ...761...89B, 2013ApJ...776..131C, 2013ApJ...768...91H, 2017MNRAS.469..492M}, so our observed multiplicity is consistent with previous observations.
It is possible that we missed multiples in the case that their angular separation is smaller than the resolution of our radio imaging; however, this is likely to affect only a small number of sources in our sample.
Of those that are visibly multiples within the S2CLS beam based on the radio images, we identified cases in which the secondary source is likely a foreground contaminant by visually inspecting cutouts of the source at radio, IR, and optical wavelengths.
We subsequently treated these as we did the single sources (see Sect.~\ref{subsec:radio_phot}), ensuring that the identified counterpart is identified in source extraction.
This does neglect the case in which several sources contribute submillimetre flux and only one of which has a detectable radio counterpart, a possibility that could arise if, for example, a high redshift submillimetre source is by chance aligned with a low redshift source.
However, our final selected sample has a median redshift of z = 2.61 (see Fig.~\ref{fig:hists} for the redshift distribution of the whole sample), which is consistent with SMG populations \citep[][Sect. 4 and references therein]{2005ApJ...622..772C, 2014PhR...541...45C}, and so it is unlikely that low redshift interlopers contaminate our sample significantly.
There is also the possibility that the submillimetre fluxes are boosted by low luminosity sources that do not have significant radio emission -- in this case, for any significant contribution we would expect a detectable radio source given the FIRC, so this
also seems unlikely.
Without high-resolution submillimetre imaging we are unable to distinguish between a single source and the above cases, and so we continue with the assumption that in all bar one of our sources we may attribute the observed submillimetre flux to a single radio source in the LOFAR catalogue.
There are two notable sources -- sources 8 and 16 -- that are bright S2CLS detections but do not have significantly detected counterparts in any of the radio, optical, or IR images.
We speculate that these may be very high redshift ($z>4$) galaxies and discuss them in more detail in Sect.~\ref{subsec:nondetections}.
\subsection{Radio fluxes}
\label{subsec:radio_phot}
To measure the source flux density at the four radio frequencies, we used the Source Extraction \& Photometry \citep[SEP;][]{2016JOSS....1...58B} Python package, an application of SExtractor \citep{1996A&AS..117..393B} for Python.
We made the assumption that all sources are point-like across all radio frequencies, given that inspection of the sources at the highest angular resolution (1.4 arcesc at 1.4\,GHz) reveals no indication of resolved structure across the sample.
Using SEP, we measured flux densities in each of the four radio frequencies for the 41 LOFAR-detected sources described in the previous section.
These flux densities are consistent with those presented in the LOFAR catalogue.
We used the LOFAR catalogue coordinates from the positional cross-match with the S2CLS source list as described above as the source coordinates, given the higher angular resolution of LOFAR.
At each radio frequency, we examined the source identification resulting from SEP and ensured that the brightest source within the SEP detection ellipse is the expected counterpart to the LOFAR position so that any multiples are not incorrectly identified as the counterpart.
We then took the peak pixel value from within the SEP source ellipse to be the source flux density.
Uncertainties on these measured flux densities were calculated using the off-source pixel-to-pixel rms.
Of the ten sources that break up into multiple components at higher resolution, several contain sources that are likely to be foreground galaxies based on their bright optical luminosities.
Comparing luminosities across the full range of multi-wavelength images, we were able to determine the high redshift counterpart in nine of these ten images.
In these cases, the source SMG can be identified in the LOFAR image, and thus we analysed these as described above, using the LOFAR coordinates for reference.
In the one case where there is no clear single counterpart and there may be truly blended emission from several co-located galaxies, further analysis would require a method of partitioning fluxes that we did not attempt, and thus we excluded the affected source from the sample.
\begin{center}
\begin{table*}
\centering
\small
{\renewcommand{\arraystretch}{1.2}%
\caption{Positions and redshifts of the full sample of S2CLS sources in this study. We assign IDs in column 1, which are used throughout. We mark images where multiple sources fell in the SCUBA-2 beam size with an asterisk (*), and those that are detected at 850 $\mu$m\xspace but not in the LOFAR images we mark with a dagger ($^\dagger$). Photometric redshifts and uncertainties from the LOFAR catalogue are also provided.}
\begin{tabular}{l l l l c}
\hline
ID & LOFAR source ID & RA & Dec & z \\
\hline
1 & ILTJ104635.83+590749.2 & $10^{\mathrm{h}}46^{\mathrm{m}}35.78^{\mathrm{s}}$ & $+59^{\circ} 7{'}48.00{''}$ & $1.89$$\pm^{0.71}_{0.68}$\\
2 & ILTJ104644.98+591542.4 & $10^{\mathrm{h}}46^{\mathrm{m}}45.01^{\mathrm{s}}$ & $+59^{\circ}15{'}39.80{''}$ & $1.30$$\pm^{0.92}_{1.08}$\\
3* & ILTJ104727.95+585213.9 & $10^{\mathrm{h}}47^{\mathrm{m}}27.66^{\mathrm{s}}$ & $+58^{\circ}52{'}14.60{''}$ & $2.93$$\pm^{0.39}_{0.42}$\\
4 & ILTJ104700.22+590108.1 & $10^{\mathrm{h}}47^{\mathrm{m}}0.03^{\mathrm{s}}$ & $+59^{\circ} 1{'}7.50{''}$ & $2.73$$\pm^{0.48}_{0.57}$\\
5 & ILTJ104535.03+585050.1 & $10^{\mathrm{h}}45^{\mathrm{m}}35.23^{\mathrm{s}}$ & $+58^{\circ}50{'}49.90{''}$ & $3.76$$\pm^{0.89}_{0.86}$\\
6 & ILTJ104555.38+591528.7 & $10^{\mathrm{h}}45^{\mathrm{m}}55.19^{\mathrm{s}}$ & $+59^{\circ}15{'}28.10{''}$ & $4.48$$\pm^{2.72}_{2.52}$\\
7 & ILTJ104632.77+590214.3 & $10^{\mathrm{h}}46^{\mathrm{m}}32.85^{\mathrm{s}}$ & $+59^{\circ} 2{'}12.00{''}$ & $3.42$$\pm^{1.34}_{1.38}$\\
8 $^{\dagger}$ & & $10^{\mathrm{h}}45^{\mathrm{m}}54.58^{\mathrm{s}}$ & $+58^{\circ}47{'}54.10{''}$ & $ - $ \\
9* & ILTJ104725.39+590337.8 & $10^{\mathrm{h}}47^{\mathrm{m}}25.25^{\mathrm{s}}$ & $+59^{\circ} 3{'}40.70{''}$ & $2.32$$\pm^{0.74}_{0.80}$\\
10 & ILTJ104631.52+585055.9 & $10^{\mathrm{h}}46^{\mathrm{m}}31.68^{\mathrm{s}}$ & $+58^{\circ}50{'}54.00{''}$ & $ - $\\
11 & ILTJ104803.58+585421.4 & $10^{\mathrm{h}}48^{\mathrm{m}}3.37^{\mathrm{s}}$ & $+58^{\circ}54{'}22.90{''}$ & $2.66$$\pm^{0.49}_{0.50}$\\
12 & ILTJ104447.60+590035.5 & $10^{\mathrm{h}}44^{\mathrm{m}}47.69^{\mathrm{s}}$ & $+59^{\circ} 0{'}36.60{''}$ & $1.98$$\pm^{0.69}_{0.78}$\\
13 & ILTJ104720.51+591043.6 & $10^{\mathrm{h}}47^{\mathrm{m}}20.57^{\mathrm{s}}$ & $+59^{\circ}10{'}40.90{''}$ & $2.69$$\pm^{0.80}_{0.66}$\\
14 & ILTJ104657.32+591459.2 & $10^{\mathrm{h}}46^{\mathrm{m}}57.26^{\mathrm{s}}$ & $+59^{\circ}14{'}57.60{''}$ & $2.96$$\pm^{0.75}_{0.62}$\\
15 & ILTJ104456.67+585000.0 & $10^{\mathrm{h}}44^{\mathrm{m}}56.86^{\mathrm{s}}$ & $+58^{\circ}49{'}59.00{''}$ & $ - $ \\
16 $^{\dagger}$ & & $10^{\mathrm{h}}45^{\mathrm{m}}1.83^{\mathrm{s}}$ & $+59^{\circ} 4{'}3.10{''}$ & $ - $ \\
17* & ILTJ104717.95+590232.2 & $10^{\mathrm{h}}47^{\mathrm{m}}18.21^{\mathrm{s}}$ & $+59^{\circ} 2{'}31.00{''}$ & $2.31$$\pm^{0.34}_{0.39}$\\
18 & ILTJ104556.88+585318.8 & $10^{\mathrm{h}}45^{\mathrm{m}}56.87^{\mathrm{s}}$ & $+58^{\circ}53{'}18.10{''}$ & $1.39$$\pm^{0.64}_{0.68}$\\
19 & ILTJ104702.46+585102.9 & $10^{\mathrm{h}}47^{\mathrm{m}}2.61^{\mathrm{s}}$ & $+58^{\circ}51{'}5.40{''}$ & $3.28$$\pm^{1.89}_{1.86}$\\
20 & ILTJ104800.86+590343.8 & $10^{\mathrm{h}}48^{\mathrm{m}}1.05^{\mathrm{s}}$ & $+59^{\circ} 3{'}43.10{''}$ & $ - $ \\
21 & ILTJ104633.12+585158.7 & $10^{\mathrm{h}}46^{\mathrm{m}}33.24^{\mathrm{s}}$ & $+58^{\circ}52{'}0.00{''}$ & $3.00$$\pm^{1.16}_{1.14}$\\
22* & ILTJ104523.51+591631.2 & $10^{\mathrm{h}}45^{\mathrm{m}}23.87^{\mathrm{s}}$ & $+59^{\circ}16{'}25.70{''}$ & $0.82$$\pm^{0.20}_{0.16}$\\
23 & ILTJ104351.14+590058.1 & $10^{\mathrm{h}}43^{\mathrm{m}}51.48^{\mathrm{s}}$ & $+59^{\circ} 0{'}57.70{''}$ & $2.27$$\pm^{0.56}_{0.60}$\\
24* & ILTJ104626.25+590539.5 & $10^{\mathrm{h}}46^{\mathrm{m}}26.92^{\mathrm{s}}$ & $+59^{\circ} 5{'}44.10{''}$ & $ - $ \\
25 & ILTJ104440.17+585929.8 & $10^{\mathrm{h}}44^{\mathrm{m}}40.23^{\mathrm{s}}$ & $+58^{\circ}59{'}28.30{''}$ & $2.14$$\pm^{0.74}_{1.37}$\\
26* & ILTJ104715.52+590636.6 & $10^{\mathrm{h}}47^{\mathrm{m}}15.49^{\mathrm{s}}$ & $+59^{\circ} 6{'}33.10{''}$ & $3.95$$\pm^{2.06}_{2.14}$\\
27*$^{\dagger}$ & & $10^{\mathrm{h}}47^{\mathrm{m}}20.94^{\mathrm{s}}$ & $+58^{\circ}51{'}52.90{''}$ & $ - $ \\
28 & ILTJ104633.11+591220.2 & $10^{\mathrm{h}}46^{\mathrm{m}}32.97^{\mathrm{s}}$ & $+59^{\circ}12{'}20.00{''}$ & $2.61$$\pm^{1.19}_{1.09}$\\
29 & ILTJ104522.33+591726.0 & $10^{\mathrm{h}}45^{\mathrm{m}}22.55^{\mathrm{s}}$ & $+59^{\circ}17{'}21.70{''}$ & $1.99$$\pm^{0.76}_{0.74}$\\
30 $^{\dagger}$ & & $10^{\mathrm{h}}48^{\mathrm{m}}0.04^{\mathrm{s}}$ & $+58^{\circ}54{'}47.10{''}$ & $ - $ \\
31 & ILTJ104813.45+590340.9 & $10^{\mathrm{h}}48^{\mathrm{m}}13.49^{\mathrm{s}}$ & $+59^{\circ} 3{'}38.30{''}$ & $3.19$$\pm^{2.12}_{2.14}$\\
32* & ILTJ104630.75+585908.3 & $10^{\mathrm{h}}46^{\mathrm{m}}31.00^{\mathrm{s}}$ & $+58^{\circ}59{'}8.00{''}$ & $5.64$$\pm^{1.17}_{1.08}$\\
33 & ILTJ104734.49+591333.2 & $10^{\mathrm{h}}47^{\mathrm{m}}34.22^{\mathrm{s}}$ & $+59^{\circ}13{'}28.40{''}$ & $3.15$$\pm^{1.97}_{2.06}$\\
34* & ILTJ104718.16+585525.9 & $10^{\mathrm{h}}47^{\mathrm{m}}18.23^{\mathrm{s}}$ & $+58^{\circ}55{'}25.00{''}$ & $3.84$$\pm^{1.23}_{1.34}$\\
35 & ILTJ104638.62+585612.6 & $10^{\mathrm{h}}46^{\mathrm{m}}38.72^{\mathrm{s}}$ & $+58^{\circ}56{'}11.90{''}$ & $2.27$$\pm^{0.32}_{0.33}$\\
36 & ILTJ104700.07+585441.5 & $10^{\mathrm{h}}46^{\mathrm{m}}59.87^{\mathrm{s}}$ & $+58^{\circ}54{'}37.50{''}$ & $ - $ \\
37 $^{\dagger}$ & & $10^{\mathrm{h}}46^{\mathrm{m}}23.24^{\mathrm{s}}$ & $+58^{\circ}59{'}36.10{''}$ & $ - $ \\
38 & ILTJ104822.99+590112.1 & $10^{\mathrm{h}}48^{\mathrm{m}}22.92^{\mathrm{s}}$ & $+59^{\circ} 1{'}9.70{''}$ & $ - $ \\
39 & ILTJ104431.34+590612.8 & $10^{\mathrm{h}}44^{\mathrm{m}}31.37^{\mathrm{s}}$ & $+59^{\circ} 6{'}15.90{''}$ & $1.14$$\pm^{0.16}_{0.15}$\\
40 $^{\dagger}$ & & $10^{\mathrm{h}}44^{\mathrm{m}}42.19^{\mathrm{s}}$ & $+59^{\circ} 2{'}10.40{''}$ & $ - $ \\
41 & ILTJ104608.72+585828.7 & $10^{\mathrm{h}}46^{\mathrm{m}}8.49^{\mathrm{s}}$ & $+58^{\circ}58{'}28.20{''}$ & $2.09$$\pm^{0.90}_{0.97}$\\
42 & ILTJ104430.59+585518.4 & $10^{\mathrm{h}}44^{\mathrm{m}}30.59^{\mathrm{s}}$ & $+58^{\circ}55{'}15.90{''}$ & $1.94$$\pm^{0.41}_{0.36}$\\
43 & ILTJ104730.66+590427.5 & $10^{\mathrm{h}}47^{\mathrm{m}}30.73^{\mathrm{s}}$ & $+59^{\circ} 4{'}22.50{''}$ & $1.76$$\pm^{0.69}_{0.68}$\\
44 & ILTJ104601.72+590917.3 & $10^{\mathrm{h}}46^{\mathrm{m}}1.99^{\mathrm{s}}$ & $+59^{\circ} 9{'}18.20{''}$ & $1.88$$\pm^{0.29}_{0.28}$\\
45 & ILTJ104731.18+591134.4 & $10^{\mathrm{h}}47^{\mathrm{m}}29.72^{\mathrm{s}}$ & $+59^{\circ}11{'}32.50{''}$ & $ - $ \\
46 & ILTJ104601.56+585153.4 & $10^{\mathrm{h}}46^{\mathrm{m}}1.26^{\mathrm{s}}$ & $+58^{\circ}51{'}52.20{''}$ & $2.27$$\pm^{0.92}_{1.36}$\\
47 $^{\dagger}$ & & $10^{\mathrm{h}}46^{\mathrm{m}}21.39^{\mathrm{s}}$ & $+58^{\circ}54{'}34.10{''}$ & $ - $ \\
48 $^{\dagger}$ & & $10^{\mathrm{h}}44^{\mathrm{m}}18.32^{\mathrm{s}}$ & $+59^{\circ} 2{'}41.30{''}$ & $ - $ \\
49 & ILTJ104744.66+591413.6 & $10^{\mathrm{h}}47^{\mathrm{m}}44.16^{\mathrm{s}}$ & $+59^{\circ}14{'}11.90{''}$ & $2.20$$\pm^{0.58}_{0.53}$\\
50 & ILTJ104444.87+591500.9 & $10^{\mathrm{h}}44^{\mathrm{m}}44.53^{\mathrm{s}}$ & $+59^{\circ}14{'}50.50{''}$ & $ - $ \\
51* & ILTJ104354.98+590616.7 & $10^{\mathrm{h}}43^{\mathrm{m}}55.28^{\mathrm{s}}$ & $+59^{\circ} 6{'}16.00{''}$ & $2.84$$\pm^{0.86}_{0.82}$\\
52 & ILTJ104539.62+584829.8 & $10^{\mathrm{h}}45^{\mathrm{m}}39.90^{\mathrm{s}}$ & $+58^{\circ}48{'}30.00{''}$ & $3.70$$\pm^{1.45}_{1.45}$\\
53 & ILTJ104738.02+585634.2 & $10^{\mathrm{h}}47^{\mathrm{m}}37.65^{\mathrm{s}}$ & $+58^{\circ}56{'}32.20{''}$ & $ - $ \\
\hline
\end{tabular}
\label{table:sources}
}
\end{table*}
\end{center}
\begin{center}
\begin{table*}
\centering
\small
{\renewcommand{\arraystretch}{1.2}%
\caption{Fluxes and radio spectral indices of sources in this study. IDs in column 1 follow Table~\ref{table:sources}, with multiple sources marked with an asterisk (*) and those not detected in LOFAR with a dagger ($^\dagger$). De-boosted 850 $\mu$m\xspace flux densities are shown from the S2CLS catalogue, and radio flux densities are measured as described in Sect.~\ref{subsec:radio_phot}. Here, $\alpha_{150-324}$ and $\alpha_{324-1400}$ are the low- and high-frequency radio spectral indices, respectively, as described in Sect.~\ref{sec:radspec}.}
\begin{tabular}{l r r r r r r r}
\hline
ID & S$_{850} $ & S$_{150 \rm{MHz}} $ & S$_{324 \rm{MHz}} $ & S$_{610 \rm{MHz}} $ & S$_{1.4 \rm{GHz}} $ & $\alpha_{150-324}$ & $\alpha_{324-1400}$ \\
& (mJy) & ($\mu$Jy) & ($\mu$Jy) & ($\mu$Jy) & ($\mu$Jy) & & \\
\hline
1 & 11.91$\pm$ 1.23 & $515.87\pm 21.88$ & $269.05\pm 74.19$ & $215.36\pm 16.93$ & $80.64\pm 3.72$ & $-0.81$ & $-0.82$\\
2 & 12.28$\pm$ 0.00 & $569.90\pm 45.00$ & $326.56\pm 69.59$ & $230.62\pm 18.62$ & $60.12\pm 6.04$ & $-0.69$ & $-1.16$\\
3* & 9.91$\pm$ 1.33 & $437.02\pm 84.05$ & $218.79\pm 69.63$ & $243.83\pm 34.52$ & $76.62\pm 6.97$ & $-0.86$ & $-0.72$\\
4 & 8.92$\pm$ 1.62 & $627.80\pm 26.03$ & $654.40\pm 67.81$ & $463.67\pm 12.53$ & $232.95\pm 3.45$ & $0.05$ & $-0.71$\\
5 & 8.66$\pm$ 1.43 & $260.40\pm 33.58$ & $185.44\pm 65.30$ & $97.98\pm 16.65$ & $46.60\pm 4.08$ & $-0.42$ & $-0.94$\\
6 & 9.68$\pm$ 0.91 & $155.09\pm 28.09$ & $226.77\pm 63.90$ & $66.25\pm 14.25$ & $32.53\pm 4.82$ & $0.47$ & $-1.33$\\
7 & 8.15$\pm$ 1.28 & $427.66\pm 30.85$ & $318.65\pm 81.14$ & $217.56\pm 15.91$ & $119.51\pm 3.12$ & $-0.37$ & $-0.67$\\
8 $^{\dagger}$ & 8.31$\pm$ 1.50 & $53.22\pm 217.11$ & $-73.58\pm 306.52$ & $39.84\pm 37.60$ & $-21.12\pm 65.69$ & $ - $ & $ - $\\
9* & 7.92$\pm$ 1.37 & $352.32\pm 24.68$ & $242.35\pm 45.25$ & $110.80\pm 11.23$ & $36.95\pm 3.90$ & $-0.47$ & $-1.29$\\
10 & 7.91$\pm$ 1.36 & $2757.32\pm 29.80$ & $1591.78\pm 65.92$ & $923.99\pm 10.53$ & $265.02\pm 4.33$ & $-0.68$ & $-1.23$\\
11 & 8.92$\pm$ 1.35 & $2901.79\pm 33.26$ & $1886.64\pm 66.49$ & $965.98\pm 8.66$ & $261.03\pm 6.77$ & $-0.54$ & $-1.35$\\
12 & 7.45$\pm$ 1.32 & $891.28\pm 35.67$ & $597.49\pm 64.44$ & $314.52\pm 14.95$ & $131.48\pm 4.16$ & $-0.50$ & $-1.03$\\
13 & 7.35$\pm$ 1.33 & $677.98\pm 25.79$ & $399.62\pm 75.91$ & $218.91\pm 11.76$ & $65.99\pm 4.84$ & $-0.66$ & $-1.23$\\
14 & 7.87$\pm$ 0.86 & $382.77\pm 22.14$ & $211.55\pm 78.58$ & $173.30\pm 15.20$ & $34.05\pm 6.29$ & $-0.74$ & $-1.25$\\
15 & 7.56$\pm$ 1.40 & $195.09\pm 82.58$ & $-142.94\pm 252.32$ & $76.64\pm 64.94$ & $202.57\pm 69.16$ & $ - $ & $ - $\\
16 $^{\dagger}$ & 6.81$\pm$ 1.44 & $147.40\pm 187.52$ & $-136.26\pm 286.97$ & $39.09\pm 33.00$ & $-115.27\pm 52.75$ & $ - $ & $ - $\\
17* & 6.77$\pm$ 1.37 & $396.25\pm 18.82$ & $230.10\pm 75.84$ & $155.23\pm 13.57$ & $39.92\pm 3.66$ & $-0.68$ & $-1.20$\\
18 & 6.76$\pm$ 1.42 & $786.16\pm 36.80$ & $611.55\pm 80.54$ & $413.93\pm 14.34$ & $205.57\pm 4.10$ & $-0.31$ & $-0.74$\\
19 & 6.72$\pm$ 1.30 & $257.25\pm 21.91$ & $304.00\pm 75.83$ & $68.13\pm 10.48$ & $31.74\pm 4.65$ & $0.21$ & $-1.54$\\
20 & 7.45$\pm$ 1.14 & $201.01\pm 117.18$ & $63.77$ & $67.83\pm 48.35$ & $-243.98\pm 90.86$ & $ - $ & $ - $\\
21 & 6.45$\pm$ 1.36 & $246.71\pm 25.95$ & $170.03\pm 75.18$ & $129.69\pm 9.11$ & $55.18\pm 3.85$ & $-0.46$ & $-0.77$\\
22* & 8.25$\pm$ 1.51 & $599.27\pm 68.02$ & $349.86\pm 88.50$ & $187.96\pm 53.06$ & $30.08\pm 8.89$ & $-0.67$ & $-1.68$\\
23 & 8.15$\pm$ 2.06 & $306.75\pm 21.86$ & $302.24\pm 70.87$ & $123.97\pm 11.61$ & $36.63\pm 6.55$ & $-0.02$ & $-1.44$\\
24* & 6.47$\pm$ 1.19 & $611.65\pm 412.64$ & $46.51\pm 349.55$ & $179.32\pm 186.81$ & $286.13\pm 50.29$ & $ - $ & $ - $\\
25 & 6.31$\pm$ 1.36 & $514.89\pm 26.75$ & $248.83\pm 67.93$ & $191.35\pm 9.75$ & $67.50\pm 3.82$ & $-0.90$ & $-0.89$\\
26* & 6.50$\pm$ 1.39 & $316.26\pm 44.95$ & $200.46\pm 74.80$ & $148.73\pm 19.29$ & $45.82\pm 3.71$ & $-0.57$ & $-1.01$\\
27*$^{\dagger}$ & 6.32$\pm$ 1.57 & $331.03\pm 103.48$ & $314.05\pm 261.99$ & $31.25\pm 55.27$ & $456.51\pm 75.47$ & $ - $ & $ - $\\
28 & 6.17$\pm$ 1.27 & $280.43\pm 29.52$ & $134.93\pm 53.37$ & $122.89\pm 12.37$ & $47.90\pm 4.63$ & $-0.91$ & $-0.71$\\
29 & 8.84$\pm$ 1.68 & $417.91\pm 25.87$ & $208.33\pm 55.58$ & $196.16\pm 14.54$ & $55.21\pm 6.88$ & $-0.87$ & $-0.91$\\
30 $^{\dagger}$ & 6.42$\pm$ 1.52 & $503.76\pm 114.80$ & $781.95\pm 283.17$ & $153.31\pm 75.00$ & $420.91\pm 93.98$ & $ - $ & $ - $\\
31 & 6.69$\pm$ 1.53 & $214.44\pm 18.08$ & $203.56\pm 82.41$ & $77.61\pm 16.35$ & $25.53\pm 6.76$ & $-0.06$ & $-1.42$\\
32* & 5.52$\pm$ 1.21 & $197.99\pm 37.48$ & $186.59\pm 115.89$ & $105.71\pm 69.49$ & $32.39\pm 3.22$ & $-0.07$ & $-1.20$\\
33 & 6.30$\pm$ 1.33 & $320.15\pm 33.35$ & $182.35\pm 47.71$ & $111.52\pm 17.30$ & $45.49\pm 6.72$ & $-0.70$ & $-0.95$\\
34* & 5.44$\pm$ 1.30 & $224.34\pm 52.19$ & $245.03\pm 77.06$ & $56.77\pm 21.37$ & $39.70\pm 5.24$ & $0.11$ & $-1.24$\\
35 & 5.50$\pm$ 1.33 & $603.71\pm 32.53$ & $367.44\pm 71.91$ & $283.81\pm 15.07$ & $129.00\pm 3.86$ & $-0.62$ & $-0.72$\\
36 & 5.42$\pm$ 1.18 & $799.27\pm 254.92$ & $164.88\pm 326.85$ & $329.11\pm 256.36$ & $368.81\pm 58.78$ & $ - $ & $ - $\\
37 $^{\dagger}$ & 4.86$\pm$ 1.29 & $520.94\pm 83.10$ & $-29.62\pm 313.97$ & $136.86\pm 60.50$ & $130.38\pm 48.72$ & $ - $ & $ - $\\
38 & 6.37$\pm$ 1.38 & $748.04\pm 128.77$ & $232.76$ & $45.05\pm 53.30$ & $124.80\pm 119.67$ & $ - $ & $ - $\\
39 & 4.98$\pm$ 1.33 & $290.25\pm 33.77$ & $315.02\pm 75.94$ & $153.90\pm 8.45$ & $53.63\pm 4.57$ & $0.10$ & $-1.21$\\
40 $^{\dagger}$ & 5.07$\pm$ 1.20 & $67.59\pm 98.51$ & $-341.11\pm 221.77$ & $99.69\pm 42.18$ & $20.18\pm 59.61$ & $ - $ & $ - $\\
41 & 5.05$\pm$ 1.31 & $1276.44\pm 27.34$ & $786.63\pm 65.59$ & $447.18\pm 12.20$ & $189.72\pm 2.92$ & $-0.60$ & $-0.97$\\
42 & 5.25$\pm$ 1.39 & $475.66\pm 28.96$ & $181.98\pm 63.07$ & $192.92\pm 8.36$ & $44.27\pm 4.53$ & $-1.20$ & $-0.97$\\
43 & 5.02$\pm$ 1.28 & $341.40\pm 26.43$ & $331.18\pm 66.97$ & $162.85\pm 11.18$ & $65.27\pm 4.43$ & $-0.04$ & $-1.11$\\
44 & 4.73$\pm$ 1.19 & $464.62\pm 40.36$ & $345.32\pm 85.46$ & $193.13\pm 10.54$ & $64.20\pm 3.66$ & $-0.37$ & $-1.15$\\
45 & 5.31$\pm$ 1.43 & $76.03\pm 239.46$ & $-19.76\pm 232.55$ & $164.37\pm 84.16$ & $139.95\pm 95.10$ & $ - $ & $ - $\\
46 & 4.53$\pm$ 1.14 & $516.47\pm 25.07$ & $297.33\pm 74.08$ & $222.81\pm 9.71$ & $116.54\pm 3.86$ & $-0.69$ & $-0.64$\\
47 $^{\dagger}$ & 4.66$\pm$ 1.15 & $-106.75\pm 81.23$ & $32.22\pm 250.29$ & $-10.28\pm 49.18$ & $93.86\pm 52.67$ & $ - $ & $ - $\\
48 $^{\dagger}$ & 5.00$\pm$ 1.51 & $271.83\pm 80.87$ & $-131.63$ & $60.10\pm 51.23$ & $-119.05\pm 67.70$ & $ - $ & $ - $\\
49 & 5.89$\pm$ 1.28 & $197.55\pm 24.97$ & $150.22\pm 68.25$ & $104.23\pm 16.23$ & $40.82\pm 7.98$ & $-0.34$ & $-0.89$\\
50 & 6.40$\pm$ 1.59 & $452.53\pm 200.45$ & $174.61\pm 244.19$ & $173.99\pm 69.35$ & $49.36\pm 105.88$ & $ - $ & $ - $\\
51* & 6.04$\pm$ 1.76 & $332.04\pm 66.28$ & $231.01\pm 91.76$ & $145.52\pm 40.04$ & $51.86\pm 8.26$ & $-0.45$ & $-1.02$\\
52 & 4.60$\pm$ 1.30 & $323.68\pm 27.13$ & $252.34\pm 69.15$ & $187.14\pm 11.54$ & $67.46\pm 4.56$ & $-0.31$ & $-0.90$\\
53 & 4.59$\pm$ 1.19 & $402.38\pm 97.36$ & $43.27\pm 273.87$ & $61.92\pm 42.72$ & $-30.77\pm 74.99$ & $ - $ & $ - $\\
\hline
\end{tabular}
\label{table:fluxes}
}
\end{table*}
\end{center}
\subsection{Non-detections}
\label{subsec:nondetections}
Two S2CLS detections -- S2CLSJ104554+584754 and S2CLSJ104501+590403, sources 8 and 16, respectively, in our sample -- are below the $5\sigma$ detection threshold in the LOFAR map.
Inspecting these sources in all other available wavelengths, we also find them to be below the $5\sigma$ detection thresholds across the optical and IR as well as at all other radio frequencies (see Fig.~\ref{fig:cutout8}).
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{no_detections.png}
\caption{Cutouts of sources 8 and 16 at radio frequencies, with S2CLS 850 $\mu$m\xspace. There are clear artefacts in the LOFAR image, which result from nearby bright sources. While low S/N detections look possible in several bands, these sources lie below the 5$\sigma$ detection threshold in all bands other than 850 $\mu$m\xspace. The orange circle shows the 15 arcsec SCUBA-2 beam FWHM.}
\label{fig:cutout8}
\end{figure}
While eight sources appear in the S2CLS catalogue that do not have counterparts in the LOFAR catalogue, these two sources are of particular interest due to their high S/Ns.
With S/Ns of 8.14 and 7.14, respectively, they are very unlikely to be false detections, the false detection rate in S2CLS being less than 0.001 per cent for a $\geqslant 7 \sigma$ source.
We focused on these two bright S2CLS sources as they are most likely to be real sources, and we did not attempt a further analysis of the fainter sources without significant multi-wavelength counterparts due to the probability of them being false detections.
A number of possible factors could lead to these bright submillimetre sources with very faint fluxes at other wavelengths: It is possible that these submillimetre detections are the result of blending of several faint sources with an angular separation smaller than the SCUBA-2 beam but larger than at other wavelengths.
However, if we assume that these are indeed single sources, then these objects are either extremely reddened or they are at very high redshift ($z > 4$).
Most likely, we are observing a combination of both redshift and reddening effects \citep{1998Natur.394..241H, 2012Natur.486..233W}, and thus these lone SCUBA-2 detections are candidate high redshift sources.
To estimate a limiting lower redshift at which these sources must be located to be detected at 850 $\mu$m\xspace and below the detection threshold at other wavelengths given the depths of the various surveys, we determined the detection thresholds in each of the images in which there is no detection.
For the optical through to near infrared, we used 5$\sigma$ detection thresholds from position-dependent depth maps \citep{2019MNRAS.490..634S}.
For the {\it Herschel} Photodetector Array Camera and Spectrometer (PACS) and Spectral and Photometric Imaging Receive (SPIRE) images, we used the documented 5$\sigma$ survey depths from \citet{2012MNRAS.424.1614O}.
For Spitzer MIPS, we used the survey depths from the SWIRE second data release \citep[DR2;][]{2012yCat.2302....0S} \footnote{Values for survey depths can be found at the following URL: \url{http://spider.ipac.caltech.edu/staff/jason/swire/astronomers/program.html}}.
As a simple illustration, we used the averaged SMG template SED from \citet{2010A&A...514A..67M} as an assumed, underlying SED for these two sources.
Normalising at the observed 850 $\mu$m\xspace flux density, we redshifted the template until it lay below the detection thresholds of each wavelength (see Fig.~\ref{fig:redshift8}).
Thus we obtained a lower limit on the redshift of each source.
This results in limiting redshifts of $z = 5.4$ for source 8 and $z = 4.7$ for source 16, both of which are plausible for highly star-forming galaxies selected at 850 $\mu$m.
Given the simplistic nature of our fitting procedure, and the assumptions about the underlying SED shape, we cannot give robust redshift limits on these sources; however, this is an indication of an approximate redshift that is consistent with our hypothesis that these are two submillimetre-bright, optically and radio-dim sources located at high redshift.
Further investigation of these sources with submillimetre or millimetre instruments to obtain spectral line emission would be required to more accurately determine the redshifts of these objects.
\begin{figure*}
\centering
\includegraphics[width=\textwidth]{non_detections_zlims.pdf}
\caption{Calculating the lower limits on redshifts for sources 8 (left) and 16 (right), both of which are detected at 850 $\mu$m\xspace and at no other wavelength in this study. Using the $5\sigma$ detection thresholds (marked as downward pointing arrows) at optical through to FIR wavelengths, and the detection at 850 $\mu$m\xspace, we redshift the \citet{2010A&A...514A..67M} template SED until it lies below the limiting fluxes. In this way we determine limits of $z = 5.4$ and $z = 4.7$ for sources 8 and 16, respectively.}
\label{fig:redshift8}
\end{figure*}
\subsection{Optical to submillimetre spectral energy distributions}
\label{subsec:SEDs}
As described in Sect.~\ref{subsec:radio_phot}, in the majority of cases there is a clear, single LOFAR counterpart to the submillimetre source. Therefore, to construct the SED we can simply use the LOFAR catalogue source and the corresponding flux densities and uncertainties at all optical and IR wavelengths provided in the LOFAR added-value catalogue (Kondapally et al., 2020, paper III in series) and the radio flux densities measured using the method described in Sect.~\ref{subsec:radio_phot}.
Figure~\ref{fig:SED} shows an example SED for a source in our sample.
We over-plot the \citet{2010A&A...514A..67M} template SED normalised at the observed frame 850 $\mu$m\xspace flux density and transformed to the photometric redshift of each source.
This provides a visual comparison to a typical high redshift dusty star-forming galaxy SED, and we can see that the SEDs of sources in this study are broadly similar across the full wavelength range.
As several sources in our sample are outside of {\it Herschel} survey area coverage, and therefore do not have data available with which to constrain the peak of dust spectrum, we did not conduct a full SED-fitting process but simply used the normalised star-forming galaxy templates.
While this is not as robust as a fit to the observed SEDs, in the majority of cases the template traces the observed data adequately.
\begin{figure*}
\centering
\includegraphics[width=\textwidth]{multi_plot_close.pdf}
\caption{Observed-frame SEDs of four example sources from our sample. Blue points show the flux densities across the spectrum, with radio flux densities measured as described in Sect.~\ref{subsec:radio_phot} and optical--FIR from the LOFAR catalogue. Uncertainties are plotted, though in many cases they are smaller than the size of the plotted points. The average SMG template from \citet{2010A&A...514A..67M} (orange) is over-plotted, normalised at the observed-frame 850 $\mu$m\xspace SCUBA-2 data point. We show several examples to demonstrate that, in most cases, the template traces the IR dust spectrum well (though in others, less well) but that due to the lack of {\it Herschel} data covering the peak of the dust spectrum in several sources, we use this normalised template to estimate FIR luminosities instead of template fitting. }
\label{fig:SED}
\end{figure*}
\subsection{The far-infrared to radio correlation (FIRC)}
\label{subsec:FIRC}
As a quick check to confirm that none of our sources stand out as radio-loud AGN, we calculated estimates of FIR luminosity for our sources and plotted them on the FIRC.
We used a very simple method, integrating the \citet{2010A&A...514A..67M} average SMG template flux between 8 and 1000 $\mu$m\xspace in the rest frame.
We then normalised this against the observed-frame 850 $\mu$m\xspace luminosity.
While this is a naive approach and inevitably introduces some uncertainty, the \citet{2010A&A...514A..67M} template SED is qualitatively similar enough across the wavelength range in consideration to provide a reasonable estimate of the FIR luminosity of the sources.
The radio luminosity is calculated using the observed 1.4 GHz flux density, {\it K}-corrected according to the LOFAR catalogue redshift following $L_{\nu} = S_{\nu} \times 4\pi \times D_{l}^{2} \times (1+z)^{\alpha - 1}$.
For each source, we used the value of the radio spectral index, $\alpha$, resulting from a power law fit to the high-frequency radio spectrum (324 MHz -- 1.4 GHz) of the form \smash{$S_{\nu} \propto \nu^{\alpha}$} (see Sect.~\ref{sec:radspec}). We plot our sample on the FIRC following \citet{2010MNRAS.402..245I}, and over-plot their results in green for comparison (Fig.~\ref{fig:FIRC}).
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{FIRC_610.pdf}
\caption{Far-infrared to radio correlation. Sources in our sample with extremely flat low-frequency radio spectral indices are plotted with light-coloured squares, and the positions of the `normal' sources are plotted with dark circles. The FIRC relation calculated from our data following Eq.~\ref{eq:firc} is plotted as a dark dashed line, while the shaded region shows the 1$\sigma$ and 3$\sigma$ variances, respectively. Data from \citet{2010MNRAS.402..245I} are plotted in green crosses for comparison, with the FIRC from that work plotted as a dotted green line.}
\label{fig:FIRC}
\end{figure}
We notice immediately that, despite differences in the location of our sources on the FIRC compared to \citet{2010MNRAS.402..245I} (likely due to our FIR estimation method and selection effects, as discussed below), none of our sources appear significantly below the FIRC, and therefore we may assume that our sources do not host radio-loud AGN, or at least that their spectra are dominated by contributions from star formation.
Selecting only the brightest submillimetre sources from a flux-limited sample introduces selection effects such that we bias our sample towards the FIR-bright, radio-faint population; therefore, we do not attempt to comment on the distribution of our sources with regards to the normalisation of the FIRC and its dependence on other galaxy properties, such as redshift, temperature, and stellar mass, as extensively studied by, for example, \citet{2001ApJ...554..803Y}, \citet{2010MNRAS.402..245I}, \citet{2014MNRAS.445.2232S}, and \citet{2018MNRAS.480.5625R}.
The depth of the radio surveys used in our sample also impacts the FIRC here: Many older studies are based on much shallower surveys, and the FIRC is plotted only for objects detected in both bands.
With shallow survey flux limits, this biases the selection to only the brightest sources in both IR and radio.
Here, selecting with S2CLS, we deliberately probed only the brightest, most star-forming IR galaxies, but with the depth of the VLA surveys we are able to detect the faint radio counterparts of these submillimetre-bright objects to lower flux limits than previous work.
These faint radio sources detected in our sample have the resulting effect that the distribution of our sources in Fig.~\ref{fig:FIRC} has a scatter that lies above the traditional FIRC.
However, despite our sources filling a relatively small range of FIR luminosities, they span a wide range of radio luminosities, allowing us to study the variation in the radio properties of highly star-forming galaxies.
Calculating upper limits on the radio luminosities of the two sources with no radio detections, as described in Sect.~\ref{subsec:nondetections}, we find that these sources also lie in the same region on the FIRC as the rest of our sample, suggesting that these are likely to be normal star-forming galaxies at very high redshift, as hypothesised.
We calculated the FIRC parameter, $q_{\text{IR}}$, which parameterises the FIRC, as follows:
\begin{equation}
\label{eq:firc}
q_{\text{IR}} = \text{log} \left(\frac{S_{{8 - 1000 \,\mu \text{m}}}/3.75 \times 10^{12}}{\text{W m}^{-2}}\right) - \text{log}\left(\frac{S_{1.4\, \text{GHz} }}{\text{W m}^{-2} \text{Hz}^{-1}}\right)
.\end{equation}{}
We obtained a mean value of $q_{\text{IR}} = 2.24 \pm 0.29$ for the objects in our sample.
This is consistent with the comparable value of $2.41 \pm 0.2$ obtained by \citet{2010MNRAS.402..245I}, despite our very simple method for estimating FIR luminosities and the selection effects discussed above.
To explore the range of the radio properties of these sources, we look in more detail at the radio spectra in the following section.
\section{Radio spectra}
\label{sec:radspec}
The simplest approach to modelling the radio SED is to fit a power law, \smash{$S_{\nu} \propto \nu^{\alpha}$}, and allow the spectral index, $\alpha$, to vary.
Fitting a power law across all available radio data for each source, we measured a median\footnote{Median errors calculated following \citet{2001ApJ...549....1G}.} spectral index across the whole sample of $-0.86 \pm 0.06$, consistent with values of $\alpha$ in previous studies \citep{1992ARA&A..30..575C, 2009MNRAS.392.1403S, 2013MNRAS.435..650M}.
If we divide the SED into two sections, low frequency (150 MHz -- 324 MHz) and high frequency (324 MHz -- 1.4 GHz), we find median spectral indices of $-0.56 \pm 0.16$ at low frequency and $-0.97 \pm 0.15$ at high frequency.
This choice of dividing frequency (324 MHz) is still firmly in the traditional low-frequency regime; however, if we were to split the sample at a higher frequency (e.g. 610 MHz), we would risk averaging over the part of the spectrum where we might see the effects of spectral flattening most prominently.
In addition, our radio data span the range 150 MHz -- 1.4 GHz, and we did not include any higher frequency radio data in our analysis, so our use of the terms `low frequency' and `high frequency' are purely relative in this case.
The lower average spectral index at low frequency reveals an average spectral flattening, but across the sample we see a range of different spectral shapes in the radio regime (Fig.~\ref{fig:radio_SEDs}).
Extremely star-forming galaxies have been found to have steeper spectral indices in our high-frequency range than in previous studies \citep{2018MNRAS.474..779G}, and models by \citet{2010ApJ...717..196L} also predict steeper synchrotron spectra in high redshift `puffy' SMGs than in compact starbursts.
\begin{figure*}
\centering
\includegraphics[width=0.8\textwidth]{radio_seds.pdf}
\caption{Examples of radio SEDs from our sample, with data at 150 MHz from LOFAR, 324 MHz and 1.4 GHz from the JVLA, and 610 MHz from the GMRT (see Sect.~\ref{subsec:additiona_data}). There is a range of luminosities and spectral shapes. Orange lines show a simple power law with spectral index $\alpha = -0.7$ normalised to the 610 MHz point as a reference and to demonstrate the spectral curvature present in many of these radio spectra. Error bars are shown but are largely within the size of the plotted points.}
\label{fig:radio_SEDs}
\end{figure*}
This variety suggests that there is not one single set of physical conditions responsible for the shape of the radio spectrum, but that it is more likely that a variety of physical conditions contribute to the observed diversity of radio spectral shapes.
With only four observed frequencies, we did not attempt to fit a more complex model but instead examined how the slope of the spectrum changes with frequency.
We constructed a radio colour-colour plot using the observed-frame radio flux densities at 150 MHz, 324\,MHz, and 1.4\,GHz.
Defining a colour, equivalent to the local spectral index, as the relationship between the two flux densities,
%
\begin{equation}
\alpha = \frac{\log (S_{\nu_1} / S_{\nu_2})} {\log (\nu_1 / \nu_2)}
,\end{equation}
%
we plot the low-frequency colour ($\alpha_{\rm low}, \:\nu_1 = 150 \, \rm MHz,\: \nu_2 = 324\, MHz$) against high-frequency colour ($\alpha_{\rm high},\: \nu_1 = 324 \,\rm MHz,\: \nu_2 = 1.4 \,GHz$) to obtain a diagnostic plot from which we may read a measure of spectral curvature (Fig.~\ref{fig:radio_slopes}).
A non-negligible number of sources have significantly flatter low-frequency spectral slopes than expected from typical estimates of power-law-type radio spectra with $\alpha \simeq -0.8$.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{radio_slopes_all_with1400_2.pdf}
\caption{Radio colour-colour plot showing the low-frequency (150 MHz -- 324 MHz) spectral slope on the x-axis and the high-frequency (324 MHz-- 1.4 GHz) spectral slope on the y-axis. The dashed line indicates $\alpha_{low} = -0.25$, the cutoff above which we define sources to have extremely flat low-frequency spectra. Sources above this threshold are marked with squares in the plots throughout this paper. Sources are numbered with the IDs assigned in this study, as detailed in Table~\ref{table:sources}.}
\label{fig:radio_slopes}
\end{figure}
We selected the nine sources with $\alpha_{\rm low} > -0.25$ (marked in Fig.~\ref{fig:radio_slopes} with a dashed red line) to investigate further and performed a number of comparisons to see whether this extremely flat $\alpha_{\rm low}$ sub-sample differs from the parent sample in any observational parameters.
We note that conventionally a more conservative cut is made in spectral index to define flat-spectrum sources (typically $\alpha = -0.5$); however, we divided our sample as such so as to investigate the most extreme spectral flattening.
Taking a more traditional division between flat and steep spectrum sources at $\alpha = -0.5$ does not, however, significantly affect our conclusions, and in fact a flat-spectrum sample with $\alpha > -0.5$ is comparable to the extremely flat-spectrum $\alpha > -0.25$ sample in terms of luminosity and redshift distribution (as in Fig.~\ref{fig:hists}) as well as the other properties explored in this study.
As an initial check, we confirmed that the distribution of these sources is similar to that of the parent sample in both luminosity and redshift (Fig.~\ref{fig:hists}).
The extremely flat-spectrum sample is statistically indistinguishably distributed from the parent sample in both, with a Kolmogarov-Smirnov two-sample test (KS test) giving $p$-values of $p = 0.98$ and $p = 0.61$ for IR luminosity and redshift, respectively.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{hists_normed.pdf}
\caption{Normalised histograms showing the distribution of sources in IR luminosity and redshift, with the full sample shown in dark and the extremely flat-spectrum sources shown in a light outline. The median of each sample is also shown, with a dashed line showing the median of the full sample and a dotted line showing the median of the extremely flat-spectrum sample.}
\label{fig:hists}
\end{figure}
Next we investigated the MIR colours of these sources.
If the difference in radio spectral shape is correlated with a difference in dust temperatures, we might expect to see this sub-sample in a distinct region of an MIR colour-colour diagram.
Mid-infrared colour photometry can be used as a diagnostic to identify the presence of AGN in star-forming galaxies \citep{2000A&A...359..887L}.
The MIR spectrum of a star-forming galaxy is typically driven by emission from warm dust ($T \sim 25$ -- $50$\,K) heated by H~{\sc ii} regions associated with recent star formation, as well as photodissociation regions giving rise to sharply peaked emission features from polycyclic aromatic hydrocarbons (PAHs).
A luminous AGN will contribute significantly to the short-wavelength emission of the MIR spectrum via dust in the AGN torus being heated to much higher temperatures of up to $T \sim 1500$\,K.
Colour-colour plots constructed from {\it Spitzer} Infrared Array Camera (IRAC) photometry can be used to distinguish whether the dominant contribution is from AGN, in which case the MIR colours will be very red \citep{2004ApJS..154..166L}. We plot the positions of our sources in MIR colour-colour plots using the 3.6, 4.5, 5.8, and 8 $\mu$m\xspace IRAC flux densities (Fig.~\ref{fig:irac_colours}).
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{irac_colour_1.pdf}
\caption{IRAC colour-colour plot, with the AGN `wedge' from \citet{2012ApJ...748..142D} shown with a dashed line. Light squares show the extremely flat-spectrum sources. }
\label{fig:irac_colours}
\end{figure}
We followed \citet{2012ApJ...748..142D} and over-plotted the region defined therein to identify galaxies hosting AGN using their IR colours.
Our main interest in investigating the MIR colours is to determine whether the difference in radio spectral slope could result from AGN contributions.
We have already established that there is no clear signature of radio-loud AGN in any sources; however, by inspecting the MIR colours we can probe their dust temperature distributions, which could reveal AGN activity with low radio luminosities that could affect the shape of the radio spectrum.
A number of our sources lie within this region, suggesting that these sources may contain AGN.
There are also a number of other mechanisms that could affect the MIR properties in addition to AGN activity -- it should be noted that we cannot disentangle any differences in MIR emission due to the relative timescales of star-formation and AGN activity, nor that of the merger stage.
The range of redshifts across the sample will also result in a spread of MIR colours due to the location of PAH features in the observed frame.
Nevertheless, there is no clear distributional difference between the extremely flat-spectrum sample and the rest of the sample -- a KS test giving $p = 0.4$ in the $S_{5.8}/S_{\rm 3.6}$ colour and $p = 0.95$ in the $S_{8.0}/S_{\rm 4.5}$ colour -- with neither sample clearly occupying a distinct region in the colour-colour plot, suggesting that the cause of this radio spectral flattening must be something other than simply AGN contributions to the spectrum. As the sample is of only a small number of sources, it is difficult to make a statistically robust statement on their distribution; however, there is nothing to suggest that the extremely flat-spectrum sources are special in any way as regards their IR properties.
As there are no discernible statistically significant differences between the extremely flat $\alpha_{\text{low}}$ sources and the rest of the sample in our observable properties, we propose that this difference in radio spectral shape may be related to properties of the galaxies that we are unable to detect with our unresolved, galaxy-averaged observations.
\subsection{Low-frequency flattening of radio spectra}
\label{subsec:flat_spectra}
There are several possible scenarios in which the low-frequency radio spectral slope is flattened relative to an $\alpha =-0.7$ power law spectrum resulting from the conditions of the ISM, as observed in the nine sources described in Sect.~\ref{sec:radspec}.
Synchrotron self-absorption can play a role in flattening the low-frequency spectrum; however, as the galaxies in our sample do not have AGN-dominated spectra, this is unlikely to make a significant contribution.
In the case of low-luminosity AGN contribution, the level of flattening observed in our extremely flat-spectrum sources could only be obtained with a combination of the maximum possible AGN fractional contribution and self-absorption tuned to occur exactly at our breaking frequency of 324 MHz.
This would be an unlikely coincidence, and as such we conclude that it is unlikely for AGN contributions alone to cause the observed flattening.
A more likely possibility is that, if the source of synchrotron emission is embedded in an ISM that is sufficiently dense and clumpy, free-free absorption begins to have a significant effect as we observe the lower-frequency spectrum.
Nearby star-forming galaxies have been observed to have significant free-free absorbed spectra and clumpy star-forming regions \citep[e.g.][]{2009AJ....137..537L, 2014AJ....147....5R} but it is only now with the deep low-frequency radio data that have become available with LOFAR that we are able to investigate this at high redshift.
To model free-free absorbed spectra, we assumed typical properties of the ISM of SMGs and computed the effect this has on an $\alpha =-0.7$ power law spectrum at the median (estimated) redshift $z = 2.6$ of the sample.
We calculated the optical depth \smash{$\tau = \int \kappa dl$} at the rest-frame frequencies that correspond to our observed frequencies for a galaxy at the median redshift of the sample ($z=2.6$), where $\kappa$ is the free-free absorption coefficient as defined by \citet{1992ARA&A..30..575C}:
\begin{equation}
\left(\frac{\kappa}{\text{pc}^{-1}}\right) = 3.3 \times 10^{-7} \left(\frac{n_e}{\text{cm}^{-3}}\right)^2 \left(\frac{T_e}{10^4 \text{K}}\right)^{-1.35} \left(\frac{\nu}{\text{GHz}}\right)^{-2.1}
,\end{equation}
where $n_e$ is electron density and $T_e$ electron temperature.
Estimates of electron densities in star-forming galaxies from emission line diagnostics are poorly constrained and range from $10 \text{ to } 400 \text{ cm}^{-3}$ \citep{2013ApJ...776...65P, 2013ApJ...776...38F, 2014ApJ...785..153M, 2017MNRAS.465.3220K}.
We assumed an electron density of $n_e = 50\ \text{cm}^{-3}$, which is on the low end of star-forming electron density estimates -- however, as the length scale of relevance is inversely proportional to $n_e^{2}$ for an equivalent level of absorption, if we were to assume a higher value of $n_e$ we would find length scales that are smaller by a factor of $\Delta n_e^{2}$.
This choice then gives us an approximate upper limit for the length scales required for free-free absorption to flatten the spectrum at low frequency, as observed.
We assumed an electron temperature of $T_{e} = 10^4 \text{ K}$ \citep{1980A&AS...40..379D}.
Of course, the properties of the ISM in an individual galaxy will vary in density and temperature across the galaxy's extent as well as across our sample, which covers a range of redshifts; we expect to see variation in the nature of the ISM.
This simple model of the effects of free-free absorption assumes a single slab of absorbing material; due to the nature of our observations, it would be unrealistic to attempt to model any more realistic distributions of dense gas in the ISM.
However, more complex distributions of gas mixed with the radio-emitting plasma in simulations of free-free absorption in radio spectra \citep[e.g.][]{2018MNRAS.475.3493B, 2014A&A...566A..15V} produce very similar results overall.
\begin{figure*}
\centering
\includegraphics[width=0.8\textwidth]{freefree.pdf}
\caption{Our simple model of free-free absorption and its effect on spectral indices. \textit{Left:} Effect of free-free absorption on a simple power law spectrum with radio spectral index $\alpha = -0.7$, with increasing lengths of absorbing column, for our observing frequencies in the observed frame. We assume an electron density $n_e = 50 \text{ cm}^{-3}$ and temperature $T = 10^4 \text{ K}$. \textit{Right:} As Fig.~\ref{fig:radio_slopes}, but with the effect of free-free absorption on a simple power law spectrum plotted in orange, with increasing lengths of absorbing column from zero (left) to 300 pc (right).}
\label{fig:absorbed_spec}
\end{figure*}
Figure~\ref{fig:absorbed_spec} shows the effect of free-free absorption on such a spectrum, over absorbing columns of between zero and 300 pc.
In this model, the level of spectral flattening that we would be able to observe occurs at rest-frame frequencies of $< 1$ GHz, which corresponds to observed-frame frequencies of $\lesssim 280$ MHz for the median redshift, $z = 2.6$, of our sample.
This in part motivated our choice of cutoff frequency to measure the spectral slope as measuring at 610 MHz would average out the flattening we see most strongly at these lower frequencies.
We return to the radio colour-colour plot in Fig.~\ref{fig:radio_slopes} and plot the colours of this model spectrum over these increasing absorbing columns.
This simple model demonstrates that, with our assumed electron densities and temperature, an absorbing column of several hundred parsecs in size would be sufficient to flatten the low-frequency radio spectral index to the degree that we observe in several sources.
As noted above, if we increase the electron density in our model, this would be consistent with smaller-scale absorbing columns (approximately tens of parsecs).
This spatial scale of dense, star-forming clumps is consistent with the highest-resolution observations of SMGs \citep{2010Natur.464..733S, 2015ApJ...810..133I, 2019NatAs...3.1114D}.
A number of studies imaging SMGs at the highest resolutions have found evidence of clumpy substructure at spatial scales of several hundred parsecs \citep[e.g.][]{2016ApJ...829L..10I, 2018Natur.560..613T}; however, for the most part it is only possible to resolve down to scales of approximately tens of kiloparsecs in the handful of submillimetre sources that are strongly gravitationally lensed and observed with interferometric instruments.
One such strongly lensed submillimetre source that has been well studied, SDP.81, displays a spatially non-uniform dust continuum, with several bright $100 - 500$ pc scale clumps \citep{2015MNRAS.451L..40R, 2015PASJ...67...93H, 2015ApJ...806L..17S} and `knots' \citep{2015PASJ...67...72T} on $< 100$ pc scales.
The `Cosmic Snake' is another -- with magnification affording resolved scales as small as 30 pc; \citet{2019NatAs...3.1114D} find several molecular clouds on scales between 30 -- 210 pc.
These scales correspond approximately to the Jeans length for the gas densities typical of star-forming galaxies \citep{2015MNRAS.451.1284S, 2015PASJ...67...93H}, with giant molecular gas clouds collapsing as a result of Toomre instabilities \citep{1964ApJ...139.1217T}. However, we caution the reader that there has been debate as to whether observed `clumpy' substructure is biased by effects relating to interferometric observations.
The case for ${\sim} 100\ $pc scale substructure in the `Cosmic Eyelash' \citep{2010Natur.464..733S} has recently been challenged, with work showing that the inferred structure may be due to filtering and resolution effects amplifying spurious features in low S/N interferometric images \citep{2018NatAs...2...76C,2018ApJ...859...12G, 2020MNRAS.495L...1I}.
Our extreme low-frequency spectral flattened sample with $\alpha > -0.25$ consists of only nine of the 42 sources in the whole sample, implying that if our assumption that this spectral flattening is caused by free-free absorption is correct, the majority of the population of submillimetre-bright sources might not be expected to show strong evidence of dense, clumpy star-forming regions on these scales.
The effect of absorption on our unresolved galaxy-averaged observations must depend on the fraction of low-frequency radio emission that is embedded within and absorbed by high density gas; if a sufficient fraction is able to escape, we will see this flattening to a lesser degree.
Thus there are several explanations for the lack of free-free absorption signatures in the majority of our galaxy sample.
It could be due to an intrinsically smoother, more diffuse distribution of star-forming material \citep[as suggested in e.g.][]{2016ApJ...833..103H, 2020MNRAS.495L...1I}.
There is likely also a dependence on age -- in younger star-forming regions, the radio emission is more likely to still be contained within a dense gaseous structure -- and geometry may also play a role.
Effects of environment and the merger stage may affect the distribution of gas in our galaxies, and we spanned a large range in redshift over which we would expect the nature of the ISM to evolve.
Additionally, our estimated ${\sim} 100$ pc length scale is based on a conservatively low estimate of electron density, as previously discussed; higher assumed electron densities would lead to clumps on scales below the resolution limits of observations of even the most highly magnified lensed sources.
Due to the serendipitous nature of locating gravitationally lensed galaxies, there are very few sources in which observations of sufficiently high resolution can be made to detect substructure on the ${\sim} 100$ pc scales implied by our calculation.
Since only ${\sim} 20$ per cent of sources in our sample display this low-frequency radio spectral flattening, a much larger sample of hundreds of galaxies observed at sub-kiloparsec scales would be required to detect many sources with this substructure if our assumptions are correct that this observed radio spectral flattening is due to free-free absorption, and assuming that structure does exist on scales large enough to be detected with current instrumental capabilities.
\section{Conclusions}
Taking advantage of new, deep LOFAR images, we investigated the low-frequency radio spectra of a sample of highly star-forming galaxies selected at 850 $\mu$m\xspace from the S2CLS.
Our conclusions are as follows:
\begin{enumerate}
\item
We find that this sample of SMGs displays a range of radio luminosities and spectral shapes despite being selected at a very narrow range of submillimetre fluxes, implying that the radio properties of this sample do not follow a tight correlation with the star-formation properties we might infer from submillimetre observations alone.
\item
We find evidence of radio spectral flattening at low frequencies ($\alpha_{\rm low} = -0.47 \pm 0.16$ on average, and nine sources with $\alpha_{\rm low} < -0.25$).
These flat-spectrum sources are indistinguishable from the full sample in their distributions of redshift and IR luminosity, as well as in their IR colours.
In the absence of any clear observational differences between sources with flat low-frequency spectra and the rest of the sample, we infer that this must be due to underlying properties of the galaxies that we cannot observe in our unresolved imaging.
We suggest that this radio spectral flattening may be due to free-free absorption arising from non-uniform, clumpy distributions of ionised gas in which star formation is embedded.
Taking typical values of electron density and temperature, we estimate that clumps must be of the order of a few hundred parsecs in size (comparable to substructure that has been observed in strongly lensed submillimetre sources) to account for the observed radio spectral curvature.
This presents an additional piece of evidence in favour of clumpy star formation in high redshift galaxies that does not depend on the angular resolution of morphological imaging but can be detected in the galaxy-averaged properties in the radio SED.
Due to the serendipitous nature of imaging lensed sources, there are few observations reaching high enough resolution to detect structure on this scale, and so larger samples of high-resolution images (e.g. using submillimetre interferometric instruments such as ALMA) would be required to test whether the proportion of galaxies in our sample that exhibit this radio spectral flattening (${\sim} 20$ per cent) is typical of the submillimetre population in general.
\item
In addition to the range of radio spectra observed in this sample, we also find two bright submillimetre sources ($> 7 \sigma$ detections) that are undetected at all other wavelengths, from optical through to radio.
We speculate that, due to sampling the peak of the thermal dust emission spectrum at 850 $\mu$m\xspace, these objects are located at high redshift ($z > 4$) and are too faint due to cosmological dimming at all other observed wavelengths.
We propose them as interesting candidates for (sub)millimetre interferometric follow-up to determine their redshifts with certainty.
\end{enumerate}
Finding this variety of spectral shapes and evidence of free-free absorption in spectral flattening at low frequencies is consistent with high-resolution observations of clumpy star-forming regions in submillimetre galaxies.
A larger sample of submillimetre galaxies with low-frequency radio observations and high-resolution interferometric follow-up would be beneficial to further investigating the nature of this spectral flattening.
\begin{acknowledgements}
JR, MJH, PNB, IM and RK acknowledge support from the UK Science and Technology Facilities Council [STFC: ST/N504105/1, ST/R000905/1, ST/R000972/1, ST/R505146/1 and ST/R504737/1]. JEG is supported by the Royal Society through a University Research Fellowship.
KJD and HR acknowledge support from the ERC Advanced Investigator programme NewClusters 321271. MJJ acknowledges support from the UK Science and Technology Facilities Council [ST/N000919/1] and the Oxford Hintze Centre for Astrophysical Surveys which is funded through generous support from the Hintze Family Charitable Foundation. MB acknowledges support from INAF under PRIN SKA/CTA FORECaST and from the Ministero degli Affari Esteri della Cooperazione Internazionale - Direzione Generale per la Promozione del Sistema Paese Progetto di Grande Rilevanza ZA18GR02.IP acknowledges support from INAF under the SKA/CTA PRIN “FORECaST” and the PRIN MAIN STREAM “SAuROS” projects.
LOFAR, the Low Frequency Array designed and constructed by ASTRON, has
facilities in several countries, which are owned by various parties
(each with their own funding sources), and are collectively operated
by the International LOFAR Telescope (ILT) foundation under a joint
scientific policy. The ILT resources have benefited from the
following recent major funding sources: CNRS-INSU, Observatoire de
Paris and Universit\'e d'Orl\'eans, France; BMBF, MIWF-NRW, MPG, Germany;
Science Foundation Ireland (SFI), Department of Business, Enterprise
and Innovation (DBEI), Ireland; NWO, The Netherlands; the Science and
Technology Facilities Council, UK; Ministry of Science and Higher
Education, Poland.
Part of this work was carried out on the Dutch national
e-infrastructure with the support of the SURF Cooperative through
grant e-infra 160022 \& 160152. The LOFAR software and dedicated
reduction packages on \url{https://github.com/apmechev/GRID_LRT} were
deployed on the e-infrastructure by the LOFAR e-infragroup, consisting
of J.\ B.\ R.\ Oonk (ASTRON \& Leiden Observatory), A.\ P.\ Mechev (Leiden
Observatory) and T. Shimwell (ASTRON) with support from N.\ Danezi
(SURFsara) and C.\ Schrijvers (SURFsara). This research has made use of the University
of Hertfordshire high-performance computing facility
(\url{https://uhhpc.herts.ac.uk/}) and the LOFAR-UK compute facility,
located at the University of Hertfordshire and supported by STFC
[ST/P000096/1]. The J\"ulich LOFAR Long Term Archive and the German
LOFAR network are both coordinated and operated by the J\"ulich
Supercomputing Centre (JSC), and computing resources on the
supercomputer JUWELS at JSC were provided by the Gauss Centre for
supercomputing e.V. (grant CHTB00) through the John von Neumann
Institute for Computing (NIC).
The James Clerk Maxwell Telescope is operated by the East Asian Observatory on behalf of The National Astronomical Observatory of Japan; Academia Sinica Institute of Astronomy and Astrophysics; the Korea Astronomy and Space Science Institute; the Operation, Maintenance and Upgrading Fund for Astronomical Telescopes and Facility Instruments, budgeted from the Ministry of Finance (MOF) of China and administrated by the Chinese Academy of Sciences (CAS), as well as the National Key R\&D Program of China (No. 2017YFA0402700). Additional funding support is provided by the Science and Technology Facilities Council of the United Kingdom and participating universities in the United Kingdom and Canada.
The authors wish to recognize the very significant role that the summit of Maunakea has within the Indigenous Hawaiian (Kānaka Maoli) community, and acknowledge the continued use of indigenous land for telescope facilities.
We made use of SciPy \citep{jones_scipy_2001}, NumPy \citep{van2011numpy} and matplotlib, a Python library for publication-quality graphics \citep{Hunter:2007}, as well as Astropy, a community-developed core Python package for Astronomy \citep{2013A&A...558A..33A}.
\end{acknowledgements}
\bibliographystyle{aa}
|
\section{Introduction}
Approximately 10\% of main sequence and pre-main sequence stars with radiative envelopes host strong ($\sim$kG scale), organized (predominantly dipolar) magnetic fields \citep{2017MNRAS.465.2432G,2019MNRAS.483.2300S}. Since radiative envelopes cannot support a contemporaneous convective dynamo, it is believed that the magnetic fields of early type stars are fossils -- remnants from a previous stage in the stars' evolution \citep[e.g.][]{2004Natur.431..819B,2015IAUS..305...61N}. Consistent with the fossil field hypothesis is that, unlike dynamo magnetic fields, hot star magnetic fields are apparently stable over a time-span of at least decades \citep[e.g.][]{2018MNRAS.475.5144S}, show no general correlation between magnetic field strength and rotational properties, and exhibit a decline in surface magnetic field strength over evolutionary timescales consistent with conservation or slow decay of magnetic flux \citep[e.g.][]{land2007,land2008,2019MNRAS.483.3127S,2019MNRAS.490..274S}.
The origin of fossil magnetic fields remains obscure. One scenario is that they arise due to short-lived dynamos generated during binary mergers \citep[e.g.][]{2019Natur.574..211S}, however this is difficult to reconcile with the orbital properties of known close magnetic binary systems such as the doubly-magnetic system $\epsilon$ Lupi \citep{2015MNRAS.454L...1S}, the tidally locked system HD\,98088 \citep{2013MNRAS.431.1513F}, the very close binary HD\,156324 \citep[][]{2018MNRAS.475..839S}, or the `identical twins' of HD\,62658 \citep{2019MNRAS.490.4154S}. A competing scenario is that fossil fields may be remnants of convective dynamos operating on the pre-main sequence (PMS) \citep[e.g.][]{1999stma.book.....M}, in which case the 10\% incidence ratio might perhaps be explained by a PMS dynamo bistability mechanism similar to that seen in fully convective stars \citep[as discussed by][]{2019MNRAS.490.4154S} combined with rapid rotationally or convectively driven decay of magnetic fields failing to reach critical surface strength \citep{2007A&A...475.1053A,2020ApJ...900..113J}.
\begin{table*}
\centering
\caption[]{Observation log, RV measurements, and $\langle B_z \rangle$~measurements. $S/N$ indicates the maximum signal-to-noise per spectral pixel in the ESPaDOnS spectrum. Average RV uncertainties are 1.8 km\,s$^{-1}$~for W\,601\,A and 1.5 km\,s$^{-1}$~for W\,601\,B. DF refers to the magnetic field detection flag (DD: Definite Detection; MD: Marginal Detection; ND: Non-Detection).}
\label{obstab}
\begin{tabular}{l r r r r r r r r}
\hline\hline
Date & ${\rm HJD}-$ & $S/N$ & ${\rm RV_A}$ & ${\rm RV_B}$ & $\langle B_z \rangle$ & DF$_V$ & $\langle N_z \rangle$ & DF$_N$ \\
& $-2453000$ & & (${\rm km/s}$) & (${\rm km/s}$) & (G) & & (G) & \\
\hline
10/08/2006 & 957.76004 & 220 & $5$ & $20$ & $184 \pm 286$ & DD & $-139 \pm 286$ & ND \\
02/03/2007 & 1162.15478 & 103 & $-7$ & $38$ & $-709 \pm 1015$ & ND & $-1067 \pm 1015$ & ND \\
03/03/2007 & 1163.12053 & 192 & $0$ & $31$ & $408 \pm 348$ & ND & $-644 \pm 348$ & ND \\
04/03/2007 & 1164.12133 & 226 & $-2$ & $34$ & $-857 \pm 286$ & ND & $-391 \pm 286$ & ND \\
05/03/2007 & 1165.13840 & 254 & $-6$ & $41$ & $-805 \pm 247$ & ND & $-450 \pm 247$ & ND \\
06/03/2007 & 1166.10187 & 179 & $-6$ & $45$ & $-511 \pm 343$ & ND & $116 \pm 343$ & ND \\
06/03/2007 & 1166.14879 & 153 & $-7$ & $47$ & $-458 \pm 617$ & ND & $213 \pm 617$ & ND \\
07/03/2007 & 1167.11236 & 182 & $-9$ & $49$ & $-117 \pm 362$ & MD & $59 \pm 362$ & ND \\
08/03/2007 & 1168.10114 & 194 & $-6$ & $45$ & $1424 \pm 354$ & DD & $-508 \pm 354$ & ND \\
08/03/2007 & 1168.14652 & 204 & $-9$ & $47$ & $921 \pm 332$ & DD & $606 \pm 332$ & ND \\
09/03/2007 & 1169.10634 & 190 & $0$ & $38$ & $2014 \pm 349$ & DD & $-813 \pm 348$ & ND \\
09/03/2007 & 1169.15224 & 199 & $-1$ & $36$ & $2036 \pm 370$ & DD & $-246 \pm 369$ & ND \\
30/06/2008 & 1647.80106 & 203 & $35$ & $-30$ & $2095 \pm 311$ & DD & $547 \pm 311$ & ND \\
30/06/2008 & 1647.84933 & 191 & $35$ & $-30$ & $2079 \pm 335$ & DD & $336 \pm 334$ & ND \\
30/06/2008 & 1647.89851 & 185 & $33$ & $-28$ & $1784 \pm 354$ & DD & $31 \pm 354$ & ND \\
30/06/2008 & 1647.94664 & 175 & $31$ & $-25$ & $1797 \pm 393$ & DD & $-589 \pm 392$ & ND \\
30/06/2008 & 1647.99560 & 179 & $28$ & $-19$ & $443 \pm 359$ & MD & $-283 \pm 359$ & ND \\
30/06/2008 & 1648.04373 & 179 & $29$ & $-19$ & $1178 \pm 382$ & DD & $-33 \pm 382$ & ND \\
01/07/2008 & 1648.80655 & 209 & $31$ & $-30$ & $1446 \pm 311$ & DD & $200 \pm 310$ & ND \\
01/07/2008 & 1648.85518 & 205 & $31$ & $-26$ & $1808 \pm 325$ & DD & $17 \pm 324$ & ND \\
01/07/2008 & 1648.90492 & 202 & $32$ & $-28$ & $2509 \pm 327$ & DD & $-499 \pm 326$ & ND \\
01/07/2008 & 1648.95328 & 205 & $31$ & $-25$ & $2359 \pm 320$ & DD & $-212 \pm 320$ & ND \\
01/07/2008 & 1649.00232 & 219 & $33$ & $-28$ & $2053 \pm 291$ & DD & $6 \pm 290$ & ND \\
01/07/2008 & 1649.05057 & 213 & $31$ & $-25$ & $1748 \pm 299$ & DD & $101 \pm 299$ & ND \\
29/07/2008 & 1676.89812 & 167 & $9$ & $15$ & $370 \pm 412$ & ND & $-430 \pm 412$ & ND \\
21/06/2012 & 3099.93880 & 272 & $24$ & $-8$ & $2088 \pm 308$ & DD & $-170 \pm 307$ & ND \\
13/08/2013 & 3517.80010 & 264 & $34$ & $-27$ & $1256 \pm 329$ & DD & $480 \pm 329$ & ND \\
\hline\hline
\end{tabular}
\end{table*}
This makes examination of magnetic hot stars on the PMS a key arena for determining the origin of fossil magnetic fields. Only eight PMS early-type stars with magnetic field detections confirmed with high-resolution spectropolarimetry are known \citep{2005A&A...442L..31W, 2008MNRAS.387L..23P, 2007A&A...462..293C, 2008MNRAS.385..391A, 2008A&A...481L..99A, 2009A&A...502..283H, 2013MNRAS.429.1001A, 2013AN....334.1093H, 2015MNRAS.449L.118H, 2015A&A...584A..15J}. \cite{2013MNRAS.429.1001A,2013MNRAS.429.1027A} showed that fossil magnetic fields have the same incidence amongst Herbig Ae/Be stars as amongst the MS population, and tend to be more slowly rotating than non-magnetic Herbig stars, which is consistent with the magnetic stars being subject to magnetic braking. A spectropolarimetric survey of intermediate mass T Tauri stars by \cite{2019A&A...622A..72V} demonstrated that magnetic fields are ubiquitous amongst stars with convective envelopes, but that the incidence declines to around 10\% immediately upon crossing the boundary on the Hertzsprung-Russell diagram between convective and radiative envelopes.
Since only a few magnetic PMS hot stars are known, a full magnetic and rotational characterization of the individual members of this population is an important step in understanding their properties. In this paper, we examine the PMS B2 star NGC\,6611\,601 (also known as NGC\,6611-019, ALS\,9522, BD\,$-13^\circ~4937$, and hereafter referred to as W\,601). This star was classified as a Herbig Ae/Be star on the basis of its `P-Cygni like' H$\alpha$ emisison \citep{2008A&A...489..459M} and its mid-infrared excess \citep{2004MNRAS.353..991K}. Its magnetic field was detected by \cite{2008A&A...481L..99A}, who also noted its strong, variable He lines, suggesting that it may be a He-strong star. W\,601 is an X-ray source \citep{2014ApJS..215...10N}, and a radio synchrotron source \citep{2017MNRAS.465.2160K}, both likely indicative that the star hosts a detectable magnetosphere; the other possible explanation for enhanced X-rays and non-thermal radio emission -- colliding winds -- seems unlikely due to the relatively weak winds of B-type stars, and unneccessary due to the presence of a magnetic field.
The observations -- a large ESPaDOnS dataset -- are described in \S~\ref{sec:obs}. In \S~\ref{sec:binary} we show the evidence that W\,601 is a spectroscopic binary, and constrain the orbital properties of the system. Stellar parameters are revisted in the light of binarity in \S~\ref{sec:stellar_pars}. The magnetic analysis is presented in \S~\ref{sec:magnetometry}, where it is determined that the magnetic field belongs to the secondary. Spectroscopic variability is examined in \S~\ref{sec:halpha_em}, and in \S~\ref{sec:rot_em} the rotational period is determined from the magnetic and spectroscopic variations. The magnetic properties of the stars are derived in \S~\ref{sec:orm}. The magnetospheric properties of the system, and its possible future magnetic and rotational evolution, are discussed in \S~\ref{sec:discussion}, along with implications for the origins of fossil magnetic fields, their accompanying chemical abundance anomalies, and the status of the system as a Herbig star. Conclusions are summarized in \S~\ref{sec:conclusion}.
\begin{figure*}
\centering
\includegraphics[width=0.95\textwidth]{W601_HeI6678.eps}
\caption[]{Observed line profiles (black lines) and disentangled line profiles (dashed blue: primary; dot-dashed purple: secondary; solid red: cumlative) for 3 isolated spectral lines. Each row shows the same spectrum. The top, middle, and bottom rows respectively show spectra with the secondary at maximum positive radial velocity, the minimum difference in radial velocity between primary and secondary, and with the secondary at maximum negative radial velocity. Line profile variations in all lines can be reproduced assuming a two-star model with variable RVs.}
\label{W601_HeI6678}
\end{figure*}
\begin{figure*}
\centering
\begin{tabular}{ccc}
\includegraphics[width=0.33\textwidth,trim=80 0 0 0]{W601_rv_vs_t_zoom.eps} &
\includegraphics[width=0.33\textwidth,trim=80 0 0 0]{W601_rv_vs_t.eps} &
\includegraphics[width=0.33\textwidth,trim=80 0 0 0]{w601_orb.eps} \\
\end{tabular}
\caption[]{Radial velocities for the primary (blue circles) and secondary (red triangles) as a function of time (left, middle) and phased with the orbital period (right). The left panel zooms in on the epoch with the densest time sampling. In the right panel, curves and shaded regions indicate orbital models and uncertainties.}
\label{W601_rv}
\end{figure*}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{w601_periods.eps}
\caption[]{Periodograms for the primary (solid blue) and secondary (dashed red) mean weekly RVs. The thick black line indicates the maximum power period. Note that there are several peaks of nearly equivalent significance; these are discussed further in the text.}
\label{W601_periods}
\end{figure}
\section{Observations}\label{sec:obs}
The dataset consists of 27 spectropolarimetric ESPaDOnS sequences obtained at the 3.6~m Canada-France-Hawaii Telescope (CFHT) from several observing programs (program codes 06BF15, 07AF06, 08AF16, 08AC13, 08BP14, 12AP13, and 13BC09), and in the context of the Magnetism in Massive Stars (MiMeS) Large Program. ESPaDOnS is a fibre-fed echelle spectropolarimeter with a spectral resolution $\lambda/\Delta\lambda \sim 65,000$ at 500 nm, and a wavelength coverage between about 370 nm and 1050 nm. Each observation consists of 4 polarized sub-exposures, which are combined to yield a circular polarization (Stokes $V$) spectrum and two diagnostic null $N$ spectra, with which anomalies in instrument behaviour can be detected. The reduction and analysis of ESPaDOnS data was described in detail by \cite{2016MNRAS.456....2W}. The data were reduced with the Libre-ESPRIT pipeline \citep{d1997}.
The observation log is given in Table \ref{obstab}. The mean peak signal-to-noise ($S/N$) per spectral pixel is about 200.
Four of these observations were already reported by \cite{2008A&A...481L..99A} (one on 10/08/2006, two on 06/03/2007, and one on 09/03/07). The remaining observation are presented here for the first time.
\section{Binarity}\label{sec:binary}
Magnetic Bp stars exhibit several forms of line profile variation. The first, and most common in this class, are due to inhomogeneous surface chemical abundance patches, almost invariably exhibiting different patterns of variation for different elements \citep[e.g.][]{2015A&A...574A..79K,2015A&A...573A.123R,2016A&A...588A.138R,2017MNRAS.471..962S,2018A&A...609A..88R,2019A&A...621A..47K}. Many Bp stars also exhibit line profile variability due to pulsation or binarity. As is shown below, the line profile variations of W\,601 reported by \cite{2008A&A...481L..99A}, and interpted there as the signature of He spots, are in fact primarily due to binarity.
Close examination of the line profile variability shows that lines of different elements exhibit essentially the same pattern of variation (Fig.\ \ref{W601_HeI6678}), with absorption excesses appearing in the same part of the line regardless of element. Since it is not expected that different elements will display the same abundance distributions, the similarity of the line profile variability between lines from different elements suggests that the source of the variation may instead be either binarity or pulsation.
To test the binarity hypothesis, two-component models were fit to the strong He~{\sc i}~667.8~nm line using the paramaterized line profile fitting routine described by \cite{2017MNRAS.465.2432G}. This process yielded consistent fits for a broad-lined component ($v \sin i$~$=173 \pm 14$~km\,s$^{-1}$) and a narrow-lined component ($v \sin i$~$=105 \pm 3$~km\,s$^{-1}$), where the uncertainties are determined from the standard deviation of fits across the dataset. The radial velocities (RVs) of the two components obtained in the course of profile fitting anticorrelate with one another (Fig. \ref{W601_rv}, top). Since the broad-lined component has the smaller RV amplitude, we designate it as the primary, W\,601\,A, and the narrow-lined component as W\,601\,B. W\,601\,A has an RV semi-amplitude of about 20 km\,s$^{-1}$~and W\,601\,B has a semi-amplitude of about 30 km\,s$^{-1}$. There is no detectable RV variation on a time-scale of one to two days, however there is significant variation over a time-scale of weeks. This is in contrast to EW variations tracing rotational variability, which occur on a much shorter timescale (see \S~\ref{sec:halpha_em}).
The RVs and $v \sin i$~values were then used to disentangle the line profiles of various spectral lines using the iterative method described by \cite{2006AA...448..283G}, as shown for the He~{\sc i}~667.8~nm, Si~{\sc iii}~455.3~nm, and Si~{\sc ii}~634.7~nm lines in Fig.\ \ref{W601_HeI6678}. As can be seen in Fig.\ \ref{W601_HeI6678}, the broad-lined component accounts for the majority of line absorption: 57\% of the absorption in He~{\sc i}~667.8~nm, 74\% in Si~{\sc iii}~455.3~nm, and 63\% in Si~{\sc ii}~634.7~nm.
The anticorrelation of the RVs, and the fact that the larger RV amplitude is seen in the component with the smaller contribution to the line absorption, are all consistent with W\,601 being a double-lined spectroscopic binary (SB2).
Period analyses of the RVs were performed using both the standard Fourier analysis package {\sc period04}\footnote{Available at \url{https://www.univie.ac.at/tops/Period04/}} \citep{2005CoAst.146...53L} and using the {\sc idl} routine {\sc periodogram.pro}\footnote{Available at \url{https://hesperia.gsfc.nasa.gov/ssw/gen/idl/util/periodogram.pro}} \citep{1986ApJ...302..757H}. Period uncertainties were determined analytically \citep{1976fats.book.....B}. Analysis of the full RV dataset yielded ambiguous results, with numerous peaks of similar amplitude between about 30 and 200 days. Since there is only minimal variation on timescales of a few days (Fig.\ \ref{W601_rv}, left panel), we analyzed mean weekly RVs in order to avoid biasing the periodogram results by the few highly sampled epochs. This strategy yielded a period of 109.9(2)~d from both the A and B RVs (see Fig.\ \ref{W601_periods}, where periodograms from {\sc periodogram.pro} are shown). {\sc period04} instead yielded a period of 104 d, however, the longer period obtained using {\sc periodogram.pro} provides a better phasing of the data (Fig.\ \ref{W601_rv}, right). The longer period furthermore yields a higher $S/N$ as evaluated using {\sc period04} itself (26 as compared to 5.5). We therefore adopt the period from {\sc periodogram.pro} as the most likely orbital period, although we note that there is enough ambiguity in the period that it should certainly be tested by further observation.
To obtain an orbital solution, we optimized synthetic RV curves against the mean weekly RVs using a Markov Chain Monte Carlo algorithm \citep[as described by ][]{2018MNRAS.475..839S,2019MNRAS.482.3950S}. The algorithm achieved rapid convergence, providing additional confidence in the period. The model fits to the RVs are shown in the right panel of Fig.\ \ref{W601_rv}, and the fit parameters are given in Table \ref{orbtab}. The orbit is mildly eccentric ($e = 0.24 \pm 0.01$), with a mass ratio $M_{\rm A}/M_{\rm B} = 1.79 \pm 0.04$. The $\chi^2$ of the fit shown in Fig.\ \ref{W601_rv} is 3.6. MCMC fitting of the 104 d period yielded a $\chi^2$ of 15.4, with a noticeably worse fit. The periodogram also has a peak at 186 d, nearly the same strength as the 109 d period; fitting with this period yielded a $\chi^2$ of 6.7, somewhat higher than the 109 d period. This indicates that the 109 d period is the most likely to be correct. Notably, while the 3 fits yield different eccentricities $e$ and velocity semi-amplitudes $K$, the systemic velocities $v_0$ and the mass ratios $M_{\rm A}/M_{\rm B} = K_{\rm B}/K_{\rm A}$ are essentially identical in all three cases, indicating that these parameters are likely robust against future revision of the orbital period.
\begin{table}
\centering
\caption[]{Orbital parameters: orbital period $P_{\rm orb}$; epoch of periastron $T_0$; eccentricity $e$; argument of periastron $\omega$; central velocity $v_0$; semi-amplitudes $K_{\rm A}$ and $K_{\rm B}$; mass ratio $M_{\rm A}/M_{\rm B}$; projected total mass $M\sin^3{i}$; projected component masses $M_{\rm A}\sin^3{i}$ and $M_{\rm B}\sin^3{i}$; and projected semi-major axis $a\sin{i}$.}
\label{orbtab}
\begin{tabular}{l r r}
\hline\hline
Parameter & Value & Uncertainty \\
\hline
$P_{\rm orb}~({\rm d})$ & 109.9 & 0.2 \\
$T_0~({\rm HJD})$ & 2453900.8 & 0.2 \\
$e$ & 0.234 & 0.008 \\
$\omega~(^\circ)$ & 64.6 & 0.9 \\
$v_0~({\rm km/s})$ & 11.4 & 0.1 \\
$K_{\rm A}~({\rm km/s})$ & 21.5 & 0.2 \\
$K_{\rm B}~({\rm km/s})$ & 41.8 & 0.4 \\
$M_{\rm A}/M_{\rm B}$ & 1.94 & 0.03 \\
$M\sin^3{i}~({\rm M_\odot})$ & 2.64 & 0.06 \\
$M_{\rm A}\sin^3{i}~({\rm M_\odot})$ & 1.75 & 0.04 \\
$M_{\rm B}\sin^3{i}~({\rm M_\odot})$ & 0.90 & 0.02 \\
$a\sin{i}~({\rm AU})$ & 0.621 & 0.005 \\
\hline\hline
\end{tabular}
\end{table}
\section{Stellar parameters}\label{sec:stellar_pars}
\begin{figure*}
\centering
\includegraphics[width=0.95\textwidth, trim=100 50 50 0]{tlusty_fit.eps}
\caption[]{Comparison of the best-fit composite {\sc TLUSTY} spectrum (red lines) to the observed mean spectrum obtained via co-addition of observations with similar RVs (black lines). Contributions from the primary (dashed blue) and secondary (dot-dashed purple) show the intrinsic flux from each component, i.e.\ not scaled by the luminosity ratio. The bottom panel show the residuals after subtraction of the model. Note the poor fit to He~{\sc i}~667.8~nm, indicative of one of the stars being a He-strong star; this line was not used for parameter determination.}
\label{tlusty_fit}
\end{figure*}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{w601_lowem_mean.s_hbeta_logg_fit.ps}
\includegraphics[width=0.45\textwidth]{w601_lowem_mean.s_hgamma_logg_fit.ps}
\caption[]{Single component fits to the H$\beta$ and H$\gamma$ lines. Vertical dotted lines indicate regions excluded from the fit. Note the flat residuals outside the exclusion regions; residuals inside are due to circumstellar emission. Legends indicate the $T_{\rm eff}$~and $\log{g}$ of the corresponding models. Bottom sub-panels show the residual flux. Cyan, blue, and purple lines indicate best fit values for the given $T_{\rm eff}$; the red line shows $\log{g}=4.25$ for comparison. Note the much deeper wings of the $\log{g}=4.25$ model in comparison to the observed spectrum.}
\label{logg}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth,trim=50 0 75 100]{bin_logg_fit.ps}
\caption[]{Two-component fit to H$\beta$. The left panel shows the $\chi^2$ landscape (range indicated by colour bar), with the best-fitting model parameter indicated with black dots. Red contours indicate $\sigma$-levels. The diamond and square respectively indicate surface gravities inferred from main-sequence and pre-main-sequence evolutionary models (Fig.\ \protect\ref{physpar}). Right panels show the fits to H$\beta$, at (top to bottom), maximum primary RV, minimum RV separation, minimum primary RV (observed: black lines; dashed blue lines, primary; dot-dashed purple lines, secondary; solid red lines, combined flux).}
\label{w601_bin_logg_fit}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{w601_physpar_mc_pms.eps}
\includegraphics[width=0.45\textwidth]{w601_physpar_mc_ms.eps}
\caption[]{Stellar parameters inferred from MC sampling of the HRD using pre-MS models \citep[][top panels]{Haemmerle2019} and MS models \citep[][bottom panels]{ekstrom2012}. Contours show 1$\sigma$ uncertainties (red: primary; blue: secondary). The solid line shows the Zero-Age Main Sequence; dashed and dotted lines respectively show evolutionary tracks and isochrones. For the PMS models, isochrones are shown for $\log{t} = 5.4$ and 5.7; for the MS models, isochrones for $\log{t} = 7.1$ and 7.5 are shown. A comparison between the $\log{g}$ values determined from evolutionary models to those measured via spectroscopic modelling is shown in Fig.\ \protect\ref{w601_bin_logg_fit}.}
\label{physpar}
\end{figure}
\begin{table}
\centering
\caption[]{Stellar parameters for the W\,601 components. $^a$: \protect\cite{2019ApJ...870...32K}; $^b$: using the anomalous extinction law determined by \protect\cite{2006A&A...457..265D}; $^c$: \protect\cite{nieva2013}. Pre-Main Sequence (PMS) models: \protect\cite{Haemmerle2019}; Main Sequence (MS) models: \protect\cite{ekstrom2012}.}
\label{partab}
\begin{tabular}{l c c}
\hline\hline
Parameter & A & B \\
\hline
$B~({\rm mag})$ & \multicolumn{2}{c}{11.11} \\
$V~({\rm mag})$ & \multicolumn{2}{c}{10.78} \\
$d~{\rm (kpc)}$$^a$ & \multicolumn{2}{c}{$1.74 \pm 0.13$} \\
$E(B - V)$ & \multicolumn{2}{c}{$0.68 \pm 0.05$} \\
$A_{\rm V}~({\rm mag})$$^b$ & \multicolumn{2}{c}{$2.38 \pm 0.3$} \\
$M_V~({\rm mag})$ & $-3.0 \pm 0.4$ & $-1.7 \pm 0.3$ \\
${\rm BC}~({\rm mag})$$^c$ & $-2.6 \pm 0.1$ & $-1.6 \pm 0.2$ \\
$M_{\rm bol}~({\rm mag})$ & $-5.7 \pm 0.4$ & $-3.3 \pm 0.3$ \\
$T_{\rm eff}~({\rm kK})$ & $22 \pm 1$ & $19 \pm 1$ \\
$\log{g}~({\rm cm/s})$ & $3.9^{+0.3}_{-0.1}$ & $3.9^{+0.5}_{-0.3}$ \\
$\log{(L/L_\odot)}$ & $4.1 \pm 0.2$ & $3.2 \pm 0.1$ \\
$R_*~({\rm R_\odot})$ & $5.2 \pm 0.7$ & $4.3 \pm 0.9$ \\
$M_*~({\rm M_\odot})$ & $12 \pm 1$ & $6.2 \pm 0.4$ \\
$\log{(t/{\rm yr})}$ (PMS) & \multicolumn{2}{c}{$5.6 \pm 0.2$} \\
$\log{(t/{\rm yr})}$ (MS) & \multicolumn{2}{c}{$7.3 \pm 0.2$} \\
$i_{\rm orb}$ ($^\circ$) & \multicolumn{2}{c}{$31.5 \pm 0.9$} \\
$a$ (AU) & \multicolumn{2}{c}{$1.18 \pm 0.02$} \\
\hline\hline
\end{tabular}
\end{table}
Stellar parameters for W\,601 have previously been determined by \cite{1997A&AS..121..223D} ($\log{L/L_\odot} = 4.28$, $T_{\rm eff}$~$=23.5$~kK) and \cite{2006A&A...457..265D} ($\log{L/L_\odot} = 3.96 \pm 0.11$, $T_{\rm eff}$~$=22.4 \pm 2.7$ kK, and $\log{g} = 3.85$), where the different luminosities arise from different assumptions regarding distance and extinction. Since these parameters were determined under the assumption of a single star, they need to be revisited.
\subsection{Effective Temperature}
As a first pass to estimate the $T_{\rm eff}$~of the two components, we used EW ratios of Si~{\sc ii}~634.7~nm and Si~{\sc iii}~455.3~nm obtained from disentangled line profiles (Fig.\ \ref{W601_HeI6678}). While surface abundances are by definition affected by the chemical spots expected for a magnetic chemically peculiar star, line strength ratios for different ions of the same element are not affected by this \citep[since it is the abundance, but not the $T_{\rm eff}$, that varies across the stellar surface; e.g.][]{2015MNRAS.449.3945S,2019MNRAS.485.1508S}. Comparison of the weighted mean EW ratios calculated from all spectra to theoretical values obtained from the NLTE {\sc TLUSTY} BSTAR2006 library of synthetic spectra \citep{lanzhubeny2007}, using $3.5 < \log{g} < 4.25$, yields $T_{\rm eff}$$_{\rm A} = 22.5 \pm 1.5$ kK and $T_{\rm eff}$$_{\rm B} = 20.5 \pm 1.5$ kK. While the $T_{\rm eff}$~of the two components overlaps within uncertainty, B is definitely cooler than A, since the contribution of A is higher in Si~{\sc iii} as compared to Si~{\sc ii}.
A second analysis is demonstrated in Fig.\ \ref{tlusty_fit}, where we used a grid of synthetic spectra calculated from {\sc TLUSTY} models, with $15 < T_{\rm eff} < 25$~kK and $3.0 < \log{g} < 4.5$ for each star. The {\sc tlusty} spectra were calculated with 2 km\,s$^{-1}$~of microturbulence and solar metallicity. The radius ratio $R_{\rm A}/R_{\rm B}$ was allowed to vary as a free parameter between 0.5 and 5, where $R_{\rm A}/R_{\rm B}$ is a factor used to scale the contributions of the A and B components to the composite spectrum. $v\sin{i}_{\rm A} = 173$~km\,s$^{-1}$, $v\sin{i}_{\rm B} = 94$~km\,s$^{-1}$, ${\rm RV}_{\rm A} = 35$~km\,s$^{-1}$, and ${\rm RV}_{\rm B} = -23$~km\,s$^{-1}$~were fixed. The grid was compared to a mean spectrum created by combining the ESPaDOnS observations obtained in 03/2007, since the RVs of the two components are basically constant during the 1 week of observations (see the left panel of Fig.\ \ref{W601_rv}. The standard deviation in RV is 3.5 km\,s$^{-1}$~and 6~km\,s$^{-1}$~for W\,601\,A and B, respectively, in both cases comparable to the uncertainty in $v \sin i$; co-addition of spectra therefore should not lead to significant additional line broadening)., and this is the epoch with the largest number of observations. The peak $S/N$ per 1.8 km\,s$^{-1}$~spectral pixel of the mean 2007 spectrum is 670. The analysis was performed on a selection of strong lines, shown in Fig.\ \ref{tlusty_fit}, with a focus on chemical species for which two ionization levels are present in the spectrum (O~{\sc i} and {\sc ii}; Si~{\sc ii} and {\sc iii}; and Fe~{\sc ii} and {\sc iii}). The results of this analysis are $T_{\rm eff,A} = 22 \pm 1$~kK, $T_{\rm eff,B} = 19 \pm 1$~kK, $\log{g} = 3.75 \pm 0.25$ for both stars, and $R_{\rm A}/R_{\rm B} = 1.1 \pm 0.1$.
The results of the spectroscopic fit are consistent with those of the EW ratio analysis, but use a larger number of lines, and yield more precise results; we therefore adopt the spectroscopic fit results for the $T_{\rm eff}$. The surface gravity is revisited below using Balmer lines, as these are more sensitive to $\log{g}$.
\cite{2008A&A...481L..99A} classified W\,601 as a He-strong star because its He lines were much stronger than solar abundance models predict, as is usually the case for strongly magnetic stars in this $T_{\rm eff}$~regime. As can be seen in Fig.\ \ref{tlusty_fit}, a binary spectroscopic model with solar abundances also results in He lines much weaker than observed. For this reason, He lines were not included in the $T_{\rm eff}$~determination.
\subsection{Surface Gravity}
To refine the determination of $\log{g}$ we examined the H$\beta$ and H$\gamma$ lines. Since there is emission in H$\alpha$, there will also be (weaker) emission in the higher-numbered H Balmer lines. In order to mitigate the influence of this emission on the Balmer wings, a mean spectrum was created from the observations exhibiting the smallest amount of H$\alpha$ emission. The mean spectra were obtained from merged and normalized spectral orders in the same fashion as described by \cite{2019MNRAS.485.1508S}. Fits were performed outside of $\pm 200$~km\,s$^{-1}$~i.e.\ excluding the rotationally broadened core of the primary. While the H$\alpha$ emission can extend out to $\pm$700~km\,s$^{-1}$, in the case of the low-emission mean spectrum the significant emission is contained within the $\pm$200~km\,s$^{-1}$~exclusion range, as can be verified from the residuals in Fig.\ \ref{logg}. Rotationally broadened synthetic spectra from the BSTAR2006 library were utilized for the fits, with $\chi^2$ minima being determined for 3 values of $T_{\rm eff}$~spanning the range of $T_{\rm eff}$~of the primary and secondary. Here we have made the assumption that a single-star model can yield reasonable results, given both the low amplitude of the RV variation and the similar $T_{\rm eff}$~of the two stars. As can be seen from Fig.\ \ref{logg}, H$\beta$ and H$\gamma$ return similar values for $\log{g}$, $3.68 \pm 0.22$ and $3.75 \pm 0.23$ (cgs) respectively.
We next performed a two-component fit to H$\beta$ accounting for the contributions and RV variation of both stars. Here the same method was adopted as by \cite{2019MNRAS.485.1508S}, with the radius of the secondary constrained by the orbital mass ratio and $\log{g}$. As before, only observations exhibiting minimal emission, confined to the central $\pm 200$~km\,s$^{-1}$~region of the line, were utilized, and this velocity range was excluded from the fit. The results are shown in Fig.\ \ref{w601_bin_logg_fit}, and are consistent with the single-component fit: $\log{g_{\rm A}} = 3.9^{+0.3}_{-0.1}$, and $\log{g_{\rm B}} = 3.9^{+0.5}_{-0.3}$.
\subsection{Fundamental Parameters and Evolutionary Status}
W\,601 has been reported as a pre-Main Sequence (PMS) star \citep{2008A&A...489..459M,2008A&A...481L..99A}. As its status as a classical Herbig Ae/Be star is doubtful due to the nature of its H$\alpha$ emission (see \S~\ref{sec:halpha_em} and \S~\ref{sec:rot_em}), it is not clear at this stage in the analysis whether the star is on the Main Sequence (MS) or the pre-MS, since its H$\alpha$ emission does not appear to be from an accretion disk. Here we seek to determine whether the star is on the PMS or on the MS. The low measured surface gravity is potentially consistent with two scenarios: either the stars are on the PMS, or the primary has evolved towards the terminal age MS (TAMS).
As a first step, it is necessary to know whether or not W\,601 is a member of the young NGC\,6611 cluster, since if it is a member this establishes an upper limit on the star's age, and additionally gives better constraints on the distance than are available from the Gaia parallax of the individual star. \cite{2018A&A...618A..93C} identified W\,601 as a member of NGC\,6611 with an 80\% probability using Gaia DR2 parallaxes and proper motions \citep{2018A&A...616A...1G}. The star's DR2 parallax and proper motions are furthemore below the 3 and 5$\sigma$ rejection thresholds used by \cite{2019ApJ...870...32K} to determine cluster membership (respectively, differing by about 2.3$\sigma$ and 2.8$\sigma$ from the mean cluster values, using the smaller cluster uncertainty). The Gaia early Data Release 3 parallax and proper motions of W\,601 are furthermore identical within uncertainty to the mean cluster values determined by \cite{2019ApJ...870...32K} on the basis of Gaia DR2 values. W\,601's systemic velocity, $v_0 = 11.4 \pm 0.2$~km\,s$^{-1}$, is also consistent with the mean cluster radial velocity of $10 \pm 8$~km\,s$^{-1}$~determined from the VLT-FLAMES survey by \cite{2005A&A...437..467E}. We conclude that W\,601 is very likely to be a member of NGC\,6611.
The mean Gaia parallax of the cluster is $\pi_{\rm cl} = 0.57 \pm 0.04$~mas, corresponding to a distance of $d = 1740^{+130}_{-120}$~pc \citep{2019ApJ...870...32K}. From isochrone fitting of the MS turnoff, the NGC\,6611 cluster is between 0 and 6 Myr in age according to \cite{1997A&AS..121..223D}, while \cite{2006A&A...457..265D} found an age of $3 \pm 1$~Myr using VLT-FLAMES data. \cite{1993AJ....106.1906H} found ages of 0.25 Myr to 1 Myr for young stellar objects (YSOs) below 8 M$_\odot$, and determined an average age of $2 \pm 1$~Myr for stars above 9 M$_\odot$. \cite{2018MNRAS.476.1213G} found the cluster's YSOs to be between 1 and 2.6 Myr. All studies seem to agree that the oldest stars in the cluster are no more than 6 Myr in age, and that the cluster also contains ongoing star formation.
Measurements of extinction in NGC\,6611 are widely variable across the region, ranging from $A_V =1.7$ to 7.2 \citep[e.g.][]{2006A&A...457..265D,2007A&A...462..245G,2018A&A...613A...9M}. There is furthermore evidence of a non-standard reddening law of between $R_V=3.5$ and 3.9 \citep[e.g.][]{1993AJ....106.1906H,2004MNRAS.353..991K,2007A&A...462..245G,2018A&A...613A...9M}. To constrain the extinction and reddening of W\,601, we utilized the star's $UBVJHK$ photometry \citep{2000A&A...355L..27H,2007AJ....133.1092W,cutri2003}, and de-reddened these using the {\sc idl} program {\sc fm\_unred.pro} \citep{1999ApJ...525.1011F}, with reddening $0 < E(B-V) < 1$ and reddening law $3 < R_V < 5$. The dereddened colours $U-B$, $B-V$, $V-J$, $V-H$ and $V-K$ were then compared to the intrinsic colours from the empirical PMS calibration determined by \cite{2013ApJS..208....9P}. The best match was obtained for $E(B-V) = 0.55$ and $R_V = 4.37$, yielding $A_V = 2.39$. The reddening law is steeper than obtained for other stars in the cluster, however fixing $R_V=3.5$ yields $E(B-V) = 0.68$, with $A_V$ almost unchanged. These results are consistent with those obtained by previous examinations of the star \citep[e.g.][]{2004MNRAS.353..991K,2006A&A...457..265D}.
In order to constrain the luminosity and the other fundamental stellar parameters, the binary Monte Carlo (MC) Hertzsprung-Russell Diagram (HRD) sampler described by \cite{2019MNRAS.488...64P} was utilized. This algorithm takes as priors the photometric properties of the system ($V$ magnitude, extinction, parallax), the orbital mass ratio (Table \ref{orbtab}), and the individual effective temperatures and surface gravities, and infers the luminosities, masses, ages, and radii via interpolation through evolutionary models under the assumption that the two components are coeval (but not interacting) \citep{1994MNRAS.271..999B}. Bolometric corrections for both stars were obtained from the calibration of \cite{nieva2013}. The $T_{\rm eff}$~$-\log{g}$ diagram is sampled with points drawn from gaussian distributions matching $T_{\rm eff}$~and $\log{g}$ values of the two stars, and are probabilistically rejected if the inferred mass ratio, absolute $V$ mag, and age differ from target values drawn from gaussian distributions with standard deviations set respectively by the measured uncertainty in the mass ratio, the combined uncertainty in distance modulus and extinction, and an arbitrary tolerance in $\log{t}$. The results are shown in Fig.\ \ref{physpar}, and the parameters are given in Table \ref{partab}.
\begin{figure*}
\centering
\includegraphics[width=18.5cm, trim = 50 20 0 0]{W601_lsd.eps}
\caption[]{LSD profiles. Each panel is labelled with HJD$-2453000$. Only LSD profiles yielding at least a marginal detection in Stokes $V$ are shown. In each panel, the full Stokes $I$ profile is shown with black lines. The disentangled Stokes $I$ profiles of W\,601\,A and B are respectively shown with dashed blue and solid red lines. Above Stokes $I$ is the Stokes $V$ profile. The shaded region indicates the mean uncertainty in Stokes $V$. Vertical dashed lines indicate the integration limits used for measuring the FAP and $\langle B_z \rangle$. Note that Stokes $V$ is confined within the line profile of the secondary, and tracks its RV variation. It is therefore the secondary that is the magnetic star.}
\label{W601_lsd}
\end{figure*}
We determined stellar parameters using two sets of evolutionary models, the rotating MS models published by \cite{ekstrom2012} (i.e., those with an initial rotation velocity of 0.4 of the critical value; bottom panels of Fig.\ \ref{physpar}), and the rotating PMS models developed by \cite{Haemmerle2019} (top panels of Fig.\ \ref{physpar}), both of them calculated using the Geneva 1D stellar evolution code. The MS models start at the ZAMS, whereas the PMS models start at the birthline. For the PMS models an age tolerance of $\log{t}=0.15$ was adopted for the MC sampling, in order to reflect the possibility that very young stars might not be perfectly coeval; for the MS models a tolerance of 0.05 was used, ensuring any accepted points would lie on the same isochrone.
PMS models yield an age of $\log{(t/{\rm yr})} = 5.6 \pm 0.1$, while the MS models yield an age of $\log{t} = 7.3 \pm 0.2$. Only the age derived from PMS evolutionary models is consistent with the 6 Myr ($\log{t} = 6.8$) upper limit on the cluster age.
The MS models predict that W\,601\,A has a larger radius than W\,601\,B, whereas the PMS models yield similar radii (compare the top and bottom right panels of Fig.\ \ref{physpar}). The ratio of radii from PMS MC parameter determination ($R_{\rm A}/R_{\rm B} = 1.2 \pm 0.3$) is consistent with results from spectral modelling ($R_{\rm A}/R_{\rm B} = 1.1 \pm 0.1$). Using MS models, the radii ratio is $R_{\rm A}/R_{\rm B} = 2.1 \pm 0.3$, which is not consistent with the spectroscopy.
While the MC sampler initially draws from distributions in $\log{g}$ and $T_{\rm eff}$~as determined from spectroscopic measurements, due to the various rejection criteria the posterior distributions of $\log{g}$ do not necessarily resemble the input distributions. MS models can only maintain coevality if $\log{g}_{\rm A} = 3.85 \pm 0.12$ and $\log{g}_{\rm S} = 4.24 \pm 0.02$, i.e.\ if the primary has evolved about halfway towards the TAMS, the secondary should still be very close to the zero-age MS (ZAMS). Conversely, PMS models yield $\log{g}_{\rm A} = 4.06 \pm 0.10$ and $\log{g}_{\rm B} = 3.86 \pm 0.18$. A comparison to the spectroscopic measurement of $\log{g}$ is provided on the $\chi^2$ map in Fig.\ \ref{w601_bin_logg_fit}. Both the MS and PMS results are consistent with the best-fit value within the 1$\sigma$ contours, although the PMS results are closest to the $\chi^2$ minima.
PMS models yield a better match to the measured surface gravities, radius ratio, and the age of the NGC\,6611 cluster. We therefore conclude that the scenario with the greatest consistency is that both components of W\,601 are still contracting towards the ZAMS. It is additionally notable that the H$\alpha$ line displays nebular emission (\S~\ref{sec:halpha_em}), suggesting the system is still partially embedded in the nebula.
As can be seen in the top panels of Fig.\ \ref{physpar}, PMS models indicate that the ages of W\,601\,A and B differ by about $\log{t} = 0.2$, or about 200 kyr at the inferred age of the system. Reducing the age tolerance does not change this result; in fact an age tolerance of $\log{t}=0.15$ is the minimum necessary to keep the rejection rate reasonably small. This may indicate that the two components are not precisely coeval, but that the primary formed before the secondary.
From the stellar masses, the MC parameter analysis additionally yields an orbital inclination $i_{\rm orb} = 31.5 \pm 0.9^\circ$ and thus a semi-major axis $a = 1.18 \pm 0.02$~AU.
\section{Magnetometry}\label{sec:magnetometry}
In order to increase the $S/N$ of the line profile from which the magnetic field is measured, Least Squares Deconvolution \citep[LSD;][]{d1997,koch2010} profiles were extracted from the ESPaDOnS spectra. We used a line mask obtained with an `extract stellar' request from the Vienna Atomic Line Database \citep[VALD3;][]{piskunov1995, ryabchikova1997, kupka1999, kupka2000,2015PhyS...90e4005R} for a 19 kK solar metallicity star, with $\log{g}=3.8$, and a line depth threshold of 0.1. The mask was cleaned in the usual fashion in order to remove contamination from H Balmer, telluric, and interstellar lines \cite[e.g.][]{2018MNRAS.475.5144S}. In addition to the intersellar Ca lines, W\,601's spectrum contains several Diffuse Interstellar Bands (DIBs) which were also removed from the line mask. DIBs were identified by eye, including but not necessarily limited to lines with approximate wavelengths of 472 nm, 476 nm, 496 nm, 523 nm, 540 nm, 541 nm, 549 nm, 551 nm, 554 nm, 578 nm, 579 nm, 585 nm, 661 nm, and 666 nm.
Due to the large $v \sin i$~and low $S/N$ of the data, He lines were left in the mask. The resulting LSD profiles were scaled to a line depth of 0.1, a mean wavelength of 500 nm, and a mean Land\'e factor of 1.2. To further increase the per-pixel $S/N$ a velocity pixel width of 7.2 km\,s$^{-1}$~was used. A Tikhonov regularization factor of 0.2 was employed in order to suppress noise arising from the deconvolution process \citep{koch2010}. Following extraction, the LSD profiles were iteratively disentangled using the same procedure as adopted in \S~\ref{sec:binary} \citep[e.g.][]{2006AA...448..283G}. The results are shown in Fig.\ \ref{W601_lsd}. The Zeeman signature is confined within the line profile of W\,601\,B, and tracks the radial velocity variation of this component; thus, it is W\,601\,B that hosts the magnetic field. Further magnetic analysis was therefore conducted using the disentangled Stokes $I$ profiles of W\,601\,B. Since the non-magnetic star only contributes noise to Stokes $V$, flux dilution does not affect magnetic measurements so long as the disentangled spectrum of the magnetic component is used \citep[see e.g.][]{2019MNRAS.489.5669P}.
Observations were classified as definite, marginal, or non-detections (DD, MD, or ND) according to the False Alarm Probabilities (FAPs) measured inside the line profile, using the method and criteria described by \cite{1992AA...265..669D,d1997}. The integration ranges used for measuring the FAP are shown in Fig.\ \ref{W601_lsd}, and detection flags for individual stars are given in Table \ref{obstab}. Of the 27 total observations, 18 yield DDs, 2 MDs, and 7 NDs. FAPs measured from the null $N$ spectra are uniformly non-detections.
We measured the strength of the magnetic field via the disk-averaged longitudinal magnetic field \citep[e.g.][]{mat1989,wade2000}, using the same integration ranges as used for measuring the FAP (i.e.\ about $\pm$120~km\,s$^{-1}$~centred on the RV of W\,601\,B). These measurements, as well as the $\langle N_z \rangle$~measurements obtained from the $N$ profiles, are given in Table \ref{obstab}.
While the $N$ profiles are all NDs, the $\langle N_z \rangle$~measurements show a systemetic bias towards negative values. Close examination revealed that several of the Stokes $V$ and $N$ continua of several of the observations are offset from the expected value of 0. This may be a consequence of the ratio of continuum flux in the two polarization beams changing as the retarder rotates \citep{2012A&A...538A.129B}, likely exacerbated by the low $S/N$ of the observations. Re-adjusting the continua of the LSD Stokes $V$ and $N$ profiles to null corrected this issue, yielding $\langle N_z \rangle$~scattered evenly about 0. The amplitude of $\langle B_z \rangle$~was slightly increased, although not outside of the error bars.
$\langle B_z \rangle$~ranges from about $-1$ to $+2$ kG, with a mean uncertainty of $360$ G. Even without knowing the rotation period or magnetic configuration, the maximum value of $\langle B_z \rangle$~indicates that the surface magnetic dipole strength $B_{\rm d}$ must be at least 7 kG (under the simplest assumption of a dipolar surface magnetic field, in which case the lower limit on $B_{\rm d}$ is about 3.5$\times$ the maximum value of $\langle B_z \rangle$). Since both positive and negative values of $\langle B_z \rangle$~are measured, both magnetic poles must come into view over the course of a rotational cycle.
\section{Line Profile Variability}\label{sec:halpha_em}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{W601_halpha_minmax.ps}
\caption[]{{\em Bottom}: H$\alpha$ profiles at minimum emission (grey) and maximum emission (black), with respective synthetic binary profiles (dashed blue, solid red). Dashed black vertical lines indicate $\pm$$v \sin i$~for W\,601\,B; dot-dashed blue vertical lines indicate $\pm$$R_{\rm K}$. The profiles have been shifted to the rest-frame of the secondary. The thin emission feature in the centre of the line is nebular emission. {\em Top}: Residual flux after subtracting synthetic from observed spectra. The double-humped emission, peaking at several times $v \sin i$, is a characteristic signature of a centrifugal magnetosphere. Note that the top axis is in units of stellar radii, reflecting the assumption that the emission is produced by magnetically confined material in corotation with the star.}
\label{W601_halpha_minmax}
\end{figure}
W\,601 was originally classified as a Herbig Be star on the basis of its youth and H$\alpha$ emission \citep{2008A&A...489..459M,2008A&A...481L..99A}. T Tauri stars and Herbig Ae/Be stars generally show variable emission in multiple lines, not only H$\alpha$ \citep{2011A&A...529A..34M}. The morphologies and variability patterns of the line emission of T Tauri stars are explained by the magnetospheric accretion model \citep{2007A&A...463.1017B}, in which the inner disk material is locked to and therefore in corotation with the star's magnetic field, leading to the formation of a gap between the photosphere and the inner rim of the disk. Linear H$\alpha$ spectropolarimetry confirms the existence of this gap in both T Tauri stars and Herbig Ae stars \citep{2005MNRAS.359.1049V}, and the line emission of at least one magnetic Herbig Ae star is consistent with magnetospheric accretion \citep{2016A&A...592A..50S}. However, the line emission of early-type Herbig Be stars is generally not consistent with magnetospheric accretion \citep{2011A&A...535A..99M,2020MNRAS.493..234W}, which is not surprising given the very low incidence of detected magnetic fields in this population.
The presence of a strong magnetic field and evidently rapid rotation may indicate that W\,601 may be the first Herbig Be star with H$\alpha$ emission consistent with magnetospheric accretion. However, the absence of the expected emission in other lines \citep{2011A&A...529A..34M} suggests that the star's H$\alpha$ profile may instead be consistent with an origin in a wind-fed `Centrifugal Magnetosphere' \citep[CM;][]{lb1978,petit2013}, since rapidly rotating, strongly magnetic early B-type stars almost invariably possess CMs detectable in H$\alpha$ \citep{2019MNRAS.490..274S}.
Inspection of the H$\alpha$ line indicates that the morphology of the H$\alpha$ emission is consistent with a CM, i.e.\ a double-humped emission profile with the peak emission occuring at velocities equal to several times the projected rotational velocity $v \sin i$, as can be seen in Fig.\ \ref{W601_halpha_minmax}. This shape arises due to rigid corotation of magnetically confined plasma with the photospheric magnetic field, which results in the confined plasma rotating at velocities that increase linearly with distance from the star. Beyond the Kepler corotation radius $R_{\rm K}$, centrifugal support is stronger than gravity and gravitational infall of the confined plasma is prevented \citep[e.g.][]{ud2008}. This leads to an accumulation of material above $R_{\rm K}$, and a cavity below $R_{\rm K}$, thereby giving rise to the double-humped morphology \citep[e.g.][]{town2005c}. A Keplerian disk seen edge-on can also produce a double-humped emission profile, however the crucial difference with $\sigma$ Ori E-type emission is that the emission of a Keplerian disk is confined inside $\pm$$v \sin i$.
To analyze the time variability of H$\alpha$ we measured its EWs. We utilized the individual Stokes $I$ spectra in order to maximize the size and time-resolution of the dataset (i.e.\ 108 spectra). EWs were measured in the red half of the line, from $+$$v \sin i$~to the red edge of emission at $+700$~km\,s$^{-1}$, and in the blue half of the line between the blue edge of emission at $-700$~km\,s$^{-1}$~and $-$$v \sin i$. The core of the line was excluded so as to avoid contaminating the measurements with nebular emission (Fig.\ \ref{W601_halpha_minmax}). To correct for the EW variation due to the radial velocity variations of the two components, for each spectrum we calculated synthetic binary spectra in the same fashion as was done for H$\beta$ in determining $\log{g}$ (Fig.\ \ref{w601_bin_logg_fit}), using the best-fit parameters for each star and a radius ratio of $R_{\rm A}/R_{\rm B} = 1.1$ as inferred from spectroscopic modelling (Fig.\ \ref{tlusty_fit}). The EWs of the model spectra were measured within the same integration ranges, and subtracted from the EWs of the data. These EWs are used to determine the rotational period below in \S~\ref{subsec:period_determination}. Line profile variations are examined in greater detail in the context of the magnetospheric analysis in \S~\ref{subsec:breakout}.
Magnetic hot stars typically have surface chemical abundance spots that lead to rotational modulation of EW measurements from photospheric line profiles. We examined the He~{\sc i}~667.8~nm, Si~{\sc iii}~455.4~nm, and C~{\sc ii}~426.7~nm lines, choosing these lines on the basis of being relatively strong and isolated. The EWs of these line were measured from individual Stokes $I$ subexposures across the full line width, as inferred by eye, with the individual spectra renormalized using a linear fit to adjacent continuum regions. There is no statistically significant variability in either Si~{\sc iii} or C~{\sc ii} (the reduced $\chi^2$ for the null assumption of no variation about the mean value being in both cases about unity). He~{\sc i}, however, exhibits statistically significant variation, and this line was also included in the period analysis in \S~\ref{subsec:period_determination}.
\section{Rotation}\label{sec:rot_em}
\subsection{Period determination}\label{subsec:period_determination}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{w601_bz_ew_periods.ps}
\caption[]{Periodograms for $\langle B_z \rangle$~(top) and H$\alpha$ EWs (bottom). Shaded regions indicate the physically plausible range of periods (see text). Periodograms are shown in black. The 3$\sigma$ noise level is shown by purple curves. The adopted rotation period is indicated with a solid red line. For the H$\alpha$ periodogram, red dashed lines indicate rotational harmonics. Grey periodograms are after pre-whitening with the rotation period (top) or the rotation period and its harmonics (bottom).}
\label{w601_bz_ew_periods}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{w601_halpha_bz.eps}
\caption[]{$\langle B_z \rangle$~(top), red H$\alpha$ emission EW (middle), and He~{\sc i}~667.8~nm EW (bottom), phased with the rotation period. Curves and grey shaded regions show harmonic fits to the data and 1$\sigma$ uncertainties. Solid and dashed vertical lines indicate magnetic extrema. EWs were obtained from individual Stokes $I$ sub-exposures. All data have been sigma-clipped to remove the noisiest observations. H$\alpha$ emission peaks occur at the extrema of $\langle B_z \rangle$, as expected for rotationally modulated magnetospheric emission.}
\label{w601_halpha_bz}
\end{figure}
Magnetic hot stars generally exhibit spectropolarimetric and spectroscopic variations modulated precisely by the rotation period, with no inter-cycle variations i.e.\ the variability is perfectly regular. Therefore, the rotation period can be determined independently using multiple diagnostics. The period analysis of individual diagnostics ($\langle B_z \rangle$, H$\alpha$ and He~{\sc i}~667.8 nm EWs) is described in the following, with 1.131805(6)~d from H$\alpha$ EWs being adopted as the most likely rotational period.
As a first attempt to determine the rotation period the $\langle B_z \rangle$~measurements were analyzed using {\sc period04}. The resulting periodogram is shown in the top panel of Fig.\ \ref{w601_bz_ew_periods}. The shaded region indicates the range of physically plausible rotation periods, with the lower bound set by the breakup velocity and the upper bound set by $R_*$ and $v \sin i$. Within this window, the highest peak is at 1.13980(3)~d (with the uncertainty in the least significant digit given in parentheses), with a $S/N$ of 9, i.e.\ the period is above the threshold of 4 usually adopted for formal significance \citep{1993A&A...271..482B,1997A&A...328..544K}. However, there are numerous other nearby peaks with a similar amplitude, and it is not possible to distinguish between them based purely on the coherence of the phase variation.
We also analyzed the EWs described in \S~\ref{sec:halpha_em} using {\sc period04}. The H$\alpha$ periodogram is shown in the bottom panel of Fig.\ \ref{w601_bz_ew_periods}. There is a single strong peak at about 1.15 d, consistent with the forest of peaks obtained for $\langle B_z \rangle$. However, the strongest signal is at 0.56589 d, very close to the first harmonic of the period identified in $\langle B_z \rangle$. This is typical of the double-wave EW variations produced by the CMs of stars in which both magnetic poles are visible during a rotation cycle, as is the case with W\,601\,B \citep[e.g.][]{lb1978,2020MNRAS.499.5379S}. Under the presumption that this is one-half of the true rotation period, we fit the period and this harmonic with {\sc period04} in order to obtain a period of 1.13179(1)~d. The $S/N$ of the rotational period and its first harmonic are respectively 7 and 12. If EWs measured from the red half of the line (\S~\ref{sec:halpha_em}) are analyzed in isolation -- where the emission strength is at a maximum and the amplitude of variation is the largest -- the respective $S/N$ of the rotation period and its first harmonic are 27 and 29, with $P_{\rm rot} = 1.131805(6)$~d. Analyzing the blue H$\alpha$ EWs in isolation does not yield useful results. The strongest peak in the periodogram is at about 0.558783(6)~d, qualitatively consistent although formally inconsistent with the first harmonic of the period obtained from the red EWs; however, the $S/N$ of this period is not high (5.6). We adopt the period obtained from the red EWs as the most precise, and the most likely to be correct.
For He~{\sc i}~667.8~nm, the strongest peak is at 1.09099(2) d. However, if the He~{\sc i} EWs are phased with the H$\alpha$ period, {\sc period04} returns a higher amplitude (0.006 nm vs.\ 0.005 nm) and a higher $S/N$ (11.5 vs.\ 9.8). Since H$\alpha$ yields a higher $S/N$, the slightly different period returned by He~{\sc i}~667.8~nm is probably a consequence of the lower $S/N$ of the variation of this line (the semi-amplitude of variation in this line being less than 3$\times$ the mean error bar).
\subsection{Rotational Modulation}\label{subsec:rotmod}
$\langle B_z \rangle$, H$\alpha$ EWs, and He~{\sc i}~667.8~nm EWs are shown phased with $P_{\rm rot}$ in Fig.\ \ref{w601_halpha_bz}, using $JD0 = 2453957.4(2)$ as determined by fitting a sinusoid to $\langle B_z \rangle$~and determining the $\langle B_z \rangle$~maximum one cycle before the first observation. The reduced $\chi^2$ of a first-order sinusoidal fit to $\langle B_z \rangle$~is 1.3, indicating that a sinusoid is a good fit and that $\langle B_z \rangle$~can therefore be reproduced by a simple tilted dipole, as is the case for most magnetic early-type stars \citep[e.g.][]{2018MNRAS.475.5144S,2019A&A...621A..47K}.
The He~{\sc i} EWs phase coherently with the rotational period (Fig.\ \ref{w601_halpha_bz}, bottom), with the extrema of the He~{\sc i} EW curve corresponding to the $\langle B_z \rangle$~extrema. The He variability pattern suggests that the strongest He abundance spot is at the negative magnetic pole. Coherent EW variation is notable in the case of a PMS star, as it suggests that surface chemical abundance patches form almost immediately in the photospheres of magnetic hot stars.
The rotational modulation of H$\alpha$ is examined in detail in \S~\ref{subsec:breakout}.
\begin{figure*}
\centering
\includegraphics[width=0.95\textwidth, trim = 100 50 100 50]{w601_lsd_fit.eps}
\caption[]{Observed LSD Stokes $V$ profiles (black circles) compared to synthetic Stokes $V$ profiles inferred from the $\langle B_z \rangle$~curve model (dashed blue) and from direct Bayesian modelling of Stokes $V$ (solid red). Rotational phases are indicated in boxes in the upper left corner of each panel. The bottom right panel shows the overplotted distenangled Stokes $I$ profiles of W\,601\,B, as compared to the synthetic Stokes $I$ profile (red line) used to model Stokes $V$. Neither model provides a fully satisfactorily reproduction of the Stokes $V$ variation.}
\label{lsd_fit}
\end{figure*}
\section{Magnetic modelling}\label{sec:orm}
\begin{table}
\centering
\caption[]{Rotational, magnetic, and magnetospheric parameters for W\,601\,B (see text for definitions.)}
\label{magtab}
\begin{tabular}{l c }
\hline\hline
Parameter & Value \\
\hline
$P_{\rm rot}~({\rm d})$ & $1.13178 \pm 0.00001$ \\
$T_0~({\rm HJD})$ & $2453957.4 \pm 0.2$ \\
$i_{\rm rot}~(^\circ)$ & $31^{+5}_{-3}$ \\
$v_{\rm eq}~({\rm kms})$ & $161^{+33}_{-9}$ \\
$W$ & $0.24^{+0.09}_{-0.01}$ \\
$R_{\rm p}/R_{\rm e}$ & $0.971^{+0.003}_{-0.03}$ \\
$R_{\rm K}~({\rm R_*})$ & $2.1^{+0.2}_{-0.2}$ \\
\hline
$B_0~({\rm kG})$ & $0.54 \pm 0.07$ \\
$B_1~({\rm kG})$ & $1.55 \pm 0.09$ \\
$\beta~(^\circ)$ & $79^{+1}_{-3}$ \\
$B_{\rm d}~({\rm kG})$ & $11^{+3}_{-1}$ \\
\hline
$\log{(\dot{M} / {\rm M_\odot / yr})}$ & $-9.5 \pm 0.1$ \\
$v_\infty~({\rm km/s})$ & $1120 \pm 60$ \\
$\log{\eta_*}$ & $6.0 \pm 0.2$ \\
$R_{\rm A}~({\rm R_*})$ & $31^{+5}_{-2}$ \\
$\log{R_{\rm A}/R_{\rm K}}$ & $1.2 \pm 0.1$ \\
$\log{(B_{\rm K} / {\rm G})}$ & $2.7 \pm 0.2$ \\
$\log{(\tau_{\rm J} / {\rm yr}})$ & $6^{+0.3}_{-0.1}$ \\
$\log{(t_{\rm S,max} / {\rm yr}})$ & $5.8^{+0.5}_{-0.1}$ \\
\hline\hline
\end{tabular}
\end{table}
The rotationally magnetic magnetic variability of hot stars is described using the Oblique Rotator Model \citep[ORM; e.g.][]{1950MNRAS.110..395S}, in which the sinusoidal variation in $\langle B_z \rangle$~of a dipolar magnetic field rotating in the plane of the sky is parameterized with the inclination $i_{\rm rot}$ of the rotational axis from the line of sight, the tilt angle $\beta$ of the magnetic axis from the rotational axis, and the strength of the magnetic dipole at the stellar surface $B_{\rm d}$.
To determine W\,601\,B's rotational, ORM, and magnetospheric parameters, we utilized the Monte Carlo (MC) Hertzsprung-Russell Diagram (HRD) sampler described by \cite{2019MNRAS.490..274S}. The MC sampler combines information about a star's observed atmospheric, magnetic, and rotational properties, together with ancillary information such as e.g.\ the age of its parent cluster, with evolutionary models in order to infer fundamental stellar parameters, Oblique Rotator Model (ORM) parameters, rotational parameters, and magnetospheric parameters. These are given in Table \ref{magtab}.
As inputs we used the stellar parameters obtained above (Fig.\ \ref{physpar}, Table \ref{partab}), the star's rotational period, and $v \sin i$~to obtain $i_{\rm rot} = 31^{\circ+5}_{-3}$. This is similar to the orbital axis inclination $i_{\rm orb} = 31.5 \pm 0.9^\circ$, i.e.\ the spin and orbital axes of the system are aligned or nearly aligned. The sinusoidal fitting parameters to $\langle B_z \rangle$~$=B_0 + B_1\sin{(\phi + \Phi)}$ are $B_0 = 540 \pm 70$~G, $B_1 = 1550 \pm 90$~G, and phase offset $\Phi = 1.67 \pm 0.09$~rad (from the model shown in the top panel of Fig.\ \ref{w601_halpha_bz}). From the geometrical relations given by \cite{preston1967,preston1974}, and with the maximum measured value of $\langle B_z \rangle$~being $\langle B_z \rangle$$_{\rm max} = 2509 \pm 327$~G, the magnetic axis obliquity angle is then $\beta = 79^{\circ+1}_{-3}$ and the surface magnetic dipole strength is $B_{\rm d} = 11^{+3}_{-1}$~kG \citep[using a linear limb darkening coefficient $\epsilon = 0.4$ from line-blanketed NLTE model spectra;][]{2016MNRAS.456.1294R}.
Another means of determining W\,601\,B's ORM parameters is via direct modelling of Stokes $V$ using a version of the Bayesian inference method described by \cite{petit2012a} modified to include rotational phase information. The results of this fit are shown compared to observations in Fig.\ \ref{lsd_fit}. Direct modelling of Stokes $V$ produces a best fit for $i_{\rm rot}=54^{+20^\circ}_{-5}$, $\beta=60^{+5^\circ}_{-10}$, and $B_{\rm d} = 6.2^{+0.8}_{-0.4}$~kG, where the uncertainties correspond to the 68.7\% credible regions. These values differ substantially from the values inferred from $\langle B_z \rangle$~and the stellar parameters, although values of $B_{\rm d}$ comparable to those inferred from $\langle B_z \rangle$~can be accommodated within the 95.4\% credible region. Note that, unlike $\langle B_z \rangle$~fitting, direct modelling of the Stokes $V$ profile does not constrain $i_{\rm rot}$ from $R_*$, $v \sin i$, and $P_{\rm rot}$. The smaller value of $B_{\rm d}$ found by modelling Stokes $V$ is due to the larger value of $i_{\rm rot}$: $i_{\rm rot} < 45^\circ$ is excluded by the Stokes $V$ fits, whereas $i_{\rm rot} > 30^\circ$ is excluded by the star's radius and rotational properties. The Stokes $V$ model and the $\langle B_z \rangle$~model agree well near magnetic maximum at phase 0. However, the $\langle B_z \rangle$~model predicts a crossover signature with a larger amplitude as the magnetic equator comes into view near phases 0.2 and 0.7. A possible reason for this discrepancy may be that, notwithstanding the reasonable fit of a dipole model to $\langle B_z \rangle$, the magnetic field is not purely dipolar but instead a `distorted dipole' \citep[the most common toplogy revealed by Zeeman Doppler Imaging;][]{2019A&A...621A..47K}. Supporting this supposition, neither set of ORM parameters provides a faithful reproduction of Stokes $V$ at all phases.
An alternative explanation for the tension between the ORM parameters inferred from $\langle B_z \rangle$~and those obtained via direct modelling of Stokes $V$ is systematic error in W\,601\,B's stellar parameters. If W\,601\,B is actually at the ZAMS, then assuming a mass of $5.7 \pm 0.3$~M$_\odot$~its minimum possible radius is $R_* = 2.9 \pm 0.1$. This results in $i = 44 \pm 3^\circ$, $\beta = 75 \pm 3^\circ$, and $B_{\rm d} = 7.9^{+1}_{-0.7}$~kG, very similar to the values found via modelling of Stokes $V$. However, this would require $\log{g} = 4.3$, in which case W\,601\,A would need to have a surface gravity of $3.7$ (left panel of Fig.\ \ref{w601_bin_logg_fit}). In this case, the age of the system would need to be about $\log{t} = 7.2$, which is much older than the NGC\,6611 cluster ($\log{t} \sim 6.75$). W\,601\,A would also have a much larger radius than W\,601\,B, which is inconsistent with spectroscopic modelling, which instead indicate their radii are almost identical.
\subsection{Magnetic Constraints on the Primary}\label{subsec:primmag}
The line profiles of the two stellar components are blended in all observations, making it difficult to constrain the magnetic properties of W\,601\,A. To do this, we subtracted the model fits to Stokes $V$ obtained via Bayesian inference (Fig.\ \ref{lsd_fit}) from the observed Stokes $V$ profiles, yielding composite LSD profiles consisting of the disentangled Stokes $I$ profiles of W\,601\,A and the residual Stokes $V$ profiles. We measured FAPs and $\langle B_z \rangle$~in the usual fashion, with an integration range of $\pm 220$~km\,s$^{-1}$ around the rest frame of W\,601\,A. All of the profiles are non-detections, indicating that, despite the imperfections in the fit to Stokes $V$, the residuals are not consistent with statistically significant departures from null polarization. The mean $\langle B_z \rangle$~error bar is 450 G, and the root-mean-square $\langle B_z \rangle$~is 365 G, further confirming that the Zeeman signature was successfully removed.
We then analyzed the profiles using the same Bayesian inference engine used to infer ORM parameters for W\,601\,B, with the difference that, since $P_{\rm rot}$ is unknown, rotational phase was treated as a nuisance parameter \citep{petit2012a}. The Stokes $V$ profiles yielded upper limits on $B_{\rm d}$ at 68.3\%, 95.4\%, 99.0\%, and 99.7\% credible regions of 306 G, 826 G, 1704 G, and 2832 G respectively. The corresponding upper limits obtained from $N$ are comparable, respectively 279 G, 779 G, 1590 G, and 2640 G.
Any possible magnetic field possessed by W\,601\,A is less than W\,601\,B's by a factor of at least 2 with 99.7\% credibilty. With 68.3\% credibility its magnetic field is less than 300 G, which is the approximate critical magnetic field strength necessary for the magnetic field to maintain stability against rotational or convective instabilities \citep{2007A&A...475.1053A,2019MNRAS.487.3904M,2020ApJ...900..113J}. Fossil magnetic fields weaker than 300 G are exceptionally uncommon \citep{2007A&A...475.1053A,2019MNRAS.483.3127S,2019MNRAS.490..274S}, and those magnetic fields that have been detected below this threshold are usually either in evolved stars \citep[e.g.][]{2015AA...574A..20F,2017MNRAS.471.1926N,2018MNRAS.475.1521M} or ultra-weak fields (on the order of $\sim 0.1 - 10$~G) as found in Vega \citep{2009AA...500L..41L,2010AA...523A..41P}, or in Am stars such as Sirius \citep{2011AA...532L..13P}, Alhena \citep{2016MNRAS.459L..81B,2020MNRAS.492.5794B}, and others. While no ultra-weak field has yet been detected in a B-type star, the similarly of the magnetic properties of A and B-type stars \citep{2019MNRAS.490..274S} suggests that the `magnetic desert' between the ultra-weak fields and fossil magnetic fields likely persists across the entire upper main sequence. Since the upper limit on W\,601\,A's magnetic field is comparable to the critical magnetic field strength, any potential magnetic field is likely to be on the order of a few tens of G or less.
\section{Discussion}\label{sec:discussion}
\subsection{Magnetosphere}\label{subsec:breakout}
\begin{figure}
\centering
\includegraphics[trim=50 50 50 50, width=.45\textwidth]{w601_halpha_dyn.ps}
\caption[]{H$\alpha$ dynamic spectrum. The top panel shows residual flux, shifted to the rest frame of W\,601\,B, folded with the rotational period, with intensity corresponding to the colour bar. The bottom panel shows the observed spectra (black) and an example synthetic spectrum (red). Residual flux was determined by subtracting synthetic binary spectra tailored to each observation. The vertical solid and dashed lines show $\pm v\sin{i} = \pm R_*$, and $\pm R_{\rm K}$, for W\,601\,B. The asymmetry in emission strength between red and blue emission bumps at phase 0 is likely indicative of a departure from a pure dipole. There is additionally no indication of eclipses in the core of the line.}
\label{W601_halpha}
\end{figure}
Rapidly rotating, strongly magnetic B-type stars frequently display $\sigma$ Ori E variability originating in circumstellar magnetospheres \citep{lb1978}. H$\alpha$ (Fig.\ \ref{w601_halpha_bz}, middle) shows a double-wave variation, with the strongest of the maxima corresponding to the $\langle B_z \rangle$~maximum and the weaker local maximum corresponding to the $\langle B_z \rangle$~minimum (vertical lines in Fig.\ \ref{w601_halpha_bz}). This double-wave EW variation is consistent with line formation within a Centrifugal Magnetosphere (CM) formed in a tilted dipole \citep{petit2013}. In such a case the CM is expected to be shaped like a warped disk, with the two densest regions at the intersections of the rotational and magnetic equators \citep[e.g.][]{town2005c}. When the magnetic pole is closest to the line of sight (i.e.\ at maximum $|\langle B_z \rangle|$), the projected area of the CM, and therefore the EW of H$\alpha$, is at a maximum. If the second magnetic pole is visible at some point during the rotation cycle, this should correspond to a secondary emission peak. This pattern is indeed observed in most CM host stars, the exceptions being those stars with very complex surface magnetic fields \citep{2020MNRAS.499.5379S}.
From the star's fundamental and atmospheric parameters, the \cite{vink2001} mass-loss recipe yields a mass-loss rate of $\log{\dot{M}} = -9.5 \pm 0.1~{\rm M_\odot / yr}$ and a wind terminal velocity of about $1000$~km\,s$^{-1}$. From Eqn.\ 7 in \cite{ud2002}, the wind magnetic confinement parameter (that is, the ratio of magnetic to kinetic energy density at the magnetic equator at the stellar surface) is $\log{\eta_*} = 6.0 \pm 0.2$; since $\eta_*$ is greater than unity the wind is magnetically confined. From Eqn.\ 9 in \cite{ud2008}, $\eta_*$ scales to an Alfv\'en radius (i.e.\ the maximum extent of magnetic confinement) of $R_{\rm A}$~$=32 \pm 4 R_*$.
The Lorentz force enforces corotation of magnetically confined plasma with the stellar magnetic field out to $R_{\rm A}$. A CM forms when the Kepler corotation radius $R_{\rm K}$, defined as the distance at which centrifugal and gravitational forces are balanced, is less than $R_{\rm A}$. The Kepler radius is obtained from the critical rotation parameter $W = v_{\rm orb}/v_{\rm eq} = 0.24^{+0.1}_{-0.01}$ via the scaling $R_{\rm K}/R_* = W^{-2/3}$, where $v_{\rm orb} = \sqrt{G M_*/R_*}$ is the orbital velocity i.e.\ the velocity required for a Keplerian orbit at the stellar equator \citep{ud2008}. The equatorial rotational velocity is $v_{\rm eq} = 161^{+32}_{-9}$~km\,s$^{-1}$, with a moderate oblateness ratio of the polar to equatorial radii of $R_{\rm p}/R_{\rm e} = 0.97 \pm 0.02$. The Kepler corotation radius is then $R_{\rm K} = 2.1 \pm 0.2~R_*$ \cite[using Eqn.\ 14 from][]{ud2008}. This is a similar Kepler radius to those seen for other H$\alpha$-bright CM host stars \citep{2019MNRAS.490..274S}. $R_{\rm K}$~is indicated in Fig.\ \ref{W601_halpha_minmax}: as expected, the strongest emission is above the Kepler radius. The ratio of $R_{\rm A}$~to $R_{\rm K}$~is $\log{(R_{\rm A}/R_{\rm K})}$~$=1.2 \pm 0.1$: not only is $R_{\rm A}$~significantly greater than $R_{\rm K}$, but $\log{(R_{\rm A}/R_{\rm K})}$~is well within the typical range for H$\alpha$-bright CM host stars \citep{2019MNRAS.490..274S}.
A dynamic spectrum of W\,601\,B's H$\alpha$ line is shown in Fig.\ \ref{W601_halpha}. This was created by subtracting the synthetic spectra used to correct the EWs for the RV variation of the two stars (\S~\ref{sec:halpha_em}, Fig.\ \ref{W601_halpha_minmax}) from the observed spectra, with the residual flux shifted to the rest frame of W\,601\,B. Due to the rigid rotation of the CM, there is a linear relationship between the projected distance from the star and velocity, i.e.\ $r/R_* = v_{\rm r}/v\sin{i}$ (where $v_{\rm r}$ is the line-of-sight velocity), as indicated on the top horizontal axis. At maximum emission, there are two emission bumps extending out to several stellar radii, with the strongest emission at about 3.8~$R_*$. These emission bumps move closer to the line centre as they weaken in strength, corresponding to the reduction of the projected areas of the clouds simultaneous with the reduction in their projected distance from the star. The secondary emission maximum at phase 0.5 has a similar extent in velocity space, but lower peak emission strength, indicating that the CM is more flattened in projection at this phase, which is consistent with the negative pole not coming as close to alignment with the line of sight.
There is stronger emission in the rotationally broadened core of the line around phases 0.25 and 0.75 than is present in this part of the line at other phases. There is nebular emission contaminating the very centre of the line (see also Fig.\ \ref{W601_halpha_minmax}), however this nebular emission is much narrower than signatures associated with the CM near phases 0.25 and 0.75. There are no enhanced absorption features in the line core at these phases, and therefore no evidence that the star is eclipsed by its CM \citep[as seen for $\sigma$ Ori, HR\,7355, or HD\,176582;][]{oks2012,rivi2013,bohl2011}. The presence or absence of eclipses is highly dependent on the magnetic geometry. No eclipses are expected if $i_{\rm rot} \le 35^\circ$ \citep{town2008}, as inferred from $\langle B_z \rangle$. On the other hand, the ORM parameters inferred from direct modelling of Stokes $V$ predict two prominent eclipses near phase 0.5 \citep{town2008}.
As noted in \S~\ref{sec:orm}, there is some suggestion that W\,601\,B's surface magnetic field is not purely dipolar. The strong red-blue asymmetry in the H$\alpha$ emission, especially prominent near phase 0.0 (Fig.\ \ref{W601_halpha}) can only be explained if the surface magnetic field is not a pure dipole.
\cite{2020MNRAS.499.5379S} and \cite{2020MNRAS.499.5366O} showed that the peak emission strength of stars with CMs is governed by centrifugal breakout, a magnetic reconnection mechanism whereby the magnetic field is overloaded by the wind-fed plasma and is explosively ejected away from the star \citep{ud2006,ud2008}. The greater the strength $B_{\rm K}$ of the magnetic field at the Kepler radius, the greater the density of plasma that the magnetosphere can hold, the more extensive the optically thick part of the H$\alpha$-emitting CM, and the stronger the emission. W\,601\,B's maximum emission strength is about 0.15 nm. W\,601\,B contributes about 33\% of the total light at H$\alpha$ (as determined from the two stars' radii and synthetic BSTAR2006 spectra for their respective atmospheric parameters), and this emission strength should therefore be scaled up by a factor of about 3, to a single-star emission strength of 0.45 nm. The strength of the equatorial magnetic field at W\,601\,B's Kepler radius is $\log{B_{\rm K}} = 2.7 \pm 0.2$, using the dipole strength inferred from $\langle B_z \rangle$. Utilizing the centrifugal breakout emission strength scaling law developed by \cite{2020MNRAS.499.5366O}, a star with this value of $B_{\rm K}$ and W\,601\,B's stellar and rotational parameters has an expected emission strength of $0.4 \pm 0.1$ nm, almost exactly the measured value. Notably, this emission strength puts W\,601\,B in the company of the CM host stars with the strongest H$\alpha$ emission \citep[namely $\sigma$ Ori E and HD\,345439;][]{2020MNRAS.499.5379S}. Using the dipole strength inferred from Stokes $V$ yields $\log{B_{\rm K}} = 2.65^{+0.13}_{-0.22}$ and an inferred emission equivalent width of about 0.2 to 0.3 nm, still amongst the strongest known.
The peak emission strength of W\,601\,B's CM occurs at about 3.8~$R_*$, which is about 1.8~$R_{\rm K}$. \cite{2020MNRAS.499.5379S} noted that $R_{\rm K}$~is systematically less than the radius of maximum emission, and the discrepancy between the radius of maximum emission and $R_{\rm K}$~is in this case at the top of the range found for their sample (see their Fig.\ 12). As discussed above in \S~\ref{sec:orm}, the conflict between ORM parameters inferred via modelling of $\langle B_z \rangle$~and via modelling of Stokes $V$ can be reconciled if the radius is smaller than was assumed when deriving ORM parameters from $\langle B_z \rangle$. This smaller radius also yields a larger Kepler radius, $R_{\rm K} = 2.80 \pm 0.03~R_*$. This is still only about 70\% of the radius of emission maximum, therefore adopting the minimum possible radius cannot resolve the discrepancy in the case of this star.
Binarity is unlikely to have any effect on W\,601\,B's H$\alpha$ magnetosphere. The periastron separation of the stars is about 0.9 AU (see Tables \ref{orbtab} and \ref{partab}), whereas the Alfv\'en radius of W\,601\,B is a maximum of 37 $R_*$ or, with $R_* = 4.4$~R$_\odot$, about 0.75 AU. W\,601\,A is thus outside of W\,601\,B's magnetosphere at all orbital phases. This argument is of course sensitive to the mass-loss rate prescription: the much lower \cite{krticka2014} mass-loss rates imply $R_{\rm A} = 62^{+22}_{-6}~R_*$, i.e.\ about $1.3^{+0.4}_{-0.1}$ AU, in which case W\,601\,A is inside the magnetosphere at essentially all orbital phases. In either case, however, W\,601\,A is very far from the distance of H$\alpha$ line formation, a maximum of $7 R_* = 0.15$~AU from W\,601\,B.
It is interesting to note that W\,601 emits gyrosynchrotron radiation \citep{2017MNRAS.465.2160K}, which is believed to be generated by electrons accelerated to relativistic energies within the middle magnetosphere current sheet just outside the Alfv\'en radius \citep{2004A&A...418..593T}. If W\,601\,B's current sheet extends far enough beyond $R_{\rm A}$~\citep[which is by no means excluded by the models developed by][]{2004A&A...418..593T}, it may be possible that W\,601\,A disrupts the current sheet during periastron passage. It would be of interest to obtain radio observations of this system at apastron and periastron, in order to look for such an effect.
\subsection{Rotational and Magnetic Evolution}\label{subsec:rotev}
Amongst the magnetic high-mass pre-main sequence stars, W\,601\,B has both the strongest magnetic field and one of the shortest rotation periods. Of the magnetic PMS stars noted in the introduction, the mean surface dipole strength is about 1.2 kG, and the strongest belongs to V\,380\,Ori \citep[with a strength of 2.2 kG;][]{2009MNRAS.400..354A}, while the measured rotation periods of other magnetic PMS hot stars range from 4 d to 40 d \citep{2009MNRAS.400..354A,2015A&A...584A..15J}. This makes W\,601\,B's rotational and magnetic evolution of some interest.
Main sequence magnetic hot stars experience simultaneous decline in surface magnetic field strength, due to a combination of magnetic flux conservation in an expanding atmosphere and magnetic flux decay, and rapid magnetic braking due to angular momentum loss \citep{ud2008,2019MNRAS.490..274S}. As a PMS star, W\,601\,B is still contracting towards the ZAMS. Therefore, flux conservation would imply that its surface magnetic field should grow stronger as the radius shrinks, while at the same time conservation of angular momentum would normally mean that the star should spin up. In this case, the current radius of about 4.4~R$_\odot$~should shrink to about 3.2 R$_\odot$~at the ZAMS. The total unsigned magnetic flux is $\Phi = B_{\rm d} R_*^2$, therefore if flux is conserved then the ZAMS field should increase to about $21^{+5}_{-2}$ kG. This is comparable to the top of the range of surface magnetic dipole strengths of magnetic early B-type stars seen close to the ZAMS \citep{2019MNRAS.490..274S}.
At the same time, conservation of angular momentum means that the star should spin up as it approaches the ZAMS. Under the assumption that angular momentum is conserved, the ZAMS equatorial rotational velocity should be $v_{\rm eq, ZAMS} = v_{\rm eq} R_* / R_{\rm ZAMS} = 250^{+46}_{-15}$~km\,s$^{-1}$, corresponding to a rotational period $P_{\rm rot,ZAMS} \sim 0.7$~d. This is similar to the two most rapidly rotating magnetic B-type stars known, HR\,5907 and HR\,7355 \citep{grun2012,rivi2013}, which have periods of about 0.5 d.
Angular momentum of course should not be conserved, since it is being lost via the magnetosphere. From Eqn.\ 20 in \cite{ud2009}, the spindown timescale $\tau_{\rm J}$ -- i.e.\ the e-folding timescale for the rotation parameter $W$ -- is $\log{(\tau_{\rm J} / {\rm yr})} = 5.9^{+0.3}_{-0.1}$ or between 700 kyr and 1.5 Myr, using the \cite{vink2001} mass-loss rates. If \cite{krticka2014} mass-loss rates are used instead, $\log{(\tau_{\rm J} / {\rm yr})} = 6.5^{+0.3}_{-0.1}$. Given the current age of the star it should reach the ZAMS in about 300~kyr, i.e.\ about half an e-folding timescale using Vink mass-loss, and much shorter than $\tau_{\rm J}$ using \citeauthor{krticka2014} mass-loss. As the star evolves towards the ZAMS, its rotational evolution should therefore be dominated by spin-up due to contraction.
We conducted an analysis of the rotational evolution of W\,601\,B using the 7 M$_\odot$~PMS \cite{Haemmerle2019} evolutionary track, simultaneously accounting for angular momentum loss via the magnetosphere, spin-up due to contraction towards the ZAMS, and the change in $B_{\rm d}$ due to flux conservation. The model had an initial dipole strength $B_{\rm d,init} = 11$~kG. We started the model at 4~R$_\odot$~(corresponding to an age of 400 kyr from the birthline), with $W = 0.3$ (corresponding to $P_{\rm rot} \sim 1.13$~d). The minimum rotation period in this case is achieved at 490 kyr, with $P_{\rm rot} \sim 0.55$~d; after this point magnetic braking dominates the rotational evolution. This corresponds to a spin-up of $-0.5$~s/yr. More accurate predictions of the spin-up rate may be provided by the development of a PMS extension of self-consistent stellar evolutionary models incporating fossil fields, similar to those presented by \cite{2020MNRAS.493..518K}.
Rotational evolution has been detected in several magnetic early-type stars. $\sigma$ Ori E is spinning down at a rate of about $+0.08$~s/yr, consistent with expectations from magnetic braking \citep{town2010}. HD\,37776 and CU\,Vir both exhibit complex patterns of cyclical spin-up and spin-down, \citep{miku2008,miku2011,2017ASPC..510..220M}, with typical period changes on the order of 0.6 s/yr and 0.1 s/yr, respectively. HD\,142990 is spinning up at a rate of about $-0.6$~s/yr \citep{2019MNRAS.486.5558S}. It is intriguing to note that both HD\,37776 and HD\,142990 are very young stars \citep{2019MNRAS.490..274S}, and their spin-up rates are comparable to that expected for W\,601\,B. While contraction towards the ZAMS cannot explain the cyclical nature of HD\,37776's period evolution, it may provide an explanation for that of HD\,142990. In all cases in which rotational evolution has been directly measured, the datasets have spanned about 30 years; it is therefore not yet possible to detect rotational evolution in W\,601\,B, since the dataset for this star is extends across only 7 years, with the majority of the data having been acquired over a 2-year time span.
\cite{2019MNRAS.490..274S} noted that ultra-slow rotators such as $\xi^1$ CMa \citep{2017MNRAS.471.2286S,2018MNRAS.478L..39S} are difficult to explain using standard magnetic braking theory. In particular, they are so slowly rotating that their rotation periods are even longer than can be explained by standard magnetic braking theory under the usual assumption of initially critical rotation \citep{ud2009,petit2013}. One possible explanation is that such stars lose a great deal of angular momentum on the PMS. Indeed, their initial critical rotation fraction at the ZAMS would need to already be very close to 0. So far no such magnetic PMS B-type stars have been found \citep[although the magnetic Herbig Ae star HD\,101412 is quite a slow rotator, with a period of 42~d;][]{2015A&A...584A..15J}. Instead, W\,601\,B is apparently a precursor of stars that arrive at the ZAMS as rapid rotators. However, at this point relatively few magnetic PMS hot stars are known; identifying a larger sample is crucial to determining whether there is indeed a sub-population of PMS slow rotators that can serve as the progenitors for stars such as $\xi^1$ CMa, or whether some additional braking mechanism is necessary to explain ultra-slow rotation.
\subsection{Implications for the origin of fossil magnetic fields}
Using the same 7 M$_\odot$~evolutionary track, once again assuming magnetic flux conservation and evolving back in time from W\,601\,B's current magnetic parameters, its surface magnetic dipole would have been at a minimum intensity of about 700 G approximately 140 kyr ago. Assuming the same $i_{\rm rot}$ and $\beta$ as presently, $B_{\rm d} = 700$~G would yield a maximum $\langle B_z \rangle$~of about 130 G. This is comparable to the typical $\langle B_z \rangle$~values observed by \cite{2019A&A...622A..72V} in their study of T-Tauri Stars (TTSs), Intermediate Mass T-Tauri Stars (IMTTSs), and Herbig Ae stars.
This surface dipole strength is also comparable to the mean surface magnetic field strengths of TTSs and IMTTSs, which range from a few hundred G to a few kG \citep{2007MNRAS.380.1297D, 2008MNRAS.386.1234D, 2010MNRAS.409.1347D, 2011MNRAS.417.1747D, 2011MNRAS.417..472D, 2013MNRAS.436..881D, 2015MNRAS.453.3706D, 2009MNRAS.398..189H, 2015A&A...580A..39K, 2017MNRAS.472.1716H, 2017A&A...608A..77L, 2017MNRAS.467.1342Y, 2020MNRAS.497..632L, 2013ApJ...765...11J}. The continuity in total unsigned magnetic flux between stars at various stages on the PMS and MS, and across a wide range of masses, is suggestive of a common origin of fossil magnetic fields in dynamo processes occurring early in the evolutionary process. A striking property of several studies of magnetic binaries is that the magnetic properties of the two stars are often remarkably different even when their masses and rotational properties are nearly identical. For stars with convective envelopes this manifests as one star having a globally organized poloidal field and the other a more tangled magnetic topology. This is so for both V1878\,Ori, and the MS M dwarf visual binary GJ65 A and B \citep{2017ApJ...835L...4K}. In the case of the B9\,V `identical twin' eclipsing binary HD\,62658, one of the two stars is a chemically peculiar Bp star with a strong magnetic field, while the other is a normal, non-magnetic B-type star \citep{2019MNRAS.490.4154S}. Another example is provided by the B2\,IV binary HD\,149277, with a mass ratio of 1.1, in which one component is a He-strong star with a surface dipole strength of several kG, and the other has no detectable magnetic field \citep{2016PhDT.......390S,2018MNRAS.481L..30G}. While the mass ratio of W\,601 is much larger than these systems, it follows the general pattern of one component hosting a very strong magnetic field, while the upper limit for the magnetic field of the other is comparable to the 300 G critical field strength and therefore probably on the order of a few G (\S~\ref{subsec:primmag}), and confirms that this pattern is established already on the PMS.
The existence of several close binaries containing a magnetic star poses a challenge to the scenario in which dynamos generated during binary mergers are the primary pathway to fossil magnetic fields \citep[e.g.][]{2019Natur.574..211S}, since mergers should not produce close binaries. \cite{2019MNRAS.490.4154S} suggested that the properties of the binaries above point to an alternative scenario. During the convective stage of the star's evolution, irrespective of rotational properties or stellar mass, the dynamo magnetic field spontaneously settles into one of two attractor states: a globally organized dipole, or a tangled topology. Both leave behind a fossil field when the star becomes fully radiative. However, weaker or more tangled fields rapidly decay under the influence of rotational or convective instabilities \citep[e.g.][]{2007A&A...475.1053A,2019MNRAS.487.3904M,2020ApJ...900..113J}. In the case of close binaries, flux decay is accelerated via tidally induced instabilities \citep{2019A&A...629A.142V}. The result is that, very shortly after the cessation of convective support for a dynamo, only the strongest and most organized magnetic fields survive, while the incidence of magnetic fields amongst close binary stars is decreased even further by the additional influence of tidal instabilities. The abrupt change in magnetic incidence from essentially 100\% to the canonical 10\% seen for MS hot stars is precisely what is seen at the boundary between stars with convective envelopes and fully radiative stars \citep{2019A&A...622A..72V}.
\subsection{Formation of surface chemical abundance peculiarities}\label{subsec:diffusion}
The existence of He spots on the surface of W\,601\,B, as inferred from the rotational modulation of the He~{\sc i} 667.8 nm line (Fig.\ \ref{w601_halpha_bz}), indicates that surface chemical abundances become established quite rapidly on the PMS following the formation of the radiative envelope. It is instructive in this regard to compare W\,601\,B with other magnetic hot stars on the PMS. HD\,72106\,A (B9p) is the magnetic primary of a PMS SB2 system, with a non-magnetic Herbig Ae companion \citep{2008CoSka..38..245F}. The primary, which is either just reaching or has just passed the ZAMS, already possesses strong chemical peculiarities, while the non-magnetic companion has normal chemical abundances. This is similar to the case of W\,601. By contrast, the magnetic Herbig Ae star HD\,190073 has normal chemical abundances \citep{2007A&A...462..293C,folsom2012}, while another magnetic Herbig Ae star, HD\,101412 \citep{2005A&A...442L..31W,2009A&A...502..283H}, is underabundant in some elements \citep{2010A&A...523A..65C,folsom2012}. The abundances of HD\,101412 appear to reflect those of its dust-depleted accreting material \citep{2015A&A...582L..10K}.
Notably, both HD\,190073 and HD\,101412 possess emission lines, which are most likely formed in accretion disks. HD\,72106\,A does not show Herbig emission, and while W\,601\,B is an H$\alpha$-bright star its emission originates in a CM and not an accretion disk. The scenario that emerges from this comparison is one in which magnetic hot stars that are still accreting possess surface abundances reflecting the accreting material. Once accretion ceases, diffusion in the magnetically stabilized radiative envelope leads to the rapid emergence of surface chemical peculiarities. Another interesting point of comparison is the PMS Am star Stock\,16\,12 \citep{2014MNRAS.442.3761N}. While Am stars do not possess strong magnetic fields, the existence of chemical peculiarities on a non-accreting PMS star is further evidence that these can form rapidly once accretion has ceased.
A possible contradiction to this scenario is V\,380\,Ori\,A, which shows both weak Bp-type chemical peculiarities \citep{folsom2012} and very strong Herbig-type H$\alpha$ emission. However, the secondary of this system is a chemically normal A-type star, which is much closer to the birthline, and it is very possible that the Herbig emission originates from this component.
Atomic diffusion in PMS stars was evaluated by \cite{2011A&A...526A..37V} in order to determine how quickly the Ap/Bp phenomenon can be established. They found that, so long as turbulence is suppressed, surface chemical abundance peculiarities can form within 20 to 2 Myr, with the timescale decreasing with increasing stellar mass. While the minimum timescale is significantly longer than the PMS lifetime of W\,601\,B, the models utilized by \cite{2011A&A...526A..37V} extended only up to 2.8 M$_\odot$, much lower than W\,601\,B's mass. Although models of higher-mass PMS stars are needed to explore the parameter space occupied by W\,601\,B, the trend of decreasing timescales with increasing mass suggests that the formation of chemical spots on W\,601\,B's surface within a few hundred kyr is probably not in conflict with our current understanding. It is worth noting that suppression of turbulence within subsurface opacity-bump convection zones is both expected \citep{2019MNRAS.487.3904M,2020ApJ...900..113J} and observed \citep{2013MNRAS.433.2497S} in strongly magnetic early-type stars, and that the criterion that turbulence be suppressed is therefore very likely to be fulfilled.
\section{Conclusions}\label{sec:conclusion}
We have analyzed a large spectropolarimetric dataset of the magnetic pre-Main Sequence (PMS) star W\,601. The system turns out to be a spectroscopic binary with a mass-ratio of 1.8 and an orbital period of about 110 d. Atmospheric parameters ($T_{\rm eff}$~and $\log{g}$) were determined for the two stars via spectroscopic analysis. The $T_{\rm eff}$~of the primary, W\,601\,A, is about 22 kK, consistent with previous determinations for this star; the secondary, W\,601\,B, is slightly cooler at about 19 kK. W\,601\,A has a mass of about 12 M$_\odot$, and W\,601\,B a mass of about 7 M$_\odot$.
Magnetic analysis reveals that the magnetic field belongs to W\,601\,B. The peak $\langle B_z \rangle$~measured from disentangled LSD profiles is about 2 kG.
W\,601 was originally classified as a Herbig Be star by \cite{2008A&A...481L..99A} due to its H$\alpha$ emission and mid-infrared excess. However, close examination of H$\alpha$ shows that it varies coherently with $\langle B_z \rangle$, and displays the typical features of a centrifugal magnetosphere. W\,601 is therefore not a classical Herbig Be star. However, both components have low surface gravities, around 3.8. Such a low $\log{g}$ indicates either that the two stars are very evolved (around 22 Myr old) or still contracting towards the main sequence. Only the latter hypothesis is consistent with W\,601's membership in the NGC\,6611 open cluster, which has a main-sequence turnoff age of 2 to 4 Myr reflecting the oldest populations in the cluster, but also contains ongoing star formation. Even if W\,601 is not a member of the cluster, if the stars are on the MS the low $\log{g}$ implies that W\,601\,A must be near the TAMS; given the mass ratio, W\,601\,B should still be near the ZAMS and have a much higher surface gravity than is consistent with the data. Spectroscopic modelling furthermore indicates that the two stars have similar radii, which again is only possible if they are still on the PMS. Therefore, while W\,601 is not a classical Herbig Be star, the orbital and spectoscopic properties of the system indicate that it is probably a PMS star as suggested by \cite{2008A&A...489..459M} and \cite{2008A&A...481L..99A}.
A rotational period of about 1.13~d was determined from H$\alpha$ and $\langle B_z \rangle$. Modelling of $\langle B_z \rangle$~using this period and W\,601\,B's stellar parameters yields $B_{\rm d} \sim 11$ kG. This makes W\,601\,B by far the most strongly magnetic of the known magnetic PMS stars. When the magnetic star's emission strength is corrected for dilution by the non-magnetic primary, W\,601\,B is also revealed to have H$\alpha$ emission comparable to the strongest seen in the population of CM host stars. This extremely strong emission is consistent with the star's rapid rotation, strong surface magnetic field, mass, and radius. Indeed, the star's emission strength is very close to the value predicted both by empirical \citep{2020MNRAS.499.5379S} and theoretical \citep{2020MNRAS.499.5366O} analyses of similar stars based on the centrifugal breakout mass balancing mechanism.
While $\langle B_z \rangle$~is consistent with a tilted dipole, Stokes $V$ is not satisfactorily reproduced by a purely dipolar model. Strong red-blue asymmetry in the H$\alpha$ emission is furthermore indicative that the surface magnetic field is not purely dipolar. This indicates that distortions to the magnetic dipole are already present on the PMS.
W\,601\,B is a He-strong star with weakly variable He lines, indicating that surface chemical abundance peculiarities are also already established on the PMS. We were unable to detect indications of significant departure from solar abundances in other spectroscopic lines, or statistically significant variability in the stronger metallic lines. This may indicate that the star is still in the process of forming its surface chemical abundance spots, and that so far only the He spots have become noticeable. On the other hand, the low $S/N$ of the data may simply make metallic abundance patches difficult to detect.
Extrapolation of W\,601\,B's magnetic and rotational properties as it contracts towards the ZAMS indicate that it should arrive on the MS with a surface dipole magnetic field strength of about 20 kG and a rotational period of about 0.6 d. Thus, when W\,601\,B arrives on the MS, it will have amongst the most extreme magnetic and rotational properties of any known magnetic hot star. W\,601\,B is therefore a precursor to objects such as $\sigma$ Ori E, HR\,5907, or HR\,7355. The expected rate of rotational spin-up, about $-0.5$ s/yr, is similar to the rate recently determined by \cite{2019MNRAS.486.5558S} for HD\,142990 and is in principle detectable if the star is monitored over the next ten or twenty years.
\section*{Acknowledgements}
The authors acknowledge the numerous helpful comments made by the referee, Dr.\ Gregory Herczeg, which have greatly improved the quality of this paper. This work is based on observations obtained at the Canada-France-Hawaii Telescope (CFHT) which is operated by the National Research Council of Canada, the Institut National des Sciences de l'Univers (INSU) of the Centre National de la Recherche Scientifique (CNRS) of France, and the University of Hawaii. The MiMeS collaboration acknowledges financial support from the Programme National de Physique Stellaire (PNPS) of INSU/CNRS. MES acknowledges financial support from the Annie Jump Cannon Fellowship, supported by the University of Delaware and endowed by the Mount Cuba Astronomical Observatory. EA acknowledges financial support from ‘Programme National de Physique Stellaire’ (PNPS) of CNRS/INSU (France). VP acknowledges support from the National Science Foundation under Grant No.\ 1747658. GAW acknowledges support from the Natural Sciences and Engineering Research Council (NSERC) of Canada in the form of a Discovery Grant.
\section*{Data Availability Statement}
Reduced ESPaDOnS spectra are available at the CFHT archive maintained by the CADC at \url{https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/}, where they can be found via standard stellar designations.
|
\section{Introduction and main results}
Fix $t\geq0.$ Let $\Omega_t$ be a bounded domain in $\mathbb R.$ Given $T>0.$ Set $\widehat{Q}_T=\Omega_t\times(0,T)$ and denote by $\widehat{\Sigma}_T$ the lateral boundary of $\widehat{Q}_T.$ Consider the following wave equation with a nonlinear dissipation in the non-cylindrical domain $\widehat{Q}_T:$
\begin{equation}\label{e1.1}
\left\{\begin{array}{ll}
u^{''}-\Delta u+au'+bu+\beta(t)|u|^\rho u=0& (x,t)\in \widehat{Q}_T,\\[2mm]
u=0 &(x,t)\in\widehat{\Sigma}_T,\\[2mm]
u(x,0)=u_0(x), \ u'(x,0)=u_1(x)&x\in\Omega_0,
\end{array}\right.
\end{equation}
where $(u_0, u_1)$ is any given initial couple, $(u, u')$ is the state variable and $a,b>0.$
In order to study the qualitative theory of (\ref{e1.1}), we need the following assumptions on the domain $\widehat{Q}_T:$
\medskip
\noindent (A1) $\alpha\in C^2[0,T]$ such that $\alpha(0)=1,$ $\alpha'(t)\geq0$ and $\sup\limits_{ t\in[0,T]}\alpha'(t)<1.$
\medskip
\noindent (A2) $\beta(t),\beta'(t)\geq0,$ $t\in[0,T]$ and $\beta'\in L^\infty(0,T).$
\medskip
\noindent (A3) if $n>2,$ then $\displaystyle0<\rho\leq\frac{2}{n-2};$ if $n=1$ or $n=2,$ then $0<\rho<\infty.$
\medskip
The wellposedness result for (\ref{e1.1}) is stated as follows:
\begin{theorem}\label{d1.2}Let $u_0\in H^2_0(0,1)$ and $u_1\in H^1_0(0,1).$ If assumptions (A1)-(A3) hold, then there exists a unique strong solution $u$ of problem (\ref{e1.1}) such that
$u\in L^\infty\big(0,T;H^1_0(\Omega_t)\cap H^2(\Omega_t)\big),$ $u_t\in L^\infty\big(0,T;H^1(\Omega_t)\big),$ $u_{tt}\in L^\infty\big(0,T;L^2(\Omega_t)\big),$
and
\begin{equation*}
\big(u^{''}-\Delta u+au'+bu+\beta(t)|u|^\rho u, \phi\big)(t)=0, \ a.e.\ t\in(0,T),
\end{equation*}
where $\phi(t)$ is an arbitrary function from $L^2(\mathbb R^1).$ In addition, $u(0)=u_0,$ $u_t(0)=u_1.$
\end{theorem}
The proof of Theorem \ref{d1.2} is quite similar to the proof of wellposedness results in \cite{fer}, so we omit it (but what we need to point out is that since the assumption (A2) is different from $\beta'\leq0,$ the result we obtained here just admits the solution to belong to $L^\infty\big(0,T;H^1_0(\Omega_t)\cap H^2(\Omega_t)\big),$ not to $L^\infty\big(0,\infty;H^1_0(\Omega_t)\cap H^2(\Omega_t)\big)$).
\begin{lemma}[\cite{Ma}]\label{}
Suppose that $\widehat{Q}_T$ has a regular lateral boundary $\widehat{\Sigma}_T.$ If $u\in C^1\big(\mathbb R; L^2(\Omega_t)\big),$ then we have
\begin{eqnarray*}
&&\frac{d}{dt}\int_{\Omega_t}u(x,t)dx=\int_{\Omega_t}\frac{d}{dt}u(x,t)dx+\int_{\Gamma_t}u(x,t)\dot{x}n_xd\sigma\\[2mm]
&&=\int_{\Omega_t}\frac{d}{dt}u(x,t)dx-\int_{\Gamma_t}u(x,t)n_td\sigma,
\end{eqnarray*}
where $\Gamma_t$ is the boundary of $\Omega_t,$ $\dot{x}$ is the velocity of $x\in\Gamma_t,$ and $n=(n_x,n_t)$ is the unit exterior normal to $\widehat{\Sigma}_T.$
Moreover, it was observed that for $u\in H^1(\widehat{Q}_T)$ with $u=0$ on $\widehat{\Sigma}_T$ (all tangential derivative of $u$ also vanishes on $\widehat{\Sigma}_T$), Consequently the full gradient of $u$ satisfies $\nabla_{x,t}u=(\partial_n u)n$ which implies that
\begin{equation*}
u_t=(\partial_n u) n_t \quad \mbox{and} \quad \nabla_xu=(\partial_n u) n_x.
\end{equation*}
\end{lemma}
The energy of system (\ref{e1.1}) $\mathscr{E}(t)$ is given by
\begin{equation*}
\mathscr{E}(t)= \int_{\Omega_t}\Big[\frac{1}{2}u_t^2(t)+\frac{1}{2}u_x^2(t)+\frac{1}{2}u^2(t)+\beta(t)\frac{1}{\rho+2}|u(t)|^{\rho+2}\Big]dx.
\end{equation*}
Then the main result of this paper is stated as follows.
\begin{theorem}\label{}
One can find $\lambda>0$ and $\beta(t)$ satisfying $\lambda(\rho+1)\beta(t)\geq\beta'(t),$ such that the inequality
\begin{equation}\label{e1}
\mathscr{E}(t)\leq C\mathscr{E}(0)\varphi^{-1}(t),
\end{equation}
hold, where $\varphi(t)$ is chosen by $\varphi(t)=e^{\lambda t},$ $C$ is some positive constant.
\end{theorem}
\noindent {\bf Proof.} Firstly, let $\varphi$ be a unknown continuous function. Secondly, Multiplying both sides of the first equation in (\ref{e1.1}) by $(u_t+\lambda u)\varphi(t),$ where $\lambda>0,$ and then integrating it on $(0,T)\times \Omega_t,$ we get
\begin{equation*}
\displaystyle \int^T_0\int_{\Omega_t} \big(u^{''}-\Delta u+au'+bu+\beta(t)|u|^\rho u\big)(u_t+\lambda u)\varphi(t)dxdt=0.
\end{equation*}
Calculating the above equality, we have
\begin{eqnarray}\label{e2}
\begin{array}{rl}
&\displaystyle\int^T_0\int_{\Omega_t}u^{''}(u_t+\lambda u)\varphi(t)dxdt\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\Big[\big(\frac{1}{2}u_t^2\varphi(t)\big)_t+\big(\lambda\varphi(t)uu_t\big)_t-\lambda\varphi(t)u_t^2-\lambda\varphi'(t)uu_t-\frac{1}{2}\varphi'(t)u_t^2\Big]dxdt\\[6mm]
=&\!\!\!\displaystyle\int_{\Omega_T}\big(\frac{1}{2}u_t^2(T)\varphi(T)+\lambda\varphi(T)u(T)u_t(T)\big)dx-\int_{\Omega_0}\big(\frac{1}{2}u_t^2(0)\varphi(0)+\lambda\varphi(0)u(0)u_t(0)\big)dx\\[6mm]
&\!\!\!+\displaystyle\int^T_0\int_{\Gamma_t}\frac{1}{2}u_t^2\varphi(t)n_td\sigma dt-\int^T_0\int_{\Omega_t}\big[\lambda\varphi(t)u_t^2+\lambda\varphi'(t)uu_t+\frac{1}{2}\varphi'(t)u_t^2\big]dxdt,
\end{array}
\end{eqnarray}
\medskip
\begin{eqnarray}\label{e3}
\begin{array}{rl}
&\displaystyle\int^T_0\int_{\Omega_t}-\Delta u(u_t+\lambda u)\varphi(t)dxdt\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\Big[\big(-u_xu_t\varphi(t)\big)_x+u_xu_{tx}\varphi(t)-\big(u_x\lambda u\varphi(t)\big)_x-\lambda\varphi(t)u_x^2dxdt\Big]\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\Big[\big(-u_xu_t\varphi(t)\big)_x+\big(\frac{1}{2}u_x^2\varphi(t)\big)_t-\frac{1}{2}\varphi'(t)u_x^2-\big(\lambda\varphi(t)uu_x\big)_x+\lambda\varphi(t)u_x^2\Big]dxdt\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\big(-u_xu_t\varphi(t)\big)_xdxdt+\int_{\Omega_T}\frac{1}{2}u_x^2(T)\varphi(T)dx-\int_{\Omega_0}\frac{1}{2}u_x^2(0)\varphi(0)dx\\[6mm]
&\!\!\!\displaystyle+\int^T_0\int_{\Gamma_t}\frac{1}{2}u_x^2\varphi(t)n_td\sigma dt-\int^T_0\int_{\Omega_t}\big[\frac{1}{2}\varphi'(t)u_x^2-\lambda\varphi(t)u_x^2\big]dxdt,
\end{array}
\end{eqnarray}
\medskip
\begin{equation}\label{e4}
\int^T_0\int_{\Omega_t} au'(u_t+\lambda u)\varphi(t)dxdt=\int^T_0\int_{\Omega_t}\big[a\varphi(t)u_t^2+a\lambda uu_t\varphi(t)\big]dxdt,
\end{equation}
\medskip
\begin{eqnarray}\label{e5}
\begin{array}{rl}
&\displaystyle\int^T_0\int_{\Omega_t}bu(u_t+\lambda u)\varphi(t)dxdt\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\big[buu_t\varphi(t)+b\lambda\varphi(t)u^2\big]dxdt\\[6mm]
=&\!\!\!\displaystyle\int^T_0\int_{\Omega_t}\Big[\big(\frac{1}{2}bu^2\varphi(t)\big)_t-\frac{b}{2}\varphi'(t)u^2+b\lambda\varphi(t)u^2\Big]dxdt\\[6mm]
=&\!\!\!\displaystyle\int_{\Omega_T}\frac{1}{2}b\varphi(T)u^2(T)dx-\int_{\Omega_0}\frac{1}{2}b\varphi(0)u^2(0)dx-\int^T_0\int_{\Omega_t}\big[\frac{b}{2}\varphi'(t)u^2-b\lambda\varphi(t)u^2\big]dxdt,
\end{array}
\end{eqnarray}
\medskip
\begin{eqnarray}\label{e6}
&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Omega_t}\beta(t)|u|^\rho u(u_t+\lambda u)\varphi(t)dxdt\notag\\[2mm]
=&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Omega_t}\Big[\beta(t)\big(\frac{1}{\rho+2}|u|^{\rho+2}\big)_t\varphi(t)+\lambda\beta(t)|u|^{\rho+2}\varphi(t)\Big]dxdt\notag\\[2mm]
=&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Omega_t}\Big(\frac{1}{\rho+2}|u|^{\rho+2}\beta(t)\varphi(t)\big)_t-\beta'(t)\varphi(t)\frac{1}{\rho+2}|u|^{\rho+2}-\beta(t)\varphi'(t)\frac{1}{\rho+2}|u|^{\rho+2}\Big]dxdt\notag\\[2mm]
&&\!\!\!\!\!\!\!\!+\int^T_0\int_{\Omega_t}\lambda\beta(t)|u|^{\rho+2}\varphi(t)dxdt\\[2mm]
=&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_T}\beta(T)\varphi(T)\frac{1}{\rho+2}|u(T)|^{\rho+2}dx-\int_{\Omega_0}\beta(0)\varphi(0)\frac{1}{\rho+2}|u(0)|^{\rho+2}dx\notag\\[2mm]
&&\!\!\!\!\!\!\!\!\displaystyle+\int^T_0\int_{\Omega_t}\big[\beta'(t)\varphi(t)\frac{1}{\rho+2}|u|^{\rho+2}+\beta(t)\varphi'(t)\frac{1}{\rho+2}|u|^{\rho+2}-\lambda\beta(t)|u|^{\rho+2}\varphi(t)\big]dxdt.\notag
\end{eqnarray}
\medskip
Adding (\ref{e2}) to (\ref{e6}), we obtain
\begin{eqnarray}\label{plu}
0=\!\!\!\!\!\!\!\!&&\displaystyle\int_{\Omega_T}\big(\frac{1}{2}u_t^2(T)\varphi(T)+\lambda\varphi(T)u(T)u_t(T)\big)dx-\int_{\Omega_0}\big(\frac{1}{2}u_t^2(0)\varphi(0)+\lambda\varphi(0)u(0)u_t(0)\big)dx\notag\\[3mm]
&&\displaystyle+\int^T_0\int_{\Gamma_t}\frac{1}{2}u_t^2\varphi(t)n_td\sigma dt-\int^T_0\int_{\Omega_t}\big[\lambda\varphi(t)u_t^2+\lambda\varphi'(t)uu_t+\frac{1}{2}\varphi'(t)u_t^2\big]dxdt\notag\\[3mm]
&&\displaystyle-\int^T_0\int_{\Omega_t}\big(u_xu_t\varphi(t)\big)_x dxdt+\int_{\Omega_T}\frac{1}{2}u_x^2(T)\varphi(T)dx-\int_{\Omega_0}\frac{1}{2}u_x^2(0)\varphi(0)dx\notag\\[3mm]
&&\displaystyle+\int^T_0\int_{\Gamma_t}\frac{1}{2}u_x^2\varphi(t)n_td\sigma dt-\int^T_0\int_{\Omega_t}\big[\frac{1}{2}\varphi'(t)u_x^2-\lambda\varphi(t)u_x^2\big]dxdt\notag\\[3mm]
&&\displaystyle +\int^T_0\int_{\Omega_t}\big[a\varphi(t)u_t^2+a\lambda uu_t\varphi(t)\big]dxdt\\[3mm]
&&\displaystyle+\int_{\Omega_T}\frac{1}{2}b\varphi(T)u^2(T)dx-\int_{\Omega_0}\frac{1}{2}b\varphi(0)u^2(0)dx-\int^T_0\int_{\Omega_t}\big[\frac{b}{2}\varphi'(t)u^2-b\lambda\varphi(t)u^2\big]dxdt\notag\\[3mm]
&&\displaystyle+\int_{\Omega_T}\beta(T)\varphi(T)\frac{1}{\rho+2}|u(T)|^{\rho+2}dx-\int_{\Omega_0}\beta(0)\varphi(0)\frac{1}{\rho+2}|u(0)|^{\rho+2}dx\notag\\[3mm]
&&\displaystyle+\int^T_0\int_{\Omega_t}\big[-\beta'(t)\varphi(t)\frac{1}{\rho+2}|u|^{\rho+2}-\beta(t)\varphi'(t)\frac{1}{\rho+2}|u|^{\rho+2}+\lambda\beta(t)|u|^{\rho+2}\varphi(t)\big]dxdt.\notag
\end{eqnarray}
Since the assumption (A1) means that
\medskip
\noindent (H1) The domain $\widehat{Q}_T$ is time-like, i.e., $|n_t|<|n_x|.$
\medskip
\noindent (H2) $\widehat{Q}_T$ is monotone increasing, i.e., $\Omega_t$ is expanding with respect to $t$ or $n_t\leq0.$
\begin{eqnarray*}
&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Gamma_t}\big[\frac{1}{2}u_t^2\varphi(t)n_t+\frac{1}{2}u_x^2\varphi(t)n_t\big]d\sigma dt-\int^T_0\int_{\Omega_t}\big(u_xu_t\varphi(t)\big)_xdxdt\\[3mm]
=&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Gamma_t}\big[\frac{1}{2}u_t^2\varphi(t)n_t+\frac{1}{2}u_x^2\varphi(t)n_t\big]d\sigma dt-\int^T_0\int_{\Gamma_t}u_xu_t\varphi(t)n_xd\sigma dt\\[3mm]
=&&\!\!\!\!\!\!\!\!\int^T_0\int_{\Gamma_t} \frac{1}{2}\varphi(t)|\partial_n u|^2(n_t^2-n_x^2) n_td\sigma dt\geq0.
\end{eqnarray*}
Furthermore, (\ref{plu}) yields
\begin{eqnarray}\label{ine}
&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_T}\Big[\frac{1}{2}u_t^2(T)+\lambda u(T)u_t(T)+\frac{1}{2}u_x^2(T)+\frac{1}{2}bu^2(T)+\beta(T)\frac{1}{\rho+2}|u(T)|^{\rho+2}\Big]\varphi(T)dx\notag\\[3mm]
\leq&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_0}\Big[\frac{1}{2}u_t^2(0)+\lambda u(0)u_t(0)+\frac{1}{2}u_x^2(0)+\frac{1}{2}bu^2(0)+\beta(0)\frac{1}{\rho+2}|u(0)|^{\rho+2}\Big]\varphi(0)dx\notag\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle+\int^T_0\int_{\Omega_t}\big[\lambda\varphi(t)u_t^2+\lambda\varphi'(t)uu_t+\frac{1}{2}\varphi'(t)u_t^2\big]dxdt+\int^T_0\int_{\Omega_t}\big[\frac{1}{2}\varphi'(t)u_x^2-\lambda\varphi(t)u_x^2\big]dxdt\notag\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle-\int^T_0\int_{\Omega_t}\big[a\varphi(t)u_t^2+a\lambda uu_t\varphi(t)\big]dxdt+\int^T_0\int_{\Omega_t}\big[\frac{b}{2}\varphi'(t)u^2-b\lambda\varphi(t)u^2\big]dxdt\notag\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle+\int^T_0\int_{\Omega_t}\big[\beta'(t)\varphi(t)\frac{1}{\rho+2}|u|^{\rho+2}+\beta(t)\varphi'(t)\frac{1}{\rho+2}|u|^{\rho+2}-\lambda\beta(t)|u|^{\rho+2}\varphi(t)\big]dxdt.
\end{eqnarray}
We can choose $\varphi(t)=e^{st},$ $s>0.$ In particular, let $\varphi(t)=e^{\lambda t}$ ($\lambda$ be small) and
\begin{eqnarray}\label{bet}
\lambda(\rho+1)\beta(t)\geq\beta'(t).
\end{eqnarray}
We can put
\begin{equation*}
\beta(t)=e^{\mu t} \quad \mbox{with} \quad \mu\leq\lambda(\rho+1),
\end{equation*}
or
\begin{equation*}
\beta(t)=a_nt^n+a_{n-1}t^{n-1}+\cdots+a_1t+a_0,
\end{equation*}
with $a_i>0 (i=0,\cdots,n)$ such that (\ref{bet}) holds.
\medskip
Then the last three terms of inequality (\ref{ine}) are negative. Hence, we deduce
\begin{eqnarray*}
&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_T}\Big[\frac{1}{2}u_t^2(T)+\lambda u(T)u_t(T)+\frac{1}{2}u_x^2(T)+\frac{1}{2}bu^2(T)+\beta(T)\frac{1}{\rho+2}|u(T)|^{\rho+2}\Big]\varphi(T)dx\\[3mm]
\leq&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_0}\Big[\frac{1}{2}u_t^2(0)+\lambda u(0)u_t(0)+\frac{1}{2}u_x^2(0)+\frac{1}{2}bu^2(0)+\beta(0)\frac{1}{\rho+2}|u(0)|^{\rho+2}\Big]\varphi(0)dx.
\end{eqnarray*}
From the above inequality, we finally derive
\begin{equation*}\label{con}
\mathscr{E}(t)\leq C\mathscr{E}(0)\varphi^{-1}(t),
\end{equation*}
for some constant $C>0.$
\signed {$\sqr69$}
\medskip
\begin{remark}
If $b=0$ in (\ref{e1.1}), then use the method before, (\ref{ine}) becomes
\begin{eqnarray*}
&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_T}\Big[\frac{1}{2}u_t^2(T)+\lambda u(T)u_t(T)+\frac{1}{2}u_x^2(T)+\beta(T)\frac{1}{\rho+2}|u(T)|^{\rho+2}\Big]\varphi(T)dx\\[3mm]
\leq&&\!\!\!\!\!\!\!\!\displaystyle\int_{\Omega_0}\Big[\frac{1}{2}u_t^2(0)+\lambda u(0)u_t(0)+\frac{1}{2}u_x^2(0)+\beta(0)\frac{1}{\rho+2}|u(0)|^{\rho+2}\Big]\varphi(0)dx\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle+\int^T_0\int_{\Omega_t}\big[\lambda\varphi(t)u_t^2+\lambda\varphi'(t)uu_t+\frac{1}{2}\varphi'(t)u_t^2\big]dxdt+\int^T_0\int_{\Omega_t}\big[\frac{1}{2}\varphi'(t)u_x^2-\lambda\varphi(t)u_x^2\big]dxdt\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle-\int^T_0\int_{\Omega_t}\big[a\varphi(t)u_t^2+a\lambda uu_t\varphi(t)\big]dxdt\\[3mm]
&&\!\!\!\!\!\!\!\!\displaystyle+\int^T_0\int_{\Omega_t}\big[\beta'(t)\varphi(t)\frac{1}{\rho+2}|u|^{\rho+2}+\beta(t)\varphi'(t)\frac{1}{\rho+2}|u|^{\rho+2}-\lambda\beta(t)|u|^{\rho+2}\varphi(t)\big]dxdt.\\[3mm]
\end{eqnarray*}
In this case, in order to absorb the mixed term $\int^T_0\int_{\Omega_t}a\lambda uu_t\varphi(t)dxdt,$ we must use poincar\'{e} inequality whose coefficients depend on geometry of the domain. That is
\begin{equation*}
\displaystyle \int_{\Omega_t} u^2(x,t)dx\leq |\Omega_t|^2\int_{\Omega_t} u_x^2(x,t)dx.
\end{equation*}
Thus
\begin{eqnarray*}
&&\displaystyle\int^T_0\int_{\Omega_t}a\lambda uu_t\varphi(t)dxdt\leq\int^T_0\int_{\Omega_t}\frac{1}{2}a\lambda^2 \varphi(t)u^2dxdt+\int^T_0\int_{\Omega_t}\frac{1}{2}a\varphi(t)u_t^2dxdt\\[3mm]
&&\leq\int^T_0\int_{\Omega_t}\frac{1}{2}a\lambda^2 |\Omega_t|^2\varphi(t)u_x^2dxdt+\int^T_0\int_{\Omega_t}\frac{1}{2}a\varphi(t)u_t^2dxdt.
\end{eqnarray*}
When $\alpha\in L^\infty(0,\infty),$ and there exist two bounded domains $\Omega_*, \Omega^* \subset\mathbb R^1$ such that $\Omega_*\subset\Omega_\tau\subset\Omega_t\subset\Omega^*, \forall\tau<t.$ Then we have $|\Omega_t|\leq|\Omega^*|,\forall t>0.$ Let $\displaystyle a\lambda|\Omega^*|^2<1.$ With a similar argument as before, we get
\begin{equation*}
\mathscr{E}(t)\leq C\mathscr{E}(0)\varphi^{-1}(t),\quad t>0,
\end{equation*}
for some constant $C>0.$
If non-cylindrical domains become unbounded in some $X_1$-direction of space, as the time $t$ goes to infinite, and are bounded in other $X_2$-direction of space. Since the projection of it in $X_2$-direction is a bounded open set, written as $w,$ then the Poincar\'{e} inequality in $X_2$-direction turns out
\begin{equation*}
\displaystyle \int_{\Omega_t} u^2(x,t)dx\leq C_{w}^2\int_{\Omega_t} |\nabla_{X_2}u(x,t)|^2dx\leq C_{w}^2\int_{\Omega_t}|\nabla u(x,t)|^2dx,\quad
\end{equation*}
where $C_{w}$ is the Poincar\'{e} constant.
\medskip
Therefore, the above conclusion is still valid for this case.
\end{remark}
\begin{remark}
For the case of domains becoming unbounded in every spatial direction, as the time $t$ goes to infinite, the condition $b\neq0$ is needed to make (\ref{e1}) true. Otherwise, for any given $T>0,$ let $\lambda=\lambda(T)$ (depending on time $T$) be small and then it follows that
\begin{equation*}
\mathscr{E}(t)\leq C\mathscr{E}(0)\varphi_T^{-1}(t),\quad 0<t<T,
\end{equation*}
where $\varphi_T^{-1}(t)=e^{-\lambda(T)t}.$
Since Poincar\'{e} inequality does not hold for a fixed number in any totally unbounded area, it seems difficult for us to get an estimate (\ref{e1}) without compensation ($b=0$) and this is also an open problem that has been mentioned in some literature such as \cite{ha}.
\end{remark}
|
\section{Introduction}
To facilitate applications like extended reality (XR) that demand high-throughput low-latency communication, networks of the future are expected to provide at least a 1000-fold increase in network throughput \cite{Qualcomm2013}.
Despite high sensitivity to blockages, millimeter wave (mmWave) and sub-THz bands will be exploited to attain throughput goals\cite{Jain2019}.
Massive multiple-input multiple-output (MIMO) enabled user-centric (UC) topology is proposed as an alternative to the cellular architecture\cite{Buzzi2017}.
Users in a UC network are simultaneously served with coherent transmissions made by multiple APs.
Since mmWave and THz communications rely mostly on line-of-sight (LOS) links, APs are needed to be densely deployed to ensure reliability.
However, all the APs might not be required all the time to provide a good quality of service\cite{VanChien2020}.
Therefore, maintaining a network with a large number of otherwise redundant APs causes considerably inefficient power usage.
The work in \cite{Nguyen2017, VanChien2020, Feng2017} present strategies to optimize the energy consumption of the network;
each user is only served by a sub-set of APs.
The network power consumption is minimized by optimizing the AP sub-set selection to meet a minimum user throughput requirement.
The functionality of the redundant APs is reduced and put into a low power consumption mode called the \textit{sleep-state}.
Although having the sleep-state improves energy efficiency, it compromises the agility of the network.
With highly dynamic mmWave channels, users may suddenly lose connections to some APs\cite{Jain2019}.
Furthermore, users may instantly need additional radio resources to begin or maintain high-throughput low-latency applications.
To maintain a consistent quality of service against the above-discussed scenarios and more, sleep-state APs are required to start contributing to the network capacity as soon as the normal functionality is restored.
However, the 5G IA system achieves synchronization and identifies beams to serve users using a lengthy exhaustive search-based beam-sweep which is performed in a dedicated time-slot in the radio frame \cite{3GPP_TR38}.
Since radio frames have to be synchronized between the APs to enable simultaneous user serving, a newly restored AP has to wait for the next common IA period to perform IA.
Hence, the 5G IA method adds two latency components: lengthy IA procedure and the wait for the next IA slot, leading to a compromise between energy efficiency and quality of service.
Therefore, with the 5G initial access (IA) procedure newly restored APs are unable to instantly contribute to the network.
Recently, a new wave of interest has surged in using machine learning (ML) in wireless communications \cite{ali2020white}.
Some ML methods can be applied to the IA problem.
For example, the work in \cite{Insaf2020} presents an ML-based approach for fast IA in ultra-dense UC systems.
Inspired by ML solutions, in this work we propose a novel deep contextual bandit (DCB) based neighbor-aided IA approach to avoid the compromise between energy efficiency and quality of service.
With this novel approach, a newly woken AP can instantaneously start serving the users irrespective of where the AP was restored in the radio frame.
The DCB model in each AP learns about the environment through the beam choices made by the neighboring APs.
Using this knowledge, the DCB model learns to map a given set of beam choices made by neighbors to one of its beams.
Strictly speaking, the DCB model takes the beam choice made by its neighboring APs to serve a user as the input and predicts the beam which it should select to serve the same user as the output.
The proposed method provides instantaneously beam selection for recently restored APs irrespective of the location at the radio frame.
Hence, the energy efficiency is enhanced by enabling the use of a sleeping mechanism for APs without incurring a latency penalty, and therefore, the network flexibility is not compromised.
The performance of this neighbor-aided IA system is evaluated using realistic scenarios generated using a ray-tracing tool.
Simulation results for the considered scenario show that the instantaneous predictions of the DCB model achieve 96\% of the best case signal-to-noise ratio (SNR) while maintaining a negligible latency.
The rest of this paper is organized as follows.
Section \ref{sec:sys_model} explains the system model used in this work and introduces the IA problem.
Section \ref{sec:p_approach} formally presents the proposed approach and provides a quick primer on DCB.
Section \ref{sec:sim} explains details about the simulations and presents numerical results and Section \ref{sec:conclution} concludes the paper.
\underline{Notations}: $(.)^T$, and $(.)^H$ denote transpose and Hermitian transpose, respectively.
$\mathcal{R}(\mathbf x)$ and $\mathcal{I}(\mathbf x)$ represents the real and imaginary parts of $\mathbf x$, respectively.
$||\mathbf x||$ and $|\mathbf x|$ denote the euclidean norm and cardinality of $ \mathbf x$, respectively.
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{explanation2.pdf}
\caption{The system model of a UC network where a subset of APs would simultaneously serve a single user\cite{Buzzi2017}.
APs can either operate as awake-state PAPs or as sleep-state SAPs. }
\label{fig:systemmodel}
\end{figure}
\section{System Model and Problem Formulation}
\label{sec:sys_model}
\subsection{System Model}
Consider a UC network with a set of $N$ densely deployed APs and one user as presented in Fig. \ref{fig:systemmodel}.
APs are equipped with uniform rectangular planar antenna arrays (URPA) with $M$ antenna-elements.
According to the UC architecture\cite{Buzzi2017}, the single antenna user is simultaneously served by multiple APs to ensure reliability and to maintain high throughput communication.
All APs are connected to their controlling entity, the central processing unit (CPU) via backhaul links.
To conserve energy APs can operate in two power consumption modes: the fully functional \textit{awake-state} and the reduced functionality power-saving \textit{sleep-state}\cite{Feng2017}.
APs in the awake-state and sleep-state are defined as primary APs (PAPs) and secondary APs (SAPs), respectively.
Only a subset of APs are maintained as PAPs; remaining APs are put to the sleep-state.
Each PAP periodically performs the 5G IA procedure using beam-sweeps to identify the user serving beam and to synchronize the network.
The mmWave channel is modeled with a clustered model\cite{Akdeniz2014}.
Each channel is generated using $K$ clusters which are made combining $Q$ paths characterized by path loss, fading, and array gain at the AP.
The subscript notations $k=1,\dots,K$ and $q=1,\dots,Q$ represent cluster and path index, respectively.
The channel from an AP to the user $\mathbf{h} \in \mathbf{C}^{1\times M}$ is presented as
\begin{equation}
\mathbf{h} = \frac{1}{\sqrt{Q}}\sum_{k=1}^{K} \sum_{q=1}^{Q} p_{k,q}r_{k,q}\mathbf{a}(\theta_{k,q},\phi_{k,q}),\label{eq:gkmn}
\end{equation}
where
$p_{k,q}\in \mathbf{C}$ and $r_{k,q} \in \mathbf{C}$ represent the path loss and small-scale fading gain, respectively, and
$\mathbf{a}(\theta_{k,q},\phi_{k,q}) \in \mathbf{C}^{1\times M}$ is the AP's array gain.
Here $\theta_{k,q}$ and $\phi_{k,q}$ are the azimuth and elevation angles of arrival at the AP, respectively.
The channels used in this work are generated using a ray-tracing tool called Wireless Insight\cite{REMCOM2017} to capture realistic mmWave behaviors.
Due to the cost and power consumption reasons, the authors in \cite{Jain2019} suggest using analog beamforming techniques for mmWave MIMO enabled APs.
Hence, this work considers analog beamforming which is implemented using an array of $M$ quantized phase shifters.
Beamforming codebook $\mathbf{F}$ is the finite set of $M$ beams generated using this arrangement and the $i$th beam $\mathbf{f_i} \in \mathbf{F}$ is $\frac{1}{\sqrt{M}} \left[ e^{j\Theta_{i,1}} \; \dots \;e^{j\Theta_{i,M}}\right] ^T$.
Here $\Theta_{i,m}$ is the phase shift added to the signal emitted from the $m$th antenna-element corresponding to the $i$th beam.
\subsection{Problem Formulation}
During IA, every AP has to identify the beam that maximizes the received SNR at the user.
The SNR component provided by the $n$th PAP to the user $\Gamma_n$ is expressed as
\begin{align}
\Gamma_n = \frac{P_{n}||\mathbf{h_n} \mathbf{b_n}||^2}{\sigma^2},
\end{align}
where
$P_{n}$ is the transmit power of $n$th PAP,
$\mathbf{h_n}$ is the channel $\mathbf{h}$ from $n$th PAP to the user,
$\mathbf{b_n}$ is the beam chosen by $n$th PAP to serve the user,
$\sigma^2$ is the noise power at the user, and
$\bar{N}$ is the number of PAPs serving the user.
The IA problem for the network is presented as
\begin{equation}
\begin{aligned}
\mathop{\operatorname {maximize} } _{\mathbf{B}} \quad & \sum_{n =1}^{\bar{N}} \Gamma_n&\\
\operatorname {subject \; to} \quad & \mathbf{b_n} \in \mathbf{F} & \forall n =1,\dots,\bar{N},
\end{aligned}
\label{eq:problem}
\end{equation}
where
$\mathbf{B}=\left[ \mathbf{b_1},...,\mathbf{b_{\bar{N}}}\right]$.
The 5G IA procedure solves \eqref{eq:problem} using a beam-sweep at each PAP.
Beam-sweeping is performed using sequential transmissions of all or part of the beams in $\mathbf{F}$ using orthogonal resources.
The user reports the best beam from each beam sweep to the corresponding AP.
Furthermore, 5G IA is performed in a dedicated time slot called physical broadcast channel (PBCH)\footnote{Commonly just one IA opportunity is allocated per radio frame\cite{3GPP_TR38}.}.
Since APs in the UC architecture perform cooperative simultaneous serving, PBCHs have to be synchronized between the APs.
When an SAP has been restored the problem formulation in \eqref{eq:problem} changes and the new problem is defined as
\begin{equation}
\begin{aligned}
\mathop{\operatorname {maximize} } _{\mathbf{B}, \mathbf{b_{0}}} \quad & \sum_{n =1}^{\bar{N}} \Gamma_n + \frac{P_{0}||\mathbf{h_0} \mathbf{b_0}||^2}{\sigma^2} &\\
\operatorname {subject \; to} \quad & \mathbf{b_n} \in \mathbf{F} & \forall n =0,\dots,\bar{N},
\end{aligned}
\label{eq:problem_new}
\end{equation}
where the familiar quantities with $0$th index correspond to the quantities of the newly restored AP.
With the 5G IA method, the newly restored AP has to wait till the next PBCH to perform IA.
Hence, although having a sleep-state improves energy efficiency, the use of conventional beam-sweep-based IA systems for this scenario introduces an additional latency component.
However, beam choices of PAPs, i.e., $\mathbf{B}$, were found when \eqref{eq:problem} was resolved using 5G IA during the previous PBCH.
This solution for $\mathbf{B}$ is valid for \eqref{eq:problem_new} since the next PBCH is yet to arrive.
Hence, finding just $\mathbf{b_0}$ is adequate to solve \eqref{eq:problem_new}.
The proposed approach solves \eqref{eq:problem_new} by predicting $\mathbf{b_0}$ for the newly restored AP with a DCB model which uses $\mathbf{B}$ and PAP location information $\mathbf{L}$ as inputs.
Since the proposed method avoids beam-sweeps, waiting for the next PBCH is not required, and therefore, $\mathbf{b_0}$ is solved instantly irrespective of the position in the radio frame.
Hence, the proposed method enables any recently restored AP to instantaneously supplement the throughput provided by the PAPs to a user.
With the IA-related latency component eradicated, the CPU is free to adjust the network capacity to satisfy user demands in an energy-efficient manner without compromising the quality of service.
\section{DCB based Neighbor-Aided Initial Access Approach}
\label{sec:p_approach}
\subsection{Proposed Approach}
The PAPs periodically share beam choices among the neighbors.
The CPU may utilize an algorithm similar to the work presented in \cite{VanChien2020, Nguyen2017, Feng2017} to determine which SAP to be restored.
In the proposed approach,
the restored AP approximates the achievable SNR for each $\mathbf{f_i}$ using the function $\mathbf{g}(\mathbf{L},\mathbf{B})$ which is defined as
\begin{equation}
\begin{aligned}
\mathbf{g}(\mathbf{L},\mathbf{B}): \left\lbrace \mathbf{L} \right\rbrace \times \left\lbrace \mathbf{B} \right\rbrace \rightarrow \left\lbrace \frac{P_{0}||\mathbf{h_0} \mathbf{f_i}||^2}{\sigma^2} \right\rbrace, \forall \mathbf{f_i} \in \mathbf{F},
\end{aligned}
\label{eq:g}
\end{equation}
where $\left\lbrace \mathbf{L} \right\rbrace$ and $\left\lbrace \mathbf{B} \right\rbrace$ represents the vector space containing all possibilities for $\mathbf{L}$ and $\mathbf{B}$, respectively.
The optimum beam is selected as $\mathbf{b_0}=\mathbf{f_{i^*}}$ where
\begin{equation}
\mathbf{i^*}=\mathop{\operatorname {argmax}} _{\mathbf{i}\in\left\lbrace 1,\dots |\mathbf{F}| \right\rbrace } \mathbf{g}(\mathbf{L},\mathbf{B}).
\label{eq:b_0}
\end{equation}
Nevertheless, practical deployment settings experience a plethora of phenomena such as the absence of LOS paths and shadowing among others which makes the mathematical characterization of $\mathbf{g}(\mathbf{L},\mathbf{B})$ complex.
Authors of \cite{Alrabeiah2020} use a DNN to approximate a similarly complex function which maps beams between sub-6 GHz and mmWave bands.
Inspired by this solution, $\mathbf{g}(\mathbf{L},\mathbf{B})$ in this work is approximated using a DNN based DCB black-box function approximator.
Each AP is equipped with a DCB model which explores the environment and learns $\mathbf{g}(\mathbf{L},\mathbf{B})$ for the respective AP.
\subsection{An Introduction to Deep Contextual Bandits (DCB)}
\label{sec:dcb}
The contextual bandit is a special instance of the reinforcement learning model called multi-arm bandits (MABs)\cite{Ali2019}.
Reinforcement learning architectures have a software entity called the agent in an environment.
The agent can interact with the environment by performing actions selected from the action-space that contains all possible actions.
Each action entails a numerical reward that judges the quality of the action.
The goal of the agent is to maximize the reward.
Over time, the agent discovers the best action which in the case of MAB is a constant.
However, problems in domains like wireless communication are dynamic in nature and may have different best actions depending on the circumstance.
In contextual bandits, the agent learns the best actions for a given context $\mathcal{X}$ which characterize the state of the environment;
in the MAB case, only one context exists and hence, the best action is a constant.
The agent can select an action by either referring to a simple context-action-reward table or using advanced algorithms like Thompson sampling\cite{THOMPSON1933}.
After receiving the reward for the performed action, the parameters of the selection mechanism are updated.
However, in problems where the context space is continuous and large, neither maintaining tables nor running these algorithms is feasible, and therefore, a deep neural network (DNN) is used to predict the reward for actions given $\mathcal{X}$ \cite{Mnih2015}.
Contextual bandit models with DNNs are called DCB.
The agent follows a decaying $\epsilon$-greedy exploration policy where the state-action-reward relationships are learned by exploring the environment by taking random actions with a probability of $\epsilon$.
Otherwise, the agent leverages the already acquired knowledge to choose actions to maximize reward.
Initially, $\epsilon$ is set to 1 and in every training episode, it decays by a factor of $\epsilon_{dec}$ until $\epsilon=\epsilon_{min}$.
Since the DNN has to cater to two types of inputs: location data from $\mathbf{L}$ and beam choices from $\mathbf{B}$, the context is ingested through two independent input layers.
Hence, the context is defined as
\begin{equation}
\mathcal{X} \coloneqq \left[
\begin{matrix}
\mathbf{L}\\
\left[\mathcal{R}\left( \mathbf{B}\right) , \mathcal{I}\left( \mathbf{B}\right) \right]
\end{matrix} \right].
\end{equation}
Most neural network tools only support real numbers, hence real and imaginary parts of $\mathbf{B}$ are split and concatenated.
The two rows of $\mathcal{X}$ corresponds to the two input layers of the DNN.
The outputs from these two input layers are concatenated and fed into the rest of the DNN.
The action-space of the agent corresponds to the beam codebook, hence each action represents a beam.
Ideally, the reward should only represent the throughput provided to the user by the AP using the beam choice made by the agent.
However, since multiple APs coherently serve the user, measuring individual contributions is not straightforward.
The reward $\alpha$ is defined as
\begin{equation}
\alpha \coloneqq \frac{ ||\mathbf{h_0}\mathbf{b_0}||^2}{\sigma^2} \times \dfrac{1}{||\mathbf{h_0}\mathbf{h_0}^H||^2}\label{eq:norm_reward}.
\end{equation}
The normalization with $||\mathbf{h_0}\mathbf{h_0}^H||^2$ term in eq. \eqref{eq:norm_reward} benchmarks the performance of the chosen beam against the theoretical optimum beam $\mathbf{h_0}^H$\cite{Goldsmith2005}.
Instantaneous $\mathbf{h_0}$ is approximated using the last available channel estimate $\mathbf{\tilde{h}_0}$ which is assumed to be in the same channel coherence interval with $\mathbf{h_0}$, and therefore, $\mathbf{h_0} \approx \mathbf{\tilde{h}_0}$.
The performance of the DCB agent is evaluated using regret $\delta$ that benchmarks the chosen action against the action which provides the highest reward $\alpha_{max}$.
In this work, $\delta$ is defined as
\begin{equation}
\delta \coloneqq \alpha_{max}-\alpha.
\end{equation}
\section{Simulations}
\label{sec:sim}
\subsection{Simulation Environment}
\begin{figure}[t]
\centering
\includegraphics[trim={0 9cm 0 8.5cm},clip,width=1\linewidth]{env.pdf}
\caption{The indoor office simulation environment.}
\label{fig:sim_env}
\end{figure}
The indoor office shown in Fig. \ref{fig:sim_env} is considered for the simulations.
An area of 60 m $\times$ 30 m is partitioned using dry-wall into smaller office spaces.
The ceiling and the floor are built with concrete.
This environment is modeled using ITU 60 GHz compliant material models provided with Wireless Insite ray-tracer\cite{REMCOM2017}.
A set of 6 APs is located 10 m apart in a grid formation centering the ceiling which is 2.6 m above the floor.
A grid of possible user locations is defined spanning the office area.
All AP and possible user locations are denoted in red and green color markings in Fig. \ref{fig:sim_env}.
A carrier frequency of 60 GHz and a channel bandwidth of 100 MHz is considered.
All APs are equipped with URPA antennas with 16 elements in the 4 $\times$ 4 configuration.
The gain and the noise figure of every antenna are set to 5 and 3 dB, receptively.
The transmit power of the APs, and the users are set to 20 and 5 dBm, respectively.
Each AP in the awake-state and sleep-state is assumed to consumes 1 W\cite{Feng2017} and 0.01 W, respectively.
The beam codebook is comprised of 16 beams.
A simulation round consists of 50,000 episodes.
At the beginning of each simulation round, a fixed number of PAPs are chosen at random.
The optimization of the PAP selection criterion is not considered since it is out of the scope of this work.
At each episode, the user is placed randomly in the grid of possible user locations.
The DNN of the DCB model has 3 hidden layers with each containing 100 neurons.
Input layer one intakes $\mathbf{L}$ where each entry is comprised of latitude and longitude value, and therefore, it has $2\times\bar{N}$ neurons.
Input layer two ingests $\mathbf{B}$ and it has $2\times M\times\bar{N}$ neurons.
The output layer contains $M$ neurons corresponding to $M$ beams (actions).
ReLu and Adam have been used as the layer activation function and the optimizer respectively.
Both dropout and learning rates are set to 0.01.
The performance of the proposed approach is analyzed in terms of regret, network capacity, and energy efficiency.
\subsection{Simulation Results}
\begin{figure}[t]
\centering
\includegraphics[width=1\linewidth]{regret3.pdf}
\caption{Regret incurred by the contextual bandit model during training.}
\label{fig:regret}
\end{figure}
To analyze regret, the DCB in a single SAP is trained in two scenarios where the number of PAPs is set to 4 and 5, respectively.
Fig. \ref{fig:regret} presents the regret incurred by the DCB agent over the training episodes.
Due to higher number of neighbor in the 5 PAP case, the DCB model has access to more information compared to the 4 PAP case.
Therefore, the DCB model in the 5 PAP case could learn faster and better compared to the 4 PAP case and results in a regret measure around 4\%.
In Fig. \ref{fig:scenario_all}, a scenario capturing system performance under changing user throughput demand is investigated.
Fig. \ref{fig:scenario} and \ref{fig:scenario_ee} present network capacity and energy efficiency, respectively.
Here the user requests for additional throughput at $t = 10$ ms.
The user is served by 5 and 6 APs to meet the throughput demand before and after the $t = 10$ ms mark, respectively.
The performance of the proposed approach is compared with several IA schemes:
sleep-state enabled conventional 5G IA, always-on approach, and ideal genie-aided system.
The ideal system knows the future demand and maintains the network capacity accordingly.
The always-on approach keeps all APs only in the awake-state.
Although always-on is robust against sudden changes in the user throughput demand, it has the least overall energy efficiency.
The user may need throughput at any point in the 10 ms long radio frame\cite{T.S.G.R.A.N.3GPP2020b}.
Assuming only one beam-sweeping slot is available per radio frame, the user experiences a latency of 5 ms on average to get additional throughput from the newly restored AP using 5G IA.
With a trained DCB model, the proposed approach enables the newly restored AP to performs IA instantaneously to start providing throughput with negligible processing delay.
The proposed approach and the 5G IA both have similar power consumption profiles since they both turn on the SAP at the same time.
Nevertheless, overall energy efficiency is higher in the proposed system compared to 5G IA since the proposed system enables the AP to contribute to the network instantaneously.
Although the analyzed case only has 5 PAPs and an SAP, the proposed method can be easily extended to other configurations.
\begin{figure*}
\centering
\begin{subfigure}[b]{0.49\linewidth}
\centering
\includegraphics[width=0.94\linewidth]{capacity.pdf}
\caption{Network capacity.}
\label{fig:scenario}
\end{subfigure}~
\hfill
\begin{subfigure}[b]{0.49\linewidth}
\centering
\includegraphics[width=1\linewidth]{ee.pdf}
\caption{Energy efficiency.}
\label{fig:scenario_ee}
\end{subfigure}
\caption{Performance of proposed method, conventional sleep-state enabled algorithm, always-on approach, and ideal genie-aided system under dynamic user throughput demand. Markers in these figures are used merely to differentiate between the plots, and hence, do not represent specific simulation points.}
\label{fig:scenario_all}
\end{figure*}
\section{Conclusion}
\label{sec:conclution}
In this paper, we have proposed a neighbor-aided approach based on DCB to provide instantaneous IA to APs waking up from a sleep mode. First, we have defined the function which maps beam choices made by the neighbors of an AP to its beam codebook. Then, we have used a deep learning-based contextual bandit approach to solve the IA mapping problem. Finally, we have carried out simulations using realistic channels generated using the Wireless Insight raytracing tool. The results show that the DCB model can successfully learn the mapping function and provide instantaneous IA. This work, therefore, presents a faster way to provide IA using neighbor information for APs in dense mmWave-based UC networks.
\bibliographystyle{IEEEtran}
|
\section{Motivation and Introduction}
\label{sec:introduction}
\noindent
Confining particles to a given spatial region opens the doorway for their controlled
preparation and processing. It allows for an efficient detection as
well as measurement of the properties and interactions of ensembles of particles.
This holds for a large variety of systems, including atoms and molecules as well as
larger clusters of particles or even, molecular motors, cells and bacteria.
Consequently a plethora of different possibilities
emerge to investigate the structure and dynamics of the constituents of matter, including
their response to external fields. In different fields of physics and chemistry confining
or trapping particles paves the way for e.g. high resolution spectroscopy of cold and
ultracold molecules \cite{Smith,Krems}, optical tweezer based manipulation of soft materials
\cite{Ho} and the exploration of ultracold quantum matter and Bose-Einstein condensates
\cite{Pethick}.
\noindent
The importance of the geometry of the external trapping potential becomes particularly
impactful in the case of ultracold quantum matter \cite{Metcalf,Grimm,Pethick}. Laser and evaporative cooling
in a trapping environment leads in the ultracold regime to the formation of degenerate atomic quantum gases.
The geometry of the external trapping potential created by inhomogeneous static electric and magnetic
and/or laser fields can nowadays be shaped almost arbitrarily ranging from box-like traps,
harmonic oscillator or double well confinement to periodic optical lattices.
These traps, in combination with the control of the interatomic interactions
\cite{Chin}, imprint and probe different properties of the correlated few- and many-particle systems
under investigation. A box-like trap allows to probe the physics, such as sound dispersion and
soliton formation \cite{Pethick,Frantzeskakis} or the probing of the equation of state
\cite{Moritz}, of a homogeneous systems. Harmonic and double well confinement allow to probe
the collective modes \cite{Pethick} and interaction-induced tunneling mechanisms \cite{Schmelcher1} as well
as tunneling and nonlinear self-trapping in a bosonic Josephson junction \cite{Oberthaler}.
On the other hand optical lattices represent a unique platform for exploring weakly
to strongly correlated many-body systems \cite{Bloch} with a plethora of quantum phases appearing
with increasing complexity, the paradigm being the superfluid Mott-insulator quantum phase transition
\cite{Greiner}. This way a close bridge is established between condensed matter systems and ultracold
quantum gases.
\noindent
In a different direction of research very recently there has been some first explorations of so-called
superexponential systems \cite{Schmelcher2,Schmelcher3,Schmelcher4,Schmelcher5}.
These are model systems where the underlying exponential potential exhibits a spatial
dependence for both the base and the exponent. A prototype potential is ${\cal{V}} = |q_1|^{q_2}$ where
$q_1$ and $q_2$ are the coordinates of particles. In spite of its simple appearance
such a two-body potential leads to a rich geometrical structure. Changing the exponent
degree of freedom $q_2$ from $-\infty$ to $+\infty$ one encounters a power law confining channel for $q_2>0$
with a continuously changing value for the power that transits via two saddle points to a
region of asymptotically free motion \cite{Schmelcher2}. The resulting scattering dynamics
reflects this transition with increasing energy. In the many-body case
multiple backscattering and recollision events due to an intermittent behaviour in the
saddle point regime have been observed \cite{Schmelcher3}. For the case of only a single
degree of freedom $q$ the very peculiar properties of the so-called self-interacting
superexponential oscillator (SSO) with the potential ${\cal{V}} = |q|^q$ have been analyzed
\cite{Schmelcher4}. In contrast to the (an-)harmonic oscillator the SSO shows an exponentially
varying nonlinearity. Its potential exhibits a transition point with a hierarchy
of singularities of logarithmic and power law character leaving their fingerprints
in the agglomeration of its phase space curves. As a consequence the period of the
SSO undergoes a crossover from decreasing linear to a nonlinearly increasing
behaviour with increasing energy. The quantum SSO shows some remarkable spectral and eigenstate
properties according to the quantum signatures of this classical transition \cite{Schmelcher5}.
The ground state undergoes a metamorphosis of decentering, squeezing and the emergence of a tail.
For energies below the transition point a scaling behaviour in the spectrum was detected
for large amplitudes of the SSO.
\noindent
While the above-discussed features of superexponential systems demonstrate
novel structures and dynamics, the question arises what interesting spectral features
do exist for superexponential quantum systems beyond the quantum SSO. To address this question
we focus in the present work on confining superexponential potentials in a single spatial
dimension. We will analyze the spectrum and eigenstate properties for a wide range of excitations
for several geometrically appealing potential landscapes. We derive scaling properties of the
eigenvalues of these highly nonlinear potentials and analyze as well as characterize the 'dynamics' of the eigenvalue
spacings with increasing degree of excitation. In particular we demonstrate that confining
oscillatory superexponential potentials exhibit interspersed localized and delocalized states.
The localized states occur in doublets which represent energetically near degenerate pairs of eigenstates
that live in one of the outer wells of the superexponential potential. The two partners
of these doublets possess opposite parity. Even if the parity symmetry is broken and consequently
the near degeneracy is lifted by inducing a corresponding phase shift of the potential
the localization is still maintained and the corresponding eigenstates are exclusively left or
right localized. Based on the above spectral features we provide a discussion of future perspectives
and possible applications of confining superexponential potentials.
\noindent
This work is organized as follows. In section \ref{sec:qsso} we explore the spectral properties
of the SSO with varying amplitude. Section \ref{sec:rsso} contains a spectral analysis of a symmetrized
version of the SSO. The power law enhanced SSO is addressed in section \ref{sec:psso}.
Oscillating power potentials are explored and analyzed in the following section \ref{sec:opp}
where we start with the sublinear case for specific phases. The eigenvalue spectrum for arbitrary phases
is discussed and we demonstrate the symmetry breaking process. Finally we show spectral results for the
quadratic and briefly for the quartic case. Section \ref{sec:concl} contains our conclusions and an outlook
including future perspectives.
\section{Quantum SSO with varying amplitude}
\label{sec:qsso}
\noindent
As a first step in our investigation of the spectral properties and structure of confining superexponential
potentials let us briefly address the quantum SSO with varying amplitude $\alpha$. The quantum SSO has been
investigated in quite some detail in ref.\cite{Schmelcher5} but with a focus on very large amplitudes. Therefore,
we provide here, as a piece of complementary information, the spectral behaviour also for intermediate and small
amplitudes. The Hamiltonian reads
\begin{equation}
{\cal{H}} = \frac{p^2}{2m} + \alpha |q|^q
\end{equation}
\noindent
and we assume, without loss of generality,
in the following $\hbar=m=1$ while varying the amplitude $\alpha$. The potential ${\cal{V}}= \alpha |q|^q$
is highly nonlinear and asymmetric and its potential well possesses no reflection symmetry around its minimum
(see inset of Figure \ref{Fig1} for the shifted potential well as discussed below). The minimum and maximum are located
at $q_{min}= \left( \frac{1}{e} \right)$ with ${\cal{V}}(q_{min})=e^{-\frac{1}{e}}$ and at
$q_{max}= \left(- \frac{1}{e} \right)$ with ${\cal{V}}(q_{max})=e^{\frac{1}{e}}$, respectively. Half way between
the minimum and the maximum a transition point occurs at $q=0$ (see ref. \cite{Schmelcher5} for details)
where all derivatives of ${\cal{V}}$ are singular. Shifting the potential energy and the position
in coordinate space of the minimum to zero yields the shifted SSO potential
\begin{equation}
{\cal{V}}_{sh}(q) = \alpha \left( |q+e^{-1}|^{q+e^{-1}} - e^{-e^{-1}} \right)
\end{equation}
\noindent
We focus in this work on the eigenstates and eigenenergies being solutions to the corresponding
stationary Schr\"odinger equation (SEQ) ${\cal{H}} \psi_n = E_n \psi_n$. A few comments concerning our numerical
approach to solve the SEQ are in order.
To obtain the eigenvalues and eigenstates of the SEQ for several hundred
excited eigenstates we use an eighth order finite difference discretization scheme of space \cite{Groenenboom}.
Determining the eigenvalues and eigenvectors then corresponds to the diagonalization of the resulting
Hamiltonian band matrix.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig1.jpg}
\caption{The scaled spacing $\frac{\Delta E_{n+1}}{\Delta E_n}$ of the eigenenergies of the SSO with varying
excitation label $n$ for different values of the amplitude $\alpha$: From top to bottom
we have $\alpha=10^3, 4 \cdot 10^3, 10^4, 10^5$. Inset: the spatially and energetically shifted SSO potential
well as given in the text for $\alpha = 10^3$; the dashed line indicates the energy of the transition point.}
\label{Fig1}
\end{figure}
\noindent
We concentrate on the spectral properties below the transition point energy (see inset of Figure \ref{Fig1})
which exhibits an intriguing scaling behaviour as we shall see below. Figure \ref{Fig1} shows the scaled
spacing $\Delta R_n=\frac{\Delta E_{n+1}}{\Delta E_n}$, with $\Delta E_n = E_n - E_{n-1}$ being the difference of the
eigenenergies of the $n-$th and the $n-1$st eigenstates, as a function of the degree of excitation
for varying amplitude $\alpha$ of the SSO.
First of all one observes that the values of the scaled spacing are always close to one, varying only by
a few percent around one. For the case $\alpha = 10^3$ with increasing degree of excitation the scaled spacing
monotonically decreases ranging for low excitations in the vicinity of $1.03$ and for states close
to the transition energy around $1.01$. For larger values of $\alpha$ a plateau emerges with approximately constant
values for $\Delta R$ with $\Delta R = 1.015, 1.01, 1.003$ for $\alpha = 4 \cdot 10^3, 10^4, 10^5$, respectively.
This clearly indicates that there is a scaling property of the eigenvalue spectrum in the well of the SSO,
and the scaling factor decreases towards the value one with increasing amplitude $\alpha$ of the SSO.
The constancy of this scaling over a broad range of the spectrum is a remarkable property of the SSO.
\noindent
A natural modification of the SSO potential is the skewed superexponential oscillator with the potential
${\cal{V}}_{sk} (q) = \alpha |\beta q|^{\gamma q}$. We remark that this skewed oscillator shows similar
spectral properties as compared to the original SSO, and we therefore refrain from discussing it separately.
\section{The right-symmetrized SSO}
\label{sec:rsso}
\noindent
A modification of the SSO, which introduces new properties into the spectrum, is obtained if we simply mirror the
right half of the SSO potential well to the left and obtain in this way a reflection symmetry potential
well. This is the so-called right-symmetrized SSO. Shifting it to zero energy and to the minimum position
at the origin one obtains
\begin{equation}
{\cal{V}}_{rso} (q) = \alpha \left( \left(q_m + |q| \right)^{\left(q_m + |q| \right)} - q_m^{q_m} \right)
\end{equation}
\noindent
where $q_m=e^{-1}$. The potential well of the right-symmetrized SSO is shown in the inset of Figure \ref{Fig2}
for $\alpha =10^3$.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig2.jpg}
\caption{The scaled spacing $\Delta R_n=\frac{\Delta E_{n+1}}{\Delta E_n}$ of the eigenenergies of the right-symmetrized SSO with varying
excitation label $n$ for different values of the amplitude $\alpha$: From top to bottom
we have $\alpha=1, 10, 10^3, 10^4, 10^6$. Inset: the potential ${\cal{V}}_{rso}$ of the right-symmetrized SSO
as given in the text for $\alpha = 10^3$.}
\label{Fig2}
\end{figure}
\noindent
Figure \ref{Fig2} shows the scaled spacing $\Delta R_n$ of the eigenenergies of the right-symmetrized
SSO as a function of the degree of excitation $n$ for varying amplitude $\alpha$ of the SSO. It shows
a smooth approach with (in magnitude)
monotonically decreasing slopes for the different values of $\alpha$ towards the asymptotics.
For small values of $\alpha$, namely $\alpha = 1,10$, $\Delta R_n$ is larger than the value one and
decreases monotonically with increasing $n$ towards the values one. Opposite to this, for $\alpha = 10^6$
$\Delta R_n$ is always less than one and increases monotonically towards one. For the intermediate cases
$\alpha = 10^3, 10^4$, $\Delta R_n$ increases with increasing $n$ from values smaller than one, then passes
the threshold value of one and increases further. Subsequently (barely visible in Figure \ref{Fig2}) it reaches
a maximum (e.g. $n=18$ for $\alpha = 10^3$) and decreases towards the value one with further increasing $n$.
This clearly demonstrates that the right-symmetrized SSO and the SSO spectrum behave qualitatively different.
This provides us with the promise of an even richer spectral structure when moving on to other superexponential trapping
potentials. Indeed we will see this conjecture being verified below for other natural generalizations of the
SSO.
\section{The power law SSO}
\label{sec:psso}
\noindent
Let us now consider the right-symmetrized SSO with an extra power to possibly tune the spectral properties. The
corresponding potential of this power law SSO reads as follows
\begin{equation}
{\cal{V}}_{rpo} (q) = \alpha \left( \left(q_m + |q| \right)^{\left(\left(q_m + |q| \right)^{\beta} \right)} -
q_m^{(q_m^{\beta})} \right)
\end{equation}
\noindent
where now $q_m = e^{-\frac{1}{\beta}}$ and we have two free parameters: the amplitude $\alpha$ and the
exponent $\beta$ in the exponent. The inset of Figure \ref{Fig3} provides the potential ${\cal{V}}_{rpo}(q)$
for $\alpha=1$ with varying values of the parameter $\beta$. The increasingly steep confinement with
an increasing value of $\beta$ is clearly visible. Figure \ref{Fig3} shows the scaled spacing $\Delta R_n$
of the eigenenergies of the power law SSO with varying excitation label $n$ for $\beta = 0.5$ and for
different values of the amplitude $\alpha$. The spectral behaviour is similar to the case of the right-symmetrized
SSO discussed in the previous section, but now additionally we observe for low excitations that the monotonic
behaviour of $\Delta R_n$ with increasing $n$ is violated: we encounter an increase versus decrease
for the scaled spacing for consecutive values of $n$. This is much more pronounced for smaller values
of the parameter $\beta$. Figure \ref{Fig4} addresses the case $\beta=0.25$ where in an alternating
manner throughout the spectrum an increase is followed by a decrease of the scaled spacing $\Delta R_n$.
In certain parts of the spectrum these oscillations even refer to values of $\Delta R_n$ above and
below the value one.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig3.jpg}
\caption{The scaled spacing $\Delta R_n=\frac{\Delta E_{n+1}}{\Delta E_n}$ of the eigenenergies of the power
law SSO with varying excitation label $n$ for $\beta=0.5$ and different values of the amplitude $\alpha$: From top to bottom
$\alpha=1, 10, 10^2, 10^4$. Inset: the potential ${\cal{V}}_{rpo}$ of the RPO
as given in the text for $\alpha = 1, \beta=0.25,0.5,1.0,2.0,4.0$ from bottom to top.}
\label{Fig3}
\end{figure}
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig4.jpg}
\caption{The scaled spacing $\Delta R_n=\frac{\Delta E_{n+1}}{\Delta E_n}$ of the eigenenergies of the RPO with varying
excitation label $n$ for $\beta=0.25$ and different values of the amplitude $\alpha$: From top to bottom
$\alpha=1, 10, 10^2, 10^3, 10^4$. To guide the eye the data points have been interconnected with straight
lines.}
\label{Fig4}
\end{figure}
\section{The oscillating power potential}
\label{sec:opp}
\noindent
Let us now allow for an oscillating periodic function in the exponent while we keep as a basis the magnitude
of the coordinate $q$. We therefore introduce the oscillating power potentials (OPP) according to the
following
\begin{eqnarray}
{\cal{V}}_c (\alpha,\beta,k;q)= |q|^{\alpha + \beta \cos(kq)}\\
{\cal{V}}_s (\alpha,\beta,k;q)= |q|^{\alpha + \beta \sin(kq)}
\end{eqnarray}
\noindent
These potentials are obviously very much different from a standard superposition of a harmonic confinement
with a periodic lattice such as $V \propto q^2 + \cos(q)$. Indeed, the OPP possess an oscillating power
with amplitude $\beta$ and wavevector $k$ superimposed on a constant power $\alpha$. Figure \ref{Fig5}(a)
shows ${\cal{V}}_c$ for the parameter values $\alpha=0.3,\beta=0.05, k=1$. Apart from the existence of
a central well with a cusp there is a series of decentered wells which become increasingly deeper with
increasing distance from the outer well. The energies of the minima of those wells increase according to
the constant power $|q|^{0.3}$ while moving away from the origin. These are a few relevant,
but certainly not the only, properties which distinguish ${\cal{V}}_c$ from the above-mentioned
case $V$: the OPP is a highly nonlinear potential via its oscillatory exponential appearance.
Obviously, ${\cal{V}}_c$ is reflection symmetric around
the origin, whereas ${\cal{V}}_s$ is asymmetric due to the odd character of the sine function in the
exponent (see Figure \ref{Fig5}(a)).
\begin{figure}
\includegraphics[width=7cm,height=6cm]{Fig5a.jpg}
\includegraphics[width=7cm,height=6cm]{Fig5b.jpg}\\
\includegraphics[width=7cm,height=6cm]{Fig5c.jpg}
\includegraphics[width=7cm,height=6cm]{Fig5d.jpg}
\caption{(a) The potentials ${\cal{V}}_c(\alpha,\beta,k;q)$ and correspondingly
${\cal{V}}_s(\alpha,\beta,k;q)$ (see text) for $\alpha=0.3,\beta=0.05, k=1$.
(b) Log-log representation of the energy eigenvalues $E_n$ versus the excitation
label $n$ for $\alpha=0.3,\beta=0.05,k=1,\gamma=1$ (crosses),
$\alpha=1,\beta=0.05,k=1,\gamma=1$ (squares),
$\alpha=2,\beta=0.1,k=3,\gamma=0.05$ (circles),
$\alpha=4,\beta=1,k=2,\gamma=0.1$ (diamonds).
(c) The spacing $\Delta E_n$ of the eigenenergies as a function of the excitation label $n$
for the potential ${\cal{V}}_c(\alpha,\beta,k;q)$ with $\alpha=0.3, \beta=0.05, k=1$
on a semilogarithmic scale.
(d) The turning point characteristics $N(i)$ of the energy spacing dynamics (definition see text) shown in (c).}
\label{Fig5}
\end{figure}
\subsection{The sublinear OPP cosine case}
\label{sec:opp1}
\noindent
Let us now focus on the spectral analysis of the OPP according to the solutions of the underlying SEQ.
First we will discuss the eigenvalue spectrum and consequently the most important properties of the
eigenstates.
Figure \ref{Fig5}(b) shows the energy eigenvalues $E_n$ versus the excitation label $n$
for the $250$ energetically lowest eigenstates in a double logarithmic representation for the
case $\alpha=0.3,\beta=0.05, k=1$ and for $\gamma = 1$ where $\gamma$ is an additional
prefactor (amplitude) of the overall potential. As expected,
according to the constant power in the exponent, the mean behaviour of the spectrum
follows a power law according to $E \propto n^{0.26}$.
Figure \ref{Fig5}(c) shows the spacing $\Delta E_n$ with varying degree of excitation $n$
on a semilogarithmic scale. First of all one observes an overall decrease of the spacings
with increasing $n$. Beyond this, the eyecatching feature is the highly oscillatory character
over many orders of magnitude of this spacing 'dynamics'. Starting from the ground state
energy and increasing the value of $n$ we observe a series of turning points in the
spacing dynamics (see Figure \ref{Fig5}(c))
which belong to increasingly lower values of the spacings, i.e. a series of near degeneracies
of two neighboring energy levels occur in the spectrum. In between these near degeneracies
the spacing returns to values of the order of $10^{-2}$. For $n>20$ those near degenerate levels
involve spacings smaller than $10^{-10}$ and cannot be completely resolved within our
numerical approach. For $n>60$ a second series of increasingly narrower near degeneracies emerges
with further increasing degree of excitation $n$. As a result the 'density' of near degeneracies
in the spectrum is enhanced.
\noindent
To gain more insights into the oscillatory dynamics of the energy spacing with increasing degree
of excitation we employ a turning point analysis. Let us define the turning point characteristics
$N(i)$ as the number of level spacings between two turning points of the level spacing
dynamics. The index $i$ represents just the increasing natural numbers counting these level spacings
between turning points. A value of one means that two turning points follow upon each other
without the presence of a second spacing whereas a value of two indicates the presence of a second
spacing before the next turning point occurs. In Figure \ref{Fig5}(d) we observe that the values one and
two dominate $N(i)$: the dynamics shows trains of alternating values one and two occasionally
interrupted by intervals showing two consecutive values one. Very rarely high peaks with the value three occur,
i.e. the spacing increases/decreases consecutively among four eigenenergies following upon each other.
This energy spacing analysis provides a comprehensive view on the level dynamics and we will use
it in the following to characterize the spectral properties of the different superexponential potentials.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig6.jpg}
\caption{The potential ${\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$
together with the energetically lowest $21$ eigenstates (shown are the non-normalized probability amplitudes).
Note that the vertical arrangement of the eigenstates is not associated with the detailed energetical position
of these eigenstates.}
\label{Fig6}
\end{figure}
\noindent
Let us now inspect the eigenstates of the sublinear OPP cosine case. This will provide us with an understanding
of the origin of the near degeneracies observed above. Figure \ref{Fig6} shows the potential
${\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$ together with the energetically
lowest $21$ eigenstates. Starting from the ground state the energetically lowest four states are
localized in the central well of the OPP. Thereafter, with further increasing degree of excitation,
more and more outer wells are covered with increasing energy. A closer inspection reveals that there is
two classes of states. The first class is the expected class of delocalized eigenstates covering a certain
range of the OPP. Interspersed into these delocalized states we encounter localized states that carry
a significant probability amplitude only in some outer wells. They occur in pairs with even and odd
parity. In Figure \ref{Fig6} these are, e.g. the pairs of the $(9,10)-$th states, or, showing an
even stronger localization, the $(13,14)-$th, $(16,17)-$ or $(20,21)-$st eigenstates.
The localization happens
in (or above) a certain outer well and becomes increasingly more pronounced with increasing degree of
excitation of the considered eigenstate. In essence, these localized states appear to consist, to
some degree of approximation, of two single humped probability amplitudes localized at the positions
of certain outer wells whose depths increases with increasing distance from the central well and
therefore the degree of localization becomes increasingly more pronounced.
\subsection{The sublinear OPP sine case}
\label{sec:opp2}
\noindent
Let us now explore the spectral properties of the OPP ${\cal{V}}_s(\alpha,\beta,k;q)$. It has no
inversion symmetry w.r.t. the origin and therefore the eigenstates are not parity symmetric.
In other words, the inversion symmetry ${\cal{V}}_c(\alpha,\beta,k;q)={\cal{V}}_c(\alpha,\beta,k;-q)$
is maximally broken for ${\cal{V}}_s$, see also Figure \ref{Fig5}(a) for the case
$\alpha=0.3, \beta=0.05, k=1$. At equal distance from the origin
the left and right outer wells are (approximately) shifted by a phase of $\frac{\pi}{2}$ i.e. if one encounters a
maximum on the left branch of the OPP the reflection symmetric position to the right represents a minimum
and vice versa.
\noindent
The smooth mean part of the behaviour of the eigenenergies with increasing degree of excitation is for
the OPP ${\cal{V}}_s$ the same as the one for ${\cal{V}}_c$, i.e. it obeys a power law $E \propto n^{0.26}$.
Major differences however are revealed when focusing on the fluctuations or the level spacing dynamics.
\begin{figure}
\includegraphics[width=7cm,height=6cm]{Fig7a.jpg}
\includegraphics[width=7cm,height=6cm]{Fig7b.jpg}
\caption{(a) The spacing $\Delta E_n$ of the eigenenergies as a function of the excitation label $n$
for the potential ${\cal{V}}_s(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$
on a semilogarithmic scale and (b) the turning point characteristics $N(i)$ of the energy spacing
dynamics (definition see text) shown in (a).}
\label{Fig7}
\end{figure}
\noindent
Figure \ref{Fig7}(a) shows the spacing $\Delta E_n$ of the eigenenergies as a function of the excitation label $n$
for the potential ${\cal{V}}_s(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$
on a semilogarithmic scale. Obviously a very rich energy spacing dynamics can be observed.
Apart from an expected overall decay of the spacing we observe a beating behaviour and, within these
beats i.e. on the shortest scale, alternating spacings of increasing and decreasing values
between nearest neighbor spacings or next to nearest neighbor spacings.
The beats dissolve respectively overlap for larger values of the excitation $n$.
While the spectrum of the OPP ${\cal{V}}_c(\alpha,\beta,k;q)$ (see subsection \ref{sec:opp1})
contains a large number or series of near degeneracies this is now not the case
for the spectrum of the OPP ${\cal{V}}_c(\alpha,\beta,k;q)$: there is only a very limited range of values for the
spacings, typically $10^{-4}<\Delta E_n < 10^{-1}$, i.e. the near degeneracies of ${\cal{V}}_c$ are
lifted due to the broken parity symmetry. Figure \ref{Fig7}(b) shows the turning point
characteristics $N(i)$ of the energy spacing dynamics. Compared to Figure \ref{Fig5}(d), which
shows $N(i)$ for the OPP ${\cal{V}}_c$, we encounter now many subsequent events with a single
spacing. The reader should be reminded that the value one for $N(i)$ corresponds to a single spacing
between turning points of the energy level dynamics, i.e. an alternating increase and decrease of the
spacing. In between these extended intervals of value one, $N(i)$ shows finite series of peaks with
values two and three arranged in a repeating manner.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig8.jpg}
\caption{The potential ${\cal{V}}_s(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$
together with the energetically lowest $17$ eigenstates (shown are the non-normalized probability amplitudes).}
\label{Fig8}
\end{figure}
\noindent
Figure \ref{Fig8} shows the potential ${\cal{V}}_s(\alpha,\beta,k;q)$ for $\alpha=0.3, \beta=0.05, k=1$
together with the probability amplitude of the energetically lowest $17$ eigenstates. As for the case of
${\cal{V}}_c$ (see subsection \ref{sec:opp1}) there are localized states interspersed between delocalized
states. Now, however, due to the missing parity symmetry of the eigenstates there is either right or left
localized states. In Figure \ref{Fig8} these are the $10,12,14,16-$th eigenstate which can be, according
to their localization, assigned to the corresponding outer potential wells on either the left or the
right half of the OPP.
\subsection{The sublinear OPP case with arbitrary phase}
\label{sec:opp3}
\noindent
Having explored the spectral properties of ${\cal{V}}_c$ and ${\cal{V}}_s$ including the presence and
lifting of near degeneracies as well as the localization and delocalization of the underlying eigenstates,
our focus in this brief subsection is to mediate between the two cases. To this end we investigate the spectrum
of the potential
\begin{equation}
{\cal{V}}_p (\alpha,\beta,k,\phi;q) = |q|^{\alpha + \beta \sin(q+\phi)}
\end{equation}
\noindent
which coincides with ${\cal{V}}_c$ and ${\cal{V}}_s$ for $\phi=\frac{\pi}{2}$ and $\phi =0$, respectively.
We again focus on the parameter values $\alpha = 0.3, \beta=0.05, k=1$ and vary $\phi$ continuously from $0$ to $2\pi$.
This way we expect to see the crossover between the spectral properties of the limiting cases considered
above. Figure \ref{Fig9} shows the eigenvalue spectrum as a function of the phase $\phi$ for
${\cal{V}}_p$ for the energetically lowest 21 eigenstates. It can be seen that near degeneracies and
avoided crossings, which become increasingly narrow with increasing degree of excitation,
occur at $\phi = \frac{\pi}{2},\frac{3 \pi}{2}$ and are lifted once moving off from these configurations.
At $\phi =0, \pi, 2 \pi$ these close encounters of the energy levels are not present throughout the
spectrum. The doublet formation and splitting can therefore be controlled by varying the phase $\phi$.
This is somehow reminescent of the splitting of the single particle eigenstates in a double well
\cite{Schmelcher1,Oberthaler} which determines the frequency of the Rabi oscillations when considering
the dynamics following a wave packet in a single well. In our superexponential setup the situation
is different in the following sense. With increasing degree of excitation or increasing energy,
the eigenstates of the doublets refer, in terms of their localization, to different spatially well-separated
individual outer wells attached to the overall confining potential well. As a consequence the
resulting quantum dynamics of a wave packet, being left or right localized due to a superposition
of the two states of the doublet, would provide a quantum state transfer between remote
pairs of individual wells attached to the confining walls of the overall potential
(see also remarks in the conclusions). It should also be noted that the shape of those
individual wells and consequently also of the corresponding localized wave packets differ
significantly from the one of the individual wells commonly encountered in optical lattices and correspondingly
from their Wannier states.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig9.jpg}
\caption{The eigenvalue spectrum as a function of the phase $\phi$ (in arc measure) for the potential
${\cal{V}}_p=|q|^{0.3+0.05 \sin (q+\phi)}$ for the energetically lowest 21 eigenstates.}
\label{Fig9}
\end{figure}
\subsection{The linear OPP cosine case}
\label{sec:opp4}
\noindent
In this subsection we explore the case $\alpha = 1$ i.e. the case of a linear behaviour due to the
constant part of the exponent combined with an oscillating cosine in the exponent again with
an amplitude $\beta = 0.05$. The corresponding potential ${\cal{V}}_c(\alpha,\beta,k;q)$ is shown
for $k=1$ in Figure \ref{Fig10}(a). Figure \ref{Fig5}(b) shows the mean power law dependence
of the eigenenergies with increasing excitation label for which $E \propto n^{0.72}$ holds.
Figure \ref{Fig10}(b) provides a semi-logarithmic representation of the corresponding spacing $\Delta E_n$
of the energy eigenvalues versus the excitation label $n$. First of all we observe a very 'slow'
overall decrease of the spacing with increasing degree of excitation $n$. More important, however, is
the occurence of near degeneracies which are again interspersed into the spectrum of spacings whose
predominant range of values is $10^{-2}<\Delta E_n<1$.
\begin{figure}
\includegraphics[width=7cm,height=6cm]{Fig10a.jpg}
\includegraphics[width=7cm,height=6cm]{Fig10b.jpg}\\
\includegraphics[width=7cm,height=6cm]{Fig10c.jpg}
\includegraphics[width=7cm,height=6cm]{Fig10d.jpg}
\caption{(a) The potential ${\cal{V}}_c(\alpha,\beta,k;q)$ (see text) for $\alpha=1.0,\beta=0.05, k=1$.
(b) Semi-logarithmic representation of the spacing of the energy eigenvalues $E_n$ versus the excitation
label $n$ for the potential shown in (a). (c) The corresponding
turning point characteristics $N(i)$ of the energy spacing dynamics (definition see text) shown in (b).
(d) The potential $\gamma {\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=1.0, \beta=0.09, k=0.2, \gamma=0.002$
together with the energetically lowest $17$ eigenstates (shown are the non-normalized probability amplitudes).}
\label{Fig10}
\end{figure}
\noindent
Figure \ref{Fig10}(c) shows the corresponding
turning point characteristics $N(i)$ of the energy spacing dynamics. Opposite to the above considered
cases of superexponential potentials a direct alternation in the spectrum corresponding to a value of one,
is now encountered very rarely. Instead, there is now a range of values up to $13$ which is covered in the
considered window of the eigenenergy spectrum. Overall $N(i)$ looks rather irregular while still certain
patterns or bursts of spacing sequences are recognizable. Figure \ref{Fig10}(d) presents the
potential $\gamma {\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=1.0, \beta=0.09, k=0.2, \gamma=0.002$
and its energetically lowest $17$ eigenstates. Delocalized states and states localized in outer wells,
being parity symmetric or antisymmetric, can be identified as for the above-discussed cases of the OPP.
\subsection{The quadratic and quartic OPP cosine case}
\label{sec:opp5}
\noindent
Let us briefly study the spectral properties for the quadratic and quartic case, i.e.
for $\alpha =2$ respectively $\alpha = 4$. In Figure \ref{Fig11}(a) the potential
$\gamma \cdot {\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=2.0, \beta=0.1, k=3.0, \gamma=0.05$
is illustrated. The deepening of the potential wells attached to the (average) potential walls,
which represent a harmonic oscillator, are clearly visible. We therefore expect also for this reflection
symmetric case the appearance of near degenerate doublets in the energy spectrum.
Indeed inspecting the dynamics of the spacing of the energy eigenvalues shown in Figure \ref{Fig11}(b)
one observes with increasing degree of excitation $n$ the emergence of near degeneracies.
More specifically, there is two such series of near degeneracies, the first one starting at
approximately $n =50$ and second one arising close to $n=120$ (the onset of a third series
is visible too for $n > 200$).
The mean behaviour of $E_n$, as expected, follows a power law $E_n \propto n$ (see Figure \ref{Fig5}(b))
and therefore the spacing fluctuates around a constant value (see Figure \ref{Fig11}(b)).
The corresponding turning point characteristics $N(i)$ is illustrated in Figure \ref{Fig11}(c).
Many equally spaced events with values $N(i)>2$ can be observed for higher excitations, whereas
for lower excitations more rapid oscillations also for $N(i)>2$ are observed. $N(i)$ bears quite
some similarities but also major differences to the linear case discussed in subsection \ref{sec:opp4},
whereas it is overall distinctly different from the sublinear case discussed in subsections
\ref{sec:opp},\ref{sec:opp1},\ref{sec:opp2},\ref{sec:opp3}.
\begin{figure}
\includegraphics[width=7cm,height=6cm]{Fig11a.jpg}
\includegraphics[width=7cm,height=6cm]{Fig11b.jpg}\\
\includegraphics[width=7cm,height=6cm]{Fig11c.jpg}
\caption{(a) The potential $\gamma {\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=2.0, \beta=0.1, k=3.0, \gamma=0.05$.
(b) Semi-logarithmic representation of the spacing of the energy eigenvalues $E_n$ versus the excitation
label $n$ for the potential shown in (a). (c) The corresponding turning point characteristics $N(i)$
of the energy spacing dynamics (definition see text) shown in (b).}
\label{Fig11}
\end{figure}
\noindent
Figure \ref{Fig12} shows, as a final case, the potential $\gamma {\cal{V}}_c(\alpha,\beta,k;q)$ for
$\alpha=4.0, \beta=1.0, k=2.0, \gamma = 0.1$ where the first few 'side-pockets' attached to the steep walls of the
overall $q^4$-confinement are clearly visible. Also shown are the localized eigenstates in this
potential which correspond to the $10-11th, 15-16th, 20-21st, 34-35th$ and $43-44th$ pairs of eigenstates
with odd and even parity correspondingly. For the higher excited states the localization is almost
perfect, as can be seen in Figure \ref{Fig12}.
\begin{figure}
\includegraphics[width=8cm,height=6cm]{Fig12.jpg}
\caption{The potential $\gamma {\cal{V}}_c(\alpha,\beta,k;q)$ for $\alpha=4.0, \beta=1.0, k=2.0, \gamma = 0.1$
together with the localized states corresponding to the $10-11th, 15-16th, 20-21st, 34-35th, 43-44th$
pairs of eigenstates (shown are the non-normalized probability amplitudes).}
\label{Fig12}
\end{figure}
\section{Conclusions}
\label{sec:concl}
\noindent
The few existing investigations on superexponential model systems \cite{Schmelcher2,Schmelcher3,Schmelcher4,Schmelcher5}
have demonstrated that they exhibit a variety of peculiar phenomena and properties. Motivated by this and
in particular by the importance of the geometry of trapping potentials in a diversity of research problems,
encompassing optical tweezers for soft matter manipulation and processing of atomic degenerate quantum gases,
we have performed in this work a first step towards the exploration of the spectral properties of
confining superexponential potentials.
\noindent
The original self-interacting superexponential oscillator (SSO) has been shown in ref.\cite{Schmelcher5}
to exhibit a crossover of its eigenvalue spectrum from a scaling behaviour below its transition
point to irregular oscillations above the transition energy. Building on that we started here by
analyzing the spectrum of the SSO with varying amplitude. This way we have illuminated the emergence
of the scaling behaviour of the eigenvalues with increasing amplitude. In a second step we modified
the SSO in several ways in order to demonstrate the variations of the spectrum. For the symmetrized SSO
a smooth approach of the scaled spacing $\frac{\Delta E_{n+1}}{\Delta E_n}$ with increasing degree of
excitation is observed towards the value one, either from above or below one, depending on its amplitude.
For low excitations a crossover of the scaled spacing from increasing to decreasing behaviour
and from values below one to above one is observed. Augmented by a power law in the exponent we have
analyzed the so-called power law SSO: here the scaled spacing shows an alternating increasing
and decreasing behaviour between neighboring energy spacings of the energy levels. The mean behaviour
is similar to the one obtained for the symmetrized SSO.
\noindent
In the second part of our investigations we have explored potentials with a spatially oscillating
power (OPP) in combination with a constant part. These potentials exhibit a central well and an
infinite series of left and right located side wells whose depths increases with increasing distance
from the central well. We have analyzed the eigenenergy spacing dynamics and revealed several
interesting properties depending on the constant part of the power and the phase of the oscillating
power. The sublinear, linear as well as quadratic and quartic case have been considered. Depending
on the phase these potentials show a reflection symmetry or not. In the presence of the reflection
symmetry a series of energetically near degenerate doublets of eigenstates emerges with an increasingly
smaller splitting with increasing degree of excitation. While the remainder of the eigenstates are
delocalized these doublet states are localized in a left right pair of outer wells. Breaking the
reflection symmetry separates the states of this doublet in energy, i.e. removes the near degeneracy,
and introduces an exclusive left or right localization.
\noindent
Based on the above diverse spectral properties of superexponential potentials, there is several
possible future directions of investigation and potential applications. Preparing as an initial state
a superposition state of the parity symmetric partner eigenstates of a doublet the resulting quantum
dynamics would be an oscillation between right and left localized wave packets, i.e. a remote transfer
or delivery of particles, or, in other words, Rabi oscillations between remotely placed potential
wells. One might then conjecture that superpositioning more than just one doublet,
leads to a 'collective' type of Rabi
oscillations between several occupied outer wells involving different frequencies,
which is an intriguing feature of the OPP. Another relevant question is how interactions would
modify or enrich this picture - meaning both the spectral structure as well as the resulting
quantum dynamics. Related to this general direction of investigation would be the question
of the emergence of entanglement in the OPP.
\noindent
Changing the phase of the OPP in time may yield a delivery of particles, even particle by particle,
or atom by atom, to the central well. The OPP could therefore potentially be used as a rechargeable
tweezer where the 'focus' atom to be processed is in the central well and, once this atom is gone,
the central well can be reloaded by changing the phase of the OPP and transfering atoms from the side wells
to the central well. A very promising physical platform to realize this would be ultracold atoms
which can be prepared, processed and detected on a single atom level \cite{Ott}. The OPP might be created
by one of the extremely powerful techniques of light beam engineering. Traps with almost arbitrary
geometry can be designed nowadays \cite{Grimm} including optical tweezer arrangements \cite{Kuhn}
using spatial light modulators or so-called painted dynamic potentials which can create by a rapidly
moving laser beam time-averaged optical dipole potentials of arbitrary shape \cite{Boshier}.
\section{Acknowledgments}
The author acknowledges K. Keiler for a careful reading of the manuscript.
|
\section{Introduction}
Hereditary hemolytic anemias are a group of disorders caused by genetic mutations that affect shape and density of red blood cells. Red blood cells have various channels and pumps helping them to release ions such as calcium and potassium in and out of the cell. An intact membrane structure allows them to expand or shrink according to the environment, leading to higher or lower densities. Many hereditary hemolytic disorders are directly affecting either the membrane, the pumps, or the channels, thus leading to abnormal shape and density of cells. The variance in red blood cell density has recently been suggested to serve as a marker of severity of hereditary spherocytosis \cite{huisjes2020density} and sickle cell disease \cite{mahkro2020pilot}.
Percoll is a standard density gradient medium for cell and particle separation in biochemistry. It has low viscosity, low osmolarity, and is not toxic and thus an ideal tool to investigate red blood cell density distribution. Percoll density gradients \cite{rbcfrontiers} form bands with different thicknesses. These bands might hold important information about the patient blood cells' aggregation tendency and consistency (Fig. \ref{figoverview}).
In many rural areas, access to medical facilities is limited, and the need for developing AI solution for affordable healthcare is highly desirable.
We were wondering if we can identify a hereditary hemolytic anemia from a Percoll gradient, a simple and cheap experimental approach as compared to a genetic test which is expensive and still scarce in clinical labs. To that end, we collected Percoll gradients from patients suffering from sickle cell disease, thalassemia, and spherocytosis along with healthy controls and tried to classify the samples with a deep neural network as a proof of concept.
\begin{figure*}[t]
\centering
\includegraphics[width=\textwidth, trim=0 10.3cm 0 0,clip]{figures.pdf}
\caption{Overview of the proposed method. Blood samples are obtained from patients and centrifuged to obtain Percoll gradient images. Two different feature extraction approaches are employed for classification: CNN feature extraction and fast Fourier transform applied on the smoothed images. After classification, Grad-CAM is used to highlight important regions of the image.}
\label{figoverview}
\end{figure*}
Deep learning approaches are being widely developed for use in the medical domain~\cite{litjens2017survey} covering a wide spectrum of medical imaging ranging from CT, MRI scans to microscopic imaging~\cite{matek2019human}, histopathology~\cite{peng2019multi}, and cancer diagnosis~\cite{bejnordi2017diagnostic}.
Some of these methods are concentrated on red blood cells and their relevant diseases. For instance, Manescu et al. \cite{manescu2020weakly} are suggesting a weakly supervised method for the diagnosis of malaria and sickle cell disease. In our recent work \cite{sadafi2020attention} we suggested a multiple instance learning approach for the classification of red blood cell disorders. Such methods can be highly useful for diagnosis provided that a microscope is available on site.
\textbf{Contributions} In this work, we are proposing a method based on convolutional neural networks and fast Fourier transform to classify Percoll gradients for patient diagnosis in hereditary hemolytic anemias. To the best of our knowledge, this is the first work trying to detect hemolytic anemias by looking at Percoll gradients. We investigate two different combinations of spatial features with the handcrafted features from the Fourier transform to find the best fusion scheme that boosts the accuracy of the method. The first results are highly promising and encourage further investigations on this topic.
\section{Method}
Our proposed method (Fig.~\ref{figoverview}) combines both the spatial data-driven features from convolutional neural networks (CNN) and the spectral handcrafted features using Fourier transform to perform Percoll gradients classification. Formally, for a given dataset $\mathcal{D}=\{(I_1, c_1), \dots, (I_N, c_N)\}$, where $I_i \in \mathbb{R}^{H \times W \times 3}$ is the Percoll image, and $c_i \in \{sickle, thalassemia, spherocytosis, healthy\}$ is the corresponding class label, our objective is to build a model $f(\cdot)$ that predicts the class label $\hat{c}_q$ for a given query Percoll image $\hat{c}_q = f(I_q; \Theta)$, where $\Theta$ is the model parameters.
\subsection{Spatial data-driven features}
Typical CNNs used for image classification consist of two sections: (i) A convolutional part for feature extraction and (ii) fully connected layers for classification. In our method, we opt for the convolutional part to extract spatial data-driven features, denoted CNN features,
\begin{equation}
h_{\mathrm{cnn}} = f_{\mathrm{cnn}}(I, \theta),
\end{equation}
where $\theta \subset \Theta$ are the convolutional parameters.
\subsection{Spectral handcrafted features}
We assume that most of RBC information such as viscoelasticity, amount of hemoglobin, density and aggregability, is retained in the band pattern of the Percoll gradients. This pattern can be interpreted as a signal and analyzed.
To extract spatial features using the Fourier transform, a smoothed version $\overline{I} \in \mathbb{R}^{\frac{H}{n}\times 3}$
is obtained from the input image $I$ (Fig.~\ref{figoverview}) by averaging a neighborhood of size $n\times n$ along the y axis of the image as follows
\begin{equation}
\overline{I}_k^r =\frac{1}{n^2} \sum_{i=n(k-1)}^{n.k} \sum_{j = l -\lfloor \frac{n}{2} \rfloor}^{ l + \lfloor\frac{n}{2}\rfloor} I_{(i, j, r)},
\end{equation}
where $k\in[1,\frac{H}{n}]$, $l = \lfloor\frac{W}{2}\rfloor$, and $W$ and $H$ are width and height of the input image, respectively, and $r$ is the selected channel of the image.
The smoothed image helps eliminating unwanted noise in the bands. Intensities of each channel are sampled separately.
\textbf{Fourier transform} We use the Fast Fourier Transform (FFT) algorithm \cite{cooley1965algorithm} to compute the discrete Fourier transform of the sampled sequences $I_{\mathrm{fft}} = \mathrm{fft}(\overline{I})$.
We normalized the Fourier transform for every channel as follows
\begin{equation}
h_{\mathrm{fft}} = \frac{I_{FFT}}{(H/2n)} = \frac{2n \dot I_{FFT}}{H}.
\end{equation}
\subsection{Feature fusion}
The classifier section of the CNN consists of three fully connected layers. Two different approaches of early fusion and late fusion were designed to incorporate the FFT features (Fig.~\ref{figEFLF}). In early fusion (EF), Fourier features $h_{fft}$ are injected into the first fully connected layer while in late fusion features are injected to the second fully connected layer.
\begin{figure}[ht]
\centering
\includegraphics[width=0.45\textwidth,page=2, trim=0 11.1cm 19.5cm 0,clip]{figures.pdf}
\caption{Two approaches of early fusion and late fusion of the spectral features are used and compared. In early fusion fast Fourier transform (FFT) features are fused at the first fully connected layer while in late fusion features are fused at the second layer.}
\label{figEFLF}
\end{figure}
\begin{figure*}[ht!]
\centering
\includegraphics[width=0.90\textwidth,page=3, trim=0 10.5cm 0 0,clip]{figures.pdf}
\caption{(A) Exemplary images of the dataset belonging to different classes. Minor (MiT), intermediate (IT), major (MT) and alpha($\alpha$) thalassemia sub-types are displayed as well. (B) Pie chart showing the class distribution.}
\label{figdataset}
\end{figure*}
More formally, the input image $I_i$ belonging to class $c_i$, CNN features $h_{\mathrm{cnn}}$ are fused with corresponding Fourier transform features $h_{\mathrm{fft}}$ of the smoothed images, and passed to the classifier $f_{\mathrm{cls}}(\cdot)$ to minimize the following objective function,
\begin{equation}
\mathcal{L}_{cls}(\theta,\phi) = \mathrm{CE}(c_i, \hat{c}_i),
\end{equation}
where $\hat{c}_i = f_{\mathrm{cls}}(h_{\mathrm{cnn}} \odot h_{\mathrm{fft}}; \phi)$ is the predicted class, CE is the cross entropy loss and $\phi \subset \Theta$ is the parameters of the fully connected part of the CNN.
\section{Experiments and results}
\subsection{Dataset}
The dataset consists of 143 patients collected from the Pediatric Hematology Unit and the Laboratory Division of the Emek Medical Center in Afula and are carefully processed. The test tubes look identical and images are obtained by placing the tubes in holders set up for this purpose with white background and lighting to minimize the batch effect. The ground-truth of samples comes from the genetic test of the patients.
The 143 patients comprise 50 affected with sickle cell disease, 35 with thalassemia (5 alpha, 30 beta of which 4 of minor, 5 of transfusion independent, and 21 of transfusion dependent), 11 with spherocytosis and 47 controls (Fig.~\ref{figdataset}B).
\subsection{Implementation details}
The proposed method consists of three components: Convolutional layers used for feature extraction, fast Fourier transform, and fully connected classifier.
\textit{Convolutional layers}: We decided to test with two different standard networks: AlexNet~\cite{krizhevsky2012imagenet} and VGG16~\cite{simonyan2014very}. With 2D adaptive average pooling the extracted tensors of the networks were changed into feature vectors of 9216 and 25088 for AlexNet and VGG16 respectively. All networks were trained using stochastic gradient descend with a learning rate of 0.0001 and momentum of 0.9.
\textit{Fast Fourier transform}: The standard implementation of FFT in SciPy package was used. The sampled sequences each have 100 values for every channel obtained from $5\times 5$ neighborhoods ($n=5$). Having RGB images as input, after FFT analysis 300 values were yield as extracted features.
\textit{Fully connected classification}: Three fully connected layers with Rectified Linear Unit (ReLU) activation functions were designed. To avoid over-fitting, two dropout layers with a rate of $0.5$ also were used during the training.
\textit{Training}: We opt for 3-fold cross validation. Images in training folds are augmented with vertical flipping, cropping, translation, and random noise. The models parameters were optimized using stochastic gradient descend with a learning rate of $0.0001$ and a momentum of $0.9$. AlexNet and VGG16 models were trained for 30, and 20 epochs, respectively. Further information can be found in our repository under https://github.com/marrlab/percollFFT.
\textit{Evaluation metrics}:
Accuracy, weighted F1 score, area under ROC and Precision recall curve as well as the confusion matrix were calculated using SciPy package.
\subsection{Results}
We repeated each experiment five times and averaged each metric and report mean ± standard deviation.
We are comparing three different experiments: late and early Fourier features fusion with models without any feature fusion as the baseline.
Table \ref{results} shows the results of the three experiments for AlexNet and VGG16 models.
\begin{table}[t]
\caption{Comparison between AlexNet and VGG16 when trained individually and when accompanied by early fusion (EF) and late fusion (LF) of FFT features. All experiments are run 5 times to report mean and standard deviation.}
\label{results}
\resizebox{0.48\textwidth}{!}{
\begin{tabular}{l|c|c|c}
Method & Accuracy & F1 Score & AU ROC\\
\hline\hline
AlexNet & $0.86\pm0.02$ & $0.86\pm0.02$ & $0.9722\pm0.0036$\\
+ EF & $0.85\pm0.01$ & $0.84\pm0.02$ & $0.9622\pm0.0037$\\
+ LF & $\mathbf{0.88\pm0.01}$ & $\mathbf{0.88\pm0.01}$ & $\mathbf{0.9770\pm0.0027}$\\
\hline
VGG16 & $0.83\pm0.01$ & $0.83\pm0.01$ & $0.9540\pm0.0041$\\
+ EF & $0.84\pm0.01$ & $0.84\pm0.01$ & $0.9639\pm0.0033$\\
+ LF & $0.85\pm0.01$ & $0.85\pm0.01$ & $0.9751\pm0.0030$\\
\end{tabular}
}
\end{table}
All of the methods are performing better with late fusion of Fourier features. Due to the nature of our particular problem, fast Fourier transform generates valuable features that once fused with typical CNNs can lean to robust classification of Percoll gradient images. Figure \ref{figPRCurve} demonstrates the area under precision recall curve for all of the models across different classes.
Surprisingly, AlexNet is outperforming VGG16 by a margin of 3\% which can be attributed to the fact that VGG16 has twice the number of parameters of AlexNet and might not be suitable for this task.
Note that thalassemia class consists of three sub-classes based on the severity of the disease. In case of major thalassemia, patients have to receive biweekly transfusions, and donor blood may change the consistency of their blood hence the lower performance on Fig. \ref{figPRCurve}.
\begin{figure}[ht]
\centering
\includegraphics[width=0.48\textwidth,page=6, trim=0.3cm 3.65cm 3.8cm 0.1cm,clip]{figures.pdf}
\caption{Area under precision recall curve for all experiments and every class is demonstrated with mean and standard deviation of five independent runs.}
\label{figPRCurve}
\end{figure}
\subsection{Grad-CAM}
When dealing with a small dataset, one of the biggest concerns is that the trained models may overfit on irrelevant features. Moreover in medical application explainability is crucial. We decided to use Gradient-weighted Class Activation Mapping (Grad-CAM) \cite{selvaraju2017grad}, as a simple method to make sure our model is actually taking the Percoll gradient bands into account. Grad-CAM is a method that enables visual explanation for decision of CNN-based models by monitoring the gradients of the output logits all the way to the final convolutional layer to highlight the important regions by generating a coarse localization map.
We carried out Grad-CAM analysis on the images from the test set for a better insight to the decision making process of the models and to make sure that the models are not overfitting on irrelevant features. Figure \ref{figGradcam} shows four successfully classified images from every class. AlexNet seems to focus more on consistency of the blood while VGG16 focuses on bands and distribution of the densities. For example, in spherocytosis, high density cells are more frequent which are successfully highlighted by AlexNet. Also in the healthy sample, the important areas are more uniformly distributed over the Percoll gradient bands.
\begin{figure}[t]
\includegraphics[width=0.47\textwidth,page=7,trim=0 5.5cm 12.2cm 0cm,clip]{figures.pdf}
\caption{Grad-CAM on correctly classified samples. While AlexNet focuses more on the consistency of the blood, VGG16 favors the bands and density distribution.}
\label{figGradcam}
\end{figure}
\section{Conclusion}
We presented a novel hybrid approach based on fusion of Fourier transforms with convolutional neural networks for classification of Percoll gradients. We were able to show proof of concept to diagnose patients based on peripheral blood Percoll samples rather than genetic tests and without microscopy. This highly increases the applicability of the method in less developed and rural areas where access to the facilities is limited. The simplicity of this method once applied in practice can considerably cut the cost of diagnosis compared to conventional methods used for some of those blood disorders.
More experiments with bigger and more variant dataset, robustness against different illuminations, and clinical protocols are among the future steps of this study. Analysis of patient samples for assessment of the state of their disorder and the effectiveness of therapy is also another exciting topic for exploration.
\subsection*{Compliance with Ethical Standards}
The protocol of the study complies with the World Medical Association Declaration of Helsinki, ICH-GCP guidelines and the local legally applicable requirements was approved by the local Ethics Committee.
\subsection*{Acknowledgment}
Special thanks to Prof. Ariel Koren and Dr. Carina Levin from the Emek Medical Center in Afula who made this work possible. This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 675115 — RELEVANCE — H2020-MSCA-ITN-2015/ H2020-MSCA-ITN-2015. The work of L.L. was funded by UZH Foundation.
C.M. and A.S. have received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 866411). S.A. was supported by the PRIME programme of the German Academic Exchange Service (DAAD) with funds from the German Federal Ministry of Education and Research (BMBF) by the time of conducting this project.
\bibliographystyle{IEEEbib}
|
\section{Introduction}
Arithmetic properties of motives defined over a global field are a central theme of modern number theory
and one of the main topic is their relation with (or interpretation as) special values of $L$-functions.
Iwasawa theory combines an algebraic approach, which studies the variation of motives in $p$-adic towers
as modules over an algebra of power series, with the definition of analytical $p$-adic $L$-functions,
which interpolate special values of more classical $L$-functions, thus providing a link between the
two aspects of the theory. The Main Conjecture (IMC) predicts (in a growing number of incarnations)
a deep relation between $p$-adic $L$-functions and a generator of the characteristic or Fitting ideal
of the algebraic structure we deal with (class groups, Selmer groups and so on).
\noindent This topic has been extensively studied since the first proof of a Main Conjecture by Mazur and Wiles (in \cite{Mazur Wiles}) for the class groups of the $\Z_p$-cyclotomic extension of $\Q$,
but mostly for $\Z_p$ or $\Z_p^d$-extensions of number fields (see e.g. \cite{KatoICM}).
Iwasawa theory for function fields in positive characteristic is relatively new and, even if
some instances of the IMC for $\Z_p^d$-extensions were proved by Crew in \cite{Crew} and
Burns, Lai and Tan in \cite{Bur}, we believe that the true analog of the Mazur-Wiles theorem
is the one recently presented in \cite{ABBL}. We briefly explain the setting of that result:
let $F=\F_q(t)$ be the rational function field which plays the role of $\Q$, fix the prime
$\frac{1}{t}=\infty$ and consider $A=\F_q[t]$ as the ring of integers of $F$, i.e. the functions
regular outside $\infty$. Let $\mathfrak{p}$ be a prime of $A$ and let $F_n$ be the field generated
over $F$ by the $\mathfrak{p}^{n+1}$-torsion of the Carlitz module associated to $A$
(see \cite[Section 2]{ABBL} for a quick review): put $\mathcal{F}=\cup F_n$, then
$\Gal(\mathcal{F}/F)\simeq \Gal(F_0/F)\times \Gal(\mathcal{F}/F_0)\simeq\Delta\times\Z_p^\infty$,
where $\Delta$ has finite order prime with $p$. The field $\mathcal{F}$ is the analog of the
cyclotomic $\Z_p$-extension of a number field constructed with $p$-power roots of unity and it is
this analogy which led us to believe that we have to work with $\mathcal{F}$ instead of
$\Z_p^d$-extensions for some finite $d$.
\noindent This provides one of the main differences with the number field setting where there are
no $\Z_p^\infty$-extensions: here our algebraic structures (namely class groups) will be modules over
the non-noetherian algebra $\Lambda(\mathcal{F})=W\llbracket \Gal(\mathcal{F}/F_0)\rrbracket$
($W$ an appropriate finite extension of $\Z_p$) and,
having no structure theorem for them, we shall use a limit process to describe their Fitting ideals.
\noindent Let $\mathcal{C}\ell^0_n$ be the $p$-part of the group of divisor classes of degree 0
of $F_n$ and, for any complex character $\chi$ of $\Delta$, let $\mathcal{C}\ell^0_n(\chi)$ be its
$\chi$-part, i.e. the one on which $\Delta$ acts via $\chi$. Put $\mathcal{C}\ell^0_\infty(\chi)$
for the inverse limit with respect to norms of the $\mathcal{C}\ell^0_n(\chi)$, then
\cite[Theorems 5.1 and 5.2]{ABBL} prove that for any nontrivial $\chi$ the
$\Lambda(\mathcal{F})$-module $\mathcal{C}\ell^0_\infty(\chi)$ is finitely generated and torsion
and its Fitting ideal is generated by a specialization of the $\chi$-part of a Stickelberger series
$\Theta(X)\in \Z[\Gal(\mathcal{F}/F)]\llbracket X\rrbracket$.
\noindent The same Stickelberger series is also used to interpolate (via complex or
$\mathfrak{p}$-adic characters) the Artin $L$-function, the Goss Zeta-function and a $\mathfrak{p}$-adic
$L$-function (\cite[Section 3]{ABBL}), thus providing the link between the algebraic structure
of $\mathcal{C}\ell^0_\infty(\chi)$ and various $L$-functions, i.e. the IMC.
\subsection{Our results} Our goal here is to extend the main results of \cite{ABBL}
to a general function field $F$ of characteristic $p$, i.e. a field of transcendence degree 1 over
some finite field $\F_q$ or, equivalently, the function field of a smooth projective curve defined
over $\F_q$. Fix a prime $\infty$, let $A$ be the ring of integers for $F$ and write $H_A$ for the\
Hilbert class field of $A$, i.e. the maximal abelian unramified extension of $F$ where $\infty$
is totally split.
\noindent To deal with this setting we need to consider extensions generated by the $\mathfrak{p}$-torsion
of a sign-normalized rank 1 Drinfeld module (or Hayes module, see Definition \ref{DefHayesModule})
and decompose Iwasawa modules in eigenspaces with respect to characters whose action on the inertia groups of $\infty$
is crucial. We replace the odd and even characters of the case $F=\F_q(t)$ (where $H_A=F$) with three types (Definition
\ref{DefCharType}): we shall provide a complete study for the first two types, the characters of type 3 need a
different treatment (see Remark \ref{RemType3}).
\noindent Moreover the presence of a nontrivial Hilbert class field $H_A$ enters in the definition of the Goss Zeta-function
(in particular in the exponentiation of ideals) and we have to take it into account in all our interpolation formulas and
in the definition of our $\mathfrak{p}$-adic $L$-series.
\noindent Fix a finite set $S$ of primes of $F$ and let $F_S$ be the maximal abelian extension of
$F$ unramified outside $S$ with $G_S:=\Gal(F_S/F)$. For any prime $\nu$, let $d_\nu$ be its degree
and, if $\nu\not\in S$, denote by $\phi_\nu$ the Frobenius of $\nu$ in $G_S$. The leading role in this paper
will be played by the Stickelberger series
\[ \Theta_S (X) = \prod_{\nu \not\in S}\left(1 - \phi_{\nu}^{-1} X^{d_\nu}\right)^{-1}
\in \Z [G_S] \llbracket X \rrbracket \,.\]
\subsubsection{Analytic side} In Sections \ref{SecStickSer}, \ref{SecStickGossZeta} and
\ref{SecSticknuadicL} we prove convergence properties for $\Theta_S(X)$ and test it against
characters $\Psi:\Z[G_S]\longrightarrow L$ to provide interpolation formulas for\begin{itemize}
\item the Artin $L$-function $L_F$ (for $L=\C$, Theorem \ref{ThmCollegamentoArtinL});
\item the Goss Zeta-function $\zeta_A$ (for $L=\C_\infty$, Theorem
\ref{teorema stickelberger-goss});
\item various $\nu$-adic Zeta-functions $\zeta_\nu$ (for $L=\C_\nu$,
Theorem \ref{teorema interpolazione v-adica}),
\end{itemize}
where $\C_\eta$ is the completion of an algebraic closure of the completion $F_\eta$ of $F$
at a prime $\eta$ (for both cases $\eta$ finite or infinite). Then we construct a $\nu$-adic $L$-series which, via its relation with $\Theta_S(X)$,
interpolates the values of $\zeta_\nu$ at integers for $\nu\in S-\{\infty\}$ (and a bit more, see
Theorem \ref{teorema interpolazione v-adica2}).
As an example we mention here the interpolation we obtain for the Goss Zeta-function
\[ \zeta_A(s) = \sum \mathfrak{a}^{-s} \qquad
\text{ with } s \in \Si:=\C_\infty^\times \times \Zp \, , \]
where the sum is taken over all the nonzero ideals $\mathfrak{a}$ of $A$.
This function represents the natural analogue of the Dedekind Zeta-function of a number field.
For any $y\in \Z_p$ we define a continuous character $\Psi_y : G_S \rightarrow \C_\infty^\times$
via
\[\Psi_y (\phi_\nu) = N \left( \langle \nu \rangle_\infty^{-1} \right)^{y/f} \]
(details in Section \ref{SecInterpolation of the Goss Zeta-function}, here it suffices to say
that $N$ is a norm, $f$ is a power of $p$ and $\langle \nu \rangle_\infty$ is a 1-unit so that taking the $\frac{y}{f}$-th power makes sense).
For every $s=(x,y) \in \Si$ we have
\begin{equation}\label{EqIntro}
\Psi_y \left( \Theta_S (X) \right) (x) = \zeta_A (-s) \prod_{\nu \in S \,,\, \nu \neq \infty}(1-\nu^s) \,.
\end{equation}
\subsubsection{Algebraic side}
Let $\Phi : A \rightarrow H_A \{ \tau \}$ be a Hayes module (more details on all objects mentioned here are in
Section \ref{SecStickClassGroups}): fix a prime $\mathfrak{p}$ of $F$ with degree $d_\mathfrak{p}$ and denote
by $F_n$ the extension of $H_A$ generated by the $\mathfrak{p}^{n+1}$-torsion of $\Phi$. The field $F_n$ is an abelian
Galois extension of $F$ ramified only at $\mathfrak{p}$ and $\infty$. These fields form an
Iwasawa tower
\[
F \subset H_A \subset F_0 \subset F_1 \subset \dots \subset F_n \subset \dots \subset \bigcup_{n \in \N}F_n =: \mathcal{F}
\]
and, if we put $\Gamma_n = \Gal(F_n / F_0)$, we have
\[
\Gamma_\infty := \Gal(\mathcal{F} / F_0) = \lim_\leftarrow \Gal(F_n / F_0) \simeq \Zp^{\infty}.
\]
Let $C_n:=\mathcal{C}\ell^0(F_n)$ be the $p$-part of the class group of degree zero divisors
of $F_n$: it is a $\Zp[\Gamma_n]$-module in a natural way and the $C_n$ form a projective system
with respect to the norm maps. We define
$\displaystyle{ C_\infty:= \lim_\leftarrow C_n}$, which is a module over the
non-noetherian \emph{Iwasawa algebra} $\Zp \llbracket \Gamma_\infty \rrbracket$.
To study the structure of $C_\infty$ we consider $\chi$-parts with respect to
the characters of the group $G_0:=\Gal(F_0/F)$ which acts naturally on $C_n$ and $C_\infty$.
We need two simplifying assumptions (which are not required for the analytic part of the theory):
\begin{itemize}
\item $\deg(\infty)=d_\infty=1$, this ensures that all extensions we work with are geometric but it is not restrictive because
we can always reduce to this case by enlarging the constant field of $F$;
\item the class number of degree zero divisors $h^0(F)$ is prime with $p$, this is necessary to avoid characters of order $p$,
but it is not too restrictive.
\end{itemize}
We extend all scalars to $W=\Zp[\zeta]$, the Witt ring generated by a root of unity $\zeta$ of order $|G_0|$.
Let $S=\{\mathfrak{p},\infty\}$, let $\Theta_\infty(X)$ be the projection of the Stickelberger
series $\Theta_S(X)$ to $\Z[ \Gamma_\infty \times G_0]\llbracket X \rrbracket$ and write
$\Theta_\infty(X,\chi) = \chi(\Theta_\infty)(X) \in W[\Gamma_\infty] \llbracket X \rrbracket$
as its $\chi$-part.
We put
\begin{displaymath}
\Theta_\infty^{\sharp}(X,\chi) =
\left\{ \begin{array}{ll}
\Theta_\infty(X,\chi) & \ \mbox{if } \chi \mbox{ is of
type } 1 \,, \\
\ & \\
\displaystyle{\frac{\Theta_\infty(X,\chi)}{1-X} } & \ \mbox{if } \chi \mbox{ is of
type } 2 \,.
\end{array} \right.
\end{displaymath}
Computing Fitting ideals for the $C_n$ and working our way through a limit process we prove
\begin{teo2}{\rm (Theorems \ref{ThmClassGrFinGen} and \ref{TeoFittIdealClGrIwasawaModule})}
Let $\chi$ be a character of type $1$ or $2$. Then $C_\infty(\chi)$ is a finitely generated
module over the Iwasawa algebra $\Lambda:=W\llbracket \Gamma_\infty \rrbracket$, and
\begin{displaymath}
{\rm Fitt}_{\Lambda} \left(C_\infty(\chi) \right) =
\left( \Theta_\infty^{\sharp}(1,\chi)\right) \,.
\end{displaymath}
\end{teo2}
This is what we call IMC for this setting, the relations with (special values of)
$\mathfrak{p}$-adic $L$-functions are provided by the analytic interpolation properties
mentioned before.
\begin{osse}\label{RemType3}
For the characters of type 3 we are only able to compute the Fitting ideal of a dual of $C_n$ and
it is often non principal: we have no arithmetic interpretation (from the point of view of Iwasawa
theory) for this situation yet so we decided to present it in a different paper (see \cite[Section 3]{BBC}).
\end{osse}
\subsection{Setting and notations}
\noindent\begin{enumerate}
\item[$\bullet$] $F$ is a global function field of characteristic $p>0$, i.e. a finite algebraic extension of a field of
transcendence degree 1 over a finite field $\F_{p^r}:=\Fq$ which we call the {\em constant field} of $F$.
A more geometric interpretation would be to consider $F$ as the function field of a smooth projective curve
$X$ defined over $\Fq$;
\item[$\bullet$] $\infty$ is a fixed place of $F$ and $A$ is the subring of $F$ of the elements regular outside the place $\infty$;
\item[$\bullet$] for any place $\nu$ of $F$ (including $\infty$), $F_{\nu}$ is the completion of $F$ at $\nu$. Its ring of integers
will be denoted by $O_\nu$ and $U_1(\nu)$ will be the group of $1$-units of $F_\nu$.
The residue field $O_\nu/(\nu):=\F_\nu$ is a finite extension of $\Fq$ of degree $d_\nu := [\F_\nu : \Fq]$
(also called the {\em degree} of $\nu$), its order will be denoted by $\textbf{N}\nu := q^{d_\nu}$;
\item[$\bullet$] $v_\nu: F_\nu \rightarrow \Z$ is the (canonical) valuation at $\nu$ and $\pi_\nu$ will denote a fixed uniformizer
for $F_\nu$, i.e. an element with $v_\nu(\pi_\nu)=1$;
\item[$\bullet$] the degree of a fractional ideal $\mathfrak{a} = \displaystyle{\prod_{\nu \neq \infty} \nu^{n_\nu}}$ of $A$ is the
quantity $\deg(\mathfrak{a}) = \displaystyle{\sum_{\nu \neq \infty} n_\nu d_\nu}$.
\end{enumerate}
\section{Stickelberger series and Artin $L$-function}\label{SecStickSer}
In this first section we introduce the main object of both the analytic and algebraic sides of the theory: the {\em Stickelberger series}. We
provide here its convergence properties and its relation with complex Artin $L$-functions. In the subsequent sections it will appear as
an incarnation of various $L$ or Zeta-functions and, on the algebraic side, as a generator for Fitting ideals of class groups.
\subsection{Stickelberger series}
Let $S$ be a nonempty finite set of places of $F$ that contains $\infty$ and denote by $F_S$ the maximal abelian extension of $F$
unramified outside $S$ and with $G_S := \Gal(F_S / F)$ its Galois group. For every place
$\nu \not\in S$, let $\phi_\nu$ be the Frobenius at $\nu$, i.e. the unique
element of $G_S$ that satisfies
\[ \phi_\nu (x) \equiv x^{\textbf{N}\nu} \pmod{\tilde{\nu}} \]
for every $x \in F_S$, where $\tilde{\nu}$ is any place of $F_S$ lying above $\nu$.
The extension $F_S / F$ is unramified at $\nu$, so
the decomposition group of $\nu$ in $G_S$ is pro-cyclic and topologically generated by $\phi_\nu$.
\begin{defi}\label{DefStick}
The Stickelberger series of $S$ is the power series defined by the Euler product
\[ \Theta_S (X) = \prod_{\nu \not\in S}\left(1 - \phi_{\nu}^{-1} X^{d_\nu}\right)^{-1}
\in \Z [G_S] \llbracket X \rrbracket \,.\]
\end{defi}
\noindent For an equivalent formula, recall that every Euler factor $e_\nu(X):= 1 - \phi_{\nu}^{-1} X^{d_\nu}$ is invertible in
$\Z [ G_S ] \llbracket X \rrbracket$ and let $\mathcal{I}_S$ be
the set of fractional ideals of $A$ with support outside $S$ (recall $\infty \in S$). Let
$\phi_{\mathfrak{a}}$ be the Artin symbol for $\mathfrak{a} \in \mathcal{I}_S$, i.e.
$\displaystyle{\mathfrak{a}=\prod_{\nu\not\in S} \nu^{n_\nu} \mapsto \phi_{\mathfrak{a}} = \prod_{\nu\not\in S} \phi_{\nu}^{n_\nu}}$,
then
\[ \Theta_S (X) = \sum_{\mathfrak{a} \in \mathcal{I}_S ,\, \mathfrak{a} \geqslant 0}
\phi_{\mathfrak{a}}^{-1} X^{\deg \mathfrak{a}} =
\sum_{n\geqslant 1} \bigg( \sum_{\substack{\mathfrak{a} \in \mathcal{I}_S ,\, \mathfrak{a} \geqslant 0 \\ \deg \mathfrak{a}=n}}
\phi_{\mathfrak{a}}^{-1} \bigg) X^n \]
(where $\mathfrak{a} \geqslant 0$ denotes the integral ideals of $A$).
For any $n$ there exists only a finite number of primes $\nu$ with degree equal to $n$, hence
the series on the right is an element of $\Z [ G_S ] \llbracket X \rrbracket$.
\subsection{Artin $L$-functions}\label{SecArtinL}
Let $K/F$ be a finite subextension of $F_S$ whose Galois group is $G$ and let $S_K \subseteq S$
be the set of ramified places together with $\infty$ (in particular $S_F=\{\infty\}$).
For every prime $\nu$ let $\phi_{K,\nu} \in G$ be its Artin symbol: if $\nu\not\in S$, then
$\phi_{K,\nu}$ is the image of $\phi_\nu$ via the canonical projection
$G_S \twoheadrightarrow G$, while for a ramified prime $\nu$, any lifting
of its Frobenius in $G/I(\nu)$ (where $I(\nu)$ is the inertia at $\nu$ in $G$) will do.
For every complex character $\chi$ of $G$, i.e. an element of $\text{Hom}(G, \C^{\times})$, we put
$\chi(\nu) = \chi(\phi_{K,\nu})$
\begin{defi}\label{DefArtinL}
The {\em Artin $L$-function} associated to $(K, \chi)$ is the complex variable function
\[ L_{K/F}(s, \chi) = \prod_{\nu\not\in S_K} \left(1 - \chi(\nu) ({\bf N}\nu)^{-s} \right)^{-1},
\quad \text{for } \mathfrak{Re}(s) > 1 \]
(where the condition $\mathfrak{Re}(s) > 1$ guarantees convergence).
\end{defi}
Our goal in this section is to provide a link between $L_{K/F}(s, \chi)$ and $\Theta_S (X)$. In what follows we present formal
equalities and avoid mentioning the radius of convergence: to be on the safe side one can always assume $\mathfrak{Re}(s)> 1$.
\noindent Let $\Psi : G_S \rightarrow \C^{\times}$ be a continuous character of $G_S$, i.e. a continuous homomorphism
with respect to the natural topologies: it induces a ring homomorphism $\Z [ G_S ] \llbracket X \rrbracket \rightarrow \C \llbracket X \rrbracket$
(still denoted by $\Psi$).
\begin{teo}\label{ThmCollegamentoArtinL}
\begin{enumerate}
\item[(a)] Let $K/F$, $G$ and $\chi$ be as above, then there exists a continuous character $\Psi$ of $G_S$
such that
\begin{equation}\label{rappresentazione complessa}
\Psi \left( \Theta_S (X) \right) (q^{-s}) =
L_{K/F}(s, \chi^{-1}) \prod_{\nu \in S - S_K}\left(1 - \chi^{-1}(\nu)q^{-s d_{\nu}} \right) \,.
\end{equation}
\item[(b)] Let $\Psi$ be a continuous character of $G_S$. Then there exists $K\subset F_S$, finite over $F$ and a complex character $\chi$ of
$\Gal(K/F)$ such that equation \eqref{rappresentazione complessa} holds.
\end{enumerate}
\end{teo}
\begin{proof}
(a) Let $\pi_K$ be the canonical projection $G_S \twoheadrightarrow G$ and put $\Psi := \chi \circ \pi_K$, so that
$\Psi(\phi_\nu^{-1})=\chi^{-1}(\phi_{K,\nu})$ for all $\nu\not\in S$.
Clearly $\Psi$ is a continuous character of $G_S$ and
\begin{eqnarray}
\Psi \left( \Theta_S(X) \right)(q^{-s}) & = & \prod_{\nu\not\in S} \left(1 - \chi^{-1}(\phi_{K,\nu})
q^{-s d_\nu} \right)^{-1} \nonumber\\
& = & L_{K/F}(s, \chi^{-1}) \prod_{\nu \in S - S_K}\left(1 -
\chi^{-1}(\nu)q^{-s d_\nu} \right) \,. \nonumber
\end{eqnarray}
(b) The profinite group $G_S / \Ker(\Psi)$ is topologically isomorphic to $\Psi (G_S)$ which is a
compact subgroup of $\C^{\times}$, so $\Ker(\Psi)$ has finite index.
Let $K$ be the fixed field of $\Ker(\Psi)$, so that $\Gal(K/F)\simeq G_S / \Ker(\Psi)$, and let $\chi$ be the character induced by $\Psi$
on this quotient. By definition $\Psi(\phi_\nu) = \chi(\phi_{K,\nu})$ and
\begin{eqnarray}
\Psi \left( \Theta_S(X) \right) & = & \prod_{\nu\not\in S} \left(1 - \Psi(\phi_\nu^{-1})X^{d_\nu}
\right)^{-1}
= \prod_{\nu\not\in S} \left(1 - \chi^{-1}(\phi_{K,\nu})
X^{d_\nu} \right)^{-1} \nonumber\\
& = & \prod_{\nu\not\in S_K} \left(1 - \chi^{-1}(\nu)X^{d_\nu} \right)^{-1}
\prod_{\nu\in S-S_K} \left(1 - \chi^{-1}(\nu)X^{d_\nu} \right) \,. \nonumber
\end{eqnarray}
Equation \eqref{rappresentazione complessa} follows immediately evaluating at $X=q^{-s}$.
\end{proof}
\subsection{Stickelberger series and the Tate algebra}\label{SecStickTate}
As an application of the previous theorem we prove that the Stickelberger series lies in the Tate algebra. \\
Let $\mathcal{R}$ be any topological ring. The Tate algebra $\mathcal{R}\langle X \rangle$ is the set
of formal power series whose coefficients converge to $0$, in
particular it contains the polynomial ring $\mathcal{R}[X]$.
Let $\mathcal{O}$ be the ring of integers of a finite extension of $\Qp$. We will be mainly interested in rings
of the form $\mathcal{R} = \mathcal{O} \llbracket \Gamma \rrbracket$, where $\Gamma$ will be the Galois group
of an infinite extension of function fields. We recall that the topology on this ring is the weakest such that the projection
$\mathcal{O} \llbracket \Gamma \rrbracket \twoheadrightarrow \mathcal{O} [\Gal(K/F)]$ is continuous for each finite subextension
$K/F$: hence a sequence of elements $a_n$ of
$\mathcal{O} \llbracket \Gamma \rrbracket$ converges to $0$ if and only if the sequence of their projections is equal to
$0$ when $n$ is big enough, for each finite subextension $K/F$. \\
We consider $\Theta_S(X)$ as an element of $\mathcal{O}[G_S]\llbracket X \rrbracket$ via the (continuous)
embedding $\Z \hookrightarrow \mathcal{O}$.
\begin{prop}\label{TateAlg}
The series $\Theta_S(X)$ is an element of the Tate algebra $\mathcal{O} \llbracket G_S \rrbracket \langle X \rangle$.
\end{prop}
\begin{proof}
Since $(1 - qX)^{-1} = \displaystyle{\sum_{n\geqslant 0}q^nX^n}$ is
a unit in $\mathcal{O} \llbracket G_S \rrbracket \langle X \rangle$, it is enough to show that $f(X) := (1 - qX)\Theta_S(X)$
is in the Tate algebra.
\noindent Let $\Psi : G_S \rightarrow \C^\times$ be a continuous character. Following part (b) of Theorem \ref{ThmCollegamentoArtinL},
let $K$ be the fixed field of $\Ker(\Psi)$ and $\chi$ the character induced by $\Psi$ on $\Gal(K/F)$ (note that, by definition, $\chi$ is trivial
if and only if $\Psi$ is trivial on $G_S$, which leads to $K=F$ and $S_F= \{\infty\}$).
Hence we have
\[
\Psi \left( \Theta_S (X) \right) (q^{-s}) =
L_{K/F}(s, \chi^{-1}) \prod_{\nu \in S - S_K}\left(1 - \chi^{-1}(\nu)q^{-s d_{\nu}} \right).
\]
The {\em full} Artin $L$-function is defined by the Euler product on all primes $\nu$
\[
\widetilde{L}_{K/F}(s, \chi^{-1}) = \prod_{\nu} \left(1 - \chi^{-1}(\nu) (\textbf{N}\nu)^{-s} \right)^{-1}
\]
and differs from $L_{K/F}(s, \chi^{-1})$ only for the factors associated to the primes of $S_K$. Thus
\begin{align*}
\Psi\left(f(X)\right)(q^{-s}) &= (1-q^{1-s})\Psi \left( \Theta_S (X) \right) (q^{-s}) \\
&= (1-q^{1-s})\widetilde{L}_{K/F}(s, \chi^{-1}) \prod_{\nu \in S}\left(1 - \chi^{-1}(\nu)q^{-s d_{\nu}} \right).
\end{align*}
A theorem of Weil \cite[V, Th\'eor\`em 2.5]{TateStark} shows that if $\chi \neq \chi_0$, then $\widetilde{L}_{K/F}(s, \chi^{-1})$
is a polynomial in $q^{-s}$, and, for $\chi = \chi_0$, we have
\[
\widetilde{L}_{K/F}(s, \chi_0)= \frac{P(q^{-s})}{(1-q^{-s})(1-q^{1-s})},
\]
where $P(X)$ is a polynomial of degree $2g-2$ ($g$ is the genus of $F$). Hence $\Psi\left(f(X)\right)$ is a polynomial
for each continuous character $\Psi$ (here we use the fact that $S$ is not empty):
for each finite subextension $K/F$
\[ \pi_K\left( f(X) \right) \in \Z[\Gal(K/F)][X] \]
(with $\pi_K$ the natural projection) and $f(X) \in \Z \llbracket G_S \rrbracket \langle X \rangle \subset
\mathcal{O} \llbracket G_S \rrbracket \langle X \rangle$.
\end{proof}
In Section \ref{SecStickClassGroups} we will need to evaluate the Stickelberger series $\Theta_S(X)$ at some element of
$\mathcal{O}\llbracket G_S \rrbracket$, the previous proposition grants us that if we take $x$ in the unit disk
$\{ x \in \mathcal{O}\llbracket G_S \rrbracket : |x| \leqslant 1 \}$, then
$\Theta_S(x)$ converges.
\section{Stickelberger series and Goss Zeta-function}\label{SecStickGossZeta}
We begin by giving a short description of the Goss Zeta-function and of its main properties (most notably its entireness): some
results are known, we give references where avaliable and refer the reader to \cite{CoscPhD} for more details.
\subsection{ The Goss Zeta-function}\label{Goss Zeta-function}
Let $\C_\infty$ be the completion of a fixed algebraic closure of $F_\infty$ and put $\Si:=\C_\infty^\times \times \Z_p$.
The analogue of the Dedekind Zeta-function for $F$ has been originally defined
for some special values (the integers) by Carlitz in \cite{Carlitz} and later extended by Goss as a $\C_\infty$-valued function whose domain is $\Si$
in \cite{Goss Zeta}. This work of Goss may be interpreted as a sort of analytic continuation of the function defined by Carlitz.
\noindent We give the definition and a summary of the main properties of the {\em Goss Zeta-function}, details and proofs
can be found in \cite[Chapter 8]{Goss libro} or in \cite[Sections 1.4 and 1.5]{CoscPhD}.
\begin{defi}\label{DefSgn}
A {\em sign function} on $F_\infty$ is any homomorphism ${\rm sgn} : F_{\infty}^{\times} \rightarrow
\F_{\infty}^{\times}$ such that its restriction to $\F_{\infty}^{\times}$ is the identity.
We extend ${\rm sgn}$ to all $F_\infty$ by defining ${\rm sgn}(0) = 0$.
\end{defi}
\noindent We fix a generator $\pi_\infty$ of the maximal ideal of $F_\infty$ and say that the
sign function sgn is {\em normalized} if $\text{sgn}(\pi_\infty) = 1$. Since $U_1(\infty)$ is a pro-$p$-group
and the image of sgn has order prime to $p$, every sign function is
trivial on $U_1(\infty)$. The isomorphism
\begin{equation}\label{decomposizione gruppo moltiplicativo}
F_\infty^\times \simeq \pi_{\infty}^{\Z}\times \F_{\infty}^{\times} \times U_1(\infty)
\end{equation}
allows us to write any $a\in F_\infty^\times$ uniquely as
\begin{displaymath}
a = \pi_{\infty}^{v_{\infty}(a)}\cdot \text{sgn}(a)\cdot \langle a \rangle_{\infty}.
\end{displaymath}
We say an element $a\in F$ is {\em positive} if $\text{sgn}(a)=1$ and denote by $A_+$ the set of positive elements in $A$.
Let $\mathcal{I}$ be the set of nonzero fractional ideals of $F$ and denote by $\mathcal{P}_+$ the principal fractional ideals
with a positive generator. The group $\mathcal{I}/\mathcal{P}_+$ is finite and we put $h^+(A):=|\mathcal{I}/\mathcal{P}_+|$:
it is easy to see that $h^+(A) = h^0(F) \cdot d_\infty \cdot (q^{d_\infty}-1) / (q-1)$.
We recall that $d_\infty=[\F_\infty :\F_q]$ and, for any
$a\in F_\infty^\times$, define the {\em degree} of $a$ as $\deg(a) = - d_\infty v_{\infty}(a)$.
Note that if $I = (i)$ is principal, then the definition of $\deg(i)$ coincides with the degree of the ideal $I$,
i.e. $\deg(i)=\deg(I):=|A/I|$.
\noindent For every $u \in U_1(\infty)$ and $y \in \Z_p$ the series $\displaystyle{\sum_{n \geqslant 0} \binom{y}{n}(u-1)^{n}}$
converges in $U_1(\infty)$, so we put
\begin{displaymath}
u^y = ((u-1)+1)^y := \sum_{n \geqslant 0} \binom{y}{n}(u-1)^{n} \,.
\end{displaymath}
\begin{defi}\label{DefIdealExp}
Given any ideal $I$, there exists a positive element $\alpha\in F^\times$ such that $I^{h^+(A)}=(\alpha)$.
Put $\langle I\rangle_\infty:= \langle\alpha\rangle_\infty^{1/h^+(A)}$ as the unique $h^+(A)$-th root of $\langle\alpha\rangle_\infty$
which is still a $1$-unit. Then, for any $s=(x,y) \in \Si$, define
\[ I^s:= x^{\deg(I)}\langle I\rangle_{\infty}^y \,.\]
\end{defi}
\noindent Fix a $d_\infty$-th root of $\pi_\infty$ and call it $\pi_*$: what follows will partly depend on this choice (but see
statement (f) below).
For every integer $j$ we put $s_j = (\pi_*^{-j}, j)$: the map $j \mapsto s_j$ gives us an embedding $\Z \hookrightarrow \Si$.
It is easy to see that $\langle I\rangle_\infty$ and $I^s$ are well defined and belong to a finite extension of $F$:
we list a few fundamental properties of this exponential.
\begin{prop}\label{Exponential}
For every positive $a,b\in F_\infty^\times$, $s,t\in \Si$, $i,j\in \Z$ and every ideal $I\in \mathcal{I}$ one has
\begin{enumerate}
\item [(a)] $(ab)^s = a^s b^s$ and $a^{s+t} =a^s a^t$;
\item [(b)] $a^{s_i} = a^i$ and $(a^{s_i})^{s_j} = a^{s_{ij}}$;
\item [(c)] $I^{s_j}$ is algebraic over $F$ and, if $I=(\alpha) \in \mathcal{P}_+$, then $I^s = \alpha^s$;
\item [(d)] let $F_\textbf{V}$ be the extension of $F$ obtained by adding every element of the form
$I^{s_1}$, then $F_\textbf{V}/F$ is a finite extension with
degree at most $h^+(A)$;
\item [(e)] let $F_{\infty,\textbf{V}}$ be the extension of $F_\infty$ obtained by adding every
element of the form $\langle I \rangle_{\infty}$, then
$F_{\infty,\textbf{V}} / F_\infty$ is a finite $p$-extension with degree dividing $h^+(A)$;
\item [(f)] if $F$ contains all the $d_\infty$-th roots of unity, then $F_\textbf{V}$ does not depend on the
choice of $\pi_\infty$ and $\pi_*$.
\end{enumerate}
\end{prop}
\begin{proof} See \cite[Sections 8.1, 8.2]{Goss libro}, other details can be found in \cite[Section 1.4]{CoscPhD}.
\end{proof}
\begin{defi}
The Goss Zeta-function is defined by the sum
\begin{displaymath}
\zeta_A (s) = \sum_{\mathfrak{a} \in \mathcal{I},\,\mathfrak{a} \geqslant 0} \mathfrak{a}^{-s}
=\sum_{n \geqslant 0} \bigg(\sum_{\substack{\mathfrak{a} \in \mathcal{I},\, \mathfrak{a} \geqslant 0 \\ \deg(\mathfrak{a}) = n}}
\langle \mathfrak{a} \rangle_{\infty}^{-y}\bigg)x^{-n} := \sum_{n \geqslant 0} a_n(y)x^{-n}
\end{displaymath}
for $s=(x,y) \in \Si$.
It converges for $|x|_\infty > 1$ and can also be rewritten as an Euler product
\[ \zeta_A (s) = \prod_{\nu \neq \infty} \left(1 - \nu^{-s} \right)^{-1} =
\prod_{\nu \neq \infty} \left(1 - \langle \nu\rangle_\infty^{-y} x^{-d_\nu)} \right)^{-1} \,. \]
\end{defi}
Estimates on the coefficients $a_n(y)$ allow to prove that the Goss Zeta-function is entire on $\Si$ (in the sense of \cite[Section 8.5]{Goss libro}), i.e.
the series provides an analytic continuation of $\zeta_A(s)$ to the whole $\Si$ (for a sketch of the proof see \cite[Sections 8.8 and 8.9]{Goss libro},
more details are in \cite[Section 1.5]{CoscPhD}).
\begin{teo}\label{ThmGossZetaExt}{\rm (Analytic extension of the Goss Zeta-function)}
The serie $\zeta_A(s)$ is absolutely convergent for every $s= (x,y) \in \Si$ and is also uniformly convergent on the compact subsets
of $\Si$.
\end{teo}
\begin{comment}
\subsection{Convergence of the Goss Zeta-function}\label{sezione convergenza G-Z function}
Here, following ideas of \cite[Sections 8.8 and 8.9]{Goss libro}, we give an explicit quadratic lower bound for $v_\infty(a_n(y))$,
which obviously implies the entireness of $\zeta_A(s)$. With the same techniques one can approach
convergence issues also for more general $\nu$-adic functions, e.g. the ones in Section \ref{SecSticknuadicL}.
\noindent \underline{Step 1: first reduction}.
For any $j=1,\dots,h^+$, fix a representative $\mathfrak{a}_j \in \mathcal{I}$ for the class $C_j$
of $\mathcal{I} / \mathcal{P}_+$. Write fractional ideals as
$\mathfrak{a} = \alpha\mathfrak{a}_j$
and put $n_j=n-\deg(\mathfrak{a}_j)$ to get
\begin{equation}
\label{prima riduzione degli indici}
a_n(y) = \sum_{j=1}^{h^+} \sum_{\substack{\mathfrak{a} \in C_j ,\, \mathfrak{a} \geqslant 0 \\ \deg(\mathfrak{a}) = n}}
\langle \mathfrak{a} \rangle_{\infty}^{-y}
= \sum_{j=1}^{h^+} \langle \mathfrak{a}_j \rangle_\infty^{-y}\sum_{\substack{\alpha \in F_+ ,\, \alpha\mathfrak{a_j} \geqslant 0 \\ \deg(\alpha) = n_j}}
\langle \alpha \rangle_\infty^{-y} := \sum_{j=1}^{h^+} \langle \mathfrak{a}_j \rangle_\infty^{-y}\cdot b_{n,j}(y) \,.
\end{equation}
Since $|\langle \mathfrak{a}_j \rangle_\infty^{-y}|_\infty = 1$, it is enough to bound
$v_\infty\left( b_{n,j}(y) \right)$ for $d_\infty\mid n$ (otherwise $b_{n,j}(y) = 0$).
\noindent \underline{Step 2: Riemann-Roch spaces}.
\noindent For any $x\in F^\times$, let ${\rm Div}(x)$ be its divisor, i.e. the element
\begin{displaymath}
{\rm Div}(x) = \sum_{\nu} \text{ord}_\nu (x)\nu \in {\rm Div}(F),
\end{displaymath}
we use a similar definition for ${\rm Div}(\mathfrak{a})$ for any ideal $\mathfrak{a}\geqslant 0$: note that
if $(x)\geqslant 0$, the elements ${\rm Div}(x)$ and ${\rm Div}((x))$ might differ in the component at $\infty$.
\noindent For every $i \in \N$ let $D_i = {\rm Div} (\mathfrak{a}_j) + (n_j / d_\infty - i)\infty$ and let
$\mathcal{L}(D_i)$ be its Riemann-Roch space
\begin{displaymath}
\mathcal{L}(D_i) = \left\{ \alpha \in F^\times : {\rm Div}(\alpha) + D_i \geqslant 0 \right\} \,.
\end{displaymath}
The divisors $D_i$ are sorted in descending order, i.e. $\mathcal{L}(D_i)\supseteq \mathcal{L}(D_{i+1})$ for any $i$, and
we have the equality
\begin{equation}
\label{Caratterizzazione Spazi RR}
\mathcal{L}(D_i) = \left\{ \alpha \in \mathcal{L}(D_0) : v_\infty(\alpha) \geqslant i - \frac{n_j}{d_\infty} \right\} \,.
\end{equation}
By the Riemann-Roch theorem, for any $i < (n-2g+2) / d_\infty$, each $\mathcal{L}(D_i)$ is a vector space over $\F_q$ of dimension
\begin{equation}\label{Eqli}
\ell_i = \deg(D_i) - g + 1 = n - id_\infty -g + 1,
\end{equation}
where $g$ is the genus of $F$. Since we look for an asymptotic bound as $n\rightarrow +\infty$,
we can always assume that there is some index $i$ for which the previous equality holds.
\noindent From \eqref{Caratterizzazione Spazi RR} we have that $\alpha \in F^\times$ verifies
$\alpha \mathfrak{a}_j \geqslant 0$ and $\deg (\alpha) = n_j$
if and only if $\alpha \in \mathcal{L}(D_0) - \mathcal{L}(D_1)$ (note that in this case
$v_\infty(\alpha)=-\frac{n_j}{d_\infty}$ because $\deg({\rm Div}(\alpha))=0$). If we put
$\mathcal{X}= \{ \alpha \in \mathcal{L}(D_0) - \mathcal{L}(D_1) : \text{sgn}(\alpha) = 1 \}$, we can rewrite
$b_{n,j}(y)$ as
\begin{displaymath}
b_{n,j}(y) = \sum_{\alpha \in \mathcal{X}} \langle \alpha \rangle_\infty^{-y} \,.
\end{displaymath}
\begin{lemma}
Let $a \in \mathcal{L}(D_1)$ and $b \in \mathcal{X}$. Then $a+b \in \mathcal{X}$.
\end{lemma}
\begin{proof}
Obviously $a+b$ belongs to $\mathcal{L}(D_0)$, moreover $v_\infty(a) \geqslant 1 - n_j / d_\infty$ and $v_\infty(b) = - n_j / d_\infty
< v_\infty(a)$ yield
\[ v_\infty (a + b) = \text{min} \{v_\infty(a), v_\infty(b)\} = - \frac{n_j}{d_\infty} = v_\infty(b), \]
so that $a+b \not\in \mathcal{L}(D_1)$. \\
To show that $a+b$ is positive just note that for every $\alpha \in F_\infty^\times$ we have $\text{sgn}(\alpha) \equiv \alpha
\pi_\infty^{-v_\infty(\alpha)} \pmod{\pi_\infty}$. Moreover $b$ is positive and $v_\infty(a)>v_\infty(b)$: hence
\begin{equation}\begin{array}{ll}
\text{sgn}(a+b) & \equiv (a+b)\pi_\infty^{-v_\infty(a+b)} \pmod{\pi_\infty} \\
\ & \equiv (a+b)\pi_\infty^{-v_\infty(b)} \pmod{\pi_\infty}\equiv 1 \pmod{\pi_\infty}. \qquad \qedhere \end{array}
\end{equation}
\end{proof}
\noindent The previous lemma tells us that $\mathcal{L}(D_1)$ acts on the set $\mathcal{X}$ via traslation.
The action is obviously free and we can decompose $\mathcal{X}$ as the disjoint union of orbits
$\mathcal{X}_1, \mathcal{X}_2,\dots \mathcal{X}_r\,$. Fix an element $x_l \in \mathcal{X}_l$ for each orbit, then
\[ b_{n,j}(y) = \sum_{\alpha \in \mathcal{X}} \langle \alpha \rangle_\infty^{-y} =
\sum_{l=1}^r \sum_{\alpha \in \mathcal{X}_l} \langle \alpha \rangle_\infty^{-y}
= \sum_{l=1}^r \sum_{u \in \mathcal{L}(D_1)} \langle u + x_l \rangle_\infty^{-y} \,. \]
Putting
\begin{equation}\label{Def h_n(y)}
h_{n,j,l}(y):= \sum_{u \in \mathcal{L}(D_1)} \langle u + x_l \rangle_\infty^{-y} \,,
\end{equation}
we are reduced to proving a bound for the growth $v_\infty \left( h_{n,j,l}(y)\right)$.
The following statment is \cite[Lemma 8.8.1]{Goss libro} (or \cite[Theorems 5.1.2 and 5.5.2]{Thakur}).
\begin{lemma}
\label{lemma Goss algebra lineare}
Let $K$ be a function field with constant field $\F_q$, $v$ any normalized valuation on $K$ and $W\subset K$
an $\F_q$-vector space with finite dimension. Assume that $v(w)>0$ for every $w \in W$.
\begin{enumerate}
\item[(a)] If $i$ is an integer with $0 \leqslant i < (q-1) \dim_{\F_q} W$, then for every $x \in K$ we have
\begin{displaymath}
\sum_{w \in W} (x+w)^i = 0 \,.
\end{displaymath}
\item[(b)] For every $i \in \N^+$ we put $W_i = \{w \in W : v(w)\geqslant i \}$, then for every $y \in \Z_p$
we have
\begin{displaymath}
v\left( \sum_{w \in W} (1 + w)^y \right) \geqslant (q-1) \sum_i \dim_{\F_q} W_i \,.
\end{displaymath}
\end{enumerate}
\end{lemma}
We use this lemma to give an explicit estimate of the valuation of $h_{n,j,l}(y)$ that allows us
to understand its asymptotic behaviour.
\begin{lemma}
For all $y\in \Z_p$ we have
\[ v_\infty ( h_{n,j,l}(y)) \geqslant \frac{(q-1)n^2}{{2d_\infty}} + O(n) \,.\]
\end{lemma}
\begin{proof}
By definition of $\mathcal{X}$ we have that $x_l$ is positive, $v_\infty(x_l)=-\frac{n_j}{d_\infty}$ and $v_\infty\left(\frac{u}{x_l}\right)>0$
for any $u\in \mathcal{L}(D_1)$. Hence
\begin{displaymath}
\langle u + x_l \rangle_\infty = \pi_\infty^{-v_\infty(u+x_l)}(u + x_l)
= \pi_\infty^{n_j / d_\infty} x_l \left(1 + \frac{u}{x_l}\right)
\end{displaymath}
is a product of two $1$-units and
\begin{displaymath}\begin{array}{ll}
h_{n,j,l}(y) & = \displaystyle{(\pi_\infty^{n_j / d_\infty}x_l)^{-y} \sum_{u \in \mathcal{L}(D_1)} \left(1 + \frac{u}{x_l}\right)^{-y} }\\
\ & = \displaystyle{(\pi_\infty^{n_j / d_\infty}x_l)^{-y} \sum_{w \in x_l^{-1}\mathcal{L}(D_1)} (1 + w)^{-y}.}\end{array}
\end{displaymath}
The elements of $x_l^{-1}\mathcal{L}(D_1)$ have positive valuation at $\infty$
and the vector space $x_l^{-1}\mathcal{L}(D_1)$ satisfies the hypotheses of Lemma \ref{lemma Goss algebra lineare}
part (b). Hence
\begin{displaymath}
v_\infty \left( h_{n,j,l}(y) \right) =
v_\infty \Bigg( \sum_{w \in x_l^{-1}\mathcal{L}(D_1)} (1 + w)^{-y} \Bigg) \geqslant (q-1) \sum_i \dim_{\F_q} W_i,
\end{displaymath}
where $W_i = \{ w \in x_l^{-1}\mathcal{L}(D_1) : v_\infty(w) \geqslant i \}$.
Now note that $w$ is in $W_i$ if and only if $u=x_l w$ is in $\mathcal{L}(D_1)$ and $v_\infty(u) \geqslant i + v_\infty(x_l) = i - n_j / d_\infty$,
i.e $u \in \mathcal{L}(D_i)$. Therefore the map $w \in W_i \mapsto x_l w \in \mathcal{L}(D_i)$ is an
isomorphism of $\F_q$-vector spaces,
\begin{displaymath}
\text{dim}_{\F_q} W_i = \text{dim}_{\F_q} \mathcal{L}(D_i) = \ell_i \,.
\end{displaymath}
and
\[ \sum_i \dim_{\F_q} W_i \geqslant \sum_{i=1}^{\lfloor(n-2g+2)/d_\infty\rfloor}\ell_i \,.\]
Finally, recalling \eqref{Eqli}, for $n \gg 0$ we have
\[ \begin{array}{ll}
\displaystyle{ \sum_i \dim_{\F_q} W_i } & \geqslant \displaystyle{ \sum_{i=1}^{n/d_\infty + O(1)} (n - id_\infty + O(1)) }\nonumber \\
& = \displaystyle{ \left( n + O(1) \right)\left(\frac{n}{d_\infty} + O(1) \right) - d_\infty
\sum_{i=1}^{n/d_\infty + O(1)} i} \nonumber \\
& = \displaystyle{ \frac{n^2}{d_\infty} + O(n) - \frac{d_\infty}{2}\left(\frac{n}{d_\infty} + O(1) \right)
\left(1+ \frac{n}{d_\infty} + O(1) \right) } \nonumber \\
& = \displaystyle{ \frac{n^2}{d_\infty} + O(n) - \frac{n^2}{2d_\infty} + O(n) = \frac{n^2}{2d_\infty} + O(n) \,. \qquad \qquad\qedhere}\nonumber
\end{array} \]
\end{proof}
From this lemma, equation \eqref{EqGossZetaSommaSuN} and the previous remarks it follows that
\begin{teo}\label{ThmGossZetaExt}{\rm (Analytic extension of the Goss Zeta-function)}
The series
\[ \zeta_A(s)=\sum_{n \geqslant 0} a_n(y)x^{-n} \]
is absolutely convergent for every $(x,y) \in \Si$ and is also uniformly convergent on the compact subsets
of $\Si$.
\end{teo}
\end{comment}
\subsection{Interpolation of the Goss Zeta-function}\label{SecInterpolation of the Goss Zeta-function}
Let $W_S$ be the subgroup of $G_S$ generated by all Artin symbols $\phi_\nu$ with $\nu \not\in S$ and
let $K$ be the fixed field of the topological closure of $W_S$. Since $\phi_\nu$ is a topological generator
of the decomposition group of $\nu$ in $G_S$, the extension $K/F$ is totally split at every prime $\nu \not\in S$
and the Tchebotarev density theorem yields $K = F$, i.e. $G_S$ is the topological closure of
$W_S$.
\begin{lemma}\label{lemma frobenius diversi per primi diversi}
Let $\lambda$ and $\mu$ be two distinct primes outside $S$, then $\phi_\lambda \neq \phi_\mu$.
\end{lemma}
\begin{proof}
This is just class field theory: consider the following subgroup of the
id\'eles $\If$ of $F$
\begin{displaymath}
H := F_\mu^\times \times \prod_{\nu \neq \mu ,\, \nu \not\in S} O_\nu^\times
\times \prod_{\nu\in S}\{ 1 \},
\end{displaymath}
and let $K$ be the class field of $F^\times H$ (as usual $F^\times$ is embedded diagonally
in $\If$). Since $K/F$ is unramified outside $S$, totally split at $\mu$ and
inert in $\lambda$, the decomposition
groups of $\mu$ and $\lambda$ in $G_S$ do not coincide and their Artin symbols are distinct.
\end{proof}
\noindent Let $f:=[F_{\infty,\textbf{V}}:F_\infty]$ (recall that $f$ is a power of $p$ by Proposition \ref{Exponential} part (e))
and let $N : F_{\infty,\textbf{V}}^\times \rightarrow F_\infty^\times$ be the norm map. For any $y \in \Z_p$ and
any $\nu \not\in S$ we define
\begin{equation}\label{EqDefPsiy}
\Psi_y (\phi_\nu) = N \left( \langle \nu \rangle_\infty^{-1} \right)^{y/f} \,.
\end{equation}
This is well defined because the norm sends $1$-units to $1$-units and it is possible to take the
$f$-th root without ambiguity.
\begin{lemma}
\label{lemma estension carattere psi}
The map $\Psi_y$ extends to a group homomorphism $\Psi_y : G_S \rightarrow \C_\infty^\times$
and induces a $\C_\infty^\times$-character on $\If$.
\end{lemma}
\begin{proof}
Since $W_S$ is generated by the Artin symbols, we just put
\[ \Psi_y (\sigma) = \Psi_y\bigg(\prod_{\nu\not\in S} \phi_\nu^{n_\nu}\bigg)=\prod_{\nu\not\in S} \Psi_y (\phi_\nu)^{n_\nu} .\]
Now $\Psi_y : W_S \rightarrow \C_\infty^\times$ is a continuous homomorphism (as composition of continuous maps) and it can be extended to the topological closure $G_S$.
It is well defined (by Lemma \ref{lemma frobenius diversi per primi diversi}) and can be extended to id\'eles via the natural injective map
\[ \varphi: \mathcal{I}\longrightarrow \If \,,\ {\rm given\ by}\quad
\varphi(\mathfrak{a}) =\prod_\nu \pi_\nu^{v_\nu(\mathfrak{a})} ,\]
and the reciprocity map $\text{rec}_S : \If \rightarrow G_S$. Since
$\Ker (\text{rec}_S) = \displaystyle{ F^\times \cdot \prod_{\nu \not\in S}O_\nu^\times}$,
the map ${\rm rec}_S\circ\varphi$ is still injective. Obviously $\sigma=\displaystyle{\prod_{\nu\not\in S} \phi_\nu^{n_\nu}}\in W_S$
is $({\rm rec}_S\circ \varphi)\bigg( \displaystyle{\prod_{\nu\not\in S} \nu^{n_\nu}}\bigg)=
({\rm rec}_S\circ \varphi)(\mathfrak{a})$ for some fractional ideal $\mathfrak{a}$ in
$\mathcal{I}$, and $\Psi_y(\sigma)$ does not depend on the chosen expression for $\sigma$.
\end{proof}
\noindent We mention that the interpretation of $\Psi_y$ as a $\C_\infty^\times$-character on $S$-id\'eles
is the approach suggested in \cite[Theorem 3.8 and Remark 3.9]{ABBL}: we shall see a more
explicit relation between $\Psi_y$ and ${\rm rec}_S$ in the special case presented in the next section.
\noindent The extension $\Psi_y : \Z [G_S]\llbracket X \rrbracket \rightarrow \C_\infty \llbracket X \rrbracket$
gives an interpolation formula for the Goss Zeta-function (the case of the
Carlitz cyclotomic extension is presented in \cite[Theorem 4.2]{BBC}).
\begin{teo}
\label{teorema stickelberger-goss}
For every $s=(x,y) \in \Si$ we have
\begin{displaymath}
\Psi_y \left( \Theta_S (X) \right) (x) = \zeta_A (-s) \prod_{\nu \in S ,\, \nu \neq \infty}(1-\nu^s) \,.
\end{displaymath}
\end{teo}
\begin{proof}
Let $\nu$ be a prime outside $S$, assume $[\nu]$ has order $n$ in $\mathcal{I} / \mathcal{P}_+$ and let $\alpha$
be a positive element such that $\nu^n = (\alpha)$. By definition $\langle \nu\rangle_\infty^n=\langle\alpha\rangle_\infty$.
Now write $n=p^r n'$ with $(p, n')=1$ and let $u\in U_1(\infty)$ be the only
$1$-unit verifying $u^{n'}=\langle \alpha \rangle_\infty$, so that $\langle \nu \rangle_\infty$ is
a root of $f(X) = X^{p^r} - u \in F_\infty[X]$. Let $g(X)$ be the minimal polynomial of
$\langle \nu \rangle_\infty$ over $F_\infty$. Since $f(X)$ is totally inseparable, it must be $f(X) = g(X)^{p^l}$
and $g(X) = X^{p^k} - v$, where $l, k$ and $v$ satisfy $r= k+ l$ and $u = v^{p^l}$. Then $F_\infty(\langle \nu \rangle_\infty)/F_\infty$
has degree $p^k$, while $F_{\infty,\textbf{V}} / F_\infty(\langle \nu \rangle_\infty)$ has degree $f / p^k$. Therefore
\begin{displaymath}
N\left(\langle \nu \rangle_\infty\right) = N_{F_\infty(\langle \nu \rangle_\infty)/F_\infty}(\langle \nu \rangle_\infty)^{f/p^k}
= v^{f/p^k} = \langle \nu \rangle_\infty^f
\end{displaymath}
(everything works for $p=2$ as well since in that case $v =- v$).\\
Hence $\Psi_y (\phi_\nu) = \langle \nu \rangle_\infty^{-y}$ and
\[ \begin{array}{ll} \Psi_y \left( \Theta_S (X) \right)(x) & = \displaystyle{ \prod_{\nu\not\in S} \left(1 - \Psi_y(\phi_\nu^{-1})
x^{d_\nu} \right)^{-1} = \prod_{\nu\not\in S} \left(1 - \langle \nu \rangle_\infty^{y}
x^{d_\nu} \right)^{-1} }\nonumber \\
& = \displaystyle{\zeta_A(-s) \prod_{\nu\in S ,\, \nu\neq\infty} (1 - \nu^{s}) \,.}\hspace{4truecm}\nonumber \qedhere
\end{array} \]
\end{proof}
\subsection{A special case}
Here we provide a link between $\Psi_y$ and the Artin reciprocity map assuming that the
class number of $F$ is $1$ and that $d_\infty=1$ (the hypotheses we shall use in Section \ref{SecStickClassGroups}):
in particular $\Fi=\F_q$ and every element of
$F^\times$ can be written uniquely as product of a constant and a positive element.
We choose an uniformizer at $\infty$ by simply taking a prime $\mathfrak{p} \neq \infty$ of degree $1$,
letting $\pi_{\mathfrak{p}}$ be its unique positive generator and then putting $\pi_\infty := \pi_{\mathfrak{p}}^{-1}$.
Note that this uniformizer is positive and is an element of $F$ \footnote{If $F$ is the rational function field
$\Fq(t)$, and $\infty=\frac{1}{t}$, we are simply taking as uniformizer the element $\pi_\infty = 1/(t-\alpha)$,
where $\alpha$ is any element of $\Fq^\times$ and $\mathfrak{p} = (t - \alpha)$. }. Finally note that, in the
notations of Proposition \ref{Exponential}, $F_{\textbf{V}} = F$ and $F_{\infty,\textbf{V}} = F_\infty$:
therefore $\Psi_y(\phi_\nu) = \langle \pi_\nu \rangle_\infty^{-y}$ belongs to $U_1(\infty)$.
\begin{teo} \label{ThmIsoH}
Let $F_{\infty, +}^\times$ be the kernel of the sign function. The natural inclusion
\begin{displaymath}
F_{\infty, +}^\times \times \prod_{\nu \neq \infty} O_\nu^\times =: \mathcal{H} \hookrightarrow \If
\end{displaymath}
induces an isomorphism $\mathcal{H}\simeq \If / F^\times$.
\end{teo}
\begin{proof}
Let ${\bf i} = (i_\infty, i_{\nu_1}, i_{\nu_2}, \dots)$
and ${\bf j} = (j_\infty, j_{\nu_1}, j_{\nu_2}, \dots)$ be two id\'eles in $\mathcal{H}$ with the same image in $\If/F^\times$, i.e.
there is an $x \in F^\times$ such that
$\textbf{i} = x\textbf{j}$. For every $\nu\neq\infty$, $i_\nu = x j_\nu$ yields $v_\nu(x)=0$ because $i_\nu$ and $j_\nu$ are units.
Moreover the product formula implies $v_\infty(x) = \displaystyle{-\sum_{\nu\neq\infty} d_\nu v_\nu(x) = 0}$ and so $x$ is a
constant. Finally since $i_\infty = x j_\infty$ and both $i_\infty$ and $j_\infty$ are positive,
we have $x=1$. \\
To complete the proof we need surjectivity: let $\textbf{i} = (i_\infty, i_{\nu_1}, i_{\nu_2}, \dots)\in \If$ and put
\begin{displaymath}
x_{\bf i} = \text{sgn}(i_\infty)^{-1}\prod_{\nu \neq \infty}
\pi_\nu^{-v_\nu(i_\nu)} \in F^\times\,.
\end{displaymath}
It is easy to check that the id\'ele $x_{\bf i}\textbf{i}$ is in $\mathcal{H}$, and the proof is complete.
\end{proof}
Let $C_F:=\If /F^\times$ and consider the subgroup $O_S = \displaystyle{\prod_{\nu\not\in S}O_\nu^\times}/F^\times$: by
class field theory, the Artin map induces a continuous embedding
$\text{rec}_S : C_F / O_S \hookrightarrow G_S$,
which is not surjective because $G_S$ is profinite, while the quotient
$C_F / O_S$ is not. Let $\widehat{C_F / O_S}$ be the profinite completion of
$C_F / O_S$, then the map $\text{rec}_S$ extends to an isomorphism of topological groups
$ \widehat{\text{rec}}_S : \widehat{C_F / O_S} \stackrel{\sim}{\longrightarrow} G_S$ and, by Theorem \ref{ThmIsoH}, one has the isomorphism
\begin{displaymath}
\widehat{C_F / O_S}\simeq \widehat{\langle \pi_\infty\rangle} \times U_1(\infty) \times
\prod_{\substack{ \nu \in S \\ \nu \neq \infty}} O_\nu^\times
\end{displaymath}
where $\widehat{\langle \pi_\infty\rangle} \simeq \widehat{\Z}$. We denote by
$\widehat{\pi}$ the canonical projection $\widehat{C_F / O_S} \twoheadrightarrow U_1(\infty)$.
\begin{teo}
For every $y \in \Zp$ we have the following commutative diagram
\[ \xymatrix{ G_S \ar[r]^{\Psi_y\ \ } \ar[d]_{\widehat{\rm rec}_S^{-1}} & U_1(\infty) \\
\widehat{C_F/O_S} \ar@{->>}[r]_{\widehat{\pi}\ } & U_1(\infty), \ar[u]_{y} }\]
where $y$ denotes the raise-to-the-power $y$ map.
\end{teo}
\begin{proof}
We prove the case $y=1$ first. Since $G_S$ is the topological closure of $W_S$, and all maps are continuous,
it is enough to show that $\Psi_1(\phi_\nu) = \widehat{\pi} \circ \widehat{rec}_S^{-1}(\phi_\nu)$ for every $\nu\not\in S$. \\
The local Artin map $\text{rec}_\nu$ sends $\pi_\nu$
to $\phi_\nu$, because the extension $F_S / F$ is unramified at $\nu$.
Let $\textbf{i}_\nu$ be the id\'ele whose $\nu$-coordinate is equal to $\pi_\nu$ and whose $\mu$-coordinates
for $\mu\neq \nu$ are all equal to $1$, and let $[\textbf{i}_\nu] \in C_F$ be its equivalence class. Then
\[ \phi_\nu = \text{rec}_S \left( [\textbf{i}_\nu] \right) =
\text{rec}_S \left( [ \pi_\nu^{-1}\textbf{i}_\nu] \right) \]
and, noting that $\pi_\nu^{-1}\textbf{i}_\nu\in\mathcal{H}$, we obtain
\begin{displaymath}
\widehat{\pi} \circ \widehat{rec}_S^{-1}(\phi_\nu) = \langle \pi_\nu^{-1}\rangle_\infty = \Psi_1(\phi_\nu) \,.
\end{displaymath}
For a general $y \in \Zp$ note that, for any Artin symbol
$\phi_\nu$, we have $\Psi_y (\phi_\nu) = \Psi_1 (\phi_\nu)^y$.
\end{proof}
\section{Stickelberger series and $\nu$-adic Zeta-functions}\label{SecSticknuadicL}
Fix a place $\nu$ different from $\infty$: in this section we consider a $\nu$-adic analogue of the Goss Zeta-function.
Let $F_\nu$, $\C_\nu$, $\F_\nu$ and $\pi_\nu$ be the
$\nu$-adic versions of the objects defined for the place $\infty$. Fix an algebraic
closure $\overline{F}$ of $F$ and let $\iota : \overline{F} \hookrightarrow \C_\nu$ be
an $F$-embedding that is the identity on the compositum of the algebraic closure of $\F_q$ and
$F_{\textbf{V}}$. All the objects that we define here depend on $\iota$,
but we will omit this dependency to simplify notations. \\
The field $F_{\nu,\textbf{V}} := \iota(F_\textbf{V})F_\nu$ will play the role of $F_{\infty,\textbf{V}}$: as in Proposition \ref{Exponential},
one can show that $F_{\nu,\textbf{V}}$ is a $p$-extension of $F_\nu$ with degree dividing $h^+(A)$.
The residue field of $F_{\nu,\textbf{V}}$ is still $\F_\nu$ and the cyclic group $\Z / |\F_\nu^\times|$ acts on its multiplicative subgroup.
Let $\Sv = \C_\nu^\times \times \Z_p \times \Z / |\F_\nu^\times|$, which is a subgroup of the group of
$\C_\nu^\times$-valued characters on $F_\nu^\times$, and take $s_\nu = (x,y,j) \in \Sv$: we have to define
the exponential $I^{s_\nu} \in \C_\nu^\times$, for every fractional ideal $I \in \mathcal{I}$ coprime with $\nu$.
\noindent For $s_1=(\pi_*^{-1},1)\in \Si$ the element $I^{s_1} \in F_\textbf{V}$ is a root of the polynomial
$X^{h^+(A)} - \alpha$, where $\alpha$ is the unique positive generator of $I^{h^+(A)}$, so the valuation at $\nu$ of $I^{s_1}$ is equal to zero.
Hence $\iota (I^{s_1})$ is a unit in $F_{\nu,\textbf{V}}$ and can be written uniquely as a product
\begin{displaymath}
\iota (I^{s_1}) = \omega (I) \langle I \rangle_\nu\,,
\end{displaymath}
for some $\omega (I) \in \F_\nu^\times$ and $\langle I \rangle_\nu$ a $1$-unit of $F_{\nu,\textbf{V}}$.
With the above notation, it is easy to check that the map $\omega : \mathcal{I}_\nu \rightarrow \F_\nu^\times$ sending $I$ to $\omega(I)$
is a group homomorphism on the group $\mathcal{I}_\nu$ of fractional ideals prime with $\nu$
(it is basically a {\em Teichm\"uller character}).
\noindent Finally for $s_\nu = (x,y,j) \in \Sv$ and $I\in\mathcal{I}_\nu$ we define
\begin{displaymath}
I^{s_\nu} = x^{\deg(I)} \omega(I)^j \langle I \rangle_\nu^y \,.
\end{displaymath}
We can embed $\Z$ in $\Sv$ via the map $j \in \Z \mapsto s_{\nu,j}=(1,j,j) \in \Sv$ and
one can show that this $\nu$-adic exponential satisfies properties analogous to the ones of
Proposition \ref{Exponential}.
\begin{prop}
For every $s_{\nu},t_{\nu} \in \Sv$, $I,J \in \mathcal{I}_\nu$ and $i,j\in \Z$, one has
\begin{enumerate}
\item[$\bullet$] $I^{s_{\nu}+t_{\nu}} =I^{s_{\nu}} I^{t_{\nu}}$ and $(IJ)^{s_{\nu}} = I^{s_{\nu}} J^{s_{\nu}}$.
\item[$\bullet$] $(I^{s_{\nu,i}})^{s_{\nu,j}} = I^{s_{\nu, ij}}$ and $I^{s_{\nu,j}} = I^{s_j}$.
In particular $I^{s_{\nu,j}}$ is algebraic over $F$.
\end{enumerate}
\end{prop}
\begin{defi}\label{DefGossnu}
The {\em $\nu$-adic Goss Zeta-function} is defined as
\begin{displaymath}
\zeta_\nu(s_\nu) = \sum_{\mathfrak{a} \in \mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0} \mathfrak{a}^{-s_\nu}
= \prod_{\mathfrak{p} \neq \nu,\infty} (1 - \mathfrak{p}^{-s_\nu})^{-1} \,.
\end{displaymath}
\end{defi}
\subsection{Interpolation of the $\nu$-adic Zeta-function}\label{SecInterpolvadicZeta}
We look for an analogue of Theorem \ref{teorema stickelberger-goss} for $\zeta_\nu(s_\nu)$:
this will be done only for primes $\nu \in S - \{\infty\}$, so for the rest of this section we take such a prime
$\nu$ assuming $\#S\geqslant 2$.
Let $f_\nu$ be the degree of the extension $F_{\nu,\textbf{V}} / F_\nu$ and denote by
$N_\nu : F_{\nu,\textbf{V}}^\times \rightarrow F_\nu^\times$ the norm map. Take $(y,j) \in \Z_p \times \Z/ |\F_\nu^\times|$ and,
for $\mathfrak{p} \not\in S$, put
\[ \Psi_{y,j}(\phi_\mathfrak{p}) =
N_\nu (\langle \mathfrak{p}\rangle_\nu^{-1})^{y/f_\nu}\omega(\mathfrak{p})^{-j} \,,\]
which is well defined by Lemma \ref{lemma frobenius diversi per primi diversi}. Adapting the proof of Lemma \ref{lemma estension carattere psi}
one obtains
\begin{lemma}
For every $(y,j) \in \Z_p \times \Z/ |\F_\nu^\times|$ the map $\Psi_{y,j}$ extends to a
continuous ring homomorphism $\Z[G_S] \llbracket X \rrbracket \rightarrow \C_\nu\llbracket X \rrbracket$.
\end{lemma}
Here is the relation between Stickelberger series and the $\nu$-adic Zeta-function.
\begin{teo}\label{teorema interpolazione v-adica}
For every $s_\nu=(x,y,j) \in \Sv$ (with $\nu\in S-\{\infty\}$) we have
\begin{displaymath}
\Psi_{y,j} \left( \Theta_S (X) \right) (x) = \zeta_\nu (-s_\nu) \prod_{\substack{\mathfrak{p} \in S \\
\mathfrak{p} \neq \nu,\infty}}(1-\mathfrak{p}^{s_\nu}).
\end{displaymath}
\end{teo}
\begin{proof}
Le $\mathfrak{p}$ be a prime not in $S$, $n$ the exact order of $[\mathfrak{p}]$ in
$\mathcal{I} / \mathcal{P}_+$ and $\alpha$ a positive element such that
$\mathfrak{p}^n = (\alpha)$. We have $(\mathfrak{p}^n)^{s_1} = (\alpha)^{s_1} = \alpha$ and so
\begin{displaymath}
\omega(\mathfrak{p})^n \langle \mathfrak{p}\rangle_\nu^n =
\iota (\mathfrak{p}^{s_1})^n = \iota (\alpha)^{s_1} = \alpha \,,
\end{displaymath}
which leads to $\langle \mathfrak{p}\rangle_\nu^n = \langle \alpha\rangle_\nu$. \\
Proceeding like in Theorem \ref{teorema stickelberger-goss}, one finds that
$F_{\nu,\textbf{V}}/F_\nu(\langle\mathfrak{p}_\nu\rangle)$ has degree $f_\nu/p^k$ and
\begin{displaymath}
N_\nu\left(\langle \mathfrak{p} \rangle_\nu\right) = N_{K/F_\nu}(\langle \mathfrak{p}
\rangle_\nu)^{f_\nu/p^k} = \langle \mathfrak{p} \rangle_\nu^{f_\nu} \,.
\end{displaymath}
From this we obtain that $\Psi_{y,j} (\phi_\mathfrak{p}) =
\omega(\mathfrak{p})^{-j}\langle \mathfrak{p} \rangle_\nu^{-y}$ and
\[ \Psi_{y,j} \left( \Theta_S (X) \right) =
\prod_{\mathfrak{p}\not\in S} \left(1 - \Psi_{y,j} (\phi_\mathfrak{p}^{-1})X^{d_\mathfrak{p}} \right)^{-1} =
\prod_{\mathfrak{p}\not\in S} \left(1 - \omega(\mathfrak{p})^j\langle \mathfrak{p}\rangle_\nu^{y} X^{d_\mathfrak{p}} \right)^{-1} \ .\]
Hence
\[ \Psi_{y,j} \left( \Theta_S (X) \right)(x) = \prod_{\mathfrak{p}\not\in S} \left(1 - \omega(\mathfrak{p})^j \langle \mathfrak{p}
\rangle_\nu^{y} x^{d_\mathfrak{p}} \right)^{-1}=\zeta_\nu(-s_\nu) \prod_{\substack{\mathfrak{p}
\in S \\ \mathfrak{p}\neq\nu,\infty}}(1 -
\mathfrak{p}^{s_\nu}) \,.\qquad \qedhere \]
\end{proof}
\subsection{Interpolation via a $\nu$-adic $L$-function}\label{SecvadicLfuncInterpolation}
We investigate the values of $\nu$-adic Zeta-functions at integers, introducing
$\nu$-adic $L$-series to interpolate them. This is one of the main features of
Iwasawa theory, where $\mathfrak{p}$-adic $L$-functions (for $\mathfrak{p}$ a prime in a global field) usually represent the analytic counterpart of
characteristic ideals of Iwasawa modules.
We shall use the following (see \cite[Lemma 8.8.1]{Goss libro} or \cite[Theorem 5.1.2]{Thakur}).
\begin{lemma}
\label{lemma Goss algebra lineare}
Let $K$ be a function field with constant field $\F_q$, $v$ any normalized valuation on $K$ and $W\subset K$
an $\F_q$-vector space with finite dimension. Assume that $v(w)>0$ for every $w \in W$.
If $i$ is an integer with $0 \leqslant i < (q-1) \dim_{\F_q} W$, then for every $x \in K$ we have
\[ \sum_{w \in W} (x+w)^i = 0 \,. \]
\end{lemma}
\noindent For each pair of non negative integers $j$ and $n$, we define
\[ S_n(j) = \sum_{\mathfrak{a} \geqslant 0,\,\deg \mathfrak{a} = n} \mathfrak{a}^{s_j}
\quad{\rm and}\quad
Z(X,j) = \sum_{n \geqslant 0} S_n(j)X^n \in F_{\textbf{V}}\llbracket X\rrbracket \,.\]
\begin{lemma}
The $Z(X,j)$ are polynomials of degree less than or equal to
$d_\infty + 2g + \lfloor \frac{j}{q-1}\rfloor$.
\end{lemma}
\begin{proof}
Fix a non negative integer $j$ and an $n> d_\infty + 2g + \lfloor \frac{j}{q-1}\rfloor$.
\noindent For any $\ell=1,\dots,h^+$, fix a representative $\mathfrak{a}_\ell\in \mathcal{I}$ for the class $C_\ell$ of
$\mathcal{I} / \mathcal{P}_+$. Then
\begin{displaymath}
S_n(j) =\sum_{j=1}^{h^+} \sum_{\substack{\mathfrak{a} \geqslant 0,\, \mathfrak{a} \in C_\ell \\ \deg(\mathfrak{a}) = n }} \mathfrak{a}^{s_j}
= \sum_{j=1}^{h^+} \mathfrak{a}_\ell^{s_j}\cdot\sum_{\substack{\alpha \in F_+ ,\,
\alpha \mathfrak{a}_\ell \geqslant 0 \\ \deg(\alpha) = n - \deg(\mathfrak{a}_\ell)}} \alpha^j :=
\sum_{j=1}^{h^+} S_n(C_\ell, j)\,.
\end{displaymath}
To prove $S_n(C_\ell,j)=0$, we put $n_\ell = n - \deg(\mathfrak{a}_\ell)$ and only consider the case $d_\infty\mid n_\ell$, otherwise
the claim is trivial. Let $\mathcal{X}:=\{ \alpha\in F_+\,:\, \deg(\alpha)=n_\ell\ {\rm and}\ \alpha \mathfrak{a}_\ell\geqslant 0\}$,
denote by $D_1$ the divisor ${\rm Div}(\mathfrak{a}_\ell) + (n_\ell / d_\infty - 1)\infty$ and by
$\mathcal{L}(D_1):=\{ \alpha\in F^\times\,:\, {\rm Div}(\alpha)+D_1\geqslant 0\}$ the associated Riemann-Roch space.
The set $\mathcal{L}(D_1)$ acts freely by traslation on $\mathcal{X}$: write $\mathcal{X}$ as the union of $r$ orbits $\mathcal{X}_l$ and
fix a representative $x_l \in \mathcal{X}_l$. Then
\begin{displaymath}
S_n(C_\ell, j) = \mathfrak{a}_\ell^{s_j} \sum_{l=1}^r \sum_{u \in \mathcal{L}(D_1)} (u + x_l)^j =
\mathfrak{a}_\ell^{s_j}\sum_{l=1}^r x_l^j \sum_{w \in x_l^{-1}\mathcal{L}(D_1)} (w + 1)^j \,.
\end{displaymath}
We have $v_\infty (x_l) = - n_\ell / d_\infty$ and $v_\infty (u) \geqslant 1 - n_\ell / d_\infty$.
Therefore $v_\infty (w)$ is positive for every $w \in x_l^{-1}\mathcal{L}(D_1)$ and
the vector space $x_l^{-1}\mathcal{L}(D_1)$ satisfies the hypotheses of
Lemma \ref{lemma Goss algebra lineare}. Hence the inner sum is zero when
$j < (q-1)\dim_{\F_q}\mathcal{L}(D_1) = (q-1)(n - d_\infty -g + 1)$ (the last equality comes from the Riemann-Roch theorem).
\end{proof}
The polynomials $Z(X,j)$ are strictly related to the special values of the Goss Zeta-function since we have that
$Z(1,j) = \zeta_A(-s_j)$ for any $j\in \N$. We provide here a $\nu$-adic interpolation of this polynomials, which will be
linked to the special values of the $\nu$-adic Goss Zeta-function.
\begin{defi}\label{DefLnu}
For any $y \in \Zp$ and $i \in \Z / | \F_\nu^*|$, the {\em $\nu$-adic $L$-series} is defined by
\begin{displaymath}
L_\nu(X, y, \omega^i) = \sum_{n \geqslant 0} \bigg( \sum_{\substack{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0\\
\deg(\mathfrak{a}) = n }}
\omega (\mathfrak{a})^i \langle \mathfrak{a} \rangle_\nu^y \bigg) X^n \,.
\end{displaymath}
\end{defi}
\begin{prop}
For every $s_\nu = (x,y,i) \in \Sv$ we have
\begin{equation} \label{EqLnuInterpolatesZnu}
L_\nu (x, y , \omega^i) = \zeta_\nu (-s_\nu).
\end{equation}
\end{prop}
\begin{proof}
For a fractional ideal $\mathfrak{a}$ coprime with $\nu$, we have $\mathfrak{a}^{s_\nu} =
\omega (\mathfrak{a})^i \langle \mathfrak{a} \rangle_\nu^y x^{\text{deg} \, \mathfrak{a}}$, so
\begin{align*}
L_\nu (x, y , \omega^i) & = \sum_{n \geqslant 0}\ \sum_{\substack{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0\\
\deg(\mathfrak{a}) = n }} \omega (\mathfrak{a})^i \langle \mathfrak{a} \rangle_\nu^y
x^n \\
\ & = \sum_{n \geqslant 0} \ \sum_{\substack{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0\\
\deg(\mathfrak{a}) = n }} \mathfrak{a}^{s_\nu} =
\sum_{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0} \mathfrak{a}^{s_\nu} = \zeta_\nu (-s_\nu)\,. \qquad\qedhere
\end{align*}
\end{proof}
\noindent The previous proposition, Theorem \ref{teorema interpolazione v-adica} and Section \ref{SecStickTate}
show that the function $L_\nu(X,y,\omega^i)$ converges on the closed unit disc: since our application to class groups will
only require specialization at $X=1$ we do not deal with its entireness here (which anyway can be proved just like the
entireness of $\zeta_A$).
\noindent The relation with the polynomials $Z(X,j)$ for some particular values of $i$ and $j$ can be made more explicit: in particular the following
theorem shows that, for some $i$ and $j$, the series $L_\nu(X, y, \omega^i)$ is actually a polynomial.
Computations will shift between $\infty$ and $\nu$ using formulas seen in Section
\ref{SecInterpolation of the Goss Zeta-function}.
\begin{teo}\label{teorema interpolazione v-adica2}
Assume that $\nu \in S-\{\infty\}$.
\begin{enumerate}
\item[(a)] Let $i$ and $j$ be two non negative integers, such that $i \equiv j \pmod{q^{d_\nu} -1}$,
then
\begin{displaymath}
L_\nu(X, j, \omega^i) = Z(X,j)(1- \nu^{s_j}X^{d_\nu}) \,.
\end{displaymath}
In particular $L_\nu(X, j, \omega^i)$ in a polynomial.
\item[(b)] For every $y \in \Zp$ we have
\begin{displaymath}
L_\nu(X, y, \omega^i) \equiv Z(X,i) \pmod{\overline{\nu}} \,,
\end{displaymath}
where $\overline{\nu}$ denotes any prime of $F_{\textbf{V}}$ lying above $\nu$.
\end{enumerate}
\end{teo}
\begin{proof}
(a) Using the unique factorization of ideals in $A$ and the multiplicativity on $\mathcal{I}$
of the maps $I\mapsto\langle I \rangle_\nu$ and $I\mapsto \omega(I)$
one rewrites
\begin{equation}\label{equazione con nu - parte prima}
L_\nu(X, j, \omega^i) = \prod_{\mathfrak{p} \neq \nu, \infty} \left( 1 -
\omega (\mathfrak{p})^i \langle \mathfrak{p} \rangle_\nu^j
X^{d_\mathfrak{p}}\right)^{-1} \,.
\end{equation}
In the proof of Theorem \ref{teorema interpolazione v-adica} we have seen that this product is equal to
\begin{displaymath}
\Psi_{j,i}\left( \Theta_S(X) \right) \cdot \prod_{\substack{\mathfrak{p} \in S \\
\mathfrak{p} \neq \infty , \nu}}\left( 1 - \omega (\mathfrak{p})^i
\langle \mathfrak{p} \rangle_\nu^j X^{d_\mathfrak{p}}\right)^{-1} \,.
\end{displaymath}
Since $i \equiv j \pmod{q^{d_\nu} -1}$ and $\iota$ is the identity on $\mathfrak{p}^{s_1}\in F_{\textbf{V}}$, one has
\begin{displaymath}
\Psi_{j,i} (\phi_\mathfrak{p}^{-1}) = \omega (\mathfrak{p})^i \langle \mathfrak{p}
\rangle_\nu^j = \omega (\mathfrak{p})^j \langle \mathfrak{p}
\rangle_\nu^j = \iota \left( \mathfrak{p}^{s_1}\right)^j = \mathfrak{p}^{s_j} = \pi_*^{-jd_\mathfrak{p}}
\langle \mathfrak{p} \rangle_\infty^j = \Psi_j (\phi_\mathfrak{p}^{-1})
\pi_*^{-jd_\mathfrak{p}} \,.
\end{displaymath}
Therefore
\begin{eqnarray}
\Psi_{j,i} \left( \Theta_S (X) \right) & = & \prod_{\mathfrak{p} \not\in S} \left( 1 -
\Psi_{j,i} (\phi_\mathfrak{p}^{-1})
X^{d_\mathfrak{p}}\right)^{-1} \nonumber \\
& = & \prod_{\mathfrak{p} \not\in S} \left( 1 -
\Psi_j (\phi_\mathfrak{p}^{-1})\pi_*^{-jd_\mathfrak{p}}
X^{d_\mathfrak{p}}\right)^{-1} = \Psi_j \left( \Theta_S (\pi_*^{-j}X) \right) \,,\nonumber
\end{eqnarray}
and
\begin{equation}\label{equazione intermedia con L-nu}
L_\nu(X, j, \omega^i) = \Psi_j \left( \Theta_S (\pi_*^{-j}X) \right) \cdot
\prod_{\substack{\mathfrak{p} \in S \\
\mathfrak{p} \neq \infty , \nu}}\left( 1 - \mathfrak{p}^{s_j} X^{d_\mathfrak{p}}\right)^{-1} \,.
\end{equation}
The same arguments used to obtain \eqref{equazione con nu - parte prima}, yield
$ Z(X,j) = \displaystyle{ \prod_{\mathfrak{p} \neq \infty} }\left( 1 - \langle \mathfrak{p} \rangle_\infty^j
(\pi_*^{-j}X)^{d_\mathfrak{p}}\right)^{-1}$ which can be rewritten as
\begin{displaymath}
Z(X,j) = \Psi_j \left( \Theta_S (\pi_*^{-j}X) \right) \cdot
\prod_{\substack{\mathfrak{p} \in S \\
\mathfrak{p} \neq \infty}}\left( 1 - \mathfrak{p}^{s_j} X^{d_\mathfrak{p}}\right)^{-1} \,.
\end{displaymath}
Together with \eqref{equazione intermedia con L-nu}, this leads to
$ L_\nu(X, j, \omega^i) = Z(X,j)(1- \nu^{s_j}X^{d_\nu})$.
\noindent (b) For every ideal $\mathfrak{a}$ we have
$\langle \mathfrak{a} \rangle_\nu^y \equiv
1 \equiv \langle \mathfrak{a} \rangle_\nu^i \pmod{\overline{\nu}}$.
Hence
\[\begin{array}{ll}
L_\nu(X, y, \omega^i) & = \displaystyle {\sum_{n \geqslant 0} \bigg( \sum_{\substack{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0\\
\deg (\mathfrak{a}) = n }}
\omega (\mathfrak{a})^i \langle \mathfrak{a}
\rangle_\nu^y \bigg) X^n } \nonumber \\
&\equiv \displaystyle{ \sum_{n \geqslant 0} \bigg( \sum_{\substack{\mathfrak{a}\in\mathcal{I}_\nu,\,\mathfrak{a} \geqslant 0\\
\deg (\mathfrak{a}) = n }}
\omega (\mathfrak{a})^i \langle \mathfrak{a}
\rangle_\nu^i \bigg) X^n \pmod{\overline{\nu}} } = L_\nu(X, i, \omega^i) \pmod{\overline{\nu}} \nonumber \\
& = Z(X,i)(1- \nu^{s_i}X^{d_\nu}) \pmod{\overline{\nu}} \equiv Z(X,i) \pmod{\overline{\nu}} \,. \nonumber
\qquad\qedhere\end{array} \]
\end{proof}
\section{Stickelberger series and class groups}\label{SecStickClassGroups}
In this section we shall deal with the algebraic side of the theory: we study the $p$-part of class groups of degree zero divisors
of the finite subextension of a $\Z_p^\infty$-extension of $F$ generated by the torsion of a
Hayes module, the main result is the computation of the Fitting ideal of the inverse limit of such groups
(Theorem \ref{TeoFittIdealClGrIwasawaModule}), which turns out to be generated by (a specialization of) our
Stickelberger series. This provides one instance of the Main Conjecture in our setting: the link
between the Fitting ideal (i.e. the Stickelberger series) and the various $L$-functions has been described in details in the
previous sections. Our strategy, which heavily relies on the computations of Greither and Popescu in \cite{Greither Popescu Galois} and
\cite{Greither Popescu Fitting}, puts emphasis on finite subextensions: this approach, closer to the classical one in characteristic zero, has been suggested and developed in \cite{ABBL} for $F=\F_q(t)$.
\begin{osse}\label{RemAltApproach}
An alternative path using limits of characteristic ideals has been described in \cite{BBL},
where the authors study $\Zp^\infty$-extensions of global function fields using $\Zp^d$-filtrations (and the Main
Conjecture for them proved originally by Crew in \cite{Crew} and more recently by Burns and Khue, Lai and Tan
in \cite{Bur}). This approach has been applied also to Iwasawa theory for elliptic curves and abelian varieties in \cite{BBL2},
building on structure theorems for Selmer groups (see e.g. \cite{Tan},
\cite{Tan2} and \cite{BV}) and the only avaliable Main Conjecture in this setting, i.e. the one for
constant abelian varieties in \cite{LLTT}. Applications to a Main Conjecture for $\Z_p^\infty$-extensions and to Akashi series are
provided in \cite[Theorem 3.10]{BBL2} and
\cite[Section 3]{BV2}. It would be interesting to try to apply the finite subextension
approach to this abelian varieties setting as well.
\end{osse}
Some results of this section (basically Theorems \ref{Teorema fitting per caratteri di tipo 1 o 2} and
\ref{Teorema fitting Class Gr per caratteri di tipo 1 o 2})
already appeared in \cite[Section 3]{BBC} as a specialization of more general computations provided in \cite[Section 2]{BBC}.
We decided to include a short account here as well for completeness.
\noindent Throughout this chapter we will assume that $d_\infty = 1$ and that $p$ does not divide $h^0(F)$.
Under these assumptions we have the following simplifications:
\begin{enumerate}
\item[$\bullet$] the residue field $\Fi$ coincides with the field of constants $\Fq$;
\item[$\bullet$] every principal ideal admits a positive generator;
\item[$\bullet$] the class number of the ring of integers $A$ is equal to $h^0(F)$;
\item[$\bullet$] the field $F_{\infty, \textbf{V}}$ coincides with the field $F_\infty$;
\item[$\bullet$] for every $a \in F$: $\deg(a) = - v_\infty(a)$;
\item[$\bullet$] $\pi_* = \pi_\infty$.
\end{enumerate}
As mentioned in the introduction the first assumption is needed to ensure that all extensions we deal
with are geometric and it is not really restrictive because we can reduce to this case by
extending the constant field of $F$. The assumption on $h^0(F)$ is more crucial (but not too restrictive) because we are going
to deal with the characters of a Galois group
whose cardinality is divisible by $h^0(F)$ (see Section \ref{SecComplexChar}).
\subsection{Hayes extensions}
Let $H_A$ be the Hilbert class field of $A$, i.e. the maximal abelian unramified extension of $F$ which is
totally split at $\infty$. Since the prime $\infty$ has degree $1$,
the constant field of $H_A$ is $\Fq$. Class field theory implies that $Pic(A)\simeq \Gal(H_A / F)$ and the isomorphism
is provided by the Artin reciprocity map: in particular the class of a fractional ideal $\mathfrak{a}$ is sent to its Frobenius
in $\Gal(H_A/F)$ and, in case the support of $\mathfrak{a}$ is disjoint from $S$, this is simply the restriction of its
Artin symbol $\phi_\mathfrak{a}\in G_S$.
\begin{defi} \label{DefHayesModule}
We denote by $H_A\{\tau \}$ the ring of skew-polynomials in the variable $\tau$ with coefficients
in $H_A$, where $\tau f=f^q\tau$. A {\em Hayes module} (or {\em sign-normalized rank 1 Drinfeld module})
is a homomorphism of $\Fq$-algebras
$\Phi : A \rightarrow H_A\{\tau \}$, such that:
\begin{enumerate}
\item[(a)] the image of $A$ is not contained in $H_A$;
\item[(b)] for every $a \in A$ the coefficient of degree $0$ of $\Phi_a:=\Phi(a)$ is equal to $a$;
\item[(c)] for every $a \in A$ the degree in $\tau$ of $\Phi_a$ is equal to $\deg(a)$ (i.e. $\Phi$ has rank 1);
\item[(d)] for every $a \in A$, the leading coefficient of $\Phi_a$ is
${\rm sgn} (a)$ (i.e. $\Phi$ is sign-normalized).
\end{enumerate}
\end{defi}
\noindent For details on the Hayes modules and on the properties mentioned below, the reader may refer to \cite[Chapter 7]{Goss libro},
\cite{Hayes Drinfeld} and \cite{Shu Kummer}.
For every $a \in A$ and $x \in \overline{F}$ put $a \cdot x := \Phi_a(x)$; this defines an $A$-module
structure on $\overline{F}$. For any integral ideal $\mathfrak{a}$ of $A$, consider the left ideal of
$H_A\{\tau \}$ generated by all the elements $\Phi_a$ with $a \in \mathfrak{a}$; since $H_A\{\tau \}$
is right-euclidean, we have that every left ideal is principal and we denote by $\Phi_\mathfrak{a}$
the unique monic generator of the ideal $(\Phi_a\,:\,a\in\mathfrak{a})$.
\begin{defi}\label{DefHayesTor}
The {\em $\mathfrak{a}$-torsion} of $\overline{F}$ is the set
\[ \Phi[\mathfrak{a}]:=\{x\in \overline{F}\,:\,\Phi_\mathfrak{a}(x)=0 \} .\]
It is finite for any $\mathfrak{a}\neq 0$ and it is an $A/\mathfrak{a}$-module isomorphic to $A / \mathfrak{a}$.
\end{defi}
\noindent We put $F(\mathfrak{a}):=H_A(\Phi[\mathfrak{a}])$; the following theorem explains how
the $\mathfrak{a}$-torsion of a Hayes module can be used to define extensions of $F$ analogous
to the cyclotomic extension of $\Q$.
\begin{teo}\label{teorema riassuntivo sui gr galois estensioni ciclotomiche}
The field $F(\mathfrak{a})$ is a geometric, abelian Galois extension of $F$ which verifies
\begin{enumerate}
\item[(a)] the only ramified primes in $F(\mathfrak{a}) / H_A$ are the primes of $H_A$ dividing
$\mathfrak{a}$ and $\infty$;
\item[(b)] $Gal \left(F(\mathfrak{a}) / H_A \right) \simeq (A / \mathfrak{a} )^\times$ via an isomorphism
sending $a \in A$ to $\sigma_a$, where $\sigma_a(\lambda) = \Phi_a (\lambda)$ for every $\lambda \in \Phi[\mathfrak{a}]$;
\item[(c)] the isomorphism in {\rm (b)} sends the decomposition and inertia groups of $\infty$
to $\Fq^\times$;
\item[(d)] if $\mathfrak{p}^n$ is the exact power of $\mathfrak{p}$ dividing $\mathfrak{a}$,
then the isomorphism in {\rm (b)} sends the inertia group of $\mathfrak{p}$ to $(A / \mathfrak{p}^n )^\times$.
\end{enumerate}
\end{teo}
\noindent We fix a prime $\mathfrak{p}$ and put $S = \{ \mathfrak{p}, \infty \}$. For any $n\geqslant 0$ let $F_n := F(\mathfrak{p}^{n+1})$
and $G_n = {\rm Gal} (F_n / F)$. From part (b) of Theorem \ref{teorema riassuntivo sui gr galois estensioni ciclotomiche}
we have that $F_n / F_0$ is a finite $p$-extension and that $F_0 / F$ has degree $h^0(F)(q^{d_\mathfrak{p}} -1)$.
Since we assumed $h^0(F)$ coprime with $p$, we obtain a decomposition $G_n\simeq G_0 \times \Gamma_n$, where
$\Gamma_n = \Gal(F_n / F_0)$ is a $p$-group and $G_0$ has order prime with $p$.
The fields $F_n$ form an Iwasawa tower: if we put $\mathcal{F}=\cup F_n$, then
\begin{displaymath}
G_\infty := \Gal(\mathcal{F} / F)= \lim_{\leftarrow} G_n\simeq G_0 \times \lim_{\leftarrow} \Gamma_n
=:G_0\times \Gamma_\infty \,,
\end{displaymath}
with $\Gamma_\infty \simeq \Zp^\infty$. Note that the only primes which ramify in $\mathcal{F} / F$
are $\mathfrak{p}$ and $\infty$, so $\mathcal{F} \subseteq F_S$. The following
diagram gives a recap of the fields and Galois groups introduced above.
\[ \xymatrix{ F \ar@/^1.5pc/@{-}[rrrr]^{G_0} \ar@{-}[rr]^{\ \ \ \ \ Pic(A)} \ar@/_1pc/@{-}[rrrrrr]_{G_n} \ar@/_2.5pc/@{-}[rrrrrrrr]_{G_\infty}
\ar@/_4pc/@{-}[rrrrrrrrr]_{G_S} & & H_A \ar@{-}[rr] & & F_0 \ar@{-}[rr]^{\Gamma_n} \ar@/^1.5pc/@{-}[rrrr]^{\Gamma_\infty} & &
F_n \ar@{-}[rr] & & \mathcal{F} \ar@{-}[r] & F_S } \]
\noindent Regarding the behaviour of primes in these extensions, we recall that
\begin{itemize}
\item any prime different from $\mathfrak{p}$ and $\infty$ is unramified everywhere;
\item $\mathfrak{p}$ is unramified in $H_A / F$ and totally ramified in
$\mathcal{F} / H_A$;
\item $\infty$ is totally split in $H_A / F$, it ramifies (not totally in general) in $F_0 / H_A$
with inertia group isomorphic to $\Fq^\times$, and it is again totally split in $\mathcal{F}/F_0$.
\end{itemize}
\subsection{Fitting ideals and the Greither-Popescu theorem}\label{SecFitt1}
Fix an algebraic closure $\Falg$ of $\Fq$ and let $\gamma$ be the {\em arithmetic Frobenius}, i.e. a topological generator of
$G_\F:=\Gal(\Falg / \Fq)$. For every field $L$ we put $L^{ar}:=\Falg L$; when $L=F_n$ (resp. $\mathcal{F}$),
we have that $F_n^{ar}$ (resp. $\mathcal{F}^{ar}$) is Galois over $F$, with Galois group isomorphic to $G_n \times G_\F$
(resp. $G_\infty \times G_\F$) since $F_n$ (resp. $\mathcal{F}$) is a geometric extension of $F$.
We recall here the definition of Fitting ideal of a finitely generated module. For an in-depth discussion the reader may refer to
\cite[Chapter 3]{Northcott} or to the appendix of \cite{Mazur Wiles} for the main properties.
Let $R$ be any commutative and unitary ring, let $M$ be a finitely generated $R$-module and fix a set of generators
$\{m_1,\dots, m_r\}$ for $M$.
A \emph{relation vector} between the generators $m_i$ is an element $\underline{a} = (a_1,\dots,a_r) \in R^r$
such that $\sum a_im_i =0$. A \emph{matrix of relations} is any $q \times r$ matrix, with $q \geqslant r$, whose rows are
relation vectors.
\begin{defi}
The Fitting ideal of $M$, denoted ${\rm Fitt}_R(M)$, is the ideal generated by the determinants
of all the $r\times r$ minors of all the matrices of relations of $M$.
\end{defi}
\noindent It is well known that ${\rm Fitt}_R(M)$ does not depend on the chosen set of generators, moreover it is enough to
consider square relation matrices of dimension $r$. We recall that ${\rm Fitt}_R(M)\subseteq {\rm Ann}_R(M)$,
i.e. we can have a nontrivial ideal only for torsion modules.
\subsubsection{The modules $H_n(\nu)$}
For every prime $\nu$ of $F$ there exists only a finite number of primes of $F_n^{ar}$ lying
above $\nu$, in particular
\begin{itemize}
\item there are $d_\mathfrak{p} h^0(F)$ primes dividing $\mathfrak{p}$;
\item there are $h^0(F) q^{nd_\mathfrak{p}} (q^{d_\mathfrak{p}}-1)/(q-1)$ primes dividing $\infty$.
\end{itemize}
\noindent Let $H_n(\nu)$ be the free $\Zp$-module generated by the primes of $F_n^{ar}$
lying above $\nu$. Let $I_n(\nu) \subseteq G_n$ be the inertia group of $\nu$, since for $\nu=\infty$ such group does not depend on
$n$, we shall simply write $I_n(\infty)=:I_\infty$. We have that $H_n(\nu)$ is also a free $\Zp[G_n / I_n(\nu)]$-module of rank $d_\nu$,
and there is a natural action of $G_\F$ on $H_n(\nu)$. We are interested in studying the structure of $H_n(\nu)$
as a $\Zp[G_n]\llbracket G_\F \rrbracket$-module.
\noindent For $\nu \in \{ \mathfrak{p}, \infty \}$ we denote by ${\rm Fr}_\nu$ any lift to $G_n$ of the Frobenius map in $G_n / I_n(\nu)$.
Since the decomposition and inertia groups of $\infty$ coincide, we can choose ${\rm Fr}_\infty = 1$. The same choice is valid
for $\mathfrak{p}$ if and only if $\mathfrak{p}$ is totally split in $H_A$.
\begin{defi}\label{DefEulerFactor}
The {\em Euler factor} at $\nu$ is
\begin{displaymath}
e_\nu(X) := 1 - {\rm Fr}_\nu^{-1} X^{d_\nu} \in \Zp[G_n]\llbracket X \rrbracket \,.
\end{displaymath}
Since we will also need to specialize the variable $X$ at $\gamma^{-1}$, we put
\begin{displaymath}
e_\nu := e_\nu(\gamma^{-1}) = 1 - {\rm Fr}_\nu^{-1} \gamma^{-d_\nu} \in \Zp[G_n]\llbracket G_\F \rrbracket \,.
\end{displaymath}
\end{defi}
\noindent The statements of \cite[Lemmas 2.1 and 2.2]{Greither Popescu Fitting}, adapted to our setting,
translate into
\begin{lemma}\label{lemma Greither-Popescu}
For $\nu \in \{\mathfrak{p}, \infty\}$, let $Aug_{\nu,n}:=(\tau - 1\,:\,\tau \in I_n(\nu))$ be the {\em augumentation ideal}
of $I_n(\nu)$ in $\Zp[G_n]\llbracket G_\F \rrbracket$. Then
\begin{enumerate}
\item[(a)] ${\rm Fitt}_{\Zp[G_n]\llbracket G_\F \rrbracket} \left(H_n(\nu)\right) = (e_\nu)$ for any $\nu \neq \mathfrak{p}, \infty$;
\item[(b)] ${\rm Fitt}_{\Zp[G_n]\llbracket G_\F \rrbracket} \left(H_n(\infty)\right) =
(e_\infty, Aug_{\infty, n})$;
\item[(c)] ${\rm Fitt}_{\Zp[G_n]\llbracket G_\F \rrbracket} \left(H_n(\mathfrak{p})\right) =
(e_\mathfrak{p}, Aug_{\mathfrak{p}, n})$.
\end{enumerate}
\end{lemma}
\noindent Since the $H_n(\nu)$ are free $\Z_p[G_n/I_n(\nu)]$-modules, we have isomorphisms
\begin{enumerate}
\item[$\bullet$] if $\nu \neq \mathfrak{p}, \infty$
\begin{displaymath}
H_n(\nu) \simeq \Zp[G_n]\llbracket G_\F \rrbracket / (e_\nu) \,;
\end{displaymath}
\item[$\bullet$] if $\nu = \infty$
\begin{displaymath}
H_n(\infty) \simeq \Zp[G_0 / \Fq^{\times} \times \Gamma_n]\llbracket G_\F \rrbracket / (e_\infty) \,;
\end{displaymath}
\item[$\bullet$] if $\nu = \mathfrak{p}$
\begin{displaymath}
H_n(\mathfrak{p}) \simeq \Zp[Pic(A)]\llbracket G_\F \rrbracket / (e_\mathfrak{p}) \,.
\end{displaymath}
\end{enumerate}
\subsubsection{Complex characters}\label{SecComplexChar}
Let $\chi \in \widehat{G_0}:=\text{Hom}(G_0, \C^\times)$ be a complex character for $G_0$, to include its values we shall extend scalars to
the Witt ring $W = \Zp[\zeta]$, where $\zeta$ denotes any primitive root of unity of order $|G_0|$ (recall that we are assuming $(|G_0|,p)=1$).
We let
\begin{displaymath}
e_\chi := \frac{1}{|G_0|}\sum_{g \in G_0} \chi (g^{-1})g \in W[G_0]
\end{displaymath}
be the idempotent associated to $\chi$. For any $W[G_0]$-module $M$, we denote its $\chi$-part by $M(\chi):=e_\chi M$.
For any $\Zp[G_0]$-module $M$ we shall abuse notations a bit and write $M(\chi)$ to denote $(W\otimes_{\Z_p} M)(\chi)$.
This will not have any effect on the numerous exact sequences we are going to consider, because $W$ is a flat $\Zp$-module.
Finally recall that if $G_0$ acts trivially on $M$, then
\begin{displaymath}
M(\chi) = \left\{ \begin{array}{ll}
W \otimes_{\Zp} M & \ \mbox{if } \chi=\chi_0 \,, \\
\ & \\
0 & \ \mbox{if } \chi \neq \chi_0 \,
\end{array} \right.
\end{displaymath}
(as usual $\chi_0$ denotes the trivial character).
\begin{defi}\label{DefCharType}
Let $\chi$ be a character of $G_0$. We will distinguish $3$ types of characters:
\begin{enumerate}
\item[$\bullet$] $\chi$ is said to be of \emph{type 1} if $\chi \left( I_\infty \right) \neq 1$;
\item[$\bullet$] $\chi$ is said to be of \emph{type 2} if $\chi \left( I_\infty \right) = 1$ and
$\chi \left( \Gal(F_0 / H_A) \right) \neq 1$;
\item[$\bullet$] $\chi$ is said to be of \emph{type 3} if $\chi \left( \Gal(F_0 / H_A) \right) = 1$.
\end{enumerate}
\end{defi}
\noindent Recall that $d_\infty = 1$ and ${\rm Fr}_\infty =1$, so that $e_\infty = 1 - \gamma^{-1}$. Taking $\chi$-parts in
Lemma \ref{lemma Greither-Popescu} we get
\begin{equation}\label{computo H-infinito}
H_n(\infty)(\chi) \simeq \left\{ \begin{array}{ll}
0 & \ \mbox{if } \chi \mbox{ is of type } 1\,, \\
\ & \\
W[\Gamma_n] & \ \mbox{otherwise\,.}
\end{array} \right.
\end{equation}
For the prime $\mathfrak{p}$ we have the exact sequence (again from Lemma \ref{lemma Greither-Popescu})
\begin{equation}
\xymatrix{e_\chi(1-{\rm Fr}_\mathfrak{p}^{-1}\gamma^{-d_\mathfrak{p}})W[Pic(A)]\llbracket G_\F \rrbracket \ar@{^(->}[r] &
e_\chi W[Pic(A)]\llbracket G_\F \rrbracket \ar@{->>}[r] & H_n (\mathfrak{p})(\chi)\,,}
\end{equation}
which leads to
\begin{equation}\label{computo H-p}
H_n(\mathfrak{p})(\chi) \simeq \left\{ \begin{array}{ll}
0 & \ \mbox{if } \chi \mbox{ is of type }
1 \mbox{ or } 2\,, \\
\ & \\
W\llbracket G_\F \rrbracket / \left(1 - \chi({\rm Fr}_\mathfrak{p}^{-1})
\gamma^{-d_\mathfrak{p}}\right) & \ \mbox{otherwise\,.}
\end{array} \right.
\end{equation}
\subsubsection{The theorem of Greither and Popescu}
Let $X_n$ be the projective curve defined over $\mathbb{F}_q$ and associated with $F_n$; let
\[ Jac(X_n)(\overline{\F}_q) \simeq {\rm Div}^0(F_n^{ar})/\{{\rm Div}(x)\,:\,x\in (F_n^{ar})^\times \} \]
be the set of $\overline{\F}_q$-rational points of its Jacobian.
Following \cite[Section 2]{Greither Popescu Galois},
we define the Deligne's Picard $1$-motive $\mathcal{M}_n:=\mathcal{M}_S(F_n^{ar})$ as the group
morphism ${\rm Div}^0(F_n^{ar})\rightarrow Jac(X_n)(\overline{\F}_q)$
which induces the isomorphism above. In terms of \cite[Definition 2.3]{Greither Popescu Galois}
it is the morphism associated to $(X_n,\overline{\mathbb{F}}_q, S(F_n^{ar}),\emptyset)$, where $S(F_n^{ar})$ is
the set of primes of $F_n^{ar}$ lying above primes in $S$ and the choice of $\emptyset$ is justified by
\cite[Remark 2.7]{Greither Popescu Galois}. The $m$-torsion $\mathcal{M}_n[m]$ of $\mathcal{M}_n$ (see
\cite[Definition 2.5]{Greither Popescu Galois}) fits into the exact sequence
\[ \xymatrix{ 0\ar[r] & Jac(X_n)(\overline{\F}_q)[m] \ar[r] & \mathcal{M}_n[m] \ar[r] &
{\rm Div}^0(S(F_n^{ar}))\otimes \Z/m\Z \ar[r] & 0 } \]
(where ${\rm Div}^0(S(F_n^{ar}))$ are the divisors supported on $S(F_n^{ar})$) and behaves well with respect to norm maps
so that we can define its $p$-adic Tate module as
$\displaystyle{ T_p(\mathcal{M}_n) = \lim_\leftarrow \mathcal{M}_n [p^m] }$.
\noindent We denote by $T_p(F_n) := T_p \left(Jac(X_n)(\overline{\F}_q) \right)$ the $p$-adic Tate module of
the Jacobian of $X_n$. Our next task is to study the structure of $T_p(F_n)$ as a Galois module over
$\Zp[\Gamma_n]\llbracket G_\F \rrbracket$ and a crucial role will be played by Theorem \ref{Teo GP su ideale fitting del Deligne-Picard}
below.
\noindent Let $\Theta_n(X)$ (resp. $\Theta_\infty (X)$) be the projection of the Stickelberger series
$\Theta_S(X)$ to the ring $\Z [G_n] \llbracket X \rrbracket$ (resp. $\Z \llbracket G_\infty \rrbracket
\llbracket X \rrbracket$), which is easily seen to be the Stickelberger series associated to the
extension $F_n / F$ (resp. $\mathcal{F} / F$): actually one obtains an equivalent definition for $\Theta_S(X)$ by
taking the inverse limit (with respect to projections) of the Stickelberger series of the subextensions of $F_S$.
In \cite[Theorem 4.3]{Greither Popescu Galois} the authors prove the following
\begin{teo}\label{Teo GP su ideale fitting del Deligne-Picard}
One has ${\rm Fitt}_{\Zp[G_n]\llbracket G_\F \rrbracket} \left( T_p(\mathcal{M}_n)\right) =
\left(\Theta_n(\gamma^{-1})\right)$.
\end{teo}
\noindent Note that evaluating the Stickelberger series $\Theta_n(X)$ at $X=\gamma^{-1}$ makes sense because of
Proposition \ref{TateAlg}.
\subsection{Fitting ideals for Tate modules: finite level}
We define $D_n$ to be the kernel of the $\deg$ map in the following exact sequence
\begin{displaymath}
\xymatrix{ 0\ar[r] & D_n \ar[r] & H_n(\infty) \oplus H_n(\mathfrak{p}) \ar[r]^{\qquad\ \ \deg} & \Zp \ar[r] & 0\,.}
\end{displaymath}
Since $G_0$ acts trivially on $\Zp$ we have
\begin{equation}\label{computo L_n}
D_n(\chi) \simeq \left\{ \begin{array}{ll}
0 & \ \mbox{if } \chi \mbox{ is of type }
1\,, \\
\ & \\
W[\Gamma_n] & \ \mbox{if } \chi \mbox{ is of type }
2\,, \\
\ & \\
W[\Gamma_n] \oplus W\llbracket G_\F \rrbracket / \left(1 -
\chi({\rm Fr}_\mathfrak{p}^{-1})\gamma^{-d_\mathfrak{p}}\right) & \ \mbox{if } \chi \mbox{ is of type }
3 \\
\ & \mbox{ and } \chi \neq \chi_0\,.
\end{array} \right.
\end{equation}
In \cite[after Definition 2.6]{Greither Popescu Galois} the authors provide the following exact sequence
\begin{equation}\label{successione esatta Greither Popescu}
\xymatrix{0\ar[r] & T_p(F_n) \ar[r] & T_p(\mathcal{M}_n) \ar[r] & D_n \ar[r] & 0 \,.}
\end{equation}
For every character $\chi$ we denote by $\Theta_n (X, \chi)$ the only element of
$\Z[\Gamma_n] \llbracket X \rrbracket$ that satisfies $\Theta_n(X,\chi)e_\chi =e_\chi \Theta_n(X)$. Then we have the following
(see also \cite[Theorem 3.2]{BBC})
\begin{teo}\label{Teorema fitting per caratteri di tipo 1 o 2}
Let $\chi \in \widehat{G_0}$ be a character of type 1 or 2. Then
\[
{\rm Fitt}_{W[\Gamma_n]\llbracket G_\F \rrbracket} \left( T_p(F_n)(\chi)\right) =
\left( \Theta_n^{\sharp}(\gamma^{-1},\chi) \right)\,,
\]
where we put
\begin{displaymath}
\Theta_n^{\sharp}(\gamma^{-1},\chi) =
\left\{ \begin{array}{ll}
\Theta_n(\gamma^{-1},\chi) & \ \mbox{if } \chi \mbox{ is of
type } 1\,, \\
\ & \\
\displaystyle{\frac{\Theta_n(\gamma^{-1},\chi)}{1-\gamma^{-1}} } & \ \mbox{if } \chi \mbox{ is of
type } 2\,.
\end{array} \right.
\end{displaymath}
\end{teo}
\begin{proof} Take $\chi$-parts in \eqref{successione esatta Greither Popescu} and use \eqref{computo L_n} to get:
\begin{itemize}
\item if $\chi$ is of type $1$, $D_n(\chi) = 0$ and $T_p(F_n)(\chi) \simeq T_p(\mathcal{M}_n)(\chi)$;
\item if $\chi$ is of type $2$, $D_n(\chi) = W[\Gamma_n]
\simeq W[\Gamma_n]\llbracket G_\F \rrbracket /(1-\gamma^{-1})$ is a cyclic
$W[\Gamma_n]\llbracket G_\F \rrbracket$-module: hence we can apply \cite[Lemma 3]{Cornacchia Greither}
and obtain
\begin{displaymath}
(1-\gamma^{-1}) {\rm Fitt}_{W[\Gamma_n]\llbracket G_\F \rrbracket} \left( T_p(F_n)(\chi)\right)
= {\rm Fitt}_{W[\Gamma_n]\llbracket G_\F \rrbracket} \left( T_p(\mathcal{M}_n)(\chi)\right) = \left(\Theta_n(\gamma^{-1},\chi)\right) . \qedhere
\end{displaymath}
\end{itemize}
\end{proof}
When $\chi$ is a character of type $3$ things get more involved, since $D_n(\chi)$ is not cyclic
and we can only compute the Fitting ideal of some dual of the Tate module: details can be found in
\cite[Section 2.5]{CoscPhD} or in \cite[Section 3]{BBC}.
\subsection{Fitting ideals for Tate modules: infinite level}\label{SubSecTateModInfLev}
To prove an analog of Theorem \ref{Teorema fitting per caratteri di tipo 1 o 2} for the {\em infinite level} $\mathcal{F}^{ar}$
we need to study the relation between $T_p(F_n)$ and $T_p(F_m)$ for $n\geqslant m$.
Let $\Gamma^n_m := \Gal(F_n / F_m)$ and $I_{\Gamma_m^n}$ the associated augmentation ideal in
$W[\Gamma_n]$. We recall that $F_n/F_m$ is totally
ramified at all primes lying above $\mathfrak{p}$ and unramified everywhere else,
moreover the number of primes in $F_m$ above $\mathfrak{p}$ is the same for all $m$ and coincides
with the number of primes of $H_A$ lying above $\mathfrak{p}$.
\noindent We denote by $\overline{C}_n$ the $p$-part of the class group of degree zero divisors of
$F_n^{ar}$ and we recall that $T_p(F_n) = \text{Hom}(\Qp / \Zp , \overline{C}_n)$. Thus
there are natural maps induced by norms and inclusions respectively $N^n_m : T_p(F_n) \rightarrow T_p(F_m)$ and
$i^m_n : T_p(F_m) \rightarrow T_p(F_n)$. We define
\begin{displaymath}
T_p(\mathcal{F})(\chi) = \lim_\leftarrow T_p(F_n)(\chi) \,,
\end{displaymath}
where the limit is taken with respect to the norm maps. The limit
$T_p(\mathcal{F})(\chi)$ is a module over the profinite (non-noetherian) algebra $\Lambda_\F:=
W\llbracket \Gamma_\infty \rrbracket \llbracket G_\F \rrbracket$; our next goal is to compute its Fitting ideal.
Norms and inclusions are defined on the modules $T_p(\mathcal{M}_n)$ and $D_n$ as well:
in particular $i^m_n : T_p(\mathcal{M}_m) \hookrightarrow T_p(\mathcal{M}_n)$ is injective and satisfies
$T_p(\mathcal{M}_n)^{\Gamma_m^n} = i^m_n \left( T_p(\mathcal{M}_m) \right)$
(see \cite[Theorem 3.1]{Greither Popescu Galois}) and the composition $N^n_m \circ i^m_n$ is multiplication
by $[F_n : F_m]$ (on both modules).
All these maps are compatible with the exact sequence (\ref{successione esatta Greither Popescu}), i.e.
the following diagram is commutative for every pair of indices $n>m$
\[ \xymatrix{ 0 \ar[r] & T_p(F_n) \ar[rr] \ar@/_10pt/[dd]_{N^n_m} & & T_p(\mathcal{M}_n) \ar[rr] \ar@/_10pt/[dd]_{N^n_m} & &
D_n \ar[r] \ar@/_10pt/[dd]_{N^n_m} & 0 \\
\ \\
0 \ar[r] & T_p(F_m) \ar[rr] \ar@/_10pt/[uu]_{i^m_n} & & T_p(\mathcal{M}_m) \ar[rr] \ar@/_10pt/[uu]_{i^m_n} & &
D_m \ar[r] \ar@/_10pt/[uu]_{i^m_n} & 0\,. } \]
\begin{lemma}\label{LemNormTM}
The map $N^n_m : T_p(\mathcal{M}_n)\rightarrow T_p(\mathcal{M}_m)$ is surjective,
its kernel is $I_{\Gamma^n_m}T_p(\mathcal{M}_n)$.
\end{lemma}
\begin{proof}
By \cite[Theorem 3.9 part (2)]{Greither Popescu Galois} $T_p(\mathcal{M}_n)$
is a free $\Zp[\Gamma^n_m]$-module (because $\Gamma^n_m$ is a $p$-group), hence cohomologically trivial, i.e.
\begin{displaymath}
\widehat{H}^i\left(\Gamma^n_m, T_p(\mathcal{M}_n) \right) = 0 \quad \text{for every integer } i,
\end{displaymath}
where the $\widehat{H}^i(\Gamma^n_m, \bullet)$ are Tate cohomology groups.
\noindent Specializing the previous equality at $i=0$ we obtain
\begin{displaymath}
N^n_m \left( T_p(\mathcal{M}_n) \right) = T_p(\mathcal{M}_n)^{\Gamma_m^n}
= i^m_n \left( T_p(\mathcal{M}_m) \right)\simeq T_p(\mathcal{M}_m).
\end{displaymath}
In a similar way we obtain the second part of the lemma by specializing at $i=-1$.
\end{proof}
We can now prove an analogous result for the modules $T_p(F_n)$.
\begin{prop}\label{proposizione su norm di T_p}
Let $\chi$ be a character of type $1$ or $2$. Then the norm $N^n_m:T_p(F_n)(\chi)\rightarrow T_p(F_m)(\chi)$ is surjective and
its kernel is $I_{\Gamma^n_m}T_p(F_n)(\chi)$.
\end{prop}
\begin{proof}
Consider the $\chi$-part of the exact sequence \eqref{successione esatta Greither Popescu}, i.e.
\begin{equation}\label{successione esatta Greither Popescu chi-parte}
\xymatrix{ 0\ar[r] & T_p(F_n)(\chi) \ar[r] & T_p(\mathcal{M}_n)(\chi) \ar[r] & D_n(\chi) \ar[r] & 0 \,.}
\end{equation}
If $\chi$ is a character of type $1$, then $T_p(F_n)(\chi) \simeq T_p(\mathcal{M}_n)(\chi)$ and this is a
restatement of Lemma \ref{LemNormTM}.
\noindent If $\chi$ is of type $2$, then $D_n(\chi) \simeq W[\Gamma_n]$ so both $D_n(\chi)$ and
$T_p(\mathcal{M}_n)(\chi)$ are cohomologically trivial. Hence
\begin{equation}\label{T_p coomologicamente banale}
\widehat{H}^i\left(\Gamma_m^n, T_p(F_n)(\chi) \right) = 0 \quad \text{for every integer}\ i \,
\end{equation}
and, specializing at $i=-1$, we obtain the statement for the kernel.
\noindent To prove surjectivity we take $\Gamma_m^n$-invariants in
\eqref{successione esatta Greither Popescu chi-parte} to obtain
\[ \xymatrix{ 0\ar[r] & T_p(F_n)(\chi)^{\Gamma^n_m} \ar[r] & T_p(\mathcal{M}_m)(\chi) \ar[r] &
D_n(\chi)^{\Gamma^n_m} \ar[r] & \widehat{H}^1\left(\Gamma_m^n , T_p(F_n)(\chi) \right) \,.} \]
Note that $D_n(\chi)^{\Gamma^n_m} \simeq W[\Gamma_n]^{\Gamma^n_m} \simeq W[\Gamma_m]\simeq D_m(\chi)$,
so, comparing with \eqref{successione esatta Greither Popescu chi-parte}
with $m$ in place of $n$, we get $T_p(F_n)(\chi)^{\Gamma^n_m} \simeq T_p(F_m)(\chi)$. Now
specializing \eqref{T_p coomologicamente banale} at $i=0$ we obtain
\begin{displaymath}
N^n_m \left( T_p(F_n)(\chi)\right) = T_p(F_n)(\chi)^{\Gamma^n_m} \simeq T_p(F_m)(\chi) \,.\qedhere
\end{displaymath}
\end{proof}
We are now ready to prove the main theorems of this section.
\begin{teo}\label{ThmTateFinGen}
Let $\chi$ be a character of type $1$ or $2$. Then $T_p(\mathcal{F})(\chi)$ is a finitely generated
$\Lambda_\F$-module. Moreover, if $\displaystyle{\lim_\leftarrow \Theta_n^{\sharp}(\gamma^{-1},\chi)\neq 0}$,
then $T_p(\mathcal{F})(\chi)$ is torsion.
\end{teo}
\begin{proof}
Fix $m$, and let $\mathfrak{I}_m$ be the augumentation ideal of $\Gal(\mathcal{F} / F_m)$ in
$\Lambda:=W\llbracket \Gamma_\infty \rrbracket$. Let $\widetilde{\mathfrak{I}}_m =
\Lambda_\F \otimes_{W\llbracket \Gamma_\infty \rrbracket} \mathfrak{I}_m$ be the corresponding ideal in
$\Lambda_\F=\Lambda\llbracket G_\F\rrbracket$, and recall that
$\displaystyle{ \mathfrak{I}_m = \lim_{\substack{\leftarrow \\ n}} I_{\Gamma^n_m}}$.\\
By Proposition \ref{proposizione su norm di T_p} we have
\begin{displaymath}
T_p(F_m)(\chi) = N^n_m \left(T_p(F_n)(\chi)\right) \simeq T_p(F_n)(\chi) / I_{\Gamma^n_m}T_p(F_n)(\chi)\,.
\end{displaymath}
This holds for every $n >m$ and so
\begin{displaymath}
T_p(F_m)(\chi) \simeq T_p(\mathcal{F})(\chi) / \widetilde{\mathfrak{I}}_m T_p(\mathcal{F})(\chi) \,.
\end{displaymath}
The module on the left is finitely generated over $W[\Gamma_m]\llbracket G_\F \rrbracket = \Lambda_\F / \widetilde{\mathfrak{I}}_m$
and, since the ideals $\widetilde{\mathfrak{I}}_m$ form an open filtration of the profinite
algebra $\Lambda_\F$, we can apply the generalized Nakayama Lemma of \cite{BH} and obtain that
$T_p(\mathcal{F})(\chi)$ is a finitely generated $\Lambda_\F$-module. \\
Now we define the element $\Theta_\infty^{\sharp}(\gamma^{-1},\chi) \in \Lambda_\F$ as
\begin{displaymath}
\Theta_\infty^{\sharp}(\gamma^{-1},\chi) =
\left\{ \begin{array}{ll}
\Theta_\infty(\gamma^{-1},\chi) & \ \mbox{if } \chi \mbox{ is of
type } 1 \,, \\
\ & \\
\displaystyle{\frac{\Theta_\infty(\gamma^{-1},\chi)}{1-\gamma^{-1}} } & \ \mbox{if } \chi \mbox{ is of
type } 2 \,,
\end{array} \right.
\end{displaymath}
i.e. the inverse limit of the generators of ${\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket}(T_p(F_m)(\chi))$,
by Theorem \ref{Teorema fitting per caratteri di tipo 1 o 2}.
Clearly $\Theta_\infty^{\sharp}(\gamma^{-1},\chi)T_p(\mathcal{F})(\chi) = 0$ and this implies the statement on torsion.
\end{proof}
\noindent Now we know that the Fitting ideal of $T_p(\mathcal{F})(\chi)$ is well defined and we proceed to compute a generator via a
limit process.
\begin{teo}\label{TeoFittIdealTateIwasawaModule}
Let $\chi$ be a character of type $1$ or $2$. Then
\begin{displaymath}
{\rm Fitt}_{\Lambda_\F} \left(T_p(\mathcal{F})(\chi) \right) =
\left( \Theta_\infty^{\sharp}(\gamma^{-1},\chi)\right) \,.
\end{displaymath}
\end{teo}
\begin{proof}
The equalities
\[
\left( \Theta_\infty^{\sharp}(\gamma^{-1},\chi)\right) = \lim_\leftarrow
\left( \Theta_n^{\sharp}(\gamma^{-1},\chi)\right) = \lim_\leftarrow
{\rm Fitt}_{W[\Gamma_n]\llbracket G_\F \rrbracket} \left( T_p(F_n)(\chi) \right)
\]
reduce the proof to showing
\[
{\rm Fitt}_{\Lambda_\F} \left(T_p(\mathcal{F})(\chi) \right) = \lim_\leftarrow
{\rm Fitt}_{W[\Gamma_n]\llbracket G_\F \rrbracket} \left( T_p(F_n)(\chi) \right)\,.
\]
Let $N^\infty_m : T_p(\mathcal{F})(\chi) \twoheadrightarrow T_p(F_m)(\chi)$ be induced by the projection modulo
$\widetilde{\mathfrak{I}}_mT_p(\mathcal{F})(\chi)$. These maps are obviously compatible with the norm maps, i.e.
$N^\infty_m =N^n_m \circ N^\infty_n$ for any $n>m$. Let $t_1, \dots ,t_r$ be $\Lambda_\F$-generators of $T_p(\mathcal{F})(\chi)$
and write $K_\infty$ for the kernel of the surjective map $\Lambda_{\mathbb{F}}^{\oplus r} \twoheadrightarrow T_p(\mathcal{F})(\chi)$
sending the $i$-th element of the canonical basis to $t_i$.
We have an exact sequence
\begin{equation}\label{EqExSeqInfty}
\xymatrix{ 0 \ar[r] & K_\infty \ar[r] & \Lambda_\F^{\oplus r} \ar[r] &
T_p(\mathcal{F})(\chi) \ar[r] & 0 \,.} \end{equation}
Since $N^\infty_n(t_1), \dots , N^\infty_n(t_r)$ generate $T_p(F_n)(\chi)$ over $W[\Gamma_n]\llbracket G_\F \rrbracket$, we can construct
similar exact sequences for every integer $n$, i.e.
\[ \xymatrix{ 0 \ar[r] & K_n \ar[r] & W[\Gamma_n]\llbracket G_\F \rrbracket^{\oplus r} \ar[r] &
T_p(F_n)(\chi) \ar[r] & 0 } \]
(where now the $i$-th element of the canonical basis maps to $N^\infty_n(t_i)$). They all fit into the commutative diagrams
\[ \xymatrix{ 0 \ar[r] & K_n \ar[rr] \ar[dd]^{k^n_m} & & W[\Gamma_n]\llbracket G_\F \rrbracket^{\oplus r} \ar[rr] \ar[dd]^{\pi^n_m}
& & T_p(F_n)(\chi) \ar[r] \ar[dd]^{N^n_m} & 0 \\
\ \\
0 \ar[r] & K_m \ar[rr] & & W[\Gamma_m]\llbracket G_\F \rrbracket^{\oplus r} \ar[rr]
& & T_p(F_m)(\chi) \ar[r] & 0 \,, }\]
where $k^n_m:=(\pi^n_m)_{|K_n}$.
\noindent One has $\Ker(\pi^n_m)=(I_{\Gamma^n_m}W[\Gamma_n]\llbracket G_\F \rrbracket)^{\oplus r}$ and
$\Ker(N^n_m)=I_{\Gamma^n_m}T_p(F_n)(\chi)$ (by Proposition \ref{proposizione su norm di T_p}), so the map between them
is surjective. Since $\pi^n_m$ is surjective, the snake lemma implies that $k^n_m$ is surjective as well and the diagram
above satisfies the Mittag-Leffler condition which allows us to
take the inverse limit. Comparing this limit with \eqref{EqExSeqInfty}, we obtain
$\displaystyle{ K_\infty = \lim_\leftarrow K_n}$.
\noindent Let $\mathscr{M}_r(K_m)$ be the set of $r\times r$ matrices whose entries are
in $W[\Gamma_m]\llbracket G_\F \rrbracket$ and such that each row, seen as a vector in
$W[\Gamma_m]\llbracket G_\F \rrbracket^{\oplus r}$, is in $K_m$; we still denote by $k^n_m$ the natural
extension of the map $K_n \rightarrow K_m$ to $\mathscr{M}_r(K_n) \rightarrow
\mathscr{M}_r(K_m)$, which is surjective as well. By definition ${\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket}
\left( T_p(F_m)(\chi) \right)$ is the ideal generated by $\{ \det(M_m)\,:\,M_m \in \mathscr{M}_r(K_m)\}$.
The commutativity of the previous diagram yields for each $M_n\in \mathscr{M}_r(K_n)$
\[
\pi^n_m \left( \det(M_n) \right) = \det \left( k^n_m (M_n) \right).
\]
Extending this construction to the infinite level (with analogous notations), we obtain
$\pi^\infty_m \left( \det (M_\infty) \right) \in
{\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket} \left( T_p(F_m)(\chi) \right)$ for any $M_\infty \in \mathscr{M}_r(K_\infty)$.
Hence, for any $m$, $\pi^\infty_m \left( {\rm Fitt}_{\Lambda_\F} \left(T_p(\mathcal{F})(\chi) \right)\right)
\subseteq {\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket} \left( T_p(F_m)(\chi) \right)$, and
\[
{\rm Fitt}_{\Lambda_\F} \left(T_p(\mathcal{F})(\chi) \right) \subseteq \lim_\leftarrow
{\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket} \left( T_p(F_m)(\chi) \right).
\]
The other inclusion needs a little bit more work, basically
we follow the arguments of \cite[Theorem 2.1]{Greither Kurihara}.
Each element of ${\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket} \left( T_p(F_m)(\chi) \right)$
can be written as a linear combination
\begin{equation}\label{EqCombLinDet}
x_m = \sum_{i=1}^s \lambda_i \, \det (M_m^{(i)})
\end{equation}
with $\lambda_i \in W[\Gamma_m]\llbracket G_\F \rrbracket$ and $M_m^{(i)} \in \mathscr{M}_r(K_m)$;
multiplying the first row of the $M_m^{(i)}$ by $\lambda_i$, we get matrices $\overline{M}_m^{(i)}$ such that
\[ x_m = \sum_{i=1}^s \det (\overline{M}_m^{(i)}) \,,\]
i.e. we can assume that all coefficients in \eqref{EqCombLinDet} are $1$. Since the number of elements needed to generate
$T_p(F_m)(\chi)$ (and $T_p(\mathcal{F})(\chi)$) can be chosen independently from $m$, one has that
$s$ can be chosen independently of $m$ as well.
\noindent Now put $\mathcal{B}_m := \mathscr{M}_r(K_m)^{\oplus s}$ with the induced topology
and define the non-linear operator $\phi_m : \mathcal{B}_m \rightarrow W[\Gamma_m]\llbracket G_\F \rrbracket$, by
$\phi_m \left( M_m^{(1)}, \dots, M_m^{(s)} \right) = \sum_i \det (M_m^{(i)})$
(analogous definition for $\phi_\infty$). This operator is continuous and its image is
${\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket}T_p(F_m)(\chi)$. We extend the map $k^n_m$ from $\mathscr{M}_r(K_n)$
to $\mathcal{B}_n$ and get the commutative diagram
\[
\xymatrix{\mathcal{B}_n \ar[r]^(.35){\phi_n} \ar[d]_{k^n_m} & W[\Gamma_n]\llbracket G_\F \rrbracket \ar[d]^{\pi^n_m} \\
\mathcal{B}_m \ar[r]_(.35){\phi_m} & W[\Gamma_m]\llbracket G_\F \rrbracket \, .}
\]
Now we take a sequence $\displaystyle{ (x_m)_{m \in \N} \in \lim_\leftarrow \,
{\rm Fitt}_{W[\Gamma_m]\llbracket G_\F \rrbracket} \left( T_p(F_m)(\chi) \right) }$,
and look for an element $b_\infty \in \mathcal{B}_\infty$ such that $(x_m)_{m \in \N}=\phi_\infty (b_\infty)\in
{\rm Fitt}_{\Lambda_\F} \left(T_p(\mathcal{F})(\chi) \right)$. \\
For any $m$ put $\Upsilon_m := \phi_m^{-1}(x_m)$, then $\Upsilon_m$ is closed and, since $W[\Gamma_m]\llbracket G_\F \rrbracket$ is compact,
$\Upsilon_m$ is compact as well. For each $\upsilon_n \in \Upsilon_n$ we have that
\[
\phi_m \left( k^n_m(\upsilon_n) \right) = \pi^n_m \left( \phi_n(\upsilon_n) \right) = \pi^n_m(x_n) = x_m\,,
\]
thus $k^n_m(\Upsilon_n)\subseteq \Upsilon_m$ and we define
\[
\overline{\Upsilon}_m = \bigcap_{n > m} k^n_m (\Upsilon_n) \subseteq \Upsilon_m.
\]
Since $k^n_m$ is continuous, $\overline{\Upsilon}_m$ is compact and not empty, moreover one easily shows that
$k^n_m(\overline{\Upsilon}_n)\subseteq \overline{\Upsilon}_m$ and we are going to prove equality between them.
Let $\overline{\upsilon}_m \in \overline{\Upsilon}_m$ so that, for any $n>m$, there exists $\upsilon_n \in \Upsilon_n$ with $k^n_m(\upsilon_n) = \overline{\upsilon}_m$.
Now fix $\ell>0$ and, for $n>m+\ell$, consider $k^n_{m+\ell}(\upsilon_n) \in \Upsilon_{m+\ell}$ as a sequence in $n$. Since
$\Upsilon_{m+\ell}$ is compact, there exists a convergent subsequence $\upsilon_{n_j}$ whose limit we call $\overline{\upsilon}_{m+\ell}$.
Then, for any $n>m+\ell$,
\[ \overline{\upsilon}_{m+\ell} = \lim_{j \rightarrow \infty } k^{n_j}_{m+\ell}(\upsilon_{n_j}) =
\lim_{\substack{j \rightarrow \infty \\ n_j\geqslant n } } ( k^n_{m+\ell}\circ k^{n_j}_n)(\upsilon_{n_j})
\in k^n_{m+\ell}(\Upsilon_n) \,, \]
i.e. $\overline{\upsilon}_{m+\ell}$ is in $\overline{\Upsilon}_{m+\ell}$. Obviously $k^{m+\ell}_m(\overline{\upsilon}_{m+\ell})=\overline{\upsilon}_m$,
so the map $k^{m+\ell}_m$ is surjective and we have constructed a coherent sequence $b_\infty:=\overline{\upsilon}_\infty=(\overline{\upsilon}_m)_{m\in \N}
\in \mathcal{B}_\infty$. Since $\phi_m(\overline{\upsilon}_m) = x_m$ for each integer $m$, we have that
$\phi_\infty (b_\infty) = (x_m)_{m \in \N}$.
\end{proof}
\subsection{Fitting ideals for the class groups: finite level}\label{SecClassGroup}
Now we move to our primary interest: the $p$-part $\mathcal{C}\ell^0(F_n)$ of the class groups
of degree zero divisors of the field $F_n$ which, from now on, we shall denote by $C_n$ and
which is naturally a finitely generated torsion $W[\Gamma_n]$-module. To compute its Fitting ideal
we shall use specializations of ${\rm Fitt}_{W[\Gamma_n]\llbracket G_\F\rrbracket}(T_p(F_n)(\chi))$
as suggested by the following lemmas (for the first see e.g. \cite[Lemma 4.6]{ABBL}, the second is a well known property
of Fitting ideals).
\begin{lemma}\label{LemComputoFittClassGr1}
There is an isomorphism of $\Zp[G_n]$-modules
\[ T_p(F_n)_{G_\F}:=T_p(F_n) / (1-\gamma^{-1})T_p(F_n)\simeq C_n.\]
\end{lemma}
\begin{lemma}\label{LemComputoFittClassGr2}
Let $M$ be a finitely generated torsion module over $R$. Let
$I$ be any nontrivial ideal of $R$ and consider the projection $\pi_I : R \twoheadrightarrow R/ I$. Then
\[ {\rm Fitt}_{R/I} \left( M/IM \right) = \pi_I \left( {\rm Fitt}_R (M) \right). \]
\end{lemma}
\noindent Let $\pi : W[\Gamma_n] \llbracket G_\F \rrbracket \rightarrow W[\Gamma_n]\simeq W[\Gamma_n] \llbracket G_\F \rrbracket / I_{G_\F}$
be the canonical projection sending $\gamma$ to $1$. Combining Lemmas \ref{LemComputoFittClassGr1} and
\ref{LemComputoFittClassGr2}, and the computations of Theorem \ref{Teorema fitting per caratteri di tipo 1 o 2} we obtain
\begin{teo}\label{Teorema fitting Class Gr per caratteri di tipo 1 o 2}
Let $\chi \in \widehat{G_0}$ be a character of type 1 or 2. Then
\[ {\rm Fitt}_{W[\Gamma_n]} \left( C_n(\chi)\right) = \left( \Theta_n^\sharp (1,\chi) \right), \]
where
\begin{displaymath}
\Theta_n^\sharp (1,\chi) =
\left\{ \begin{array}{ll}
\Theta_n(1,\chi) & \ \mbox{if } \chi \mbox{ is of
type } 1\,, \\
\ & \\
\displaystyle{\bigg(\frac{\Theta_n(\gamma^{-1},\chi)}{1-\gamma^{-1}}\bigg)_{\bigr| \gamma=1} } & \ \mbox{if } \chi \mbox{ is of
type } 2\,.
\end{array} \right.
\end{displaymath}
\end{teo}
\begin{proof}
Just specialize Theorem \ref{Teorema fitting per caratteri di tipo 1 o 2} to $\gamma=1$ recalling the convergence properties of the
Stickelberger series.
\end{proof}
\subsection{Fitting ideals for the class groups: infinite level and the Main Conjecture}
Now we approach the $W\llbracket \Gamma\rrbracket$-module $C_\infty := \displaystyle{ \lim_\leftarrow C_n }$,
where the limit is with respect to the norm maps $N^n_m : C_n \rightarrow C_m$.
We shall also consider maps $i^m_n : C_m \rightarrow C_n$ induced by the embeddings $i^m_n : {\rm Div}(F_m) \rightarrow {\rm Div}(F_n)$.
We recall that for any $D=\sum_\nu n_\nu \nu\in {\rm Div}(F_m)$, we have
$i^m_n (D) := \displaystyle{\sum_\nu n_\nu \sum_{w | \nu} e(w | \nu) w}$, where $ e(w | \nu)$ is the ramification index of
$w$ over $\nu$. In particular, since $ \deg \left( i^m_n (D) \right) =[F_n : F_m]\cdot \deg(D)$, the image of a degree zero divisor
still has degree zero, moreover $i^m_n({\rm Div}(F_m))$ is $\Gamma^n_m$-invariant.
\noindent The following proposition gives us information on injectivity and surjectivity of $N$ and $i$.
\begin{prop}\label{PropNormSurjImmerInject} Let $F_0 \subseteq K \subset E \subset \mathcal{F}$ with
$[E:F_0]$ finite. Then
\begin{enumerate}
\item[(a)] the norm map $N^E_K : \mathcal{C}\ell^0(E) \rightarrow \mathcal{C}\ell^0(K)$ is surjective;
\item[(b)] the map $i^K_E : \mathcal{C}\ell^0(K) \rightarrow \mathcal{C}\ell^0(E)$ is injective.
\end{enumerate}
\end{prop}
\begin{proof}
We recall that $d_\infty=1$ and that $\infty$ is totally split in $\mathcal{F}/F_0$, hence all primes in $E$ and $K$ dividing $\infty$
have degree 1 as well.
\noindent (a)
This is just an application of class field theory for function fields, see
e.g. \cite[Lemma 5.4 part (3)]{ABBL}.
\noindent (b)
Let $G:= {\rm Gal} (E/K)$ and, for any field $L$, let $\mathcal{P}_L$ be the
principal divisors of $L$. Taking the $G$-cohomology in the exact sequence
\begin{equation}\label{SuccEsattaDivPrincip}
\xymatrix{ 0 \ar[r] & \Fq^\times \ar[r] & E^\times \ar[r] & \mathcal{P}_E \ar[r] & 0 \,,}
\end{equation}
we get
\[ \xymatrix{ 0 \ar[r] & \Fq^\times \ar[r] & K^\times \ar[r] & \mathcal{P}_E^G \ar[r] & 0 }\]
and $H^1(G,\mathcal{P}_E) = 0$
(because of Hilbert 90 and $(|G|,\Fq^\times)=1$).
Comparing this with the analogue of \eqref{SuccEsattaDivPrincip} for $K$
we have that $\mathcal{P}_E^G = \mathcal{P}_K$. Taking the $G$-cohomology in
\[
\xymatrix{ 0 \ar[r] & \mathcal{P}_E \ar[r] & {\rm Div}^0(E) \ar[r] & \mathcal{C}\ell^0(E) \ar[r] & 0 ,}
\]
we obtain
\[
\xymatrix{ 0 \ar[r] & \mathcal{P}_E^G = \mathcal{P}_K \ar[r] & {\rm Div}^0(E)^G \ar[r] & \mathcal{C}\ell^0(E)^G \ar[r] &
H^1(G, \mathcal{P}_E) ,}\]
which fits into the following commutative diagram
\begin{equation}\label{DiagrammaG-invClassGr}
\xymatrix{ 0 \ar[r] & \mathcal{P}_K \ar[r]\ar@{=}[d] & {\rm Div}^0(K) \ar[r]\ar@{^(->}[d] & \mathcal{C}\ell^0(K) \ar[r]\ar[d]^{i^K_E} &
0 \\
0 \ar[r] & \mathcal{P}_K \ar[r] & {\rm Div}^0(E)^G \ar[r] & \mathcal{C}\ell^0(E)^G \ar[r] & 0.}
\end{equation}
Applying the snake lemma we obtain the thesis. \qedhere
\end{proof}
\noindent From diagram \eqref{DiagrammaG-invClassGr} we also deduce that
\begin{equation}\label{EqIsomQuotClassGr}
\mathcal{C}\ell^0(E)^G / i^K_E \left( \mathcal{C}\ell^0(K) \right) \simeq {\rm Div}^0(E)^G / i^K_E \left( {\rm Div}^0(K)\right)\,.
\end{equation}
\noindent To perform a limit and move to the infinite level we still have to deal with the kernel of the norm map
$N^E_K(\chi) : \mathcal{C}\ell^0(E)(\chi) \rightarrow \mathcal{C}\ell^0(K)(\chi)$ for characters of type 1 or 2.
\begin{lemma}
Let $F_0 \subseteq K \subset E \subset \mathcal{F}$ with $[E:F_0]$ finite and let $G:= {\rm Gal} (E/K)$.
Assume $|G|=p$, then the group $\Delta := \Gal(F_0 / H_A)$ acts trivially on
$\mathcal{C}\ell^0(E)^G / i^K_E \left( \mathcal{C}\ell^0(K) \right)$.
\end{lemma}
\begin{proof}
The composition of two natural maps
\[
{\rm Div}^0(E)^G \hookrightarrow {\rm Div}(E)^G \twoheadrightarrow {\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right)\,,
\]
has kernel ${\rm Div}^0(E)^G \cap i^K_E \left( {\rm Div}(K) \right) =
i^K_E \left( {\rm Div}^0(K) \right)$ and induces an injection
\[
{\rm Div}^0(E)^G / i^K_E \left( {\rm Div}^0(K)\right) \hookrightarrow
{\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right).
\]
Thus it is enough to show that $\Delta$ acts trivially on ${\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right)$.
\noindent Let $\mathfrak{p}_1, \dots, \mathfrak{p}_s$ (resp. $\mathfrak{P}_1, \dots, \mathfrak{P}_s$) be the set of primes of
$K$ (resp. $E$) lying above $\mathfrak{p}$. The extension $E/K$ is totally ramified at $\mathfrak{p}$ and we can assume
that $\mathfrak{P}_j$ is the unique prime of $E$ lying above $\mathfrak{p}_j$, i.e. $i^K_E (\mathfrak{p}_j) = p \mathfrak{P}_j$.
Moreover the only extension where the prime $\mathfrak{p}$ may split is $H_A /F$, so $s$ divides $h^0(F)$, i.e. is coprime
with $p$.
\noindent We can write ${\rm Div}(K) = \bigoplus_\nu \Z \nu$ (where $\nu$ runs through all the primes of $K$)
and ${\rm Div}(E) = \bigoplus_\nu H_\nu$, with $H_\nu = \bigoplus_{w \mid \nu} \Z w$. Now for the ramified primes we have
$H_{\mathfrak{p_j}} = \Z \mathfrak{P}_j = H_{\mathfrak{p}_j}^G$ while, for the unramified ones,
if we let $G_\nu$ be the decomposition group of $\nu$ in $G$, we have $H_\nu = \Z [G / G_\nu]w$, so that
$H_\nu^G = i^K_E \left(\Z \nu \right)$. Therefore
\[
{\rm Div}(E)^G = \bigoplus_{j=1}^s \Z \mathfrak{P}_j \oplus \bigoplus_{\nu \nmid \mathfrak{p}}
i^K_E \left(\Z \nu \right) \,,
\]
\[
i^K_E \left( {\rm Div}(K) \right) = \bigoplus_{j=1}^s p\Z \mathfrak{P}_j \oplus \bigoplus_{\nu \nmid \mathfrak{p}}
i^K_E \left(\Z \nu \right)
\]
and finally
\[
{\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right) = \bigoplus_{j=1}^s \left( \Z / p\right) \mathfrak{P}_j \,.
\]
Note that, for any set of integers $\alpha_1 , \dots , \alpha_s$ coprime with $p$, the classes
$\alpha_j \mathfrak{P}_j$ with $j=1,\dots,s$ still generate ${\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right)$.
\noindent Now consider the subfield $E^\Delta$ of $E$ (resp. $K^\Delta$ of $K$) fixed by $\Delta$.
Since $|\Delta|$ is prime with $p$, there is a canonical isomorphism $G^\Delta:= \Gal(E^\Delta / K^\Delta) \simeq G$ and,
since $F_0 / H_A$ is totally ramified at $\mathfrak{p}$, we still have exactly $s$ primes in $E^\Delta$ (resp. $K^\Delta$)
above $\mathfrak{p}$: let $\mathfrak{P}_j^\Delta$ (resp. $\mathfrak{p}_j^\Delta$) be those primes and, as above,
assume $i^{K^\Delta}_ {E^\Delta} (\mathfrak{p}_j^\Delta) = p \mathfrak{P}_j^\Delta$.
With the same argument, we can prove
\[
{\rm Div}(E^\Delta)^{G^\Delta} / i^{K^\Delta}_{E^\Delta} \left( {\rm Div}(K^\Delta) \right) =
\bigoplus_{j=1}^s \left( \Z / p\right) \mathfrak{P}_j^\Delta \,.
\]
To conclude note that $i_E^{E^\Delta} (\mathfrak{P}^\Delta_j)
= |\Delta | \mathfrak{P}_j$; since $|\Delta |$ is coprime with $p$, these classes generate
${\rm Div}(E)^G / i^K_E \left( {\rm Div}(K) \right)$
and clearly the action of $\Delta$ on them is trivial.
\end{proof}
\noindent We use the previous lemma to prove
\begin{prop}\label{PropKernelNormClGr}
Let $F_0 \subseteq K \subset E \subset \mathcal{F}$ with $[E:F_0]$ finite and let $G:= {\rm Gal} (E/K)$.
If $\chi\in \widehat{G_0}$ is of type $1$ or $2$, then
\[ \Ker\left( N^E_K(\chi) \right) = I_G \mathcal{C}\ell^0(E)(\chi)\,, \]
where $I_G$ denotes the augumentation of $G$.
\end{prop}
\begin{proof}
We proceed by induction on $|G|$, starting with the case $|G|=p$ (for $|G|=1$ there is nothing to prove).
Since $\chi$ is not of type 3, it may be seen as a nontrivial character of
$\Delta = \Gal(F_0 / H_A)$ and, by the previous lemma,
\[ \left(\mathcal{C}\ell^0(E)^G / i^K_E \left( \mathcal{C}\ell^0(K) \right)\right)(\chi) = 0,\quad
{\rm i.e.}\quad \mathcal{C}\ell^0(E)^G (\chi) = i^K_E \left( \mathcal{C}\ell^0(K) \right)(\chi) .\]
Let $g$ be a generator of $G$, then $I_G \mathcal{C}\ell^0(E)(\chi) = (1-g)\mathcal{C}\ell^0(E)(\chi)$ and we also recall that
the cyclicity of $G$ yields $I_G \mathcal{C}\ell^0(E)(\chi)\simeq \mathcal{C}\ell^0(E)/\mathcal{C}\ell^0(E)^G$.
We have two exact sequences
\[\xymatrix{ 0 \ar[r]& \Ker\left( N^E_K(\chi) \right) \ar[r] & \mathcal{C}\ell^0(E)(\chi) \ar[r]^{N^E_K(\chi)\ } &
\mathcal{C}\ell^0(K)(\chi) \ar[r] & 0,}
\]
(exact by Proposition \ref{PropNormSurjImmerInject}, part (a)), and
\[\xymatrix{ 0 \ar[r]& \mathcal{C}\ell^0(K)(\chi) \ar[r]^{i^K_E} & \mathcal{C}\ell^0(E)(\chi) \ar[r]^{\!\!\!1-g\ } &
I_G \mathcal{C}\ell^0(E)(\chi) \ar[r] & 0}
\]
(exact by what we noted above). Cardinalities yield $|\Ker\left( N^E_K(\chi) \right)| = |I_G \mathcal{C}\ell^0(E)(\chi)|$,
and, since $I_G \mathcal{C}\ell^0(E)(\chi) \subseteq \Ker\left( N^E_K(\chi) \right)$, we have equality of the two groups.
\noindent For the inductive step assume $|G|=p^l > p$ and take an intermediate field
$K \subsetneqq E' \subsetneqq E$; put $G_1=\Gal(E/E')$ and $G_2=\Gal(E'/K)$, so that $G_1$ and
$G_2$ have cardinality strictly smaller than $p^l$. The inductive hypothesis yields
\[ \Ker\left( N^E_{E'}(\chi) \right) = I_{G_1} \mathcal{C}\ell^0(E)(\chi) \]
and
\[ \Ker\left( N^{E'}_K(\chi) \right) = I_{G_2} \mathcal{C}\ell^0(E')(\chi). \]
By Proposition \ref{PropNormSurjImmerInject} part (a), the norm $N^E_{E'} : \mathcal{C}\ell^0(E)(\chi) \rightarrow
\mathcal{C}\ell^0(E')(\chi)$ is surjective and so
\[ N^E_{E'}\left( I_G \mathcal{C}\ell^0(E)(\chi) \right) = I_{G_2} \mathcal{C}\ell^0(E')(\chi). \]
Let $x \in \Ker\left( N^E_K(\chi) \right)$, since $N^E_K = N^{E'}_K \circ N^E_{E'}$,
we have that $N^E_{E'}(x)\in \Ker\left( N^{E'}_K(\chi) \right) = I_{G_2} \mathcal{C}\ell^0(E')(\chi)$, so
there exists $\alpha \in I_G$ and $y \in \mathcal{C}\ell^0(E)(\chi)$ such that $N^E_{E'}(x) = N^E_{E'}(\alpha y)$.
Therefore $x - \alpha y \in \Ker\left( N^E_{E'}(\chi) \right)$, which yields
\[ x \in \Ker\left( N^E_{E'}(\chi) \right) + I_G \mathcal{C}\ell^0(E)(\chi) = I_G \mathcal{C}\ell^0(E)(\chi), \]
since $\Ker\left( N^E_{E'}(\chi) \right) = I_{G_1} \mathcal{C}\ell^0(E)(\chi) \subseteq I_G \mathcal{C}\ell^0(E)(\chi)$.
We have proved that
\[ \Ker\left( N^E_K(\chi) \right) \subseteq I_G \mathcal{C}\ell^0(E)(\chi) \]
and the other inclusion is trivial.
\end{proof}
We can finally prove the main theorems on $C_\infty$.
\begin{teo}\label{ThmClassGrFinGen}
Let $\chi\in\widehat{G_0}$ be a character of type $1$ or $2$. Then $C_\infty(\chi)$ is a finitely generated
$\Lambda:=W\llbracket \Gamma_\infty\rrbracket$-module. Moreover, let
\begin{displaymath}
\Theta_\infty^{\sharp}(1,\chi) =
\left\{ \begin{array}{ll}
\Theta_\infty(1,\chi) & \ \mbox{if } \chi \mbox{ is of
type } 1 \,, \\
\ & \\
\displaystyle{\bigg(\frac{\Theta_\infty(\gamma^{-1},\chi)}{1-\gamma^{-1}}\bigg)_{\bigr| \gamma=1} } & \ \mbox{if } \chi \mbox{ is of
type } 2 \,,
\end{array} \right.
\end{displaymath}
be the inverse limit of the elements $\Theta_n^{\sharp}(1,\chi)$ appearing in
Theorem \ref{Teorema fitting Class Gr per caratteri di tipo 1 o 2}; if $\Theta_\infty^{\sharp}(1,\chi)\neq 0$,
then $C_\infty(\chi)$ is $\Lambda$-torsion.
\end{teo}
\begin{proof}
By Proposition \ref{PropNormSurjImmerInject} part (a) and Proposition \ref{PropKernelNormClGr} we
have
\begin{displaymath}
C_m(\chi)= N^n_m \left(C_n(\chi)\right) \simeq C_n(\chi) / \Ker( N^n_m) = C_n(\chi) /
I_{\Gamma^n_m}C_n(\chi)\,.
\end{displaymath}
Recall that $\mathfrak{I}_m=\displaystyle {\lim_\leftarrow I_{\Gamma_m^n} }$ is the augumentation ideal of
$\Gal(\mathcal{F} / F_m)$ in $\Lambda$. The previous equality holds for every $n >m$, so
\begin{displaymath}
C_m(\chi) \simeq C_\infty(\chi) / \mathfrak{I}_m C_\infty(\chi) \,.
\end{displaymath}
The module on the left is a finitely generated torsion $\Lambda / \mathfrak{I}_m=W[\Gamma_m]$-module.
By the generalized Nakayama Lemma of \cite{BH} we obtain that $C_\infty(\chi)$ is a finitely generated $\Lambda$-module.
\noindent For the second part just note that
$\Theta_n^{\sharp}(1,\chi)C_n(\chi) = 0$ for every $n$, hence
$\Theta_\infty^{\sharp}(1,\chi)C_\infty(\chi) = 0$, and $C_\infty(\chi)$ is a torsion
$\Lambda$-module.
\end{proof}
\noindent We conclude with the Main Conjecture.
\begin{teo}[\emph{Main Conjecture}]\label{TeoFittIdealClGrIwasawaModule}
Let $\chi\in\widehat{G_0}$ be a character of type $1$ or $2$. Then
\begin{displaymath}
{\rm Fitt}_{\Lambda} \left(C_\infty(\chi) \right) =
\left( \Theta_\infty^{\sharp}(1,\chi)\right) \,.
\end{displaymath}
\end{teo}
\begin{proof}
The proof follows the path of the one of Theorem \ref{TeoFittIdealTateIwasawaModule}.
The equality
\[
\left( \Theta_\infty^{\sharp}(1,\chi)\right) = \lim_\leftarrow
\left( \Theta_n^{\sharp}(1,\chi)\right) = \lim_\leftarrow
{\rm Fitt}_{W[\Gamma_n]} \left( C_n(\chi) \right)
\]
reduces the statement to
\[
{\rm Fitt}_{\Lambda} \left(C_\infty(\chi) \right) = \lim_\leftarrow
{\rm Fitt}_{W[\Gamma_n]} \left( C_n(\chi) \right)\,.
\]
Recall $C_m(\chi) = C_\infty(\chi) / \mathfrak{I}_m C_\infty(\chi)$, let $t_1, \dots ,t_r$ be $\Lambda$-generators of $C_\infty(\chi)$
and denote by $N^\infty_m:C_\infty(\chi) \twoheadrightarrow
C_m(\chi)$ the projection so that $N^\infty_m(t_1), \dots , N^\infty_m(t_r)$ generate $C_m(\chi)$.
For any $n$ we have an exact sequence
\begin{equation}\label{EqSeqn}
\xymatrix{ 0 \ar[r] & K_n \ar[r] & W[\Gamma_n]^{\oplus r} \ar[r] &
C_n(\chi) \ar[r] & 0\,,}
\end{equation}
where the map on the right is given by $(w_1, \dots , w_r) \mapsto \sum_i w_i N^\infty_n(t_i)$ and $K_n$ is its kernel.
They fit into the diagram
\[ \xymatrix{ 0 \ar[r] & K_n \ar[rr] \ar[dd]^{k^n_m} & & W[\Gamma_n]^{\oplus r} \ar[rr] \ar[dd]^{\pi^n_m}
& & C_n(\chi) \ar[r] \ar[dd]^{N^n_m} & 0 \\
\ \\
0 \ar[r] & K_m \ar[rr] & & W[\Gamma_m]^{\oplus r} \ar[rr]
& & C_m(\chi) \ar[r] & 0 \,.}\]
The kernel of $\pi^n_m$ is $(I_{\Gamma^n_m}W[\Gamma_n])^{\oplus r}$
and, by Proposition \ref{PropKernelNormClGr}, $\Ker(N^n_m)=I_{\Gamma^n_m}C_n(\chi)$,
so the map between them is surjective. Moreover $\pi^n_m$ is surjective thus, by the snake lemma,
$k^n_m$ is surjective as well and the diagram satisfies the Mittag-Leffler condition. Taking the inverse limit
and comparing it with the analog of \eqref{EqSeqn} for $K_\infty$ we get $\displaystyle{ K_\infty = \lim_\leftarrow K_n}$.
\noindent To conclude the proof, one just follows the same technical arguments of
the second part of the proof of Theorem \ref{TeoFittIdealTateIwasawaModule}.
\end{proof}
From this Main Conjecture and the interpolation formulas of the previous sections, one can derive a number of relations with
special values of $L$ or Zeta-functions. For example we have seen in the
proofs of Theorems \ref{teorema interpolazione v-adica} and \ref{teorema interpolazione v-adica2},
that for non negative integers $i$ and $j$ with $i\equiv j \pmod{q^{d_\nu}-1}$
\[ \zeta_A(-s_j)(1- \mathfrak{p}^{s_j})=Z(1,j)(1- \mathfrak{p}^{s_j})=L_\mathfrak{p}(1,j,\omega^i)=\prod_{\nu\not\in S}
(1-\omega(\nu)^i\langle \nu \rangle_{\mathfrak{p}}^j)^{-1}=\Psi_{j,i}(\Theta_S(1)) \,, \]
where the extra factors at the ramified primes different from $\mathfrak{p}$ and $\infty$ disappear
because in our case $S=\{\mathfrak{p},\infty\}$. Taking $\chi$-parts and projecting from $G_S$ to $\Gamma_\infty$ via $\pi^S_\infty$, one gets
\[ \chi(\pi^S_\infty(L_\mathfrak{p}(X,j,\omega^i)(1)) = \Psi_{j,i}(\Theta_\infty(1,\chi)) \]
for characters of type 1. Up to now there are, to our knowledge, very few nonvanishing results on
special values for function fields (see e.g. \cite[Theorem E]{AT} and the discussion on ``trivial zeroes'' in \cite[Section 8.13]{Goss libro}):
it would be interesting
to see if these relations can shed some light on the subject for $L_\mathfrak{p}(1,j,\omega^i)$, which, as seen above,
is basically equivalent to $C_\infty$ being a torsion $\Lambda$-module.
For $F=\F_q(t)$, in \cite[Section 6]{ABBL} the authors present arithmetic information on some Bernoulli-Goss numbers, i.e. on special
values of the Goss Zeta-function at integers: in our setting one should probably consider the finite $\F_q[t]$-module $H(\Phi/A)$ defined by
Taelman in \cite{Tael1} (where $\Phi$ is a Drinfeld module over $A$), which plays the role of the ideal class group of a number field.
For $F=\F_q(t)$ the Bernoulli-Goss numbers are linked to the isotypical components of $H(\Phi/A)$ by \cite[Theorem 1 and Section 10]{Tael2}.
It would be interesting to study inverse limits of
$\mathfrak{p}$-parts of Taelman's modules associated to the fields $F_n$ as objects over the Iwasawa algebra:
it is not clear whether this would lead to special values of our $\mathfrak{p}$-adic $L$-function or of some other (yet to be defined)
$\mathfrak{p}$-adic analytic function (possibly another incarnation of the Stickelberger series).
\medskip
\noindent {\bf Acknowledgements.} We are grateful to Bruno Angl\'es, Francesc Bars and Ignazio Longhi for several useful conversations,
suggestions and comments which provided invaluable contributions to the development of this paper. We would like to thank
Fabrizio Andreatta and Marco Seveso for their help and support. We also thank the anonymous referees for
their remarks which improved the exposition and provided inputs for future research.
|
\section{Background and Motivation}
\subsection{Socio-Technical Data}
An average software user wants their products to be bug-free\cite{simmonds2018complexity}.
However, due to the complex nature of software systems, it is hard to develop bug-free software~\cite{simmonds2018complexity}.
Some development patterns have been shown to correlate with an increased risk of introducing new bugs~\cite{pagerank-commits, rahman2011ownership, fritz2010degree, meneely2009secure} and increased existential risks of the project~\cite{avelino2016novel, cosentino, rigby2016quantifying}.
A particular kind of data that can be used to identify possible sources of project problems is socio-technical data closely aligned with the framework of socio-technical congruence~\cite{cataldo2008socio, congruence}.
The core assumption of socio-technical congruence is that coordination activities of the developers should be in agreement with the coordination requirements, and the coordination requirements are determined by the project development.
Some approaches to identifying problematic parts of software projects are implicitly using socio-technical congruence, see, \emph{e.g.,}\xspace~\cite{avelino2019measuring, fritz2010degree, yamashita2015revisiting}.
For our purposes, we define socio-technical data as a combination of data that reflects interactions between developers (the ``socio-'' part), and data that corresponds to the programming activities performed by the engineers and the technical dependencies between various components of the project (the ``technical'' part)\cite{cataldo2008socio}.
Socio-technical data includes, in particular, information on project evolution and, therefore, may be leveraged to identify the origins of problems that arise during project development.
\subsection{Version Control Systems as Data Sources}
VCS repositories store traces of most development and maintenance efforts in software projects and, therefore, are an indispensable source of socio-technical data~\cite{bird2009promises}, allowing researchers to collect rich datasets for their studies.
Git~\cite{git} is by far the most popular VCS today.
A core concept in Git's data model is a commit---a snapshot of a repository reflecting the state of its file tree.
In addition to the state of the files, commits contain metadata such as the author, timestamp, and links to parent commits representing one or several previous states.
This metadata is particularly important for socio-technical analysis, since it allows to trace individual contributions of developers and the proximity of their contributions by going through the history.
\subsection{Analysis Techniques}
Methods to infer socio-technical data from Git repositories include applying the PageRank algorithm to evaluate the influence of a commit on other commits~\cite{pagerank-commits}, computing the degree of knowledge to evaluate the properties of developers' contributions~\cite{avelino2019measuring, carlson2015engaging}, analyzing collaboration in a project to evaluate its risk of stalling~\cite{cosentino, avelino2016novel, rigby2016quantifying, yamashita2015revisiting}, determining code ownership and code authorship to find code components and source files at risk of having quality issues~\cite{rahman2011ownership, meneely2009secure}, and using socio-technical congruence to measure the alignment between the coordination required by the project technical dependencies and the actual coordination between its members~\cite{congruence, conway}.
\subsubsection{Degree of Knowledge and Degree of Interest}\label{sec:dok-doi}
Evaluating the properties of developers' contributions to projects and the distribution of developers' knowledge is a long-standing problem~\cite{mcdonald2000expertise, mockus2002expertise} with many possible applications from familiarizing new team members with relevant parts of the project
to identifying interesting bug reports~\cite{fritz2010degree}.
\emph{Degree of knowledge} is a metric first introduced by Fritz et al.~\cite{fritz2010degree}, that consists of two parts.
\emph{Degree of authorship} part is a measure of developers' contribution to code, that can be computed with the data from git repository.
\emph{Degree of interest} part is a measure of developers' interactions with code; it is necessary to track developers' behavior to calculate it.
Some of the later implementations of the degree of knowledge rely only on data from Git~\cite{avelino2019measuring, carlson2015engaging}.
The obtained degree of knowledge can be then used to study individual contribution patterns
~\cite{avelino2019measuring} or to compute the bus factor of the project~\cite{avelino2016novel} (see \Cref{sec:bus-factor}).
\subsubsection{PageRank}
PageRank algorithm was originally developed by Google~\cite{googlePageRank} to evaluate web pages popularity.
The more web pages refer to a given web page, the higher score it gets, and the web pages that are referred to by a~web page with a high score also get high scores.
PageRank can be applied to arbitrary linked entities.
Suzuki et al.~\cite{pagerank-commits} have applied it to commits to infer causal relations between the commits and evaluate how commits influence other successive commits.
The researchers focused on bug-introducing and bug-fixing commits to study what kinds of commits are more bug-prone.
\subsubsection{Code Ownership}
Code ownership reflects the
distribution of code authorship between developers at various levels of granularity.
Git repositories are a major source of authorship data~\cite{meneely2009secure, rahman2011ownership}.
Studies of code ownership have unearthed important patterns across many projects: \emph{e.g.,}\xspace higher code ownership
is correlated with higher component quality~\cite{bird2011don};
code changed in a bugfix is less likely to have contributions from multiple authors, and better experience with a certain file makes a developer less likely to introduce defects into it~\cite{rahman2011ownership}.
\subsubsection{Bus Factor}\label{sec:bus-factor}
Bus factor, also known as truck factor,
is defined as the minimal number of developers whose leaving the project (being ``hit by a bus'') would cause the project to stall.
While the common definition of the bus factor is hard to quantify, it is possible to create metrics computed from projects' VCS history that closely match developers' perception of the bus factor~\cite{ferreira2019algorithms}.
Such metrics are usually based on utilizing information about code authorship computed at a line or a file level~\cite{cosentino, avelino2016novel, rigby2016quantifying} and may make use of the degree of authorship concept~\cite{avelino2016novel} (\Cref{sec:dok-doi}).
The risk of stalling is calculated based on the
amount of abandoned code.
This simple risk-gauging approach can be further enhanced to suggest potential successors to own abandoned code~\cite{rigby2016quantifying}, enabling project members to mitigate existential risks.
It is also possible to expand this approach to estimate knowledge loss and persistence of abandoned files~\cite{nassif2017revisiting}.
\subsubsection{Socio-Technical Congruence}\label{sec:congruence-description}
Socio-technical congruence can be construed
as a measure of similarity between the network of technical dependencies within a project and the structure of communication in its team~\cite{congruence}.
One way to define such metric is through the concept of a coordination need.
A \emph{coordination need} indicates that two people should be coordinating based on the technical dependencies and is determined by analyzing the assignments of people to a technical entity such as a source code module and the technical dependencies across such technical entities~\cite{congruence}.
If two engineers have a coordination need but do not coordinate,
a coordination gap may exist, and one of the goals of the socio-technical congruence analysis is to reduce the number of gaps by either aiding coordination
or reducing the number of coordination needs~\cite{sarma2008challenges}.
In the approach of Valetto et al.~\cite{conway}, the network for calculation of congruence unites three different classes of information~(\Cref{fig:stsn}):
\begin{itemize}
\item Information about communication between project members
represented by directed edges on the $G_p$ (\emph{people}) layer.
\item Information about relationships between technical entities,
represented by directed edges on the $G_s$ (\emph{software}) layer.
\item Information about the contributions of participants to the project entities, represented by directed edges from nodes on $G_p$ plane to nodes on $G_s$ plane.
\end{itemize}
\begin{figure}[htp]
\centering
\includegraphics[width=4cm]{sections/pics/conway2.pdf}
\caption{A socio-technical network. Data collected from Git repositories can be used to build the $G_s$ part of the graph and the edges between $G_p$ and $G_s$} \label{fig:stsn}.
\end{figure}
The resulting socio-technical network can be used to calculate congruence as the degree of alignment between social relationships and software relationships.
\subsection{Motivation}
Socio-technical data analysis is a field that naturally attracts attention of researchers from other disciplines.
Moreover, one can argue that the hypotheses proven true for the software developers community may also hold to a certain extent for other communities of practice.
For example, the socio-technical congruence framework ~\cite{cataldo2008socio} is a development of a study by Conway~\cite{Conway1967HOWDC}.
However, tools to mine data from VCS repositories are not easy to obtain: researchers do not always share their tools, or the prototypes may be hard to adapt in new contexts. The available open-source tools such as PyDriller~\cite{PyDriller} or Perceval~\cite{duenas2018perceval} are not directly aimed at extracting socio-technical data.
Implementing one's own data extraction and processing tools is time-consuming and can be especially complicated for a researcher from a community where mining software repositories is not a universal skill.
This significant technical work required for data mining diverts the focus of researchers and developers from their domain.
This observation motivated us to create TNM\xspace---a flexible and easily extendable tool for mining socio-technical data from Git repositories that allows researchers and practitioners to avoid implementing complex mining pipelines and, instead, focus on their problem domain.
\section{Extracting data from git repositories}
As mention before we getting all needed data from git repositories,
which is commonly used in projects.
Git is version control tool with a snapshot data model. It basically
takes a picture of what all files look like at the moment and
stores a reference to that snapshot. To be efficient, if files have
not changed, Git does not store the file again, just a link to the
previous identical file it has already stored.
The main tools for mining data are commits.
Commit stores saves files as they are and permanently stores
snapshot to your Git directory and has the following structure:
\begin{itemize}
\item A set of links to files in a git repository
\item Link to parent commits
\item Meta information (author, date, changed files etc.)
\end{itemize}
Going through the commit history of developers we extract needed
data from meta information of commits.
By using that information,
we can calculate dependencies between developers and project entities. Than we can visualize mined data as networks.
\section{Future work}
We are going to provide extensive documentation for TNM\xspace, further improve its capabilities of integration with arbitrary pipelines, and implement more processing features, such as automatic identity merging.
\section{Introduction}
Many software projects are products of teamwork.
According to the ISBSG repository~\cite{isbsg}, the average size of a development team, averaged over time, is 7.9 members and the median size is 5~\cite{rodriguez2012empirical}.
While teamwork is often a boon that allows developers to have fruitful discussions and create better products~\cite{rahman2011ownership}, it also requires coordination and communication between team members.
Poor communication can result in inconsistent design solutions and bugs and generally impede the development of the project~\cite{stelzer1998success}.
Thus, for teamwork to be successful, it is important for managers and peers to have an understanding of communication and coordination in the team and existing issues with interactions between teammates and understand how these issues can be addressed~\cite{hoegl2001teamwork}.
There is a large and growing body of research dedicated to studying interactions between developers.
Approaches undertaken in these studies can be broadly divided into two groups.
First, it is possible to carry out a study of a group
of engineers to understand their interactions and deduce some patterns leading to a better understanding of collaborative work.
An alternative way is to collect data on interaction of developers and analyze it to devise automatic processing approaches that can be used to produce actionable insights~\cite{cosentino}.
One major source of socio-technical data is version control repositories (VCS repositories).
VCSs such as Git~\cite{git} store information about the state of the system after each commit, along with the information about the developer who made the commit.
It is possible to recover from project VCS repositories~\cite{gall2003cvs} the structure of the project and logical connections between its parts such as
logical coupling~\cite{gall1998detection}.
Furthermore, the structure of projects often mirrors the collaboration network of its contributors~\cite{herbsleb1999architectures, Conway1967HOWDC}).
Thus, information from VCSs can be used as a proxy to derive interactions between the developers at least to an extent.
A number of prior studies investigated collaboration between engineers using information extracted from VCS repositories.
Examples include computing the degree of knowledge to study developers' contributions~\cite{carlson2015engaging, avelino2019measuring}, analyzing code ownership to identify bug-prone components~\cite{rahman2011ownership, meneely2009secure}, estimating existential risks of projects~\cite{cosentino, avelino2016novel, rigby2016quantifying, yamashita2015revisiting}, and applying the PageRank~\cite{googlePageRank} algorithm to infer causal relationships between the commits~\cite{pagerank-commits}.
Despite the fact that socio-technical data is a popular area of study, there is a lack of publicly available tools to mine such data, so researchers have to spend time and effort to develop their own.
Existing open-source tools for data extraction from Git repositories (\emph{e.g.,}\xspace \cite{RepoDriller}, \cite{PyDriller}, and \cite{duenas2018perceval}) allow to mine mostly raw (non-processed) data, which requires extra processing.
Thus, the lack of common toolkits for extraction of and manipulation with socio-technical data constitutes a hurdle that diverts the focus of researchers from their core research questions.
With this observation in mind, we created TNM\xspace---an open-source tool for mining socio-technical data from Git repositories.
TNM\xspace is a fast tool written in Kotlin~\cite{kotlin} and can be used as an external library.
TNM\xspace works with local Git repositories.
TNM\xspace incorporates implementations of several established data mining techniques, or individual \emph{miners}.
Namely, it includes a miner for the degree of knowledge-based files ownership~\cite{carlson2015engaging}, a miner applying the PageRank algorithm~\cite{googlePageRank} to the analysis of a commit history for commit influence evaluation~\cite{pagerank-commits}, miners extracting data for the analysis of socio-technical congruence~\cite{congruence}, a miner for calculating the distribution of commit time over the week, and one for finding files that have been edited by several developers.
Moreover, TNM\xspace can be easily extended to include other analysis algorithms.
The primary contribution of this work is TNM\xspace---a tool that can be used to mine socio-technical data as a standalone tool or integrated into an existing mining pipeline.
\section{Overview of TNM\xspace}
The purpose of TNM\xspace is to mine several types of socio-technical data from Git repositories. The value of the tool is in the reduction of development effort for extracting socio-technical data for further analysis.
In this section, we describe the inner workings of TNM\xspace in more detail.
\subsection{Technologies in Use}
TNM\xspace is written in Kotlin.
It can be used either as a standalone tool or as an external library for JVM applications.
TNM\xspace works with local repositories through JGit~\cite{jgit}.
For complex calculations such as matrix multiplication, TNM\xspace relies on DL4J~\cite{dl4j}.
TNM\xspace features basic visualization capabilities based on \emph{vis-network}~\cite{visj}.
\subsection{Internal Structure}
\begin{figure}[htp]
\centering
\includegraphics[width=.9\columnwidth]{sections/pics/dfd26_without_group.pdf}
\caption{Overview of TNM\xspace data flow. \todo{increase font size to be readable}}
\end{figure}
The main idea behind the structure of TNM\xspace is that
each task is performed by a dedicated class implementing a common interface.
This allows to reuse code responsible for frequent operations such as traversal of Git commit trees.
\textbf{Mappers}. Mappers are singleton classes that map each data entity to a unique numerical identifier.
Using numerical identifiers allows to easily render data in a matrix form,
with each column or row representing the data and the value in a specific cell representing a parameter efficiently capturing relationships between pairs of entities.
All mappers implement the \textit{Mapper} interface.
Currently, three different mappers are implemented in TNM\xspace:
\begin{itemize}
\item \textit{CommitMapper} maps an SHA-1 commit identifier to a unique numerical value.
\item \textit{FileMapper} maps a filepath to a unique numerical value.
\item \textit{UserMapper} maps a developer identity to a unique numerical value.
\end{itemize}
The \textit{Mapper} interface defines two main functions, \textit{add} and \textit{saveToJson}.
The \textit{add} function adds an entity of data to the map and returns its unique numeric ID. \textit{saveToJson} saves the map to JSON.
\textbf{Git Miners}. Git miners are classes implementing the mining tasks.
All miners use a local Git repository to extract data,
and extend the abstract class \textit{GitMiner} with two functions to process commit history in chosen branches and save the~results.
The current version of TNM\xspace includes six GitMiner implementations that we describe below.
\begin{itemize}
\item \textit{FilesOwnershipMiner} is based on the Degree of Knowledge (DOK)~\cite{carlson2015engaging},
which measures the knowledge of a developer or set of developers about a particular section of code.
The miner yields a knowledge score for every \emph{developer + file} pair
in the form of a nested map, and information about the authorship of code on a line level.
\smallskip
\noindent
\item \textit{CommitInfluenceGraphMiner} applies PageRank to commits as proposed by Suzuki et al~\cite{pagerank-commits}.
\textit{CommitInfluenceGraphMiner} finds bug-fixing commits by searching for ``fix'' in commit messages~\cite{osman2014mining}.
Then, using \textit{Git blame}, the miner finds the earlier commits in which the lines changed in the current fix commit were also changed.
The output of the miner is a map of lists, with keys corresponding to fixing commit IDs and values, to the commits introducing the lines changed by the fixes.
\smallskip
\noindent
\item \textit{FileDependencyMatrixMiner} and \textit{AssignmentMatrixMiner} produce data for analysis of socio-technical congruence.
\textit{AssignmentMatrixMiner} is an auxiliary miner that yields a modification count for each \emph{developer + file} pair in the form of a nested map --- data that can be later used for calculation of socio-technical congruence~(\Cref{sec:congruence-description}).
\textit{FileDependencyMatrixMiner} processes commits to find the files that were changed in the same commit.
For each pair of files, the miner yields a number of times they have been edited in the same commit.
This data can be utilized to build the edges in the $G_s$ part of the socio-technical software network based on Conway's law (\Cref{sec:congruence-description},~\cite{Conway1967HOWDC}).
\smallskip
\noindent
\item \textit{WorkTimeMiner} mines the distribution of commits over time in the week.
This data can be used, \emph{e.g.,}\xspace to improve work scheduling by finding intersections in the time distributions between different developers.
\smallskip
\noindent
\item \textit{ChangedFilesMiner} mines sets of changed files for each developer. It can be used, \emph{e.g.,}\xspace for deriving sets of common edited files for multiple developers.
\end{itemize}
\textbf{Calculation}.
Some forms of data require non-trivial computations~\cite{carlson2015engaging}.
To
ensure extensibility, processing code is separated from the miners into dedicated classes.
TNM\xspace features three calculation classes:
\begin{itemize}
\item \textit{CoordinationNeedsMatrixCalculation} computes the coordination needs matrix according to the algorithm of~\cite{congruence}, using the data obtained by \textit{FileDependencyMatrixMiner} and \textit{AssignmentMatrixMiner}.
The computation results are represented as a matrix $C = \{C_{ij}\}$, where $i, j$ are the developer user IDs, and $C_{ij}$ is the relative coordination need~\cite{congruence}
between the two individuals.
\item \textit{MirrorCongruenceCalculation} computes the socio-technical congruence according to \cite{conway}, using the data yielded by \textit{CoordinationNeedsMatrixCalculation}.
Its output is a single number $C$, $0 \leq C \leq 1$, and higher values correspond to higher socio-technical congruence.
\item \textit{PageRankCalculation} computes the PageRank vector according to the algorithm by Suzuki et al.~\cite{pagerank-commits}. A PageRank vector contains importance rankings
for each commit.
The input data for \textit{PageRankCalculation} is the commit influence graph produced by \textit{CommitInfluenceGraphMiner}.
The output is a vector where
each element represents the importance of a commit.
\end{itemize}
\textbf{Visualization}.
TNM\xspace includes basic browser-based visualization generators for output of \textit{FileDependencyMatrixMiner} and \textit{CoordinationNeedsMatrixCalculation}.
\subsection{Extensibility}
Each class in TNM\xspace implements one of the interfaces described above.
This makes it easily extensible to cater for other mining tasks.
\subsubsection{Additional miners}
A new miner can be implemented with minimal effort by extending the GitMiner abstract class.
\begin{lstlisting}[
language = Kotlin,
caption = An example implementation of a new GitMiner,
captionpos = b,
label = lst:usageexample,
basicstyle = \scriptsize]
class MyMiner(
repository: FileRepository,
neededBranches: Set<String>
) : GitMiner(repository, neededBranches, numThreads = 1) {
var consecutiveCommits = 0
private set
override fun process(
currCommit: RevCommit,
prevCommit: RevCommit
) {
val author1 = currCommit.authorIdent.emailAddress
val author2 = prevCommit.authorIdent.emailAddress
if (author1 == author2) consecutiveCommits++
}
override fun saveToJson(resourceDirectory: File) {...}
}
\end{lstlisting}
\subsubsection{Calculation}
To create a new calculation class, one can extend the \textit{Calculation} interface.
The interface contains of two functions: \textit{run} for executing calculations and \textit{saveToJson} for saving the result.
\subsubsection{Visualization}
To create a new visualisation class, one should extend the \textit{GraphHTML} interface.
\subsection{Performance}
We tested TNM performance in mining lists of changed files per user against a trivial script based on pygit2\cite{pygit2} running on an average laptop. For a repository with $\approx53 000$ commits, mining with TNM took 42s compared to 6m 8s for the script. On a smaller repository with $\approx14 000$ commits mining with TNM and the script respectively took 3s and 25s. TNM outperformes pygit2 due to the multithreaded mining.
|
\section{Introduction}
Solar energy has been the fastest-growing type of renewable energy worldwide in recent years \cite{panwar2011role, haegel2017terawatt,alam2013approach}. The recent improvement of solar photovoltaic (PV) makes the small-scale or distributed solar such as rooftop-PV possible. However, the intermittency nature and sparse distribution of small-scale solar pose challenges to grid compatibility [4, 5] and operation. Monitoring solar panel installations including their locations and sizes is increasingly meaningful to government and electricity companies for planning power grids and minimising potential risks. Thanks to the improvements of remote sensing techniques, very high-spatial-resolution remote sensing images are now available for automatic and regular inspection of solar panel distributions at a large scale.
Automatic solar panel mapping in remote sensing images has been attempted in recent years with machine learning techniques. They can be divided into two branches: unsupervised methods and supervised methods. Unsupervised methods often use template matching \cite{wang2018photovoltaic}. To date, supervised methods is the mainstream in solar panel mapping as they have superior capability in distinguishing small scale objects in complex scenes. Supervised object extraction used in \cite{malof2015automatic,malof2016automatic} for solar panel mapping is composed of three main steps: initial localization, feature extraction by handcrafted descriptors, and decision-making via machine learning algorithms. For feature extraction, local color statistic (LCS) feature, texture feature and shape feature are frequently investigated, and support vector machine (SVM) \cite{malof2015automatic,lisolarfinder} and random forest (RF) \cite{malof2016automatic} classifiers are popular choices in the classification phase. Some supervised methods regard the task as a spectral un-mixing problem \cite{karoui2018detection,karoui2019partial} with the aid of hyperspectral remote sensing data.
With the development of deep learning techniques \cite{schmidhuber2015deep,lecun2015deep}, convolutional neural networks (CNNs) have also been applied in the last a few years to solar panel mapping \cite{yuan2016large,castello2019deep,malof2017deep,yu2018deepsolar,zhuang2020automatic}. Yuan et al. proposed a large scale solar panel detection method based on deep convolutional networks in a fully supervised manner, in which feature maps generated by different layers are finally stacked and then fed into a single convolutional layer to produce a dense prediction \cite{yuan2016large}. Later on, Malof et al. \cite{malof2017deep} used a network similar to the VGGNet \cite{simonyan2014very} and investigated the impacts of different training strategies. Different from the previous work, Wang et al. considered the detection of PV arrays as a semantic segmentation task, and introduced SegNet \cite{badrinarayanan2017segnet} to produce dense predictions of PV arrays’ locations and sizes. U-net \cite{ronneberger2015u} and its improved versions such as cross learning-driven U-net method (CrossNets) \cite{zhuang2020automatic} were also introduced to identify the solar installations.
For fully supervised CNN-based methods, manually annotating pixel-wise ground-truths or bounding boxes for providing a large number of training samples is a challenging task as it is usually human-force intensive \cite{zhou2018brief}. In contrast, weaker forms of annotations, for instance image-wise labels indicating whether there are targets in the image or not, are efficient and easy to obtain. This is particularly the case in the field of remote sensing, where the generation of accurate pixel-wise labels relies heavily on expert knowledge. Hence, weakly supervised learning, which uses these coarse annotations to supervise the training of deep learning models is becoming increasingly meaningful \cite{bency2016weakly,choe2019attention,zhu2019learning}. Class activation mapping (CAM) \cite{zhou2016learning} and gradient-weighted class activation mapping (GradCAM) \cite{GRADCAM} and deep feature maps \cite{bency2016weakly} are works in weakly supervised object localization. A number of weakly supervised frameworks are also proposed for object detection and segmentation in remote sensing images \cite{han2014object,HWSL,ma2019weakly,li2018deep}. Yu et al. developed the first weakly supervised deep learning framework for solar panel mapping in very high resolution aerial images, named ‘DeepSolar’ \cite{yu2018deepsolar}, with Inception v3 classification network \cite{szegedy2016rethinking} and CAM. However, as deep representations learned for CNNs only correspond to the most discriminative part of the objects, these methods may fail to provide a complete object content. Although a number of post-processing strategies including dense conditional random field (dense CRF) and Markov random field (MRF) have been proposed to refine the results, difficulties remain in providing high detection accuracy and reducing computational complexity.
In this paper, we propose a pseudo supervised solar panel mapping method based on deep convolutional networks with label correction strategy, aiming to develop an end-to-end network for accurate and efficient solar panel extraction with only image-wise annotations. The main contributions of the proposed method are two-fold:
(1) We construct an end-to-end fully supervised target mapping network by taking advantages of pseudo labels generated by weakly supervised learning, thereby reducing the computational complexity in target mapping.
(2) During the training course, a progressive label correction strategy based on refinement criteria and morphological filtering is proposed to refine the initial pseudo labels. The target mapping network is trained iteratively with progressively corrected labels to gain further improvement in the model development.
\section{Methodology}
The proposed pseudo supervised solar panel mapping method contains three parts: convolutional neural network for image-level classification, pseudo label generation based on gradient-weighted class activation mapping, and fully supervised target mapping network with label correction strategy. The flowchart of the proposed method is shown in Figure 1.
\subsection{Convolutional Neural Network for Image-level Classification}
For the classification network, we adopt a network architecture similar to VGG16 \cite{simonyan2014very}, proposed by Simonyan et al., which contains 13 convolutional layers and three fully connected layers. All the convolutional layers have a very small $3\times 3$ receptive field, fixed stride (1 pixel), and 1 pixel padding, with a rectified linear unit ($Relu$) added to every layer to increase non-linearity. As solar panels are relatively small objects in aerial images, the employment of small receptive fields can help preserve the boundaries and improve completeness. Maxpooling with stride 2 is carried out five times over a $2\times 2$ window, dividing the stacked convolutional layers into five blocks with different sizes of feature maps, which are denoted as $Conv1$, $Conv2$, $Conv3$, $Conv4$, $Conv5$. In the following context, we use $Conv n\_p$ to denote the $p^{th}$ convolutional layers in $n^{th}$ block in the classification network.
In our work, the provided image-wise annotations indicate whether or not there are solar panels in the image (positive or negative samples), then the classification network is trained to solve a binary classifications problem. Two fully connected (fc) layers with 256 channels and another one with 2 channels are added before the soft-max layer. The 2-dimension output of the classification network is the probabilities of the input sample belonging to positive or negative cases, respectively. The cross entropy loss is utilized to train the classification network with all the convolutional layers' weights pre-trained with the ImageNet datasets \cite{russakovsky2015imagenet}.
\subsection{Pseudo Label Generation}
As we attempt to construct a fully supervised model for solar panels mapping, initial solar panel extraction can be obtained via target localization from the positive samples identified by the well-trained image-level classification network. CAM provides a good idea to localize the regions having decisive impacts on the classification scores. It maps the predicted probabilities of different classes back to the feature maps yielded by previous convolutional layers to generate informative maps, in which the most discriminative regions (Solar panels) in the image will be highlighted. The activation map for class $c$ can be computed as follows:
\begin{equation}
f\left ( I ;\Theta \right )_{c} =\sum_{k}^{}w_{c}^{k}\frac{1}{N}\sum_{x,y}^{}F^{k}(x,y),
\end{equation}
\begin{equation}
CAM_{c}=\sum_{k}^{}w_{c}^{k}F^{k}(x,y),
\end{equation}
where the input image with the size of $h\times w$ is denoted with $I\in \mathbb{R}^{h\times w}$. $f\left ( \cdot ;\Theta \right )$ is the nonlinear mapping function represented by the classification network with a parameter set $\Theta$. $f\left ( I ;\Theta \right )_{c}$ is the predicted score of image $I$ for class $c$. $F^{k}(x,y)$ is the $k^{th}$ channel of feature map $F$, and $w_{k}^{c}$ is the weight of the $c^{th}$ neuron in the fully connected layer. $\frac{1}{N}\sum_{x,y}^{}(\cdot )$ is the global average pooling (GAP) operation, $N=h\times w$. $(x,y)$ denotes the pixel location.
CAM, however, has obvious drawbacks: it requires GAP to transfer every channel of the feature maps into a neuron, which may bring negative impacts to classification accuracy \cite{GRADCAM}. To solve this issue, Selvaraju et al. \cite{GRADCAM} proposed a gradient-weighted class activation mapping with the gradient flowing in the network, and the GAP operation is on longer needed in the network architecture.
Specifically, let $F_{i}^{k}$ indicate the $k^{th}$ channel in the feature maps produced by $i^{th}$ convolutional layers. Instead of computing weights via GAP and fully connected layers, GradCAM calculates the gradient of class score $f\left ( I ;\Theta \right )_{c}$ to $F_{i}^{k}$. The final activation map is obtained by combine feature maps with the global average pooled gradients $\widehat{w}_{c}^{k}$. The specific calculation is shown as follows:
\begin{equation}
\widehat{w}_{i,c}^{k}=\frac{1}{N_{i}}\sum_{x,y}^{}\frac{\partial f\left ( I ;\Theta \right )_{c} }{\partial F_{i}^{k}},
\end{equation}
\begin{equation}
GradCAM_{i, c} =Relu\left \{ \sum_{k=1}^{}\widehat{w}_{i,c}^{k} F_{i}^{k}(x,y) \right \}.
\end{equation}
We compare the activation maps generated by convolutional layers in different depth and have observed that deeper convolutional layers provide coarser localization but better coverage, while activation maps obtained with shallow convolutional layers only highlight small part of the discriminative regions with better boundary preservation, as shown in Figure 2.
\begin{figure}[htbp]
\centering
\includegraphics[width=8.5cm]{F2.jpg}
\caption{Activation maps with feature maps produced by different convolutional layers. First row: original images with solar panels highlighted by red lines. Second to Forth row: activation maps generated with $conv3\_3$, $conv4\_3$ and $conv5\_3$ layer. Yellow pixels indicate high activation values while blue ones indicate low values.}
\label{fig:my_label}
\end{figure}
Therefore, we select feature maps produced by $conv4\_3$ to generate activation maps. Then we propose to use Otsu method \cite{otsu1979threshold} to binarize the activation maps to finalize the target labels.
As the original training images are limited, unlabeled images are then utilized, from which possible positive images can be recognized with the trained classification network. GradCAM and Otsu thresholding are then applied to generate more target labels. They are named as the initial pseudo labels $GT^{0}$, as they are self-generated from the classification network. The pseudo labels of the original training samples are also included in $GT^{0}$ for simplicity.
\subsection{Fully Supervised Target Mapping Network with Label Correction Strategy}
\subsubsection{Fully Supervised Target Mapping Network}
In this part, we train a fully supervised target mapping network with pseudo labels using the method presented in Section A and B. Although we add extra training samples by considering unlabeled data by the trained classification network, the number of training samples is limited. Considering this, we construct the network in an encoder-decoder architecture similar to the U-net \cite{ronneberger2015u}.
In the encoder path, four encoder blocks are added, with each containing a $2\times 2$ maxpooling layer and two $3\times 3$ convolutional layers with stride 1. With the path goes deeper, the channels of feature maps doubles after every maxpooling operation. $E_{i}^{2k}$ denotes the output of the $i^{th}$ encoder block with $2k$ channels, $i=1,2,3,4$. $Conv_{3}$ denotes the convolutional layer with $3\times 3$ kernel and 1 pixel stride:
\begin{equation}
E_{0} = I,
\end{equation}
\begin{equation}
E_{i}^{2k}=\downarrow Conv_{3}(Conv_{3}(E_{i-1}^{k})),
\end{equation}
where $I\in \mathbb{R}^{h\times w}$ is the input image with the size of $h\times w$ . $\downarrow $ denotes the maxpooling operation. $E_{i-1}^{k}$ denotes the output of the $(i-1)^{th}$ encoder block with $k$ channels.
\begin{figure}[htbp]
\centering
\includegraphics[width=8.5cm]{F3.jpg}
\caption{The architecture of the fully supervised mapping network.}
\label{fig:my_label}
\end{figure}
Then, two convolutional layers with $3\times 3$ kernel and 1 pixel stride are added to increase the channels of feature maps. $E_{4}^{512}$ is the output of the last encoder block and $B^{1024}$ is the output of the two convolutional layers:
\begin{equation}
B^{1024} =Conv_{3}(Conv_{3}(E_{4}^{512})).
\end{equation}
In the decoder path, every decoder block comprises a $3\times 3$ transpose convolutional layer (up conv layer) with 2-pixel stride and two $3\times 3$ convolutional layers with 1-pixel stride. In order to combine low-level and high-level features, skip connections are added to every corresponding block in the encoder and decoder path in a concatenation way. The input of the first decoder block is $B^{1024}$ and the feature maps $G_{4}^{512}$ generated by the second convolutional layers in the forth encoder block. $D_{1}^{512}$ is the output of the first decoder block:
\begin{equation}
D_{1}^{512}=Conv_{3}(Conv_{3}([\uparrow B^{1024},G_{4}^{512}])).
\end{equation}
The input of the $(j+1)^{th}$ decoder block is the concatenation of the output of the previous block $D_{j}^{k}$ in the decoder path and the feature maps generated by the second convolutional layers in corresponding block $G_{4-j}^\frac{k}{2}$ in the encoder path, $j=1,2,3$:
\begin{equation}
D_{j+1}^{\frac{k}{2}}=Conv_{3}(Conv_{3}([\uparrow D_{j}^{k},G_{4-j}^\frac{k}{2}])),
\end{equation}
where $\uparrow $ denotes the transpose convolutional layer.
Finally, $1\times 1$ convolutional layer and a soft-max layer are added to generate a 2-channel output, which has the same size with the input image. $D_{4}^{64}$ is the output of the decoder path:
\begin{equation}
f\left ( I ;\Phi \right ) =Softmax(Conv_{1}(D_{4}^{64})).
\end{equation}
where $f\left ( I ;\Phi \right )$ is the output of the mapping network with a parameter set $\Phi$.
As solar panels is the minor class compared to other major urban classes in the background of aerial images, we use weighted cross entropy instead of cross entropy to train the network:
\begin{equation}
\alpha = \frac{N-N_{fore}}{N},
\end{equation}
\begin{equation}
Loss = - \sum_{x,y}^{}(\alpha \cdot GT \cdot log(f_{0})+(1-\alpha )\cdot (1-GT)\cdot log(f_{1})),
\end{equation}
where $N_{fore}$ is the number of pixels belonging to the foreground, i.e. solar panels in the ground-truth $GT$. $f_{0}$ and $f_{1}$ are the first and second channels in the final output, respectively.
\begin{figure*}[htp]
\centering
\includegraphics[width=18cm]{F4.jpg}
\caption{Solar panel mapping results by different methods. (a) Original images. (b) DeepSolar. (c) HWSL. (d) GradCAM$_{5}$. (e) GradCAM$_{4}$. (f) PS-CNN. (g) PS-CNNLC.}
\label{fig:my_label}
\end{figure*}
\subsubsection{Label Correction Strategy}
With the uncertainty in the coarse labels provided, the fully supervised network can hardly be trained properly. For example, some rooftop pixels may be identified as solar panels in the initial pseudo labels, which would lead to many false positives; some small solar panels may be omitted, which would lead to many false negatives. In order to address these problems, we propose a progressive label correction strategy to refine the initial pseudo labels and train the mapping network iteratively.
Firstly, we design three criteria for evaluating the output of the mapping network. Given the output $f^{T}$ after $T^{th}$ epochs training, the output $f^{T+2}$ after $(T+2)^{th}$ epochs training is examined based on the following expectations:
\begin{itemize}
\item The size of extracted regions in produced output should be within the general sizes of residential solar panels in aerial images. Based on our observation, the minimum number of panels installed on a rooftop is rarely fewer than 5, and the maximum is often not over 60.
\item Although the initial pseudo label provides localization with certain noise, the output should not be totally different from the initial ones. It is, however, noteworthy that some small panels may be omitted in the initial labels.
\item The area of extracted regions should not decrease or increase significantly in the two successive training epochs. A dramatic change indicates unstable prediction.
\end{itemize}
The proposed rules can be summarized as follows:
\begin{equation}
f^{T+2}_{fore} \in (\beta_{1}\cdot N,\beta_{2}\cdot N),
\end{equation}
\begin{equation}
f^{T+2}_{fore} \in (\gamma _{1}\cdot GT^{0}_{fore},\gamma _{2}\cdot GT^{0}_{fore}),
\end{equation}
\begin{equation}
f^{T+2}_{fore} \in (\delta _{1}\cdot f^{T}_{fore},\delta _{2}\cdot f^{T}_{fore}).
\end{equation}
where $f^{T+2}_{fore}$ denotes the number of pixels belonging to the fore-ground, i.e. solar panels after $f^{T+2}$ is binarized into a binary mask by Otsu. $\beta_{1}$, $\beta_{2}$, $\gamma _{1}$, $\gamma _{2}$, $\delta _{1}$, $\delta _{2}$ are parameters selected by considering the resolution of aerial images and observing the the datasets.
If $f^{T+2}$ meets all the requirements listed above, we consider it as a reasonable output, and can be reused as the label in the next epoch of further training. Otherwise, there are three choices: If $f^{T+2}$ fails to meet the first requirement, the initial label will be used for the next round of training; if $f^{T+2}$ fails to meet the second requirement, the label for next round will be the initial label; if $f^{T+2}$ are dramatically different from the previous $f^{T}$, but meet the requirements one and two, the label will not be updated.
With a reasonable output, morphology operations are further utilized for label refinement. Specifically, the output $f^{T+2}$ is first transformed into a binary mask by the Otsu thresholding:
\begin{equation}
Mask = OTSU(f^{T+2}).
\end{equation}
To minimize the impact of the background interference including shadow, an opening operation with $5\times 5$ structuring element $SE_{1}$ is applied to the produced $Mask$. This can help reduce the false positives in the mapping. Then, another dilation with $3\times 3$ structuring element $SE_{2}$ is conducted to improve the completeness of the regions:
\begin{equation}
{Mask}'=Mask\circ SE_{1} = (Mask \oplus SE_{1} )\ominus SE_{1},
\end{equation}
\begin{equation}
GT^{T+2}={Mask}' \oplus SE_{2},
\end{equation}
where $\circ$, $\oplus$, $\ominus$ denotes the opening, dilation and erosion operation, respectively.
After the new labels are updated each time, the mapping network is further trained.
\begin{figure*}[htp]
\centering
\includegraphics[width=18cm]{F5.jpg}
\caption{Solar panel mapping results marked with true positives (Yellow), true negatives (black), false positives (Green) and false negatives (Red). (a) Original images. (b) DeepSolar. (c) HWSL. (d) GradCAM$_{5}$. (e) GradCAM$_{4}$. (f) PS-CNN. (g) PS-CNNLC.}
\label{fig:my_label}
\end{figure*}
\begin{table}[htbp]
\centering
\caption{Quantitative Performance Comparison on The Aerial Dataset}
\begin{center}
\begin{tabularx}{0.45\textwidth}{l c c c c c}
\toprule[1.3pt]
\textbf{Method} & \textbf{AC} &\textbf{AUC} & \textbf{P}& \textbf{R}& \textbf{$F_{\theta}$} \\[1.1ex]
\toprule[1.3pt]
DeepSolar& 0.9776& 0.9841& 0.6767& 0.7793& 0.6908 \\[1.1ex]
\toprule[0.5pt]
HWSL&0.9772& 0.8802& 0.7910& 0.5741& 0.6906
\\[1.1ex]
\toprule[0.5pt]
GradCAM$_{4}$&0.9853& \textbf{0.9944}& 0.8195& 0.7811& 0.7999
\\[1.1ex]
\toprule[0.5pt]
GradCAM$_{5}$&0.9374& 0.9774& 0.3530& \textbf{0.9079}& 0.4079
\\[1.1ex]
\toprule[0.5pt]
PS-CNN&0.9896& 0.9941& 0.8329& 0.8938& 0.8419
\\[1.1ex]
\toprule[0.5pt]
PS-CNNLC&\textbf{0.9912}& 0.9929& \textbf{0.9263}& 0.8245& \textbf{0.8975}
\\[1.1ex]
\toprule[1pt]
\end{tabularx}
\label{tab1}
\end{center}
\end{table}
\section{Experiments}
\begin{figure}
\centering
\includegraphics[width=9cm]{F6.jpg}
\caption{ROC curves and PR curves of different mapping methods.}
\label{fig:my_label}
\end{figure}
\subsection{Experimental Settings}
\subsubsection{Dataset}
The proposed method was evaluated on an aerial image (RGB) dataset based on the Google Static Map API. All the images were collected in Canberra, ACT, Australia in April 2019 with the spatial resolution higher than 0.3 meters. For the image-level classification network, the training set contain 428 positive samples and 446 negative samples while the testing set comprises 25 positive and 25 negative samples. Manually annotated image-level labels were utilized for training of the classification network. Beside the 428 positive samples, 2000 unlabeled samples are added to produce more positive samples and corresponding pseudo labels for the target mapping network. As a result, 1493 training samples were available for the development of the fully supervised mapping network. The testing set for the target mapping network contains 25 samples. All samples employed have the size of $256\times 256 \times 3$.
\subsubsection{Implementation Details}
The proposed method was implemented with Tensorflow and trained on a single NVIDIA Tesla P4 GPU. The weights of all the convolutional layers in the classification network was initialized by the VGG16 pre-trained over the ImageNet. The fully connected layers were randomly initialized with a normal distribution. RMSprop optimizer with learning rate $10^{-4}$ was used to train the classification network. The batch size is 16. The fully supervised mapping network was trained by the RMSprop optimizer with initial learning rate $10^{-3}$ and batch size 15. The learning rate was decreased by a factor of 0.8 every 20 epochs. The mapping network was firstly trained 800 epochs without the label correction strategy and then 40 epochs with the label correction strategy. In the label correction strategy, we set $\beta _{1}=0.01$, $\beta _{2}=0.1$, $\gamma _{1}=0.6$, $\gamma _{2}=1.4$, $\delta _{1}=0.8$, $\delta _{2}=1.2$.
\subsubsection{Evaluation Metrics}
For quantitative evaluation of the mapping results, we used overall accuracy (AC), receiver operator characteristic (ROC) curve, area under the curve (AUC), Precision, Recall and F-measure. With a generated map, varying thresholds are applied to binarized the map. For every threshold utilized, the false positive rate and true positive rate are calculated for ROC curve; the overall accuracy, Precision $P$, Recall $R$ and F-measure are defined as follows:
\begin{equation}
AC = \frac{TP+TN}{TP+TN+FP+FN},
\end{equation}
\begin{equation}
P = \frac{TP}{TP+FP},
\end{equation}
\begin{equation}
R = \frac{TP}{TP+FN},
\end{equation}
\begin{equation}
F_{\theta} = \frac{(1+\theta^{2})\cdot P\cdot R}{\theta^{2}\cdot P + R},
\end{equation}
where $TP$, $TN$, $FP$, $FN$ denotes the total number of true positive, true negative, false positives and false negative pixels in the binary segmentation map. In this paper, $\theta^{2} =0.3$.
Higher overall accuracy, Precision, Recall, F-measure and AUC indicate better performance.
\subsection{Comparisons with State-of-the-Art Methods}
\begin{figure*}[htp]
\centering
\includegraphics[width=18cm]{Fig7.jpg}
\caption{Extraction results by different methods. (a) Original images. (b) Ground Truth. (c) DeepSolar. (d) HWSL. (e) GradCAM$_{5}$. (f) GradCAM$_{4}$. (g) PS-CNN. (h) PS-CNNLC.}
\label{fig:my_label}
\end{figure*}
\subsubsection{Comparison Methods}
We compared the proposed method with two state-of-the-art methods including DeepSolar, a weakly supervised CNN-based method proposed for solar panel mapping and Hierarchical Weakly Supervised Learning (HWSL), a weakly-supervised CNN-based method proposed for residential area semantic segmentation in remote sensing images. We used the source codes of DeepSolar and HWSL released by the authors. All the parameters were set according to the authors' descriptions in the literature.
\subsubsection{Ablation Study}
In order to further reveal the validity of the proposed pseudo supervised method, ablation study was also conduct. We investigated the influence of the employment of different convolutional layers in activation map generation, and the impact of label correction strategy. The four cases for the ablation study are:
\begin{itemize}
\item GradCAM$_{5}$: mapping results using GradCAM with $Conv5\_3$ in classification network.
\item GradCAM$_{4}$: mapping results using GradCAM with $Conv4\_3$ in classification network.
\item PS-CNN: the proposed the pseudo supervised convolutional neural network trained with only initial pseudo labels generated by GradCAM with $Conv4\_3$ in classification network.
\item PS-CNNLC: the proposed pseudo supervised solar panel mapping method with label correction strategy. Initial pseudo labels were generated by GradCAM with $Conv4\_3$ in classification network.
\end{itemize}
\subsubsection{Discussion}
We evaluated of the state-of-the-art methods and ablation study visually and quantitatively. The solar panel mapping results by different methods are showed in Figure 4. In Figure 5, results are marked with true positives (Yellow), true negatives (black), false positives (Green) and false negatives (Red). The quantitative performance is summarized in Table 1, with highest values of every metric presented in bold. The ROC curve and PR curve are shown in Figure 6. Figure 7 shows the extraction results.
The results reveal that the proposed method substantially outperforms other weakly supervised methods including DeepSolar and HWSL. Deepsolar provides rough localization for solar panels with certain false negatives and false positives. HWSL shows better boundary maintenance, but the extracted regions are incomplete. In addition, some special ground objects similar to solar panels are also extracted by mistake. Compared with Deepsolar and HWSL, our proposed network provides well-localized solar panel identification and well-preserved boundary completeness, with lower false alarm rate.
In the ablation study, GradCAM$_{4}$ is the baseline of our work. From Figure 4(e), we can see that compared with the results of GradCAM$_{5}$, the results of GradCAM$_{4}$ are more accurate. The proposed PS-CNN combines the advantages of weakly and fully supervised learning, and outperforms other weakly supervised methods including DeepSolar and HWSL both visually and quantitatively. By comparing the results of PS-CNN and PS-CNNLC, the impact of the label correction strategy can be revealed: it helps reduce the false positive to a low extent and provide well-defined boundaries. The quantitative results in Table 1 show that PS-CNN and PS-CNNLC have higher mapping accuracy and better overall performance in precision and recall.
\section{Conclusion}
In this paper, we proposed a pseudo supervised solar panel mapping method based on deep convolutional networks with label correction strategy in aerial images. In the proposed method, a classification network supervised by image-wise labels is trained to identify images with solar panels. Pseudo labels are produced with activation maps generated by the classification network and GradCAM. Then, a fully supervised mapping network is constructed in an encoder and decoder manner to produce full-resolution detection for solar panels. In order to improve the accuracy, a label correction strategy is developed to refine the labels in the training phase. Accuracy improvement is achieved when the mapping network is trained with progressively corrected labels.
\bibliographystyle{IEEEtran}
|
\section{Introduction}
Application of strain is one of the effective ways to engineer the band structure of materials. We can tune the properties of materials by strain through the control of the band structure. For example, strained silicon technology has been successful in improving device performance~\cite{Strain-Engineering-Tsutsui}. Recently, there is a growing interest in strain engineering in two-dimensional materials, such as graphene and transition metal dichalcogenides, the splendid properties of which are considered to be useful for a wide range of applications~\cite{Strain-Engineering-Sun}. On the other hand, strain has been underused for bulk single crystals because of the difficulty in applying homogeneous strain. Recent development of piezoelectric-based pressure cells~\cite{Hicks-Sr2RuO4} boosted measurements on uniaxially strained single crystals, but there are few studies using biaxial strain.
Iron-based superconductors are suitable materials to study the strain dependence of physical properties because their band structures are sensitive to the local crystal structure, in particular, the shape of tetrahedrons composed of iron and pnictogen/chalcogen atoms. Biaxial strain deforms the crystal lattice without introducing disorder. This feature is not shared by elemental substitution with isovalent atoms giving rise to a chemical-pressure effect.
Among iron-based superconductors, FeSe serves as an intriguing case of the interplay between superconductivity, magnetism, and electronic nematicity, which can be tuned by chemical substitution and application of physical pressure~\cite{Bohmer2018,Shibauchi2020}. FeSe exhibits a tetragonal-to-orthorhombic structural phase trainsition at $T_{\rm s} \sim$ 90 K and is superconducting below $\sim$ 8 K. A prominent feature of FeSe is its very small effective Fermi energy~\cite{Kasahara-Crossover}, and thus a change in the crystal structure is expected to make a large impact on physical properties. Thin films of FeSe can be grown on various substrates, leading to various degrees of in-plane strain~\cite{Nabeshima-Film-JJAP}. Angle-resolved photoemission spectroscopy (ARPES) on single crystals and thin films of FeSe revealed a systematic variation of the band structure with strain~\cite{Phan-ARPES}. Reflecting the change in the band structure, a superconducting transition temperature ${T_{\rm c}}$ shows a systematic strain dependence~\cite{Nabeshima-Film-JJAP}. Although FeSe thin films definitely offer an opportunity to study a variation of physical properties with biaxial strain, the sample quality varies depending on substrate materials. This weakness can be overcome by studies on biaxially strained single crystals.
In this study, we demonstrate that the band structure of FeSe single crystals was systematically controlled by applying biaxial strain, evidenced by electronic transport measurements. FeSe single crystals were affixed on substrates, resulting in the deformation of FeSe with substrates when cooling down. There are a few studies in which biaxial strain was induced by such a method~\cite{Wang-ST-1,Bohmer-Ca122,Fente2018}, but no systematic study has been reported so far. In the present work, we used several substrate materials and studied a systematic strain dependence of physical properties of FeSe. It turned out that tensite biaxial strain gives rise to an increase in $T_{\rm s}$. We also observed an increase (decrease) in ${T_{\rm c}}$ with compressive (tensile) strain, which follows the result for thin films~\cite{Nabeshima-Film-JJAP}. The analysis of magneto-transport results using a compensated three-carrier model revealed that the densities of all the three carriers systematically change with strain. This indicates that we succeeded in controlling the band structure of single-crystalline FeSe.
\section{Experimental}
\newcommand{${\rho}_{\rm 300K}=0.45 \hspace{1mm} {\rm m}{\Omega}{\hspace{0.5mm}}{\rm cm}$}{${\rho}_{\rm 300K}=0.45 \hspace{1mm} {\rm m}{\Omega}{\hspace{0.5mm}}{\rm cm}$}
Single crystals of FeSe were grown by a chemical vapor transport method as described elsewhere~\cite{Bohmer-Variation, Nakajima-Lattice}. To suppress dispersion of sample quality as much as possible, single crystals measured in this study were taken from the same batch. In-plane biaxial strain was applied on single crystals attached on substrates by means of the difference of thermal-expansion coefficients between samples and substrates. Polycarbonate (C.I. Takiron Corporation, PS610), Stycast\textsuperscript{\textregistered} 2850FTJ epoxy (Henkel Ablestik Japan Ltd., with Catalyst 9), soda-lime glass (AS ONE Corporation, ASLAB Slide Glass), borosilicate glass (SCHOTT AG, TEMPAX Float\textsuperscript{\textregistered}), and quartz glass (TOSOH Quartz Corporation, Synthetic Silica Glass, ES grade) were utilized as substrates. FeSe samples were attached using cyanoacrylate adhesives (Tokyo Measuring Instruments Laboratory Co., Ltd., CN adhesives) and epoxy adhesives (ThreeBond Co., Ltd., TB2086M) for the former two and the latter three substrates, respectively. To determine the thermal expansion of the five substrates, we measured the temperature dependence of electrical resistance of a strain gauge attached on the substrates as well as a copper plate as a reference material~\cite{Cu-Thermal}. FeSe single crystals were cut into a rectangular shape, the typical size of which was 0.7--1.0 mm in length and 0.3--0.5 mm in width. The attached samples were cleaved to fully transmit the strain to them. The thickness of the sample, typically 5 ${\upmu}$m or less, was derived from the resistivity value of FeSe at $T=300$ K: {${\rho}_{\rm 300K}=0.45 \hspace{1mm} {\rm m}{\Omega}{\hspace{0.5mm}}{\rm cm}$} (See Appendix A). Electrical resistivity was measured using a standard four-probe method, and electrical contacts were made with gold paste. Hall effect and magnetoresistance were measured with magnetic fields up to 7 T applied parallel to the $c$ axis. Hall coefficients were determined in the zero-field limit.
\section{Results}
\begin{figure}
\includegraphics[width=8cm]{figure1.eps}
\caption{\label{fig:1}
(a) Temperature dependence of the relative length changes $\Delta L/L_{\rm 300K}$ of polycarbonate, Stycast 2850FTJ, soda-lime glass, borosilicate glass, and quartz glass. The data for the in-plane length of twinned FeSe are also plotted~\cite{Bohmer-Lack}. (b) Temperature dependence of in-plane strain imposed on FeSe single crystals on the five substrates.}
\end{figure}
Figure~\ref{fig:1}(a) shows the relative length changes ${\Delta}L/L_{\rm 300 K}$ of the five substrate materials as a function of temperature. We also show the data for the in-plane length of twinned FeSe~\cite{Bohmer-Lack}. Thermal contraction of FeSe is smaller than that of polycarbonate and Stycast 2850FTJ and larger than that of the three kinds of glasses. This indicates that compressive in-plane strain is imposed on FeSe attached on the polycarbonate and Stycast 2850FTJ substrates, while the glass substrates create tensile strain. Assuming that the length of FeSe exactly follows that of the substrate, we estimated the value of in-plane strain ${\varepsilon}$ transmitted to the sample. As shown in Fig.~\ref{fig:1}(b), the magnitude of the biaxial strain is monotonically increased with decreasing temperature. ${\varepsilon}$ varies with temperature, but it can be regarded as a constant for a limited temperature window. At 5 K, ${\varepsilon}$ reaches $-0.96\%$ and 0.23{\%} for the polycarbonate and the quartz-glass substrate, respectively.
\begin{figure}
\includegraphics[width=8.4cm]{figure2.eps}
\caption{\label{fig:2}
(a) Temperature dependence of resistivity ${\rho}(T)$ for the strain-free and strained FeSe. The curves are offset to avoid overlapping. (b) Temperature derivative and (c) second derivative of ${\rho}(T)$ in the magnified region around ${T_{\rm s}}$. Arrows indicate $T_{\rm s}$ determined from the peak position of d$^{2}\rho$/d$T^2$.}
\end{figure}
\begin{figure}
\includegraphics[width=8cm]{figure3.eps}
\caption{\label{fig:3}
Strain dependence of ${T_{\rm s}}$ of FeSe. Square symbols represent ${T_{\rm s}}$ obtained from the study on thin films~\cite{Nabeshima-Film-JJAP}. The gray line is a guide to the eye.}
\end{figure}
In Fig.~\ref{fig:2}(a), we show the temperature dependence of resistivity ${\rho}(T)$ of FeSe on various substrates for a wide temperature range. A kink is observed at ${T_{\rm s}}$, which results in an abrupt change in the derivative [Fig.~\ref{fig:2}(b)]. For the polycarbonate substrate giving rise to most compressive strain, a kink structure is highly smeared. While B\"{o}hmer \textit{et al.}\ estimated $T_{\rm s}$ from the midpoint of the steplike anomaly of $\mathrm{d}\rho/\mathrm{d}T$~\cite{Bohmer-Variation}, we determined $T_{\rm s}$ from the peak position of the second derivative of ${\rho}(T)$, as indicated by arrows in Fig.~\ref{fig:2}(c). ${T_{\rm s}}$ is 87 K for the strain-free sample and systematically changes with strain. In Fig.~\ref{fig:3}, we plot ${T_{\rm s}}$ as a function of ${\varepsilon}$, the degree of the strain at ${T_{\rm s}}$. One can see a tendency that ${T_{\rm s}}$ increases with increasing ${\varepsilon}$, consistent with the thin-film study~\cite{Nabeshima-Film-JJAP}. This indicates that the present method works well to produce various degrees of biaxial strain.
\begin{figure
\includegraphics[width=8cm]{figure4.eps}
\caption{\label{fig:4}
Temperature dependence of (a) electrical resistivity normalized at 30 K and (b) Hall coefficient for strain-free and strained FeSe. The displayed $\varepsilon$ corresponds to the value at $T_{\rm c}$. The arrows indicate the minima of $R_{\rm H}$ at $T^{*}$.}
\end{figure}
\begin{figure}
\includegraphics[width=8cm]{figure5.eps}
\caption{\label{fig:5}
Strain dependence of {$T_{\rm c}^{\rm zero}$}, {$T_{\rm c}^{\rm onset}$}, and $T^{*}$. Diamond symbols represent ${T_{\rm c}}$ obtained from the study on thin films~\cite{Nabeshima-Film-JJAP}. The gray line is a guide to the eye. Inset shows the strain dependence of $T^{*}/$$T_{\rm c}^{\rm onset}${}.}
\end{figure}
Having confirmed the application of biaxial strain, we measured tranport properties at low temperatures. Figure~\ref{fig:4}(a) shows the temperature dependence of resistivity normalized to the value at 30 K for strain-free and strained FeSe. Although a slight broadening of the superconducting transition is seen for the strained samples, the systematic change in ${T_{\rm c}}$ with strain is clearly observed, indicating that the applied strain is satisfactorily homogeneous. The strain-free sample shows an abrupt drop of resistivity at 8.4 K and zero resistivity at 8.2 K. The onset ${T_{\rm c}}$ is enhanced with compressive strain to 14.0 K for ${\varepsilon}=-0.95\%$ and is decreased with tensile strain to 7.7 K for ${\varepsilon}=0.23${\%}. In Fig.~\ref{fig:5}, we plot $T_{\rm c}$ as a function of ${\varepsilon}$. The strain dependence of ${T_{\rm c}}$ is coincident with the study on thin films~\cite{Nabeshima-Film-JJAP}.
Figure~\ref{fig:4}(b) shows the temperature dependence of Hall coefficient $R_{\rm H}(T)$ below 30 K. The negative Hall coefficient indicates dominant contribution of electron carriers. In the strain-free sample, $R_{\rm H}(T)$ shows a minimum at $T^{*}=16$ K. This behavior is consistent with the previous study~\cite{Kasahara-Giant}, although the temperature in the present study is slightly lower. With applying compressive strain, $T^{*}$ is enhanced to 19 K for ${\varepsilon}=-0.95\%$ (Fig.~\ref{fig:5}). This seems to be linked with an increase in ${T_{\rm c}}$. In contrast, $T^{*}$ abruptly increases with tensile strain (23 K at $\varepsilon=0.23\%$), which is the opposite direction of the variation of ${T_{\rm c}}$. The origin of the minimum of $R_{\rm H}(T)$ at $T^{*}$ has yet been unclear, but a relation with superconducting fluctuations has been debated~\cite{Kasahara-Giant}. It is worth estimating $T^{*}/{T_{\rm c}}$ because the Hall effect can be a good probe to detect superconducting fluctuations~\cite{Hall-Fluctuation-2,Hall-Fluctuation-1}. As shown in the inset of Fig.~\ref{fig:5}, $T^{*}/{T_{\rm c}}$ shows a systematic increase with tensile strain, in contrast to the non-monotonic variation of $T^*$. This behavior might indicate that superconducting fluctuations can be controlled in terms of FeSe as a candidate superconductor in the crossover regime between the weak-coupling Bardeen-Cooper-Schrieffer and the strong-coupling Bose-Einstein-condensation limit~\cite{Kasahara-Crossover,Kasahara-Giant}.
\begin{figure}
\includegraphics[width=8cm]{figure6.eps}
\caption{\label{fig:6}
Magnetic-field dependence of (a) Hall resistivity $\rho_{xy}$ and (b) magnetoresistance $\Delta \rho_{xx}(B) / \rho_{xx}(0)$ of FeSe with various degrees of biaxial strain at 30 K. Inset shows the strain dependence of the Hall resistivity and the magnetoresistance at $B$ = 7 T. A vertical broken line separates distinct strain dependences, which implies the presence of a Lifshitz transition.}
\end{figure}
The strain-induced variation of ${T_{\rm c}}$ and $T^{*}$ infers a change in the band structure. To get firmer evidence, we conducted magneto-transport measurements. Figures~\ref{fig:6}(a) and \ref{fig:6}(b) show the magnetic-field dependence of Hall resistivity $\rho_{xy}$ and magnetoresistance $\Delta \rho_{xx}(B) / \rho_{xx}(0)$, respectively, up to 7 T for strain-free and strained FeSe at $T=30$ K. The absolute value of $\rho_{xy}$ increases with increasing $\varepsilon$ from $-0.92\%$ to $0.08\%$. $\rho_{xy}$ turns to decrease with further increasing $\varepsilon$. A similar behavior is seen for the magnetoresistance. With increasing $\varepsilon$, the magnetoresistance increases at first, takes the maximum at $\varepsilon=0.08\%$, and then decreases. The non-monotonic strain dependence is clearly seen in the inset of Fig.~\ref{fig:6}(b).
Since FeSe is a compensated metal, both holes and electrons contribute to the charge transport. The present result can be understood as a loss of electrons with high mobility exceeding $\varepsilon=0.08\%$. Relatively enhanced hole contribution makes $\rho_{xy}$ shift to the positive side. In addition, the reduction of mobility leads to the decrease in the magnetoresistance. These imply the drastic change in the Fermi surface with biaxial strain. Indeed, the change in the Fermi-surface topology is observed by ARPES on thin-film FeSe~\cite{Phan-ARPES}. The electron pocket at the Brillouin-zone corner, which is present for the strain-free sample, is absent for the film with tensile in-plane strain, resulting in tiny electron pockets away from the zone corner associated with the Dirac-cone-like band dispersion. Together with our magneto-transport result, the Lifshitz transition is likely to occur between $\varepsilon=0.08\%$ and $0.17\%$.
\section{Data analysis and discussion}
The observed nonlinear Hall effect indicates the presence of multiple carriers. In such a case, analysis with a two-carrier model has widely been performed. This model is, however, not appropriate to be applied to FeSe because a compensated two-carrier model with equal numbers of holes and electrons yields a linear Hall effect, in contrast to the present result shown in Fig.~\ref{fig:6}(a) (see Appendix B for more details).
\begin{figure*}
\includegraphics[width=17.4cm]{figure7.eps}
\caption{\label{fig:7}
Magnetic-field dependence of (a)--(d) Hall resistivity and (e)--(h) magnetoresistance for strain-free and strained FeSe at 30 K. Fitting curves obtained using a compensated three-carrier model are also shown. Strain dependence of (i) carrier densities (${n_{\rm h}}$, ${n_{\rm e1}}$, and ${n_{\rm e2}}$) and (j) mobilities (${{\mu}_{\rm h}}$, ${{\mu}_{\rm e1}}$, and ${{\mu}_{\rm e2}}$) extracted by the three-carrier fitting.}
\end{figure*}
\begingroup
\renewcommand{\arraystretch}{1.4}
\begin{table}
\caption{\label{tab:T1}
Carrier densities and mobilities extracted from the compensated three-carrier analysis for strain-free and strained FeSe at 30 K.}
\begin{center}
\begin{tabular}{p{7.3em}p{3em}p{4.5em}p{4.5em}p{4.5em}} \hline \hline
Parameters & \hfil ${\varepsilon}$ (\%) \hfil & \hfil hole \hfil & \hfil electron 1 \hfil & \hfil electron 2 \hfil \\ \hline
$n$ ($10^{20}$ cm$^{-3}$) & \hfil $-0.92$ \hfil & \hfil 1.332 \hfil & \hfil 1.309 \hfil & \hfil 0.023 \hfil \\
${\mu}$ (cm$^{2}$V$^{-1}$s$^{-1}$) & & \hfil 396 \hfil & \hfil 390 \hfil & \hfil 1974 \hfil \\ \hline
$n$ ($10^{20}$ cm$^{-3}$) & \hfil $-0.31$ \hfil & \hfil 1.269 \hfil & \hfil 1.231 \hfil & \hfil 0.038 \hfil \\
${\mu}$ (cm$^{2}$V$^{-1}$s$^{-1}$) & & \hfil 401 \hfil & \hfil 415 \hfil & \hfil 2014 \hfil \\ \hline
$n$ ($10^{20}$ cm$^{-3}$) & \hfil 0 \hfil & \hfil 1.236 \hfil & \hfil 1.195 \hfil & \hfil 0.041 \hfil \\
${\mu}$ (cm$^{2}$V$^{-1}$s$^{-1}$) & & \hfil 420 \hfil & \hfil 439 \hfil & \hfil 2098 \hfil \\ \hline
$n$ ($10^{20}$ cm$^{-3}$) & \hfil 0.08 \hfil & \hfil 1.213 \hfil & \hfil 1.165 \hfil & \hfil 0.048 \hfil \\
${\mu}$ (cm$^{2}$V$^{-1}$s$^{-1}$) & & \hfil 434 \hfil & \hfil 458 \hfil & \hfil 2146 \hfil \\ \hline \hline
\end{tabular}
\end{center}
\end{table}
\endgroup
We thus analyzed the magneto-transport data using a three-carrier model~\cite{Kim1999,Ishida-Ba122} (See Appendix C for the formalism of this model). In light of the band structure of FeSe~\cite{ARPES-FeSe-1, ARPES-FeSe-2}, one can consider one hole and two electron bands contributing to the transport properties. Indeed, the previous transport studies pointed out that the three types of carriers well explain the experimental data~\cite{Watson2015}. The three-carrier model has six parameters: carrier densities ({$n_{\rm h}$}, {$n_{\rm e1}$}, and {$n_{\rm e2}$}) and mobilities ({${\mu}_{\rm h}$}, {${\mu}_{\rm e1}$}, and {${\mu}_{\rm e2}$}) for one hole and two electron carriers. Here, we put two constraints on this model. One is charge compensation required in the present system, i.e., ${n_{\rm h}}={n_{\rm e1}}+{n_{\rm e2}}$. The other is that the calculated resistivity in zero field agrees with the value obtained experimentally [$1/{\rho}=e({n_{\rm h}}{{\mu}_{\rm h}}+{n_{\rm e1}}{{\mu}_{\rm e1}}+{n_{\rm e2}}{{\mu}_{\rm e2}})$]. Using this compensated three-carrier model, we fitted the experimental data of the Hall effect and magnetoresistance simultaneously. The fitting curves for ${\varepsilon}=0${\%} are displayed in Figs.~\ref{fig:7}(c) and ~\ref{fig:7}(g). One can see that the experimental results are well reproduced. The obtained parameter sets, shown in Table~\ref{tab:T1}, are characterized by distinct two types of electron carriers. The first one shows similar parameters to those of the hole carrier, whereas the other has very small carrier density ${n_{\rm e2}}$ and high mobility ${{\mu}_{\rm e2}}$. The present result is consistent with the previous transport study~\cite{Watson2015}. Taking into account the quantum oscillation~\cite{Terashima-SdH} and recent ARPES~\cite{Yi-ARPES} measurements, the first and second electron carriers likely arise from electron pockets at the Brillouin-zone corner consisting of $d_{xy}$ and $d_{yz}$ character for the former and mainly $d_{xy}$ character for the latter, while the hole carrier corresponds to a hole pocket at the zone center with $d_{xz}$ character.
Now let us move on to the strain dependence. Figures \ref{fig:7}(a)--\ref{fig:7}(h) show the fitting curves of the magneto-transport measurements on FeSe with four different degrees of biaxial strain. The magneto-transport data for even larger ${\varepsilon}$ are not shown because the Fermi-surface topology likely changes as mentioned above (see Appendix D). We summarize the fitting results of $n$ and ${\mu}$ as a function of ${\varepsilon}$ in Figs.~\ref{fig:7}(i) and ~\ref{fig:7}(j), respectively. The extracted parameters are also shown in Table~\ref{tab:T1}. All parameters exhibit a systematic strain dependence. ${n_{\rm h}}$ and ${n_{\rm e1}}$ monotonically increase with decreasing ${\varepsilon}$. This agrees with the studies on thin films~\cite{Phan-ARPES,Nabeshima-Film-JJAP} which demonstrated that compressive strain enlarges the Fermi surface. On the other hand, the second electron carrier density ${n_{\rm e2}}$ shows a decrease. This behavior would arise from an upward shift of the $d_{xy}$ band due to compressive in-plane strain. Note that the shrinkage of the Fermi surface with decreasing ${\varepsilon}$ was not observed by the ARPES study~\cite{Phan-ARPES} probably because the electron pocket with $d_{xy}$ character is difficult to see due to its weak photoemission matrix elements~\cite{Yi-ARPES}. The increase in the net carrier density seems to be related with an increase in ${T_{\rm c}}$. The present result indicates that we definitely controlled the band structure of single-crystalline FeSe with application of biaxial strain.
Strain dependence is also observed for ${\mu}$. For all the three carriers, ${\mu}$ decreases with applying compressive strain. Since ${\mu}=e{\tau}/m^{*}$, where $m^{*}$ is the carrier effective mass and ${\tau}$ is the relaxation time, we have to consider the evolution of $m^{*}$ and ${\tau}$. As mentioned above, compressive strain induces the increase in the net carrier density, which is associated with an increase in band overlap between the hole and electron pockets~\cite{Phan-ARPES}. This probably stems from larger band width for a shorter lattice constant. Indeed, a lighter (heavier) effective mass $m^{*}$ is observed for compressive (tensile) in-plane strain~\cite{Phan-ARPES}. The change in the band structure also influences ${\tau}$ because a larger Fermi pocket gives rise to an expansion of momentum space available for scattering, leading to a decrease in ${\tau}$. The decrease in ${\mu}$ suggests that the effect of ${\tau}$ is more influential in the present case.
\section{Conclusion}
We succeeded in controlling the band structure of single-crystalline FeSe by applying in-plane biaxial strain. A wide range of biaxial strain from $-0.96\%$ to 0.23{\%} was applied for FeSe single crystals attached on the various substrates. The monotonic increase in $T_{\rm s}$ was observed as $\varepsilon$ is increased. The highest ${T_{\rm c}}$ was achieved for the most compressive strain, and ${T_{\rm c}}$ decreased with increasing ${\varepsilon}$. The analysis of the magneto-transport data using the compensated three-carrier model revealed the systematic strain dependence of $n$ and ${\mu}$ for all the three carriers. The present study highlights that biaxial strain is an effective tool to tailor physical properties of materials through the control of the band structure.
\begin{acknowledgments}
This work was supported by The Murata Science Foundation and JSPS KAKENHI Grant number JP18K13500.
\end{acknowledgments}
|
\section{Introduction}
A heat engine is a device that produces work from heat, operating cyclically \cite{Callen}. A quantum heat engine is a heat engine whose working fluid is a quantum object, e.g., a few-level system \cite{ScovilDuBois, Kosloff2014, Kosloff1992}. Recent works have explored the differences and potential advantages of such quantum thermal machines when compared to their classical counterparts \cite{euro, prlPoem}, based on the possibility of exploiting genuinely quantum resources, such as coherence and quantum correlations \cite{prlPoem, Scully03Science299, LatuneSci2019, BarriosPRA2017,PhysRevLett.118.150601, Kamil2016, Scully2011, Goswami2013, Kammerlander2016}, or even the possibility to deliver alternative products, such as steady state entanglement \cite{Bellomo2013,BohrBrask2015,tacchino_steady_2018,Tavakoli2018}.
The study of quantum thermal machines can be traced back to the late Fifties, when H.E.D.~Scovil and E.O.~Schulz-DuBois demonstrated that three-level masers can be treated as quantum heat engines \cite{ScovilDuBois}. Since then, many different quantum analogues of classical heat engines, operating equivalents of Carnot and Otto cycles \cite{Quan2007, Quan2006, Quan2005, Bender2000, Arnaud2002, friedemann2005, Kosloff2006, Kosloff2003, Thomas2011, Peterson2019, Popescu2014, Kosloff2015, Klaers2017}, as well as other general models \cite{Alicki1979, Kosloff1984, Singer2016, Kosloff1996, Kosloff1994, Varinder2020, Boukobza2019, Sourav2020, Menczel2020, Gosh2018, Levy2016} have been presented. All these results have become particularly relevant in the last few years due to the development of new technologies at the nanoscale, where quantum effects become important. Furthermore, the field also presents fundamental theoretical challenges, such as describing the thermodynamics of measurements, the quantum version of fluctuations theorems, the above mentioned role played by coherence and entanglement, or the particularities of thermodynamics in discrete finite size systems \cite{Kammerlander2016, Pekola2015, Horodecki2013, Acin2013, Bejan1996, Suomela2016}.
Most studies in the field aim at establishing the operating limits and/or optimizing microscopic thermal machines working under realistic conditions \cite{Nori2007,Campisi2015,Kosloff2017,Landi2020}. In our previous work~\cite{MFS2020}, we have presented the principles of a newly designed quantum thermal machine fuelled by a non-equilibrium steady state (NESS) and operating with a two-stroke cycle composed of a non-unitary battery charging first stage and an ideal unitary work production second stage. We also exemplified its functioning by calculating the maximum efficiency and power output of a specific working fluid made of two weakly coupled qubits.\\
In the present work, we build on the former study by showing that the working fluid can be actually simplified down to a generic single three-level system (qutrit). This is, somewhat surprisingly, the simplest possible quantum system to produce work under the scheme previously introduced, and it allows envisioning an easier realization with state-of-art quantum technologies. We investigate the functioning of the quantum thermal machine under non-ideal conditions, thus establishing its overall operation limits and evaluating its performances by comparing the different working fluids that can be employed. More specifically, we consider finite time non-adiabatic work production stages for two distinct working fluids, namely the qutrit and the coupled qubits cases. For the latter, we revisit the quantum thermal machine working setup by relaxing the weak coupling condition that was previously considered~\cite{MFS2020}. We also compare different cycle periods and show that the asymptotic limit is reached when the charging period is taken to infinity. This calculation helps analysing the ideal limits of the quantum thermal machine, and the conditions to establish its cyclic operation.
The manuscript is organized as follows. We first revisit the theoretical principles underlying the general functioning of a NESS based quantum thermal machine under cyclic operation, in Sec.~\ref{sec:theory}. In Sec.~\ref{sec:results}, we introduce novel results for a specific implementation based on a single qutrit as the quantum working fluid, operated either in a $V$- or in a $\Lambda$-type energy level configuration; this is compared to the already introduced case of a working fluid made of a pair of coupled qubits, which is hereby described in its general configuration without limiting to weakly interacting qubits. Finally, in Sec.~\ref{sec:summary} we summarize and give concluding remarks and perspectives of the work. Extensive details on the calculations are reported in the Appendix.
\section{Theoretical Background}\label{sec:theory}
We hereby analyze the design principles and general operating performances of non-equilibrium quantum thermal machines. In our proposed framework, originally introduced within an idealized setup in Ref.~\cite{MFS2020}, these devices operate between two reservoirs at different temperatures, establishing a heat current through the working fluid made of a quantum system with well characterized energy spectrum. Such steady energy flow ``charges'' the system by leading it to an operational steady state $\rho_{OSS}$ that is ``active'' in the sense that it has positive ergotropy (namely one can withdraw energy from it by applying a unitary operation)
\cite{Ergotropy}. In the subsequent stroke, accordingly, a coherent drive is applied that withdraws the energy.
In our description of the cycle the staring point of the cycle is the state $\rho_{OSS}$. In the first stage, an external drive is turned on for a finite time $\tau_d$, producing work and transforming the active state $\rho_{OSS}$ into a passive~\cite{PassiveStates} zero-ergotropy state $\rho(\tau_d)$. Then, in the second stage, the external drive is switched off and the heat current takes a time $\tau_r$ to restore the machine to $\rho_{OSS}$ leaving it ready for a new cycle. In the limit of large $\tau_r$ the operational steady state coincides with what is commonly referred to as the Non-equilibrium steady state, $\rho_{NESS}$.
We will assume a Markovian interaction between the quantum system and the heat reservoirs, such that the dynamics of both stages is governed by a master equation in the Lindblad form~\cite{OpenSystems} (In the following we shall adopt $\hbar = 1$ and $k_B = 1$):
\begin{equation}
\dot{\rho} = -i[H(t),\rho] + \mathcal{L}(\rho).
\label{eq1}
\end{equation}
The Hamiltonian reads $H(t) = H_0 + V(t)$, where $H_0$ is the free Hamiltonian of the system and $V(t)$ accounts for the coupling with the external work extraction drive (e.g., an electromagnetic field). The non-unitary part $\mathcal{L}(\rho)$ reads
\begin{equation}\label{dissipative}
\mathcal{L}(\rho) = \sum_j L_j(\rho) =\sum_j \Gamma_j\left[J_j \rho J_j^{\dagger} - \frac{1}{2}\{J_j^{\dagger}J_j, \rho \}\right],
\end{equation}
where $\{A,B\} = AB + BA$. $\Gamma_j$ are the transition rates and $J_j$ the respective jumps induced in the system by the heat reservoirs. In the recharging stage the external drive is switched off ($V(t) = 0$) and the energy gained during the recharging balances with the energy extracted from the system during the discharging, so that there is no variation in the internal energy of the system in a full cycle, i.e. $\Delta U_{cycle} = 0$.
At the end of the cycle, the total heat exchanged with the hot reservoir and the work performed by the machine are given by \cite{Alicki1979}
\begin{eqnarray}\label{genq}
Q^H &=& Q_r^H+Q_d^H \nonumber \\
&=&\int_{0}^{\tau_d} dt \hskip 0.02cm \operatorname{Tr} [L_H(\rho(t))H(t)] \nonumber \\
&+& \int_{\tau_d}^{\tau}dt \hskip 0.02cm \operatorname{Tr} [L_H(\rho(t))H_0],
\end{eqnarray}
\begin{equation}\label{genw}
W = \int_{0}^{\tau_d} dt \hskip 0.02cm \operatorname{Tr} [\rho(t)\dot{H}(t)],
\end{equation}
where $L_H$ is the superoperator that represents the coupling to the hot reservoir, $\rho(t)$ is the density matrix of the working fluid, and $\tau = \tau_r + \tau_d$ is the total duration of the cycle. The efficiency of the machine is given by $\eta = -W/Q^H$, and its delivered power can be defined as $\mathcal{P} = -W/\tau$.
We remark that the analysis performed here significantly extends the scope and generality of previous works~\cite{MFS2020} by relaxing many simplifying assumptions and providing a compelling study of more realistic experimental conditions. In particular, Ref.~\cite{MFS2020} focused on the ideal scenario of an adiabatic discharging stage, where $\tau_d \ll \tau_r$ ($Q_d^H \rightarrow 0$). In such an approximation, the heat exchange only takes place in the charging stage, the period of the cycle becomes $\tau \approx \tau_r$, and the total heat exchanged between the system and the hot bath in a cycle approximates to
\begin{equation}\label{genqr}
Q^H \approx Q_r^H = \int_{0}^{\tau}dt \hskip 0.02cm \operatorname{Tr} [L_H(\rho^(t))H_0].
\end{equation}
Moreover, in the idealized scenario of Ref.~\cite{MFS2020}, the unitary evolution due to $V(t)$ was replaced by an ideal unitary operation, $U$, extracting the maximum amount of energy from $\rho_{OSS}$ and taking it to the completely passive state $\tilde{\rho}_{OSS} = U \rho_{OSS} U^{-1}$. In this case, the work generated in the cycle equals the full ergotropy of state $\rho_{OSS}$ given by~\cite{Ergotropy}
\begin{equation}
\mathcal{E} = \sum_{k,j} r_k E_j (|\langle r_k|E_j \rangle|^2 - \delta_{kj}),
\end{equation}
where $E_j$ are the eigenenergies of $H_0$ ordered in increasing magnitude, i.e $E_{i+1} > E_{i}$, and $r_k$ are the eigenvalues of $\rho_{OSS}$ ordered in decreasing magnitude, i.e.~$r_{k+1} < r_{k}$, with respective eigenvectors $\ket{E_j}$ and $\ket{r_j}$. Here, $U$ can be represented as $U = \sum_k \ket{E_k}\bra{r_k}$. This ideal situation produces a cycle of maximal efficiency $\eta_M = \mathcal{E}/Q_r^H$ and delivered power $\mathcal{P}_M = \mathcal{E}/\tau_r$. These values are the upper bounds and provide benchmarks for the more realistic scenarios that we analyse in this work, where for example the first stage takes finite time and cannot be considered fully adiabatic ($Q_d^H >0$). Such upper limit is achievable whenever $\tau_d \ll \Gamma_j^{-1}$, i.e. when the characteristic time of the discharging stage is much smaller than the inverse of the heat exchange rates.
To summarize, at difference with previous studies, the framework introduced so far essentially solely relies on the Markovianity assumption of the system-reservoirs interaction, and remains fully general in all other aspects. In particular, it can be applied to any quantum system used as the working medium. In the following, we will concentrate our studies on the two simplest examples that represent minimal setups for the operation of a non-equilibrium quantum thermal machine between positive temperature reservoirs: a qutrit and two coupled qubits, respectively.
\section{Results}\label{sec:results}
\subsection{A qutrit as the working fluid}
We consider a single three-level system, a qutrit, as the simplest but nontrivial working fluid, as originally done in the pioneering work of Ref.~\cite{ScovilDuBois}. In particular, we focus on systems with internal levels $\{|g\rangle,|e\rangle,|i\rangle\}$ and respective energies $E_g = 0<E_e = \omega_e<E_i = \omega_i$ arranged in two different configurations: $V$ and $\Lambda$ (Fig.~\ref{qutrit}). In the $V$ configuration, the external heat sources couple the ground state, $|g\rangle$, to the excited states, $\ket{e}$ and $\ket{i}$, whereas in the $\Lambda$ configuration it is the excited state $|i\rangle$ that is coupled to the two lower energy states $|g\rangle$ and $|e\rangle$ by the heat reservoirs. In both cases, the third possible transition, namely $|e\rangle \rightarrow |i\rangle$ for $V$ and $|g\rangle \rightarrow |e\rangle$ for $\Lambda$, is not coupled through the heat reservoirs.
Adapting the schemes previously presented~\cite{MFS2020}, a charging heat current can be created in the qutrit by coupling each transition to reservoirs kept at different temperatures. There are many different ways to engineer such reservoirs in distinct setups, such as superconducting or semiconducting qubits, trapped ions or atoms, among others \cite{Pekola2015,Josefsson2018,Rossnagel2016}. Here, we consider the generic case of a \textit{bona fide} heat bath and one or two auxiliary state selective incoherent sources.
The \textit{bona fide} heat bath at temperature $T$ generates Lindblad terms of the form:
\begin{eqnarray}\label{LV}
L_{j,k}(\rho)&=&\gamma_{j,k}(\bar{n}_{j,k}+1)[\sigma_{j,k}\rho \sigma_{k,j}-\frac{1}{2}\{\sigma_{k,k},\rho\}] \nonumber \\
&+& \gamma_{j,k}\bar{n}_{j,k}[\sigma_{k,j}\rho \sigma_{j,k}-\frac{1}{2}\{\sigma_{j,j},\rho\}],
\end{eqnarray}
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{qutrit.png}
\caption{Configurations of the energies levels with transitions induced by the coupling with the heat baths for the qutrit as a quantum working fluid, in the V and $\Lambda$ configuration. Fig. (a) shows the qutrit in the V configuration. Here $\Delta_{ie} = E_i-E_e$. Fig. (b) shows the qutrit in the $\Lambda$ configuration.} \label{qutrit}
\end{figure}
where $\sigma_{j,k} = |j\rangle\langle k|$ ($\{j,k\}$ are the appropriate combinations of $\{g,e,i\}$), $E_k > E_j$ and $\bar{n}_{j,k} = (e^{\frac{E_k-E_j}{T}}-1)^{-1}$. Equation~\eqref{LV} alone produces a thermal (passive) steady state for which $\mathcal{E}=0$. To store ergotropy in the system, we need to add at least one extra reservoir, for example a heat source that incoherently pumps energy at rate $p$ from $\ket{g}$ to $\ket{i}$, and/or a heat dispenser that draws energy at rate $\Gamma$ from level $\ket{e}$ to level $\ket{g}$ (in the $V$ configuration) or from level $\ket{i}$ to level $\ket{e}$ (in the $\Lambda$ configuration). The overall effect of either one of this extra engineered reservoir is to take the system out of thermal equilibrium, creating the desired ergotropy in the working fluid. These extra reservoirs are described by the addition of new Lindblad terms to the dynamics of the qutrit: $L_p = p[\sigma_{i,g}\rho^j \sigma_{g,i}-\frac{1}{2}\{\sigma_{g,g},\rho\}]$ for the extra heat source and $L_{\Gamma}^{V}=\Gamma[\sigma_{g,e}\rho^{V} \sigma_{e,g}-\frac{1}{2}\{\sigma_{e,e},\rho^{V}\}]$ or $L_{\Gamma}^{\Lambda} = \Gamma \left[\sigma_{e,i} \rho^{\Lambda} \sigma_{i,e} - \frac{1}{2} \{\sigma_{i,i}, \rho^{\Lambda} \} \right]$ for the heat dispensers.
From the operational point of view, both cases can be studied under a common framework, where the dynamics of the thermal machine is given by Eq.~(\ref{eq1}), with $\mathcal{L}(\rho) = [L_{j,k}+L_{\Gamma}+L_p](\rho)$. In both configurations, the combination of these three reservoirs produces a dynamics that can be described by two effective temperatures, each one affecting one internal transition of the qutrit. For clarity, from now on, we treat each configuration separately.
\subsubsection{V configuration}
For the $V$ configuration, the non-unitary terms of Eq.(\ref{eq1}) can be rewritten as $\mathcal{L}(\rho) = \sum_k [L_k^{V+} + L_k^{V-}](\rho)$, where
\begin{equation}\label{LV+}
L_k^{V+}(\rho) = \Gamma_k^{V+} \left[\sigma_{k,g} \rho \sigma_{g,k} - \frac{1}{2} \{\sigma_{g,g}, \rho \} \right],
\end{equation}
\begin{equation}\label{LV-}
L_k^{V-}(\rho) = \Gamma_k^{V-} \left[\sigma_{g,k} \rho \sigma_{k,g} - \frac{1}{2} \{\sigma_{k,k}, \rho \} \right]
\end{equation}
and the transition rates are given by $\Gamma_e^{V+} = \gamma_e \bar{n}_e$, $\Gamma_e^{V-} = \gamma_e ( \bar{n}_e + 1) + \Gamma$, $\Gamma_i^{V+} = \gamma_i \bar{n}_i + p$ and $\Gamma_i^{V-} = \gamma_i (\bar{n}_i + 1)$. The effective temperatures of each engineered reservoir are then given by
\begin{equation}
T_e^{V} =\frac{E_e}{\log{\left[\frac{\Gamma_e^{V-}}{\Gamma_e^{V+}}\right]}}
\end{equation}
and
\begin{equation}
T_i^{V} = \frac{E_i}{\log{\left[\frac{\Gamma_i^{V-}}{\Gamma_i^{V+}}\right]}},
\end{equation}
where $T_i^{V}>0$ ($\Gamma_i^{V-} > \Gamma_i^{V+}$) is the temperature of the hot reservoir.
The machine is designed such that the state of the system after the recharging stage is diagonal in the energy eigenstates of the qutrit, i.e. $\rho(\tau_r)\equiv \rho_{OSS}= \sum_j p_j \ket{E_j}\bra{E_j}$. This state is active whenever, due to the action of the engineered baths, $p_g > p_i > p_e$. In such cases, the ergotropy of $\rho_{OSS}$ reads $\mathcal{E}_V = \Delta_{ie} (p_i - p_e)$. In principle, there may exist more general cases for which, e.g., $p_i > p_e > p_g$, but those correspond to population inversion caused by coupling the system to negative temperature reservoirs \cite{tacchino_steady_2018} which are out of the scope of this paper.
In the limit of an adiabatic discharging stage, the unitary transformation that brings $\rho_{OSS}$ to the corresponding passive state $\tilde{\rho}_{OSS}$ is essentially a SWAP between levels $\ket{e}$ and $\ket{i}$. In a more general scenario, this can be achieved by switching on an external drive of the type $V^{V}(t) = \epsilon\hskip 0.01cm \left(\ket{e}\bra{i} e^{i (\omega_i-\omega_e) t} + \ket{i}\bra{e} e^{-i (\omega_i-\omega_e) t}\right)$ for a time $\tau_d = \pi/2\epsilon$. The adiabatic condition is approached for driving rate $\epsilon \gg \Gamma_j$.
The work done by the system, using Eq. \eqref{genw} with $V^V(t)$ is given by
\begin{eqnarray}\label{WV}
W^V &=& \int_0^{\tau_d} i \epsilon (\omega_i-\omega_e) \nonumber \\ &\times& \textrm{Tr}\left[\rho\left(e^{i(\omega_i-\omega_e)t}\ket{e}\bra{i}-e^{-i(\omega_i-\omega_e)t}\ket{i}\bra{e}\right)\right] dt, \nonumber \\
W^V &=& \int_0^{\tau_d} i \epsilon (\omega_i-\omega_e) [\varrho_{ie}(t) -\varrho_{ei}(t)] dt, \nonumber \\
\end{eqnarray}
where $\varrho_{jk} = \langle j|e^{iH_0 t} \rho e^{-i H_0 t}|k\rangle$. Whereas, the incoming heat from the hot bath on both stages is given by
\begin{eqnarray}\label{hv}
Q_d^{HV} &=& \omega_i (\varrho_{ii}(\tau_d) - \varrho_{ii_{OSS}}) - \int_0^{\tau_d} i \epsilon \omega_i [\varrho_{ie}(t) -\varrho_{ei}(t)] dt,\nonumber \\
Q_r^{HV} &=& \omega_i (\varrho_{ii_{OSS}} - \varrho_{ii}(\tau_d)).
\end{eqnarray}
Note that $\varrho_{kk} = \rho_{kk}$. The complete calculations for this configuration are presented in appendix A.
\subsubsection{$\Lambda$ configuration}
In the $\Lambda$ configuration, it is the excited state $|i\rangle$ that is coupled to the two lower energy states $|g\rangle$ and $|e\rangle$ by the heat reservoirs. Once again, the third possible transition, $|g\rangle \rightarrow |e\rangle$ in this case, is not coupled through the heat reservoirs. The Lindblad terms are given by
\begin{equation}\label{Llambda+}
L_k^{\Lambda+}(\rho) = \Gamma_k^{\Lambda+} \left[\sigma_{i,k} \rho \sigma_{k,i} - \frac{1}{2} \{\sigma_{k,k}, \rho \} \right] ,
\end{equation}
\begin{equation}\label{Llambda-}
L_k^{\Lambda-}(\rho) = \Gamma_k^{\Lambda-} \left[\sigma_{k,i} \rho \sigma_{i,k} - \frac{1}{2} \{\sigma_{i,i}, \rho \} \right],
\end{equation}
where $k=\{g,e\}$ with rates $\Gamma_g^{\Lambda+} = \gamma_g \bar{n}_g + p$, $\Gamma_g^{\Lambda-} = \gamma_g (\bar{n}_g + 1)$, $\Gamma_e^{\Lambda+} = \gamma_e \bar{n}_e $ and $\Gamma_e^{\Lambda-} = \gamma_e (\bar{n}_e + 1) + \Gamma$. Similarly, the effective temperatures of each engineered reservoir are given by $T_e^{\Lambda} = \frac{E_i - E_e}{\log{\left[\frac{\Gamma_e^{\Lambda-}}{ \Gamma_e^{\Lambda+}}\right]}}$ and $T_g^{\Lambda} = \frac{E_i}{\log{\left[\frac{\Gamma_g^{\Lambda-}}{\Gamma_g^{\Lambda+}}\right]}}$, where $T_g^{\Lambda}>0$ ($\Gamma_g^{\Lambda-} > \Gamma_g^{\Lambda+}$) is the temperature of the hot bath.
Similarly to the V configuration, the unitary transformation that brings $\rho_{OSS}$ to the corresponding passive state $\tilde{\rho}_{OSS}$ is a SWAP, this time between levels $\ket{g}$ and $\ket{e}$, and the corresponding coupling to a work extraction external drive is given by the Hamiltonian term $V^{\Lambda}(t) = \epsilon\hskip 0.1cm(\ket{e}\bra{g} e^{-i \omega_e t} + \ket{g}\bra{e}e^{i \omega_e t} )$, turned on for a time $\tau_d = \pi/2\epsilon$. The work extracted and the heat gained from the hot source are given by
\begin{eqnarray}\label{WL}
W^{\Lambda} &=& \int_0^{\tau_d} i \epsilon \omega_e [\varrho_{eg}(t) -\varrho_{ge}(t)] dt,\nonumber \\
Q_d^{H\Lambda} &=&\int_0^{\tau_d} i \epsilon \omega_i \left[\varrho_{ge}(t) -\varrho_{eg}(t)\right] dt -\omega_i \left[\rho_{gg}(\tau_d) - \rho_{gg_{OSS}}\right],\nonumber \\
Q_r^{H\Lambda} &=& \omega_i \left[\varrho_{gg}(\tau_d) - \varrho_{gg_{OSS}}\right].
\end{eqnarray}
The complete calculations for the $\Lambda$ configuration are presented in appendix B.
\subsubsection{Overall results for the qutrit}
The works and heats expressed in Eqs.\eqref{WV}, \eqref{hv} and \eqref{WL} allow us to obtain the efficiencies for both configurations, which are given by
\begin{eqnarray}\label{nV}
\eta_V &=& \frac{-W^{V}}{Q_d^{HV} + Q_r^{HV}} = 1 - \frac{\omega_e}{\omega_i},\nonumber \\
\eta_\Lambda &=& \frac{-W^{\Lambda}}{Q_d^{H\Lambda} + Q_r^{H\Lambda}} = \frac{\omega_e}{\omega_i}.
\end{eqnarray}
Remember that $\omega_i>\omega_e$ by design, therefore, $\eta$ is limited to 1, as expected. Also notice that both efficiencies are maximized by increasing the energy gap between the two incoherent transitions of the system. This is achieved in both cases whenever the intermediate level $|e\rangle$ is almost degenerated with the energy level that is common to both reservoirs coupling, $| g\rangle$ for $V$, $|i\rangle$ for $\Lambda$. This gap is still limited by the fact that for Eq.~\ref{eq1} to hold, with the reservoirs given by Eq.~\ref{LV}, $\omega_e$ cannot approach zero in the $V$ configuration or $\omega_i$ in the $\Lambda$ configuration. This would invalidate the assumptions to derive the effect of the correspondent heat bathes on the particular transition (the $L_{g,e}$ term for $V$ and the $L_{e,i}$ term for $\Lambda$). This means that the machine efficiency can never actually be one. However, notice that it can be very close to the ideal limit. For example, for realistic atomic or ionic working fluids, one transition can involve the exchange of optical photons, while the other can operate with microwave ones. Therefore, the ratio $\omega_e/\omega_i$ ($(\omega_i-\omega_e)/\omega_i$) in the $V$ ($\Lambda$) configuration can easily be as small as $10^{-4}$.
Another interesting property is that when the efficiency in $V$ scheme is maximized, the efficiency in $\Lambda$ configuration is very small, and vice-versa. Also notice that both efficiencies only depend on the unperturbed energy spectrum of the system, meaning that, for qutrits in $V$ or $\Lambda$ configurations as working fluids and for fixed energy levels, efficiency is constant no matter how fast the battery is charged and discharged. In fact, these are the efficiencies achieved when the discharging stage is adiabatic. Finally, we notice that this efficiency is still limited by the Carnot efficiency of an equivalent machine operating under the same temperature gradient. For example, in the $V$ configuration, the equivalent Carnot efficiency is given by $\eta_{Carnot}=1-\frac{T_e}{T_i}$. For the machine to produce work, the state of the working fluid needs to be active at the beginning of the cycle, i.e. one needs $\mathcal{E}>0$. This requires $p_i>p_e$ which is achieved whenever $\frac{\Gamma_i^{V+}}{\Gamma_i^{V-}} >\frac{\Gamma_e^{V+}}{\Gamma_e^{V-}}$. This implies that $\omega_e/\omega_i>T_e/T_i$, and, therefore, $\eta_V<\eta_{Carnot}$. A similar calculation holds for the system in $\Lambda$.
As an example, we compute the efficiency for the $V$ configuration operating in an ideal short cycle (SC), i.e., when $\epsilon \gg \Gamma_j$ (adiabatic work extraction) and $\sum_j \Gamma_j \tau \ll 1$. We recall that these represent sufficient conditions for optimal efficiency and output power for weakly coupled qubits~\cite{MFS2020}. In this limit, the ergotropy stored in $\rho_{OSS}^{V}$ becomes proportional to the cycle duration $\tau \sim \tau_r$, and it is given by
\begin{equation}
\mathcal{E}_{SC}^V = (\omega_i - \omega_e) K_V \tau,
\end{equation}
where
\begin{equation}
K_V = \frac{\Gamma_e^{V-}\Gamma_i^{V+} - \Gamma_e^{V+}\Gamma_i^{V-}}{2 (\Gamma_e^{V+} + \Gamma_i^{V+}) + \Gamma_e^{V-} + \Gamma_i^{V-}}.
\end{equation}
At the same time, the heat exchanged with the hot bath at effective temperature $T_i^{V}$ is also proportional to $\tau$ and given by
\begin{equation}
Q_{SC}^{HV} = \omega_i K_V \tau,
\end{equation}
resulting in a machine of efficiency $\eta_{SC}^V = 1 - \omega_e/\omega_i$, as expected. The corresponding result for the $\Lambda$ configuration can be recovered with similar calculations.
The generated power $\mathcal{P}_{SC}^j = \mathcal{E}/\tau$ ($j=V,\Lambda$) reads $\mathcal{P}_{SC}^V=(\omega_i - \omega_e) K_V $ and $\mathcal{P}_{SC}^\Lambda= \omega_e K_\Lambda$, where
\begin{equation}
K_\Lambda = \frac{\Gamma_e^{\Lambda-}\Gamma_g^{\Lambda+} - \Gamma_e^{\Lambda+}\Gamma_g^{\Lambda-}}{2 (\Gamma_e^{\Lambda-} + \Gamma_g^{\Lambda-}) + \Gamma_e^{\Lambda+} + \Gamma_g^{\Lambda+}}
\end{equation}
Notice that, differently from the efficiencies, the output powers depend not only on the respective spectra, but also on heat current rates $\Gamma_k^{j\pm}$, where $k = e,i$ for $j = V$ and $k = g,e$ for $j = \Lambda$. The most powerful configuration will depend on the specific details of the heat flow and the energy levels of the working fluid. An interesting comparison can be done, for example, by considering fixed and equal spectra for both configurations, the same vacuum coupling to each reservoir $\gamma_i = \gamma_e = \gamma_g = \gamma$, $\Gamma \rightarrow 0$ and $T \rightarrow 0$. In this case, we obtain \begin{equation}
\lim_{T, \Gamma \to 0} \frac{\mathcal{P}_{SC}^V}{\mathcal{P}_{SC}^{\Lambda}} = \frac{\omega_i}{\omega_e} - 1
\end{equation}
i.e.~the $V$ configuration delivers more power if $\omega_i/\omega_e > 2$, while the $\Lambda$ configuration maximises the power output if $1 < \omega_i/\omega_e < 2$.
\subsection{Two coupled qubits as the working fluid}
We now turn our attention to a working fluid composed of two coupled qubits~\cite{MFS2020}, described by the Hamiltonian
\begin{equation}
H_0 = \omega_0 (\sigma_+^{(1)}\sigma_-^{(1)} + \sigma_+^{(2)}\sigma_-^{(2)}) + \lambda (\sigma_+^{(1)}\sigma_-^{(2)} + h.c)
\end{equation}
where $2\sigma_{\pm}^{j} = \sigma_x^j \pm i\sigma_y^j$, $j = 1,2$, and $\{\sigma_k\}$ for $k = x, y, z$ are the Pauli matrices. The heat current is established by coupling the system to two reservoirs of temperatures $\mathcal{T}_A>\mathcal{T}_S$ that act respectively on its symmetric (S) and anti-symmetric (A) subspaces. The energy spectrum has four levels, $\{|G\rangle, |S\rangle,|A\rangle,|E\rangle\}$, already ordered by increasing energy $\{E_{G},E_S,E_A,E_{E}\}$, where $|G\rangle=|gg\rangle$, $|S\rangle = \frac{|ge\rangle+|eg\rangle}{\sqrt{2}}$, $|A\rangle = \frac{|ge\rangle-|eg\rangle}{\sqrt{2}}$ and $|E\rangle=|ee\rangle$. In the weak coupling limit ($\lambda \ll \omega_0$), levels $|S\rangle$ and $|A\rangle$ are close to each other and their energy distance to levels $|G\rangle$ and $|E\rangle$ are approximately the same. These conditions would allow us to assume, as done in Ref.~\cite{MFS2020}, that the bare coupling rates $\gamma_j$ of each non-unitary transition are approximately the same and the problem is restricted to four overall transition rates given by $\Gamma_{A, S}^{+} = \gamma_0 \bar{n}_{A,S}$ and $\Gamma_{A, S}^{-} = \gamma_0 (\bar{n}_{A,S} + 1)$, where $\bar{n}_{A,S} = (e^{\frac{\omega_0}{T_{A,S}}} - 1)^{-1}$. However, in the more general scenario that we will consider here, each coupling rate may depend on the energy gap of the respective transition. In such case, the heat current is established by combining eight different non-unitary channels, two for each one of the four incoherently coupled transitions.
\begin{figure}
\centering
\includegraphics[width=0.8\columnwidth]{2qubits_2.png}
\caption{Level scheme for the two qubits coupled as the working fluid and the transition rates induced by the coupling with the heat baths. Here $E_A - E_S = 2 \lambda$.} \label{2qb}
\end{figure}
Similar to the qutrit case, the steady state $\rho_{NESS}$ is diagonal in the total spin basis, i.e, $\rho_{NESS} = \sum_{i} r_{i_{NESS}} \ket{i}\bra{i} $, where $i = \{G,S,A,E\}$. However, different from the previous working fluid, $\rho_{NESS}$ can in general be entangled~\cite{tacchino_steady_2018}. Whenever $r_{A_{NESS}} > r_{S_{NESS}}$, the ergotropy, $\mathcal{E}_{NESS}$, stored in $\rho_{NESS}$ is given by (see Appendix C)
\begin{equation}
\mathcal{E}_{NESS} = 2 \lambda ( r_{A_{NESS}} - r_{S_{NESS}})
\end{equation}
Once again, the machine can operate in cycles of arbitrary periods $\tau$. The operational steady states $\rho_{OSS} = \sum_{i} r_{i} \ket{i}\bra{i}$ will also be diagonal in the $i = \{G,S,A,E\}$ basis, and the ergotropy stored in $\rho_{OSS}$ will also be given by
\begin{equation}
\mathcal{E}_{\tau} = 2 \lambda (r_A - r_S).
\end{equation}
However, in general, $\mathcal{E}_{\tau} \leq \mathcal{E}_{NESS}$, equality being reached for $\tau \rightarrow \infty$. Similarly to the qutrit case, in the ideal scenario of an adiabatic first stage (discharging), the unitary operation $U_{\mathcal{E}}$ that extracts the maximum amount of energy stored in the system is formally a SWAP between the $\ket{A}$ and $\ket{S}$ populations. If we now consider a realistic external drive producing such unitary, $V(t) = \epsilon \left(\ket{A}\bra{S} e^{i 2 \lambda t} + \ket{S}\bra{A} e^{-i 2 \lambda t}\right)$, where $E_A = \omega_0 + \lambda$ and $E_S = \omega_0 - \lambda$, the work done by the system is given by
\begin{equation}
W = 2 i \epsilon \lambda \int_0^{\tau_d} [\varrho_{AS}(t) - \varrho_{SA}(t)] dt.
\end{equation}
If $\epsilon >> \Gamma_{A,S}^{k \pm}$, $k = G, E$, we obtain $W = - \mathcal{E}$ as expected (see appendix C). The incoming heat from the hot bath $\mathcal{T}_A$ during the discharging is given by
\begin{align}
Q_d^H &= \int_0^{\tau_d} 4 \omega_0[\Gamma_A^{E+} \varrho_{A}(t) - \Gamma_A^{E-} \varrho_{E}(t)] dt \nonumber \\
&+ i \epsilon (\omega_0 + \lambda) \int_0^{\tau_d} [\varrho_{SA}(t)-\varrho_{AS}(t)] \nonumber \\
&- (\omega_0 + \lambda) [\varrho_{A_{OSS}} - \varrho_A(\tau_d)]
\end{align}
During recharging, there is no work performed by or on the system and the heat exchanged between the system and the hot bath is given by
\begin{align}
Q_r^H &= \int_{\tau_d}^{\tau} 4 \omega_0 [\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)]dt \nonumber \\
&+ (\omega_0 + \lambda)[\varrho_{A_{OSS}} - \varrho_A(\tau_d)],
\end{align}
This results in an efficiency of the machine given by
\begin{equation}\label{geneff}
\eta = \frac{-W}{Q_d^H + Q_r^H} = \frac{1 - \frac{E_S}{E_A}}{1 + \alpha + \beta}
\end{equation}
where,
\begin{eqnarray}
\label{alpha2q1}
\alpha &=& \frac{\int_0^{\tau_d} 4 \omega_0 [\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)] dt}{i\epsilon (\omega_0 + \lambda) \int_0^{\tau_d} dt [\varrho_{SA}(t)-\varrho_{AS}(t)]} \nonumber \\
\beta &=& \frac{\int_{\tau_d}^{\tau} 4 \omega_0[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)] dt }{i\epsilon (\omega_0 + \lambda) \int_0^{\tau_d} dt [\varrho_{SA}(t)-\varrho_{AS}(t)]}.
\end{eqnarray}
Notice that, contrary to the qutrit case, the existence of two (and not one) energy levels ($|G\rangle$ and $|E\rangle$) incoherently coupled to the work producing subspace $\{|A\rangle,|S\rangle\}$ results, in general, in a larger amount of incoming heat, lowering the efficiency of the machine. Here, the best efficiencies are reached when $\alpha+\beta$ is minimized. Since the explicit dependence of $\alpha$ and $\beta$ on the parameters $\lambda$, $\epsilon$ and $\Gamma_j$ involves a rather technical calculation, we will only present below some numerical results for a particular example that already encompass all the relevant features of the general case. Before going there, however, we can still gain some useful insight by an analytical treatment of the short cycle (SC) regime, where the expressions simplify significantly. Gladly, as demonstrated in Ref.~\cite{MFS2020}, this corresponds to the most interesting limit for the two-qubit working fluid, namely the one that produces higher efficiency and output power.
In SC conditions, the ergotropy stored in $\rho_{OSS}$ is, up to first order in $\tau$, given by
\begin{equation}
\mathcal{E}_{SC} = 4 \lambda \kappa\tau,
\end{equation}
where $\Gamma_k^{\pm} = \Gamma_A^{k\pm} + \Gamma_S^{k\pm}$ and
\begin{equation}
\kappa = \frac{\Gamma_E^{-}(\Gamma_A^{G+} \Gamma_S^{G-} - \Gamma_A^{G-} \Gamma_S^{G+}) \nonumber - \Gamma_G^{+}(\Gamma_A^{E+} \Gamma_S^{E-} - \Gamma_A^{E-} \Gamma_S^{E+})}{\Gamma_E^{-}(\Gamma_G^{+} + \Gamma_G^{-})
+ \Gamma_G^{+}(\Gamma_E^{+} + \Gamma_E^{-})}.
\end{equation}
The heat absorbed from the hot bath $\mathcal{T}_A$ is given by
\begin{eqnarray}
Q^H_{SC} &= \frac{2}{\Omega}[(\omega_0 - \lambda) \Gamma_G^+ (\Gamma_A^{E+}\Gamma_S^{E-} - \Gamma_S^{E+}\Gamma_A^{E-}) \nonumber \\
&+ (\omega_0 + \lambda) \Gamma_E^- (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})]\tau,
\end{eqnarray}
where
\begin{equation}
\Omega = \Gamma_E^{-}(\Gamma_G^{+} + \Gamma_G^{-})
+ \Gamma_G^{+}(\Gamma_E^{+} + \Gamma_E^{-}). \nonumber
\end{equation}
The efficiency of the machine operating in the ideal short cycle, $\eta_{SC}$, is given by
\begin{equation}\label{effsc2q}
\eta_{SC} = \left(1-\frac{E_S}{E_A}\right) \frac{1 - f}{1 + \frac{E_S}{E_A}f}
\end{equation}
where
\begin{equation}
f = \frac{\Gamma_G^+(\Gamma_A^{E+}\Gamma_S^{E-} - \Gamma_S^{E+}\Gamma_A^{E-})}{\Gamma_E^- (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})}.
\end{equation}
For a fixed $\lambda/\omega_0$ ratio, $\eta_{SC}$ is maximized when $f << 1$. This condition is reached when $\Gamma_A^{k-} + \Gamma_S^{k-} >> \Gamma_A^{k+} + \Gamma_S^{k+}$ which can be achieved either if $\Gamma_j^{k-} >> \Gamma_j^{k+}$ or if $\Gamma_S^{k-} >> \Gamma_A^{k-}$. In both cases, the maximum efficiency tends to
\begin{equation}\label{efmaxsc}
\eta_{SC}^{max} \rightarrow 1-\frac{E_S}{E_A},
\end{equation}
which is essentially the same obtained for the qutrit, except that, for coupled qubits, it is only achievable in the short cycle. Note that this is also the efficiency of the short cycle of the weak coupling regime, although here there is no pre-determined restriction over the ratio $E_S/E_A$, that can, in principle, be made very close to 0, taking $\eta_{SC}^{max} \rightarrow 1$.
From the perspective of the generated power, in the first case, $\Gamma_j^{k-} >> \Gamma_j^{k+}$, the power in the short cycle depends on both temperatures and is given by $\mathcal{P}_{SC}^{max} \approx 2 (E_A - ES) \frac{\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-}}{\Gamma_G^-}$ while, in the second case, it depends only on the temperature of the hot reservoir, $\mathcal{T}_A$, and it amounts to $\mathcal{P}_{SC}^{max} = 2(E_A-E_S) \Gamma_A^{G+}$.
\begin{figure*}[t]
\centering
\includegraphics[width=0.9\textwidth]{shortcycle.png}
\caption{We plot $\eta/\eta_{max}$ and $\mathcal{P}$ as a function of $\epsilon/\lambda$ for the machine operating in the short cycle limit. Here $\eta_{SC}$ and $\eta$ are given by \eqref{geneff} and \eqref{effsc2q}, respectively, and $\mathcal{P} = -W/\tau$. Here we use $\gamma_0/\omega_0 = 10^{-8}$ and $1/\tau\omega_0 = 10^{-6}$. In figures (a) and (c) ((b) and (d)) we use $\mathcal{T}_A/\omega_0 = 0.2$ and $\mathcal{T}_S/\omega_0 = 0.05$ ($\lambda/\omega_0 = \mathcal{T}_S/\omega_0 = 0.05$).} \label{shortcycle}
\end{figure*}
Before concluding, let us now go back to an arbitrary cycle duration and calculate numerically the efficiency for different temperatures of the reservoirs and as a function of the strength of the work producing drive. We assume a radiative decay model for the coupling to the reservoirs (Fig. \ref{2qb}) where the transition rates are given by $\Gamma_{A, S}^{E+} = \gamma_{0A, S}^{E} \bar{n}_{A, S}^E$, $\Gamma_{A, S}^{G+} = \gamma_{0A, S}^{G} \bar{n}_{A, S}^G$, $\Gamma_{A, S}^{E-} = \gamma_{0A, S}^{E} (\bar{n}_{A, S}^E + 1)$ and $\Gamma_{A, S}^{G-} = \gamma_{0A, S}^{G} (\bar{n}_{A, S}^G + 1)$. The average number of excitations in each reservoir is given by
\begin{eqnarray}
\bar{n}_A^E = \frac{1}{e^{\frac{\omega_0-\lambda}{\mathcal{T}_A}}-1}, \qquad & \bar{n}_S^E = \frac{1}{e^{\frac{\omega_0+\lambda}{\mathcal{T}_S}}-1} \\
\bar{n}_A^G = \frac{1}{e^{\frac{\omega_0+\lambda}{\mathcal{T}_A}}-1}, \qquad & \bar{n}_S^G = \frac{1}{e^{\frac{\omega_0-\lambda}{\mathcal{T}_S}}-1},
\end{eqnarray}
and the dependence of the bare coupling rates with the energy of the levels is $\gamma_{0S}^G = \gamma_{0A}^E = \gamma_0 (1 - \frac{\lambda}{\omega_0})^3$ and $\gamma_{0A}^G = \gamma_{0S}^E = \gamma_0 (1 + \frac{\lambda}{\omega_0})^3$. Notice that, as mentioned before, in the weak coupling limit ($\lambda \ll \omega_0$) all the bare rates are approximately the same. Whereas, on the other extreme of large coupling, we still want to restrict ourselves to the level configuration of Fig.~\ref{2qb} as well as, similar to the qutrit scenario, guarantee that the dynamics is given by Eq.~\ref{eq1} with the adequate non-unitary terms. In other words, $\lambda$ can approach $\omega_0$ but it has to be sufficiently smaller than the qubits bare frequency for us to remain far enough from level crossings.
Finally, we will focus on the two most significant regimes of operation for the machine: the short cycle (SC), characterized by $\sum_j \Gamma_{A,S}^{k\pm} \tau \ll 1$, in which the stored ergotropy is proportional to the cycle duration and, on the other extreme, the asymptotic cycle (AC), in which the system is charged to its maximum possible ergotropy and the initial state $\rho_{OSS}$ converges to the {\it bona fide} steady state of Eq.(\ref{eq1}), $\rho_{NESS}$. In both cases we assume that the discharging stage is not adiabatic in the thermodynamic sense and its duration is chosen so that all the ergotropy stored in the system is extracted in the form of work. Efficiencies will be compared to the benchmark results obtained in Eq.~\eqref{effsc2q}.
\begin{figure*}[t]
\centering
\includegraphics[width=0.9\textwidth]{longcycle.png}
\caption{We plot $\eta/\eta_{max}$ and $\mathcal{P}$ as a function of $\epsilon/\lambda$ for the machine operating in a long cycle. Here $\eta_{SC}$ and $\eta$ are given by \eqref{geneff} and \eqref{effsc2q}, respectively, and $\mathcal{P} = -W/\tau$. Here we use $\gamma_0/\omega_0 = 10^{-5}$. In figures (a) and (c) ((b) and (d)) we use $\mathcal{T}_A/\omega_0 = 0.2$ and $\mathcal{T}_S/\omega_0 = 0.05$ ($\lambda/\omega_0 = \mathcal{T}_S/\omega_0 = 0.05$).} \label{longcycle}
\end{figure*}
In Fig.~\ref{shortcycle}, we see that in the short cycle limit the machine does not work below a certain value of drive strength $\epsilon$, that depends either on the values of $\mathcal{T}_A$, $\mathcal{T}_S$, for a fixed $\lambda/\omega_0$ ratio (Fig.~\ref{shortcycle}(a)), or the values of $\omega_0$ and $\lambda$, for a fixed $\mathcal{T}_A/\mathcal{T}_S$ ratio (Fig.~\ref{shortcycle}(b)). This can be understood by realising that if $\epsilon$ is too small compared to the incoherent rates $\Gamma_j$, it takes too long to discharge the system and the operational steady state cannot be reached, i.e. the system never stores positive ergotropy. Another way of seeing it is that the linewidths of levels $|S\rangle$ and $|A\rangle$ become much larger than their energy separation, hence they become effectively degenerated in energy. Furthermore, Fig.~\ref{shortcycle}(a) and (b) demonstrate that the efficiency, $\eta$, given by \eqref{geneff}, is always very close or equal to $\eta_{SC}$, given by \eqref{effsc2q}, and that the efficiency increases either when the temperature gradient decreases, for a fixed $\lambda/\omega_0$ ratio, or when the ratio $\lambda/\omega_0$ decreases, for a fixed $\mathcal{T}_A/\mathcal{T}_S$ ratio. Fig.~\ref{shortcycle}(c) shows that the power has the opposite behaviour of the efficiency (Fig.~\ref{shortcycle}(a)) as a function of the temperature gradient, i.e, power increases when the temperature gradient increases. On the other hand, as depicted in Fig.~\ref{shortcycle}(d), the power has the same behaviour of the efficiency (Fig.~\ref{shortcycle}(b)) in terms of the spectrum of the working fluid, i.e, the output power increases when the $\lambda/\omega_0$ ratio decreases.
In Fig.~\ref{longcycle} we display the efficiency and power output for the asymptotic cycle. We see that both quantities have the same qualitative behaviour shown in Fig.~\ref{shortcycle} for the short cycle. However, quantitatively, we see that the efficiency is only close to $\eta_{SC}$, given by \eqref{effsc2q}, when the temperature gradient is sufficiently small (Fig.~\ref{longcycle}(a)) and in Fig.~\ref{longcycle}(b) we see that, for a fixed $\mathcal{T}_A/\mathcal{T}_S$ ratio, the efficiency is always smaller than $\eta_{SC}$.
Looking at the efficiency in quantum thermal machines illustrated in Fig.~\ref{shortcycle}(a) and in Fig.~\ref{longcycle}(a), we observe that in both cases the efficiency decreases when the temperature gradient increases, a phenomenon that was also pointed out in a recent paper by T.~R.~de Oliveira and D.~Jonathan~\cite{Thiago2020} in the different but related context of a four-stroke machine operating on a four level system. Our understanding of this phenomenon is as follows: keeping one temperature fixed, say the hot one, as the temperature gradient increases (the cold temperature is lowered), the Carnot efficiency $\eta^C=1-T_C/T_H$, which represents an upper bound to the engine's efficiency, grows. However, at the same time, an increased thermal gradient pushes the system farther away from equilibrium during the second stroke, that is, it pushes the efficiency $\eta$ farther away below the ideal value $\eta^C$. Our results show that among these two competing effects, the second, namely deviation from ideal operation due to high dissipation, is more important.
\section{Summary}\label{sec:summary}
In this work we have analysed the thermodynamics of a two-stroke quantum heat engine introducing a single qutrit as a working fluid, and comparing its performances to the case of a pair of coupled qubits. In both cases we have studied the machine operating both in the ideal short cycle limit as well as in a cycle with arbitrary duration $\tau$.
For the qutrit, we have seen that the efficiency of the machine does not depend on the duration of cycle but only on the energy spectrum of the working fluid. This happens because work is generated by driving a two-level subspace of the system that can be effectively considered to be in contact with a single negative temperature reservoir. The power output, however, is affected by the duration of the cycle and maximized in the ideal short cycle limit.
For the two coupled qubits as the working fluid we have seen that the efficiency depends on the spectrum of the working fluid, as well as the incoherent transition rates $\Gamma_{A,S}^{k\pm}$, where $k = G,E$, in the ideal short cycle and for a cycle with arbitrary duration $\tau$ depends also on the coupling strength with the external coherent source $\epsilon$. Furthermore, we also saw that the efficiency for cycles with arbitrary duration are less or equal than the efficiency in the ideal short cycle, the latter occurs for long cycles when the temperature gradient is sufficiently small. We also observed that efficiency increases when the temperature difference decreases, a property that was also observed in \cite{Thiago2020}. This was explained based on the fact that at low thermal gradient, the system remains closer to equilibrium, hence it operates closer to the ideal Carnot efficiency, and even though the latter diminishes with decreasing thermal bias, still, the engine efficiency grows.
\section{Acknowledgments}
M.F.S. acknowledges FAPERJ Project No. E-26/202.576/2019 and CNPq Projects No. 302872/2019-1 and INCT-IQ 465469/2014-0. M.F.S. and D.G. would also like to acknowledge the CICOPS program from the University of Pavia for allowing hospitality and support.
T.F.F.S. acknowledges CAPES for financial support.
M.C. acknowledges financial support from Fondazione CR Firenze Project No. 2018.0951.
\section{Appendix}
Here we give more details about the results shown in the main text, by analysing the analytics for both the qutrit and the two coupled qubits configurations, respectively.
\subsection{Calculations for the Qutrit in V configuration}
For the qutrit operating in the ideal short cycle limit, i.e, when the discharging stage is adiabatic in the thermodynamic sense and $\sum_j \Gamma_j^{V \pm} \tau \ll 1$, the operational steady state $\rho_{OSS}$ is obtained solving the equation $\rho_{OSS} = \tilde{\rho}_{OSS} + \tau \mathcal{L}(\tilde{\rho}_{OSS})$, where $\tilde{\rho}_{OSS} = U \rho_{OSS} U^{-1}$ and $U = -i (\ket{i}\bra{e} + \ket{e}\bra{i}) + \ket{g}\bra{g} $. In our work, the operational steady state is diagonal in the energy basis, i.e, $\rho_{OSS} = \sum_j p_j \ket{E_j}\bra{E_j}$, $j = g,e,i$.
As described in the main text, the coupling with the reservoirs is given by $\mathcal{L}(\rho) = \sum_k \left[L_k^{V+} + L_k^{V-}\right](\rho)$, $k =e,i$, where $L_k^{V+}(\rho)$ and $L_k^{V-}(\rho)$ are given by Eqs. \eqref{LV+} and \eqref{LV-}, respectively. This interaction defines for the populations of $\rho_{OSS}$ the following equations:
\begin{align}
p_e - p_i &= (\Gamma_e^{V+} p_g - \Gamma_e^{V-} p_i) \tau \\
p_i - p_e &= (\Gamma_i^{V+} p_g - \Gamma_i^{V-}p_e) \tau \\
p_g &= \frac{\Gamma_i^{V-} p_e + \Gamma_e^{V-} p_i}{\Gamma_i^{V+} + \Gamma_e^{V+}}.
\end{align}
The equations above allow us to calculate $\rho_{oss}$ as a function of the heat exchange rates $\Gamma_k^{V\pm}$ and the cycle duration $\tau$.
After some algebraic manipulation, we obtain
\begin{align}
p_i &= \frac{\Gamma_e^{V+} + \Gamma_i^{V+} - \Gamma_e^{V+} \Gamma_i^{V-} \tau}{\nu } \\
p_e &= \frac{p_i \left[1 - (\Gamma_e^{V-} + \Gamma_e^{V+})\tau\right] + \Gamma_e^{V+} \tau}{1 + \Gamma_e^{V+} \tau},
\end{align}
where
\begin{align}
\nu &= 2(\Gamma_i^{V+} + \Gamma_e^{V+}) + \Gamma_i^{V-} + \Gamma_e^{V-} \nonumber \\
&- [\Gamma_i^{V+}(\Gamma_e^{V+} + \Gamma_e^{V-}) + \Gamma_e^{V-} \Gamma_i^{V-} ]\tau.
\end{align}
Using the relations between $p_e$ and $p_i$ and keeping terms up to first order in $\tau$ $\left( \Gamma_j^{V \pm} \tau \ll 1\right)$, the ergotropy, given by $\mathcal{E}_{SC}^{V} = (\omega_i-\omega_e) (p_i - p_e)$, becomes
\begin{align}\label{ergVSC}
\mathcal{E}_{SC}^{V} &= (\omega_i-\omega_e) \tau [(2 \Gamma_e^{V-} + \Gamma_e^{V+}) p_i^V - \Gamma_e^{V+})] \nonumber \\
& = (\omega_i-\omega_e) \tau \frac{\Gamma_i^{V+} \Gamma_e^{V-} - \Gamma_i^{V-} \Gamma_e^{V+}}{2(\Gamma_i^{V+} + \Gamma_e^{V+}) + \Gamma_i^{V-} + \Gamma_e^{V-}}.
\end{align}
Note that, the ergotropy is positive only if $\frac{\Gamma_i^{V+}}{\Gamma_i^{V-}} > \frac{\Gamma_e^{V+}}{\Gamma_e^{V-}}$. It means that for the ergotropy to be positive, effective temperature $T_i^V$ has to be larger than effective temperature $T_e^V$. Using the same approximations and the relation between $p_e$ and $p_i$, the heat exchange with the hot reservoir, $T_i^V$, is given by
\begin{align}\label{qLi}
Q_{SC}^{HV} &= \operatorname{Tr} \left[H_0 (L_i^{V+}(\tilde{\rho}_{OSS}) + L_i^{V-}(\tilde{\rho}_{OSS})) \right]\tau \nonumber \\
&= \omega_i \tau (\Gamma_i^+ p_g - \Gamma_i^- p_e) \nonumber \\
&=\omega_i\tau \left(\Gamma_i^{V+} \frac{\Gamma_i^{V-} p_e + \Gamma_e^{V-} p_i}{\Gamma_i^{V+} + \Gamma_e^{V+}} - \Gamma_i^{V-} p_e \right)\nonumber \\
&=\omega_i \tau \frac{\Gamma_i^{V+} \Gamma_e^{V-} - \Gamma_i^{V-} \Gamma_e^{V+}}{2(\Gamma_i^{V+} + \Gamma_e^{V+}) + \Gamma_i^{V-} + \Gamma_e^{V-}}
\end{align}
From equations \eqref{ergVSC} and \eqref{qLi}, the efficiency of the machine, in the ideal short cycle limit ($SC$), is given by
\begin{equation}\label{effscV}
\eta_{SC}^{V} = \frac{\mathcal{E}_{SC}^{V}}{Q_{SC}^{HV}} = 1- \frac{\omega_e}{\omega_i}.
\end{equation}
Note that, the efficiency does not depend on the rates $\Gamma_k^{V\pm}$ and the maximum efficiency, tending to one, is obtained when $\omega_e \ll \omega_i$.
The power output of the machine, given by $\mathcal{P}_{SC}^{V} = \frac{\mathcal{E}_{SC}^{V}}{\tau}$ in this limit of operation, becomes:
\begin{equation}
\mathcal{P}_{SC}^{V} = (\omega_i-\omega_e) \frac{\Gamma_i^+ \Gamma_e^- - \Gamma_i^- \Gamma_e^+}{2(\Gamma_i^+ + \Gamma_e^+) + \Gamma_g^- + \Gamma_e^-}.
\end{equation}
In the limit of maximum efficiency we have $\mathcal{P}_{SC}^{V} \approx \omega_i \frac{\Gamma_i^+ \Gamma_e^- - \Gamma_i^- \Gamma_e^+}{2(\Gamma_i^+ + \Gamma_e^+) + \Gamma_g^- + \Gamma_e^-}$.
When we consider that the first stage (discharging) of the cycle is no longer adiabatic in the thermodynamic sense, i.e, $\tau_d$ is not short enough, there is heat exchange between the system and the reservoirs. From Eq. \eqref{genw}, the work done by the system is given by
\begin{eqnarray}\label{workV}
W^V &=& \int_0^{\tau_d} \operatorname{Tr} \left[\rho(t)\dot{H}(t)\right] dt = \int_0^{\tau_d} i \epsilon (\omega_i-\omega_e) \nonumber \\ &\times& \textrm{Tr}\left[\rho\left(e^{i(\omega_i-\omega_e)t}\ket{e}\bra{i}-e^{-i(\omega_i-\omega_e)t}\ket{i}\bra{e}\right)\right] dt, \nonumber \\
W^V &=& \int_0^{\tau_d} i \epsilon (\omega_i-\omega_e) [\varrho_{ie}(t) -\varrho_{ei}(t)] dt, \nonumber \\
\end{eqnarray}
where $\varrho_{jk} = \langle j|e^{iH_0 t} \rho e^{-i H_0 t}|k\rangle$ and $H(t) = H_0 + V^V(t)$.
The incoming heat from the hot bath in the discharging stage is given by
\begin{align}\label{heatV}
Q_d^{HV} &= \int_0^{\tau_d} \operatorname{Tr} \left[\left[L_i^{V+}(\rho(t)) + L_i^{V-}(\rho(t))\right]H(t)\right] dt \nonumber \\
&= \int_0^{\tau_d} \omega_i \left[\Gamma_i^{V+} \varrho_{gg}(t) - \Gamma_i^{V-} \varrho_{ii}(t)\right] dt \nonumber \\
&-\frac{\epsilon \Gamma_i^{V-}}{2}\int_0^{\tau_d} \left[\varrho_{ie}(t) + \varrho_{ei}(t)\right] dt.
\end{align}
Note that $\varrho_{kk} = \rho_{kk}$. From Eq. \eqref{eq1}, in the interaction picture, we have
\begin{equation}\label{piV}
\dot{\varrho}_{ii} = i \epsilon (\varrho_{ie}(t) - \varrho_{ei}) + \Gamma_i^{V+} \varrho_{gg} - \Gamma_i^{V-}\varrho_{ii}
\end{equation}
\begin{equation}\label{peiV}
\dot{\varrho}_{ei} = - i \epsilon (\varrho_{ii} - \varrho_{ee}) - \frac{\Gamma_e^{V-}}{2} \varrho_{ei} - \frac{\Gamma_i^{V-}}{2} \varrho_{ei}
\end{equation}
In the discharging processes $\rho(0) = \rho_{OSS}$. Therefore, from Eq. \eqref{peiV} (and its c.c.) and remembering that $\varrho_{ie}(0) = \varrho_{ei}(0)=0$, it follows that $ \varrho_{ei}(t) + \varrho_{ie}(t) = 0$. Using this and Eq. \eqref{piV} in Eq. \eqref{heatV}, we obtain
\begin{equation}\label{heatV2}
Q_d^{HV} = \omega_i \left[\varrho_{ii}(\tau_d) - \varrho_{ii_{OSS}}\right] - \int_0^{\tau_d} i \epsilon \omega_i \left[\varrho_{ie}(t) -\varrho_{ei}(t)\right] dt.
\end{equation}
In the second stage (recharging), there is only heat exchange between the system and the reservoirs ($V(t) = 0)$ and we consider that we are not restricted to the short cycle limit $\sum_j \Gamma_k^{V\pm} \tau \ll 1$. In this situation, the heat exchanged with the hot reservoir is given by
\begin{align}\label{heatV3}
Q_r^{HV} &= \int_{\tau_d}^{\tau} \operatorname{Tr} \left[\left[L_i^{V+}(\rho(t)) + L_i^{V-}(\rho(t))\right]H_0\right]dt \\ \nonumber
&= \int_{\tau_d}^{\tau} \omega_i \left[\Gamma_i^{V+} \varrho_{gg}(t) - \Gamma_i^{V-} \varrho_{ii}(t)\right]dt.
\end{align}
In this stage, we have $\rho(\tau) = \rho_{OSS}$. From Eq. \eqref{eq1}, in the interaction picture, for the recharging stage, we have $\dot{\varrho}_{ii} = \Gamma_i^{V+} \varrho_{gg} - \Gamma_i^{V-} \varrho_{ii}$, so
\begin{equation}\label{heatV4}
Q_r^{HV} = \omega_i \left[\varrho_{ii_{OSS}} - \varrho_{ii}(\tau_d)\right]
\end{equation}
Finally, the efficiency of the machine is given by
\begin{equation}\label{effV}
\eta_V = \frac{-W^{V}}{Q_d^{HV} + Q_r^{HV}} = 1 - \frac{\omega_e}{\omega_i},
\end{equation}
which is the same as obtained for the short cycle, i.e. for the qutrit in V, the efficiency only depends on its energy levels. Again, maximum efficiency, tending to one, is obtained for $\omega_e \ll \omega_i$.
\subsection{Calculations for the Qutrit in $\Lambda$ configuration}
The system in $\Lambda$ is very similar to the system in $V$, as expected. Once again, the operational steady state in the ideal short cycle is defined by the equation $\rho_{OSS} = \tilde{\rho}_{OSS} + \tau \mathcal{L}(\tilde{\rho}_{OSS})$, where $\tilde{\rho}_{OSS} = U \rho_{OSS} U^{-1}$ but, now, $U = -i (\ket{g}\bra{e} + \ket{e}\bra{g}) + \ket{i}\bra{i}$. The operational steady state is also diagonal in the energy basis: $\rho_{OSS} = \sum_j p_j \ket{E_j}\bra{E_j}$, $j = g, e, i$.
The coupling of the system with the reservoirs is given by $\mathcal{L} (\rho) = \sum_k [L_k^{\Lambda+} + L_k^{\Lambda-}](\rho)$, $k =g,e$, where
\begin{equation}\label{Llambda+}
L_k^{\Lambda+}(\rho) = \Gamma_k^{\Lambda+} \left[\sigma_{i,k} \rho \sigma_{k,i} - \frac{1}{2} \{\sigma_{k,k}, \rho \} \right]
\end{equation}
and
\begin{equation}\label{Llambda-}
L_k^{\Lambda-}(\rho) = \Gamma_k^{\Lambda-} \left[\sigma_{k,i} \rho \sigma_{i,k} - \frac{1}{2} \{\sigma_{i,i}, \rho \} \right]
\end{equation}
From Eqs. \eqref{Llambda+} and \eqref{Llambda-}, the populations of $\rho_{OSS}$ are defined by the following equations:
\begin{align}
p_g - p_e &= \tau(\Gamma_g^{\Lambda-} p_i - \Gamma_g^{\Lambda+} p_e) \\
p_e - p_g &= \tau (\Gamma_e^{\Lambda-} p_i - \Gamma_e^{\Lambda+}p_g) \\
p_i &= \frac{\Gamma_g^{\Lambda+} p_e + \Gamma_e^{\Lambda+} p_g}{\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}}.
\end{align}
The equations above allow us to calculate $\rho_{OSS}$ in terms of transitions rates $\Gamma_k^{\Lambda \pm}$ and the cycle duration $\tau$.
After some algebraic manipulation, we obtain
\begin{align}
p_e &= \frac{\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-} - \Gamma_e^{\Lambda+} \Gamma_g^{\Lambda-} \tau}{\mu} \\
p_g &= \frac{p_e \left[1 - (\Gamma_g^{\Lambda-} + \Gamma_g^{\Lambda+})\tau\right] + \Gamma_g^{\Lambda-} \tau}{1 + \Gamma_g^{\Lambda-} \tau}
\end{align}
where,
\begin{align}
\mu &= 2(\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}) + \Gamma_g^{\Lambda+} + \Gamma_e^{\Lambda+} \nonumber \\
&- [\Gamma_g^{\Lambda+}(\Gamma_e^{\Lambda+} + \Gamma_e^{\Lambda-}) + \Gamma_e^{\Lambda+} \Gamma_g^{\Lambda-} ]\tau
\end{align}
Using the relations between $p_e$ and $p_g$ and keeping terms up to first order in $\tau$ $\left( \Gamma_j^{\Lambda \pm} \tau \ll 1\right)$, the ergotropy, given by $\mathcal{E}_{SC}^{\Lambda} = \omega_e (p_e - p_g)$, becomes
\begin{align}\label{erglambdaSC}
\mathcal{E}_{SC}^{\Lambda} &= \omega_e \tau [(2 \Gamma_g^{\Lambda-} + \Gamma_g^{\Lambda+}) p_e - \Gamma_g^{\Lambda-})] \nonumber \\
& = \omega_e \tau \frac{\Gamma_g^{\Lambda+} \Gamma_e^{\Lambda-} - \Gamma_g^{\Lambda-} \Gamma_e^{\Lambda+}}{2(\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}) + \Gamma_g^{\Lambda+} + \Gamma_e^{\Lambda+}}.
\end{align}
Note that, the ergotropy is positive when $\frac{\Gamma_g^{\Lambda+}}{\Gamma_g^{\Lambda-}} > \frac{\Gamma_e^{\Lambda+}}{\Gamma_e^{\Lambda-}}$. It means that for the ergotropy to be positive the effective temperature $T_g^{\Lambda} = \frac{E_i}{\log{\left[\frac{\Gamma_g^{\Lambda-}}{\Gamma_g^{\Lambda+}}\right]}}$ has to be larger than the effective temperature $T_e^{\Lambda} = \frac{E_i - E_e}{\log{\left[\frac{\Gamma_e^{\Lambda-}}{ \Gamma_e^{\Lambda+}}\right]}}$. Using the same approximations made in \eqref{erglambdaSC} and the relations between $p_e$ and $p_g$, the heat exchange with the hot reservoir is given by
\begin{align}\label{qLg}
Q_{SC}^{H\Lambda} &= \operatorname{Tr} \left[H_0 \left[L_g^{\Lambda+}(\tilde{\rho}_{OSS}) + L_g^{\Lambda-}(\tilde{\rho}_{OSS})\right] \tau\right] \nonumber \\
&= \omega_i(\Gamma_g^{\Lambda+} p_e - \Gamma_g^{\Lambda-} p_i)\tau \nonumber \\
&=\omega_i\tau \left(\Gamma_g^{\Lambda+} p_e - \Gamma_g^{\Lambda-} \frac{\Gamma_g^{\Lambda+} p_e + \Gamma_e^{\Lambda+} p_g}{\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}} \right)\nonumber \\
&=\omega_i \tau \frac{(\Gamma_g^{\Lambda+} \Gamma_e^{\Lambda-} - \Gamma_g^{\Lambda-} \Gamma_e^{\Lambda+})}{\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}}p_e =\frac{\omega_i}{\omega_e} \mathcal{E}_{SC}^{\Lambda}
\end{align}
From Eqs. \eqref{erglambdaSC} and \eqref{qLg}, the efficiency of the machine, in the short cycle limit ($SC$), is given by
\begin{equation}
\eta_{SC}^{\Lambda} = \frac{\mathcal{E}_{SC}^{\Lambda}}{Q_{SC}^{H\Lambda}} = \frac{\omega_e}{\omega_i}.
\end{equation}
Note that, as in the V-type configuration, the efficiency does not depend on the transition rates $\Gamma_k^{\Lambda \pm}$, however the maximum efficiency, tending to one, is obtained when $\omega_e \approx \omega_i$.
The power of the machine at this limit of operation, given by $\mathcal{P}_{SC}^{\Lambda} = \frac{\mathcal{E}_{SC}^{\Lambda}}{\tau}$, reduces to
\begin{equation}
\mathcal{P}_{SC}^{\Lambda} = \omega_e \frac{\Gamma_g^{\Lambda+} \Gamma_e^{\Lambda-} - \Gamma_g^{\Lambda-} \Gamma_e^{\Lambda+}}{2(\Gamma_g^{\Lambda-} + \Gamma_e^{\Lambda-}) + \Gamma_g^{\Lambda+} + \Gamma_e^{\Lambda+}}
\end{equation}
Note that in the limit of maximum efficiency we have $\mathcal{P}_{SC}^{\Lambda} \approx \frac{Q_{SC}^{\Lambda}}{\tau}$.
Similar to the $V$-type configuration, a calculation out of the short cycle limit gives
\begin{align}\label{worklambda}
W^{\Lambda} &= \int_0^{\tau_d} \operatorname{Tr} \left[\rho(t)\dot{H}(t)\right] dt \nonumber \\
&= \int_0^{\tau_d} i \epsilon \omega_e \left[\varrho_{eg}(t) -\varrho_{ge}(t)\right] dt
\end{align}
for the work extracted from the qutrit, where, $H(t) = H_0 + V^{\Lambda}(t)$, and
\begin{align}\label{heatlambda}
Q_d^{H\Lambda} &= \int_0^{\tau_d} \operatorname{Tr} \left[\left[L_g^{\Lambda+}(\rho(t)) + L_g^{\Lambda-}(\rho(t))\right]H(t)\right] dt \nonumber \\
&= \int_0^{\tau_d} \omega_i \left[\Gamma_g^{\Lambda+} \varrho_{gg}(t) - \Gamma_g^{\Lambda-} \varrho_{ii}(t)\right] dt \nonumber \\
&-\frac{\epsilon \Gamma_g^{\Lambda+}}{2}\int_0^{\tau_d} \left[\varrho_{ge}(t) + \varrho_{eg}(t)\right] dt.
\end{align}
as the incoming heat from the hot source in the discharging stage.
From Eq. \eqref{eq1}, in the interaction picture, we obtain the following equations of motion:
\begin{equation}\label{pglambda}
\dot{\varrho}_{gg} = - i \epsilon (\varrho_{eg} - \varrho_{ge}) - \Gamma_g^{\Lambda+} \varrho_{gg} + \Gamma_g^{\Lambda-} \varrho_{ii}
\end{equation}
\begin{equation}\label{peglambda}
\dot{\varrho}_{eg} = - i \epsilon (\varrho_{gg} - \varrho_{ee}) - \frac{\Gamma_e^{\Lambda+}}{2} \varrho_{eg} - \frac{\Gamma_g^{\Lambda+}}{2} \varrho_{eg}.
\end{equation}
And, given that $\rho(0) = \rho_{OSS}$ and that $\varrho_{ge}(0) = \varrho_{eg}(0)=0$, it follows that $\varrho_{ge}(t) + \varrho_{eg}(t) = 0$ and
\begin{align}\label{heatlambda2}
Q_d^{H\Lambda} &= \int_0^{\tau_d} i \epsilon \omega_i \left[\varrho_{ge}(t) -\varrho_{eg}(t)\right] dt \nonumber \\
&- \omega_i \left[\varrho_{gg}(\tau_d) - \varrho_{gg_{OSS}}\right]
\end{align}
In the second stage (recharging), the heat exchanged with the hot reservoir is given by
\begin{align}\label{heatlambda3}
Q_r^{H\Lambda} &= \int_{\tau_d}^{\tau} \operatorname{Tr} \left[\left[L_g^{\Lambda+}(\rho(t)) + L_g^{\Lambda-}(\rho(t))\right]H_0\right] dt \nonumber \\
&= \int_{\tau_d}^{\tau} \omega_i \left[\Gamma_g^{\Lambda+} \varrho_{gg}(t) - \Gamma_g^{\Lambda-} \varrho_{ii}(t)\right] dt.
\end{align}
In this stage we have $\rho(\tau) = \rho_{OSS}$.
Since $\dot{\varrho}^{\Lambda}_{gg} = - \Gamma_g^{\Lambda +} \varrho_{gg} + \Gamma_g^{\Lambda -} \varrho_{ii}$ we obtain
\begin{equation}\label{heatlambda4}
Q_r^{H\Lambda} = \omega_i \left[\varrho_{gg}(\tau_d) - \varrho_{gg_{OSS}}\right]
\end{equation}
Finally, the efficiency of the machine is given by
\begin{equation}
\eta_\Lambda = \frac{-W^{\Lambda}}{Q_d^{H\Lambda} + Q_r^{H\Lambda}} = \frac{\omega_i}{\omega_e}
\end{equation}
Note that the efficiency depends only on $\omega_e$ and $\omega_i$ as in the short cycle limit and the maximum efficiency, tending to one, is obtained for $\omega_e \approx \omega_i$.
\subsection{Two qubits calculations}
To obtain the operational steady state $\rho_{OSS}$ of the two qubits coupled operating in short cycles we have to solve the equation $\rho_{OSS} =\tilde{\rho}_{OSS} + \tau \mathcal{L}[\tilde{\rho}_{OSS}]$, where $ \tilde{\rho} = U \rho U^{-1}$ and $U = -i\left(\ket{A}\bra{S} + \ket{S}\bra{A} \right) + \ket{G}\bra{G} + \ket{E}\bra{E}$. In the energy eigenbasis $\{\ket{G}, \ket{S}, \ket{A}, \ket{E}\}$, the operational steady state is always diagonal in our work, so $\rho_{OSS}$ is given by $\rho_{OSS} = r_G \ket{G}\bra{G} + r_S \ket{S}\bra{S} + r_A \ket{A}\bra{A} + r_E \ket{E}\bra{E}$.
The populations of $\rho_{OSS}$ are defined by the equations
\begin{equation}\label{ra}
r_A - r_S = \tau [2 \Gamma_A^{E-} r_E + 2 \Gamma_A^{G+} r_G - 2 (\Gamma_A^{E+} + \Gamma_A^{G-}) r_S],
\end{equation}
\begin{equation}\label{rs}
r_S - r_A = \tau[2 \Gamma_S^{G+} r_G + 2 \Gamma_S^{E-} r_E - 2 (\Gamma_S^{E+} + \Gamma_S^{G-}) r_A],
\end{equation}
\begin{equation}\label{rg}
r_G = \frac{\Gamma_S^{G-} r_A + \Gamma_A^{G-} r_S}{\Gamma_A^{G+} + \Gamma_S^{G+}} ,
\end{equation}
\begin{equation}\label{re}
r_E = \frac{\Gamma_A^{E+} r_S + \Gamma_S^{E+} r_A}{\Gamma_S^{E-} + \Gamma_A^{E-}},
\end{equation}
where $\Gamma_{A,S}^{k+} = \gamma_{0A,S}^k \bar{n}_{A,S}^k$ and $\Gamma_{A,S}^{k-} = \gamma_{0A,S}^k (\bar{n}_{A,S}^k + 1)$.
Adding equations \eqref{rg} and \eqref{re}, we obtain
\begin{align}\label{rgre}
r_G + r_E &= 1 -(r_A + r_S) = \frac{\Gamma_S^{G-} r_A + \Gamma_A^{G-} r_S}{\Gamma_A^{G+} + \Gamma_S^{G+}} + \frac{\Gamma_A^{E+} r_S + \Gamma_S^{E+} r_A}{\Gamma_S^{E-} + \Gamma_A^{E-}} \nonumber \\
1 &= (r_A + r_S) + \frac{\Gamma_S^{G-} r_A + \Gamma_A^{G-} r_S}{\Gamma_A^{G+} + \Gamma_S^{G+}} + \frac{\Gamma_A^{E+} r_S + \Gamma_S^{E+} r_A}{\Gamma_S^{E-} + \Gamma_A^{E-}} \nonumber \\
1 &= r_S\left[1 + \frac{\Gamma_A^{G-}}{\Gamma_A^{G+} + \Gamma_S^{G+}} + \frac{\Gamma_A^{E+}}{\Gamma_S^{E-} + \Gamma_A^{E-}}\right] \nonumber \\
&+ r_A \left[1 + \frac{\Gamma_S^{G-}}{\Gamma_A^{G+} + \Gamma_S^{G+}} + \frac{\Gamma_S^{E+}}{\Gamma_S^{E-} + \Gamma_A^{E-}}\right].
\end{align}
Subtracting equations \eqref{ra} and \eqref{rs}, we have
\begin{align}\label{sub}
r_A - r_S &= \tau [r_G (\Gamma_A^{G+} - \Gamma_S^{G+}) + r_E(\Gamma_A^{E-} - \Gamma_S^{E-}) \nonumber \\
&- r_S (\Gamma_A^{G-} + \Gamma_A^{E+})
+ r_A (\Gamma_S^{E+} + \Gamma_S^{G-}) ]\nonumber \\
r_A - r_S &= \tau\left[ \frac{\Gamma_S^{G-} r_A + \Gamma_A^{G-} r_S}{\Gamma_A^{G+} + \Gamma_S^{G+}} (\Gamma_A^{G+} - \Gamma_S^{G+}) \right. \nonumber \\
&+ \frac{\Gamma_A^{E+} r_S + \Gamma_S^{E+} r_A}{\Gamma_S^{E-} + \Gamma_A^{E-}} (\Gamma_A^{E-} - \Gamma_S^{E-}) \nonumber \\
&- \left.r_S (\Gamma_A^{G-} + \Gamma_A^{E+}) + r_A (\Gamma_S^{E+} + \Gamma_S^{G-})\right].
\end{align}
After some algebraic manipulation the equation above can be written as
\begin{equation}\label{rsra}
r_S = \frac{\alpha}{\beta}r_A,
\end{equation}
where
\begin{align}\label{alpha}
\alpha &= 1 - \tau\left[ \frac{\Gamma_S^{G-}}{\Gamma_G^+} (\Gamma_A^{G+} - \Gamma_S^{G+}) +\frac{\Gamma_S^{E+}}{\Gamma_E^-} (\Gamma_A^{E-} - \Gamma_S^{E-}) \nonumber \right. \\
&+ \Gamma_S^{E+} + \Gamma_S^{G-}],
\end{align}
\begin{align}\label{beta}
\beta &= 1 - \tau\left[\frac{\Gamma_A^{G-}}{\Gamma_G^+} (\Gamma_S^{G+} - \Gamma_A^{G+}) + \frac{\Gamma_A^{E+}}{\Gamma_E^-} (\Gamma_S^{E-} - \Gamma_A^{E-}) \nonumber \right. \\
&+ \Gamma_A^{G-} + \Gamma_A^{E+}]
\end{align}
and $\Gamma_k^{\pm} = \Gamma_A^{k\pm} + \Gamma_S^{k\pm}$ ($k = G, E$).
Using equations \eqref{rsra} and \eqref{rgre}, we obtain the population $r_A$ of the antisymmetric state $\ket{A}$ as a function of $\Gamma_{A,S}^{k\pm}$, $\alpha$ and $\beta$
\begin{equation}
r_A = \frac{\Gamma_G^+ \Gamma_E^-}{\chi},
\end{equation}
where
\begin{align}
\chi &= (1 + \frac{\alpha}{\beta})\Gamma_G^+ \Gamma_E^- + \Gamma_E^-(\Gamma_S^{G-} + \frac{\alpha}{\beta}\Gamma_A^{G-}) \nonumber \\
&+ \Gamma_G^+(\Gamma_S^{E+} + \frac{\alpha}{\beta}\Gamma_A^{E+})
\end{align}
Using the relation between $r_A$ and $r_S$ in equation \eqref{rsra} and keeping term up to the first order of $\tau$, the ergotropy, given by $\mathcal{E}_{SC} = 2 \lambda (r_A - r_S)$, becomes
\begin{equation}\label{erg2}
\mathcal{E}_{SC} = \frac{2 \lambda}{\beta}(\beta - \alpha) = 4 \lambda \kappa \tau
\end{equation}
where,
\begin{equation}
\kappa = \frac{\Gamma_E^{-}(\Gamma_A^{G+} \Gamma_S^{G-} - \Gamma_A^{G-} \Gamma_S^{G+}) \nonumber - \Gamma_G^{+}(\Gamma_A^{E+} \Gamma_S^{E-} - \Gamma_A^{E-} \Gamma_S^{E+})}{\Gamma_E^{-}(\Gamma_G^{+} + \Gamma_G^{-})
+ \Gamma_G^{+}(\Gamma_E^{+} + \Gamma_E^{-})}.
\end{equation}
In this limit of operation, the power of the machine is given by
\begin{align}
\mathcal{P}_{SC} = \frac{\mathcal{E}}{\tau} &= 4 \lambda \kappa
\end{align}
Using the same approximations that we used in the ergotropy, the heat exchange with the hot bath, $Q^A_{SC}$, is given by
\begin{align}\label{qh}
Q^H_{SC} &= \operatorname{Tr}\left[H_0 \mathcal{L}_A (\tilde{\rho}_{OSS}) \tau\right] = \tau [4 \omega_0(\Gamma_A^{E+} r_S - \Gamma_A^{E-} r_E) \nonumber \\
&+ 2 (\omega_0 + \lambda)(\Gamma_A^{G+} r_G - \Gamma_A^{E+} r_S + \Gamma_A^{E-} r_E - \Gamma_A^{G-} r_S)] \nonumber \\
&= \frac{2 (\omega_0 - \lambda) \tau}{\Gamma_S^{E-} + \Gamma_A^{E-}} (\Gamma_A^{E+}\Gamma_S^{E-} - \Gamma_S^{E+}\Gamma_A^{E-})r_A\nonumber \\
&+ \frac{2 (\omega_0 + \lambda) \tau}{\Gamma_S^{G+} + \Gamma_A^{G+}} (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})r_A \nonumber \\
&= \frac{2 \tau}{\Omega} [(\omega_0 - \lambda)\Gamma_G^+(\Gamma_A^{E+}\Gamma_S^{E-} - \Gamma_S^{E+}\Gamma_A^{E-}) \nonumber\\
&+ (\omega_0 + \lambda)\Gamma_E^- (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})], \nonumber \\
\end{align}
where
\begin{equation}
\Omega = \Gamma_E^{-}(\Gamma_G^{+} + \Gamma_G^{-})
+ \Gamma_G^{+}(\Gamma_E^{+} + \Gamma_E^{-}). \nonumber
\end{equation}
Finally, we calculate the efficiency of the machine operating in the short cycle limit and we obtain
\begin{equation}
\eta_{SC} = \left(1 - \frac{E_S}{E_A}\right) \frac{1 - f}{1 + \frac{E_S}{E_A} f}
\end{equation}
where,
\begin{equation}
f = \frac{\Gamma_G^+(\Gamma_A^{E+}\Gamma_S^{E-} - \Gamma_S^{E+}\Gamma_A^{E-})}{\Gamma_E^- (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})}.
\end{equation}
Maximum efficiency is obtained when $f << 1$. This condition is reached when $\Gamma_A^{k-} + \Gamma_S^{k-} >> \Gamma_A^{k+} + \Gamma_S^{k+}$. This can be achieved either if $\Gamma_j^{k-} >> \Gamma_j^{k+}$ or if $\Gamma_S^{k-} >> \Gamma_A^{k-}$. In both cases, the maximum efficiency tends to
\begin{equation}\label{efmaxsc}
\eta_{SC}^{max} \rightarrow 1 - \frac{E_S}{E_A}
\end{equation}
Note that the efficiency tending to one, when $\lambda \approx \omega_0$.
For $\Gamma_j^{k-} >> \Gamma_j^{k+}$, the power in the short cycle depends on both temperature and is given by $\mathcal{P}_{SC}^{max} \approx 4 \lambda (\Gamma_A^{G+}\Gamma_S^{G-} - \Gamma_S^{G+}\Gamma_A^{G-})/\Gamma_G^-$. For $\Gamma_S^{k-} >> \Gamma_A^{k-}$ the power output depends only the temperature of the hot reservoir and is given by $\mathcal{P}_{SC}^{max} \approx 4 \lambda \Gamma_A^{G+}$.
When the discharging stage is not adiabatic in the thermodynamic sense, the heat exchange with the hot bath in this stage is given by
\begin{align}\label{heat2cq}
Q_d^H & = \int_0^{\tau_d} \operatorname{Tr} \left[\mathcal{L}_A(\rho(t)) H(t)\right]dt \nonumber \\
&= \int_0^{\tau_d} \{4\omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)\right] \nonumber \\
&+ (\omega_0 + \lambda) [ 2 \Gamma_A^{G+} \varrho_{G}(t) + 2 \Gamma_A^{E-} \varrho_{E}(t) \nonumber \\
&- 2 (\Gamma_A^{G-} + \Gamma_A^{E+}) \varrho_A(t)]\} dt \nonumber \\
&- \epsilon (\Gamma_A^{E+} + \Gamma_S^{E+} + \Gamma_S^{G-} + \Gamma_A^{G-}) \int_0^{\tau_d} (\varrho_{AS}(t) + \varrho_{SA}(t))dt.
\end{align}
By equation \eqref{genw} the work done by the system in this stage is given by
\begin{align} \label{work2cq}
W &= \int_0^{\tau_d} \operatorname{Tr}\left[\rho(t) \dot{H}(t)\right] dt \nonumber \\
&= 2i \epsilon \lambda \int_0^{\tau_d} \left[\varrho_{AS}(t) - \varrho_{SA}(t)\right] dt,
\end{align}
where $H(t) = H_0 + V(t)$.
The equations of motion of the two coupled qubtis, in the interaction picture, in the discharging process are given by
\begin{align}
\dot{\varrho}_{E} &= 2 \Gamma_S^{E+} \varrho_S + 2 \Gamma_A^{E+} \varrho_A - 2 (\Gamma_S^{e-} + \Gamma_A^{e-}) \varrho_{E}, \\
\dot{\varrho}_{G} &= 2 \Gamma_S^{G-} \varrho_S + 2 \Gamma_A^{G-} \varrho_A - 2 (\Gamma_S^{G+} + \Gamma_A^{G+}) \varrho_{G}, \\\label{pad}
\dot{\varrho}_{A} & = -i \epsilon (\varrho_{SA}-\varrho_{AS}) + 2 \Gamma_A^{G+} \varrho_{gg} + 2 \Gamma_A^{E-} \varrho_{E} \nonumber \\
&- 2 (\Gamma_A^{G-} + \Gamma_A^{E+}) \varrho_A, \\
\dot{\varrho}_{S} & = i \epsilon (\varrho_{SA}-\varrho_{AS}) + 2 \Gamma_S^{G+} \varrho_{G} + 2 \Gamma_S^{E-} \varrho_{E} \nonumber \\
&- 2 (\Gamma_S^{G-} + \Gamma_S^{E+}) \varrho_S, \\
\dot{\varrho}_{SA} & = -i \epsilon (\varrho_{A}-\varrho_{S}) - (\Gamma_A^{E+} + \Gamma_S^{E+} + \Gamma_S^{G-} + \Gamma_A^{G-}) \varrho_{SA}, \\
\dot{\varrho}_{AS} & = i \epsilon (\varrho_{A}-\varrho_{S}) - (\Gamma_A^{E+} + \Gamma_S^{E+} + \Gamma_S^{G-} + \Gamma_A^{G-}) \varrho_{AS}.
\end{align}
Substituting Eq.\eqref{pad} in Eq. \eqref{work2cq}, we obtain
\begin{eqnarray}\label{work2cq2}
W &=& 2 \lambda [\varrho_A(\tau_d) -\varrho_{A_{OSS}} \nonumber \\
&+& 2 (\Gamma_A^{G-} + \Gamma_A^{E+}) \int_0^{\tau_d} \varrho_A(t) dt - 2 \Gamma_A^{G+} \int_0^{\tau_d} \varrho_{G}(t) dt \nonumber \\
&-&2 \Gamma_A^{E-} \int_0^{\tau_d} \varrho_{E}(t) dt ]
\end{eqnarray}
where, $\rho_A(0) = \rho_{A_{OSS}}$. When $\epsilon \gg \Gamma_{A,S}^{E \pm}, \Gamma_{A,S}^{G \pm}$ the swap between the populations is approximately instantaneous ($\tau_d \rightarrow 0$). In that situation, by Eq. \eqref{work2cq2}, the work is given by
\begin{equation}
W = 2 \lambda (\varrho_{S_{OSS}} - \varrho_{A_{OSS}}) = 2 \lambda (r_S - r_A) = - \mathcal{E}
\end{equation}
where $\mathcal{E}$ is the ergotropy stored in the operational steady $\rho_{OSS}$.
Substituting \eqref{pad} in \eqref{heat2cq}, we obtain
\begin{align}
Q_d^H & = \int_0^{\tau_d} 4 \omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)\right] dt \nonumber \\
&+ i \epsilon (\omega_0 + \lambda)\int_0^{\tau_d} \left[\varrho_{SA}(t)-\varrho_{AS}(t)\right]dt \nonumber \\
&- (\lambda + \omega_0) [\varrho_{A_{OSS}} - \varrho_A(\tau_d)].
\end{align}
In $t = 0$ the system is in the operational steady state $\rho_{OSS}$ that is diagonal in the energy basis, so by the equations of motions for the coherence we see that $\varrho_{AS}(t) + \varrho_{SA}(t) = 0$. Under the condition where the swap between the populations is approximately instantaneous ($\tau_d \rightarrow 0$, $\epsilon >> \Gamma_{A,S}^{E \pm}, \Gamma_{A,S}^{E \pm}$) we see that $Q_d^H \rightarrow 0$. It means that the process is adiabatic in the thermodynamic sense in this limit, as expected.
In the recharging process there is no external field ($\epsilon = 0$), so $W = 0$. Now we consider that we are not restricted to the short cycle limit, so the heat exchanged with the hot bath is given by
\begin{align}
Q_r^H &= \int_0^{\tau_d} \operatorname{Tr} \left[\mathcal{L}_A(\rho(t)) H_0\right]dt \nonumber \\
&=\int_{\tau_d}^{\tau} \{4 \omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t) \right] \nonumber\\
&+ (\omega_0 + \lambda) [ 2 \Gamma_A^{G+} \varrho_{G} + 2 \Gamma_A^{E-} \varrho_{E}(t) \nonumber \\
&- 2 (\Gamma_A^{G-} + \Gamma_A^{E+}) \varrho_A(t)]\} dt \nonumber \\
&= \int_{\tau_d}^{\tau} 4\omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t) \right]dt \nonumber \\
&+ (\omega_0 + \lambda)[\varrho_A(\tau) - \varrho_A(\tau_d)] \nonumber \\
&= \int_{\tau_d}^{\tau} 4 \omega_0 \left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t) \right]dt \nonumber \\
&+ (\omega + \lambda)[\varrho_{A_{OSS}} - \varrho_A(\tau_d)].
\end{align}
In this stage the system back to the initial state $\rho_{OSS}$, so $\rho_A(\tau) = \rho_{A_{OSS}}$.
Finally, the efficiency of the machine is given by
\begin{equation}
\eta = \frac{-W}{Q_d^H + Q_r^H} = \frac{1 - \frac{E_S}{E_A}}{1 + \alpha + \beta},
\end{equation}
where,
\begin{align}
\alpha &= \frac{\int_0^{\tau_d} 4 \omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)\right] dt }{i\epsilon (\omega_0 + \lambda) \int_0^{\tau_d} \left[\varrho_{SA}(t)-\varrho_{AS}(t)\right] dt} \\
\beta &= \frac{\int_{\tau_d}^{\tau} 4 \omega_0\left[\Gamma_A^{E+} \varrho_A(t) - \Gamma_A^{E-} \varrho_{E}(t)\right] dt}{i\epsilon (\omega_0 + \lambda) \int_0^{\tau_d} \left[\varrho_{SA}(t)-\varrho_{AS}(t)\right] dt} .
\end{align}
Different from the qutrit case, here we see that the efficiency of the machine depends on $\epsilon$.
For a large enough $\tau$ the operational steady state, $\rho_{OSS}$, converges to the {\it bona fide} steady state, $\rho_{NESS}$, defined by $\dot{\rho} = 0$. In the steady state $\rho_{NESS}$ the populations are defined by the following equations:
\begin{equation}\label{ress}
r_{E_{NESS}} = \frac{\Gamma_S^{E+} r_{S_{NESS}} + \Gamma_A^{E+} r_{A_{NESS}} }{\Gamma_S^{E-} + \Gamma_A^{E-}}
\end{equation}
\begin{equation}\label{rgss}
r_{G_{NESS}} = \frac{\Gamma_S^{G-} r_{S_{NESS}} + \Gamma_A^{G-} r_{A_{NESS}} }{\Gamma_S^{G+} + \Gamma_A^{G+}}
\end{equation}
\begin{equation}\label{rass}
r_{A_{NESS}} = \frac{\Gamma_A^{G+} r_{G_{NESS}} + \Gamma_A^{E-} r_{E_{NESS}}}{\Gamma_A^{E+} + \Gamma_A^{G-}}
\end{equation}
\begin{equation}\label{rsss}
r_{S_{NESS}} = \frac{\Gamma_S^{g+} r_{G_{NESS}} + \Gamma_g^{E-} r_{e_{NESS}} }{\Gamma_S^{E+} + \Gamma_S^{G-}}.
\end{equation}
Adding equations \eqref{ress} e \eqref{rgss}, we obtain
\begin{align}\label{um}
r_{G_{NESS}} + r_{E_{NESS}} &= 1 - (r_{A_{NESS}} + r_{S_{NESS}} ) \nonumber \\
&= \frac{\Gamma_S^{G-} r_{S_{NESS}} + \Gamma_A^{G-} r_{A_{NESS}} }{\Gamma_G^+} \nonumber \\
&+ \frac{\Gamma_S^{E+} r_{S_{NESS}} + \Gamma_A^{E+} r_{A_{NESS}} }{\Gamma_E^-} \nonumber \\
1 &= r_{A_{NESS}} \left[1 + \frac{\Gamma_A^{G-}}{\Gamma_G^+} + \frac{\Gamma_A^{E+}}{\Gamma_E^-}\right] \nonumber \\
&+ r_{S_{NESS}} \left[1 + \frac{\Gamma_S^{G-}}{\Gamma_G^+} + \frac{\Gamma_S^{E+}}{\Gamma_E^-}\right] \nonumber \\
&= r_{A_{NESS}} \nu + r_{S_{NESS}} \mu
\end{align}
where,
\begin{equation}\label{nu}
\nu = 1 + \frac{\Gamma_A^{G-}}{\Gamma_G^+} + \frac{\Gamma_A^{E+}}{\Gamma_E^-}
\end{equation}
\begin{equation} \label{mu}
\mu = 1 + \frac{\Gamma_S^{G-}}{\Gamma_G^+} + \frac{\Gamma_S^{E+}}{\Gamma_E^-}
\end{equation}
By equation \eqref{rass}, we have
\begin{align}
(\Gamma_A^{E+} + \Gamma_A^{G-} )r_{A_{NESS}} &= \Gamma_A^{G+} \frac{\Gamma_S^{G-} r_{S_{NESS}} + \Gamma_A^{G-} r_{A_{NESS}} }{\Gamma_G^+} \nonumber \\
&+ \Gamma_A^{E-} \frac{\Gamma_S^{E+} r_{S_{NESS}} + \Gamma_A^{E+} r_{A_{NESS}} }{\Gamma_E^-}.
\end{align}
Multiplying both sides by $\Gamma_E^-\Gamma_G^+$, we obtain
\begin{align}
&\Gamma_E^-\Gamma_G^+(\Gamma_A^{E+} + \Gamma_A^{G-} )r_{A_{NESS}} \nonumber \\
&= \Gamma_A^{G+} \Gamma_E^- (\Gamma_S^{G-} r_{S_{NESS}} + \Gamma_A^{G-} r_{A_{NESS}}) \nonumber \\
&+ \Gamma_A^{E-} \Gamma_G^+ (\Gamma_S^{E+} r_{S_{NESS}} + \Gamma_A^{E+} r_{A_{NESS}}).
\end{align}
After some algebraic manipulation, we obtain
\begin{equation}\label{rsrass}
r_{S_{NESS}} = \frac{\epsilon}{\zeta} r_{A_{NESS}}
\end{equation}
where,
\begin{equation}\label{epsilon}
\epsilon = \Gamma_A^{E+} \Gamma_S^{E-}\Gamma_G^+ + \Gamma_S^{G+} \Gamma_A^{G-} \Gamma_E^-
\end{equation}
\begin{equation}\label{zeta}
\zeta = \Gamma_A^{G+} \Gamma_S^{G-} \Gamma_E^- + \Gamma_A^{E-} \Gamma_S^{E+} \Gamma_G^+
\end{equation}
By equations \eqref{rsrass} and \eqref{um}, we have
\begin{equation}\label{rasol}
r_{A_{NESS}} = \frac{\zeta}{K}
\end{equation}
where,
\begin{align}\label{k}
K &= \Gamma_A^{E+} \Gamma_S^{G-} (\Gamma_S^{E-} + \Gamma_A^{G+}) + \Gamma_S^{E+} \Gamma_A^{G-} (\Gamma_A^{E-} + \Gamma_S^{G+}) \nonumber\\
&+ \Gamma_E^- [\Gamma_A^{G-} \Gamma_S^{G+} + \Gamma_S^{G-}(\Gamma_A^{G-} + \Gamma_A^{G+})] \nonumber \\
&+ \Gamma_G^+ [\Gamma_A^{E-} \Gamma_S^{E+} + \Gamma_A^{E+}(\Gamma_S^{E+} + \Gamma_S^{E-})].
\end{align}
By equation \eqref{rasol} and \eqref{rsrass}, we have
\begin{equation}\label{rssol}
r_{S_{NESS}} = \frac{\epsilon}{K}.
\end{equation}
Using \eqref{rasol} and \eqref{rssol} the ergotropy, given by $\mathcal{E}_{NESS} = 2 \lambda (r_{A_{NESS}} - r_{S_{NESS}})$, becomes
\begin{align}\label{ergss}
\mathcal{E}_{NESS} &= \frac{2 \lambda}{K}(\zeta - \epsilon) \nonumber \\
&=\frac{2 \lambda}{K} [\Gamma_E^-(\Gamma_A^{G+} \Gamma_S^{G-} -\Gamma_S^{G+} \Gamma_A^{G-} ) \nonumber \\
&- \Gamma_G^+(\Gamma_A^{E+} \Gamma_S^{E-} - \Gamma_A^{E-} \Gamma_S^{E+})]
\end{align}
In fig. \eqref{ergotropyness} we give a numerical example for the ergotropy in the steady state, $\mathcal{E}_{NESS}$, as a function of $\mathcal{T}_A/\omega_0$ and $\mathcal{T}_S/\omega_0$ for different values of $\lambda/\omega_0$. In Fig. \eqref{ergotropyness} (c) we see that when $\lambda \ll \omega_0$, whenever there is a positive temperature gradient from $\mathcal{T}_A$ to $\mathcal{T}_S$ we have the necessary conditions to store ergotropy in the system. In Fig. \eqref{ergotropyness} (a) and Fig. \eqref{ergotropyness} (b), we see that a positive temperature gradient from $\mathcal{T}_A$ to $\mathcal{T}_S$ is not a sufficient condition to store ergotropy.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{ergotropy_ness.png}
\caption{We plot $\mathcal{E}_{NESS}/ \lambda$ as a function $\mathcal{T}_A$ and $\mathcal{T}_S$ for $\lambda / \omega_0 = 0.5$ (Fig. (a)), $\lambda/\omega_0 = 0.05$ (Fig. (b)) and $\lambda/ \omega_0 = 0.001$ (Fig. (c)). The vertical bars indicate the value of $\mathcal{E}_{NESS}/ \lambda$ in each colored region.} \label{ergotropyness}
\end{figure}
|
\section*{PROGRAM SUMMARY}
\label{sec:summary}
{\em Computer for which the program is designed and others on which it is operable:} any with standard C++, tested on Linux and Mac OS systems \\ \\
{\em Programming Language used:} C++ \\ \\
{\em High-speed storage required:} No \\ \\
{\em Separate documentation available: } No \\ \\
{\em Keywords: } QCD, TMD factorization, high-energy factorization, TMD PDFs, TMD FFs, unintegrated PDFs, small-$x$ physics.\\ \\
{\em Other programs used:} LHAPDF (version 6) for access to collinear parton distributions, {\sc Root} (any version $>$ 5.30) for plotting the results \\ \\
{\em Download of the program:} \verb+http://tmdlib.hepforge.org+ \\ \\
{\em Unusual features of the program:} None \\ \\
{\em Contacts:} H. Jung (<EMAIL>), A. Bermudez Martinez (<EMAIL>)
\\ \\
{\em Citation policy:} please cite the current version of the manual and the paper(s) related to the parameterization(s). \\
\newpage
\section{Introduction}
\label{sec:Introduction}
The calculation of processes at high energy hadron colliders is based in general on the calculation of a partonic process (matrix element) convoluted with the likelihood to find a parton of specific flavor and momentum fraction at a given scale within the hadrons. If the parton density depends only on the longitudinal momentum fraction $x$ of the hadron's momentum carried by a parton, and the resolution scale $\mu$, the processes are described by collinear factorization with the appropriate evolution of the parton densities (PDFs) given by the Dokshitzer-Gribov-Lipatov-Altarelli-Parisi (DGLAP) evolution equations~\cite{Gribov:1972ri,Altarelli:1977zs,Dokshitzer:1977sg}. Such descriptions are successful for sufficiently inclusive processes, like inclusive deep-inelastic lepton-hadron scattering (DIS).
In several less inclusive processes, also the transverse momentum of the interacting partons plays an important role, leading to an extension of the collinear factorization theorem to include transverse degrees of freedom. Different factorization theorems for the inclusion of transverse momenta to the parton densities have been developed in the past, leading to so-called Transverse Momentum Dependent (TMD) parton densities and unintegrated parton densities (uPDFs)~\cite{Angeles-Martinez:2015sea}. These densities provide a 3D imaging of hadron structure, extending the 1D picture given by PDFs.
For semi-inclusive processes, like semi-inclusive DIS (SIDIS), Drell-Yan (DY) production and $e^+e^-$ scattering, TMD factorization has been formulated~\cite{Collins:1981uk,Collins:1981uw,Collins:1982wa,Collins:1981tt,Collins:1984kg,Collins:2011zzd,Meng:1995yn,Nadolsky:1999kb,Nadolsky:2000ky,Ji:2004wu,Ji:2004xq,GarciaEchevarria:2011rb,Chiu:2011qc}. The high-energy (small-$x$ limit) factorization was formulated for heavy flavor and heavy boson production in Refs.~\cite{Catani:1990xk,Catani:1990eg,Levin:1991ry,Collins:1991ty,Catani:1993ww,Catani:1994sq,Hautmann:2002tu} using unintegrated gluon distributions~\cite{Avsar:2012hj,Avsar:2011tz,Jadach:2009gm,Dominguez:2011saa,Dominguez:2011br,Dominguez:2011gc,Hautmann:2009zzb,Hautmann:2012pf,Hautmann:2007gw}. In Refs.~\cite{Hautmann:2017fcj,Hautmann:2017xtx} the Parton Branching (PB ) method was formulated as a way to obtain TMD distributions for all flavours over a wide range of $x$, transverse momentum $\ensuremath{k_t}$, and scale $\mu$
essentially by solving next-to-leading-order (NLO) DGLAP equations through Sudakov form factors, separating resolvable and
non-resolvable branchings via the notion of soft-gluon resolution scale \cite{webber:1986mc, Ellis:1991qj}, and keeping track of the transverse momenta at each branching.
Since the number of available TMD densities increases very rapidly, and different groups provide different sets, it was necessary to develop a common platform to access the different TMD sets in a common form.
In 2014 the first version of \tmdlib\ (version 1) and \tmdplotter\ was released \cite{Hautmann:2014kza,Connor:2016bmt}, which made several TMD sets available to the community. This library has set a common standard for accessing TMD sets, similar to what was available for collinear parton densities in PDFlib~\cite{PlothowBesch:1992qj,PlothowBesch:1995ci} and LHAPDF~\cite{Buckley:2014ana}.
\tmdlib\ is a {\tt C++} library which provides a framework and an interface to a collection of different uPDF and TMD parameterizations.
In this report, we describe a new version of the TMDlib library, \tmdlib 2, as well
as the associated online plotting tool \tmdplotter. \tmdlib 2 covers all the features present
already in the previous version and contains significant new developments, such as
the treatment of TMD uncertainties and a more efficient method to include new TMD sets.
The report is structured as follows. In Sec.~2, we give the main elements of the library
framework. In Sec.~3 we emphasize the new features of \tmdlib 2 compared to the
previous version. In Sec.~4 we provide the essential documentation. We summarize in Sec.~5.
\section{The TMDlib framework\label{sec2}}
The TMDlib library and its new version \tmdlib 2 consider
momentum weighted TMD parton distributions
$x {\cal A}_j (x ,\ensuremath{k_t}, \mu)$ of flavor $j$ as functions of the parton's light cone longitudinal momentum fractions $x$ of the hadron's momentum, the parton's transverse momentum \ensuremath{k_t} , and the evolution scale $\mu$ \cite{Angeles-Martinez:2015sea}.
Besides, the library also contains integrated TMDs obtained from the integration over $\ensuremath{k_t}$, as follows
\begin{equation}
\label{intA}
x{\cal A}_{int}(x,\mu) = \int_{k_{t,min}}^{k_{t,max}}d \ensuremath{k_t}^2 \; x{\cal A}(x,\ensuremath{k_t} , \mu) \, ,
\end{equation}
In Fig.~\ref{fig:TMDplottercollinear} (left), we show an example of integrated TMD obtained with \tmdplotter\
for the PB-NLO-HERAI+II-2018-set1 \cite{Martinez:2018jxt}, in which the integral between $k_{t,min} =0.01$ and $k_{t,max} =100$ GeV is
compared with the collinear PDF set HERAPDF2.0 \cite{Abramowicz:2015mha}. By construction both sets are identical.
However, in general, Eq.(\ref{intA}) does not converge to the collinear pdf, which is shown in Fig.~\ref{fig:TMDplottercollinear} (right) comparing the integral between $k_{t,min} =0.01$ and $k_{t,max} =100$ GeV of PV17~\cite{Bacchetta:2017gcc} with the corresponding collinear distribution of MMHT2014~\protect\cite{Harland-Lang:2014zoa}.
Several aspects of the relationship between integrated TMDs and collinear PDFs have been investigated in the literature. The matching coefficient between the integrated gluon TMD and the collinear gluon PDF in the MSbar scheme was first computed in the small-$x$ limit in Ref.~\cite{Catani:1993ww}, with small-$x$ resummation of logarithmic accuracy $(\alpha_s \ln x )^m$ to all orders $m$ in $\alpha_s$. Perturbative calculations of the matching coefficients at finite order have recently been carried out through N$^3$LO in Refs.~\cite{Ebert:2020yqt,Luo:2019szz}. Other aspects of the relationship between integrated TMDs and collinear PDFs are studied e.g. in \cite{Catani:1990eg,Watt:2003mx,Hautmann:2007uw,Hautmann:2006xc,Avsar:2012hj,Avsar:2011tz,Collins:2007ph}. We refer the reader to the overview \cite{Angeles-Martinez:2015sea}, and references therein, for further discussions of this topic.
In \tmdlib 2 the densities are defined more generally as momentum weighted distributions $x{\cal A}(x,\bar{x}, \ensuremath{k_t}, \mu)$, where $x, \bar{x}$ are the (positive and negative) light-cone longitudinal momentum fractions~\cite{Watt:2003vf,Watt:2003mx,Collins:2005uv,Collins:2007ph}. In some of the applications $\bar{x}$ is set explicitly to zero, while in other cases $\bar{x} = 0$ means that it is implicitly integrated over.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.49\textwidth]{PB-HERAPDF-collinear-mu100-new}
\includegraphics[width=0.49\textwidth]{PV17-MMHE2014-collinear-new}
\caption{Comparison of up-type parton distributions, $xf(x,\mu)=x{\cal A}_{int}(x,\mu)$ as a function of $x$ at $\mu=100$ GeV
(left): comparison of
the integrated distribution PB-NLO-HERAI+II-2018-set1~\protect\cite{Martinez:2018jxt} with HERAPDF2.0~\protect\cite{Abramowicz:2015mha}.
(right): comparison of integrated distribution PV17~\protect\cite{Bacchetta:2017gcc} with MMHT2014~\protect\cite{Harland-Lang:2014zoa}.
}
\label{fig:TMDplottercollinear}
\end{center}
\end{figure}
\subsection{Grids and Interpolation}
Since the analytic calculation of TMDs as a function of the longitudinal momentum fraction $x$ (we neglect $\bar{x}$ in the following), the transverse momentum \ensuremath{k_t}\ and the scale $\mu$ is very time consuming and in some cases even not available, the TMDs are saved as grids, and \tmdlib\ provides appropriate tools for interpolation between the grid points (where the type of evolution is indicated):
\begin{center}
\begin{tabularx}{\textwidth}{p{0.2\textwidth}X}
\toprule
allFlavPDF & Multidimensional Linear Interpolation in $x$, \ensuremath{k_t}\ and $\mu$ is used for PB\ and CCFM-type TMDs. \\
{Pavia} & Interpolation based on Lagrange polynomials of degree three, performed through APFEL++\cite{Bertone:2017gds,Bertone:2013vaa}.\\
{InterpolationKS} & Multidimensional cubic spline interpolation in $x$, $k_t$ and $\mu$, based on GSL implementation, is used for KS-type TMDs (see Tab.~\ref{tab:TMDuPDF_sets}). \\
\bottomrule
\end{tabularx}
\end{center}
The parameterizations of TMDs in \tmdlib\ are explicitly authorized for each distribution by the corresponding authors.
A list of presently available TMD sets is given in Tab.~\ref{tab:TMDuPDF_sets}.
No explicit QCD evolution code is included: the parameterizations are as given in the corresponding references.
The grids of each selected TMD set are read into memory once (the I/O time depends on the size of the grid). Each TMD set is initialized as a separate instance of the TMD class, which is created for each different TMD set, for example for uncertainty sets, or if several different TMD sets are needed for the calculation.
The memory consumption of TMDlib is determined by the size of the TMDgrids. Optionally, TMDgrids can be loaded separately, avoiding large memory consumption.
It is the philosophy of \tmdlib\, that the definition of TMD grids is left free, but a few examples are given:
the grids for the PB, CCFM and KS TMD sets are stored in form of text tables, the grids of the Pavia type TMDs are stored and read via the \verb+YAML+ frame.
The method of interpolation and the corresponding accuracy of the interpolation is left under control of the authors of the relevant TMD sets.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.49\textwidth]{PBset2-TMD-up-mu100}
\includegraphics[width=0.49\textwidth]{PV17-TMD-up-mu100-mcuncertainty_ratio}
\caption{Transverse momentum distribution $x{\cal A}(x,\ensuremath{k_t},\mu)$ at $x=0.08$ and $\mu=100$ GeV obtained with
PB-NLO-HERAI+II-2018-set2~\protect\cite{Martinez:2018jxt} (left) and
PV17~\protect\cite{Bacchetta:2017gcc} (right). }
\label{fig:TMDuncertainty}
\end{center}
\end{figure}
\subsection{Uncertainty TMD sets}
The estimation of theoretical uncertainties is an important ingredient for phenomenological applications, and uncertainties from PDFs and TMDs play a central role.
The uncertainties of TMDs are estimated usually from the uncertainties of the input parameters or parameterization. There are two different methods commonly used: the Hessian method~\cite{Pumplin:2002vw} which is applied if the parameter variations are orthogonal or the Monte Carlo method providing Monte Carlo replicas~\cite{Giele:1998gw,Giele:2001mr}.
The specific prescriptions on how to calculate the uncertainties for a given TMD set should be found in the original publication describing the TMDs.
An example of TMDs with uncertainty band is shown in Fig.~\ref{fig:TMDuncertainty} for the PB\ set as well as for the PV17 set.
The parameters of intrinsic \ensuremath{k_t} - distribution are part of the fit of PV17, while they are not fitted for the PB\ sets (see discussion in Ref.~\cite{Martinez:2018jxt}).
\subsection{TMDplotter}
\begin{tolerant}{2000}
\tmdlib\ provides also a web-based application for plotting TMD distributions -- \tmdplotter , plotting tools for collinear pdfs are available under e.g. \cite{ApfelWeb} or \cite{DurhamPlotter}.
In Fig.~\ref{fig:TMDplotter} (left) a comparison of the transverse momentum distributions of different TMD sets is shown, and in Fig.~\ref{fig:TMDplotter} (right) the gluon-gluon luminosity calculation for the integrated TMD sets PB-NLO-HERAI+II-2018-set1~\protect\cite{Martinez:2018jxt} at $\mu=100$~GeV compared with the one obtained from {\tt HERAPDF2.0} is shown (the curves obtained from PB-NLO-HERAI+II-2018-set1 and {\tt HERAPDF2.0} overlap).
\end{tolerant}
\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.49\textwidth]{TMDplotter-screenshot-kt}
\includegraphics[width=0.46\textwidth]{TMDplotter-screenshot-luminosity}
\caption{\protect\tmdplotter\ examples: (left) comparison of the transverse momentum distributions of different TMD sets, (right) gluon-gluon luminosity calculation using integrated TMD sets (the curves from PB-NLO-HERAI+II-2018-set1 and {\tt HERAPDF2.0} overlap).
}
\label{fig:TMDplotter}
\end{center}
\end{figure}
\tmdplotter\ is available at \url{http://tmdplotter.desy.de/}.
\section{New features}
Having described in Sec.~\ref{sec2} the general framework of the \tmdlib\ library, we here stress the main new features of \tmdlib 2 compared with the previous version \cite{Hautmann:2014kza} of the library. The most important development concerns the inclusion of many new TMD sets. This is achieved through a new and more efficient method to add input files. The method is flexible enough that it will allow new sets, which may become available in the future, to also be included in a straightforward manner. Another extremely important development of \tmdlib 2, which plays an essential role in paving the way to systematic TMD phenomenology at colliders and fixed target machines, is that the uncertainties associated with TMD sets are now accessible through the library. This was not the case in the first version \cite{Hautmann:2014kza}. It is the first time that TMD uncertainties become available in a library tool. While uncertainties on collinear PDFs are nowadays available through several different web-based resources, \tmdlib 2 is at present the unique tool which contains the full existing information on uncertainties on TMD sets, and makes it readily accessible. As such, we expect it to be an essential tool for phenomenological studies of TMDs and comparisons with experimental data.
To sum up, the main new features of \tmdlib 2 compared
to the earlier version of the library are as follows.
\begin{itemize}
\item \tmdlib 2 makes use of C++ classes, and the different sets corresponding to uncertainty sets or sets corresponding to different parameterizations are read once and initialized as different instances, allowing to load many sets into memory;
\item information about TMD sets is read via {\tt YAML} from the TMD info files, containing all metadata;
\item including new TMD sets is simplified with the new structure of the input sets;
\item the TMD sets are no longer part of the TMDlib distribution, but can be downloaded via {\tt TMDlib-getdata}, distributed with \tmdlib 2.
\end{itemize}
\section{{\tmdlib} documentation}
\label{sec:TMDlibdocumentation}
{\tmdlib} is written in {\tt C++} , with an interface for access from {\tt FORTRAN} code.
The source code of {\tmdlib} is available from {\url{http://tmdlib.hepforge.org/}~} and can be installed using the \textit{standard} {\tt autotools} sequence {\tt configure}, {\tt make}, {\tt make install}, with options to specify the installation path and the location of the {\tt LHAPDF} PDF library~\cite{Buckley:2014ana}, and the {\tt ROOT} data analysis framework library~\cite{Brun:1997pa} (which is used optionally for plotting). If {\tt ROOT} is not found via {\tt root-config}, the plotting option is disabled. After installation, {\tt TMDlib-config} gives access to necessary environment variables.
\subsection{Description of the program components }
\subsubsection*{Initialization in C++}
{\small
\begin{center}
\begin{tabularx}{\textwidth}{p{0.35\textwidth}X}
\toprule
{\tt TMDinit(name)} & To initialize the dataset specified by its name {\tt name}.
A complete list of datasets available in the current version of
{\tmdlib} with the corresponding name is provided in
Tab.~\ref{tab:TMDuPDF_sets}. \\
\midrule
{\tt TMDinit(name,irep)} &
To initialize a given {\tt irep} replica of the dataset {\tt name}.\\
\midrule
{\tt TMDinit(iset)} & To initialize the dataset specified by its identifier {\tt iset}. \\
\bottomrule
\end{tabularx}
\end{center}
\subsubsection*{Initialization in Fortran}
\begin{center}
\begin{tabularx}{\textwidth}{p{0.35\textwidth}X}
\toprule
{\tt TMDinit(iset)} & To initialize the dataset specified by its identifier {\tt iset}. \\
\midrule
{\tt TMDset(iset)} & To switch to the dataset {\tt iset}. \\
\bottomrule
\end{tabularx}
\end{center}
}
\subsubsection*{Access to TMDs in C++}
{\small
\begin{tabularx}{\textwidth}{p{0.35\textwidth}X}
\toprule
{\small \tt TMDpdf(x, xbar, kt, mu)} &
Vector double-type function returning an array of $13$ variables for QCD parton densities
with the values of $x{\cal A}(x,{\bar x},\ensuremath{k_t},\mu)$:
at index $0,\dots,5$ is $\bar{t},\dots,\bar{d}$, at index $6$
is the gluon, and at index $7,\dots,12$ is $d,\dots,t$ densities. \\
\midrule
{\small \tt TMDpdf(x, xbar, kt, mu, xpq)}&
Void-type function filling an array of $13$ variables, {\tt xpq},
with the values of $x{\cal A}(x,{\bar x},\ensuremath{k_t},\mu)$ :
at index $0,\dots,5$ is $\bar{t},\dots,\bar{d}$, at index $6$
is the gluon, and at index $7,\dots,12$ is $d,\dots,t$ densities.\\
\midrule
{\small \tt TMDpdf(x, xbar, kt, mu, uval, dval, sea, charm, bottom, gluon, photon)} &
Void-type function to return $x{\cal A}(x,\bar{x},k_t,\mu)$ at $x, \bar{x}, k_t,\mu $
for valence u-quarks {\tt uval}, valence d-quarks { \tt dval}, light sea-quarks {\tt s},
charm-quarks {\tt c}, bottom-quarks {\tt b}, gluons {\tt glu} and gauge boson {\tt photon}. \\
\midrule
{\small \tt TMDpdf(x, xbar, kt, mu, up, ubar, down, dbar, strange, sbar, charm, cbar, bottom, bbar, gluon, photon)} &
To return $x{\cal A}(x,\bar{x},k_t,\mu)$ at $x, \bar{x}, k_t,\mu $ for the partons \verb+up+, \verb+ubar+, \verb+down+, \verb+dbar+, \verb+strange+,
\verb+sbar+, \verb+charm+, \verb+cbar+, \verb+bottom+, \verb+bbar+, \verb+gluon+ and gauge boson \verb+photon+ (if available). \\
\midrule
{\small \tt TMDpdf(x, xbar, kt, mu, up, ubar, down, dbar, strange, sbar, charm, cbar, bottom, bbar, gluon, photon, Z0, W+,W-,higgs)} &
To return $x{\cal A}(x,\bar{x},k_t,\mu)$ at $x, \bar{x}, k_t,\mu $ for the partons \verb+ up+, \verb+ubar+, \verb+down+, \verb+dbar+, \verb+strange+,
\verb+sbar+, \verb+charm+, \verb+cbar+, \verb+bottom+, \verb+bbar+, \verb+gluon+, the gauge bosons \verb+photon+,
\verb+Z0+, \verb+W++, \verb+W-+ and \verb+higgs+ (if available). \\
\bottomrule
\end{tabularx}
\subsection*{Access to TMDs in Fortran}
\begin{tabularx}{\textwidth}{p{0.35\textwidth}X}
\toprule
{\small \tt TMDpdf(kf,x, xbar, kt, mu, up, ubar, down, dbar, strange, sbar, charm, cbar, bottom, bbar, gluon)} &
To return $x{\cal A}(x,\bar{x},k_t,\mu)$ at $x, \bar{x}, k_t,\mu $ for the partons \verb+up+, \verb+ubar+, \verb+down+, \verb+dbar+, \verb+strange+,
\verb+sbar+, \verb+charm+, \verb+cbar+, \verb+bottom+, \verb+bbar+, \verb+gluon+ for the hadron flavor \verb+kf+.
(\verb+kf+ is no longer used, only kept for backward compatibility with TMDlib1)\\
\midrule
{\small \tt TMDpdfEW(x, xbar, kt, mu, up, ubar, down, dbar, strange, sbar, charm, cbar, bottom, bbar, gluon, photon, Z0, W+,W-, higgs)} &
To return $x{\cal A}(x,\bar{x},k_t,\mu)$ at $x, \bar{x}, k_t,\mu $ for the partons \verb+ up+, \verb+ubar+, \verb+down+, \verb+dbar+, \verb+strange+,
\verb+sbar+, \verb+charm+, \verb+cbar+, \verb+bottom+, \verb+bbar+, \verb+gluon+, the gauge bosons \verb+photon+,
\verb+Z0+, \verb+W++, \verb+W-+ and \verb+higgs+ (if available). \\
\bottomrule
\end{tabularx}
}
\subsubsection*{Callable program components}
The program components listed in this section are accessible with the same name in C++ as well as in Fortran.
{\small
\begin{center}
\begin{tabularx}{\textwidth}{p{0.35\textwidth}X}
\toprule
{\tt TMDinfo(dataset)} & Accesses information from the \verb+info+ file.\\
\midrule
{\tt TMDgetDesc()} & Returns data set description from \verb+info+ file.\\
\midrule
{\tt TMDgetIndex()} & Returns index number as a string of data set from \verb+info+ file.\\
\midrule
{\tt TMDgetNumMembers()} & Returns number of members of data sets from \verb+info+ file. \\
\midrule
{\tt TMDgetScheme()} & Returns evolution scheme of dataset from \verb+info+ file.\\
\midrule
{\tt TMDgetNf()} & Returns the number of flavours, $N_f$, used for the computation of $\Lambda_{QCD}$.\\
\midrule
{\tt TMDgetOrderAlphaS()} & Returns the perturbative order of $\alpha_\mathrm{s}$ used in the evolution of
the dataset.\\
\midrule
{\tt TMDgetOrderPDF()}
& Returns the perturbative order of the evolution of the dataset.\\
\midrule
{\tt TMDgetXmin()} & Returns the minimum value of the momentum fraction $x$
for which the dataset initialized by {\tt TMDinit(name)} was determined.\\
\midrule
{\tt TMDgetXmax()} & Returns the maximum value of the momentum fraction $x$
for which the dataset initialized by {\tt TMDinit(name)} was determined.\\
\midrule
{\tt TMDgetQmin()} ({\tt TMDgetQ2min()}) & Returns the minimum value of the energy scale $\mu$ (in GeV), ($\mu^2$ (in GeV$^2$))
for dataset.\\
\midrule
{\tt TMDgetQmax()} ({\tt TMDgetQ2max()}) & Returns the maximum value of the energy scale $\mu$ (in GeV) , ($\mu^2$ (in GeV$^2$))
for dataset.\\
\midrule
{\tt TMDgetExtrapolation\_Q2()}
& Returns the method of extrapolation in scale outside the grid definition as specified in \verb+info+ file.\\
\midrule
{\tt TMDgetExtrapolation\_kt()}
& Returns the method of extrapolation in $\ensuremath{k_t}$ outside the grid definition as specified in \verb+info+ file.\\
\midrule
{\tt TMDgetExtrapolation\_x()}
& Returns the method of extrapolation in $x$ outside the grid definition as specified in \verb+info+ file.\\
\midrule
{\tt TMDnumberPDF(name)} & Returns the identifier as a value of the associated \verb+name+ of the dataset.\\
\midrule
{\tt TMDstringPDF(index)} & Returns the name associated with \verb+index+ of the dataset.\\
\bottomrule
\end{tabularx}
\end{center}
}
\subsection{{\tmdlib} calling sequence}
In the following simple examples are given to demonstrate how information from the TMD parton densities can be obtained in C++ and Fortran.
\begin{small}
\begin{itemize}
\item in C++
\begin{verbatim}
string name ="PB-NLO-HERAI+II-2018-set2";
double x=0.01, xbar=0, kt=10., mu=100.;
TMD TMDtest;
int irep=0;
TMDtest.TMDinit(name,irep);
cout << "TMDSet Description: " << TMDtest.TMDgetDesc() << endl;
cout << "number = " << TMDtest.TMDnumberPDF(name) << endl;
TMDtest.TMDpdf(x,xbar,kt,mu, up, ubar, down, dbar, strange, sbar,
charm, cbar, bottom, bbar, gluon, photon);
\end{verbatim}
\item in Fortran (using multiple replicas of the TMD)
\begin{verbatim}
x = 0.01
xbar = 0
kt = 10.
mu = 100.
iset = 102200
call TMDinit(iset)
write(6,*) ' iset = ', iset
call TMDinit(iset)
nmem=TMDgetNumMembers()
write(6,*) ' Nr of members ', nmem,' in Iset = ', iset
do i=0,nmem
isetTMDlib = iset+i
write(6,*) ' isetTMDlib = ', isetTMDlib
call TMDinit(isetTMDlib)
call TMDset(isetTMDlib)
call TMDpdf(kf,x,xbar,kt,mu,up,ubar,dn,dbar,strange,sbar,
& charm,cbar,bottom,bbar,glu)
call TMDpdfew(kf,x,xbar,kt,mu,up,ubar,dn,dbar,strange,sbar,
& charm,cbar,bottom,bbar,glu,photon,z0,wplus,wminus,higgs)
end do
\end{verbatim}
\end{itemize}
\end{small}
\subsection{Installation of TMD grids }
The TMD grid files are no longer automatically distributed with the code package, but have to be installed separately.
A list of available TMD parameterizations is given in Tab.~\ref{tab:TMDuPDF_sets}.
\begin{small}
\begin{verbatim}
# get help
bin/TMDlib-getdata --help
# install all data sets
bin/TMDlib-getdata all
# install a single data (for example: SV19_nnlo)
bin/TMDlib-getdata SV19_nnlo
\end{verbatim}
\end{small}
\subsection{Structure of TMD grids}
In \tmdlib 2 the TMDgrids are stored in directories with the name of a given TMD set which is located in {\tt installation\_prefix/share/tmdlib/TMDsetName}. Every such directory contains info file and grid file(s), for example for a TMD set called \verb+test+:
\begin{small}
\begin{verbatim}
~/local/share/tmdlib> ls test
test.info test_0000.dat
\end{verbatim}
\end{small}
\begin{tolerant}{2000}
\noindent
The \verb+info+ file contains general information on the TMDset (inspired by a similar strategy in LHAPDF), as described below, and the file(s) \verb+test_0000.dat+ contains the TMDgrid. If further replicas are available (for example for uncertainties), the files are numbered as \verb+test_0000.dat, test_0001.dat,...+, with the number of files given by \verb+NumMembers+ as described below.
\end{tolerant}
\noindent
The \verb+info+ file must contain all the information to initialize and use the TMDgrid:
\begin{small}
\begin{verbatim}
SetDesc: "Description of the dataset "
SetIndex: XXXXX
Authors: XXXX
Reference: XXXX
Particle: 2212
NumMembers: 34
NumFlavors: 6
TMDScheme: PB TMD
Flavors: [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 21]
Extrapolation_x: fixed
Extrapolation_Q2: fixed
Extrapolation_kt: fixed
AlphaS_MZ: 0.118
AlphaS_OrderQCD: 1
OrderQCD: 1
XMin: 9.9e-07
XMax: 1.
KtMin: 0.01
KtMax: 13300.
QMin: 1.3784
QMax: 13300
MZ: 91.1876
MUp: 0.
MDown: 0.
MStrange: 0.
MCharm: 1.47
MBottom: 4.5
MTop: 173
\end{verbatim}
\end{small}
The meaning of most entries is obvious from their name, with \verb+TMDScheme+
different structures for the TMD grids can be selected:
\begin{defl}{1234567890123456789}
\item[{\tt PB TMD}] used for the PB TMD series
\item[{\tt PB TMD-EW}] used for the PB TMD series including electroweak particles
\item[{\tt Pavia TMDs}] used for the PaviaTMD (or similar TMD) series
\end{defl}
\begin{table}[htb]
\footnotesize
\centering
\begin{tabular}{r | l | c | c }
\toprule
iset & uPDF/TMD set & Subsets & Ref. \\ \hline
101000 &\verb+ccfm-JS-2001+ &1 &\cite{Jung:2004gs} \\
101010 &\verb+ccfm-setA0+ & 4 &\cite{Jung:2004gs} \\
101020 &\verb+ccfm-setB0+ & 4 &\cite{Jung:2004gs} \\
101001 &\verb+ccfm-JH-set1+ &1 &\cite{Hansson:2003xz} \\
101002 &\verb+ccfm-JH-set2+ &1 &\cite{Hansson:2003xz} \\
101003 &\verb+ccfm-JH-set3+ &1 &\cite{Hansson:2003xz} \\
101201 &\verb+ccfm-JH-2013-set1+ & 13 &\cite{Hautmann:2013tba} \\
101301 &\verb+ccfm-JH-2013-set2+ & 13 &\cite{Hautmann:2013tba} \\
101401 &\verb+MD-2018+ & 1 & \cite{Abdulov:2018ccp}\\
101410 &\verb+KLSZ-2020+ & 1 & \cite{Kotikov:2019kci}\\
102100 &\verb#PB-NLO-HERAI+II-2018-set1# & 35 &\cite{Martinez:2018jxt} \\
102200 &\verb#PB-NLO-HERAI+II-2018-set2#& 37 &\cite{Martinez:2018jxt} \\
102139 &\verb#PB-NLO-HERAI+II-2018-set1-q0# & 3 &\cite{Martinez:2018jxt} \\
102239 &\verb#PB-NLO-HERAI+II-2018-set2-q0# & 3 &\cite{Martinez:2018jxt} \\
103100 &\verb#PB-NLO+QED-set1-HERAI+II#& 1 &\cite{Jung:2021mox}\\
103200 &\verb#PB-NLO+QED-set2-HERAI+II #& 1 &\cite{Jung:2021mox}\\
10904300 &\verb+PB-NLO_ptoPb208-set1+ &1 &\cite{Blanco:2019qbm} \\
10904400 &\verb+PB-NLO_ptoPb208-set2+ &1 &\cite{Blanco:2019qbm} \\
10901300 &\verb+PB-EPPS16nlo_CT14nlo_Pb208-set1+ &1 &\cite{Blanco:2019qbm} \\
10901400 &\verb+PB-EPPS16nlo_CT14nlo_Pb208-set2+ &1 &\cite{Blanco:2019qbm} \\
10902300 &\verb+PB-nCTEQ15FullNuc_208_82-set1+ &33 &\cite{Blanco:2019qbm} \\
10902400 &\verb+PB-nCTEQ15FullNuc_208_82-set2+ &33 &\cite{Blanco:2019qbm} \\
200001 &\verb+GBWlight+ & 1 &\cite{GolecBiernat:1998js} \\
200002 &\verb+GBWcharm+ & 1 &\cite{GolecBiernat:1998js} \\
210001 &\verb+Blueml+ &1 &\cite{Blumlein:1995mi} \\
400001 &\verb+KS-2013-linear+ & 1 &\cite{Kutak:2012rf} \\
400002 &\verb+KS-2013-non-linear+ &1 &\cite{Kutak:2012rf} \\
400003 &\verb+KS-hardscale-linear+ &1 &\cite{Kutak:2014wga} \\
400004 &\verb+KS-hardscale-non-linear+ & 1 &\cite{Kutak:2014wga} \\
400101 &\verb+KS-WeizWill-2017+ & 1 & \cite{Kotko:2017oxg}\\
500001 &\verb+EKMP+ & 1 &\cite{Echevarria:2015uaa} \\
410001 &\verb+BHKS+ & 1 &\cite{Bury:2017jxo} \\
300001 &\verb+SBRS-2013-TMDPDFs+ & 1 &\cite{Signori:2013mda} \\
300002 &\verb+SBRS-2013-TMDPDFs-par+ & 1 &\cite{Signori:2013mda} \\
601000 &\verb+PV17_grid_pdf+ & 201 &\cite{Bacchetta:2017gcc} \\
602000 &\verb+PV17_grid_ff_Pim+ & 201 &\cite{Bacchetta:2017gcc} \\
603000 &\verb+PV17_grid_ff_Pip + & 201 &\cite{Bacchetta:2017gcc} \\
604000 &\verb+PV17_grid_FUUT_Pim+ & 100 &\cite{Bacchetta:2017gcc} \\
605000 &\verb+PV17_grid_FUUT_Pip+ & 100 &\cite{Bacchetta:2017gcc} \\
606000 &\verb+PV19_grid_pdf + & 216 &\cite{Bacchetta:2019sam} \\
607000 &\verb+PV20_grid_FUTTsin_P_Pim+ & 101 & \cite{Bacchetta:2020gko}\\
608000 &\verb+PV20_grid_FUTTsin_P_Pip+ & 101 & \cite{Bacchetta:2020gko}\\
701000 &\verb+SV19_nnlo + & 23 &\cite{Scimemi:2019cmh} \\
702000 &\verb+SV19_nnlo_all=0 + & 21 &\cite{Scimemi:2019cmh} \\
703000 &\verb+SV19_n3lo + & 23 &\cite{Scimemi:2019cmh} \\
704000 &\verb+SV19_n3lo_all=0 + & 21 &\cite{Scimemi:2019cmh} \\
705000 &\verb+SV19_ff_pi_n3lo + & 23 &\cite{Scimemi:2019cmh} \\
706000 &\verb+SV19_ff_pi_n3lo_all=0 + & 21 &\cite{Scimemi:2019cmh} \\
707000 &\verb+SV19_ff_K_n3lo + & 23 &\cite{Scimemi:2019cmh} \\
708000 &\verb+SV19_ff_K_n3lo_all=0 + & 21 &\cite{Scimemi:2019cmh} \\
709000 &\verb+SV19_pion + & 7 &\cite{Vladimirov:2019bfa} \\
710000 &\verb+SV19_pion_all=0 + & 7 &\cite{Vladimirov:2019bfa} \\
711000 &\verb+BPV20_Sivers + & 25 &\cite{Bury:2020vhj} \\
\bottomrule
\end{tabular}
\caption{Available uPDF/TMD parton sets in \tmdlib .}
\label{tab:TMDuPDF_sets}
\label{updfs}
\end{table}
\section{Summary}
\label{sec:conclusions}
The authors of this manual set up a collaboration to develop and maintain {\tmdlib} and {\tmdplotter}, respectively a {\tt C++} library for handling different parameterizations of uPDFs/ TMDs and a corresponding online plotting tool.
The aim is to update these tools with more uPDF/TMD parton sets and new features, as they
become available and are developed.
\tmdlib 2 improves on the efficiency of previous versions, allows for simpler C++ interfaces and simplifies the inclusion of new uPDF/TMD sets.
\section*{Acknowledgments}
\begin{tolerant}{2000}
N. Abdulov was also supported by the RFBR grant 19-32-90096.
S. Baranov, A. Lipatov and M. Malyshev are grateful the DESY Directorate for the support in the framework of Cooperation Agreement between MSU and DESY on phenomenology of the LHC processes and TMD parton densities.
V.~Bertone is supported by the European Union's Horizon 2020 research and innovation programme under grant agreement No 824093.
C.~Bissolotti is supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 647981, 3DSPIN) and by the U.S. Department of Energy contract DE-AC05-06OR23177 under which Jefferson Science Associates operates the Thomas Jefferson National Accelerator Facility.
F. Hautmann thanks DESY, Hamburg and CERN, Theory Group for hospitality and support.
M. Hentschinski gratefully acknowledges support by Consejo Nacional de Ciencia y Tecnolog\'ia grant number A1 S-43940 (CONACYT-SEP Ciencias B\'asicas).
A. Lelek acknowledges funding by Research Foundation-Flanders (FWO) (application number: 1272421N).
M.~Malyshev and N.~Abdulov were supported by the grant of the Foundation for the Advancement of Theoretical Physics and Mathematics (grants 20-1-3-11-1 and 18-1-5-33-1, respectively.
A.~Signori acknowledges support from the European Commission through the Marie Sk\l{}odowska-Curie Action SQuHadron (grant agreement ID: 795475).
S.~Taheri~Monfared thanks the Humboldt Foundation for the Georg Forster research fellowship and gratefully acknowledges support from IPM.
A.~van~Hameren acknowledges support from the Polish National Science Centre grant no. 2019/35/ST2/03531. K.~Kutak acknowledges the support by Polish National Science Centre grant no. DEC-2017/27/B/ST2/01985
Q.~Wang and H.~Yang acknowledge the support by the Ministry of Science and Technology under grant No. 2018YFA040390 and by the National Natural Science Foundation of China under grant No. 11661141008.
\end{tolerant}
\providecommand{\etal}{et al.\xspace}
\providecommand{\href}[2]{#2}
\providecommand{\coll}{Coll.}
\catcode`\@=11
\def\@bibitem#1{%
\ifmc@bstsupport
\mc@iftail{#1}%
{;\newline\ignorespaces}%
{\ifmc@first\else.\fi\orig@bibitem{#1}}
\mc@firstfalse
\else
\mc@iftail{#1}%
{\ignorespaces}%
{\orig@bibitem{#1}}%
\fi}%
\catcode`\@=12
\begin{mcbibliography}{10}
\bibitem{Gribov:1972ri}
V.~N. Gribov and L.~N. Lipatov,
\newblock Sov. J. Nucl. Phys.{} {\bf 15},~438~(1972).
\newblock [Yad. Fiz.15,781(1972)]\relax
\relax
\bibitem{Altarelli:1977zs}
G.~Altarelli and G.~Parisi,
\newblock Nucl. Phys. B{} {\bf 126},~298~(1977)\relax
\relax
\bibitem{Dokshitzer:1977sg}
Y.~L. Dokshitzer,
\newblock Sov. Phys. JETP{} {\bf 46},~641~(1977).
\newblock [Zh. Eksp. Teor. Fiz.73,1216(1977)]\relax
\relax
\bibitem{Angeles-Martinez:2015sea}
R.~Angeles-Martinez {\em et al.},
\newblock Acta Phys. Polon. B{} {\bf 46},~2501~(2015).
\newblock \href{http://www.arXiv.org/abs/1507.05267}{{\tt 1507.05267}}\relax
\relax
\bibitem{Collins:1981uk}
J.~C. Collins and D.~E. Soper,
\newblock Nucl. Phys. B{} {\bf 193},~381~(1981).
\newblock [Erratum: Nucl. Phys.B213,545(1983)]\relax
\relax
\bibitem{Collins:1981uw}
J.~C. Collins and D.~E. Soper,
\newblock Nucl. Phys. B{} {\bf 194},~445~(1982)\relax
\relax
\bibitem{Collins:1982wa}
J.~C. Collins, D.~E. Soper, and G.~F. Sterman,
\newblock Nucl. Phys. B{} {\bf 223},~381~(1983)\relax
\relax
\bibitem{Collins:1981tt}
J.~C. Collins, D.~E. Soper, and G.~F. Sterman,
\newblock Phys. Lett. B{} {\bf 109},~388~(1982)\relax
\relax
\bibitem{Collins:1984kg}
J.~C. Collins, D.~E. Soper, and G.~F. Sterman,
\newblock Nucl. Phys. B{} {\bf 250},~199~(1985)\relax
\relax
\bibitem{Collins:2011zzd}
J.~Collins,
\newblock {\em {Foundations of perturbative QCD}}, Vol.~32.
\newblock Cambridge monographs on particle physics, nuclear physics and
cosmology., 2011\relax
\relax
\bibitem{Meng:1995yn}
R.~Meng, F.~I. Olness, and D.~E. Soper,
\newblock Phys. Rev. D{} {\bf 54},~1919~(1996).
\newblock \href{http://www.arXiv.org/abs/hep-ph/9511311}{{\tt
hep-ph/9511311}}\relax
\relax
\bibitem{Nadolsky:1999kb}
P.~M. Nadolsky, D.~R. Stump, and C.~P. Yuan,
\newblock Phys. Rev. D{} {\bf 61},~014003~(2000).
\newblock [Erratum: Phys.Rev.D 64, 059903 (2001)],
\href{http://www.arXiv.org/abs/hep-ph/9906280}{{\tt hep-ph/9906280}}\relax
\relax
\bibitem{Nadolsky:2000ky}
P.~M. Nadolsky, D.~R. Stump, and C.~P. Yuan,
\newblock Phys. Rev. D{} {\bf 64},~114011~(2001).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0012261}{{\tt
hep-ph/0012261}}\relax
\relax
\bibitem{Ji:2004wu}
X.-D. Ji, J.-P. Ma, and F.~Yuan,
\newblock Phys. Rev. D{} {\bf 71},~034005~(2005).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0404183}{{\tt
hep-ph/0404183}}\relax
\relax
\bibitem{Ji:2004xq}
X.-D. Ji, J.-P. Ma, and F.~Yuan,
\newblock Phys. Lett. B{} {\bf 597},~299~(2004).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0405085}{{\tt
hep-ph/0405085}}\relax
\relax
\bibitem{GarciaEchevarria:2011rb}
M.~G. Echevarria, A.~Idilbi, and I.~Scimemi,
\newblock JHEP{} {\bf 07},~002~(2012).
\newblock \href{http://www.arXiv.org/abs/1111.4996}{{\tt 1111.4996}}\relax
\relax
\bibitem{Chiu:2011qc}
J.-Y. Chiu, A.~Jain, D.~Neill, and I.~Z. Rothstein,
\newblock Phys. Rev. Lett.{} {\bf 108},~151601~(2012).
\newblock \href{http://www.arXiv.org/abs/1104.0881}{{\tt 1104.0881}}\relax
\relax
\bibitem{Catani:1990xk}
S.~Catani, M.~Ciafaloni, and F.~Hautmann,
\newblock Phys. Lett. B{} {\bf 242},~97~(1990)\relax
\relax
\bibitem{Catani:1990eg}
S.~Catani, M.~Ciafaloni, and F.~Hautmann,
\newblock Nucl. Phys. B{} {\bf 366},~135~(1991)\relax
\relax
\bibitem{Levin:1991ry}
E.~M. Levin, M.~G. Ryskin, Y.~M. Shabelski, and A.~G. Shuvaev,
\newblock Sov. J. Nucl. Phys.{} {\bf 53},~657~(1991)\relax
\relax
\bibitem{Collins:1991ty}
J.~C. Collins and R.~K. Ellis,
\newblock Nucl. Phys. B{} {\bf 360},~3~(1991)\relax
\relax
\bibitem{Catani:1993ww}
S.~Catani, M.~Ciafaloni, and F.~Hautmann,
\newblock Phys. Lett.{} {\bf B307},~147~(1993)\relax
\relax
\bibitem{Catani:1994sq}
S.~Catani and F.~Hautmann,
\newblock Nucl. Phys.{} {\bf B427},~475~(1994).
\newblock \href{http://www.arXiv.org/abs/hep-ph/9405388}{{\tt
hep-ph/9405388}}\relax
\relax
\bibitem{Hautmann:2002tu}
F.~Hautmann,
\newblock Phys. Lett. B{} {\bf 535},~159~(2002).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0203140}{{\tt
hep-ph/0203140}}\relax
\relax
\bibitem{Avsar:2012hj}
E.~Avsar~(2012).
\newblock \href{http://www.arXiv.org/abs/1203.1916}{{\tt 1203.1916}}\relax
\relax
\bibitem{Avsar:2011tz}
E.~Avsar,
\newblock Int. J. Mod. Phys. Conf. Ser.{} {\bf 04},~74~(2011).
\newblock \href{http://www.arXiv.org/abs/1108.1181}{{\tt 1108.1181}}\relax
\relax
\bibitem{Jadach:2009gm}
S.~Jadach and M.~Skrzypek,
\newblock Acta Phys. Polon. B{} {\bf 40},~2071~(2009).
\newblock \href{http://www.arXiv.org/abs/0905.1399}{{\tt 0905.1399}}\relax
\relax
\bibitem{Dominguez:2011saa}
F.~Dominguez,
\newblock {\em {Unintegrated Gluon Distributions at Small-x}}.
\newblock Ph.D.\ Thesis, Columbia U., 2011\relax
\relax
\bibitem{Dominguez:2011br}
F.~Dominguez, J.-W. Qiu, B.-W. Xiao, and F.~Yuan,
\newblock Phys. Rev. D{} {\bf 85},~045003~(2012).
\newblock \href{http://www.arXiv.org/abs/1109.6293}{{\tt 1109.6293}}\relax
\relax
\bibitem{Dominguez:2011gc}
F.~Dominguez, A.~Mueller, S.~Munier, and B.-W. Xiao,
\newblock Phys. Lett. B{} {\bf 705},~106~(2011).
\newblock \href{http://www.arXiv.org/abs/1108.1752}{{\tt 1108.1752}}\relax
\relax
\bibitem{Hautmann:2009zzb}
F.~Hautmann,
\newblock Acta Phys.Polon. B{} {\bf 40},~2139~(2009)\relax
\relax
\bibitem{Hautmann:2012pf}
F.~Hautmann, M.~Hentschinski, and H.~Jung~(2012).
\newblock \href{http://www.arXiv.org/abs/1205.6358}{{\tt 1205.6358}}\relax
\relax
\bibitem{Hautmann:2007gw}
F.~Hautmann and H.~Jung,
\newblock Nucl. Phys. Proc. Suppl.{} {\bf 184},~64~(2008).
\newblock \href{http://www.arXiv.org/abs/0712.0568}{{\tt 0712.0568}}\relax
\relax
\bibitem{Hautmann:2017fcj}
F.~Hautmann, H.~Jung, A.~Lelek, V.~Radescu, and R.~Zlebcik,
\newblock JHEP{} {\bf 01},~070~(2018).
\newblock \href{http://www.arXiv.org/abs/1708.03279}{{\tt 1708.03279}}\relax
\relax
\bibitem{Hautmann:2017xtx}
F.~Hautmann, H.~Jung, A.~Lelek, V.~Radescu, and R.~Zlebcik,
\newblock Phys. Lett. B{} {\bf 772},~446~(2017).
\newblock \href{http://www.arXiv.org/abs/1704.01757}{{\tt 1704.01757}}\relax
\relax
\bibitem{webber:1986mc}
B.~R. Webber,
\newblock Ann. Rev. Nucl. Part. Sci.{} {\bf 36},~253~(1986)\relax
\relax
\bibitem{Ellis:1991qj}
R.~K. Ellis, W.~J. Stirling, and B.~R. Webber,
\newblock Camb. Monogr. Part. Phys. Nucl. Phys. Cosmol.{} {\bf
8},~1~(1996)\relax
\relax
\bibitem{Hautmann:2014kza}
F.~Hautmann, H.~Jung, M.~Kr{\"a}mer, P.~Mulders, E.~Nocera, {\em et al.},
\newblock Eur. Phys. J. C{} {\bf 74},~3220~(2014).
\newblock \href{http://www.arXiv.org/abs/1408.3015}{{\tt 1408.3015}}\relax
\relax
\bibitem{Connor:2016bmt}
P.~Connor, H.~Jung, F.~Hautmann, and J.~Scheller,
\newblock PoS{} {\bf DIS2016},~039~(2016)\relax
\relax
\bibitem{PlothowBesch:1992qj}
H.~Plothow-Besch,
\newblock Comput. Phys. Commun.{} {\bf 75},~396~(1993)\relax
\relax
\bibitem{PlothowBesch:1995ci}
H.~Plothow-Besch,
\newblock Int. J. Mod. Phys. A{} {\bf 10},~2901~(1995)\relax
\relax
\bibitem{Buckley:2014ana}
A.~Buckley, J.~Ferrando, S.~Lloyd, K.~Nordstr{\"o}m, B.~Page, M.~R{\"u}fenacht,
M.~Sch{\"o}nherr, and G.~Watt,
\newblock Eur. Phys. J. C{} {\bf 75},~132~(2015).
\newblock \href{http://www.arXiv.org/abs/1412.7420}{{\tt 1412.7420}}\relax
\relax
\bibitem{Martinez:2018jxt}
A.~Bermudez~Martinez, P.~Connor, F.~Hautmann, H.~Jung, A.~Lelek, V.~Radescu,
and R.~Zlebcik,
\newblock Phys. Rev. D{} {\bf 99},~074008~(2019).
\newblock \href{http://www.arXiv.org/abs/1804.11152}{{\tt 1804.11152}}\relax
\relax
\bibitem{Abramowicz:2015mha}
{ ZEUS, H1} Collaboration, H.~Abramowicz {\em et al.},
\newblock Eur. Phys. J. C{} {\bf 75},~580~(2015).
\newblock \href{http://www.arXiv.org/abs/1506.06042}{{\tt 1506.06042}}\relax
\relax
\bibitem{Bacchetta:2017gcc}
A.~Bacchetta, F.~Delcarro, C.~Pisano, M.~Radici, and A.~Signori,
\newblock JHEP{} {\bf 06},~081~(2017).
\newblock \href{http://www.arXiv.org/abs/1703.10157}{{\tt 1703.10157}}\relax
\relax
\bibitem{Harland-Lang:2014zoa}
L.~A. Harland-Lang, A.~D. Martin, P.~Motylinski, and R.~S. Thorne,
\newblock Eur. Phys. J. C{} {\bf 75},~204~(2015).
\newblock \href{http://www.arXiv.org/abs/1412.3989}{{\tt 1412.3989}}\relax
\relax
\bibitem{Ebert:2020yqt}
M.~A. Ebert, B.~Mistlberger, and G.~Vita,
\newblock JHEP{} {\bf 09},~146~(2020).
\newblock \href{http://www.arXiv.org/abs/2006.05329}{{\tt 2006.05329}}\relax
\relax
\bibitem{Luo:2019szz}
M.-x. Luo, T.-Z. Yang, H.~X. Zhu, and Y.~J. Zhu,
\newblock Phys. Rev. Lett.{} {\bf 124},~092001~(2020).
\newblock \href{http://www.arXiv.org/abs/1912.05778}{{\tt 1912.05778}}\relax
\relax
\bibitem{Watt:2003mx}
G.~Watt, A.~D. Martin, and M.~G. Ryskin,
\newblock Eur. Phys. J.{} {\bf C31},~73~(2003).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0306169}{{\tt
hep-ph/0306169}}\relax
\relax
\bibitem{Hautmann:2007uw}
F.~Hautmann,
\newblock Phys. Lett. B{} {\bf 655},~26~(2007).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0702196}{{\tt
hep-ph/0702196}}\relax
\relax
\bibitem{Hautmann:2006xc}
F.~Hautmann,
\newblock Phys. Lett. B{} {\bf 643},~171~(2006).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0610078}{{\tt
hep-ph/0610078}}\relax
\relax
\bibitem{Collins:2007ph}
J.~C. Collins, T.~C. Rogers, and A.~M. Stasto,
\newblock Phys. Rev. D{} {\bf 77},~085009~(2008).
\newblock \href{http://www.arXiv.org/abs/0708.2833}{{\tt 0708.2833}}\relax
\relax
\bibitem{Watt:2003vf}
G.~Watt, A.~D. Martin, and M.~G. Ryskin,
\newblock Phys. Rev.{} {\bf D70},~014012~(2004).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0309096}{{\tt
hep-ph/0309096}}\relax
\relax
\bibitem{Collins:2005uv}
J.~Collins and H.~Jung~(2005).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0508280}{{\tt
hep-ph/0508280}}\relax
\relax
\bibitem{Bertone:2017gds}
V.~Bertone,
\newblock PoS{} {\bf DIS2017},~201~(2018).
\newblock \href{http://www.arXiv.org/abs/1708.00911}{{\tt 1708.00911}}\relax
\relax
\bibitem{Bertone:2013vaa}
V.~Bertone, S.~Carrazza, and J.~Rojo,
\newblock Comput. Phys. Commun.{} {\bf 185},~1647~(2014).
\newblock \href{http://www.arXiv.org/abs/1310.1394}{{\tt 1310.1394}}\relax
\relax
\bibitem{Pumplin:2002vw}
J.~Pumplin, D.~Stump, J.~Huston, H.~Lai, P.~M. Nadolsky, {\em et al.},
\newblock JHEP{} {\bf 0207},~012~(2002).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0201195}{{\tt
hep-ph/0201195}}\relax
\relax
\bibitem{Giele:1998gw}
W.~T. Giele and S.~Keller,
\newblock Phys. Rev. D{} {\bf 58},~094023~(1998).
\newblock \href{http://www.arXiv.org/abs/hep-ph/9803393}{{\tt
hep-ph/9803393}}\relax
\relax
\bibitem{Giele:2001mr}
W.~T. Giele, S.~A. Keller, and D.~A. Kosower~(2001).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0104052}{{\tt
hep-ph/0104052}}\relax
\relax
\bibitem{ApfelWeb}
{\em \mbox{ApfelWeb}}.
\newblock \url{https://apfel.mi.infn.it/}\relax
\relax
\bibitem{DurhamPlotter}
{\em \mbox{Durham PDFplotter}}.
\newblock \url{http://hepdata.cedar.ac.uk/pdf/pdf3.html}\relax
\relax
\bibitem{Brun:1997pa}
R.~Brun and F.~Rademakers,
\newblock Nucl. Instrum. Meth. A{} {\bf 389},~81~(1997)\relax
\relax
\bibitem{Jung:2004gs}
H.~Jung~(2004).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0411287}{{\tt
hep-ph/0411287}}\relax
\relax
\bibitem{Hansson:2003xz}
M.~Hansson and H.~Jung~(2003).
\newblock \href{http://www.arXiv.org/abs/hep-ph/0309009}{{\tt
hep-ph/0309009}}\relax
\relax
\bibitem{Hautmann:2013tba}
F.~Hautmann and H.~Jung,
\newblock Nuclear Physics B{} {\bf 883},~1~(2014).
\newblock \href{http://www.arXiv.org/abs/1312.7875}{{\tt 1312.7875}}\relax
\relax
\bibitem{Abdulov:2018ccp}
N.~A. Abdulov, H.~Jung, A.~V. Lipatov, G.~I. Lykasov, and M.~A. Malyshev,
\newblock Phys. Rev. D{} {\bf 98},~054010~(2018).
\newblock \href{http://www.arXiv.org/abs/1806.06739}{{\tt 1806.06739}}\relax
\relax
\bibitem{Kotikov:2019kci}
A.~V. Kotikov, A.~V. Lipatov, B.~G. Shaikhatdenov, and P.~Zhang,
\newblock JHEP{} {\bf 02},~028~(2020).
\newblock \href{http://www.arXiv.org/abs/1911.01445}{{\tt 1911.01445}}\relax
\relax
\bibitem{Jung:2021mox}
H.~Jung, S.~T. Monfared, and T.~Wening,
\newblock Physics Letters B{} {\bf 817},~136299~(2021).
\newblock \href{http://www.arXiv.org/abs/2102.01494}{{\tt 2102.01494}}\relax
\relax
\bibitem{Blanco:2019qbm}
E.~Blanco, A.~van Hameren, H.~Jung, A.~Kusina, and K.~Kutak,
\newblock Phys. Rev. D{} {\bf 100},~054023~(2019).
\newblock \href{http://www.arXiv.org/abs/1905.07331}{{\tt 1905.07331}}\relax
\relax
\bibitem{GolecBiernat:1998js}
K.~J. Golec-Biernat and M.~Wusthoff,
\newblock Phys. Rev. D{} {\bf 59},~014017~(1998).
\newblock \href{http://www.arXiv.org/abs/hep-ph/9807513}{{\tt
hep-ph/9807513}}\relax
\relax
\bibitem{Blumlein:1995mi}
J.~Blumlein,
\newblock {\em {On the $k_T$ dependent gluon density in hadrons and in the
photon}},
\newblock in {\em {'95 QCD and high-energy hadronic interactions. Proceedings,
30th Rencontres de Moriond, Moriond Particle Physics Meetings, Hadronic
Session, Le Arcs, France, March 19-25, 1995}}, pp. 191--197.
\newblock 1995.
\newblock Also in preprint \mbox{hep-ph/9506446}\relax
\relax
\bibitem{Kutak:2012rf}
K.~Kutak and S.~Sapeta,
\newblock Phys. Rev. D{} {\bf 86},~094043~(2012).
\newblock \href{http://www.arXiv.org/abs/1205.5035}{{\tt 1205.5035}}\relax
\relax
\bibitem{Kutak:2014wga}
K.~Kutak,
\newblock Phys. Rev. D{} {\bf 91},~034021~(2015).
\newblock \href{http://www.arXiv.org/abs/1409.3822}{{\tt 1409.3822}}\relax
\relax
\bibitem{Kotko:2017oxg}
P.~Kotko, K.~Kutak, S.~Sapeta, A.~M. Stasto, and M.~Strikman,
\newblock Eur. Phys. J. C{} {\bf 77},~353~(2017).
\newblock \href{http://www.arXiv.org/abs/1702.03063}{{\tt 1702.03063}}\relax
\relax
\bibitem{Echevarria:2015uaa}
M.~G. Echevarria, T.~Kasemets, P.~J. Mulders, and C.~Pisano,
\newblock JHEP{} {\bf 07},~158~(2015).
\newblock \href{http://www.arXiv.org/abs/1502.05354}{{\tt 1502.05354}}\relax
\relax
\bibitem{Bury:2017jxo}
M.~Bury, A.~van Hameren, H.~Jung, K.~Kutak, S.~Sapeta, and M.~Serino,
\newblock Eur. Phys. J. C{} {\bf 78},~137~(2018).
\newblock \href{http://www.arXiv.org/abs/1712.05932}{{\tt 1712.05932}}\relax
\relax
\bibitem{Signori:2013mda}
A.~Signori, A.~Bacchetta, M.~Radici, and G.~Schnell,
\newblock JHEP{} {\bf 1311},~194~(2013).
\newblock \href{http://www.arXiv.org/abs/1309.3507}{{\tt 1309.3507}}\relax
\relax
\bibitem{Bacchetta:2019sam}
A.~Bacchetta, V.~Bertone, C.~Bissolotti, G.~Bozzi, F.~Delcarro, F.~Piacenza,
and M.~Radici,
\newblock JHEP{} {\bf 07},~117~(2020).
\newblock \href{http://www.arXiv.org/abs/1912.07550}{{\tt 1912.07550}}\relax
\relax
\bibitem{Bacchetta:2020gko}
A.~Bacchetta, F.~Delcarro, C.~Pisano, and M.~Radici~(2020).
\newblock \href{http://www.arXiv.org/abs/2004.14278}{{\tt 2004.14278}}\relax
\relax
\bibitem{Scimemi:2019cmh}
I.~Scimemi and A.~Vladimirov~(2019).
\newblock \href{http://www.arXiv.org/abs/1912.06532}{{\tt 1912.06532}}\relax
\relax
\bibitem{Vladimirov:2019bfa}
A.~Vladimirov,
\newblock JHEP{} {\bf 10},~090~(2019).
\newblock \href{http://www.arXiv.org/abs/1907.10356}{{\tt 1907.10356}}\relax
\relax
\bibitem{Bury:2020vhj}
M.~Bury, A.~Prokudin, and A.~Vladimirov,
\newblock Phys. Rev. Lett.{} {\bf 126},~112002~(2021).
\newblock \href{http://www.arXiv.org/abs/2012.05135}{{\tt 2012.05135}}\relax
\relax
\end{mcbibliography}
\end{document}
|
\section{Introduction}\label{sec:intro}
Many natural and engineering systems can exhibit complex dynamics with a wide range of temporal and spatial features. In the analysis of these systems, a first step is to seek and extract dominant features or modes \cite{ROM_FluidFlow_Review_Taira2017,PEHERSTORFER2016196,ROM_GPR_Wan2017,ROM_LSTM_Vlachas2018}. This step typically starts with a modal decomposition of a data set of state variables of interest attained at discrete time instances from experiments or computations. The proper orthogonal decomposition (POD) is one of the most widely used techniques for accomplishing modal decomposition, which can decompose the set of data into spatially dependent POD bases and temporally dependent coefficients. The dominant POD modes can effectively capture the major dynamical evolution of the non-stationary state variables and thereby provide a means to describe a complex dynamical system in a low-dimensional form, the so-called reduced-order model (ROM).
To determine the temporal coefficient for each POD mode retained, both intrusive and non-intrusive approaches have been developed. The Galerkin projection projects the full model (usually partial differential equations (PDEs)) onto the space of truncated POD modes. Through the orthonormality and energy-optimality attributes of the POD bases, a truncated set of coupled ordinary differential equations (ODEs) is obtained, which constitutes a low-order dynamical system and governs the evolution of the temporal coefficients. By solving the ODEs, usually numerically, the temporal coefficients can be determined. Along with the spatial POD basis functions, such constructed ROM can then be used to reproduce the full-order solutions. Since the Galerkin projection requires the prior knowledge of the governing PDEs, this approach is referred to as intrusive model reduction. The quadratic nonlinearity and triadic interactions in the ODEs derived from Galerkin projection call for a computational load in the order of $\mathcal{O}(R^3)$, where $R$ is the number of POD modes retained in the ROM.
Alternative to the Galerkin projection,
nonintrusive approaches can be employed to determine the temporal modes.
For example, replace the set of ODEs with a set of hyper surfaces, which is constructed using the interpolation methods such as the Smolyak sparse grid \cite{NIROM_Smolyak_XIAO2015522} and radial basis function (RBF) \cite{ROM_PODRBF_WALTON2013,NIROM_RBF_XIAO2015}. The work in \cite{PEHERSTORFER2016196} proposed to infer the operators of the ODEs via the least squares optimization \cite{PEHERSTORFER2016196}. Wan et al. employed the Gaussian Processes to model the temporal modes \cite{ROM_GPR_Wan2017}. In addition, several efforts adopted deep learning techniques and trained a neural network model for the temporal modes in the form of the artificial \cite{ROM_Flow_ANN_Omer2019} or deep feedforward neural network \cite{ROM_Turbulent_DNN_Lui2019}, the long short-term memory (LSTM) recurrent neural network \cite{ROM_PODLSTM_Wang2018,ROM_LSTM_Vlachas2018},
or the temporal convolutional neural network \cite{ROM_Flow_Data_WU2020}. These nonintrusive approaches can effectively capture the generally nonlinear time evolution of the temporal coefficients without performing the Galerkin projection. Among them, some are limited to predictions within the database range \cite{PEHERSTORFER2016196}; and some can predict both inside and outside the database range \cite{ROM_Turbulent_DNN_Lui2019,ROM_GPR_Wan2017,ROM_LSTM_Vlachas2018}.
The non-intrusive approaches do not necessarily require the exact form of the full-order equations and hence are applicable to experimental data where the governing equations are often not well established or the associated parameters have considerable uncertainties.
The above-mentioned model order reduction methods are applicable to fixed-domain problems. For many systems with moving objects/boundaries, e.g., in fluid-solid interactions, additional care is needed to derive the ROM. The efforts reported in literature also fall into either of two categories: intrusive or nonintrusive. And those efforts mainly focus on fluid-solid interaction problems. In the intrusive category, the Navier-Stokes (NS) equations that govern the fluid flow are extended to the solid domain. The POD modes are computed for the combined fluid-solid domain. The extended NS equations are then projected via Galerkin projection onto the POD modes to yield the low-order dynamical system with extra terms related to the solid motion. Liberge and Hamdouni proposed a multiphase method similar to the fictitious domain method to extend the NS equations to the solid domain by using a penalization method and a Lagrangian multiplier \cite{ROM_OscillatingCylinder_Liberge2010}. Gao and Wei proposed to add extra body-force terms to the NS equations, similar to the immersed boundary method \cite{ROM_MovingBoundary_Gao2016,ROM_MovingBoundary_GaoPHDthesis2018}. For generally unprescribed solid motion, the additional terms contributed by the unsteady solid motion must be recomputed at each time step. The significantly increased computational cost by these terms can overshadow the benefit of reduced order modeling. To alleviate this issue, the most expensive nonlinear term was neglected in practice \cite{ROM_MovingBoundary_Gao2016}. Those intrusive approaches were validated by the tests on a rigid cylinder or sphere oscillating in a fluid \cite{ROM_OscillatingCylinder_Liberge2010,ROM_MovingBoundary_Gao2016,ROM_MovingBoundary_GaoPHDthesis2018}, and only prescribed motion was considered in \cite{ROM_MovingBoundary_Gao2016,ROM_MovingBoundary_GaoPHDthesis2018}. In the non-intrusive category, Xiao et al. \cite{NIROM_FSI_XIAO201635} proposed to employ the POD and RBF multi-dimensional interpolation to construct the ROM for fluid-solid interaction problems with a free-moving solid body in the fluid. In this work, the predictions of the ROM were examined for the time instances inside the database range.
In this paper, we present a new data-driven nonintrusive model order reduction method for dynamical systems involving moving boundaries. The dynamical systems can be generally nonlinear. The proposed method is based on the POD, Gaussian process regression (GPR) and moving least squares (MLS) interpolation. It combines three attributes that are not simultaneously satisfied in the existing reduced order modeling methods for dynamical systems with moving boundaries \cite{ROM_OscillatingCylinder_Liberge2010,ROM_MovingBoundary_Gao2016,NIROM_FSI_XIAO201635}. First, our method only needs snapshots of state variables at discrete time instances and the parameters that characterize the boundaries. Otherwise, it does not require any prior knowledge of the full-order model or the underlying governing equations for construction of the ROM. The snapshot data can be from simulations or experiments. Second, the moving boundaries are not limited to prescribed or periodic motions. Third, the ability of the ROM constructed to forecast the full-order solutions for future times beyond the range of snapshot data is studied. We provide the criteria to determine the furthest future time that the ROM constructed from a given set of data can predict. Figure \ref{fig:schematic_of_method} summarizes the main components of the proposed method.
\begin{figure}[htbp]
\centering
\includegraphics[width=12cm]{Figures/Instruction/schematic_of_method.pdf}
\caption{Schematic of the proposed data-driven nonintrusive model order reduction method for dynamical systems with moving boundaries.}
\label{fig:schematic_of_method}
\end{figure}
The paper is organized as follows. Section \ref{sec:method} explains in detail each component of the proposed method and provides algorithms for practical implementation. In Section \ref{sec:results}, we outline the results of numerical experiments, where the proposed method is assessed in several benchmark problems. We first present the benchmarks with fixed domains only and then proceed to the cases with moving boundaries. The data used to construct and validate the ROMs are from analytical/numerical solutions and experiments. Finally, we conclude in Section \ref{sec:conclu} and discuss the limitation and possible extensions of the present work.
\section{Methodology}\label{sec:method}
\input{method}
\section{Numerical experiments}\label{sec:results}
\input{results}
\section{Conclusion}\label{sec:conclu}
We have presented a model order reduction method for dynamical systems with moving boundaries, which draws on the POD, GPR, and MLS interpolation. The method is nonintrusive and applicable to experimental data. Given a set of snapshot data of state variables at discrete time instances, the reduced space is constructed via the POD. The time-evolution of the temporal POD coefficients and the parameters characterizing the moving boundaries is inferred from the data via the GPR. The cost of GPR would not increase due to the nonlinearity of the system. The errors in the ROM's prediction for the regions near the moving boundaries on the downstream side can be effectively reduced using the correction method based on the MLS interpolation. For a given set of snapshot data, the ROM constructed from the data can predict the full-order solution at a desired time inside or outside the dataset range. The forecast beyond the range of snapshot data is constrained by the POD and GPR as well as how many snapshot data are available. To avoid a trial-and-error approach, we have provided the criteria for \textit{a priori} determination of the furthest forecast time permitted in time extrapolation of the ROM. We have demonstrated the accuracy and efficiency of the proposed method in several benchmark problems, where the snapshot data used to construct and validate the ROMs were generated from analytical solutions, results of numerical simulations, and experimental data.
When numerical simulations or experimental measurements are demanding or expensive, reduced order modeling provides an attractive alternative means to predict the full-order solutions. In practice, numerical simulations/experimental measurements and ROMs can be adaptively combined to achieve an efficient long-time prediction for a dynamical system. With the furthest forecast time of the ROM determined \textit{a priori} by the proposed criteria, the numerical simulations/experimental measurements and ROMs can be alternatively called in an automated process. We note that the ``equation-free" approach \cite{EquationFree_Kevrekidis,EquationFreeReview_Kevrekidis} proposed by Kevrekidis and collaborators for multiscale modeling also couples two levels of predictions ``on-the-fly": microscopic simulations and macroscopic models. In particular, it extrapolates ensemble-averaged macroscale quantities obtained from the microscopic simulations. The extrapolation is through a projective integrator that advances the macro variable over a macro time step with the time derivative of the macro variable computed from the results of the last few steps of the microscale simulations using small time steps. The ``equation-free" approach requires time-scale separation, i.e., the local relaxation time for the microscopic process is much smaller than the time scale for the macroscopic evolution of the system. The approach proposed in the present work uses Gaussian process regression for time extrapolation and does not require time-scale separation.
The slowly decaying Kolmogorov $n$-width is a major factor limiting the furthest forecast time of the ROM, which results from the fact that POD restricts the state to evolve in a linear subspace. To address this $n$-width limitation of linear subspaces, Lee and Carlberg proposed to construct ROMs in nonlinear manifolds that are computed based on convolutional autoencoders from deep learning \cite{Nonlinearbasis_LEE2020}. The ROM constructed by this method was shown significantly outperforming the linear-subspace ROM when forecast the full-order solution at a future time for advection-dominated Burgers equation. Thus, it may be worthwhile in a future work to consider replacing the linear spatial bases by nonlinear manifolds in our method to achieve a longer forecast time for the ROM.
Our method can be potentially extended to construct ROMs to predict the full-order solutions for different parameters/inputs. Suppose $u(\mathbf{x},t;\boldsymbol{\eta})$ is the full-order solution for a parameterized dynamical system, where
$\boldsymbol{\eta} \in \mathcal{P}$ denotes the parameter, and $\mathcal{P} \subset \mathbb{R}^d$ is the parameter space. The full-order solutions $u(\mathbf{x},t_i;\boldsymbol\eta_j)$ at sampled parameters $\boldsymbol\eta_j \in \mathcal{P}_S \subset \mathcal{P}$ ($j=1, 2, \dots, M_{\boldsymbol \eta}$) and time instances $t_i$ ($i=1, 2, \dots, M_t$) are available to form the snapshot dataset. We aim to predict the solution $u(\mathbf{x},t';\boldsymbol \eta^*)$ at $t'$ for a new parameter $\boldsymbol \eta^* \notin \mathcal{P}_S$. For this type of problems, the coefficients of POD modes become $a_k(t,\boldsymbol\eta)\in \mathbb{R}$. Thus, a multivariate Gaussian process model for each $a_k(t,\boldsymbol\eta)$ needs to be constructed from the snapshot data with the training input $\mathbf{z} = (t,\boldsymbol\eta) \in \mathbb{R}^{d+1}$. The multivariate Gaussian process model constructed is then used to predict the POD coefficient $a_k(t',\boldsymbol \eta^*)$ at $t'$ and $\boldsymbol \eta^*$. Finally, the full-order solution can be predicted by: $u(\mathbf{x},t';\boldsymbol \eta^*)\approx \bar u ({{\mathbf x}}) + \sum\limits_{k = 1}^R a_k(t',\boldsymbol \eta^*)\phi_k({{\mathbf x}})$ with $\bar u ({{\mathbf x}}) = \frac{1}{M_t M_{\boldsymbol \eta}} \sum\limits_{j=1}^{M_{\boldsymbol \eta}} \sum\limits_{i=1}^{M_t} u(\mathbf{x},t_i;\boldsymbol \eta_j)$. Detailed error analysis, criteria, and application to parameterized dynamical systems with moving boundaries will be investigated in our future work.
\section*{Acknowledgements}
This material is based upon work supported by the National Science Foundation under Grant No. CMMI-1761068.
We gratefully acknowledge Dr. Christian Franck and Dr. Jin Yang in the Department of Mechanical Engineering at the University of Wisconsin-Madison for insightful discussions and providing us the experimental data in \S\ref{subsec:2DExp} and \S\ref{subsec:buble_cavity}. The authors also thank the two anonymous reviewers for their insightful comments and suggestions that helped improve the manuscript.
\bibliographystyle{elsarticle-num}
\subsection{POD}\label{subsubsec:POD}
POD starts from the snapshot data of the full-order solutions of the dynamical system, which can be obtained from either numerical simulations or experimental measurements. The snapshot data correspond to $u({{\mathbf x}},t_i)$ at $M$ time instances with $t_i \in \{t_1, t_2, \dots, t_M\}$. Any $u({{\mathbf x}},t_i)$ may be decomposed into
\begin{equation}
u({{\mathbf x}},t_i) = \bar u ({{\mathbf x}}) + \hat u({{\mathbf x}},t_i),\ \ \bar u ({{\mathbf x}}) = \frac{1}{M} \sum\limits_{i = 1}^M u({{\mathbf x}},t_i) \;,
\end{equation}
where $\bar u$ is the temporal mean of snapshot data and $\hat u$ is the fluctuating part. The task is to find a set of spatial bases $\phi_k({\mathbf x})$ and temporal coefficients $a_k(t)$ such that the fluctuating part $\hat u$ can be reproduced as:
\begin{equation}
\hat u({{\mathbf x}},t)=\sum\limits_{k = 1}^M a_k(t)\phi_k({{\mathbf x}}).
\label{equ:hatu_decomp}
\end{equation}
To this end, the correlation matrix $\textbf{A}\in \mathbb{R}^{M\times M}$ of the fluctuating parts of snapshot data is constructed by:
\begin{equation}
{A_{ij}} = \int_\Omega {{{\hat u}}({{\mathbf x}},t_i){{\hat u}}({{\mathbf x}},t_j)d{{\mathbf x}}},
\end{equation}
where $i$ and $j$ refer to the $i$th and $j$th snapshots, respectively. By definition, $\textbf{A}$ is symmetric and semi-positive definite.
Thus, the set of spatial bases $\phi_k({\mathbf x})$ (i.e., POD basis function) can be obtained via eigendecomposition of $\textbf{A}$:
\begin{equation}\label{equ:phi_k}
{\phi _k}({{\mathbf x}}) = \frac{1}{{\sqrt {{\lambda _k}} }}\sum\limits_{i = 1}^M {w_i^k\hat u({{\mathbf x}},{t_i})} \;,
\end{equation}
where $\{\lambda_1, \lambda_2, ..., \lambda_M\}$ are eigenvalues in descending order and $\mathbf{w}^k$ is the eigenvector corresponding to $\lambda_k$. The POD basis functions satisfy the condition of orthogonality:
\begin{equation}
({\phi _k},{\phi _l}) = \left\{ \begin{array}{l}
1,\ \ k = l\\
0,\ \ k \ne l
\end{array} \right.,
\end{equation}
where $({\phi _k},{\phi _l})=\int_\Omega {\phi_k({{\mathbf x}})\phi_l({{\mathbf x}})d{{\mathbf x}}}$ defines the inner-product of two functions.
For model order reduction, only the first $R\ll M$ largest eigenvectors (or POD modes) are retained. As a result, a snapshot $\hat u({{\mathbf x}},{t_i})$ can be approximated as: \begin{equation}\label{equ:POD_ti}
\hat u({{\mathbf x}},{t_i}) \approx \hat u^{POD}({{\mathbf x}},{t_i}) = \sum\limits_{k = 1}^R \sqrt {{\lambda _k}}{w_k^i}{\phi_k}({{\mathbf x}})
\end{equation}
with the following truncation error:
\begin{equation}\label{equ:POD_truncation_error}
\epsilon^\text{POD} = \frac{1}{M}\sum\limits_{i=1}^M \left \|\hat u({{\mathbf x}},{t_i})-\hat u^{POD}({{\mathbf x}},{t_i}) \right \|_{L_2} = \frac{1}{M}\sum\limits_{i=1}^M \left \| \sum\limits_{k=R+1}^{M} {\sqrt {{\lambda_k}}{w_k^i}{\phi _k}({{\mathbf x}})} \right \|_{L_2} = \sqrt{\sum\limits_{k=R+1}^M \lambda_k} \; .
\end{equation}
By increasing $R$, i.e., by keeping more POD modes, the truncation error of POD ($\epsilon^\text{POD}$) can be reduced. Given Eq. \eqref{equ:POD_ti}, Eq. \eqref{equ:hatu_decomp} can be truncated to $R$ dominant POD modes as:
\begin{equation}
\hat u({{\mathbf x}},t) \approx \sum\limits_{k = 1}^R a_k(t)\phi_k({{\mathbf x}})\; .
\end{equation}
Define the relative root mean square (RRMS) truncation error as:
\begin{equation}
RRMS \ \ Error = \sqrt{ \frac{\sum\limits_{k=R+1}^M \lambda _k}{\sum\limits_{k=1}^M \lambda_k} } \;.
\end{equation}
By requiring $ RRMS \ \ Error < \alpha^\text{POD} $ with $\alpha^\text{POD}$ the preset threshold, we can determine how many dominant POD modes ($R$) to retain.
Once the spatial POD bases $\phi_k({\mathbf x})$ are determined from Eq. \eqref{equ:phi_k}, the next task is to construct the temporal coefficients $a_k(t)$ such that the full-order solution can be effectively reproduced at a given time $t'$ either within or beyond the database range:
\begin{equation}\label{equ:ROM_POD}
u({{\mathbf x}},{t'}) = \bar u ({{\mathbf x}}) + \hat u({{\mathbf x}},t') \approx u^\text{ROM}({{\mathbf x}},t')= \bar u ({{\mathbf x}}) + \sum\limits_{k = 1}^R a_k(t')\phi_k({{\mathbf x}}) ~~~~\text {for}~ {\mathbf x} \in \Omega_f~~ \text{and}~~ t' \in [t_1,t_M]~~ \text{or}~~ t'>t_M \; .
\end{equation}
Eq. \eqref{equ:ROM_POD} is hence the ROM constructed via POD.
\subsection{Classical intrusive model order reduction based on Galerkin Projection}\label{subsec:Galerkin}
In this section, we review the classical, intrusive approach to determine the temporal coefficients $a_k(t)$ based on the Galerkin projection. Assume the dynamical system of interest can be described by the following full-order model:
\begin{equation}
\dot{u}(\textbf{x},t) = \mathcal{F}(u)\; ,
\label{equ:full_order}
\end{equation}
where $\mathcal{F}$ denotes general operators, e.g., spatial differential operators.
To determine $a_k(t)$, the idea of Galerkin projection is to project the original full-order model (Eq. \eqref{equ:full_order}) onto the POD manifold, by which and noting the orthogonality of POD basis functions a set of ordinary differential equations (ODEs) of $a_k(t)$ can be derived as:
\begin{equation}\label{equ:Galerkin_proj}
\dot{a}_k(t) = (\mathcal{F}(u), \phi_k), \ \ \ \ k=1,2,...,R \;.
\end{equation}
To close the above ODEs, the initial conditions can be given using the following projection:
\begin{equation}
{a_k}(t = 0) = (u(\mathbf x,t = 0) - \bar u(x),{\phi _k}).
\end{equation}
Hence, to solve for $a_k(t)$, one needs to evaluate the inner product in the right hand side of Eq. \eqref{equ:Galerkin_proj}, which requires the knowledge of $\mathcal{F}$. If $\mathcal{F}$ is not attainable for ``black-box" problems, e.g., for experimental data, the Galerkin projection is not feasible. For problems with moving boundaries, even if $\mathcal{F}$ is known, it needs to include the contributions from the moving boundaries, and hence evaluating the inner product $(\mathcal{F}(u), \phi_k)$ demands expensive computation. For example, in fluid-solid interactions, the NS equations that govern the fluid flow are augmented with extra body-force terms to account for the coupling of fluid flow and solid motion \cite{ROM_MovingBoundary_Gao2016,ROM_MovingBoundary_GaoPHDthesis2018}. For generally unsteady solid motion, the contributions of these extra terms in the inner product $(\mathcal{F}(u), \phi_k)$ must be recomputed at each time step, which significantly increases the computational cost of the ROM. In addition, the ODEs in Eq. \eqref{equ:Galerkin_proj} usually must be numerically solved. Thus, the temporal integrator and time step size must be chosen properly for the desired accuracy and stability.
\subsection{Gaussian process-enabled nonintrusive model order reduction}\label{subsec:Gaussian_ROM}
In this paper, we propose a Gaussian process-enabled nonintrusive model order reduction method. Different from the Galerkin projection discussed in \S \ref{subsec:Galerkin}, the proposed method does not rely on any prior knowledge of the full-model operator and is well suited for black-box problems or the problems requiring nontrivial evaluation and solution of Eq. \eqref{equ:Galerkin_proj}. For each temporal coefficient $a_k(t)$, we infer a Gaussian process model from the dataset $a_k(t_i)$ for $i=1,\dots, M$. The obtained Gaussian process model is then employed to predict $a_k(t’)$ at a given time $t'$, where $t'>t_1$ can be within ($t'<t_M$) or beyond ($t'>t_M$) the dataset range. We provide the criteria to determine the furthest time extrapolation permitted in this method. Once $a_k(t’)$ is predicted, the full-order solution can be reconstructed from Eq. \eqref{equ:ROM_POD}.
\subsubsection{Inference of temporal coefficients via Gaussian process}\label{subsubsec:Gaussian}
Consider the data set $\mathbf{t} =[t_1,...,t_M]^T$ as the training inputs and $\mathbf{t}'=[t'_1,t'_2,...,t'_N]^T$ as the inputs for prediction. For each $k=1,2,...,R$, the training outputs are $\mathbf{y} =[a_k(t_1),a_k(t_2),...,a_k(t_M)]^T$, and the predicted outputs are $\mathbf{y}'=[a_k(t'_1),a_k(t'_2),...,a_k(t'_{N})]^T$. The Gaussian process model is given by:
$\mathbf{y} (\mathbf{t} ) \sim \mathcal{GP}(\boldsymbol{\mu}(\mathbf{t} ),\mathbf{C} (\mathbf{t} ,\mathbf{t} '))$
, where $\boldsymbol{\mu}(\mathbf{t})$ is the mean function and $\mathbf{C} (\mathbf{t} ,\mathbf{t}')$ is the covariance function. To predict $\mathbf{y}'$, the key is to determine the posterior distribution $p(\mathbf{y'}|\mathbf{y} )$. Since the joint distribution of the training outputs $\mathbf{y} $ and the predicted outputs $\mathbf{y}'$ satisfy:
\begin{equation}
\begin{bmatrix}
\mathbf{y} \\
\mathbf{y}'
\end{bmatrix}
\sim \mathcal{N}
\begin{pmatrix}
\begin{bmatrix}
\boldsymbol{\mu}(\mathbf{t} )\\
\boldsymbol{\mu}(\mathbf{t}')
\end{bmatrix},
\begin{bmatrix}
\mathbf{C} (\mathbf{t} ,\mathbf{t} )+\sigma^2 \mathbf{I} &\mathbf{C} (\mathbf{t}',\mathbf{t} )^T \\
\mathbf{C} (\mathbf{t}',\mathbf{t} ) & \mathbf{C} (\mathbf{t}',\mathbf{t}')
\end{bmatrix}
\end{pmatrix} \; ,
\end{equation}
where $\sigma^2$ is the variance of identically independent normally distributed noise (with zero mean) assumed in the Gaussian process model,
the posterior distribution can be determined as:
\begin{equation}
p(\mathbf{y'}|\mathbf{y} )=\mathcal{N}(\hat{\boldsymbol{\mu}},\hat{\mathbf{C} }),
\end{equation}
where
\begin{equation}\label{equ:posterior_muC}
\begin{split}
\hat{\boldsymbol{\mu}}&=\mathbf{C} (\mathbf{t'},\mathbf{t} )\left [\mathbf{C} (\mathbf{t} ,\mathbf{t}) +\sigma^2\mathbf{I}\right]^{-1}\left [\mathbf{y} -\boldsymbol{\mu}(\mathbf{t} )\right ]+\boldsymbol{\mu}(\mathbf{t'}),\\
\hat{\mathbf{C} }&=\mathbf{C} (\mathbf{t'},\mathbf{t'})-\mathbf{C} (\mathbf{t'},\mathbf{t} )\left [\mathbf{C} (\mathbf{t} ,\mathbf{t} )+\sigma^2\mathbf{I}\right]^{-1}\mathbf{C} (\mathbf{t'},\mathbf{t} )^T.
\end{split}
\end{equation}
In this work, the covariance function $\mathbf{C} (\mathbf{t} ,\mathbf{t} ')$ is assumed a squared exponential form, i.e.,
\begin{equation}
C_{ij}(t_i,t'_j;\boldsymbol{\theta})=\theta_f^2 \exp \left [-\frac{1}{2} \theta_l^2(t_i-t'_j)^2 \right ],
\end{equation}
where $\boldsymbol{\theta} = (\theta_f, \theta_l)$ denotes the hyper-parameters. To determine the hyper-parameters $\boldsymbol{\theta}$ as well as $\sigma^2$ in Eq. \eqref{equ:posterior_muC}, we minimize the negative log marginal likelihood \cite{GPML_2006}:
\begin{equation}\label{equ:marginal_likelihood}
-\log p(\mathbf{y} |\boldsymbol{\theta}, \sigma^2)=\frac{1}{2}\mathbf{y} ^T\mathbf{\mathcal{C}}^{-1} \mathbf{y} +\frac{1}{2} \log |\mathbf{\mathcal{C}} | + \frac{M}{2} \log (2\pi) \; ,
\end{equation}
where $\mathbf{\mathcal{C}} = \mathbf{C} (\mathbf{t} ,\mathbf{t})+\sigma^2\mathbf{I}$, via the Quasi-Newton optimizer L-BFGS \cite{BFGS_1989Liu}. Here, $M$ is the total number of training data; and $|\mathbf{\mathcal{C}}|$ is the determinant of matrix $\mathbf{\mathcal{C}}$. The marginal likelihood as in Eq. \eqref{equ:marginal_likelihood} is chosen because it entails a trade-off between data-fit and model complexity: while the term $ \frac{1}{2}\mathbf{y} ^T\mathbf{\mathcal{C}} \mathbf{y} $ targets better fitting the training data, the term $\log |\mathbf{\mathcal{C}}|$ penalizes the model complexity. A key advantage of GPR is that uncertainty bounds can be analytically derived from the hyper-parameters.
The method proposed herein is different from that in \cite{ROM_GPR_Wan2017}, where the time derivative $\dot{a_k}=f(a_1,\dots,a_R)$ is modeled as a Gaussian process, instead of $a_k(t)$ as in this work. To obtain an accurate model for the time derivative, it requires to approximate the time derivative by a numerical integrator of high-order accuracy in the training process. To predict $a_k(t'>t_M)$ from the trained model of $\dot{a_k}$, it needs to march from $a_k(t_M)$ by the increment of $\delta t$ (time step size) each time and finally reaches $t'$. Also, compared with training a model for $a_k(t)$, it needs more training data. In addition, if the data are noisy, e.g., from experimental measurements, training an accurate model for the time derivative can be challenging. Due to these considerations, we choose to model $a_k(t)$ itself as a Gaussian process.
\subsubsection{Criteria for furthest forecast time}\label{subsubsec:criteria_t*}
In this section, we propose two criteria to determine the furthest time extrapolation that the ROM can achieve. Since the ROM is constructed via POD and GPR, each of them poses a constraint on the time extrapolation.
To forecast the solution at $t'>t_M$, the same POD subspace is assumed, which is constructed by the dominant spatial bases extracted from the snapshot data. The error arising from this assumption constrains the time extrapolation of the ROM. While in some cases, the dominant POD bases vary slowly in time, e.g., flow dynamics at low Reynolds numbers described by the Burgers equation; in other cases, they can change rapidly, e.g., shock wave and advection problems. Theoretically, the decay rate of Kolmogorov $n$-width \cite{nwidth_Kolmogoroff1936,nwidth_Pinkus1986} can measure how fast the POD spatial bases change in time for a dynamical system. The Kolmogorov $n$-width is defined as \cite{decay_of_Kol_2019}:
\begin{equation}
\label{equ:Kol_width}
d_n(\mathcal{M})= \inf_{\mathcal{S}_n} \sup_{u \in \mathcal{M}} \min_{v \in \mathcal{S}_n} || u-v || \; ,
\end{equation}
where $\mathcal{M}$ is the manifold of the full-order solutions over the entire time considered, including the snapshot data; $\mathcal{S}_n$ denotes $n$-dimensional linear subspaces constructed from the snapshot data; $u$ is a full-order solution in $\mathcal{M}$; and $v$ represents a reduced-order solution in $\mathcal{S}_n$. In the context of this paper, $\mathcal{S}_n$ refers to the subspaces formed by the first $R$ POD spatial bases. The Kolmogorov $n$-width as in Eq. \eqref{equ:Kol_width} provides the worst-case error resulting from a projection onto the best-possible linear subspace of a given dimension $n$ \cite{decay_of_Kol_2019}.
If the Kolmogorov $n$-width decays faster with respect to $n$, the reduced-order solution in the subspace constructed by the first $R$ POD bases can be an accurate approximation of the full-order solution for longer time beyond the range of snapshot data.
In practice, a direct evaluation of the Kolmogorov $n$-width and its decay rate is difficult. In this paper, we instead estimate the decay rate of dominant eigenvalues, i.e., $\frac{\ln {\lambda_2}-\ln{\lambda_{R+2}}}{R}$. Note that $\lambda_2$ dominates the POD truncation error if only the first POD mode is retained in the ROM; $\lambda_{R+2}$ dominates the POD truncation error if the first $R+1$ modes are retained in the ROM. We employ this decay rate of dominant eigenvalues to characterize how fast the POD spatial bases change in time for a dynamical system. Based on that,
we propose the following constraint posed by POD on the furthest forecast time of the ROM:
\begin{equation}
\label{equ:Predict_POD_limit}
\frac{\Delta t_{\text{POD}}^*}{\Delta t_{\text{Snapshots}}} \le \beta^{\text{POD}} \frac{\ln {\lambda_2}-\ln{\lambda_{R+2}}}{R},
\end{equation}
where $\Delta t_{\text{snapshots}}=t_M-t_1$ denotes the time span of snapshot data; $\Delta t^*_{\text{POD}} = t_{\text{POD}}^*-t_M$ defines how long the furthest forecast time $t_{\text{POD}}^*$ is beyond $t_M$ (the latest time of snapshot data); and $\beta^{\text{POD}} < 1$ is a non-dimensional constant related to the tolerance for the error induced by the change of POD spatial bases.
Eq. \eqref{equ:Predict_POD_limit} provides the criterion to determine the furthest forecast time $t^*_\text{POD}$ permitted in time extrapolation using the dominant POD spatial bases extracted from the $M$ snapshot data.
Note that although the eigenvalues can be over/under-estimated by picking different snapshots in a fixed range, the decay rate of eigenvalues has little change if we pick different snapshots in the same range. Thus, the criterion in Eq. \eqref{equ:Predict_POD_limit} does not require snapshots to be uniformly sampled.
The second criterion is from the uncertainty level of GPR for predicting each $a_k$ at a given time $t'$. The standard deviation (or uncertainty level) $\hat \sigma_k (t')$ grows when the forecast time $t'$ is further from the snapshot data, and hence it poses a constraint on the furthest forecast time $t_{\text{GPR},a}^*$ permitted by GPR. Considering each temporal mode $a_k$ contributes differently in the total energy of the dynamical system, the weighted average of standard deviation is defined to measure the uncertainty level:
\begin{equation}\label{equ:weighted_sd}
\hat \sigma (t') = \frac{\sum_{k=1}^{R}\lambda_k \hat \sigma_k(t')}{\sum_{k=1}^{M}\lambda_k}.
\end{equation}
And based on that, we propose the following constraint posed by GPR on the furthest forecast time of the ROM:
\begin{equation} \label{equ:Gaussian_presetToL}
\frac{\sum_{k=1}^{R}\lambda_k \hat \sigma_k(t_{\text{GPR},a}^*) }{\sum_{k=1}^{R} \lambda_k |\hat {\mu}_k(t_{\text{GPR},a}^*) |} \le \beta^{\text{GPR},a}
\end{equation}
where $\beta^{\text{GPR},a}$ denotes the preset tolerance. Larger $\beta^{\text{GPR},a}$ means larger tolerance for the uncertainty associated in GPR. From Eq. \eqref{equ:Gaussian_presetToL}, the furthest forecast time permitted in time extrapolation by GPR, $t_{\text{GPR},a}^*$, can be adaptively determined according to the preset tolerance.
\subsubsection{Algorithm for Gaussian process-enabled nonintrusive model order reduction}\label{subsubsec:algorithm_ROMGaussian}
The procedure of the proposed nonintrusive model order reduction method based on the POD and GPR is summarized in Algorithm 1.
\begin{algorithm}
\caption{Gaussian process-enabled nonintrusive model order reduction}
\label{algorithm1}
\begin{algorithmic}[1]
\Require
$M$ snapshot data of $u({{\mathbf x}},t_i)$, $i=1,2,...,M$
\Ensure
$u({{\mathbf x}},t^*)$ predicted at $t^* > t_M $
\State Determine $R$ dominant POD spatial bases $\phi_k({{\mathbf x}})$, $k=1,2,...,R$, with $RRMS Error < \alpha^{\text{POD}}$
\State Project $u({{\mathbf x}},t_i)$ to the reduced space and obtain $a_k(t) = (\hat u({{\mathbf x}},t),\phi_k({{\mathbf x}}))$
\State Determine the furthest forecast time permitted by the POD, $t_{\text{POD}}^*$, from Eq. \eqref{equ:Predict_POD_limit}
\For {$k=1,2,...,R$}
\State Infer a Gaussian Process model for $a_k(t)$ following \S \ref{subsubsec:Gaussian}
\State Determine the furthest forecast time permitted by the GPR, $t_{\mathrm{GPR},a}^*$, from Eq. \eqref{equ:Gaussian_presetToL}
\EndFor
\State Determine the final furthest forecast time as $t^* = \min \{ t_\text{POD}^*, t_{\mathrm{GPR},a}^*\}$
\State Predict each $a_k(t^*)$ by the inferred Gaussian Process models
\State Reconstruct the full-order solution $u({{\mathbf x}},t^*)$ by Eq. \eqref{equ:ROM_POD}
\State \Return $u({{\mathbf x}},t^*)$
\end{algorithmic}
\end{algorithm}
When the numerical simulations or experimental measurements are demanding or expensive for a dynamical system, one can employ the ROM to forecast the full-order solutions at future times beyond the database range. As we have discussed in \S\ref{subsubsec:criteria_t*}, the furthest forecast time is constrained by the POD and GPR. Thus, after the furthest forecast time of the ROM is reached, the consecutive prediction would still need numerical simulations or experimental measurements. Thus, for long-time prediction of a dynamical system, the numerical simulations/experimental measurements and the ROM can be called alternatively in an automated process:
\begin{enumerate}
\item Generate $M$ snapshot data using numerical simulations/experimental measurements.
\item Construct a ROM from the snapshot data and determine the furthest forecast time $t^*$ by the proposed criteria.
\item Call the ROM to predict the full-order solutions at any desired times until $t=t^*$. The full-order solution at $t^*$ is taken as the initial condition for the consecutive numerical simulations/experimental measurements.
\item Repeat Steps 1-3 until the target prediction time.
\end{enumerate}
This process adaptively combines numerical simulations/experimental measurements with ROMs and hence optimizes the efficiency for long-time prediction of a dynamical system.
\subsection{Nonintrusive model order reduction for problems with moving boundaries}\label{subsec:MB_Gaussian_correction}
In the presence of time-evolving boundaries $\Gamma_m(t)$, reproducing the full-order solution from Eq. \eqref{equ:ROM_POD} needs additional efforts. First, the snapshot data are also needed in $\Omega_m$. Thus, we need to assign the values of $\hat u({{\mathbf x}},t_i)$ for ${\mathbf x} \in \Omega_m$ and $t_i \in \{ t_1, t_2, \dots, t_M\}$. If a moving solid body is involved (in fluid-solid interaction), the values of the velocity in $\Omega_m$ coincide with the motion of the solid body; and the values of the pressure in $\Omega_m$ are assigned via interpolation of the surrounding fluid pressure in $\Omega_f$. If a cavity is involved,
the values of the state variable in $\Omega_m$ are extrapolated by least squares from the values in $\Omega_f$ near the cavity. With the snapshot data given in both $\Omega_f$ and $\Omega_m$, the POD can be conducted for the entire domain $\Omega_f \cup \Omega_m$.
\subsubsection{Inference of the time-evolution of moving boundaries}\label{subsubsec:infer_MB}
The next task is to infer the time-evolution of the moving boundaries given a set of trajectory data. We assume the evolution of a moving boundary can be fully determined by a finite set of parameters, for example, the radius of a spherical surface (see \S \ref{subsec:buble_cavity}) or the translational and rotational displacements and velocities of the center of mass of a rigid solid body (see \S \ref{subsec:FSI}). Without loss of generality, we denote the parameters that fully characterize a time-evolving boundary $\Gamma_m(t)$ as $\boldsymbol{\gamma} (t)=[\gamma_1(t), \gamma_2(t), \dots]$.
For each $\gamma_l(t)$, we seek a Gaussian process model using $\bm{t} =[t_1,...,t_M]^T$ as the training inputs and $[\gamma_l(t_1),\gamma_l(t_2),...,\gamma_l(t_M)]^T$ as the training outputs. By the constructed Gaussian process model, we predict $\gamma_l(\mathbf{t'})$ at a future time series $\mathbf{t'}>t_M$. We consider a Gaussian process model ${\gamma_l}(\mathbf{t} ) \sim \mathcal{GP}(\boldsymbol{\mu}^{\gamma_l}(\mathbf{t} ),\mathbf{C} ^{\gamma_l}(\mathbf{t} ,\mathbf{t}'))$, where $\boldsymbol{\mu}^{\gamma_l}(\mathbf{t} )$ is the mean function and $\mathbf{C} ^{\gamma_l}(\mathbf{t} ,\mathbf{t}')$ is the covariance function. The procedure to construct this Gaussian process model is the same as described in \S\ref{subsubsec:Gaussian}. The furthest forecast time for $\Gamma_m(t)$ is determined by $t_\mathrm{GPR,{\Gamma_m}}^* = \min \{ t_\mathrm{GPR,{\gamma_1}}^*, t_\mathrm{GPR,{\gamma_2}}^*, \dots \}$. And each $t_\mathrm{GPR,{\gamma_l}}^*$ for $\gamma_l(t)$ is determined from:
\begin{equation}
\label{equ:predict_boudary_limit}
\frac{ \hat \sigma^{\gamma_l}(t_{\mathrm{GPR,\gamma_l}}^*) }{|\hat {\mu}^{\gamma_l}(t_{\mathrm{GPR,\gamma_l}}^*) |} \le \beta^{\mathrm{GPR},\Gamma_m}\; ,
\end{equation}
where $\beta^{\mathrm{GPR},\Gamma_m}$ is the preset tolerance.
\subsubsection{Correction near the moving boundaries} \label{subsubsec:correction_MB}
We note that when reproducing the full-order solution in $\Omega_f$ at a future time $t'>t_M$, the largest errors appear in the regions near the moving boundaries on the downstream side.
The large errors stem from the fact that those regions were part of $\Omega_m$ but not in $\Omega_f$ during $[t_1, t_M]$, and the gradient of the solution (e.g., velocity gradient) is discontinuous across $\Gamma_m$. Thus, we propose a correction step to recover the accuracy of the prediction for those regions. In particular, the correction is achieved via high-order interpolation from their neighbor regions using the MLS \cite{Wendland_Book2005}.
More specifically, consider a point ${\mathbf x}_p \in \Omega_m ~\text{during}~ [t_1, t_M] ~\text{but}~\in \Omega_f ~\text{at}~ t>t_M$, a kernel length $h$ is set to search the neighbor points ${\mathbf x}_q$ satisfying $\|{\mathbf x}_q-{\mathbf x}_p \| < h$ and ${\mathbf x}_q \in \Omega_f$ during $[t_1,t^*]$. Here, the furthest forecast time $t^*$ is determined by $t^* = \min \{ t_\text{POD}^*, t_{\text{GPR},a}^*, t_{\text{GPR},{\Gamma_m}}^*\}$. A polynomial $u_h({\mathbf x})=\textbf{P}^\intercal({\bf x}) \textbf{c}^*$ of order $s$ is sought to approximate $u$ at ${\mathbf x}_p$, where $\textbf{P}({\mathbf x})$ denotes the polynomial basis. The coefficient vector $\mathbf{c}^*$ is determined by minimizing the following weighted residual functional:
\begin{equation}\label{equ:MLS_min}
\textbf{c}^*_p = \argmin \limits_{\textbf{c}_p} \sum_q \left[ u({\mathbf x}_q) - \textbf{P}^\intercal({\mathbf x}_q)\textbf{c}_p \right]^2 W_{pq} \;,
\end{equation}
where $q \in \mathbb{N}_{h,p} = \left\{ {\mathbf x}_q~ \text{s.t.}~ \|{\mathbf x}_q-{\mathbf x}_p \| < h, {\mathbf x}_q \in \Omega_f ~\text{during}~ [t_1,t^*]\right\}$ and $W_{pq}=W(\|{\mathbf x}_q-{\mathbf x}_p \|)$ with $W$ a positive function with the compact support $h$. The choice of $h$ is determined by the polynomial order $s$ to ensure necessarily sufficient neighbor points ${\mathbf x}_q$ to solve Eq. \eqref{equ:MLS_min}. Due to its polynomial consistency, the MLS interpolation can achieve high-order accuracy by taking large $s$, e.g., $s=3$ used in this work. Following standard arguments for the minimization of a symmetric positive definite quadratic form, the solution of Eq. \eqref{equ:MLS_min} is given by:
\begin{equation}
\mathbf{c}^*_p= \left(\sum_{j \in \mathbb{N}_{h,p}} \textbf{P}_p({\mathbf x}_j) W_{pj} \textbf{P}_p^\intercal({\bf x}_j)\right)^{-1} \left( \sum_{q \in \mathbb{N}_{h,p}} \textbf{P}_p({\mathbf x}_q) W_{pq} u({\mathbf x}_q) \right)\; .
\label{equ:MLS_approx}
\end{equation}
The solution reproduced from the ROM (Eq. \eqref{equ:ROM_POD}) at ${\mathbf x}_p$ is then replaced with the interpolated value, i.e., $u({\mathbf x}_p)\approx u_h({\mathbf x}_p) = \textbf{P}_p^\intercal({\mathbf x}_p) \mathbf{c}^*_p$. By such, we improve the the accuracy of the ROM's predictions for the regions that fall in $\Omega_f$ at $t>t_M$ but belong to $\Omega_m$ during $[t_1, t_M]$.
\subsubsection{Algorithm} \label{subsubsec:algorithm_ROMMB}
Algorithm \ref{algorithm2} outlines the procedure of the proposed nonintrusive model order reduction method for problems with moving boundaries, which augments Algorithm 1 with the steps to infer the time evolution of the moving boundaries and to correct the solutions for the regions in $\Omega_f$ at $t^*>t_M$ but in $\Omega_m$ during $[t_1, t_M]$.
\begin{algorithm}[H]
\caption{Nonintrusive model order reduction for problems with moving boundaries}\label{algorithm2}
\begin{algorithmic}[1]
\Require
$M$ snapshot data of $u({{\mathbf x}},t_i)$ and $\gamma_l(t_i)$ with $i=1,2,\dots,M$ and $l = 1,2,\dots$
\Ensure
$u({{\mathbf x}},t^*)$ and $\gamma_l(t^*)$ predicted at $t^*$
\For {$l=1,2,\dots$}
\State Infer a Gaussian Process model for $\gamma_l(t)$ following \S \ref{subsubsec:infer_MB}
\State Determine $t_{\mathrm{GPR,\gamma_l}}^*$ by Eq. \eqref{equ:predict_boudary_limit}
\EndFor
\State Determine the furthest forecast time permitted for $\Gamma_m$ as $t_\mathrm{GPR,{\Gamma_m}}^* = \min \{ t_\mathrm{GPR,{\gamma_1}}^*, t_\mathrm{GPR,{\gamma_2}}^*,\dots \}$
\State Generate snapshot data for $\mathbf{x} \in \Omega_m(t)$, $t \in [t_1, t_M]$
\State Determine $R$ dominant POD spatial bases $\phi_k({{\mathbf x}})$, $k=1,2,...,R$, with $RRMS Error < \alpha^{\text{POD}}$
\State Project $u({{\mathbf x}},t_i)$ to the reduced space and obtain $a_k(t) = (\hat u({{\mathbf x}},t),\phi_k({{\mathbf x}}))$
\State Determine the furthest forecast time permitted by the POD, $t_{\text{POD}}^*$, from Eq. \eqref{equ:Predict_POD_limit}
\For {$k=1,2,...,R$}
\State Infer a Gaussian Process model for $a_k(t)$ following \S \ref{subsubsec:Gaussian}
\State Determine the furthest forecast time permitted by the GPR, $t_{\mathrm{GPR,a}}^*$, from Eq. \eqref{equ:Gaussian_presetToL}
\EndFor
\State Determine the final furthest forecast time as $t^* = \min \{ t_\text{POD}^*, t_{\mathrm{GPR},a}^*,t_\mathrm{GPR,\Gamma_m}^*\}$
\State Predict $\gamma_l(t^*)$ by the inferred Gaussian Process models for $\gamma_l(t)$
\State Predict each $a_k(t^*)$ by the inferred Gaussian Process models for $a_k(t)$
\State Reconstruct the full-order solution $u({{\mathbf x}},t^*)$ by Eq. \eqref{equ:ROM_POD}
\State Correct $u({{\mathbf x}},t^*)$ for $\{\mathbf{x} | \mathbf x \in \Omega_f ~\text{at}~t^* ~\text{but}~ \mathbf{x} \in \Omega_m \text{ during } [t_1, t_M] \}$
\State \Return $u({{\mathbf x}},t^*)$ and $\gamma_l(t^*)$
\end{algorithmic}
\end{algorithm}
\subsection{Error analysis}
The error of the proposed nonintrusive model order reduction is originated from three resources: the truncation error in POD, the error caused by GPR, and the interpolation error introduced in \S \ref{subsubsec:correction_MB}, i.e.,
\begin{equation}\label{equ:error_ROM}
\epsilon^\text{ROM} = \left \|u({{\mathbf x}},t)- u^\text{ROM}({{\mathbf x}},t) \right\|_{L_2} = \epsilon^\text{POD} + \epsilon^\text{GPR} + \epsilon^\text{MLS} \;.
\end{equation}
Here, $\epsilon^\text{POD}$ is the truncation error of POD given by Eq. \eqref{equ:POD_truncation_error}. $\epsilon^\text{GPR}$ is the error caused by GPR and can be indicated by the uncertainty level $\hat \sigma(t)$:
\begin{equation}\label{eq:err_GPR}
\epsilon^\text{GPR}= \left \|u^\text{POD}({\bf{x}},t)- u^\text{ROM}({\bf{x}},t) \right\|_{L_2} \approx C_1 \hat \sigma(t)\; ,
\end{equation}
where $u^\text{POD}({\bf{x}},t)$ is the projection of the full-order solution $u({\bf{x}},t)$ onto the reduced space formed by $R$ POD bases; $C_1>0$ is a constant; and $\hat \sigma(t)$ is given by Eq. \eqref{equ:weighted_sd}. $\epsilon^\text{MLS}$ denotes the error of the MLS interpolation and can be estimated by \cite{MLSDiffuse_Mirzaei2012}:
\begin{equation}
\epsilon^\text{MLS}=\left \|u({{\mathbf x}},t)- u_h({{\mathbf x}},t) \right\|_{L_2} \le C_2 h^{s+1}|u|_{C^{s+1}(\Omega_f)} \;,
\end{equation}
where $C_2>0$ is a constant; and $|u|_{C^{s+1}(\Omega_f)}:=\max\limits_{\zeta \le s+1}\|D^\zeta u\|_{L_\infty}$ with $D^\zeta u$ the $\zeta$-th order spatial derivative of $u$ for ${\mathbf x} \in \Omega_f$. The relative error is then defined as:
\begin{equation}\label{equ:relative_error}
\epsilon_r^\text{ROM}= \frac{\epsilon^\text{ROM}}{\left \|u({\bf{x}},t)\right\|_{L_2}} = \frac{\left \|u({\bf{x}},t)- u^\text{ROM}({\bf{x}},t) \right\|_{L_2}}{\left \|u({\bf{x}},t)\right\|_{L_2}} \; .
\end{equation}
\subsection{Burgers equation}
First, we constructed the ROM to predict the solution of the Burgers equation, which is a typical benchmark used in literature for validating model order reduction methods (e.g., in \cite{POD_Burgers_2017, POD_Burgers_1999, POD_Burgers_2014}).
The Burgers equation considered herein is:
\begin{equation}\label{equ:Burgers}
\begin{split}
&\frac{{\partial u}}{{\partial t}} + u\frac{{\partial u}}{{\partial x}} = \frac{1}{{{\mathop{Re}\nolimits} }}\frac{{{\partial ^2}u}}{{\partial {x^2}}}, \ \ x \in (0,1) \\
&u(0,t) = 0,\ \ u(1,t) = 0, \ \ t \ge 0 \\
&u(x,0) = \frac{x}{1+\sqrt{\frac{1}{t_0}}\exp({Re \frac{x^2}{4}})} ,\ \ x \in (0,1)
\end{split}
\end{equation}
where $Re$ is the Reynolds number and $t_0=\exp({\frac{Re}{8}})$.
The analytical solution of Eq. \eqref{equ:Burgers} is given by:
\begin{equation}\label{equ:Burgers_analytical}
u(x,t) = \frac{\frac{x}{t+1}}{1+\sqrt{\frac{t+1}{t_0}}\exp({Re \frac{x^2}{4t+4}})} \; .
\end{equation}
The analytical solution (Eq. \eqref{equ:Burgers_analytical}) of the Burgers equation was used to generate the snapshot data to construct the ROM with the time step $\delta t = 10^{-2}$ and spatial grid length $\delta x = 10^{-3}$. In particular, 20 snapshots from $t=0.3$ to $t=0.5$ were used to extract the dominant POD modes. We set the truncation threshold $\alpha^\text{POD} = 0.01$, which means the POD modes retained dominate at least $99.99\%$ of the fluctuating kinetic energy. To satisfy this threshold, the number of POD modes retained ($R$) varies with the Reynolds number, which is indicated in Figure \ref{fig:Burgers_u}.
To construct the temporal coefficients $a_k(t)$, we employed both the Galerkin projection and GPR and compared their performance. With the constructed $a_k(t)$, we predicted the solution $u(\mathbf{x},t^*)$ of the Burgers equation at a future time $t^*=0.6$ for different Reynolds numbers from $Re=1$ to $Re=500$. The results are shown in Figure \ref{fig:Burgers_u}. The formulation used in the Galerkin projection to determine $a_k(t)$ is given as below:
\begin{equation}\label{equ:Burgers_Garlerkin}
\dot{a}_k(t) = (\frac{1}{{{\mathop{\rm Re}\nolimits} }}\frac{{{\partial ^2}u}}{{\partial {x^2}}} - u\frac{{\partial u}}{{\partial x}},{\phi _k}) = {B_k} + \sum\limits_{i = 1}^R {{L_{ik}}{a_i(t)}} {\rm{ + }}\sum\limits_{i = 1}^R {\sum\limits_{j = 1}^R {{N_{ijk}}{a_i(t)}{a_j(t)}} } , \ \ \ \ \text{for} \ \ k = 1,2,...,R \; ,
\end{equation}
where ${B_k} = (\frac{1}{{{\mathop{\rm Re}\nolimits} }}\frac{{{\partial ^2}\bar u}}{{\partial {x^2}}} - \bar u\frac{{\partial \bar u}}{{\partial x}},{\phi _k})$, ${L_{ik}} = (\frac{1}{{{\mathop{\rm Re}\nolimits} }}\frac{{{\partial ^2}{\phi _i}}}{{\partial {x^2}}} - {\phi _i}\frac{{\partial \bar u}}{{\partial x}} - \bar u\frac{{\partial {\phi _i}}}{{\partial x}},{\phi _k})$, and ${N_{ijk}} = ( - {\phi _i}\frac{{\partial {\phi _j}}}{{\partial x}},{\phi _k})$.
\begin{figure}[htbp]
\centering
\subfigure[$Re=1$, $R =1$]{
\includegraphics[width=6cm]{Figures/Burgers/fig1-1.pdf}
}
\quad
\subfigure[$Re=100$, $R=2$]{
\includegraphics[width=6cm]{Figures/Burgers/fig1-100.pdf}
}
\quad
\subfigure[$Re=300$, $R=4$]{
\includegraphics[width=6cm]{Figures/Burgers/fig1-300.pdf}
}
\quad
\subfigure[$Re=500$, $R = 4$]{
\includegraphics[width=6cm]{Figures/Burgers/fig1-500.pdf}
}
\caption{Burgers equation: The solution of $u(x,t)$ at a future time $t^*=0.6$ predicted by the ROM built from POD and Gaussian process (POD-Gaussian) or Galerkin projection (POD-Galerkin), compared with the exact solution.}\label{fig:Burgers_u}
\end{figure}
From Figure \ref{fig:Burgers_u}, we find that the solution forecasted at the future time $t^*=0.6$ by the constructed ROM is accurate for lower Reynolds numbers, either based on the Gaussian process or Galerkin projection. For higher Reynolds numbers, the accuracy deteriorates, and oscillations occur near the shock wave singularity. This is because the dominant spatial bases $\phi_k(x)$ would change rapidly upon the development of shock wave, which violates the assumption of POD-based model order reduction: the dominant spatial bases are the same for the training data and forecasted solutions. The accuracy of the ROM constructed using the GPR is comparable with that using the Galerkin projection. However, while the Galerkin projection relies on both the data and knowledge of the Burgers equation to establish the ODEs (Eq. \eqref{equ:Burgers_Garlerkin}) for the temporal coefficients $a_k(t)$, the Gaussian process only requires data.
We further examined the behavior of relative error $\epsilon_r^\text{ROM}$ (Eq. \eqref{equ:relative_error}) of the ROM constructed using the POD and GPR. The solution predicted at $t^*=0.6$ with the snapshots from $t_1=0.3$ to $t_M=0.5$ was considered. As expected, the constructed ROM is more accurate with more POD modes retained, as depicted in Figure \ref{subfig:Burgers_errorPOD_new} for ${\mathop{\rm Re}\nolimits} = 100$ and ${\mathop{\rm Re}\nolimits}=500$. However, the error decay stalls when $R$ (the number of POD modes retained) reaches a certain number, which is because $\epsilon^\text{GPR}$ begins to dominate when $\epsilon^\text{POD}$ becomes small.
\begin{figure}[htbp]
\centering
\subfigure[The relative error $\epsilon_r^\text{ROM}$ of the ROM solution at $t^* =0.6 $ for varying number of retained POD modes ]{\label{subfig:Burgers_errorPOD_new}
\includegraphics[width=6cm]{Figures/Burgers/errPOD_new.pdf}
}
\quad
\subfigure[Relative information content for ${\mathop{\rm Re}\nolimits} = 1, 100, 300, 500$]{\label{fig:Burgers_lambda}
\includegraphics[width=6cm]{Figures/Burgers/lambda.pdf}
}
\caption{Burgers equation: Error analysis for different number of POD modes retained.}
\label{fig:Burgers_error}
\end{figure}
In addition, the error decreases with respect to $R$ at a faster rate for lower Reynolds number (${\mathop{\rm Re}\nolimits} = 100$) and at a slower rate for higher Reynolds number (${\mathop{\rm Re}\nolimits} = 500$). This can be explained through the analysis of eigenvalues. Recall the truncation error of POD is determined from the eigenvalues of the correlation matrix of the snapshot data, as specified in Eq. \eqref{equ:POD_truncation_error}. The energy contributed by each mode in the total energy can be evaluated by the relative information content (RIC), expressed as:
\begin{equation}
RIC(k) = ( \frac{\lambda_k}{\sum_{j=1}^{M} \lambda_j} ) \times 100\% \; .
\end{equation}
In Figure \ref{fig:Burgers_lambda}, we compare the RIC of $k$-th POD mode for different Reynolds numbers.
The RIC demonstrates how the contribution of each POD mode decays. The smaller the Reynolds number is, the decay slope is more steep, and thereby the POD truncation error decreases faster with respect to $R$. The decay rate of eigenvalues, as defined in Eq. \eqref{equ:Predict_POD_limit} is also used to determine the furthest forecast time. Figure \ref{fig:Burgers_lambda} indicates smaller Reynolds number permits longer time extrapolation (i.e., larger $\Delta t^*=t^*-t_M$) given the dataset range $[t_1, t_M]$ is fixed.
\begin{figure}[htbp]
\centering
\includegraphics[width=6cm]{Figures/Burgers/errGPR_new.pdf}
\caption{Burgers equation: $\epsilon^\text{ROM}$ at different forecast times beyond the dataset range $\Delta t^*=t^*-t_M$. Here, $\epsilon^{\text{GPR}}$ and $\hat{\sigma}$ are also shown for comparison.}
\label{fig:Burgers_errorGaussian_new}
\end{figure}
In Figure \ref{fig:Burgers_errorGaussian_new}, we assessed the errors $\epsilon^\text{ROM}$ and $\epsilon^\text{GPR}$ and the uncertainty level of GPR $\hat{\sigma}$ at different forecast times $t^*$ with the same snapshots from $t_1 = 0.3$ to $t_M =0.5$. Here, $Re = 500$ was considered and 4 POD modes were retained. The growth of $\hat{\sigma}$ as $\Delta t^*$ increases can be explained by Figure \ref{fig:Burgers_a(t)}, where the GPR model trained for each dominant $a_k(t)$ is presented. It can be seen that the 95\% confidence interval enlarges, indicating the uncertainty level (or $\hat{\sigma}(t^*)$) increases, as time extrapolation goes further. This result also supports the use of $\hat{\sigma}(t^*)$ as a criterion to adaptively determine the furthest forecast time $t^*$, as given in Eq. \eqref{equ:Gaussian_presetToL}. $\epsilon^\text{GPR}$ varies following the trend of $\hat{\sigma}(\Delta t^*)$. Finally, $\epsilon^\text{ROM}$ grows with $\Delta t^*$, i.e., with the forecast time $t^*$ going further beyond the dataset range, resulting from the behavior of $\epsilon^\text{GPR}$.
\begin{figure}[htbp]
\centering
\subfigure[$a_1$]{
\includegraphics[width=6cm]{Figures/Burgers/afig1.pdf}
}
\quad
\subfigure[$a_2$]{
\includegraphics[width=6cm]{Figures/Burgers/afig2.pdf}
}
\quad
\subfigure[$a_3$]{
\includegraphics[width=6cm]{Figures/Burgers/afig3.pdf}
}
\quad
\subfigure[$a_4$]{
\includegraphics[width=6cm]{Figures/Burgers/afig4.pdf}
}
\caption{Burgers equation: GPR for each dominant temporal coefficient $a_k(t)$.}\label{fig:Burgers_a(t)}
\end{figure}
\subsection{Lid-driven cavity flow}
In this section, we studied the 2D lid-driven cavity flow, where a square cavity $\Omega= [0,1]\times [0,1]$ consists of three stationary walls and a lid moving with a constant tangential velocity. To obtain the velocity and pressure fields for the lid-driven cavity flow, numerical simulations are usually employed for solving the full Navier-Stokes (NS) equation.
Here, we assessed the ability of the proposed Gaussian process-enabled nonintrusive model order reduction to predict the velocity and pressure fields for this flow. To construct the ROM, the snapshot data were generated via simulation which is based on the staggered finite-volume spatial discretization, projection method to enforce incompressibility, and treating the nonlinear advection term explicitly and the viscous term implicitly \cite{NS_Chorin1968,NSnumerical_Griebel1998}.
Two different Reynolds numbers were considered: $Re=100$ and $Re=1000$. In numerical simulations, the time step was set as $\delta t=0.01$, and $100\times 100$ grids were used in the spatial discretization.
We took the numerical solutions between $t=0.6 \sim 0.8$ as the snapshot data to construct the ROM using the POD and GPR. The POD truncation threshold was set as $\alpha^\text{POD} = 0.01$.
The constructed ROM was then employed to predict the velocity and pressure fields of the flow for $t>0.8$. Figures \ref{fig:lidcavity_t01_Re100} and \ref{fig:lidcavity_t01_Re1000} present the predicted solutions at $t^*=1.0$ for $Re=100$ and $Re=1000$, respectively. This forecast time $t^*$ was determined from Eqs. \eqref{equ:Predict_POD_limit} and \eqref{equ:Gaussian_presetToL} with $\beta ^{\text{POD}} = 0.3$ and $\beta ^{\text{GPR},a} = 0.01$. By comparison with the full-order solutions by simulations, we find the prediction of the constructed ROM is very accurate. The relative errors $\epsilon_r^\text{ROM}$ for both velocity and pressure are less than $2\%$ for either $Re=100$ or $Re=1000$.
\begin{figure}[htbp]
\centering
\subfigure[Velocity field (with streamlines) by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uexact-100.pdf}
}
\quad
\subfigure[Velocity field (with streamlines) by ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-upred-100.pdf}
}
\quad
\subfigure[Pointwise error for velocity]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uerror-100.pdf}
}
\quad
\subfigure[Pressure field by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-pexact-100.pdf}
}
\quad
\subfigure[Pressure field by ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-ppred-100.pdf}
}
\quad
\subfigure[Pointwise error for pressure]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-perror-100.pdf}
}
\caption{Lid-driven cavity flow: Comparison of the solutions predicted by the ROM with the solutions obtained from numerical simulations at $t=1.0$ for $Re=100$. Here, $R=2$, i.e., the first 2 POD modes are retained.}
\label{fig:lidcavity_t01_Re100}
\end{figure}
\begin{figure}[htbp]
\centering
\subfigure[Velocity field (with streamlines) by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uexact-1000.pdf}
}
\quad
\subfigure[Velocity field (with streamlines) by ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-upred-1000.pdf}
}
\quad
\subfigure[Pointwise error for velocity]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uerror-1000.pdf}
}
\quad
\subfigure[Pressure field by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-pexact-1000.pdf}
}
\quad
\subfigure[Pressure field by ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-ppred-1000.pdf}
}
\quad
\subfigure[Pointwise error for pressure]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-perror-1000.pdf}
}
\caption{Lid-driven cavity flow: Comparison of the solutions predicted by the ROM with the solutions obtained from numerical simulations at $t=1.0$ for $Re=1000$. Here, $R=3$, i.e., the first 3 POD modes are retained.}
\label{fig:lidcavity_t01_Re1000}
\end{figure}
Next, we examined our implementation of the automated process that adaptively combines the numerical simulations and ROM (as described in \S \ref{subsubsec:algorithm_ROMGaussian}) for long-time prediction of the solutions for the lid-driven cavity flow. Figure \ref{fig:lidcavity_t20_Re1000} shows the velocity and pressure fields predicted at $t=20.0$ for $Re=1000$ by combining the numerical simulations and ROM, compared with the solutions obtained solely from numerical simulations. Good accuracy is achieved with the relative errors $\epsilon_r^\text{ROM}$ for both velocity and pressure less than $5\%$.
\begin{figure}[htbp]
\centering
\subfigure[Velocity field (with streamlines) solely by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uexact-15.pdf}
}
\quad
\subfigure[Velocity field (with streamlines) by combining numerical simulations and ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-upred-15.pdf}
}
\quad
\subfigure[Pointwise error for velocity]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-uerror-15.pdf}
}
\quad
\subfigure[Pressure field solely by numerical simulations]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-pexact-15.pdf}
}
\quad
\subfigure[Pressure field by combining numerical simulations and ROM]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-ppred-15.pdf}
}
\quad
\subfigure[Pointwise error for pressure]{
\includegraphics[width=4.8cm]{Figures/Cavity/cavity-perror-15.pdf}
}
\caption{Lid-driven cavity flow: Comparison of the solutions predicted by adaptively combining the numerical simulations and ROM with the solutions obtained solely from numerical simulations at $t=20.0$ for $Re=1000$.}
\label{fig:lidcavity_t20_Re1000}
\end{figure}
\subsection{Heterogeneous fracture deformation}\label{subsec:2DExp}
In this section, we applied the proposed nonintrusive model order reduction method to experimental data, where the full-order model is unknown. The experimental data are the 2D displacement fields for heterogeneous fracture deformation. From the snapshots of the displacement fields at different times, we constructed the ROM using the POD and GPR. The constructed ROM was then employed to forecast the displacement fields of future times beyond the snapshot data.
In experiments, the data of displacement fields were obtained by employing the augmented-Lagrangian digital image correlation (ALDIC) method \cite{2Dexp_ALDIC_Jin2019} on the images from the experiment of Avellar \cite{2Dexp_image_AvellarPhDthesis}. The images recorded the gray scale of a speckle pattern painted on the surface of a material specimen. Upon deformation, the gray scale of the speckle pattern changed. Hence, by comparison of the gray scale in the images before and after deformation, the displacement field can be determined by solving an optimization problem. Although effective, the ALDIC method is quite expensive and requires storage of massive image data. Instead, the ROM, once constructed, can efficiently reproduce the displacement field at any given time until the furthest forecast time $t^*$ allowed by the ROM is reached. To demonstrate the proposed reduced order modeling, we chose to consider the data for a material specimen with heterogeneous stiffness and thereby complex displacement fields \cite{2Dexp_ALDIC_Jin2019}, for which the saving of computational cost by using the ROM compared with the ALDIC method is even more remarkable.
More specifically, we used 15 snapshots of the displacement fields from $t_1 = 0$ to $t_M = 15$ to construct the ROM, which was then employed to predict the displacement field at $t^*=25$. Here, the first 3 POD modes were retained ($R=3$) with the POD truncation threshold $\alpha^\text{POD} = 0.01$. The furthest forecast time $t^*$ was determined from Eqs. \eqref{equ:Predict_POD_limit} and \eqref{equ:Gaussian_presetToL} with $\beta ^{\text{POD}} = 0.3$ and $\beta ^{\text{GPR},a} = 0.1$. The results are presented in Figure \ref{fig:fracture_displacement}. For comparison, we also show the displacement fields determined using the ALDIC method. From the comparison, we demonstrate the good accuracy of the predictions by the ROM. Taking the results by the ALDIC method as the ``exact" solutions, the relative error $\epsilon_r^\text{ROM}$ is less than 8\% for the prediction of $x$-displacement field and less than 2\% for the prediction of $y$-displacement field.
\begin{figure}[htbp]
\centering
\subfigure[ALDIC]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2duexact.png}
}
\quad
\subfigure[ROM]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2dupred.png}
}
\quad
\subfigure[Pointwise error]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2duerror.png}
}
\quad
\subfigure[ALDIC]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2dvexact.png}
}
\quad
\subfigure[ROM]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2dvpred.png}
}
\quad
\subfigure[Pointwise error]{
\includegraphics[width=4.8cm]{Figures/Exp2d/exp2dverror.png}
}
\caption{Heterogeneous fracture deformation: The ((a)-(c)) $x$- and ((d)-(f)) $y$-displacement fields predicted by the ROM at $t^*=25$, compared with the results by the ALDIC method.}
\label{fig:fracture_displacement}
\end{figure}
In regard to the computational cost, it typically takes the ALDIC method about 53s to generate the displacement field from two images \cite{2Dexp_ALDIC_Jin2019}, which was tested in {\sc Matlab} using a workstation with Intel (R) Xeon(R) CPU E5-2650 v3 2.30 GHz (2 Processors). It only takes the ROM about 0.02s to predict the displacement field using {\sc Matlab} and comparable hardware. And the cost for constructing the ROM is about 0.70s. Thus, integrating the ALDIC method with the proposed reduced order modeling can significantly reduce the computational cost in experiments to determine the time-varying displacement fields.
\subsection{Bubble cavitation in hydrogel}\label{subsec:buble_cavity}
After the three benchmarks used to validate the nonintrusive model order reduction method based on the POD and GPR, we next considered a problem involving moving boundary. In particular, it concerned bubble cavitation in hydrogel. The data used to construct and validate the ROM were from the experiments \cite{1Dexp_cavity_Jin2020}, where a spherical bubble cavitation was formed in the center of a hydrogel material. Assume the initial radius of the bubble is $R_0$. Due to the plasma recombination and the volume change of the vapor and non-condensable gas within the bubble, the radius of the bubble is a function of time $R(t)$; as a result, the interface between the bubble and hydrogel is a moving boundary. The expansion or shrinkage of the bubble led to compression or tension on the surrounding hydrogel material. A schematic of this problem is illustrated in Figure \ref{fig:Bubble}.
\begin{figure}[htbp]
\centering
\includegraphics[width=6cm]{Figures/Bubble/bubble_schematic.pdf}
\caption{Schematic of a bubble cavitation in hydrogel. The bubble can expand (e.g. at $t_1$) or shrink (e.g., at $t_2$).}
\label{fig:Bubble}
\end{figure}
The distribution of the elastic strain $S$ in the surrounding hydrogel as well as the bubble's radius $R(t)$ were measured in the experiments. The elastic strain $S$ was measured at each tracer position. Due to the spherical symmetry of this problem, we simplified it to a one-dimensional problem. Hence, the strain field only depends on $r$, the radial distance to the center of the bubble.
From $M$ snapshots of the experimental data, we first constructed a GPR model for $R(t)$, the bubble's radius as a function of time. The constructed GPR model can forecast the bubble's radius at a given time beyond the range of data. The furthest forecast time $t^*$ was determined from Eqs. \eqref{equ:Predict_POD_limit}, \eqref{equ:Gaussian_presetToL} and \eqref{equ:predict_boudary_limit} with $\beta^{\text{POD}}=0.3$, $\beta^{\text{GPR},a}=0.1$ and $\beta^{\text{GPR},\Gamma_m}=0.1$. After the furthest forecast time $t^*$ was reached, new $M$ snapshots of experimental data were collected and used to infer another GPR model to forecast $R(t)$ for further times. Repeating this process and the resulting adaptive combination of experimental measurements and GPR modeling allowed us to efficiently predict the long-time evolution of the radius of the bubble cavitation with a complex dynamics of expansion and shrinkage, as shown in Figure \ref{fig:bubbleradius}. Good agreement was achieved between the GPR model's predictions and the test data from experiments.
\begin{figure}[htbp]
\centering
\includegraphics[width=12cm]{Figures/Bubble/bubble_radius.pdf}
\caption{Bubble cavitation in hydrogel: The prediction of the bubble cavitation's radius $R(t)$.}
\label{fig:bubbleradius}
\end{figure}
Besides the bubble cavitation's radius, we also predicted the elastic strain field $S(r,t)$ in the surrounding hydrogel. To this end, the ROM for $S(r,t)$ was constructed using the POD and GPR from the experimental snapshot data. For demonstration, we predicted for two different times: one during the expansion of the bubble and the other during the bubble's shrinkage. More specifically, we used 10 snapshot data from $t_1 =1$ to $t_M=10$ to construct a ROM, which was then employed to forecast $S(r,t)$ at $t^*=20$; and we used 10 snapshot data from $t_1=51$ to $t_M=60$ to construct another ROM to predict $S(r,t)$ at $t^*=70$.
Each prediction of $S(r,t)$ by the constructed ROM, along with the comparison with the experimental data, is presented in Figure \ref{fig:Bubblestrain}. After $t>50$, the bubble cavitation experienced shrinkage until $t=70$. During this period of time, the surrounding hydrogel was stretched toward the bubble's center. Hence, the strain field $S(r,t>t_M)$ included the range of $r$ that was not covered in the snapshot data (from $t_1=51$ to $t_M=60$). To construct the ROM covering that range of $r$, we extrapolated by least squares the snapshot data of $S(r)$ until the minimum possible value of $R$. When we forecasted $S(r,t)$ at $t^*=70$ by the constructed ROM, for the region of $r$ not covered in the snapshot data (i.e., the region between two vertical dash lines in Figure \ref{subfig:Bubblestraintension}), the correction was made using the method proposed in \S\ref{subsubsec:correction_MB}. To validate the prediction of $S(r)$ in that region, since no experimental data were available, we relied on the following analytical model \cite{1Dexp_cavity_Jin2020,1Dexp_modelYang2005} for validation:
\begin{equation}
S(r,t) = (\frac{r}{r^3 + {R(\bar{t})}^3 - R(t)^3})\; ,
\label{equ:bubble_strainmodel}
\end{equation}
where $\bar{t}=5$.
\begin{figure}[htbp]
\centering
\subfigure[$t^*=20$]{\label{subfig:Bubblestraincompression}
\includegraphics[width=7.5cm]{Figures/Bubble/bubble_strain1.pdf}
}
\quad
\subfigure[$t^*=70$]{\label{subfig:Bubblestraintension}
\includegraphics[width=7.5cm]{Figures/Bubble/bubble_strain2.pdf}
}
\caption{Bubble cavitation in hydrogel: The prediction of the elastic strain $S(r,t)$ in hydrogel.}
\label{fig:Bubblestrain}
\end{figure}
As can be seen in Figure \ref{fig:Bubblestrain}, the predictions of the strain field $S(r,t)$ by the ROM reasonably agree with the experimental data and the analytical model. Thus, we anticipate the proposed reduced order modeling can be applied to predict the strain field for the regions and times that are not accessible in experiments or when the analytical model is not applicable (e.g., after the first collapse of the bubble).
\subsection{Fluid-solid interactions}\label{subsec:FSI}
Finally, we studied the problems of fluid-solid interactions, where multiple solid bodies move in a fluid flow. Assume the domain $\Omega_m$ consists of $N_s$ solid bodies, and each of them has a boundary $\Gamma_m^n,\ \ n=1,...,N_s$, and a center-of-mass position $\bm{X}_n$ and orientation $\bm{\Theta}_n$. In this study, we predicted the dynamics of each solid body as well as the velocity and pressure fields in the fluid by the ROM constructed. The snapshot data used to construct the ROM were generated via numerical simulations, where the incompressible Stokes flow subject to moving solid boundaries was numerically solved using the generalized moving least squares discretization method \cite{GMLS_Hu2019}. For simplicity, the solid bodies are subject to rigid-body kinematics. The evolution of a moving solid boundary $\Gamma_m^n$ can be characterized by $[\bm{X}_n, \bm{\Theta}_n]$.
In all the cases studied herein, the fluid and solid bodies are confined in a 2D square box of $[-5,5] \times [-5,5]$. The top and bottom boundaries of the box are subject to identical velocities $u_0=0.5$ but along opposite $x$ directions so as to generate a shear flow. In numerical simulations, the time step was set $\delta t=0.1$, and the spatial discretization was uniform with the spacing $\delta x =0.1$. In the first case, there are two cylinders of equal size immersed in the fluid flow. We constructed the ROM from the first 20 snapshots from $t_1=0$ to $t_M=2.0$. The constructed ROM was then used to predict the velocity and pressure fields in the fluid and the positions of the two cylinders at $t^*=3.0$, which is the furthest forecast time determined from Eqs. \eqref{equ:Predict_POD_limit}, \eqref{equ:Gaussian_presetToL} and \eqref{equ:predict_boudary_limit} with $\beta^{\text{POD}} = 0.8$, $\beta^{\text{GPR},a} = 0.1$ and $\beta^{\text{GPR},\Gamma_m} = 0.1$. The first $4$ POD modes were retained in the ROM by setting $\alpha^{\text{POD}} = 0.05$.
Figure \ref{fig:two_cylinders} presents the velocity and pressure fields predicted by the ROM, compared with the full-order solutions by numerical simulations. Since the velocity in $x$ direction is dominated by linear shear flow, the comparison is made for the velocity along $y$ direction. We also compared the predictions with and without the correction near the moving solid boundaries, as discussed in \S\ref{subsubsec:correction_MB}.
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_uexact.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_upredict.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_ucorrect.pdf}
}
\quad
\subfigure[Pressure field computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_pexact.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_ppred.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/circle/circle_pcorrect.pdf}
}
\caption{Two cylinders under a shear flow: The velocity and pressure fields in the fluid predicted by the ROM at $t^*=3.0$, compared with the full-order solutions by numerical simulations.}
\label{fig:two_cylinders}
\end{figure}
For a closer view, Figure \ref{fig:two_cylinders_lines} depicts the velocity and pressure along two lines at $x=-2 $ and $y=2$, respectively. It is clearly seen that the large errors appear in the regions near the moving solid boundaries on the downstream sides, which were previously occupied by the cylinders ($\Omega_m$) but not part of the fluid domain ($\Omega_f$).
The correction method proposed in \S\ref{subsubsec:correction_MB} can effectively improve the accuracy of the ROM's predictions for those regions.
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ at $x=-2$]{
\includegraphics[width=6.5cm]{Figures/FSI/circle/correct_ux.pdf}
}
\quad
\subfigure[Velocity in $y$ at $y=2$]{
\includegraphics[width=6.5cm]{Figures/FSI/circle/correct_uy.pdf}
}
\quad
\subfigure[Pressure at $x=-2$]{
\includegraphics[width=6.5cm]{Figures/FSI/circle/correct_px.pdf}
}
\quad
\subfigure[Pressure at $y=2$]{
\includegraphics[width=6.5cm]{Figures/FSI/circle/correct_py.pdf}
}
\caption{Two cylinders under a shear flow: The velocity and pressure in the fluid along two lines $x=-2$ and $y=2$ at $t^*=3.0$ predicted by the ROM with and without correction, compared with the full-order solutions by numerical simulations.}
\label{fig:two_cylinders_lines}
\end{figure}
For the problems of fluid-solid interactions, the numerical simulations can be rather demanding and expensive. Thus, we can adaptively combine the numerical simulations and ROM to save computational cost. In this case, we took the ROM's predictions (the velocity and pressure fields in the fluid and the positions of cylinders) at $t^*=3.0$ as the initial condition and restarted the numerical simulations until $t=5.0$. Using the numerical solutions for $t_1=3.1$ until $t_M=5.0$ as the snapshot data, we constructed a new ROM and predicted the solutions for $t^*=6.0$. By repeating this procedure until the target time $t=20.0$, we predicted the entire trajectory of one cylinder, as plotted in Figure \ref{fig:two_cylinders_traj}. By comparison with the result obtained solely from the numerical simulations, we find the prediction by adaptively combining the numerical simulations and ROM achieves good accuracy. In the meanwhile, the ROM's predictions replaced about $\frac 1 3$ of the simulation. Compared with the cost of the numerical simulations, the cost of constructing the ROM and employing it for prediction is trivial.
For example, it took $21.2s$ for the numerical simulations to march from $t=2.0$ to $t=3.0$ with the time step $\delta t = 0.1$.
The simulation was run using C++ with OpenMPI-based parallel implementation on one Intel(R) Xeon(R) E3-1231 v3 CPU @ 3.4GHz with 4 cores.
On the same hardware, it only needed 4.65s in total to construct the ROM and employ it for prediction by a serial {\sc Matlab} code.
\begin{figure}[htbp]
\centering
\includegraphics[width=12cm]{Figures/FSI/circle/circle_traj.pdf}
\caption{Two cylinders under a shear flow: The trajectory of one cylinder predicted by the combination of the numerical simulations and ROM.}
\label{fig:two_cylinders_traj}
\end{figure}
To demonstrate the robustness of the proposed reduced order modeling method, we further examined a case of more cylinders in a shear flow. Figure \ref{fig:four_cylinders} and \ref{fig:four_cylinders_lines} summarize the velocity in $y$ direction and pressure predicted by the ROM with and without the correction near the moving solid boundaries, compared with the full-order solutions by numerical simulations.
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_uexact.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_upred.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_ucorrect.pdf}
}
\quad
\subfigure[Pressure field computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_pexact.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_ppred.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/multicir/multicir_pcorrect.pdf}
}
\caption{Four cylinders under a shear flow: The velocity and pressure fields in the fluid predicted by the ROM at $t^*=3.0$, compared with the full-order solutions by numerical simulations.}
\label{fig:four_cylinders}
\end{figure}
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ at $x=0.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/multicir/correct_ux4.pdf}
}
\quad
\subfigure[Velocity in $y$ at $y=-2.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/multicir/correct_uy4.pdf}
}
\quad
\subfigure[Pressure at $x=0.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/multicir/correct_px4.pdf}
}
\quad
\subfigure[Pressure at $y=-2.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/multicir/correct_py4.pdf}
}
\caption{Four cylinders under a shear flow: The velocity and pressure along the lines $x=0.5$ and $y=-2.5$ at $t^*=3.0$ predicted by the ROM with and without correction, compared with the full-order solutions by numerical simulations.}
\label{fig:four_cylinders_lines}
\end{figure}
Finally, to demonstrate the applicability of the proposed reduced order modeling method to moving boundaries of arbitrary geometries, we also solved the fluid-solid interaction problem with two squares. The results are presented in Figure \ref{fig:two_squares} and \ref{fig:two_squares_lines}.
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_uexact.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_upred.pdf}
}
\quad
\subfigure[Velocity in $y$ predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_ucorrect.pdf}
}
\quad
\subfigure[Pressure field computed from numerical simulations]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_pexact.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM without correction]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_ppred.pdf}
}
\quad
\subfigure[Pressure field predicted by the ROM with correction]{
\includegraphics[width=4.8cm]{Figures/FSI/square/square_pcorrect.pdf}
}
\caption{Two squares under a shear flow: The velocity and pressure fields in the fluid predicted by the ROM at $t^*=3.0$, compared with the full-order solutions by numerical simulations.}
\label{fig:two_squares}
\end{figure}
\begin{figure}[htbp]
\centering
\subfigure[Velocity in $y$ at $x=-2.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/square/correct_uxs.pdf}
}
\quad
\subfigure[Velocity in $y$ at $y=1.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/square/correct_uys.pdf}
}
\quad
\subfigure[Pressure at $x=-2.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/square/correct_pxs.pdf}
}
\quad
\subfigure[Pressure at $y=1.5$]{
\includegraphics[width=6.5cm]{Figures/FSI/square/correct_pys.pdf}
}
\caption{Two squares under a shear flow: The velocity and pressure along the lines $x=-2.5$ and $y=1.5$ at $t^*=3.0$ predicted by the ROM with and without correction, compared with the full-order solutions by numerical simulations.}
\label{fig:two_squares_lines}
\end{figure}
In either case, the predictions by the ROM with the correction achieve good accuracy. Figure \ref{fig:four_cylinders_lines} and \ref{fig:two_squares_lines} provide closer views for the difference between without and with the correction. We hence have demonstrated that the proposed reduced order modeling method is applicable to dynamical systems with general moving boundaries regardless of the number or geometry of the boundaries.
|
\section{Introduction}
Model Predictive Control (MPC), known as Receding Horizon Control (RHC), can optimize system criteria and deal with state and control input constraints effectively in industrial control process. MPC has inspired many research efforts and showed potential impacts in the academic area and the process industries compared with the methods of other multi-variable control \cite{MAYNE20142967,2020Industry,2007Model}. In each control period, MPC solves an open-loop and finite-horizon dynamic optimal control problem (OCP) to generate the optimal control input sequence and applies the first element of that sequence to the plant to update the system states. This process repeats until the system states converge around an equilibrium point, which provides an effective way to approximate the optimal control \cite{2000Constrained,SunDXL18,KohlerMA20,mesbah2016stochastic}. In this time-triggered execution fashion, MPC visits and updates the states of the system periodically to realize state feedback control and iterative convergence, which has proved the excellent control performance in the process industry, power system and robot control \cite{2016Model,BrunnerBKPZNS20,HanniganSKHYC20,rubagotti2019semi,vazquez2014model}.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth]{intro.pdf}
\caption{In this figure, we compare the implementation of the conventional MPC with the robust tube-based smooth-MPC. There are three parts to show: the three-link robot manipulator, the conventional MPC and the time-triggered MPC. For the conventional MPC, the computing time causes the multi-step delay of control input. In our control method, we predict the future state to compute the OCP ahead, which can eliminate the effect of the delay.}
\label{fig:mcmthesis-logo}
\end{figure}
Though MPC has showed the great optimal control performance, solving the OCP periodically brings relatively heavy computation which results difficulties for implementing the controller to the real systems. Moreover, when the delay appears, the system has to hold the control input until the update of the new computational control input. In this process, the manipulator system, with the target position approaching or the reference tracking tasks, may break the constraints even though become unstable. To apply this controller into fast dynamic systems and resource-limited platforms, there are many impressive works to decrease the computation load and improve the response speed, which can be summarized as two aspects: reducing the computational complexity and decreasing the solving frequency of the OCP. In the work of Han and Tedrake \cite{Han9196824}, the method of piecewise linear affine approximations is adopted for dexterous robotic manipulation to accomplish the task with non-smooth nonlinear system and large external disturbances. Except the linearized model, shortening the prediction horizon is a effect way to reduce the computation time of the OCP in \cite{GRIFFITH2018109,lizhao9007513}. To decrease the solving frequency, event-triggered MPC \cite{hashimoto2017event} and self-triggered MPC \cite{brunner2016robust} have been one of well-developed control methods with increasing concern. In the work of Li and Liu \cite{LiS14a,liu8010327}, the framework of event-triggered MPC for continuous-time nonlinear systems is studied. By this framework, the authors in \cite{zhao2019event} develop an event-triggered decentralized tracking control with MPC for modular reconfigurable robots.
However, whatever the reduced complexity or the decreased frequency, the computation time of solving the OCP in single step is still too long to satisfy the short control period in fast systems, which causes the delay between the sampling and the input. Due to the prediction property of MPC, some references have tried to eliminate the delay by asynchronous sampling and input. In the work of \cite{zavala2009advanced}, the authors proposed the advanced-step nonlinear MPC controller to predict the next nominal system states. However, the next nominal system states deviated from the real states due to the disturbances which caused the inaccurate prediction. The authors in \cite{SU20131342} developed a dual time scale control scheme for linear/nonlinear systems with external disturbances. In this scheme, a pre-compensator and an outer MPC controller updates the control at different frequency to suppress uncertainty and ensure stability while the open-loop optimal control performance can not be guaranteed. By the characters of feed-forward action, the current control action can be calculated from the previous sampling interval for LPV model with bounded disturbance in \cite{HU202059}. In the work of \cite{lan20205235}, based on future state prediction, the MPC policy is executed in advance at current instant with the guarantee of recursive feasibility and closed-loop stability.
Motivated by these facts, we propose a novel robust tube-based smooth-MPC for nonlinear systems with constraints and disturbances, which can ensure the smoothness of the control process without potential performance degradation (Fig. 1). Different from previous works, the next real states can be predicted by multi-sampling steps, reducing the computational delay of our MPC. Further, our control strategy combines the piecewise linearization and the tube MPC, which shortens the computation time in a single control period and improves the robustness of the system. The main contributions of this work are three-fold:
(i) By deducing the deviation bound of the states in the real system and the nominal system, we give the predictive disturbed state set for the next real states as the initial condition for the next OCP at the current instant. Thus, we can start solving the next triggered OCP ahead and use the optimal results for next triggering instant to avoid the delay.
(ii) The technology of piecewise linearization in nonlinear systems is adopted to decrease the computational complexity of the OCP. Moreover, the bound of linearization error is estimated to ensure the similarity of the linear system and the nonlinear system.
(iii) Theoretical analysis on the recursive feasibility and closed-loop stability shows the effectiveness of our method.
\emph{Notation}: $\mathbb{N}$ and $\mathbb{R}$ are the natural integers and the real numbers. $\mathbb{R}^n$ means the $n$-dimension vector space. For a matrix $M$, $M\preceq0$ denotes that the real parts of all eigenvalues of $M$ are negative. For a vector $x$, $\|x\| \triangleq \sqrt{x^Tx}$ and $\|x\|_P$ with the positive definite matrix $P$ means $\|x\|_P\triangleq\sqrt{x^TPx}$. If a vector is shown as $\textbf{x}(t)$, it is a sequence $\{x(t),x(t+1),\ldots\}$. $(k+i|k)$ indicates a prediction of a variable $i$ steps ahead from time $k$. We use $\bar{\cdot}$ to mean a feasible variable satisfying all constraints and $\cdot^*$ as an optimal variable obtained by solving OCP. For any set $\mathcal{A},\mathcal{B}\in R^{n\times n}$, $\mathcal{A}\oplus\mathcal{B}$ is the Minkowski set addition, which means $\mathcal{A}\oplus\mathcal{B}\triangleq\{a+b|a\in\mathcal{A},b\in\mathcal{B}\}$ and $\mathcal{A}\ominus\mathcal{B}$ is thePontriagin set subtraction, which means $\mathcal{A}\ominus\mathcal{B}\triangleq\{a|\forall b\in\mathcal{B},a+b\in\mathcal{A}\}$.
\section{Problem Formulation}
\subsection{System Description}
In this paper, we consider a nonlinear three-link manipulator system with constraints and disturbances as follows
\begin{eqnarray}\label{sys}
\dot{z} = f(z,u)+e.
\end{eqnarray}
For this model, the manipulator has three revolute joints and three angular velocity controls in plane motion. Then, for the end operator point planning of the manipulator, the kinematics dynamic can be written as
\begin{eqnarray}\label{realsys}
\begin{bmatrix} \dot{x} \\ \dot{y} \\ \dot{\theta_1} \\ \dot{\theta_2} \\ \dot{\theta_3} \end{bmatrix}=
T(\theta)
\begin{bmatrix} \omega_1 \\ \omega_2 \\ \omega_3 \end{bmatrix} + \begin{bmatrix} e_1 \\ e_2 \\ e_3 \\ e_4\\ e_5 \end{bmatrix},
\end{eqnarray}
where $T(\theta)$ is defined as
\begin{eqnarray*}
T(\theta)=
\begin{bmatrix} -L_1 \sin(\theta_1) & -L_2 \sin(\theta_2) & -L_3 \sin(\theta_3) \\ L_1 \cos(\theta_1) & L_2 \cos(\theta_2) & L_3 \cos(\theta_3) \\
1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1
\end{bmatrix}.
\end{eqnarray*}
In this model, $z(t)\triangleq(p(t),\theta(t))$ is the system states and $u(t)\triangleq(\omega_1(t),\omega_2(t),\omega_3(t))$ is the control input. $p(t)=(x(t),y(t))$ is the coordinate of the end point and $\theta(t)=(\theta_1(t),\theta_2(t),\theta_3(t))$ is the joint angle. $L_1,L_2,L_3$ are the length of the three links, respectively. $(\omega_1(t),\omega_2(t),\omega_3(t))$ is the corresponding angular velocity at each joint. For this nonlinear system, $e(t) = (e_1(t),\ldots,e_5(t)) \in \mathbb{R}^5\cap\{0\}$ means the additional disturbances which is bounded as $\|e(t)\|\leqslant\eta_1$, where $\eta_1>0$ is a known constant. In the real control process, the system within the mechanical limitations is subjected to the following hard constraints on the control inputs and states as
\begin{eqnarray}
&z(t) \in \mathbb{Z} \subseteq \mathbb{R}^5 \triangleq \{\theta_i: \underline{\theta_i}\leqslant\|\theta_i\|\leqslant\overline{\theta_i}\}, \\
& u(t) \in \mathbb{U} \subseteq \mathbb{R}^3 \triangleq \{\omega_i: \|\omega_i\|\leqslant\overline{\omega_i}\},
\end{eqnarray}
where $\underline{\theta_i}$, $\overline{\theta_i}$ and $\overline{\omega_i}$ are three known positive constants. Beside, we introduce the nominal system of (\ref{sys}) as \begin{eqnarray}\label{nonminalsys}\label{nominalsys}
\dot{z} = f(z,u),
\end{eqnarray}
to obtain the robustness by this deterministic system and the original system.
\subsection{Control Objective}
The control objective is to move the end point from initial position to a desired final position within a reference trajectory. In order to guarantee the satisfaction of various constraints and optimal control performance, we first introduce conventional robust MPC to complete this task. Define $T$ as the prediction horizon. At each sampling instant $t_k$, the conventional MPC solves an OCP to obtain an optimal control sequence $\mathbf{u}^*(t|t_k)$, where $t\in[t_k,t_k+T]$. Thus, we consider the cost function over the prediction horizon as
\begin{eqnarray}
J(\bar{z}(t|t_k),\mathbf{\bar{u}}(t|t_k),t_k) \!\!\!\!&=&\!\!\!\! \int^{t_k+T}_{t_k} \!\!\!\!L(\bar{z}(t|t_k),\bar{u}(t|t_k))dt \nonumber \\
&&\quad \quad+ V_f(\bar{z}(t_k+T|t_k)),
\end{eqnarray}
where $L(\bar{x}(t|t_k),\bar{u}(t|t_k)) = \|\bar{z}(t|t_k)\|^2_Q + \|\bar{u}(t|t_k)\|^2_R$ is the stage cost function and $V_f(z(t_k+T|t_k))=\|\bar{z}(t_k+T|t_k)\|^2_P$ is the terminal penalty cost function. In this function, $Q$ and $P$ are positive semi-definite matrices and $R$ is a positive definite matrix. Then, the OCP 1 can be formulated as
\begin{eqnarray}
\mathbf{u}^*(t|t_k) = {\min_{\mathbf{\bar{u}}(t|t_k)\in \mathbb{U}}} J(\bar{z}(t|t_k),\mathbf{\bar{u}}(t|t_k),t_k),
\end{eqnarray}
subject to
\begin{subequations}
\begin{align}
&\bar{z}(t_k|t_k) = z(t_k), \\
&\dot{\bar{z}}(t|t_k) = f(\bar{z}(t|t_k),\bar{u}(t|t_k)),\\
&\bar{z}(t|t_k) \in \mathbb{Z}\ominus \mathbb{Z}_e(t), \quad \bar{u}(t|t_k)\in \mathbb{U}, \\
&\bar{z}(t_k+T|t_k) \in \mathbb{Z}_\epsilon,\quad t\in[t_k,t_k+T].
\end{align}
\end{subequations}
where $\mathbb{Z}_e(t) = \{z:\|\bar{z}\|\leqslant t\eta(1+l)^t\}$ is the tightened state constraint set in Theorem 1 of Section \uppercase\expandafter{\romannumeral3} to improve the robustness of the system and $\mathbb{Z}_\epsilon = \{z:\|\bar{z}\|_P\leqslant \epsilon, \epsilon>0\}$ is the robust terminal region.\\
\textbf{Key Problem}: Due to the serious delay of single control step for solving the OCP, the controller of robot manipulator system has to keep the control input for the waiting time, which may cause the suboptimality even the instability of the system. Thus, how to ensure the one-to-one correspondence of the real system states and the optimal control input without obvious computational time delay under the framework of MPC is the key improvement of this paper.
\section{Methodology}
In this section, the prediction of the system states is developed and the robust tube-based MPC is designed with theoretical guarantee.
\subsection{Prediction of Real System States}
Firstly, we deliver two lemmas to describe the properties of the robot manipulation system.
\begin{lemma}
The system function $f(z,u)$ is locally Lipschitz continuous with respect to $x$ and $u$. By the control inputs $u_1, u_2\in \mathbb{U}$, for $\forall z_1, z_2 \in \mathbb{X}$ the system satisfies
\begin{eqnarray}
\| f(z_1,u_1)-f(z_2,u_2) \| \leqslant l_1 \|z_1-z_2\| + l_2 \|u_1-u_2\|,
\end{eqnarray}
where $l_1=\max\{L_1,L_2,L_3\}$ and $l_2=1$ are the Lipschitz constants of the nonlinear system (\ref{sys}).
\end{lemma}
By the system model, the results are obvious and the nonlinearity of the system can be compressed by the constants $l_1$ and $l_2$, which gives the inspiration for the state prediction.
\begin{lemma}
For the nonlinear system function $f(z,u)$, \\
(i) the function $f: \mathbb{R}^n \times \mathbb{R}^m \rightarrow \mathbb{R}^n$ is a twice continuously differentiable function and $f(0,0)=0$;\\
(ii) the system model can be linearized at the each instant $t_k$ and the system matrices has the formulations as follows
\begin{eqnarray}
A_{t_k} = \frac{\partial f}{\partial z}\big|_{(z(t_k),u(t_k))},\quad B_{t_k} = \frac{\partial f}{\partial u}\big|_{(z(t_k),u(t_k))}.
\end{eqnarray}
Then, the linear system is formulated as
\begin{eqnarray}\label{linearsystem}
\dot{z} = A_{t_k}z(t) + B_{t_k}u(t) +e_t.
\end{eqnarray}
(iii) considering the piece control interval $[t_k,t_{k+1}]$, the Hessian matrix $\nabla^2 f(x,u)$ is bounded as
\begin{eqnarray}
\|\nabla^2 f(x(t),u(t))\| = \begin{vmatrix} \frac{\partial^2 f}{\partial z^2} & \frac{\partial^2 f}{\partial z \partial u} \\ \\ \frac{\partial^2 f}{\partial u \partial z} & \frac{\partial^2 f}{\partial u^2} \end{vmatrix}_{(z(t),u(t))} \leqslant \eta_R,
\end{eqnarray}
where $t\in[t_k,t_{k+1}]$.
\end{lemma}
\begin{proof}
By the nominal system $f(z,u)$, we can easily prove (i). For (ii) and (iii), the linear system matrices are defined as
\begin{equation*}
A\!\!=\!\!
\left[
\begin{array}{c|ccc}
\textbf{0}_{2\times2} & -\omega_1{L}_{1}\cos{\theta}_{1} & -\omega_2{L}_{2}\cos{\theta}_{2} & -\omega_3{L}_{3}\cos{\theta}_{3} \\
& -\omega_1{L}_{1}\sin{\theta}_{1} & -\omega_2{L}_{2}\sin{\theta}_{2} & -\omega_3{L}_{3}\sin{\theta}_{3} \\ \hline
\textbf{0}_{3\times2} & & \textbf{0}_{3\times3} & \\
\end{array}
\right]
\end{equation*}
\begin{eqnarray*}
B=
\left[
\begin{array}{ccc}
-L_1\sin\theta_1 & -L_2\sin\theta_2 & -L_3\sin\theta_3\\
L_1\cos\theta_1 & L_2\cos\theta_2 & L_3\cos\theta_3\\ \hline
& \textbf{\emph{I}}_{3\times3} & \\
\end{array}
\right],
\end{eqnarray*}
where $\textbf{\emph{I}}_{3\times3}\in\mathbb{R}^{3\times 3}$ is the identity matrix.
Thus, substitute the states $(z(t_k),u(t_k))$ into $(A,B)$ and we can verify (ii) and (iii). For the Hessian Matrix $H(z,u)$, the system models are smooth functions without cuspidal points in the piecewise control closed interval, which ensure the existence of the bound $\eta_R$.
\end{proof}
By this lemma and the second-order expansion of Taylor Polynomial, we consider the linearization of the nonlinear system model (\ref{sys}) at each triggering interval, i.e., $t\in[t_k,t_{k+1}]$,
\begin{eqnarray}\label{linearation}
f(z(t),u(t)) \!\!\!\!\!\!&=&\!\!\!\!\!\! f(z(t_k),u(t_k)) + A_{t_k}\big[z(t)-z(t_k)\big] \nonumber \\
&+&\!\!\!\!\!\!B_{t_k}\big[u(t)-u(t_k)\big] +R(z(t_k),u(t_k)) \nonumber \\
&=&\!\!\!\!\!\! A_{t_k}z(t)\!\!+\!\!B_{t_k}u(t) \!\!+\!\! \Omega \!\!+\!R(z(t_k),u(t_k)).
\end{eqnarray}
In this equation, $\Omega$ is a constant vector as the system error at the point $(z(t_k),u(t_k))$,
\begin{eqnarray}\label{omega}
\Omega = f(z(t_k),u(t_k))-(A_{t_k}z(t_k)+B_{t_k}u(t_k)).
\end{eqnarray}
Especially, $R(z(t_k),u(t_k))$ is the Lagrange Remainder of the linearization error as
\begin{eqnarray}\label{lagranre}
R(z(t_k),u(t_k)) = \nabla^2f[(z(t)-z(t_k)),(u(t)-u(t_k))] \nonumber \\
\cdot f[z(t_k)+\theta(z(t)-z(t_k)),u(t_k)+\theta(u(t)-u(t_k))],
\end{eqnarray}
where $\nabla^2f$ is the Hessian matrix of the pair $(z(t_k),u(t_k))$, $\theta\in(0,1)$ is a constant and $t\in[t_k,t_{k+1}]$. Thus, by the mean value theorem, we can obtain the bound of the Hessian matrix $\nabla^2 f(z,u)$ at each piece interval, which means that the linearization error of the nonlinear system is bounded as
\begin{eqnarray}\label{linearbound}
\|\Omega+R(z(t_k),u(t_k))\| \!\!\!& \leqslant &\!\!\! \|\Omega\|+\eta_R\Big[l_1\|z(t)-z(t_k)\| \nonumber \\
&& \quad\ +l_2\|u(t)-u(t_k)\|\Big] \nonumber \\
&\triangleq& \eta_2.
\end{eqnarray}
Recalling the system (\ref{sys}), we can add this linearization error to the additional disturbances as a total disturbances. Thus, the total disturbances $w_t$ of the system model contains two parts with an upper bound $\eta$, that is
\begin{eqnarray}
\|w_t\| &=& \|e(t)\| + \|\Omega + R(z(t),u(t))\|, \nonumber\\
&\leqslant& \eta_1 + \eta_2 \nonumber\\
&\triangleq& \eta,
\end{eqnarray}
which supplies the theoretical reliability for transforming the perturbed nonlinear system as a linear system with bigger bounded disturbances. Based on the current system states and the nominal system, we can predict the region of the m-steps future states $x(t_k+m)$ by the upper bound of the total disturbances and the nominal states $x^*(t_k+m|t_k)$, which is shown in the following theorem.
\begin{theorem}
Beyond the same control input $\mathbf{\bar{u}}^*(t_k)$, the state deviation between the nominal system and the real system from $t_k$ to $t_k+m$ is bounded by
\begin{eqnarray}
\|z_e(t_k+m)\|\leqslant m\eta(1+l)^{m}, \quad m \in [0,T],
\end{eqnarray}
where $l=l_1+1$, $\eta$ is the total disturbances and $z_e(t_k+m) \triangleq z(t_k+m)-z^*(t_k+m|t_k)$ is the deviation between the nominal system and the real disturbed system.
\end{theorem}
\begin{proof}
Let $g(z,u)=f(z,u)-x$ and we easily have
\begin{eqnarray}
\|g(z_1,u)-g(z_2,u)\| \leqslant (l_1+1)\|z_1-z_2\|.
\end{eqnarray}
For the real system states with discrete-time formalization, we have as
\begin{eqnarray}
z(t_k+i+1)-z(t_k+i)\!\!\!&=&\!\!\!g(z(t_k+i),u^*(t_k+i|t_k)) \nonumber \\
&&\quad+w(t_k+i).
\end{eqnarray}
By this recursion formula, summing up from $i=0$ to $i=m-1$ yields
\begin{eqnarray}
z(t_k+m) = z(t_k) \!\!\!&+&\!\!\! \sum_{i=0}^{m-1}g(z(t_k+i),u^*(t_k+i|t_k)) \nonumber \\
&&\quad \ +w(t_k+i).
\end{eqnarray}
Analogously, we have the same formulation for the nominal system as
\begin{equation}
z^*(t_k+m|t_k) \\
= z^*(t_k|t_k) + \sum_{i=0}^{m-1}g(z^*(t_k+i|t_k),u^*(t_k+i|t_k)).
\end{equation}
Let $l=l_1+1$. Thus, the deviation of $z(t_k+m)$ and $z^*(t_k+m|t_k)$ holds that
\begin{eqnarray}
&&\|z(t_k+m)-z^*(t_k+m|t_k)\| \nonumber\\
&&=\|\sum_{i=0}^{m-1}\Big[g(z(t_k+i),u^*(t_k+i|t_k))-g(z^*(t_k+i|t_k), \nonumber\\
&&\quad \quad \quad \quad u^*(t_k+i|t_k))\Big]+\sum_{i=0}^{m-1}w(t_k+i)\| \nonumber\\
&& \leqslant m\eta + (l+1)\sum_{i=0}^{m-1}\|z(t_k+i)-z^*(t_k+i|t_k)\|.
\end{eqnarray}
Applying Gronwall-Bellman inequality, it holds that
\begin{eqnarray}
&&\|z(t_k+m)-z^*(t_k+m|t_k)\| \nonumber\\
&& \quad\quad\quad\quad \leqslant m\eta + \sum_{i=0}^{m-1}lm\eta\prod_{j=i+1}^{m-1}(1+l), \nonumber\\
&& \quad\quad\quad\quad = m\eta(1+l)^m.
\end{eqnarray}
The proof is completed.
\end{proof}
Based on this theorem, we suppose that the upper bound of computational time for solving the OCP is $m$, where $m\in[0,T]$ is a constant by repeated trials. By triangle inequality, the future real system states can be bounded as
\begin{eqnarray}\label{realcon}
\|z(t_k+m)\| \leqslant \|z^*(t_k+m|t_k)\| + m\eta(1+l)^m.
\end{eqnarray}
Referring to the definition of disturbed invariant set, we can replace (\ref{realcon}) as
\begin{eqnarray}\label{predisinvset}
\|z(t_k+m)\| \in \mathbb{Z}_{\omega}(z^*(t_k),m),
\end{eqnarray}
where $\mathbb{Z}_{\omega}(z^*(t_k),m)$ means that from the nominal states $z^*(t_k)$, we can predict the future optimal system states $z^*(t_k+m)$ and the radius $m\eta(1+l)^m$ of the disturbed invariant set so that the real states $z(t_k+m)$ can be limited in the $\mathbb{Z}_{\omega}(x^*(t_k),m)$, named predictive disturbed state set.
\subsection{Robust Tube-based Smooth-MPC}
For the conventional robust MPC, the following lemma gives a foundational theory framework to ensure the recursive feasibility and closed-loop stability.
\begin{lemma}
For the nominal linear system, MPC is of recursive feasibility and closed-loop stability if\\
(i) the OCP has a feasible solution at the initial instant $t_0$;\\
(ii) there is a local stabilizing controller $\kappa_f(z)$ in the robust terminal region to satisfy the constraint $\forall z \in \mathbb{Z}_\epsilon, \kappa_f(z) \in \mathbb{U}$ such that
\begin{eqnarray}
\dot{V_f}(\bar{z}(t))\leqslant -L(\bar{z}(t),\kappa_f(\bar{z}(t))).
\end{eqnarray}
Moreover, if the controller is chosen as $\kappa_f(z) = Kz$, we have the Lyapunov equation of the weight matrices $Q$, $R$ and $P$, that is
\begin{eqnarray}\label{riccadi}
(A+BK)^TP+P(A+BK)\leqslant -Q^*,
\end{eqnarray}
where $Q^*=Q+K^TRK$.
\end{lemma}
\begin{algorithm}[htpb]\label{def alg1}
\caption{the Robust Tube-Based Smooth-MPC}
\begin{algorithmic}[1]
\State \emph{Offline}: Initialize the parameters $m$, $l$ of system (\ref{sys}) and set the weight matrices $Q$ and $R$. By (\ref{riccadi}), compute the terminal state feed-back gain $K$ and the weight matrix $P$. Then, defining the terminal set to satisfy (\ref{terminal}). Find the optimal solution $v^*(t_0)$ for the initial state $z(t_0)$.
\State \emph{Online}:\\ for each triggering time $t_k, k=1,2,3,\ldots$
\State \quad \quad (i) Apply the first $m$ elements of the optimal control sequence $v^*(t_{k-1})$ to (\ref{tubempc}) for the real system.
\State \quad \quad (ii) Measure the current state $z(t_k)$ and compute the predictive state $z^*(m|t_k)$ by the nominal nonlinear model (\ref{nonminalsys}) and the last optimal control sequence $v^*(t_{k-1})$. Then, estimate the predictive disturbed state set $\mathbb{Z}_{\omega}(z^*(t_k),m)$.
\State \quad \quad (iii) Based on the state $z^*(m|t_k)$, linearize the model (\ref{nonminalsys}) to obtain system matrices $A_{t_k}$ and $B_{t_k}$ and compute the local state feed-back gain $K_{t_k}$ as (\ref{riccdilocal}).
\State \quad \quad (iv) Solve the OCP 2 to obtain the optimal control sequence $v^*(t_k)$ for the next triggering instant $t_{k+1}$.
\State \quad \quad ((ii) to (iv) are synchronous with (i))
\State \quad \quad (v) Let $k = k+1$.
\end{algorithmic}
\end{algorithm}
Because the OCP 1 has to be solved at each sampling instant and the first element of the control sequence is used to control the real systems, which causes the computational delay and the suboptimality of the control input. Thus, we redefine the control period to adapt the delay as
\begin{eqnarray}
t_{k+1}-t_k = \Delta t =m\delta, \quad m\in\mathbb{N}_{\geqslant 1},\quad m \leqslant T/\Delta t,
\end{eqnarray}
Then, for each control interval $t\in[t_k,t_{k+1}]$, the optimal control $\mathbf{u}^*(t_k)$ can be used from $u^*(t_k|t_k)$ to $u^*(t_k+m|t_k)$ other than only the first element.
By Lemma 2, we can linearize the robot manipulator system with the linearization error. Thus, the system can be modeled in the interval $t\in[t_k,t_{k+1}]$ as
\begin{eqnarray}
\dot{z}(t) = A_{t_k}z(t) + B_{t_k}u(t) + w_t.
\end{eqnarray}
With the formulation of tube MPC, the controller $u(t_k)$ is designed as
\begin{eqnarray}\label{tubempc}
u(t|t_k) = v(t|t_k) + K[z(t)-z^*(t|t_k)],
\end{eqnarray}
where $v(t_k)$ is the control decision variable for the linear system and $K$ is the state feed-back gain computed by the Riccati Equation as (\ref{riccadi}) to restrain the bounded disturbances.
Based on the linearization of the nonlinear systems and the predictive disturbed state set, we redefine the optimal control problem 2 (OCP 2), which is formulated
\begin{eqnarray}
\mathbf{v}^*(t|t_k) = {\min_{\mathbf{\bar{u}}(t|t_k)\in \mathbb{U}}} J(\bar{z}(t|t_k),\mathbf{\bar{v}}(t|t_k),t_k),
\end{eqnarray}
subject to
\begin{subequations}
\begin{align}
&z(t_{k+1}|t_k) \in \mathbb{Z}_{\omega}(z^*(t_k),m), \\
&\dot{\bar{z}}(t|t_k) = A_{t_k}\bar{z}(t|t_k)+B_{t_k}\bar{u}(t|t_k),\\
&\bar{z}(t|t_k) \in \mathbb{Z}\ominus \mathbb{Z}_e(t),\ \ \bar{u}(t|t_k)\in \mathbb{U}\ominus K\bar{z}, \\
&\bar{z}(t_k+T|t_k) \in \mathbb{Z}_\epsilon,\quad t\in[t_k,t_k+T]. \label{terminal}
\end{align}
\end{subequations}
where $J(\bar{z}(t|t_k),\mathbf{\bar{v}}(t|t_k),t_k)$, $\mathbb{Z}_e(i)$ and $\mathbb{Z}_\epsilon$ have the same definition with the OCP 1. By solving the OCP 2, we can obtain the optimal control sequence $\mathbf{v}^*(t_k)$. Then, the first $m$ elements of the sequence and the state feed-back gain as (\ref{tubempc}) are applied into the system. Repeating the process, the system states can converge to the neighbor of the equilibrium point, which is summarized in Algorithm 1..
Due to the change of the initial condition of the OCP, the multi-step usage of the optimal control sequence and the unknown disturbances, the feasibility and the stability of the designed control strategy may be lost for the repeated control process. The following theorem are developed to ensure the implementation of the smooth-MPC.
\begin{theorem}
For the discrete-time nonlinear systems (\ref{sys}) with Assumption 1 and Assumption 2, the robust tube-based smooth-MPC is of feasibility and stability if: \\
(i) the local state feed-back gain $K_{t_k}$ satisfies
\begin{eqnarray}
A_{t_k}+B_{t_k}K_{t_k} \preceq 0.
\end{eqnarray}
(ii) the upper bound $\eta$ of the total disturbances and the computational time interval $m$ hold
\begin{eqnarray}
m\eta(1+l)^m \leqslant \sum_{i=0}^{\infty}\|(A+BK)^i\|\eta.
\end{eqnarray}
\end{theorem}
\begin{proof}
For the control strategy, we mainly design three parts: (i) the multi-step usage of the optimal control sequence; (ii) the change of the initial condition for the OCP; (iii) the linearization of the nonlinear system.
Based on the theory framework of tube MPC \cite{LANGSON2004125} for linear systems with constraints and disturbance, the feasibility and the stability of the time-triggered fashion can be ensured. Thus, we can easily prove that (ii) and (iii) are still suitable for smooth-MPC. Here, we introduce the disturbance invariant set $\mathbb{Z}_{\gamma} :=\{z|\|z\|\leqslant \gamma\}$ for each piece linearation of the system, where $\gamma$ is defined as
\begin{eqnarray}
\gamma = \sum_{i=0}^{\infty}\|(A+BK)^i\|\eta,
\end{eqnarray}
Thus, if $\mathbb{Z}_{\omega}(z^*(t_k),m)\in\mathbb{Z}_{\gamma}$ is satisfied, we can ensure the implementation of the framework of tube MPC. For the multi-step usage, if
\begin{eqnarray}
m\eta(1+l)^m \leqslant \sum_{i=0}^{\infty}\|(A+BK)^i\|\eta,
\end{eqnarray}
the state constraint holds that
\begin{eqnarray}
\|z(t_k+m)\|\!\!\!\!&\in&\!\!\!\! \|z^*(t_k+m|t_k)\| \oplus \mathbb{Z}_{\omega}(m) \nonumber \\
&\in&\!\!\!\! \|z^*(t_k+m|t_k)\| \oplus \mathbb{Z}_{\gamma} \nonumber \\
&\in&\!\!\!\! \mathbb{Z} \ominus \mathbb{Z}_{e}(m) .
\end{eqnarray}
Thus, the recursive feasibility can be ensured.
On the other hand, if the state feed-back gain $K_{t_k}$ at each sampling instant satisfies
\begin{eqnarray}\label{riccdilocal}
A_{t_k}+B_{t_k}K_{t_k} \preceq 0,
\end{eqnarray}
the real system states are contained in the disturbance invariant set of the nominal states. Then, by the analysis of the conventional tube MPC, the practical stability of our approach is ensured and the proof is completed.
\end{proof}
\section{Simulation Results}
In this section, we evaluate the efficiency of our proposed control method compared with the other two MPC controller. The first one is the optimal MPC with no computation time at each triggering instant, which represents the optimal control performance. The second control strategy is the time-triggered MPC with the worst delay for each control period, which is widely used in real systems. Consider the three links robot manipulator in a $x-y$ plane as Fig. 1 and the system parameters and the initial condition are set as
\begin{equation}
\left\{
\begin{aligned}
&L_1 = L_2 = \sqrt{5}, \quad L_3 = \sqrt{10} \\
&\theta_1 = \frac{\pi}{2}+\arcsin\frac{2}{\sqrt{5}}, \theta_2 = \frac{\pi}{2}+\arcsin\frac{1}{\sqrt{5}},\\
&\theta_3 = \arcsin\frac{1}{\sqrt{10}},\\
&p = (0,4),
\end{aligned}
\right.
\end{equation}
For this system, the joint pose is defined as the angle from $x$ positive axis to finger phalanx in anti-clockwise direction. The angular velocity of finger phalanx is positive in anti-clockwise rotation direction, on the contrary negative in clockwise rotation direction. The states and inputs constraint are given as
\begin{equation}
\left\{
\begin{aligned}
&\frac{\pi}{2}\leqslant\theta_1\leqslant\pi, 0\leqslant\theta_2\leqslant\pi, 0\leqslant\theta_3\leqslant\frac{\pi}{2}, \\
&-\frac{\pi}{16}\leqslant\omega_1,\omega_2,\omega_3\leqslant\frac{\pi}{16}.
\end{aligned}
\right.
\end{equation}
At last, the upper bound of the total disturbances is set as $\eta = 0.02$ to satisfy Lemma 1 and Theorem 2.
\begin{figure}[htbp]
\centering
\includegraphics[width=1.0\linewidth]{target_point.pdf}
\caption{The comparison of three control method over the Position Tracking task, which contain the state trajectory, position error, cost function value and control input.}
\end{figure}
For the MPC controllers, the sampling time is $\delta = 0.1s$ and the prediction horizon $T=3s$. The weight matrices are defined as $Q = 0.1\textbf{\emph{I}}_{5\times5}$ and $R = 0.01\textbf{\emph{I}}_{3\times3}$, where $\textbf{\emph{I}}$ is the identity matrix. By repeated trials, the computation time is set as $m=4$, which means $t_{k+1}-t_k=0.4s$. The effectiveness of Algorithm 1 and its beneficial features are demonstrated from two tasks.
\subsection{Position Tracking}
We set the desired position of the end point at $(2,6)$. In Fig.2, the three lines represent the end point trajectory for approaching the target point. By comparison, we can find the similarity of the optimal MPC and ours, which are smoother than the time-triggered one to verify the optimal control performance of ours.
\subsection{Trajectory Tracking}
In this task, the end point tracks a specific trajectory by a quarter circle and an oblique line. From Fig. 3, our approach shows the better tracking performance and robustness than the time-triggered one.
\begin{figure}[htbp]
\centering
\includegraphics[width=1.0\linewidth]{trajectory_following.pdf}
\caption{The comparison of three control method over the Trajectory Tracking task, which contain the state trajectory, position error, cost function value and control input.}
\end{figure}
The simulation results show that the designed MPC controller has similar excellent control performance as the optimal MPC in this two tasks using the robot manipulator system, which has less oscillation and better accuracy than time-triggered one. Besides, due to the linearization of the nonlinear system, the average computation time decreases obviously to save computational resource and improve the response speed. Thus, the effectiveness of robust tube-based smooth-MPC is verified.
\section{Conclusion}
In this paper, we aim at eliminating the delay caused by solving the OCP in the robot manipulator systems and propose a novel robust tube-based smooth-MPC to ensure the optimal control performance. We estimated the linearization error as a bounded disturbance to linearize the nonlinear system and reduce the computational complexity of the OCP. Then, the deviation of the nominal system and the real system states is deduced by Lipschitz continuity and triangle inequations to predict the region of the next real states. Based on this two mechanism, the difficulties of the delay for using MPC in fast dynamic systems are dramatically disposed and the optimality of this controller are guaranteed. The experimental results verifies the control performance and the response speed by the proposed smooth-MPC. Our future work will concentrate on the dynamic system of robot manipulator with stochastic disturbances to extend the application of this control method.
\bibliographystyle{IEEEtran}
|
\section{Introduction}
Solving combinatorial optimization problems to optimality is a central object of study in Operations Research, Computer Science, and Mathematics. One way to solve a combinatorial optimization problem is to model it as an integer program (IP),
namely a problem of the form
%
\begin{align}
\begin{split}
\max ~& \ip{c}{x}\\
\textrm{s.t.}~& Ax \le b \\
& x \in \mathbb{Z}^n
\end{split} \tag{IP} \label{IP}
\end{align}
and then use an {IP} solver. The branch-and-bound algorithm, invented by Land and Doig in~\cite{land1960automatic}, is the underlying algorithm implemented in all modern state-of-the-art MILP solvers.
As is well-known, the branch-and-bound algorithm searches the solution space by recursively partitioning it. The progress of the algorithm is monitored by maintaining a tree. Each node of the tree corresponds to a linear program (LP) solved, and in particular, the root-node corresponds to the LP relaxation of the integer program (i.e., the where the constraint $x \in \mathbb{Z}^n$ in \eqref{IP} is removed). After solving the LP corresponding to a node, the feasible region of the LP is partitioned into two subproblems (which correspond to the child nodes of the given node), so that the fractional optimal solution of the LP is not included in either subproblem, but any integer feasible solution contained in the feasible region of the LP is included in one of the two subproblems. This is accomplished by adding an inequality of the form $\pi^{\top} x \leq \pi_0$ to the first subproblem and the inequality $\pi^{\top}x \geq \pi_0 + 1$ to the second subproblem (these two inequalities are referred as a disjunction), where $\pi$ is an integer vector and $\pi_0$ is an integer scalar (see Figure \ref{fig:bb}). The process of partitioning at a node stops if (i) the LP at the node is infeasible, or (ii) the LP's optimal solution is integer feasible, or (iii) the LP's optimal objective function value is worse than an already known integer feasible solution. These three conditions are sometimes referred to as the rules for pruning a node. The algorithm terminates when there are no more ``open nodes'' to process, that is all nodes have been pruned. A branch-and-bound algorithm is completely described by fixing a rule for partitioning the feasible region at each node and a rule for selecting which open node should be solved and branched on next. If the choice of $\pi$ is limited to being the canonical basis vectors $e_j = (0,\ldots,0,1,0,\ldots,0)$ (with the 1 in the $j$-th position), then we call such an algorithm a \emph{simple} branch-and-bound, and without such a restriction on $\pi$ we call the algorithm a \emph{\textbf{general}} branch-and-bound. See ~\cite{wolsey1999integer,conforti2014integer} for more discussion on branch-and-bound and for general background on integer programming.
\begin{figure}[ht]\label{fig:bb}
\centering
\includegraphics[width=0.45\textwidth]{general_bb_pre.png}
\includegraphics[width=0.45\textwidth]{general_bb_post.png}
\caption{The \textbf{left} picture is the initial polytope and the \textbf{right} picture demonstrates the two subproblems as a result of branching on the disjunction $\ip{\pi}{x} \leq \pi_0 \vee \ip{\pi}{x} \geq \pi_0 + 1$. }
\end{figure}
Here we take interest in the size of general branch-and-bound trees. This is because instances requiring an exponential number of nodes to solve using general branch-and-bound are likely to also be challenging for MILP solvers. We hope that this study can provide some intuition on when and why solvers struggle with a MILP instance and how to formulate heuristics to combat these bottlenecks.
\subsection{Known bounds on the size of branch-and-bound trees}
\paragraph{Upper bounds on the size of branch-and-bound trees and ``positive'' results.} In 1983, Lenstra~\cite{lenstra1983integer} showed that integer programs can be solved in polynomial time in fixed dimension. This algorithm can be viewed as a general branch-and-bound algorithm that uses tools from the geometry of numbers, in particular the lattice basis reduction algorithm~\cite{lenstra1982factoring}, to decide on $\pi$ for partitioning the feasible region. Pataki~\cite{pataki2010basis} proved that most random packing IPs (i.e., where $A$ and $b$ in \eqref{IP} are non-negative) can be solved at the root-node using a partitioning scheme similar to the one proposed by Lenstra~\cite{lenstra1983integer}. It has been observed that using such general partitioning rules can result in significantly smaller trees than using a simple branch-and-bound for some instances~\cite{aardal2000market,gerardGeneralBranching}, but most commercial solvers use the latter.
Recently, we showed~\cite{dey2021branch} that for certain classes of random integer programs the simple branch-and-bound tree has polynomial size (number of nodes), with good probability. See also~\cite{borst2020integrality} for nice extensions of this direction of results. Beame et al.~\cite{beame2018stabbing} recently studied how branch-and-bound can give good upper bounds for certain SAT formulas.
\paragraph{Lower bounds on the size of branch-and-bound trees and connections to the size of cutting-plane algorithms.}
Jeroslow~\cite{jeroslow1974trivial} and Chv\'atal~\cite{ chvatal1980hard} present examples of integer programs where every \emph{simple} branch-and-bound algorithm for solving them has an exponential-size tree.
However, these instances can be solved with small (polynomial-size) \emph{general} branch-and-bound trees; see Yang et al.~\cite{yang2021multivariable} and Basu et al.~\cite{basu2020complexity2}. Cook et al. \cite{cook1990complexity} present a TSP instance that requires exponential-size branch-and-\emph{cut} trees that uses simple branching (recall that branch-and-cut is branch-and-bound where one is allowed to add cuts to the intermediate LPs). Basu et al.~\cite{basu2020complexity} compare the performance of branch-and-bound with the performance of cutting-plane algorithms, providing instances where one outperforms the other and vice-versa. In another paper, Basu et al.~\cite{basu2020complexity2} compare branch-and-bound with branch-and-cut, providing instances where branch-and-cut solves the instance in exponentially fewer nodes than branch-and-bound. They also present a result showing that the sparsity of the disjunctions can have a large impact on the size of the branch-and-bound tree required to solve a given problem.
Beame et al. \cite{beame2018stabbing} asked as an open question whether there are superpolynomial lower bounds for general branch-and-bound algorithm. Dadush and Tiwari~\cite{dadush2020complexity} settled this in the affirmative. In particular, they show that any general branch-and-bound tree that proves the integer infeasibility of the so-called cross-polytope in $n$-dimensions has at least $\frac{2^n}{n}$ leaf nodes. They also note that the cross-polytope has an exponential number of defining inequalities, a fact crucially used in their proof, and pose the open question of whether there is such an exponential lower bound for a polytope described by a polynomial number of defining inequalities.
Concurrent to the development of our work, Fleming et al. \cite{fleming2021power} showed a fascinating relationship between general branch-and-bound proofs and cutting-plane proofs using Chv\'atal-Gomory (CG) cutting-planes:
\begin{thm}[Theorem 3.7 from \cite{fleming2021power}]
Let $P \subseteq [0,1]^n$ be an integer-infeasible polytope and suppose there is a general branch-and-bound proof of infeasibility of size $s$ and with maximum coefficient $c$. Then there is a CG proof of infeasibility of size at most
$$s(cn)^{\log s}.$$
\end{thm}
The following simple corollary allows one to infer exponential lower bounds for branch-and-bound trees for polytopes for which we have exponential lower bounds for CG proofs.
\begin{cor}\label{cor:sp_eq_cp}
Let $P \subseteq [0,1]^n$ be an integer-infeasible polytope such that any CG proof of integer-infeasibility of $P$ (see Definition \ref{def:abstract_bb}) has length at least $L$. Then any general branch-and-bound proof of integer-infeasibility of $P$ with maximum coefficient $c$ has size at least
$$L^{\frac{1}{1 + \log(cn)}}.$$
\end{cor}
The above result makes progress in answering questions raised in Basu et al.~\cite{basu2020complexity} related to the comparison between the size of general branch-and-bound trees and the size of CG proofs.
Moreover, Pudlak \cite{pudlak1997lower} and Dash \cite{dash2005exponential} provide exponential lower bounds for CG proofs for the ``clique vs. coloring'' problem, which is of note since this problem is defined by only polynomially-many inequalities. Thus, Corollary~\ref{cor:sp_eq_cp} taken together with results in \cite{pudlak1997lower} and \cite{dash2005exponential} also settles the question raised in Dadush and Tiwari~\cite{dadush2020complexity} as long as the maximum coefficient in the disjunctions used in the tree is bounded by a polynomial in $n$.
\subsection{Contributions of this paper and relationship to existing results}
\paragraph{Contributions.}
We construct an instance of packing-type and a set-cover instance such that any general branch-and-bound tree that solves these instances must be of exponential (with respect to the ambient dimension) size. We note that the packing and covering instances are described using an exponential number of constraints, and so unfortunately this does not settle the question raised by Dadush and Tiwari~\cite{dadush2020complexity}. We also present a simple proof that any branch-and-bound tree proving the integer infeasibility of the cross-polytope in $n$ dimensions must have $2^n$ leaves. We then extend this result to give (high-probability) exponential lower bounds for perturbed instances of the cross-polytope where independent Gaussian noise is added to the entries of the constraint matrix. To our knowledge this is the first result that shows that a ``smoothed analysis''~\cite{roughgardenBook} polynomial upper bound on the size of branch-and-bound trees is not possible.
Finally, we show an exponential lower bound on the size of any general branch-and-bound tree for the Traveling Salesman Problem (TSP).
\paragraph{Comparison to previous results.}
We now discuss our results in the context of the recent landscape, in particular with the results of \cite{dadush2020complexity} and \cite{fleming2021power}.
\begin{enumerate}
\item \emph{New problems with exponential lower bounds on the size of general branch-and-bound tree:} As mentioned earlier, recently Dadush and Tiwari~\cite{dadush2020complexity} provided the first exponential lower bound on the size of general branch-and-bound tree for the cross-polytope. The other additional result, Corollary \ref{cor:sp_eq_cp} from \cite{fleming2021power}, only implies branch-and-bound lower bounds for polytopes for which we already have CG hardness. These come few and far between in the existing literature, and these instances are often a bit artificial; see \cite{pudlak1997lower} and \cite{dash2005exponential}. In contrast, in this paper we provide lower bounds for the size of general branch-and-bound tree for packing and set-cover instances, which are more natural combinatorial problems than those mentioned above.
\item \emph{Improved quality of bounds:} Dadush and Tiwari~\cite{dadush2020complexity} show that any branch-and-bound proof of infeasibility of the cross-polytope has at least $\frac{2^n}{n}$ leaves. We improve on this result by providing a simple proof that any such proof of infeasibility must have $2^n$ leaves.
Chvatal et al. \cite{chvatal1989cutting} provide a $\frac{1}{3n}2^{n/8}$ lower bound on CG proofs for TSP. Combined with Corollary~\ref{cor:sp_eq_cp}, this can be used to show a lower bound of $2^{O\left({\frac{n}{\log c n}}\right)}$ for branch-and-bound trees for TSP using maximum coefficient $c$ for the disjunctions. We are able to achieve a stronger lower bound of $2^{\Omega(n)}$.
\item \emph{Removing the dependence on the maximum coefficient size used in the branch-and-bound proof:} The bound given in Corollary \ref{cor:sp_eq_cp} depends on the maximum coefficient size used in the branch-and-bound proof. In \cite{fleming2021power}, the authors mention that they ``view this as a step toward proving [branch-and-bound] lower bounds (with no restrictions on the [coefficient sizes])''. Our results satisfy this property, as none of the bounds presented in this work depend on the coefficients of the inequalities of the general branch-and-bound proof.
\end{enumerate}
Finally, the results presented here can be easily combined with Theorem 1.14 of \cite{basu2020complexity2} to apply to branch-and-cut proofs. In particular, our results imply exponential lower bounds, for the polytopes shown here, on the size of branch-and-cut proofs that are allowed to branch on split disjunctions and employ any cutting-plane paradigm that is ``not sufficiently different'' from split disjunctive cuts (see \cite{basu2020complexity2} for details).
\subsection{Roadmap and notation}
Since this paper focuses on lower bounds for general branch-and-bound trees (obviously implying lower bounds for simple branch-and-bound tree), we drop the term ``general'' for the rest of the paper. The paper is organized as follows. In Section~\ref{sec:defn} we present the necessary definitions. In Section~\ref{sec:tech_lemmas}, we present key reduction results that allow transferring lower bounds on the size of branch-and-bound trees from one optimization problem to another. In Section~\ref{sec:combinatorial}, we present a lower bound on the size of branch-and-bound trees for packing and set covering instances. In Section~\ref{sec:cross_poly_hard}, we present a lower bound on the size of branch-and-bound trees for the cross-polytope and some other related technical results. In Section~\ref{sec:perturbed_cp}, we show that even after adding Gaussian noise to the coefficients of the cross-polytope, with good probability branch-and-bound still requires an exponentially large tree to prove infeasibility. Finally, in Section~\ref{sec:tsp}, we use results from Section~\ref{sec:cross_poly_hard} and Section~\ref{sec:tech_lemmas} to provide an exponential lower bound on the size of branch-and-bound trees for solving TSP instances.
For a positive integer $n$, we denote the set $\{1, \dots, n\}$ as $[n]$. When the dimension is clear from context, we use the notation $\bm{1}$ to be a vector whose every entry is $1$. Let $C$ be a set of linear constraints of the form $(\pi^i)^{\top} x \le \pi^i_0,~ \forall i \in [m]$. Then let $\{x : C\}$ denote the set of all $x \in [0,1]^n$ such that all of the constraints $C$ are valid for $x$ (i.e. the polytope defined by the set of constraints $C$). Note that for a subset of these constraints $B \subseteq C$, it holds that $\{x : B\} \supseteq \{x : C\}$. Also note that for two sets of constraints $B,C$, it holds that $\{x : B \cup C\} = \{x : B\} \cap \{x : C\}$. Given a set $S$, we denotes its convex hull by $\textup{conv}(S)$. Given a polytope $P \subseteq \mathbb{R}^n$, we denote its integer hull, that is the set $\textup{conv}(P \cap \mathbb{Z}^n)$, as $P_I$. We call $P$ integer-infeasible if $P \cap \mathbb{Z}^n = \emptyset$.
\section{Abstract branch-and-bound trees and notions of hardness}\label{sec:defn}
{In order to present lower bounds on the size of branch-and-bound (BB) trees, we simplify our analysis by removing two typical condition assumed in a BB algorithm -- (i) the requirement that the partitioning into two subproblems (which correspond to the child nodes of the given node) is done in such a way that the optimal LP solution of the parent node is not included in either subproblem, and that (ii) branching is not done on pruned nodes. By removing these conditions, we can talk about a branch-and-bound tree independent of the underlying polytope -- it is just a full binary tree (that is, each node has $0$ or $2$ child nodes). The root-node has an empty set of \emph{branching constraints}. If a node has two child nodes, these are obtained by applying some disjunction $\pi^{\top} x \leq \pi_0 \,\vee\, \pi^{\top}x \geq \pi_0 + 1$, where each of the child nodes adds one of these constraints to its set of branching constraints together with all the branching constraints of the parent node.} Note that here $\pi$ is an \emph{integer} vector and $\pi_0$ an \emph{integer}; we call such disjunctions \emph{legal}. Note that proving lower bounds on the size of such BB trees that solves a given integer program certainly gives a lower bound on the size of BB trees that in addition require (i) and (ii).
Finally, note that since a BB tree is a full binary tree, the total number of nodes of a BB tree with $N$ leaf-nodes is $2N - 1$.
\begin{definition}\label{def:abstract_bb}
Given a branch-and-bound tree $\mathcal{T}$, applied to a polytope $P \subseteq \R^n$, and a node $v$ of the tree:
\begin{itemize}\vspace{-8pt}
\item We denote the number of nodes of the branch-and-bound tree $\mathcal{T}$ by $|\mathcal{T}|$. This is what is termed \emph{the size} of this tree.
\item We denote by $C_v$ the set of branching constraints of $v$ (as explained above, these are the constraints added by the branch-and-bound tree along the path from the root-node to $v$).
\item We call the feasible region defined by the LP relaxation $P$ and the branching constraints at node $v$ the \emph{atom} of this node, i.e., $P \cap \{x : C_v\}$ is the atom corresponding to $v$.
\item We let $\mathcal{T}(P)$ denote the {union of the atoms corresponding to the} leaves of $\mathcal{T}$ when run on polytope $P$, i.e., $\mathcal{T}(P) = \bigcup_{v \in \text{leaves}(\mathcal{T})} (P \cap \{x : C_v\})$.
\item For any $x^* \in P \setminus P_I$, we say that $\mathcal{T}$ \emph{separates} $x^*$ from $P$ if $x^* \not \in \text{conv}(\mathcal{T}(P))$.
\item Given a vector $c \in \mathbb{R}^n$, we say $\mathcal{T}$ solves $\max_{x \in P \cap \mathbb{Z}^n} \ip{c}{x}$ if for all the leaf nodes $v$ of $\mathcal{T}$, one of the following three conditions hold: (i) the atom of $v$ is empty, (ii) there exists at least one
optimal solution of the linear program $\max_{x \,\in\, \textrm{atom of }v}\ip{c}{x}$ that is integral, or (iii) $\max_{x \,\in\, \textrm{atom of }v}\ip{c}{x}$ is at most the objective function value of another atom whose optimal solution is integral.
If $P \cap \mathbb{Z}^n = \emptyset$, note that (ii) and (iii) are not possible, and in this case we use the term ``proves integer-infeasibility'' instead of ``solves'' the problem.
\end{itemize}
\end{definition}
Given a polytope $P \subseteq \mathbb{R}^n$, we define its \emph{BB hardness} as
$$\textit{BBhardness}(P) = \max_{c \in \mathbb{R}^n} \left(\min \left\{| \mathcal{T}| : \mathcal{T} \textup{ solves } \max_{x \in P \cap \mathbb{Z}^n} \ip{c}{x}\right \} \right).$$
Our goal for most of this paper is to provide lower bounds on the BB hardness of certain polytopes.
To get exponential lower bounds on BB hardness for some $P$, we will often present a particular point $x^* \in P \setminus P_I$ such that any $\mathcal{T}$ that separates $x^*$ from $P$ must have exponential size. We formalize this below.
\begin{definition}[BBdepth]
Let $P \subseteq \R^n$ be a polytope and consider any $x^* \in P \setminus P_I$. Let $\mathcal{T}$ be a smallest BB tree that separates $x^*$ from $P$. Then, define $\text{BBdepth}(x^*, P)$ to be $|\mathcal{T}|$.
\end{definition}
\begin{definition}[BBrank]
Define $\text{BBrank}(P) = \max_{x \in P \setminus P_I} \text{BBdepth}(x, P)$.
\end{definition}
\begin{lemma}[BB rank lower bounds BB hardness]\label{lem:rankhardness}
Let $P \subseteq \R^n$ be a polytope. Then, there exists $c \in \R^n$ such that any BB tree solving $\max_{x \in P \cap \mathbb{Z}^n} \ip{c}{x}$ must have size at least $\text{BBrank}(P)$, that is $\text{BBhardness}(P) \geq \text{BBrank}(P)$.
\end{lemma}
\begin{proof}
Let $x^* \in \argmax_{x \in P \setminus P_I} \text{BBdepth}(x, P)$, so that $\text{BBrank}(P) = \text{BBdepth}(x^*, P)$. Since $x^*$ does not belong to the convex set $P_I$, by the hyperplane separation theorem~\cite{barvinok} there exists $c$ with the separation property $\ip{c}{x^*} > \max_{x \in P_I} \ip{c}{x}$. By choice of $x^*$, for any BB tree $\mathcal{T}$ with $|\mathcal{T}| < \text{BBrank}(P)$ it holds that $x^* \in \text{conv}(\mathcal{T}(P))$. Then such tree $\mathcal{T}$ must have a leaf whose optimal LP solution has value at least $\ip{c}{x^*} > \max_{x \in P_I} \ip{c}{x}$, and therefore must still not be pruned, showing that $\mathcal{T}$ does not solve $\max_{x \in P \cap \mathbb{Z}^n} \ip{c}{x}$.
\end{proof}
We now show that, under some conditions, the reverse of this kind of relationship also holds.
We will use this reverse relationship to prove the BB hardness of optimizing over an integer feasible polytope given the BB hardness of proving the infeasibility of another ``smaller" polytope.
\begin{lemma}[Infeasibility-to-optimization]\label{lem:inf_to_opt}
Let $P \subseteq \R^n$ be a polytope and $\ip{c}{x} \le \delta$ be a facet defining inequality of $P_I$ {that is not valid for $P$}. Assume that the affine hull of $P$ and $P_I$ are the same. Then, {there exists $\varepsilon_0 > 0$ such that for every $\varepsilon \in (0, \varepsilon_0]$}
$$\text{BBrank}(P) \geq \text{BBhardness}(\{x \in P : \ip{c}{x} \geq \delta + \varepsilon\}).$$
\end{lemma}
Before we can present the proof of Lemma \ref{lem:inf_to_opt}
we require a technical lemma from~\cite{dash2015relative}. The full-dimensional case $L = \R^n$ is Lemma 3.1 of~\cite{dash2015relative}, and the general case follows directly by applying it to the affine subspace $L$.
\begin{lemma}[\cite{dash2015relative}]\label{lem:height}
Consider an affine subspace $L \subseteq \R^n$ and a hyperplane $H = \{x \in \R^n :\ip{c}{x} = \delta\}$ that does not contain $L$. Consider $\dim(L)$ affinely independent points $s^1, s^2 \dots, s^{\dim(L)}$ in $L \cap H$. Consider $\delta' > \delta$ and let $G$ be a bounded and non-empty subset of $L \cap \{x \in \mathbb{R}^n: \ip{c}{x} \geq \delta'\}$. Then there exists a point $x$ in $\bigcap_{g \in G} \text{conv}(s^1, \dots, s^{\dim(L)}, g)$ satisfying the strict inequality $\ip{c}{x} > \delta$.
\end{lemma}
\begin{proof}[Proof of Lemma \ref{lem:inf_to_opt}]
Let $L$ be the affine hull of $P_I$. Then there exist $d := \dim(P_I) = \dim(L)$ affinely independent vertices of $\{x \in P_I : \ip{c}{x} = \delta\}$. Let $s^1, \dots, s^d$ be $d$ such affinely independent vertices and note that since they are vertices of $P_I$, they are all integral. {Let $\varepsilon_0 := (\max_{x \in P} \ip{c}{x}) - \delta$, and notice that since the inequality $\ip{c}{x} \le \delta$ is not valid for $P$ we have $\varepsilon_0 > 0$. Then for any $\varepsilon \in (0,\varepsilon_0]$,} let $G := \{x \in P : \ip{c}{x} \geq \delta + \varepsilon\}$, {which is then non-empty}. Also notice that $G$ is a bounded set, since $P$ is bounded. Let $N := \text{BBhardness}(G)$.
Let $\mathcal{T}$ be a BB tree such that $|\mathcal{T}| < N$. Then we have that $\mathcal{T}(G) \neq \emptyset$, that is, there exists $x^*(\mathcal{T}) \in \mathcal{T}(G)$. In particular $x^*(\mathcal{T}) \in G$. Moreover, since $G \subseteq P$, we have $\mathcal{T}(G) \subseteq \mathcal{T}(P)$ (see Lemma~\ref{lem:monotonicity} in the next section for a formal proof of this), and so we have $x^*(\mathcal{T}) \in \mathcal{T}(P)$. Also note that since $s^1, \dots, s^d \in P \cap \mathbb{Z}^n$, we have that these points also belong to $\mathcal{T}(P)$. Thus, $$\text{conv}\left(s^1, \dots, s^d, x^*(\mathcal{T})\right) \subseteq \text{conv}(\mathcal{T}(P)).$$
Now applying Lemma~\ref{lem:height}, with $\delta' = \delta + \varepsilon$, we have that there exists $x^*$ such that
\begin{eqnarray}\label{eq:height_eq}
x^* \in \bigcap_{ \mathcal{T}: |\mathcal{T}| < N} \text{conv}\left(s^1, \dots, s^d, x^*(\mathcal{T})\right) \subseteq \bigcap_{ \mathcal{T}: |\mathcal{T}| < N} \text{conv}(\mathcal{T}(P))
\end{eqnarray}
and such that {$\ip{c}{x^*} > \delta$}. Clearly, $x^* \not \in P_I$, since $\ip{c}{x} \leq \delta$ is a valid inequality for $P_I$. Thus, since \eqref{eq:height_eq} implies $x^* \in \text{conv}(\mathcal{T}(P))$ for all $\mathcal{T}$ with $|\mathcal{T}|< N$, we have that $\text{BBdepth}(x^*, P) \geq N$ and consequently, $\text{BBrank}(P) \geq N$.
\end{proof}
\section{Framework for BB hardness reductions}\label{sec:tech_lemmas}
{In this section we present key reduction results that allow transferring lower bounds on the size of BB trees from one optimization problem to another.} We begin by showing monotonicity of the operator $\mathcal{T} (\cdot)$.
\begin{lemma}[Monotonicity of leaves]\label{lem:monotonicity}
Let $Q \subseteq P \subseteq \R^n$ be polytopes. Then $\mathcal{T}(Q) \subseteq \mathcal{T}(P)$.
\end{lemma}
\begin{proof}
For any leaf $v \in \mathcal{T}$, recall that $C_v$ is the set of branching constraints of $v$. Then $\mathcal{T}(Q) = \bigcup_{v \in \text{leaves}(\mathcal{T})} (Q \cap \{x : C_v\}) = Q \cap \bigcup_{v \in \text{leaves}(\mathcal{T})} \{x : C_v\} \subseteq P \cap \bigcup_{v \in \text{leaves}(\mathcal{T})} \{x : C_v\} = \bigcup_{v \in \text{leaves}(\mathcal{T})} (P \cap \{x : C_v\}) = \mathcal{T}(P)$.
\end{proof}
The following corollary follows easily from Lemma \ref{lem:monotonicity}. In particular, consider {a} smallest BB tree $\mathcal{T}$ that separates $x^*$ from $P$. By Lemma \ref{lem:monotonicity}, the same tree, when applied to $Q \subseteq P$, will not have $x^*$ in the convex hull of its leaves and therefore separates $x^*$ from $Q$.
\begin{cor}[Monotonicity of depth]\label{cor:monoton_depth}
Let $Q \subseteq P \subseteq \R^n$ be polytopes. Then for every $x^* \in (Q \setminus Q_I) \cap (P \setminus P_I) = Q \setminus P_I$ we have
$$\text{BBdepth}(x^*, Q) \le \text{BBdepth}(x^*, P).$$
\end{cor}
Inspired by the lower bounds for cutting-plane rank from~\cite{chvatal1989cutting}, we show that integral affine transformations conserve the hardness of separating a point via branch-and-bound, i.e. they conserve BBdepth. Then, we give a condition where BBrank is also conserved. These will be used to obtain lower bounds in the subsequent sections.
We say that $f: \R^n \rightarrow \R^m$ is an \emph{integral affine function} if it has the form $f(x) = Cx + d$, where $C \in \mathbb{Z}^{m \times n}, d \in \mathbb{Z}^m$.
\begin{lemma}[Simulation for integral affine transformations]\label{lem:affine}
Let $P \subseteq \R^n$ be a polytope, $f : \R^n \rightarrow \R^m$ an integral affine function, and denote $Q := f(P) \subseteq \R^m$. Let $\hat{\mathcal{T}}$ be any BB tree. Then, there exists a BB tree $\mathcal{T}$ such that $|\mathcal{T}| = |\hat{\mathcal{T}}|$ and
$$f(\mathcal{T}(P)) \subseteq \hat{\mathcal{T}}(Q).$$
\end{lemma}
\begin{proof}
Let $f(x) = Cx + d$ with $C \in \mathbb{Z}^{m \times n}, d \in \mathbb{Z}^m$. Given a BB tree $\hat{\mathcal{T}}$, we construct a BB tree $\mathcal{T}$ with the desired properties as follows: $\mathcal{T}$ has the same nodes as $\hat{\mathcal{T}}$ but each branching constraint $\ip{a}{y} \leq b$ of $\hat{\mathcal{T}}$ is replaced by the constraint $\ip{C^T a}{x} \leq b - \ip{a}{d}$ in $\mathcal{T}$.
First we verify that $\mathcal{T}$ only uses legal disjunctions: First note that $C^T a \in \mathbb{Z}^n$ and $ b - \ip{a}{d} \in \mathbb{Z}$. If a node of $\hat{\mathcal{T}}$ has $\ip{a}{y} \leq b \ \vee \ \ip{a}{y} \geq b + 1$ as its disjunction, the corresponding node in $\mathcal{T}$ has the disjunction $\ip{C^T a}{x} \leq b - \ip{a}{d}~\vee~\ip{-C^Ta}{x} \leq -b -1 - \ip{-a}{d}$ (notice $\ip{a}{y} \geq b + 1 \,\equiv\, \ip{-a}{y} \leq -b - 1$). Since the second term in the latter disjunction is equivalent to $\ip{C^Ta}{x} \geq b - \ip{a}{d} + 1$, we see that this disjunction is a legal one.
To conclude the proof, we show that $f(\mathcal{T}(P)) \subseteq \hat{\mathcal{T}}(Q)$. Let $S$ be the atom of a leaf $v$ of $\mathcal{T}$ and $\hat{S}$ be the atom of the corresponding leaf $\hat{v}$ of $\hat{\mathcal{T}}$. We show that for all $x \in S$, it must be that $f(x) \in \hat{S}$. To see this, notice that if $x$ satisfies an inequality $\ip{C^T a}{x} \leq b - \ip{a}{d}$ then $f(x)$ satisfies $\ip{a}{f(x)} \leq b$:
$$\ip{a}{f(x)} = \ip{a}{Cx + d}= \ip{a}{Cx} + \ip{a}{d} = \ip{C^T a}{x} + \ip{a}{d} \leq b.$$ Since any $x \in S$ belongs to $P$ and satisfies all the branching constraints of the leaf $v$, this implies $f(x)$ belongs to $Q$ and satisfies all the branching constraints of the leaf $\hat{v}$, and hence belongs to the atom $\hat{S}$. {Therefore, $f(S) \subseteq \hat{S}$. Taking a union over all leaves/atoms then gives $f(\mathcal{T}(P)) \subseteq \hat{\mathcal{T}}(Q)$ as desired.}
\end{proof}
\begin{cor}\label{cor:affine_infeas}
Let $P$, $Q$, and $f$ satisfy the assumptions of Lemma \ref{lem:affine}. Further, suppose $P$ and $Q$ are both integer-infeasible. Then,
$$\text{BBhardness}(Q) \geq \text{BBhardness}(P).$$
\end{cor}
\begin{proof}
Let $\hat{\mathcal{T}}$ be the smallest BB tree such that $\hat{\mathcal{T}}(Q) = \emptyset$. Then, by Lemma \ref{lem:affine}, it must hold that $\mathcal{T}(P) = \emptyset$. The desired result follows.
\end{proof}
\begin{cor}\label{cor:affine_depth}
Let $P$, $Q$, and $f$ satisfy the assumptions of Lemma \ref{lem:affine}. Then for every $x^* \in \R^n$ such that $x^* \not \in P_I$ and $f(x^*) \not \in Q_I$, we have
$$\text{BBdepth}(f(x^*), Q) \geq \text{BBdepth}(x^*, P).$$
\end{cor}
\begin{proof}
Let $\hat{\mathcal{T}}$ be a smallest BB tree that separates $f(x^*)$ from $Q$, and let $\mathcal{T}$ be a tree given by Lemma \ref{lem:affine}. Together with the fact that $f$ is affine, this implies that if $x \in \text{conv}(\mathcal{T}(P))$ then $f(x) \in \text{conv}(\hat{\mathcal{T}}(Q))$: there exists $x^1, ..., x^k \in \mathcal{T}(P) \text{ and } \lambda_1, ..., \lambda_k \in [0,1] \text{ {such that} } \sum_{i \in [k]}\lambda_i = 1$ {and} $x = \sum_{i \in [k]} \lambda_i x^i$. {Thus, }
%
\begin{align*}
&f(x) = C(\sum_{i \in [k]} \lambda_i x^i) + d = \sum_{i \in [k]} \lambda_i (Cx^i) + \sum_{i \in [k]} \lambda_i d\\
&~~ = \sum_{i \in [k]} \lambda_i (Cx^i + d) = \sum_{i \in [k]} \lambda_i f(x^i) \in \text{conv}(\hat{\mathcal{T}}(Q)),
\end{align*}
where the last containment is by definition of $\mathcal{T}$. Since we know $f(x^*) \notin \text{conv}(\hat{\mathcal{T}}(Q))$, this implies that $x^* \notin \text{conv}(\mathcal{T}(P))$, namely $\mathcal{T}$ separates $x^*$ from $P$ as desired.
\end{proof}
\begin{lemma}[Hardness lemma]\label{lem:hardness}
Let $P \subseteq \R^n$ and $T \subseteq \R^m$ be polytopes and $f : \R^n \rightarrow \R^m$ an integral affine function such that $f(P) \subseteq T$. Suppose $f$ is also one-to-one and $T \cap \mathbb{Z}^m \subseteq f(P \cap \mathbb{Z}^n)$. Then,
$$\text{BBrank}(T) \geq \text{BBrank}(P).$$
\end{lemma}
\begin{proof}
First we show that $x \not \in P_I$ implies $f(x) \not \in T_I$ by proving the contrapositive. Suppose $f(x) \in T_I$; then $\exists y^1, ..., y^k \in T \cap \mathbb{Z}^m \text{ and } \lambda_1, ..., \lambda_k \in [0,1] \text{ {such that} } \sum_{i \in [k]}\lambda_i = 1$ {and} $f(x) = \sum_{i \in [k]} \lambda_i y^i$. Since $T \cap \mathbb{Z}^m \subseteq f(P \cap \mathbb{Z}^n)$, for each $i$ there is $x^i \in P \cap \mathbb{Z}^n$ such that $y^i = f(x^i)$.
Then
$$f(x) = \sum_{i \in [k]} \lambda_i f(x^i) = \sum_{i \in [k]} \lambda_i (Cx^i + d) = C\sum_{i \in [k]} \lambda_i x^i + d = f(\sum_{i \in [k]} \lambda_i x^i),$$
and so $f(x)$ belongs to $f(P_I)$. Since $f$ is one-to-one, this implies that $x$ belongs to $P_I$, as desired.
Now let $x^* = \argmax_{x \in P \setminus P_I} \text{BBdepth}(x, P)$. Since $x^* \notin P_I$, by the above claim $f(x^*) \not \in T_I$. By assumption $f(P) \cap \mathbb{Z}^m \subseteq T \cap \mathbb{Z}^m$, and so $(f(P))_I \subseteq T_I$, and therefore $f(x^*) \not \in (f(P))_I$. Then by Corollary \ref{cor:affine_depth} we have $$\text{BBdepth}(f(x^*), f(P)) \geq \text{BBdepth}(x^*, P).$$
Since by assumption $f(P) \subseteq T$, $f(x^*) \in f(P)$, and $f(x^*) \not \in T_I$, by Corollary \ref{cor:monoton_depth} we have $$\text{BBdepth}(f(x^*), T) \geq \text{BBdepth}(f(x^*), f(P)).$$ Putting it all together we get
$$\text{BBrank}(T) = \max_{y \in T \setminus T_I} \text{BBdepth}(y,T) \geq \text{BBdepth}(f(x^*), T) \geq \text{BBdepth}(f(x^*), f(P)) \geq \text{BBdepth}(x^*, P) $$
$$= \max_{x \in P \setminus P_I} \text{BBdepth}(x, P) = \text{BBrank}(P),$$
which concludes the proof of the lemma.
\end{proof}
In the rest of the paper, we will use Corollary~\ref{cor:affine_infeas}, Corollary \ref{cor:affine_depth} or Lemma~\ref{lem:hardness} together with some appropriate affine transformation to reduce the BB hardness of one problem to another. The three affine one-to-one functions we will use (and their compositions) are Flipping, Embedding, and Duplication as defined below.
\begin{definition}[Flipping]\label{defn:flip}
We say $f : [0,1]^n \rightarrow [0,1]^n$ is a \emph{flipping operation} if it ``flips'' some coordinates, that is, there exists $J \subseteq [n]$ such that
$$y = f(x) \implies y_i = \begin{cases}
x_i & \text{if } i \not \in J \\
1 - x_i & \text{if } i \in J
\end{cases}.$$
In other words, $f(x) = Cx + d$, where (recall $e_i$ is the $i$-th canonical basis vector)
$$C^i = \begin{cases}
e_i & \text{ if } i \not \in J \\
-e_i & \text{ if } i \in J
\end{cases}$$
$$d_i = \begin{cases}
0 & \text{ if } i \not \in J \\
1 & \text{ if } i \in J
\end{cases}.$$
\end{definition}
\begin{definition}[Embedding]\label{defn:embed}
We say $f : [0,1]^n \rightarrow [0,1]^{n + k}$ is an \emph{embedding operation} if
$$y = f(x) \implies y_i = \begin{cases}
x_i & \text{if } 1 \leq i \leq n \\
0 & \text{if } n < i \leq n + k_1 \\
1 & \text{if } n + k_1 < i \leq n + k
\end{cases},$$
for some $0 \leq k_1 \leq k$. In other words, $f(x) = Cx + d$, where
\begin{align*}
C^i &= \begin{cases}
e_i & \text{ if } 1 \leq i \leq n \\
0 & \text{ otherwise }
\end{cases}\\
d_i &= \begin{cases}
1 & \text{ if } n+k_1 < i \leq n + k \\
0 & \text{ otherwise }
\end{cases}.
\end{align*}
Note that we can always renumber the coordinates so that the additional coordinates with values $0$ or $1$ are interspersed with the original ones and not grouped at the end.
\end{definition}
\begin{definition}[Duplication]\label{defn:dup}
Consider a $k$-tuple of coordinates $(j_1,...,j_k)$ that are not necessarily distinct, where $j_i \in \{1,...,n\}$ for $i = 1,...,k$. We say that $f : [0,1]^n \rightarrow [0,1]^{n + k}$ is a \emph{duplication operation} using this tuple if
$$y = f(x) \implies y_i = \begin{cases}
x_i & \text{if } 1 \leq i \leq n \\
x_{j_{i - n}} & \text{if } n < i \leq n + k
\end{cases}.$$
Further, let $J_j = \{i \in \{1,...,k\} : y_{n+i} = x_j\}$ be the indices of $y$ that are duplicates of $x_j$. Then, in other words, $f(x) = Cx$ where
$$C^i = \begin{cases}
e_i & \text{ if } 1 \leq i \leq n \\
e_1 & \text{ if } i - n \in J_1 \\
\vdots \\
e_n & \text{ if } i - n \in J_n
\end{cases}$$
\end{definition}
\section{BB hardness for packing polytopes and set-cover}\label{sec:combinatorial}
{In this section, we} will begin by presenting a packing polytope with BBrank of $2^{\Omega(n)}$. The proof of this result will be based on a technique developed by Dadush and Tiwari~\cite{dadush2020complexity}. Then we will employ affine maps that satisfy Lemma \ref{lem:hardness} to obtain lower bounds on BBrank for a set-cover instance.
We present a slightly generalized version of a key result from~\cite{dadush2020complexity}. The proof is essentially the same as of the original version, but we present it for completeness.
\begin{lemma}[Generalized Dadush-Tiwari Lemma]\label{lem:dadush}
Let $P \subseteq \R^n$ be an integer-infeasible non-empty polytope. Further, suppose $P$ is defined by the set of constraints $C_P$ (i.e. $P = \{x : C_P\}$) and let $D \subseteq C_P$ be a subset of constraints such that if we remove any constraint in $D$, the polytope becomes integer feasible (i.e. for all subsets $C \subset C_P$ such that $D \setminus C \not = \emptyset$, it holds that $\{x : C\} \cap {\mathbb{Z}^n} \not = \emptyset$). Then, any branch-and-bound tree $\mathcal{T}$ proving the integer-infeasibility of $P$ has at least $\frac{|D|}{n}$ leaf nodes, that is $|\mathcal{T}| \geq 2\frac{|D|}{n} - 1$.
\end{lemma}
\begin{proof}
Let $\mathcal{T}$ denote any branch-and-bound proof of infeasibility for $P$ and let $N$ denote the number of leaf nodes of $\mathcal{T}$. Suppose for sake of contradiction, that $N < \frac{|D|}{n}$. Consider any leaf node $v$ of $\mathcal{T}$. Let $C_v$ be the set of branching constraints on the path to $v$. Since $v$ is a leaf and $\mathcal{T}$ is a proof of infeasibility, we note $\{x : C_v \cup C_P\} = \{x : C_v\} \cap P = \emptyset$.
By Helly's Theorem~\cite{barvinok}, there exists a set of $n+1$ constraints $K_v \subseteq C_v \cup C_P$ such that $\{x : K_v\} = \emptyset$. Also, we see that
\begin{align}\label{eq:missone}
|K_v \cap C_P| \leq n.
\end{align}
This is because if we had $|K_v \cap C_P| = n+1$, this would imply $K_v \subseteq C_P$, hence $\{x : C_P\} \subseteq \{x : K_v\}$, and since $\{x : K_v\} = \emptyset$; this would imply $\{x : C_P\} = P = \emptyset$, which is clearly a contradiction because we know $P$ is non-empty.
Next, observe that the set $\tilde{P}:= \left\{x: \bigcup_{v \in \text{leaves}(\mathcal{T})} (K_v \cap C_P) \right\}$ is integer-infeasible, because in fact $\mathcal{T}$ certifies this: since $\tilde{P} \cap \{x: C_u\} = \left\{x: C_u \cup \bigcup_{v \in \text{leaves}(\mathcal{T})} (K_v \cap C_P) \right\} \subseteq \{x: K_u\} = \emptyset$ for all $u \in \text{leaves}(\mathcal{T})$.
On other hand, observe that by (\ref{eq:missone}) we have that $|\bigcup_{v \in \text{leaves}(\mathcal{T})} (K_v \cap C_P)| \leq nN < |D|$, {so one of the inequalities in $D$ is not used in the description of $\tilde{P}$ and hence $\tilde{P}$}
contains an integer point, a contradiction. This concludes the proof.
\end{proof}
\subsection{Packing polytopes}\label{sec:packing}
Consider the following packing polytope
$$P_{PA} = \Big\{x \in [0,1]^n : \sum_{i \in S} x_i \leq k - 1 \text{ for all } S \subseteq [n] \textrm{ such that } |S| = k\Big\},$$
where we assume $2 \leq k \leq \frac{n}{2}$.
\begin{lemma}\label{lem:packing}
There exists an $x^* \in P_{PA} \setminus (P_{PA})_I $ such that any branch-and-bound tree that separates $x^*$ from $P_{PA}$ has at least $\frac{2}{n} \left(\binom{n}{k} + 1 \right) - 1$ nodes. Therefore, $\text{BBrank}(P_{PA}) \geq \frac{2}{n} \left(\binom{n}{k} + 1 \right) -1$.
\end{lemma}
The starting point for proving this lemma is the following following proposition.
\begin{proposition}\label{prop:packing_infeas}
{The polytope $Q = P_{PA} \cap \{x : \ip{\bm{1}}{x} \geq k\}$ is integer-infeasible}, and any branch-and-bound tree proving its {integer-}infeasibility has at least $\frac{2}{n} (\binom{n}{k} + 1) - 1$ nodes.
\end{proposition}
\begin{proof}
We show $Q \cap \{0,1\}^n = \emptyset$. Suppose for sake of contradiction there is some $x^* \in Q \cap \{0,1\}^n$. Since $\sum_{i \in [n]} x^*_i \geq k$, there is a set $S \subseteq [n]$ of size $k$ such that $\sum_{i \in S} x^*_i = k$. This violates the cardinality constraint corresponding to $S$, so $x^* \not \in Q$, a contradiction.
{For the lower bound on BB trees that prove the integer-infeasibility of $Q$,} we show that $Q$ satisfies all of the requirements of Lemma \ref{lem:dadush}. First we show that $Q \neq \emptyset$. Consider the point $\hat{x} \in \mathbb{R}^n$ where $\hat{x}_i = \frac{k}{n}$ for $i \in [n]$. Then, for any $S \subseteq [n]$ with $|S| = k$, we have $\sum_{i \in S}\hat{x}_i = k\cdot \frac{k}{n} \leq k \cdot \frac{1}{2} \leq k - 1$, where the last two inequalities are implied by the assumption $2 \leq k \leq \frac{n}{2}$. Also, $\sum_{i \in [n]} \hat{x}_i = k$. Thus, $\hat{x}$ satisfies all the constraints of $Q$.
Next, we show that there is a set of $\binom{n}{k} + 1$ constraints $D$ such that removing any of these constraints makes $Q$ integer feasible. Suppose we remove the constraint $\sum_{i \in S} x_i \leq k - 1$, denote this new polytope $Q'$. Then let $x^*_i = 1$ for all $i \in S$ and $x^*_i = 0$ for all $i \not \in S$. Clearly $\sum_{i \in [n]} x^*_i \geq k$ and since for all $S' \subseteq [n], |S'| = k$ it holds that $|S' \cap S| \leq k - 1$, it is also the case that $\sum_{i \in S'} x^*_i \leq k-1$. So $x^* \in Q' \cap \{0,1\}^n$. Now suppose we remove instead the constraint $\sum_{i \in [n]} x_i \geq k$, resulting in polytope $P_{PA}$. Clearly $P_{PA}$ is down monotone, and therefore $0 \in P_{PA}$.
Therefore, by Lemma \ref{lem:dadush}, any branch-and-bound proof of infeasibility for $Q$ has at least $\frac{2}{n} (\binom{n}{k} + 1) - 1$ nodes.
\end{proof}
Now, combining Proposition \ref{prop:packing_infeas} with Lemma \ref{lem:inf_to_opt}, we are ready to prove Lemma \ref{lem:packing}.
\begin{proof}[Proof of Lemma \ref{lem:packing}]
We will show that $P_{PA}$ and $\ip{\bm{1}}{x} \le k-1$ satisfy the conditions on $P$ and $\ip{c}{x} \le \delta$ set by Lemma \ref{lem:inf_to_opt}. First, $\ip{\bm{1}}{x} \le k-1$ is a valid inequality for $(P_{PA})_I$: this follows from the integer-infeasibility of $Q = P_{PA} \cap \{x : \ip{\bm{1}}{x} \geq k\}$, as proven in Proposition \ref{prop:packing_infeas}. {Also, clearly $\ip{\bm{1}}{x} \le k-1$ is not valid for $P_{PA}$, since it cuts off the point $\hat{x} = \frac{k}{n} \bm{1} \in P_{PA}$.}
In the following paragraph we will show that $\{x \in (P_{PA})_I : \ip{\bm{1}}{x} = k-1 \}$ has dimension $n-1$, that is, $\ip{\bm{1}}{x} \le k-1$ is facet-defining for $(P_{PA})_I$. With this at hand we can apply Lemma \ref{lem:inf_to_opt} to obtain
$$\text{BBrank}(P_{PA}) \geq \text{BBhardness}(P_{PA} \cap \{x : \ip{\bm{1}}{x} \geq k\}) = \frac{2}{n} \left(\binom{n}{k} + 1\right) - 1$$
where the last inequality follows from Proposition \ref{prop:packing_infeas}, which will then prove the lemma.
To show that $\ip{\bm{1}}{x} \le k-1$ is facet-defining, let $T \subseteq [n]$ be such that $|T| = k -1$. Let $\chi(T)$ denote the characteristic vector of $T$, so that $\chi(T)_i = 1$ if and only if $i \in T$. We know that all these points belong to the hyperplane $\{x: \ip{\bm{1}}{x} = k - 1\}$. Thus, there can be at most $n$ affinely independent points among $\{\chi(T)\}_{T \subseteq [n], |T| = k -1}$. We first verify that there are exactly $n$ affinely independent points among $\{\chi(T)\}_{T \subseteq [n], |T| = k - 1}$ by showing that the affine hull of the points in $\{\chi(T)\}_{T \subseteq [n], |T| = k -1}$ is the hyperplane $\{x: \ip{\bm{1}}{x} = k - 1\}$. Consider the system in variables $a,b$:
\begin{eqnarray*}
\ip{a}{\chi(T)} = b,~~~\forall T \subseteq [n] \textrm{ such that } |T| = k- 1.
\end{eqnarray*}
We have to show that all {non-zero} solutions of the above system are a scaling of $(\bm{1}, k -1)$. For that, let $T^1 = \{1, \dots, k - 1\}$ and $T^2:= \{2, \dots, k \}$. Subtracting the equation corresponding to $T^1$ from that of $T^2$, we obtain $a_1 = a_{k}$. Using the same argument by suitably selecting $T^1$ and $T^2$, we obtain: $a_1 = a_2 = \dots = a_n$. Therefore, without loss of generality {(excluding the solution where $a$ is identically 0, since that would lead to $b = 0$)}, we may rescale all the $a_i$'s to $1$. Then we see the only possible value for $b$ is $k -1$. This shows that the only affine subspace containing the points $\{\chi(T)\}_{T \subseteq [n], |T| = k - 1}$ is $\{x: \ip{\bm{1}}{x} = k - 1\}$, in other words, there are $n$ affinely independent points among them. This concludes the proof.
\end{proof}
Finally, {since BB hardness is always at least the BB rank (Lemma \ref{lem:rankhardness}),} Lemma \ref{lem:packing} gives the desired hardness bound.
\begin{cor}
Consider the polytope \mbox{$P_{PA} = \{x \in [0,1]^n : \sum_{i \in S} x_i \leq \frac{n}{2}, \text{ for all } S \subseteq [n] \textrm{ such that } |S| = \frac{n}{2} + 1\}$.} Then, ${\text{BBhardness}}(P_{PA}) \geq 2^{\Omega(n)}$, i.e. there exists a {vector} $c\in \R^n$ such that the smallest branch-and-bound tree that solves $$\max_{x \in P_{PA} \cap \{0,1\}^{n}} \ip{c}{x}$$ has size at least $2^{\Omega(n)}$.
\end{cor}
\subsection{Set-cover}
In order to obtain a set-cover instance that requires an exponential-size branch-and-bound tree, we will use Lemma~\ref{lem:hardness} together with the flipping affine mapping (Defintion~\ref{defn:flip}) applied to the packing instance from Section~\ref{sec:packing}.
More precisely, consider the following set-cover polytope: $$T_{\text{SC}} = \Big\{y \in [0,1]^n : \sum_{i \in S} y_i \geq 1 \text{ for all } S \subseteq [n] \textrm{ such that } |S| = k\Big\}.$$
\begin{proposition}
Let $P_{PA}$ still be the packing polytope from Section \ref{sec:packing}. Let $f : [0,1]^n \rightarrow [0,1]^n$ be the flipping function with $J = [n]$. Then:
\begin{itemize} \vspace{-10pt}
\item $T_{\text{SC}} = f(P_{PA})$
\item $T_{\text{SC}} \cap \{0,1\}^n \subseteq f(P_{PA} \cap \{0,1\}^n)$.
\end{itemize}
\end{proposition}
\begin{proof}
By substituting $y_i = 1 - x_i$ for $i \in [n]$ in the polytope $P_{PA}$, we obtain that $T_{\text{SC}} = f(P_{PA})$.
For the second item, consider any $
\hat{y} \in T_{\text{SC}} \cap \{0,1\}^n$. Notice $\hat{x} := 1 - \hat{y}$ belongs to $P_{PA} \cap \{0,1\}^n$ and $\hat{y} = f(\hat{x})$, and hence $\hat{y} \in f(P_{PA} \cap \{0,1\}^n)$. This gives $T_{\text{SC}} \cap \{0,1\}^n \subseteq f(P_{PA} \cap \{0,1\}^n)$.
\end{proof}
Then by Lemmas \ref{lem:hardness} {and \ref{lem:packing}} we have that $\text{BBrank}(T_{\text{SC}}) \geq \text{BBrank}(P_{PA}) \geq 2^{\Omega(n)}$. {Further employing Lemma~\ref{lem:rankhardness} we obtain the desired hardness bound.}
\begin{cor}
${\text{BBhardness}}(T_{\text{SC}}) \geq 2^{\Omega(n)}$, i.e. there exists a {vector} $c\in \R^n$ such that the smallest branch-and-bound tree that solves $$\max_{x \in T_{SC} \cap \{0,1\}^{n}} \ip{c}{x}$$ has size at least $2^{\Omega(n)}$.
\end{cor}
\section{BB hardness for cross-polytope}\label{sec:cross_poly_hard}
In this section, we present in Proposition~\ref{lem:lowerbndsimple} a simple proof of BB hardness for the cross-polytope. As mentioned before, this result slightly improves on the result that can be directly obtained by applying Lemma~\ref{lem:dadush} to the cross-polytope.
Next in this section we develop Proposition \ref{prop:crosspoly_lb} that shows that there is a point in the cross polytope that is hard to separate using BB trees of small size. This allows us to use the machinery of Lemma \ref{lem:hardness} and a composition of the affine functions described in Section \ref{sec:tech_lemmas} to connect the BB hardness of TSP to that of the cross-polytope, which we do in Section \ref{sec:tsp}.
The cross-polytope is defined as
$$P_n = \left\{x \in [0,1]^n : \sum_{i \in J}x_i + \sum_{i \not \in J}(1 - x_i) \geq \frac{1}{2} \quad \forall J \subseteq [n] \right\}.$$
{Recall that the cross-polytope is integer-infeasible: every 0/1 point $\hat{x} \in \{0,1\}^n$ is cut off by the inequality given by the set $J = \{ i \in [n] : \hat{x}_i = 0\}$.}
\begin{proposition}\label{lem:lowerbndsimple}
Let $\mathcal{T}$ be a BB tree for $P_n$ that certifies the integer-infeasibility of $P_n$. Then $|\mathcal{T}| \geq 2^{n +1} - 1$ (i.e. $\text{BBhardness}(P_n) \geq 2^{n+1} - 1$).
\end{proposition}
\begin{proof}
In order to certify the integer-infeasibility of $P_n$, the atom of every leaf-node must be an empty set. We will verify that in order for the atom of a leaf $v$ to be empty, no more than one integer point is allowed to satisfy the branching constraints $C_v$ of $v$. This will complete the proof, since we then must have at least $2^n$ leaves.
Consider any leaf $v$ of $\mathcal{T}$ such that two distinct integer points are feasible for its branching constraints. Then the average of these two points is a point in $\{0, 1, \frac{1}{2}\}^n$ with at least one component equal to $\frac{1}{2}$, which also satisfies the branching constraints. However, a point in $\{0, 1, \frac{1}{2}\}^n$ with at least one component equal to $\frac{1}{2}$ satisfies the constraints defining $P_n$. Thus the atom of the leaf $v$ is non-empty.
\end{proof}
\begin{cor}\label{cor:lowdimpd}
Let $F\subseteq \mathbb{R}^n$ be a face of $P_n$ with dimension $d$. Then $\text{BBhardness}(F) \geq 2^{d + 1} - 1.$
\end{cor}
\begin{proof}
Notice that $F$ is a copy of $P_d$ with $n -d$ components fixed to $0$ or $1$. Thus, {there exists an appropriate embedding affine transformation $f$ (Definition~\ref{defn:embed}) such that}
$f(P_d) = F$. Also since $F \cap \mathbb{Z}^n = \emptyset$, we obtain that $f$, $P_d$ and $F$ satisfy all the conditions of Corollary~\ref{cor:affine_infeas}. Thus, $\text{BBhardness}(F) \geq \text{BBhardness}(P_d) \geq 2^{d + 1} - 1$, where the last inequality follows from Proposition~\ref{lem:lowerbndsimple}.
\end{proof}
Next we show that the point $\frac{1}{2} \bm{1}$ is hard to separate from $P_n$. For that we need a technical result that any halfspace that contains $\frac{1}{2}\bm{1}$ must also contain a face of $[0,1]^n$ of dimension at least $\lfloor n/2 \rfloor$.
\begin{lemma}\label{lem:contains_face}
Consider any $(\pi, \pi_0) \in \mathbb{R}^{n} \times \mathbb{R}$ such that $\ip{\pi}{\frac{1}{2}\bm{1}} > \pi_0$. Let $G = \{x \in [0,1]^n : \ip{\pi}{x} > \pi_0\}$. There exists a face $F$ of $[0, 1]^n$ of dimension at least {$\lfloor n/2 \rfloor$} contained in $G$.
\end{lemma}
{
\begin{proof}
By assumption we have $\pi_0 < \frac{1}{2} \sum_{i=1}^n \pi_i$. First consider the case where the vector $\pi$ is non-negative. By renaming the coordinates we can further assume that $\pi_1 \ge \pi_2 \ge \ldots \ge \pi_n \ge 0$. Then the face $F = \{ x \in [0,1]^n : x_i = 1,~\forall i \le \lceil n/2 \rceil\}$ has the desired properties: it has dimension $n - \lceil n/2 \rceil = \lfloor n/2 \rfloor$, and any $\hat{x} \in F$ has $$\ip{\pi}{\hat{x}} \ge \sum_{i = 1}^{\lceil n/2 \rceil} \pi_i \ge \frac{1}{2} \sum_{i=1}^n \pi_i > \pi_0,$$ where the second inequality follows from the ordering of the coordinates of $\pi$, and hence $F$ is contained in $G$.
The case when $\pi$ is not non-negative can be reduced to the above case by flipping coordinates. More precisely, let $J$ be the set of coordinates $i$ where $\pi_i < 0$, and consider the coordinate flipping operation (Definition \ref{defn:flip}) $f : \R^n \rightarrow \R^n$ that flips all coordinates in $J$. Notice that $$f(G) = \Big\{ x \in [0,1]^n ~:~ \sum_{i \in J} -\pi_i x_i + \sum_{i \notin J} \pi_i x_i \le \pi_0 - \sum_{i \in J} \pi_i \Big\},$$ and that defining the vector $\pi'$ as $\pi'_i = -\pi_i$ for $i \in J$ and $\pi'_i = \pi_i$ for $i \notin J$ and $\pi'_0 := \pi_0 - \sum_{i \in J} \pi_i$ we still have $\ip{\pi'}{\frac{1}{2}\bm{1}} > \pi'_0$. Since $\pi'$ is non-negative, the previous argument shows that $f(G)$ has a face $F$ of $[0,1]^n$ of desired dimension, and hence $f^{-1}(F) = f(F)$ is a desired face of $[0,1]^n$ contained in $G$.
\end{proof}
}
\begin{proposition}\label{prop:crosspoly_lb}
{For every $n$ such that $\lfloor n/2 \rfloor > 1$, $\text{BBdepth} \left(\frac{1}{2}\bm{1}, P_n\right) \geq 2^{\lfloor n/2\rfloor + 1} - 1$.}
\end{proposition}
\begin{proof}
For sake of contradiction suppose there exists a tree $\mathcal{T}$ of size less than {$2^{\lfloor n/2\rfloor + 1 } - 1$} such that $\frac{1}{2}\bm{1} \not \in \text{conv}(\mathcal{T}(P_n))$. By the hyperplane separation theorem, there exists $(\pi, \pi_0) \in \mathbb{R}^{n} \times \mathbb{R}$ such that $\ip{\pi}{\frac{1}{2}\bm{1}} > \pi_0$ and $\ip{\pi}{x} \leq \pi_0$ for all $x \in \text{conv}(\mathcal{T}(P_n))$. By Lemma \ref{lem:contains_face}, let $F$ be a face of $[0,1]^n$ of dimension {$\lfloor n/2 \rfloor$} contained in $\{x \in \mathbb{R}^n \,|\, \langle \pi, x\rangle > \pi_0 \}$; notice that $P_n \cap F$ is a face of $P_n$ of the same dimension.
Since $\mathcal{T}(P_n) \subseteq \textup{conv}(\mathcal{T}(P_n)) \subseteq \mathbb{R}^n\setminus \{x \in \mathbb{R}^n \,|\, \langle \pi, x\rangle > \pi_0 \} \subseteq \mathbb{R}^n \setminus F$ and $\mathcal{T}(F) \subseteq F$, we have that $\mathcal{T}(P_n)$ and $\mathcal{T}(F)$ are disjoint and hence from Lemma \ref{lem:monotonicity} we get $\mathcal{T}(P_n \cap F) \subseteq \mathcal{T}(P_n) \cap \mathcal{T}(F) = \emptyset$,
i.e., the atoms of the leaves of $\mathcal{T}$ applied to $P_n \cap F$ are all empty. Thus, $\mathcal{T}$ is a branch-and-bound tree to certify the integer-infeasibility of $P_n \cap F$
of size less than {$2^{\lfloor n/2 \rfloor + 1} - 1$}. However, this contradicts Corollary~\ref{cor:lowdimpd}.
\end{proof}
\section{BB hardness for perturbed cross-polytope}\label{sec:perturbed_cp}
We now show that exponential BB hardness for the cross-polytope persists even after adding Gaussian noise to the entries of the contraint matrix.
This implies an exponential lower bound even for a ``smoothed analysis" of general branch-and-bound.
We consider the cross-polytope $P_n$ but where we add an independent gaussian noise $N(0,1/20^2)$ with mean 0 and variance $1/20^2$ to each coefficient in the left-hand side of its defining inequalities, and replace the {right-hand sides} by
{approximately}
$\frac{n}{20}$ instead of the traditional $\frac{1}{2}$. More precisely, we consider the following random polytope $Q$:
%
\begin{align*}
Q ~:=~ \left\{x \in [0,1]^n ~:~ \sum_{i \in I} \left(1 + N\left(0,\tfrac{1}{20^2}\right)\right) x_i + \sum_{i \notin I} \Big(1 - \left(1 + N \left(0,\tfrac{1}{20^2}\right)\right) x_i\Big) \ge \frac{1.6 n}{20}, ~~~~\forall I \subseteq [n]\right\}
\end{align*}
where each occurrence of $N(0, \frac{1}{20^2})$ is independent.
\begin{thm} \label{thm:main}
With probability at least $1 - \frac{2}{e^{n/2}}$ the polytope $Q$ is integer-infeasible and every BB tree proving its infeasibility has at least $2^{\Omega(n)}$ nodes.
\end{thm}
{Recall that for independent gaussians $Y \sim N(\mu,\sigma^2)$ and $Y' \sim N(\mu', (\sigma')^2)$, their sum $Y+Y'$ is distributed as $N(\mu+\mu',\sigma^2 + (\sigma')^2)$, and for a centered gaussian $Y \sim N(0,\sigma^2)$ the scaled random variable $\alpha Y$ is distributed as $N(0, \alpha^2 \sigma^2)$ for all $\alpha \in \R$.}
We need the following standard tail bound for the Normal distribution (see equation (2.10) of \cite{vershynin2018high}).
\begin{fact} \label{fact:gauss}
Let $X \sim N(0, \sigma^2)$ be a mean zero gaussian with variance $\sigma^2$. Then for every $p \in (0,1)$, with probability at least $1-p$ we have $X \le \sigma \sqrt{2 \ln(1/p)}$, and with probability at least $1-p$ we have $X \ge - \sigma \sqrt{2 \ln (1/p)}$.
\end{fact}
Let $LHS_I(x)$ be the {left-hand-side
of the constraint of $Q$ indexed by the set $I$ evaluated at the point $x$.
\begin{lemma} \label{lemma:inf}
With probability at least $1 - \frac{1}{e^{n/2}}$ the polytope $Q$ is integer-infeasible.
\end{lemma}
\begin{proof}
Fix a 0/1 point $x \in \{0,1\}^n$, and let $I \subseteq [n]$ be the set of coordinates $i$ where $x_i = 0$. Let $I^c = [n]\setminus I$. Notice $LHS_I(x)$ is a gaussian random variable with mean 0 and variance $\frac{|I^c|}{20^2} \le \frac{n}{20^2}$, and so from Fact \ref{fact:gauss}, with probability at least $1 - \frac{1}{e^{n/2} 2^n}$ we have $$LHS_I(x) \le \frac{\sqrt{n}}{20} \sqrt{2 \ln(e^{n/2} 2^n)}= \frac{\sqrt{n}}{20} \sqrt{(1 + 2 \ln 2) n} < \frac{1.6n}{20},$$ i.e., the point $x$ does not satisfy the inequality of $Q$ indexed by $I$, and so does not belong to $Q$. Taking a union bound over all $2^n$ points $x \in \{0,1\}^n$, with probability at least $1 - \frac{1}{e^{n/2}}$ none of them belong to $Q$. This concludes the proof.
\end{proof}
\begin{lemma} \label{lemma:half}
With probability at least $1 - \frac{1}{e^{n/2}}$ the polytope $Q$ contains all points $\{0,\frac{1}{2},1\}^n$ that have at least $s = \frac{4n}{10}$ coordinates with value $\frac{1}{2}$. (We call this set of points $\textup{Half}_s$.)
\end{lemma}
\begin{proof}
Consider $x \in \textup{Half}_s$. Fix $I \subseteq [n]$. Let $n_{\textrm{half}} \ge s = \frac{4n}{10}$ be the number of coordinates of $x$ with value $\frac{1}{2}$, $n_{\textrm{ones}}$ be the number of coordinates with value 1, and let $n_{\textrm{diff}}$ be the number of coordinates $i$ where either $i \in I$ and $x_i = 1$, or $i \notin I$ and $x_i = 0$. We see that $LHS_I(x)$ distributed as
%
\begin{align*}
LHS_I(x) &=_{d} \frac{n_{\textrm{half}}}{2} + n_{\textrm{diff}} + \frac{1}{2} N(0, \tfrac{n_\text{half}}{20^2}) + N(0, \tfrac{n_{\textrm{ones}}}{20^2})\\
&=_{d} \frac{n_{\textrm{half}}}{2} + n_{\textrm{diff}} + N(0, (\tfrac{n_\text{half}}{4} + n_{\textrm{ones}}) \cdot \tfrac{1}{20^2}),
\end{align*}
where again the occurrences of $N(0,\cdot)$ are independent. Since the last term is a gaussian with variance at most $\frac{n}{20^2}$, we get that with probability at least $1- \frac{1}{e^{n/2} \cdot 2^n \cdot 3^n}$
%
\begin{align*}
LHS_I(x) \ge \frac{n_{\textrm{half}}}{2} + n_{\textrm{diff}} - \frac{1}{20} \sqrt{n} \sqrt{2 \log(e^{n/2} \cdot 2^n \cdot 3^n)} \ge \frac{4n}{20} - \frac{2.4n}{20} = \frac{1.6n}{20},
\end{align*}
that is, $x$ satisfies the constraint of $Q$ indexed by $I$.
Taking a union bound over all $x \in \textup{Half}_s$ and all subsets $I \subseteq [n]$, we see that all points in $\textup{Half}_s$ satisfy all constraints of $Q$ with probability at least $1 - \frac{1}{e^{n/2}}$. This concludes the proof.
\end{proof}
\begin{lemma} \label{lemma:shatter}
Let $F \subseteq \{0,1\}^n$ be a set of 0/1 points. For any $k$, if $|F| > \sum_{i \le k-1} \binom{n}{i}$, then $\text{conv}(F)$ contains a point with at least $k$ coordinates of value 1/2.
\end{lemma}
\begin{proof}
By the Sauer-Shelah Lemma (Lemma 11.1 of \cite{jukna}), there is a set of coordinates $J \subseteq [n]$ of size $|J| = k$ such that the points in $F$ take all possible values in coordinates $J$, i.e., the projection $F_J$ onto the coordinates $J$ equals $\{0,1\}^k$. So the point $\frac{1}{2} \bm{1}$ belongs to $\text{conv}(F_J)$, which implies that $\text{conv}(F)$ has the desired point.
\end{proof}
\begin{proof}[Proof of Theorem \ref{thm:main}]
Let $E$ be the event that both the bounds from Lemmas \ref{lemma:inf} and \ref{lemma:half} hold. By a union bound, this event happens with probability at least $1 - \frac{2}{e^{n/2}}$. So it suffices to show that there is a constant $c > 0$ such that for every scenario in $E$, every BB tree proving the infeasibility of $Q$ has at least $2^{cn}$ leaves.
In hindsight, again let $s = \frac{4n}{10}$ and set $c := 1 - h(\frac{s}{n})$, where $h$ is the binary entropy function $h(p) := p \log \tfrac{1}{p} + (1-p) \log \tfrac{1}{1-p}$. Notice that $c > 0$, since $h$ is strictly increasing in the interval $[0,\frac{1}{2}]$ and hence $h(\frac{s}{n}) < h(\frac{1}{2}) = 1$.
{Fix a scenario in the event $E$, so we know $Q$ is integer-infeasible and $\textup{Half}_s \subseteq Q$.} Consider any tree $\mathcal{T}$ that proves integer-infeasibility of $Q$, and we claim that it has more than $2^{cn}$ leaves. By contradiction, suppose not. Then $\mathcal{T}$ has a leaf $v$ whose branching constraints $C_v$ are satisfied by at least $\frac{2^n}{2^{cn}} = 2^{n\cdot h(s/n)}$ 0/1 points { (recall that each integer point satisfies all of the branching constraints of at least some leaf)}. But since $2^{n\cdot h(s/n)} > \sum_{i \le s-1}\binom{n}{i}$ (see e.g. Lemma 5 of \cite{gottlieb}), by Lemma \ref{lemma:shatter} we know that the convex set $\{x : C_v\}$ contains a point $\hat{x} \in [0,1]^n$ with at least $s$ coordinates of value $1/2$. Moreover, notice that $\hat{x}$ also belongs to $\text{conv}(\textup{Half}_s)$, which is contained in $Q$. Hence $\hat{x} \in \{x : C_v\} \cap Q$, namely the atom of the leaf $v$. But this contradicts that this atom is empty (which is required since $\mathcal{T}$ proves integer infeasibility of $Q$). This concludes the proof.
\end{proof}
\section{BB hardness for TSP}\label{sec:tsp}
{Again we use $P_k$ to denote the cross-polytope in $k$ dimensions.}
\begin{proposition}\label{prop:tsp_hard}
Let $f$ be any composition of the flipping (Defintion~\ref{defn:flip}), embedding (Definition~\ref{defn:embed}), and duplication (Definition~\ref{defn:dup}) operations. Let $H \subseteq [0,1]^n$ be a polytope such that $f(P_k) \subseteq H$ and $f(\frac{1}{2}\bm{1}) \not \in H_I$, where $k \leq n$. Then, {$\text{BBrank}(H) \geq 2^{\lfloor k/2 \rfloor}$}.
\end{proposition}
\begin{proof
Notice that if $f$ is a composition of the flipping, embedding, and duplication operations, then $f$ is an integral affine transformation.
Moreover, if $P$ is integer-infeasible then $f(P)$ is also integer-infeasible. In particular, since $P_k$ is integer-infeasible we have $(f(P_k))_I = \emptyset$, and hence $f(\frac{1}{2}\bm{1}) \not \in (f(P_k))_I$. Now, Corollary \ref{cor:affine_depth} and Proposition \ref{prop:crosspoly_lb} give us {$\text{BBdepth} \left(f \left(\frac{1}{2}\bm{1} \right), f(P_k)\right) \geq \text{BBdepth} \left(\frac{1}{2}\bm{1}, P_k \right) \geq 2^{\lfloor k/2 \rfloor +1} - 1$}. Finally, since $f(P_k) \subseteq H$, Corollary \ref{cor:monoton_depth} implies that {$\text{BBdepth}(f(\frac{1}{2}\bm{1}), H) \geq 2^{\lfloor k/2 \rfloor + 1} - 1$}. This implies the desired result: {$\text{BBrank}(H) \geq 2^{\lfloor k/2 \rfloor + 1} - 1 \ge 2^{\lfloor k/2 \rfloor}$}.
\end{proof}
We next state a key result from { the proof of Theorem 4.1} of~\cite{cook2001matrix} (see also~\cite{chvatal1989cutting}), that shows how we can apply Proposition~\ref{prop:tsp_hard} to obtain BB hardenss of the TSP polytope. Let $T_{\text{TSP}_n}$ be the {LP relaxation of the TSP polytope using subtour elimination constraints} for $n$ cities:
\begin{align*}
x(\delta(v)) = 2 & \quad \forall v \in V \\
x(\delta(W)) \geq 2 & \quad \forall W \subset V, W \not = \emptyset \\
0 \leq x(e) \leq 1 & \quad \forall e \in E
\end{align*}
\begin{proposition}[{proof of Theorem 4.1 in \cite{cook2001matrix}}]
There exists a function $f$ which is a composition of flipping, embedding, and duplication such that $f(P_{\lfloor n/8 \rfloor})$ is contained in $T_{\text{TSP}_n}$ and $f(\frac{1}{2}\bm{1})$ does not belong to the integer hull of $T_{\text{TSP}_n}$.
\end{proposition}
Then employing Proposition~\ref{prop:tsp_hard} we obtain {$\text{BBrank}(T_{\text{TSP}_n}) \ge 2^{\frac{n}{16} - 2}$, and again since BB hardness is at least the BB rank (Lemma \ref{lem:rankhardness}) we obtain the desired hardness.}
\begin{cor}[BB hardness for TSP]
{$\text{BBhardness}(T_{\text{TSP}_n)} \geq 2^{\frac{n}{16} - 2}$}, i.e, there is a {vector} $c \in \R^{n(n -1)/2}$ such that the smallest branch-and-bound tree that solves $$\max_{x \in T_{\text{TSP}_n} \cap \{0,1\}^{n(n -1)/2}} \ip{c}{x}$$ has size at least {$2^{\frac{n}{16} - 2}$}.
\end{cor}
|
\section{Introduction} \label{sec:intr}
Consider the boundary value problem $L(q_0, q_1)$ in the form
\begin{gather} \label{eqv}
-y'' + (2 \lambda q_1(x) + q_0(x)) y = \lambda^2 y, \quad x \in (0, \pi), \\ \label{bc}
y(0) = y(\pi) = 0,
\end{gather}
where $\lambda$ is the spectral parameter, $q_j$ are complex-valued functions, called \textit{the potentials}, $q_j \in W_2^{j-1}(0, \pi)$, $j = 0, 1$, that is, $q_1 \in L_2(0, \pi)$, $q_0 = \sigma'$, where $\sigma \in L_2(0, \pi)$ and the derivative is understood in the sense of distributions. Note that the class $W_2^{-1}$ contains, in particular, the Dirac delta-functions and the Coulomb-type singularities $\frac{1}{x}$, which are widely used in quantum mechanics \cite{AGHH05}. Equation~\eqref{eqv} can be rewritten in the following equivalent form:
\begin{gather*}
\ell(y) + 2 \lambda q_1(x) y = \lambda^2 y, \\
\ell(y) := -(y^{[1]})' - \sigma(x) y^{[1]} - \sigma^2(x) y,
\end{gather*}
where $y^{[1]} := y' - \sigma y$ is the quasi-derivative, $y, y^{[1]} \in AC[0, \pi]$, $\ell(y) \in L_2(0, \pi)$. Clearly, the eigenvalue problem~\eqref{eqv}-\eqref{bc} generates the pencil of second-order differential operators with quadratic dependence on the spectral parameter.
The paper is concerned with the theory of inverse spectral problems, which consist in recovery of operators from their spectral characteristics. The most complete results in inverse problem theory have been obtained for the Sturm-Liouville equation~\eqref{eqv} with $q_1(x) \equiv 0$ (see the monographs \cite{Mar77, Lev84, PT87, FY01} and references therein). In particular, Sturm-Liouville inverse problems with singular potentials of class $W_2^{-1}$ were studied in \cite{HM03, SS05} and other papers. Investigation of inverse problems for differential pencils induced by equation~\eqref{eqv} with nonlinear dependence on the spectral parameter causes principal difficulties comparing with the classical Sturm-Liouville problems. Therefore, a number of open questions still remain in this direction. At the same time, inverse problems for equation~\eqref{eqv} are used in various applications, e.g., for modeling interactions between colliding relativistic particles in quantum mechanics \cite{JJ72} and for studying vibrations of mechanical systems in viscous media \cite{Yam90}.
For the quadratic differential pencil \eqref{eqv} on a finite interval with the regular potentials $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, and the Robin boundary conditions $y'(0) - h y(0) = 0$, $y'(\pi) + H y(\pi) = 0$, the solvability conditions for the inverse spectral problem were obtained by Gasymov and Guseinov~\cite{GG81}. Later on, their approach was applied for investigation of inverse problems for the pencils with non-separated boundary conditions \cite{Gus86, GN00, GN07}. Hryniv and Pronska \cite{HP12, Pron13, Pron13-2, Pron13-3} developed an approach to inverse problems for the pencils of form~\eqref{eqv}-\eqref{bc} with the singular potentials $q_j \in W_2^{j-1}[0, \pi]$, $j = 0, 1$. Their approach is based on the reduction of equation~\eqref{eqv} to a first-order system. In the recent paper \cite{HM20}, the analogous reduction was applied to the inverse scattering problem for the quadratic differential pencil on the half-line. However, the results of the mentioned papers have the common disadvantage that consists in the requirement of real-valued potentials and positivity of some operator. Under this requirement, the eigenvalues of the pencil are real and simple, which makes the situation similar to the classical Sturm-Liouville operators and significantly simplifies the investigation of inverse problems. However, in the general case, the pencil \eqref{eqv}-\eqref{bc} can have multiple and/or non-real eigenvalues even if the potentials $q_j$ are real-valued.
Buterin and Yurko \cite{BY06, BY12} developed another approach, which allows to solve inverse problems for quadratic differential pencils with the complex-valued potentials $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, and without any additional restrictions. The approach of \cite{BY06, BY12} is based on the method of spectral mappings \cite{FY01, Yur02}. This method allows to reduce a nonlinear inverse spectral problem to a linear equation in an appropriate Banach space, by using contour integration in the $\lambda$-plane and the theory of analytic functions. The approach based on the method of spectral mappings was also applied to the pencils of the matrix Sturm-Liouville operators \cite{Bond16, BF14}, to the scalar pencils on the half-line \cite{Yur00}, to the half inverse problem \cite{But11}, and to the pencils on graphs (see \cite{Yur17, Yur19} and references therein). However, the results obtained by using this approach for differential pencils include only uniqueness theorems and constructive procedures for solving inverse problems. The most principal questions of solvability and stability for the general case of complex-valued potentials were open. The present paper aims to fill this gap.
It is also worth mentioning that, in recent years, a number of scholars have been actively studying inverse problems for quadratic differential pencils (see \cite{AED21, GKG18, GP18, GWY19, SP14, Yang13, YY14, WHS19, WSW20} and other papers of these authors). The majority of those results are concerned with partial inverse problems, inverse nodal problems, and recovery of the pencils from the interior spectral data.
The aim of this paper is to study solvability and stability of the inverse spectral problem for the pencil~\eqref{eqv}-\eqref{bc}. Developing the ideas of the method of spectral mappings \cite{FY01, BY06, BY12, Yur02}, we reduce the inverse problem to the so-called main equation, which is a linear equation in the Banach space of bounded infinite sequences. The most important difficulties of our investigation are related with eigenvalue multiplicities. The multiplicities influence on the definition of the spectral data and on the construction of the main equation. Moreover, under a small perturbation of the spectrum, multiple eigenvalues can split into smaller groups, which complicates the analysis of local solvability and stability. Nevertheless, we take this effect into account and obtain the results valid for arbitrary multiplicities. For dealing with multiple eigenvalues, we use some ideas previously developed for the non-self-adjoint Sturm-Liouville operators in \cite{But07, BSY13, Bond20}.
Thus, the following main results are obtained.
\begin{itemize}
\item In Section~\ref{sec:alg}, the spectral data of the quadratic differential pencil are defined and a constructive solution of the inverse problem is obtained for the case of the complex-valued singular potentials $q_j \in W_2^{j-1}[0, \pi]$, $j = 0, 1$ (see Algorithm~\ref{alg:1}). Note that the results of \cite{BY06, BY12} are limited to the case of regular potentials $q_j \in W_2^j[0, \pi]$, $j = 0, 1$. Our constructive procedure implies Theorem~\ref{thm:uniq} on the uniqueness of the inverse problem solution.
\item In Section~\ref{sec:approx}, we construct infinitely differentiable approximations $q_j^N$ of the potentials $q_j$, by using finite spectral data (Theorem~\ref{thm:approx}). This theorem plays an auxiliary role in the further sections, but also can be treated as a separate result.
\item In Section~\ref{sec:sol}, we prove Theorem~\ref{thm:solve}, which provides sufficient conditions for the global solvability of the inverse problem. Theorem~\ref{thm:solve} implies Corollary~\ref{cor:locsimp} on the local solvability and stability of the inverse problem for spectrum perturbations that do not change eigenvalue multiplicities.
\item In Section~\ref{sec:mult}, we prove Theorem~\ref{thm:locmult} and Corollary~\ref{cor:disc} on the local solvability and stability of the inverse problem in the general case, taking splitting of multiple eigenvalues into account.
\item In Section~\ref{sec:ex}, our theoretical results are illustrated by numerical examples. Namely, we approximate a pencil having a double eigenvalue by a family of pencils with simple eigenvalues.
\end{itemize}
\section{Constructive solution} \label{sec:alg}
In this section, we define the spectral data of the problem $L(q_0, q_1)$ and develop Algorithm~\ref{alg:1} for recovery of the potentials $q_j \in W_2^{j-1}(0, \pi)$, $j = 0, 1$, from the spectral data. The nonlinear inverse problem is reduced to the linear equation~\eqref{main}, which plays a crucial role in the constructive solution and also in study of solvability and stability for the inverse problem. In addition, relying on Algorithm~\ref{alg:1}, we obtain the uniqueness of the inverse problem solution (Theorem~\ref{thm:uniq}). We follow the strategy of \cite{BY12}, so some formulas and propositions of this section are provided without proofs. However, it is worth mentioning that our constructive solution is novel for the case of the singular potentials $q_j \in W_2^{j-1}(0, \pi)$, $j = 0, 1$. The most important difference from the regular case $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, is the construction of the regularized series \eqref{defeps1}-\eqref{defeps3} and the analysis of their convergence in Lemma~\ref{lem:conv}. The results of this section will be used in the further sections for investigation of solvability and stability issues.
Let us start with preliminaries. Denote by $S(x, \lambda)$ the solution of equation~\eqref{eqv} satisfying the initial conditions $S(0, \lambda) = 0$, $S^{[1]}(0, \lambda) = 1$. Put $Q(x) := \int_0^x q_1(t) \, dt$. The results of \cite{Pron13-3} yield the following lemma.
\begin{lem} \label{lem:trans}
There exist such functions $\mathscr K(x, t)$ and $\mathscr N(x, t)$ that
\begin{align*}
S(x, \lambda) & = \frac{\sin (\lambda x - Q(x))}{\lambda} + \frac{1}{\lambda} \int_{-x}^x \mathscr K(x, t) \exp(i \lambda t) \, dt, \\
S^{[1]}(x, \lambda) & = \cos (\lambda x - Q(x)) + \int_{-x}^x \mathscr N(x, t) \exp(i \lambda t) \, dt,
\end{align*}
$\mathscr K(x, .)$ and $\mathscr N(x, .)$ belong to $L_2(0, x)$ for each fixed $x \in (0, \pi]$. Moreover, the norms $\| \mathscr K(x, .) \|_{L_2(0, x)}$ and $\| \mathscr N(x, .) \|_{L_2(0, x)}$ are bounded uniformly with respect to $x \in (0, \pi]$.
\end{lem}
Put $\mathbb Z_0 := \mathbb Z \setminus \{ 0 \}$, $\omega_0 = \frac{1}{\pi} Q(\pi)$. The problem $L(q_0, q_1)$ has a countable set of the eigenvalues $\{ \lambda_n \}_{n \in \mathbb Z_0}$ (counted with multiplicities), which coincide with the zeros of the analytic characteristic function $\Delta(\lambda) := S(\pi, \lambda)$ and have the following asymptotics (see \cite{Pron13-3}):
\begin{equation} \label{asymptla1}
\lambda_n = n + \omega_0 + \varkappa_n, \quad n \in \mathbb Z_0.
\end{equation}
Here and below, the same notation $\{ \varkappa_n \}$ is used for various sequences from $l_2$.
Introduce the notations
$$
\mathbb S := \{ n \in \mathbb Z_0 \colon \forall k < n \:\: \lambda_k \ne \lambda_n \}, \quad m_n := \# \{ k \in \mathbb Z_0 \colon \lambda_k = \lambda_n \},
$$
that is, $\{ \lambda_n \}_{n \in \mathbb S}$ is the set of all the distinct eigenvalues and $m_n$ is the multiplicity of the eigenvalue $\lambda_n$.
Without loss of generality, we impose the following assumption.
\medskip
\textbf{Assumption} $(\mathcal O)$: $\lambda_n \ne \lambda_k$ for $n k < 0$ and $\lambda_n = \lambda_{n + 1} = \dots = \lambda_{n + m_n - 1}$, $n \in \mathbb S$.
\medskip
Together with the eigenvalues, we use additional spectral characteristics for reconstruction of the pencil. Let us define two types of such characteristics. Denote
$$
S_{\nu}(x, \lambda) = \frac{1}{\nu!} \frac{d^{\nu}}{d\lambda^{\nu}} S(x, \lambda),
\qquad S_{n + \nu}(x) := S_{\nu}(x, \lambda_n), \quad n \in \mathbb S, \quad \nu = \overline{0, m_n-1}.
$$
Put $S_{\nu}(x, \lambda) = 0$ for $\nu < 0$. Define \textit{the generalized weight numbers} as follows:
\begin{multline} \label{defal}
\alpha_{n + \nu} := \int_0^{\pi} (2 (\lambda_n - q_1(x)) S_{m_n - 1}(x, \lambda_n) - S_{m_n-2}(x, \lambda_n)) S_{\nu}(x, \lambda_n) \, dx \\ + \int_0^{\pi} S_{m_n-1}(x, \lambda_n) S_{\nu - 1}(x, \lambda_n) \, dx, \quad \nu = \overline{0, m_n-1}, \quad n \in \mathbb S.
\end{multline}
Note that $\{ \alpha_n \}_{n \in \mathbb Z_0}$ generalize the classical weight numbers of the self-adjoint Sturm-Liouville operator (see, e.g, \cite{Mar77, FY01}).
We call \textit{the Weyl solution} the function $\Phi(x, \lambda)$ satisfying equation~\eqref{eqv} and the boundary conditions $\Phi(0, \lambda) = 1$, $\Phi(\pi, \lambda) = 0$. \textit{The Weyl function} is defined as $M(\lambda) := \Phi^{[1]}(0, \lambda)$. The function $M(\lambda)$ is meromorphic with the poles $\{ \lambda_n \}_{n \in \mathbb S}$ of the corresponding multiplicities $\{ m_n \}_{n \in \mathbb S}$. Denote
$$
M_{n + \nu} := \Res_{\lambda = \lambda_n} (\lambda - \lambda_n)^{\nu} M(\lambda), \quad n \in \mathbb S, \quad \nu = \overline{0, m_n-1}.
$$
Note that the generalized weight numbers $\{ \alpha_n \}_{n \in \mathbb Z_0}$ and the coefficients $\{ M_n \}_{n \in \mathbb Z_0}$ determine each other uniquely by the formula (see \cite{BY12}):
\begin{equation} \label{relalM}
\sum_{j = 0}^{\nu} \alpha_{n + \nu - j} M_{n + m_n - j - 1} = -\delta_{\nu, 0}, \quad n \in \mathbb S, \quad \nu = \overline{0, m_n-1},
\end{equation}
where $\delta_{\nu,0}$ is the Kronecker delta. Therefore, the following two inverse problems are equivalent:
\begin{ip} \label{ip:weight}
Given $\{ \lambda_n, \alpha_n \}_{n \in \mathbb Z_0}$, find $q_0$, $q_1$.
\end{ip}
\begin{ip} \label{ip:M}
Given $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$, find $q_0$, $q_1$.
\end{ip}
Further, we focus on Inverse Problem~\ref{ip:M}. For convenience, let us call the collection $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ \textit{the spectral data} of the problem $L$.
One can easily obtain the asymptotics
\begin{equation} \label{asymptM1}
M_n = -\frac{n}{\pi} (1 + \varkappa_n), \quad n \in \mathbb Z_0.
\end{equation}
In the regular case $q_j \in W_2^j[0, \pi]$, the asymptotics \eqref{asymptla1} and \eqref{asymptM1} can be improved (see \cite{BY12}):
\begin{align} \label{asymptla2}
& \lambda_n = n + \omega_0 + \frac{\omega_1}{\pi n} + \frac{\varkappa_n}{n}, \\ \label{asymptM2}
& M_n = -\frac{n}{\pi} \left( 1 + \frac{\omega_0 - \omega_2}{n} + \frac{\varkappa_n}{n}\right),
\end{align}
where
$$
\omega_1 = \frac{1}{2} \int_0^{\pi} (q_0(x) + q_1^2(x)) \, dx, \quad \omega_2 = q_1(0).
$$
Note that the function $\sigma = \int q_1(x) \, dx$ is determined by $q_1$ uniquely up to an additive constant. However, this constant does not influence on the definitions of the Weyl function and the spectral data. Thus, in the regular case, we may assume that $\sigma(x) = \int_0^x q_1(t) \, dt$, so $\sigma(0) = 0$ and $y^{[1]}(0) = y'(0)$.
Along with $L = L(q_0, q_1)$, we consider another problem $\tilde L = L(\tilde q_0, \tilde q_1)$ of the same form but with different coefficients $\tilde q_j \in W_2^{j-1}(0, \pi)$, $j = 0, 1$. We agree that, if a symbol $\gamma$ denotes an object related to $L$, then the symbol $\tilde \gamma$ with tilde will denote the similar object related to $\tilde L$. Note that the quasi-derivatives for these two problems are supposed to be different: $y^{[1]} = y' - \sigma y$ for $L$ and $y^{[1]} = y' - \tilde \sigma y$ for $\tilde L$. Without loss of generality, we suppose that the both eigenvalue sequences $\{ \lambda_n \}_{n \in \mathbb Z_0}$ and $\{ \tilde \lambda_n \}_{n \in \mathbb Z_0}$ satisfy Assumption $(\mathcal O)$.
Introduce the notations
\begin{gather} \nonumber
\hat Q := Q - \tilde Q, \quad \Theta(x) := \cos \hat Q(x), \quad \Lambda(x) := \sin \hat Q(x), \\ \nonumber
\lambda_{n,0} := \lambda_n, \quad \lambda_{n,1} := \tilde \lambda_n, \quad M_{n, 0} := M_n, \quad M_{n,1} := \tilde M_n, \\ \nonumber \mathbb S_0 := \mathbb S, \quad \mathbb S_1 := \tilde {\mathbb S}, \quad
m_{n,0} := m_n, \quad m_{n,1} := \tilde m_n, \\ \nonumber
S_{k + \nu,i}(x) := S_{\nu}(x, \lambda_{k,i}), \quad
\tilde S_{k + \nu, i}(x) := \tilde S_{\nu}(x, \lambda_{k,i}), \quad k \in \mathbb S_i, \quad \nu = \overline{0, m_{k,i}-1}, \quad i = 0, 1, \\ \label{defD}
\tilde D(x, \lambda, \mu) := \frac{S(x, \lambda) S'(x, \mu) - S'(x, \lambda) S(x, \mu)}{\lambda - \mu} = \int_0^x (\lambda + \mu - 2q_1(t)) \tilde S(t, \lambda) \tilde S(t, \mu) \, dt, \\ \label{defA}
\tilde A_{n + \nu, i}(x, \lambda) := \sum_{p = \nu}^{m_{n,i}-1} \frac{1}{(p-\nu)!} M_{n + p, i} \frac{\partial^{p - \nu}}{\partial \mu^{p-\nu}} \tilde D(x, \lambda, \mu)\Big|_{\mu = \lambda_{n,i}}, \\ \label{defP}
\tilde P_{n + \nu, i; k,j}(x) := \frac{1}{\nu!} \frac{\partial^{\nu} }{\partial \lambda^{\nu}} \tilde A_{k,j}(x, \lambda) \Big|_{\lambda = \lambda_{n,i}}, \quad n \in \mathbb S_i, \quad \nu = \overline{0, m_{n,i}-1}, \quad i = 0, 1.
\end{gather}
By using the contour integration in the $\lambda$-plane, Buterin and Yurko~\cite{BY12} have derived the following relation:
\begin{equation} \label{rel-cont}
\Theta(x) \tilde S_{n,i}(x) = S_{n,i}(x) - \sum_{k \in \mathbb Z_0} (\tilde P_{n,i; k,0}(x) S_{k,0}(x) - \tilde P_{n,i; k,1}(x) S_{k,1}(x)), \quad n \in \mathbb Z_0, \: i = 0, 1.
\end{equation}
However, it is inconvenient to use \eqref{rel-cont} as the main equation of the inverse problem, since the series converges only ``with brackets''. Therefore, below we transform \eqref{rel-cont} into an equation in the Banach space of infinite sequences.
Define the numbers
\begin{equation} \label{defchi}
\theta_n := |\lambda_n - \tilde \lambda_n|, \quad
\chi_n := \left\{\begin{array}{ll}
\theta_n^{-1}, \quad & \theta_n \ne 0, \\
0, \quad & \theta_n = 0.
\end{array}\right.
\end{equation}
Let $J$ be the set of indices $(n, i)$, $n \in \mathbb Z_0$, $i = 0, 1$. For each fixed $x \in [0, \pi]$, define the sequence $\phi(x) := [\phi_{n,i}(x)]_{(n, i) \in J}$ of the elements
\begin{equation} \label{defphi}
\begin{bmatrix}
\phi_{n,0}(x) \\ \phi_{n,1}(x)
\end{bmatrix} = n
\begin{bmatrix}
\chi_n & -\chi_n \\ 0 & 1
\end{bmatrix}
\begin{bmatrix}
S_{n,0}(x) \\ S_{n,1}(x)
\end{bmatrix}.
\end{equation}
Analogously define $\tilde \phi(x) = [\tilde \phi_{n,i}(x)]_{(n, i) \in J}$, replacing $S_{n,i}$ by $\tilde S_{n,i}$. It is clear that, for each fixed $x \in [0, \pi]$, the sequences $\phi(x)$ and $\tilde \phi(x)$ belong to the Banach space $\mathfrak B$ of bounded sequences $a = [a_{n,i}]_{(n, i) \in J}$ with the norm $\| a \|_{\mathfrak B} = \sup_{(n, i) \in J} |a_{n,i}|$.
Define the elements $\tilde H_{n,i; k,j}(x)$ for $(n, i), (k, j) \in J$ by the formula
\begin{equation} \label{defH}
\begin{bmatrix}
\tilde H_{n,0; k,0}(x) & \tilde H_{n,0; k,1}(x) \\
\tilde H_{n,1; k,0}(x) & \tilde H_{n,1; k,1}(x)
\end{bmatrix} =
\frac{n}{k}
\begin{bmatrix}
\chi_n & -\chi_n \\ 0 & 1
\end{bmatrix}
\begin{bmatrix}
\tilde P_{n,0; k,0}(x) & \tilde P_{n,0; k,1}(x) \\
\tilde P_{n,1; k,0}(x) & \tilde P_{n,1; k,1}(x)
\end{bmatrix}
\begin{bmatrix}
\theta_k & 1 \\ 0 & -1
\end{bmatrix}.
\end{equation}
Consider the linear operator $\tilde H(x) \colon \mathfrak B \to \mathfrak B$, $\tilde H = \tilde H(\{ \lambda_n, M_n\}_{n \in \mathbb Z_0}, \tilde L)$, acting as follows:
$$
\tilde H(x) a = \sum_{(k,j) \in J} \tilde H_{n,i; k,j}(x) a_{k,j}, \quad a = [a_{k,j}] \in \mathfrak B.
$$
Define the numbers $\{ \xi_n \}_{n \in \mathbb Z_0}$ as follows:
\begin{gather} \label{defxi}
\xi_{k + \nu} := |\lambda_k - \tilde \lambda_k| + \frac{1}{k} \sum_{p = \nu}^{m_k - 1} |M_{k + p} - \tilde M_{k + p}|, \quad k \in \mathbb S \cap \tilde {\mathbb S}, \quad m_k = \tilde m_k, \quad \nu = \overline{0, m_k-1}, \\ \nonumber
\xi_n := 1 \quad \text{for the rest of $n$.}
\end{gather}
Suppose that $\omega_0 = \tilde \omega_0$. Then, it follows from \eqref{asymptla1} and \eqref{asymptM1} that $\{ \xi_n \} \in l_2$. Using the standard technique based on Schwarz's lemma (see \cite[Section~1.6.1]{FY01} and \cite[Section~4]{BY12}), we obtain the estimate
\begin{equation} \label{estH}
|\tilde H_{n,i; k,j}(x)| \le C \xi_k \left(\frac{1}{|n - k| + 1} + \frac{1}{|k|} \right),
\end{equation}
where $(n, i), (k, j) \in J$, $x \in [0, \pi]$. Here and below, the same symbol $C$ denotes various positive constants independent of $n$, $i$, $k$, $j$, $x$, etc. Consequently,
\begin{multline*}
\| \tilde H(x) \|_{\mathfrak B \to \mathfrak B} \le C \sup_{n \in \mathbb Z_0} \sum_{k \in \mathbb Z_0} \xi_k \left(\frac{1}{|n - k| + 1} + \frac{1}{|k|} \right) \\
\le C \sqrt{\sum_{k \in \mathbb Z_0} \xi_k^2} \left( \sup_{n \in \mathbb Z_0} \sqrt{\sum_{k \in \mathbb Z_0} \frac{1}{(|n - k| + 1)^2}} + \sqrt{\sum_{k \in \mathbb Z_0} \frac{1}{|k|^2}} \right) < \infty,
\end{multline*}
that is, for each fixed $x \in [0, \pi]$, the operator $\tilde H(x)$ is bounded in $\mathfrak B$.
In the case $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, the functions $\tilde \phi_{n,i}(x)$ and $\tilde H_{n,i; k,j}(x)$ belong to $C^1[0, \pi]$ and, for $(n, i)$, $(k, j) \in J$, $x \in [0, \pi]$,
\begin{equation} \label{estHp}
|\tilde \phi'_{n,i}(x)| \le C |n|, \quad |\tilde H'_{n,i; k,j}(x)| \le C |n| \xi_k.
\end{equation}
Due to the introduced notations, relation~\eqref{rel-cont} yields the following theorem.
\begin{thm} \label{thm:maineq}
For each fixed $x \in [0, \pi]$, the following relation holds:
\begin{equation} \label{rel-B}
\Theta(x) \tilde \phi(x) = (I - \tilde H(x)) \phi(x),
\end{equation}
where $I$ is the identity operator in $\mathfrak B$.
\end{thm}
Assume that $\Theta(x) \ne 0$, $x \in [0, \pi]$. Denote
$$
z(x) = [z_{n,i}(x)]_{(n,i) \in J} := \frac{\phi(x)}{\Theta(x)}.
$$
Then \eqref{rel-B} implies the following equation in $\mathfrak B$ with respect to $z(x)$ for each fixed $x \in [0, \pi]$:
\begin{equation} \label{main}
\tilde \phi(x) = (I - \tilde H(x)) z(x).
\end{equation}
We call equation~\eqref{main} \textit{the main equation} of the inverse problem. The solvability of the main equation is given by the following theorem, which is proved similarly to Theorem~4.3 from \cite{BY12}.
\begin{thm} \label{thm:inv}
If $\Theta(x) \ne 0$, then the operator $(I - \tilde H(x))$ has a bounded inverse in $\mathfrak B$, so the main equation~\eqref{main} is uniquely solvable.
\end{thm}
Using the solution of the main equation, one can construct the solution of Inverse Problem~\ref{ip:M}. For this purpose, we introduce the functions
\begin{gather} \label{defvn}
v_{n,0}(x) := \frac{1}{n} (\theta_n z_{n,0}(x) + z_{n,1}(x)), \quad
v_{n,1}(x) := \frac{1}{n} z_{n,1}(x), \quad n \in \mathbb Z_0, \\ \nonumber
\tilde B_{n + \nu, i}(x) := \sum_{p = \nu}^{m_{n,i} - 1} M_{n + p, i} \tilde S_{n + p - \nu, i}(x), \quad n \in \mathbb S_i, \quad \nu = \overline{0, m_{n,i}-1}, \quad i = 0, 1.
\end{gather}
Let $n_0 \in \mathbb N \cup \{ 0 \}$ be the smallest index such that $m_{n,i} = 1$ for all $|n| > n_0$, $i = 0, 1$. Consider the series
\begin{align} \label{defeps1}
\varepsilon_1(x) & := \sum_{(k, j) \in J} (-1)^j \tilde B_{k,j}(x) v_{k,j}(x),\\ \label{defeps2}
\varepsilon_2(x) & := \sum_{\substack{|k| \le n_0 \\ j = 0, 1}} (-1)^j \lambda_{k,j} \tilde B_{k,j}(x) v_{k,j}(x) + \sum_{\substack{|k| > n_0 \\ j = 0, 1}} (-1)^j M_{k,j} \left( \lambda_{k,j} \tilde S_{k, j}(x) v_{k,j}(x) - \frac{1}{2 \lambda_{k,j}}\right), \\ \label{defeps3}
\varepsilon_3(x) & := \sum_{\substack{|k| \le n_0 \\ j = 0, 1}} (-1)^j \tilde B'_{k,j}(x) v_{k,j}(x) + \sum_{\substack{|k| > n_0 \\ j = 0, 1}} (-1)^j M_{k,j} \left( \tilde S'_{k,j}(x) v_{k,j}(x) + \frac{\Lambda(x)}{2 \lambda_{k,j} \Theta(x)}\right), \\ \label{defeps4}
\varepsilon_{4}(x) & := \sum_{j = 0}^{1} (-1)^j \sum_{m_{k,j} > 1} \sum_{\nu = 0}^{m_{k,j} - 2} \tilde B_{k + \nu + 1, j}(x) v_{k + \nu, j}(x).
\end{align}
\begin{lem} \label{lem:conv}
$\varepsilon_1 \in W_2^1[0, \pi]$, $\varepsilon_2, \varepsilon_3 \in L_2(0, \pi)$.
\end{lem}
\begin{proof}
Obviously, it is sufficient to prove the lemma for $n_0 = 0$. Note that $v_{k,j}(x) = (\Theta(x))^{-1} S_{k,j}(x)$ and $\tilde B_{k,j}(x) = M_{k,j} \tilde S_{k,j}(x)$.
\smallskip
\textbf{Step 1.} Using~\eqref{defeps1}, we derive
\begin{multline} \label{smeps1}
\varepsilon_1(x) \Theta(x) = \sum_{k \in \mathbb Z_0} (M_{k,0} \tilde S_{k,0}(x) S_{k,0}(x) - M_{k,1} \tilde S_{k,1}(x) S_{k,1}(x))
= \sum_{k \in \mathbb Z_0} (M_{k,0} - M_{k,1}) \tilde S_{k,0}(x) S_{k,0}(x) \\ + \sum_{k \in \mathbb Z_0} M_{k,1} (\tilde S_{k,0}(x) - \tilde S_{k,1}(x)) S_{k,0}(x) + \sum_{k \in \mathbb Z_0} M_{k,1} \tilde S_{k,1}(x) (S_{k,0}(x) - S_{k,1}(x)).
\end{multline}
It follows from \eqref{asymptla1}, \eqref{asymptM1}, \eqref{defxi}, and Lemma~\ref{lem:trans} for $S(x, \lambda)$ and $\tilde S(x, \lambda)$ that
\begin{gather*}
|M_{k,i}| \le C |k|, \quad |M_{k,0} - M_{k,1}| \le C |k| \xi_k, \quad
|S_{k,i}(x)|, |\tilde S_{k,i}(x)| \le C |k|^{-1}, \\
|S_{k,0}(x) - S_{k,1}(x)| \le C |k|^{-1} \xi_k, \quad
|\tilde S_{k,0}(x) - \tilde S_{k,1}(x)| \le C |k|^{-1} \xi_k
\end{gather*}
for $k \in \mathbb Z_0$, $x \in [0, \pi]$. Hence
$$
|\varepsilon_1(x) \Theta(x)| \le C \sum_{k \in \mathbb Z_0} |k|^{-1} \xi_k < \infty,
$$
that is, the series \eqref{smeps1} converges absolutely and uniformly with respect to $x \in [0, \pi]$. Since $\Theta \in W_2^1[0, \pi]$, $\Theta(x) \ne 0$, $x \in [0, \pi]$, this yields $\varepsilon_1 \in C[0, \pi]$.
\smallskip
\textbf{Step 2.} Differentiating \eqref{defeps1} and using the relations $S' = S^{[1]} + \sigma S$, $\tilde S' = \tilde S^{[1]} + \tilde \sigma \tilde S$, we obtain
\begin{align*}
\varepsilon_1'(x) & = (\Theta(x))^{-1} Z_1(x) + Z_2(x), \\
Z_1(x) & := \sum_{(k, j) \in J} (-1)^j M_{k,j} (\tilde S^{[1]}_{k,j}(x) S_{k,j}(x) + \tilde S_{k,j}(x) S^{[1]}_{k,j}(x)), \\
Z_2(x) & := \left(\sigma(x) + \tilde \sigma(x) - \frac{\Theta'(x)}{\Theta(x)}\right) \varepsilon_1(x).
\end{align*}
Obviously, $Z_2 \in L_2(0, \pi)$. Let us prove the same for $Z_1$. Lemma~\ref{lem:trans} yields
$$
\tilde S_{k,j}^{[1]}(x) S_{k,j}(x) + \tilde S_{k,j}(x) S_{k,j}^{[1]}(x) = \frac{\sin (2 \lambda_{k,j} x - Q(x) - \tilde Q(x))}{\lambda_{k,j}} + \frac{\varkappa_{k,j}(x)}{\lambda_{k,j}},
$$
where $\{ \varkappa_{k,j}(x) \}$ is some sequence satisfying
\begin{equation} \label{sumkappa}
\sum_{(k, j) \in J} |\varkappa_{k,j}(x)|^2 \le C, \quad
\sum_{k \in \mathbb Z_0} |\varkappa_{k,0}(x) - \varkappa_{k,1}(x)| \le C
\end{equation}
uniformly with respect to $x \in [0, \pi]$. Consequently,
\begin{align*}
Z_1(x) & = \mathscr S_1(x) + \mathscr S_2(x) + \mathscr S_3(x) + \mathscr S_4(x), \\
\mathscr S_1(x) & := \sum_{k \in \mathbb Z_0} \left( \frac{M_{k,0}}{\lambda_{k,0}} - \frac{M_{k,1}}{\lambda_{k,1}}\right) \sin (2 \lambda_{k,0} x - Q(x) - \tilde Q(x)), \\
\mathscr S_2(x) & := \sum_{k \in \mathbb Z_0} \frac{M_{k,1}}{\lambda_{k,1}} (\sin (2 \lambda_{k,0} x - Q(x) - \tilde Q(x)) - \sin(2 \lambda_{k,1} x - Q(x) - \tilde Q(x))), \\
\mathscr S_3(x) & := \sum_{k \in \mathbb Z_0} \left( \frac{M_{k,0}}{\lambda_{k,0}} - \frac{M_{k,1}}{\lambda_{k,1}}\right) \varkappa_{k,0}(x), \\
\mathscr S_4(x) & := \sum_{k \in \mathbb Z_0} \frac{M_{k,1}}{\lambda_{k,1}} (\varkappa_{k,0}(x) - \varkappa_{k,1}(x)).
\end{align*}
It follows from \eqref{asymptla1} and \eqref{asymptM1} that
\begin{equation} \label{smMla}
\left| \frac{M_{k,1}}{\lambda_{k,1}}\right| \le C, \quad
\left\{ \frac{M_{k,0}}{\lambda_{k,0}} - \frac{M_{k,1}}{\lambda_{k,1}} \right\} \in l_2.
\end{equation}
Furthermore,
\begin{multline*}
\sin (2 \lambda_{k,0} x - Q(x) - \tilde Q(x)) - \sin(2 \lambda_{k,1} x - Q(x) - \tilde Q(x)) \\ = 2 (\lambda_{k,0} - \lambda_{k,1})x \cos((\lambda_{k,0} + \lambda_{k,1})x - Q(x) - \tilde Q(x)) + O(\xi_k^2).
\end{multline*}
Hence, the series $\mathscr S_1(x)$ and $\mathscr S_2(x)$ converge in $L_2(0, \pi)$. In view of \eqref{sumkappa} and \eqref{smMla}, the series $\mathscr S_3(x)$ and $\mathscr S_4(x)$ converge absolutely and uniformly on $[0, \pi]$. Thus $\varepsilon_1' \in L_2(0, \pi)$, so $\varepsilon_1 \in W_2^1[0, \pi]$.
\textbf{Step 3.} Under our assumptions, we have
$$
\varepsilon_2(x) = \sum_{(k, j) \in J} (-1)^j M_{k,j} \left(\lambda_{k,j} \tilde S_{k,j}(x) S_{k,j}(x) (\Theta(x))^{-1} - \frac{1}{2 \lambda_{k,j}} \right).
$$
Lemma~\ref{lem:trans} yields
$$
\lambda_{k,j}\tilde S_{k,j}(x) S_{k,j}(x) = \frac{1}{2 \lambda_{k,j}} (\Theta(x) - \cos(2 \lambda_{k,j}x - Q(x) - \tilde Q(x)) + \varkappa_{k,j}(x)),
$$
where $\{ \varkappa_{k,j}(x) \}$ is some sequence satisfying \eqref{sumkappa}. Consequently,
$$
\varepsilon_2(x) = -\sum_{(k, j) \in J} (-1)^j \frac{M_{k,j}}{\lambda_{k,j}}(\cos(2 \lambda_{k,j}x - Q(x) - \tilde Q(x)) - \varkappa_{k,j}(x)).
$$
Analogously to Step~2 of this proof, we show that $\varepsilon_2 \in L_2(0, \pi)$. The proof for $\varepsilon_3$ is similar.
\end{proof}
\begin{lem} \label{lem:findq}
If $\Theta(x) \ne 0$, then $1 + \varepsilon_1^2(x) \ne 0$ and
\begin{align} \label{findTheta}
\Theta^2(x) = & \, \frac{1}{1 + \varepsilon_1^2(x)}, \quad \Lambda^2(x) = \frac{\varepsilon_1^2(x)}{1 + \varepsilon_1^2(x)}, \quad \Theta(x) \Lambda(x) = \frac{\varepsilon_1(x)}{1 + \varepsilon_1^2(x)},
\\ \label{findq1}
q_1(x) = & \, \tilde q_1(x) + \frac{\varepsilon_1'(x)}{1 + \varepsilon_1^2(x)}, \\ \nonumber
q_0(x) = & \, \tilde q_0(x) + 2 \varepsilon_2'(x) - 2 \tilde q'_1(x) \varepsilon_1(x) - 4 \tilde q_1(x) \varepsilon_1'(x) + 2 (\tilde q_1(x) - q_1(x)) \varepsilon_3(x) \\ \label{findq0} & + b(x) (\varepsilon_2(x) - 2 \tilde q_1(x) \varepsilon_1(x) + \varepsilon_4(x)) + 2 \varepsilon_4'(x) + \frac{b'(x)}{2} + \frac{b^2(x)}{4},
\end{align}
where $b(x) := 2 (\tilde q_1(x) - q_1(x)) \varepsilon_1(x)$ and the derivatives of $L_2$-functions are understood in the sense of distributions.
\end{lem}
Finally, we arrive at the following algorithm for solving Inverse Problem~\ref{ip:M}.
\begin{alg} \label{alg:1}
Suppose that the data $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are given.
\begin{enumerate}
\item Choose a model problem $\tilde L = L(\tilde q_0, \tilde q_1)$ such that $\tilde \omega_0 = \omega_0$ and $\Theta(x) \ne 0$ on $[0, \pi]$.
\item Construct $\tilde \phi(x)$ and $\tilde H(x)$.
\item Find $z(x)$ by solving the main equation~\eqref{main}.
\item Find $\varepsilon_1(x)$ by using \eqref{defvn}-\eqref{defeps1} and then $\Theta(x)$, $\Lambda(x)$ by \eqref{findTheta}.
\item Calculate the functions $\varepsilon_j(x)$, $j = \overline{2, 4}$, by formulas~\eqref{defeps2}-\eqref{defeps4}.
\item Find $q_1$ and $q_0$ by \eqref{findq1}-\eqref{findq0}.
\end{enumerate}
\end{alg}
Note that the choice of the square root branch for $\Theta(x)$ and $\Lambda(x)$ is uniquely specified by the continuity of these functions, the condition $\Theta(0) = 1$, and~\eqref{findTheta}. If $\Theta(x) = 0$ for some $x \in [0, \pi]$, one can apply the step-by-step process described in \cite{BY12}. However, in our analysis of the inverse problem solvability and stability in the further sections, the condition $\Theta(x) \ne 0$ is always fulfilled.
Algorithm~\ref{alg:1} implies the following uniqueness theorem for solution of Inverse Problem~\ref{ip:M}.
\begin{thm} \label{thm:uniq}
If $\lambda_n = \tilde \lambda_n$ and $M_n = \tilde M_n$, $n \in \mathbb Z_0$, then $q_j = \tilde q_j$ in $W_2^{j-1}(0, \pi)$, $j = 0, 1$. Thus, the spectral data $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ of the problem $L$ uniquely specify the potentials $q_j$, $j = 0, 1$.
\end{thm}
In the case $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, the series for $\varepsilon_j(x)$ converge in $W_2^{3 - j}[0, \pi]$, $j = \overline{1, 3}$. Moreover, one can use the following simpler formulas instead of~\eqref{defeps2}-\eqref{defeps3}:
\begin{align} \label{simpeps2}
\varepsilon_2(x) & := \sum_{(k, j) \in J} (-1)^j \lambda_{k,j} \tilde B_{k,j}(x) v_{k,j}(x), \\ \label{simpeps3}
\varepsilon_3(x) & := \sum_{(k, j) \in J} (-1)^j \tilde B'_{k,j}(x) v_{k,j}(x).
\end{align}
Usage of either \eqref{defeps2}-\eqref{defeps3} or \eqref{simpeps2}-\eqref{simpeps3} leads to the same $q_0$, $q_1$ in \eqref{findq1}-\eqref{findq0}.
\section{Estimates and approximation} \label{sec:approx}
This section plays an auxiliary role in studying solvability and stability of Inverse Problem~\ref{ip:M}. We impose the assumption of the uniform boundedness of the inverse operator $(I - \tilde H(x))^{-1}$, and obtain auxiliary estimates for the values constructed by Algorithm~\ref{alg:1}. Further, by using the finite spectral data $\{ \lambda_n, M_n \}_{|n| \le N}$, we construct the infinitely differentiable approximations $q_j^N$ of the potentials $q_j$ in Theorem~\ref{thm:approx}. This theorem plays an auxiliary role in the proofs of global and local solvability, but also can be considered as a separate result.
In this section, we assume that $\tilde L = L(\tilde q_0, \tilde q_1)$, $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are complex numbers (not necessarily being the spectral data of some problem $L$) numbered according to Assumption~($\mathcal O$). Suppose that the numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ and the spectral data $\{ \tilde \lambda_n, \tilde M_n \}_{n \in \mathbb Z_0}$ satisfy the following condition
\begin{equation} \label{estOmega}
\Omega := \sqrt{\sum_{n \in \mathbb Z_0} (n \xi_n)^2} < \infty.
\end{equation}
For $x\in[0, \pi]$, consider the linear bounded operator $\tilde H(x) = \tilde H(\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}, \tilde L)$ constructed according to the previous section.
\medskip
\textbf{Assumption} $(\mathcal I)$: For each fixed $x \in [0, \pi]$, the operator $(I - \tilde H(x))$ is invertible, and $\| (I - \tilde H(x))^{-1} \|_{\mathfrak B \to \mathfrak B} \le C$ uniformly with respect to $x \in [0, \pi]$.
\medskip
Together with $\tilde H(x)$, consider the operators $\tilde H^N(x) = [\tilde H^N_{n,i; k,j}(x)]_{(n, i), (k, j) \in J}$, $N \ge 1$ defined as
\begin{equation} \label{defHN}
\tilde H^N_{n,i; k,j}(x) = \left\{\begin{array}{ll}
\tilde H_{n,i; k,j}(x), \quad & |k| \le N, \\
0, \quad & |k| > N.
\end{array}\right.
\end{equation}
Using \eqref{estH}, we derive
\begin{multline*}
\| \tilde H(x) - \tilde H^N(x) \|_{\mathfrak B \to \mathfrak B} = \sup_{(n,i) \in J} \sum_{\substack{|k| > N \\ j = 0, 1}} |\tilde H_{n,i; k,j}(x)| = \sup_{n \in \mathbb Z_0} \sum_{|k| > N} C \xi_k \left( \frac{1}{|n - k| + 1} + \frac{1}{|k|}\right) \le C \Omega_N,
\end{multline*}
where
$$
\Omega_N := \sqrt{\sum_{|k| > N} (k \xi_k)^2}, \quad \lim_{N \to \infty} \Omega_N = 0.
$$
Therefore, we arrive at the following lemma.
\begin{lem} \label{lem:invHN}
For all sufficiently large $N$, the operators $(I - \tilde H^N(x))$ are invertible in $\mathfrak B$ for each fixed $x \in [0, \pi]$ and
\begin{gather*}
\| (I - \tilde H^N(x))^{-1} \|_{\mathfrak B \to \mathfrak B} \le C, \\
\| \tilde H(x) - \tilde H^N(x) \|_{\mathfrak B \to \mathfrak B} \le C \Omega_N, \quad \| (I - \tilde H(x))^{-1} - (I - \tilde H^N(x))^{-1} \|_{\mathfrak B \to \mathfrak B} \le C \Omega_N,
\end{gather*}
where $C$ does not depend on $x$ and $N$.
\end{lem}
\begin{lem} \label{lem:invest}
Let $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, be complex-valued functions, and let $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ be complex numbers satisfying Assumption $(\mathcal O)$. Suppose that the estimate \eqref{estOmega} and Assumption $(\mathcal I)$ are fulfilled. Then the components $[R_{n,i; k,j}(x)]_{(n,i), (k,j) \in J}$ of the linear bounded operator
$$
R(x) := (I - \tilde H(x))^{-1} - I
$$
and the components $[z_{n,i}(x)]_{(n,i) \in J}$ of the solution $z(x) = (I - \tilde H(x))^{-1} \tilde \phi(x)$ of the main equation~\eqref{main} belong to $C^1[0, \pi]$ and satisfy the estimates
\begin{gather} \label{estR}
|R_{n,i; k,j}(x)| \le C \xi_k \left( \frac{1}{|n - k| + 1} + \frac{1}{|k|} + \eta_k\right), \\ \label{defeta}
\eta_k := \sqrt{\sum_{l \in \mathbb Z_0} \frac{1}{l^2 (|l - k| + 1)^2}}, \quad \{ \eta_k \} \in l_2, \\ \label{estRp}
|R'_{n,i; k,j}(x)| \le C |n| \xi_k, \\ \label{estz}
|z_{n,i}^{(\nu)}(x)| \le C |n|^{\nu}, \quad \nu = 0, 1,
\end{gather}
for $(n, i), (k, j) \in J$, $x \in [0, \pi]$.
\end{lem}
\begin{proof}
\textbf{Step 1.} Let us prove the continuity of $R_{n,i; k,j}(x)$. Clearly, $\tilde H_{n,i; k,j} \in C[0, \pi]$. Fix $\varepsilon > 0$ and choose $N$ such that the conclusion of Lemma~\ref{lem:invHN} holds and
\begin{equation} \label{smdifRN}
\| R(x) - R^N(x) \|_{\mathfrak B \to \mathfrak B} \le \frac{\varepsilon}{3}, \quad x \in [0, \pi],
\end{equation}
where $R^N(x) = (I - \tilde H^N(x))^{-1} - I$. Note that the inverse $(I - \tilde H^N(x))^{-1}$ can be found by solving the system of finite linear equations
$$
a_{n,i} + \sum_{\substack{|k| \le N \\ j = 0, 1}} \tilde H_{n,i; k,j}(x) a_{k,j} = b_{n,i}, \quad (n, i) \in J.
$$
with respect to $[a_{n,i}]$ by Cramer's rule. Consequently, the components $R^N_{n,i; k,j}(x)$ of the inverse operator are continuous functions. For fixed $n,i,k,j$ and $x_0 \in [0, \pi]$, choose $\delta > 0$ such that, for all $x \in [0, \pi] \cap [x_0 - \delta, x_0 + \delta]$, we have $|R_{n,i; k,j}^N(x) - R_{n,i; k,j}^N(x_0)| \le \frac{\varepsilon}{3}$. This together with \eqref{smdifRN} yield
\begin{multline*}
|R_{n,i; k,j}(x) - R_{n,i; k,j}(x_0)| \le |R_{n,i; k,j}(x) - R^N_{n,i; k,j}(x)| + |R_{n,i; k,j}^N(x) - R_{n,i; k,j}^N(x_0)| \\ + |R_{n,i; k,j}(x_0) - R^N_{n,i; k,j}(x_0)| \le \varepsilon.
\end{multline*}
Thus, $R_{n,i; k,j}(x)$ is continuous at $x_0$. Since $x_0$ is arbitrary, we conclude that $R_{n,i; k,j} \in C[0, \pi]$.
\smallskip
\textbf{Step 2.} Let us estimate $R_{n,i; k,j}(x)$. By definition,
$$
(I + R(x))(I - \tilde H(x)) = I.
$$
In the element-wise form, this implies
\begin{equation} \label{sumRnk}
R_{n,i; k,j}(x) = \tilde H_{n,i; k,j}(x) + \sum_{(l,s) \in J} R_{n,i;l,s}(x) \tilde H_{l,s; k,j}(x), \quad (n, i), (k, j) \in J.
\end{equation}
Using the estimate $\| R(x) \|_{\mathfrak B \to \mathfrak B} \le C$ and \eqref{estH}, we obtain
\begin{equation} \label{estRrough}
|R_{n,i; k,j}(x)| \le |\tilde H_{n,i; k,j}(x)| + \| R(x) \|_{\mathfrak B \to \mathfrak B} \sup_{(l,s) \in J} |\tilde H_{l,s; k,j}(x)| \le C \xi_k.
\end{equation}
Using \eqref{estRrough}, \eqref{estH}, \eqref{estOmega}, and \eqref{defeta}, we derive
\begin{multline*}
\sum_{(l,s) \in J} |R_{n,i;l,s}(x)| |\tilde H_{l,s; k,j}(x)| \le C \sum_{l \in \mathbb Z_0} \xi_l \xi_k \left( \frac{1}{|l - k| + 1} + \frac{1}{|k|}\right) \\ \le \frac{C \xi_k}{|k|} \sum_{l \in \mathbb Z_0} \xi_l + C \xi_k \sqrt{\sum_{l \in \mathbb Z_0} (l \xi_l)^2} \eta_k \le C \xi_k ( |k|^{-1} + \eta_k).
\end{multline*}
Using this estimate together with \eqref{sumRnk} and \eqref{estH}, we arrive at \eqref{estR}.
\smallskip
\textbf{Step 3.} Let us prove \eqref{estRp}. Since $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, we have $\tilde H_{n,i; k,j} \in C^1[0, \pi]$ and the estimates \eqref{estHp} hold. Formal differentiation implies
$$
R'(x) = (I + R(x)) \tilde H'(x) (I + R(x)).
$$
Put $G(x) := \tilde H'(x) (I + R(x))$. Then
\begin{align} \label{sumG1}
G_{n,i; k,j}(x) & = \tilde H'_{n,i; k,j}(x) + \sum_{(l,s) \in J} \tilde H'_{n,i; l,s}(x) R_{l,s; k,j}(x), \\ \label{sumG2}
R'_{n,i; k,j}(x) & = G_{n,i; k,j}(x) + \sum_{(l, s) \in J} R_{n,i; l,s}(x) G_{l,s; k,j}(x).
\end{align}
Using \eqref{estHp}, \eqref{estOmega}, \eqref{estRrough}, and \eqref{sumG1}, we obtain
\begin{equation} \label{estG}
|G_{n,i; k,j}(x)| \le C |n|\xi_k.
\end{equation}
Using \eqref{estOmega}, \eqref{estR}, \eqref{sumG2}, and \eqref{estG}, we arrive at \eqref{estRp}. The absolute and uniform convergence of the series in \eqref{sumG1}-\eqref{sumG2} also follows from \eqref{estOmega}, \eqref{estHp}, and \eqref{estR}, so $R_{n,i; k,j} \in C^1[0, \pi]$.
\smallskip
\textbf{Step 4.} Let us estimate $z^{(\nu)}_{n,i}(x)$. Since $z(x) = (I + R(x)) \tilde \phi(x)$, we obtain $\| z(x) \|_{\mathfrak B} \le C$, so \eqref{estz} holds for $\nu = 0$.
Differentiation implies
\begin{equation} \label{difz}
z'_{n,i}(x) = \sum_{(k,j) \in J} R'_{n,i; k,j}(x) \tilde \phi_{k,j}(x) + \sum_{(k,j) \in J} R_{n,i; k,j}(x) \tilde \phi'_{k,j}(x).
\end{equation}
Using the estimates \eqref{estHp}, \eqref{estOmega}, \eqref{estR}, \eqref{estRp}, and $| \tilde \phi_{n,i}(x) | \le C$, we show that the series in \eqref{difz} converge absolutely and uniformly in $[0, \pi]$, so $z_{n,i} \in C^1[0, \pi]$, and obtain \eqref{estz} for $\nu = 1$.
\end{proof}
Using Lemma~\ref{lem:invest}, it can be shown that the series \eqref{defeps1}, \eqref{simpeps2}, \eqref{simpeps3}, and the series of derivatives for \eqref{defeps1} consist of continuous functions and converge absolutely and uniformly in $[0, \pi]$. Consequently, we obtain the following lemma.
\begin{lem} \label{lem:eps}
Under the conditions of Lemma~\ref{lem:invest}, the function $\varepsilon_1(x)$ defined by \eqref{defeps1} belongs to $C^1[0, \pi]$, the functions $\varepsilon_j(x)$, $j = 2,3,4$, defined by \eqref{defeps4}, \eqref{simpeps2}-\eqref{simpeps3} are continuous on $[0, \pi]$, and
\begin{equation} \label{esteps}
|\varepsilon_1^{(\nu)}(x)| \le C \Omega, \quad \nu = 0, 1, \qquad
|\varepsilon_j(x)| \le C \Omega, \quad j = 2,3,4, \quad x \in [0, \pi].
\end{equation}
\end{lem}
Below we consider two problems $L(q_0, q_1)$ and $L(\tilde q_0, \tilde q_1)$ with the spectral data $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ and $\{ \tilde \lambda_n, \tilde M_n \}_{n \in \mathbb Z_0}$, respectively, numbered according to Assumption $(\mathcal O)$. For $N \in \mathbb N$, define the data $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ as follows:
\begin{equation} \label{deflaN}
\lambda_n^N = \begin{cases}
\lambda_n, \quad |n| \le N, \\
\tilde \lambda_n, \quad |n| > N,
\end{cases}
\qquad
M_n^N = \begin{cases}
M_n, \quad |n| \le N, \\
\tilde M_n, \quad |n| > N.
\end{cases}
\end{equation}
\begin{thm} \label{thm:approx}
Suppose that $q_j \in W_2^j[0, \pi]$, $j = 0, 1$. Let the functions $\tilde q_j \in C^{\infty}[0, \pi]$, $j = 0, 1$, be such that $\omega_k = \tilde \omega_k$, $k = \overline{0, 2}$, $\Theta(x) \ne 0$ for all $x \in [0, \pi]$, and Assumption $(\mathcal I)$ is fulfilled. Then, for every sufficiently large $N$, the numbers $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $L(q_0^N, q_1^N)$ with some functions $q_j^N \in C^{\infty}[0, \pi]$. In addition,
\begin{equation} \label{estqN}
\left| \int_0^x (q_0(t) - q_0^N(t)) \, dt\right| \le C \Omega_N, \quad
|q_1(x) - q_1^N(x)| \le C \Omega_N, \quad x \in [0, \pi],
\end{equation}
where the constant $C$ does not depend on $x$ and $N$.
\end{thm}
\begin{proof}
\textbf{Step 1.} At the first step, we obtain auxiliary estimates. It follows from the condition $\omega_k = \tilde \omega_k$, $k = \overline{0, 2}$, and the asymptotics \eqref{asymptla2}-\eqref{asymptM2} that \eqref{estOmega} holds. Consider the operator $\tilde H(x) = \tilde H(\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}, \tilde L)$, $\tilde L = L(\tilde q_0, \tilde q_1)$, and the operators $\tilde H^N(x) = \tilde H(\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}, \tilde L)$, $N \ge 1$. Clearly, the functions $\tilde q_0$, $\tilde q_1$ together with $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfy the conditions of Lemma~\ref{lem:invest}, so the estimates \eqref{estR}, \eqref{estRp}-\eqref{estz} hold. Note that the operators $\tilde H^N(x)$, $N \ge 1$, coincide with the ones defined by \eqref{defHN}. By virtue of Lemma~\ref{lem:invHN}, for all sufficiently large $N$, the functions $\tilde q_0$, $\tilde q_1$ together with the data $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ satisfy the conditions of Lemma~\ref{lem:invest}. At Steps 1-2 of this proof, we agree that, if a symbol $\gamma$ denotes an object constructed by $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ and $\tilde L$, the symbol $\gamma^N$ with the upper index $N$ will denote the similar object constructed by $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ and $\tilde L$. Lemmas~\ref{lem:invHN} and \ref{lem:invest} imply the estimates
\begin{gather} \label{estdifRN}
\| R(x) - R^N(x) \|_{\mathfrak B \to \mathfrak B} \le C \Omega_N, \\
\label{estRN}
|R^N_{n,i; k,j}(x)| \le C \xi_k \left( \frac{1}{|n - k| + 1} + \frac{1}{|k|} + \eta_k \right), \quad |(R^N_{n,i; k,j}(x))'| \le C |n|\xi_k, \\ \label{estzN}
|(z_{n,i}(x))^{(\nu)}| \le C |n|^{\nu}, \quad \nu = 0, 1,
\end{gather}
for $(n, i), (k, j) \in J$, $x \in [0, \pi]$, where the constant $C$ does not depend on $N$.
In view of \eqref{defchi}, \eqref{defphi}, and \eqref{deflaN}, we have
$\tilde \phi_{n,i}^N(x) = \tilde \phi_{n,i}(x)$ for $|n| \le N$ and $\tilde \phi_{n,i}^N(x) = 0$ for $|n| > N$. Hence
\begin{align} \nonumber
z_{n,i}(x) & = \tilde \phi_{n,i}(x) + \sum_{(k,j) \in J} R_{n,i; k,j}(x) \tilde \phi_{k,j}(x), \\ \label{sumzN}
z_{n,i}^N(x) & = \tilde \phi_{n,i}(x) + \sum_{\substack{|k| \le N \\ j = 0, 1}} R_{n,i; k,j}^N(x) \tilde \phi_{k,j}(x)
\end{align}
for $|n| \le N$, $i = 0, 1$. Applying the subtraction and the estimates \eqref{estR}, \eqref{estdifRN}, $|\phi_{k,j}(x)| \le C$, we derive
\begin{multline} \label{difzN}
|z_{n,i}(x) - z_{n,i}^N(x)| \le \sum_{\substack{|k| \le N \\ j = 0, 1}} |R_{n,i; k,j}(x) - R_{n,i; k,j}^N(x)| |\tilde \phi_{k,j}(x)| + \sum_{\substack{|k| > N \\ j = 0, 1}} |R_{n,i; k,j}(x)||\tilde \phi_{k,j}(x)| \\ \le C \Omega_N + C \sum_{|k| > N}\xi_k \le C \Omega_N,
\end{multline}
for $|n| \le N$, $i = 0, 1$, $x \in [0, \pi]$. Following the strategy of the proof of Lemma~\ref{lem:invest} and using the estimates \eqref{estR}, \eqref{estRp}-\eqref{estz}, \eqref{estdifRN}-\eqref{estzN}, we analogously obtain
\begin{gather} \nonumber
|R_{n,i; k,j}(x) - R_{n,i; k,j}^N(x)| \le C \Omega_N \xi_k \left( \frac{1}{|k|} + \eta_k\right), \quad
|R'_{n,i; k,j}(x) - (R_{n,i; k,j}^N(x))'| \le C \Omega_N |n|\xi_k, \\ \label{difzNp}
|z'_{n,i}(x) - (z^N_{n,i}(x))'| \le C \Omega_N |n|,
\end{gather}
where $|n|, |k| \le N$, $i, j = 0, 1$, $x \in [0, \pi]$.
Using \eqref{defvn}, \eqref{difzN}-\eqref{difzNp}, we derive the estimates
\begin{gather*}
|(v_{n,i}(x) - v_{n,i}^N(x))^{(\nu)}| \le C \Omega_N |n|^{1 - \nu}, \\
|(v_{n,0}(x) - v_{n,1}(x) - v_{n,0}^N(x) + v_{n,1}^N(x))^{(\nu)}| \le C \Omega_N |n|^{1-\nu} \xi_n
\end{gather*}
for $\nu = 0, 1$, $|n| \le N$, $i = 0, 1$, $x \in [0, \pi]$. Taking the latter estimates, formulas \eqref{defeps1}, \eqref{defeps4}, \eqref{simpeps2}, \eqref{simpeps3}, and Lemma~\ref{lem:eps} into account, we conclude that $\varepsilon_1, \varepsilon_1^N \in C^1[0, \pi]$, $\varepsilon_j, \varepsilon_j^N \in C[0, \pi]$, $j = \overline{2, 4}$, and
\begin{equation} \label{difepsN}
|(\varepsilon_1(x) - \varepsilon_1^N(x))^{(\nu)}| \le C \Omega_N, \quad \nu = 0, 1, \qquad |\varepsilon_j(x) - \varepsilon_j^N(x)| \le C \Omega_N, \quad j = \overline{2, 4}.
\end{equation}
\smallskip
\textbf{Step 2.} Let us construct the functions $q_0^N$, $q_1^N$ and prove the estimates \eqref{estqN}. The assumption $\tilde q_j \in C^{\infty}[0, \pi]$ implies that $\tilde S_{n,i} \in C^{\infty}[0, \pi]$, $(n,i) \in J$. Consequently, $\tilde \phi_{n,i}$ and $\tilde H_{n,i; k,j}$ also belong to $C^{\infty}[0, \pi]$ for all $(n, i), (k, j) \in J$. In view of~\eqref{defHN}, for sufficiently large $N$, the inverse operator $I + R^N(x) = (I - \tilde H^N(x))^{-1}$ can be found by Cramer's rule, so the components $R^N_{n,i; k,j}(x)$ are also infinitely differentiable. Using \eqref{sumzN} and \eqref{defvn} for $v_{n,i}^N$, we conclude that $z_{n,i}^N, v_{n,i}^N \in C^{\infty}[0, \pi]$, $(n, i) \in J$. Obviously, $\varepsilon_j^N(x)$, $j = \overline{1, 4}$, are finite sums of $C^{\infty}$-functions, so $\varepsilon_j \in C^{\infty}[0, \pi]$, $j = \overline{1, 4}$.
By Lemma~\ref{lem:findq}, the condition $\Theta(x) \ne 0$ implies $\varepsilon_1^2(x) + 1 \ne 0$, $x \in [0, \pi]$. It follows from \eqref{difepsN} and $\lim\limits_{N \to \infty} \Omega_N = 0$ that, for sufficiently large $N$, $(\varepsilon_1^N(x))^2 + 1 \ne 0$ and the functions
$$
(\Theta^N(x))^2 = \frac{1}{1 + (\varepsilon_1^N(x))^2}
$$
are infinitely differentiable and uniformly bounded with respect to $x \in [0, \pi]$ and $N$. One can uniquely choose the square root branch to find $\Theta^N \in C^{\infty}[0, \pi]$ satisfying $\Theta^N(0) = 1$.
Construct the functions $q_0^N$, $q_1^N$ by formulas \eqref{findq1}-\eqref{findq0}, replacing $\varepsilon_j$ by $\varepsilon_j^N$ and $\Theta$ by $\Theta^N$. Clearly, $q_j \in C^{\infty}[0, \pi]$, $j = 0, 1$. The estimates \eqref{difepsN} imply \eqref{estqN}.
\smallskip
\textbf{Step 3.} It remains to prove that $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $L(q_0^N, q_1^N)$. At this step, we assume that all the considered objects are related to the data $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ for a sufficiently large fixed $N$, and the index $N$ will be omitted for brevity.
Construct the function
\begin{equation} \label{defPhi}
\Phi(x, \lambda) := \tilde \Phi(x, \lambda) \Theta(x) + \sum_{k,j} (-1)^j \tilde F_{k,j}(x, \lambda) v_{k,j}(x) \Theta(x),
\end{equation}
where the summation range for $k, j$ is $|k| \le N$, $j = 0, 1$, and
\begin{equation} \label{defF}
\tilde F_{n + \nu, i}(x, \lambda) := \sum_{p = \nu}^{m_{n,i}-1} \frac{1}{(p - \nu)!} M_{n + p, i} \frac{\partial^{p - \nu}}{\partial \mu^{p - \nu}}\tilde E(x, \lambda, \mu) \Big|_{\mu = \lambda_{n,i}}, \quad n \in \mathbb S_i, \: \nu = \overline{0, m_{n,i}-1}, \: i = 0, 1,
\end{equation}
\begin{multline} \label{relE}
\tilde E(x, \lambda, \mu) := \frac{\tilde \Phi(x, \lambda) \tilde S'(x, \mu) - \tilde \Phi'(x, \lambda) \tilde S(x, \mu)}{\lambda - \mu} \\
= \frac{1}{\lambda - \mu} + \int_0^x (\lambda + \mu - 2 q_1(t)) \tilde \Phi(t, \lambda) \tilde S(t, \mu) \, dt.
\end{multline}
Clearly, $\Phi(x, \lambda)$ is analytic in $\lambda \ne \lambda_{n,i}$ for each fixed $x \in [0, \pi]$ and infinitely differentiable with respect to $x$ for each fixed $\lambda \ne \lambda_{n,i}$, $(n, i) \in J$.
\begin{lem}
The function $\Phi(x, \lambda)$ defined by \eqref{defPhi} is the Weyl function of the problem $L(q_0, q_1)$.
\end{lem}
\begin{proof}
By direct calculations, one can prove the following relations
\begin{equation} \label{relPhi}
\ell(\Phi) + 2 \lambda q_1(x) \Phi = \lambda^2 \Phi, \quad \Phi(0, \lambda) = 1.
\end{equation}
Let us show that $\Phi(\pi, \lambda) = 0$. For simplicity, suppose that $m_{n,i} = 1$ for all $|n| \le N$, $i = 0, 1$. The general case requires technical modifications. Using \eqref{defPhi} and the relation $\tilde \Phi(\pi, \lambda) = 0$, we derive
\begin{equation} \label{smPhi}
\Phi(\pi, \lambda) = - \tilde \Phi'(\pi, \lambda) \Theta(\pi) \sum_{k,j} (-1)^j M_{k,j} \frac{\tilde S_{k,j}(\pi) v_{k,j}(\pi)}{\lambda - \lambda_{k,j}}.
\end{equation}
Due to our notations, the main equation \eqref{main} is equivalent to the system
$$
v_{n,i}(x) = \tilde S_{n,i}(x) + \sum_{k,j}(-1)^j M_{k,j} \tilde D(x, \lambda_{n,i}, \lambda_{k,j}) v_{k,j}(x), \quad (n, i) \in J, \quad x \in [0, \pi].
$$
Recall that $\{ \lambda_{n,1} \}$ are the eigenvalues of $\tilde L$, so $\tilde S_{n,1}(\pi) = 0$. Hence
\begin{equation} \label{smvn}
v_{n,1}(\pi) = \sum_{k,j} (-1)^j M_{k,j} \tilde D(\pi, \lambda_{n,1}, \lambda_{k,j}) v_{k,j}(\pi), \quad |n| \le N.
\end{equation}
Relations \eqref{defal}, \eqref{relalM}, and \eqref{defD} imply
$$
\tilde D(\pi, \lambda_{n,1}, \lambda_{n,1}) = \tilde \alpha_n = -M_{n,1}^{-1}, \qquad \tilde D(\pi, \lambda_{n,1}, \lambda_{k,1}) = 0, \quad n \ne k.
$$
Consequently, \eqref{smvn} takes the form
\begin{equation} \label{smvn1}
\sum_{|k| \le N} \tilde P_{n,1; k,0}(\pi) v_{k,0}(\pi) = 0, \quad |n| \le N.
\end{equation}
Define the $(4N \times 4N)$-matrix $\tilde H_{4N \times 4N}(x) := [\tilde H_{n,i; k,j}(x)]$, $|n|, |k| \le N$, $i, j = 0, 1$. Denote by $I_{4N \times 4N}$ the $(4N \times 4N)$ unit matrix. It follows from the invertibility of the operator $(I - \tilde H(\pi))$ that
\begin{equation} \label{detH}
\det(I_{4N \times 4N} - \tilde H_{4N \times 4N}(\pi)) \ne 0.
\end{equation}
By using the definitions \eqref{defA}-\eqref{defP} and \eqref{defH}, one can show that \eqref{detH} implies $\det(\tilde P_{2N \times 2N}(\pi)) \ne 0$, where $\tilde P_{2N \times 2N}(\pi) := [\tilde P_{n,1; k,0}(\pi)]$, $|n|, |k| \le N$. Hence, the system~\eqref{smvn1} has the only zero solution $v_{k,0}(\pi) = 0$, $|k| \le N$.
Since $v_{k,0}(\pi) = 0$ and $\tilde S_{k,1}(\pi) = 0$ in \eqref{smPhi}, we obtain $\Phi(\pi, \lambda) \equiv 0$. Together with \eqref{relPhi}, this yields the claim of the lemma.
\end{proof}
Proceed with the proof of Theorem~\ref{thm:approx}. In view of~\eqref{defPhi}, the Weyl function has the form
$$
M(\lambda) = \Phi'(0, \lambda) = \tilde M(\lambda) + \sum_{k,j} (-1)^j \tilde F_{k,j}(0, \lambda).
$$
Taking \eqref{defF} and \eqref{relE} into account, we obtain
$$
M(\lambda) = \tilde M(\lambda) + \sum_{j = 0, 1} (-1)^j \sum_{n \in \mathbb S_j, \, |n| \le N} \sum_{\nu = 0}^{m_{n,j}-1} \frac{M_{n + \nu,j}}{(\lambda - \lambda_{n,j})^{\nu + 1}}
$$
Clearly, the function $M(\lambda)$ is meromorphic with the poles $\{ \lambda_n^N \}_{n \in \mathbb Z_0}$ and the corresponding residues $\{ M_n^N \}_{n \in \mathbb Z_0}$. Thus, $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ are the spectral data of the constructed problem $L(q_0^N, q_1^N)$, so the proof of Theorem~\ref{thm:approx} is finished.
\end{proof}
\begin{remark} \label{rem:approx}
Note that, for any fixed functions $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, there exist $\tilde q_j \in C^{\infty}[0, \pi]$, $j = 0, 1$, satisfying the conditions of Theorem~\ref{thm:approx}. Indeed, for every $\delta > 0$, one can find polynomials $\tilde q_0$, $\tilde q_1$ such that
\begin{equation} \label{smmodel}
\omega_k = \tilde \omega_k, \quad k = \overline{0, 2}, \qquad \| q_j - \tilde q_j \|_{W_2^j[0, \pi]} \le \delta, \quad j = 0, 1.
\end{equation}
In particular, \eqref{smmodel} implies $\Theta(x) \ne 0$, $x \in [0, \pi]$, for sufficiently small $\delta > 0$. If the spectrum of the problem $L(q_0, q_1)$ is simple, one can easily prove the stability of the direct problem $L(q_0, q_1) \mapsto \{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$. Namely, the conditions \eqref{smmodel} imply the inequality $\Omega \le C \delta$ for every $\delta \in (0, \delta_0]$ with some $\delta_0 > 0$. Consequently, $\| \tilde H(x) \|_{\mathfrak B \to \mathfrak B} \le C \delta$, so for sufficiently small $\delta$ Assumption $(\mathcal I)$ is fulfilled. The case of multiple eigenvalues can be treated similarly, by using the approach of Section~\ref{sec:mult}.
\end{remark}
\begin{remark}
In view of~\eqref{relalM}, Theorems~\ref{thm:uniq} and~\ref{thm:approx} are valid for the spectral data $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ being replaced by $\{ \lambda_n, \alpha_n \}_{n \in \mathbb Z_0}$.
\end{remark}
\section{Solvability and stability} \label{sec:sol}
The goal of this section is to prove Theorem~\ref{thm:solve} on the global solvability of Inverse Problem~\ref{ip:M}. The proof is based on the constructive solution from Section~\ref{sec:alg}, auxiliary estimates and the approximation by infinitely differentiable potentials obtained in Section~\ref{sec:approx}. Theorem~\ref{thm:solve} implies Corollary~\ref{cor:locsimp} on the local solvability and stability without change of eigenvalue multiplicities. The latter result will be improved in Section~\ref{sec:mult}.
Define the class $C^{-1}[0, \pi]$ of functions $f = g'$, where $g \in C[0, \pi]$ and the derivative is understood in the sense of distributions. Put $C^0[0, \pi] := C[0, \pi]$.
\begin{thm} \label{thm:solve}
Let $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, be complex-valued functions, and let $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ be complex numbers satisfying Assumption $(\mathcal O)$. Suppose that the estimate \eqref{estOmega} and Assumption~$(\mathcal I)$ are fulfilled. Then, by Steps~2-4 of Algorithm~\ref{alg:1}, one can construct the function $\varepsilon_1 \in C^1[0, \pi]$. If we additionally assume that $1 + \varepsilon_1^2(x) \ne 0$ for all $x \in [0, \pi]$, then $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $L(q_0, q_1)$, $q_j \in C^{j-1}[0, \pi]$, $j= 0, 1$. The functions $q_0$, $q_1$ can be constructed by formulas~\eqref{findq1}-\eqref{findq0}, where $\varepsilon_k$, $k = \overline{2,4}$, are defined by \eqref{simpeps2}-\eqref{simpeps3} and \eqref{defeps4}. Moreover, the following estimates hold:
\begin{equation} \label{estq}
\left| \int_0^x (q_0(t) - \tilde q_0(t)) \, dt\right| \le C \Omega, \quad
|q_1(x) - \tilde q_1(x)| \le C \Omega, \quad x \in [0, \pi].
\end{equation}
\end{thm}
\begin{proof}
The possibility to construct the functions $\varepsilon_k(x)$, $k = \overline{1, 4}$, of appropriate smoothness follows from Lemmas~\ref{lem:invest}-\ref{lem:eps}. If $1 + \varepsilon_1^2(x) \ne 0$, $x \in [0, \pi]$, the functions $q_0$, $q_1$ of appropriate classes can obviously be constructed by formulas~\eqref{findq1}-\eqref{findq0}. The estimates~\eqref{estq} follow from~\eqref{esteps}.
It remains to show that the spectral data of the problem $L(q_0, q_1)$ coincide with the initially known numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$. For this purpose, we choose the functions $\tilde{\tilde q}_j \in C^{\infty}[0, \pi]$, $j = 0, 1$, such that $\tilde \omega_k = \tilde {\tilde \omega}_k$, $k = \overline{0, 2}$, $\tilde{\tilde \Theta}(x) := \cos(\tilde Q(x) - \tilde{\tilde Q}(x)) \ne 0$, $x \in [0, \pi]$, and Assumption~$(\mathcal I)$ holds for the operator $\tilde{\tilde H}(x) := \tilde H(\{ \tilde \lambda_n, \tilde M_n \}_{n \in \mathbb Z_0}, L(\tilde{\tilde q}_0, \tilde{\tilde q}_1))$. In view of Remark~\ref{rem:approx}, such functions $\tilde{\tilde q}_j$, $j = 0, 1$, exist. Define
\begin{gather} \label{deflaN2}
\lambda_n^N = \begin{cases}
\lambda_n, \quad |n| \le N, \\
\tilde {\tilde \lambda}_n, \quad |n| > N,
\end{cases}
\qquad
M_n^N = \begin{cases}
M_n, \quad |n| \le N, \\
\tilde {\tilde M}_n, \quad |n| > N.
\end{cases},
\\ \nonumber
\tilde \lambda_n^N = \begin{cases}
\tilde \lambda_n, \quad |n| \le N, \\
\tilde {\tilde \lambda}_n, \quad |n| > N,
\end{cases}
\qquad
\tilde M_n^N = \begin{cases}
\tilde M_n, \quad |n| \le N, \\
\tilde {\tilde M}_n, \quad |n| > N.
\end{cases},
\end{gather}
By virtue of Theorem~\ref{thm:approx}, for every sufficiently large $N \in \mathbb N$, the numbers $\{ \tilde \lambda_n^N, \tilde M_n^N \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $\tilde L^N := L(\tilde q_0^N, \tilde q_1^N)$ with $\tilde q_j^N \in C^{\infty}[0, \pi]$, $j = 0, 1$. Consider the operators $\tilde H(x) := \tilde H(\{ \lambda_n, M_n \}, \tilde L)$ and $\tilde H^N(x) := \tilde H(\{ \lambda_n^N, M_n^N \}, \tilde L^N)$. According to Theorem~\ref{thm:approx}, the estimate~\eqref{estH}, and the introduced notations,
\begin{gather*}
|\tilde H^N_{n,i; k,j}(x) - \tilde H_{n,i; k,j}(x)| \le C \Omega_N \xi_k \left( \frac{1}{|n - k| + 1} + \frac{1}{|k|}\right), \quad (n, i), (k, j) \in J, \quad x \in (0, \pi), \\
\tilde H^N_{n,i; k,j}(x) = 0, \quad |k| > N.
\end{gather*}
Hence
$$
\| \tilde H^N(x) - \tilde H(x) \|_{\mathfrak B \to \mathfrak B} \le C \Omega_N.
$$
Since Assumption $(\mathcal I)$ holds for $\tilde H(x)$, it also holds for $\tilde H^N(x)$ with sufficiently large $N$. Therefore, the conditions of Lemmas~\ref{lem:invest}-\ref{lem:eps} are fulfilled for $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ together with the problem $\tilde L^N$. Applying these lemmas to $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ and $\tilde L^N$, one can construct the infinitely differentiable functions $\varepsilon_j^N(x)$, $j = \overline{1, 4}$, which satisfy the estimates~\eqref{difepsN}. If $1 + \varepsilon_1^2(x) \ne 0$, $x \in [0, \pi]$, we have $1 + (\varepsilon_1^N(x))^2 \ne 0$ for every sufficiently large $N$ and all $x \in [0, \pi]$. Therefore, one can construct by~\eqref{findq1}-\eqref{findq0} the functions $q_j^N \in C^{\infty}[0, \pi]$, $j = 0, 1$, which satisfy~\eqref{estqN}. Since the series for $\varepsilon_j^N(x)$, $j = \overline{1, 4}$, are finite, it can be shown that $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$ are the spectral data of $L(q_0^N, q_1^N)$ similarly to Step~3 of the proof of Theorem~\ref{thm:approx}.
Using Lemma~\ref{lem:trans} and relations~\eqref{defal}-\eqref{relalM}, we obtain the following auxiliary lemma.
\begin{lem} \label{lem:lim}
Let $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ and $\{ \lambda_n^N, M_n^N \}_{n \in \mathbb Z_0}$, $N \ge 1$, be the spectral data of the problems $L(q_0, q_1)$ and $L(q_0^N, q_1^N)$, $N \ge 1$, respectively, where $q_j, q_j^N \in W_2^{j-1}(0, \pi)$, $j = 0, 1$, and
\begin{equation} \label{limq}
\lim_{N \to \infty} \| q_j - q_j^N \|_{W_2^{j-1}(0, \pi)} = 0, \quad j = 0, 1.
\end{equation}
Then, for each fixed $n \in \mathbb Z_0$, we have $\lim\limits_{N \to \infty} \lambda_n^N = \lambda_n$. In addition, if $n \in \mathbb S \cap \mathbb S^N$ and $m_n = m_n^N$, then $\lim\limits_{N \to \infty} M_n^N = M_n$.
\end{lem}
Clearly, the functions $q_j$ and $q_j^N$, $j = 0, 1$, constructed in the proof of Theorem~\ref{thm:solve} satisfy \eqref{limq} by virtue of~\eqref{difepsN}. Thus, the spectral data $\{ \lambda_n^N, M_n^N \}$ of the problem $L(q_0^N, q_1^N)$ converge to the spectral data of the problem $L(q_0, q_1)$ in the sense of Lemma~\ref{lem:lim}. Taking~\eqref{deflaN2} into account, we conclude that the spectral data of $L(q_0, q_1)$ coincide with $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$, so Theorem~\ref{thm:solve} is proved.
\end{proof}
The following corollary of Theorem~\ref{thm:solve} provides local solvability and stability of Inverse Problem~\ref{ip:M}.
\begin{cor} \label{cor:locsimp}
Let $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$, be complex-valued functions, and let $\{ \tilde \lambda_n, \tilde M_n \}_{n \in \mathbb Z_0}$ be the spectral data of the problem $\tilde L = L(\tilde q_0, \tilde q_1)$. Then there exists $\delta_0 > 0$ such that, for any complex numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfying Assumption $(\mathcal O)$ and the estimate $\Omega \le \delta_0$, there exist complex-valued functions $q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, such that $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $L(q_0, q_1)$. In addition, the estimate~\eqref{estq} is valid.
\end{cor}
\begin{proof}
It follows from \eqref{estH} and \eqref{estOmega} that $\| \tilde H(x) \|_{\mathfrak B \to \mathfrak B} \le C \Omega$, $x \in [0, \pi]$. If $\Omega$ is sufficiently small, Assumption $(\mathcal I)$ is fulfilled. Lemma~\ref{lem:eps} implies $\| \varepsilon_1 \|_{C[0, \pi]} \le C \Omega$, so $1 + \varepsilon_1^2(x) \ne 0$ for sufficiently small $\Omega$. Thus, Theorem~\ref{thm:solve} yields the claim.
\end{proof}
In view of the definitions \eqref{defxi} and \eqref{estOmega}, the multiplicities in the sequences $\{ \lambda_n \}_{n \in \mathbb Z_0}$ and $\{ \tilde \lambda_n \}_{n \in \mathbb Z_0}$ coincide for sufficiently small $\Omega$. In the next section, Corollary~\ref{cor:locsimp} will be generalized to the case of changing eigenvalue multiplicities.
\section{Multiple eigenvalue splitting} \label{sec:mult}
In this section, we obtain the local solvability and stability of Inverse problem~\ref{ip:M} in the general case, taking the possible splitting of multiple eigenvalues into account.
Consider a fixed problem $\tilde L = L(\tilde q_0, \tilde q_1)$ with $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$. Fix an index $n_* \in \mathbb N \cup \{ 0 \}$ and a contour $\gamma := \{ \lambda \in \mathbb C \colon |\lambda| = r \}$, $r > 0$, such that $\tilde m_n = 1$ for $|n| > n_*$, $\tilde \lambda_n \in \mbox{int} \, \gamma$ for all $|n| \le n_*$ and $\tilde \lambda_n \not\in \overline{\mbox{int} \, \gamma}$ for all $|n| > n_*$. Along with $\tilde L$, consider some complex numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ (not necessarily being the spectral data of some problem $L$). Suppose that Assumption $(\mathcal O)$ holds for the both collections $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ and $\{ \tilde \lambda_n, \tilde M_n \}_{n \in \mathbb Z_0}$. Set
\begin{gather*}
\mathbb S_* := \{n \in \mathbb S \colon |n| \le n_* \}, \quad
\tilde {\mathbb S}_* := \{ n \in \tilde {\mathbb S} \colon |n| \le n_* \}, \\
M_*(\lambda) := \sum_{n \in \mathbb S_*} \sum_{\nu = 0}^{m_n - 1} \frac{M_{n + \nu}}{(\lambda - \lambda_n)^{\nu + 1}}, \quad
\tilde M_*(\lambda) := \sum_{n \in \tilde{\mathbb S}_*} \sum_{\nu = 0}^{\tilde m_n - 1} \frac{\tilde M_{n + \nu}}{(\lambda - \tilde \lambda_n)^{\nu + 1}}, \quad \hat M_* := M_* - \tilde M_*.
\end{gather*}
\begin{thm} \label{thm:locmult}
Let $\tilde q_j \in W_2^j[0, \pi]$, $j=0,1$. Then there exists $\delta_0 > 0$ such that, for any complex numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfying Assumption $(\mathcal O)$ and the estimate
\begin{equation} \label{estde}
\delta := \max \left\{ \max_{\lambda \in \gamma} |\hat M_*(\lambda)|, \sqrt{\sum_{|n| > n_*} (n \xi_n)^2} \right\} \le \delta_0,
\end{equation}
there exist the functions $q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, such that $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are the spectral data of the problem $L(q_0, q_1)$. In addition,
\begin{equation} \label{estqde}
\left| \int_0^x (q_0(t) - \tilde q_0(t)) \, dt\right| \le C \delta, \quad
|q_1(x) - \tilde q_1(x)| \le C \delta, \quad x \in [0, \pi].
\end{equation}
\end{thm}
We emphasize that the multiplicities in the sequences $\{ \lambda_n \}_{n \in \mathbb Z_0}$ and $\{ \tilde \lambda_n \}_{n \in \mathbb Z_0}$ may differ. However, for sufficiently small $\delta > 0$, we have $\mathbb S \subseteq \tilde {\mathbb S}$. Roughly speaking, multiple eigenvalues can split into smaller groups but cannot join into new groups.
\begin{proof}
\textbf{Step 1.} Consider the following special case. Let $\tilde q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, be fixed, and let $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ be arbitrary numbers satisfying Assumption $(\mathcal O)$ and $\lambda_n = \tilde \lambda_n$, $M_n = \tilde M_n$ for all $|n| > n_*$.
If $\delta$ defined by \eqref{estde} is sufficiently small, then, by virtue of Lemma~\ref{lem:rat}, $\lambda_n \in \mbox{int}\, \gamma$ for $|n| \le n_*$.
Denote by $C(\gamma)$ the Banach space of functions continuous on $\gamma$ with the norm $\| f \|_{C(\gamma)} := \max\limits_{\lambda \in \gamma} |f(\lambda)|$. For each fixed $x \in [0, \pi]$, define the linear bounded operator $\tilde H_{\gamma}(x) \colon C(\gamma) \to C(\gamma)$ acting as follows:
$$
(\tilde H_{\gamma}(x) f)(\lambda) = \frac{1}{2 \pi i} \oint\limits_{\gamma} \tilde D(x, \lambda, \mu) \hat M_*(\mu) f(\mu) \, d\mu, \quad f \in C(\gamma).
$$
It follows from \eqref{defD} and \eqref{estde} that $\| \tilde H_{\gamma}(x) \|_{C(\gamma) \to C(\gamma)} \le C \delta$, $x \in [0, \pi]$. Therefore, there exist $\delta_0 > 0$ such that, for any collection $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfying \eqref{estde} and each $x \in [0, \pi]$, the operator $(I - \tilde H_{\gamma}(x))$ is invertible. Moreover, $\| (I - \tilde H_{\gamma}(x))^{-1} \|_{C(\gamma) \to C(\gamma)} \le C$ uniformly with respect to $\delta \le \delta_0$ and $x \in [0, \pi]$. Hence, for each fixed $x \in [0, \pi]$, the equation
\begin{equation} \label{mainv}
v(x, \lambda) = \tilde S(x, \lambda) + \frac{1}{2 \pi i} \oint\limits_{\gamma} \tilde D(x, \lambda, \mu) \hat M_*(\mu) v(x, \mu) \, d\mu
\end{equation}
has the unique solution $v(x, .) \in C(\gamma)$, $|v(x, \mu)| \le C$ for $x \in [0, \pi]$ and $\mu \in \gamma$.
Define the functions
\begin{align} \label{defE12}
\mathcal E_j(x) & = \frac{1}{2 \pi i} \oint\limits_{\gamma} \mu^{j - 1} \hat M_*(\mu) \tilde S(x, \mu) v(x, \mu) \, d\mu, \quad j = 1, 2, \\ \label{defE3}
\mathcal E_3(x) & = \frac{1}{2 \pi i} \oint\limits_{\gamma} \hat M_*(\mu) \tilde S'(x, \mu) v(x, \mu) \, d\mu.
\end{align}
It can be easily shown that
\begin{align} \label{estE12}
\mathcal E_j \in C^1[0, \pi], \quad & \| \mathcal E_j \|_{C^1[0, \pi]} \le C \delta, \quad j = 1, 2, \\ \label{estE3}
\mathcal E_3 \in C[0, \pi], \quad & \| \mathcal E_3 \|_{C[0, \pi]} \le C \delta.
\end{align}
Note that relation \eqref{mainv} provides the analytical continuation of the function $v(x, \lambda)$ to the whole complex plane. Calculating the integral in \eqref{mainv} by the residue theorem, we obtain
\begin{equation} \label{discv}
v_{n,i}(x) = \tilde S_{n,i}(x) + \sum_{k,j} (-1)^j \tilde P_{n,i; k,j}(x) v_{k,j}(x), \quad (n, i) \in J, \quad x \in [0, \pi],
\end{equation}
where
$$
v_{k + \nu,i}(x) := \frac{1}{\nu!} \frac{\partial^{\nu} v(x, \lambda)}{\partial \lambda^{\nu}}\Big|_{\lambda = \lambda_{k,i}}, \quad k \in \mathbb S_i, \quad \nu = \overline{0, m_{k,i}-1}, \quad i = 0, 1.
$$
The summation in \eqref{discv} can be taken either over $|k| \le n_*$, $j = 0, 1$, or over $(k, j) \in J$, because in our special case $\tilde P_{n,i; k,0}(x) = \tilde P_{n,i; k,1}(x)$, $v_{k,0}(x) = v_{k,1}(x)$ for $|k| > n_*$. Comparing \eqref{discv} with \eqref{rel-cont}, we conclude that the sequence $[v_{n,i}(x)]_{(n, i) \in J}$ coincide with the one defined via \eqref{defvn} by the solution $z(x)$ of the main equation~\eqref{main}. Calculating the integrals in \eqref{defE12}-\eqref{defE3} by the residue theorem, we conclude that
$$
\mathcal E_1(x) = \varepsilon_1(x), \quad \mathcal E_2(x) = \varepsilon_2(x) + \varepsilon_4(x), \quad \mathcal E_3(x) = \varepsilon_3(x),
$$
where $\varepsilon_j(x)$, $j = \overline{1, 4}$, are defined by \eqref{defeps1}, \eqref{defeps4}, \eqref{simpeps2}-\eqref{simpeps3}. Hence, the estimate \eqref{estE12} implies that $1 + \varepsilon_1^2(x) \ne 0$ for all sufficiently small $\delta$ and $x \in [0, \pi]$. Thus, by using $\mathcal E_k(x)$, $k = \overline{1, 3}$, one can construct the functions $q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, by \eqref{findq1}-\eqref{findq0}. Since the sums for $\mathcal E_j(x)$, $j = \overline{1, 3}$, are finite, one can easily show that $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are the spectral data of $L(q_0, q_1)$. The estimates \eqref{estE12}-\eqref{estE3} imply \eqref{estqde}.
\smallskip
\textbf{Step 2.} Consider the general case. Suppose that $q_j \in W_2^j[0, \pi]$, $j = 0, 1$, are fixed. Let $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ be arbitrary complex numbers satisfying Assumption $(\mathcal O)$ and $\delta < \infty$. By virtue of Lemma~\ref{lem:rat}, if $\delta$ is sufficiently small, then $\lambda_n \in \mbox{int}\, \gamma$ for $|n| \le n_*$ and $\lambda_n \not\in \overline{\mbox{int} \, \gamma}$ for $|n| > n_*$.
Define the numbers
$$
\check \lambda_n := \begin{cases}
\tilde \lambda_n, \quad |n| \le n_*, \\
\lambda_n, \quad |n| > n_*,
\end{cases}
\qquad
\check M_n := \begin{cases}
\tilde M_n, \quad |n| \le n_*, \\
M_n, \quad |n| > n_*.
\end{cases}
$$
By virtue of Corollary~\ref{cor:locsimp}, there exists $\delta_0 > 0$ such that, for any collection $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfying Assumption~$(\mathcal O)$ and the estimate \eqref{estde}, there exist complex-valued functions $\check q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, such that $\{ \check \lambda_n, \check M_n \}_{n \in \mathbb Z_0}$ are the spectral data of $L(\check q_0, \check q_1)$ and
\begin{equation} \label{estqc}
\left| \int_0^x (\check q_0(t) - \tilde q_0(t)) \, dt\right| \le C \delta, \quad
|\check q_1(x) - \tilde q_1(x)| \le C \delta
\end{equation}
uniformly with respect to $x \in [0, \pi]$ and $\delta \le \delta_0$. Then, by using $\check q_j$ instead of $\tilde q_j$ at Step~1 of this proof, one can construct the problem $L(q_0, q_1)$ with $q_j \in C^{j-1}[0, \pi]$, $j = 0, 1$, having the spectral data $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$. It can be shown that the final estimates \eqref{estqde} are uniform with respect to $\check q_0$, $\check q_1$ if the estimates \eqref{estde} and \eqref{estqc} are fulfilled for sufficiently small $\delta_0 > 0$.
\end{proof}
Note that the conditions of Theorem~\ref{thm:locmult} are formulated in terms of the rational function $\hat M_*(\lambda)$ constructed by a finite number of the spectral data.
\begin{remark}
The function $\hat M_*(\lambda)$ in Theorem~\ref{thm:locmult} can be replaced by $\hat M(\lambda) = M(\lambda) - \tilde M(\lambda)$. Indeed, this replacement does not change the contour integrals in the proof of Theorem~\ref{thm:locmult} for sufficiently small $\delta$.
\end{remark}
It can be also useful to formulate the local solvability and stability conditions in terms of the discrete data. The following corollary provides such conditions for the case when every multiple eigenvalue $\tilde \lambda_n$ splits into simple eigenvalues $\lambda_n$.
\begin{cor} \label{cor:disc}
Let $\tilde q_j \in W_2^j[0, \pi]$, $j = 0, 1$. Then there exists $\delta_0 > 0$ such that, for every $\delta \in (0, \delta_0]$ and any complex numbers $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ satisfying Assumption $(\mathcal O)$ and the conditions
\begin{gather*}
\sqrt{\sum_{|n| > n_*} (n \xi_n)^2} \le \delta, \\
\lambda_n \ne \lambda_k, \quad n \ne k, \quad n, k \in \mathbb Z_0, \\
\left| \sum_{\nu = 0}^{\tilde m_k - 1} (\lambda_{k + \nu}- \tilde \lambda_k)^s M_{k + \nu} - \tilde M_{k + s}\right| \le \delta, \quad s = \overline{0, \tilde m_k-1}, \quad k \in \tilde {\mathbb S}_* \\
\left| \sum_{\nu = 0}^{\tilde m_k-1} (\lambda_{k + \nu} - \tilde \lambda_k)^s M_{k + \nu}\right| \le \delta, \quad s = \overline{\tilde m_k, 2(\tilde m_k - 1)}, \quad k \in \tilde {\mathbb S}_*, \\
|\lambda_{k + \nu} - \tilde \lambda_k| \le \delta^{1/\tilde m_k}, \quad |M_{k + \nu}| \le \delta^{(1-\tilde m_k)/\tilde m_k}, \quad \nu = \overline{0, \tilde m_k-1}, \quad k \in \tilde {\mathbb S}_*,
\end{gather*}
there exist functions $q_j \in C^{j-1}[0, \pi]$ such that $\{ \lambda_n, M_n \}_{n \in \mathbb Z_0}$ are the spectral data of $L(q_0, q_1)$. In addition, the estimate \eqref{estqde} is valid.
\end{cor}
Corollary~\ref{cor:disc} is proved analogously to Theorem~2.3 in \cite{Bond20}.
\section{Numerical examples} \label{sec:ex}
In this section, we construct an example of a pencil having a double eigenvalue. Then, we approximate this pencil by pencils with simple eigenvalues.
Put $\tilde \lambda_1 = \tilde \lambda_{-1} = 0.5$, $\tilde M_{-1} = -\frac{1}{\pi}$, $\tilde M_1 = -\frac{\mathrm{i}}{2\pi}$. This means
$$
\tilde M(\lambda) \sim \frac{\tilde M_{-1}}{(\lambda - \lambda_1)} + \frac{\tilde M_1}{(\lambda - \lambda_1)^2}
$$
in a neighbourhood of $\lambda_1$. For $|n| > 1$, we suppose that the spectral data coincide with the spectral data of the problem $L(0, 0)$, namely, $\tilde \lambda_n = n$, $\tilde M_n = -\frac{n}{\pi}$. Denote
\begin{gather*}
a := \frac{\tilde M_1}{2}, \quad c := \frac{\tilde M_{-1}}{a}, \quad \lambda_1 := \tilde \lambda_1 + \sqrt{\delta}, \quad \lambda_{-1} := \tilde \lambda_1 - \sqrt{\delta} + c \delta, \\
M_1 := \frac{a}{\sqrt{\delta}} + \tilde M_{-1}, \quad M_{-1} := -\frac{a}{\sqrt{\delta}},
\qquad \lambda_n := \tilde \lambda_n,
\quad M_n := \tilde M_n, \quad |n| > 1, \quad \delta > 0.
\end{gather*}
Observe that, for sufficiently small $\delta > 0$, the defined data fulfills the conditions of Corollary~\ref{cor:disc}. An interesting feature of this example is that the eigenvalues $\lambda_{\pm 1}$ are $\sqrt{\delta}$-close to $\tilde \lambda_{\pm 1}$ and the absolute values of the residues $M_{\pm 1}$ tend to infinity as $\delta \to 0$, but the corresponding potentials $q_0$, $q_1$ are $C\delta$-close to $\tilde q_0$, $\tilde q_1$ in the sense of the estimate~\eqref{estqde}. This feature is confirmed by numerical computations. For $\delta = 0.02$, the plots of the potentials $q_1(x)$, $\tilde q_1(x)$ and $q_0(x)$, $\tilde q_0(x)$ are presented in Figures~\ref{fig:1} and~\ref{fig:2}, respectively.
\begin{figure}[h!]
\begin{center}
\includegraphics[scale = 0.15]{Req1.png}
\includegraphics[scale = 0.15]{Imq1.png}
\end{center}
\caption{Plots of $\mbox{Re}\, q_1(x)$, $\mbox{Re} \, \tilde q_1(x)$ and $\mbox{Im}\, q_1(x)$, $\mbox{Im} \, \tilde q_1(x)$ for $\delta = 0.01$}
\label{fig:1}
\end{figure}
\begin{figure}[h!]
\begin{center}
\includegraphics[scale = 0.15]{Req0.png}
\includegraphics[scale = 0.15]{Imq0.png}
\end{center}
\caption{Plots of $\mbox{Re}\, q_0(x)$, $\mbox{Re} \, \tilde q_0(x)$ and $\mbox{Im}\, q_0(x)$, $\mbox{Im} \, \tilde q_0(x)$ for $\delta = 0.01$}
\label{fig:2}
\end{figure}
The results for different values of $\delta$ are provided in the table below, where
$$
d_1 = \max_{1 \le k \le N} |q_1(x_k) - \tilde q_1(x_k)|, \quad
d_0 = \max_{1 \le k \le N} \left| \int_0^{x_k} (q_0(t) - \tilde q_0(t)) \, dt \right|, \quad x_k = \frac{k \pi}{N}, \quad N = 200.
$$
$$
\begin{array}{|l|l|l|l|l|l|l|}
\hline
\delta & d_1 & d_0 & \lambda_1 & \lambda_{-1} & M_1 & M_{-1} \\
\hline
0.05 & 0.4157 & 1.1131 & 0.724 & 0.276-0.200\mathrm{i} & -0.318-0.356\mathrm{i} & 0.356\mathrm{i} \\
\hline
0.02 & 0.1881 & 0.4805 & 0.641 & 0.359-0.080\mathrm{i} & -0.318-0.563\mathrm{i} & 0.563\mathrm{i} \\
\hline
0.01 & 0.0982 & 0.2463 & 0.600 & 0.400-0.040\mathrm{i} & -0.318-0.796\mathrm{i} & 0.796\mathrm{i} \\
\hline
0.005 & 0.0501 & 0.1242 & 0.571 & 0.429-0.020\mathrm{i} & -0.318-1.125\mathrm{i} & 1.125\mathrm{i} \\
\hline
0.002 & 0.0202 & 0.0498 & 0.545 & 0.455-0.008\mathrm{i} & -0.318-1.779\mathrm{i} & 1.779\mathrm{i} \\
\hline
0.001 & 0.0101 & 0.0248 & 0.532 & 0.468-0.004\mathrm{i} & -0.318-2.516\mathrm{i} & 2.516\mathrm{i} \\
\hline
0.0005 & 0.0051 & 0.0124 & 0.522 & 0.478-0.002\mathrm{i} & -0.318-3.559\mathrm{i} & 3.559\mathrm{i} \\
\hline
0.0002 & 0.0020 & 0.0049 & 0.514 & 0.486-0.0008\mathrm{i} & -0.318-5.627\mathrm{i} & 5.627\mathrm{i} \\
\hline
0.0001 & 0.0010 & 0.0024 & 0.510 & 0.490-0.0004\mathrm{i} & -0.318-7.958\mathrm{i} & 7.958\mathrm{i} \\
\hline
\end{array}
$$
The method used for obtaining these results is based on the constructive solution of Inverse Problem~\ref{ip:M} provided in Section~\ref{sec:alg}. We use the model problem $L(0, 0)$, so the inverse problem is reduced to a finite $(4 \times 4)$ system of linear algebraic equations.
\section{Appendix}
Here we provide auxiliary lemmas about rational functions.
Denote by $\mathfrak R_N$ the class of rational functions of form $\frac{P_{N-1}(\lambda)}{Q_N(\lambda)}$, where $P_{N-1}(\lambda)$ is a polynomial of degree at most $(N-1)$ and $Q_N(\lambda)$ is a polynomial of degree $N$ with the leading coefficient equal $1$.
\begin{lem} \label{lem:rat}
Let $F(\lambda) := \frac{P_{N-1}(\lambda)}{Q_N(\lambda)}$ be a fixed functions of $\mathfrak R_N$ such that the zeros $\{ \lambda_n\}_{n = 1}^N$ of the polynomial $Q_N(\lambda)$ lie in $\mbox{int}\,\gamma$, where $\gamma := \{ \lambda \in \mathbb C \colon |\lambda| = r\}$, $r > 0$. Then there exists $\delta > 0$ such that, for any function
$$
\tilde F(\lambda) = \dfrac{\tilde P_{N-1}(\lambda)}{\tilde Q_N(\lambda)} \in \mathfrak R_N
$$
satisfying the estimate
\begin{equation} \label{estF}
|F(\lambda) - \tilde F(\lambda)| \le \delta, \quad \lambda \in \gamma,
\end{equation}
the zeros $\{ \tilde \lambda_n\}_{n = 1}^N$ of the denominator $\tilde Q_N(\lambda)$ also lie in $\mbox{int}\, \gamma$ and
$$
|\lambda_n - \tilde \lambda_n| \le C \delta^{1/m_n}, \quad n = \overline{1, N},
$$
where $m_n$ is the multiplicity of the corresponding zero $\lambda_n$, and the constant $C$ depends only on $F(\lambda)$.
\end{lem}
The proof of Lemma~\ref{lem:rat} is based on several auxiliary lemmas.
\begin{lem} \label{lem:rat1}
Let $\{ s_j\}_{j = 1}^{2N}$ be distinct points in $\gamma$. Then a function $F \in \mathfrak R_N$ is uniquely specified by its valued at these points.
\end{lem}
\begin{proof}
Suppose that, on the contrary, there exist two distinct functions
$$
F(\lambda) = \frac{P_{N-1}(\lambda)}{Q_N(\lambda)}, \quad \tilde F(\lambda) = \frac{\tilde P_{N-1}(\lambda)}{\tilde Q_N(\lambda)}, \quad F(s_j) = \tilde F(s_j), \quad j = \overline{1, 2N}.
$$
Then the polynomial
$$
P_{N-1}(\lambda) \tilde Q_N(\lambda) - Q_N(\lambda) \tilde P_{N-1}(\lambda)
$$
of degree at most $(2N - 1)$ has zeros $\{ s_j\}_{j = 1}^{2N}$. Hence, this polynomial is identically zero, so $F(\lambda) \equiv \tilde F(\lambda)$.
\end{proof}
Denote by $\{ p_k \}_{k = 0}^{N-1}$ and $\{ q_k \}_{k = 0}^{N-1}$ the coefficients of the polynomials $P_{N-1}(\lambda)$ and $Q_N(\lambda)$, respectively:
$$
P_{N-1}(\lambda) = \sum_{k = 0}^{N-1} p_k \lambda^k, \quad Q_N(\lambda) = \sum_{k = 0}^{N-1} q_k \lambda^k + \lambda^N.
$$
The analogous notations $\{ \tilde p_n\}_{n = 0}^{N-1}$ and $\{\tilde q_n\}_{n = 0}^{N-1}$ will be used for the coefficients of the polynomials $\tilde P_{N-1}(\lambda)$ and $\tilde Q_N(\lambda)$, respectively.
\begin{lem} \label{lem:rat2}
Suppose that $F \in \mathfrak R_N$ fulfills the conditions of Lemma~\ref{lem:rat}. Then, there exists $\varepsilon > 0$ such that, for any function $\tilde F$ satisfying the conditions of Lemma~\ref{lem:rat}, the following estimate holds:
\begin{equation*}
|q_k - \tilde q_k| \le C \varepsilon, \quad k = \overline{0, N-1},
\end{equation*}
where the constant $C$ depends only on $F$.
\end{lem}
\begin{proof}
Choose arbitrary distinct points $\{ s_j\}_{j = 1}^{2N}$ in $\gamma$ and put $v_j = F(s_j)$. Consider the following system of linear algebraic equations
\begin{equation} \label{syspq}
\sum_{k = 0}^{N-1} p_k s_j^k - v_j \left( \sum_{k = 0}^{N-1} q_k s_j^k + s_j^N\right) = 0, \quad j = \overline{1, 2N},
\end{equation}
with respect to the $2N$ unknown values $\{ p_k\}_{k = 0}^{N - 1}$ and $\{ q_k\}_{k = 0}^{N - 1}$. By virtue of Lemma~\ref{lem:rat1}, the system~\eqref{syspq} is uniquely solvable, so its determinant $\Delta$ is non-zero. The numbers $\{ \tilde p_k\}_{k = 0}^{N-1}$ and $\{ \tilde q_k\}_{k = 0}^{N-1}$ satisfy the similar system with $v_j$ replaced by $\tilde v_j = \tilde F(s_j)$. Due to \eqref{estF}, $|v_j - \tilde v_j| \le \varepsilon$, $j = \overline{1, 2N}$. Therefore, $|\Delta - \tilde \Delta| \le C \varepsilon$. Hence, for sufficiently small $\varepsilon > 0$, we have $\tilde \Delta \ne 0$. Find $q_k$ from te system~\eqref{syspq}, by using Cramer's rule: $q_k = \frac{\Delta_k}{\Delta}$, $k = \overline{0, N-1}$, where $\Delta_k$ are the corresponding determinants. Clearly, $|\Delta_k - \tilde \Delta_k| \le C \varepsilon$, $k = \overline{0, N-1}$. Hence
$$
|q_k - \tilde q_k| = \left| \frac{\Delta_k}{\Delta} - \frac{\tilde \Delta_k}{\tilde \Delta}\right| \le C \varepsilon, \quad k = \overline{0, N-1}.
$$
\end{proof}
\begin{lem} \label{lem:rat3}
Let $\lambda_0$ be a zero of multiplicity $m$ of a polynomial
$$
Q_N(\lambda) = \sum_{k = 0}^{N-1} q_k \lambda^k + \lambda^N
$$
Then, there exists $\varepsilon > 0$ such that every polynomial
$$
\tilde Q_N(\lambda) = \sum_{k = 0}^{N-1} \tilde q_k \lambda^k + \lambda^N,
$$
with coefficients satisfying the estimate
\begin{equation} \label{estqk}
\delta := \max_{k = \overline{0, N-1}} |q_k - \tilde q_k| \le \varepsilon,
\end{equation}
has zeros $\{ \tilde \lambda_j\}_{j = 1}^m$ (counting with multiplicities) satisfying the estimate
\begin{equation} \label{estlaj}
|\tilde \lambda_j - \lambda_0| \le C \delta^{1/m}, \quad j = \overline{1, m},
\end{equation}
where the constant $C$ depends only on the polynomial $Q_N$.
\end{lem}
\begin{proof}
Let $\gamma_j := \{ \lambda \in \mathbb C \colon |\lambda - \lambda_0| = r_j\}$, $j = 0, 1$, be contours not encircling other zeros of the polynomial $Q_N(\lambda)$ except $\lambda_0$, $0 < r_0 < r_1$. Using \eqref{estqk}, we obtain
$$
|\tilde Q_N(\lambda) - Q_N(\lambda)| < |Q_N(\lambda)|, \quad \lambda \in \gamma_0,
$$
for sufficiently small $\varepsilon > 0$. Applying Rouche's theorem, we conclude that $\tilde Q_N(\lambda)$ has exactly $m$ zeros $\{ \tilde \lambda_j\}_{j = 1}^m$ (counting with multiplicities) inside $\gamma_0$.
Fix $j \in \{1, \ldots, m\}$.
Note that
$$
|Q_N(\tilde \lambda_j)| = |Q_N(\tilde \lambda_j) - \tilde Q_N(\tilde \lambda_j)| \le C \delta.
$$
On the other hand, Taylor's formula implies
\begin{equation} \label{tayQ}
Q_N(\tilde \lambda_j) = \sum_{k = 0}^{m-1} \frac{1}{k!} \frac{d^k}{d \lambda^k} Q_N(\lambda_0) (\tilde \lambda_j - \lambda_0)^k + \frac{d^m}{d \lambda^m} Q_N(\lambda_0)(\tilde \lambda_j - \lambda_0)^m +
R_{m + 1}(\tilde \lambda_j),
\end{equation}
where
$$
R_{m + 1}(\lambda) := \frac{(\lambda - \lambda_0)^{m + 1}}{2 \pi i} \oint\limits_{\gamma_1} \frac{Q_N(z) \, dz}{(z - \lambda_0)^{m + 1} (z - \lambda)}.
$$
It is clear that
$$
|R_{m + 1}(\lambda)| \le C r_0 |\lambda - \lambda_0|^m, \quad \lambda \in \mbox{int}\, \gamma_0.
$$
Note that the radius $r_0 > 0$ can be chosen arbitrarily small by the choice of $\varepsilon$.
Since
$$
\frac{d^k}{d \lambda^k} Q_N(\lambda_0) = 0, \quad k = \overline{0, m-1}, \qquad
\frac{d^m}{d \lambda^m} Q_N(\lambda_0) \ne 0,
$$
for significantly small $\varepsilon > 0$, relation \eqref{tayQ} implies the estimate $|\tilde \lambda_j - \lambda_0|^m \le C \delta$, which yields~\eqref{estlaj}.
\end{proof}
Lemmas~\ref{lem:rat2} and \ref{lem:rat3} together imply Lemma~\ref{lem:rat}.
\bigskip
{\bf Funding.} This work was supported by Grant 20-31-70005 of the Russian Foundation for Basic Research.
\medskip
{\bf Conflict of interest.} The authors declare that this paper has no conflict of interest.
\medskip
{\bf Authors' contributions.} N.P. Bondarenko has obtained all the theoretical results of this paper (Sections \ref{sec:intr}-\ref{sec:mult} and Appendix). A.V.~Gaidel has obtained the results of numerical experiments provided in Section~\ref{sec:ex}. The both authors have read and approved the final manuscript.
|
\section{Introduction}
\label{sec:intro}
Smartphone-based contact tracing protocols~\cite{ahmed2020_access} have been adopted by many countries to help fight the spread of \mbox{\textsc{Covid-19}}. Most practical implementations today follow a common {\em modus operandi}: mobile devices continuously broadcast pseudo-random \ac{BLE} packets that are received and stored by other devices in the communication range; subsequently, the collected data are reconciled in either a centralized or decentralized fashion, in order to identify potential contagion events.
The main challenge of contact tracing solutions is related to location tracking. Indeed, to signal the presence of a smart device, the devised solutions constantly spread pseudo-random packets via Bluetooth. Furthermore, every device maintains its own contact list by storing the signals broadcast by other devices.
However, this approach not only increases the energy burden on the user's smartphone---via constant \ac{BLE} scanning and broadcasting operations---but also inherently imperils user privacy.
Indeed, even though the user's packets are pseudo-random and change every few minutes, there is still a vulnerability window that allows an eavesdropping adversary to track the user's location.
Such concerns are further amplified by incorrect software implementations, such as the Apple/Google privacy bug found in their
\textsc{Covid-19} exposure notification framework~\cite{apple_google_bug}.
The above highlighted native privacy and energy concerns in existing solutions undermine the very purpose of contact tracing applications, hindering their adoption by the general public~\cite{cho2020contact}.
To mitigate the aforementioned privacy and energy issues, we propose the deployment of a lightweight and wide-scale contact tracing infrastructure, consisting of \ac{BLE} transmitters. The packets transmitted by these devices would replace the smartphone-generated packets, but would still allow for accurate proximity tracing for the purpose of exposure notification. In particular, the users' smartphones would constantly intercept and store the infrastructure-based packets, thus gradually building a record of their precise location over time. Then, the exposure notification process would develop as in most standard decentralized BLE-based protocols. The benefits of our architecture are threefold: (i) unconditional privacy for users, since their devices are not emitting any information; (ii) reduced energy requirements for smartphones, which translates into longer battery life; and, (iii) potential for more accurate proximity detection, due to the presence of multiple (fixed) \ac{BLE} transmitters.
To facilitate an easy and wide-scale deployment, BLE beacons are typically battery-powered (similar to sensor network deployments). This latter point would trigger the issue of periodic battery replacement, which in turn would considerably increase the operational and maintenance cost of the infrastructure.
Such overhead is further amplified in large-scale deployment cases. As an example, the Hong Kong International Airport had to deploy over $17,000$ beacons to provide indoor navigation services. By using \ac{BLE} beacons as a contact tracing infrastructure, energy consumption on user smartphones for broadcasting pseudo-random packets is off-loaded to the beacon infrastructure. More importantly, smartphones are not transmitting any information, so the users' privacy is unconditionally preserved---something hardly possible with existing device-to-device contact tracing protocols. Further, an infrastructure-based network can still support distributed protocols/frameworks of various contact-tracing solutions.
{\bf Contributions}.
We first show that energy-harvesting, batteryless beacons, are an affordable, reliable technology with respect to the operating cycle. We conducted an investigation on harvesting different types of energy sources, such as light, heat, and \ac{RF}, and also considered the corresponding energy harvesting architecture. Later, we embedded them within a comprehensive, viable architectural proposal to support contact tracing, and, finally, we showed experimental results supporting our findings.
We also shed light on the trade-off between the broadcast frequency and transmit power that could affect the contact tracing performance and the batteryless beacon sustainability for a target tracing accuracy. We also provide a thorough discussion about the performance, efficiency, and security and privacy properties of our solution, while the paper concludes by highlighting future research directions.
\section{Related Work}
\label{sec:related}
In the following, we summarize the related work in the field, focusing on contact tracing approaches and energy harvesting technologies. We adopted the following terms throughout the paper:
\begin{itemize}
\item \textit{BLE packet}: A broadcast packet sent using the BLE protocol.
\item \textit{BLE beacon}: A piece of specialized hardware (not necessarily a smart device) that simply broadcasts BLE packets.
\item \textit{luXbeacon}: A BLE beacon with energy harvesting capabilities to promote a self-sustainable operation.
\end{itemize}
\subsection{Digital Contact Tracing Solutions}
Nowadays, several governments, research institutes, and companies are working on exposure notification protocols to limit the spread of infectious diseases, such as \textsc{Covid-19}. Contact tracing is defined as an identification process that aims to track the recent physical contacts of individuals that have been tested positive for the virus. Broadly speaking, existing BLE-based contact tracing protocols can be categorized as follows.
\textbf{Decentralized Protocols}. In a decentralized architecture, users do not share any data with the authorities unless they have a confirmed positive test. In that case, the claimed positive device uploads its own transmitted BLE packets to the authorities' server. These packets are then propagated to the entire contact tracing network, where the individual smartphones perform the exposure notification function in a fully decentralized manner (by matching the published data against their own contact logs). Notable examples of decentralized contact tracing protocols are Apple/Google's framework~\cite{applegoogle} and the Decentralized Privacy-Preserving Proximity Tracing (DP-3T) protocol~\cite{troncoso2020}.
\textbf{Hybrid Protocols}. In a hybrid architecture, data collection follows the decentralized approach, i.e., each device maintains its private contact logs and does not disclose anything to the authorities. However, in hybrid protocols, the packets transmitted by the mobile devices are generated by the health authorities. Then, in the event of a positive test, the user's device discloses its contact logs to the authorities, and, therefore, exposure notification is performed by the authorities in a centralized manner. Typical examples of hybrid solutions are BlueTrace~\cite{bluetrace}---first adopted by Singapore---and the Pan-European Privacy-Preserving Proximity Tracing (PEPP-PT) protocol~\cite{pepppt}.
\textbf{IoT-based Protocols}. IoT-based protocols employ an infrastructure of IoT devices to facilitate contact tracing. In other words, smartphones no longer interact with each other but rather depend on IoT devices to detect proximity. IoTrace~\cite{tedeschi2021_commag} is the only IoT-based solution to date. Under IoTrace, mobile devices are not required to scan the BLE channels for broadcast packets sent by other devices. Instead, they simply broadcast their own packets, which are received and logged by the IoT infrastructure. The reconciliation mechanism is fully tunable and could range from a decentralized to a centralized one. However, it is worth noting that reconciliation necessitates the transfer of a large number of packets to/from the centralized server, using 4G/\ac{LTE} communications. While the architecture introduced in this paper falls under the umberella of IoT-based solutions, its core functionalities, are very different from the ones provided by IoTrace.
\subsection{Energy-Harvesting Technologies for IoT Applications}
A BLE beacon can be configured with different advertising interval and transmit power values~\cite{Jeon2018_IoTJ}. The advertising interval determines the temporal spacing for the broadcast of beacon packets, while the transmit power controls its coverage area. A short advertising interval increases the beacon signal's reliability and enables more accurate distance estimation/localization. However, advertising intervals significantly influence the beacon's overall energy consumption and its lifetime.
In contact tracing applications, the energy demand for the devices is amplified due to various security and privacy requirements. For example, a static beacon may easily be spoofed or tracked, therefore, cryptographically secure hashing algorithms are often implemented on the device's firmware to periodically randomize the broadcast of beacon packets~\cite{zidek2018beacon_security}. However, such an operation also leads to increased energy consumption and reduced lifetime.
\begin{figure}[ht]
\centering
\includegraphics[width = 0.5\columnwidth]{luXbeacon_cascade_3.pdf}
\caption{Circuit board and casing design of luXbeacon.}
\label{fig:luxbeacon_board}
\end{figure}
To address these issues, we conducted an investigation on harvesting different types of energy sources, such as light, heat, and \ac{RF}, and also considered the corresponding energy harvesting architecture.
\textit{luXbeacon} is a \ac{BLE} beacon that can harvest and store ambient light energy for energy-neutral operation \cite{jeon2019luxbeacon}. It can operate in an indoor lighting environment with a minimum luminosity of $100$ lux, and is composed of $6$ major components, as shown in Fig.~\ref{fig:luxbeacon_board}:
\begin{enumerate}
\item The solar panel harvests ambient light energy to power the load. The AM-1815 CA solar cell is optimized to harvest the visual light spectrum.
\item Power management \ac{IC} routes the harvested energy from the solar panel to different parts of the circuit. The S6AE103A board leverages a linear harvesting architecture to achieve a low level of quiescent current (order of $nA$).
\item The primary buffer is a small energy storage unit that is charged first with the harvested energy. The energy in the primary buffer is used to boot-up the Bluetooth \ac{IC}.
\item The supercapacitor is a large energy storage unit, where the harvested energy is stored during an energy surplus. The stored energy is used to offset any energy deficit in the future.
\item Bluetooth \ac{IC} is used to broadcast the \ac{BLE} beacon to the surrounding devices.
\item Back-up battery is used to power the luXbeacon when there is not enough ambient light energy to harvest and sustain its operation.
\end{enumerate}
\section{Threat Model}
\label{sec:threat}
In a BLE-based contact tracing application, the main threat to privacy is an eavesdropping adversary that collects all the transmitted packets. For instance, the adversary is equipped with either a \ac{SDR} with a powerful antenna, or a Bluetooth-compliant transceiver connected to a laptop/smartphone. Thus, the adversary only needs to set the frequency adopted by the Bluetooth communication technology to intercept all \ac{BLE} packets in the surrounding area. The attacker can also tag the packets with timestamp and geo-location information computed by standard GPS or indoor localization methods. An eavesdropping attack aims mostly at compromising the users' privacy by either tracking their movements or exposing their health status (with regards to the virus).
Alternatively, active adversaries may try to replay or relay previously transmitted packets to disrupt the operation of the contact tracing network. For example, the adversary may try to cause a large number of false-positive exposure notifications. Finally, we assume that the adversary can only perform polynomial-time computations and is unable to break the standard cryptographic primitives adopted in the pseudo-random packet generation functions.
\section{LuXbeacon Contact Tracing}
\label{sec:proposed_protocol}
The novelty of the proposed architecture lies in the deployment of a batteryless IoT infrastructure to facilitate privacy-preserving and energy-efficient proximity detection. In the following sections, we describe in detail the operations of the underlying contact tracing protocol.
\subsection{System Architecture}
\label{sec:sys_arch}
The entities involved in the proposed architecture are the following:
\emph{luXbeacon.} \ac{BLE}-based IoT device, equipped with specialized hardware for ambient-light energy harvesting. Every luXbeacon device broadcasts pseudo-random packets to the surrounding mobile devices.
\emph{User.} Smart device that runs the suggested contact tracing application. The app periodically scans the \ac{BLE} spectrum for packets transmitted by the deployed luXbeacon devices. Unlike existing approaches, the app operates in scan-only mode, i.e., it does not transmit any packets. During exposure notification, the smart devices approximate their relative proximity based on the received packets from the IoT infrastructure.
\emph{Hospital.} Authorized medical facility that performs \textsc{Covid-19} infection tests. If a user tests positive, the health professionals are given permission to access their mobile device and forward the stored packets to the central authority.
\emph{Authority.} Trusted party whose role is to store the packets that were recently collected from the infected users. In a real scenario, this role can be played by the \emph{Ministry of Health}.
\subsection{Protocol Message Flow}
The protocol consists of two main tasks, namely, packet collection and exposure notification. We assume that each stored BLE packet at the user's device contains a timestamp, the luXbeacon's MAC address, a pseudo-random value (ephemeral ID), and the \ac{RSSI}. The high-level protocol message flow is as follows:
\begin{enumerate}
\item Every \emph{luXbeacon} device periodically generates and transmits a pseudo-random \ac{BLE} packet, according to a secure keyed hash function.
\item Every \emph{User} collects the packet(s) transmitted in its surrounding area. Should the \textit{User} test positive, the \textit{User} will send all its stored packets to the \emph{Authority}.
\item Every \textit{User} periodically downloads the up-to-date packet list from the \emph{Authority}, and checks (locally) if there are common elements between its stored packets and the received list.
\item Finally, for all identified common packets, the \textit{User} will estimate its relative proximity to that claimed positive, based on the signals' RSSI.
\end{enumerate}
The protocol message flow is also summarized in Fig. \ref{fig:protocol}. Note that our architecture follows the decentralized exposure notification approach (Steps 3 and 4), where each device locally determines whether the user was in close contact with a claimed positive. Assuming that the authorities will always learn the infected person's BLE packets, a further privacy goal is to \textit{not} disclose these packets to everyone else. Our discussion in Section~\ref{sec:sec_privacy} proposes such an approach that leverages well-known cryptographic protocols.
\begin{figure}[ht]
\centering
\includegraphics[angle=0, width=0.9\columnwidth]{protocol.pdf}
\caption{Message flow overview.}
\label{fig:protocol}
\end{figure}
\subsection{Contact Detection and Result Notification} \label{sec:contact_detection_result}
In order to accurately detect a close contact between two users, it is critically important to estimate the following two parameters: (i) the distance between the two users; and (ii) the duration of the contact. The distance is essential because, if the two users were practising social distancing and separated by at least $2$--$3m$, the probability of contagion would be extremely low, and therefore, the contact would not be considered significant. Similarly, even if the two users were close enough for a contagion, but only for a period of less than a few minutes, the probability would also be very low. Therefore, the exposure notification function would consider these two variables when determining the threat level of a particular contact event.
It is worth noting that both variables can be trivially estimated by the proposed architecture. First, the distance between two users can be approximated by observing and comparing the \ac{RSSI}s of their common packets. However, the \ac{RSSI} metric is subject to frequent fluctuations due to various environmental conditions, such as channel state, and fading and shadowing effects from the surrounding physical environment. Therefore, it is pivotal to deploy BLE beacons at a high density, in order to improve the distance estimation accuracy through better triangulation. On the other hand, the duration of contact can be acquired by simply computing (from the available timestamps) the time interval that encloses a certain subset of common packets.
\subsection{Comparison with Related Protocols}
\label{sec:related_protocols}
Table~\ref{tab:comparison} summarizes the characteristics of the most representative solutions reviewed in Section \ref{sec:related}---under different contact tracing architectures---and shows how they compare against the proposed protocol. First, our proposed architecture is the only one that replaces part of the smartphones' energetic cost (stemming from beacon transmissions) with renewable energy, hence having a low impact on the maintenance cost. This is not possible with IoTrace, because its energy demand for the IoT devices' operations is very high and cannot be supported by energy-harvesting technologies~\cite{tedeschi2020_comst}. For the same reason, IoTrace has a high maintenance/operation cost, due to the involvement of cellular communications and the need for frequent battery replacements.
\begin{table*}[htbp]
\caption{Comparison of state-of-the-art representative solutions. A \ding{51}\ symbol indicates the fulfillment of a particular feature, a \ding{55}\ symbol denotes that the feature is either not provided or not applicable.}
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
\textbf{Features} & Decentralized protocols~\cite{applegoogle,troncoso2020} & Hybrid protocols~\cite{bluetrace,pepppt} & IoTrace~\cite{tedeschi2021_commag} & This work \\ \hline\hline
\emph{Green Energy} & \ding{55} & \ding{55} & \ding{55} & \ding{51} \\ \hline
\emph{Privacy Guarantee} & MEDIUM & LOW & MEDIUM & HIGH \\ \hline
\emph{Total Energy Consumption} & $n\cdot(\alpha + \beta)$ & $n\cdot(\alpha + \beta)$ & $n\cdot\alpha + m\cdot(\beta + \gamma)$ & $n\cdot\beta + m\cdot\alpha$\\ \hline
\emph{Maintenance/Operation Cost} & \ding{55} & \ding{55} & HIGH & LOW \\ \hline
\end{tabular}
\vspace{1ex}\\
{\raggedright $\alpha$: \ac{RF} transmission cost, $\beta$: \ac{RF} receiving cost, $\gamma$: \ac{LTE} communication cost (with server), $n$: number of smartphones, $m$: number of IoT devices.}
\label{tab:comparison}
\end{table*}
In terms of privacy, hybrid protocols are the most vulnerable because the users' ephemeral IDs are generated by the central authorities, which results in low privacy guarantees. For example, a malicious adversary that compromises the centralized server is able to track the movements of all users. On the other hand, decentralized solutions (and IoTrace) are more privacy-preserving because users construct their own ephemeral IDs that are never revealed unless the user becomes infected with the virus. As such, they guarantee a medium level of privacy. Nevertheless, the broadcasting of packets from the mobile devices is, by itself, a privacy risk, as explained previously. On the contrary, our proposed architecture can guarantee a high level of privacy, as further discussed in Section~\ref{sec:sec_privacy}.
Finally, Table~\ref{tab:comparison} also shows a quantitative comparison of the energy consumption for the entire contact tracing architecture. Let $\alpha$ and $\beta$ be the daily \ac{RF} transmission and receiving costs (including channel scanning), respectively. Also, let $\gamma$ be the daily cost to communicate with the centralized server over an \ac{LTE} network. Then, the table shows the total daily energy consumption for a network with $n$ mobile devices and $m$ IoT devices. We expect that $\alpha \ll \beta \ll \gamma$, and $n > m$.
\section{Viability Study}
\label{sec:peva}
In this section, we revise the different requirements that assure the viability of a contact tracing protocol, showing that our approach satisfies them all.
\subsection{Sustainability}
\label{sec:sustainability}
The following section investigates and evaluates the energy efficiency and sustainability of luXbeacon, loaded with the contact tracing firmware---also performing the needed cryptographic operations.
We first measured the power consumption of the contact tracing firmware, which proved to consume $12.2\mu A$, with $100ms$ advertising interval and $-8dBm$ transmit power. In order to prove its sustainability and practicality, we deployed a luXbeacon in a real-life environment and monitored the changes in its supercapacitor voltage. The luXbeacon was deployed near a window, to harvest both solar and indoor light sources, which can provide sufficient ambient power to support the luXbeacon. The result is shown in Fig.~ \ref{fig:luXb_charge_cycle}, where the luXbeacon continuously charges and discharges its supercapacitor. It can also be observed that the supercapacitor voltage will never be lower than ~$2.7V$---the luXbeacon's operating voltage being $1.8V$. Such observation further supports the self-sustainability of the luXbeacon in a contact tracing application.
\begin{figure}[t]
\centering
\includegraphics[width=0.9\columnwidth]{figs/luXb_charge_cycle.pdf}
\caption{Supercapacitor voltage level of luXbeacon deployed in a real environment.}
\label{fig:luXb_charge_cycle}
\end{figure}
To generalize our results, the lifetime of luXbeacon for various social locations was predicted using the lighting conditions of the locations. The predictions were made based on the measured energy consumption of the contact tracing firmware and also the power output of the solar panel. Fig.~\ref{fig:luXb_lifetime_table} shows $4$ different possible locations for deployment, with varying lighting conditions and operation hours. It can be seen that in all social locations, luXbeacon has an extended battery lifetime of at least $70\%$ compared to that of traditional battery-powered BLE beacons.
Moreover, luXbeacon proved to be the most beneficial in outdoor deployment scenarios, which are the most difficult locations to conduct battery replacement or maintenance operations.
\begin{figure}[t]
\centering
\includegraphics[width=0.9\columnwidth]{figs/luXb_lifetime_table.pdf}
\caption{Expected lifetime of luXbeacon and lifetime extension compared to the battery powered devices, which last 2.3 years, under varying lighting conditions of social locations.}
\label{fig:luXb_lifetime_table}
\end{figure}
\subsection{Contact Tracing Accuracy}
In order to measure and reference the radio characteristics of luXbeacon, an experiment was conducted to investigate its \ac{RSS} over varying transmission power and receiving distance. The luXbeacon's \ac{RSS} was measured for $5$ minutes, for each distance ranging from $0m$ to $6m$ in $1m$ intervals.
In Fig.~\ref{fig:rss_over_distance}, it can be observed that each transmit power curve is vertically separated from its neighbor by $5-7dBm$; however, the overall trend of the plot shows evident similarities. Also, it is noteworthy that the change in \ac{RSS} is dramatic between $0m$ to $1m$, but less noticeable after a $1m$ distance.
To validate our architecture, we also conducted an extensive simulation campaign using MATLAB\textcopyright 2020b, where we investigated how the random deployment of a varying number (from $1$ to $10$) of \ac{BLE} beacons could be leveraged for optimal coverage area and positioning accuracy. We present, for the first time in the literature, an end-to-end system that detects the contact between users based on BLE packet scanning information, namely \ac{RSSI} and ephemeral ID. Our architecture allows us to first estimate the distance of the users from the deployed BLE devices. From this information, our method then triangulates each user's position and estimates the distance between any two users with the distance error reported in Fig.~\ref{fig:accuracy}. The higher the number of deployed luxBeacons, the lower is the distance estimation error between two generic devices. Fig.~\ref{fig:accuracy} also reports the $95$\% confidence interval, computed over $10,000$ tests, with a luxBeacon TX power of $-8dBm$ and a random deployment of two smartphones in an area of $100m^2$. Let $R1$ and $R2$ be two generic receivers; the distance between them, $\hat{d}$, is estimated as the Maximum Absolute Difference (MAD) between arrays $\mathbf{d_{R1}}$ and $\mathbf{d_{R2}}$, where each array consists of the estimated distances to each one of the surrounding luxBeacons, as shown in Eq.~(\ref{eq:accuracy}). The distances inside the two arrays are estimated by leveraging the relationship between \ac{RSSI} and distance (Fig.~\ref{fig:rss_over_distance}) collected from our experimental radio propagation model. Essentially, this approach is an attempt to estimate the distance between two users without knowing the precise locations of the surrounding luxBeacons.
\begin{equation}
\label{eq:accuracy}
\hat{d} = max(|\mathbf{d_{R1}} - \mathbf{d_{R2}}|)
\end{equation}
\begin{figure}[htbp]
\centering
\includegraphics[angle=0, width=0.9\columnwidth]{rss_over_distance.pdf}
\caption{RSS of luXbeacon measured over distance.}
\label{fig:rss_over_distance}
\end{figure}
\begin{figure}[htbp]
\centering
\color{blue}
\includegraphics[angle=0, width=0.9\columnwidth]{accuracy.pdf}
\caption{Error in distance estimation between two receivers.}
\label{fig:accuracy}
\end{figure}
\subsection{Ephemeral ID Generation}
Each ephemeral ID is generated with the $\pcalgostyle{SHA256}$ hashing function and the XOR ($\oplus$) operation. The generated packet starts with the first $19$ bytes of device-specific information, such as device ID ($18$~bytes) and battery status information ($1$~byte). Then, the packet contains a timestamp of $8$ bytes. Further, we adopted the hashing function $\mathcal{H}$ on the concatenated $27$ bytes by providing an output of $32$~bytes. Finally, to reduce the size of the hashed data, we split the $32$ bytes of hashed data into two equals parts, and then we applied the $\oplus$ operation iteratively in order to reduce the hashed data to just $4$ bytes.
\section{Challenges and the Road Ahead}
\label{sec:challenges}
In the following sections, we describe the research challenges from the perspectives of security and privacy, infrastructure maintenance, and localization accuracy. We also outline the limitations of our proposed solution.
\subsection{Infrastructure and Maintenance Costs}
The proposed architecture requires a large deployment of IoT devices that are quite affordable when produced at mass-scale. As such, the main cost of the infrastructure will be determined by its maintenance. To this end, the adoption of energy-harvesting technologies, such as luXbeacon, reduces the maintenance cost significantly if deployed in an environment with sufficient light. However, in those environments that may not have enough light to enable energy-neutral operation, the energy consumption rate may vary due to non-uniform lighting condition, and so will the battery life. Such a phenomenon would lead to asynchronous expiry of battery lifetime, which may cause additional complications and difficulties in managing the infrastructure. To address such issues, it would be ideal to investigate and design energy-aware firmware that is capable of load-balancing to match its battery usage rate with that of nearby beacons.
A cost-benefit analysis for the proposed architecture should evaluate: (i) the efficiency of this new architecture in terms of resources; (ii) its effect on social well-being; and (iii) how social costs and benefits can be monetized.
When the luXbeacon is mass-produced, its unit cost will be $\approx15.00\$$, including the casing and hardware, which is comparable to off-the-shelf battery-powered beacon devices that cost $\approx30.00\$$~\cite{kontakt_price}.
It is also relevant to analyze the best deployment plan to cover the most crowded areas. Further, comparing our architecture to other \ac{BLE}-based approaches from the maintenance and application reliability perspective, the one-time cost to build the entire infrastructure can be considered relatively low.
\subsection{Tracing Performance}
\ac{BLE} beacon infrastructures have been widely used for various indoor localization applications. Many investigations have been performed on techniques that could enhance the positioning accuracy of a user in an environment with densely deployed IoT devices. However, very few studies exist concerning the energy consumption of a \ac{BLE} beacon. Since the luXbeacon's broadcasting frequency (i.e., advertising interval) is limited by the availability of harvestable ambient energy, the contact tracing accuracy may be affected by the scarce energy resources and the deployment environment. It would be imperative to study the relationship between luXbeacon's operational configurations---namely advertising interval and transmit power---with accuracy. Furthermore, the deployment method of the luXbeacon infrastructure may further be explored for optimal coverage area and positioning accuracy. Additionally, a method to accurately detect significant contacts between users must be investigated (e.g., user mobility). As future work, an evaluation of the luXbeacon's advertising interval and transmit power (i.e., the coverage area)---correlated to the density of a particular zone---is needed to achieve better performance in terms of energy consumption, communication efficiency, and hardware sustainability. This analysis allows for an implementation of a self-adaptive solution that permits tuning of the advertising interval, taking into account the area density as well as the beacon key update frequency.
\subsection{Security \& Privacy}
\label{sec:sec_privacy}
From a privacy perspective, the architecture follows the privacy-by-design approach. Indeed, off-loading the packet broadcast operation to the fixed hardware infrastructure avoids the ``data leakage'' issue for users, because their mobile devices are not transmitting any information. Therefore, our architecture makes it infeasible for an eavesdropping adversary to track users. However, if a user has a positive \textsc{Covid-19} test, the authorities have to publish their stored BLE packets to a public database for the purpose of exposure notification. As such, the user's recent location history is disclosed to the entire network. To this end, it is important to consider cryptographic techniques in the exposure notification function. In particular, instead of publishing the user's packets, the server could engage in a two-party private-set intersection protocol~\cite{decristoforo_2010} with individual users. The protocol's output would reveal (to the user) the common ephemeral ID set, but nothing else. It is also imperative to perform an experimental study to assess the effectiveness and computational cost of exposure notification in this privacy-preserving setting.
Further, compared to IoTrace, our architecture provides better security for data at rest, because no user information is stored on the luXbeacon(s). However, a critical security challenge is to find and analyze the right countermeasures to mitigate replay attacks. Specifically, a malicious adversary may deploy rogue luXbeacon devices to manipulate the protocol's proximity detection module. To this end, we should investigate the feasibility of detecting counterfeit beacons at the centralized server by analyzing the packets submitted by a new claimed positive. The analysis would consider the timing information, the beacons' ephemeral IDs (which are generated based on secret luXbeacon IDs), and the locations of the luXbeacon(s) that are known to the authorities.
\subsection{Discussion}
\label{sec:discussion}
Besides the privacy-preserving benefit of the proposed architecture, the energy consumption of user smartphones is also reduced compared to existing methods. This is because they only need to carry out Bluetooth scanning operations, instead of both scanning and broadcasting.
While \ac{BLE} is a low-energy system compared to traditional Bluetooth, it involves a reasonably power-intensive operation. Continuous scanning would negatively affect the smartphone's battery life, and therefore, degrade the user's experience or even force them to uninstall the contact tracing app. Therefore, it is extremely important to consider the energy consumption at the end devices when developing the contact tracing system.
The energy consumption of the Bluetooth scanning operation depends on many factors, such as the Bluetooth SoC, the hardware design, the scanning parameters, and the number of scannable Bluetooth devices in the vicinity. Based on the nRF51822 SoC, an active and continuous scanning operation consumes $40mW$, whereas the broadcasting operation consumes at most $600\mu W$. As reported in~\cite{carroll2010mobile_energy}, the power consumption of Bluetooth scanning is similar to that of Wi-Fi during web browsing. To address such issues, the latest smartphone hardware and operating systems have implemented several mechanisms to minimize energy consumption.
We should note that the scanning operation is duty-cycled at the OS level to reduce excessive power consumption. Therefore, it would be important to design a mobile app considering the energy consumption through an intelligent framework that requires minimum scanning operation.
Additionally, while a longer BLE packet broadcast cycle favours sustainability, it negatively impacts the proximity detection accuracy. There is a need to balance this trade-off, while also maintaining a low luXbeacon TX power. Nowadays, \ac{BLE} is the {\it de facto} standard for the most prominent contact tracing solutions in the literature. Further research on various communication technologies is needed, e.g., Ultra-wideband carriers may be used to increase proximity tracing accuracy, privacy, and reliability.
\section{Conclusion}
\label{sec:conclusion}
The human and economic impact of the \textsc{Covid-19} pandemic has shown the need for novel technological solutions to tackle similar events in the future. Digital contact tracing can play a vital role in limiting the spread of deadly viruses. However, its effectiveness depends on its adoption by a large majority of the general public. To this end, privacy and energy-efficiency are two important metrics that can motivate users to participate in the contact tracing network. Our work makes a significant contribution towards this goal, by proposing an energy-efficient and privacy-preserving architecture for contact tracing. The proposed architecture leverages a dense deployment of batteryless IoT devices that constantly broadcast BLE packets for the purpose of proximity detection. We have shown that batteryless IoT has a reliable operating cycle and proved that their deployment can help improve detection accuracy. The proposed architectural design enjoys low maintenance cost, reduces energy consumption on the user side, greatly improves distance accuracy estimation, and provides privacy by design. Finally, we have summarized the most important research challenges and directions that need to be addressed by the academia and industry, towards the development of IoT based privacy-preserving and efficient contact tracing.
\section*{Acknowledgements}
The authors would like to thank the anonymous reviewers, that helped improving the quality of the paper. This publication was partially supported by awards NPRP-S-11-0109-180242 from the QNRF-Qatar National Research Fund, a member of The Qatar Foundation, and NATO Science for Peace and Security Programme - MYP G5828 project ``SeaSec: DronNets for Maritime Border and Port Security''.
\bibliographystyle{IEEEtran}
|
\section{Introduction}\label{sec:intro}
The Hopfield model is the prototype for neural networks meant for associative memory tasks. Its popularity is mainly due to its similarities with biological neural networks and to the fact that it can be faced analytically exploiting statistical-mechanics tools typical of disordered systems \cite{Amit,Coolen,Bovier}. In the last decade the upsurge of interest in artificial-intelligence applications has determined a renewed interest in neural networks and many variations on theme of the Hopfield model have been proposed, aiming to improve its performance as associative memory and/or to get a picture closer to biology (see e.g., \cite{Agliari-PRL1,Ton,Agliari-PRL2,Albert2}).\\
Among these, the ``relativistic'' Hopfield model \cite{Albert1,Notarnicola,Mechanics} has been introduced based on a formal analogy between the Hopfield model and a mechanical system where the Mattis magnetization (intrinsically bounded) plays as the velocity of a point mass.
More precisely, the classical Hopfield Hamiltonian, reading as $H^{\textrm{cl}} ( \boldsymbol{ m})= -N \boldsymbol{m}^2/2$, where $\boldsymbol{m}$ is the Mattis magnetization and $N$ is the system size, can be interpreted as the classical kinetic energy associated to a fictitious particle; its relativistic counterpart can therefore be obtained by applying the transformation
${\boldsymbol{m}}^2/2 \to \sqrt{1 + {\boldsymbol{m}}^2}$, that is, the ``relativistic'' Hopfield Hamiltonian reads as $H^{\textrm{rel}} ( \boldsymbol{ m})= -N \sqrt{1 + \boldsymbol{m}^2}$.
\newline
The relativistic model is as well able to work as associative memory, namely, it can be used to retrieve patterns of information (typically encoded by binary vectors $\boldsymbol \xi$), and its performance turns out to be comparable with the classical counterpart \cite{Albert1}. Interestingly, one can notice that, while the classical model is described only by pairwise interactions, its relativistic version (if expanded in Taylor series with respect to the order parameter $ \boldsymbol{m}$) is an infinite sum of (even) terms that describe higher-order interactions with alternating signs; the terms with negative sign can be related to unlearning mechanisms and play an important role in destabilizing the recall of spurious patterns \cite{Albert2,Albert1,Alem}.
In this work we consider the ``relativistic'' Hopfield model and we allow for patterns exhibiting temporal correlation.
This refers to well-known experimental facts (see e.g., \cite{Amit2,Miyashita-1988, MiyashitaChang-1988}) where a temporal correlation among patterns during learning (say, $\boldsymbol \xi^{\nu}$ is repeatedly presented after pattern $\boldsymbol \xi^{\mu}$) can, upon simple stimulation, yield to the simultaneous retrieval of correlated patterns (that is, stimulation by pattern $\boldsymbol \xi^{\mu}$ can evoke both $\boldsymbol \xi^{\mu}$ and $\boldsymbol \xi^{\nu}$).
In order to implement this mechanism into the ``relativistic'' Hopfield model we will follow the route paved by \cite{GriniastyTsodyksAmit-1993,Cugliandolo-1993, CugliandoloTsodyks-1994} for the classical model
The resulting network, exhibiting relativistic and temporal correlation features, is addressed in the low-load regime exploiting statistical-mechanics tools.
In particular, we prove the existence of the thermodynamic limit for this model and we get an explicit expression for its thermodynamic pressure by exploiting rigorous methods based on Guerra's interpolating techniques. The extremization of this expression allows us to get self-consistent equations for the order parameter of the model which are then solved numerically. Interestingly, according to the value of the system parameters, i.e., the degree of correlation $a$ and the degree of noise $T$, the solution is qualitatively different. We recall that in the (low-load) classical Hopfield model, large values of $T$ correspond to an ergodic phase, while small values correspond to a retrieval phase, where the system can work as an associative memory, being able to retrieve correctly a certain pattern when this is presented only partially correct. This is still the case for the current system as long as the correlation $a$ is small enough, while when $a$ is relative large a \emph{symmetric} phase (when $T$ is also relatively large) and a \emph{correlated} phase (when $T$ is relatively small) emerge. In particular, in the symmetric case, all patterns are recalled simultaneously and to the same extent; in the correlated phase the stimulating pattern is retrieved only partially and temporally closed patterns are retrieved as well, although to a lower extent.
This paper is structured as follows: in Secs.~\ref{sec:rel} and \ref{sec:tempo} we briefly review the relativistic model and the correlated classical model, respectively; then, in Sec.~\ref{sec:merge}, we merge the two generalizations and define the model on which we shall focus, providing an expression for its intensive free-energy and self-consistency equations for its order parameters; next, in Sec.~\ref{sec:numerics} we get a numerical solution for the behavior of the order parameters, as the system parameters are tuned, highlighting the genuinely relativistic features of the models; finally, Sec.~\ref{sec:conclusions} is left for discussions. Technical details are collected in the Appendices.
\section{The relativistic model} \label{sec:rel}
In this section we briefly recall the main definitions of the ``relativistic'' Hopfield model that we are going to consider and generalize in the current work. The system is made up of $N$ binary neurons, whose state, either inactive or active, is denoted by $\sigma_i \in \{-1, +1\}$, $i=1, ..., N$. The system is embedded in a complete graph in such a way that each neuron influences and is affected by the state of all the remaining $N-1$ neurons.\\
We also introduce $P$ binary vectors of length $N$, denoted by $\boldsymbol{\xi}^{\mu}$, whose entries are binary, i.e., $\xi_i^{\mu} \in \{-1, +1\}$, and extracted i.i.d. with equal probability, for $i=1,...,N$ and $\mu=1,...,P$. These binary vectors are meant as patterns that the neural network is designed to \emph{retrieve}. Before explaining this concept in more details it is convenient to introduce a few more quantities.
\newline
As anticipated in the previous section, the Hamiltonian of the relativistic model reads as
\begin{equation}
\label{hamiltoniananrelativistica}
H_{N}^{\textrm{rel}} ( \boldsymbol{ \sigma}| \boldsymbol{\xi}) := -N \sqrt{1+ \boldsymbol{m}_N^2},
\end{equation}
where $\boldsymbol{m}_N$ is the Mattis magnetization, whose $\mu$-th entry is defined as
\begin{equation}
m^{\mu}_N := \frac{1}{N} \sum_{i=1}^N \xi_i^{\mu} \sigma_i,
\end{equation}
namely it measures the alignment of the neural configuration with the $\mu$-th pattern, and it plays as order parameter for the model. Notice that, here and in the following, the subscript $N$ highlights that we are dealing with a finite-size system and it will be omitted when taking the thermodynamic limit. Exploiting the last definition, and assuming $|\boldsymbol{m}_N | < 1$, the Hamiltonian (\ref{hamiltoniananrelativistica}) can be Taylor-expanded in terms of neuron states and pattern entries as
\begin{equation}
\nonumber
- \frac{H_N^{\textrm{rel}}(\boldsymbol{\sigma}| \boldsymbol{\xi})}{N}= 1 + \frac{1}{2N^2} \sum_{ij} \left(\sum_{\mu=1}^P {\xi}_i ^\mu{\xi}_j^\mu \right) \sigma_i \sigma_j - \frac{1}{8N^4} \sum_{ijkl} \left(\sum_{\mu=1}^P {\xi}_i ^\mu {\xi}_j^\mu \right) \left(\sum_{\nu=1}^P{\xi}_k ^\nu{\xi}_l^\nu \right) \sigma_i \sigma_j \sigma_k \sigma_l+ \mathcal{O}(\sigma^6).
\end{equation}
This expression highlights that the ``relativistic'' model includes higher-order interactions among spins.
Next, we introduce the Boltzmann-Gibbs measure for the model described by (\ref{hamiltoniananrelativistica}) as
\begin{equation} \label{eq:gibbs}
\mathcal{G}_{N,\beta}^{\textrm{rel}}( \boldsymbol \sigma \vert \boldsymbol \xi) := \frac{e^{-\beta H_{N}^{\textrm{rel}} ( \boldsymbol{ \sigma}| \boldsymbol{\xi})}}{Z_{N,\beta}^{\textrm{rel}}(\boldsymbol \xi)},\quad Z_{N,\beta}^{\textrm{rel}}( \boldsymbol \xi):=\sum_{ \{\boldsymbol \sigma \}}e^{-\beta H_{N}^{\textrm{rel}} ( \boldsymbol{ \sigma}| \boldsymbol{\xi})},
\end{equation}
where $1/\beta \in \mathbb{R}^+$ accounts for the noise level in the system (in such a way that for $\beta \to 0$ the neuronal configuration is completely random, while in the $\beta \to \infty$ limit the Hamiltonian plays as a Lyapounov function) and where $Z_{N,\beta}^{\textrm{rel}}( \boldsymbol \xi )$, referred to as partition function, ensures the normalization of the Gibbs measure.
Focusing on the so-called low-load regime, that is, as the number $N$ of neurons is made larger and larger, the number $P$ of stored patterns grows sub-linearly with $N$, namely
\begin{equation}
\alpha:= \lim_{N \to \infty} \frac{P}{N}=0,
\end{equation}
one finds that, in the thermodynamic limit, the expectation of the Mattis magnetization is given by \cite{Notarnicola}
\begin{equation} \label{eq:sol_r}
\langle m^{\mu} \rangle_{\textrm{rel}}:= \lim_{N \to \infty} \langle m_N^{\mu} \rangle_{\textrm{rel}} = \mathbb{E} \left[ \xi^{\mu} \tanh \left( \beta \sum_\mu \frac{{\xi}^\mu \langle {m}_\mu \rangle_{\textrm{rel}} }{\sqrt{1+ \langle \boldsymbol{m} \rangle_{\textrm{rel}}^2}} \right) \right],
\end{equation}
where the average $\langle \cdot \rangle_{\textrm{rel}}$ is meant with respect to the Gibbs measure (\ref{eq:gibbs}), while the average $\mathbb{E}$ is meant over the pattern realization, namely $\mathbb{E} := 2^{-NP} \prod_{i, \mu=1}^{N,P} \sum_{ \xi_i^{\mu} = \pm 1}$.
Of course, in the limit $ | \langle \boldsymbol{m}\rangle_{\textrm{rel}} | \ll 1$, we can expand the solution (\ref{eq:sol_r})
and recover the classical result \cite{Amit,Coolen}.\footnote{Of course, this expansion is only formal, since the two models are not related by a Taylor expansion. Indeed, also for the classical Hopfield model we have $|\langle \boldsymbol m \rangle_{\text{rel}}|\sim 1$ in the retrieval regime at low thermal noise.}
The self-consistency equation (\ref{eq:sol_r}) can be solved numerically. When $\beta$ is small (i.e. the thermal noise is high), the only solution is given by $\langle m^{\mu} \rangle_{\textrm{rel}} = 0$ $\forall \mu$, which corresponds to an ergodic system unable to retrieve. On the other hand, when $\beta$ is large (and thus the thermal noise is low), the system can relax to final configurations whose Mattis magnetization vector $\langle \boldsymbol{m} \rangle_{\textrm{rel}}$ satisfies $\langle m^{\mu} \rangle_{\textrm{rel}} \neq 0$ and $\langle m^{\nu} \rangle_{\textrm{rel}} = 0, \forall \ \nu \neq \mu$, which is interpreted as the \emph{retrieval} of the $\mu$-th pattern. This is also confirmed by extensive Monte Carlo simulations, as shown in \cite{Albert1}. There, the Authors found that the ``relativistic'' Hopfield model (at least in the low-load regime) is dynamically more sensible to thermal noise w.r.t. its classical counterpart. This is true both for random initial conditions and for starting configurations which are aligned to spurious states. Indeed, the largest amount of thermal noise still ensuring retrieval is lower in the ``relativistic'' Hopfield model and this is a consequence of the fact that in this model energetic wells are shallower w.r.t. to those of the Hopfield network, in such a way that the probability to escape from these wells is higher with respect to the classical reference.\footnote{We stress that this difference is only dynamical. Indeed, the critical temperature for the transition to the ergodicity is fixed to $\beta_c=1$ (in the thermodynamic limit), which is the same as the classical Hopfield model.}
\section{Temporally correlated patterns} \label{sec:tempo}
The pairwise contribution in the Hamiltonian (\ref{hamiltoniananrelativistica}) is given by the standard Hebbian coupling ($J_{ij}^{\textrm{hebb}}:= \frac{1}{N}\sum_{\mu=1}^P \xi_i^{\mu} \xi_j^{\mu}$ for the couple ($i,j$)). The latter can be generalized in order to include more complex combinations among patterns. For instance, we can write
\begin{equation} \label{eq:J_A}
J_{ij} = \frac{1}{N} \sum_{\mu, \nu =1}^{P,P} \xi_i^{\mu} X_{\mu \nu} \xi_j^{\nu},
\end{equation}
where $\boldsymbol{X}$ is a symmetric matrix. For example, the model by Personnaz {\it et al.} \cite{Personnaz} (later studied by Kanter and Sompolisnky \cite{KanterSompo} from the thermodynamical perspective) and the removal\&consolidation model \cite{Albert2,Alem} belong to this class of networks.
Another interesting example is represented by the Hopfield model with minimal\footnote{The adjective {\it minimal} stresses that the temporal correlation only involves closest patterns, i.e. $(\mu,\mu+1)$ and $(\mu-1,\mu)$.} temporal correlation, meaning that patterns are coupled to the nearest ones with an interaction strength $a \in [0, 1]$ (see also previous investigations in \cite{Amit2,GriniastyTsodyksAmit-1993,Cugliandolo-1993,CugliandoloTsodyks-1994,Agliari-Dantoni}). In mathematical terms, the coupling matrix is given by
\begin{equation}\label{eq:JJ_A}
J_{ij}^{\text{corr}}=\frac1N\sum_{\mu=1}^P[\xi^\mu_i \xi^\mu_j+a(\xi^{\mu+1}_i \xi^{\mu}_j+\xi_i^{\mu-1} \xi^\mu _j) ],
\end{equation}
where periodic boundary conditions (i.e., $\xi^{P+1}=\xi^1$ and $\xi^{0}=\xi^P$) are adopted and the compact form \eqref{eq:J_A} is recovered for
\begin{eqnarray} \label{eq:connection}
\pmb{X} = \left(
\begin{array}{ccccc}
1 & a & \cdots & 0 & a \\
a & 1& \cdots & 0 & 0 \\
\vdots & \vdots & \ddots & \vdots & \vdots \\
0 & 0 & \dots & 1 & a \\
a & 0 & \dots & a & 1 \\
\end{array}
\right).
\end{eqnarray}
For the classical Hopfield model the related Hamiltonian therefore reads as
\begin{equation}\label{eq:H_a}
H_{N,a}^{\textrm{cl, corr}}(\boldsymbol \sigma | \boldsymbol \xi ) = -\frac{1}{2N} \sum_{i,j}^{N,N} \sum_{\mu=1}^P [\xi_i^{\mu} \xi_j^{\mu} + a(\xi_i^{\mu+1} \xi_j^{\mu} +\xi_i^{\mu-1} \xi_j^{\mu} ) ] \sigma_i \sigma_j.
\end{equation}
The corresponding Gibbs measure is
\begin{equation}
\mathcal{G}_{N, \beta, a}^{\textrm{cl, corr}}( \boldsymbol \sigma\vert \boldsymbol \xi) := \frac{e^{-\beta H_{N,a}^{\textrm{cl, corr}} ( \boldsymbol{ \sigma}| \boldsymbol{\xi})}}{Z_{N,\beta, a}^{\textrm{cl, corr}}( \boldsymbol \xi)},
\end{equation}
where, again, the partition function $Z_{N,\beta,a}^{\textrm{cl, corr}}(\boldsymbol \xi)$ ensures normalization, and the related Gibbs average is denoted as $\langle \cdot \rangle_{\textrm{cl, corr}}$.
As anticipated in Sec.~\ref{sec:intro}, this modification of the Hopfield model captures some basic experimental facts \cite{Miyashita-1988, MiyashitaChang-1988}: a temporal correlation among visual stimuli during learning can spontaneously emerge also during retrieval.
Indeed, the model (\ref{eq:H_a}) is able to reproduce this experimental feature in both low \cite{GriniastyTsodyksAmit-1993,Cugliandolo-1993} and high \cite{CugliandoloTsodyks-1994} storage regimes. For the former, in the thermodynamic limit, the following self-consistent equation for the order parameter holds \cite{GriniastyTsodyksAmit-1993}
\begin{equation} \label{eq:selfcons_a}
\langle m^{\mu} \rangle_{\textrm{cl, corr}} = \mathbb{E} \bigg[ \xi^{\mu} \, \tanh \Big( \beta \sum_{\mu=1}^P \langle m^{\mu} \rangle_{\textrm{cl, corr}} [\xi_i^{\mu} + a (\xi_i^{\mu+1} + \xi_i^{\mu-1}) ] \Big) \bigg ].
\end{equation}
In \cite{GriniastyTsodyksAmit-1993}, the previous equation was solved by starting from a pure pattern state (say, $\boldsymbol \sigma = \boldsymbol \xi^1$) and iterating until convergence.
In the noiseless case ($\beta \to \infty$), where the hyperbolic tangent can be replaced by the sign function, the pure state is still a solution if $a \in [0, 1/2)$, while if $a \in (1/2,1]$, the solution is characterized by the Mattis magnetizations (assuming $P \geq 10$)
\begin{equation} \label{eq:ansatz_leti}
\pmb{m}^T= \frac{1}{2^7} (77,51,13,3,1,0,...,0,...,0,1,3,13,51),
\end{equation}
namely, the overlap with the pattern $\boldsymbol \xi^1$ used as stimulus is the largest and the overlap with the neighboring patterns in the stored sequence decays symmetrically until vanishing at a distance of $5$.
In the presence of noise, one can distinguish four different regimes according to the value of the parameters $a$ and $\beta$.
The overall behavior of the system is summarized in the plot of Fig.~\ref{phasediagram} (left panel).
A similar phase diagram, as a function of $\alpha$ and $a$, was drawn in \cite{CugliandoloTsodyks-1994} for the high-storage regime.
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.9\textwidth]{Diag_faseVfin}
\caption{Left panel: Phase diagram for the classical correlated model with low storage ($P=5$) described by the Hamiltonian (\ref{eq:H_a}). At a high level of noise the system is ergodic (E) and, for any initial configuration, it eventually reaches a state with $m^{\mu}=0, \forall \mu$. At lower temperatures (below the transition line), the system evolves to a so-called symmetric state (S), characterized by, approximately, $m^{\mu}=m \neq 0, \forall \mu$.
Then, if $a$ is small enough, by further reducing the temperature (below the transition line), the pure state retrieval (R) can be recovered.
On the other hand, if $a$ is larger, as the temperature is reduced, correlated attractors (C) appear according to Eq.~(\ref{eq:ansatz_leti}). Then, if the temperature is further lowered, the system recovers the retrieval state, yet if $a>1/2$, this state is no longer achievable. Right panel: Phase diagram for the relativistic correlated model (solid line) with low storage ($P=5$) described by the Hamiltonian (\ref{Hopfield-rel}) compared with that obtained for the classical case (dashed line) described by the Hamiltonian (\ref{eq:H_a}). Analogous regions (E, R, S, C) emerge, but here the symmetric region is wider having partially invaded the correlated and the retrieval regions, on the other hamd the ergodic phase is unchanged.}
\label{phasediagram}
\end{center}
\end{figure}
\section{The ``relativistic'' Hopfield model with temporally correlated patterns} \label{sec:merge}
The discussion in the previous section only concerns the classical Hopfield model and it is then natural to question about the consequences of temporal correlation between patterns in its relativistic extension. Then, in this Section we consider a neural network which merges the two features described in Sec.~\ref{sec:rel} and Sec.~\ref{sec:tempo}, respectively. \medskip
\begin{Definition}
Given the temporal correlation strength $a \in [0,1]$, the Hamiltonian of the ``relativistic'' Hopfield model with (minimal) cyclic temporal correlation between patterns is
\begin{equation}
\label{Hopfield-rel}
H_{N,a}^{\textrm{rel,corr}}(\boldsymbol \sigma| \boldsymbol \xi) = - N \sqrt{1+ \frac{1}{N^2}\sum_{\mu=1}^{P}\sum_{i,j=1}^{N,N}{\sigma_i \sigma_j[\xi_i^{\mu}
\xi_j^{\mu} + a(\xi_i^{\mu+1}\xi_j^{\mu}+ \xi_i^{\mu-1}\xi_j^{\mu})}]},
\end{equation}
where $\sigma_i=\pm 1$ $i\in \{1,...,N\}$ are the binary variables representing the neural activities and the entries of the $P$ digital patterns $\boldsymbol{\xi}^\mu$, $\mu \in \{1,...,P\}$ are independently drawn with equal probability $\mathbb{P}(\xi^\mu_i=+1)=\mathbb{P}(\xi^\mu_i=-1)=\frac{1}{2}.$
\end{Definition}
Notice that the Hamiltonian function \eqref{Hopfield-rel} can be put in a more compact form in terms of the Mattis magnetization $\boldsymbol m$ and the correlation matrix $\boldsymbol X$ as
\begin{equation} \label{Hopfield-rel1}
H_{N,a}^{\textrm{rel},\textrm{corr}}(\boldsymbol \sigma| \boldsymbol \xi) := - N \sqrt{1+ \boldsymbol{m}^T \boldsymbol{X}\boldsymbol{m}}.
\end{equation}
This Hamiltonian yields to the Gibbs measure
\begin{equation}
\mathcal{G}_{N,\beta,a}^{\textrm{rel},\textrm{corr}}(\boldsymbol \sigma\vert\boldsymbol \xi) := \frac{e^{-\beta H_{N,a}^{\textrm{rel},\textrm{corr}} ( \boldsymbol{ \sigma}| \boldsymbol{\xi})}}{Z_{N,\beta,a}^{\textrm{rel},\textrm{corr}}(\boldsymbol \xi)},
\end{equation}
where, as usual, $Z_{N,\beta,a}^{\textrm{rel},\textrm{corr}}( \boldsymbol \xi)$ ensures normalization, and the related Gibbs average is denoted as $\langle \cdot \rangle_{\textrm{rel},\textrm{corr}}$.
In the following we will drop the superscript and subscript ``$\textrm{rel},\textrm{corr}$'' in order to lighten the notation.
We are now investigating the model from a statistical-mechanics perspective, where the key quantity to look at is the intensive pressure \footnote{We recall that the free energy $\tilde{F}$ equals the pressure $F$, a constant apart, that is $F = -\beta \tilde F$.}.
\begin{Definition}
Using $\beta\in \mathbb R^+$ as the parameter tuning the thermal noise, the intensive pressure associated to the ``relativistic'' Hopfield model with (minimal) cyclic temporal correlation is given by
\begin{equation}\label{original_model}
F_{N,\beta,a}( \boldsymbol \xi) := \frac{1}{N} \left [\log Z_{N ,\beta,a }(\boldsymbol \xi) \right] = \frac{1}{N} \left[ \log \sum_{ \boldsymbol \sigma } e^{-\beta H_{N,a}(\boldsymbol \sigma| \boldsymbol \xi)} \right].
\end{equation}
\end{Definition}
An important feature of the intensive pressure in the thermodynamic limit is presented in the following\medskip
\begin{Proposition}\label{prop1}
In the thermodynamic limit, the self-average property of the intensive pressure holds, i.e.
\begin{equation}
\lim_{N \to \infty} \mathbb{E} \left \{ F_{N,\beta,a}(\boldsymbol \xi) - \mathbb{E} [F_{N, \beta,a}( \boldsymbol \xi)] \right \}^2 =0,
\end{equation}
\end{Proposition}
This is quite an expected result for the model under investigation (see e.g., \cite{Guerra2}), and we provide a complete proof in Appendix \ref{sec:automedia}; due to this property, in the thermodynamic limit we can drop the dependence of the intensive pressure on the set of stored patterns, i.e.
\begin{equation}
F_{\beta, a} := \lim_{N \to \infty} F_{N, \beta, a}(\boldsymbol \xi).
\end{equation}
Once the basic objects are introduced, we can turn to the thermodynamical analysis of the ``relativistic'' Hopfield model with correlated patterns. First, we prove the existence of the thermodynamic limit for the intensive pressure, also deriving an explicit expression in terms of the order parameters (the Mattis magnetizations); then, recalling that as $N \to \infty$ the Gibbs measure concentrates around configurations corresponding to maxima of the pressure, we can obtain an estimate of $\langle \boldsymbol m \rangle$ by looking for the extremal points of the pressure.
To follow this route it is convenient to factorize the matrix $\boldsymbol{X}$. Since real symmetric matrices are diagonalizable by orthogonal matrices, $\boldsymbol{X}$ can be written as $ \boldsymbol{X}=\boldsymbol{U}\boldsymbol{D} \boldsymbol{U}^{T}$, where $\boldsymbol{D}$ is a diagonal matrix whose diagonal elements are the eigenvalues of the matrix $\boldsymbol{X}$, while $\boldsymbol{U}$ and $\boldsymbol{U}^T$ are unitary rotation matrices.
Next, we call $ \tilde{\xi}_i^{\mu}:= \sum_{\nu=1}^P (\sqrt{ \boldsymbol{D}} \boldsymbol{U}^{T})_{\mu \nu} ~ \xi_i^{\nu}$, that is, in compact notation,
\begin{equation}
\tilde{\boldsymbol{\xi}}:=\sqrt{ \boldsymbol{D}} \boldsymbol{U}^{T}\boldsymbol{\xi}
\end{equation}
in such a way that the Hamiltonian (\ref{Hopfield-rel}) can be rewritten as
\begin{equation}
\label{Hopfield-relativistico}
H_{N,a}(\boldsymbol \sigma| \boldsymbol \xi) = - N \sqrt{1+ \frac{1}{N^2}\sum_{\mu=1}^{P}\sum_{i,j=1}^{N,N}{\sigma_i \sigma_j\tilde{\xi_i^{\mu}}\tilde{
\xi_j^{\mu} }}}.
\end{equation}
Analogously, by introducing the "rotated" Mattis magnetizations $\tilde{{m}}_{N}^\mu= \frac{1}{N} \sum_{i=1}^N \tilde{{\xi}}^\mu_{i}\sigma_{i}$, the Hamiltonian (\ref{Hopfield-relativistico}) can be recast as
\begin{equation} \label{eq:Hruotata}
H_{N,a}(\boldsymbol \sigma| \boldsymbol \xi)= -N \sqrt{1+ \tilde{\boldsymbol{m}}_N^2}.
\end{equation}
As shown in Appendix \ref{app:Conti1}, the rotation induced by $\boldsymbol X$ preserves pairwise uncorrelation among patterns.
In order to prove the existence of the thermodynamic limit for $F_{N,\beta, a}( \boldsymbol \xi)$ we adopt the scheme originally developed by Guerra and Toninelli \cite{Guerra1,Guerra2} for Hamiltonians that are quadratic forms (and this is the case for the model under study, see eq.~\ref{eq:Hruotata}).
More precisely, omitting the subscript $\beta, a$ to lighten the notation, we will prove that $F_{N}( \boldsymbol \xi)$ is sub-additive with respect to $N$, whence, by Fekete's lemma, $\lim_{N \to \infty} F_{N}( \boldsymbol \xi)$ exists finite and corresponds to the lower bound of the sequence $\{ F_{N}( \boldsymbol \xi) \}$; details are given in the Appendix \ref{sec:esistenza}.
The next step is to obtain an explicit expression for the thermodynamic limit of the intensive pressure $F_{\beta, a}$ in terms of the Mattis magnetizations.
To this aim we introduce the following interpolating pressure with the following \medskip
\begin{Definition}
We define an interpolating pressure as
\begin{equation}
\label{alpha-intes}
\bar{F}_N(t) := \frac{1}{N} \log \sum_{ \{\boldsymbol \sigma \}}
\exp\Bigg( t \beta N \sqrt{1 + \sum_{\mu=1}^{P} (\tilde{m} ^{\mu})^2} + (1-t) \beta \sum_{\mu=1}^{P} \psi^{\mu} \sum_{i=1}^{N} \tilde{\xi}_i^{\mu}\sigma_i \Bigg),
\end{equation}
where $t \in [0,1]$ is a scalar interpolating parameter and $\psi^{\mu}$, $\mu \in \{1,...,P\}$ are $P$ fields that are functions depending on patterns $\boldsymbol{\tilde{\xi}}^{\mu}$.
\end{Definition}
At this stage $\{\psi^{\mu}\}_{\mu=1}^P$, can be taken as arbitrary and their definition will be given a posteriori.
\newline
Notice that the interpolating pressure $\bar F_N(t)$ evaluated at $t=1$ recovers the pressure for the model under study, while, evaluated at $t=0$, recovers the pressure for a system displaying only one-body interactions which can be faced directly. The route we will pursue is to relate these two cases via the fundamental theorem of integral calculus, i.e.
\begin{equation} \label{nuova}
\begin{aligned}
F_{\beta, a} &=\lim_{N \to \infty} \bar{F}_N(t=1)
=\lim_{N \to \infty}\Big( \bar{F}_N(t=0) + \int_{0}^{1} \frac{d \bar{F}_N(t)}{dt} \bigg \rvert_{t=t'} dt' \Big).
\end{aligned}
\end{equation}
However, before proceeding along this way, a couple of remarks are in order.\medskip
\begin{Remark}
Given a function $f(\boldsymbol \sigma|\boldsymbol {\tilde \xi})$, the interpolating pressure (\ref{alpha-intes}) yields to a generalized average, denoted by $\langle f(\boldsymbol \sigma| \boldsymbol {\tilde \xi} ) \rangle_t$ and defined as
\begin{equation}
\label{Finterpol}
\begin{aligned}
& \langle f(\boldsymbol \sigma| \boldsymbol{ \tilde \xi}) \rangle_t:=
& \frac{\sum_{\{\boldsymbol \sigma \}} f(\boldsymbol \sigma| \tilde{\boldsymbol{\xi}}) \exp\left( t \beta N \sqrt{1 +
\tilde{\boldsymbol{m}}_N^2}
+ (1-t) \beta \sum_{\mu=1}^{P} \psi^{\mu} \sum_{i=1}^{N} \tilde{\xi}_i^{\mu}\sigma_i \right) }{\sum_{\{\boldsymbol \sigma\}} \exp\left( t \beta N \sqrt{1 +\tilde{\boldsymbol{m}}_N^2} + (1-t) \beta \sum_{\mu}^{P} \psi^{\mu} \sum_{i=1}^{N} \tilde{\xi}_i^{\mu}\sigma_i \right)}.
\end{aligned}
\end{equation}
\end{Remark}
\begin{Remark}\label{rem:selfaver}
We assume the self-averaging properties of the order parameters, meaning that the fluctuations of the Mattis magnetizations $ \tilde{\boldsymbol m}_N$ with respect to its equilibrium value $\langle \boldsymbol {\tilde m_N}\rangle_t$ vanish in the thermodynamic limit. Indeed, since the network is in the low storage regime, we can expect that it exhibits a ferromagnetic-like behavior. Therefore, it is reasonable to require that the covariance of the magnetizations scales as $N^{-1}$, or equivalently that
\begin{equation}
\label{eq:magnsus}
\lim_{N \to \infty } \big\vert N( \langle {\tilde m}_N^\mu {\tilde m}_N^\nu\rangle_t -\langle {{\tilde m}^\mu_N}\rangle_t \langle {{\tilde m}^\nu_N}\rangle_t)\big\vert < +\infty
\end{equation}
almost everywhere and for all $\mu,\nu=1,\dots,P$. This is a straightforward generalization of the fact that, in ferromagnetic systems, the magnetic susceptibility is finite almost everywhere in the thermodynamic limit.
\begin{comment}, i.e.
\begin{equation}
\lim_{N \to \infty }P_t (\tilde{\boldsymbol m}_N)=\delta (\tilde{\boldsymbol m}-\langle \tilde{\boldsymbol m}\rangle_t).
\end{equation}
where $P_t$ is the probability distribution of the order parameters associated to the generalized Boltzmann average \eqref{Finterpol}.
\end{comment}
\end{Remark}
As a consequence, we can state the following\medskip
\begin{Lemma}\label{prop:constant}
It is possible to choose the tunable parameters $\boldsymbol \psi$ in order for the generalized-average magnetization $\langle \tilde{\boldsymbol{m}}_N \rangle_t$ (in the thermodynamic limit and under the self-average hypothesis) to be independent on $t$ almost everywhere, i.e.
$$\frac{d }{dt}\lim_{N \to \infty } \langle \tilde{\mathbf{m}}_N \rangle_{t}= 0\quad a.e.$$%
\end{Lemma}
\begin{proof}
The constraint \eqref{eq:magnsus} means that the Mattis magnetizations weakly fluctuate around their expectation values for sufficiently large $N$. Thus, we can adopt a formal expression for the Mattis magnetizations as follows:
\begin{equation}
\label{eq:exp}
{\tilde m}^{\mu}_N(\boldsymbol {\sigma})= \langle {\tilde m}_N ^{\mu}\rangle _t+\frac{\Delta_\mu (\boldsymbol{\sigma})}{\sqrt N}.
\end{equation}
Such decomposition is valid almost everywhere. As a direct consequence, we have that the random variables $\Delta_\mu (\boldsymbol{ \sigma})$ have zero mean and finite covariance. We now compute the $t$-derivative of the expectation value of the Mattis magnetization, leaving the possibility for $\psi$ to depend on $t$. By direct calculation we get
\begin{equation}\label{eq:derivative}
\begin{split}
\frac{d \langle \tilde{m}_N^\mu \rangle_{t} }{d t} & =\beta N\Big\langle\tilde{m}_N^\mu \sqrt{1+ \tilde{\mathbf{m}}_N^2} \Big\rangle_t+\beta N\sum_{\rho=1}^P[-\psi^\rho+(1-t)(\psi^\rho)']\langle\tilde{m}^\rho_N\tilde{m}^\mu_N\rangle_t\\ &-\beta N\langle \tilde{m}_N^\mu \rangle_t\Big\langle\sqrt{1+ \tilde{\mathbf{m}}_N^2} \Big\rangle_t+\beta N\sum_{\rho=1}^P [-\psi^\rho+(1-t)(\psi^\rho)']\langle \tilde{m}_N^\rho \rangle_t\langle\tilde{m}^\mu_N\rangle_t,
\end{split}
\end{equation}
where $(\cdot)'$ stands for the $t$-derivative. In the remainder of the proof, we will drop the subscripts $N$ and $t$ in order to lighten the notation. Applying the expression \eqref{eq:exp}, we can expand the argument of the expectation values in the previous equality around the expectation value of the magnetizations up to the order $N^{-1}$ (because of the prefactor $N$ in \eqref{eq:derivative}). In particular, we have
\begin{equation*}
\begin{split}
\sqrt{1+ \tilde{\mathbf{m}}^2}&= \sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}+\sum _{\rho=1}^P \frac{\langle\tilde m_\rho \rangle}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}(\tilde m_\rho - \langle \tilde m_\rho \rangle)\\&+\frac12\sum_{\rho,\sigma=1}^P\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle \tilde m_\rho\rangle \langle \tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)(\tilde m_\rho - \langle\tilde m_\rho \rangle)(\tilde m_\sigma - \langle\tilde m_\sigma \rangle)+ \mathcal R_2(\tilde {\boldsymbol m})=
\\&= \sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}+\sum _{\rho=1}^P \frac{\langle\tilde m_\rho \rangle}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}\frac{\Delta_\rho}{\sqrt N}+\frac12\sum_{\rho,\sigma=1}^P\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle\tilde m_\rho\rangle \langle\tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)\frac{\Delta _\rho \Delta_ \sigma}{N}+ \mathcal R_2(\tilde {\boldsymbol m}),
\end{split}
\end{equation*}
where
\begin{eqnarray*}
\mathcal R_2 (\tilde {\boldsymbol m})&=&\frac{1}{3!}\sum_{\rho,\sigma,\eta} \Bigg(\frac{\delta_{\rho,\sigma} H_\eta}{\sqrt{1+\sum_\gamma H_\gamma ^2 }}-\frac{\delta_{\rho,\eta} H_\sigma+\delta_{\sigma,\eta} H_\rho}{({1+\sum_\gamma H_\gamma ^2 })^{3/2}}+3\frac{ H_\rho H_\sigma H_\eta}{({1+\sum_\gamma H_\gamma ^2 })^{5/2}}\Bigg)\frac{\Delta_\rho\Delta_\sigma\Delta_\eta}{N^{3/2}},\\
\boldsymbol H& = &\langle \tilde{\boldsymbol{m}}\rangle+x \boldsymbol \Delta,\quad \text{for some } x \in(0,1),
\end{eqnarray*}
is the Lagrange remainder of order 2. It is easy to prove that
\begin{equation*}
\left\vert\frac{\delta_{\rho,\sigma} H_\eta}{\sqrt{1+\sum_\gamma H_\gamma ^2 }}-\frac{\delta_{\rho,\eta} H_\sigma+\delta_{\sigma,\eta} H_\rho}{({1+\sum_\gamma H_\gamma ^2 })^{3/2}}+3\frac{ H_\rho H_\sigma H_\eta}{({1+\sum_\gamma H_\gamma ^2 })^{5/2}}\right\vert \le 6 \underset{\rho,t\in(0,1)}{\text{max}}\vert H_\rho \vert= 6C,
\end{equation*}
thus
\begin{equation*}
\vert \mathcal R_2 (\tilde {\boldsymbol m}) \vert \le \frac{C}{N^{3/2}} \left(\sum_{\rho=1}^P \vert \Delta_\rho \vert \right)^3,
\end{equation*}
and therefore the remainder scales as $N^{-3/2}$. Using this result, we can compute each expectation value appearing in \eqref{eq:derivative}. In fact,
\begin{equation*}
\begin{split}
\Big\langle\tilde{m}_\mu& \sqrt{1+ \tilde{\mathbf{m}}^2} \Big\rangle=\Big\langle\big( \langle {\tilde m}_{\mu}\rangle +\frac{\Delta_\mu }{\sqrt N}\big) \Big[\sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}+\sum _{\rho=1}^P \frac{\langle\tilde m_\rho \rangle}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}\frac{\Delta_\rho}{\sqrt N}\\&+\frac12\sum_{\rho,\sigma=1}^P\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle \tilde m_\rho\rangle \langle\tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)\frac{\Delta _\rho \Delta_ \sigma}{N}+ \mathcal R_2(\tilde{\boldsymbol{m}})\Big] \Big\rangle=\\
&=
\langle \tilde m_\mu\rangle \sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}+\frac{\langle\tilde m_\mu \rangle}2\sum_{\rho,\sigma}\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle \tilde m_\rho\rangle \langle\tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)\frac{\langle\Delta _\rho \Delta_ \sigma\rangle}{N}\\&+
\sum _{\rho} \frac{\langle\tilde m_\rho \rangle}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}\frac{\langle\Delta_\mu \Delta_\rho\rangle}{N}+\langle \mathcal Q_1^\mu(\tilde{\boldsymbol{m}})\rangle.
\end{split}
\end{equation*}
Here, we used the fact that $\langle \Delta _\mu \rangle =0$ and defined the quantity
\begin{equation}
Q_1^\mu(\tilde{\boldsymbol{m}})=\Big( \langle {\tilde m}_{\mu}\rangle +\frac{\Delta_\mu }{\sqrt N}\Big)\mathcal R_2(\tilde{\boldsymbol{m}})+\frac12\sum_{\rho,\sigma=1}^P\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle \tilde m_\rho\rangle \langle\tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)\frac{\Delta_\mu \Delta _\rho \Delta_ \sigma}{N^{3/2}},
\end{equation}
accounting for all the contributions which scale at least as $N^{-3/2}$. In the same fashion, we have
\begin{equation*}
\begin{split}
\langle\tilde{m}_\mu\rangle&\langle \sqrt{1+ \tilde{\mathbf{m}}^2} \rangle=
\langle \tilde m_\mu\rangle \sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}+\frac{\langle\tilde m_\mu \rangle}2\sum_{\rho,\sigma}\left(\frac{\delta_{\rho,\sigma}}{\sqrt{1+ \langle\tilde{\mathbf{m}}\rangle^2}}-\frac{\langle \tilde m_\rho\rangle \langle\tilde m_\sigma\rangle }{({1+ \langle\tilde{\mathbf{m}}\rangle^2})^{3/2}}\right)\frac{\langle\Delta _\rho \Delta_ \sigma\rangle}{N}+\langle Q_2^{\mu}(\tilde{\boldsymbol{m}})\rangle,
\end{split}
\end{equation*}
and
\begin{equation*}
\begin{split}
\langle \tilde m_\mu\tilde m_\rho \rangle=\langle\tilde m_\mu\rangle \langle\tilde m_\rho \rangle+\frac{\langle \Delta_\mu \Delta_\rho\rangle}{N}+\langle \mathcal Q_3^{\mu}(\tilde{\boldsymbol{m}})\rangle.
\end{split}
\end{equation*}
The functions $Q_2 ^\mu $ and $Q_3 ^\mu$ are defined in order to incorporate all the subleading contributions in $N$. Calling $Q^{\mu}(\tilde{\boldsymbol{m}})= Q_1^{\mu}(\tilde{\boldsymbol{m}})-Q_2^{\mu}(\tilde{\boldsymbol{m}})-Q_3^{\mu}(\tilde{\boldsymbol{m}})$, we can finally recast \eqref{eq:derivative} as
\begin{equation}
\label{eq:master1}
\frac{d \langle \tilde{m}_\mu \rangle }{d t} =\beta \sum_\rho \Big(\frac{\langle \tilde m_\rho \rangle}{\sqrt{1+\langle \tilde{\mathbf{m}}\rangle^2}}-\psi^\rho+(1-t)(\psi^\rho)'\Big)\langle \Delta_\mu \Delta_\rho\rangle+N \langle Q^{\mu}(\tilde{\boldsymbol{m}}) \rangle.
\end{equation}
Since $Q^{\mu}(\tilde{\boldsymbol{m}})$ scales as $N^{-3/2}$, the second contribution is subleading (and vanishes in the $N\to\infty$ limit). We now call $\boldsymbol{\tilde{M}} := \lim_{N \to \infty}\langle \mathbf{\tilde{m}}_N \rangle_t$ the thermodynamic value of the global magnetization; notice that at this stage we still allow $\boldsymbol{\tilde{M}}$ to depend on $t$. Clearly, the r.h.s. of Eq. \eqref{eq:master1} is well-defined almost everywhere in the thermodynamic limit (recall that the $\Delta_\mu$ variables have finite covariance). Thus
\begin{equation}
\label{eq:master2}
\lim_{N\to\infty}\frac{d \langle \tilde{m}_\mu \rangle }{d t} =\beta \sum_\rho \Big(\frac{ \tilde M_\rho }{\sqrt{1+ \tilde{\mathbf{M}}^2}}-\psi^\rho+(1-t)(\psi^\rho)'\Big)\langle \Delta_\mu \Delta_\rho\rangle_\infty, \quad {a.e.}
\end{equation}
where the subscript $\infty$ is used to stress that the expectation value is evaluated in the thermodynamic limit. In other words, the series of the $t$-derivatives of the generalized-average magnetization converges to the r.h.s. of the previous equation almost everywhere, thus, invoking Egorov's theorem, the sequence is almost uniformly convergent. As a consequence, we have
$$ \lim_{N \to \infty }\frac{d \langle \tilde{m}^\mu_N \rangle _t}{d t} =\frac{d }{d t} \lim_{N \to \infty }\langle\tilde{m}^\mu_N \rangle_t \quad {a.e.} ,$$ thus Eq. \eqref{eq:master2} becomes
\begin{equation}
\frac{d \tilde M_\mu}{dt}=\beta \sum_\rho \Big(\frac{ \tilde M_\rho }{\sqrt{1+ \tilde{\mathbf{M}}^2}}-\psi^\rho+(1-t)(\psi^\rho)'\Big)\langle \Delta_\mu \Delta_\rho\rangle_\infty, \quad {a.e.}
\end{equation}
The function $\boldsymbol \psi$ can be chosen in order to ensure the quantity in round brackets to vanish, which would imply $d\tilde M_\mu /dt=0$ for all $\mu=1,\dots,P$. This implies
\begin{equation*}
(1-t)(\psi^\rho)' -\psi^\rho = -\frac{M_\rho}{\sqrt{1+\tilde{\mathbf{M}}^2}}.
\end{equation*}
Because of our choice, the r.h.s. is independent on $t$. The solution of this differential equation can be easily found recalling that $(1-t)(\psi^\rho)' -\psi^\rho=[(1-t)\psi^\rho]'$, thus
$$
(1-t)\psi^\rho = -\frac{M_\rho}{\sqrt{1+\tilde{\mathbf{M}}^2}}t+ c_\rho,
$$
or in a more transparent form
$$
\psi^\rho =\frac{M_\rho}{\sqrt{1+\tilde{\mathbf{M}}^2}}\frac{c'_\rho-t}{1-t},
$$
where we redefined
$$
c_\rho=\frac{M_\rho}{\sqrt{1+\tilde{\mathbf{M}}^2}}c'_\rho.
$$
Now, since $\boldsymbol \psi$ in the interpolating model always appears through the product $(1-t)\psi^\rho$ and since we have to recover the original model \eqref{original_model}, one has that $c'_\rho = 1$ for all $\rho=1,\dots,P$, therefore leaving us only with
\begin{equation} \label{eq:psimu}
\psi^\rho= \frac{\tilde M_\rho}{\sqrt{1+ \tilde{\mathbf{M}}^2}}.
\end{equation}
This proves our assertion.
\begin{comment}
First, we notice that, as a direct implication of Remark \ref{rem:selfaver}, given a function $f(\tilde{\boldsymbol m}_N)$ of the order parameters, in the thermodynamic limit we have
\begin{eqnarray}
\notag
\lim_{N \to \infty }\langle f(\tilde{\mathbf m}_N)\rangle_t&=& \lim_{N \to \infty } \int d\tilde{\boldsymbol m}_N f(\tilde{\boldsymbol m}_N)P_t(\tilde{\boldsymbol m}_N)\\
\notag
&=&\int d\tilde{\boldsymbol m} f(\tilde{\boldsymbol m})\delta (\tilde{\boldsymbol m}-\langle \tilde{\boldsymbol m}\rangle_t)\\
\notag
&=& f(\langle\tilde{\mathbf m}\rangle_t).
\end{eqnarray}
Then, by directly evaluating the derivative of $\langle \tilde{m}_N^\mu\rangle_{t}$ w.r.t. $t$, we get
\begin{equation*}
\begin{split}
\frac{d \langle \tilde{m}_N^\mu \rangle_{t} }{d t}
=\beta N\Big\langle\tilde{m}_N^\mu \sqrt{1+ \tilde{\mathbf{m}}_N^2} \Big\rangle_t-\beta N\sum_{\rho=1}^P\psi^\rho\langle\tilde{m}^\rho_N\tilde{m}^\mu_N\rangle_t\\ &-\beta N\langle \tilde{m}_N^\mu \rangle_t\Big\langle\sqrt{1+ \tilde{\mathbf{m}}_N^2} \Big\rangle_t+\beta N\sum_{\rho=1}^P \psi^\rho\langle \tilde{m}_N^\rho \rangle_t\langle\tilde{m}^\mu_N\rangle_t.
\end{split}
\end{equation*}
Now, using Remark \ref{rem:selfaver}, all terms cancel out and, for any $\mu=1,...,P$ we have
\begin{equation*}
\lim_{N\to\infty}\frac{d \langle \tilde{m}_N^\mu\rangle_{t} }{d t} =0.
\end{equation*}
\end{comment}
\end{proof}
We can now state the following \medskip
\begin{Theorem}
In the thermodynamic limit and under the self-average properties of the order parameters, the intensive pressure of the ``relativistic'' Hopfield model with correlated patterns
(\ref{Hopfield-relativistico}) can be written in terms of the $P$ Mattis magnetizations as
\begin{equation}
\label{FreeFinal}
F_{\beta, a}=\log 2 + \mathbb E \log \cosh \left(\beta
\frac{ \sum_\mu \xi^\mu (\boldsymbol{ X} \boldsymbol{M})_\mu}{\sqrt{1+ \boldsymbol{M}^T\boldsymbol{ X}\boldsymbol{M} }} \right) + \frac{\beta}{\sqrt{1+ \boldsymbol{M}^T\boldsymbol{ X}\boldsymbol{M}}}.
\end{equation}
The associated self-consistency equations read
\begin{equation}
\label{finale}
M_{\mu} =\frac{(1+\boldsymbol{M}^T\boldsymbol{X} \boldsymbol{M})\mathbb E \,{\xi}^{\mu} \tanh\Big( \beta \frac{\sum_\rho {\xi}^\rho (\boldsymbol{X} \boldsymbol{ M})_\rho}{\sqrt{1+\boldsymbol{M}^T\boldsymbol{X} \boldsymbol{M}}} \Big)}{1+\sum_\nu (\boldsymbol M^T \boldsymbol X)_{\nu }\mathbb E \,{\xi}^{\nu} \tanh\Big( \beta \frac{\sum_\rho {\xi}^\rho (\boldsymbol{X} \boldsymbol{ M})_\rho}{\sqrt{1+\boldsymbol{M}^T\boldsymbol{X} \boldsymbol{M}}} \Big)} , \quad \ \forall \mu=1,...,P.
\end{equation}
\end{Theorem}
\begin{proof}
As anticipated, the strategy is to get the pressure of the model (\ref{Hopfield-relativistico}), by exploiting (\ref{nuova}). As a first step, we evaluate the interpolating pressure (\ref{alpha-intes}) at $t=0$; this can be done straightforwardly as it corresponds to a one-body system:
\begin{eqnarray}
\nonumber
\bar{F}_N(0) &=& \frac{1}{N} \log \Big[ \sum_{ \{ \boldsymbol \sigma \}} \exp\Big(\beta \sum_{\mu=1}^{P} \psi^{\mu} \sum_{i=1}^{N} \tilde{\xi}_i^{\mu}\sigma_i \Big) \Big]\\
& =& \log{2} + \frac{1}{N} \sum_{i=1}^{N} \log{ \cosh \Big (\beta \sum_{\mu=1}^{P}
\psi^{\mu} \tilde{\xi_i}^{\mu} \Big) }\label{Cauchy}\\
&=&
\nonumber
\log{2} + \Big \langle \log\cosh\Big( \beta \sum_{\mu=1}^{P}\psi^{\mu}{\tilde{\xi}^{\mu}}_{i} \Big) \Big \rangle_{\tilde{\boldsymbol{\xi}}},
\end{eqnarray}
where $\langle \cdot \rangle_{\boldsymbol {\tilde \xi } }$ represents the empirical average over the $\boldsymbol{ \tilde \xi}$ and, as $N \to \infty$, it can be replaced by the expectation $\mathbb{E}_{\tilde {\boldsymbol \xi}}(\cdot)$. Next, let us move to the calculation of the $t$-derivative, that is,
\begin{equation}
\frac{d\bar{F}_N(t)}{dt}
=
\beta \Big \langle \sqrt{1+ \tilde{\mathbf{m}}_N^2}- \sum_{\mu=1}^{P}\psi^{\mu} \tilde{m}_N^\mu \Big \rangle_{t}.
\label{punto}
\end{equation}
%
In the thermodynamic limit, the generalized measure concentrates and, in particular, for almost every value of $\beta \in \mathbb{R}^+$ \cite{Guerra1}
\begin{equation}
\label{punto1}
\lim_{N \to \infty} \frac{d\bar{F}_N(t)}{dt} = \frac{d\bar{F}(t)}{dt} =
\beta \Big( \sqrt{1+ \tilde{\boldsymbol {M}} ^2}- \sum_{\mu=1}^{P}\psi^{\mu} \tilde{M}_\mu \Big ).
\end{equation}
Here, we stress that, due to the Lemma \ref{prop:constant}, we directly used the equilibrium value of the order parameters, which are $t$-independent, and the integral in \eqref{nuova} therefore turns out to be trivial.
Recalling the expression for $\psi^{\mu}$ in \eqref{eq:psimu}, we get
\begin{equation} \label{delta}
\frac{d \bar{F}(t)}{dt} = \frac{\beta}{\sqrt{1+\boldsymbol{\tilde{M}}^2}}.
\end{equation}
By plugging \eqref{Cauchy} and \eqref{delta} into \eqref{nuova}, we get the intensive pressure in terms of the rotated order parameters:
\begin{equation}
\label{free-final}
F(\boldsymbol{\tilde M})=\log 2 +\mathbb{E}_{\tilde {\boldsymbol \xi}} \log \cosh \Bigg(\beta \tilde{\boldsymbol{\xi}}^T\cdot
\frac{ \boldsymbol{\tilde{M}}}{\sqrt{1+ \boldsymbol{\tilde{M}}^2 }} \Bigg) + \frac{\beta}{\sqrt{1+ \boldsymbol{\tilde{M}}^2}}.
\end{equation}
The expression \eqref{FreeFinal} can be obtained by rotating back the order parameters in the original space. Since the extremization of the intensive pressure w.r.t. the real Mattis magnetizations $\boldsymbol M$ is equivalent to the extremization w.r.t. to the rotated ones, we can directly impose the extremality condition on the \eqref{free-final}, thus obtaining the condition
\begin{equation}
\tilde M_\mu=\mathbb E_{\tilde{\boldsymbol \xi}} \left \{ \tanh \left (\beta \frac{ \tilde{\boldsymbol{\xi}}^T\cdot \tilde{\boldsymbol{M}}}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \right) \left [\tilde{\xi}^{\mu} \left(1 + \tilde{\boldsymbol{M}^2} \right) - \tilde{M}_{\mu} \left( \tilde{\boldsymbol{\xi}}^T \cdot \tilde{\boldsymbol{M}} \right) \right]\right \}.
\end{equation}
We stress that the value of $\tilde M_\mu$ does not depend on the specific realization of the digital patterns $\xi^\mu$, since the r.h.s. of the previous equation is averaged over the quenched noise. Due to this fact, we can rearrange the r.h.s. as
\begin{equation}
\begin{split}
\tilde M_\mu = &\mathbb E_{\tilde{\boldsymbol \xi}} \left(\tanh \Bigg(\beta \frac{ \tilde{\boldsymbol{\xi}}^T\cdot \tilde{\boldsymbol{M}}}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \Bigg) [\tilde{\xi}^{\mu} (1 + \tilde{\boldsymbol{M}^2}) - \tilde{M}_{\mu}( \tilde{\boldsymbol{\xi}}^T \cdot \tilde{\boldsymbol{M}}) ]\right)=\\=&\,(1+\tilde{\boldsymbol M}^2)\mathbb E_{\tilde{\boldsymbol \xi}}\, \tilde \xi^\mu\tanh \Bigg(\beta \frac{ \tilde{\boldsymbol{\xi}}^T\cdot \tilde{\boldsymbol{M}}}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \Bigg)-\tilde M_\mu \,\sum_\nu \tilde M_\nu\mathbb E_{\tilde{\boldsymbol \xi}}\, \tilde \xi^\nu\tanh \Bigg(\beta \frac{ \tilde{\boldsymbol{\xi}}^T\cdot \tilde{\boldsymbol{M}}}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \Bigg).
\end{split}
\end{equation}
Further, moving the second term in the r.h.s. to the l.h.s. and collecting $\tilde M_\mu$, we obtain
\begin{equation}
\tilde M_\mu=\frac{(1+\tilde{\boldsymbol M}^2)\mathbb E_{\tilde{\boldsymbol \xi}}\, \tilde \xi^\mu\tanh \Big(\beta \frac{ \sum_\rho \tilde{{\xi}}_\rho \tilde{{M}}_\rho}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \Big)}{1+\sum_\nu \tilde M_\nu\mathbb E_{\tilde{\boldsymbol \xi}}\, \tilde \xi^\nu\tanh \Big(\beta \frac{ \sum_\rho \tilde{{\xi}}_\rho \tilde{{M}}_\rho}{ \sqrt{1 + \tilde{\boldsymbol{M}^2}}} \Big)}.
\end{equation}
Then, (\ref{finale}) follows by rotating back the order parameters in the original pattern space.
\end{proof}
We stress that, since the l.h.s. of \eqref{FreeFinal} does not depend on the specific realization of the digital patterns $\boldsymbol \xi$, we get a further proof of Proposition \ref{prop1}.
\section{Numerical solution and phase diagrams}\label{sec:numerics}
In this Section, we report the numerical solutions for the self-consistency equations \eqref{finale}. To this aim, we fix $P$ and $a\in[0,1]$ and solve the self-consistency equations as a function of $T=\beta^{-1}$ with a fixed-point iteration method.
The solutions obtained by setting as initial configuration a retrieval state (i.e. $\boldsymbol{M}^T=(1,0,..,0)$, without loss of generality), and by tuning the parameters $T$ and $a$ can be seen in the left panel of Figure \ref{SCsol_Fmin}.
\begin{figure}[!ht]
\centering
\includegraphics[width=1.0\textwidth]{SCsol_FminV1}
\caption{Panel (A): numerical solution of the self-consistency equation for $P=5$ and using the state $\boldsymbol{M}^T=(1,0,..,0)$ as a starting point. Panel (B): numerical solution of the self-consistency equation for $P=5$ obtained by considering different starting states and selecting, among the related solutions, the one corresponding to the largest pressure. The heat map is realized by considering the value of the largest Mattis magnetization. Panel (C): complete phase diagram for the correlated model obtained from the two previous panels. (E) represents the ergodic phase where $M_\mu=0$ $\forall \mu=1;..,P$, (S) is the spin-glass phase where $M_\mu=m\ne 0$ $\forall \mu=1,..,P$ and (R1) and (R2) are the recall phases of the model. In particular (R1) corresponds to the region where the pure states maximize the pressure while in (R2) the pure states are local pressure maxima.}
\label{SCsol_Fmin}
\end{figure}
By inspecting this plot, we can notice the existence of different regions, analogously to the case of the classical Hopfield model with correlated patterns (Fig. \ref{phasediagram}):
\begin{itemize}
\item For high level of noise the system is ergotic (E) and the only stable solution is the one where any entry of the magnetization vanishes, that is $\boldsymbol{M}=\mathbf{0}$;
%
\item At smaller temperature values the system evolves to the symmetrical phase (S) in which the solution is of the form $\boldsymbol{M}^T=(m,m,m,...,m)$ with $ \ m \neq 0$;
%
\item Decreasing the temperature and taking $a$ small enough, the system enters into the retrieval phase (R) where the stable solution has only one non-zero component corresponding to the retrieved pattern;
%
\item For low temperature and large values of the parameter $a$, we can see a hierarchical phase (C) where the solution displays several non-vanishing magnetizations. More precisely, there is one overlap (which is used as initial stimulus) with maximum value, while the remaining magnetizations decay symmetrically in the distance w.r.t. to the initial stimulus, until they vanish. In particular, we note that overlaps that are at the same distance w.r.t. the starting signal have the same value.
\end{itemize}
Now, in order to get an overall picture of the system behavior we proceed with the construction of its phase diagram. To this aim, we solve numerically Eq.~\eqref{finale} for different initial configurations and then, for the related solutions we compute the pressure. Then, selecting as solutions those for which the pressure is maximal, we obtain Fig.~\ref{SCsol_Fmin} (central panel). \\
\\By comparing the panels (A) and (B) of Fig.~\ref{SCsol_Fmin} we get panel (C). In particular, we can see that the retrieval region observed for values of $T$ and $a$ relatively small can be further split in a pure retrieval region (R1) where pure states are global maxima for the intensive energy, and in a mixed retrieval region (R2) where pure states are local minima, yet their attraction basin is large enough for the system to end there if properly stimulated. In these two regions, the network behaves like a Hopfield network and the patterns can be recovered. On the other hand, even if the temperature $T$ remains low, for values $a>0.5$ the pure state regime is no longer achievable.
Now, if we look at the figure more carefully, we can observe that the ergodic phase occurs beyond a certain temperature $T_c(a)$, whose value increases with the correlation parameter $a$. Just below this critical temperature the system enters the symmetrical phase where the effect of the temporal correlation is strong enough for each pattern to align the same fraction of neurons.
We can analytically determine the transition line (see Appendix \ref{sec:Tc_line} for the analytical derivation) as
\begin{equation}\label{Tc1}
T_c(a)=1+2a
\end{equation}
by Taylor expanding the right hand side of eq.~\eqref{finale}, recalling that in the ergodic phase $\boldsymbol M = \boldsymbol 0$. Eq.~\eqref{Tc1} indicates a continuous transition to the fully symmetric phase, where there is no significant alignment of the spins in the direction of one particular pattern, but still a certain degree of local freezing. We can therefore state that if $T>T_c$ the only solution is $\boldsymbol{M}=\boldsymbol{0}$ while, if $T<T_c$ there exist solutions $\boldsymbol{M}\ne\boldsymbol{0}$.
The line $T_c$ analytically found is consistent with the numerical solution of the Eq. \eqref{finale}.
\begin{figure}[tb]
\centering
\includegraphics[width=1.0\textwidth]{SCsol_Fmin_P579}
\caption{First line: solutions of the self-consistency equation obtained by taking as initial condition the pure state, as function of $T$ and $a$. Second line: selected solutions corresponding to the maximum of the intensive pressure. In both cases different values of $P$ ($P=5,7,9$) are considered. The heat map is realized by considering the value of the largest Mattis magnetization.}
\label{P579}
\end{figure}
We now focus on the parameter $P$. In Fig.~\ref{P579} we show (in the first line) the solutions of the self-consistency equations for different values of $P$ ($P=5,7,9$) when the initial state is the pure configuration $\boldsymbol{M}^T=(1,0,...,0)$ and when different initial states are tested (second line) with the solution giving the maximal pressure. From this picture, we can notice that, as $P$ increases, the correlated (C) and the retrieval (R1) phases get wider.
Let also consider the following initial states:
\newline
\\$\boldsymbol{M}^T=\frac{1}{2}(1,1,1),\quad \mbox{if } P=3$
\\
\\$\boldsymbol{M}^T=\frac{1}{8}(5,3,1,1,3),\quad \mbox{if } P=5$
\\
\\$\boldsymbol{M}^T=\frac{1}{32}(19,13,3,1,1,3,13),\quad \mbox{if } P=7$
\\
\\$\boldsymbol{M}^T=\frac{1}{128}(77,51,13,3,1,1,3,13,51),\quad \mbox{if } P=9.$
These vectors correspond to the states in the correlated region where the Mattis magnetizations reach a hierarchical structure in which the largest element of the vector, for example $M_1$, corresponds to the initial stimulus and the other elements are symmetrically decreasing i.e. $M_1\ge M_2=M_P\ge M_3=M_{P-1}\ge...\ge M_{\frac{P+1}{2}}=M_{\left(\frac{P+1}{2}\right)+1}$.
If we consider these configurations as initial conditions for solving Eqs. \eqref{finale} for varying $a$ and $T$, we get the Figure \ref{P579_M0corr}.
It can be seen that, for each value of $P$, part of the retrieval region is absorbed by the correlated one which becomes more and more predominant as $P$ increases. This means that starting from such a configuration, retrieval gets harder and harder.
\begin{figure}[tb]
\centering
\includegraphics[width=1.0\textwidth]{SC_corr_P579}
\caption{Solutions of the self-consistency equation for $P=5,7,9$ starting from a correlated state. The heat map is realized by considering the value of the largest Mattis magnetization.}
\label{P579_M0corr}
\end{figure}
\begin{figure}[tb]
\centering
\includegraphics[width=0.8\textwidth]{P5_a_fissato}
\caption{These panels show the numerical solution for the self-consistency equation ~\eqref{finale} in case $P = 5$ for different values of $a$; self-consistency equation are solved by taking as initialization the pure state $\mathbf{M}^T=(1,0,...,0)$. The red line is the one related to the magnetization of the first pattern, while the four blue dashed lines indicate the magnetizations of the other patterns. An analogous behavior has been observed also for $P =7$ and $P =9$.}
\label{a_fissato}
\end{figure}
Let us now fix the correlation parameter $a$ and see the evolution of the magnetization entries as the temperature is varied.
As shown in Fig.~\ref{a_fissato}, under the assumption that the first pattern acts as a stimulus we get that $M_1$ remains the largest component until the symmetrical phase is reached where $M_{\mu}=m$ for any $\mu$. This behavior is robust with respect to $P$.
As a final investigation, we consider the robustness of the retrieval solution by solving the self-consistent equation (eq.~\eqref{finale}) starting from an initial configuration given by $\boldsymbol M ^T= (1 - \delta, \delta, ..., \delta)$, namely, a pure state affected by a degree of noise tunable by the parameter $\delta$, and homogenously spread over all the magnetization entries. The resulting solution is shown in Fig.~\ref{rumoreP5}: as $\delta$ is increased the correlated and the retrieval regions progressively breaks down into a symmetric-like region and the most sensitive area is the one corresponding to large value of $a$. This suggests that the correlated region is relatively unstable.
\begin{figure}[bt]
\centering
\includegraphics[width=1.0\textwidth]{rumoreP5}
\caption{Solution of the self-consistency equation for $P = 5$ evaluated by using as initial state the vector $\boldsymbol{M }^T= (1 - \delta, \delta, ..., \delta)$, where $\delta = 0.15$ (leftmost panel), $\delta = 0.20$ (central panel), and $\delta = 0.25$ (rightmost panel). Notice that the region mostly affected by the noise $\delta$ is the one corresponding to the correlated phase. The heat map is realized by considering the value of the largest Mattis magnetization.}
\label{rumoreP5}
\end{figure}
\section{Conclusions} \label{sec:conclusions}
In this work we considered the ``relativistic'' Hopfield model in the low-load regime and we allowed for possible temporal correlations among memories. This is accomplished by revising the Hebbian couplings as $J_{ij} = \frac{1}{N} \sum_{\mu} [\xi_i^{\mu} \xi_j^{\mu} + a(\xi_i^{\mu+1} \xi_j^{\mu} + \xi_i^{\mu-1} \xi_j^{\mu})]$ in agreement with previous experimental results \cite{Amit2,Miyashita-1988, MiyashitaChang-1988}. The model parameters are the extent of temporal correlation $a$ and the external noise $T$.
We first addressed the model analytically -- showing the existence of the thermodynamic limit and calculating the free-energy, whence the self-consistency equations for the order parameters -- and numerically -- deriving a phase diagram displaying different qualitative behaviors of the system in the $(T,a)$ space. In particular, beyond the ergodic and the retrieval regions, we highlight the emergence of a so-called symmetric region, characterized by states where the overlap $m_{\mu}$ between the $\mu$-th memory and the neural configuration is $M_{\mu}=m>0$ for any $\mu$, and a correlated region, characterized by states with a hierarchical arrangement of overlaps which mirrors the temporal correlation among memories, that is $M_1 \ge M_2=M_P \ge M_3 =M_{P-1} ... $ when the stimulate memory is $\boldsymbol{\xi^1}$. The appearance of both the symmetric and the correlated region is a genuine effect of correlation and, in fact, they were also found in the classic Hopfield model with temporal correlation \cite{GriniastyTsodyksAmit-1993,Cugliandolo-1993,CugliandoloTsodyks-1994,Agliari-Dantoni}.
The ``relativistic'' nature of the model under investigation just makes these regions wider in such a way that, even at relatively small values of temperature the system may relax in a symmetric state (when $a$ is relatively small) or in a correlated state (when $a$ is relatively large).
Therefore, in order to highlight the effect of correlation, the relativistic model is more suitable than the classical model.
|
\section{Introduction}
Main purpose of this paper is twofold. First, we want to study the Bolza problem of Herglotz' type. We will emphasize on the Jacobi condition and the structure of the cut locus with respect to the associated value function. Second, we will analyze the propagation of singularities from and to non-conjugate points along smooth strict singular characteristics firstly touched in \cite{Khanin_Sobolevski2016} (see also \cite{Cannarsa_Cheng2020}).
For other variational approach of equation \eqref{eq:HJe}, see also \cite{Wang_Yan2019,Wang_Wang_Yan2017} and references therein.
We give the definition of \emph{conjugate points} and \emph{irregular points} for this Herglotz-type problem and clarify the structure of the cut locus $\bar{\Sigma}$. A very important observation (Proposition \ref{irregu non-conj pro}) is that, if $(\bar{t},\bar{x})$ is not conjugate then $u$ has a local representation as the minimum of a finite family of smooth function, i.e., there exists $r_0>0$ such that
\begin{equation}\label{eq:intro_finite_repre}
u(t,x)=\min_{i=1,\ldots,k}v_i(t,x),\quad (t,x)\in B_{r_0}((\bar{t},\bar{x}))
\end{equation}
where all $v_i's$ are of class $C^{R+1}$. This is a standing point of our sequel analysis of the propagation of singularities around a non-conjugate point.
It is well known that Hamilton-Jacobi equations have no global smooth solutions in general, because solutions may develop singularities due to crossing or focusing of characteristics. The persistence of singularities, i.e, once a singularity is created, it will propagate forward in time up to $+\infty$. The expected maximal regularity for solutions of \eqref{eq:HJe} is the local semiconcavity of $u$. See, for instance, \cite{Cannarsa_Sinestrari_book} and \cite{Villani_book2009} for more details for the notion of semiconcavity.
In the seminal paper \cite{Albano_Cannarsa2002}, Albano and Cannarsa introduced the important notion of \emph{generalized characteristics} for Hamilton-Jacobi equation \eqref{eq:HJe}, which is a keystone for the study of the problem of propagation of singularities later. In one-dimensional case, the idea of generalized characteristics also comes from earlier work by Dafermos \cite{Dafermos1977} on Burgers equation. Recall that a Lipschitz curve $\mathbf{x}:[0,T]\to\Omega$, $\mathbf{x}(0)=x_0\in\Sigma$, the set of non-differentiability of $u$, is called a generalized characteristic from $x_0$ with respect to the Hamilton-Jacobi equation
\begin{equation}
H(x,Du(x),u(x))=0,\qquad x\in\Omega,
\end{equation}
if the following differential inclusion is satisfied
\begin{equation}\label{eq:intro_gc}
\dot{\mathbf{x}}(t)\in\text{co}\,H_p(\mathbf{x}(t),D^+u(\mathbf{x}(t)),u(\mathbf{x}(t))),\quad a.e.,\ t\in[0,T].
\end{equation}
Local structure of generalized characteristics was systematically studied in \cite{Cannarsa_Yu2009}.
For any $t_2>t_1$, $x,y\in\R^n$ and $u\in\R$, we define
\begin{align*}
h_L(t_1,t_2,x,y,u):=\inf_{\xi\in\Gamma^{a,b}_{x,y}}\int^{t_2}_{t_1}L(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))\ ds,
\end{align*}
where $u_{\xi}$ is uniquely determined by the \emph{Carath\'eodory equation}
\begin{equation}\label{eq:cara2}
\begin{cases}
\dot{u}_{\xi}(s)=L(s,\xi(s),\dot{\xi}(s),u_{\xi}(s)),\quad s\in[t_1,t_2],&\\
u_{\xi}(t_1)=u.&
\end{cases}
\end{equation}
We call the function $h_L(t_1,t_2,x,y,u)$ the \emph{(negative type) fundamental solution} for the Hamilton-Jacobi equation $D_tu(t,x)+H(t,x,D_xu(t,x),u(t,x))=0$.
We denote by $u(t,x)$, $(t,x)\in(0,+\infty)\times\R^n$, the value function of Bolza problem \eqref{eq:cov}. As shown in \cite{CCJWY2020}, the value function can represented as
\begin{align*}
u(t,x)=&\,\inf_{y\in\R^n}\{u_0(y)+h_L(0,t,y,x,u_0(y))\}\\
=&\,\inf_{\xi\in\mathcal{A}_{t,x}}\left\{u_0(\xi(0))+\int^t_0L(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))\ ds\right\}
\end{align*}
where $u_{\xi}$ is determined by \eqref{eq:cara1}. Similar to the classical case, $u(t,x)$ is a viscosity solution of \eqref{eq:HJe}.
Now, we list some fundamental results on \eqref{eq:cov}, especially the regularity aspects. We collect all the proofs of these propositions in Section \ref{sec:App_A}. For any $(t,x)\in(0,+\infty)\times\R^n$, set
\begin{align*}
\mathcal{Z}_{t,x}=\{z\in\R^n: u(t,x)=u_0(z)+h_L(0,t,z,x,u_0(z))\}.
\end{align*}
\begin{Pro}\label{pro:Herglotz_Lie}
For any $(t,x)\in(0,+\infty)\times\R^n$ we have $\mathcal{Z}_{t,x}\neq\varnothing$. If $y_{t,x}\in\mathcal{Z}_{t,x}$ then there exists $\xi\in\Gamma^{0,t}_{y_{t,x},x}$ such that $\xi$ is a minimizer of \eqref{eq:cov}. Moreover, we have that
\begin{enumerate}[\rm (1)]
\item $\xi$ is of class $C^{R+1}$ and it satisfies the Herglotz' equation
\begin{equation}
\begin{split}
&\,\frac d{ds}L_v(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))\\
=&\,L_x(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))+L_u(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))L_v(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))
\end{split}
\end{equation}
on $[0,t]$ with $u_\xi$ satisfies Carath\'eodory equation \eqref{eq:cara1}.
\item Set $p(s)=L_v(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))$. Then the arc $(\xi,p,u_{\xi})$ satisfies the following Lie equation
\begin{equation}\label{eq:Lie}
\begin{cases}
\dot{\xi}=H_p(s,\xi,p,u_{\xi}),\\
\dot{p}=-H_x(s,\xi,p,u_{\xi})-H_u(s,\xi,p,u_{\xi})p,\qquad s\in[0,t],\\
\dot{u}_{\xi}=p\cdot\dot{\xi}-H(s,\xi,p,u_{\xi}).
\end{cases}
\end{equation}
\item There exists $C(t,x)>0$ such that
\begin{align*}
\max_{s\in[0,t]}\{|\xi(s)|,|\dot{\xi}(s)|,|p(s)|,|u_{\xi}(s)|\}\leqslant C(t,x).
\end{align*}
\end{enumerate}
\end{Pro}
\begin{Pro}[dynamic programming principle]\label{pro:dyn_prog}
Let $(t,x)\in(0,+\infty)\times\R^n$ and $\xi\in\mathcal{A}_{t,x}$. Then, for all $0\leqslant t'\leqslant t$,
\begin{equation}\label{eq:dpp}
u(t,\xi(t))\leqslant u(t',\xi(t'))+\int^{t}_{t'}L(s,\xi,\dot{\xi},u_{\xi})\ ds
\end{equation}
where $u_{\xi}$ satisfies \eqref{eq:cara2} on $[t',t]$ with $u=u(t',\xi(t'))$. The equality holds in \eqref{eq:dpp} if and only if $\xi$ is a minimizer of \eqref{eq:cov}.
\end{Pro}
\begin{Pro}\label{pro:D^*}
\hfill
\begin{enumerate}[\rm (1)]
\item $u(t,x)$ is a solution of \eqref{eq:HJe} in the sense of viscosity;
\item $u$ is locally Lipschitz and locally semiconcave on $(0,+\infty)\times\R^n$;
\item the following relation holds:
\begin{align*}
\mbox{\rm Ext}\,(D^+u(t,x))=D^*u(t,x)=\{(q,p)\in D^+u(t,x): q+H(t,x,p,u(t,x))=0\};
\end{align*}
\label{sec:irr_conj}
In this section, we will give the definition of the conjugate loci and analyze the structure of the cut locus for problem \eqref{eq:cov}.
\subsection{Irregular and conjugate points}
Consider the following Lie equation or characteristic system
\begin{equation}\label{eq:Lie2}
\begin{cases}
\dot{X}=H_p(t,X,P,U),\\
\dot{P}=-H_x(t,X,P,U)-H_u(t,X,P,U)P,\qquad t\geqslant0,\\
\dot{U}=P\cdot\dot{X}-H(t,X,P,U),
\end{cases}
\end{equation}
with respect to the initial condition
\begin{align*}
X(0;z)=z,\quad P(0;z)=Du_0(z),\quad U(0;z)=u_0(z),\quad z\in\R^n.
\end{align*}
By differentiating \eqref{eq:Lie2} with respect to $z$ we obtain that the triple $(X_z,P_z,U_z)$ satisfies the (linear) variational equation
\begin{equation}\label{eq:variational_eq}
\begin{cases}
\dot{X}_z=H_{px}X_z+H_{pp}P_z+H_{pu}U_z,\\
\dot{P}_z=-H_{xx}X_z-H_{xp}P_z-H_{x,u}U_z-H_uP_z-(PH_{ux})X_z-(PH_{up})P_z-(PH_{uu})U_z,\\
\dot{U}_z=P^TH_{px}X_z+P^TH_{pp}P_z+P^TH_{pu}U_z-H_xX_z-H_pP_z-H_uU_z,
\end{cases}
\end{equation}
with initial condition
\begin{align*}
X_z(0;z)=I,\quad P_z(0;z)=D^2u_0(z),\quad U_z(0;z)=\nabla u_0(z).
\end{align*}
Now, for any $z\in\R^n$ and $\theta\in\R^n\setminus\{0\}$, $X_z(0;z)\theta=\theta\not=0$. Notice $(X_z(t;z)\theta,P_z(t;z)\theta,U_z(t;z)\theta)$ satisfies an linear ODE from \eqref{eq:variational_eq}. Thus,
\begin{align*}
(X_z(t;z)\theta,P_z(t;z)\theta,U_z(t;z)\theta)\not=0,\quad\forall t\geqslant0.
\end{align*}
To simplify equation \eqref{eq:variational_eq}, we note that
\begin{equation}\label{eq:Lie_U1}
\begin{cases}
\dot{U}=L(t,X,H_p(t,X,P,U),U)=L(t,X,\dot{X},U),\quad t\geqslant0,\\
U(0,z)=u_0(z),\quad z\in\R^n.
\end{cases}
\end{equation}
By differentiating \eqref{eq:Lie_U1} with respect to $z$ we have that
\begin{align*}
\begin{cases}
\dot{U}_z=L_x^TX_z+L_v^T\dot{X}_z+L_uU_z,\\
U_z(0;z)=\nabla u_0(z).
\end{cases}
\end{align*}
One can solve the equation above to obtain
\begin{align*}
U_z(t;z)=e^{\int^t_0L_udr}\nabla u_0(z)+\int^t_0e^{\int^t_sL_u dr}(L_x^TX_z+L_v^T\dot{X}_z)ds.
\end{align*}
Recalling that from Herglotz equation we have that
\begin{align*}
\frac{d}{ds}\left\{e^{\int^t_sL_u dr}L_v^TX_z\right\}=e^{\int^t_sL_u dr}(L_x^TX_z+L_v^T\dot{X}_z).
\end{align*}
Therefore,
\begin{equation}\label{eq:solve_u}
\begin{split}
U_z(t;z)=&\,e^{\int^t_0L_udr}\nabla u_0(z)+e^{\int^t_sL_u dr}L_v^TX_z\vert^t_0\\
=&\,e^{\int^t_0L_udr}\nabla u_0(z)+L_v^T(t,X(t;z),\dot{X}(t;z),U(t;z))X_z(t;z)\\
&\quad -e^{\int^t_0L_u dr}L_v^T(0,X(0;z),\dot{X}(0;z),U(0;z))X_z(0;z)\\
=&\,e^{\int^t_0L_udr}\nabla u_0(z)+P^T(t;z)X_z(t;z)-e^{\int^t_0L_udr}\nabla u_0(z)\\
=&\,P^T(t;z)X_z(t;z).
\end{split}
\end{equation}
So, if $\det X_z(t;z)=0$, then there exists $\theta\in\R^n\setminus\{0\}$ such that $X_z(t;z)\theta=0$. It follows $U_z(t;z)\theta=P^T(t;z)X_z(t;z)\theta=0$. This leads to the fact that $P_z(t;z)\theta\not=0$.
Now we can introduce some notions from calculus of variation in the contact case.
\begin{defn}[irregular point and conjugate point]\hfill
\begin{enumerate}[\rm (1)]
\item $(t,x)\in(0,+\infty)\times\R^n$ is called \emph{regular} if problem \eqref{eq:cov} admits a unique solution. Otherwise, we say $(t,x)$ is \emph{irregular}.
\item $(t,x)$ is called \emph{a conjugate point} if there exists $z\in\R^n$ such that $X(t;z)=x$, $X$ is minimizer of \eqref{eq:cov} and $\det X_z(t;z)=0$.
\item The set of all irregular points and conjugate points for problem \eqref{eq:cov} are denoted by $\Sigma$ and $\Gamma$ respectively.
\end{enumerate}
\end{defn}
\begin{Rem}
From Proposition \ref{pro:1-1}, the set $\Sigma$ is exactly $\SING$, the set of points at which $u$ is non-differentiable.
\end{Rem}
\subsection{Structural analysis of cut locus}
\begin{Pro}
For any $(t,x)\in(0,+\infty)\times\R^n$, let $\widetilde{\mathcal{Z}}(t,x)=\{z\in\R^n: X(t;z)=x)\}$. Then
\begin{align*}
u(t,x)=&\,\min\{U(t;z): z\in\widetilde{\mathcal{Z}}(t,x)\},\\
\mathcal{Z}(t,x)=&\,\{z\in\widetilde{\mathcal{Z}}(t,x): U(t;z)=u(t;z)\}.
\end{align*}
\end{Pro}
\begin{proof}
Proposition \ref{pro:Herglotz_Lie} and \ref{pro:sensitive} shows any minimizer $\xi:[0,t]\to\R^{n}$ for $u(t,x)$ is a solution of \eqref{eq:Lie} and there hold $u_{\xi}(0)=u_{0}(\xi(0))$, $p(0)=Du_{0}(\xi(0))$. Thus, we know that $\xi(\cdot)=X(\cdot,\xi(0))$ and $u_{\xi}(\cdot)=U(\cdot,\xi(0))$, which imply $\xi(0)\in\widetilde{\mathcal{Z}}(t,x)$ and $u(t,x)=u_{\xi}(t)=U(t,\xi(0))$. On the other hand, for any $z\in\widetilde{\mathcal{Z}}(t,x)$, we have
\begin{align*}
U(t,z)=u_{0}(z)+\int_{0}^{t}L(s,X(s,z),\dot{X}(s,z),U(s,z))\geqslant u(t,x).
\end{align*}
This leads to our conclusion.
\end{proof}
Now, let $(t,x)\in(0,+\infty)\times\R^n$ and $\xi$ is a minimizer of \eqref{eq:cov}. Given a Lipschitz curve $\alpha:[0,t]\to\R^n$ with $\alpha(t)=0$, we note that $\xi^{\varepsilon}=\xi+\varepsilon\alpha\in\mathcal{A}_{t,x}$ for any $\varepsilon\in[-1,1]$. Then the Carath\'eodory equation with respect to $\xi^{\varepsilon}$ is
\begin{align*}
\begin{cases}
\dot{u}_{\xi^{\varepsilon}}=L(s,\xi^{\varepsilon},\dot{\xi}^{\varepsilon},u_{\xi^{\varepsilon}}),\quad a.e., s\in[0,t],\\
u_{\xi^{\varepsilon}}(0)=u_0(\xi^{\varepsilon}(0)).
\end{cases}
\end{align*}
By differentiating with respect to $\varepsilon$ we have
\begin{equation}\label{eq:diff1}
\begin{cases}
\frac{\partial}{\partial\varepsilon}\dot{u}_{\xi^{\varepsilon}}=L^T_x(s,\xi^{\varepsilon},\dot{\xi}^{\varepsilon},u_{\xi^{\varepsilon}})\cdot\alpha+L^T_v(s,\xi^{\varepsilon},\dot{\xi}^{\varepsilon},u_{\xi^{\varepsilon}})\cdot\dot{\alpha}+L_u(s,\xi^{\varepsilon},\dot{\xi}^{\varepsilon},u_{\xi^{\varepsilon}})\frac{\partial}{\partial\varepsilon}u_{\xi^{\varepsilon}},\\
\frac{\partial}{\partial\varepsilon}u_{\xi^{\varepsilon}}(0)=\nabla u_0(\xi^{\varepsilon}(0))\cdot\alpha(0).
\end{cases}
\end{equation}
Similar to \eqref{eq:solve_u} we can solve the equation above to obtain
\begin{align*}
\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}(s)=L^T_v(s,\xi(s),\dot{\xi}(s),u_{\xi}(s))\cdot\alpha(s),\quad s\in[0,t].
\end{align*}
In particular,
\begin{align*}
\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}(t)=0.
\end{align*}
Differentiating \eqref{eq:diff1} again at $\varepsilon=0$ leads to
\begin{align*}
\begin{cases}
\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}\dot{u}_{\xi^{\varepsilon}}=\alpha^TL_{xx}\alpha+\alpha^TL_{xv}\dot{\alpha}+\alpha^TL_{xu}\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}\\
\hskip 2.5 cm +\dot{\alpha}^TL_{vx}\alpha+\dot{\alpha}^TL_{vv}\dot{\alpha}+\dot{\alpha}^TL_{vu}\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}\\
\hskip 2.5 cm +L_{ux}\alpha\cdot\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}+L_{uv}\dot{\alpha}^T\cdot\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}+L_{uu}\left(\frac{\partial}{\partial\varepsilon}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}\right)^2+L_u\cdot\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}},\\
\hskip 1.8 cm =\alpha^T(L_{xx}+2L_{xu}L^T_v+L_vL_{uu}L^T_v)\alpha+2\alpha^T(L_{xv}+L_vL_{uv})\dot{\alpha}+\dot{\alpha}^TL_{vv}\dot{\alpha}+L_u\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}\\
\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}(0)=\alpha^T(0)D^2u_0(\xi(0))\alpha(0).
\end{cases}
\end{align*}
Solving the ODE above we obtain
\begin{align*}
&\,\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}(s)\\
=&\,e^{\int^s_0L_udr}\alpha^T(0)D^2u_0(\xi(0))\alpha(0)\\
&\quad +\int^s_0e^{\int^s_{\tau}L_udr}\{\alpha^T(L_{xx}+2L_{xu}L^T_v+L_vL_{uu}L^T_v)\alpha+2\alpha^T(L_{xv}+L_vL_{uv})\dot{\alpha}+\dot{\alpha}^TL_{vv}\dot{\alpha}\}\ d\tau
\end{align*}
for all $s\in[0,t]$. Define
\begin{align*}
J^*(\alpha)=\frac{\partial^2}{\partial\varepsilon^2}\Big\vert_{\varepsilon=0}u_{\xi^{\varepsilon}}(t).
\end{align*}
Obviously $J^*(\alpha)\geqslant0$ since $\xi$ is a minimizer of \eqref{eq:cov}.
Observe that, for a new Lagrangian
\begin{align*}
&\,\tilde{L}(s,\alpha,\dot{\alpha},u)\\
=&\,\alpha^T(L_{xx}+2L_{xu}L^T_v+L_vL_{uu}L^T_v)\alpha+2\alpha^T(L_{xv}+L_vL_{uv})\dot{\alpha}+\dot{\alpha}^TL_{vv}\dot{\alpha}+L_u\cdot u.
\end{align*}
$\tilde{L}$ satisfies all of conditions in (L1)-(L4) except for the fact that $\tilde{L}$ is only continuous in the time variable. We can not directly apply the results from \cite{CCJWY2020} to guarantee the $C^1$-regularity of the minizers of $J^*$.
\begin{Lem}\label{mini c1}
Suppose $\alpha:[0,t]\to \R^{n},\alpha(t)=0$ is a Lipschitz curve. If $J^{*}(\alpha)=\inf\{J^{*}(\gamma)|\gamma:[0,t]\to \R^{n},\gamma(t)=0 \text{ is a Lipschitz curve}\}$, we have $\alpha\in C^{1}([0,t],\R^{n})$.
\end{Lem}
\begin{proof}
Notice that $\tilde{L}$ satisfies conditions (L1)-(L3) and (L4') in \cite{CCJWY2020} and $\alpha$ is a minimizer for $J^*$. Therefore, the results in \cite{CCJWY2020} implies that $\alpha$ is of class $C^1$.
\end{proof}
\begin{Pro}\label{mini int regu non-conj}
Suppose $(t,x)\in (0,\infty)\times \R^{n},\ z_{0}\in\mathcal{Z}(t,x)$. Then $(s,X(s,z_{0}))\notin\Sigma\cup\Gamma$ for all $s\in(0,t)$.
\end{Pro}
\begin{proof}
Fix any $\bar{s}\in (0,t)$. Proposition \ref{pro:D^*} (4) implies $(\bar{s},X(\bar{s},z_{0}))\notin \Sigma$ and we prove $(\bar{s},X(\bar{s},z_{0}))\notin \Gamma$ by contradiction.
If $(\bar{s},X(\bar{s},z_{0}))\in \Gamma$, then there exists $\theta\in \R^{n}\setminus \{0\}$ such that $X_{z}(\bar{s},z_{0})\theta=0$. By \eqref{eq:solve_u} there holds $U_{z}(\bar{s},z_{0})\theta=0$ and $P_{z}(\bar{s},z_{0})\theta\neq 0$. Let
\begin{align*}
\alpha(s)=
\begin{cases}
X_{z}(s,z_{0})\theta,& s\in[0,\bar{s}],\\
0,& s\in[\bar{s},t].
\end{cases}
\end{align*}
Then $\alpha$ is a Lipschitz curve, $\alpha(0)=\theta,\alpha(t)=0,\dot{\alpha}^{+}(\bar{s})=0$ and
\begin{align*}
\dot{\alpha}^{-}(\bar{s})=\dot{X}_{z}(\bar{s},z_{0})\theta=H_{px}X_{z}(\bar{s},z_{0})\theta+H_{pp}P_{z}(\bar{s},z_{0})\theta+H_{pu}U_{z}(\bar{s},z_{0})\theta
=H_{pp}P_{z}(\bar{s},z_{0})\theta \neq 0.
\end{align*}
So we have $\alpha\notin C^{1}([0,t],\R^{n})$.
On the other hand, by previous computation we obtain
\begin{align*}
&J^{*}(\alpha)=e^{\int_{0}^{t}L_{u} dr}\theta^{T}D^{2}u_{0}(z_{0})\theta
+e^{\int_{0}^{t}L_{u} dr}\int_{0}^{\bar{s}}e^{-\int_{0}^{s}L_{u} dr}[\theta^{T}X_{z}^{T}(L_{xx}+2L_{xu}L_{v}^{T}+L_{v}L{uu}L_{v}^{T})X_{z}\theta\\
&+2\theta^{T}X_{z}^{T}(L_{xv}+L_{v}L_{uv})\dot{X}_{z}\theta+\theta^{T}\dot{X}_{z}^{T}L_{vv}\dot{X}_{z}\theta] ds.
\end{align*}
Notice
\begin{align*}
\begin{cases}
\frac{\partial}{\partial z}L_{x}=L_{xx}X_{z}+L_{xv}\dot{X}_{z}+L_{xu}L_{v}^{T}X_{z}\\
\frac{\partial}{\partial z}L_{v}=L_{vx}X_{z}+L_{vv}\dot{X}_{z}+L_{vu}L_{v}^{T}X_{z},\ t\in[0,\infty),z\in\R^{n}\\
\frac{\partial}{\partial z}L_{u}=L_{ux}X_{z}+L_{uv}\dot{X}_{z}+L_{uu}L_{v}^{T}X_{z},
\end{cases}
\end{align*}
It follows that
\begin{equation*}
\begin{split}
J^{*}(\alpha)=&e^{\int_{0}^{t}L_{u} dr}\theta^{T}[D^{2}u_{0}(z_{0})\\
&+\int_{0}^{\bar{s}}e^{-\int_{0}^{s}L_{u} dr}(X_{z}^{T}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{x}+\dot{X}_{z}^{T}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{v}+X_{z}^{T}L_{v}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{u})ds]\theta\\
=&e^{\int_{0}^{t}L_{u} dr}\theta^{T}[D^{2}u_{0}(z_{0})+\int_{0}^{\bar{s}}e^{-\int_{0}^{s}L_{u} dr}(\frac{d}{ds}(X_{z}^{T}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{v})-L_{u}X_{z}^{T}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{v})ds]\theta\\
=&e^{\int_{0}^{t}L_{u} dr}\theta^{T}[D^{2}u_{0}(z_{0})+(e^{-\int_{0}^{s}L_{u} dr}X_{z}^{T}\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{v})\Big\vert_{s=0}^{s=\bar{s}}]\theta\\
=&e^{\int_{0}^{t}L_{u} dr}\theta^{T}[D^{2}u_{0}(z_{0})+0-X_{z}^{T}(0,z_{0})\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}L_{v}(0,X(0,z),\dot{X}(0,z),U(0,z))]\theta\\
=&e^{\int_{0}^{t}L_{u} dr}\theta^{T}[D^{2}u_{0}(z_{0})-\frac{\partial}{\partial z}\Big\vert_{z=z_{0}}Du_{0}(z)]\theta\\
=&0.
\end{split}
\end{equation*}
Recalling the fact that for any Lipschitz curve $\gamma:[0,t]\to\R^{n}$ with $\gamma(t)=0$, we have $J^{*}(\gamma)\geqslant 0$. Then by Lemma \ref{mini c1}, we conclude that $\alpha\in C^{1}([0,t],\R^{n})$. This leads to a contradiction. Therefore, $(\bar{s},X(\bar{s},z_{0}))\notin \Gamma$.
\end{proof}
\begin{Pro}\label{t small regu non-conj}
For any $\bar{z}\in \R^{n}$, there exists $r_{\bar{z}}>0$ and $t_{\bar{z}}>0$ such that $([0,t_{\bar{z}}]\times B_{r_{\bar{z}}}(\bar{z}))\cap(\Sigma\cup\Gamma)=\varnothing$.
\end{Pro}
\begin{proof}
Let $\phi:[0,\infty)\times\R^{n}\to[0,\infty)\times\R^{n},\ (t,z)\to(t,X(t,z))$. Then $\phi$ is of class $C^{R}$ and $X_{z}(0,z)=Id,\ \forall z\in\R^{n}$. By the inverse function theorem, there exists $t'_{\bar{z}}>0$ and $r_{\bar{z}}>0$ such that $\phi$ is a $C^{R}$ diffeomorphism on $[0,t'_{\bar{z}}]\times B_{2r_{\bar{z}}}(\bar{z})$. Let $t_{\bar{z}}=\min\{t'_{\bar{z}},\frac{r_{\bar{z}}}{C(t'_{\bar{z}},|\bar{z}|+r_{\bar{z}})}\}$, where $C$ is defined in Proposition \ref{pro:Herglotz_Lie} (3). Now fix any $(t,x)\in [0,t_{\bar{z}}]\times B_{r_{\bar{z}}}(\bar{z})$. If $z\in \mathcal{Z}(t,x)$, we have $|z-\bar{z}| \leqslant |z-x|+|x-\bar{z}| \leqslant t_{\bar{z}}C(t,_{\bar{z}},|\bar{z}|+r_{\bar{z}})+r_{\bar{z}} \leqslant r_{\bar{z}}+r_{\bar{z}} = 2r_{\bar{z}}$, that is $\mathcal{Z}(t,x)\subset B_{2r_{\bar{z}}}(\bar{z})$. This implies $\mathcal{Z}(t,x)=z(t,x)$ is a singleton and $X_{z}(t,z(t,x))$ is invertible. Therefore $(t,x)\notin \Sigma\cup\Gamma$. In conclusion, $([0,t_{\bar{z}}]\times B_{r_{\bar{z}}}(\bar{z}))\cap(\Sigma\cup\Gamma)=\varnothing$.
\end{proof}
\begin{Pro}\label{regu non-conj pro}
Suppose $(\bar{t},\bar{x})\in (0,\infty)\times \R^{n},\ (\bar{t},\bar{x})\notin \Sigma\cup\Gamma$ and $\mathcal{Z}(\bar{t},\bar{x})=\bar{z}$. Then there exists a neighborhood $W$ of $(\bar{t},\bar{z})$ and a neighborhood $N$ of $(\bar{t},\bar{x})$ such that $\phi:W\to N,\ (t,z)\to(t,X(t,z))$ is a $C^{R}$ diffeomorphism and we have:
\begin{enumerate}[\rm (1)]
\item For any $(t,x)\in N$, $\mathcal{Z}(t,x)=\Pi_{z}(\phi^{-1}(t,x))$ is a singleton, i.e., $N\cap(\Sigma\cup\Gamma)=\varnothing$.
\item For all $(t,x)\in N$,
\begin{align*}
u(t,x)=&\,U(\phi^{-1}(t,x)),\\
\nabla u(t,x)=&\,P(\phi^{-1}(t,x)),\\
u_{t}(t,x)=&\,-H(t,x,P(\phi^{-1}(t,x)),U(\phi^{-1}(t,x))).
\end{align*}
Moreover, $u\in C^{R+1}(N,\R)$.
\end{enumerate}
\end{Pro}
\begin{proof}
$(\bar{t},\bar{x})\notin \Sigma\cup\Gamma$ implies $X_{z}(\bar{t},\bar{z})$ is non-degenerate. By the inverse function theorem, we know that there exists a neighborhood $W$ of $(\bar{t},\bar{z})$ and a neighborhood $N$ of $(\bar{t},\bar{x})$, such that $\phi:W\to N,\ (t,z)\to(t,X(t,z))$ is a $C^{R}$ diffeomorphism.
By Proposition \ref{pro:approx} (2), we can choose $N$ small enough such that for any $(t,x)\in N,\ \mathcal{Z}(t,x)=\Pi_{z}(\phi^{-1}(t,x))=z(t,x)$ is a singleton. That is, $N\cap(\Sigma\cup\Gamma)=\varnothing$. This completes the proof of (1).
It follows from (1) that $u(t,x)=U(\phi^{-1}(t,x))$ and $\nabla u(t,x)=P(\phi^{-1}(t,x)),\ \forall (t,x)\in N$. Then by Proposition \ref{pro:D^*} (1), we have $u_{t}(t,x)=-H(t,x,P(\phi^{-1}(t,x)),U(\phi^{-1}(t,x)))$. Therefore, $\nabla u(t,x)$ and $u_{t}(t,x)$ are of class $C^{R}$, which implies $u\in C^{R+1}(N,\R)$.
\end{proof}
\begin{Cor}\label{regu non-conj cor}
$\Sigma\cup\Gamma$ is a closed set, and $u$ is of class $C^{R+1}$ on $(\Sigma\cup\Gamma)^{c}$.
\end{Cor}
\begin{Pro}\label{non-conj Z finite}
Suppose $(t,x)\in (0,\infty)\times\R^{n},\ (t,x)\notin\Gamma$. Then $\mathcal{Z}(t,x)$ and $D^{*}u(t,x)$ are finite sets.
\end{Pro}
\begin{proof}
For any $\bar{z}\in \mathcal{Z}(t,x)$, $X_{z}(t,\bar{z})$ is non-degenerate. Then there exists a neighborhood $V$ of $\bar{z}$ such that $X(t,z)\neq x,\ \forall z\in V$. This implies $\mathcal{Z}(t,x)$ consists of isolated points. On the other hand, by Proposition \ref{pro:Herglotz_Lie} (3), $\mathcal{Z}(t,x)$ is bounded. Therefore, $\mathcal{Z}(t,x)$ is a finite set. Combing this with Proposition \ref{pro:1-1}, we conclude that $D^{*}u(t,x)$ is also a finite set.
\end{proof}
\begin{Pro}\label{irregu non-conj pro}
Suppose $(\bar{t},\bar{x})\in (0,\infty)\times \R^{n}$, $(\bar{t},\bar{x})\in\Sigma\setminus \Gamma$. By Proposition \ref{non-conj Z finite}, we let $\mathcal{Z}(t,x)=\{z_{1},z_{2},\cdots,z_{k}\},k\geqslant 2$. Then there exist neighborhoods $W_{i}$ of $(\bar{t},z_{i})$ and a neighborhood $N$ of $(\bar{t},\bar{x})$ such that $\phi_{i}:W_{i}\to N$, $(t,z)\to(t,X(t,z))$, $i=1,2,\ldots,k$ are all $C^{R}$ diffeomorphisms and we have:
\begin{enumerate}[\rm (1)]
\item $W_{i}\cap W_{j}=\varnothing$ and $P(W_{i})\cap P(W_{j})=\varnothing$ for all $i,j\in\{1,2,\ldots,k\}$, $i\neq j$.
\item Let $v_{i}(t,x)=U(\phi_{i}^{-1}(t,x))$, $(t,x)\in N$, $i=1,2,\ldots,k$. Then $v_{i}\in C^{R+1}(N,\R)$ and
\begin{align*}
\nabla v_{i}(t,x)=&\,P(\phi_{i}^{-1}(t,x)),\\
\frac{\partial}{\partial t}v_{i}(t,x)=&\,-H(t,x,P(\phi_{i}^{-1}(t,x)),U(\phi_{i}^{-1}(t,x)))
\end{align*}
for all $(t,x)\in N$, $i=1,2,\ldots,k$.
\item We have that $u(t,x)=\min_{1\leqslant i\leqslant k}\{v_{i}(t,x)\}$ and
\begin{align*}
\mathcal{Z}(t,x)=&\,\{\Pi_{z}(\phi_{i}^{-1}(t,x)): v_{i}(t,x)=u(t,x), 1\leqslant i\leqslant k\}\\
D^{*}u(t,x)=&\,\{(\frac{\partial}{\partial t}v_{i}(t,x),\nabla v_{i}(t,x)): v_{i}(t,x)=u(t,x), 1\leqslant i\leqslant k\}
\end{align*}
for all $(t,x)\in N$. Moreover, $N\cap\Gamma=\varnothing$.
\item $N\cap\Sigma$ is contained in a finite union of $n$-dimensional hypersurfaces of class $C^{R+1}$.
\end{enumerate}
\end{Pro}
\begin{proof}
$(\bar{t},\bar{x})\notin(\Sigma\cup\Gamma)$ implies that $X_{z}(\bar{t},z_{i}),\ i=1,2,\cdots,k$ are non-degenerate. By the inverse function theorem, we know that there exist neighborhoods $W_{i}$ of $(\bar{t},z_{i})$ and a neighborhood $N$ of $(\bar{t},\bar{x})$ such that $\phi_{i}:W_{i}\to N,\ (t,z)\to(t,X(t,z)),\ i=1,2,\cdots,k$ are $C^{R}$ diffeomorphisms.
By Proposition \ref{pro:1-1}, $(-H(\bar{t},\bar{x},P(\bar{t},z_{i}),u(\bar{t},\bar{x})),P(\bar{t},z_{i}))$, $1\leqslant i\leqslant k$, are all different. This implies $P(\bar{t},z_{i})\neq P(\bar{t},z_{j}),\ i\neq j$. Therefore, by taking $N$ sufficiently small, we can make $W_{i}\cap W_{j}=\varnothing$ and $P(W_{i})\cap P(W_{j})=\varnothing$ for all $i,j\in\{1,2,\cdots,k\}$, $i\neq j$. This completes the proof of (1)
In fact, $v_{i}$ can be seen as a solution of \eqref{eq:cov} when $\xi(0)$ is limited in $W_{i}$. In this sense, $v_{i}$ is regular and non-conjugate on $N$, $1\leqslant i\leqslant k$. Then the conclusion in (2) is a direct consequence of Proposition \ref{regu non-conj pro}.
Now we turn to the proof of (3). By Proposition \ref{pro:approx} (2), we can choose $N$ small enough such that $\mathcal{Z}(t,x)\subset\bigcup_{i=1}^{k}W_{i}$ for all $(t,x)\in N$. Then we have $u(t,x)=\min_{1\leqslant i\leqslant k}\{v_{i}(t,x)\}$ and $\mathcal{Z}(t,x)=\{\Pi_{z}(\phi_{i}^{-1}(t,x)): v_{i}(t,x)=u(t,x), 1\leqslant i\leqslant k\}$ for all $(t,x)\in N$, which also implies $N\cap\Gamma=\varnothing$. Combing this with Proposition \ref{pro:1-1} and (2), we obtain $D^{*}u(t,x)=\{(\frac{\partial}{\partial t}v_{i}(t,x),\nabla v_{i}(t,x)): v_{i}(t,x)=u(t,x), 1\leqslant i\leqslant k\}$ for all $(t,x)\in N$.
Finally, we can shrink $N$ again such that for any $i=1,2,\cdots,k$ and $(t,z)\in W_{i}$, $X_{z}(t,z)$ is non-degenerate, which implies $N\cap\Gamma=\varnothing$. When $i\neq j$, we have $v_{i}(\bar{t},\bar{x})=v_{j}(\bar{t},\bar{x})=u(\bar{t},\bar{x})$ and $Dv_{i}(\bar{t},\bar{x})-Dv_{j}(\bar{t},\bar{x})\neq 0$. By the implicit function theorem, we can take $N$ sufficiently small such that $\{(t,x)\in N: v_{i}(t,x)=v_{j}(t,x)\}$, $i\neq j$, are all $n$-dimensional hyper-surfaces of class $C^{R+1}$. Notice that for any $(t',x')\in N\cap\Sigma$, there exists $i\neq j$ such that $(t',x')\in\{(t,x)\in N: v_{i}(t,x)=v_{j}(t,x)\}$. Therefore, $N\cap\Sigma$ is contained in a finite union of n-dimensional hyper-surfaces of class $C^{R+1}$. This completes the proof of (4).
\end{proof}
\begin{Cor}\label{cor:conj closed}
$\Gamma$ is a closed set.
\end{Cor}
\begin{proof}
Indeed, $\Gamma^{c}=(\Sigma\cup\Gamma)^{c}\cup(\Sigma\setminus\Gamma)$. Choose any $(t,x)\in\Gamma^{c}$. If $(t,x)\in(\Sigma\cup\Gamma)^{c}$, by Proposition 3.7 (1), there exists a neighborhood $N$ of $(t,x)$ such that $N\subset (\Sigma\cup\Gamma)^{c}\subset \Gamma^{c}$. If $(t,x)\in\Sigma\setminus\Gamma$, Proposition \ref{irregu non-conj pro} (3) implies there exists a neighborhood $N'$ of $(t,x)$ such that $N'\subset\Gamma^{c}$. Therefore, $\Gamma^{c}$ is open, that is, $\Gamma$ is closed.
\end{proof}
\begin{Pro}
Suppose $(t_{0},x_{0})\in\Sigma\cup\Gamma$. Let $M=C(t_{0}+1,|x_{0}|+1)$, $h=\min\{1,M^{-1}\}$, where $C$ is defined in Proposition \ref{pro:Herglotz_Lie} (3). Then for any $\varepsilon\in(0,h]$, there exists $x_{\varepsilon}\in B_{\varepsilon M}(x_{0})$ such that $(t_{0}+\varepsilon,x_{\varepsilon})\in\Sigma$.
\end{Pro}
\begin{proof}
We prove it by contradiction. If there exists $\varepsilon_{0}\in(0,h]$ such that $(t_{0}+\varepsilon_{0},x)\notin\Sigma,\ \forall x\in B_{\varepsilon_{0}M}(x_{0})$, then by semiconcavity of $u$, $Du(t_{0}+\varepsilon_{0},x)$ exists for all $x\in B_{\varepsilon_{0}M}(x_{0})$ and is continuous with $x$ on $B_{\varepsilon_{0}M}(x_{0})$. For $x\in B_{\varepsilon_{0}M}(x_{0})$, let $\bar{X}(t,x),\bar{P}(t,x),\bar{U}(t,x),t\in[0,t_{0}+\varepsilon_{0}]$ be the solution of \eqref{eq:Lie2} with terminal condition
\begin{align*}
\begin{cases}
\bar{X}(t_{0}+\varepsilon_{0},x)=x\\
\bar{P}(t_{0}+\varepsilon_{0},x)=Du(t_{0}+\varepsilon_{0},x)\\
\bar{U}(t_{0}+\varepsilon_{0},x)=u(t_{0}+\varepsilon_{0},x).
\end{cases}
\end{align*}
Then $\bar{X},\bar{P},\bar{U}$ is continuous with $(t,x)$ and for any $x\in B_{\varepsilon_{0}M}(x_{0})$, $\bar{X}(\cdot,x):[0,t_{0}+\varepsilon_{0}]\to\R^{n}$ is the unique minimizer for $u(t_{0}+\varepsilon_{0},x)$.
Let $\Lambda(x)=x_{0}-\bar{X}(t_{0},x)+x,\ x\in B_{\varepsilon_{0}M}(x_{0})$. Then $\Lambda(x)$ is continuous with $x$, and when $|x-x_{0}|\leqslant \varepsilon_{0}M$, we have $|\Lambda(x)-x_{0}|=|x-\bar{x}(t_{0},x)|=|\bar{x}(t_{0}+\varepsilon_{0},x)-\bar{x}(t_{0},x)|\leqslant\varepsilon_{0}M$. By Brouwer's fixed point theorem, there exists $x_{\varepsilon_{0}}$ such that $\Lambda(x_{\varepsilon_{0}})=x_{\varepsilon_{0}}$, that is $\bar{X}(t_{0},x_{\varepsilon_{0}})=x_{0}$. This implies $(t_{0},x_{0})\notin\Sigma\cup\Gamma$ by Proposition \ref{mini int regu non-conj} and leads to a contradiction with $(t_{0},x_{0})\in\Sigma\cup\Gamma$. Therefore, for any $\varepsilon\in(0,h]$, there exists $x_{\varepsilon}\in B_{\varepsilon M}(x_{0})$ such that $(t_{0}+\varepsilon,x_{\varepsilon})\in\Sigma$.
\end{proof}
\begin{Cor}
$\Sigma\cup\Gamma=\bar{\Sigma}$.
\end{Cor}
\begin{Pro}
Suppose $(t_{0},x_{0})\in\Gamma$ and $z_{0}\in\mathcal{Z}(t_{0},x_{0})$ such that $X_{z}(t_{0},x_{0})$ is degenerate. Then
\begin{enumerate}[\rm (1)]
\item $\lim_{t\to t_{0}^{-}}\|\nabla^{2}u(t,X(t,z_{0}))\|=+\infty$.
\item If in addition $(t_{0},x_{0})\in\Gamma\setminus \Sigma$ and $\{x_{i}\},\{p_{i}\}$ satisfy $\lim_{i\to \infty}x_{i}=x_{0}$, $\lim_{i\to \infty}\frac{x_{i}-x_{0}}{|x_{i}-x_{0}|}=v\notin\mbox{\rm Im}\,X_{z}(t_{0},z_{0})$ and $(-H(t_{0},x_{i},p_{i},u(t_{0},x_{i})),p_{i})\in D^{*}u(t_{0},x_{i})$. Then we have
\begin{align*}
\lim_{i\to \infty}\left|\frac{p_{i}-p_{0}}{x_{i}-x_{0}}\right|=+\infty.
\end{align*}
\end{enumerate}
\end{Pro}
\begin{proof}
By Proposition \ref{mini int regu non-conj} and Proposition \ref{regu non-conj pro}, we know that for any $\varepsilon\in(0,t_{0})$, there exists $r_{\varepsilon}>0$ such that:
\begin{align*}
P(t,z)=\nabla u(t,X(t,z)),\ \forall (t,z)\in [0,t_{0}-\varepsilon]\times B_{r_{\varepsilon}}(z_{0}).
\end{align*}
It follows that
\begin{align*}
P_{z}(t,z)=\nabla^{2} u(t,X(t,z))X_{z}(t,z),\ \forall (t,z)\in [0,t_{0}-\varepsilon]\times B_{r_{\varepsilon}}(z_{0}).
\end{align*}
Since $\varepsilon$ is arbitrary, we obtain that
\begin{align*}
P_{z}(t,z_{0})=\nabla^{2} u(t,X(t,z_{0}))X_{z}(t,z_{0}),\ \forall t\in[0,t_{0}).
\end{align*}
Because $X_{z}(t_{0},x_{0})$ is degenerate, there exists $\theta\in\R^{n}\setminus \{0\}$ such that $X_{z}(t_{0},z_{0})\theta=0$, which implies $P_{z}(t_{0},z_{0})\theta\neq0$. And we have
\begin{align*}
P_{z}(t,z_{0})\theta=\nabla^{2} u(t,X(t,z_{0}))X_{z}(t,z_{0})\theta,\ \forall t\in[0,t_{0}).
\end{align*}
Therefore,
\begin{align*}
\lim_{t\to t_{0}^{-}}\|\nabla^{2}u(t,X(t,z_{0}))\| \geqslant \lim_{t\to t_{0}^{-}}\left|\frac{P_{z}(t,z_{0})\theta}{X_{z}(t,z_{0})\theta}\right| =+\infty.
\end{align*}
Now, we turn to the proof of (2). By Proposition \ref{pro:1-1}, there exists $z_{i}\in\mathcal{Z}(t_{0},x_{i})$ such that $P(t_{0},z_{i})=p_{i},\ i=1,2,\cdots$. Proposition \ref{pro:approx} (2) implies $\lim_{i\to \infty}z_{i}=z_{0}$. For any subsequence $\{z_{i'}\}$ of $\{z_{i}\}$, there exists a sub-subsequence $\{z_{i_{k}}\}$ such that $\lim_{k\to\infty}\frac{z_{i_{k}}-z_{0}}{|z_{i_{k}}-z_{0}|}=\nu\in\R^{n}\setminus \{0\}$. Now we have
\begin{align*}
&p_{i_{k}}-p_{0}=P(t_{0},z_{i_{k}})-P(t_{0},z_{0})=P_{z}(t_{0},z_{0})(z_{i_{k}}-z_{0})+o(|z_{i_{k}}-z_{0}|)\\
&x_{i_{k}}-x_{0}=X(t_{0},z_{i_{k}})-X(t_{0},z_{0})=X_{z}(t_{0},z_{0})(z_{i_{k}}-z_{0})+o(|z_{i_{k}}-z_{0}|),\\
\end{align*}
for $k=1,2,\ldots$. It follows that
\begin{align*}
&\frac{p_{i_{k}}-p_{0}}{|z_{i_{k}}-z_{0}|}=P_{z}(t_{0},z_{0})\frac{z_{i_{k}}-z_{0}}{|z_{i_{k}}-z_{0}|}+o(1)\\
&\frac{x_{i_{k}}-x_{0}}{|z_{i_{k}}-z_{0}|}=X_{z}(t_{0},z_{0})\frac{z_{i_{k}}-z_{0}}{|z_{i_{k}}-z_{0}|}+o(1),\quad k=1,2,\ldots.
\end{align*}
Notice that if $X_{z}(t_{0},z_{0})\nu=\theta\neq0$, then $v=\lim_{k\to\infty}\frac{x_{i_{k}}-x_{0}}{|x_{i_{k}}-x_{0}|}=\frac{\theta}{|\theta|}\in \mbox{\rm Im}\,X_{z}(t_{0},z_{0})$, which leads to a contradiction. So we have $X_{z}(t_{0},z_{0})\nu=0$. This implies $\lim_{k\to\infty}\frac{x_{i_{k}}-x_{0}}{|z_{i_{k}}-z_{0}|}=0$ and $\lim_{k\to\infty}\frac{p_{i_{k}}-p_{0}}{|z_{i_{k}}-z_{0}|}=P_{z}(t_{0},z_{0})\nu\neq0$. Therefore,
\begin{align*}
\lim_{k\to\infty}\frac{|p_{i_{k}}-p_{0}|}{|x_{i_{k}}-x_{0}|}=\lim_{k\to\infty}\frac{|p_{i_{k}}-p_{0}|}{|z_{i_{k}}-z_{0}|}\cdot\frac{|z_{i_{k}}-z_{0}|}{|x_{i_{k}}-x_{0}|}
=|P_{z}(t_{0},z_{0})\nu|\cdot+\infty=+\infty.
\end{align*}
Since $\{z_{i'}\}$ is arbitrary, we obtain that $\lim_{i\to \infty}|\frac{p_{i}-p_{0}}{x_{i}-x_{0}}|=+\infty$.
\end{proof}
\begin{Pro}
$\mu(\Sigma)=\mu(\Gamma)=0$, where $\mu(\cdot)$ denotes the Lebesgue's measure of a subset of $\R^{n+1}$.
\end{Pro}
\begin{proof}
$u\in\mbox{\rm SCL}_{loc}\,((0,+\infty]\times\R^{n})$ implies $\mu(\Sigma)=0$. Fix any $t\in(0,+\infty)$, $X(t,\cdot)$ is a $C^{R}$ map on $\R^{n}$. By Sard's Theorem, we have $\mu(\{X(t,z)|z\in\R^{n},\det{X_{z}(t,z)}=0\})=0$. Using Fubini's Theorem, we know that $\mu(\{X(t,z)|(t,z)\in(0,+\infty)\times\R^{n},\det{X_{z}(t,z)}=0\})=0$. Therefore, $\mu(\Gamma)=0$.
\end{proof}
In this section, we will analyze the local structure of strict singular characteristics from and to a non-conjugate point. This approach gives us more information on the propagation of singularities especially with geometric intuition.
Recall some basic notions from convex analysis. For any compact convex subset $K$ of $\R^n$ and $\theta\in\R^n\setminus\{0\}$, the \emph{exposed face of $K$ in direction $\theta$} is the set
\begin{align*}
\text{epf}\,(K,\theta)=\{x\in K: \langle y-x,\theta\rangle\geqslant0\ \text{for all}\ y\in K\}.
\end{align*}
A set $\{x_0, ... , x_k\}$ of points of $\R^n$ is said to be \emph{geometrically independent}, or affinely independent, if the equations $\sum_{i=0}^ka_ix_i=0$ and $\sum_{i=0}^ka_i=0$ hold only if each $a_i=0$.
Fix $(t_0,x_0)\in\Sigma\setminus\Gamma$. By Proposition \ref{irregu non-conj pro} and Corollary \ref{cor:conj closed}, there exists a neighborhood $N\subset\Gamma^{c}$ of $(t_0,x_0)$ and $v_i\in C^{R+1}(N,\R)$, $i=1,\cdots,k,\ k\geqslant 2$ such that for all $(t,x)\in N$,
\begin{equation}\label{eq:non_conj1}
\begin{split}
u(t,x)=&\,\min_{1\leqslant i\leqslant k}\{v_{i}(t,x)\},\\
D^{*}u(t,x)=&\,\{Dv_i(t,x):v_{i}(t,x)=u(t,x)\},
\end{split}
\end{equation}
and $v_1(t_0,x_0)=\cdots=v_k(t_0,x_0)$. Since we shall handle certain exposed face of $D^+u(t,x)$, in general we define
\begin{equation}\label{eq:D2}
D^{\#}u(t,x)=\mbox{\rm co}\,\{Dv_i(t,x)\}_{i=1}^{k'},\qquad (t,x)\in N,
\end{equation}
where $\{v_i\}$ is a family of smooth functions in \eqref{eq:non_conj1}.
\subsection{Minimal energy elements on various exposed faces}
In this section, we shall deal with the exposed face containing the unique minimal energy element $(\bar{q}(t,x),\bar{p}(t,x))$ of the convex function $(q,p)\mapsto q+H(t,x,p,u(t,x))$ on some exposed face of $D^+u(t,x)$ in the form $D^{\#}u(t,x)$. Thus, we recall the following well known result of convex optimization.
\begin{Pro}\label{pro:min_convex}
Let $f$ be a convex function on $\R^n$ and let $C\subset\R^n$ be a convex set and consider the following minimizing problem:
\begin{equation}\label{eq:min_convex}
\mbox{\rm Min}\,\, f\quad\mbox{\rm subject to}\quad x\in C.
\end{equation}
Then, $x$ be a minimizer of \eqref{eq:min_convex} if and only if\, $0\in\partial f(x)+N_C(x)$, where
$$
N_C(x)=\{\theta\in\R^n: \langle\theta,y-x\rangle\leqslant0, y\in C\},\quad x\in C.
$$
\end{Pro}
As a direct consequence of Proposition \ref{pro:min_convex} together with the structure of $D^{\#}u(t,x)$ and our assumption that $H$ is strictly convex in $p$-variable, we conclude
\begin{Lem}\label{lem:fundamental structure}
We assume $(t_0,x_0)\in\Sigma\setminus\Gamma$ satisfies \eqref{eq:non_conj1} and $D^{\#}u(t,x)$ is defined as in \eqref{eq:D2}. Then, for any $(t,x)\in N$
\begin{enumerate}[\rm (a)]
\item There exists a unique $(\bar{q}(t,x),\bar{p}(t,x))\in D^{\#}u(t,x)$ such that:
\begin{align*}
\bar{q}(t,x)+H(t,x,\bar{p}(t,x),v_{k'}(t,x))\leqslant q+H(t,x,p,v_{k'}(t,x)),\qquad \forall (q,p)\in D^{\#}u(t,x).
\end{align*}
\item Set $\bar{v}(t,x)=H_p(t,x,\bar{p}(t,x),v_{k'}(t,x))$. Then we have
\begin{align*}
(\bar{q}(t,x),\bar{p}(t,x))\in\mbox{\rm epf}\,(D^{\#}u(t,x),(1,\bar{v}(t,x))).
\end{align*}
\item If $(q_1,p_1),(q_2,p_2)\in \mbox{\rm epf}\,(D^{\#}u(t,x),(1,\bar{v}(t,x)))$ and $p_1=p_2$, then $q_1=q_2$.
\end{enumerate}
\end{Lem}
Now, we formulate the main result in this section.
\begin{The}\label{pro:fundamental structure}
Under the assumption of Lemma \ref{lem:fundamental structure}, if $(t_0,x_0)\in N$ satisfies:
\begin{enumerate}[\rm (i)]
\item $v_1(t_0,x_0)=\cdots=v_{k'}(t_0,x_0)$,
\item The vectors in $\{Dv_i(t_0,x_0)\}_{i=1}^{k'}$ are geometrically independent,
\item $(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0))\in\mbox{\rm ri}\,(D^{\#}u(t_0,x_0))$,
\end{enumerate}
then there exists $\delta>0$ such that
\begin{equation}\label{eq:strict chara 0}
\begin{cases}
&\dot{x}(t)=\bar{v}(t,x(t)),\qquad t\in[t_0-\delta,t_0+\delta],\\
&x(t_0)=x_0,
\end{cases}
\end{equation}
has a unique $C^{R+1}$ solution $x:[t_0-\delta,t_0+\delta]\to\R^n$ and for all $t\in[t_0-\delta,t_0+\delta]$
\begin{enumerate}[\rm (1)]
\item $v_1(t,x(t))=\cdots=v_{k'}(t,x(t))$,
\item The vectors in $\{Dv_i(t,x(t))\}_{i=1}^{k'}$ are geometrically independent,
\item $(\bar{q}(t,x(t)),\bar{p}(t,x(t)))\in\mbox{\rm ri}\,(D^{\#}u(t,x(t)))$,
\item $\mbox{\rm epf}\,(D^{\#}u(t,x(t)),(1,\bar{v}(t,x(t))))=D^{\#}u(t,x(t))$.
\end{enumerate}
\end{The}
The proof of Theorem \ref{pro:fundamental structure} is based on the following Lemma \ref{lem:linear idp}, Lemma \ref{lem:minimal H 2} and Lemma \ref{lem:vector C R}.
\begin{Lem}\label{lem:linear idp}
Under the assumptions of Theorem \ref{pro:fundamental structure}, there exists a neighborhood $N_1\subset N$ of $(t_0,x_0)$ such that for all $(t,x)\in N_1$,
\begin{enumerate}[\rm (1)]
\item $\{Dv_i(t,x)\}_{i=1}^{k'}$ are geometrically independent.
\item $\{\nabla v_i(t,x)-\nabla v_{k'}(t,x):1\leqslant i\leqslant k'-1\}$ are linearly independent.
\end{enumerate}
\end{Lem}
\begin{proof}
Since $\{Dv_i(t_0,x_0)\}_{i=1}^{k'}$ are geometrically independent, we have
\begin{equation}\label{pfeq:linear idp 1}
\mbox{\rm rank}\,(Dv_1(t_0,x_0)-Dv_{k'}(t_0,x_0),\cdots,Dv_{k'-1}(t_0,x_0)-Dv_{k'}(t_0,x_0))=k'-1.
\end{equation}
If $\mbox{\rm rank}\,(\nabla v_1(t_0,x_0)-\nabla v_{k'}(t_0,x_0),\cdots,\nabla v_{k'-1}(t_0,x_0)-\nabla v_{k'}(t_0,x_0))<k'-1$, then there exists $\alpha_i\in\R,\ 1\leqslant i\leqslant k'-1$ such that the $\alpha_i$'s are not all $0$ and
\begin{equation}\label{pfeq:linear idp 2}
\sum_{i=1}^{k'-1}\alpha_i(\nabla v_i(t_0,x_0)-\nabla v_{k'}(t_0,x_0))=0.
\end{equation}
By \eqref{pfeq:linear idp 1} and \eqref{pfeq:linear idp 2}, we obtain
\begin{equation}\label{pfeq:linear idp 3}
\sum_{i=1}^{k'-1}\alpha_i(\frac{\partial}{\partial t}v_i(t_0,x_0)-\frac{\partial}{\partial t}v_{k'}(t_0,x_0))\neq 0.
\end{equation}
On the other hand, due to Lemma \ref{lem:fundamental structure} we obtain
\begin{align*}
\mbox{\rm epf}\,(D^{\#}u(t_0,x_0),(1,\bar{v}(t_0,x_0)))=D^{\#}u(t_0,x_0).
\end{align*}
It follows that for all $1\leqslant i,j\leqslant k'$,
\begin{equation}\label{pfeq:linear idp 4}
\frac{\partial}{\partial t}v_i(t_0,x_0)+\bar{v}(t_0,x_0)\cdot\nabla v_i(t_0,x_0)=\frac{\partial}{\partial t}v_{j}(t_0,x_0)+\bar{v}(t_0,x_0)\cdot\nabla v_{j}(t_0,x_0).
\end{equation}
Combing \eqref{pfeq:linear idp 2} with \eqref{pfeq:linear idp 4}, we have
\begin{align*}
&\,\sum_{i=1}^{k'-1}\alpha_i(\frac{\partial}{\partial t}v_i(t_0,x_0)-\frac{\partial}{\partial t}v_{k'}(t_0,x_0))\\
=&\,\sum_{i=1}^{k'-1}\alpha_i(\frac{\partial}{\partial t}v_i(t_0,x_0)-\frac{\partial}{\partial t}v_{k'}(t_0,x_0))+\bar{v}(t_0,x_0)\sum_{i=1}^{k'-1}\alpha_i(\nabla v_i(t_0,x_0)-\nabla v_{k'}(t_0,x_0))\\
=&\,\sum_{i=1}^{k'-1}\alpha_i(\frac{\partial}{\partial t}v_i(t_0,x_0)+\bar{v}(t_0,x_0)\cdot\nabla v_i(t_0,x_0)-\frac{\partial}{\partial t}v_{k'}(t_0,x_0)-\bar{v}(t_0,x_0)\cdot\nabla v_{k'}(t_0,x_0))\\
=&\,0,
\end{align*}
which leads to a contradiction to \eqref{pfeq:linear idp 3}. Therefore,
\begin{align*}
\mbox{\rm rank}\,(\nabla v_1(t_0,x_0)-\nabla v_{k'}(t_0,x_0),\cdots,\nabla v_{k'-1}(t_0,x_0)-\nabla v_{k'}(t_0,x_0))=k'-1.
\end{align*}
Noticing that the $v_i$'s are of class $C^{R+1}$ in $N$, there exists a neighborhood $N_1\subset N$ of $(t_0,x_0)$ such that (1) and (2) hold, by implicit function theorem.
\end{proof}
Now we define a convex set $\Delta\subset\R^{k'-1}$ in the form
\begin{align*}
\Delta=\{\lambda=(\lambda_1,\cdots,\lambda_{k'-1})\in \R^{k'-1}:0\leqslant\lambda_i\leqslant 1,\ i=1,\cdots,k'-1,\ 0\leqslant 1-\sum_{i=1}^{k'-1}\lambda_i\leqslant 1\}.
\end{align*}
Then for any $(t,x)\in N_1$, by Lemma \ref{lem:linear idp}, the map
\begin{align*}
\Phi_{t,x}:\Delta & \to D^{\#}u(t,x)\\
\lambda=(\lambda_1,\cdots,\lambda_{k'-1}) & \mapsto \Phi_{t,x}(\lambda)=(\bar{q}(t,x,\lambda),\bar{p}(t,x,\lambda)).
\end{align*}
is a linear isomorphism, where
\begin{align*}
\bar{q}(t,x,\lambda)=\sum_{i=1}^{k'-1}\lambda_{i}(\frac{\partial}{\partial t}v_i(t,x)-\frac{\partial}{\partial t}v_{k'}(t,x))+\frac{\partial}{\partial t}v_{k'}(t,x),\\
\bar{p}(t,x,\lambda)=\sum_{i=1}^{k'-1}\lambda_{i}(\nabla v_i(t,x)-\nabla v_{k'}(t,x))+\nabla v_{k'}(t,x).
\end{align*}
We define
\begin{align*}
E(t,x,\lambda)=\bar{q}(t,x,\lambda)+H(t,x,\bar{p}(t,x,\lambda),v_{k'}(t,x)),\qquad (t,x,\lambda)\in N_1\times\Delta.
\end{align*}
Obviously, $\bar{q},\ \bar{p}$ and $E$ are of class $C^R$ in $N_1\times\Delta$ and $E$ strictly convex with variable $\lambda$.
\begin{Lem}\label{lem:minimal H 2}
Suppose $(t,x)\in N_1$, then
\begin{enumerate}[\rm (a)]
\item There exists a unique $\bar{\lambda}(t,x)\in \Delta$ such that
\begin{align*}
E(t,x,\bar{\lambda}(t,x))\leqslant E(t,x,\lambda),\qquad \forall \lambda\in\Delta.
\end{align*}
and we have $\Phi_{t,x}(\bar{\lambda}(t,x))=(\bar{q}(t,x),\bar{p}(t,x))$.
\item $\bar{\lambda}(t,x)\in\mbox{\rm int}\,(\Delta)$\footnote{We denote by $\mbox{\rm int}\,(C)$ the interior of a set $C$.} if and only if $(\bar{q}(t,x),\bar{p}(t,x))\in\mbox{\rm ri}\,(D^{\#}u(t,x))$.
\item If $\lambda\in\Delta$ and $D_{\lambda}E(t,x,\lambda)=0$, then we have $\lambda=\bar{\lambda}(t,x)$. If $\bar{\lambda}(t,x)\in\mbox{\rm int}\,(\Delta)$, then we have $D_{\lambda}E(t,x,\lambda(t,x))=0$.
\end{enumerate}
\end{Lem}
\begin{proof}
By Lemma \ref{lem:fundamental structure} (a) and the linear isomorphism $\Phi_{t,x}$, we obtain (a) and (b) directly. The consequence (c) is trivial since $E$ is of class $C^R$ and convex with respect to $\lambda$.
\end{proof}
\begin{Lem}\label{lem:vector C R}
There exists a neighborhood $N_2\subset N_1$ of $(t_0,x_0)$ such that:
\begin{enumerate}[\rm (1)]
\item The function $(t,x)\mapsto\bar{\lambda}(t,x)$ is of class $C^{R}$ in $N_2$, and $\bar{\lambda}(t,x)\in\mbox{\rm int}\,(\Delta)$ for all $(t,x)\in N_2$.
\item $\bar{q}(t,x),\ \bar{p}(t,x)$ and $\bar{v}(t,x)$ are of class $C^{R}$ in $N_2$, and $(\bar{q}(t,x),\bar{p}(t,x))\in\mbox{\rm ri}\,(D^{\#}u(t,x))$ for all $(t,x)\in N_2$.
\item For all $(t,x)\in N_2$, $\mbox{\rm epf}\,(D^{\#}u(t,x),(1,\bar{v}(t,x)))=D^{\#}u(t,x)$.
\end{enumerate}
\end{Lem}
\begin{proof}
Since $(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0))\in\mbox{\rm ri}\,(D^{\#}u(t_0,x_0))$, we have $\bar{\lambda}(t_0,x_0)\in\mbox{\rm int}\,(\Delta)$ by Lemma \ref{lem:minimal H 2} (b). According to Lemma \ref{lem:minimal H 2} (c), there holds
\begin{align*}
D_{\lambda}E(t_0,x_0,\bar{\lambda}(t_0,x_0))=0.
\end{align*}
Differentiating $E(t,x,\lambda)$ by $\lambda$, we obtain
\begin{equation*}
\begin{split}
D_{\lambda}E(t,x,\lambda)&=V_t(t,x)+H_p(t,x,\bar{p}(t,x,\lambda),v_{k'}(t,x))\nabla V(t,x),\\
D^{2}_{\lambda\lambda}E(t,x,\lambda)&=(\nabla V(t,x))^{T}H_{pp}(t,x,\bar{p}(t,x,\lambda),v_{k'}(t,x))\nabla V(t,x),
\end{split}
\qquad (t,x,\lambda)\in N_1 \times \Delta.
\end{equation*}
where
\begin{equation*}
\begin{split}
V_t(t,x)&=(\frac{\partial}{\partial t}v_1(t,x)-\frac{\partial}{\partial t}v_{k'}(t,x),\cdots,\frac{\partial}{\partial t}v_{k'-1}(t,x)-\frac{\partial}{\partial t}v_{k'}(t,x))\\
\nabla V(t,x)&=(\nabla v_1(t,x)-\nabla v_{k'}(t,x),\cdots,\nabla v_{k'-1}(t,x)-\nabla v_{k'}(t,x)),
\end{split}
\qquad (t,x,\lambda)\in N_1 \times \Delta.
\end{equation*}
Notice that $H_{pp}$ is positive definite and Lemma \ref{lem:linear idp} (2) implies $\mbox{\rm rank}\,(\nabla V(t,x))=k'-1$. Therefore, $D^{2}_{\lambda\lambda}E(t,x,\lambda)$ is non-degenerate for all $(t,x,\lambda)\in N_1 \times \Delta$. Now, by the implicit function theorem, there exists a neighborhood $N_2\subset N_1$ of $(t_0,x_0)$ and a $C^R$ function $\tilde{\lambda}:N_2\to \mbox{\rm int}\,(\Delta)$ such that $\tilde{\lambda}(t_0,x_0)=\bar{\lambda}(t_0,x_0)$ and
\begin{align*}
D_{\lambda}E(t,x,\tilde{\lambda}(t,x))=0,\qquad \forall (t,x)\in N_2.
\end{align*}
Combing this with Lemma \ref{lem:minimal H 2} (b), we have $\tilde{\lambda}(t,x)=\bar{\lambda}(t,x)$ for all $(t,x)\in N_2$, which leads to our conclusion (1). Conclusion (2) follows from Lemma \ref{lem:minimal H 2} (a) (b) and Lemma \ref{lem:vector C R} (1), and conclusion (3) Proposition \ref{lem:fundamental structure} (b) and Lemma \ref{lem:vector C R} (2).
\end{proof}
\begin{proof}[Proof of Theorem \ref{pro:fundamental structure}]
Now consider \eqref{eq:strict chara 0}. By Lemma \ref{lem:vector C R} (2) and the Cauchy-Lipschitz theorem, there exists $\delta>0$ such that \eqref{eq:strict chara 0} has a unique $C^{R+1}$ solution $x:[t_0-\delta,t_0+\delta]\to\R^n$ and $(t,x(t))\in N_2$ for all $t\in[t_0-\delta,t_0+\delta]$. For $1\leqslant i\leqslant k'$, Lemma \ref{lem:vector C R} (3) implies
\begin{align*}
\langle Dv_i(t,x(t)),(1,\bar{v}(t,x(t))) \rangle=\langle Dv_{k'}(t,x(t)),(1,\bar{v}(t,x(t))) \rangle,\qquad \forall t\in[t_0-\delta,t_0+\delta].
\end{align*}
Then we have that for any $t\in[t_0,t_0+\delta]$,
\begin{align*}
v_i(t,x(t))&=v_i(t_0,x_0)+\int_{t_0}^{t} \langle Dv_i(s,x(s)),(1,\dot{x}(s)) \rangle ds\\
&=v_i(t_0,x_0)+\int_{t_0}^{t} \langle Dv_i(s,x(s)),(1,\bar{v}(s,x(s))) \rangle ds\\
&=v_{k'}(t_0,x_0)+\int_{t_0}^{t} \langle Dv_1(s,x(s)),(1,\bar{v}(s,x(s))) \rangle ds\\
&=v_{k'}(t,x(t)).
\end{align*}
Similarly, there holds
\begin{align*}
v_i(t,x(t))=v_{k'}(t,x(t)),\qquad \forall t\in[t_0-\delta,t_0].
\end{align*}
This completes the proof of (1) in Theorem \ref{pro:fundamental structure}. Conclusion (2), (3) and (4) are direct consequences of Lemma \ref{lem:linear idp} (1), Lemma \ref{lem:vector C R} (2) and Lemma \ref{lem:vector C R} (3).
\end{proof}
\subsection{Smooth strict singular characteristics from non-conjugate singular points}
Fix $(t_0,x_0)\in\Sigma\setminus\Gamma$ such that \eqref{eq:non_conj1} holds. Without loss of generality, let
\begin{align*}
D^{\#}u(t_0,x_0)=\mbox{\rm co}\,\{Dv_i(t_0,x_0)\}_{i=1}^{k'}=\mbox{\rm epf}\,(D^{+}u(t_0,x_0),(1,v(t_0,x_0))),
\end{align*}
where $v(t_0,x_0)=\bar{v}(t_0,x_0)$ is defined in Lemma \ref{lem:fundamental structure} (b) in the case that $D^{\#}u(t_0,x_0)=D^{+}u(t_0,x_0)$. That is, $v(t_0,x_0)=H_p(t_0,x_0,p(t_0,x_0),u(t_0,x_0))$ where $(q(t_0,x_0),p(t_0,x_0))\in D^{+}u(t_0,x_0)$ is the unique minimal energy element of the function $(q,p)\mapsto q+H(t_0,x_0,p,u(t_0,x_0))$, and $D^{\#}u(t_0,x_0)$ is the exposed face of $D^{+}u(t_0,x_0)$ containing such a minimal energy element.
\begin{Rem}
When considering propagation of singularities for stationary equations such as
\begin{equation}\label{eq:HJs}\tag{HJ$_s$}
H(x,Du(x),u(x))=0,\ x\in \R^{n},
\end{equation}
we have to exclude the case $0\in \mbox{\rm co}\, H_{p}(x,D^{+}u(x),u(x))$. But for evolutionary equations \eqref{eq:HJe} here, it will not happen because the first variable of $(1,v(t,x))$ is always not $0$.
\end{Rem}
\begin{defn}
We call $(t_0,x_0)\in\Sigma\setminus\Gamma$ is \emph{non-degenerate} if
\begin{enumerate}[(i)]
\item The vectors in $\{Dv_i(t_0,x_0)\}_{i=1}^{k'}$ are geometrically independent.
\item $(q(t_0,x_0),p(t_0,x_0))\in\mbox{\rm ri}\,(D^{\#}(t_0,x_0))$.
\end{enumerate}
\end{defn}
\begin{The}\label{thm:local propagation positive}
Suppose $(t_0,x_0)\in\Sigma\setminus\Gamma$ is non-degenerate. Then there exists $\delta_0>0$ such that
\begin{equation}\label{eq:strict chara positive}
\begin{cases}
&\dot{x}(t)=v(t,x(t)),\qquad t\in[t_0,t_0+\delta_0],\\
&x(t_0)=x_0,
\end{cases}
\end{equation}
has a unique $C^{R+1}$ solution $x:[t_0,t_0+\delta_0]\to \R^n$ and
\begin{align*}
(t,x(t))\in\Sigma\setminus\Gamma,\qquad \forall t\in[t_0,t_0+\delta_0].
\end{align*}
\end{The}
\begin{proof}
Lemma \ref{lem:fundamental structure} (b) implies $(q(t_0,x_0),p(t_0,x_0))=(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0))$ and $v(t_0,x_0)=\bar{v}(t_0,x_0)$. For non-degenerate $(t_0,x_0)\in\Sigma\setminus\Gamma$, by Theorem \ref{pro:fundamental structure}, there exists $\delta>0$ such that \eqref{eq:strict chara 0} has a unique $C^{R+1}$ solution $x:[t_0-\delta,t_0+\delta]\to\R^n$ and
\begin{align*}
v_1(t,x(t))=\cdots=v_{k'}(t,x(t)),\qquad \forall t\in[t_0-\delta,t_0+\delta].
\end{align*}
Since $D^{\#}u(t_0,x_0)=\mbox{\rm epf}\,(D^{+}u(t_0,x_0),(1,v(t_0,x_0)))$, there exists $\sigma>0$ such that
\begin{align*}
\langle Dv_i(t_0,x_0),(1,\bar{v}(t_0,x_0))\rangle\geqslant\langle Dv_{k'}(t_0,x_0),(1,\bar{v}(t_0,x_0))\rangle+\sigma,\qquad \forall k'+1\leqslant i\leqslant k.
\end{align*}
Obviously, $x$ and the $v_i$'s are of class $C^{R+1}$ and $\bar{v}(\cdot,x(\cdot))=\dot{x}(\cdot)$ is of class $C^R$. Thus, there exists $0<\delta_0\leqslant\delta$ such that
\begin{equation}\label{pfeq:thm from 1}
\langle Dv_i(t,x(t)),(1,\bar{v}(t,x(t)))\rangle\geqslant\langle Dv_{k'}(t,x(t)),(1,\bar{v}(t,x(t)))\rangle+\frac{1}{2}\sigma
\end{equation}
for all $k'+1\leqslant i\leqslant k$ and $t\in[t_0,t_0+\delta_0]$. It follows that
\begin{align*}
v_i(t,x(t))&=v_i(t_0,x_0)+\int_{t_0}^{t} \langle Dv_i(s,x(s)),(1,\dot{x}(s)) \rangle ds\\
&=v_i(t_0,x_0)+\int_{t_0}^{t} \langle Dv_i(s,x(s)),(1,\bar{v}(s,x(s))) \rangle ds\\
&\geqslant v_{k'}(t_0,x_0)+\int_{t_0}^{t} \big\{\langle Dv_{k'}(s,x(s)),(1,\bar{v}(s,x(s))) \rangle+\frac{1}{2}\sigma\}ds\\
&=v_{k'}(t,x(t))+\frac{1}{2}\sigma(t-t_0)\\
&>v_{k'}(t,x(t))
\end{align*}
for all $k'+1\leqslant i\leqslant k$ and $t\in(t_0,t_0+\delta_0]$. We conclude that for $t\in(t_0,t_0+\delta_0]$,
\begin{equation}\label{pfeq:thm from 2}
u(t,x(t))=\min_{1\leqslant i\leqslant k}v_i(t,x(t))=v_{j_1}(t,x(t))<v_{j_2}(t,x(t)),\ \forall 1\leqslant j_1\leqslant k',k'+1\leqslant j_2\leqslant k
\end{equation}
and $D^{+}u(t,x(t))=D^{\#}u(t,x(t))$. Therefore, when $t\in(t_0,t_0+\delta_0]$, there holds
\begin{equation}\label{pfeq:thm from 3}
\begin{split}
(\bar{q}(t,x(t)),\bar{p}(t,x(t)))&=\argmin_{(q,p)\in D^{\#}u(t,x(t))}\{q+H(t,x(t),p,v_{k'}((t,x(t))))\}\\
&=\argmin_{(q,p)\in D^{+}u(t,x(t))}\{q+H(t,x(t),p,u((t,x(t))))\}\\
&=(q(t,x(t)),p(t,x(t))).
\end{split}
\end{equation}
and
\begin{equation}\label{pfeq:thm from 4}
\bar{v}(t,x(t))=H_p(t,x(t),\bar{p}(t,x(t)),v_{k'}(t,x(t)))=H_p(t,x(t),p(t,x(t)),u(t,x(t)))=v(t,x(t)).
\end{equation}
This implies $x:[t_0,t_0+\delta_0]\to \R^n$ is a $C^{R+1}$ solution of \eqref{eq:strict chara positive} and
\begin{align*}
(t,x(t))\in\Sigma\setminus\Gamma,\qquad \forall t\in[t_0,t_0+\delta_0].
\end{align*}
Next, we turn to the uniqueness. Let $\gamma:[t_0,t_0+\delta_0]\to \R^n$ be a Lipschitz solution of \eqref{eq:strict chara positive} such that $\dot{\gamma}^{+}(t)=v(t,\gamma(t))$ and $\dot{\gamma}^{+}(\cdot)$ is right-continuous on $[t_0,t_0+\delta_0]$. Set
\begin{align*}
\tau=\sup\{t:\gamma(s)=x(s),\ \forall s\in[t_0,t]\}.
\end{align*}
Obviously, we have $t_0\leqslant\tau\leqslant t_0+\delta_0$, $\gamma(\tau)=x(\tau)$ and \eqref{pfeq:thm from 1}, \eqref{pfeq:thm from 2}, \eqref{pfeq:thm from 3}, \eqref{pfeq:thm from 4} implies
\begin{equation}\label{pfeq:thm from 5}
(q(\tau,\gamma(\tau)),p(\tau,\gamma(\tau)))=(\bar{q}(\tau,\gamma(\tau)),\bar{p}(\tau,\gamma(\tau))),\ v(\tau,\gamma(\tau))=\bar{v}(\tau,\gamma(\tau)),
\end{equation}
\begin{equation}\label{pfeq:thm from 6}
v_i(\tau,\gamma(\tau))\geqslant v_1(\tau,\gamma(\tau)),\qquad \forall k'+1\leqslant i\leqslant k,
\end{equation}
\begin{equation}\label{pfeq:thm from 7}
\langle Dv_i(\tau,\gamma(\tau)),(1,\bar{v}(\tau,\gamma(\tau)))\rangle\geqslant\langle Dv_1(\tau,\gamma(\tau)),(1,\bar{v}(\tau,\gamma(\tau)))\rangle+\frac{1}{2}\sigma,\qquad \forall k'+1\leqslant i\leqslant k.
\end{equation}
Now, we claim $\tau=t_0+\delta_0$. Otherwise, we assume $\tau<t_0+\delta_0$. Since $\gamma$ is Lipschitz, there exists $\tau<t'\leqslant t_0+\delta_0$ such that $\gamma(t)\in N$ for all $t\in[\tau,t']$. By \eqref{pfeq:thm from 6}, \eqref{pfeq:thm from 7} and a similar argument as above, there exists $\tau<t''\leqslant t'$ such that
\begin{align*}
v_i(t,\gamma(t))>v_{k'}(t,\gamma(t)),\qquad \forall k'+1\leqslant i\leqslant k,\ t\in(\tau,t''],
\end{align*}
which implies
\begin{equation}\label{pfeq:thm from 8}
(q(t,\gamma(t)),p(t,\gamma(t)))\in D^{+}u(t,\gamma(t))\subset D^{\#}u(t,\gamma(t)),\qquad \forall t\in(\tau,t''].
\end{equation}
It follows from Theorem \ref{pro:fundamental structure} (2) (3) (4) and \eqref{pfeq:thm from 5} that the vectors in $\{Dv_i(\tau,\gamma(\tau))\}_{i=1}^{k'}$ are geometrically independent and
\begin{align*}
&(q(\tau,\gamma(\tau)),p(\tau,\gamma(\tau)))\in\mbox{\rm ri}\,(D^{\#}u(\tau,\gamma(\tau))),\\
&\mbox{\rm epf}\,(D^{\#}u(\tau,\gamma(\tau)),(1,\bar{v}(\tau,\gamma(\tau))))=D^{\#}u(\tau,\gamma(\tau)).
\end{align*}
By Lemma \ref{lem:fundamental structure} (c), there exists $\sigma'>0$ such that
\begin{align*}
|p(\tau,\gamma(\tau))-p|\geqslant\sigma',\qquad \forall (q,p)\in D^{\#}u(\tau,\gamma(\tau))\setminus \mbox{\rm ri}\,(D^{\#}u(\tau,\gamma(\tau))).
\end{align*}
It is easy to see that $p(t,\gamma(t))=L_v(t,\gamma(t),v(t,\gamma(t)),u(t,\gamma(t)))$ and the $Dv_i(t,\gamma(t))$'s are right-continuous. Thus, there exists $t_0<t'''\leqslant t''$ such that for all $t\in[\tau,t''']$, the vectors in $\{Dv_i(t,\gamma(t))\}_{i=1}^{k'}$ are geometrically independent and
\begin{equation}\label{pfeq:thm from 9}
|p(t,\gamma(t))-p|\geqslant\frac{1}{2}\sigma',\qquad \forall (q,p)\in D^{\#}u(t,\gamma(t))\setminus \mbox{\rm ri}\,(D^{\#}u(t,\gamma(t))),
\end{equation}
Combing \eqref{pfeq:thm from 8} with \eqref{pfeq:thm from 9}, it follows that
\begin{equation}\label{pfeq:thm from 10}
(q(t,\gamma(t)),p(t,\gamma(t)))\in\mbox{\rm ri}\,(D^{\#}u(t,\gamma(t))),\qquad \forall t\in[\tau,t'''].
\end{equation}
Invoking \eqref{pfeq:thm from 8}, \eqref{pfeq:thm from 10} and the geometrical independence of $\{Dv_i(t,\gamma(t))\}_{i=1}^{k'}$, we obtain that
\begin{align*}
D^{+}u(t,\gamma(t))=D^{\#}u(t,\gamma(t)),\qquad \forall t\in[\tau,t'''],
\end{align*}
which implies
\begin{align*}
v_1(t,\gamma(t))=\cdots=v_{k'}(t,\gamma(t))=u(t,\gamma(t)),\qquad \forall t\in[\tau,t'''].
\end{align*}
Therefore, we have that for all $t\in(\tau,t''']$,
\begin{align*}
(q(t,\gamma(t)),p(t,\gamma(t)))&=\argmin_{(q,p)\in D^{+}u(t,\gamma(t))}q+H(t,\gamma(t),p,u(t,\gamma(t)))\\
&=\argmin_{(q,p)\in D^{\#}u(t,\gamma(t))}q+H(t,\gamma(t),p,v_{k'}(t,x))\\
&=(\bar{q}(t,\gamma(t)),\bar{p}(t,\gamma(t))),
\end{align*}
and
\begin{align*}
v(t,\gamma(t))&=H_p(t,\gamma(t),p(t,\gamma(t)),u(t,\gamma(t)))\\
&=H_p(t,\gamma(t),\bar{p}(t,\gamma(t)),v_{k'}(t,\gamma(t)))\\
&=\bar{v}(t,\gamma(t)).
\end{align*}
Now, we conclude that $\gamma:[t_0,t''']\to \R^n$ is in fact a Lipschitz solution of \eqref{eq:strict chara 0}. By the Cauchy-Lipschitz theorem, there holds $\gamma(t)=x(t)$ for all $t\in[t_0,t''']$. This leads to a contradiction with $\tau<t'''$. Finally, we have $\tau=t_0+\delta_0$ and $\gamma(t)=x(t)$ for all $t\in[t_0,t_0+\delta_0]$. This completes the proof uniqueness.
\end{proof}
\subsection{Smooth strict singular characteristics to non-conjugate singular points}
In this section, we will deal with the possible exposed face $D^{\#}u(t,x)$ of $D^+u(t,x)$ where the a minimax energy element is located.
\begin{defn}
Suppose $(t_0,x_0)\in\Sigma\setminus\Gamma$, we call $(q_0,p_0)\in D^{+}u(t_0,x_0)$ is \emph{minimax} at $(t_0,x_0)$ if
\begin{align*}
(q_0,p_0)\in \mbox{\rm epf}\,(D^{+}u(t_0,x_0),-(1,H_p(t_0,x_0,p_0,u(t_0,x_0))))\setminus D^{*}u(t_0,x_0).
\end{align*}
\end{defn}
Without loss of generality, set
\begin{align*}
D^{\#}u(t_0,x_0)=\mbox{\rm co}\,\{Dv_i(t_0,x_0)\}_{i=1}^{k'}=\mbox{\rm epf}\,(D^{+}u(t_0,x_0),-(1,H_p(t_0,x_0,p_0,u(t_0,x_0)))),
\end{align*}
where $k'\geqslant 2$. Now we have
\begin{Lem}\label{lem:mini-max}
\begin{align*}
(q_0,p_0)=(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0)),\ H_p(t_0,x_0,p_0,u(t_0,x_0))=\bar{v}(t_0,x_0)
\end{align*}
where $(\bar{q},\bar{p})$ and $\bar{v}$ are given in Lemma \ref{lem:fundamental structure}.
\end{Lem}
\begin{Rem}
This lemma ensure that, if $(t_0,x_0)\in\Sigma\setminus\Gamma$ and $(q_0,p_0)\in D^{+}u(t_0,x_0)$ is minimax, then $(q_0,p_0)$ is the unique minimal energy element restricted on the exposed face $D^{\#}u(t_0,x_0)$.
\end{Rem}
\begin{proof}
Consider the function
\begin{align*}
f:\R^{n+1}\to \R,\qquad (q,p)\mapsto q+H(t_0,x_0,p,u(t_0,x_0)).
\end{align*}
Obviously, $f$ is convex and of class $C^{R+1}$, and
\begin{align*}
Df(q,p)=(1,H_p(t_0,x_0,p,u(t_0,x_0))),\qquad \forall (q,p)\in\R^{n+1}.
\end{align*}
Since $D^{\#}u(t_0,x_0)=\mbox{\rm epf}\,(D^{+}u(t_0,x_0),-Df(q_0,p_0))$, the projection of $Df(q_0,p_0)$ to the subspace generated by $D^{\#}u(t_0,x_0)$ is $0$. By convexity of $f$ and $D^{\#}u(t_0,x_0)$, we have
\begin{align*}
f(q_0,p_0)\leqslant f(q,p),\qquad \forall (q,p)\in D^{\#}u(t_0,x_0),
\end{align*}
which implies $(q_0,p_0)=(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0))$ and $H_p(t_0,x_0,p_0,u(t_0,x_0))=\bar{v}(t_0,x_0)$.
\end{proof}
\begin{The}\label{thm:local propagation negative}
Suppose $(t_0,x_0)\in\Sigma\setminus\Gamma$, $(q_0,p_0)$ is non-degenerate and minimax at $(t_0,x_0)$. Then, there exists $\delta_0>0$ such that
\begin{equation}\label{eq:strict chara negative}
\begin{cases}
&\dot{x}(t)=v(t,x(t)),\qquad \forall t\in[t_0-\delta_0,t_0),\\
&\dot{x}^{-}(t_0)=H_p(t_0,x_0,p_0,u(t_0,x_0)),\\
&x(t_0)=x_0.
\end{cases}
\end{equation}
has a unique $C^{R+1}$ solution $x:[t_0-\delta_0,t_0]\to \R^n$ and
\begin{align*}
(t,x(t))\in\Sigma\setminus\Gamma,\qquad \forall t\in[t_0-\delta_0,t_0].
\end{align*}
\end{The}
\begin{proof}
In view of Lemma \ref{lem:mini-max} we have $(\bar{q}(t_0,x_0),\bar{p}(t_0,x_0))\in \mbox{\rm ri}\,(D^{\#}u(t_0,x_0))$. Thus, by Theorem \ref{pro:fundamental structure}, there exists $\delta>0$ such that \eqref{eq:strict chara 0} has a unique $C^{R+1}$ solution $x:[t_0-\delta,t_0+\delta]\to\R^n$. In fact, there exists $0<\delta_0\leqslant\delta$ such that $x:[t_0-\delta_0,t_0]\to \R^n$ is the unique $C^{R+1}$ solution of \eqref{eq:strict chara negative}. The rest of the proof is almost the same as that of Theorem \ref{thm:local propagation positive}.
\end{proof}
Now we consider the case $(t_0,x_0)\in\Sigma\setminus\Gamma$ and $k=2$. By Proposition \ref{irregu non-conj pro} and Corollary \ref{cor:conj closed}, there exists a neighborhood $N\subset\Gamma^{c}$ of $(t_0,x_0)$ and $v_1,v_2\in C^{R+1}(N,\R)$ such that
\begin{align*}
u(t,x)=\min\{v_1(t,x),v_2(t,x)\},\qquad (t,x)\in N,
\end{align*}
and we have $v_1(t_0,x_0)=v_2(t_0,x_0)$.
Since $Dv_1(t_0,x_0)\neq Dv_2(t_0,x_0)$, by the implicit function theorem, there exists a neighborhood $N_0\subset N$ of $(t_0,x_0)$ such that $v_1(t,x)=v_2(t,x)$ determines a $C^{R+1}$ hyper-surface $K^{*}=N_0\cap\Sigma$.
\begin{Cor}\label{cor:local propagation k=2}
Suppose $(t_0,x_0)\in\Sigma\setminus\Gamma$, and $k=2$. Then there exists $\delta_0>0$ such that the equation
\begin{equation}\label{eq:strict chara 3}
\begin{cases}
&\dot{x}(t)=v(t,x(t)),\qquad \forall t\in[t_0-\delta_0,t_0+\delta_0],\\
&x(t_0)=x_0.
\end{cases}
\end{equation}
has a unique $C^{R+1}$ solution $x:[t_0-\delta_0,t_0+\delta_0]\to \R^n$ and
\begin{align*}
(t,x(t))\in\Sigma\setminus\Gamma,\qquad \forall t\in[t_0-\delta_0,t_0+\delta_0].
\end{align*}
\end{Cor}
\begin{proof}
Since $Dv_1(t_0,x_0)\neq Dv_2(t_0,x_0)$ and $(q(t_0,x_0),p(t_0,x_0))\in(Dv_1(t_0,x_0),Dv_2(t_0,x_0))$, the point $(t_0,x_0)\in\Sigma\setminus\Gamma$ is spontaneously non-degenerate. On the other hand, we have
\begin{align*}
[Dv_1(t_0,x_0),Dv_2(t_0,x_0)]=\mbox{\rm epf}\,(D^{+}u(t_0,x_0),-(1,v(t_0,x_0))),
\end{align*}
which implies $(q(t_0,x_0),p(t_0,x_0))$ is a non-degenerate mini-max of $(t_0,x_0)$. Therefore, our conclusion follows directly from Theorem \ref{thm:local propagation positive} and \ref{thm:local propagation negative}.
\end{proof}
\begin{Rem}
The conditions in the main results (Theorem \ref{thm:local propagation positive} and Theorem \ref{thm:local propagation negative}) are satisfied when $n=1$, because any exposed face of $D^+u(t_0,x_0)$ is a segment for $(t_0,x_0)\in\Sigma\setminus\Gamma$.
\end{Rem}
|
\section{#1} \setcounter{equation}{0}}
\newcommand{\norm}[3]{\|#3\|_{#1,#2}}
\setcounter{secnumdepth}{2}
\newcommand{\Degin}[2]{{d^{\,\text{in}}_{{#1},{#2}}}}
\newcommand{\Degout}[2]{{d^{\,\text{out}}_{{#1},{#2}}}}
\newcommand{\degin}[1]{{d^{\,\text{in}}_{{#1}}}}
\newcommand{\degout}[1]{{d^{\,\text{out}}_{{#1}}}}
\newcommand{\grad}[1]{{\nabla {#1}}}
\newcommand{\hes}[1]{{\nabla^2\!{#1}}}
\newcommand{\is}[1]{{[#1]}}
\newcommand{\isd}[1]{{\mathbf{#1}^\bullet}}
\newcommand{\dt}[1]{{\dot{#1}}}
\newcommand{\isb}[1]{{\overline{\mathbf{#1}}}}
\newcommand{\mbox{$\;|\;$}}{\mbox{$\;|\;$}}
\newcommand{\pitchfork}{\pitchfork}
\newcommand{\mathbb{C}}{\mathbb{C}}
\newcommand{\mbox{$\phi_\Pi^\star$}}{\mbox{$\phi_\Pi^\star$}}
\newcommand{\displaystyle}{\displaystyle}
\newcommand{\epsilon}{\mbox{$\varepsilon$}}
\newcommand{{\mathbb{R}}}{{\mathbb{R}}}
\newcommand{\mbox{$\mathbb{H}$}}{\mbox{$\mathbb{H}$}}
\newcommand{{\mathbb{Z}}}{{\mathbb{Z}}}
\newcommand{\dot{\is{x}}}{\dot{\is{x}}}
\newcommand{\dot{\is{y}}}{\dot{\is{y}}}
\newcommand{\dot{\is{z}}}{\dot{\is{z}}}
\newcommand{\dot{\is{w}}}{\dot{\is{w}}}
\newcommand{\dot{{W}}}{\dot{{W}}}
\newcommand{\dot{w}}{\dot{w}}
\newcommand{\dot{w}}{\dot{w}}
\newcommand{\mc}[1]{{\mathbb{#1}}}
\newcommand{{\dot{x}}}{{\dot{x}}}
\newcommand{\dot{z}}{\dot{z}}
\newcommand{\On}[1]{{\text{\rm O}({#1})}}
\newcommand{\On{d}}{\On{d}}
\newcommand{\GLn}[1]{{\text{\rm GL}({#1})}}
\newcommand{\GLn{d}}{\GLn{d}}
\newcommand{\Hn}[1]{{\text{\rm H}_{#1}}}
\newcommand{\Hn{d}}{\Hn{d}}
\newcommand{~\dot{=}~}{~\dot{=}~}
\newcommand{{\boldsymbol{\ell}}}{{\boldsymbol{\ell}}}
\newcommand{{\boldsymbol{\Delta}}}{{\boldsymbol{\Delta}}}
\newcommand{\widehat{\mathcal{N}}}{\widehat{\mathcal{N}}}
\newcommand{\widehat{N}}{\widehat{N}}
\newcommand{\mbox{$\mathbb{N}$}}{\mbox{$\mathbb{N}$}}
\newcommand{\mbox{sgn}}{\mbox{sgn}}
\newcommand{{\rightarrow}}{{\rightarrow}}
\newcommand{{\longrightarrow}}{{\longrightarrow}}
\newcommand{\mbox{$\rightarrow$}}{\mbox{$\rightarrow$}}
\newcommand{\COM}[1]{\noindent \\{\bf COMMENT: {#1}}\\}
\newcommand{\operatorname{Diff}}{\operatorname{Diff}}
\renewcommand{\Re}{\operatorname{Re}}
\renewcommand{\Im}{\operatorname{Im}}
\newcommand{\mathbf{M}}{\mathbf{M}}
\newcommand{\overline{\Mb}}{\overline{\mathbf{M}}}
\newcommand{\overline{\XX}}{\overline{\XX}}
\newcommand{\rset}[2]{\left\lbrace #1 \mbox{$\;|\;$} #2\right\rbrace}
\newcommand{\lset}[2]{\left\lbrace\left. #1\;\right|\,#2\,\right\rbrace}
\newcommand{\set}[2]{\rset{#1}{#2}}
\newcommand{\tset}[2]{\big\lbrace #1\,\big|\;#2\big\rbrace}
\newcommand{\sset}[1]{\left\lbrace #1\right\rbrace}
\newcommand{\tsset}[1]{\big\lbrace #1\big\rbrace}
\newcommand{\bu}[1]{{#1}^{\bullet}}
\newcommand{\iz}[1]{\bu{\is{#1}}}
\newcommand{\simp}[1]{\boldsymbol{\Delta}_{#1}}
\newcommand{\orth}[1]{\text{O}_{#1}}
\newcommand{\smallsetminus}{\smallsetminus}
\newtheorem{header}{}[section]
\newtheorem{prop}[lemma]{Proposition}
\newtheorem{thm}[lemma]{Theorem}
\newtheorem{cor}[lemma]{Corollary}
\theoremstyle{definition}
\newtheorem{Def}[lemma]{Definition}
\newtheorem{exam}[lemma]{Example}
\newtheorem{exams}[lemma]{Example}
\newtheorem{exer}[lemma]{Exercise}
\newtheorem{exers}[lemma]{Exercises}
\theoremstyle{remark}
\newtheorem{rem}[lemma]{Remark}
\newtheorem{rems}[lemma]{Remarks}
\newtheorem{con}[lemma]{Conjecture}
\newenvironment{pfof}[1]{\vspace{1ex}\noindent{\bf Proof of
#1}\hspace{0.5em}}{\hfill\qed\vspace{1ex}}
\newcommand{\mbox{\bf 0}}{\mbox{\bf 0}}
\newcommand{\varepsilon}{\varepsilon}
\usepackage{chngcntr}
\counterwithout{equation}{subsection}
\counterwithout{equation}{section}
\newcommand{\matthew}[1]{\textcolor{blue}{[matthew:
{#1}]}}
\newcommand{\joan}[1]{{\color{cyan}[JB: #1]}}
\title{Symmetry Breaking in Symmetric Tensor Decomposition}
\begin{document}
\author{
Yossi Arjevani \\
New York University\\
\and
Joan Bruna\\
New York University\\
\and
Michael Field\\
UC Santa Barbara
\and
Joe Kileel\\
University of Texas at Austin
\and
Matthew Trager\\
Amazon\footnote{This work was performed prior to joining Amazon.}\\
\and
Francis Williams\\
New York University
}
\date{}
\maketitle
\begin{abstract}
\noindent In this note, we consider the optimization problem associated with computing
the rank decomposition of a symmetric tensor. We show that,
in a well-defined sense, minima in this highly nonconvex
optimization problem break the symmetry of the target tensor---but not too
much. This phenomenon of \textit{symmetry
breaking} applies to various choices
of tensor norms, and makes it possible to study
the optimization landscape
using
a set of recently-developed symmetry-based
analytical tools. The fact that the
objective function under consideration is a
multivariate polynomial allows us
to apply symbolic methods from computational
algebra to
obtain more refined information on the symmetry breaking phenomenon.
\end{abstract}
We consider the problem of approximating a given symmetric tensor
as a sum of
rank-1 symmetric tensors. Concretely, given an order $n$ symmetric tensor
$T\in
{\rm Sym}^n(\mathbb{R}^d)$ and a rank $k\in\mathbb{N}$, we aim to find good minimizers
for the nonconvex optimization problem
\begin{align} \label{prob:opt}
\min_{W\in M(k,d)}\ploss(W), \quad \textup{where } \ploss(W) \coloneqq
\nrm*{ \sum_{i=1}^k \w_i^{\otimes{}
n} - T}^2.
\end{align}
Here, $M(k,d)$ denotes the space of all $k\times d$ matrices, $\nrm{\cdot}$ is
some tensor norm and $\w_i$ denotes the $i$-th row of $W$.\footnote{Note that
for odd-order tensors, problem (\ref{prob:opt})
is equivalent to the standard
tensor rank decomposition (also known as the
\textit{real symmetric canonical
polyadic decomposition (CPD)}). Treatment of
even-order tensors, where any
linear combination of rank-1 tensors is
allowed, is deferred to future work.}
The problem of finding a tensor approximation
of bounded rank arises naturally
in various scientific fields, including machine
learning, biomedical
engineering and psychometrics. We refer the
reader to
\cite{comon2002tensor,comon2006blind,de2000multilinear, kolda2009tensor, sidiropoulos2000parallel,smilde2005multi, landsberg2011tensors}
and references therein for a survey of relevant applications. \\
\\
A natural approach for tackling \pref{prob:opt} is to use local
optimization methods, in particular gradient descent (GD) algorithms. However,
as the optimization landscape associated with \pref{prob:opt} is highly
nonconvex, local methods can fail due to various geometric
obstructions such as spurious minima (non-global local minima) and saddles.
It is therefore desirable to obtain a good understanding of critical points of
different extremal qualities.
Although this goal may appear to be hopeless for generic nonconvex
landscapes,\footnote{
For approaches for studing \emph{random}
nonconvex landscapes see, e.g.,
\cite{choromanska2015loss,ros2019complex}.}
a recent line of works
\cite{arjevani2019spurious,ArjevaniField2020,arjevani2020analytic} showed
that---in the presence of symmetry---a precise analytic
characterization can be obtained for families of critical points, as
well as their Hessian spectrum. The premise of the approach is that the
critical points of interest, such as
those associated to spurious minima, break the symmetry of the target tensor
$T$ (measured by a suitable group of symmetries, see
\pref{sec:symmetry})---but not too much. Such critical points are called
\emph{symmetry breaking}.\\
\\
In this note, we empirically demonstrate that the rich symmetry
of \pref{prob:opt} yields symmetry breaking spurious minima that lie
on low-dimensional subspaces, which are determined by
the structure of the target tensor~$T$. For example, for $T= \sum_{i=1}^k
\e_i^{\otimes{} 3}$, minima detected empirically using GD are shown to be symmetry
breaking with respect to $T$ (see \pref{fig:r3_a}). Other choices of tensor
norms and target tensors yield different types of symmetry
breaking (see \pref{sec:numerical_results}). Lastly, since $\ploss$ is a
multivariate polynomial, we are able to study symmetry breaking subspaces
using tools from computational
algebra---tools which that were not
applicable in previous contexts in which the
symmetry breaking phenomenon was studied.
\\
\begin{figure}
\centering \includegraphics[scale=0.4]{data/r3_d_k_12_a.png}
\includegraphics[scale=0.4]{data/r3_d_k_12_b.png}
\caption{Spurious minima of optimization problem \pref{prob:opt}
instantiated with $d=k=12$, order $3$ symmetric tensors, the Frobenius
norm (equivalently, the \emph{cubic kernel} $\inner{\cdot,\cdot}^3$,
as defined in \pref{prob:kernel_frob}), and the target tensor $T=
\sum_{i=1}^k \e_i^{\otimes{} 3}$.
Symmetry of matrices in $M(k,d)$ is measured via the \emph{isotropy
groups} of a suitably-defined group action (see \pref{sec:symmetry} for a
formal exposition). (Left) a $12\times
12$-spurious minimum of isotropy $\Delta (S_{9}\times S_2 \times S_1)$.
The corresponding function value is
$1/2$. (Right) a $12\times 12$-spurious minimum of isotropy $\Delta
(S_{10}\times S_2)$. The corresponding function value is $1/2$.}
\label{fig:r3_a}
\end{figure}
Our contributions in order of appearance may be stated as follows:
\begin{itemize}
\item We formulate the invariance properties of optimization problems
associated with symmetric tensor decomposition, and make their dependence on
the target tensor explicit. Our analysis considerably generalizes
the argument employed in \cite{arjevani2019spurious} and applies to a wider
class of \textit{kernel-like} problems.
\item We provide numerical results which demonstrate that minima
tend to conform with the symmetry of the target tensor. In our experiments, we
consider optimization problem \pref{prob:opt} with the Frobenius inner product
of order 3 and order 5 symmetric tensors, and the inner product associated
with the standard Gaussian distribution (see \pref{eqn:moment_distribution}).
We also examine different structural assumptions on the target~tensors.
\item A property of the symmetry breaking principle specific to symmetric
tensor decomposition problems is that, unlike previous settings
to which this principle applies \cite{arjevani2019spurious}, here $\ploss$ is
a
multivariate polynomial. This makes it possible to use methods from
computational algebra, for example Gr{\"o}bner bases, which allow us to
analytically characterize the set of highly-symmetric critical points
to a large extent.
\end{itemize}
The note is organized as follows. In \pref{sec:preliminaries}, we review
relevant notions from multilinear algebra and group actions to be used
throughout the note. In \pref{sec:symmetry}, we formally establish the
invariance properties of $\ploss$ with respect to various choices of inner
products and target tensors. Lastly, in \pref{sec:numerical_results} we
present numerical experiments that explore the principle of symmetry breaking
in different tensorial settings.
\section{Preliminaries}\label{sec:preliminaries}
Below, we provide background material for concepts and terms in multilinear
algebra and group actions which are needed for a formal study of the symmetry
breaking phenomenon in problem \pref{prob:opt}.
\subsection{Tensor preliminaries}
A tensor of order $n$ is an element of the tensor
product of $n$ vector spaces $V_1 \otimes \ldots \otimes V_n$.
Upon choosing bases for each factor $V_i$, we may identify a tensor with a multi-dimensional array in $\mathbb{R}^{d_1
\times \ldots \times d_n}$ (assuming $V_i$ are real vector spaces) with $d_i =
\dim(V_i)$. We write $T_{i_1,\ldots,i_n}$ for the $(i_1,\ldots,i_n)$-th
coordinate of $T$. Given vectors $\v_i \in \mathbb{R}^{d_i}$, $i=1,\ldots,n$,
we write $\v_1 \otimes \ldots \otimes \v_n$ for the outer product of these
vectors, that is, the element
in $\mathbb{R}^{d_1} \otimes \ldots \otimes \mathbb{R}^{d_n}$ such that $(\v_1 \otimes
\ldots \otimes \v_n)_{i_1,\ldots,i_n} = ({v_1})_ {i_1} \ldots (v_n)_{i_n}$.
Also, we write $\v^{\otimes n} := \v \otimes \ldots \otimes \v$ ($n$-times). The
Frobenius inner product of two tensors $T, S$ of the same shape is defined to be
$\langle T, S \rangle_F = \sum_{i_1,\ldots,i_n} T_{i_1\ldots i_n} S_{i_1
\ldots i_n}$. We will also consider other inner products of tensors. It
is easy to see that for the Frobenius inner product we have
\begin{equation}\label{eq:frobenius_vector_product}
\langle \v_1 \otimes
\ldots \otimes \v_n, \w_1 \otimes \ldots \otimes \w_n \rangle_F = \prod_{i=1}^n \langle \v_i, \w_i \rangle
\end{equation}
for all $\v_i, \w_i \in \mathbb{R}^{d_i}$ ($i=1, \ldots, n$). In particular,
$\langle \v^{\otimes n}, \w^{\otimes n}\rangle_F = \langle \v,
\w\rangle^n$.
A tensor $T \in \mathbb{R}^{d} \otimes \ldots \otimes \mathbb{R}^{d}$ ($n$ times) is
\emph{symmetric} if it is invariant under permutation of indices, that is, if
$T_{i_1,\ldots,i_n} = T_{i_{\sigma(1)},\ldots,i_{\sigma(n)}}$ holds for all
permutation $\sigma \in S_n$, where $S_n$ is the symmetric group of degree $n$. We
write ${\rm Sym}^n(\mathbb{R}^d)$ for the space of symmetric tensors of order $n$ on
$\mathbb{R}^d$. This is a vector space of dimension $\binom{d+n-1}{n}$. It is isomorphic to the space of homogeneous polynomials of degree $n$ in formal variables $\X = (X_1, \ldots, X_d)$ via
$T \mapsto \langle T, \X^{\otimes n} \rangle$. When $n=2$, this is the usual correspondence between symmetric matrices and quadric forms.
Finally, we
recall the definition of \emph{rank} for symmetric tensors. We say
that $T \in {\rm Sym}^n(\mathbb{R}^d)$ has rank-$1$ if $T = \lambda \v^{\otimes n}$
for some $\lambda \in \mathbb{R} \setminus \{0\}$ and $\v \in \mathbb{R}^d \setminus \{0\}$. More generally, a tensor $T$ has (real symmetric)
rank-$r$ if it can be written as a linear combination of $r$ rank-$1$ tensors
$T = \lambda_1 \v_1^{\otimes n} + \ldots + \lambda_k \v_k^{\otimes n}$, but not
as a combination of $k-1$ rank-$1$ tensors. For $n=2$, this definition agrees
with the usual notion of rank for symmetric matrices. In this note, we are interested in symmetric tensors of odd order. Thus, the
coefficients $\lambda_i$ may be absorbed into the vectors $\v_i$ and dropped altogether.
Let us briefly mention some current algorithms for symmetric tensor
decomposition, that is, problem \eqref{prob:opt} when $\| \cdot \|$ is
Frobenius. A straightforward yet practical method is based on direct
first-order optimization of $\mathcal{L}$ in \eqref{prob:opt}; see
\cite{kolda2015numerical} and the Matlab implementations \cite{tensorlab,
tensortoolbox}. A more computationally intensive although provable method
(assuming $T$ is rank $r$ and $r = O(n^{\frac{d-1}{2}})$) was provided in
\cite{nie2017generating}, based on an algebraic construction called generating
polynomials. For $n=3$ and $r \leq d$, a classic but theoretically convenient
method was derived from simultaneous diagonalization of matrix slices
\cite{harshman70} . For $n=4$ and $r = O(n^2)$, the work \cite{de2007fourth}
presented a provable algorithm using matrix eigendecompositions, which was
robustified using ideas from the sums-of-squares hierarchy in
\cite{hopkins2019robust}. In \cite{kileel2019subspace}, a tensor power method
was used, constructed from a matrix flattening of $T$, to find the components
$\w_i$ sequentially. Also, \cite{sherman2020estimating} showed how to
implement direct optimization of \eqref{prob:opt} in an efficient manner for
moment tensors $T$ in an online setting.
\subsection{Groups, actions and symmetry}
We review background material on group
actions (see~\cite[Chapters 1, 2]{Field2007} for a
more complete account). Elementary concepts from group theory
are assumed known. We start with an example that is used later.
\begin{exams} \label{exams:groups}
Let $\text{GL}(d)$ denote the set of invertible
linear maps on ${\mathbb{R}}^d$. Under composition, $\text{GL}(d)$ is a
group, called the \emph{general linear group}. The \emph{orthogonal group} $\text{O}(d)$ is the
subgroup
of $\text{GL}(d)$ that preserves Euclidean distances, i.e.,
$
\text{O}(d) = \{A \in \text{GL}(d) : \|Ax\|_2 =
\|x\|_2\;\text{for all } x \in {\mathbb{R}}^d\}.
$
Upon choosing a basis for $\mathbb{R}^d$, both $\GLG{d}$ and $\text{O}(d)$ can be viewed as groups of
invertible $d \times d$ matrices.
\end{exams}
\paragraph{Group actions.} Groups often arise as
\emph{transformations}
of a set or space, so we are led to the notion of a
\emph{$G$-space} $X$ where we have
an \emph{action} of a group $G$
on a set $X$. Formally, a group action is a group homomorphism from $G$
to the
group of bijections of $X$.
For example, $S_d$ naturally acts on $[d]:=\{1,\ldots,d\}$ as the group of permutations, while
both $\textup{GL}(d)$ and $\text{O}(d)$ act on
${\mathbb{R}}^d$ as groups of linear transformations (or matrix
multiplication).
\begin{exams} \label{ex:product}
Our study of the invariance
properties of $\ploss$ will rely on the action of the
product group $S_k \times S_d\subseteq S_{k\times d}$ $(k,d\in
\mbox{$\mathbb{N}$})$ on the product set
$\ibr{k} \times \ibr{d}$ defined by
\begin{align}\label{eq: Gamma-action}
(\pi,\rho)(i,j) := (\pi^{-1}(i),\rho^{-1}(j)) \,\, \textup{ for all } (\pi, \rho) \in
S_k \times S_d, (i,j) \in \ibr{k} \times \ibr{d}.
\end{align}
By identifying $(i,j) \in \ibr{k} \times \ibr{d}$ with the entry $(i,j)$-entry in a matrix, this induces a linear representation on the space $M(k,d)$ of real $k \times
d$ matrices $A = \left(A_{ij}\right)$ via
\begin{equation}
(\pi,\rho)\left(A_{ij}\right) := \left(A_{\pi^{-1}(i),\rho^{-1}(j)}\right).
\end{equation}
Here, $\pi$ acts by permuting the rows of $A$, and $\rho$ by permuting the
columns of $A$. In terms of permutation matrices $P_{\pi} \in O(k)$ where
\begin{align*}
(P_\pi)_{ij} = \begin{cases}
1 & i =\pi(j),\\
0 & \text{otherwise},
\end{cases}
\end{align*}
and $P_{\rho} \in O(d)$
given similarly, the action is
$(\pi,\rho)(A) = P_{\pi} A P_{\rho}^{\top}$.
\end{exams}
\paragraph{Isotropy groups.}
Given $W \in M(k,d)$, the largest
subgroup of $S_k \times S_d$ fixing $W$ is called the \emph{isotropy} subgroup
(or \textit{stabilizer})
of $W$ and is used as a means of measuring the symmetry of $W$. The isotropy
subgroup of $I_d\in M(d,d)$ is the diagonal subgroup $\Delta S_{d}$, where
$\Delta$ maps a given subgroup $H\subseteq S_d$ to its \textit{diagonal}
counterpart $\{(g,g) : g \in H\} \subseteq S_d \times S_d$
(thus, a transposition $(ij)$ in $\Delta S_k$ acts by simultaneously switching
the $i$th and $j$th rows and columns). The \textit{fixed
point space}
corresponding to a given
subgroup $H\subseteq G$ is defined to be
\begin{align*}
M(k,d)^H = \{W\in M(k,d) : hW = W \,\, \forall h\in H \}.
\end{align*}
This is a linear subspace of $M(k,d)$.
In \pref{sec:identity}, we consider spurious minima
whose isotropy groups are subgroups of the isotropy group of the identity
tensor $\tau_n(I_k)$, e.g.,
$\Delta S_d$, $\Delta (S_{d-1}\times S_1)$ (see \pref{fig:max_sym}) and
$\Delta
(S_{d-3}\times S_2 \times S_1)$. \pref{sec:conv} addresses other choices of
target matrices and different symmetry breaking
patterns (see also \cite{arjevani2019spurious}).
\newcommand{1.2in}{1.2in}
\newcommand{\bwidth}{1.2in}
\newcommand{0.11in}{0.11in}
\begin{figure}[ht]
\begin{center}\vskip-0.4cm
{\setstretch{1.2}
\begin{blockmatrixtabular}\label{fig:dia_sym}
\valignbox{\dblockmatrixSD[1.0,0.8,0.8]{1.2in}{\bwidth}{$\alpha$}{0.11in}{$\beta$}}&
\quad\quad\quad\quad
\valignbox{\dblockmatrixSDMO[1.0,0.8,0.8]{1.2in}{\bwidth}{$\alpha$}{0.11in}{$\beta$}{0.24in}}&
\quad\quad\quad\quad
\valignbox{\dblockmatrixSDMOOO[1.0,0.8,0.8]{1.2in}{\bwidth}{$\alpha$}{0.11in}{$\beta$}{0.48in}}&\\
Isotropy $\Delta S_5 $&
\quad\quad\quad\quad
Isotropy $\Delta (S_4 \times S_1)$ &
\quad\quad\quad\quad Isotropy
$\Delta (S_3\times S_2)$
\end{blockmatrixtabular}}
\end{center}
\vskip-0.4cm
\caption{A schematic description of $5\times 5$ matrices
with isotropy $\Delta S_5, \Delta (S_4 \times S_1)$
and $\Delta (S_3\times S_2)$, from left to right (borrowed
from \cite{arjevani2019spurious}). $\alpha, \beta,
\gamma,\delta, \epsilon$ and $\zeta$ are assumed to be `sufficiently'
different.}
\label{fig:max_sym}
\end{figure}
\section{Invariance properties of the loss function} \label{sec:symmetry}
In the sequel, we formally establish the invariance properties of
problem (\ref{prob:opt}). We further show that the same analysis applies in
fact
to a kernel-like formulation of a greater generality, and use this observation
to study the symmetry breaking phenomenon in related settings. We
conclude the section with a brief discussion of a recent symmetry-based
approach \cite{arjevani2019spurious,ArjevaniField2020,arjevani2020analytic}
which allows one to exploit invariance properties of nonconvex functions
to analyze the associated optimization landscape. \\
\\
A real-valued function $f$ with domain $X$ is
\textit{$G$-invariant} if $f(g\x)=f(\x)$ for all $\x\in X,~g\in G$. Let us
regard the loss function $\mathcal{L}$ for symmetric tensor decomposition in
\pref{prob:opt} as a function on the $S_k \times S_d$-space $M(k, d)$ (see
Example~\ref{ex:product}). Since permuting the
order of the summation in \pref{prob:opt} does not change the
function value, $\ploss$ is left $S_k$-invariant (i.e., invariant under
row permutations of $W$) for all choices of $T$. Additional invariance
properties of $\ploss$ may exist depending on the structure of the target tensor $T$.
To see this, we define the map $\tau_n$
on matrices $A \in M(k,n)$ as follows
\begin{align}
\tau_n(A) \coloneqq \sum_{i=1}^k \a_i^{\otimes{} n},
\end{align}
where $\a_1,\dots,\a_k$ are the rows of the matrix $A$. Next, we make the
definition of $\ploss$ explicit with respect to
the target tensor (by a slight abuse of notation):
\begin{align} \label{prob:opt_ext}
\ploss(W;V) \coloneqq \nrm*{ \tau_n(W) - \tau_n(V)}^2,
\end{align}
where $V\in M(h,d)$ and $T = \tau_n(V)$. Note that $\cL$ is left
$S_h$-invariant with respect to its
second argument, where $S_h$ is understood as acting by permuting the rows of
$V$. Moreover, we no longer regard the target tensor $T$ in problem
\pref{prob:opt} as a primary object in our analysis, but rather, shift
attention to its parameterization---the target weight matrix~$V$. \\
\\
Specializing the norm $\| \cdot \|$ to be the one induced by the Frobenius
inner product, \pref{prob:opt_ext} takes the
form:
\begin{align} \label{prob:kernel_frob}
\ploss(W;V) &= \left\langle\tau_n(W) - \tau_n(V),\tau_n(W) - \tau_n(V)\right\rangle_F\nonumber\\
&= \sum_{i,j=1}^{k} \inner{\w_i^{\otimes{} n}, \w_j^{\otimes{} n}}_F
-2\sum_{i=1}^{k} \sum_{j=1}^{h} \inner{\w_i^{\otimes{} n}, \v_j^{\otimes{} n}}_F
+ \sum_{i,j=1}^{h} \inner{\v_i^{\otimes{} n}, \v_j^{\otimes{} n}}_F\nonumber\\
&= \sum_{i,j=1}^{k} \inner{\w_i, \w_j}_F^n
-2\sum_{i=1}^{k} \sum_{j=1}^{h} \inner{\w_i, \v_j}_F^n
+ \sum_{i,j=1}^{h} \inner{\v_i, \v_j}_F^n.
\end{align}
Since $\inner{\cdot,\cdot}^n$ is rotationally invariant, it follows that
$\ploss(W;V)=\ploss(WU;VU)$ for all $U\in O(d)$.
Assuming momentarily that $h=d$ and $V = I_d$, we have for all
$(\pi,\rho)\in S_k\times S_d$:
\begin{align}\label{eq:invariance}
\ploss(W) = \ploss(W ; I_d) = \ploss(W ; P_\rho P_\rho^\top )
= \ploss(W P_\rho ; P_\rho )
= \ploss(P_\pi W P_\rho ; I_d ) = \ploss(P_\pi W P_\rho).
\end{align}
Thus, $\ploss$ is $S_k \times S_d$-invariant for the
choice of $V=I_d$.
More generally, if $V \in M(h,d)$, $\sigma \in S_h$, $\rho \in S_d$ are such
that $V P_\rho = P_{\sigma} V$, then
\begin{equation}\label{eq:invariance_right}
\ploss(W) = \ploss(W ; V) = \ploss(W P_\rho ; V P_\rho) = \ploss(W P_\rho ;
P_\sigma V) = \ploss(W P_\rho ; V) = \ploss(W P_\rho).
\end{equation}
Note that the condition $V P_\rho = P_{\sigma} V$ is actually expressing that
$\tau_n(V P_\rho) = \tau_n(V)$ (see also Lemma~\ref{lemma:poly_invarince}
below). The relation~\eqref{eq:invariance_right} shows that symmetries of the
target tensor lead to invariance properties of the objective function. For
example, if $V \in M(d,d)$ is a \emph{circulant matrix}, then $V P_\rho =
P_\rho V$ holds for any \emph{cyclic} permutation $\rho \in S_d$. Thus,
\eqref{eq:invariance_right} implies that
$\ploss(W) = \ploss(P_\pi W P_\rho)$ for all permutations $\pi\in S_k$ (as
left $S_k$-invariance always holds) and all
cyclic $\rho\in S_d$, giving an $S_k\times \mathbb{Z}_d$-invariance of
$\ploss$.
We shall
address a special case of circulant matrices in \pref{sec:conv}.\\
\\
The kernel-like formulation \pref{prob:kernel} suggests a simple way of
considerably relaxing the use of the Frobenius norm while maintaining
the $S_k\times S_d$-invariance. Indeed, replacing
$\inner{\cdot,\cdot}^n$ by a general \textit{kernel} $\ker(\cdot,\cdot)$,
\pref{prob:kernel_frob} reads as follows:
\begin{align} \label{prob:kernel}
\ploss_\ker(W;V) &\coloneqq
\sum_{i,j=1}^{k} \ker\prn{\w_i, \w_j}_F^n
-2\sum_{i=1}^{k} \sum_{j=1}^{h} \ker\prn{\w_i, \v_j}_F^n
+ \sum_{i,j=1}^{h} \ker\prn{\v_i, \v_j}_F^n.
\end{align}
Throughout the note, we assume that $\ker$ is invariant under a simultaneous
right multiplication of both arguments by orthogonal matrices, yielding an
$S_k\times S_d$-invariance of $\ploss_\ker$ using the same line of argument
above.
This yields a straightforward, yet effective, generalization of the invariance
analysis given in \cite[Section 4.1]{arjevani2019spurious}. In particular, an
important example of an $\mathrm{O}(d)$-invariant kernel comes from the
study of shallow ReLU neural networks \cite{arjevani2019spurious,ArjevaniField2020}:
\begin{align}\label{eq:relu_kernel}
\ker(\w,\v) &\coloneqq \mathbb{E}_{\x\sim\cN(0,I_d)}\brk{\max\crl{\inner{\w,\x}_F,0}
\max\crl{\inner{\v,\x}_F,0}}\nonumber\\ &=
\frac{1}{2\pi}\nrm{\w}_2\nrm{\v}_2(\sin(\theta_{\w,\v}) +
(\pi-\theta_{\w,\v})\cos(\theta_{\w,\v})),
\end{align}
where $\theta_{\w,\v} \coloneqq
\cos^{-1}\prn*{\frac{\inner{\w,\v}_F}{\nrm{\w}_2\nrm{\v}_2}}$. More
generally, the class of $\mathrm{O}(d)$-invariant kernels includes
any random-features model \cite{rahimi2007random} of the form $k(\w,\v) =
\E_{\x \sim \nu} [\rho(\inner{\w,\x})\rho(\inner{\v,\x})]$ with an activation
function $\rho$ and an $\mathrm{O}(d)$-invariant distribution $\nu$. The
functions $\kappa$ and $\rho$ are related through their spherical harmonic
decompositions (one being the square of the other).\\
\\
In particular, $\mathrm{O}(d)$-invariant kernels are induced by probability
distributions over $\mathbb{R}^d$ \cite{Geometry2021}.
Given such a probability
distribution $\cD$, we define an inner product of tensors by letting
\begin{equation}
\langle
S,
T \rangle_{\mathcal{D}} \coloneqq
\mathbb{E}_{\x \sim \mathcal{D}} [\langle S, \x^{\otimes n} \rangle_F \langle T,
\x^{\otimes n} \rangle_F],
\end{equation}
which in turn induces the kernel
$k(\w,\v)=\inner{\tau_n(\w),\tau_n(\v)}_\cD$.\footnote{It can be
shown that the Frobenius inner product is not induced by any probability
distribution \cite{Geometry2021}.} The inner product $\inner{\cdot,\cdot}_\cD$
can be explicitly expressed in terms of the $2n$-moments of $\cD$ as
follows.
\begin{lemma}
For tensors $S,T \in \textup{Sym}^n(\mathbb{R}^d)$, we have that
\begin{equation}
\langle S, T \rangle_{\mathcal{D}} = \textup{vec}(S)^{\top} \textup{mat}({\bf
M}_{\mathcal{D},2n})\textup{vec}(T)
\end{equation}
where ${\bf M}_{\mathcal{D}, 2n} := \mathbb{E}_{\x \sim
\mathcal{D}}[\x^{\otimes 2n}] \in
\textup{Sym}^{2n}(\mathbb{R}^d)$ is the $2n$-th moment tensor
of $\mathcal{D}$, and $\textup{vec}$ and $\textup{mat}$ are
the linear operators of vectorization and matricization with
respect to lexicograhpic ordering.\footnote{In Matlab notation,
$\textup{vec}(T) =
\textup{reshape}(T, d^n)$ and
$\textup{mat}({\bf M}) = \textup{reshape}({\bf M}, d^n, d^n)$.}
\end{lemma}
\begin{proof}
We compute
\begin{align}\label{eqn:moment_distribution}
\langle S, T \rangle_{\mathcal{D}} &\coloneqq \mathbb{E}_{\x \sim
\mathcal{D}}
[\langle S, \x^{\otimes n} \rangle_F \langle T, \x^{\otimes n} \rangle_F]
\nonumber\\
& = \mathbb{E}_{\x \sim \mathcal{D}} [\langle S \otimes T, \x^{\otimes
2n} \rangle_F] \nonumber\\
& = \left\langle S \otimes T, \mathbb{E}_{\x \sim \mathcal{D}} \,
\x^{\otimes 2n} \right\rangle_F \\
& = \langle S \otimes T, {\bf M}_{\mathcal{D}, 2n} \rangle_F \nonumber\\
& = \textup{vec}(S)^\top \textup{mat}({\bf
M}_{\mathcal{D},2n})\textup{vec}(T),\nonumber
\end{align}
using properties of tensor product and the linearity of expectation. This gives the result.
\end{proof}
The way by which different choices of ${\bf
M}_{\mathcal{D}, 2n}$ affect the optimization landscape of problem \eqref{prob:opt} is studied
in~\cite{Geometry2021}. Here, we shall only consider the \emph{cubic-Gaussian
kernel} corresponding to the third-order inner-product induced by the standard
Gaussian distribution,
\begin{align}\label{kernel:cubic_gauss}
k(\w,\v) &=
{6}\inner{\w,\v}_F^3 + 9\|\w\|_2^2\|\v\|_2^2\inner{\v,\w}_F.
\end{align}
We note in passing that an alternative interpretation for the ``partially
symmetric tensors" we consider is that of \textit{partially symmetric} homogeneous
polynomials. This is formulated by the following lemma.
\begin{lemma}\label{lemma:poly_invarince}
Let $G \subseteq S_d$ be a subgroup. Assume $V \in M(h,d)$ is such that
for each $\rho \in G$ there exists $\sigma \in S_h$ such that $V P_\rho =
P_\sigma V$.
Let $T = \tau_n(V)$ correspond to the homogeneous polynomial $F$ of degree
$n$ in variables $\X =(X_1, \ldots, X_d)$ via
$F = \langle T, \X^{\otimes n} \rangle $. Then $F$ is a $G$-invariant
where $S_d$ acts by permutation of variables.
\end{lemma}
\begin{proof}
For each permutation $\rho \in G \subseteq S_d$, we have that
$\rho F = \left\langle T, (\rho \X)^{\otimes n}\right\rangle_F =
\left\langle T, \rho^{\otimes n} \X^{\otimes n}\right\rangle_F = \langle
(\rho^{-1})^{\otimes n} \tau_n(V), \X^{\otimes n} \rangle_F = \langle
\tau_n(V P_{\rho^{-1}}), \X^{\otimes n} \rangle_F = \langle
\tau_n(P_{\sigma}
V), \X^{\otimes n} \rangle_F = \langle \tau_n(V), \X^{\otimes n}
\rangle_F = F$, where we used the fact that $\tau_n(P_\sigma V) =
\tau_n(V)$.
\end{proof}
Thus, in the language of homogeneous polynomials, by considering problem
\eqref{prob:opt} with structured targets $T$, we are studying the
\textit{Waring decompositions} of partially symmetric homogeneous polynomials
\cite{landsberg2011tensors}.
\subsection{The method: symmetry breaking in nonconvex optimization}
In the realm of convexity, it is a nearly-trivial fact that the minimum of
strictly convex invariant functions must be of full isotropy type.
For nonconvex invariant functions however, matters are anything but
trivial---no a-priori constraints on the isotropy type of
minima exist. That said, somewhat miraculously, in various important
settings critical points, and minima in particular, do exhibit large isotropy
types. This phenomenon was
first studied in
\cite{arjevani2019spurious}, where it was shown that the $S_k\times
S_d$-isotropy groups of spurious minima corresponding to the ReLU kernel
\pref{eq:relu_kernel} tend to be large subgroups of the isotropy of
global minimizers. Thus, intuitively, spurious minima break the symmetry of
global
minimizers, but not too much. Examples
are provided in \pref{fig:max_sym}. Based on
this observation, families of critical points of $\ploss$ were expressed as
power series in $1/\sqrt{k}$ leading to, for example, a precise formula for the
decay rate of $\ploss$ \cite{ArjevaniField2020}. The power series
representation was then used in \cite{arjevani2020analytic} to derive an
analytic characterization of the Hessian spectrum of $\ploss$ for finite
arbitrarily large values of~$d$~and~$k$. This access to precise
high-dimensional spectral information allowed, for the first time, a rigorous
examination of a number of fundamental hypotheses in the machine learning
literature pertaining to curvature, optimization, and generalization.
\section{Numerical results}
\label{sec:numerical_results}
Having presented the concept of symmetry breaking and its importance
in studying nonconvex optimization landscapes, we now turn to explore various
tensorial settings in which this principle applies.
Our study is mainly based on numerical results, with the exception of a few
simple cases in which we are able to perform exact calculations using the fact
that $\ploss_\ker$ is a multivariate polynomial for polynomials kernels.
\paragraph{Experiment setting.} In all experiments below, we initialize the
entries of $W$ as i.i.d. Gaussians with variance $1/d$ (commonly referred
to as Xavier initialization) and run GD on problem (\ref{prob:kernel}) until
the
gradient norm is below a threshold of, unless stated otherwise,
$1\mathrm{e-}10$. Numerical values to 3 decimal points are provided in
\pref{sec:ap_data} (excluding spurious minima shown in \pref{sec:conv}). The
gradient of \pref{prob:kernel} can be expressed as,
\newcommand{{h}}{{h}}
\begin{align}
\nabla \ploss_\ker(W) &= \sum_{i=1}^{k} \e_i\otimes \prn*{\sum_{j=1}^k
\kappa_\w
(\w_i,\w_j) - \sum_{j=1}^{h} \kappa_\w (\w_i,\v_j)},
\end{align}
where $\kappa_\w$ denotes the derivative of $\kappa$ with respect to the first argument and $\e_i$ denotes the $i$-th unit vector. The weight matrices of
convergent iterates are permuted so as to align with a
$\Delta
(S_{d_1}\times S_{d_2}\times \cdots \times S_{d_p})$-isotropy group where $d_1\ge
d_{2}\ge
\dots\ge d_p$.
We numerically verify that the convergent iterates are indeed minima (i.e., the
respective Hessian is positive semi-definite) using the following expressions
for the Hessian
entries,
\begin{align}
\nabla^2 \ploss_\ker(W)
&= \sum_{i,j=1}^{k} \e_i \e_j^\top\otimes \kappa_{\w,\v} (\w_i,\w_j)
+ \sum_{i=1}^{k} \e_i \e_i^\top\otimes
\prn*{\sum_{j=1}^k \kappa_{\w,\w} (\w_i,\w_j) - \sum_{j=1}^{h} \kappa_{\w,\w}
(\w_i,\v_j)}.
\end{align}
Note that, due to numerical errors, the Hessian is only guaranteed to be
approximately positive semi-definite.
\subsection{Identity target tensor}\label{sec:identity}
We start by studying the simple setting where one seeks a $d$-rank $n$-order
tensor approximation for the $d$-rank identity tensor $T=\tau_n(I_d)$, with
$d=12$ and $n=3,5$.
Following the procedure describe above, we obtain a number of
symmetry breaking spurious minima for the polynomial kernel
$k(\cdot,\cdot)=\inner{\cdot,\cdot}^r$ (representing the symmetric tensor
decomposition problem \pref{prob:opt}) for $r=3$ and $r=5$, shown in
\pref{fig:r3_a} and \pref{fig:r5_a} respectively, and for the cubic-Gaussian
kernel (\ref{kernel:cubic_gauss}), shown in \pref{fig:gauss_a}.
\begin{figure}
\centering \includegraphics[scale=0.4]{data/r5_d_k_12_a.png}
\includegraphics[scale=0.4]{data/r5_d_k_12_b.png}
\caption{Spurious minima of optimization problem \pref{prob:opt}
instantiated with $d=k=12$, order $5$ symmetric tensors, the Frobenius
norm (equivalently, the \emph{quintic kernel} $\inner{\cdot,\cdot}^5$,
as defined in \pref{prob:kernel_frob}), and the target tensor $T=
\sum_{i=1}^k \e_i^{\otimes{} 5}$. (Left) a spurious minimum of isotropy
$\Delta (S_8\times \inner{(9~10)(11~12)})$ and function value $1$.
(Right) a spurious minimum of isotropy $\Delta (S_9\times S_1^3)$ and
of function value $1$.}
\label{fig:r5_a}
\end{figure}
\subsection{Restricting the gradient equations to fixed point spaces}
In contrast to the previous setting in which the phenomenon of
symmetry breaking was studied, namely, problem \pref{prob:kernel}
with the ReLU kernel \pref{eq:relu_kernel}, here the use of polynomial kernels
yields a multivariate polynomial loss function. This makes it possible to
rigorously establish various properties of symmetry breaking fixed point
spaces using tools from computational algebra. We demonstrate this for $d=k$
over the cubic kernel and the identity target tensor.
\paragraph{$S_d\times S_d$-critical points.} We start by computing all the
critical points of $\ploss$ restricted to $M(d,d)^{S_d\times S_d} = \crl*{
\omega I_d~|~\omega \in \mathbb{R}}$. To this end, we simply substitute the general
form of $W$ and note that
\begin{align}
\cL(\omega I) &= \omega^6 d^5/2 - \omega^3 d^2 + d/2,\nonumber\\
\frac{\mathrm{d} }{\mathrm{d} \omega}\cL &= 3\omega^6 d^5 - 3\omega^2
d^2.
\end{align}
The simple polynomial gradient equation has two solutions
$\omega = 0$ and $\omega=d^{-1}$. This, in turn, implies that the critical
points of $\ploss|_{M(d,d)^{S_d\times S_d}}$ are $\mathbf{0}_d$ and
$d^{-1}I_d$. In fact, due to the unique nature of fixed point spaces, $\ploss$
and $\ploss|_{M(d,d)^{S_d\times S_d}}$ share the exact same set of $S_d\times
S_d$-critical
points (see \cite[Proposition 3]{arjevani2019spurious}). Thus, we have a
complete
characterization of all the critical points of $\ploss$ which are fixed by
$S_d\times
S_d$.\footnote{The fact that $W\in M(d,d)^{S_d\times S_d}$ is a critical point
of $\nabla(\ploss|_{M(d,d)^{S_d\times S_d}})$ iff $W$ is a critical point of
$\nabla \ploss$ is also known as the \emph{principle of symmetric
criticality}. See \cite{palais1979principle} for a study of this principle in
the context of $G$-manifolds, including cases where it fails to hold.}
\paragraph{$\Delta S_d$-critical points.} Next, restricted to
$M(d,d)^{\Delta S_d} = \crl*{ \omega_1 I_d +
\omega_2(\mathbf{1}\mathbf{1}^\top-I_d)~|~\omega1,\omega_2 \in
\mathbb{R}}$, the loss function $\ploss$ reads
\begin{align}
\ploss\prn{\omega_1 I_d + \omega_2(\mathbf{1}\mathbf{1}^\top-I_d)} &=
\omega_1^6d/2 + \omega_1^4\omega_2^2(3d^2/2 - 3d/2) +
\omega_1^3\omega_2^3(4d^2 - 4d) - \omega_1^3d\nonumber\\ &+
\omega_1^2\omega_2^4(15d^3/2 - 21d^2 + 27d/2)
+
\omega_1\omega_2^5(3d^4 - 15d^3 + 24d^2 - 12d)\\ &+
\omega_2^6(d^5/2 - 3d^4 + 15d^3/2 - 17d^2/2 + 7d/2)+
\omega_2^3(-d^2 + d) + d/2, \nonumber
\end{align}
and the partial derivatives read
\begin{align}\label{eq:grad_eq}
\frac{\partial }{\partial \omega_1} \cL &= 3\omega_2^5d^4 +
d^3(15\omega_1\omega_2^4 - 15\omega_2^5)\nonumber\\ &+
d^2(6\omega_1^3\omega_2^2 + 12\omega_1^2\omega_2^3 - 42\omega_1\omega_2^4 +
24\omega_2^5)\nonumber\\ &+ d(3\omega_1^5 - 6\omega_1^3\omega_2^2 -
12\omega_1^2\omega_2^3 - 3\omega_1^2 + 27\omega_1\omega_2^4 -
12\omega_2^5),\nonumber\\
\frac{\partial }{\partial \omega_2} \cL&=
3\omega_2^5d^5 + d^4(15\omega_1\omega_2^4 - 18\omega_2^5) +
d^3(30\omega_1^2\omega_2^3 - 75\omega_1\omega_2^4 + 45\omega_2^5)\\ &+
d^2(3\omega_1^4\omega_2 + 12\omega_1^3\omega_2^2 - 84\omega_1^2\omega_2^3 +
120\omega_1\omega_2^4 - 51\omega_2^5 - 3\omega_2^2)\nonumber\\ &+
d(-3\omega_1^4\omega_2 - 12\omega_1^3\omega_2^2 + 54\omega_1^2\omega_2^3 -
60\omega_1\omega_2^4 + 21\omega_2^5 + 3\omega_2^2).\nonumber
\end{align}
Eliminating $\omega_1$ using the lex-ordered Gr{\"o}bner basis for the system
of two
polynomials (\ref{eq:grad_eq})
reveals that $\omega_2$ must satisfy the following polynomial equation (see
\pref{sec:ap_groebner} for the complete specification of the corresponding
Gr{\"o}bner basis):
\begin{align}
0&=\omega_2^{20} \left(d^{15} - 2 d^{14}\right) \nonumber\\
&+ \omega_2^{17} \left(36 d^{12}
-
248 d^{11} + 480 d^{10} - 256 d^{9}\right) \nonumber\\
&+ \omega_2^{14} \left(53 d^{10} -
730 d^{9} + 3200 d^{8} - 5184 d^{7} + 2560 d^{6}\right) \\
&+ \omega_2^{11}
\left(15 d^{8} - 402 d^{7} + 3149 d^{6} - 11338 d^{5} + 17664 d^{4} - 9216
d^{3}\right) \nonumber\\
&+ \omega_2^{8} \left(d^{6} - 40 d^{5} + 535 d^{4} - 2735 d^{3} +
8388 d^{2} - 12960 d + 6912\right) \nonumber\\
&+ \omega_2^{5} \left(- 2 d^{3} + 25 d^{2} -
186 d + 279\right) + \omega_2^{2}. \nonumber
\end{align}
Consequently, there exist at most $20$ distinct values of the
$\omega_2$-coordinate of critical points with isotropy equal or greater than
$\Delta S_d$. We defer further investigation of the restriction of the
gradient equations to different fixed point spaces to future work.
\begin{figure}
\centering \includegraphics[scale=0.4]{data/r3_d_k_12_a_gauss.png}
\includegraphics[scale=0.4]{data/r3_d_k_12_b_gauss.png}
\caption{
Spurious minima of optimization problem \pref{prob:opt}
instantiated with $d=k=10$, order $3$ symmetric tensors, the
cubic-Gaussian kernel (\ref{kernel:cubic_gauss}) and the target
tensor $T= \sum_{i=1}^k \e_i^{\otimes{} 3}$. (Left) a spurious minimum of
isotropy
$\Delta
(S_{6}\times S_2 \times S_1^2)$ and function value $1$. (Right)
a spurious minimum of isotropy $\Delta (S_{8}\times S_1^2)$
and function value $1$.}
\label{fig:gauss_a}
\end{figure}
\subsection{Convolutional target tensor}\label{sec:conv}
In this section, we use convolutional target tensors to examine how
symmetry breaking minima adapt to the isotropy of non-identity target tensors.
We use the target tensor
$T_{\text{Lap}} := \tau_3(V_{\text{Lap}})$
associated with the circulant \textit{Laplacian-filter} matrix:
\begin{align}
V_{\text{Lap}} := \begin{pmatrix}
-2 & 1& 0 &\cdots & 0 & 1 \\\\
&\ddots &&\ddots &&\\\\
1 & 0 & \cdots & 0& 1 & -2 \\
\end{pmatrix}.
\end{align}
The circulant structure of $V_{\text{Lap}}$ is equivalent to a $\Delta
\bZ_d$-isotropy which corresponds to convolutional filters used in
state-of-the-art neural
network architectures. Numerical experiments indicate that this choice of
target tensor induces a very rugged ill-conditioned optimization
landscape. In addition, the objective value corresponding to spurious minima
in this model is typically higher compared to that of the identity target
tensor. An example for a spurious minima for which the target tensor is
$T_{\text{lap}}$ is given in \pref{fig:conv}.
\begin{figure}[h]
\centering
\includegraphics[scale=0.35]{data/r3_d_k_20_conv_target.png}
\includegraphics[scale=0.35]{data/r3_d_k_20_a_conv.png}
\caption{
Spurious minima of optimization problem \pref{prob:opt}
instantiated with $d=k=20$, order $3$ symmetric tensors, the
cubic kernel (\ref{prob:kernel_frob}) and the Laplacian target tensor
$T_{\text{Lap}}$. (Left) The target
weight matrix $V_{\text{Lap}}$. (Right) a spurious minimum of function
value $\approx 8.9$. Note that here the gradient norm is of the order of
$1\mathrm{e-}2$.} \label{fig:conv}
\end{figure}
\section{Conclusion}
In this note, we showed that the principle of symmetry breaking minima, in which
spurious minima break the symmetry of global minimizers, applies to symmetric
tensor decomposition problems and kernel-like functions. This has
several implications. First, nonconvex problems which
exhibit this principle are amenable to a recently-developed set of
symmetry-based tools
\cite{arjevani2019spurious,ArjevaniField2020,arjevani2020analytic} which,
among others, provide an analytic characterization of families of critical
points and local minima. This applies in particular to families of spurious
minima for tensor decomposition problems---a fundamental setting in machine
learning. Secondly, we significantly extended the class of, otherwise perhaps
episodic, nonconvex optimization problems in which the symmetry breaking principle had
previously been observed. Thirdly, with the symmetry breaking principle now
established for multivariate polynomials, it is the authors' hope to obtain
finer-grained results by using more tools from algebraic
geometry.
\section*{Acknowledgments}
Part of this work was performed while YA was visiting the Simons Institute for
the Foundations of Deep Learning program. JB acknowledges partial support
from the Alfred P. Sloan Foundation, NSF RI-1816753, NSF CAREER CIF 1845360,
NSF CHS-1901091 and Samsung Electronics. JK acknowledges partial support
from the Simons Collaboration in Algorithms and Geometry and start-up grants
at UT Austin.
\bibliographystyle{ieeetr}
|
\section{Introduction}
\label{sec:intro}
The next generation of neutrino physics experiments heavily utilises LArTPC detectors, which measure particle interactions with precise spatial resolution. The wealth of rich information provided by a LArTPC means automated particle reconstruction can prove challenging, and in recent years machine learning techniques have been increasingly adopted to meet this challenge due to their ability to outperform traditional methods \cite{dune-cvn}.
Meanwhile, in the context of the LHC, the Exa.TrkX collaboration has demonstrated that GNN-based methods show great promise for reconstructing detector hits into particle tracks \cite{exatrkx}. Such methods have the advantage of operating on any data structure which can be described by quantised nodes and their relationships, and also on heterogeneous node definitions, which makes them much more broadly applicable than CNNs, which require input tensors arranged in a regular grid structure.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{plots/lartpc.png}
\caption{The operating procedure of a LArTPC -- ionisation electrons produced by charged particles in the TPC drift towards the collection planes under a strong electric field, and induce signals on the wire planes.}
\label{fig:lartpc}
\end{figure}
The basic operating principles of a LArTPC are as follows: a cryostat filled with purified, cryogenically cooled liquid argon, with a cathode plane on one side, and three planes of wires (the ``anode plane assembly'', or APA) on the opposite side. Charged particles propagating through the inert argon will leave behind a trail of ionisation electrons. The cathode plane is held at a high voltage, inducing an electric field between the cathode and APA which causes these ionisation electrons to drift towards the APA. Upon reaching the APA, the ionisation electrons will induce a signal on the first two wire planes (the U and V planes, or ``induction planes'') before being collected by the final wire plane (the Y plane, or ``collection plane''). Due to the varying pitch angles of the three wire planes, each wire plane gives a different 2D representation of the interaction, which can be reconstructed back to a 3D representation. This process is demonstrated in Fig.~\ref{fig:lartpc}.
LArTPCs are a detector technology seeing heavy use in contemporary neutrino physics, both currently operating (ICARUS \cite{icarus}, MicroBooNE \cite{uboone}) and in construction (SBND, DUNE \cite{dunetdr}). LArTPCs produce high-resolution outputs which are globally sparse and often very large. Since neutrino interactions typically have high sparsity, recent studies have shown considerable efficiency improvements by moving to sparse CNNs \cite{sparse}, but even in these techniques, native detector outputs must be transformed through voxelization in order to produce CNN-compatible inputs. If efficient GNN reconstruction techniques can be developed, they will be able to operate on detector output without any form of downsampling.
\section{Methodology}
\subsection{Graph construction}
\label{sec:graph}
Simulated charged current quasielastic (CCQE) $\nu_{\mu}$ and $\nu_{e}$ interactions in a LArTPC geometry are used to construct 2D detector hit graphs. Neutrino interactions are simulated using GENIE \cite{genie}; particles propagating inside the detector are then simulated with Geant4 \cite{geant}, and processed into wire waveforms by a detector simulation. The raw waveforms extracted from the detector undergo deconvolution \cite{deconv1,deconv2} and Gaussian hit-finding \cite{hitfinding} to produce discrete hit objects. The hits on each wire plane form the nodes of a graph -- each wire plane is treated independently, so three independent graphs are produced for each neutrino interaction.
This simulated dataset consists of 254390 graphs, split into a 95\% sample for training (241670 graphs), and a 5\% sample for validation and testing (12720 graphs). Graphs contain an average of 1529 nodes and 13348 edges. Since EM shower and muon nodes are unique to $\nu_{e}$ and $\nu_{\mu}$ graphs respectively, there are an average of 1097 EM shower nodes per $\nu_{e}$ graph and 1886 muon nodes per $\nu_{\mu}$ graph; there is an average of 68 hadronic nodes overall per graph, since this class occurs in graphs of both neutrino flavours. There are an average of 861 false and 238 hadronic edges per graph; likewise, there is an average of 14860 EM shower edges per $\nu_{e}$ graph, and 8638 muon edges per $\nu_{\mu}$ graph.
Each graph node's features comprise 7 spatial coordinates -- plane, wire and time coordinates in both the local coordinate system within each detector module and the global coordinate system across all modules, and the ID of the TPC in which the hit occurred -- as well as the integral and root mean square width of each hit. Edges are drawn between hits which occupy the same local region (5 wires and 50 time ticks); this window was set by hand to be sufficiently broad that distinct but adjacent energy depositions remain connected, but sufficiently narrow that the number of graph edges remains computationally manageable.
\subsection{Label construction}
\label{sec:label}
CCQE interactions consist of a primary charged lepton ($e$ or $\mu$) emerging from the neutrino interaction vertex, in addition to hadronic activity due to nuclear recoil (typically short, highly ionising proton tracks or diffuse energy deposition from neutrons). All graph edges are placed into one of four categories: \textbf{shower-like}, \textbf{muonic}, \textbf{hadronic} and \textbf{false}.
Each simulated interaction contains a single charged lepton in the final state, in addition to some hadronic activity. Each simulated hit is traced back to the simulated particle responsible for producing it, and that particle's parentage is traced back to the particles produced in the neutrino interaction. Any hits whose ancestor is the primary lepton is tagged as \textbf{shower-like} or \textbf{muonic}, depending on lepton flavour, while the remainder are tagged as \textbf{hadronic}. Edge labels are then produced by matching these labels between hits -- if two hits were produced by the same simulated particle, their connecting edge is labelled according to the hit label; otherwise, the edge is labelled \textbf{false}. EM showers are considered dense objects, meaning hits produced by particles in the EM cascade are considered to have been produced by the particle that instigated the shower for the purpose of labelling.
Muon and hadronic edges tend to leave long straight tracks in the detector -- since protons are more highly ionizing than muons, muon tracks tend to be longer with less energy deposited per hit. Electrons will initiate an electromagnetic shower, which appears in the detector as a fuzzy cone of energy deposition emerging from the vertex. False edges typically appear at interaction vertices, where particles of different types interface with each other. It should be noted that under the current ground truth definition, Michel electrons at the end of a muon track are assigned the muon label, although in future iterations of the model they will be assigned a unique label.
\subsection{Model construction}
\label{sec:model}
An attention message-passing model is used to classify graph edges, derived from HEP.TrkX work in track reconstruction using GNNs at the LHC \cite{heptrkx}. This model takes inital features on each graph node, and then forms edge features by concatenating the incoming and outgoing node's features for each edge and performing convolutions to produce an attention score. This score is then used to propagate information across graph edges to form new node features; this procedure is repeated multiple times to allow information to flow across the graph.
The HEP.TrkX model was modified from a binary edge classifier to a multi-head self-attention model \cite{multihead}. Under this construction, the initial features on each node are repeated to form an independent set of features for each class. During the edge convolution stage, a separate attention score is produced for each class; instead of the sigmoid layer utilised in a binary attention classifier, a softmax layer is applied to normalise the sum of the class's edge attention scores to unity. If one class's attention score for a given edge is high, the scores for the other edges will be weighted down to compensate. These attention scores are used to propagate information and produce new node features independently for each class.
\begin{table}[]
\centering
\begin{tabular}{|c|c|}
\hline
Class & Weight \\
\hline
False & 3.87 \\
EM Shower & 0.38 \\
Muon & 0.94 \\
Hadronic & 13.99 \\
\hline
\end{tabular}
\caption{Class weights used to reweight the loss function. Each class's weight is inversely proportional to the frequency with which the class appears in the training set.}
\label{tab:weights}
\end{table}
The model's objective function is a standard categorical cross-entropy loss between the true and reconstructed edge labels. Since some classes are much more highly represented in the training set than others, each class's contribution to the loss function is weighted proportionally to the inverse of how many edges hold that label in truth. Class weights are shown in Tab.~\ref{tab:weights}. The optimizer and hyperparameters used for training are shown in Tab.~\ref{tab:hyperparams} -- in addition, a learning rate policy is applied to reduce the learning rate by half if the loss does not improve for 5 epochs. Batch size is limited by the variation in graph size; the impact this has on computational efficiency is discussed in Sec.~\ref{sec:discussion}.
\begin{table}[]
\centering
\begin{tabular}{|c|c|}
\hline
Optimizer & AdamW \\
Learning rate & 1e-4 \\
Batch size & 4 \\
\hline
\end{tabular}
\caption{Optimizer and hyperparameters used during model training.}
\label{tab:hyperparams}
\end{table}
\section{Training results}
The model was trained on an NVIDIA Tesla V100 GPU for 100 epochs. After reducing the class probability output to a single class score using an argmax operation, the model achieves 84\% accuracy when classifying graph edges, with a confusion matrix between classes shown in Fig.~\ref{fig:confusion}. The model achieves 90\% efficiency when identifying shower edges, and 81\% efficiency when identifying muon edges, but performs worse on the hadronic and false classes (68\% and 49\% respectively), which are less well represented in the training set.
Event displays comparing ground truth to model output for a $\nu_{e}$ interaction are shown in Fig.~\ref{fig:nue} -- the model correctly identifies the proton track in blue, and reconstructs the root of the shower, but tends to misclassify edges close to the shower boundary as being track-like.
Similarly, event displays for a $\nu_{\mu}$ interaction are shown in Fig.~\ref{fig:numu}. The model can typically identify edges as track-like, but can struggle to disambiguate the muon and hadronic labels, as seen in this example at the end of the muon track. In this example the model likely misclassifies the end of the muon track due to its Bragg peak, which increases energy deposition and can make the track segment look more proton-like. More rarely, the model can misclassify entire $\nu_{\mu}$ events, misidentifying the proton track as muon-like and the muon track as hadronic.
\begin{figure}
\centering
\includegraphics[width=0.48\textwidth]{plots/graph_0006_truth.pdf}
\hspace{0.01\textwidth}
\includegraphics[width=0.48\textwidth]{plots/graph_0006_score.pdf}
\caption{Example graph of a $\nu_{e}$ interaction (left: ground truth, right: model output). Shower-like edges are drawn in red, hadronic edges are drawn in blue, muonic edges are drawn in green and false edges are drawn in grey.}
\label{fig:nue}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.48\textwidth]{plots/graph_0025_truth.pdf}
\hspace{0.01\textwidth}
\includegraphics[width=0.48\textwidth]{plots/graph_0025_score.pdf}
\caption{Example graph of a $\nu_{\mu}$ interaction (left: ground truth, right: model output). Shower-like edges are drawn in red, hadronic edges are drawn in blue, muonic edges are drawn in green and false edges are drawn in grey.}
\label{fig:numu}
\end{figure}
\begin{table}[]
\centering
\begin{tabular}{|c|c|}
\hline
Hidden features & 64 \\
Message-passing iterations & 4 \\
Train time per epoch & 9.5e3~s \\
Validation time per epoch & 78~s \\
GPU Memory & 14.3~GB \\ \hline
\end{tabular}
\caption{Model configuration, training time and memory usage.}
\label{tab:model}
\end{table}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{plots/confusion.png}
\caption{Confusion matrix showing the overlap of true and reconstructed edge labels.}
\label{fig:confusion}
\end{figure}
\section{Discussion}
\label{sec:discussion}
The attention message-passing network developed for use at the LHC forms the basis of the LArTPC model, but differences in detector technology pose unique problems that require more customised solutions solutions. The sequentially layered construction of the HL-LHC provides a natural constraint on the number of graph edges, as each hit on a given layer can only be connected to hits on the subsequent layer. The dense, monolithic nature of a LArTPC provides no such constraint, and so ad hoc constraints must be constructed to prevent the number of graph edges from becoming unmanageably large. As discussed in Sec.~\ref{sec:graph}, a simple region of interest based constraint is used in the work presented here, although more sophisticated techniques are in development.
Additionally, this model could be made more memory-efficient. The number of nodes in each event's graph depends on the spatial extent of the interaction. If several graphs with significantly more nodes than the mean are batched together, memory consumption will spike -- batch size must be limited to prevent these memory spikes from crashing training, but this means the memory consumption for the average batch is sub-optimal. A more sophisticated pseudo-random batching method which prevents large graphs from being batched together could reduce the model's memory overhead, and enable training with larger batch sizes.
Following the promising results of this GNN model, ongoing work will seek to expand and refine this method. Time-matching hits across wire planes will enable new graph edges that allow information to flow between the different 2D representations, leveraging this additional information to build a graph classification which is consistent between wire planes.
Additionally, utilising concepts from instance segmentation may allow misclassified outlier edges to be refined, such as graph edges on the outskirts of an EM shower misclassified as track-like, or proton track edges misclassified as muon-like and vice-versa. If the shower object can be identified as a coherent instance with a majority of shower-like edges, then edges at the shower boundary can be assigned the shower label even if they were individually misclassified by the network.
\section*{Acknowledgements}
This research was supported in part by the Office of Science, Office of High Energy Physics, of the US Department of Energy under Contracts No. DE-AC02-05CH11231 (CompHEP Exa.TrkX) and No. DE-AC02-07CH11359 (FNAL LDRD 2019.017).
This research used resources of the National Energy Research Scientific Computing Center (NERSC), a U.S. Department of Energy Office of Science User Facility located at Lawrence Berkeley National Laboratory, operated under Contract No. DE-AC02-05CH11231.
|
\section{Introduction}
Reinforcement learning (RL) has gained growing popularity in many human-computer interaction (HCI) applications \cite{scheffler2002automatic,bassen2020reinforcement,yom2017encouraging}.
In digital health interventions, for example, RL is a natural choice for personalization as RL agents can continuous adapt their strategies based on users' responses to the interventions \cite{yom2017encouraging}. Moreover, the recent advances in interactive RL calls for contributions from HCI researchers to improve the efficiency of RL algorithms \cite{arzate2020survey}.
While there is a natural fit between RL and HCI, the well-known data greedy property of reinforcement learning makes the RL-based systems often suffer from the cold start problem \cite{sutton2018reinforcement}. In HCI, as very few (or even no) experiences with users are available at the beginning in general, RL agents are required to interact many times with users prior to performing well. Many researchers had made efforts to overcome this challenge by shortening the learning process. Several approaches have been proposed to perform a faster online learning so that less interactions are needed in practice. For instance, Tabatabaei et al. \cite{tabatabaei2018narrowing} and Tomkins et al. \cite{tomkins2019intelligent} make RL algorithms quickly learn from the limited experience at the beginning stage by considering similar users. Gonul et al. \cite{gonul2018optimization} transfer the common knowledge acquired in other environments to get a faster convergence. Alternatively, some researches introduced prior knowledge from historical data and learn an initial policy offline in advance \cite{liao2020personalized,ameko2020offline}. It is also known as the \textit{warm start} RL agents \cite{silva2019neural}.
The significance of such \textit{cold start} problem can be expanded for developing meaningful and useful interactive systems. First, while user experience is highly appreciated in HCI systems, online faster learning approaches might still bother users by too many interactions during collecting enough experience for learning. Second, the 'warm start' RL agents require the feedback from users for very specific tasks, which makes the collection of historical data very expensive. In many cases, the historical data may miss counterfactual information (i.e. what would have been the outcome had interventions or circumstances been different).
To address the above issues, we propose to use cognitive models to complement the missing information for training \textit{warm start} RL agents for HCI applications. Recent advances in psychology and cognitive sciences have offered researchers many modeling tools that can be used for simulate the behaviors of human users in complex task environments. While training RL agents using simulation data is not new \cite{scheffler2002automatic,todi2021adapting}, we believe that RL researchers are yet to harnesses the potentials of adopting mature modeling tools from cognitive psychology. Before proposing a general methodology of using these models to train RL agents, we briefly review some of the most popular models.
\section{Simulate User Behavior Using Cognitive Models}
\label{cognitive}
\subsection{Human Reinforcement Learning}
RL was historically inspired by psychology and neuroscience, so it is no wonder that many modern RL algorithms are also used for modeling human learning \cite{sutton2018reinforcement}. A prominent example is the discovery that human brain uses a mechanism similar to temporal difference learning to update reward expectations, as in the classical Pavlovian conditioning \cite{o2003temporal}. In terms of more complex human behaviors, goal-directed learning and habit learning have also been successfully modeled using model-based and model-free reinforcement learning respectively \cite{daw2005uncertainty}. For HCI applications, RL models are especially useful to model how users learn to make better decisions in recurrent choice environments, where rewards are often temporarily discounted \cite{fu2006recurrent}. In general, modeling both user behavior and agent's behavior using RL creates an intriguing multi-agent RL problem, which is yet to be fully explored (e.g., \cite{peng2020understanding}).
\subsection{Evidence Accumulation Models}
Evidence accumulation models (EAM), also known as sequential sampling models, are a class of models that explain human decision-making as a process of sampling and accumulating evidence before committing to a choice. Original developed for modeling memory retrieval \cite{ratcliff1978theory} and perceptual decisions \cite{purcell2010neurally}, EAMs have recently been adpated to model value-based decision-making tasks \cite{busemeyer2019cognitive}, such as food choices \cite{milosavljevic2010drift} and consumer purchase decisions \cite{krajbich2012attentional}. A unique value of EAMs is that by modeling users' choice and decision time data, their cognitive states can be estimated (e.g., decision threshold, preferences, and biases), which are otherwise unobservable \cite{milosavljevic2010drift}. These hidden states can be of interests in HCI applications, for example, as targets for intervention in behavior change support systems \cite{zhang2019towards}. These states may also be potentially incorporated into reward functions for RL agents if the goal is to change cognitive states rather than overt behaviors.
\subsection{Cognitive Architectures}
Unlike RL and EAMs, which model specific aspects of human cognition (i.e., learning and decision-making), cognitive architectures are general computational frameworks that simulate how human brain produces thoughts, language, and actions. Notable examples of cognitive architectures include the Adaptive Control of Thought - Rational \cite{anderson2004integrated}, Soar \cite{laird2012soar}, and the BOID architecture \cite{broersen2001boid}. With their abilities to emulate human perception, attention, and memory mechanisms, they are especially useful for modeling human-machine interactions in multi-task environments. For example, ACT-R and its variants have been used to simulate human driving behaviors, such as lane-keeping \cite{salvucci2001toward} and car-following \cite{deng2019modeling}. ACT-R has also been used to model menu search in HCI \cite{bailly2014model,hornof1997cognitive} and recently simulated search data have been used to train RL agents \cite{todi2021adapting}.
\section{Train RL Agents by User Simulator}
Many practical HCI problems can be formalized as a finite horizon and discrete time Markov Decision Making (MDP) tasks. We present an overview of agent-environment (computer-human) interaction in Figure \ref{fig:rl}. Here
the agent represents any intelligent and interactive HCI system that interacts with a target user (which is the environment). At each time step, the RL agent observes a contextual representation of the environment, and on that basis selects an action. Afterwards, the environment passes a numerical reward (inferring users' feedback on the given action) back to the agent and updates itself in a new state.
To achieve this goal, ideally, we could collect a set of historical data from real target users, then feed the data into the interaction loop between agent and environment. Based on the trial-and-error mechanism, the RL agent could estimate its optimal policy for maximizing our expected long-term reward. However, as discussed above, such data collection for specific HCI tasks can be very expensive \cite{liao2020personalized}. Our method therefore aims to overcome the situations that is not possible to collect the interactive data directly from the users (i.e. due to restrictions of interactions like when a wrong interaction may cause serious problems). In particular, we follow the second case shown in Figure \ref{fig:rl} and develop a stochastic human simulator based on cognitive models for generating the interactive user data. As mentioned in section \ref{cognitive}, several cognitive models could be utilized to model the human learning and decision making procedures, which could imply the upcoming behaviors (next states) and feedback (rewards) of target users. In this manner, we can generate the required data from the human simulator and pre-learn an optimal initial policy for the warm start RL agent.
\begin{figure*}[ht]
\centering
\includegraphics[width=.9\linewidth]{rl-coginitive_model.png}
\caption{The overview of our methodology, including the agent–environment interaction in a given MDP model and two cases for pre-learning the initial policy for warm start RL agents. }
\label{fig:rl}
\end{figure*}
\section{Case Studies}
\subsection{Promoting Physical Activity}
In one of our earlier projects, the goal of the RL agent was to use mobile notifications to motivate physical exercises, with the constrain that only a limited number of notifications could be sent to the users \cite{wang2021optimizing}. A large data set of running behaviors was accessible, but it lacked the information about the contexts when users decided not to run and the effects of notifications. To pre-train our agent, we simulated users' running decisions using a Dynamic Bayesian network that combined the historical running data and psychological theories about memory and decision-making. Our results indicated that the RL agent pre-trained using this approach could deliver notifications in a manner that realizes higher behavioral impact than context-blind agents. We are currently conducting user studies to further validate our method.
\subsection{Intelligent Driving Assist}
In an ongoing project, we are developing a driving assist that helps drivers to keep lanes. A desirable characteristic is that the intelligent assist should only intervene in situations where the human driver is distracted from the driving task, in order to preserve the autonomy of the driver. To achieve this goal, the first step is to use ACT-R to simulate a human driver in a simple high-way scenario, where discrete distracting events would occur. With the simulate driving data,
we pre-train an RL agent and find the best RL algorithm in simulation experiments. Finally, we plan to conduct an human experiment with a driving simulator to evaluate both the cognitive model and the effectiveness of the RL-based driving assist.
\section{Concluding Remarks}
We propose a methodology to use cognitive models to train \textit{warm start} RL agents for HCI applications. While our previous works have shown some promises of our approach, two caveats are worth noting when applying our approach to HCI applications. First, all the cognitive models we introduced by default can simulate how an average human being behaves, but accounting for individual differences is more challenging. In HCI applications where user personalization is crucial, our approach should be strengthened either by matching parameter values used in the model simulation with the measured parameter values from the real user, or simply by continuing RL based on repeated interactions with the real users. Nonetheless, an RL agent that is able to deal with an average user is already a lot better than a "cold-start" agent.
Second, pre-training RL agents using cognitive models creates a dependency. In a word, the effectiveness of an RL agent is bounded to the validity of the cognitive model used for its training. Moreover, in cases where the RL agent also influence users' cognition and behaviors, additional assumptions may be required to be built into the cognitive model. Therefore, we recommend to use empirically validated cognitive models whenever possible, and otherwise untested assumptions must be stated. On the positive side, our approach does provide an interesting way to test cognitive models using user experiments where trained RL agents are also at play.
\section*{Acknowledgement}
Two case studies in this paper are supported by NWO \& SIA (Grant Number 629.004.013) and the seed fund of SIGs “Autonomous Intelligent Systems” and “Social and Cognitive Modeling” at \href{https://www.uu.nl/en/research/human-centered-artificial-intelligence}{the focus area \textit{Human-centered AI} of Utrecht University} respectively. The contributions from Chao Zhang and Henk Aarts are supported by \href{https://human-ai.nl/}{\textit{the Alliance project HUMAN-AI}} funded by Utrecht University, Eindhoven University of Technology, Wageningen University \& Research, and University Medical Center Utrecht.
\bibliographystyle{unsrt}
|
\section{Introduction and statement of results}
\subsection{Semi-modular forms}
In a landmark 2000 paper \cite{B-O}, Bloch and Okounkov introduced an operator from statistical physics, the $q$-bracket, under the action of which
certain partition-theoretic $q$-series
transform to quasi-modular forms, a class of functions that includes classical modular forms. This work was expanded on by Zagier \cite{Zagier} and subsequent authors, e.g. \cite{Padic, Schneider_arithmetic, Schneider_JTP, JWVI}. In recent work \cite{BOW}, Bringmann-Ono-Wagner produce examples of modular forms, quantum modular forms, and harmonic Maass forms via relations to classical Eisenstein series and properties of $t$-hooks from the theory of integer partitions, again by applying the $q$-bracket.
These works display an intriguing theme: patterns and symmetries within the set $\mathcal P$ of partitions, give rise to modularity properties.
In this paper, we apply similar ideas to answer a theoretical question we pose regarding the existence of classes of special functions: we construct a class of Eisenstein series summed over partitions --- and dependent on symmetries within the set $\mathcal P$ --- to produce first examples of what we call ``semi-modular forms'', which in short are functions of a complex variable enjoying one of the two canonical invariances of modular forms, as well as a strong complementary invariance property.
Let us recall the canonical generators of the {\it general linear group} $GL_{2}(\mathbb Z)$, viz.
\begin{equation*}
T=\begin{pmatrix}
1 & 1 \\
0 & 1
\end{pmatrix},
\ \ \ \
U=\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix},
\ \ \ \
V=\begin{pmatrix}
1 & 0 \\
0 & -1
\end{pmatrix}.
\end{equation*}
An important subgroup of $GL_{2}(\mathbb Z)$ is the {\it modular group} $PSL_{2}(\mathbb Z)$, which is well known to be generated by the ``translation'' matrix $T$ together with the ``inversion'' matrix
\begin{equation*}
S=\begin{pmatrix}
0 & -1 \\
1 & 0
\end{pmatrix}
\in GL_{2}(\mathbb Z).\end{equation*}
Functions on $z \in \mathbb H$ (upper half-plane) invariant under $\left<S,T\right>=PSL_{2}(\mathbb Z)$ up to a simple multiplier in $z$ are {\it modular forms}, a class of functions central to modern number theory.
Of course, the canonical generators $T,U,V$ for $GL_2(\mathbb Z)$ are not unique. Then given that the matrices $S,T$ induce modular forms, a natural question to ask is: can one find examples of a ``nice''
complementary matrix $R\in GL_2(\mathbb Z)$ such that
\begin{equation*}
GL_2(\mathbb Z)=\left<R, S, T\right>,
\end{equation*}
that come with ``nice'' complementary functions invariant on $\left<R, S\right>$ and/or $\left<R, T\right>$, as well as modular forms invariant on $\left<S,T\right>$?
Such families of functions would be, in a sense, ``half-modular'' or {\it semi-modular} as we will denote them, in that they are invariant with respect to two of the three generators $R,S,T$ of $GL_2(\mathbb Z)$, including at least
one of the generators of the modular group.
Take for instance the following matrix $R\in GL_2(\mathbb Z)$:
\begin{equation}
R:=\begin{pmatrix}
-1 & 0 \\
0 & 1
\end{pmatrix}.
\end{equation}
Even functions are the forms invariant under $R$, a very nice class of functions. In recent work \cite{DuncanMcGady}, the matrix $R$ is found by Duncan-McGady to play a natural role in their theory of half-integral weight modular forms defined on the double half-plane $\mathbb C \backslash \mathbb R$.
Indeed, observing that one can rewrite the generators $U,V$ of $GL_2(\mathbb Z)$ as
\begin{equation*}
U=RS,\ \ \ \ V=RS^2,
\end{equation*}
then one can alternatively view
$GL_2(\mathbb Z)=\left< R,S,T\right>$, as desired.
Note that the subgroup $\left<R,T\right>$ induces invariance in even periodic functions of period 1, e.g. the function
\begin{equation*}
f(z)=\cos(2\pi z),\ \ \ \ z\in \mathbb C,
\end{equation*}
is in this class.
From this perspective, modular forms invariant on $\left<S,T\right>$ and even periodic functions of period 1 invariant on $\left<R,T\right>$ are members of the larger class of {semi-modular forms} defined above, functions invariant on two out of three of the generators $R,S,T$.\footnote{While modular forms are also semi-modular, we note that the identification of a third, complementary generator of $GL_2(\mathbb Z)$ such as $R$ is implicit in our definition of semi-modularity.}
\subsection{Partition-theoretic Eisenstein series}
Giving further consideration to the generators $R,S,T$ of $GL_2(\mathbb Z)$, one wonders about the other, more obscure-feeling sibling class of functions invariant on $\left<R,S\right>$ that should complete the family $\{\left<R,S\right>,\left<R,T\right>,\left<S,T\right> \}$ of ``semi-modular forms'', complementing modular forms and even periodic functions of period 1.
This type of semi-modular family does not appear to be widely studied in the literature; we seek explicit examples. Here we construct semi-modular forms invariant under $\left<R,S\right>$ to complete the family, by fusing classical Eisenstein series with ideas from partition theory.
Recall for $k>2, \tau\in \mathbb H$, the weight $k$ {\it Eisenstein series} (a double summation) which is the prototype of an integer-weight holomorphic modular form invariant on $PSL_2(\mathbb Z)$:
\begin{equation*
G_{k}(\tau)=\sum_{\substack{a,b\in\mathbb Z \\ (a,b)\neq (0,0)}} (a\tau+b)^{-k}.
\end{equation*}
If the weight $k>2$ is odd, then
$G_k(\tau)=0$. Taking $k \mapsto 2k$, then for $k>1$, the function $G_{2k}:\mathbb H \to \mathbb C$ satisfies the defining properties of a weight $2k$ modular form:
\begin{enumerate}[(i)]
\item $G_{2k}(-\frac{1}{\tau})=\tau^{2k}G_{2k}(\tau)$\ (weighted invariance under inversion matrix $S$),
\item $G_{2k}(\tau+1)=G_{2k}(\tau)$ \ (invariance under translation matrix $T$).
\end{enumerate}
We mimic this classical function using ideas from partition theory, to construct semi-modular partition-theoretic Eisenstein series invariant on $\left<R,S\right>$. Now, for $N\geq 1$ one immediately sees that the truncated Eisenstein series
\begin{equation}\label{truncated}
\sum_{\substack{|a|\leq N,|b|\leq N \\ (a,b)\neq (0,0)}} (az+b)^{-2k}
\end{equation}
still respects (i) above, and is an even function of $z\not\in \mathbb R$,
an observation expanded on significantly in \cite{DuncanMcGady}.
Thus the double sum \eqref{truncated} is semi-modular with respect to $\left< R,S\right>
; as we remark explicitly below, this {\it ad hoc} example has a
partition-theoretic interpretation.
Recall $\mathcal P$ is the set of integer partitions, including the empty partition $\emptyset$. As we detail explicitly in Section \ref{Sect2} below, we define a {\it Ferrers-Young lattice} in the complex plane,
which is a four-fold symmetric version of the classical Ferrers-Young diagram\footnote{Ferrers diagrams use dots to illustrate partitions; Young diagrams use unit squares in identical arrangements.} of an integer partition $\lambda\in \mathcal P$, with the vertices (dots) of the Ferrers diagram
plotted according to a natural rule (see Section \ref{Sect2}) in the lattice $\left<z,1\right> \subset \mathbb C\backslash \mathbb R$ generated by the fundamental pair $z$ and $1$, for fixed $z\in \mathbb C, z\not\in \mathbb R$.
Summing over points $\omega=az+b \in \mathscr F(\lambda, z)$ consisting of vertices of the Ferrers-Young lattice for partition $\lambda$, for $k\in \mathbb Z$ we define an auxiliary {\it single-partition Eisenstein series}
\begin{equation}\label{Eisenstein2}
f_{k}(\lambda, z)\ :=\ \frac{1}{4}\sum_{\omega \in \mathscr F(\lambda,z)} \omega^{-k}\ =\ \frac{1}{4}\sum_{\ az+b\in \mathscr F(\lambda,z)}(az+b)^{-k},
\end{equation}
with $f_k(\emptyset, z):=0$. (The factor ${1}/{4}$ compensates for the four-fold symmetry of $\mathscr{F}(\lambda,z)$.) As we show in Section \ref{proofs}, if $k=0$ then $f_0(\lambda, z)=|\lambda|$, the {\it size} (sum of parts) of partition $\lambda$; thus $f_k(\lambda, z)$ generalizes $|\lambda|$.
\begin{remark}
In this combinatorial setting, the truncated Eisenstein series \eqref{truncated} represents \begin{flalign*}\sum_{\substack{|a|\leq N,|b|\leq N \\ (a,b)\neq (0,0)}} (az+b)^{-2k}\ =\ 4\cdot f_{2k}\left((N)^{N}, z\right)+(2+z^{2k}+z^{-2k})\sum_{1\leq m\leq N}m^{-2k}\end{flalign*} for $z\not\in \mathbb R$, where $(N)^{N}\in \mathcal P$ is the partition of size $N^2$ consisting of $N$ copies of $N$; thus
\begin{flalign*} f_{2k}\left((N)^{N}, z\right)\ \sim\ \frac{1}{4}\left[G_{2k}(z)-(2+z^{2k}+z^{-2k})\zeta(2k)\right]\end{flalign*}
as $N\to\infty$ for $k>1$. We note the factor $2+z^{2k}+z^{-2k}$ is also invariant on $\left<R,S\right>$
\end{remark}
Then analytic properties of $f_k(\lambda, z)$ yield semi-modular behavior of the following finite {\it partition Eisenstein series} summed over partitions of $n\geq 1$ for $z\not\in \mathbb R$:
\begin{equation}\label{partEisenstein}
g_{k}(n, z):=\sum_{\lambda \vdash n} f_k(\lambda, z),
\end{equation}
where ``$\lambda \vdash n$'' means $\lambda$ is a partition of $n$, with $g_k(0,z):=0$. We note $g_0(n, z)=n\cdot p(n)$.
\begin{theorem}\label{Thm1}
Let $k\in \mathbb Z, n\geq 0, z\not\in \mathbb R$. If $k$ is an odd integer then $g_k(n,z)=0.$ For even weights, $g_{2k}(n,z)$ satisfies the following properties:
\begin{enumerate}[(i)]
\item $g_{2k}(n,-\frac{1}{z})=z^{2k}g_{2k}(n,z)$\ (weighted invariance under $S$),
\item $g_{2k}(n,-z)=g_{2k}(n,z)$ \ (invariance under $R$).
\end{enumerate}
\end{theorem}
By Theorem \ref{Thm1}, then, $g_{k}(n,z)$ is semi-modular in $z$ over $\left< R, S\right>$; it will serve as a building block for this class of semi-modular forms.
In the next section we see that the identity (i) above has the following combinatorial interpretation: {\it taking $z \mapsto -1/z$ produces partition conjugation in certain ``dual'' Ferrers-Young lattices}
Let us now consider the following two-variable generating function:
\begin{flalign}\label{partEisenstein2}
\mathscr{G}_{k}(z)\ =\ \mathscr{G}_{k}(z,q)\ :&= \sum_{n\geq 1} g_k(n, z)q^n\\ \nonumber &= \sum_{\lambda \in \mathcal P}f_k(\lambda, z)q^{|\lambda|},
\end{flalign}
valid for $z\not\in \mathbb R, |q|<1$. Then $\mathscr{G}_{k}(z)$ inherits semi-modularity in $z$ from its coefficients.
\begin{corollary}\label{Cor1}
Let $k\in \mathbb Z, z\not\in \mathbb R$. If $k$ is an odd integer then $\mathscr{G}_k(z)=0.$ For even weights, $\mathscr{G}_{2k}(z)$ satisfies the following properties:
\begin{enumerate}[(i)]
\item $\mathscr{G}_{2k}(-\frac{1}{z})=z^{2k}\mathscr{G}_{2k}(z)$\ (weighted invariance under $S$),
\item $\mathscr{G}_{2k}(-z)=\mathscr{G}_{2k}(z)$ \ (invariance under $R$).
\end{enumerate}
\end{corollary}
Again, the transformation $z\mapsto -1/z$ appears in connection with partition conjugation. As an infinite series, $\mathscr{G}_k(z)=\mathscr{G}_k(z,q)$ appears as something of a close cousin to functions in the realm of modular forms. For instance, the simplest case $k=0$ gives
\begin{equation*}
\mathscr{G}_{0}(z)\ =\ \sum_{n\geq 1} n\cdot p(n)q^
\ =\ \prod_{m\geq 1}(1-q^m)^{-1}\cdot\sum_{n\geq 1}\sigma_1(n)q^n, \end{equation*}
which connects to well-known identities writing $G_{2k}(\tau)$ in terms of $\sum_{n\geq 1}\sigma_{2k-1}(n)q^n$ when $q:=e^{2\pi i \tau},\tau\in \mathbb H$ (see e.g. \cite{Apostol}), linking
$ \mathscr{G}_{0}(z)=\mathscr{G}_{0}(z,q)$ to the quasi-modular form $G_2(\tau)$.
\begin{remark}
One wonders more generally if $\prod_{m\geq 1}(1-q^m)\cdot \mathscr{G}_{2k}(z,q)$ is worthy of deeper study, noting by \eqref{partEisenstein} it represents the $q$-bracket of $f_{2k}(\lambda,z)$ in the sense of Bloch-Okounkov.
\end{remark}
\section{Proofs of Theorem \ref{Thm1} and Corollary \ref{Cor1}}\label{Sect2whole}
\subsection{Ferrers-Young diagrams in the complex plane}\label{Sect2}
Let $\lambda=(\lambda_1,\lambda_2,\ldots,\lambda_r), \lambda_1 \geq \lambda_2 \geq \dots \lambda_r\geq 1$, denote a nonempty partition, with $\emptyset \in \mathcal P$ denoting the empty partition; we call the number of parts $r\geq 0$ the {\it length} of the partition. We write $\lambda \vdash n$ to indicate that $\lambda$ is a partition of $n$, noting that $\emptyset\vdash 0$. We recall the classical {\it Ferrers-Young diagram} of a partition as well as {\it partition conjugation} (swapping rows and columns of the Ferrers-Young diagram); see e.g. \cite{Andrews}. For instance, the partition $\lambda=(3,2,2,1)$ and its conjugate $\overline{\lambda}=(4,3,1)$ have the following Ferrers-Young diagrams, respectively:
\vspace{0.5cm}
\hfill \begin{tikzpicture}[inner sep=0pt,thick,
dot/.style={fill=black,circle,minimum size=4.5pt}]
\node[dot] (a) at (0,0) {};
\node[dot] (a) at (1,1) {};
\node[dot] (a) at (0,1) {};
\node[dot] (a) at (0,2) {};
\node[dot] (a) at (1,2) {};
\node[dot] (a) at (0,3) {};
\node[dot] (a) at (1,3) {};
\node[dot] (a) at (2,3) {};
\end{tikzpicture}
\hfill \hfill \begin{tikzpicture}[inner sep=0pt,thick,
dot/.style={fill=black,circle,minimum size=4.5pt}]
\node[dot] (a) at (0,2) {};
\node[dot] (a) at (0,3) {};
\node[dot] (a) at (1,3) {};
\node[dot] (a) at (0,4) {};
\node[dot] (a) at (1,4) {};
\node[dot] (a) at (2,4) {};
\node[dot] (a) at (3,4) {};
\node[dot] (a) at (2,3) {};
\end{tikzpicture}\hfill
\vspace{0.5cm}
For any point $z=x+iy \in \mathbb{C}\backslash \mathbb R$
we define a four-fold {\it Ferrers-Young lattice} representing partition $\lambda$, to be the set of points
\begin{equation}\mathscr F(\lambda,z): = \{ az +b : 1\leq |b| \leq r \text{ and } 1\leq |a| \leq \lambda_{|b|} \},\end{equation}
where $r$ is the length of $\lambda$. In words, plot the Ferrers-Young diagram on the vertices in the corner of the first quadrant of the lattice $\left<z,1\right>$ such that the top edge of the diagram is parallel to the line $tz, \ t\in \mathbb R$, the left-hand edge is parallel to the real number line, and neither edge falls on its respective border; likewise, plot the diagram into the other three quadrants with top and left edges still parallel to the line $tz$ and real axis, respectively.
For an illustration, set $z=1+i$ and take $\lambda = (3,2,2,1)$ as above. Then the Ferrers-Young lattices $\mathscr F(\lambda,z)$ (left) and $\mathscr F(\overline{\lambda},z)$ (right) are both illustrated, respectively, here:
\vspace{0.5cm}
\hfill \begin{tikzpicture}[scale=.3]
\draw[<->] (-7,0)--(7,0)node[anchor=west]{$x$};
\draw[<->] (0,-7)--(0,7)node[anchor=south]{$iy$};
\draw[dashed] (-5,-5)--(5,5)node[anchor=west]{$tz$};
\draw[fill=black] ({1+1},1) circle (.1);
\draw[fill=black] ({1+2},2) circle (.1);
\draw[fill=black] ({1+3},3) circle (.1);
\draw[fill=black] ({2+1},1) circle (.1);
\draw[fill=black] ({2-1},-1) circle (.1);
\draw[fill=black] ({1-1},-1) circle (.1);
\draw[fill=black] ({1-2},-2) circle (.1);
\draw[fill=black] ({1-3},-3) circle (.1);
\draw[fill=black] ({-2+1},1) circle (.1);
\draw[fill=black] ({-1+1},1) circle (.1);
\draw[fill=black] ({-1+2},2) circle (.1);
\draw[fill=black] ({-1+3},3) circle (.1);
\draw[fill=black] ({-2-1},-1) circle (.1);
\draw[fill=black] ({-1-1},-1) circle (.1);
\draw[fill=black] ({-1-2},-2) circle (.1);
\draw[fill=black] ({-1-3},-3) circle (.1);
\draw[fill=black] (4,1) circle (.1);
\draw[fill=black] (4,2) circle (.1);
\draw[fill=black] (5,2) circle (.1);
\draw[fill=black] (5,1) circle (.1);
\draw[fill=black] (-2,1) circle (.1);
\draw[fill=black] (0,2) circle (.1);
\draw[fill=black] (-1,2) circle (.1);
\draw[fill=black] (-3,1) circle (.1);
\draw[fill=black] (-4,-1) circle (.1);
\draw[fill=black] (-4,-2) circle (.1);
\draw[fill=black] (-5,-2) circle (.1);
\draw[fill=black] (-5,-1) circle (.1);
\draw[fill=black] (2,-1) circle (.1);
\draw[fill=black] (0,-2) circle (.1);
\draw[fill=black] (1,-2) circle (.1);
\draw[fill=black] (3,-1) circle (.1);
\begin{scope}[xshift=10in]
\draw[<->] (-7,0)--(7,0)node[anchor=west]{$x$};
\draw[<->] (0,-7)--(0,7)node[anchor=south]{$iy$};
\draw[dashed] (-5,-5)--(5,5)node[anchor=west]{$tz$};
\draw[fill=black] ({1+1},1) circle (.1);
\draw[fill=black] ({1+2},2) circle (.1);
\draw[fill=black] ({2+1},1) circle (.1);
\draw[fill=black] ({3+1},1) circle (.1);
\draw[fill=black] ({1-1},-1) circle (.1);
\draw[fill=black] ({1-2},-2) circle (.1);
\draw[fill=black] ({2-1},-1) circle (.1);
\draw[fill=black] ({3-1},-1) circle (.1);
\draw[fill=black] ({-1+1},1) circle (.1);
\draw[fill=black] ({-1+2},2) circle (.1);
\draw[fill=black] ({-2+1},1) circle (.1);
\draw[fill=black] ({-3+1},1) circle (.1);
\draw[fill=black] ({-1-1},-1) circle (.1);
\draw[fill=black] ({-1-2},-2) circle (.1);
\draw[fill=black] ({-2-1},-1) circle (.1);
\draw[fill=black] ({-3-1},-1) circle (.1);
\draw[fill=black] (4,3) circle (.1);
\draw[fill=black] (5,3) circle (.1);
\draw[fill=black] (4,2) circle (.1);
\draw[fill=black] (5,4) circle (.1);
\draw[fill=black] (2,3) circle (.1);
\draw[fill=black] (3,4) circle (.1);
\draw[fill=black] (0,2) circle (.1);
\draw[fill=black] (1,3) circle (.1);
\draw[fill=black] (-2,-3) circle (.1);
\draw[fill=black] (-1,-3) circle (.1);
\draw[fill=black] (0,-2) circle (.1);
\draw[fill=black] (-3,-4) circle (.1);
\draw[fill=black] (-4,-3) circle (.1);
\draw[fill=black] (-5,-4) circle (.1);
\draw[fill=black] (-4,-2) circle (.1);
\draw[fill=black] (-5,-3) circle (.1);
\end{scope}
\end{tikzpicture}\hfill\hfill
\vspace{0.5cm}
The single-partition Eisenstein series $f_k(\lambda,z)$ defined in \eqref{Eisenstein2} is the sum over the vertices $\omega$ of the lattice $\mathscr F(\lambda,z)$. We note that conjugation looks like ``skewed'' rotation within the lattice. Nice properties of $f_k(\lambda,z)$ resulting from symmetries between conjugate partitions together with easy complex-analytic properties of Ferrers-Young lattices, will yield the semi-modularity of $g_{k}(n,z)$ and $\mathscr G_{k}(z)$ in $z\in \mathbb C\backslash \mathbb R$.
\subsection{Proofs}\label{proofs}
The main results follow almost immediately from the following lemma
\begin{lemma}\label{Lemma}
For $k \in \mathbb Z, z \in \mathbb C\backslash\mathbb R$, the function $f_{k}(\lambda,z)$ has the following properties:
\begin{enumerate}[(i)]
\item If $k=0$ then $f_{k}(\lambda,z)=|\lambda|$ (thus $f_k$ represents a generalization of partition size).
\item If $k$ is odd then $f_k(\lambda,z )=0$.
\item If $k$ is even then $f_k(\lambda,z)$ is an even function of $z$.
\item Moreover, we have \[z^{2k}f_{2k}(\lambda,z)=f_{2k}\left(\overline{\lambda},-\frac{1}{z}\right).\]
\end{enumerate}
\end{lemma}
\begin{proof}[Proof of Lemma \ref{Lemma}]
To establish these properties we start by writing the function $f_k(\lambda,z)$ as defined in \eqref{Eisenstein2} in the following way. Let
\begin{align*}
f^{(1)}_k(\lambda,z) &=\frac{1}{4}\sum_{1\leq b\leq r} \sum_{1\leq a\leq \lambda_b} (az+b)^{-k}, \\
\nonumber f^{(2)}_k(\lambda,z) &=\frac{1}{4}\sum_{1\leq b\leq r} \sum_{1\leq a\leq \lambda_b} (az-b)^{-k}, \\
\nonumber f^{(3)}_k(\lambda,z) &=\frac{1}{4}\sum_{1\leq b\leq r} \sum_{1\leq a\leq \lambda_b} (-az-b)^{-k}, \\
\nonumber f^{(4)}_k(\lambda,z) &=\frac{1}{4}\sum_{1\leq b\leq r} \sum_{1\leq a\leq \lambda_b} (-az+b)^{-k},
\end{align*}
viz. the sums over the four individual quadrants of $\mathscr F(\lambda,z)$, so that
\begin{align}\label{summands}
f_k(\lambda,z)&=f^{(1)}_k(\lambda,z)+f^{(2)}_k(\lambda,z)+f^{(3)}_k(\lambda,z)+f^{(4)}_k(\lambda,z)\\
\nonumber &= \frac{1}{4}\sum_{1\leq b\leq r} \sum_{1\leq a\leq \lambda_b} \left[(az+b)^{-k}+(az-b)^{-k}+(-az-b)^{-k}+(-az+b)^{-k} \right].
\end{align}
The claimed properties are easily deduced from the summands on the right-hand side of this expression. If $k=0$, then clearly \begin{equation*} f_0(\lambda,z) = \sum_{1\leq b \leq r}\sum_{1\leq a\leq \lambda_b} 1 = |\lambda|,\end{equation*}
which establishes (i). If $k$ is odd, positive and negative summands cancel: \begin{equation*}(az+b)^{-k}+(az-b)^{-k}-(az+b)^{-k}-(az-b)^{-k}=0,\end{equation*}
which gives (ii). If we replace $z$ with $-z$, the summands become \begin{equation*} (a(-z)+b)^{-2k}+(a(-z)-b)^{-2k}+(-a(-z)-b)^{-2k}+(-a(-z)+b)^{-2k},\end{equation*}
which are identically the summands on the right side of \eqref{summands}, giving (iii).
To prove (iv), note that for even weights $2k\neq 0$, one can write \begin{equation*} f_{2k}(\lambda,z) = \frac{1}{2}\cdot \sum_{1\leq b\leq r}\sum_{1\leq a \leq \lambda_b} \left[(az+b)^{-2k} + (az-b)^{-2k} \right].\end{equation*} Much as with classical Eisenstein series, factoring out $(-z)^{-2k}$ yields
\begin{align*}
f_{2k}(\lambda,z)&=(-z)^{-2k}\cdot \frac{1}{2} \cdot \sum_{1\leq b\leq r}\sum_{1\leq a \leq \lambda_b} \left[ (b(-1/z) -a)^{-2k} + (b(-1/z) +a)^{-2k}) \right] \\
\nonumber &= (-z)^{-2k}\cdot \frac{1}{2} \cdot \sum_{1\leq a\leq s}\sum_{1\leq b \leq \overline{\lambda}_a} \left[ (a(-1/z)+b)^{-2k} + (a(-1/z)-b)^{-2k}) \right]\\
\nonumber &=z^{-2k} f_{2k}(\overline{\lambda},-1/z),
\end{align*}
since interchanging coefficients $a,b$ and order of summation in the second equality is equivalent to summing over lattice $\mathscr F (\overline{\lambda},-1/z)$ for the conjugate partition $\overline{\lambda}=(\overline{\lambda}_1, \overline{\lambda}_2, \dots, \overline{\lambda}_s)$.\end{proof}
\begin{remark} An interesting feature of this proof is the explicit interdependence of partition conjugation $\lambda \mapsto \overline{\lambda}$ and complex variable inversion $z\mapsto -1/z$, yielding a duality between $\mathscr F(\lambda,z)$ and $\mathscr F(\overline{\lambda},-1/z)$.\end{remark}
\begin{proof}[Proof of Theorem \ref{Thm1}]
We note the finite double series $g_{k}(n,z)$ defined in \eqref{partEisenstein} is valid for all $z\not\in \mathbb R$ and all $k$. It is clear from Lemma \ref{Lemma} that since the $f_k$ all vanish if $k$ is odd, then $g_k(n,\lambda)=0$ as well. It is also clear that the evenness of the $f_{2k}$ in the $z$-aspect yields evenness of $g_{2k}(n,z)$ in $z$. Observing that the partitions of $n$ represent identically the same set as the conjugate partitions of $n$, it follows from \eqref{partEisenstein} together with Lemma \ref{Lemma} that
\begin{equation*
g_{2k}(n, -1/z)=z^{2k}\sum_{\lambda \vdash n} f_{2k}(\overline{\lambda}, z)=z^{2k}\sum_{\lambda \vdash n} f_{2k}(\lambda, z)=z^{2k}g_{2k}(n, z),
\end{equation*}
which completes the proof of the theorem. \end{proof}
\begin{proof}[Proof of Corollary \ref{Cor1}]
Note from the geometric visualization of the Ferrers-Young lattice in $\mathbb C$, that for any $\lambda$ we have $|1+z| \leq |\omega|<|\lambda|\cdot |1+z|$ for every $\omega\in\mathscr F(\lambda,z) $. Then for $n=|\lambda|, \ z\not\in \{-1,0\}$, when $k\geq 0$ we have that $|f_{k}(\lambda,z)| \leq n |1+z|^{-k}$, thus $|g_{k}(n,z)|\leq n\cdot p(n)|1+z|^{-k}$ with $p(n)$ the classical partition function (number of partitions of $n$). Therefore, for $k\geq0$ the convergence of $\mathscr G_{k}(z,q)$ as defined in \eqref{partEisenstein2} follows from the well-known convergence of the series \begin{equation*}\sum_{n\geq 1} n \cdot p(n)q^n\end{equation*} for $|q|<1$ (see \cite{Andrews}). By a similar argument, for $k<0$ let $k':=-k>0$; then we have that $|f_{k}(\lambda,z)| < n^{k'+1} |1+z|^{k'}$, thus $|g_{k}(n,z)|< n^{k'+1} p(n)|1+z|^{k'}$ and convergence follows by comparison with $\sum_{n\geq 1} n^{k'+1} p(n)q^n<\infty$ for $|q|<1$.
By Theorem \ref{Thm1}, that the $g_{k}$ vanish when $k$ is odd yields the vanishing of $\mathscr G_{k}$; and the evenness of the $g_{2k}$ in the $z$-aspect induces evenness of $\mathscr G_{2k}(z)$ as well.
Finally, for the functional equation in $z$, it suffices to note by Theorem \ref{Thm1} that
\begin{flalign*
\mathscr{G}_{2k}(-1/z)= \sum_{n\geq 1} g_{2k}(n, -1/z)q^n = z^{2k}\sum_{n\geq 1} g_{2k}(n, z)q^n=z^{2k}\mathscr{G}_{2k}(z).
\end{flalign*}\end{proof}
\section{Further questions}
Classical modular forms enjoy many nice interrelations, and structural properties such as being finitely generated (see \cite{Ono_web}), viz. any holomorphic integer-weight modular form can be expressed as a combination of the classical Eisenstein series $G_4(\tau), G_6(\tau)$. Our definition of semi-modular forms was algebraically inspired by ideas about generators of $GL_2(\mathbb Z)$, without looking in this study for analogues of growth conditions, being finitely-generated or other interesting properties of modular forms.
Then one wonders: Do the partition Eisenstein series form a basis for a suitably defined space of functions?
Are there further connections to modular forms theory, such as links to quasi-modular forms or other generalized modular forms like Hilbert modular forms?
Finally, considering the uniquely combinatorial-analytic constructions in Section \ref{Sect2whole}, might other families of semi-modular forms exist that involve ``complementary'' transformation matrices {\it different} from $R$ above,
arising from other types of naturally-occurring mathematical structures --- either within the set of partitions or from elsewhere in mathematics?
\section*{Acknowledgments}
The authors are grateful to Agbolade Patrick Akande, Marie Jameson, David McGady, Ken Ono, Paul Pollack, Larry Rolen, A. V. Sills and Ian Wagner for conversations that informed our study. We are also very thankful to the anonymous referee for comments that strengthened this work. The first author was partially supported by the Research and Training Group grant DMS-1344994 funded by the National Science Foundation.
|
\chapter{Grasp stability analysis --- Theory and Praxis}\label{sec:bridge}
In Chapter~\ref{sec:related} we argued that the notion of a grasp's stability
is of foundational importance to the majority of manipulation tasks and hence
many competing definitions of stability have been proposed by the grasp
modeling community. In essence, all these definitions share a common goal: to
maintain a grasp such that the grasped object remains relatively at rest with
respect to the hand throughout the task. Motions in reaction to a disturbance
that lead to another static equilibrium where again the object is at rest with
respect to the hand may be allowed. We will use this informal definition of
stability in the following general discussion of manipulation. In
Chapter~\ref{sec:definition} we will provide a more precise definition of
stability in the context of our own grasp model.
In practice, maintaining stability as defined above throughout a task requires
maintaining stability with respect to every disturbance the grasp will
encounter throughout that task. Determining the ability of a grasp to resist
given disturbances, formulated as external wrenches applied to the grasped
object, is equivalent to computing the stability of a multi-body system with
frictional contacts under applied loads. Problems of this kind are thus
pervasive in grasp analysis and may be encountered in many other scenarios
that rely on the stability of assemblies of general rigid bodies with
frictional contacts.
Inspired by the queries formulated by Bicchi~\cite{BICCHI94} and quoted in
Chapter~\ref{sec:related_closure} we formulate our own pair of queries. We
argue that these queries are foundational to the majority of robotic
manipulation tasks:
\begin{displayquote}
\textit{Given a set of actuator commands and an external disturbance will the
system as described above remain stable?}
\end{displayquote}
We can also formulate the inverse query to obtain useful insight into
how to control the hand:
\begin{displayquote}
\textit{Given an external disturbance, how must we command the actuators to
guarantee the grasp remains stable?}
\end{displayquote}
In the context of robotic manipulations the ability to answer these queries is
of great practical use. A grasp model that can answer these queries must
capture the interplay of contact forces, joint torques and externally applied
wrenches. It must be able to accurately predict how joint torques and external
wrenches are transmitted through the object and distributed across the
contacts taking into account the unilaterality of contacts, the specific
actuation scheme of the hand as well as the nonlinear nature of friction laws.
So why is there no 'grand unified theory of grasp stability'?
As discussed in~\ref{sec:related_closure} much of the existing grasp analysis
literature makes the simplifying assumption that all contact wrenches are
being actively controlled at all times. This can be done directly through
commanding appropriate joint torques or more indirectly through setting
controllable compliance parameters such as servo gains. This assumption allows
the analysis of grasp stability through the equilibrium equations and
friction laws alone and allow us to compute optimal contact forces and the
joint torques necessary to balance them. This is incredibly powerful, as for
any specific wrench applied to the object encountered throughout a task we can
compute the specific optimal joint torques for stability.
In order to use this in practice, however, we have to make a string of
assumptions:
\begin{enumerate}
\item We assume perfect knowledge of the disturbance to the object
that must be balanced at all times;
\item We assume that we can actively control the contact wrenches at every
contact;
\item We assume that we can actively control the joint torques required
for equilibrium;
\item We assume that we can accurately control the torque
output of the hand actuators.
\end{enumerate}
In the majority of robotic manipulation tasks these assumptions do not hold.
First, the exact wrench acting on an object is difficult to compute --- it
requires knowledge of the mass and inertial properties of the object as well
as its exact trajectory. Any additional disturbance cannot be accounted for
unless the fingers are equipped with tactile sensors. Second, many robotic
hands are kinematically deficient and contain links with limited mobility.
This means that we cannot directly control (through controlling joint torques)
the contact wrench at a contact on the palm of the hand for instance. Wrenches
at such a contact can only arise passively by transmission of the disturbance
on the grasped object or wrenches at other contacts through the object.
Third, the kinematics of the hand may not permit explicit control of the
torques at every individual joint. This is the case for the class of
underactuated hands, where joint torques by definition may not be
independently controlled but are also a function of the kinematic composition
and the pose of the hand. Finally, the actuation method of the hand may
prevent accurate torque control at the joints. Most robotic hands use highly
geared motors for instance, which makes accurate sensing and control of the
torques at the hand joints all but impossible.
Therefore, in practice it is rarely the case that contact wrenches are
actively controlled in response to disturbances to the grasp. Unfortunately,
this means that the existence of contact wrenches that satisfy the equilibrium
equations as well as friction constraints is a necessary but by no means
sufficient condition for the ability of a grasp to resist a given disturbance.
In general such contact wrenches will not arise, unless we are actively
controlling the contact wrenches to that end.
Having discussed the limiting assumptions of the grasp analysis theory it is
instructive to think about why robotic hands have not evolved in such a way as
to fulfill the assumptions listed above. We discussed why these assumptions
are difficult to satisfy in practice and why attempts to remove those
assumptions introduce their own limitations. Still, it seems to not provide
enough justification for the schism that separates the theory and the robotic
hands commonly in use today. After all, why build hands that are so far
removed from the theory that allows their analysis?
In order to answer this question we must revisit a concept, which we call
\textit{passive stability} or \textit{passive resistance}. It denotes the
ability of a grasp to resist a given applied wrench without active control of
the hand, but through purely passive phenomena. In
Chapter~\ref{sec:intro_background} we mentioned two such phenomena
contributing to passive stability: underactuation and nonbackdrivability. Let
us for now focus on nonbackdrivability, which we believe to have had a large
influence on the manipulation field despite the community being largely
unaware of it.
Nonbackdrivability allows practitioners to greatly simplify robotic grasping.
We can often apply actuator torques that close the fingers around the object
without necessarily worrying if these will balance out once contact is made:
the fingers jam as the hand squeezes the object, and the gearboxes between
joints and actuators provide additional structural torques. If the grasp
geometry is adequately chosen, the equilibrium joint torques arise passively
when the fingers squeeze the object between them and a stable grasp arises.
For example, in the grasp in Fig.~\ref{fig:package} it is sufficient to
actively load the joints of one finger. The nonbackdrivability of the other
finger means the object will be stably grasped and equilibrium joint torques
arise passively in the non-actuated finger. The same phenomenon can allow a
grasp to withstand a range of disturbances applied to the object without a
change in the actuator commands. If chosen wisely, the initially applied
actuator forces --- called a \textit{preload} --- are sufficient to balance
the object throughout the task and various corresponding different
disturbances. Again, if the grasp geometry is adequately chosen, equilibrium
joint torques arise passively when disturbance wrenches applied to the object
push it against the fingers. This is the true power of passive resistance.
We believe this characteristic to be the reason why robotic manipulation
without explicit real-time control of the hand actuators has become so
commonplace. Reactions to disturbances arising passively due to
nonbackdrivable actuators remove the need for complex hand control schemes and
the high fidelity sensing they require. If the grasp geometry and actuator
commands are chosen wisely the grasp will be passively stable to a range of
disturbances greatly simplifying the control of the hand. We simply need to
pick a constant command appropriate to the task. So the answer to the question
as to why most robotic hands lack the complexity required for the application
of the grasp theory is that practitioners can rely on passive stability
instead. This allows them to form stable grasps, even though they lack the
tools required to analyze them.
Underactuated hands provide similar advantages: These hands make use of their
passive compliance in order to conform around objects. Soft robotic hands take
this approach to the extreme. Most of the hands commonly found in research
labs today exhibit either underactuation, nonbackdrivability or both. They all
have in common that their passive behavior greatly simplifies control, which
explains their popularity.
\section{A representative example problem}\label{sec:bridge_example}
In order to illustrate the implications of passive stability on robotic
manipulation let us consider the grasp in Fig.~\ref{fig:package}. Does the
grasp remain stable if we apply either disturbance $\bm{w}_1$ or $\bm{w}_2$ to
the grasped object? In order to resist those disturbances, contact forces must
arise that balance them. Clearly in either case there exist contact forces
that satisfy a simple friction law (illustrated by red friction cones) and
balance the disturbance. In fact, this grasp has \textit{force closure} and
hence contact forces exist that could balance arbitrary disturbances.
In practice, however, this is not a sufficient criterion for grasp stability.
It is clear that contact forces $\bm{c}_2$ and $\bm{c}_4$ will only arise if
we have previously loaded the grasp such that there is sufficient normal force
at contacts 2 and 4 to sustain the friction forces required: an appropriate
preload is required, or the object will slip out. We could, for example apply
actuator torques at the joints such that the hand 'squeezes' the object and
hence provides such a preload.
We can make a similar argument about contact forces that balance disturbance
$\bm{w}_2$, however if we assume that the joints on the robotic hand are
nonbackdrivable (as is the case with most robotic hands in use today) contact
forces $\bm{c}_1$ and $\bm{c}_3$ will arise entirely passively. The
disturbance will push the object against the fingers, which due to the
nonbackdrivability of the joints provide a rigid support. There is no need for
us to apply any torques at the joints as the grasp will be stable regardless.
The grasp provides \textit{passive resistance} to the applied wrench.
\begin{figure}[!t]
\centering
\includegraphics[width=0.75\columnwidth]{graphics/grasp_3.png}
\caption{A grasping scenario where a hand establishes multiple frictional
contacts (numbered 1-4) with a target object. External disturbance $\bm{w}_1$
can be resisted by contact forces $\bm{c}_2$ and $\bm{c}_4$; $\bm{w}_2$ by
contact forces $\bm{c}_1$ and $\bm{c}_3$.}\label{fig:package}
\end{figure}
As discussed in Chapter~\ref{sec:related_gfa_discussion} none of the
traditional grasp force analysis works discussed in
Chapter~\ref{sec:related_closure} can accurately capture the passive behavior
of this grasp. A perhaps more natural formulation for problems of this kind
can be found in the rigid body dynamics literature discussed in
Chapter~\ref{sec:related_dynamics}. We mentioned the main complication in
using such a formulation based on the dynamics equations and complementarities
in Chapter~\ref{sec:related_rigid_discussion}. The nonuniqueness of solutions
in the general case means that one has to find all solutions to the problem to
show that all of them result in zero accelerations.
This ambiguity due to multiple solutions can be well illustrated using again
the grasp in Fig.~\ref{fig:package} assuming nonbackdrivable fingers: Consider
the case of applying $\bm{w}_2$ with a zero preload such that contact forces
are zero prior to the application of $\bm{w}_2$. A formulation based on
complementarities admits at least two solutions:
In solution 1 the box slides upward out of the grasp completely unhindered by
the grasp, as it is not applying any contact forces. This is the intuitively
correct solution to this grasp stability problem. If we do not preload the
grasp it may not withstand $\bm{w}_2$.
In solution 2 contact forces arise at contacts 2 and 4 such that there is
sufficient friction to maintain a stable grasp on the object. This can happen
because, while the contacts are not previously loaded with contact forces,
they are maintained and the complementarity condition for contact forces to
arise is met. Due to the assumption of nonbackdrivability both fingers are
rigidly fixed in space, which allows for arbitrarily large contact forces to
arise without the need to balance them with joint torques.
While this second solution is not useful in practice --- we know it will never
arise --- it is a perfectly valid solution to the formulation used to model
the grasp. Its is simply a feature of the rigid body assumption. In reality,
however, no body is truly rigid, which is why this second solution is never
observed in practice. The existence of such solutions that are mathematically
correct, but physically impossible is problematic. The second solution by
itself would have us conclude the grasp is stable. Thus, in order to be able
to conclude that a grasp is stable from a single solution we must derive a
different formulation that relaxes the rigid body assumption.
The grasp shown in Fig.~\ref{fig:package} is exceedingly simple but still
representative of many robotic manipulation tasks. And yet we lack the means
to analyze the passive effects that make these grasps so powerful. If we want
to move beyond blindly using passive reactions and truly understand how to
leverage them we must be able to model passive effects. We can then answer the
stability queries we defined at the beginning of this chapter with our new
understanding of the mechanics of grasping.
\chapter{Conclusions}\label{sec:conclusion}
\section{Contributions}
In this dissertation we discuss the reasons for the relative obscurity of
theoretical grasp analysis within the applied manipulation
community. We argue that the most important reason is that none of the
existing theoretical approaches capture the passive effects that are the
fundamental characteristic of most hands commonly used in practice today.
Particularly the effects of nonbackdrivable actuators have not been previously
studied. This is despite the fact that this characteristic results in the
notion of \textit{passive stability}, which we argue has defined both the
design of multi-fingered robotic hands as well as the ways we use them in
practice.
We describe the limitations of the existing grasp theory, which prevent the
analysis of passive effects as well as alternative approaches from the rigid
body dynamics, contact modeling as well as physics simulations communities. We
argue that none of these existing approaches allow for the efficient
computation of grasp stability taking into account passive effects as they are
either too computationally complex or approximate in nature. Thus, we set out
to develop our own grasp models and algorithms in order to analyze the
stability of grasps with passive effects.
Our first contribution is a grasp model for planar grasps that allows for the
computation of contact forces given the \textit{slip state} of the contacts.
The state of a contact is defined as either rolling, breaking or sliding in
one of two directions. We show that given a valid contact slip state
combination stability can be determined by a linear program.
We then show that the number of contact state combinations possible under
rigid body motion constraints is quadratic in the number of contacts and describe an
algorithm that allows for the enumeration of all such combinations in
polynomial time. Thus, we have developed the first algorithm that can
determine planar grasp stability taking into account passive effects in
polynomial time. Using an example grasp we show that this method produces
physically accurate results and demonstrate its computational efficiency.
Turning our attention to spacial grasps we continue our investigation by
describing a system of equations, which we call the \textit{exact problem}. It
comprises of the equations defining static equilibrium of a grasp with passive
effects due to nonbackdrivable joints and underactuation. As we show many of
these governing equations can be cast as constraints in a Mixed Integer
Program for which efficient solvers exist. Due to the Maximum Dissipation
Principle (MDP) the Coulomb friction law is shown to be non-convex and that it
cannot easily be reformulated using piecewise convex decompositions as was
done in the planar case.
As we show, a consequence of omitting the MDP from our treatment of static
grasp stability is that we introduce unphysical solutions (they violate the
law of conservation of energy) that make determination of stability
impossible. We thus propose a physically motivated iterative scheme that aims
to mitigate the effects of omitting the MDP. Constraining the motion of the
grasped object and minimizing at every step the resultant wrench acting on the
object approximates the effects of the MDP and thus leads to physically
plausible solutions.
This algorithm is the first to enable the stability analysis of spacial grasps
with passive characteristics such as nonbackdrivable joints and
underactuation. We demonstrate the application of our framework with various
grasps using fully actuated as well as underactuated robotic hands. Verifying
the predictions made by our algorithm with empirical data we illustrate its
practical applicability as a tool both for grasp selection as well as actuator
control.
Building on this work we investigate the use of piecewise convex relaxations
of the MDP in order to accurately enforce it and obtain solutions to the
\textit{exact problem}. We discuss the potential application of existing
convex relaxation techniques based on McCormick envelopes and describe an
important limitation in that they require knowledge of upper and lower bounds
on some variables. Our contribution here is a convex relaxation technique that
makes use of the structure of the friction constraint in order to alleviate
this limitation.
As our relaxation satisfies all the requirements for the application of
tightening methods we also contribute an algorithm that allows for the
successive hierarchical refinement of the convex relaxation in order to obtain
solutions converging to those of the \textit{exact problem}. An important
advantage of tightening methods such as ours is that it provides strong
guarantees: Specifically, we are guaranteed convergence to the solution of the
exact problem if one exists. Furthermore, if our algorithm does not find a
solution we are guaranteed that none exists. Combined, these two features
make our method efficient for problems both with and without exact solutions.
It is, to the best of our knowledge, the first time that grasp stability
models incorporating Coulomb friction (along with the maximum dissipation
principle) have been solved with such high discretization resolution.
We furthermore propose a method of accounting for uncertainties in grasp
geometry, specifically contact normals, in order to robustly guarantee
stability up to a given magnitude of uncertainty. As this framework allows for
multiple queries posed as optimization problems we demonstrate its application
not only in the determination of passive stability but also as a tool for
computing optimal actuator commands. We investigate the computational
performance on a range of algorithmically generated grasps and show that our
framework is computationally viable as a practical tool.
Implementations of the grasp models and algorithms presented in this
dissertation are publicly available as part of the open source GraspIt!
simulator~\cite{MILLER04}.
Having developed tools that fill a gap in the grasp theory with respect to
understanding and modeling the passive effects of robotic grasps we turn our
attention to recent developments in the robotic manipulation community ---
specifically the advent of deep reinforcement learning and its application for
in-hand manipulation. We argue that parts of the classical grasp modeling
theory is indeed applicable to the types of robotic hands considered by
practitioners in the learning community. As we believe there are synergistic
benefits to be discovered at the interface of classical grasp analysis and
reinforcement learning we contribute a method to constrain an RL agent such
that it maintains a stable grasp at all times.
We draw parallels to established terms such as 'Safe RL' and 'Shield RL' and
derive a shield using a linearization based on traditional grasp analysis.
While this work is highly exploratory we present preliminary results, which we
believe to be promising and calling for further research.
\section{Potential impact}
The work pertaining to the analysis of passively stable grasps presented in
this dissertation marks a clear theoretical advance. For the first time it is
possible to determine the passive behavior of grasps with commonly used
robotic hands such as the Barrett and Schunk hands. A potential practical
application is in grasp planners, which compute the grasp to be executed by a
robot.
Typically, these grasp planners compute a list of candidate grasps and rank
them by a quality metric such as the Ferrari and Canny Grasp Wrench Space
metric~\cite{FERRARI92}. The grasp quality metrics commonly used by popular
grasp planners are concerned with contact locations only and do not reason
about contact forces. Thus, they cannot predict actual stability. There
already exist grasp quality metrics that take into account hand kinematics and
force generation capabilities, but as described in Chapter~\ref{sec:bridge}
they make assumptions that limit their applicability to most common robotic
hands.
Our frameworks could fill this gap and provide grasp planners with the means
to make accurate predictions of stability taking into account not only the
hand kinematics but also actuator commands. Thus, our methods provide a
further advantage in that they allow for the optimization of actuator
commands. Where existing grasp planners only generate grasp geometries, our
work can also compute the appropriate actuator commands for a given grasp and
task.
We stress that while we have investigated the problem of grasp stability from
our perspective as manipulation researchers the models and algorithms in this
dissertation are applicable to a much wider class of problems. The stability
of arrangements of rigid bodies in frictional contact, some fixed, some free,
some constrained by other unilateral or bilateral constraints is an important
aspect of many other problems from a variety of fields such as locomotion,
robotic construction and the simulation of rigid body structures. We hope that
our work may also be of use to researchers in these fields.
In the context of manipulation however, we note that interest in this kind of
traditional analytic grasp analysis has decreased over the last decade or so.
Modern grasp planning research tends to focus on the applications of machine
learning and the popularity of simple two-fingered grippers as well as suction
cups has diminished the need for complex quality metrics.
So perhaps there is more progress to be expected in the field of data-driven
robotics. Recent results from the deep reinforcement learning community are
promising a new breakthrough in truly dexterous multi-fingered manipulation.
We hope that our perspective on these problems as analytical grasp stability
analysis researchers can provide valuable insights and that our current work
of integrating analytical grasp modeling with reinforcement learning will
contribute to this progress.
\section{Challenges}
Throughout our work we have found that the accurate modeling of the Maximum
Dissipation Principle is perhaps the most complex and difficult aspect of any
passive stability formulation. It has thus provided us with many challenges in
developing the methods in this dissertation.
While we show a convenient piecewise convex decomposition of the MDP in two
dimensions, its treatment only remains of polynomial complexity under some
fairly limiting assumptions. We are limited to a single mobile body in the
grasp and can thus have to model the hand as a single rigid body; we cannot
model the kinematic effects of multi-fingered robotic hands and joint
actuation. Accurate treatment of the MDP is necessarily exponential in the
number of bodies involved and while our algorithm can be extended to such
multi-body problems it cannot retain its polynomial complexity.
For spacial contacts there is unfortunately no exact piecewise convex decomposition
of the MDP. Our iterative approach to approximating the MDP --- while
physically motivated --- unfortunately also loses many useful guarantees: It
is not guaranteed to converge and if it does is not guaranteed to converge to
a physically meaningful solution. As a result we report some outlier results,
which are difficult to diagnose, particularly for complex grasps. Furthermore,
experimental validation is difficult due to the difficulty of exactly
recreating grasps on a real hand and the uncertainty in many of the physical
parameters such as the torque provided by the actuators.
In order to alleviate some of these limitations we turned to convex
relaxations of the MDP in order to solve the exact problem. The price we pay
is an increased complexity in the grasp model and vastly larger optimization
problems. While our algorithm often beats its theoretical worst-case
exponential complexity the time taken to answer queries with more than 4
contacts is still significant. This is a major hurdle to the application of
our algorithm in practice.
A further limitation is an arguably narrow definition of grasp stability. An
initially unstable grasp may - through movement of the fingers and object
and hence changes in the grasp geometry - eventually settle in a different stable equilibrium
grasp. In such a case our framework can only determine that the initial grasp
is unstable and makes no prediction on stability of the final grasp. In order
to account for the motion of an initially unstable grasp we would have to
model the dynamics of the grasp. Using the currently available dynamics
engines to this end comes with its own difficulties.
Our secondary focus has been on the application of traditional grasp
analysis to reinforcement learning of in-hand manipulation tasks. While
results are preliminary and this work is still ongoing the amount of
engineering that has to be performed in order to obtain convincing policies
has been significant. This is expected to be even more pronounced once we
complete building the physical hand with which we plan on putting our insights
into practice. Furthermore, we foresee the discrepancies between the
simulation and reality to be a major challenge.
\section{Future work}
We believe we have provided a solid foundation of theoretical work that, for
the first time, enables the analysis of passive effects in grasping. There is,
however, still room for improvement. An extension of the hyperplane approach
to contact state enumeration for spacial grasps is already being
investigated~\cite{Huang2020}. Another interesting and useful extension would
be to allow for multiple bodies such that hand kinematics can be accounted
for.
A more rigorous validation of our methods for stability determination in three
dimensions would be of value, albeit difficult. However, perhaps there are
other contact problems that exhibit similar characteristics that are more
amenable to empirical validation.
While we believe we described a method to solve the \textit{exact problem}
there remain many avenues of investigation in order to improve computational
performance. While we used Branch and Bound at every iteration of our
tightening approach we did not retain any information of the solution tree
between iterations. This means that many convex subproblems are being
recomputed at every tightening. Using a solver that allows for warm starting
the Branch and Bound process promises great performance gains. An alternative
approach might be to cast our relaxation in a formulation that can be solved
using existing spacial Branch and Bound algorithms, making the refinement part
of the branch and bound process itself.
Ultimately, in this dissertation we have highlighted what we believe to be
research topics holding influential results of great practical importance. We
believe that there is yet much to be learned about passive reactions in
grasping and how to effectively leverage these effects. If we want to move
beyond the use of suction grippers for bin picking tasks and achieve robust
manipulation with multi-fingered hands we have to develop appropriate tools to
model and analyze them. We hope that this field of study sees renewed interest
now that industries have evolved, which require large numbers of humans
fulfilling menial tasks such as bin picking.
Furthermore, we believe there lies much promise in bringing approaches from
the traditional grasping theory to the learning community. Our own endeavors
to that end will continue as we plan on continuing along the path outlined in
this dissertation. The increasing sensitivity of tactile sensors along with
their decrease in price will hopefully drive more practitioners to consider
the grasping theory that allows them to analyze the data. To this end we hope
the community will continue the development of a new generation of robotic
hands, which will provide practitioners with rich tactile and proprioceptive
information and become a viable alternative to purely vision-based systems.
If we want to see robots becoming commonplace in human spaces we need to learn
to endow robots with the skills that come to us so naturally. A task as simple
as picking an unknown object from a bin without vision is still an open
problem in robotics. Perhaps it is unsurprising that the methods that
currently appear the most promising and lead to the most human-like robotic
behaviors --- such as deep reinforcement learning --- are those inspired by
nature itself. And while roboticists are captivated by these new methods and
robots make up more and more ground on their human counterparts we hope that
researchers will not lose sight of the analytical models and algorithms.
\chapter{Grasp Stability Analysis with the Maximum Dissipation Principle}\label{sec:cones}
\section{Introduction}
In this Chapter we will make use of the same grasp model as described in
Chapter~\ref{sec:model3d}. This model, particularly what we have called the
\textit{complete problem}, is very general and captures all of the
characteristics of robotic grasps we are interested in. It accounts for both
object and hand equilibrium, the unilaterality of both contacts and
nonbackdrivable actuators as well as the Coulomb friction law including the
Maximum Dissipation Principle (MDP).
We showed how the majority of this grasp model can be cast as a Mixed Integer
Program in Chapter~\ref{sec:unilaterality}. The only component that eluded our
formulation was the maximum dissipation aspect of the Coulomb friction law. In
Chapter~\ref{sec:3dfriction} we demonstrated the importance of the MDP for the
determination of passive resistance in robotic grasps. We showed that simply
omitting the MDP allows for unphysical solutions to the grasp model
formulation making a determination of stability impossible. However, we also
discussed the difficulty in accurately modeling the MDP due to its
non-convexity.
In Chapter~\ref{sec:iterative} we proposed a physically motivated iterative
scheme that aims to approximate the MDP. However, this approach does not
explicitly include the MDP and is therefore unlikely to converge to a solution
that actually satisfies the MDP to high accuracy. In fact, our previous
approach provides no formal guarantee of convergence. Furthermore, we had to
use the objective of the MIP optimization formulation in order to approximate
the MDP, which meant that the objective was not available for more involved
analysis. This is unfortunate, as many queries of practical importance can be
posed as optimization problems. In fact, much of the grasp force analysis
literature discussed in Chapter~\ref{sec:related_closure} seeks to find
contact wrenches or actuator torques that are optimal with respect to some
objective.
In this chapter we will develop a Mixed Integer formulation that explicitly
models the MDP. To this end we propose a relaxation of the friction model such
that we can solve the system as an MIP. Through successive and hierarchical
tightening of the relaxation we can efficiently find solutions that satisfy
all constraints --- including the MDP --- to arbitrary accuracy. A very useful
property of tightening approaches is that they allow for strong guarantees:
if, at any stage of refinement our model fails to find a solution, we can
guarantee that no solution exists to the exact problem. This allows for early
exit from computation in cases where equilibrium cannot exist. Furthermore,
tightening approaches can greatly reduce the size of the optimization problem
that has be solved in order to find a solution. We use these properties to
develop a grasp model that, to the best of our knowledge, is the first that
can handle three-dimensional frictional constraints that include the MDP, up
to arbitrary accuracy (and thus approaching the solution to the exact problem)
where solutions can be solved for in a computationally efficient fashion. Our
model allows us to produce solutions on commodity computers fast enough for
practical applicability.
Our formulation furthermore frees up the objective for any query posed as an
optimization. Depending on the choice of variables and optimization objective,
our model can be used for a wide range of queries. We illustrate its
applicability to grasp stability analysis by answering multiple queries on a
number of example grasps. The queries we show here include those already
introduced in~\ref{sec:3d_apps_iterative}: Given applied joint torques, will
the grasp be stable in the presence of a specified external disturbance,
assuming passive resistance effects? Additionally, the formulation developed
in this chapter allows for queries such as the following: Given applied joint
torques, what is the largest disturbance that can be passively resisted in a
given direction? Given a disturbance, what are the optimal joint torques that
a grasp can apply for stability?
Finally, we develop a method to account for uncertainties in the grasp
modeled. Specifically, we can guarantee robustness to uncertainties in contact
normal direction. We use this algorithm to analyze the passive stability of
spacial grasps similar to those we investigated in
Chapter~\ref{sec:3d_apps_iterative}. We also extend our analysis to the
optimization of actuator torques and demonstrate the practical applicability
of our algorithm. We believe these are all useful tools in the context of
grasp analysis.
\section{A formulation using McCormick envelopes}
As mentioned above we will make use of the same grasp model as described in
Chapter~\ref{sec:model3d} but will deviate in our treatment of the friction
constraints in order to explicitly model the MDP in (\ref{eq:mdp}). Of course
one could cast the MDP in its original minimization formulation which is of
course non-convex as the bilinear form in (\ref{eq:mdp}) is not positive
definite~\cite{LIBERTI04}. However, one could attempt to solve the exact
problem (\ref{eq:object_eq}) -- (\ref{eq:underactuation}) using a global
optimization approach based on a convex relaxation of the bilinear forms using
McCormick envelopes~\cite{McCormick1976}, which relies on upper and
lower bounds on the variables involved in the bilinear forms. In order to
illustrate such an approach let us consider an example of a bilinear form
$w(x,y)$ in two dimensions.
\begin{equation}
w(x,y) = x \cdot y
\end{equation}
Given upper and lower bounds such that $x^L \leq x \leq x^U$ and $y^L \leq y
\leq y^U$ we replace the $xy$ term with variable $w$ and introduce the
following linear inequality constraints:
\begin{align}
w \leq&~x^U y + x y^L - x^U y^L \\
w \leq&~x y^U + x^L y - x^L y^U \\
w \geq&~x^L y + x y^L - x^L y^L \\
w \geq&~x^U y + x y^U - x^U y^U
\label{eq:mccormack}
\end{align}
A graphical interpretation of this convex relaxation to the bilinear form is
shown in Fig.~\ref{fig:step1}. The linear inequalities we introduced provide
convex underestimators and overestimators also known as a McCormick envelope.
Of course a solution to this relaxed problem will not in general be a solution
to the exact problem. It will, however, provide a lower bound for the
objective value. Tightening the relaxation will result in a lower bound closer
to the exact solution. Hence, tight relaxations are imperative for obtaining
accurate results.
\begin{figure}[!t]
\centering
\subfigure[Step 1]{\includegraphics[width=0.45\linewidth]{graphics/mccormick1.png}%
\label{fig:step1}}
\subfigure[Step 2]{\includegraphics[width=0.45\linewidth]{graphics/mccormick2.png}%
\label{fig:step2}}
\subfigure[Step 3]{\includegraphics[width=0.45\linewidth]{graphics/mccormick3.png}%
\label{fig:step3}}
\caption{McCormick envelopes for the bilinear form $w(x,y) = x \cdot y$.}
\label{fig:mccormick}
\end{figure}
A common method to obtain such a tight relaxation is its successive
hierarchical tightening. We search for a solution in a coarse relaxation and
the refine just the envelope containing it (see Fig.~\ref{fig:mccormick}).
Algorithms such as Spacial Branch-and-Bound (sBB)~\cite{TUY16} can be used to
efficiently refine and prune parts of the solution space and find global
minima of such non-convex optimization problems. Implementations include the
$\alpha$BB algorithm~\cite{FLOUDAS98} or the BARON~\cite{BARON} software for
global optimization.
Of course this approach generalizes to bilinear forms in higher dimensions
such as that encountered in the maximum dissipation principle (\ref{eq:mdp}).
However, it requires knowledge of upper and lower bounds for the variables
involved in the bilinear form. In the grasping problems we are trying to solve
such bounds are not explicit in the model and are difficult to estimate.
\section{Convex relaxation of the Coulomb friction law}\label{sec:mip}
Taking inspiration from these convex relaxation techniques we make use of the
particular structure of friction cones to derive a relaxation that does not
require variable bounds. This is useful since in the grasping problem there
are no explicit bounds on contact forces and particularly motions and they are
therefore difficult to predetermine. Furthermore, in our approach we formulate
the MDP as a non-convex constraint, which we relax instead of the optimization
objective. This allows us to use the objective to solve for interesting grasp
characteristics such as the optimum actuator commands.
\begin{figure}[t!]
\centerline{
\subfigure[Coulomb friction cone]{\includegraphics[width=0.4\columnwidth]{graphics/exact_cone.png}\label{fig:pyramid_a}}\hfill%
\subfigure[Pyramidal approximation]{\includegraphics[width=0.4\columnwidth]{graphics/discrete_cone.png}\label{fig:pyramid_b}}
}
\caption{Illustration of the exact Coulomb friction cone and a pyramidal
approximation with $k=4$. The black arrows positively span the contact
tangent plane and make up the matrix of basis vectors
$\bm{D}_i$.}
\label{fig:pyramid}
\end{figure}
We start from the common linearized friction model~\cite{MILLER03B} which
replaces the circular friction cone at contact $i$ with its discretization as
a polygonal cone $\hat{\mathcal{F}}_i$ (see Fig.~\ref{fig:pyramid}.) Matrix
$\bm{D}_i \in \mathbb{R}^{2 \times k}$ contains as its columns a set of $k$
vectors that positively span the contact tangential plane and thus the space
of possible friction forces. Frictional forces can now be expressed as
positive linear combinations of these so called \textit{friction edges} with
weights $\bm{\beta}_i \in \mathbb{R}^k_{\geq 0}$. Vector $\bm{e}=[1,1,...,1]^T
\in \mathbb{R}^k$ sums the weights $\bm{\beta}_i$. Inequality constraints on a
vector are to be understood in a piecewise fashion.
\begin{align}
\bm{c}_{i,t} &= \bm{D}_i \bm{\beta}_i \in \hat{\mathcal{F}}_i\label{eq:betas}\\
\hat{\mathcal{F}}_i( \mu_i, c_{i,n} )
&= \{ \bm{D}_i \bm{\beta}_i : \bm{\beta} \geq 0,~\bm{e}^T \bm{\beta} \leq \mu_i c_{i,n} \}
\label{eq:fric_discretization}
\end{align}
\begin{figure}[t!]
\centering
\includegraphics[width=0.6\columnwidth]{graphics/relaxation.png}
\caption{Slice through the friction cone showing two possible lengths of
friction edges for a discretization with $k=4$. The shorter friction edge
length leads to a discretized cone fully inscribed by the circular cone,
while the longer friction edge length leads to a discretized cone that itself
fully contains the circular cone.}
\label{fig:relaxation}
\end{figure}
Traditionally, the basis vectors in $\bm{D}_i$ are unit vectors. Thus, the
discretized friction cone is completely inscribed by the exact circular cone
(see Fig.~\ref{fig:relaxation}.) This leads to an approximation to the
possible friction forces that is conservative in the context of grasp
stability. In our case, however, in order to derive a valid convex relaxation
we require the relaxed discretized friction cone to contain the exact cone.
This is important in order to guarantee that we can find a solution to the
relaxed problem if one exists to the exact problem. Thus, we instead choose
basis vectors of length $f$ for Matrix $\bm{D}_i$.
\begin{equation}
f = sec(\frac{\pi}{k})
\label{eq:fric_len}
\end{equation}
Let us now also express relative tangential contact motion as a weighted
combination of the same friction edges, with weights $\bm{\alpha}_i \in
\mathbb{R}^k_{\geq 0}$. For reasons that will soon become apparent, we
actually choose to express the opposite of the tangential motion:
\begin{equation}
\bm{D}_i\bm{\alpha}_i = -\bm{d}_{i,t},~\bm{\alpha}_i \geq 0\label{eq:alphas}
\end{equation}
If the friction edges in $\bm{D}_i$ are arranged in an ordered fashion such
that neighboring friction edges in the tangent plane are also neighbors in
$\bm{D_i}$ we can constrain friction to (approximately) oppose motion by
requiring that the \textit{friction force lie in the same sector of the
linearized friction cone as the negative of the tangential contact motion.}
Without loss of the above properties, we require that all but two components
of $\bm{\beta}_i$ must be zero and that non-zero components are either
consecutive or lie at the first and last positions of vector $\bm{\beta}_i$.
This can be achieved by constraining $\bm{\beta}_i$ with a special ordered set
$\bm{z}_i \in \mathbb{R}_{\geq 0}^{k+1}$ of type 2 (SOS2)~\cite{Beale1976},
which has one more component than $\bm{\beta}_i$ itself.
\begin{equation}
\beta_{i,1} \leq z_{i,1} + z_{i,k+1},~\beta_{i,2} \leq z_{i,2},~...,~\beta_{i,k} \leq z_{i,k},~\bm{z}\in\text{SOS2}\label{eq:sos_beta}
\end{equation}
A special ordered set of type 2 is a set of ordered non-negative numbers of
which at most two can be non-zero. If two numbers in the SOS2 are non-negative
they must be consecutive in their ordering. This type of constraint can be
formulated in the framework of mixed integer problems and therefore is
admissible to problems to be solved by MIP solvers. We now similarly constrain
the weights $\bm{\alpha}$ that determine relative motion with the same SOS2 as
in (\ref{eq:sos_beta}).
\begin{eqnarray}
\alpha_{i,1} \leq z_{i,1} + z_{i,k+1},~\alpha_{i,2} \leq z_{i,2},~...,~\alpha_{i,k} \leq z_{i,k}\label{eq:sos_alpha}
\end{eqnarray}
Note that these constraints hold for both sliding as well as rolling contacts.
If a contact is rolling then all components of $\bm{\alpha}_i$ must be zero.
Thus, any two consecutive components of $\bm{z}_i$ may be non-zero and since
$\bm{\beta}_i$ are the weights of the basis vectors in $\bm{D}_i$ the friction
force may point in any direction in the tangent plane. If the contact slides
then some components of $\bm{\alpha}_i$ must be nonzero. As both
$\bm{\alpha}_i$ and $\bm{\beta}_i$ are constrained by $\bm{z}_i$ and only two
consecutive components of $\bm{z}_i$ may be nonzero, this means the friction
force must lie in the same sector of the friction pyramid as the negative of
the relative tangential contact motion, but may not necessarily be collinear
(see Fig.~\ref{fig:pyramid_b}.)
Finally, we can constrain the magnitude of the friction force in addition to
its direction. In the exact Coulomb model the friction magnitude must be
maximized at sliding contacts, while for stationary contacts it only has an
upper bound. In our relaxation this means that at rolling contacts the
friction force may lie anywhere within the discretized cone containing the
exact circular cone. At a sliding contact we require that the
\textit{friction force lies within the discretized cone containing the
circular cone, but outside the smaller discretized cone that is itself
contained by the exact cone}. See Fig.~\ref{fig:cone_in_cone} for an
illustration of this relaxation. Note, that in either case the relaxation
contains the solution set of the exact Couliomb friction model.
\begin{figure}[t!]
\centering
\includegraphics[width=0.5\columnwidth]{graphics/cone_in_cone.png}
\caption{Complete convex relaxation of the circular friction cone. At a
rolling contact the contact force may lie anywhere within the larger
discretized cone. At a sliding contact the friction force must lie in the same
sector as $-\bm{d}_{i,t}$. Furthermore the contact force must remain inside
the larger, but outside the smaller discretized cone.}
\label{fig:cone_in_cone}
\end{figure}
Defining vector $\bm{f} = [f, f, ..., f]^T \in \mathbb{R}^k$ containing the
lengths of the friction edges (\ref{eq:fric_len}) making up the friction cone
approximation we can express this constraint as follows:
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
\bm{e}^T \bm{\beta}_i &\leq \mu_i c_{i,n}~, & \text{if}~\bm{e}^T \bm{\alpha}_i = 0\\
\bm{e}^T \bm{\beta}_i &\leq \mu_i c_{i,n}~,~\bm{f}^T \bm{\beta}_i \geq \mu_i c_{i,n}~, & \text{otherwise}
\end{empheq}\label{eq:fric_cases}
\end{subequations}
Constraint (\ref{eq:fric_cases}) can also be included in an MIP as an
indicator constraint using a binary decision variable $w_i \in \{0,1\}$.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
w_i = 0 &\implies &\bm{e}^T \bm{\beta}_i \leq \mu_i c_{i,n}~,&\quad \bm{e}^T \bm{\alpha}_i = 0 \\
w_i = 1 &\implies &\bm{e}^T \bm{\beta}_i \leq \mu_i c_{i,n}~,&\quad \bm{f}^T \bm{\beta}_i \geq \mu_i c_{i,n}
\end{empheq}\label{eq:fric_binary}
\end{subequations}
We now have a complete model of friction. For a finite value of $k$, this
model is approximate. However, in the limit as $k \rightarrow \infty$ the
indicator constraints (\ref{eq:fric_binary}) are equivalent to the Coulomb
friction model in (\ref{eq:friction_bound}) \& (\ref{eq:mdp}).
\section{Successive hierarchical refinement}\label{sec:refinement}
We can solve the complete system described by constraints
(\ref{eq:object_eq})-(\ref{eq:unilaterality_again}),
(\ref{eq:joint_unilaterality})-(\ref{eq:underactuation}) and the new piecewise
convex relaxation of Coulomb friction (\ref{eq:fric_binary}) as an MIP with
algorithms such as branch and bound. In order to improve our approximation, we
could choose a high number of edges $k$ for the discretized friction cones. In
practice, however, that approach is not feasible as the time taken to solve an
MIP is sensitive to the number of integer variables in the problem. As SOS2
constraints are implemented using binary variables a highly refined friction
cone approximation quickly becomes computationally intractable. This is the
trade-off traditionally encountered with discretization methods: coarse
discretizations provide only rough approximations of the exact constraints,
while high resolutions discretizations are computationally intractable.
Our approach is based on the key insight that one can obtain an equally
accurate solution by solving a problem with a coarse friction cone
approximation, and \textit{successively refining the linearized friction
constraints only in the region where friction forces arise.} Our approach
thus proceeds as follows:
\begin{itemize}
\item We solve our problem using a coarse approximation of the friction cone
(few friction edges). From the solution, we identify the sector of the
linearized cone (the area between two edges) where both the friction force
and the negative relative motion lie.
\item To obtain a tighter bound, we add new friction edges that refine
\textit{only the sector identified above}. We then repeat the procedure with
the new, selectively refined version of the friction cone.
\end{itemize}
\begin{figure}[!t]
\centering
\hspace{0.5in}
\subfigure[Exact]{\includegraphics[width=2.0in]{graphics/cone4.png}
\label{fig:cone4}}
\hspace{0.5in}
\subfigure[Step 1]{\includegraphics[width=3.1in]{graphics/cone1.png}%
\label{fig:cone1}}
\subfigure[Step 2]{\includegraphics[width=3.1in]{graphics/cone2.png}%
\label{fig:cone2}}
\subfigure[Step 3]{\includegraphics[width=3.1in]{graphics/cone3.png}%
\label{fig:cone3}}
\caption{A slice through the exact circular friction cone as well as a
piecewise convex relaxation. Shown are the first three steps of our algorithm
refining the friction law relaxation successively and locally. The dark red
regions are the space of feasible friction forces at a sliding contact. At a
rolling contact the light red regions are added to the feasible friction force
space. The green and blue arrows are $\bm{d}_{i,t} = \bm{D}_i \bm{\alpha}_i$
and $\bm{c}_{i,t} = \bm{D}_i \bm{\beta}_i$ respectively, which drive
refinement of their local friction cone sector. In gray we show the relaxation
from previous steps to show how a coarse relaxation contains the entire
solution space of all successively tighter relaxations.}
\label{fig:cone}
\end{figure}
Consider a rough approximation with four friction edges
(Fig.~\ref{fig:cone1}.) If we allow rolling friction to reside inside the
areas shaded in either shade of red, while sliding friction must lie within
the dark red border, the space of allowable solutions to the exact problem is
contained inside our linear and piecewise convex approximation. Assume that,
at this level of refinement, there is a solution to an equilibrium problem,
with a friction force residing inside the upper right sector. We refine this
sector, taking care that the space of allowable solutions to the exact problem
is contained inside within this new refinement refinement (see
Fig.~\ref{fig:cone2}.) We continue this procedure (Fig.~\ref{fig:cone3} etc.)
until one of two things happen: we either reach a level of refinement where no
solution exists, or we refine down to the point where the active sector is as
small as we want it to be, bringing us arbitrarily close to the solution to
the exact problem.
Note that the friction cone in the coarse approximation of
Fig.~\ref{fig:cone1} differs in a subtle way from that in
Figs.~\ref{fig:relaxation} \& \ref{fig:cone_in_cone}: The edges of the larger
discretized cone containing the exact solution space are no longer tangent to
the exact solution space. Instead, the discretized friction cone is slightly
enlarged. This was done to maintain a crucial characteristic of convex
relaxations in optimization problems: The minimum found in a coarse convex
relaxation should provide a lower bound for the minimum found in a more
refined and thus tighter relaxation. This requires that the solution space at
of a coarse relaxation completely contains the solution space of a tighter
more refined relaxation.
Thus, only at the final level of refinement can the edge of the discretized
friction cone lie tangent to the exact circular cone (Fig.~\ref{fig:cone3}.)
In consequence, the discretized cone at a coarser level (Fig.~\ref{fig:cone2})
must be offset from the exact cone in order for the relaxation to contain the
two finer relaxations. The same argument means that the relaxation in
Fig.~\ref{fig:cone1} must be offset from the circular cone in order for it to
contain the relaxations in Fig.~\ref{fig:cone2} in their entirety.
Thus, we must make a slight modification to the friction edge lengths computed
in (\ref{eq:fric_len}). Let us pick the initial basis vectors in $\bm{D}_i$
such that the angle $\gamma$ between all pairs of successive vectors is equal.
We pick an initial angle $\gamma = \pi / 2$. We refine our polyhedral friction
cone by bisecting sectors defined by the non-zero components of
$\bm{\alpha}_i$ and define the angle at which to stop refinement as $\gamma /
2^q$. We now find the required length $l_1$ of these initial friction edges
such that the initial solution set contains the solution sets at all further
refinement levels.
\begin{equation}
l_1 = \prod_{r=1}^{q+1} \sec(\frac{\gamma}{2^r})
\label{eq:l1}
\end{equation}
Thus, we modify the friction edges in $\bm{D}_i$ accordingly. We define vector
$\bm{f}_i$ to contain the lengths of the friction edges making up the friction
cone approximation in an order corresponding to the order of the weights
$\bm{\beta}_i$. Constraints (\ref{eq:fric_binary}) are modified accordingly.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
w_i = 0 &\implies &\bm{e}^T \bm{\beta}_i \leq \mu_i c_{i,n}~,&\quad \bm{e}^T \bm{\alpha}_i = 0 \\
w_i = 1 &\implies &\bm{e}^T \bm{\beta}_i \leq \mu_i c_{i,n}~,&\quad \bm{f}_i^T \bm{\beta}_i \geq \mu_i c_{i,n}
\end{empheq}\label{eq:fric_refine}
\end{subequations}
We are now ready to solve the initial coarse relaxation problem defined by
(\ref{eq:object_eq})-(\ref{eq:unilaterality_again}),
(\ref{eq:joint_unilaterality})-(\ref{eq:underactuation}) and
(\ref{eq:fric_refine}). We find the two active friction edges $d_1$ and $d_2$
and create three new edges that point in the direction of $d_1$, $d_1+d_2$ and
$d_2$ and have magnitude $l_2$. For this and all following refinements we have
\begin{equation}
l_p = \prod_{r=p}^{q+1} \sec(\frac{\gamma}{2^r})\label{eq:length}
\end{equation}
where $p$ is the level of refinement of the sectors to be created. We insert
the new friction edges between $d_1$ and $d_2$ in matrix $\bm{D}_i$ and their
lengths in $\bm{f}_i$. Finally we remove any redundant friction edges (edges
that are identical or edges that lie between any such edges). Solving this new
problem we can continue refining the friction discretization until the angle
of the active sectors at all contacts reach an angle of $\gamma / 2^q$. We do
not further refine any sector that has already reached this threshold. The
overall method is shown in Algorithm~\ref{alg:refinement}.
\begin{algorithm}[t]
\caption{Grasp analysis through successive relaxation}\label{alg:refinement}
\begin{algorithmic}[0]
\Procedure{Relaxation refinement}{}
\State \textbf{Input:}
\State ~~~~$O$ --- objective function
\State ~~~~$C$ --- additional constraints
\State ~~~~$\gamma$ --- initial refinement level (angle between friction edges)
\State ~~~~$q$ --- maximum refinement level desired
\State Initialize $\bm{D}$ with basis vectors of length $l_1$ as defined in (\ref{eq:l1})
\Do
\State Minimize $O$ subject to (\ref{eq:object_eq})-(\ref{eq:unilaterality_again}), (\ref{eq:joint_unilaterality})-(\ref{eq:underactuation}), (\ref{eq:fric_refine}) and $C$.
\If{no solution exists}
\State \textbf{return} no feasible solution
\EndIf
\State $\text{refinement\_needed} \gets \texttt{False}$
\For{each contact $i$}
\State Find active edges in $\bm{D}_i$
\State $\delta_i \gets \text{angle between active edges}$
\If{$\delta_i > \gamma / 2^q$}
\State $p \gets \log_2 (\gamma / \delta_i) + 2$
\State Add new edges to $\bm{D}_i$ of length $l_p$ according to (\ref{eq:length})
\State Remove redundant edges from $\bm{D}_i$
\State $\text{refinement\_needed} \gets \texttt{True}$
\EndIf
\EndFor
\doWhile{$\text{refinement\_needed}$}
\State \textbf{return} solution
\EndProcedure
\end{algorithmic}
\end{algorithm}
Note that this convex relaxation does not rely on explicit bounds on the
problem variables as would be the case were we using McCormick envelopes.
Instead, we use the bounds implicit in the friction cone constraint
(\ref{eq:friction_bound}) in our relaxation. This is also a further advantage of
our approach as the relaxation has an easily understood physical
interpretation.
Recall that one of the defining characteristics of our convex relaxation is
that we have chosen our friction edges so that, at any level of refinement,
\textit{the solution set to the approximate problem contains the solution set
of the exact problem}. This means that if, at any point during the refinement,
no solution can be found that satisfies the convex relaxations, we can
guarantee that no solution can exist to the exact version of the problem
either. This guarantee immediately follows from the properties that the
solution set at any refinement level includes the solution set at the next
level, and that, in the limit, our discretization approaches the exact
constraints. (Note that alternative approaches that work with discretized
friction constraints, such as the LCP formulations discussed in
Chapter~\ref{sec:related_dynamics}, do not exhibit this property.) In
practice, this means that, when no solution exists to the exact equilibrium
problem, our algorithm can determine that very quickly, only solving
relatively coarse refinement levels.
The second advantage this scheme provides is that when a solution does exist,
we can typically refine it to high accuracy (a very close approximation to the
solution of the exact problem) using relatively few friction edges. This is
not theoretically guaranteed: in the worst case, our approach could require
all sectors to be fully refined before finding an adequate solution at the
desired resolution, and may hence perform worse than using a fully refined
friction discretization to begin with. However, we have never found that to be
the case. Typically, only a small region of the discretization must be refined
as the contact forces are also constrained by equilibrium relations
(\ref{eq:object_eq}) \& (\ref{eq:hand_eq}) and will generally point in similar
directions at all levels of refinement, leading to a very localized and
targeted tightening of the relaxation. Thus, this algorithm is efficient
enough to analyze complex grasps on a consumer PC to levels of refinement that
are otherwise unachievable.
\section{Robustness to geometrical uncertainties}\label{sec:robust}
In the above we outlined a grasp model that allows us to analyze the grasp
stability given perfect information about the geometry of the grasp. We assume
we know exactly the contact position and orientation. In practice however we
often encounter uncertainties, which can greatly affect the stability of a
grasp. Even when using tactile sensors in order to locate contacts made
between the hand and the object the contact normals (and hence orientation)
are often difficult to obtain accurately. Therefore we would like to make our
framework robust to discrepancies up to a certain magnitude. We introduce the
method we use for this here, and illustrate its importance in the following
section.
Let us suppose we have an upper bound on our uncertainty in the contact normal
$\eta$. Thus, the actual contact normal lies in a space of possible contact
normals that deviate by at most angle $\eta$ from the nominal contact normal
$n$. In order for a grasp to be robust to deviations defined by this space we
would like it to be robust in the worst-case. The worst-case contact normal
$\hat{n}$ is one that is at an angle $\eta$ to the nominal contact normal and
such that its projection into the tangent plane points in the same direction
as the relative tangential contact motion. In our space of contact normals
such a normal would be the most effective at unloading the contact and hence
destabilizing the grasp (see Fig.~\ref{fig:robustness}.) The relative contact
motion in the direction of the worst-case normal would then be given by
\begin{figure}
\centering
\includegraphics[width=0.5\columnwidth]{graphics/robustness.png}
\caption{Illustration of a worst-case normal within uncertainty $\eta$ given
relative contact motion $\bm{d}_i$: The real normal $\hat{n}$ deviates from
the nominal normal $n$ in such a way as to minimize the contact normal force.}
\label{fig:robustness}
\end{figure}
\begin{equation}
d_{i,\hat{n}} = {d}_{i,n} \cos(\eta) - \left\lVert \bm{d}_{i,t} \right\rVert \sin(\eta)
\label{eq:normal_undertainty}
\end{equation}
However, we need to find a linear approximation for $\left\lVert \bm{d}_{i,t}
\right\rVert$ as including it exactly would introduce a non-convex quadratic
equality constraint. Fortunately we can use the amplitudes of the friction
edges $\alpha$. The summation of the product of all contact motion amplitudes
and the length of the corresponding friction edges gives us an estimate of the
magnitude of the relative tangential contact motion.
\begin{equation}
\left\lVert \bm{d}_{i,t} \right\rVert \approx \sum_{s=1}^{k} f_{i,s} \alpha_{i,s} = \sum_{s=1}^{k} l_p \alpha_{i,s} \label{eq:overestimate}
\end{equation}
Here $p$ is the level of refinement of the active sector (i.e. the sector
corresponding to the nonzero components of $\bm{\alpha}_i$.) The problem with
this formulation is that due to the triangle inequality this overestimates the
relative tangential contact motion. This effect diminishes at finer
resolutions as friction edges become closer to parallel, but the destabilizing
effect is potentially larger at coarser resolution. However, recall that our
refinement method requires that the solution set at coarser levels includes
the solution set at finer levels. We thus require the destabilizing effect to
be weaker at coarse resolutions and become stronger approaching its exact
value as $p \rightarrow \infty$.
Note that (\ref{eq:overestimate}) is exact for contact motion parallel to to
any friction edge but for any tangential motion that lies between two edges it
overestimates the magnitude of the relative sliding motion. The overestimation
is most pronounced if the sliding motion exactly bisects the two adjacent
friction edges. Thus, in order to prevent overestimation of sliding motion
while retaining the tightest possible relaxation we must modify
(\ref{eq:overestimate}) such that it instead is exact for motions bisecting
any two adjacent friction edges and underestimates sliding motion everywhere
else.
\begin{figure}
\centering
\includegraphics[width=0.5\columnwidth]{graphics/vectors.png}
\caption{The vector addition of two adjacent friction edges of length $l_p$ is
a vector of length $2 l_{p+1}$.}
\label{fig:vectors}
\end{figure}
Let us first find out by how much (\ref{eq:overestimate}) overestimates
tangential motion in the worst case. Recall that $f_{i,s} = l_p$ can be calculated
using the refinement level $p$ of the corresponding friction edges and
(\ref{eq:length}). Consider two generic adjacent friction edges of length
$l_p$. Fig.~\ref{fig:vectors} illustrates that the worst-case overestimation
occurs for vectors bisecting the two friction edges. Furthermore, due to the
geometry of the relaxation described in Fig.~\ref{fig:cone} and
(\ref{eq:length}) we know that the vector addition of two adjacent friction
edges is a vector of length $2 l_{p+1}$. Thus, the factor by which
(\ref{eq:overestimate}) overestimates tangential motion that bisects any two
friction edges of length $l_p$ is
\begin{equation}
\frac{l_p}{l_{p+1}}
\end{equation}
We can now divide (\ref{eq:overestimate}) by this factor such that we obtain
an approximation of the tangential motion magnitude that underestimates
everywhere except at the midpoint between two edges where it is exact.
\begin{equation}
\left\lVert \bm{d}_{i,t} \right\rVert \approx \sum_{s=1}^{k} l_{p+1} \alpha_{i,s}
\end{equation}
As $p \rightarrow \infty$ this estimation becomes exact. We can now plug this
back into (\ref{eq:normal_undertainty}) for a linear approximation of the
worst-case relative normal contact motion.
\begin{equation}
d_{i,\hat{n}} = {d}_{i,n} \cos(\eta) - \sin(\eta) \sum_{s=1}^{k} l_{p+1} \alpha_{i,s}
\label{eq:uncertainty}
\end{equation}
We now replace the normal relative contact motion in
(\ref{eq:unilaterality_again}) with $d_{i,\hat{n}}$ in order to obtain
solutions that are robust to uncertainties in contact normal up to an angular
discrepancy of $\eta$.
\section{Application to grasp analysis in three dimensions}\label{sec:3d_apps}
\subsection{Existence problems}
The range of queries we can answer with the approach described in
Chapter~\ref{sec:refinement} is less limited than that of the iterative
approach discussed in Chapter~\ref{sec:three_dim}. However, existence problems
are still the most simple queries to solve and are a good starting point
before moving on to more complex queries.
\begin{figure}[t!]
\centering
\includegraphics[width=0.75\columnwidth]{graphics/spot_test.png}
\caption{Equilibrium contact forces (blue arrows) that are predicted to arise
by our framework when a force of 2.2N is applied to the object in the
$y$-direction. The proximal joints have both been preloaded with 0.1Nm. Note
the refinement of the pyramidal friction cone approximation. Only a minority
of sectors have been refined. Sectors that are not of interest in this
specific grasp problem remain in a less refined state and thus only contribute
little to the complexity of the overall problem. The sectors containing the
equilibrium contact forces are $<1\degree$~small. The maroon arrows denote the direction of
predicted object motion.}
\label{fig:spot_check}
\end{figure}
Let us solve for the stability of the grasp shown in Fig.~\ref{fig:spot_check}
when we apply a force of 1N to the object in the positive $y$-direction
\textit{without preloading the joints at all.} To answer this query, we use
Algorithm~\ref{alg:refinement} as follows:
\begin{eqnarray}
\text{objective:}~ & \text{none} \\
\text{additional constraints:} & \bm{w} &= [0,1,0,0,0,0]^T \\
& \bm{\tau}^c &= \bm{0}
\end{eqnarray}
Note that, in the absence of an optimization objective, we are simply
asking if a solution exists that satisfies all the constraints of the
problem, equivalent to determining values for all the unknowns
(contact forces, virtual motions, etc.) such that the grasp is
stabilized. Using Gurobi~\cite{gurobi} as a solver for the constituent
MIPs, Algorithm~\ref{alg:refinement} finds no feasible solution to
this problem (i.e. it predicts the grasp is unstable in the presence
of the given disturbance.) This is the expected result: the grasp may
not resist a force of 1N in the $y$-direction without any preloading,
as it is intuitively clear that the object will slide out.
Let us now consider the case where we apply a preload torque of 0.1 Nm at the
proximal joints. Due to the simplicity of the grasp we can analytically
determine the expected maximum force in the $y$-direction the grasp can
withstand: a $\sim$90mm contact moment arm and a friction coefficient of 1.0
results in a maximum total friction force applied to the object of $\sim$2.2
N. Using a similar formulation as before (no objective, $\bm{\tau}^c = 0.1$Nm
at the proximal joints), we indeed find that Algorithm 1 accepts a solution
(i.e. predicts stability, see Fig.~\ref{fig:spot_check}) for a disturbance of 2.2N
in the $y$-direction ($\bm{w} = [0,2.2,0,0,0,0]^T$), but finds no solution for
a disturbance of 2.5N in the same direction ($\bm{w} = [0,2.5,0,0,0,0]^T$).
\subsection{Space of resistible disturbances}
The option to add an objective allows us to formulate more interesting
queries. Algorithm~\ref{alg:refinement} provides us with a simple method of
characterizing the space of possible disturbances on the object a grasp can
withstand through purely passive reaction. We can directly determine the exact
\textit{maximum disturbance} applied to the grasped object in a given
direction that a grasp may resist purely passively. To this end we might
prescribe a preload $\bm{\tau}^m$ for the actuators to be kept constant, and a
direction $\bm{d}$ along which to apply a disturbance to the object. To
compute the largest magnitude disturbance the grasp can withstand in that
direction, we use Algorithm~\ref{alg:refinement} as follows:
\begin{eqnarray}
\text{objective:}~ & \text{maximize}~ s \\
\text{additional constraints:} & \bm{w} = s\bm{d} \\
& \bm{\tau}^c = \bm{\tau}^m
\end{eqnarray}
We already analytically estimated the resistance of our example grasp to
disturbances in the positive $y$-direction to be $\sim$2.2N. The maximum
resistible force predicted by our framework is 2.33N and thus very similar.
The 6\% difference is well within the uncertainty introduced by estimating the
exact geometry of the grasp.
In order to further investigate the stability of the grasp and also the
capabilities of our framework let us consider the maximum resistible
disturbances in multiple directions. We discretize the grasp plane by
direction vectors with a spacing of 1\degree~between them. We then determine
the maximum force applied to the object the grasp can withstand for each of
these direction. The results are visualized in Fig.~\ref{fig:package_map},
where Fig.~\ref{fig:package_exact} plots results without considering
robustness to contact normal uncertainty, while Fig.~\ref{fig:package_robust}
assumes an uncertainty of 2.5\degree.
\begin{figure}[t!]
\centering
\begin{subfigure}[No contact normal uncertainty]
{\includegraphics[width=0.85\columnwidth]{graphics/package_xz_exact.png}
\label{fig:package_exact}}
\end{subfigure}
\begin{subfigure}[Robust to contact normal uncertainties]
{\includegraphics[width=0.85\columnwidth]{graphics/package_xz_uncertainty.png}
\label{fig:package_robust}}
\end{subfigure}
\caption{Resistible forces in the grasp plane of the grasp in
Fig.~\ref{fig:spot_check} as predicted by our model and algorithm. In blue are
forces that can be resisted even without the application of preloading torques
at the joints. When loading the two proximal joints with 0.1Nm the maroon area
is added to the space of resistible forces.}
\label{fig:package_map}
\end{figure}
The results match our intuition that any downward force can be reacted without
any loading of the fingers. Furthermore the model captures the need for finger
loading in order to resist upward forces. It also shows an effect of passive
finger loading for forces with nonzero $x$ component: pushing sideways
increases the amount of resistance to upwards forces.
The reason for the asymmetry of Fig.~\ref{fig:package_exact} however is not
immediately obvious, as the grasp itself appears symmetric. In fact however,
the two distal contacts are ever so slightly offset, causing the object to pivot about the left distal contact and
wedging itself stuck if enough leftward force is applied. The grasp in
Fig.~\ref{fig:skewed_grasp} makes it clearer why this behavior occurs - here
the contacts are visibly offset. Note, that this wedging behavior is very
different from the wedging behavior discussed in Chapter~\ref{sec:3dfriction},
which occurred when omitting the MDP. There, the wedging occurred no matter
the applied wrench such that arbitrary wrenches could be resisted.
Furthermore, the resulting contact forces did not satisfy energy conservation.
\begin{figure}[tbp]
\centering
\includegraphics[width=0.75\columnwidth]{graphics/skewed_grasp.png}
\caption{A grasp designed to highlight the 'wedging' effect. The two contacts
on the distal link are offset with respect to each other allowing wedging to
occur.}
\label{fig:skewed_grasp}
\end{figure}
In contrast, in our framework only specific wrenches allow wedging to occur.
These wrenches depend on the geometry of the grasp and are consistent with the
rigid body statics of the grasp problem. The equilibrium contact forces
predicted by our framework satisfy the MDP and hence energy conservation.
However, as our method allows us to solve the rigid body problem very
accurately, only a small offset is required for our model to predict wedging
of the object; an offset that is easily within the accuracy of a typical
triangular mesh. Note, that this behavior is fully consistent with the rigid
body assumption (although we introduced compliance at the contacts we ignore
changes in grasp geometry due to motion) and the predictions made by our
framework are correct, albeit highly sensitive to the grasp geometry.
Of course in practice it is not advisable to rely on such volatile geometric
effects. Therefore taking into account geometric uncertainties is of paramount
importance for practical applications. Fig.~\ref{fig:package_robust} shows
which forces can be robustly resisted when we consider the uncertainty in
normal angle to be no larger than 2.5\degree~(using the approach outlined in
Chapter~\ref{sec:robust}.) The resulting plot of resistible forces is
approximately symmetric corresponding to the near-symmetry of the grasp. The
indicated spaces of resistible forces both with and without a preload are
consistent with our intuition and the empirical data presented in
Chapter~\ref{sec:3d_apps_iterative}.
\begin{figure}[t]
\centering
\includegraphics[width=0.85\columnwidth]{graphics/skewed.png}
\caption{Forces in the $xy$-plane predicted resistible for the grasp in
Fig.~\ref{fig:skewed_grasp} using our model and algorithm. In blue are forces
that can be resisted even without the application of preloading torques at the
joints. When loading the two proximal joints with 0.1Nm the maroon area is
added to the resistible forces. We also take into account a contact normal
uncertainty of 2.5 degrees to make sure the grasp is robust to such
discrepancies.}
\label{fig:skewed}
\end{figure}
We showed how we can make the stability predictions less sensitive to the
small scale geometric characteristics of the grasp and thus robust to
uncertainties. At a larger scale, however, wedging effects can be robustly
leveraged. In the grasp in Fig.~\ref{fig:skewed_grasp} the contacts are
significantly offset and the forces this grasp may resist robustly are shown
in Fig.~\ref{fig:skewed}. Thus, if we know the range of disturbances likely to
be encountered during a manipulation task our framework can be a valuable tool
in picking an appropriate grasp.
One feature of Fig.~\ref{fig:skewed} perhaps requires further
elaboration: The gaps in the second and fourth quadrants of
Fig.~\ref{fig:skewed} where forces may only be resisted when a preload is
applied but not otherwise. These gaps stand out because they appear thin
and are surrounded by large areas where applied forces are resistible even
without a preload. We thus investigated what effects cause these wedges in
order to verify if these predictions are physically accurate:
The grasps shown in Figs.~\ref{fig:spot_check} and~\ref{fig:skewed_grasp} were
created such that all contacts are as close as possible to lying in a mutual
plane. This is because three dimensional grasps can be very complex while two
dimensional grasps often allow us to use our intuition to validate the
predictions made by our framework. However, we are using the open-source
GraspIt!~\cite{MILLER04} package in our grasp analysis and a limitation of
this package is that it is difficult to create grasps that are truly two
dimensional in nature. Due to the meshing of the finger and object geometries
as well as the intricacies of collision checking in GraspIt! the contacts
always lie somewhat offset from the central plane.
In the specific case of the grasp in Fig.~\ref{fig:skewed_grasp} the contacts
do not quite lie within the $xz$-plane, in which the forces applied to the
object lie. This means that two contacts are generally not sufficient in order
to balance an applied force. Let us investigate the gap in the second
quadrant of Fig.~\ref{fig:skewed}: When a force is applied along the $(-1,0)$
direction the distal contact of the left finger acts as a fulcrum and the
object rotates clockwise loading the contact on the proximal contact of the
right finger. When a force is applied in the $(-1,1)$ direction the left
finger contact again acts like a fulcrum, however now the object rotates
counter-clockwise loading the distal contact on the right finger.
Somewhere in between those two cases the applied force points almost directly
at the fulcrum contact and instead of rotating the object is mostly pressed
against the left finger breaking both contacts on the right finger. Thus, only
two contacts remain and the grasp becomes unstable. In this particular case
the object would rotate out of the grasp around the y-axis as the two
remaining contacts on the left finger do not lie in the same plane as the
applied force.
Let us now consider the grasp in Fig.~\ref{fig:flasks}. Note that this grasp
comprises four contacts (one on each distal link plus one on a proximal link)
which do not lie on the same plane, and thus has to be analyzed in a
three-dimensional framework. We consider here an apparent task the robot
grasping the flask may need to execute. In order to pour a liquid contained in
the flask it is necessary to tip it. If we choose to use the robot wrist for
this tipping motion then the force of gravity acting on the flask and its
contents lies in the $xy$-plane. The grasp must thus be able to resist such
forces in order to complete its task successfully. Furthermore, we have a
choice of direction in which to turn the flask in order to pour its content.
Creating a visualization (shown in Fig.~\ref{fig:flask_map}) as before we can
deduce the need for a preload, and that it is more robust to turn the flask
counter-clockwise. Thus, once a grasp has been established our framework can
help in making decisions as to how a task is to be executed.
\begin{figure}[t]
\centerline
{\includegraphics[width=0.8\columnwidth]{graphics/flasks.png}}
\caption{3 dimensional grasp that highlights the necessity of a grasp to be
able to withstand a range of forces applied to the object. During a pouring
task gravity (pink) moves in the $xy$-plane.}
\label{fig:flasks}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.75\columnwidth]{graphics/flask.png}
\caption{Forces in the $xy$-plane predicted resistible for the grasp in
Fig.~\ref{fig:flasks}. In blue are forces that can be resisted even without
preloading joint torques. When loading the proximal joints with 0.1Nm, the
maroon area is added to the resistible forces. We use a contact normal
uncertainty of 2.5 degrees.}
\label{fig:flask_map}
\end{figure}
\subsection{Actuator command optimization}
The passive stability of a grasp is not only determined by its geometry: the
actuator commands are equally important. Consider for example the grasp in
Fig.~\ref{fig:cube}. The three contacts the hand makes with the object all lie
approximately in the $xz$-plane. Contacts 1 and 2 lie approximately on the
$x$-axis and oppose each other. Let us assume we create a grasp by commanding
the proximal joints of fingers 1 and 2 to each apply 0.1Nm. Let us vary the
torque commanded at the proximal joint of finger 3 and observe the difference
in passive stability. Specifically, we will use our framework to investigate
the maximum disturbance on the object the grasp can resist in two directions.
Fig.~\ref{fig:preload_test} shows the resulting predictions from our
algorithm.
First we are interested in forces along the positive $z$-axis. As expected,
the resistance is largest if no motor torque is applied by finger 3. Any load
by this finger only adds to the disturbance and does not help in resisting it.
When the torque applied by finger 3 reaches 0.09 Nm, it has completely removed
any resistance to $z$-direction forces. This can be easily verified: The
coefficient of friction chosen for this example is 0.45 and the moment arms
from joint to contact are identical for all three fingers. As there cannot be
any out-of-plane forces, the normal forces at all contacts will be
proportional to the applied joint torque. Thus, applying 0.09Nm at finger 3
claims all possible contact friction at both contacts 1 and 2: no further
forces in that direction can be resisted.
Let us now consider passive resistance to torques applied to the
object around the $x$-axis. If we do not load finger 3 the object is
only held by contacts 1 and 2. As both these contacts lie on the
$x$-axis they cannot apply any torque to the object in that
direction. Thus, the grasp cannot resist any torques around the
$x$-axis unless we also load finger 3. The third finger provides the
contact necessary for resisting the torque on the object. The more we
load finger 3, the larger the force at contact 3 and the larger the
resistible torque. At some point however, as discussed above, the
forces at finger 3 begin to overwhelm fingers 1 and 2 and the object
slides out along the $z$ axis even without any external disturbances.
\begin{figure}[t!]
\centering
\includegraphics[width=0.6\columnwidth]{graphics/cube.png}
\caption{Example grasp to illustrate the importance of appropriately choosing
grasp preloads. We assume a preload of 0.1Nm at the proximal joints of fingers
1 and 2 (axes marked as green dashed lines). We apply a range of preload
torques at the proximal joint of finger 3 (axis marked as yellow dashed line)
and evaluate passive stability.}
\label{fig:cube}
\end{figure}
\begin{figure}[t!]
\centering
\includegraphics[width=0.85\columnwidth]{graphics/preload_test.png}
\caption{Force in the $z$-direction (blue) and moment in the $x$-direction
(red) the grasp in Fig.~\ref{fig:cube} can resist for a range of preloads at
finger 3.}
\label{fig:preload_test}
\end{figure}
This example shows the importance of preload and passive stability:
for this grasp, loading finger 3 helps resistance against some
disturbances, but hurts against others. The right amount of preload
must thus be chosen based on the task. To the best of our knowledge,
no existing grasp analysis method can make such predictions.
Using our model, we can also find actuator commands that are optimal
with respect to any specific objective we choose. For example we may want to
minimize the maximum torque a single actuator must produce to resist a given
wrench $\bm{w}^m$. We now use Algorithm~\ref{alg:refinement} as follows:
\begin{eqnarray}
\text{objective:}~ & \text{minimize}~ \max_{j}{\tau_j^c} \\
\text{additional constraints:}~ & \bm{w} = \bm{w}^m
\end{eqnarray}
For the grasp in Fig.~\ref{fig:flasks}, we can compute the optimal actuator
commands for a force of $\bm{w}^m = [0,-1.21743,0,0,0,0]^T$, the largest force
in the negative $y$-direction that can be resisted when applying a preload of
0.1Nm at every proximal joint, according to our previous analysis. We find
that the optimal torques at these joints are actually $\bm{\tau}^c = [0,
0.042, 0.073]^T$. This shows that a large amount of the naive preload (0.1Nm
at every joint) is wasted in the sense that it does not increase disturbance
resistance in this particular direction. In fact it appears that loading
finger 1 was detrimental to grasp stability with respect to this disturbance.
In many practical applications it may be of interest to take into account
physical limits such as the maximum torque an actuator can apply or a maximum
permissible normal force in order to not break the grasped object. Such
constraints can be expressed as linear inequalities and are straightforward to
add to our model.
\subsection{Computational performance}
In Chapter~\ref{sec:refinement} we state that an accurate solution to the grasp
problem with discretized friction cones but without hierarchical refinement
requires a very large number of friction edges. We further argue that solving
such a problem becomes computationally intractable as a large number of
friction edges results in a large number of binary variables in the MIP. To
verify these hypotheses, we analyze the convergence of our algorithm with
varying levels of refinement of the friction approximation. We use the grasp
in Fig.~\ref{fig:flasks} as an example, with the task of finding the largest
force in the negative $x$-direction that the grasp can withstand. We do so at
varying levels of refinement, and record the predicted force magnitude and
runtime.
We compare two approaches: The first method ("full resolution") directly uses
a friction cone approximation that is at the desired level of accuracy in its
entirety. The second method ("hierarchical refinement") always starts with a
coarse approximation and refines it as described in
Algorithm~\ref{alg:refinement}. Throughout all experiments, both methods (when
able to finish) produced identical solutions, but the running times varied
greatly. All recorded data can be found in Table~\ref{tab:data}.
\begin{sidewaystable}[ph!]
\centering
\begin{tabular}{p{0.15\textwidth} | p{0.1\textwidth} p{0.1\textwidth} p{0.15\textwidth} | p{0.1\textwidth} p{0.1\textwidth} p{0.15\textwidth} }
\multirow{2}{0.15\textwidth}{Equivalent number of friction edges} & \multicolumn{3}{c|}{\textbf{Without robustness scheme}} & \multicolumn{3}{c}{\textbf{With robustness scheme}} \\
& Maximum wrench (N) & Time at full resolution (s) & Time with hierarchical refinement (s) & Maximum wrench (N) & Time at full resolution (s) & Time with hierarchical refinement (s) \\
\hline
4 & \textgreater 100 & 0.088 & 0.088 & \textgreater 100 & 0.11 & 0.11 \\
8 & 7.07435 & 0.22 & 0.43 & 7.07435 & 0.24 & 0.46 \\
16 & 6.34905 & 0.43 & 0.65 & 3.73377 & 0.45 & 1.02 \\
32 & 3.71036 & 0.72 & 1.92 & 3.70539 & 0.97 & 1.33 \\
64 & 3.70095 & 1.58 & 2.33 & 2.31479 & 1.83 & 3.09 \\
128 & 3.69775 & 5.80 & 3.50 & 1.21805 & 5.12 & 10.9 \\
256 & 3.69751 & \textgreater 600 & 4.87 & 1.21756 & 20.3 & 13.0 \\
512 & 3.69681 & - & 4.34 & 1.21743 & 102 & 17.8 \\
1024 & 3.07268 & - & 13.3 & 1.21740 & 394 & 22.9 \\
2048 & 3.07267 & - & 15.0 & 1.21739 & - & 32.2
\end{tabular}
\caption{Performance of the analysis of the grasp in Fig.~\ref{fig:flasks}. We
compute the magnitude of the largest force that can be applied in the negative
$y$-direction without destabilizing the grasp. We do this for varying levels
of refinement expressed as the number of sectors the friction cone
approximation contains. We record compute times for both an approach where all
sectors are already of the desired size and our hierarchical refinement
approach.}
\label{tab:data}
\end{sidewaystable}
\begin{sidewaystable}[ph!]
\centering
\begin{tabular}{p{0.05\textwidth} p{0.1\textwidth} | c | c c | c c}
\multirow{2}{0.1\textwidth}{\textbf{Grasp}} & \multirow{2}{0.1\textwidth}{\textbf{Number of contacts}} & \textbf{Stability check} & \multicolumn{2}{c|}{\textbf{Maximum disturbance}} & \multicolumn{2}{c}{\textbf{Optimal torques}} \\
& & Time (s) & Mean time (s) & Median time (s) & Mean time (s) & Median time (s) \\
\hline
(a) & 3 & 0.246 & 0.797 $\pm$ 0.067 & 0.754 & 0.389 $\pm$ 0.063 & 0.343 \\
(b) & 3 & 0.234 & 0.785 $\pm$ 0.085 & 0.745 & 0.447 $\pm$ 0.074 & 0.408 \\
(c) & 3 & 0.294 & 0.893 $\pm$ 0.056 & 0.907 & 0.347 $\pm$ 0.017 & 0.345 \\
(d) & 3 & 0.259 & 0.664 $\pm$ 0.081 & 0.560 & 0.308 $\pm$ 0.036 & 0.281 \\
(e) & 4 & 1.07 & 10.0 $\pm$ 3.4~ & 6.39 & 3.26 $\pm$ 0.50 & 3.83 \\
(f) & 4 & 15.7 & 36.7 $\pm$ 6.5~ & 39.5 & 13.5 $\pm$ 4.8~ & 9.58 \\
(g) & 4 & 2.78 & 33.8 $\pm$ 9.3~ & 20.8 & 16.8 $\pm$ 5.3~ & 12.3 \\
(h) & 4 & 8.02 & 23.7 $\pm$ 4.2~ & 23.2 & 12.3 $\pm$ 3.3~ & 8.10 \\
(i) & 4 & 1.66 & 14.4 $\pm$ 2.7~ & 11.4 & 1.67 $\pm$ 0.12 & 1.60 \\
(j) & 5 & 6.06 & 150 $\pm$ 24~ & 105 & 22.8 $\pm$ 5.8~ & 19.0 \\
(k) & 6 & 51.0 & 398 $\pm$ 104 & 344 & 136 $\pm$ 54~ & 80.6 \\
(l) & 6 & 27.5 & 488 $\pm$ 99~ & 330 & 777 $\pm$ 288 & 626 \\
\end{tabular}
\caption{Runtime analysis of our method for the three tasks
demonstrated in this paper performed on a consumer desktop computer for the
grasps shown in Fig.~\ref{fig:comp_grasps}. Where multiple trials were
performed we report the mean $\pm$ standard error as well as the median
runtimes.}\label{tab:comp_data}
\end{sidewaystable}
We notice that, at high levels of refinement, full resolution becomes
intractable, whereas hierarchical refinement finds a solution efficiently. The
study of how the refinement level affects the returned solution is more
complex. The exact value of the solution generally reaches a point where
increasing the accuracy of the approximation (adding more friction edges)
stops making a significant difference. In some cases, as in the case of the
maximum wrench in the left side of Table~\ref{tab:data}, this happens for
accuracy levels that only hierarchical refinement can reach. In others, as in
the case of the maximum robust wrench (with 2.5\degree~normal uncertainty) in
the right side of Table~\ref{tab:data}, both methods are able to find good
approximations of the final value. At the more shallow levels, full resolution
will often outperform hierarchical refinement, but since we generally do not
know which of these cases any specific query might fall into, only
hierarchical resolution allows us to increase the accuracy without the risk of
compute time exploding. These results show both that high accuracy is actually
required in order to obtain meaningful results, and that solving such problems
without hierarchical refinement is computationally intractable.
Another interesting finding is that the predicted maximum resistible force is
exceedingly large when only four friction edges are used in the first step of
the refinement process. This is because at this stage the MDP is only enforced
such that the friction force and negative relative tangential contact motion
lie within a 90\degree~sector. This allows sufficient freedom to the solver to
use the rigidity of the robot hand when backdriven along with unphysical
object motions to create large contact forces - much like what was described
in Chapter~\ref{sec:3dfriction} where there are no constraints on the friction
direction at all. This illustrates again the need for a high accuracy solution
to the grasp stability problem including the MDP.
\begin{figure}[ph!]
\centering
\subfigure[]{\includegraphics[width=1.8in]{graphics/a.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/b.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/c.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/d.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/e.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/f.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/g.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/h.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/i.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/j.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/k.png}}
\subfigure[]{\includegraphics[width=1.8in]{graphics/l.png}}
\caption{Algorithmically generated grasps to investigate the computational performance of our method.}\label{fig:comp_grasps}
\end{figure}
In order to investigate the practical applicability of our
method, we tested the runtime of our algorithm on a range of grasps that
could be encountered in a grasping task (see Fig.~\ref{fig:comp_grasps}.) We
generated these grasps on a range of differently shaped objects using a brute
force grasp planner~\cite{MEEKER19}. On each of these grasps we applied our
framework to perform the three tasks demonstrated above: Checking for stability,
finding the maximum resistible wrench in a given direction and computing the
optimal actuator commands. In the second task the direction along which to
find the maximum resistible disturbance can have an impact on the runtime of
the algorithm. We hence repeated the solution process with ten different
randomly generated directions to obtain more meaningful results. Similarly,
the time it takes to optimize the actuator commands depends on the external
wrench applied to the object and hence we also repeat these experiments with
ten randomly sampled external wrenches. The results are recorded in
Table~\ref{tab:comp_data}. In order to guarantee accurate results we continued
refinement until we reached a level equivalent to 2048 sectors in the friction
approximation. Empirically we have found this level of refinement guarantees
convergence for all grasps tested (although many converged sooner.)
We note that, as expected, the runtime of our algorithm grows with the
number of contacts. For grasps with three contacts, all queries
typically had sub-second runtime; up to and including five contacts
we noticed a runtime typically between 1 and 30 seconds. Also as
expected, stability checks (the most fundamental operation needed for
a grasp) are faster than computations like maximum resistible
disturbance or optimal joint torques. This suggests different
applications of our framework for different scenarios: pruning a
larger number of possible grasps using the faster stability analysis,
then computing the optimal torques only on the most promising
candidates. Even with six contacts, our method had a runtime on the
order of minutes, suitable for example for fixturing analysis in a
manufacturing line. Finally, we also note that, in the absence of our
hierarchical refinement, it is altogether intractable to approach this
level of accuracy for all except the simplest of grasps.
\section{Discussion}\label{sec:3d_furtherwork}
In this Chapter we described a grasp stability model that allows for efficient
and accurate solution methods under realistic constraints. Noting that an
exact formulation of Coulomb friction includes non-convex constraints (due to
the Maximum Dissipation Principle), we discussed how convex relaxations along
with successive hierarchical tightening can be used to solve non-convex
optimization problems. We specifically discussed McCormick envelopes and
pointed out their limitations.
Instead, we proposed a discretization method that allows the Coulomb friction
law to be reformulated as a piecewise convex Mixed Integer Program solvable
through branch and bound. However, such discretization methods traditionally
involve a trade-off: coarse discretizations provide only rough approximations
of the exact constraints, while high resolutions discretizations are
computationally intractable. To address this problem, we introduce a
hierarchical refinement method that progressively increases the resolution of
the discretization only in the relevant areas, guided by the solution found at
coarser levels.
Our local refinement method remains efficient up to high discretization
resolution, and also similarly to traditional tightening methods for convex
relaxations provides strong guarantees: if a solution cannot be found at a
coarse approximation level, the underlying exact problem is guaranteed not to
have a solution either. Combined, these two features make our method efficient
for problems both with and without exact solutions. It is, to the best of our
knowledge, the first time that grasp stability models incorporating Coulomb
friction (along with the MDP) have been solved with such high discretization
resolution.
Our model and algorithm accepts many types of queries: for example, we can
analyze the space of wrenches applied to an object that a given grasp can
withstand, or compute optimal joint commands given a specific object wrench.
Thanks to the hierarchical refinement method, these can be solved efficiently
(on the order of seconds per query) even with very high resolution
approximations of the MDP.
Running our analysis method on a number of example grasps, we showed
that our method predicts effects both intuitive (pressing directly
against contacts is passively stable, but pulling the object away
requires preload torques) and more subtle (an object wedging itself in
a grasp in response to a disturbance for a given contact geometry.) In
contrast, grasp stability models that do not consider the MDP produce
unrealistic results, and fail to predict the dependence of disturbance
resistance on applied preloads.
A limitation of our method is that, while it performs well in
practice, its theoretical running time remains worst-case exponential
in the level of discretization for friction constraints. Furthermore,
for cases where a coarse discretization yields a sufficiently accurate
solution, hierarchical refinement might be outperformed by an
equivalent method with uniform resolution (although these cases are
generally unknowable in advance, without actually solving up to high
resolutions.)
From a practical perspective, we would like to explore additional applications
of our approach. In the context of grasp analysis and planning the runtime of our
algorithm is currently is too large for online grasp planning with more than a
few contact. Therefore, we see the main practical relevance of our method in enabling
practitioners to understand and utilize passive effects in grasping and in
providing labels for learning-based grasp planners. The model we introduced
can allow multiple types of queries, and in this paper we have only presented
some of the possible applications.
Our framework may also be applicable to problems encountered in the field of
robotic locomotion, for instance to determine the balance of a legged robot on
uneven terrain~\cite{BRETL08}. In fact, we believe that our model and
algorithm is applicable to many other fields concerned with the stability of
arrangements of rigid bodies with frictional contacts and other unilateral
constraints such as pushing in clutter and robotic construction.
From a theoretical perspective there are many interesting problems remaining.
Firstly, we took care that our convex relaxation satisfies the requirement
that a coarse relaxation contains the solution space of all successively
tighter relaxations. This characteristic is important for Branch and Bound
algorithms that prune parts of the solutions space based on the fact that the
minimum found in such a coarse relaxation provides a lower bound to the
minimum in any tighter relaxation. Instead of making use of this, we solve an
entire Branch and Bound problem at every refinement step. This means that
Branch and Bound is recomputing much of its search tree at every step.
Instead, we could save the tree generated at one refinement step and use it to
warmstart Branch and Bound at the next. This promises large improvements in
performance and the relaxation we proposed in this chapter satisfies all the
requirements for such an approach.
Furthermore, recent work by Huang et al.~\cite{Huang2020} built upon our own
work discussed in Chapter~\ref{sec:2d} and developed an algorithm that can
determine all possible combinations of contact slip states. The slip state of
a contact is defined as the sector of a discretized tangential plane
containing the relative tangential contact motion --- much the same as in our
work discussed above. They make use of the fact that not every combination of
contact slip states is possible under rigid body motion constraints. Their
algorithm could be a useful pre-processing tool that can prune large amounts
of the Branch and Bound search tree based on these rigid body
constraints.
Finally, we have thus far turned to commercial solvers for the solution of the
Mixed Integer Programs that describe our grasp models. These solvers search
for an exact solution through computationally expensive methods such as the
Branch and Bound algorithm. Recently, however, there has been promising work
on the development of more efficient, albeit approximate solution
methods~\cite{WU18}. Reducing the computational demands of our algorithms
would greatly affect their practical applicability and hence we will
investigate these novel methods.
\chapter{Introduction}\label{sec:introduction}
\section{Background}\label{sec:intro_background}
Since the introduction of the first robotic manipulation systems they have
almost exclusively been confined to specialized spaces. This is true both in
the physical space (as to guarantee the safety of humans in the vicinity) and
the task space. The environments they work in are structured and engineers
design the tools that robots use specifically for a single task. This allows
for the application of robots in highly repetitive tasks where each task
instance is exactly the same as every other instance.
This paradigm could not be farther removed from the environment us humans
experience. Our everyday environments are complex, unstructured and cluttered.
While some tasks may seem repetitive to a human, instances are never exactly
alike. Attempting to bridge this divide and enabling robotic manipulators to
become helpful in human spaces is perhaps the most important issue facing the
field of robotic manipulation today.
While to date no manipulation system has found success in regular human
environments, efforts at breaching the limitations and introducing functional
robots to everyday environments and tasks are ongoing. The advent of soft
robotics and passively compliant hands has enabled the grasping of isolated
objects. Advances made in computer vision over the last two decades allowed
for significant progress to be made towards solving pick-and-place tasks in
clutter. However, there remains a distinct lack of dexterity. In fact it
appears that the most successful methods for picking objects from clutter
leverage suction grippers instead of multi-fingered
hands~\cite{ijcai2017-676}\cite{7583659}\cite{morrison2018cartman}\cite{ackerman_2020}.
These methods practically reduce the grasping problem to one of computer
vision as they are concerned with identifying surfaces on which to place the
suction gripper and do not require grasp planning or contact modeling.
The majority of works focusing on practical applications of multi-fingered
hands view grasping as the task of placing contacts in order to fulfill a
given task. Despite the advent of practical tactile sensing technology little
attention is being payed to the explicit control of contact forces, which is a
defining characteristic of the human manipulation experience. There is a
wealth of work into the theoretical foundations and the mechanics of grasping
that aim to provide the understanding of the intricate relationship between
contact forces and actuation that is required for truly dexterous
manipulation. However, none of the popular practical manipulation
methods~\cite{mahler2017dex}\cite{1241860}\cite{5152709}\cite{4813847}\cite{SAUT2012347}\cite{8255597}
make use of those theoretical works. In fact, interest in theoretical grasp
modeling seems to have waned since the early 2000s.
It appears as though the most progress towards dexterous multi-fingered
manipulation has been made in fields, which have only become established
relatively recently compared to the bulk of the manipulation literature. The
fields in question are those of Deep Learning and Reinforcement Learning.
There is promising work indicating that neural network policies can be trained
to process the vast amounts of sensor data and manipulate objects with more
and more
dexterity~\cite{doi:10.1177/0278364919887447}\cite{openai2019solving}.
It strikes the author as fascinating, that the foundational works of grasp
modeling appear to have been largely forgotten while large impact results are
obtained using entirely model-free techniques. We believe there are two
potential reasons for this:
\begin{enumerate}
\item The theoretical works on multi-fingered grasping and unilateral contact
modeling did not capture some important aspect of grasping, made the wrong
assumptions or are too computationally complex to be of practical use;
\item The theoretical works are unknown to the practitioners in the learning
community or their usefulness has not yet been discovered.
\end{enumerate}
We do believe that the first point above as to why the grasping theory has not
been widely adopted by the manipulation community has at least some truth to
it. In Chapter~\ref{sec:related} we will discuss in detail the different
theoretical approaches and their limitations in modeling modern robotic hands.
In short the majority of the grasp modeling literature introduces the
assumption that the contact wrenches\footnote{A wrench is a contraction of a
force and a torque.} of a grasp can be somehow actively controlled in real
time and in reaction to disturbances applied to the grasped object.
In practice this assumptions means that the robotic hand must be fully
actuated, highly articulated, and equipped with torque or tactile sensors.
Robotic hands of such complexity are few in number and rarely used in
practice. For reasons we will discuss in Chapter~\ref{sec:bridge} the majority
of robotic hands in use today either lack the kinematics, the actuation scheme
or sensing ability to be able to actively modulate contact wrenches. This
means that in practice we rarely explicitly reason about the contact wrenches
when grasping objects with robotic hands. Instead, we rely on either of two
entirely passive effects:
Firstly, there is passive compliance as showcased by underactuated hands or
soft hands. While these hands are complex in their own right they trade off
real-time control of contact wrenches in favor of a priori design complexity.
The second effect is more subtle and applies to all hands with highly-geared
actuators and thus nonbackdrivable joints. Large gearing ratios between the
actuators and the joints coupled with the friction present in the gearbox mean
the fingers cannot be moved through forces applied externally to the finger.
This means that fingers can provide potentially rigid constraints for the
grasped object --- namely when the object is being pushed against that finger
by the applied wrench or contact wrenches from other fingers. While these
passive effects greatly reduce the complexity of control for grasping tasks
they cannot be analyzed using tools derived from the traditional grasping
theory.
In Chapter~\ref{sec:bridge} we will provide an explanation as to why the
design of robotic hands has diverged so far from the theory developed in order
to model robotic grasping. However, with the increased interest in machine
learning for dexterous manipulation there is also renewed interest into highly
complex hands. Reinforcement learning is a promising candidate for the
synthesis of the highly complex controllers required for truly dexterous
manipulation. Such controllers --- or policies --- require enormous amounts of
data and thus robotic hands providing various modes of sensing technology are
being developed. We believe that with these new hands much of the classical
grasping theory will become relevant again. However, it appears that its
potential has not yet been realized by the learning community.
\section{Contributions}
As we argue above the lack of ability to model the passive effects provided by
modern robotic hands is one of the most important limitations that have
stymied the success of the grasping theory in practical robotic manipulation.
To the best of the author's knowledge there is no explicit mention of the
implications of nonbackdrivable joints in the literature even though robotic
hands with such properties appear in the majority of practical manipulation
works. We thus develop our own methods of analyzing grasps with passive
effects. Specifically, we are interested in predicting the stability of grasps
as well as the contact forces that arise due to actuation forces or wrenches
otherwise applied to the grasp.
\begin{itemize}
\item We begin by investigating the passive stability of planar grasps and
develop a novel polynomial-time algorithm that makes use of results from
computational geometry. We improve on previous approaches that did not
incorporate accurate frictional constraints including the maximum dissipation
principle. As such, we introduce the first 2D grasp model with Coulomb
friction for grasp stability analysis that is solvable in provably polynomial
time.
\item Moving on to spacial grasps we show that omission of the maximum
dissipation principle introduces unphysical solutions. We thus present a
physically motivated iterative algorithm that mitigates this effect. While the
algorithm is not guaranteed to converge, we verify its accuracy with empirical
data.
\item In order to obtain an algorithm that is guaranteed to converge we
introduce a novel contact model that allows us to efficiently solve for
contact forces obeying Coulomb friction including the maximum dissipation
principle. Specifically, we introduce a convex relaxation of the Coulomb
friction model and an algorithm for the hierarchical successive tightening of
the relaxation. Our method is guaranteed to converge to the exact solution and
is sufficiently efficient for the analysis of practical grasps.
\item We apply our algorithms to answer for the first time grasp stability
queries that take into account the passive behavior of the robotic hand. These
results provide examples of possible applications of our framework to
practical manipulation tasks. We make implementations of the grasp models and
algorithms for spacial grasps publicly available as part of the open source
GraspIt! simulator~\cite{MILLER04}.
\item With the more recent drive towards more dexterous manipulation by the
deep learning community, there is renewed demand for highly sensorized hands
and we believe the rich grasping theory that has mostly been forgotten by the
manipulation community is once again becoming relevant. Our final contribution
is an excursion into a potential application of theoretical grasp models in
ordinarily model-free reinforcement learning of in-hand manipulation.
\end{itemize}
\section{Dissertation outline}
We begin by providing a broad summary of the grasp models and theories
developed by the manipulation community in Chapter~\ref{sec:related}, taking a
closer look at some of these works, which we find to be most pertinent to the
manipulation problems the field faces today. Furthermore, we will introduce
some of the more recent work demonstrating dexterous manipulation -
specifically reinforcement learning for in-hand manipulation.
What follows are the technical chapters of this dissertation. Beginning with
our work on grasp modeling in two dimensions presented in Chapter~\ref{sec:2d}
we then move our attention to problems in three dimensions in
Chapters~\ref{sec:three_dim} \&~\ref{sec:cones}. We will discuss some
preliminary results of our ongoing work investigating the applications of
grasp stability analysis to reinforcement learning of in-hand manipulation
tasks in Chapter~\ref{sec:shield}.
Finally, we provide concluding remarks in Chapter~\ref{sec:conclusion}.
\chapter{Problem Overview and Contributions}\label{sec:overview}
\section{Motivation}
The analysis of the stability of a grasp is a foundational aspect of
multi-fingered robotic manipulation. Determining the ability of a grasp to
resist given disturbances, formulated as external wrenches applied to the
grasped object, is equivalent to computing the stability of a multi-body
system with frictional contacts under applied loads. Problems of this kind are
thus pervasive in grasp analysis and may be encountered in many other
scenarios that require simulation of general rigid bodies with frictional
contacts.
In the context of robotic manipulation the following queries are important in
practical use:
\begin{itemize}
\item \textit{Given a set of commanded torques and an external
disturbance will the system as described above remain quasistatically
stable?}
\item We can also formulate the inverse query to obtain useful insight
into how to control the hand: \textit{Given an external disturbance, how must
we command the actuators to guarantee the grasp remains stable?}
\end{itemize}
We argue that these queries are foundational to any robotic manipulation task.
In order to illustrate their place in robotic manipulation let us consider the
grasp in Fig.~\ref{fig:package}. Does the grasp remain stable if we apply
either disturbance $\bm{w}_1$ or $\bm{w}_2$ to the grasped object? In order to
resist those disturbances, contact forces must arise that balance them.
Clearly in either case there exist contact forces that satisfy a simple
friction law (illustrated by red friction cones) and balance the disturbance.
In fact, this is a force closure grasp and hence contact forces exist that
could balance arbitrary disturbances.
In practice, however, this is not a sufficient criterion for grasp stability.
It is clear that contact forces $\bm{c}_2$ and $\bm{c}_4$ will only arise if
we have previously loaded the grasp such that there is sufficient normal force
at contacts 2 and 4 to sustain the friction forces required: an appropriate
preload is required, or the object will slip out. We could, for example apply
actuator torques at the joints such that the hand 'squeezes' the object and
hence provides such a preload.
We can make a similar argument about contact forces that balance disturbance
$\bm{w}_2$, however if we assume that the joints on the robotic hand are
nonbackdrivable (as is the case with most robotic hands in use today) contact
forces $\bm{c}_1$ and $\bm{c}_3$ will arise entirely passively. The
disturbance will push the object against the fingers, which due to the
nonbackdrivability of the joints provide a rigid support. There is no need for
us to apply any torques at the joints as the grasp will be stable regardless.
We call this \textit{passive resistance}.
\begin{figure}[!t]
\centering
\includegraphics[width=0.6\columnwidth]{graphics/grasp_3.png}
\caption{A grasping scenario where a hand establishes multiple
frictional contacts (numbered 1-4) with a target object. External
disturbance $\bm{w}_1$ can be
resisted by contact forces $\bm{c}_2$ and $\bm{c}_4$; $\bm{w}_2$ by
contact forces $\bm{c}_1$ and $\bm{c}_3$.}\label{fig:package}
\end{figure}
This start contrast in the requirements for stability serves as an example of
why it is paramount to take into account the kinematics of the hand and its
actuation scheme when attempting to answer the stability queries described
above. A grasp model that accounts for all these effects and can answer these
queries must capture the interplay of contact forces, joint torques and
external wrenches. It must be able to accurately predict how joint torques and
external wrenches are transmitted through the object and distributed across
the contacts taking into account the unilaterality of contacts and
nonbackdrivable joints as well as the nonlinear nature of friction laws.
\section{Manipulation: Theory}
Much of the previous work in this field discussed in~\ref{sec:related} focuses
on two perspectives on robotic grasping.
\subsection{Grasp Stability as a rigid body problem}
A grasp can be viewed as a completely passive fixture. The grasp is made up of
rigid bodies that are either fixed in space (like the 'grounded' base of the
robot), free floating (like the grasped object) or connected by a kinematic
chain (such as the manipulator links.) The bodies comprising the kinematic
chains are connected to each other and --- at least indirectly --- the ground
by bilateral constraints such as hinge joints. Contacts between bodies are
unilateral constraints also satisfying a friction law such as Coulomb
friction. All external forces acting on the bodies such as gravity or
actuation wrenches are known. Such an arrangement is deemed stable if it
remains at rest (all accellerations are zero.)
The works described in~\ref{sec:related_mechanics}
and~\ref{sec:related_dynamics} focusing on the analysis of rigid bodies have
produced very natural formulations based on complementarity problems as well
as numerous relaxations in order to improve efficiency. We could, for example,
attempt to use any of the various dynamics solvers the field has produced to
compute contact forces and calculate a single time step. If all accellerations
remain zero, we deem the grasp stable. Unfortunately, this approach will not
give us definite results.
Any algorithm that makes use of relaxations also introduces artifacts as we
are no longer solving the exact problem as outlined above. These artifacts are
acceptable for the purposes of those algorithms: Dynamics simulation that is
fast enough for use in time sensitive applications such as virtual reality or
deep learning. In our application, however, these artifacts mean that we
cannot rely on the simulation to produce exactly zero accellerations even for
grasps that are truly stable.
Thus, we need to focus on the algorithms that solve the exact problem. Perhaps
the best candidate is the formulation as a mixed nonlinear complementarity
problem (mixed NCP) introduced by Trinkle et al.~\cite{TRINKLE97}. In a
previous paper~\cite{PangTrinkle1996} Pang and Trinkle showed that in the case
of systems initially at rest the existence of a solution is guaranteed.
However, they also note a difficulty in using this formulation for stability
analysis: One must show that \textit{every} solution to the complementarity
problem has a zero accelleration.
Generally, when using a complementarity formulation in a dynamics engine only
one solution is required in order to step the simulation forward in time. This
allows the application of solvers such as Lemke's algorithm, which only finds
a single solution --- if one exists. The only algorithms that find all
solutions to general complementarity problems are enumerative in
nature~\cite{murty1988linear} and therefore computationally complex.
To the best knowledge of the author, the work which has comes closest to
answering the question of stability under the above assumtions is the work by
Pang et al.~\cite{ZAMM643}, which makes use of the complementarity formulation
due to Trinkle et al.~\cite{TRINKLE97}. In special cases, in which the
solution is unique, there is no ambiguity due to multiple solutions and the
single solution to the LCP determines stability. A framework that efficiently
determines stability for general grasps under the rigid body assumption has
not yet been found.
\subsection{Grasp Stability as a grasp force synthesis problem}
The second perspective on robotic grasping introduces the assumption that the
contact wrenches of a grasp can be somehow actively controlled. This can be
done directly through commanding appropriate joint torques or more indirectly
through setting compliance parameter such as servo gains. This assumption
allows the analysis of grasp analysis through the equilibrium equations alone,
where the rigid body approach required treatment of the full dynamics
equations. These methods allow us to compute optimal contact forces and the
joint torques necessary to balance them. Thus, for any specific wrench on the
object encountered throughout a task we can compute the specific optimal joint
torques for stability.
In order to use this in practice, however, we have to make a string of
assumptions:
\begin{enumerate}
\item We assume perfect knowledge of the disturbance to the object
that must be balanced at all times;
\item We assume that we can actively control the contact forces at
every contact;
\item We assume that we can actively control the joint torques required
for equilibrium;
\item We assume that we can accurately control the torque
output of the hand actuators.
\end{enumerate}
In the majority of robotic manipulation tasks these assumptions do not hold.
First, the exact disturbance wrench acting on an object is difficult to
compute --- it requires knowledge of the mass and inertial properties as well
as the exact trajectory of the object. Any additional disturbance cannot be
accounted for unless the fingers are equipped with tactile sensors. Second,
many robotic hands are kinematically deficient and contain links with limited
mobility. This means, for example, that we cannot directly control the
contact force at a contact on the palm of the hand for instance. Forces at
such a contact can only arise passively by transmission of the disturbance on
the grasped object or forces at other contacts through the object.
Third, the kinematics of the hand may not permit explicit control of the
torques at every individual joint. This is the case for the class of
underactuated hands, where joint torques by definition may not be
independently controlled but are determined by the kinematic composition of
the hand. Finally, most robotic hands use highly geared motors, which makes
accurate sensing and control of the torques at the hand joints all but
impossible.
Therefore, in practice it is rarely the case that contact wrenches are
actively controlled in response to disturbances to the grasp. Unfortunately,
this means that force closure is a necessary but by no means a sufficient
condition for the ability of a grasp to resist arbitrary disturbances. It just
indicates the existence of contact forces that satisfy the friction laws and
can balance the applied disturbance but does not guarantee they will arise,
unless we assume that we are actively controlling the contact forces to that
end.
A method to alleviate some of the limitations due to the above assumptions is
to take into account the flexibility of the object and the elements of the
hand. Bicchi~\cite{BICCHI93} made use of the grasp compliance theory developed
by Cutkosky et al.~\cite{CUTKOSKY_COMPLIANCE} in order to overcome the second
of the assumptions listed above. We could make use of the same theory to model
a grasp without any of the other three assumptions by modeling the grasp as an
entirely passive fixture. Assume the grasp is made up of deformable components
such as series-elastic actuators or the contact itself is deformable due to an
elastic skin covering the finger links. These deformable components would
provide us with constitutive equations such that we can solve for
displacements and hence forces given a specific disturbance.
One obvious limitation of this approach is that the stiffness parameters can
be difficult to obtain, particularly for very stiff hands. Another limitation
was pointed out by Prattichizzo et al.~\cite{PRATTICHIZZO97}: When there is
compliance in the grasp the presence of sliding or breaking contacts does not
necessarily mean the grasp is unstable. Only a subset of contacts may be
required for stability. For illustration, consider a force applied to the
object in Fig.~\ref{fig:package} along the positive $x$-axis that pushes the
object to the right. Only contacts 3 and 4 may be required to balance this
disturbance, so even if contacts 1 and 2 break the grasp remains stable.
This causes an issue as the contact wrench at a breaking or sliding contact is
clearly not described by a compliance relation. At a breaking contact a
compliance relation would lead to a negative normal force, which is
impossible. At a sliding contact the contact force would depend on linearly on
the tangential displacement, which may not satisfy the maximum dissipation
principle or even the friction cone constraint. While Prattichizzo et al. find
approximations that work well for their purposes, there is no efficient way to
apply an approach based on grasp compliance to a problem with potentially
breaking or slipping contacts.
\section{Manipulation: Praxis}
Having discussed the limitations of the grasp force synthesis theory it is
istructive to think about why robotic hands have not evolved in such a way as
to fulfil the assumptions listed above. We discussed why these assumptions are
difficult to satisfy in practice and why attempts to remove those assumptions
introduce their own limitations. Still, it seems to not provide enough reason
for the schism that separates the theory and the hands commonly in use today.
After all, why build hands that are so far removed from the theory that allows
their analysis? In order to answer this question we must revisit a feature
present in most commonly robotic hands that we have already mentioned in the
Motivation section: Passive resistance due to nonbackdrivable joints.
Nonbackdrivability arises due to the highly geared actuation of most commonly
used hands. Large gearing ratios between the actuators and the joints mean the
fingers are nonbackdrivable thus providing potentially rigid constraints for
the grasped object. Passive resistance allows practitioners to greatly
simplify robotic grasping. We can often apply actuator torques that close the
fingers around the object without necessarily worrying if these will balance
out once contact is made: the fingers jam as the hand squeezes the object, and
the gearboxes between joints and actuators provide additional structural
torques. If the grasp geometry is adequately chosen, the equilibrium joint
torques arise passively when the fingers squeeze the object between them and a
stable grasp arises. For example, in the grasp in Fig.~\ref{fig:package} it is
sufficient to actively load the joints of one finger. The nonbackdrivability
of the other finger means the object will be stably grasped and equilibrium
joint torques arise passively in the non-actuated finger.
The same phenomenon can allow a grasp to withstand a range of disturbances
applied to the object without a change in the actuator commands. If chosen
wisely, the initially applied preload is sufficient to balance the object
throughout the task and various corresponding different disturbances. This is
the true power of passive resistance.
We believe this characteristic to be the reason why robotic hands without
explicit real-time actuation have become so commonplace. Reactions to
disturbances arising passively due to non-backdrivable actuators remove the
need for complex hand control schemes and the high fidelity sensing they
require. If the grasp geometry and commanded torques are chosen wisely the
grasp will be passively stable to a range of disturbances greatly simplifying
the control of the hand. We simply need to pick a constant command appropriate
to the task.
So the answer to the question as to why most robotic hands lack the complexity
required for the application of the grasp theory is that practitioners can
rely on passive stability instead. This allows them to form stable grasps,
even though they lack the tools required to analyze them.
On a final note, there is another class of hands commonly found in research
labs today: Underactuated hands. These hands make use of their passive
compliance in order to conform around objects. Soft robotic hands take this
approach to the extreme. All these hands have in common that their passive
behavior greatly simplifies control, which explains their popularity.
\section{Implications for learning in-hand manipulation}
With the more recent drive towards more dexterous manipulation by the deep
learning communitiy, there is renewed demand for highly sensorized hands and
we believe the rich grasping theory that has mostly been forgotten by the
manipulation community is once again becoming relevant.
\section{Contributions}
Our main contributions are two-fold. Firstly, we provide
The works discussed above are clearly related in spirit to our endeavour.
However, the algorithms developed are either exceedingly computationally
complex or do not take into account all of the effects that characterize
grasps with robotic hands commonly in use. In the following we will develop
computationally efficient algorithms for the analysis of problems as described
in this section
We introduce a quasi-static model that addresses all the constraints above for
general, three-dimensional grasps. We show that inclusion of
the MDP is vital to the physical accuracy and usefulness of such a model and
present a convex relaxation that allows for efficient solution of problems
involving the MDP. While our model is based on a linear approximation of
friction cones, we introduce a computationally efficient method that can
successively tighten this approximation up to the desired accuracy.
A very useful property of tightening approaches is that
they allow for strong guarantees: if, at any stage of refinement, our model
fails to find a solution, we can guarantee that no solution exists to the
exact problem. This allows for early exit from computation in cases where
equilibrium cannot exist. It is, to the best of our knowledge, the first time
that a model has been proposed that can handle three-dimensional frictional
constraints that include the MDP, up to arbitrary accuracy (and thus
approaching the solution to the exact problem) and in a computationally
efficient fashion.
Depending on the choice of variables and optimization objective, our
model can be used for a wide range of queries. In this paper, we
illustrate its applicability to quasi-static grasp stability analysis
by answering multiple queries on a number of example grasps. The
queries we show here include: Given applied joint torques, will the
grasp be stable in the presence of a specified external disturbance,
assuming passive resistance effects? Alternatively, given applied
joint torques, what is the largest disturbance that can be passively
resisted in a given direction? Finally, given a disturbance, what are
the optimal joint torques that a grasp can apply for stability? We
believe these are all useful tools in the context of grasp analysis,
and plan to expand the use of this model to other types of problems in
the future.
The specific queries outlined above may be of interest to roboticists only,
but an algorithm that can answer them would have applications in many other
fields faced with similar issues. In classical structural engineering, the
typical approach to solving this type of problem is to consider the
constitutive relations governing the deformation of the bodies involved. For
simple structures, this allows for an analytical computation of loads and
deformations in the system. More complex structures require approximation and
computationally intensive methods such as Finite Element Analysis. Contacts
exhibiting relative motion (i.e. sliding) further complicate these problems if
Coulomb friction is involved, as the constitutive equations determining
frictional forces at sliding contacts are non-convex.
\chapter{Related Work}\label{sec:related}
Examining the problems the dexterous manipulation community is working on
today --- multi-fingered grasping, pick-and-place, in-hand manipulation,
regrasping, teleoperation, etc. --- they all share one requirement: the
ability to move a grasped object in a desired manner. In manipulation this
most often means maintaining a robust grasp on the object. Thus, the stability
of a grasp is a foundational prerequisite to many forms of dexterous
manipulation.
There is no singular agreed-upon definition of grasp stability in the
literature~\cite{doi:10.1177/027836499601500203}\cite{897777}. Stability might
be simply defined as the existence of equilibrium contact wrenches that obey
some friction law. This is quite different from the notion of stability in
control theory, which distinguishes between stable, unstable and marginally
stable equilibria. In some works the notion of grasp stability also includes
treatment of some region around an original equilibrium state and is thus
similar to that of asymptotic stability commonly encountered in control
theory, which denotes a system that returns to its original state after a
small perturbation is applied in an equilibrium state. Other works use a
broader definition of stability: Contacts may slip leading to the dissipation
of energy such that a system will not, in general, return to its initial state
after a small perturbation. Such a grasp may, however, still be considered
stable if it reaches a new equilibrium point where the grasped object is
relatively at rest with respect to the hand.
Furthermore, some works make use of the quasi-static assumption (all motions
are assumed to be slow enough such that effects due to inertia can be
neglected) while others use the full dynamic equations of motion in their
treatment of grasp stability. The exact definition of grasp stability heavily
depends on the context and the choices made by the researcher in modeling the
grasp. However, they all have in common the study of contact forces and
torques at the interfaces between a robotic hand and a grasped object.
\section{Grasp force analysis}\label{sec:related_closure}
\subsection{Force closure and stability}
The class of \textit{form closure} grasps is trivially stable as it consists
of grasps in which the contacts totally immobilize the grasp object. Analysis
of form closure grasps dates back to Reuleaux (1876)~\cite{REULEAUX1876} who
showed that for planar grasps a minimum of 4 frictionless contacts are
required for form closure. For spacial form closure grasps
Somov~\cite{SOMOV1900} and later Lakshminarayana~\cite{LASHMINARAYANA78}
showed a minimum of 7 frictionless contacts are required. Another class of
grasps is that of \textit{force closure} grasps. These grasps are such that
the hand can apply arbitrary wrenches to the object through the contacts.
There is still disagreement over the exact definitions of the closures
mentioned above. We choose to use the interpretation described by Bicchi and
Kumar in their review on grasp and contact modeling~\cite{BICCHI00}.
Salisbury~\cite{SALISBURY_THESIS} proposed an analytical method to test for
either form or force closure. However, perhaps the most commonly used method
to test for force closure was introduced by Ferrari and
Canny~\cite{FERRARI92}. Their algorithm constructs the total space of possible
resultant object wrenches that can be achieved by contact wrenches that obey
(linearized) friction constraints and whose magnitudes sum to 1. They call
this space the \textit{Grasp Wrench Space} or GWS. The smallest distance from
the origin to the convex hull of the wrenches making up the GWS is a measure
of the magnitude of the contact wrenches required to balance a worst-case
disturbance. Thus, it can also be used as a metric to quantify the
\textit{quality} of a grasp.
The characteristic of force closure is a necessary requirement for a grasp to
be able to resist and therefore be stable with respect to arbitrary
disturbances. Force closure is, however, by no means a sufficient condition
--- it just indicates the existence of contact wrenches that satisfy the
friction laws that can balance arbitrary disturbances but does not guarantee
they will arise~\cite{10.5555/2887965.2888103}. The choice of specific grasp
forces, or as Bicchi~\cite{BICCHI94} calls it the \textit{force distribution
problem} is crucial for the stability of a grasp. Bicchi~\cite{BICCHI94}
defined two basic questions:
\begin{displayquote}
"a) when external forces act upon the manipulated object disturbing its
equilibrium, how do they distribute between the contacts, and
b) how can we modify the contact forces so as to achieve desirable values in
spite of external disturbances."
\end{displayquote}
\subsection{Methods assuming full contact wrench control}\label{sec:related_control}
A complicating factor in this analysis is the unilaterality of contacts in the
context of robotic grasping --- objects in contact may only 'push', not 'pull'
on each other. Furthermore, contact wrenches are subject to friction laws such
as the Coulomb friction model~\cite{COULOMB1781}; providing an upper bound to
the ratio of friction force magnitude to normal force magnitude. If we can
actively control the hand and its kinematics allow us to apply arbitrary
wrenches at the contacts we can ensure that contact wrenches satisfy both
unilaterality and the friction constraints at all times. Thus, this assumption
greatly simplifies analysis and will be made by all of the works discussed in
the rest of Chapter~\ref{sec:related_control}. In this context the question of
grasp stability becomes that of finding contact wrenches that satisfy the
friction law and equations of equilibrium.
A further complication is that in general robotic grasps are statically
indeterminate (or hyperstatic). Even if a grasp has force closure it is
difficult in general to synthesize stabilizing contact forces as there is an
infinite number of internal stresses and hence equilibrium contact wrenches.
Salisbury et al.~\cite{SALISBURY83} investigated the conditions for a grasp to
become overconstrained for a variety of different contact types and was the
first to express contact wrenches as the sum of a particular and a homogeneous
solution. The physical interpretation of these solutions can respectively be
described as the \textit{manipulation forces} balancing the applied wrench and
\textit{internal forces} that do not directly contribute to resisting the
applied wrench but cause internal stresses in the object. This decomposition
allows for the synthesis of stabilizing contact wrenches given a grasp and an
externally applied wrench. First, the particular solution must be computed.
This can be done using a generalized inverse of the grasp map matrix relating
contact wrenches to the overall resultant wrench the hand applies on the
object. The computed manipulation forces will not in general satisfy
unilaterality and friction constraints. Given the grasp has force closure an
appropriate homogeneous solution from the nullspace of the grasp map matrix
can be added to obtain legal stabilizing contact wrenches.
This insight allowed Kerr et al.~\cite{KERR86} to formulate the synthesis of
contact wrenches as an optimization problem providing the foundation for the
large body of work on grasp force optimization, which is concerned with
finding optimal grasp forces in the space of contact forces possible under a
friction law. Linearizing the friction constraints they propose solving a
linear program in order to obtain contact wrenches that are as far as possible
from violating the constraints already mentioned as well as additional
constraints such as actuator torque limits or the dynamic range of tactile
sensors. Nakamura et al.~\cite{NAKAMURA89} used Lagrange multipliers to solve
a nonlinear grasp force optimization problem. In contrast to Kerr et
al.~\cite{KERR86} they argue that contact wrenches should not be maximized for
stability: As Cutkosky et al.~\cite{CUTKOSKY86} pointed out increasing grasp
forces reduces the risk of slipping but may make the grasp less stable to
disturbances. Therefore, they instead find the contact forces that minimize
the internal forces but retain a certain level of contact robustness (i.e. are
far enough from violating contact constraints.)
In order to avoid having to linearize the friction model Buss et
al.~\cite{BUSS96} showed a different optimization formulation applicable when
nonlinear friction constraints can be formulated as positive-definiteness
constraints turning the optimization problem into a linear matrix inequality
(LMI) problem. Their algorithm, however, requires a valid initial guess of
contact wrenches and they do not discuss how to obtain such a guess. Han et
al.~\cite{HAN00} built upon this work and cast the grasp analysis problem as a
set of convex optimization problems involving said LMIs thus eliminating the
need for an initial guess. Boyd et al.~\cite{BOYD07} developed a custom
interior-point algorithm that exploits the structure of force optimization
problems and thus very efficiently solves such problems. In fact, the
complexity of their algorithm is only linear in the number of contacts.
Jen et al.~\cite{doi:10.1177/027836499601500203} take a control theoretic
approach to grasp stability. Starting from a set of initial equilibrium
contact wrenches they derive feedback controllers for the control of contact
wrenches in response to motions of the grasped object such that the grasp
remains asymptotically stable.
\subsection{Compliance methods}\label{sec:related_compliance}
An alternative method to resolve the static indeterminacy is to take into
account the flexibility of the object and the elements of the hand. If we
assume the hand to be a passive fixture we may solve for contact wrenches by
taking into account the flexibility of the object and the fixture through
constitutive equations. This also allows us to analyze grasps without the need
to be able to control contact wrenches explicitly as we have in effect
replaced unilaterality and the Coulomb friction law with a model linearly
relating contact wrenches to displacements.
Salisbury~\cite{SALISBURY_THESIS} used this approach to develop a framework to
test for the stability of a grasp. A grasp is stable if the stiffness matrix,
which characterizes the behavior of the grasp under small perturbations is
positive definite. Nguyen~\cite{1088008} modeled each contact as a spring (a
method first introduced by Hanafusa et al.~\cite{HANAFUSA77}) and showed that
any force closure grasp can be made stable under this definition by choosing
appropriate spring stiffnesses. Cutkosky et al.~\cite{CUTKOSKY_COMPLIANCE}
extended this work to take into account the compliance of structural elements
of the hand and object as well as effects due to changing geometry such as
contact location changes due to rolling contacts. Adding also the compliance
due to servo gains allows for active control of the overall grasp compliance.
Salisbury~\cite{Salisbury1988} pointed out that previous work had focused on
manipulation using only the fingertips of the hand. They suggested using more
of the surface of robotic manipulators, which Salisbury calls 'Whole Arm
Manipulation'. Bicchi~\cite{BICCHI93} noted that in such cases we cannot
assume that the kinematics of the hand allow us to explicitly apply arbitrary
contact wrenches. For enveloping grasps (Bicchi calls them "whole-limb"
grasps) contacts occur on links with limited mobility such as proximal links
or the palm of a robotic hand. In consequence we cannot freely choose
internal forces in order to synthesize stable grasp forces --- only a subset
of the internal forces are actively controllable.
Similarly to the work by Nguyen~\cite{1088008} Bicchi models the contacts as
springs but also uses the compliance matrix introduced by Cutkosky et
al.~\cite{CUTKOSKY_COMPLIANCE} and the principle of virtual work to derive
expressions for the subset of \textit{active internal forces} (internal
forces, which can be actively controlled by commanding the hand actuators) and
the subset of \textit{passive internal forces} (which cannot be actively
controlled and therefore will remain constant at their initial value).
Demonstrating how a particular solution can be found from the compliance
matrix weighted inverse of the grasp map matrix Bicchi proposes a method to
find optimal contact wrenches, which are actually achievable with the
kinematics in question~\cite{BICCHI94}. This was a large step forwards as it
allowed for the analysis of grasps commonly encountered in practice.
With these insights Bicchi proposed a new definition of the term 'force
closure', which takes into account the kinematic capabilities of the grasping
mechanism to actively control the contact wrenches~\cite{BICCHI95}. He
introduced an algorithm to test for force closure under this definition. A
modification to this algorithm allows for a quantitative measure of how far a
grasp with optimal contact wrenches is from violating contact constraints.
Thus, the concept of a metric to quantify the quality of a grasp was extended
from a purely geometric concept~\cite{FERRARI92} to include the kinematic
capabilities of the hand to apply optimal contact wrenches.
\subsection{Quality metrics}\label{sec:related_metrics}
Quality metrics are an essential component of the grasp planning problem,
which can be described as the problem of computing appropriate contacts the
hand should make on the object. Optimal grasp planning can be posed as a
search over the space of possible grasps in order to find an instance that
optimizes a given quality metric. It should come to no surprise that grasp
quality metrics usually relate to the stability of the grasp. We have already
introduced the metric derived from the grasp wrench space~\cite{FERRARI92} and
the metric by Bicchi, which takes into account the hand
kinematics~\cite{BICCHI95}. Note, that the objective value in grasp force
optimization methods such as in~\cite{KERR86} can be understood as a metric of
grasp quality as well.
In many of the aforementioned works, the objective to be optimized (and hence
the quantitative measure of grasp quality) is related to how far the contact
wrenches are from violating contact constraints. Prattichizzo et
al.~\cite{PRATTICHIZZO97} take a similar approach, however, similarly to
Nakamura et al.~\cite{NAKAMURA89} they relate the distance contact wrenches
are from violating contact constraints to the magnitude of the external
disturbance acting on the object. Given optimal contact wrenches the magnitude
of the smallest external disturbance that will cause a contact constraint
violation is defined as the \textit{Potential Contact Robustness} or PCR. In
contrast to~\cite{NAKAMURA89}, however, contact forces are optimized over the
space of active internal forces as defined by
Bicchi~\cite{BICCHI93}\cite{BICCHI94}\cite{BICCHI95} using the compliance
analysis by Cutkosky et al.~\cite{CUTKOSKY_COMPLIANCE}
Another valuable contribution is founded on the insight that the robustness of
individual contacts is not necessarily required for grasp stability. They
argue that a grasp will remain stable even if some contact constraints are
violated. Contacts may slip or detach entirely --- as long as a sufficient set
of contacts remain that satisfy contact constraints grasp stability may be
maintained. Thus, PCR can be an overly conservative measure of stability. To
achieve a less conservative grasp stability metric --- the \textit{Potential
Grasp Robustness} or PGR --- they make some simplifying assumptions in order
to avoid modeling of the complex frictional behavior at the contacts.
Specifically, they assume a slipping contact may not apply any frictional
forces, which results in a stability measure that is still conservative,
however less so than one based solely on contact robustness. A further
disadvantage of this approach is that every potentially stable combination of
contact states (rolling, slipping, detaching) must be considered. Therefore
the computational complexity of this approach scales exponentially in the
number of contacts, which can be prohibitive for real-time evaluation of
enveloping grasps that make many contacts between the hand and grasped object.
\subsection{Discussion}\label{sec:related_gfa_discussion}
The methods introduced in Chapter~\ref{sec:related_control} assume that we
have some degree of control over the contact wrenches. They deem a grasp to be
\textit{potentially} stable if a solution to the equilibrium equations exists
that also satisfies contact constraints. However, as we have noted before,
force closure is no guarantee for stability. The existence of a solution to
the equilibrium equations is no guarantee that it will arise. Instead, we must
actuate the grasping mechanism accordingly in order to achieve the desired
equilibrium contact wrenches. In Chapter~\ref{sec:bridge} we will show that
this assumption is of only limited applicability for the majority of robotic
hands commonly used as they lack the capabilities to accurately control joint
torques.
The works discussed in Chapters~\ref{sec:related_compliance}
and~\ref{sec:related_metrics} introduce grasp models that do not necessarily
presuppose the full control of contact wrenches. However, in order to do so
they must introduce treatment of the compliance of the grasp and hence make
another set of assumptions. Specifically, Bicchi~\cite{BICCHI93} made use of
the grasp compliance theory developed by Cutkosky et
al.~\cite{CUTKOSKY_COMPLIANCE}. Assume the grasp is made up of deformable
components such as series-elastic actuators or the contacts themselves are
deformable due to an elastic skin covering the finger links. These deformable
components would provide us with constitutive equations such that we can solve
for displacements and hence contact wrenches given a specific external
disturbance.
One obvious limitation of this approach is that the stiffness parameters can
be difficult to obtain~\cite{TRINKLE95}, particularly for very stiff hands.
Another limitation was pointed out by Prattichizzo et
al.~\cite{PRATTICHIZZO97}: When there is compliance in the grasp the presence
of sliding or breaking contacts does not necessarily mean the grasp is
unstable. Only a subset of contacts may be required for stability. This causes
an issue as the contact wrench at a breaking or sliding contact is clearly not
described by a compliance relation. At a breaking contact a compliance
relation would lead to a negative normal force, which is impossible. At a
sliding contact the contact force would depend linearly on the tangential
displacement, which does not satisfy the Coulomb friction law. While
Prattichizzo et al. find approximations that work well for their purposes,
there is no computationally efficient and accurate way to apply an approach
based on grasp compliance to a problem with potentially breaking or slipping
contacts.
As all of the works discussed thus far do not model the friction forces at
sliding contacts the Coulomb friction model is often reduced to the statement
it makes about static contacts: The magnitude of the friction force may not
exceed the magnitude of the normal force scaled by the coefficient of static
friction. To the reader of the grasp force analysis literature it can often
appear as though this statement was the complete Coulomb friction model.
However, the Coulomb model also includes treatment of sliding contacts.
Specifically, it includes the statement that the friction force, which arises
at a sliding contact is the one, which dissipates the most energy. Thus, for
isotropic friction the friction force must oppose tangential motion at a
sliding contact.
By itself this is known as the \textit{principle of maximum dissipation} or
\textit{Maximum Dissipation Princinple} (MDP)~\cite{Moreau2011}. For a more
recent discussion of the MDP see the review by Stewart~\cite{STEWART00}.
Although many readers will know the MDP to be part of the Coulomb model of
friction, in this dissertation we will explicitly state when we make use of it
due to its absence from much of the grasp force analysis literature.
\section{Rigid body methods}\label{sec:related_dynamics}
A grasp can be viewed as a completely passive fixture. The grasp is made up of
rigid bodies that are either fixed in space (like the 'grounded' base of the
robot), free floating (like the grasped object) or connected by a kinematic
chain (such as the manipulator links.) The bodies comprising the kinematic
chains are connected to each other and --- at least indirectly --- the ground
by bilateral constraints such as hinge joints. Contacts between bodies are
unilateral constraints also satisfying a friction law such as Coulomb
friction. All external forces acting on the bodies such as gravity or
actuation wrenches are known. Such an arrangement is deemed stable if it
remains at rest (all accelerations are zero) or as Palmer~\cite{PALMER_THESIS}
puts it
\begin{displayquote}
"In the context of robotic assembly, we assume that objects are initially fixed
in space, and say that they are stable if the force of gravity cannot cause
the position of any object to change."
\end{displayquote}
\subsection{Rigid body mechanics}
Palmer~\cite{PALMER_THESIS} investigated the stability of arrangements of
rigid polygonal bodies under gravity and showed that the problem of
determining stability is co-NP complete. However, they proposed a class of
stability, which can efficiently be tested for using linear programming
techniques: \textit{Potential stability} is satisfied if contact wrenches
exist within the contact constraints that also satisfy equilibrium. Mattikalli
et al.~\cite{MATTIKALLI96} also noted the difficulty of determining the
stability of assemblies of bodies with frictional contacts and used
\textit{potential stability} as defined by Palmer~\cite{PALMER_THESIS} as an
indicator for stability. They point out that the existence of a solution to
the contact constraints and equilibrium equations is a necessary but not
sufficient condition for stability and introduce conservative approximations
of the friction law to mitigate this. Furthermore, they note that in the
frictionless case a potentially stable arrangement is in fact guaranteed to be
stable.
Erdmann~\cite{doi:10.1177/027836499401300306} investigated the motion of rigid
planar bodies in frictional contact given initial velocities. They note that
in order to predict the motion of a body the relative motion of the contacts
must be known. This apparent circularity stems from the different contact
conditions due to unilaterality and the maximum dissipation principle. They
consider each contact to be in one of several states: A contact can break,
roll or slide. They propose solving the contact problem by first hypothesizing
a combination of contacts states and then verifying that the resulting motion
is consistent with the contact conditions. Thus, they propose enumerating all
possible combinations of contact states, which provides an exponential
complexity method of solving the rigid body contact problem. They note that
the rigid body contact problem does not necessarily have a unique solution or
may even have no solution at all.
Trinkle et al.~\cite{TRINKLE95} also advocate for a rigid body treatment in
order to obtain accurate solutions without having to resort to computationally
taxing finite elements methods to model compliance. They develop theory to
predict the motion of rigid bodies in the plane under a quasistatic assumption
(i.e. inertial effects are considered negligible.) and Coulomb friction. In
their analysis the joints of the manipulator are assumed to be either position
controlled or torque controlled.
Similarly to the work by Erdmann~\cite{doi:10.1177/027836499401300306} their
initial approach~\cite{TRINKLE95} requires the consideration of every possible
combination of contact states where a contact can either roll, detach or slip
in the tangential plane. While the number of feasible contact state
combinations is quadratic in the number of contacts if the hand is
immobile~\cite{Brost1989a}\cite{MASON_MANIPULATION} they
note that it is exponential in the number of bodies involved and hence in
general the number of combinations is exponential in the number of contacts.
In further work Pang et al.~\cite{PANG1996} avoid this enumeration of contact
state combinations by casting the contact constraints as an uncoupled
complementarity problem (UCP). They show that problems of this type are
NP-complete but present a bilinear programming approach to solving them.
Trinkle et al.~\cite{TRINKLE05} later extended this line of work to grasps in
three dimensions.
\subsection{Rigid body dynamics}
Dropping the quasistatic assumption, Trinkle et al.~\cite{TRINKLE97} worked
with the full dynamic equations instead. They showed that the Coulomb friction
law with maximum dissipation can be cast as a mixed nonlinear complementarity
problem (mixed NCP), which is difficult to solve. Therefore, they propose
linearizing the friction cone by approximating it as a pyramid, which allows
for a formulation of the friction constraint as a linear complementarity
problem (LCP). While problems of this type can be solved with Lemke's
algorithm, a downside of this approximation is that the friction force will in
general lie on the specific edge of the friction cone discretization, which
maximizes the energy dissipation and therefore may not exactly oppose motion.
An immensely influential time stepping scheme for the solution of
multi-rigid-body dynamics with Coulomb friction that makes use of this
framework became known as the Stewart-Trinkle formulation~\cite{STEWART96}.
Another very influential time-stepping scheme --- the Anitescu-Potra
formulation~\cite{Anitescu1997} --- can be obtained by omission of the
constraint stabilization term from the Stewart-Trinkle formulation.
Pang et al.~\cite{ZAMM643} point out that the equations of equilibrium are
insufficient for the determination of stability of rigid body contact problems
due to the possibility of false positives. Therefore they use the methodology
developed in~\cite{TRINKLE97}, which uses the dynamic equations instead with
rigid bodies initially at rest and fixing the position of the elements making
up the hand. Using this framework they build on the stability
characterizations proposed by Palmer~\cite{PALMER_THESIS}, which they describe
as overly conservative. They define the class of \textit{strongly stable
loads} --- disturbances which are guaranteed not to destabilize the grasp in
their framework. They attribute the distinction between strongly and weakly
stable loads (Palmer's \textit{potential stability}) to the nonuniqueness of
the possible contact wrenches; there may be many solutions to the dynamic
equations that satisfy the friction constraints but not all may be stable.
Thus, they define the strongly stable loads as those, where every potential
set of contact wrenches results in \textit{nonpositive virtual work}.
If the solution is unique, then strong and weak stability are equivalent.
Using the uniqueness result from~\cite{TRINKLE97}, they show that this is the
case if the friction coefficient is below a certain bound. Unfortunately, this
bound is not known and the authors expect it to be difficult to compute in
general. Using the pyramidal linearization of the friction cone they do,
however, present an exponential-time method to check if strong and weak
stability are equivalent for a given grasp geometry. In those special cases
strong stability can efficiently be determined as weak stability can be
determined by solving a linear program.
Song et al.~\cite{SONG04} attribute the nonuniqueness of solutions to both the
statical indeterminacy of general grasping problems and the nonsmooth nature
of the relationship between tangential forces and relative velocities. In
order to overcome these difficulties they propose a compliant model of the
contacts between nominally rigid bodies. Both normal and tangential contact
forces are determined by viscoelastic constitutive relations coupling them to
local deformations.
Anitescu and Tasora~\cite{ANITESCU03}\cite{TASORA10} showed that using the LCP
formulation of the pyramidal friction cone approximation in general leads to
non-convex solution sets. LCP problems with non-convex solution sets contain
reformulated instances of the Knapsack problem and are therefore NP-hard.
Thus, problems of this type are difficult to solve. The authors develop an
iterative algorithm to solve them that converges to the solution of the
original problem. They achieve this through successive convex relaxation
effectively solving subproblems that have the form of strictly convex
quadratic programs. They note that their algorithm is only guaranteed to
converge for 'sufficiently small' friction coefficients but provide a lower
bound for convergence.
In further work Anitescu et al.~\cite{Anitescu2010} argue that the
computational burden of solving LCP based formulations of rigid body dynamics
problems is too high for applications with large numbers of colliding bodies.
They also point out that the linearization of the friction cone as a polygonal
pyramid required for formulation as an LCP violates the assumption of
isotropic friction. They instead propose a cone-complementarity approach and
an iterative method that converges under fairly general conditions but may
allow bodies to behave as if they were in contact although they have drifted
apart, particularly at high tangential velocities~\cite{HORAK19}.
Kaufman et al.~\cite{KAUFMANN08} showed that solving for friction forces when
normal forces are known can be achieved by solving a quadratic program (QP).
Similarly, the normal forces can be solved for when friction forces are know.
However, problems where both are to be solved for simultaneously are
non-convex. The solution of non-convex QPs is generally
NP-hard~\cite{Murty1987}. The authors present an algorithm which iterates
between the two convex QPs until a solution of the required accuracy is found.
Although it works well in practice convergence is not guaranteed with their
approach.
Todorov~\cite{TODOROV10} takes a completely new approach by deriving nonlinear
equations for the dynamic contact problem that implicitly satisfy the
complementarity conditions. In order to solve the resulting nonlinear
equations Todorov proposes a Gauss-Newton approach with specific adaptations
such as a novel linesearch procedure. Todorov~\cite{TODOROV14} and Drumwright
et al.~\cite{Drumwright2011} independently developed formulations that are
relaxing the complementarity conditions such that a convex optimization
problem is recovered.
More recently, Pang et al.~\cite{PANG18} showed that the LCP formulation for
discretized friction cones first introduced by Trinkle~\cite{TRINKLE97} can be
cast as a Mixed Integer Program instead. While this method still suffers from
the same inaccuracies they demonstrated its applicability for the control of a
robotic gripper in simulation.
An excellent starting point to some of the most influential works towards
rigid body dynamics with frictional contacts is the comparative review by
Horak and Trinkle~\cite{HORAK19}, which elucidates some of the similarities
and differences between many of the approaches listed above.
\subsection{Discussion}\label{sec:related_rigid_discussion}
We introduce the works discussed above because they can be applied to robotic
grasps while making no assumption of active control of contact wrenches. In
fact, the community focusing on the analysis of rigid bodies has developed
very natural complementarity formulations that capture passively stable
grasps. Furthermore, there are numerous relaxations available in order to
improve efficiency.
In order to determine the stability of a grasp with respect to a given
disturbance we could, for example, attempt to use any of the various dynamics
solvers the field has produced to compute contact forces and calculate a
single time step. If all accelerations remain zero, we deem the grasp stable.
Unfortunately, as we will now discuss, this approach will not give us definite
results.
Any algorithm that makes use of relaxations also introduces artifacts as we
are no longer solving the exact problem as outlined above. These artifacts are
acceptable for the purposes of those algorithms: Dynamics simulation that is
fast enough for use in time sensitive applications such as virtual reality or
deep learning. In our application, however, these artifacts mean that we
cannot rely on the simulation to produce exactly zero accelerations even for
grasps that are truly stable.
Thus, we need to focus on the algorithms that solve the exact problem. Perhaps
the best candidate is the formulation as a mixed nonlinear complementarity
problem (mixed NCP) introduced by Trinkle et al.~\cite{TRINKLE97}. In a
previous paper~\cite{PangTrinkle1996} Pang and Trinkle showed that in the case
of systems initially at rest the existence of a solution is guaranteed.
However, they also note a difficulty in using this formulation for stability
analysis: One must show that \textit{every} solution to the complementarity
problem has a zero acceleration.
Generally, when using a complementarity formulation in a dynamics engine only
one solution is required in order to step the simulation forward in time. This
allows the application of solvers such as Lemke's algorithm, which only finds
a single solution --- if one exists. The only algorithms that find all
solutions to general complementarity problems are enumerative in
nature~\cite{murty1988linear} and therefore of exponential computational
complexity.
To the best knowledge of the author, the work which comes closest to answering
the question of stability under the above assumptions is that by Pang et
al.~\cite{ZAMM643}, which makes use of the complementarity formulation due to
Trinkle et al.~\cite{TRINKLE97}. In special cases, in which the solution is
unique, there is no ambiguity due to multiple solutions and the single
solution to the LCP determines stability. A framework that efficiently
determines stability for general grasps under the rigid body assumption has
not yet been found.
\section{Dexterous in-hand manipulation}\label{sec:rel_ihm}
In-hand manipulation is the task of reorienting a grasped object with respect
to the grasping robotic hand. One approach to problems of this kind is to make
use of kinematic models of the hand and object and apply analytic methods from
the realm of optimization and planning algorithms to compute an appropriate
series of behaviors such as contact sliding, contact rolling and finger
gaiting. These approaches (see for
instance~\cite{Erdmann1998}\cite{677060}\cite{6631137}\cite{525325}\cite{795789}\cite{6630637}\cite{Yunfei2014}\cite{10.5555/2422356.2422377}\cite{OdhnerDollar}\cite{8347081}\cite{10.1007/978-3-030-28619-4_39}\cite{Hou2020})
assume some knowledge of the grasped object geometry as well as the ability to
model the dynamics and interactions at the contacts.
In contrast to these model-based methods the advent of efficient Reinforcement
Learning (RL) algorithms has allowed researchers to investigate entirely
model-free approaches. As such, the grasp is treated as a black box and Deep
Reinforcement Learning (DRL) is used to train end-to-end policies directly mapping
from sensor inputs to actuator commands. van Hoof et al.~\cite{7363524}
demonstrated the viability of RL for in-hand manipulation with planar grasps.
They used an underactuated hand for which devising analytical controllers is
difficult and leveraged tactile sensors to provide features for the policy.
More recently results published by groups at OpenAI have garnered large
publicity. They demonstrated reorientation of a block in the palm of a
anthropomorphic robotic hand~\cite{doi:10.1177/0278364919887447} using a
scaled-up implementation of the Proximal Policy Optimization
algorithm~\cite{schulman2017proximal}. They train their policy in simulation
and use domain randomization in order to achieve robust transfer to the real
robotic hand. The reason they train in simulation is the sample complexity of
their method: it takes approximately 100 years of simulated experience to
train a policy that robustly transfers to the real hand. In later work they
extended this work to the solving of Rubik's cubes in a similar experimental
setup~\cite{openai2019solving}. In order to improve sample efficiency Zhu et
al.~\cite{zhu2018dexterous} as well as Rajeswaran et
al.\cite{Rajeswaran-RSS-18} leveraged Imitation Learning in combination with
RL.
Li et al.~\cite{Li2020LearningHC} point out that none of the model-free
approaches above require the hand to maintain a stable and robust grasp of the
object throughout the grasp. The object is either supported by a
tabletop~\cite{7363524}, the palm of the
hand~\cite{doi:10.1177/0278364919887447}\cite{openai2019solving}\cite{Rajeswaran-RSS-18}
or limited in its degree of freedoms through external
supports~\cite{zhu2018dexterous}. In order to overcome this limitation Li et
al. propose a hierarchical control structure instead of the monolithic
end-to-end paradigm of DRL. They develop analytical torque controllers for
three different manipulation primitives that are intrinsically designed for
grasp stability. A higher level DRL policy is trained to choose the
manipulation primitive as well as its parameters. Using this approach they
achieve stable in-hand manipulation for planar grasps in simulation.
The idea of maintaining a stable grasp throughout an RL task has parallels in
the 'Safe Reinforcement Learning' literature (see Garcia et
al.~\cite{JMLR:v16:garcia15a} for a survey of Safe RL.) Avoiding unsafe states
during training and execution of RL policies is similar to avoiding states
that result in an unstable grasp during an in-hand manipulation task.
Particularly interesting is the work of Dalal et al.~\cite{dalal2018safe} in
which they append a 'safety layer' to their policy network that performs an
action correction. The action correction is formulated as an optimization
problem that uses a linearized model and thus allows for an analytic solution.
The optimization computes the minimum perturbation to the action such that
safety constraints are satisfied. Amos et al.~\cite{10.5555/3305381.3305396}
introduced 'OptNet': A neural network architecture that integrates
optimization problems such that complex constraints can be captured.
Due to the relative novelty of DRL approaches to in-hand manipulation we
believe there are many synergies yet to be discovered in the combination of
the above ideas and approaches from the traditional grasp analysis theory.
\chapter{Grasp Stability Analysis for Reinforcement Learning of in-hand~manipulation}\label{sec:shield}
\section{Introduction}\label{sec:shield_intro}
In-hand manipulation (i.e. reorienting a grasped object with respect to the
grasping hand) is a challenging task in robotics due to the problem's large
state-space and hard to model dynamics. While there are numerous analytical
approaches making use of planning and optimization algorithms (some of which
we mentioned in Chapter~\ref{sec:rel_ihm}) they rely on the ability to derive
analytic models of the kinematics and dynamics of the bodies involved as well
as the contact phenomena. This results in many complications as small errors
in the models can have dramatic effects. Accurately modeling friction forces
by itself is a large area of study (see Chapter~\ref{sec:related_dynamics}.)
Furthermore, partial observability of the state --- unknown geometries as well
as uncertainty in the contact positions and forces due to occlusion for
instance --- make it impossible to compute complete models of the grasp.
In contrast, model-free reinforcement learning takes an end-to-end approach
treating the grasp and its dynamics as a black box: The grasped object, hand
kinematics and contact mechanics are assumed unknown. Reinforcement learning
reasons probabilistically: Through stochastic exploration a policy is trained
to learn which actions maximize rewards given the current partial observation
of the state. It can therefore be applied to problems with partial
observability such as most manipulation tasks. In consequence, however, such
methods forgo any formal guarantee of success.
While model-free RL has shown great promise in high-dimensional manipulation
tasks, its sample complexity remains problematic. Furthermore, policies
applied to in-hand manipulation on real robots thus far all require some level
of external support for the manipulated object. This is either done through
resting the object on a tabletop~\cite{7363524}, on the up-turned palm of the
hand~\cite{doi:10.1177/0278364919887447}\cite{openai2019solving}\cite{Rajeswaran-RSS-18},
or fixing some of its degrees of freedom through external
constraints~\cite{zhu2018dexterous}.
It is our intuition that the notion of maintaining a robust quasi-statically
stable grasp throughout a task greatly simplifies general in-hand
manipulation. While humans leverage dynamic phenomena to great effect
controlling them requires rich tactile feedback and great skill. Thus we will
focus on manipulation skills that maintain quasi-static stability as we
believe the are more easily attainable for robotic systems, albeit less
powerful than general manipulation leveraging dynamic effects.
We also believe that efforts to maintain quasi-static stability throughout a
manipulation task can improve the sample complexity of training RL policies
for dexterous manipulation\footnote{Bicchi~\cite{897777} defines dexterous
manipulation as "the capability of the hand to manipulate objects so as to
relocate them arbitrarily for the purposes of the task"}. Consider the process
of collecting data in order to train a policy: whenever the grasp becomes
unstable and the object is dropped the rest of the episode can no longer
contribute to learning the task. While resetting the environment is trivial in
simulation, on a real robot it requires a reset mechanism, which can be
complicated to design.
In Chapter~\ref{sec:bridge} we argued that robotic hands designed solely for
grasping tasks (such as picking an object from clutter) have evolved in such a
way as to trade off complexity for passive stability. Most researchers
applying reinforcement learning are currently leveraging vision and motion
capture instead of tactile
sensing~\cite{doi:10.1177/0278364919887447}\cite{openai2019solving}\cite{zhu2018dexterous}\cite{Rajeswaran-RSS-18}.
We believe the reason for this lies in the limited tactile sensing
capabilities of the current generation of robotic hands and expect tactile
sensing to begin playing a more prominent role as this technology evolves. In
fact, members of our group are actively developing and building tactile
sensors that will supply us with high fidelity contact position and force
information over the majority of the finger surface~\cite{9006916}.
As a new generation of highly sensorized multi-finger robotic hands is
beginning to emerge the use of rich sensor data from tactile and
proprioceptive sensors will become a viable alternative to purely vision based
approaches to dexterous in-hand manipulation. Note that, while the global
shape of the object may be unknown tactile sensors allow us to observe the
local shape of the object. This new generation of robotic hands can also
satisfy the assumption that is central to most of the grasp modeling
literature we discussed in Chapter~\ref{sec:related_closure}: Active control
over contact forces through actuator commands. Thus we can determine the
(local) stability of a grasp or actuator commands necessary for stability
using classical grasp stability theory.
However, it appears the theoretical works have had little impact in the
learning community so far. While we believe RL by itself to be able to train
policies that maintain stable grasps throughout a reorientation task (we show
this is the case in Chapter~\ref{sec:pure_RL}) it appears wasteful to spend
training time in order to learn an aspect of the task for which we already
have good analytical tools. Thus we argue there is merit to the idea of
applying such model-based approaches to the smaller problem of maintaining
quasi-static grasp stability (for which the necessary state variables are
locally fully observable) while using model-free methods for the larger
problem of global manipulation planning under partial observability.
In this chapter we present exploratory work. We will demonstrate that pure
model-free reinforcement learning can be successfully applied to in-hand
manipulation tasks in simulation. It was important to us to find a task on
which pure reinforcement learning can generate satisfactory policies to ensure
that RL is capable of solving the manipulation planning problem and to serve
as a baseline for later comparison.
We will then elaborate on the intuition behind introducing analytic grasp
modeling theory and propose a method that uses rich tactile feedback as well
as such analytical hand models to modify RL actions such that grasp stability
is maintained at all times. Work in this direction is ongoing, with no results
to report at the time of this writing, but numerous experiments currently
being undertaken. Finally, we will discuss some of the many open questions
that remain.
\section{In-hand manipulation with pure reinforcement learning}\label{sec:pure_RL}
\subsection{Experimental design}\label{sec:design}
Let us first describe the experimental setup we chose in order to investigate
robotic in-hand manipulation. We created a hand model in the MuJoCo physics
simulator~\cite{6386109}, which provides us both with a fast simulation of the
grasp dynamics as well as a method of determining contact positions and
forces. The hand we constructed has four identical fingers and 12 independent
fully actuated degrees of freedom (see Fig.~\ref{fig:ffh}.) As we are
currently also constructing a physical version of this hand we chose the
physical parameters such as the finger skin stiffness and actuator gains to
correspond to those of the physical hand design.
\begin{figure}[t!]
\centering
\includegraphics[width=0.65\columnwidth]{graphics/ffh.png}
\caption{Simulation of the four fingered hand and spherical object in
MuJoCo.}
\label{fig:ffh}
\end{figure}
We chose to place a series elastic coupling between each joint and
corresponding actuator as series elastic couplings of known stiffness along
with encoders on both ends of the coupling provide a simple method of torque
measurement. This also provides us with multiple choices with regards to the
low-level control scheme of the hand. What we mean by this is choosing if the
setpoint provided to the actuator controller is in terms of joint torques or
joint positions for instance. While series elastic actuators with torque
sensing capabilities would allow for the implementation of torque control or
even more complex variants of impedance control there are convincing reasons
to use position control instead.
Consider a grasp in equilibrium using a torque controlled hand. Any change to
the actuator setpoint will disturb the equilibrium and lead to growing
accelerations and thus an unstable
grasp~\cite{doi:10.1177/027836499601500203}. In control theoretic terms such a
grasp is not in stable equilibrium as a small disturbance will cause the
system to accelerate away from equilibrium. In contrast, a position controlled
hand with compliant actuators allows for grasps that are in stable
equilibrium: A small change in setpoint likely results in the system moving to
a new equilibrium. We therefore chose position controlled actuators such that
we can achieve grasps that are in stable equilibrium.
For the sake of simplicity we chose a spherical object of mass 0.1kg for
these initial experiments. The local geometry of a sphere is uniform across
its surface and thus we hope to mitigate some effects of partial
observability. Using the Proximal Policy
Optimization~\cite{schulman2017proximal} algorithm we trained policies using
as a reward the instantaneous rotational velocity of the sphere around the
global vertical axis. We use a neural network with 4 hidden layers of 512
nodes each to encode the policy.
The observation consists of the joint positions, actuator setpoints, contact
positions and contact normal forces. At every time step we sample an action
from the policy $\bm{a} \in \mathbb{R}^{12}$ from which we calculate the
actuator setpoint change $\Delta \bm{q} \in \mathbb{R}^{12}$. In order to
limit the velocity of hand joints we define vector $\bm{q}^{max}$, which
contains the maximum permissible setpoint change magnitude for each joint. A
value of 0.05 radians appeared to work well with a policy frequency of 20Hz.
\begin{equation}
\Delta q_j = max(-1, min(1, a_j)) \cdot q_j^{max},\quad \text{for all actuators j}
\end{equation}
\subsection{Results}\label{sec:RL_results}
We were able to successfully train policies to manipulate the sphere as
desired. The emergent behaviors are periodic and can therefore be likened to a
gait. This was expected as the reward function chosen encourages continued
motion of the grasped object. More specifically, we see the hand pinching the
sphere between two neighboring fingers and passing on to the next set of
neighboring fingers in order to rotate it (see
Figs.~\ref{fig:manip1} \& \ref{fig:manip2}.) We show the training curve of such
a successful experiment in Fig.~\ref{fig:reward}. It is clear that the gait
produced by the policy requires large movements of the sphere in the
horizontal plane in order to achieve rotation around the vertical axis.
\begin{figure}[t!]
\centering
\includegraphics[width=0.95\columnwidth]{graphics/reward.png}
\caption{Training curve for a successful in-hand manipulation task. Shown on
the horizontal axis is the number of policy updates. Each update consists of
96 episodes of 64 steps each.}
\label{fig:reward}
\end{figure}
\begin{figure}[t!]
\centering
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip1.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip2.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip3.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip4.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip5.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip6.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip7.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip8.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip9.png}}\hfill%
\caption{One complete period of the manipulation gait learned with pure
reinforcement learning as seen from the side.}
\label{fig:manip1}
\end{figure}
\begin{figure}[t!]
\centering
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip11.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip12.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip13.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip14.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip15.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip16.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip17.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip18.png}}\hfill%
\subfigure[]{\includegraphics[width=0.3\columnwidth]{graphics/manip19.png}}\hfill%
\caption{One complete period of the manipulation gait learned with pure
reinforcement learning as seen from the top.}
\label{fig:manip2}
\end{figure}
We found that the randomization of initial states during training is of
profound importance. A good randomization that provides a distribution of
stable grasps that is as varied as possible allows for training with shorter
episode lengths, which in turn greatly improves sample complexity. This is not
a surprising finding. The intuition behind this is that without initial state
randomization the episode length would have to be at least as long as the
period of the emergent behavior we are trying to synthesize in order to be
able to learn a full period of the behavior. As we are trying to learn a
continuous rotation task we are expecting the policy to learn to gait the
fingers in such a periodic fashion. Initial state randomization means that the
policy can learn smaller sections of this gait in shorter episodes.
Furthermore, it appears that adding gravity in the simulation makes the task
much more difficult. Much more effort had to be spent tuning hyperparameters
in order to obtain behaviors that resemble periodic gaiting. Different objects
also appear to provide the task much difficulty. While learning policies to
manipulate a cylinder aligned with the vertical axis was relatively
successful, we could not train policies for more complex objects such as
cubes.
Being able to train adept policies for an in-hand manipulation task was an
important stepping stone for us. Perhaps unsurprisingly, the above results
show that reinforcement learning can be effectively leveraged to tackle the
difficulties due to fact that the in-hand manipulation task is only partially
observable. Fig.~\ref{fig:reward} however illustrates the sample complexity of
such an approach. While learning is fast at the beginning, it took over 2500
updates until learning appeared to plateau. These 2,500 updates correspond to
240,000 episodes, 15,360,000 steps or approximately 9 simulation days of
experience. This process took approximately 9 hours of wall time on a
commercial 11th generation server.
Note that the problem of rotating a sphere around a single axis is expected to
be much simpler than the task of moving general objects in arbitrary
directions. If it is possible to train policies to solve more general tasks
using reinforcement learning alone the number of samples required is expected
to be vastly greater than those we report above. Furthermore, while training
times on this scale are acceptable in simulation, they are prohibitively large
for training on real hardware. We believe that analytical grasp models can
help us improve sample complexity or even allow us to learn policies for tasks
for which pure reinforcement learning is insufficient. In the following we
will illustrate the intuition behind this using a simplified problem.
\section{Islands and Bridges: An equivalent problem?}\label{sec:islands}
Our central insight is that a defining characteristic of the state space of
manipulation problems is that only a small subset of it corresponds to stable
grasps. Defining the state space to consist of the object pose as well as the
joint angles of the hand then a majority of the space does not correspond to
grasps with valid contacts, much less a stable grasp. In fact, if the robotic
hand and object are rigid, then the contact conditions define a
lower-dimensional manifold in the full-dimensional state space~\cite{406939}.
A stochastic reinforcement learning algorithm operating in this space would
not be able to successfully traverse this manifold as stepping of it is
virtually guaranteed. In practice, of course, grasps are not perfectly rigid.
Series elastic actuators as well as soft contact interfaces are a popular
choice for exactly this reason: to provide some 'width' such that the
lower-dimensional manifold defined by the contact conditions turns into a
full-dimensional volume. A policy that changes the position setpoint of an
actuator connected to its joint through a series elastic coupling has a
greater chance of maintaining a valid contact state.
The fact remains, however, that the vast majority of the state space does not
correspond to valid grasps and that the regions of stability are seldom far
removed (in state space) from an unstable configuration. We like to think of
such a region of stability as an 'island'. In order to continuously reorient a
grasped object contacts must necessarily break to reestablish contact
somewhere else \cite{10.5555/2422356.2422377}. When a contact is broken a
grasp tends to become less stable --- that is until a new contact is
established somewhere else. We think of this process as crossing a 'bridge'
--- a region closer to instability that takes us to another, more stable
region. An island can thus also be thought of as corresponding to one grasp
geometry. When gaiting a finger we cross a 'bridge' to another grasp geometry.
\begin{figure}[t!]
\centering
\includegraphics[width=0.65\columnwidth]{graphics/islands.png}
\caption{Illustration of the 'Islands and Bridges' problem. The red and blue
dots corresponds to the current state and goal state respectively.}
\label{fig:islands}
\end{figure}
We therefore believe that there are parallels between the in-hand manipulation
problem and this problem which we call 'Islands and Bridges' (see
Fig.~\ref{fig:islands}.) For reasons of visualization we limit the problem to
two dimensions such that the current state is denoted as a cartesian position coordinate in this
environment made up of distinct islands and bridges connecting them. Any state
that lies on such an island or bridge corresponds to a stable grasp. A path
from one point in this environment to another hence corresponds to an in-hand
manipulation of the grasped object. Thus, the task of in-hand manipulation
from one grasp state to another corresponds to finding such a path.
Fig.~\ref{fig:islands} also illustrates the difficulty of solving such a task
with reinforcement learning: Any step off the thin bridges results in a
failure (i.e. dropping the object.) In order to perform in-hand manipulation
the policy must learn to navigate state space without ever entering these
unstable regions. Therefore, it is our intuition that if we can confine the
policy to the subset of the space which is useful, the task becomes easier to
learn. We use this simplified problem to investigate the efficacy of methods
that constrain the agent to the useful subset of the state space. We call a
method that modifies agent actions such that the given constraints are
satisfied a \textit{shield}.
\begin{figure}[t!]
\centerline{
\includegraphics[width=.7\linewidth]{graphics/shieldRL.png}
}
\caption{Shield RL}
\label{fig:shieldRL}
\end{figure}
Let us formalize the notion of a shield. The method of shielding RL
\cite{ShieldRL} is shown in Fig.~\ref{fig:shieldRL}. All actions sampled
from the policy (deterministic or stochastic) are subject to the shield and,
if necessary, are modified by the shield to ensure 'safety'. Let us denote the
shield function as $\Psi$.
\begin{equation}
\tilde{a}^t = \Psi(a^t, s^t)
\label{eq:shield}
\end{equation}
where $a_t$ is the action sampled by the RL agent and $\tilde{a}_t$ is the
safe action given out by the shield function. It is infeasible to consider the
safety of an action over all future time steps, hence we perform a single-step
lookahead for determining the safety of an action. We declare an action a
safe action if the resulting state satisfies a set of \textit{shield
constraints} and thus define shield constraint function $\zeta$.
\begin{eqnarray}
\zeta(s^{t+1}) =
\begin{cases}
1, & \text{if constraints satisfied} \\
0, & \text{otherwise}
\end{cases}
\end{eqnarray}
Thus, we must be able to predict the state $s^{t+1}$ given $s^t$ and $a^t$. In
the case of our 'Islands and Bridges' problem this is trivial. Defining the
state as the cartesian position in the environment $s^t = [x,y]^T$ and the action as a
step in this cartesian space $a^t = [\delta x, \delta y]^T$ we can compute the
predicted state as follows:
\begin{equation}
s^{t+1} = s^t + a^t
\end{equation}
We can also define a distance function $M$ that is defined as the closest
distance of the current state to the edge of the safe region.
\begin{eqnarray}
\zeta(s^{t+1}) =
\begin{cases}
1, & \text{if } M(s^{t+1}) \geq 0 \\
0, & \text{otherwise}
\end{cases}
\end{eqnarray}
We can now define the shield function $\Psi$ for the islands-and-bridges
problem. A simple implementation would be to simply ignore any action if it
results in a state outside of the safe region.
\begin{eqnarray}
\tilde{a}^t = \Psi_{simple}(a^t, s^t) =
\begin{cases}
a^t, & \text{if } M(s^{t+1}) \geq 0 \\
[0,0]^T, & \text{otherwise}
\end{cases}
\end{eqnarray}
An issue with this formulation is that it does not work with deterministic
policies. Simply ignoring an action and remaining in the same state means that
the same action will be sampled again and rejected again for all future times.
Thus, a more sophisticated shield might be to find the action that results in
a state that satisfies $\zeta$ while maintaining the smallest deviation from the
originally sampled action.
\begin{equation}
\tilde{a}^t = \Psi_{smart}(a^t, s^t) = \argmin_{M(s^{t+1}) \geq 0}{\left\lVert \tilde{a}^t - a^t \right\rVert}
\end{equation}
We implemented both of these shields and applied them to the task of
navigating in the islands-and-bridges environment. Specifically, the task
consists of navigating from a randomly sampled initial position to a randomly
sampled goal position. We define two rewards $r$: A dense and a sparse reward
that only rewards the agent if it is within a distance $\epsilon$ from the
goal.
\begin{eqnarray}
r_{dense}^t =& -\left\lVert s^t - s^t_{goal} \right\rVert \\
r_{sparse}^t =&
\begin{cases}
1, & \text{if } \left\lVert s^t - s^t_{goal} \right\rVert \leq \epsilon \\
0, & \text{otherwise}
\end{cases}
\end{eqnarray}
If the agent steps outside of the safe region (failure) or reaches the goal
region of radius $\epsilon$ (success) the episode is over and no more reward
may be collected. We used PPO to train a stochastic policy without a shield,
with the simple shield and with the smart shield as described above. After
training the shield remains in place. We show the success rates for all three
cases and both rewards throughout the training process in
Fig.~\ref{fig:curves}.
\begin{figure}[t!]
\centering
\includegraphics[width=0.75\columnwidth]{graphics/curves.png}
\caption{Success rates of the PPO agent reaching the goal state in the islands
and bridges problem for different shield and reward functions. We also
experimented with the size of the policy and value networks (we used separate
networks of equal size.)}
\label{fig:curves}
\end{figure}
From these success rates it is evident that the shield provides large
advantages during training of the PPO agent. While a sparse reward results in
higher success rates for the unshielded case, it is still no match for the
success rates achieved using either the simple or smart shields. It is also
evident that the simple and smart shields perform similarly. However, only the
smart shield allows for policies to be trained that guarantee success. Perhaps
surprisingly it appears relatively large networks are also needed in order to
guarantee success even for such a small environment.
These findings suggest that a shield can be a great advantage in learning
tasks with RL that exhibit characteristics like the islands-and-bridges
environment. As we described above we believe that the task of in-hand
manipulation is such a task and therefore a shield can also be of great use
there.
\section{Constructing a shield for in-hand manipulation}
We now describe a method to construct a shield similar in spirit to those
described above for the in-hand manipulation problem described in
Chapter~\ref{sec:design}. We will make use of theoretical grasp
analysis in order to derive constraints for the shield to enforce as well as
the necessary means to predict future states. To this end we define the state
to consist of the pose of the object $\bm{u}$, the joint actuator setpoints
$\bm{q}$ as well as the contact forces $\bm{c}$.
\subsection{Grasp stability constraints}\label{sec:shield_constraints}
As we are concerned with maintaining a stable grasp at all times we chose a
set of grasp stability constraints as safety criteria to be enforced by the
shield. Specifically, we are concerned with maintaining sufficiently many
contacts for force-closure and preventing the contacts from slipping. Thus, we
want to ensure that the contact forces at a subset of contacts sufficient for
force closure remain within their respective friction cones.
For every such contact $i$ the following describe the constraints that ensure
the contact does not break or slip. Subscripts $n$ and $t$ refer to normal and
tangential components respectively.
\begin{align}
c_{i,n} &\geq 0 \label{eq:force_constr} \\
\left\lVert \bm{c}_{i,t} \right\rVert &\leq \mu t_{i,normal} \label{eq:fric_constr}
\end{align}
Furthermore, we may also want to prevent the object from moving into positions
from which it may be hard to make progress. Therefore we also confine the
object pose as part of the shield. We can enforce arbitrary convex constraints
on the object pose. For instance, we may confine the objects translational
degrees of freedom to a box:
\begin{align}
x_{min} \leq u_x \leq x_{max} \label{eq:box_start}\\
y_{min} \leq u_y \leq y_{max} \\
z_{min} \leq u_z \leq z_{max} \label{eq:box_end}
\end{align}
Rotational degrees of freedom are a somewhat more complex. We chose to
constrain the orientation of body axes in a global frame. Specifically, we
constrain the angle subtended between the projection of the body $z$-axis
$\hat{z}$ into the global $xz$ and $yz$ cardinal planes ($\hat{z}_x$ and
$\hat{z}_y$ respectively) and the global $z$-axis $\hat{Z}$ (all unit
vectors).
\begin{align}
r_{x,min} \leq sgn((\hat{z}_y \times \hat{Z}) \cdot \hat{X}) \cdot arccos(\hat{z}_y \cdot \hat{Z}) \leq r_{x,max} \\
r_{y,min} \leq sgn((\hat{z}_x \times \hat{Z}) \cdot \hat{Y}) \cdot arccos(\hat{z}_x \cdot \hat{Z}) \leq r_{y,max} \label{eq:rot_constr}
\end{align}
In short, the \textit{arccos} term gives us the angle between the two vectors
while the \textit{sgn} term tells us if the angle is in the negative or
positive sense with respect to the right hand rule. This angle is again
bounded to lie within a box.
Thus, given a state we can compute if it satisfies the above stability
constraints or not.
\subsection{Grasp model}\label{sec:shield_model}
Recall that the shield requires the ability to perform a 1-step lookahead.
Thus, in order for the above stability constraints to be useful we must be
able to predict future states from the current state-action pair. Ideally, we
would be able to solve an optimization problem such as that in the smart
shield described above. We could then find optimal actions such that stability
is guaranteed at the next step.
However, the agent can only control parameters such as joint positions or joint
torques, which in turn affect contact forces and object pose through complex
nonlinear relationships. Thus, exactly solving the optimization problem posed
by the shield is difficult as there is no closed form analytic expression for
the contact forces and object pose in terms of the agent action. We therefore
approximate this relationship through linearization, which also allows for
efficient computation of a global optimum.
We do this by making use of existing work by Cutkosky et
al.~\cite{CUTKOSKY_COMPLIANCE} analyzing the compliance characteristics of
robotic grasps as well as work by Bicchi~\cite{BICCHI94} who studied the
distribution of forces resulting from changes in position control setpoints.
\vspace{2mm} \noindent \textbf{Equilibrium:} The Grasp Map Matrix $\bm{G} \in
\mathbb{R}^{6 \times 3m}$ maps the contact forces at the $m$ contacts to the
corresponding wrench acting on the object and from (small) object motions to
the corresponding contact motions. It therefore expresses object force/torque
equilibrium and rigid body motion. The Hand Jacobian $\bm{J} \in
\mathbb{R}^{3n \times q}$ similarly maps from contact forces to joint torques
at the $l$ joints and from (small) joint motions to corresponding contact
motions. It expresses joint torque equilibrium and hand kinematics.
\begin{align}
\bm{w} &= - \bm{G} \bm{c} \label{eq:equilibrium2} \\
\bm{\tau} &= \bm{J}^T \bm{c} \\
\Delta \bm{d} &= \bm{J} \Delta \bm{q} - \bm{G}^T \Delta \bm{u}
\end{align}
Calculating contact forces that arise in response to an applied wrench
$\bm{w}$ is complicated by the fact that, in general, \textbf{G} will have
fewer rows than columns. Therefore it has a nullspace and no unique inverse.
This is known as static indeterminacy.
\vspace{2mm} \noindent \textbf{Grasp Stiffness:} We do, however, know that if
we apply a wrench \textbf{w} to a grasped object there must arise a unique set
of contact forces. Assuming perfectly rigid bodies the problem of computing
these contact forces is ill posed but we can resolve the static indeterminacy
by taking into account the \textit{compliance} of the grasp. By doing so we
are adding constitutive relations to resolve the static indeterminacy.
Using the work of Cutkosky et al.~\cite{CUTKOSKY_COMPLIANCE} we can derive the
compliance in contact frame by constructing the mapping from a change in
contact forces $\Delta \bm{c}$ to contact motions $\Delta \bm{d}$. The main
sources of compliance are at the contacts (due to softness of the skin) and in
the joints (due to the proportional term of the servo controller as well as
any series elastic coupling. See Fig.~\ref{fig:compliance}.) Assuming linear
compliances we can construct diagonal matrices $\bm{C}_{contacts} \in
\mathbb{R}^{3m \times 3m}$ and $\bm{C}_{joints} \in \mathbb{R}^{l \times l}$
containing the compliances of contacts and joints respectively.
\begin{figure}[t!]
\centering
\includegraphics[width=0.65\columnwidth]{graphics/compliance.png}
\caption{Illustration of a grasp with its main sources of compliance. Linear
springs at the contacts denote compliance due to soft interfaces between the
fingers and the object. Torsional springs denote the compliance due to series
elastic actuation as well as the compliance of the low level controller of the
actuator.)}
\label{fig:compliance}
\end{figure}
Starting from an initial equilibrium position we can now apply a change to the
contact forces $\Delta \bm{c}$ and compute the resulting contact motion
$\bm{d}_{contacts}$ due to contact compliance.
\begin{equation}
\Delta \bm{d}_{contacts} = \bm{C}_{contacts} \Delta \bm{c}
\end{equation}
Computing the contact motion $\bm{d}_{joints}$ due to joint compliance is only
slightly more complex.
\begin{equation}
\Delta \bm{d}_{joints} = \bm{J} \bm{C}_{joints} \bm{J}^T \Delta \bm{c} \label{eq:motion}
\end{equation}
Due to the linearity of the compliance, overall contact motion is simply the
sum of the two components.
\begin{align}
\Delta \bm{d} &= \Delta \bm{d}_{contacts} + \Delta \bm{d}_{joints} \\
&= (\bm{C}_{contacts} + \bm{J} \bm{C}_{joints} \bm{J}^T) \Delta \bm{c}
\end{align}
From this we can determine the grasp stiffness --- mapping from contact motion
to the corresponding change in contact forces --- by inverting the overall
compliance matrix.
\begin{align}
\Delta \bm{c} &= (\bm{C}_{contacts} + \bm{J} \bm{C}_{joints} \bm{J}^T)^{-1} \Delta \bm{d} \\
&= \bm{K} \Delta \bm{d}
\end{align}
Using equation (\ref{eq:motion}) we can express the change in contact force as
a function of object motion and joint setpoint change.
\begin{equation}
\Delta \bm{c} = \bm{K} (\bm{J} \Delta \bm{q} - \bm{G}^T \Delta \bm{u}) \label{eq:K_matrix}
\end{equation}
\vspace{2mm} \noindent \textbf{Controllable Object Motions:} As
we only have direct control over the joint setpoint, Bicchi~\cite{BICCHI94}
was interested in predicting the motion of the object $\Delta \bm{u}$ that
will arise when we change the actuator setpoint by $\Delta \bm{q}$. Assuming
equilibrium and using (\ref{eq:equilibrium2}) \& (\ref{eq:K_matrix})
\begin{equation}
\bm{G} \Delta \bm{c} = \bm{G} \bm{K} (\bm{J} \Delta \bm{q} - \bm{G} \Delta \bm{u}) = 0
\end{equation}
which implies
\begin{equation}
\bm{G} \bm{K} \bm{J} \Delta \bm{q} = \bm{G} \bm{K} \bm{G} \Delta \bm{u}
\end{equation}
and hence
\begin{align}
\Delta \bm{u} &= (\bm{G} \bm{K} \bm{G})^{-1} \bm{G} \bm{K} \bm{J} \Delta \bm{q} \\
&= \bm{F} \Delta \bm{q}
\label{eq:F_matrix}
\end{align}
\vspace{2mm} \noindent \textbf{Controllable Internal Forces:} Armed with this
we can predict the contact forces that will arise when we change the actuator
setpoint by $\Delta \bm{q}$. Substituting (\ref{eq:F_matrix}) into
(\ref{eq:K_matrix}) we get
\begin{align}
\Delta \bm{c} &= \bm{K} (\bm{J} \Delta \bm{q} - \bm{G}^T (\bm{G} \bm{K} \bm{G})^{-1} \bm{G} \bm{K} \bm{J} \Delta \bm{q}) \\
&= (\bm{I} - \bm{G}^T (\bm{G} \bm{K} \bm{G})^{-1} \bm{G}) \bm{K} \bm{J} \Delta \bm{q} \\
&= \bm{E} \Delta \bm{q}
\label{eq:E_matrix}
\end{align}
\vspace{2mm} \noindent \textbf{State prediction:} All the relations described
above are linearizations that describe the behavior of a grasp with respect to
changes in actuator setpoints. Due to nonlinearities such as rolling contacts
etc. these linearization are only accurate in a small region around the
current state. They do, however allow us to make predictions of future states
given a current state-action pair given that the action is sufficiently small.
Recall that the components of the state we are interested in with respect to
satisfying grasp stability constraints are the contact forces as well as the
object pose. We now have the tools to express these parts of the state in
terms of the action defined as setpoint changes of the position controlled
actuators.
\begin{equation}
\begin{bmatrix}\bm{c} \\ \bm{u} \end{bmatrix}^{t+1} =
\begin{bmatrix}\bm{c} \\ \bm{u} \end{bmatrix}^{t} +
\begin{bmatrix}\bm{E} \\ \bm{F} \end{bmatrix}^{t} \Delta \bm{q}^t
\label{eq:linearization}
\end{equation}
\subsection{Complete shield formulation}
We can now put together the pieces and define the shield function $\Psi$ in
(\ref{eq:shield}) as a constrained optimization: What action satisfies all
shield constraints while minimizing the Cartesian distance from the original
action.
\begin{align}
minimize &: \norm{\bm{a}^t - \tilde{\bm{a}}^t} \\
such \ that &: (\ref{eq:force_constr})-(\ref{eq:rot_constr})
\label{eq:optimization}
\end{align}
Of course, in order to allow gaiting we must allow contacts to break
occasionally such that fingers can reestablish contact elsewhere. This is why
the constraints (\ref{eq:force_constr}) \& (\ref{eq:fric_constr}) may only be
applied to a subset of contacts --- we must sometimes exempt a contact from
the shield in order allow for contact relocation. We do this as follows:
\begin{enumerate}
\item Enumerate all combinations of contact states, where every contact is
either shielded or not.
\item Discard all combinations with fewer than 2 shielded contacts as at least
two contacts are required for stability.
\item For all remaining combinations check if the selection of shielded
contacts by themselves are sufficient for \textit{force closure} (are these
contacts sufficient for stability.) Discard all combinations that fail this
criterion. This can be done using simple force closure tests~\cite{FERRARI92}.
\item Perform the optimization (\ref{eq:optimization}) for every remaining
combination. For all unshielded contacts remove the stability constraints
(\ref{eq:force_constr}) \& (\ref{eq:fric_constr}) and add constraints
$\tilde{a}_j = a_j$ for all joints $j$ that make up the kinematic chain of an
unshielded contact.
\item Select the result with the lowest value optimal objective. This solution
gives us $\tilde{\bm{a}}$
\end{enumerate}
Thus, we have computed a safe action $\tilde{\bm{a}}^t$ that applies the
smallest correction to $\bm{a}^t$ such that stability constraints are
satisfied. This optimization formulation is an important distinction between
our work and the hierarchical control approach by Li et
al.~\cite{Li2020LearningHC}. Their approach relies on a finite number of low
level controllers from which the policy chooses, which constrains the possible
behaviors to those determined by those controllers. In our case the policy
retains all freedom to individually change actuator commands as long as the
resulting grasp is stable. It is our intuition that while this may result in a
more difficult task it ultimately allows for more dexterous behavior.
We also want to note that the method of enumerating contact state combinations
in order to allow for finger gaiting bears similarities to the work by
Prattichizzo et al.~\cite{PRATTICHIZZO97}. In fact it is their proposed
\textit{Potential Grasp Stability}, which has inspired us to combine the
stability constraints described in Chapter~\ref{sec:shield_constraints} with
such an enumerative approach.
\section{Future work}
Recall that the experimental design described in Chapter~\ref{sec:design}
provides us with information of contact position, contact forces, joint
positions and joint torques. Thus, we can compute the grasp map matrix as well
as the grasp Jacobian and perform an optimization over contact forces as
described above. This is true for both the simulated hand as well as its
physical counterpart, once it becomes available to us. Natural next steps for
us to take include the application of the shield in simulation as well as
attempting to transfer the policies trained and described in
Chapter~\ref{sec:RL_results} to the real robotic hand we are constructing.
Assuming the islands-and-bridges concept is indeed an accurate representation
of the in-hand manipulation task and the shield proves to be an effective
tool, there are many further open questions that require investigation. So far
we have only considered tasks in which the policy was trained on a single
object and is tested on the same object. The concept of
\textit{generalization} is central to learning methods and in this case could
be applied to a policy that can successfully manipulate previously unseen
objects. Note that this could be another instance in which a shield as
described above becomes advantageous as the shield is entirely agnostic to the
object. A policy could learn general manipulation strategies while the
shield provides the intricate feedback control necessary for stability.
We believe that policies can be trained on a variety of objects and thus learn
a general structure of the underlying manipulation problem. Partial
observability becomes an even larger challenge during such tasks and thus it
may be advantageous to make use of LSTM architectures for policy and value
networks. This may allow the meta-learning of general in-hand manipulation
tasks as the experience collected is encoded in the internal state of the LSTM
and can be used to adapt to the specific object.
Considering that the navigation in previously unknown environments bears
similarities to maze navigation an interesting avenue of investigation might
be the application of RL maze solving
algorithms~\cite{7849365}\cite{mirowski2017learning}\cite{10.5555/3327144.3327168}.
Furthermore, finger gaiting bears many similarities with regrasping for object
reorientation. Manipulation for regrasping has been studied for decades (see
for example~\cite{Alami1989}\cite{774088}\cite{769979}\cite{Wan2015}) and many
different approaches such as regrasp maps~\cite{Alami1989} or
graphs~\cite{509176}\cite{Wan2015} have been proposed. These manipulation
representations appear to be related to the notion of 'islands and bridges'
described in Chapter~\ref{sec:islands} and we expect there to be many other
parallels with different aspects of the manipulation theory that may provide valuable
insights into the problem of in-hand manipulation.
\chapter{Grasp Stability Analysis in Three Dimensions}\label{sec:three_dim}
\section{Introduction}
In Chapter~\ref{sec:bridge} we described the importance of modeling passive
effects for robotic manipulation and began our investigation with the planar
case in Chapter~\ref{sec:2d}. Of course most robotic grasps are not planar:
The fingers and grasped objects do not in general inhabit the same plane.
Furthermore, even grasps that may look to be planar at first (such as the
grasp in Fig.~\ref{fig:package}) require modeling of all three spacial
dimensions in the presence of out-of-plane forces or moments.
Thus, in order to further our understanding of the passive effects at play in
the grasps commonly encountered in practice we must extend our work from
Chapter~\ref{sec:2d} to spacial grasps. Unfortunately, our treatment of planar
grasps does not easily generalize. In order to enforce the maximum dissipation
principle (friction opposes motion) our framework relied on the fact that in
the plane a contact can only slide in one of two directions. In three
dimensions contacts can slide in an infinite number of directions and thus we
cannot enumerate a finite number of contact states as we did in
Chapter~\ref{sec:2d}.
This means that enforcing the principle of maximum dissipation is more
involved in three dimensions. However, as we will see an accurate treatment of
the friction constraints including the maximum dissipation principle is of
paramount importance for the modeling of passive effects. Simply dropping the
maximum dissipation principle allows for unphysical solutions and thus we
cannot determine stability. This may be somewhat surprising as we are only
trying to solve for the contact wrenches of stable grasps where hence all
motions are minuscule. We will present a physically motivated method for
alleviating the consequences of dropping the MDP such that only physically
realistic solutions are obtained.
Even though our formulation for planar grasps does not directly generalize to
three dimensions, the insights gained in the previous chapter will prove to be
useful also in the three dimensional case. Specifically, we already know that
we can use a compliance model to capture passive effects.
In order to develop a grasp model that is truly general and applicable to the
vast majority of robotic hands currently in use we also choose to take into
account effects previously omitted in Chapter~\ref{sec:2d}. We will no longer
assume the hand to be a rigid fixture but instead take into account the
kinematics of the hand as well as the commanded actuator torques. This allows
us to showcase the use of our framework as a practical tool.
\section{Grasp model}\label{sec:model3d}
The model we choose to describe a grasp in three dimensions is similar to the
planar model introduced in Section~\ref{sec:2dmodel} and we will make the same
assumptions that initially the bodies are at rest and all motions (in this
context displacements) are small such that the grasp geometry is constant.
We consider a hand making $m$ contacts with a grasped object where we again
use the \textit{Point Contact with Friction} model to describe the contact
forces. We will again denote normal and tangential components of contact
specific vectors with subscripts $n$ and $t$ respectively. However, in three
dimensions the tangential component of such a vector is no longer a scalar but
a vector itself: At a contact $i$ the contact force $\bm{c}_i \in
\mathbb{R}^3$ has normal and tangential components $c_{i,n} \in \mathbb{R}$
and $\bm{c}_{i,t} \in \mathbb{R}^2$ respectively.
\vspace{2mm} \noindent \textbf{Equilibrium:} In three dimensions the grasp map
matrix also has different dimension ($\bm{G} \in \mathbb{R}^{6\times3m}$). One
addition to the grasp model is that we will also consider the kinematics of
the hand and must therefore also take into account not only object but also
hand equilibrium. For a hand with $l$ joints the transpose of the hand
Jacobian $\bm{J} \in \mathbb{R}^{3m \times l}$ maps contact forces to joint
torques $\bm{\tau} \in \mathbb{R}^l$.
\begin{alignat}{2}
\bm{G}\bm{c} &+ \bm{w} &~= 0 \label{eq:object_eq}\\
\bm{J}^T \bm{c} &+ \bm{\tau} &~= 0 \label{eq:hand_eq}
\end{alignat}
These equilibrium equations can predict the resultant wrench on the object and
the joint torques that arise in response to given contact forces, but, since
neither $\bm{G}$ nor $\bm{J}^T$ are typically invertible in practice, it has
no predictive capabilities in the opposite directions: we cannot use it to
predict the contact response to known external wrenches, or joint torques. It
thus fails to capture effects where contact forces are transmitted (either
amongst the joints or between the joints and the external environment) through
the object itself.
We could use one of the many methods discussed in
Section~\ref{sec:related_closure} to find a set of contact wrenches
$\bm{c}_{eq}$ that balance a given applied wrench and are achievable with the
kinematic and actuation capabilities of the hand. However, in the vast
majority of cases in applied robotics, this simple method has major
shortcomings. It requires that we know $\bm{w}$ exactly at any point in time,
which is unrealistic in all but the most controlled environments. Furthermore,
most robotic hands are position controlled and hence lack the torque
regulating capabilities necessary to accurately command the actuators for real
time grasp control.
The approach actually used in the overwhelming majority of robotic grasping
tasks is to command a given set of joint torques $\bm{\tau}^c$ and let the
fingers jam around the object. We keep torque commands constant throughout the
task (i.e. we take no further action) and rely on appropriate equilibrium
contact forces $\bm{c}$ and equilibrium torques $\bm{\tau}^{eq}$ to arise
through \textit{passive reactions}. This simple strategy is effective for
hands powered by highly geared motors due to the non-backdrivable nature of
the actuators: At any joint $j$ the equilibrium torque $\bm{\tau}_{j}^{eq}$
can exceed the commanded value $\bm{\tau}_j^c$ in a passive response to
torques $\tau_k^c,~k \neq j$ or the applied wrench $\bm{w}$. An intuitive
example of this phenomenon might be an object being pressed against a finger
by an external wrench. If the wrench is large enough to overwhelm the
commanded joint torques then any additional torques at the finger joints are
provided passively by the gearbox such that the finger remains fixed.
Much the same as in Chapter~\ref{sec:2d} we must introduce the notion of
compliance to our grasp model in order to resolve the structural
indeterminacy. Therefore the motion of the bodies making up the grasp become
part of the solution we are seeking. This is much the same as was previously
presented in Section~\ref{sec:2dmodel}. We denote object motion as $\bm{r} \in
\mathbb{R}^6$, however now the joints of the hand and therefore the hand links
may also exhibit motion denoted by a change in joint angles $\bm{q} \in
\mathbb{R}^l$.
We have already seen in Section~\ref{sec:2dmodel} how contact motion due to
the object moving allowed us to capture the unilateral contact behavior.
However, we must now argue about \textit{relative} motion at the contacts
$\bm{d} \in \mathbb{R}^{3m}$, as both the object and the contacting link may
move. Recall that in the context of our grasp model by motion we mean the
displacements of the bodies involved and this relation is only valid for small
displacements.
\begin{equation}
\bm{G}^T\bm{r} - \bm{J}\bm{q} = \bm{d} \label{eq:rel_contact_motion}
\end{equation}
Again, as we assume a constant grasp geometry matrices $\bm{G}$ and $\bm{J}$
are also constant. We can now reason about the contact forces and joint
torques in terms of the motion of the object and joints.
\vspace{2mm} \noindent \textbf{Normal forces.} In Chapter~\ref{sec:2dmodel} we
discussed a compliance formulation of the unilateral contact constraint. We
will use the same constitutive equations for the contact normal forces
obtained by placing virtual linear springs of unit stiffness along the contact
normals.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
c_{i,n} &= -d_{i,n} &\text{if } d_{i,n} \leq 0 \\
c_{i,n} &= 0 &\text{if } d_{i,n} > 0
\end{empheq}\label{eq:unilaterality_again}
\end{subequations}
In Chapter~\ref{sec:2dmodel} we also included a normal force term for
\textit{preloaded} grasps. We can ignore this term here as we are now also
explicitly modeling the hand kinematics. This allows us to define a preload in
terms of joint torques instead of normal forces, which is how preloads are
applied in practice. These preload joint torques then propagate through the
links making up the hand as well as the object according to the equilibrium
equations (\ref{eq:object_eq}) \& (\ref{eq:hand_eq}) and thus create the
preload contact forces present before the application of any external forces.
\vspace{2mm} \noindent \textbf{Friction forces:} Again, we choose the Coulomb
model to describe the friction forces. The first part of the Coulomb model
provides an upper bound to the magnitude of the friction force given the
normal force and the friction coefficient $\mu_i$. As we are investigating the
static equilibrium of a grasp we consider all friction coefficients to be
those of static friction. This defines a cone $\mathcal{F}_i$ at each contact.
\begin{equation}
\mathcal{F}_i( \mu_i, c_{i,n} )
= \{ \bm{c}_{i,t} : \left\lVert \bm{c}_{i,t} \right\rVert \leq \mu_i c_{i,n} \}
\label{eq:friction_bound}
\end{equation}
The second part of the Coulomb model concerns the \textit{Maximum Dissipation
Principle}~\cite{Moreau2011}. Now we will show how the MPD results in friction
forces that oppose the relative motion at the contact. The MDP states that
given a relative contact motion the friction force at that contact must
maximize the dissipation where the friction force is bounded by
(\ref{eq:friction_bound}).
\begin{equation}
\bm{c}_{i,t} \in \argmin_{\bm{c}_{i,t} \in \mathcal{F}_i} \bm{c}^T_{i,t} \cdot \bm{d}_{i,t}
\label{eq:mdp}
\end{equation}
\vspace{2mm} \noindent \textbf{Joint torques:} Finally, we model the joints as
nonbackdrivable, in order to capture the behavior of robotic hands driven by
highly geared motors. This means that a joint $j$ may only exhibit motion in
the direction that its commanded torque is driving it in. As we know the
commanded joint torques we can define motion in such a direction as positive.
\begin{equation}
q_j \geq 0
\label{eq:joint_unilaterality}
\end{equation}
A joint with zero commanded torque may not move, as any torque arising from
external factors will be absorbed by the gearing.
The joint torque may exceed the commanded level, but only if this arises
passively. This means that a joint that is being passively loaded beyond the
commanded torque levels must be locked in place and may not move. A moving
joint must apply the torque it was commanded to. Thus, we must also
distinguish between two types of joints.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
\tau_j &\geq \tau_{j}^c & \text{if}~q_j = 0\\
\tau_j &= \tau_{j}^c & \text{if}~q_j > 0
\end{empheq}\label{eq:joint_model}
\end{subequations}
So far this joint model has assumed a the kinematics of a fully actuated
direct drive robotic hand, where an actuator command equates to an individual
joint torque command. However, a more general formulation allows modeling hand
kinematics, where the joint torques can be expressed as linear combinations of
actuator forces. This includes underactuated designs with fewer actuators than
degrees of freedom such as, for example, a tendon driven hand with fewer
tendons than joints. This implies, that a tendon --- and hence an actuator ---
can directly apply torques to multiple joints by means of a mechanical
transmission.
We thus define matrix $\bm{R}$, which maps from forces or torques at the
actuators $\bm{f}$ to joint torques $\bm{\tau}$. Note, that its transpose maps
from joint motion to the motion of the mechanical force transmission at the
actuator, which we assume to be nonbackdrivable. Inequality constraints on a
vector are to be understood in a piecewise fashion.
\begin{eqnarray}
\bm{R} \bm{f} &=& \bm{\tau} \label{eq:torqueRatio}\\
\bm{R}^T \bm{q} &\geq& 0 \label{eq:underac_nonbackdrive}
\end{eqnarray}
Hence, at an actuator $l$ we may see a force $f_l$ that exceeds the commanded
value $f_{l}^c$ --- and again, this can only occur passively. This means, that
an actuator force can only exceed the commanded value, if there is an attempt
to backdrive the actuator, and hence the mechanical transmission does not
exhibit any motion.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
f_l &\geq f_{l}^c & \text{if } (\bm{R}^T \bm{q})_l = 0\\
f_l &= f_{l}^c & \text{if } (\bm{R}^T \bm{q})_l \geq 0
\end{empheq}
\label{eq:underactuation}
\end{subequations}
This actuation model is a generalization of the previously introduced joint
model and will reduce as such if the actuators control individual joint
torques directly.
\vspace{2mm} \noindent \textbf{Complete problem:} The system comprising
(\ref{eq:object_eq}) -- (\ref{eq:underactuation}) defines the static
equilibrium formulation for an arrangement of bodies; some fixed, some free,
some constrained by unilateral or bilateral constraints. Some bodies may be
acted upon by actuators or externally applied wrenches. The formulation
satisfies all the requirements for determining stability including passive
effects due to nonbackdrivability and underactuation but is also applicable to
many other problems with arrangements of bodies in frictional contact.
\vspace{2mm} \noindent \textbf{Definition of stability:} In the following we
will make use of the same definition previously introduced in
Chapter~\ref{sec:definition}: For a given grasp geometry, actuator torques and
applied wrench a grasp is deemed to be stable if a solution to the above
system of constraints exists. However, note that the above formulation is very
general in nature, and can not only be used in such \textit{existence
problems} (e.g. given $\bm{f}^c$, determine if $\bm{r}$ and $\bm{c}$ exist
that balance a given $\bm{w}$). With the addition of an objective we can also
apply it in \textit{optimization problems} (e.g. determine the optimal
$\bm{f}^c$ that satisfies the existence problem above).
Remaining agnostic to the exact query that is being solved we will refer to
the \textit{exact problem} as the following query: given a subset of $\bm{f}$,
$\bm{r}$, $\bm{c}$ or $\bm{w}$, determine the rest of these variables
such that (\ref{eq:object_eq}) -- (\ref{eq:underactuation}) are exactly
satisfied (i.e. the grasp is stable).
\section{Formulation as a Mixed Integer Program}
\subsection{Unilaterality}\label{sec:unilaterality}
Let us take a closer look at the types of constraints that make up the exact
problem. The equilibrium equations in (\ref{eq:object_eq}) \&
(\ref{eq:hand_eq}) as well as the kinematics (\ref{eq:rel_contact_motion}) \&
(\ref{eq:torqueRatio}) are linear equality constraints and require no further
attention. The unilaterality constraints in (\ref{eq:unilaterality_again}) \&
(\ref{eq:underactuation}) consist of pairs of linear equalities and
inequalities but exhibit a combinatorial nature: Only one of the constraints
is active at a time, the choice of which is unknown a priori.
In Chapter~\ref{sec:2d} we dealt with constraints of this nature by separately
evaluating the problems arising from each choice of constraint combinations.
As we were only interested in the \textit{existence problem}, each individual
problem involved solving at most a linear program. Therefore this approach
could be efficiently leveraged to solve problems involving such combinatorial
constraints. As we want to develop a formulation that can also be applied to
the more complex \textit{optimization problems} we choose a Mixed Integer
Programming (MIP) approach instead. Both the normal force and the joint model
relationships (\ref{eq:unilaterality_again}) \& (\ref{eq:underactuation}) can
be cast as pairs of convex constraints with binary decision variables in an
MIP that can then be solved using algorithms such as branch and bound.
The perhaps simplest implementation of such constraints is the 'Big M method'.
For instance we can reformulate (\ref{eq:unilaterality_again}) as four linear
inequality constraints with the addition of a binary decision variable $y_i
\in \{0,1\}$ and two large constants $M_{i,1}$ and $M_{i,2}$, which give the
method its name. The binary variable can be interpreted as the variable
deciding if a contact rolls ($y_i = 1$) or breaks ($y_i = 0$).
\begin{eqnarray}
c_{i,n} \geq& 0 \\
c_{i,n} + d_{i,n} \geq& 0 \\
c_{i,n} \leq& M_{i,1} \cdot y_i \\
c_{i,n} + d_{i,n} \leq& M_{i,2} \cdot (1 - y_i)
\end{eqnarray}
The two constants must be chosen to be larger than the largest expected value
of the left hand side of their respective inequality constraint. However,
choosing too large a value can lead to numerical issues. An example of such a
numerical issue is 'trickle flow', in which a small violation of the
integrality constraint can lead to a violation of the inequality. Numerical
optimization tools must work within finite tolerances and thus small
violations are unavoidable. Specifically in our example a $y_i$ that is
slightly larger than zero allows for nonzero contact normal force when
multiplied with a large $M_{i,1}$ even at a breaking contact.
An alternative approach is to use indicator constraints, which avoids these
issues. These constraints allow a Mixed Integer solvers to directly branch on
the constraint choices or derive tight 'big M' values during
preprocessing~\cite{gurobi}.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
y_i &= 1 &\implies& &c_{i,n} &= -d_{i,n}~,&~d_{i,n} \leq 0 \\
y_i &= 0 &\implies& &c_{i,n} &= 0~,&~d_{i,n} > 0
\end{empheq}
\label{eq:binary_contact}
\end{subequations}
A potential downside is that indicator constraints tend to have weaker
relaxations and thus may lead to larger MIP optimization times. In practice we
have found that this disadvantage is more than compensated for by their ease
of use as well as numerical stability when compared to the big M method. Thus,
going forward we will use indicator constraints in order to deal with
conditional constraints.
Of course we can also use indicator constraints to model the unilaterality of
nonbackdrivable actuator constraints (\ref{eq:underactuation}) by introducing
binary variable $z_l \in \{0,1\}$, which indicates if the actuator is free to
move ($z_l = 0$) or being overpowered by external forces ($z_l = 1$).
\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
z_l &= 1 &\implies& &f_l &\geq f_{l}^c~,&~(\bm{R}^T \bm{q})_l = 0 \\
z_l &= 0 &\implies& &f_l &= f_{l}^c~,&~(\bm{R}^T \bm{q})_l > 0
\end{empheq}
\label{eq:binary_actuator}
\end{subequations}
\subsection{Friction}\label{sec:3dfriction}
The Coulomb friction law in (\ref{eq:friction_bound}) \& (\ref{eq:mdp})
provides more complexity due to its non-convexity. This is readily apparent as
the the bilinear form in (\ref{eq:mdp}) is not positive
definite~\cite{LIBERTI04}. It has been pointed out that solving for
$\bm{c}_{i,t}$ given $\bm{d}_{i,t}$ or vice versa is a convex problem and can
be done efficiently~\cite{KAUFMANN08}. Solving for both simultaneously is much
harder --- in fact the global optimization of non-convex quadratic programs is
in general NP-hard.
For our purposes it will be useful to reformulate the Coulomb friction
constraints. Note, that in the case of isotropic friction dissipation is
maximized if the friction force is anti-parallel to the relative sliding
motion and lies on the boundary of the cone $\mathcal{F}_i$. Thus, we can also
directly express the friction force in terms of the normal force and the
relative sliding motion. We must distinguish between two cases:
\begin{itemize}
\item At a rolling contact that does not exhibit relative motion in a
tangential direction (sliding) the friction force is constrained such that the
contact force lies within the cone $\mathcal{F}_i$
\item If a contact does exhibit sliding, the friction force must oppose the
relative direction of motion, and the total contact force must lie on the
friction cone edge.
\end{itemize}
\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
\left\lVert \bm{c}_{i,t} \right\rVert &\leq \mu_i c_{i,n} & \text{if } \left\lVert \bm{d}_{i,t} \right\rVert = 0 \label{eq:frictioncone} \\
\bm{c}_{i,t} &= - \mu_i c_{i,n} \frac{\bm{d}_{i,t}}{\left\lVert\bm{d}_{i,t}\right\rVert} & \text{otherwise} \label{eq:nonconvex}
\end{empheq}\label{eq:fric_forces}
\end{subequations}
Note, that while the formulation in (\ref{eq:fric_forces}) requires the
distinction between sliding contacts and those remaining at rest the original
formulation (\ref{eq:friction_bound}) \& (\ref{eq:mdp}) holds in both cases.
This reformulation introduces also a discontinuity as the relation between
$\bm{c}_{i,t}$ and $\bm{d}_{i,t}$ is discontinuous at
$\left\lVert\bm{d}_{i,t}\right\rVert=0$. We could approach this discontinuity
in a similar fashion as we did above to distinguish between rolling and
breaking contacts by using indicator constraints. However this does not
resolve the non-convexity as (\ref{eq:nonconvex}) is still non-convex.
Unfortunately the methods we developed in Section~\ref{sec:2d} cannot be
directly applied to three dimensions \textit{even with prior knowledge of
which contacts slip and which do not}. While in two dimensions, a contact can
only roll or slide in one of two directions (and there are hence 3 slip states
per contact), in three dimensions there are infinitely many directions a
contact can slip in and we cannot further break down the sliding case. These
characteristics of the Coulomb model presents much difficulty in the modeling
of contacts with Coulomb friction and many approaches have been proposed to
approximate the friction law. We reviewed a selection of such efforts in
Chapter~\ref{sec:related_dynamics}.
As all motion in our framework is purely 'virtual' and any real motion is
expected to be minuscule one may be tempted to simply consider all contacts to
be stationary and cut away the discontinuity and non-convexity introduced by
the MDP. Thus we would simply ignore the maximum dissipation principle
(\ref{eq:mdp}) and with it (\ref{eq:nonconvex}). The remaining quadratic
inequality constraint (\ref{eq:frictioncone}) is convex. In fact, it has been
shown that (\ref{eq:friction_bound}) can be cast as a \textit{linear matrix
inequality} (LMI)~\cite{HAN00}.
Unfortunately, this approach does not work as we will now illustrate. The
rigid, passively loaded fingers allow an optimization formulation with
unconstrained object movement to 'wedge' the object between contacts creating
large contact forces. This allows the grasp to withstand very large applied
wrenches by performing 'unnatural' virtual displacements that satisfy all our
constraints and lead to equilibrium, but violate the principle of conservation
of energy: the energy stored in the virtual springs and the energy dissipated
due to friction are greater than the work done by the externally applied
wrench and the actuators. In the example shown in Fig.~\ref{fig:twist} the
applied force does no work while energy is being stored in the springs and
being dissipated due to friction at contacts 1 and 3.
From the principle of virtual work it follows that a solution that satisfies
both equilibrium and the maximum dissipation principle also satisfies
conservation of energy. Hence, in order to enforce conservation of energy and
obtain physically meaningful results we must enforce the MDP or find a
reasonable approximation.
\begin{figure}[t]
\centering
\includegraphics[width=0.85\linewidth]{graphics/case_twist.pdf}
\caption{Unconstrained friction forces (except for friction cone constraint).
Left: undisturbed system with no contact forces (also showing the object
reference frame). Right: reaction to force $\bm{w}$ applied to the object. A
rotation $\bm{r}$ loads the contacts such that contact forces (blue arrows)
can resist the applied wrench (green arrow), even in the absence of a
preload.}
\label{fig:twist}
\end{figure}
\section{Iterative solution approach}\label{sec:iterative}
Now that we have discussed the consequences of simply dropping the MDP we
describe a physically motivated method to obtain accurate results. The method
described in this section does not offer a guarantee of convergence. In
Chapter~\ref{sec:cones} we will describe a method that is guaranteed to
converge to the exact solution.
Recall that we model some compliance of the grasp in order to be able to
capture passive effects. Thus, we think of a stable grasp as one that moves
from one equilibrium state to another when an external wrench is applied to
the grasped object. The changes in contact forces necessary to balance the
applied wrench arise through the motions of the object and hand links. These
motions are minuscule for the stiff hands we consider here and therefore we
can ignore dynamic effects and argue from a purely quasistatic viewpoint.
Forces applied to an object tend to move that object in the direction of the
applied force. This is why the unphysical motion in Fig.~\ref{fig:twist} seems
intuitively unnatural --- the object moves in a direction orthogonal to the
force applied to it. Of course the complex effects due to grasp geometry as
well as a non-convex friction law mean that in general a grasped object will
not move exactly along the direction of the force applied to it. While these
effects are difficult to model we can devise an iterative scheme to
approximate them.
In this scheme we will take small steps (in terms of object motion) such that
the object may only move in the direction of the net resultant wrench applied
to it. While we cannot enforce the maximum dissipation principle and its
consequence --- friction opposes motion --- we can offer an approximation that
is physically well motivated. We will introduce an objective term to the
optimization that, at every step of the iteration, will minimize the magnitude
of the net resultant wrench on the object. The reasoning is that such forces,
when projected to the objects reference frame, oppose the net resultant wrench
to their best ability. As motion is only allowed in the direction of this net
resultant wrench, the contact forces computed thus oppose this motion to their
best ability. Taking steps that are sufficiently small ensures that the
complex geometric and friction effects of the grasp are accurately captured.
We implement this scheme by removing the object equilibrium constraint
(\ref{eq:object_eq}) and including an objective in the optimization
formulation such as to minimize the net resultant wrench $\bm{w}^k$ (the net
sum of the applied wrench and contact forces) acting on the object at step
$k$.
\begin{eqnarray}
\text{minimize: } \left\lVert \bm{w}^k \right\rVert = \left\lVert \bm{w}+\bm{G}^T\bm{c}^k \right\rVert
\end{eqnarray}
We also constrain the object movement such that motion is only allowed in the
direction of the unbalanced wrench acting on the object remaining from the
previous step. We limit the step size by a parameter $\gamma$ for numerical
stability and accuracy:
\begin{equation}
\bm{r}^k = \bm{r}^{k-1} + s\bm{w}^{k-1}, \quad 0 \leq s \leq \gamma
\label{eq:movement}
\end{equation}
After each iteration, we check for convergence by comparing the incremental
improvement to a threshold $\epsilon$. If the objective has converged to a
sufficiently small net wrench (we chose $10^{-3}N$), we deem the grasp to be
stable; otherwise, if the objective converges to a larger value, we deem the
grasp unstable. Note that we must use the objective in the optimization
formulation in this approach, which means we are constrained to the solution
of \textit{existence problems}. In this case the problem we are solving is
this: \textit{Given $\bm{f}^c$, determine if $\bm{c}$ will arise that balances
applied wrench $\bm{w}$}. Thus, we formulate a \textit{movement
constrained existence problem} as outlined in Algorithm~\ref{alg:iterative} to
be solved iteratively as outlined in Algorithm~\ref{alg:loop} allowing us to
make a determination as to the stability of the grasp. The computation time of
this process is directly related to the number of iterations required until
convergence.
\begin{algorithm}[!t]
\caption{Inner loop of the iterative solution scheme: Minimize the resultant
wrench, where object motion is only allowed in the direction of the current
net resultant wrench.}\label{alg:iterative}
\begin{algorithmic}[0]
\State \textbf{Input:} $\bm{f}^c$ --- commanded actuator forces, $\bm{w}$ --- applied wrench, $\bm{r}^{k-1}$ --- previous object displacement, $\bm{w}^{k-1}$ --- previous net wrench
\State \textbf{Output:} $\bm{c}^k$ --- contact forces, $\bm{r}^k$ --- next step object displacement, $\bm{w}^k$ --- next step net wrench
\Procedure{Movement Constrained EP}{$\bm{f}^c, \bm{w}, \bm{r}^{k-1}, \bm{w}^{k-1}$}
\State \textbf{minimize:} $\left\lVert \bm{w}^k \right\rVert$ \Comment{net wrench}
\State \textbf{subject to:}
\State \hspace{\algorithmicindent} $Eqs.\ (\ref{eq:object_eq})\ ,\ (\ref{eq:hand_eq})\ \&\ (\ref{eq:torqueRatio})$ \Comment{object and hand equilibrium}
\State \hspace{\algorithmicindent} $Eqs.\ (\ref{eq:rel_contact_motion})\ \&\ (\ref{eq:binary_contact})$ \Comment{normal force unilaterality and constitutive relation}
\State \hspace{\algorithmicindent} $Eq.\ (\ref{eq:binary_actuator})$ \Comment{actuator unilaterality}
\State \hspace{\algorithmicindent} $Eq.\ (\ref{eq:frictioncone})$ \Comment{friction cone}
\State \hspace{\algorithmicindent} $Eq.\ (\ref{eq:movement})$ \Comment{object movement}
\State \textbf{return} $\bm{c}^k$, $\bm{r}^k, \bm{w}^k$
\EndProcedure
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[!t]
\caption{Outer loop of the iterative solution scheme: Repeatedly solve the
"Movement Constrained EP". Update the current object motion and net resultant
wrench at every step.}\label{alg:loop}
\begin{algorithmic}[0]
\State \textbf{Input:} $\bm{f}^c$ --- commanded actuator forces, $\bm{w}$ --- applied wrench
\State \textbf{Output:} $\bm{c}$ --- contact forces, $\bm{w}_{res}$ --- net resultant
\Procedure{Iterative EP}{$\bm{f}^c, \bm{w}$}
\State $\bm{r}^0 = 0$
\State $\bm{w}^0 = \bm{w}$
\Loop
\State \textbf{($\bm{c}^k,\bm{r}^k,\bm{w}^k$) = Movement Constrained EP($\bm{f}^c, \bm{w}, \bm{r}^{k-1}, \bm{w}^{k-1}$)} \Comment{Algorithm~\ref{alg:iterative}}
\If{$ \left\lVert \bm{w}^{k-1}-\bm{w}^k \right\rVert < \epsilon$} \Comment{Check if system has converged}
\State \textbf{break}
\EndIf
\EndLoop
\State \textbf{return} $\bm{c}^{final}, \bm{w}^{final}$
\EndProcedure
\end{algorithmic}
\end{algorithm}
However, such an iterative approach is not guaranteed to converge, or to
converge to the physically meaningful state of the system. Thus, while this
approach is simple to implement and provides a good estimate of grasp
stability we can make no guarantees of solutions obtained: The solution we
find is not guaranteed to be a good approximation of a solution to the
\textit{exact problem} as defined in Chapter~\ref{sec:model3d}. Furthermore,
if algorithm~\ref{alg:loop} does not return a valid and stable solution we do
not know if such a solution may not exist. Nonetheless, this iterative
approach has proved useful in analyzing the passive behavior of grasps as we
will show in Chapter~\ref{sec:3d_apps_iterative}.
\section{Application to grasp analysis in three dimensions}\label{sec:3d_apps_iterative}
We will illustrate the application of the iterative solution approach
discussed in Chapter~\ref{sec:iterative} on example grasps with the Barrett
hand and an underactuated tendon-driven gripper. We pointed out that a
limitation of the iterative approach is that we may only solve \textit{existence}
type problems as the objective is required in the formulation and is not
available for us to optimize a quantity of our choosing. Recall, however, that
the question of 'will a given grasp with given joint commands resist a
specific applied force' is such an existence problem and hence we can
investigate the range of forces applied to the object our example grasps can
resist.
To facilitate visualization we will confine the forces applied to the object
to the a plane. As our framework can only answer 'spot checks' --- that is
determine stability for a specific applied force --- we discretize this plane
by direction vectors with a spacing of 1\degree~between them. We then
determine the maximum force applied to the object the grasp can withstand for
each of these directions. We do this by performing a binary search converging
on the maximum magnitude of the force before the grasp becomes unstable.
We model the Barrett hand as having all nonbackdrivable joints. Our
qualitative experience indicates that the finger flexion joints never
backdrive, while the spread angle joint backdrives under high load. For
simplicity we also do not use the breakaway feature of the hand; our real
instance of the hand also does not exhibit this feature. We model the joints
as rigidly coupled for motion, and assume that all the torque supplied by each
finger motor is applied to the proximal joint.
We show force data collected by replicating the grasp on a real hand and
testing resistance to external disturbances. To measure the maximum force that
a grasp can resist in a certain direction, we manually apply a load to the
grasped object using a Spectra wire in series with a load cell (Futek,
FSH00097). In order to apply a pure force, the wire is connected such that the
load direction passes through the center of mass of the object. We increase
the load until the object starts moving, and take the largest magnitude
recorded by the load cell as the largest magnitude of the disturbance the
grasp can resist in the given direction.
\vspace{2mm} \noindent \textbf{Barrett hand:} Let us first consider the grasp
in Fig.~\ref{fig:2dgrasp}, which is similar to the grasp introduced in
Section~\ref{sec:bridge_example} to serve as an example for the importance of
the passive resistance capabilities that nonbackdrivable joints provide. We
now have the necessary tools to analyze such grasps. Considering only forces
in the grasp plane this grasp effectively becomes a 2D problem: simple enough
to be understood intuitively, but still complex enough to give rise to
interesting interplay between the joints and contacts.
\begin{figure}[!t]
\centering
\includegraphics[width=3.5in]{graphics/2dgrasp_axes.png}
\caption{Grasp example 1. Note that this is the same grasp we used in
Chapter~\ref{sec:bridge_example} to illustrate the consequences of passive
reactions.}
\label{fig:2dgrasp}
\end{figure}
Consider first the problem of resisting an external force applied to the
object center of mass and oriented along the $y$-axis. This simple case
illustrates the difference between active and passive resistance. Resistance
against a force oriented along the positive $y$-axis requires active torque
applied at the joints in order to load the contacts and generate friction. The
force can be resisted only up to the limit provided by the preload, along with
the friction coefficient. If the force is applied along the negative $y$-axis,
resistance happens passively, provided through the contacts on the proximal
link. Furthermore, resistance to such a force does not require any kind of
preload, and is infinite in magnitude (up to the breaking limit of the hand
mechanism, which does not fall within our scope here).
\begin{figure}[!t]
\centering
\includegraphics[width=5in]{graphics/2dgrasp_xy_final.png}
\caption{Normalized forces in the $xy$-plane that can be resisted by the grasp
in Fig.~\ref{fig:2dgrasp}: observed by experiment (mean $\pm$ one standard
deviation) and predicted by our framework. For both real and predicted data,
we normalize the force values by dividing by the magnitude of the maximum
resistible force along the positive direction of the $y$-axis (note thus that
both predicted and experimental lines cross the $y$-axis at $y=1.0$). In all
directions falling below the blue line, the prediction framework hit the upper
limit of the binary search (arbitrarily set to $10^3$ N). Hence we deem forces
in the shaded area resistible. In the direction denoted by 'Observed no
limit', the grasp was not disturbed even when reaching the physical limit of
the experimental setup.}
\label{fig:2dgrasp_xy}
\end{figure}
For an external force applied along the $x$-axis, the problem is symmetric
between the positive and negative directions. Again, the grasp can provide
passive resistance, through a combination of forces on the proximal and distal
links. For the more general case of forces applied in the $xy$-plane, we again
see a combination of active and passive resistance effects. Intuitively, any
force with a negative $y$ component will be fully resisted passively. However,
forces with a positive $y$ component and non-zero $x$ component can require both
active and passive responses. Fig.~\ref{fig:2dgrasp_xy} shows the forces that
can be resisted in the $xy$-plane, both predicted by our framework and observed
by experiment.
For both real and predicted data, we normalize the force values by dividing by
the magnitude of the maximum resistible force along the positive direction of
the $y$-axis (note thus that both predicted and experimental lines cross the
$y$-axis at $y=1.0$). The plots should therefore be used to compare trends
rather than absolute values. We use this normalization to account for the fact
that the absolute torque levels that the hand can produce, and which are
needed by our formulation in order to predict absolute force levels, can only
be estimated and no accurate data is available from the manufacturer. The
difficulty in obtaining accurate assessments of generated motor torque
generally limits the assessments we can make based on absolute force values.
However, if one knows the real magnitude of the maximum resistible external
force along any direction, in which this magnitude is finite, one could infer
from these figures the real maximum resistible wrenches in the other
directions.
Moving outside of the grasp plane, Fig.~\ref{fig:2dgrasp_xz} shows predicted
and measured resistance to forces in the $xz$-plane. Again, we notice that
some forces can be resisted up to arbitrary magnitudes thanks to passive
effects, while others are limited by the actively applied preload.
\begin{figure}[!t]
\centering
\includegraphics[width=5in]{graphics/2dgrasp_xz_final.png}
\caption{Normalized forces in the $xz$-plane that can be resisted by the grasp
in Fig.~\ref{fig:2dgrasp}: predicted by our framework, and observed by
experiment. In all directions falling between the blue lines (shaded), the
prediction framework hit the upper limit of the binary search (arbitrarily set
to $10^3$ N). In the direction denoted by 'Observed no limit', the grasp was
not disturbed even when reaching the physical limit of the experimental setup.}
\label{fig:2dgrasp_xz}
\end{figure}
As was mentioned previously, a common method for grasp creation is to choose
a set of actuator commands to preload the grasp before applying any external
wrench. These preloads are then maintained throughout the task trusting in
passive effects to stabilize the grasp. One advantage of studying the effect
of applied joint torques on grasp stability is that it allows us to observe
differences in stability due to different ways of preloading the same grasp.
For example, in the case of the Barrett hand, choosing at which finger(s) to
apply preload torque can change the outcome of the grasp, even though there is
no change in the distribution of contacts. We illustrate this approach on the
case shown in Fig.~\ref{fig:3dgrasp}. Using our framework we can compute
regions of resistible wrenches for two different preloads (see
Fig.~\ref{fig:outlier}).
\begin{figure}[!t]
\centering
\includegraphics[width=6in]{graphics/3dgrasp.pdf}
\caption{Top and side views for grasp example 2 also indicating finger labels.
Note that the spread angle degree of freedom of the Barrett hand changes the
angle between finger 1 and finger 2; the thumb is only actuated in the flexion
direction.}
\label{fig:3dgrasp}
\end{figure}
\begin{figure}[!t]
\centering
\includegraphics[width=3.5in]{graphics/3dgrasp_xy_final_fixed.png}
\caption{Forces in an $xy$-plane that can be resisted by the grasp in
Fig.~\ref{fig:3dgrasp} (shaded) as predicted by our framework, depending on
which finger is preloaded. Note the four outlier results and that they have
not been included in the determination of the regions of resistible forces.
The forces are normalized and hence dimensionless.}
\label{fig:outlier}
\end{figure}
We compare the ability of the grasp to resist a disturbance applied along the
$x$-axis in the positive direction if either finger 1 or finger 2 apply a
preload torque to the grasp. Our formulation predicts that by preloading
finger 1 the grasp can resist a disturbance that is 2.48 times larger in
magnitude than if preloading finger 2. Experimental data (detailed in
Table~\ref{tab:3dgrasp}) indicates a ratio for the same disturbance direction
of 2.23. The variance in measurements again illustrates the difficulty of
verifying such simulation results with experimental data. Nevertheless,
experiments confirmed that preloading finger 1 is significantly better for
this case.
\begin{table}[!t]
\renewcommand{\arraystretch}{1.3}
\centering
\begin{tabular}{c|cccc|cc}
& \multicolumn{4}{c}{Measured resistance} & \multicolumn{2}{c}{Predicted} \\
& Values(N) & Avg.(N) & St. Dev. & Ratio & Value & Ratio\\\hline
&&&&&&\\[-3.5mm]\hline
&&&&&&\\[-2mm]
F1 load & 12.2, 10.8, 7.5, 7.9, 9.3 & 9.6 & 1.9 & 2.23 & 1.98 & 2.48\\
F2 load & 3.7, 4.1, 5.0 & 4.3 & 0.7 & & 0.80 &
\label{tab:3dgrasp}
\end{tabular}
\caption{Predicted and measured resistance to force applied along the positive
$x$-axis in the grasp problem in Fig.~\ref{fig:3dgrasp}. Each row shows the
results obtained if the preload is applied exclusively by finger 1 or finger 2
respectively. Experimental measurements were repeated 5 times for finger 1 (to
account for the higher variance) and 3 times for finger 2. Predicted values
are non dimensional, and hence the ratio between the two preload cases is
shown.}
\end{table}
This result can be explained by the fact that, somewhat counter-intuitively,
preloading finger 1 leads to larger contact forces than preloading finger 2,
even if the same torque is applied by each motor. Due to the orientation of
finger 1, the contact force on finger 1 has a smaller moment arm around the
finger flexion axes than is the case for finger 2. Thus, if the same flexion
torque is applied in turn at each finger, the contact forces created by finger
1 will be higher. In turn, due to passive reaction, this will lead to higher
contact forces on finger 2, even if finger 1 is the one being actively loaded.
Finally, these results hold if the spread degree of freedom is rigid and does
not backdrive; in fact, preloading finger 1 leads to a much larger passive
(reaction) torque on the spread degree of freedom than when preloading finger
2.
Referring to Fig.~\ref{fig:outlier}, we note that actively preloading finger
1 results in greater resistance only in some directions. There is much
structure to the prediction made by our framework that could be exploited to
make better decisions when preloading a grasp with some knowledge of the
expected external wrenches.
\vspace{2mm} \noindent \textbf{Underactuated hand:} We now apply our framework
to a grasp with a two-fingered, tendon-driven underactuated gripper (see
Fig.~\ref{fig:underactuatedGrasp}). The gripper has four degrees of freedom,
but only two actuators driving a proximal and a distal tendon. The proximal
tendon has a moment arm of 5mm around the proximal joints. The distal tendon
has moment arms of 1.6mm and 5mm around the proximal and distal joints
respectively. The actuators are non backdrivable and hence the tendons not
only transmit actuation forces, they also provide kinematic constraints to the
motion of the gripper's links.
As the tendons split and lead into both fingers, we assume that they are
connected to the actuator by a differential. This introduces compliance to the
grasp: if one proximal joint closes by a certain amount, this will allow the
other proximal joint to open by a corresponding amount. This compliance means
that the underactuated grasp in Fig.~\ref{fig:underactuatedGrasp} will behave
fundamentally different than the very similar grasp in Fig.~\ref{fig:2dgrasp}.
To see this, consider the region of resistible wrenches in the $xy$-plane
(Figs.~\ref{fig:2dgrasp_xy}\ \&~\ref{fig:underactuated}). In both cases the
object is gripped by two opposing fingers, however, while in the case of the
Barrett hand the grasp could withstand arbitrarily large forces pushing the
object directly against a finger, our framework predicts only limited
resistance to such forces in the case of the underactuated hand.
\begin{figure}[!t]
\centering
\includegraphics[width=5.0in]{graphics/underactuated.png}
\caption{Grasp example 3. Note that in terms of contact positions, this grasp
is very similar to that in Fig.~\ref{fig:2dgrasp}. However, the kinematic
differences cause these two grasps to behave very differently.}
\label{fig:underactuatedGrasp}
\end{figure}
\begin{figure}[!t]
\centering
\includegraphics[width=3.5in]{graphics/underactuated_plot.png}
\caption{Forces in an $xy$-plane that can be resisted by the grasp in
Fig.~\ref{fig:underactuatedGrasp} (shaded) as predicted by our framework. The
forces are normalized and hence dimensionless. Note the difference in scale on
the $x$-and $y$-axes.}
\label{fig:underactuated}
\end{figure}
We used our framework to apply two different sets of preload actuator commands
$\bm{f}^c$ and analyzed the resistance of the resulting grasp to an
externally applied wrench. We chose to apply a torque around the $x$-axis and
considered two preload cases: applying an active load on the proximal tendon
only ($\bm{f}^c = [1,0]^T$), leaving the distal tendon to be loaded passively
as well as the reverse --- applying an active load on the distal tendon only
($\bm{f}^c = [0,1]^T$), leaving the proximal tendon to be loaded passively.
For equal actuator force, our framework predicts, that a preload created by
only actively loading the distal tendon leads to almost twice as much
resistance to torques applied in the direction of the $x$-axis than only
actively loading the proximal tendon.
Experimental verification of this prediction proved to be difficult, as
results had high variance and application of a pure torque to the object along
an axis that penetrates the distal links of the gripper was complicated.
However, we mounted the gripper such that the grasp plane was in the
horizontal and placed weights on the top end of the box object. We found the
resistance to these applied wrenches indeed to be much higher when actively
loading the distal tendon as opposed to the proximal.
The reason for this discrepancy in resistance to this wrench becomes apparent
when looking at the contact forces arising from the different preload commands
(see Fig.~\ref{fig:tendon_loads}.) When only actively loading the proximal
tendon (Fig.~\ref{fig:proximal}) the preload contact forces are concentrated
at the distal contacts(!). In fact, the contacts on the proximal links break
entirely. These contacts, however, have the largest moment arm with respect to
the torque applied to the object and are hence crucial for the ability of the
grasp to resist such torques.
When instead only actively loading the distal tendon (Fig.~\ref{fig:distal})
contact forces arise on all four links. The contact forces at the proximal
links particularly allow the grasp to resist torques around the horizontal
object axis. Our framework has captured the passive effects present in this
underactuated hand and helped us to understand how to best make use of the
actuators available.
\begin{figure}[!t]
\centerline{
\subfigure[Actively loading the proximal tendon]{\includegraphics[width=3in]{graphics/proximal.png}
\label{fig:proximal}}
\subfigure[Actively loading the distal tendon]{\includegraphics[width=3in]{graphics/distal.png}%
\label{fig:distal}}
}
\caption{Different preload contact forces arising from different preload
actuator commands (blue arrows) --- the tendon shown in green is being
actively loaded by the actuator. As a result the red tendon is loaded
passively. The violet line denotes the torque applied to the grasped object.
Note that the forces shown are those that arise purely as a result of the
preload actuator commands and hence \textit{before} the application of any
external wrench to the object.}\label{fig:tendon_loads}
\end{figure}
\section{Discussion}
In this Chapter we have developed a grasp model and the corresponding
algorithms to determine the passive stability of spacial robotic grasps. We
showed the importance of the maximum dissipation principle for the
determination of passive reaction effects. We did so by showing how ignoring
the maximum dissipation principle allows for unphysical solutions such that
stability cannot be determined. We proposed a physically motivated iterative
scheme that allows us to approximate the law of conservation of energy and
hence the maximum dissipation principle.
The resulting algorithm enabled us to determine the passive stability of
spacial grasps for both a fully actuated as well as an underactuated hand. We
showed that our framework correctly captures passive phenomena and
demonstrated a practical application of our algorithm as a tool for choosing
appropriate preload actuator commands. We compared the predictions made by our
framework to data collected from real robotic grasps and found that while
empirical grasp stability analysis is difficult, our framework appears to
agree well with the observed behaviors.
However, our current real underactuated hand only allows experimental
validation of a subset of our analysis results. We would like to design a hand
that we can use to further validate our framework and study the effects of
underactuation on grasp stability. For instance, our framework predicts that
wrench resistance is highly dependent on the torque ratios at the joints due
to the kinematics of the force transmission. We would like to experiment with
a variety of underactuated hands, with varying kinematic and actuation models,
to investigate these effects and demonstrate the effectiveness of our
framework as a design tool.
An important limitation of our algorithm is that we had to use the objective
in the optimization formulation in order to approximate the maximum
dissipation principle. This means that we could only solve problems of the
\textit{existence} type and perform a spot check if a grasp with given
actuator commands could resist a specific disturbance. As the objective is not
available we cannot use it to do more practical analysis such as finding
optimal actuator commands.
A further limitation is that in a subset of cases, the solver reports maximum
resistible wrenches of very different magniture along some directions relative
to neighboring directions. For example, in the second example grasp from the
previous section (Fig.~\ref{fig:3dgrasp}), when computing resistance to
disturbances sampled from the $xy$-plane (Fig.~\ref{fig:outlier}), we obtain
two outliers for each preload case that do not follow the trend of the
surrounding points. These outliers are quite rare and tend to fall within the
area deemed to contain resistible wrenches (shaded). These effects will
require further investigation.
A promising avenue to pursue in terms of alleviating these outliers might be
to take into account the effect of uncertainties (e.g. in exact contact
location) on our model. We believe exploring the sensitivity of the model to
such uncertainties may yield many valuable insights and make our framework
even more relevant to practical robotic grasping.
The most significant limitation of our algorithm stems from its iterative
nature. While our iterative approach allows us to approximate the maximum
dissipation principle, such an iterative approach is not guaranteed to
converge, or to converge to the physically meaningful state of the system. As
such, our approach offers an approximation without any formal guarantees. In
practice, however, our algorithm produces physically plausible results that
could be confirmed by empirical validation.
\chapter{Grasp Stability Analysis in Two Dimensions and Polynomial Time}\label{sec:2d}
\section{Introduction}
In Chapter~\ref{sec:bridge} we argued that for a grasp model to be useful as a
grasp stability analysis tool it must be able to predict the purely passive
behavior of the grasp. In this chapter we will begin to investigate the
modeling of such passive phenomena in the special case of planar grasps. This
simplification is convenient when modeling friction forces under the maximum
dissipation principle. The reason is that in the plane contacts can only slide
in one of two directions. This is illustrated in the grasp in
Fig.~\ref{fig:grasp}: there are no out of plane motions or forces to consider.
This grasp was constructed to exhibit passive characteristics very similar to
those of the grasp in Fig.~\ref{fig:package}: External disturbance $\bm{w}_1$
(left, pushing the object up) can be resisted by contact forces $\bm{c}_1$ and
$\bm{c}_3$, but only if contacts 1 and 3 have been actively pre-loaded with
enough normal force to generate the corresponding friction forces. In
contrast, disturbance $\bm{w}_2$ (right, pushing the object down), regardless
of its magnitude, will always be passively resisted by contact force
$\bm{c}_2$. In this chapter we introduce a computationally efficient method to
predict the stability of passive planar grasps such as the one in
Fig.~\ref{fig:grasp} when applying arbitrary wrenches to the grasped object.
\begin{figure}[!t]
\centering
\includegraphics[width=0.85\linewidth]{graphics/case1.pdf}
\caption{A planar grasping scenario where a hand establishes multiple
frictional contacts (numbered 1-3) with a target object. }
\label{fig:grasp}
\end{figure}
As we are interested in passive stability we cannot make the simplifying
assumption that we have any control over the contact forces. Thus, we take a
similar approach to previous researchers, who leverage the compliance of the
grasp to resolve the static indeterminacy
\cite{SALISBURY_THESIS}\hspace{0pt}\cite{NGUYEN88}\hspace{0pt}\cite{HANAFUSA77}\hspace{0pt}\cite{CUTKOSKY_COMPLIANCE}\hspace{0pt}\cite{BICCHI93}\hspace{0pt}\cite{BICCHI94}\hspace{0pt}\cite{BICCHI95}\hspace{0pt}\cite{PRATTICHIZZO97}.
Modeling the compliance of the grasp provides \textit{constitutive equations}
relating motion of the object to contact forces. This is a common approach in
the solution of statically indeterminate systems, in which contact forces
cannot be uniquely determined from the equations of equilibrium alone and are
therefore difficult to solve. The contact forces are then fully determined by
the relative motion between the hand and the object --- the system becomes
statically determinate. These constitutive relations are desirable, as they
are linear and therefore allow for very efficient solution.
However, as we described in Chapter~\ref{sec:related_compliance} the
unilaterality of contact normal forces as well as the the frictional
components of contact wrenches cannot be accurately described by compliance
relations. Thus, we choose to model only normal forces at persisting contacts
with constitutive relations while modeling friction with the Coulomb friction
model including the maximum dissipation principle (MDP)~\cite{Moreau2011}.
Initially, we assume all bodies making up the grasp to be at rest. Due to the
compliance we introduced to resolve the static indeterminacy, we expect some
motion once an external disturbance is applied to the grasped object. This may
include breaking or sliding contacts. However, we assume all motion to be
small such that we only have to account for first order effects and can ignore
any higher order effects on the grasp geometry due to this motion. Assuming
the grasp geometry to remain constant greatly simplifies the grasp model and
is a reasonable assumption for relatively stiff hands and objects as the
motions observed are indeed very small.
Furthermore, we assume that all dynamic effects are negligible. As such, when
we speak of the motion of a body we really mean the displacement it undergoes
when a wrench is applied to it. As is common when dealing with rigid body
motion we will consider a displacement to include both the translation and
the rotation of the body.
\section{Grasp model}\label{sec:2dmodel}
We first introduce the general framework of our grasp model. Consider a rigid
robotic hand that makes $m$ contacts with a grasped object. The system is
initially at rest. Each contact is defined by a location on the surface of the
grasped object and a normal direction determined by the local geometry of the
bodies in contact. We choose the \textit{Point Contact with Friction} model to
describe the possible contact wrenches that may arise at the interfaces
between the hand and the object. Therefore we only consider contact forces and
do not allow for frictional torques. This is a reasonable assumption for
contacts between smooth and relatively stiff bodies. For any contact specific
vector such as contact force or contact motion we will use subscripts $n$ and
$t$ respectively to denote the components lying in the contact normal and
contact tangent directions. We use the vector $\bm{c} \in \mathbb{R}^{2m}$ to
denote contact forces, where $\bm{c}_i \in \mathbb{R}^2$ is the force at the
i-th contact. Using the notation above, $c_{i,n} \in \mathbb{R}$ is the normal
component of this force, and $c_{i,t} \in \mathbb{R}$ is its tangential (i.e.
frictional) component.
\vspace{2mm} \noindent \textbf{Equilibrium:} Let us define the grasp map
matrix $\bm{G} \in \mathbb{R}^{3 \times 2m}$, which maps contact forces into a
frame fixed to the grasped object. We can now write the equilibrium equations
for the grasped object where we collect all disturbances externally applied to
the object (such as gravitational forces for instance) in $\bm{w} \in
\mathbb{R}^3$.
\begin{equation}
\bm{G}\bm{c} + \bm{w} = 0 \label{eq:equilibrium}
\end{equation}
The transpose of matrix $\bm{G}$ also maps object motion
$\bm{r}\in\mathbb{R}^3$ to translational motion of the contacts in the contact
frame $\bm{d}\in\mathbb{R}^{2m}$. Recall that in the context of our grasp
model by motion we mean the displacement of the object and this relation is
only valid for small displacements.
\begin{equation}
\bm{G}^T\bm{r} = \bm{d} \label{eq:contact_motion}
\end{equation}
Note that as we assume a constant grasp geometry matrix $\bm{G}$ is also
constant.
\vspace{2mm} \noindent \textbf{Normal forces:} Due to the unilaterality of
contacts --- we do not concern ourselves with adhesion or similar effects ---
a contact may only push on an object but can never pull. Thus, the normal
force at a contact must be strictly non-negative. Furthermore, if the contact
detaches the contact force must be zero. We model the normal forces by placing
virtual linear springs along the contact normals such that normal forces will
only arise through object motions that compress these springs. As we have
assumed all motions to be small such that grasp geometries are invariant we
are not interested in actually computing the real magnitude of the
displacements of the grasped object. Instead, we can think of the motion as
entirely virtual; it is simply a tool to resolve static indeterminacy and
enforce contact constraints and thus we can forgo having to identify the true
compliance parameters of the hand. To simplify notation we choose the virtual
springs to be of unity stiffness. The result is a compliant version of the
\textit{Signorini Fichera Condition}.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
c_{i,n} &= -d_{i,n} &\text{if } d_{i,n} \leq 0 \\
c_{i,n} &= 0 &\text{if } d_{i,n} > 0
\end{empheq}\label{eq:normal_forces}
\end{subequations}
We are here implicitly assuming that all contacts are of equal stiffness. For
grasps with very dissimilar contact compliances it may be necessary to choose
spring stiffnesses with appropriate ratios with respect to each other.
Nonetheless, the absolute magnitude of the spring stiffnesses is irrelevant as
object motion scales inversely proportional to spring stiffness and hence
contact forces are invariant with respect to spring stiffnesses.
Of course only one of the two pairs of constraints in (\ref{eq:normal_forces})
can be active at any contact, the choice of which depends on if the contact
breaks or not. As the object motion is part of the solution we seek it is
unknown which pair of constraints is active. However, these constraints can
also be formulated in terms of two linear inequalities and a non-convex
quadratic constraint that must all be satisfied in either case:
\begin{eqnarray}
c_{i,n} &\geq 0 \\
c_{i,n} + d_{i,n} &\geq 0 \\
c_{i,n} \cdot (c_{i,n} + d_{i,n}) &= 0
\end{eqnarray}
If re-posed as a Linear Complementarity Problem the matrix relating the
vectors of unknowns is non-positive definite and therefore problems including
such constraints are difficult to solve. We can instead construct a system of
equations for each possible combination of contact constraints and search for
solutions in all such problems. This way a problem contains only the active
pair of linear equality and inequality constraints and can thus be readily
solved. Of course we must now solve multiple simpler problems instead of one
complex one, but as we will see we can make use of the structure of the
problem to arrive at an algorithm of polynomial complexity as opposed to a
direct approach to the LCP, which would be worst-case exponential.
We will therefore work directly with the formulation of the normal force
constraints in (\ref{eq:normal_forces}) after adding one more detail: We may
be interested in grasps where we assume a certain level of contact normal
forces is already present before the application of any external wrench. The
virtual springs in such a grasp are pre-stressed in order to achieve the
desired normal forces --- we call this the preload of a grasp. We denote the
preload at contact $i$ as $p_i$. Adding this term to (\ref{eq:normal_forces})
we obtain the following:
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
c_{i,n} &= -d_{i,n} + p_i &\text{if } d_{i,n} - p_i \leq 0 \\
c_{i,n} &= 0 &\text{if } d_{i,n} - p_i > 0
\end{empheq}\label{eq:normal_compliance}
\end{subequations}
\vspace{2mm} \noindent \textbf{Friction forces:} We choose the Coulomb model
to describe the friction forces at the contacts. For a stationary contact this
model simply states that the frictional component of the contact force is
bounded by the normal component scaled by the coefficient of friction $\mu_i$.
If a contact slides, however, the \textit{maximum dissipation principle}
(MDP)~\cite{Moreau2011} states that the friction force must oppose the relative
motion at the contact. We can express the Coulomb friction law as follows:
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
c_{i,t} &\leq \mu_i c_{i,n} &\text{if } d_{i,t} = 0 \\
c_{i,t} &= \mu_i c_{i,n} &\text{if } d_{i,t} < 0 \\
c_{i,t} &= -\mu_i c_{i,n} &\text{if } d_{i,t} > 0
\end{empheq}\label{eq:cone}
\end{subequations}
Similarly to the conditional constraints in (\ref{eq:normal_compliance}) we
will deal with this set of constraints by constructing multiple problems with
different combinations of active constraints such that individual problems
only consist of linear constraints.
\section{Definition of stability}\label{sec:definition}
In Chapter~\ref{sec:2dmodel} we introduced the mathematical constraints
relating object motions and contact forces assuming a constant grasp geometry.
Hence, they define the behavior of a grasp under application of an external
disturbance assuming a constant grasp geometry. In this context we can now
provide a more precise definition of stability.
As we are interested in the stability of a given grasp with respect to a
specific external wrench applied to the grasped object, such a grasp geometry/
wrench pair defines an instance of the stability problem. The question of
stability then becomes one of \textit{solution existence}: A grasp is deemed
stable if a solution exists to the set of constraints described in
Chapter~\ref{sec:2dmodel}. More specifically, a grasp is deemed stable if a
displacement exists such that contact wrenches arise that balance the wrench
applied to the grasped object. As such, the motion can be interpreted as the
(small) movement the bodies undergo under the applied loads before they reach
a new equilibrium.
As the constraints are specific to the initial grasp geometry, non-existence
of a solution only indicates instability of that exact geometry. It does not
indicate if through changes in grasp geometry due to object motion the object
will eventually settle in a new equilibrium. The initial grasp would be deemed
unstable under our definition.
Note also that stability is explicitly defined with respect to a specific
applied wrench as opposed to a more broad definition such as force closure or
asymptotic stability in the control theoretic sense. This is an important
distinction as a grasp can be stable with respect to a specific wrench even
without satisfying force closure. This opens up our definition of stability
and the following analysis to many other problems that may not be immediately
appear related to grasping. A house of cards on a table in a gravitational
field for instance may not intuitively resemble a grasp. The supporting
surface certainly has no force closure over the contacting cards, yet a (well
constructed) house of cards will be stable under the above definition.
We will leave open for now the question of what does and does not constitute a
grasp and focus for the rest of this dissertation on mechanisms we believe
most readers would immediately recognize as grasps with robotic hands.
However, we expect the scope of our definition of stability and the following
work to be much broader.
\section{Solving for stability given contact states}\label{sec:2d_solving}
The formulation we described in Chapter~\ref{sec:2dmodel} introduces a major
complication as equations (\ref{eq:normal_compliance}) define two possible
constraints and equations (\ref{eq:cone}) define three possible constraints.
Only one constraint of each set can be active a contact but we do not know
which constraints hold a priori. We do not know if a contact detaches and if
it does not if it slips in a negative sense, slips in a positive sense or
rolls.
Note that which constraint is active is entirely determined by the relative
motion at the corresponding contact. A contact may persist or detach, which
determines the contact normal force. The friction force constraint is
determined depending on if the contact slips in a positive sense, a negative
or not at all. This means a contact must be in one of six states.
\begin{table}[h]
\centering
\begin{tabular}{ c | c }
Persists / Detaches & Rolls / Slips \\
\hline
Persists & Rolls \\
Persists & Slips + \\
Persists & Slips - \\
Detaches & Rolls \\
Detaches & Slips + \\
Detaches & Slips - \\
\end{tabular}
\caption{Enumeration of possible states for a single contact}
\label{tab:contact_states}
\end{table}
In order to describe a system with multiple contacts one must know the state
of each contact. This introduces a combinatorial aspect to the problem due to
the different possible combinations of contact states. We will investigate the
number of possible combinations of these states in
Chapter~\ref{sec:state_number} and their enumeration in
Chapter~\ref{sec:enumeration} but for now let us assume that we are given a
valid combination of states such that we can construct the appropriate
constraints and solve for equilibrium.
Note that every constraint possibility in equations
(\ref{eq:normal_compliance})\&(\ref{eq:cone}) consists of a pair of an
inequality and an equality. Thus we can construct a linear system of equations
from the equality components of all the constraints also including the
equations of equilibrium equation (\ref{eq:equilibrium}). Equation
(\ref{eq:contact_motion}) is a simple linear mapping such that all $\bm{d}$
can be expressed in terms of $\bm{r}$.
\begin{equation}
\bm{A}
\begin{bmatrix}\bm{c} \\ \bm{r}\end{bmatrix}
=
\begin{bmatrix}\bm{G} & 0 \\ \bm{A}_1 & \bm{A}_2\end{bmatrix}
\begin{bmatrix}\bm{c} \\ \bm{r}\end{bmatrix}
=
\begin{bmatrix}-\bm{w} \\ \bm{p}\end{bmatrix}\label{eq:linear_system}
\end{equation}
Matrix $\bm{A}_1$ and $\bm{A}_2$ collect the equality constraints from
(\ref{eq:normal_compliance})\&(\ref{eq:cone}) that correspond to the set of
contact states we are given. $\bm{p}$ contains the preloads $p_i$ for the
contacts and constraints where they are applicable and zeros elsewhere. For
grasps without a preload it contains all zeros. As we have $2m+3$ equations
for an equal number of constraints matrix $\bm{A}$ is square. Thus, there are
two cases:
\begin{enumerate}
\item if $\bm{A}$ is invertible solve the linear system
(\ref{eq:linear_system}). The solution is unique and if it satisfies the
applicable inequality constraints in equations
(\ref{eq:normal_compliance})\&(\ref{eq:cone}) then it is indeed a valid
solution to the system.
\item if $\bm{A}$ is singular solve a linear program with equality constraints
(\ref{eq:linear_system}) subject to the applicable inequality constraints in
equations (\ref{eq:normal_compliance})\&(\ref{eq:cone}). If the linear program
is feasible then the computed solution is valid.
\end{enumerate}
If through either approach no valid solution is found then the set of contact
states given cannot result in equilibrium. This gives us an algorithm that is
exponential in the number of contacts as one could naively enumerate all $6^m$
possible contact states, construct the corresponding system of equations for
each and solve the resulting linear problem as described above. There is,
however, a method to reduce the number of combinations that must be checked
for a solution as only some combinations are valid under rigid body
constraints.
\section{Number of possible contact states}\label{sec:state_number}
In order to analyze the possible contact state combinations it is opportune to
consider the case of contacts detaching and the different slipping conditions
separately. Thus let us define two partitions: First we partition the contacts
into those detaching and those, which persist. We define vector $U_k \in
\{0,1\}^m$. The $i$-th element of $U_k$ is labeled $u^k_i$ and indicates if
contact $i$ detaches.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
u^k_i &= 1 &\implies& \text{contact persists, } &d_{i,n} - p_i \leq 0 ~,&~ c_{i,n} = -d_{i,n} + p_i \\
u^k_i &= 0 &\implies& \text{contact detaches, } &d_{i,n} - p_i > 0 ~,&~ c_{i,n} = 0
\end{empheq}
\end{subequations}
We now define the second partition of contacts this time into three sets:
those slipping in a positive sense, those slipping in a negative sense and
those that remain relatively at rest. We define vector $S_k \in \{-1,0,1\}^m$.
The $i$-th element of $S_k$ is labeled $s^k_i$ and indicates the slip state of
contact $i$.
\begin{subequations}
\begin{empheq}[left=\empheqlbrace] {align}
s^k_i &= 0 &\implies& \text{contact rolls, } &d_{i,t} = 0~,&~ c_{i,t} \leq \mu_i c_{i,n} \\
s^k_i &= 1 &\implies& \text{contact slips in $+$ sense, } &d_{i,t} > 0~,&~ c_{i,t} = -\mu_i c_{i,n} \\
s^k_i &= -1 &\implies& \text{contact slips in $-$ sense, } &d_{i,t} < 0~,&~ c_{i,t} = \mu_i c_{i,n}
\end{empheq}
\end{subequations}
Finally $\mathbb{U}$ is the set of all possible system contact detachment
states. Thus $U_k \in \mathbb{U}$ for $k=1..\#(\mathbb{U})$, where
$\#(\mathbb{U})$ is the cardinality of $\mathbb{U}$. Similarly $\mathbb{S}$ is
the set of all possible system contact slip states. At first glance
$\#(\mathbb{U})=2^m$ and $\#(\mathbb{S})=3^m$: since each contact can have two
detachment states and three slip states, the total number of states for the
system is exponential in the number of contacts.
However, it is known that the number of possible slip states for a planar
rigid body in contact with other rigid bodies fixed in space is indeed
quadratic in the number of
contacts~\cite{Brost1989a}\cite{MASON_MANIPULATION}. This perhaps surprising
fact stems from the rigid body constraints that impose relations between the
motions of all contacts on the same body. Trinkle et al.~\cite{TRINKLE95}
point out that this also applies to a grasped object if the hand is immobile.
In the following we shall prove this is indeed the case and show that the
number of possible contact detachment states is also polynomial in the number
of contacts, even for pre-stressed grasps. In Chapter~\ref{sec:enumeration} we
describe an algorithm to enumerate all geometrically possible combinations of
contact states.
Let us begin by noting that in the three-dimensional space of possible object
motions $\bm{r}=[x,y,r]$, the constraints $d_{i,n} = (\bm{G}^T \bm{r})_{i,n} =
0$ and $d_{i,t} = (\bm{G}^T \bm{r})_{i,t} = 0$ define two-dimensional planes.
We shall in the following only consider the planes generated by the tangential
contact motion constraint as the processing they require is more involved. We
will then describe the simplifications that can be made in processing the
planes due to the normal contact motion constraints.
Consider a tangential motion constraint $(\bm{G}^T \bm{r})_{i,t} = 0$. Any
object motion lying on this plane will result in zero relative tangential
motion at this contact. Motion in the open halfspace where $(\bm{G}^T
\bm{r})_{i,t} > 0$ will result in slip along the tangential axis in the
positive direction, while motion in the complementary open halfspace
$(\bm{G}^T \bm{r})_{i,t} < 0$ will result in slip in the negative direction.
Combining the planes defined by each contact, we can construct an
\textit{arrangement} of planes. These planes segment the space of object
motions into the following partitions:
\begin{itemize}
\item 3-dimensional \textit{regions} where all contacts are slipping;
\item 2-dimensional \textit{facets} (region boundaries on a single
plane) where one contact is rolling;
\item 1-dimensional \textit{lines} (intersections of multiple
planes) where two contacts are rolling.
\end{itemize}
By construction, since all of our planes go through the origin, the only
possible zero-dimensional \textit{point} intersection is the origin itself
(see Fig.~\ref{fig:planes}.) Such an arrangement of planes is said to be
\textit{central}~\cite{Ovchinnikov2011}. For the benefit of generality, the
partitions of a space created by an arrangement of hyperplanes are usually
described in terms of the dimensionality of the partition: A $k$-dimensional
partition is known as a "k-face" of the arrangement. Thus, we will refer to
the \textit{regions}, \textit{facets}, \textit{lines} and \textit{points} as
the 3-faces, 2-faces, 1-faces and 0-faces of the arrangement.
Given an arrangement of planes as described above, it follows that any system
slip state $S_k$ that is consistent with a possible object motion must
correspond to either a 3-face, 2-face, 1-face and 0-face of this plane
arrangement. Finding the maximum number of 3-faces given $m$ planes in a
central arrangement is equivalent to finding the maximum number of
two-dimensional regions on a sphere cut with $m$ great circles, which is known
to be $O(m^2)$~\cite{GREATCIRCLES}. However, the 3-faces do not define all the
combinations of slip states we care about. We must also consider the cases
where at least one contact rolls, namely the 2-faces, 1-faces and 0-faces
defined as above.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth]{graphics/planes.pdf}
\vspace{-5mm}
\caption{Arrangement of planes equivalent to contact roll-slip
constraints. For the grasp shown on the left, each contact defines
a plane in the three-dimensional space of possible object motions
$\bm{r}=[x,y,r]$. For example, Contact 1 rolls if the translation
component of $\bm{r}$ along $y$ is counteracted by an equal
rotational component $r$. Similarly, Contact 2 rolls if the $y$
component of $\bm{r}$ is 0, and so on.}
\label{fig:planes}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.65\linewidth]{graphics/polygon.pdf}
\caption{Dual polyhedron for the arrangement of planes. Each 3-face
of the arrangement of planes (red dot) corresponds to a
vertex of the polyhedron (for clarity, only 7 regions are marked
in the left figure). Vertices are connected if the corresponding
3-faces share a 2-face.}
\label{fig:poly}
\end{figure}
Let $f_k^{(d)}(n)$ be the number of k-faces of an arrangement of $n$
hyperplanes in $d$ dimensional space. Zaslavski's formula~\cite{FUKUDA91}
provides the following upper bound:
\begin{equation}
f_k^{(d)}(n) \leq {n \choose d-k} \sum_{i=0}^k {n-d+k \choose i}
\end{equation}
In our case, the total number of slip states we are interested in is equal to
$\sum_{k=0}^3 f_k^{(3)}(m)$ and hence bounded from above by a polynomial in
$m$. This is, however, an upper bound that will not be attained in our case,
as we show next. Let us construct the dual convex polyhedron to our
arrangement of planes, which will be instrumental in enumerating all possible
slip states. Each 3-face of the plane arrangement corresponds to a vertex of
the polyhedron, and each two dimensional boundary (2-face) between 3-faces
corresponds to an edge connecting the vertices corresponding to the
neighboring 3-faces (see Fig.~\ref{fig:poly}.) We can ensure this polyhedron
is convex by selecting, as the representative vertex for each region, a point
where the 3-face intersects the unit sphere. We note that the 1-faces of our
plane arrangement correspond to the faces of the dual polyhedron. The dual
polyhedron thus also fully describes our possible slip states.
Like any convex polyhedron, the dual we have constructed can be represented by
a 3-connected planar graph. From this result, we can bound the number of slip
states even more closely than with Zaslavski's formula: Any maximal planar
graph with $V$ vertices has at most $3V-6$ edges and $2V-4$ faces and hence
the number of edges and faces of our polyhedron are linearly bounded by the
number of its vertices. Since we already know the number of vertices to be
$O(m^2)$, so are the number of edges and faces. Thus, the number of slip
states we must consider is quadratic in the number of contacts.
For the number of detachment states the argument must be adapted if the grasp
is pre-stressed, as the planes --- due to the normal contact motion
constraints --- do not pass through the origin. The arrangement of planes is
no longer \textit{central}. Thus, we cannot construct a dual polyhedron and
the above result does not hold. However, for the normal motion constraints we
are only concerned with the 3-dimensional regions and none of the lower
dimensional elements of the partition. Zaslavski's formula still applies and
provides an upper bound for the number of contact detachment states that is
cubic in the number of contacts even in the case of preloaded grasps.
\section{Contact state enumeration}\label{sec:enumeration}
We can now present a complete procedure for enumerating all possible
detachment states $U_k$ and slip states $S_k$ of an $m$-contact system that
are consistent with rigid body object motion. Again, we will only describe the
process for the slip states as the procedure for the detachment states is a
simplification (only the first step is required).
\mystep{Step 1.} We begin by enumerating all the slip states $S$ in
$\mathbb{S}$ corresponding to 3-faces in our plane arrangement. We achieve
this using Algorithm~\ref{alg:buildset}. Recall that all such $S \in
\{-1,1\}^m$.
The algorithm operates by initializing $\mathbb{S}$ with just a single empty
slip state $\{\}$, which corresponds to a 3-face that includes all of
$\mathbb{R}^3$. We then one by one introduce the planes defined by the contact
slip expressions. Whenever we introduce a new plane we iterate through all
slip states in $\mathbb{S}$. At the beginning of the iteration we remove
slip state $S_k$ from $\mathbb{S}$ and check if its corresponding 3-face
intersects with the halfspaces defined by the new plane.
The existence of this intersection can be efficiently tested for by a linear
program: Use the elements in $S_k$ and the corresponding planes to construct
the linear inequalities that define its corresponding 3-face. Then add an
additional inequality constraint for the halfspace either above or below the
new plane. The feasibility of such a linear program tells us if a point exists
that lies in both the original 3-face and the halfspace defined by the new
plane. Thus, a 3-face and a halfspace intersect if the corresponding linear
program is feasible. We then add a new 3-face for each halfspace with which
$S_k$ intersects. The new 3-faces are the same as $S_k$ but we append a 1 or
-1 to indicate if it lies above or below the newly added plane.
We note that for any state $S$ obtained by this algorithm, all contacts are
slipping, in either the positive or negative direction ($s_i^k=\pm 1$ for all
$i$.) We have not yet considered rolling contacts.
\begin{algorithm}[!t]
\caption{}\label{alg:buildset}
\begin{algorithmic}[0]
\State Initialize $\mathbb{S}$ with empty state $S_0 = \{\}$
\For{$i=1..m$}
\For{$k=1..\#(S)$}
\State Remove $S_k$ from $\mathbb{S}$
\If{3-face $S_k$ intersects halfspace above plane $P_i$}
\State Create 3-face $S_{k+} = \{S_k, 1\}$
\State Add $S_{k+}$ to $\mathbb{S}$
\EndIf
\If{3-face $S_k$ intersects halfspace below plane $P_i$}
\State Create 3-face $S_{k-} = \{S_k, -1\}$
\State Add $S_{k-}$ to $\mathbb{S}$
\EndIf
\EndFor
\EndFor
\State\Return $\mathbb{S}$
\end{algorithmic}
\end{algorithm}
\mystep{Step 2.} Now we create the slip states corresponding to 2-faces in the
plane arrangements (one rolling contact). As mentioned before, these
correspond to edges of the dual polyhedron, so we begin this step by
constructing the dual polyhedron. We already have its vertices: each state $S$
created at the previous step defines a 3-face of the plane arrangement, and
thus corresponds to a vertex of the dual polyhedron. Then, for every two
states $S_k, S_l$ in $\mathbb{S}$ that differ by a single $s_i$, we add the
edge between them to the dual polyhedron (note that thus our polyhedron is
also a partial cube where edges connect any two vertices with Hamming distance
equal to 1~\cite{EPPSTEIN08}). Furthermore, we also create an additional state
$S_{kl}$ corresponding to the facet between $S_k$ and $S_l$. This will be
identical to both $S_k$ and $S_l$, with the difference that $s_i=0$ (the entry
corresponding to the plane that this 2-face lies in is set to 0).
\mystep{Step 3.} Next, we must compute the slip states corresponding to
1-faces in our plane arrangement (two rolling contacts), which correspond to
the faces of the dual polyhedron. We obtain the faces of our dual polyhedron
by computing the Minimum Cycle Basis (MCB) of the undirected graph defined by
its edges (computed at the previous step). This gives us $F-1$ of the faces of
our polyhedron; to see why consider that the number of cycles in the minimum
cycle basis is given by $E-V+1$~\cite{MEHLHORN05}. Recall the Euler-Poincar\'e
characteristic $\chi = V - E + F$ relating the number of vertices, edges and
faces of a manifold. For a convex polyhedron $\chi = 2$, and from this we can
derive the number of faces of our dual polyhedron to be equal to $E-V+2$. The
last face is obtained as the symmetric sum of all the cycles in the MCB
(defined as in~\cite{MEHLHORN05}). Once we have the cycles corresponding to
the faces of the dual polyhedron, we convert them into slip states as follows.
For each cycle, starting from the slip state $S_k$ corresponding to any of the
vertices in the cycle, we set $s_i=0$ for any plane $i$ that is traversed by
an edge in the cycle.
\mystep{Step 4.} Finally, we must add the single 0-face of the plane
arrangement by adding a slip state $\{0\}^m$ to $\mathbb{S}$.
\vspace{2.5mm}
The total number of slip states $S$ we obtain is thus 1 greater than the
number of 3-faces, 2-faces and 1-faces of the plane arrangement, which is the
same as the number of vertices, edges and faces in its dual polyhedron. We
have already shown that this is polynomial (quadratic) in the number of planes
(contacts). We also show that the enumeration algorithm above has polynomial
runtime. We note that Step 1 has two nested loops, with one iterating over
planes and the other one over existing states. The number of states at the end
of this step is bounded by $m^2$, thus the running time of this Step is
$O(m^3)$. Step 2 must check every state against every other one, with $O(m^2)$
states, thus its running time is $O(m^4)$. Finally, the dominant part of Step
3 is the computation of the MCB. We have used an implementation with $O(E^3 +
VE^2\text{log} V)$ running time, where $V$ and $E$ are the number of vertices
and edges of the dual polyhedron. Since both $E$ and $V$ are polynomial in
$m$, the running time of the MCB algorithm is as well. Thus our complete
enumeration method has polynomial runtime in the number of contacts $m$.
Also note that the computation of contact detachment states is much simpler as
we only require the 3-faces of the arrangement of planes defined by the normal
contact motion constraints. Thus, only the first step of the above procedure
is required. In order to obtain the total set of possible combinations of
contact states we must combine the two sets $\mathbb{U}$ and $\mathbb{S}$ such
that for every combination of persisting contacts we superimpose the set of
all combinations of contact slip states. Note, that the slip state information
for a detached contact does not hold any value and hence in practice
Algorithm~\ref{alg:buildset} could be modified to consider both the sets of
planes due to normal and tangential motion constraints simultaneously only
recording the state combinations that are actually useful. Of course even
without this optimization the total number of contact state combinations to be
considered remains polynomial in the number of contacts.
\section{Complete stability determination procedure}
We can now formalize our complete algorithm using the components outlined so
far (Algorithm~\ref{alg:complete}). We first build the total set of possible
contact states $\mathbb{T}=\mathbb{U}\times\mathbb{S}$. Then, for every $T_k
\in \mathbb{T}$, we check for a solution to the system as described in
Chapter~\ref{sec:2d_solving}. If one exists, we deem the grasp stable. If,
after enumerating all possible $T_k$, we do not find one that admits a
solution, we deem the grasp unstable. We make two important observations
regarding Algorithm~\ref{alg:complete}. First, its running time is polynomial
in the number $m$ of contacts. This follows from the results obtained so far:
We know that $\#(\mathbb{T})$ is polynomial in $m$, as is the process for
building it. For each $T_k$, we then solve at most a linear program with
$2m+3$ unknowns, which also has a polynomial runtime, which completes this
result.
Second, Algorithm~\ref{alg:complete} guarantees that, if no solution is found,
none exists that satisfies the constraints of our system. $\mathbb{T}$
provably contains all the contact states consistent with rigid body motion;
for each of these, equilibrium and contact conditions form a linear program
for which we can provably find all solutions (if they exist). So, under the
assumed formulation (virtual springs used to determine contact normal forces,
and frictional constraints including the maximum dissipation principle), if a
solution exists to the equilibrium problem, we must find it.
\begin{algorithm}[!t]
\caption{}\label{alg:complete}
\begin{algorithmic}[0]
\State Build $\mathbb{T}=\mathbb{U}\times\mathbb{S}$, the set of all possible contact states
\For{$k=1..\#(\mathbb{T})$}
\State Given $T_k$, solve system (\ref{eq:linear_system})
\If{solution found}
\State \Return grasp stable
\EndIf
\EndFor
\State \Return grasp unstable
\end{algorithmic}
\end{algorithm}
\section{Applications to planar grasp stability analysis}
In this section we will demonstrate that our framework predicts the correct
force distributions and makes an accurate prediction on grasp stability. We
will utilize the grasp shown in Fig.~\ref{fig:grasp2} because the correct force
distribution and stability of the grasp is easily understood intuitively.
Specifically, we would like to discriminate which applied wrenches will be
balanced purely passively, and where an active preload of the grasp is
required. We assume the friction coefficient is 0.5 across all contacts such
that $\mu_i=0.5,~i=0..m$.
\begin{figure}[!t]
\centering
\includegraphics[width=0.85\linewidth]{graphics/case1.pdf}
\caption{A grasping scenario where a rigid hand establishes multiple
frictional contacts (numbered 1-3) with a target object. External disturbance
$\bm{w}_1$ (left, pushing the object up) can be resisted by contact forces
$\bm{c}_1$ and $\bm{c}_3$, but only if contacts 1 and 3 have been actively
pre-loaded with enough normal force to generate the corresponding friction
forces. In contrast, disturbance $\bm{w}_2$ (right, pushing the object down),
regardless of its magnitude, will always be passively resisted by contact
force $\bm{c}_2$.}
\label{fig:grasp2}
\end{figure}
\begin{figure}[!t]
\centering
\includegraphics[width=0.45\linewidth]{graphics/detail.pdf}
\caption{Illustration of the contact coordinate frame. $\bm{r}$
denotes object motion expressed in the object coordinate frame.}
\label{fig:detail}
\end{figure}
Recall that there exist contact forces in the interior of the friction cones
that balance both wrenches shown in Fig. \ref{fig:grasp2}. Perhaps the most
commonly used approach to grasp stability analysis is the Grasp Wrench Space
method~\cite{FERRARI92}. Indeed, when we consider the slice through the GWS
visualized in Fig. \ref{fig:GWS} we can see that there exist contact forces
that balance arbitrary forces in the plane. However, we argue that while
$\bm{w}_2$ will always be reacted passively, no matter the preload, in order
to react $\bm{w}_1$ we require the grasp to have been sufficiently preloaded.
The GWS method correctly indicates the existence of equilibrium contact forces
but does not predict if they may arise, and hence does not capture the
necessity of a preload. Thus, in this context force closure is not a reliable
indicator of stability.
\begin{figure}[!t]
\centering
\subfigure[Resistible forces with no preload (our algorithm)]
{\label{fig:bin_no_preload}\includegraphics[width=0.45\linewidth]{graphics/binary_search.png}}
\subfigure[Resistible forces with a preload such that the normal force at each contact is 1 (our algorithm)]
{\label{fig:bin_preload}\includegraphics[width=0.45\linewidth]{graphics/binary_search_preload.png}}
\subfigure[Slice through the three dimensional GWS for zero applied torque]
{\label{fig:GWS}\includegraphics[width=0.45\linewidth]{graphics/GWS.png}}
\caption{Grasp stability representations for the grasp in Fig.
\ref{fig:grasp2}. Our algorithm (a)(b) captures passive resistance to applied
forces of arbitrary magnitude in directions, that allow for balancing contact
forces to arise passively in response to the disturbance. The GWS
representation (c) shows the space of applied forces the grasp can resist with
contact forces that satisfy only friction constraints. We are using the L1
norm GWS, meaning the normal components of the contact forces sum to 1.}
\end{figure}
Now let us apply our framework to this problem: Using our algorithm, we can
test the resistance of this grasp to forces in the plane. We do this by
discretizing the direction of application of force to the object and finding
the maximum resistible force in each direction using a binary search. Figs.
\ref{fig:bin_no_preload} \& \ref{fig:bin_preload} show the region of
resistible forces for a grasp without and with a preload respectively. As our
algorithm takes into account passive effects it correctly predicts that, in
both cases, forces with non-positive component in the y-axis and arbitrary
magnitude can be withstood. Indeed, without preloading the grasp for any
applied force $\bm{w}=(0,w_y,0), w_y \leq 0$ our framework predicts contact
forces $(0,0)$ at contacts 1 and 3, and contact force $(-w_y,0)$ at contact 2
(see Table \ref{tab:three_contact}). Furthermore, it captures the necessity of
a preload in order to resist forces with positive component in the
y-direction: For $w_y > 0$ our algorithm finds no solution, and hence the
grasp must be unstable to this disturbance, unless an appropriate preload is
applied.
We can compare our results to those obtained with compliance based approaches
\cite{CUTKOSKY_COMPLIANCE}\hspace{0pt}\cite{BICCHI93}\hspace{0pt}\cite{BICCHI94}\hspace{0pt}\cite{BICCHI95}\hspace{0pt}\cite{PRATTICHIZZO97},
which are commonly used to predict contact forces that arise in grasps due to
disturbances. We can now use this grasp (Fig. \ref{fig:grasp2}) and our
algorithm to show that even with the improvements to a linear compliance
suggested by Prattichizzo et al.~\cite{PRATTICHIZZO97} resulting stability
estimates are overly conservative. Their approach allows each contact to be
in one of three states: rolling, slipping or detached. A slipping contact may
not apply any frictional forces, while a detached contact may not apply any
force at all. If we try every possible combination of states and modify the
compliance of the grasp accordingly, this alleviates some of the problems of
the purely linear compliance approach: If we consider contacts 1 \& 3 to be
slipping, our grasp in Fig. \ref{fig:grasp2} may now withstand arbitrary
forces, where $w_y \leq 0$.
This approach, however, does not allow us to arrive at the correct result in
cases where $w_y \geq 0$. Consider the preloaded grasp before the application
of an external wrench (Table \ref{tab:three_contact}.) The contact forces on
both contacts 1 \& 3 must lie on the friction cone edge in order to balance
the preload applied by contact 2. If we now apply an external wrench
$\bm{w}=(0,1,0)$, there exists no combination of rolling, slipping and
detached contacts (and corresponding modifications of the linear compliance)
that results in legal contact forces. Our algorithm, however, predicts a
stable grasp (Table \ref{tab:three_contact}), showing how important friction
is for grasp stability and why a correct treatment of friction is fundamental
to stability analysis. Furthermore, we have arrived at this result in
polynomial time --- we did not have to consider exponentially many slip
states, as in~\cite{PRATTICHIZZO97}.
\begin{table}[!t]
\centering
\begin{tabular}{l|l|l|lll|l}
$\bm{w}$ & $P$ & Stable & $\bm{c}_1$ & $\bm{c}_2$ & $\bm{c}_3$ & $\bm{r}$ \\
\hline
$(0, 0, 0)$ & 0 & Yes & $(0,0)$ & $(0,0)$ & $(0,0)$ & $(0,0,0)$ \\
$(0, 0, 0)$ & 1 & Yes & $(1,-0.5)$ & $(1,0)$ & $(1,0.5)$ & $(0,0,0)$ \\
$(0, -1, 0)$ & 0 & Yes & $(0,0)$ & $(1,0)$ & $(0,0)$ & $(0,-1,0)$ \\
$(0, -2, 0)$ & 0 & Yes & $(0,0)$ & $(2,0)$ & $(0,0)$ & $(0,-2,0)$ \\
$(0, 1, 0)$ & 0 & No & --- & --- & --- & --- \\
$(0, 1, 0)$ & 1 & Yes & $(1,-0.5)$ & $(0,0)$ & $(1,0.5)$ & $(0,1,0)$ \\
$(0, 1.1, 0)$ & 1 & No & --- & --- & --- & --- \\
\end{tabular}
\caption{Contact forces $\bm{c}_i=(c_{i,n},c_{i,t})$ and (virtual) object
motion $\bm{r}=(x,y,r)$ for the grasp in Fig. \ref{fig:grasp2} and a range of
applied wrenches $\bm{w}=(w_x,w_y,w_z)$. The preload $P$ is such that the
normal force at each contact is equal to either 0 or 1 before any wrench is
applied. The object motion and applied wrenches are expressed in the
coordinate frame shown in Fig. \ref{fig:grasp2} and contact forces are
expressed in frames as shown in Fig. \ref{fig:detail}.}
\label{tab:three_contact}
\end{table}
\begin{table}[!t]
\centering
\begin{tabular}{l|lllllllll}
$m$ & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
\hline
$\#(\mathbb{S})$ & 10 & 26 & 50 & 82 & 122 & 170 & 226 & 290 \\
\hline
$time (s)$ & 0.006 & 0.02 & 0.09 & 0.42 & 1.5 & 4.8 & 13.8 & 35.7 \\
\end{tabular}
\caption{Number of slip states $\#(\mathbb{S})$ and computation time for
grasps with $m$ randomly generated contacts.}
\label{tab:performance}
\end{table}
From a computational effort perspective, a summary of the performance of our
algorithm for enumeration of slip states can be found in Table
\ref{tab:performance}. All computation was performed on a commodity computer
with a 2.80GHz Inter Core i7 processor.
\section{Discussion}\label{sec:2d_furtherwork}
In this Chapter we have described an algorithm that can test the stability of
a rigid planar grasp when a given disturbance wrench is applied to the grasped
object. We propose modeling the contact normal forces through constitutive
relations while maintaining accurate friction constraints. In order to apply
this model we must distinguish between rolling, slipping and detaching
contacts. We have shown that the number of combinations of contact states that
are possible under rigid body motions is quadratic in the number of contacts
and provide a polynomial time algorithm to enumerate all such combinations.
As has been noted in Chapter~\ref{sec:state_number} the insight that the
number of contact slip state combinations between two rigid bodies in contact
is quadratic in the number of contacts is not
new~\cite{Brost1989a}\cite{MASON_MANIPULATION}. However, we have shown that
this remains valid when introducing compliance at the contact normals, as is
required to efficiently test for stability. Our novel algorithm for the
polynomial-time enumeration of contact state combinations also enables the
analysis of grasps that are preloaded before the application of an external
wrench.
A limitation of the work presented above is that we defined a grasp preload in
terms of the contact normal forces present before the application of an
external wrench to the object. In practice, preloads are achieved by setting
actuator commands. Thus, defining preloads in terms of joint torques for
instance is of perhaps greater practical use as it would allow us to use our
framework as a tool in computing appropriate actuator commands for a given
task.
The required treatment of the kinematics of the hand means we must take into
account not only the motion of the grasped object but also of the links making
up the hand. Our algorithm can be extended to such multi-body systems, which
would allow us to study the stability of multiple objects or objects grasped
by hands with multiple links and torques applied at the joints. The
constraints that describe such systems involve the motion of multiple objects
and thus more motion variables than the three dimensional object motion we
consider in the above treatment. Therefore the planes describing the
constraints become higher dimensional hyperplanes. However, much of the
theory in Chapter~\ref{sec:state_number}, specifically Zaslavski's formula
remains valid for such arrangements of hyperplanes:
For a given number of objects the number of contact state combinations remain
polynomial in the number of contacts. However, the number of contact state
combinations is exponential in the number of bodies. The enumeration of the
faces of the arrangement that correspond to sets of contact conditions is more
involved but arrangement of hyperplanes are well studied in the field of
computational geometry and efficient algorithms are available for the solution
of such problems~\cite{10.5555/2408018}.
The exponential growth of the number of possible contact state combinations
with the number of bodies involved is a well known problem in the rigid body
dynamics community. In fact, many researchers have independently shown that
the underlying complementarity problems are NP-hard (see
Chapter~\ref{sec:related_dynamics}.) A further complication of these
complementarity approaches is that, in order to determine stability, one has
to show that \textit{every} solution to the dynamics equations is stable. Due
to the possibility of multiple solutions to the complementarity problem with
different contact state combinations this means that unfortunately the only
way to ensure stability is to check all possible combinations.
An approach to multi rigid body problems that instead uses our normal force
compliance model would suffer from the same worst-case exponential complexity
due to an exponential number of contact state combinations. However, in our
model finding a single solution is sufficient to conclude grasp stability and
thus the computational burden is reversed: You only have to check all
combinations to be able to conclude that a grasp is \textit{not} stable by
checking that none of them have a solution.
Finally, we want to discuss the perhaps most significant limitation in that
this work is only applicable to planar grasps. Unfortunately the key insight
that allowed us to formulate an efficient solution to passive stability
problems does not directly translate to spacial grasps: In 3D the directions a
contact can slip in are no longer discrete and finite. A contact can slide in
an infinite number of directions and hence we cannot break the treatment of
sliding contacts into separate piecewise linear problems as we did above.
However, we were pleased to see that Huang et al.~\cite{Huang2020} adopted an
approach based on arrangements of planes and developed an algorithm for the
enumeration of slip states in three dimensions. They approach the problem of
infinite sliding directions by discretizing the tangent plane into sectors of
equal angles. Thus, sliding states are defined in terms of which sector
contains the tangent velocity.
Despite these limitations, our treatment of the special planar case has proven
to be a valuable first step towards modeling the passive characteristics of
general grasps, which we will investigate in the following chapters.
|
\section{Introduction}
Let $\zeta(s)$ be the Riemann zeta-function. In this paper we are interested in its log-derivative
$$
\dfrac{\zeta'}{\zeta}(s) = \sum_{n\geq 1} \dfrac{\Lambda(n)}{n^{s}} \quad ({\rm Re}\, s>1)
$$
and its growth behaviour in the strip $1/2<{\rm Re}\, s < 1$ (above $\Lambda(n)$ is the von Mangoldt function). Let $\rho$ denote the zeros of $\zeta(s)$ in the critical strip. The Riemann hypothesis (RH) states that the zeros are aligned: $\rho=\tfrac12+i\gamma$ with $\gamma\in\mathbb{R}$. Assuming RH, a classical estimate for the log-derivative of $\zeta(s)$ (see \cite[Theorem 14.5]{Tit}) establishes that
\begin{equation} \label{classicalresult}
\dfrac{\zeta'}{\zeta}(\sigma+it)=O\big((\log t)^{2-2\sigma}\big),
\end{equation}
uniformly in $\tfrac12+\delta\leq \sigma\leq 1-\delta$, for any fixed $\delta>0$. The purpose of this paper is to establish this bound in explicit form.
\begin{theorem}\label{thm:0}
Assume RH. Then
\begin{align} \label{main}
\bigg|\dfrac{\zeta'}{\zeta}(\sigma+it)\bigg|\leq \frac{B_\sigma}{\sigma(1-\sigma)} (\log t)^{2-2\sigma} + O\bigg(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2\log\log t}\bigg),\end{align}
uniformly in the range
\begin{align} \label{range}
\dfrac{1}{2}+\dfrac{\lambda_0+c}{\log\log t}\leq \sigma\leq 1 - \frac{c}{\sqrt{\log \log t}} \quad \text{and} \quad t\geq 3,
\end{align}
for any fixed small $c>0$, where $\lambda_0=0.771\ldots$ is such that $2\lambda_0 \tanh(\lambda_0)=1$ and
$$
B_\sigma =\sqrt{\frac{(3\sigma^4-17\sigma^3+19\sigma^2+4\sigma-4)(-\sigma^2+3\sigma-1)}{\sigma(2-\sigma)}}.
$$
In particular
$$
\bigg|\dfrac{\zeta'}{\zeta}(\sigma+it)\bigg|\leq \left(\frac{B_\sigma}{\sigma(1-\sigma)} +o(1)\right)(\log t)^{2-2\sigma}, \quad \text{for} \quad \tfrac12+\delta \leq \sigma \leq 1-\delta.
$$
\end{theorem}
We believe that $\lambda_0$ is simply a by-product of our proof, although it is curious that such a number appears. It turns out that when $(\sigma-1/2)\log\log t$ is too small, our main technique delivers a bound of the form ${A_\sigma}{ (\log t )}/{\log \log t} $, however the calculations are lengthy and convoluted, and this it not the purpose of this note. Moreover, a conjecture of Ki \cite{Ki}, related to the distribution of the zeros of $\zeta'(s)$, states that the bound $O((\log t)^{2-2\sigma} )$ still holds in the range $\sigma \geq 1/2+c/\log t$, but this lies outside of what this technique can accomplish. Theorem \ref{thm:0} is derived by combining Theorem \ref{theorem1} and estimates for the real part of the log-derivative of $\zeta(s)$ obtained in \cite[Theorem 2]{CChiM}:
$$
\left|{\rm Re}\, \dfrac{\zeta'}{\zeta}(\sigma+it)\right| \leq \bigg(\dfrac{-\sigma^2 + 3\sigma - 1}{\sigma(1-\sigma)}\bigg) (\log t)^{2-2\sigma} + O\left(\frac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2\log \log t}\right),
$$
uniformly in the range \eqref{range} (in fact $\lambda_0+c$ can be replaced by just $c$).
\begin{theorem} \label{theorem1}
Assume RH. Then
$$
\left| {\rm Im}\,\dfrac{\zeta'}{\zeta}(\sigma+it) \right| \leq \frac{C_\sigma}{\sigma(1-\sigma)} (\log t)^{2-2\sigma} + O\bigg(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2\log\log t}\bigg),
$$
uniformly in the range \eqref{range}, where
$$
C_\sigma=\sqrt{\frac{2(-\sigma^2 + 5\sigma - 2)(-\sigma^2 + 3\sigma - 1)(-\sigma^2 + \sigma + 1)}{\sigma(2-\sigma)}}.
$$
\end{theorem}
Theorem \ref{theorem1} is obtained using a known interpolation technique \cite[Section 6]{CChiM}. Essentially, to bound the asymptotic growth of ${\rm Im}\, \tfrac{\zeta'}{\zeta}(s)$ one can bound instead its primitive $\log |\zeta(s)|$ (see \cite[Theorems ~1 and ~2]{CC}) and its derivative (Theorem \ref{maintheorem}).
\smallskip
\begin{theorem} \label{maintheorem}
Assume RH . Then
\begin{equation} \label{second_result}
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)\leq \bigg(\dfrac{-2\sigma^2+2\sigma+2}{\sigma(1-\sigma)}\bigg)\log\log t\,(\log t)^{2-2\sigma}+O\bigg(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2}\bigg),
\end{equation}
and
\begin{equation}
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)\geq -\bigg(\dfrac{-2\sigma^2+6\sigma-2}{\sigma(1-\sigma)}\bigg)\log\log t\,(\log t)^{2-2\sigma}+O\bigg(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2}\bigg),
\end{equation}
uniformly in the range
\begin{align} \label{range2}
\dfrac{1}{2}+\dfrac{\lambda_0}{\log\log t}\leq \sigma\leq 1 - \frac{c}{\sqrt{\log \log t}} \quad \text{and} \quad t\geq 3,
\end{align}
for any fixed $c>0$.
\end{theorem}
\smallskip
The main technique to prove these theorems revolves in bounding a certain sum over the ordinates of zeta-zeros
$$
\sum_{\gamma} f(\gamma-t),
$$
where $f$ is some explicit real function that varies according to the problem of study. The key idea is to replace $f$ by explicit bandlimited majorants and minorants that are in turn admissible for the Guinand-Weil explicit formula (Proposition \ref{GW}). From there estimating the sum is usually easier. This bandlimited approximation idea originates in the works of Beurling and Selberg (see \cite[Introduction]{V}), and was first employed in this form by Goldston and Gonek \cite{GG}, and Chandee and Soundararajan \cite{CS}, but many others after them (see \cite{CC, CCM, CChi, CChiM, Chi} to name a few). In our specific case, $f=f_a$ as in \eqref{fa}, which has \emph{zero mass} and therefore is not in the scope of the machinery developed in \cite{CLV}, nor its close relatives (the constructions in \cite{CLV} are regarded as the most general thus far and have been used widely). Nevertheless, we are able to overcome this difficulty with a very simple optimal construction which, in the majorant case, requires some basic results in the theory of de Branges spaces.
We recall that, without assuming RH, explicit bounds for $\tfrac{\zeta'}{\zeta}(s)$ are given by Trudgian \cite{Trudgian} in a zero-free region for $\zeta(s)$.
\smallskip
\section{Lemmata}
For a given $a>0$ we let
\begin{align}\label{fa}
f_{a}(x)=\dfrac{x^2-a^2}{\big(x^2+a^2\big)^2}.
\end{align}
\begin{lemma}[Representation lemma]\label{Rep_lem}
Assume RH. We have
\begin{equation*
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)= \sum_\gamma f_{\sigma-1/2}(\gamma-t) + O\left(\dfrac{1}{t^2}\right),
\end{equation*}
for $\tfrac12 < \sigma \leq 1$ and $t\geq 3$, where the above sum runs over the ordinates of the non-trivial zeros $\rho = \tfrac12 + i \gamma$ of $\zeta(s)$.
\end{lemma}
\begin{proof}
Let $s=\sigma+it$ and $t \geq 3$. From the partial fraction decomposition for $\zeta'(s)/\zeta(s)$ (cf. \cite[Eq. 2.12.7]{Tit}), we have
\begin{align}\label{partial_fraction_dec}
\dfrac{\zeta'}{\zeta}(s) & = \displaystyle\sum_{\rho}\bigg(\dfrac{1}{s-\rho}+\frac{1}{\rho}\bigg)-\dfrac{1}{2}\dfrac{\Gamma'}{\Gamma}\bigg(\dfrac{s}{2}+1\bigg)+B+\frac{1}{2}\log\pi - \frac{1}{s-1},
\end{align}
with $B=-\sum_{\rho}{\rm Re}\,(1/\rho)$. Differentiating and taking its real part we get
$$
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)= \sum_{\gamma}f_{\sigma-1/2}(\gamma-t)-\dfrac{1}{4}\,{\rm Re}\,\bigg(\dfrac{\Gamma'}{\Gamma}\bigg)'\Big(\dfrac{\sigma}{2}+1+\dfrac{it}{2}\Big)+O\left(\frac{1}{t^2}\right).
$$
Using Stirling's formula, that guarantees the $\Gamma$ term is $O(1/t^2)$, we conclude.
\end{proof}
\smallskip
As always, the crucial tool to work with sums as in Lemma \ref{Rep_lem} is the Guinand-Weil explicit formula (see \cite[Lemma 8]{CChiM}), which for even functions reads as follows.
\begin{proposition}[Guinand-Weil explicit formula] \label{GW}
Let $h(s)$ be analytic in the strip $|{\rm Im}\,{s}|\leq \tfrac12+\varepsilon$, for some $\varepsilon>0$, such that $|h(s)|\ll(1+|s|)^{-(1+\delta)}$, for some $\delta>0$. Assume further that $h$ is even. Then
\begin{align*}
\displaystyle\sum_{\rho}h\left(\frac{\rho-\frac12}{i}\right) & = \dfrac{1}{2\pi}\int_{-\infty}^{\infty}h(u)\,{\rm Re}\,{\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right)}\,\text{\rm d}u + 2\, h\left(\dfrac{i}{2}\right)-\dfrac{\log \pi}{2\pi}\widehat{h}(0) \\ & \, \quad -\dfrac{1}{\pi}\displaystyle\sum_{n\geq2}\dfrac{\Lambda(n)}{\sqrt{n}}\widehat{h}\left(\dfrac{\log n}{2\pi}\right),
\end{align*}
where $\rho = \beta + i \gamma$ are the non-trivial zeros of $\zeta(s)$ and
$$
\widehat{h}(y) = \int_{-\infty}^\infty h(x)e^{-2\pi i x y} \d x
$$
is the Fourier transform\footnote{We shall use this definition of the Fourier transform throughout the paper.} of $h$.
\end{proposition}
\subsection{Bandlimited approximations}
\begin{lemma}[Minorant]\label{lemma:min} For $a,\Delta>0$ let
\begin{equation}\label{Explicit_expression_min}
L_{a,\Delta}(z) = \dfrac{z^2-a^2 - (Az^2+Ba^2)\sin^2(\pi\Delta z)}{(z^2+a^2)^2}
\end{equation}
where
\begin{align*}
A = \dfrac{2\lambda \coth(\lambda)-1}{\sinh^2(\lambda)}, \quad B = \dfrac{2\lambda\coth(\lambda)+1}{\sinh^2(\lambda)},
\end{align*}
and $\lambda=\pi a \Delta$. Then:
\begin{enumerate}
\item The inequality
$$L_{a,\Delta}(x) \leq f_{a}(x)$$
holds for all real $x$, $L_{a,\Delta}\in L^1(\mathbb{R})$ and its Fourier transform is supported in $[-\Delta,\Delta]$ (i.e. $L_{a,\mc{D}}$ is of exponential type at most $2\pi \Delta$);
\smallskip
\item We have
\begin{equation}\label{Poisson_intL}
\widehat L_{a,\Delta}(0) = \frac{1}{\Delta}\sum_{n \in \mathbb{Z}}f_a(n/\Delta) = -\frac{\pi^2 \Delta}{\sinh^2(\pi a \Delta)},
\end{equation}
and any other function $F\neq L_{a,\Delta}$ having the same properties as $L_{a,\Delta}$ in item $(1)$ has integral strictly less than the integral of $L_{a,\Delta}$.
\end{enumerate}
\end{lemma}
\begin{proof}
Note first that the constants $A,B$ were chosen so the numerator of $L_{a,\Delta}$ vanishes doubly at $z=\pm i a$. We then see that $L_{a,\Delta}$ is entire, of exponential type at most $2\pi \Delta$ and belongs to $L^1(\mathbb{R})$. Therefore, the Paley-Wiener Theorem guarantees its Fourier transform is supported in $[-\mc{D},\mc{D}]$. Since $B>A>0$ we have $L_{a,\Delta}(x)\leq f_a(x)$ for all real $x$. This proves item $(1)$. We now prove item $(2)$. Suppose $F$ is an $L^1(\mathbb{R})$-function, $F(x)\leq f_a(x)$ for all real $x$ and $\widehat F$ is supported in $[-\mc{D},\mc{D}]$. Poisson summation implies
$$
\widehat F(0) = \frac{1}{\mc{D}} \sum_{n\in\mathbb{Z}} F(n/\mc{D}) \leq \frac{1}{\mc{D}} \sum_{n\in\mathbb{Z}} f_a(n/\mc{D}) = \frac{1}{\mc{D}} \sum_{n\in\mathbb{Z}} L_a(n/\mc{D})=\widehat L_{a,\mc{D}}(0),
$$
where the last identity is due to the fact that $L_{a,\Delta}$ interpolates (in second order) $f_a$ in $\tfrac{1}{\mc{D}}\mathbb{Z}$. Equality is attained if and only if $F(x)=L_{a,\mc{D}}(x)$ in second order for all $x\in \tfrac{1}{\mc{D}}\mathbb{Z}$. However, this completely characterizes $F=L_{a,\mc{D}}$ (see \cite[Theorem 9]{V}). Finally, using that $\widehat f_a(y)=-2\pi^2|y|e^{-2\pi a |y|}$, identity \eqref{Poisson_intL} can easily be derived using Poisson summation over $\tfrac{1}{\mc{D}}\mathbb{Z}$.
\end{proof}
It turns out that because $f_a(x)$ has a local maximum at $x=\sqrt{3}\,a$, the bandlimited majorant of $f_a$ with minimal total mass will have to be adjusted when $\pi a \Delta$ is small. This adjustment will require some de Branges spaces theory.
\begin{lemma}[Majorant]\label{lemma:maj}
For $a,\Delta>0$ let
\begin{equation}\label{Explicit_expression_maj}
U_{a,\Delta}(z)= \dfrac{z^2-a^2 + (Cz^2+Da^2)(\cos(\pi\Delta z)- E \pi \Delta z \sin(\pi \Delta z))^2}{(z^2+a^2)^2},
\end{equation}
where
\begin{align*}
(C,D,E) =\begin{cases} \quad \quad \ \ \bigg(\dfrac{2\lambda \tanh(\lambda)-1}{\cosh^2(\lambda)}, \dfrac{2\lambda\tanh(\lambda)+1}{\cosh^2(\lambda)}, 0 \bigg) & \ \text{if } \lambda \geq \lambda_0, \vspace{3mm} \\ \bigg( 0,\dfrac{1}{2} \left(\dfrac{ 2\lambda +\tanh(\lambda)}{\sinh(\lambda)+\lambda \, {\rm sech}(\lambda)}\right)^2 , \dfrac{1-2\lambda \tanh(\lambda)}{2\lambda^2+ \lambda \tanh(\lambda)}\bigg) & \ \text{if } \lambda < \lambda_0, \end{cases}
\end{align*}
$\lambda=\pi a \Delta$ and $\lambda_0=0.771\ldots$ is such that $2\lambda_0 \tanh(\lambda_0)=1$. Then:
\begin{enumerate}
\item The inequality
$$f_{a}(x)\leq U_{a,\Delta}(x)$$
holds for all real $x$, $U_{a,\Delta}\in L^1(\mathbb{R})$ and its Fourier transform is supported in $[-\Delta,\Delta]$ (i.e. $U_{a,\mc{D}}$ is of exponential type at most $2\pi \Delta$);
\smallskip
\item We have
\begin{equation}\label{Poisson_int2case1}
\widehat U_{a,\Delta}(0) = \begin{cases}\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \dfrac{\pi^2 \mc{D}}{\cosh^2(\lambda )} & \text{if } \lambda \geq \lambda_0, \vspace{2mm} \\ \dfrac{\pi^2 \mc{D}}{\sinh^2(\lambda)}\left( \dfrac{2\lambda+\sinh(2\lambda)}{8\lambda}\left(\dfrac{ 2\lambda +\tanh(\lambda)}{\sinh(\lambda)+\lambda \, {\rm sech}(\lambda)}\right)^2-1\right) & \text{if } \lambda < \lambda_0. \end{cases}
\end{equation}
Moreover, any other function $F\neq U_{a,\Delta}$ having the same properties as $U_{a,\Delta}$ in item $(1)$ has integral strictly greater than the integral of $U_{a,\Delta}$.
\end{enumerate}
\end{lemma}
\begin{proof}
Note that the constants $(C,D,E)$ are chosen so that $U_{a,\Delta}$ is entire, that is, its numerator vanishes doubly at $z=\pm i a$. Since $U_{a,\Delta}$ is visibly of exponential type at most $2\pi \Delta$ and belongs to $L^1(\mathbb{R})$, the Paley-Wiener Theorem guarantees its Fourier transform is supported in $[-\mc{D},\mc{D}]$. Noting that $C,D \geq 0$ we have $f_a(x)\leq U_{a,\mc{D}}(x)$ for all real $x$, and this proves item $(1)$. We now show item $(2)$. Suppose $F$ is an $L^1(\mathbb{R})$-function, $F(x)\geq f_a(x)$ for all real $x$ and $\widehat F$ is supported in $[-\mc{D},\mc{D}]$. We now apply the generalized Poisson summation formula of Littmann for bandlimited functions \cite[Theorem 2.1]{Litt} for $\gamma=(\pi E)^{-1}$ with $E>0$. It translates to
\begin{align*}
\widehat F(0) & = \frac{1}{\Delta}\sum_{\mc{B}(t)=0} \biggl( 1-\frac{\pi E}{\pi(\pi^2 E^2t^2+1)+\pi E} \biggr)F(t/\Delta) \\ & \geq \frac{1}{\Delta}\sum_{\mc{B}(t)=0} \biggl( 1-\frac{\pi E}{\pi(\pi^2 E^2t^2+1)+\pi E} \biggr)f_a(t/\Delta) \\ & = \frac{1}{\Delta}\sum_{\mc{B}(t)=0} \biggl( 1-\frac{\pi E}{\pi(\pi^2 E^2t^2+1)+\pi E} \biggr)U_{a,\mc{D}}(t/\Delta) \\ & = \widehat U_{a,\mc{D}}(0),
\end{align*}
where $\mc{B}(z)=\cos(\pi z)- E \pi z \sin(\pi z)$. Note when $E=0$, that is, $\lambda\geq \lambda_0$, this is the classical Poisson summation over $\tfrac1{\mc{D}}(\tfrac12+\mathbb{Z})$. Equality is attained if and only if $F(t/\mc{D})=U_{a,\mc{D}}(t/\mc{D})$ in second order for all real $t$ with $\mc{B}(t)=0$. We claim this completely characterizes $F=U_{a,\mc{D}}$. The trick is to use the theory of de Branges spaces and the interpolation formula \cite[Theorem A]{GL} (the introduction of \cite{GL} gives a solid short background on the necessary de Branges spaces theory which we will use here without much explanation). First we note that the function $\mc{E}(z)=(i+\pi E z) e^{-\pi i z}$ is of Hermite-Biehler class (i.e. $|\mc{E}(\overline z)|<|\mc{E}(z)|$ for all $z$ with ${\rm Im}\, z>0$) and therefore the de Branges space $\H(\mc{E}^2)$ exists, and it consists of all entire functions of exponential type at most $2\pi$ belonging to $L^2(\mathbb{R},\text{\rm d}x/(1+E^2 \pi ^2 x^2))$. Note also that $\mc{B}(z)=i(\overline{\mc{E}(\overline z)}-\mc{E}(z))/2$. Moreover, it is not hard to show that all conditions of \cite[Theorem A]{GL} are satisfied by $\mc{E}(z)$, and thus we conclude that any function $G\in \H(\mc{E}^2)$ is completely characterized by its values $G(t)$ and $G'(t)$ for all real $t$ with $\mc{B}(t)=0$. Now it is simply a matter to note that $(i+\pi E z)^2F(z/\mc{D})$ and $(i+\pi E z)^2 U_{a,\mc{D}}(z/\mc{D})$ both belong to $\H(\mc{E}^2)$, and so they must be equal\footnote{Note when $E=0$ this argument reduces to classical Paley-Wiener space theory and Poisson summation.}.
Finally, in the case $\lambda\geq \lambda_0$ one can use Poisson summation over $\tfrac1{\mc{D}}(\tfrac12+\mathbb{Z})$ to evaluate the integral of $U_{a,\mc{D}}$ and obtain
$$
\widehat U_{a,\mc{D}}(0) = \frac{\pi^2 \Delta}{\cosh^2(\pi a \Delta)}.
$$
If $\lambda< \lambda_0$ then we can use Poisson summation over $\tfrac{1}{\mc{D}}\mathbb{Z}$ to obtain
\begin{align*}
\widehat U_{a,\mc{D}}(0) & = \frac{1}{\mc{D}}\sum_{n\in \mathbb{Z}} \left( f_a(n/\mc{D}) + \frac{Da^2}{(n^2/\mc{D}^2+a^2)^2}\right) \\
& = -2\pi^2 \mc{D} \sum_{n\in \mathbb{Z}} |n|e^{-2\lambda |n|} + D\pi^2\Delta \sum_{n\in\mathbb{Z}} (|n|+\tfrac{1}{2\lambda})e^{-2\lambda |n|} \\ & = -\frac{\pi^2 \Delta}{\sinh^2(\lambda)} + D\pi^2\Delta \frac{2\lambda+\sinh(2\lambda)}{4\lambda \sinh^2(\lambda)} \\
& = \dfrac{\pi^2 \mc{D}}{\sinh^2(\lambda)}\left( \frac{2\lambda+\sinh(2\lambda)}{8\lambda}\left(\dfrac{ 2\lambda +\tanh(\lambda)}{\sinh(\lambda)+\lambda \, {\rm sech}(\lambda)}\right)^2-1\right).
\end{align*}
Above we used that $\widehat f_a(y)=-2\pi^2|y|e^{-2\pi a |y|}$ and the Fourier transform of $\tfrac{a^2}{(x^2+a^2)^2}$ is
${\pi^2}\left(|y|+\frac{1}{2\pi a}\right)e^{-2\pi a |y|}$.
\end{proof}
\begin{lemma}\label{lemma:majminbounds}
The functions defined in Lemmas \ref{lemma:min} and \ref{lemma:maj} satisfy the following inequalities for $-\Delta < y < \Delta$:
$$
\widehat L_{a,\Delta}(y) < 0
$$
and, if $\pi a \mc{D}\geq \lambda_0$,
$$
\widehat U_{a,\Delta}(y) > \widehat f_a(y).
$$
\end{lemma}
\begin{proof}
First we deal with the minorant. Using that $\widehat f_a(y)=-2\pi^2|y|e^{-2\pi a |y|}$ and the Fourier transforms of $\tfrac{1}{x^2+a^2}$ and $\tfrac{a^2}{(x^2+a^2)^2}$ are
$$
\frac{\pi}{a} e^{-2\pi a|y|} \quad \text{and} \quad {\pi^2}\biggl(|y|+\frac{1}{2\pi a}\biggr)e^{-2\pi a |y|},
$$
respectively, we obtain
\begin{align*}
\widehat L_{a,\Delta}(y) =-2\pi^2|y|e^{-2\pi a |y|} - \frac{2\,{\rm Id}-T_\mc{D} - T_{-\mc{D}}}{4}\bigg[\pi^2\bigg(\frac{B+A}{2\pi a} + (B-A)|y|\bigg)e^{-2\pi a |y|}\bigg],
\end{align*}
where $T_{h}$ is the operator of translation by $h$ and ${\rm Id}$ is the identity operator. These operators come from the (distributional) Fourier transform of $\sin^2(\pi \mc{D} x)$. We claim that the function $e^{2\pi a y}\widehat L_{a,\Delta}(y) $ is convex in the range $0<y<\Delta$, which would show that $\widehat L_{a,\Delta}(y)$ is negative in the same range since it is negative at $y=0$ and vanishes at $y=\Delta$. For $0<y<\mc{D}$ we have
\begin{align*}
\frac{\d^2}{\d y^2} \left[e^{2\pi a y}\widehat L_{a,\Delta}(y) \right]
& =\frac{\d^2}{\d y^2} \left[\frac{\pi^2}4\left(\frac{B+A}{2\pi a} + { (B-A)(\mc{D}-y)}\right)e^{2\pi a (2y-\mc{D})} + \text{linear}\right] \\
& =\left( A + { \pi a(B-A)(\mc{D}-y)}\right)4a\pi^3 e^{2\pi a (2y-\mc{D})} \\ & > 0,
\end{align*}
because $B>A>0$. The majorant case is simpler, since if $\lambda=\pi a \mc{D} \geq \lambda_0$ a similar computation leads to
\begin{align*}
\widehat U_{a,\Delta}(y) =-2\pi^2|y|e^{-2\pi a |y|} + \frac{2\,{\rm Id}+T_\mc{D} +T_{-\mc{D}}}{4}\bigg[\pi^2\bigg(\frac{C+D}{2\pi a} + (D-C)|y|\bigg)e^{-2\pi a |y|}\bigg],
\end{align*}
and so the desired inequality follows because $D>C\geq0$.
\end{proof}
\section{Proof of Theorem \ref{maintheorem}} Let $\tfrac12<\sigma<1 $ and $\Delta>0$. Throughout the rest of the paper we set $a=\sigma-\tfrac12$ and $\lambda=\pi a \mc{D}$. Using Lemma \ref{Rep_lem} and the evenness of the zeta-zeros we obtain
\begin{align*}
{\rm Re}\, \bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it) = \sum_{\gamma} \left(\tfrac12 f_a(\gamma-t) + \tfrac12 f_a(\gamma+t) +f_a(\gamma)\right) + O(1),
\end{align*}
as $t\to \infty$, where we have used that $f_a(x) = O(1/x^2)$ uniformly for $|x| \geq 1 $ and $0< a < 1/2$, hence $\sum_{\gamma} f_a(\gamma)=O(1)$. We then apply Lemmas \ref{lemma:min} and \ref{lemma:maj} to get
\begin{align}\label{Poisson_before_app_GW} \displaystyle
& \sum_{\gamma}M_t L_{a,\Delta}(\gamma) + O(1) \leq {\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)
\leq \sum_{\gamma}M_t U_{a,\Delta}(\gamma) + O(1),
\end{align}
where $M_t=\tfrac12 T_{t} +\tfrac12 T_{-t} + {\rm Id}$. Note that for each $t\geq 0$ the functions $M_t L_{a,\Delta}$ and $M_t U_{a,\Delta}$ are even and admissible for the Guinand-Weil explicit formula (Proposition \ref{GW}). We use the operator $M_t$ because its Fourier transform is the operator that multiplies by $2\cos^2(\pi t x)$, which is nonnegative. This will allow us to simply discard (or easily bound) the sum over primes in the explicit formula.
\subsection{Proof of the lower bound}
Applying Proposition \ref{GW} and Lemmas \ref{lemma:min} and \ref{lemma:majminbounds} we obtain
\begin{align}\label{GW_applied_to_m}
\displaystyle\sum_{\gamma}M_t L_{a,\Delta}(\gamma) &= \dfrac{1}{2\pi}\int_{-\infty}^{\infty}M_t L_{a,\Delta}(u)\,{\rm Re}\,{\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right)}\,\text{\rm d}u + 2M_t L_{a,\Delta}\left(\dfrac{i}{2}\right)\\
& \,\,\quad
- \frac{2}{\pi}\sum_{n\geq 2}\dfrac{\Lambda(n)}{\sqrt{n}} \,\widehat L_{a,\Delta}\left(\dfrac{\log n}{2\pi}\right) \cos^2(\tfrac12 t \log n) -\dfrac{\log\pi }{\pi}\widehat L_{a,\Delta}(0) \\ &
\geq \dfrac{1}{2\pi}\int_{-\infty}^{\infty}M_t L_{a,\Delta}(u)\,{\rm Re}\,{\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right)}\,\text{\rm d}u + 2M_t L_{a,\Delta}\left(\dfrac{i}{2}\right).
\end{align}
In this part we assume that $\lambda\geq c$ for some given fixed $c>0$. We now analyze the terms on the right-hand side above. The function $L_{a,\Delta}$ depends on the parameters $A$ and $B$, but both behave like (since $\lambda\geq c$)
$$
8\lambda e^{-2\lambda}+O(e^{-2\lambda}).
$$
Hence $|L_{a,\mc{D}}(x)| \leq K (x^2+a^2)^{-1}$ for some $K>0$. Since $(s^2+a^2)L_{a,\Delta}(s)$ has exponential type $2\pi \Delta$ and it is bounded on the real line, a routine application of the Phragm\'en–Lindel\"of principle implies that
\begin{align} \label{complexbound}
|L_{a,\Delta}(s)|\leq K \dfrac{e^{2\pi \mc{D} |{\rm Im}\, s|}}{|s^2+a^2|}, \quad s\in \mathbb{C}
\end{align}
(alternatively, one could derive such bound by direct computation). Using the bounds for $A$ and $B$ it follows that
\begin{align}
2\, M_t L_{a,\Delta}\left(\dfrac{i}{2}\right)=\dfrac{4\pi a\Delta e^{(1-2a)\pi\Delta}}{a^2-\frac{1}{4}}+O\left(\dfrac{e^{(1-2a)\pi\Delta}}{(a^2-\frac{1}{4})^2}+\dfrac{e^{\pi\Delta}}{t^2}\right).
\end{align}Using that $M_t$ is self-adjoint and applying Stirling's approximation to obtain
$$
M_t{\rm Re}\,\,\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right)=\log t + O(\log(2+|u|)),
$$
we deduce that
\begin{align}
\begin{split}
\dfrac{1}{2\pi}\int_{-\infty}^{\infty}M_t L_{a,\Delta}(u)\,{\rm Re}\,\,\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right) \text{\rm d}u
& = \dfrac{\pi\Delta\log t}{2\sinh^2(\pi a \Delta)} + O\left(\frac1a\right) \\
& = -2\pi \mc{D} e^{-2 \pi a \mc{D}} \log t + O\left(\tfrac1a+ \mc{D} e^{-4\pi a \mc{D}}\log t\right) \\
& = -2\pi \mc{D} e^{-2 \pi a \mc{D}} \log t + O\left(\frac{1+ e^{-2\pi a \mc{D}}\log t}{a}\right).
\end{split}
\end{align}
Combining the above bounds we obtain
\begin{align}
\begin{split}
\displaystyle\sum_{\gamma}M_tL_{a,\Delta}(\gamma-t)
& \geq -2\pi \mc{D} e^{-2 \pi a \mc{D}} \log t +\dfrac{4\pi a\Delta e^{(1-2a)\pi\Delta}}{a^2-\frac{1}{4}} \\
& \,\,\,\,\, \,\,+ O\bigg(\dfrac{e^{(1-2a)\pi\Delta}}{(a^2-\frac{1}{4})^2}+\dfrac{e^{\pi\Delta}}{t^2}+ \frac1a\left(1+ e^{-2\pi a \mc{D}}\log t\right)\bigg).
\end{split}
\end{align
Choosing $\pi\Delta=\log\log t$ (which is the optimal choice) and using \eqref{Poisson_before_app_GW} we obtain
\begin{equation}
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)\geq -\bigg(\dfrac{-2\sigma^2+6\sigma-2}{\sigma(1-\sigma)}\bigg)\log\log t\,(\log t)^{2-2\sigma}+{O_{c}\left(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2}\right)}
\end{equation}
for $\pi(\sigma-1/2)\log\log t\geq c$.
This proves {the desired result.}
\subsection{Proof of the upper bound} Using Proposition \ref{GW} and Lemma \ref{lemma:maj} we obtain
\begin{align}
\displaystyle\sum_{\gamma}M_t U_{a,\Delta}(\gamma) &\leq \dfrac{1}{2\pi}\int_{-\infty}^{\infty}M_t U_{a,\Delta}(u)\,{\rm Re}\,{\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right)}\,\text{\rm d}u + 2M_t U_{a,\Delta}\left(\dfrac{i}{2}\right)\\
& \,\quad - \frac{2}{\pi}\sum_{n\geq 2}\dfrac{\Lambda(n)}{\sqrt{n}} \,\widehat U_{a,\Delta}\left(\dfrac{\log n}{2\pi}\right) \cos^2 (\tfrac12 t \log n).
\end{align}
When $\lambda\geq \lambda_0$ the computations are very similar to the lower bound and we just indicate them here. We still have both $C$ and $D$ behaving like $8\lambda e^{-2\lambda}+O(e^{-2\lambda})$, and a bound similar to \eqref{complexbound} holds. Using Stirling's formula and Lemma \ref{lemma:maj} we get
\begin{align} \label{15_352}
\begin{split}
\dfrac{1}{2\pi}\int_{-\infty}^{\infty}M_t U_{a,\Delta}(u)\,{\rm Re}\,\,\dfrac{\Gamma'}{\Gamma}\left(\dfrac{1+2iu}{4}\right) \text{\rm d}u & = \dfrac{\pi\Delta\log t}{2\cosh^2(\pi a \Delta)} + O\left(\frac1a\right) \\
& = 2\pi \mc{D} e^{-2 \pi a \mc{D}} \log t + O\left(\frac{1+ e^{-2\pi a \mc{D}}\log t}{a}\right).
\end{split}
\end{align}
Using the estimates for $C$ and $D$ it follows that
\begin{align} \label{0_162}
2M_t U_{a,\Delta}\left(\dfrac{i}{2}\right)=\dfrac{4\pi a\Delta e^{(1-2a)\pi\Delta}}{a^2-\frac{1}{4}}+O\bigg(\dfrac{e^{(1-2a)\pi\Delta}}{(a^2-\frac{1}{4})^2}\bigg) + O\left(\dfrac{e^{\pi\Delta}}{t^2}\right).
\end{align}
Since $\widehat U_{a,\Delta}$ is supported in $[-\Delta, \Delta]$, we estimate the sum over primes (which we cannot discard as before) using Lemma \ref{lemma:majminbounds} and that $\widehat f_a(y)=-2\pi^2 |y|e^{-2\pi a|y|}$ to get
\begin{align}
-\frac{2}{\pi}\sum_{n\geq 2}\dfrac{\Lambda(n)}{\sqrt{n}} \,\widehat U_{a,\Delta}\left(\dfrac{\log n}{2\pi}\right) \cos^2(\tfrac12 t \log n) & \leq 2 \sum_{2\leq n\leq e^{2\pi\Delta}}\dfrac{\Lambda(n)}{{n^{a+1/2}}} \log n \\
& = \dfrac{4\pi \Delta e^{(1-2a)\pi\Delta}}{\frac{1}{2}-a}+O\bigg(\dfrac{e^{(1-2a)\pi\Delta}}{(\frac{1}{2}-a)^2}+\dfrac{\Delta^3}{a}\bigg).
\end{align}
The above estimate follows from the prime number theorem (see \cite[Eq. (B.2)]{CChiM}). Choosing $\pi\Delta=\log\log t$ and using \eqref{Poisson_before_app_GW} we obtain
\begin{align}
{\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it)
& \leq \bigg(\dfrac{-2\sigma^2+2\sigma+2}{\sigma(1-\sigma)}\bigg)\log\log t\,(\log t)^{2-2\sigma}+{O_{c}\bigg(\dfrac{(\log t)^{2-2\sigma}}{(\sigma-\tfrac12)(1-\sigma)^2}\bigg)}
\end{align}
in the range $(\sigma-1/2)\log\log t\geq\lambda_0$ and $(1-\sigma)\sqrt{\log\log t} \geq c$ for some fixed $c>0$; note that $\Delta^3=O_c\left({(1/2-a)^{-2} }{(\log t)^{1-2a}}\right)$. This finishes the proof. \qed
\section{Proof of Theorem \ref{theorem1}} To obtain the bounds for the imaginary part of the log-derivative $\zeta(s)$ we will employ the interpolation technique of \cite[Section 6]{CChiM} for functions with slow growth, which we conveniently state in the form of a lemma.
\begin{lemma}[Interpolation]\label{lem:interp}
Let $\varphi: (t_0,\infty) \to \mathbb{R}$ be twice differentiable, $t_0>0$, and assume that
$$
-\beta_0(t) \leq \varphi(t) \leq \alpha_0(t) \quad \text{and} \quad -\beta_2(t) \leq \varphi''(t) \leq \alpha_2(t),
$$
for some differentiable functions $\alpha_0,\beta_0,\alpha_2,\beta_2: (t_0,\infty) \to (0,\infty)$. Suppose the numbers
$$
L=\sup_{t>t_0} \, {\frac{2(\alpha_2(t)+\beta_2(t))(\alpha_0(t)+\beta_0(t))}{3\alpha_2(t)\beta_2(t)}},
$$
$$M_i=\displaystyle\sup_{t>t_0}|\alpha'_i(t)| \ \ \ \ \text {and} \ \ \ \ \ N_i=\displaystyle\sup_{t>t_0}|\beta'_i(t)| \quad \quad (i=0,2)
$$
are finite. Then, for $t>t_0+\sqrt{3L}$ we have
$$
|\varphi'(t)| \leq \sqrt{\frac{2\alpha_2(t)\beta_2(t)( \alpha_0(t)+\beta_0(t))}{\alpha_2(t)+\beta_2(t)}} + M_0+N_0+ (M_2+N_2)L.
$$
\end{lemma}
\begin{proof}
Since the bound is symmetric when we interchange $\alpha_0,\beta_0$ and $\alpha_2,\beta_2$ (i.e. we change $\varphi$ by $-\varphi$), it is enough to prove that $\varphi'(t)$ is bounded above by the desired bound. An application of the mean value theorem easily gives that\footnote{The notation $h_+$ means $\max(h,0)$.}
\begin{align}
\varphi'(t)- \varphi'(t-h) & = \varphi''(t^*)h \\ & \leq h_+ \alpha_2(t^*) + (-h)_+ \beta_2(t^*) \\ & \leq h_+ \alpha_2(t) + (-h)_+ \beta_2(t) + (M_2+N_2)|h|^2.`
\end{align}
Averaging in $h$ in the interval $[-\nu (1-A), \nu A]$, for some $\nu>0$ (with $t-\nu>t_0$) and $0<A<1$, we obtain
\begin{align*}
& \varphi'(t) \\ & \leq \tfrac1{\nu}(\varphi(t+(1-A)\nu) -\varphi(t-A\nu)) + \tfrac{\nu}{2}(A^2 \alpha_2(t) + (1-A)^2 \beta_2(t)) + \tfrac{\nu^2}3(M_2+N_2) \\
& \leq \tfrac1{\nu}(\alpha_0(t+(1-A)\nu) + \beta_0(t-A\nu)) + \tfrac{\nu}{2}( A^2 \alpha_2(t) + (1-A)^2 \beta_2(t)) + \tfrac{\nu^2}3(M_2+N_2)\\
&\leq \tfrac1{\nu}(\alpha_0(t) + \beta_0(t)) + \tfrac{\nu}{2}( A^2 \alpha_2(t) + (1-A)^2 \beta_2(t)) + M_0+N_0+ \tfrac{\nu^2}3(M_2+N_2).
\end{align*}
Minimizing the main term above as a function of $\nu$ and $A$, we must set
$$
\nu=\sqrt{\frac{2(\alpha_2(t)+\beta_2(t))(\alpha_0(t)+\beta_0(t))}{\alpha_2(t)\beta_2(t)}} \quad \text{and} \quad A=\frac{\beta_2(t)}{\alpha_2(t)+\beta_2(t)},
$$
which gives, for $t>t_0+\sqrt{3L}$, that
$$
\varphi'(t) \leq \sqrt{\frac{2\alpha_2(t)\beta_2(t)( \alpha_0(t)+\beta_0(t))}{\alpha_2(t)+\beta_2(t)}} +M_0+N_0+ (M_2+N_2)L.
$$
The lemma follows.
\end{proof}
We will apply this lemma for
$$
\varphi(t)=-{\log |\zeta(\sigma+it)}|
$$
noting that
$$
\varphi'(t)={\rm Im}\,\dfrac{\zeta'}{\zeta}(\sigma+it) \quad \mbox{and} \quad \varphi''(t)={\rm Re}\,\bigg(\dfrac{\zeta'}{\zeta}\bigg)'(\sigma+it).
$$
Theorem \ref{maintheorem} and \cite[Theorems ~1 and ~2]{CC} establish respectively that
\begin{align} \label{secondderivative}
-\beta_0(t)\leq \varphi(t)\leq \alpha_0(t) \quad \text{and} \quad -\beta_2(t) \leq \varphi''(t)\leq\alpha_2(t) ,
\end{align}
in the range
\begin{align} \label{rangeinproof}
\dfrac{1}{2}+\dfrac{\lambda_0}{\log\log t} \leq \sigma \leq 1 - \frac{c\sqrt{\lambda_0/(\lambda_0+c)}}{\sqrt{\log \log t}}\quad \text{and} \quad t\geq 3,
\end{align}
where $c>0$,
\begin{align*}
\alpha_2(t) & =\dfrac{-2\sigma^2+2\sigma+2}{\sigma(1-\sigma)}\,\ell_{-1,\sigma}(t)+O_c\left(\dfrac{\ell_{0,\sigma}(t)}{(\sigma-\tfrac12)(1-\sigma)^2}\right), \\
\beta_2(t) & = \dfrac{-2\sigma^2 + 6\sigma - 2}{\sigma(1-\sigma)}\,\ell_{-1,\sigma}(t)+O_c\left(\dfrac{\ell_{0,\sigma}(t)}{(\sigma-\tfrac12)(1-\sigma)^2}\right), \\
\alpha_0(t) & = \beta_0(t) = \dfrac{-\sigma^2 +5\sigma - 2}{2\sigma(1-\sigma)} \ell_{1,\sigma}(t) + O_c\left(\dfrac{\ell_{2,\sigma}(t)}{(1-\sigma)^2}\right)
\end{align*}
and $\ell_{n,\sigma}(t)=(\log t)^{2-2\sigma}(\log \log t)^{-n}$.
We can then apply Lemma \ref{lem:interp} with $t_0=t_0(\sigma,c)$ equals to the smallest $t$ such that \eqref{rangeinproof} is not vacuous. A routine computation shows that $\sqrt{3L}=O_c(1)$ and that $M_0, M_2, N_0,N_2$ are $O_c((\sigma-\tfrac12)^{-1}(1-\sigma)^{-2})$. We obtain
\begin{align*}
\left|{\rm Im}\,\dfrac{\zeta'}{\zeta}(\sigma+it)\right| & \leq \sqrt{\frac{2\alpha_2(t)\beta_2(t)( \alpha_0(t)+\beta_0(t))}{\alpha_2(t)+\beta_2(t)}} +O_c\left(\dfrac{1}{(\sigma-\tfrac12)(1-\sigma)^2}\right) \\
&= \sqrt{\frac{2(-\sigma^2 + 5\sigma - 2)(-\sigma^2 + 3\sigma - 1)(-\sigma^2 + \sigma + 1)}{\sigma^3(1-\sigma)^2(2-\sigma)}}\,\ell_{0,\sigma}(t) \\
& \quad \,+O_c\left(\dfrac{\ell_{1,\sigma}(t)}{(\sigma-\tfrac12)(1-\sigma)^2}\right)
\end{align*}
if $t' = t-\sqrt{3L} \geq t_0$. Letting $t_1(c)$ be such that $\tfrac{\log \log t'}{\log \log t}\geq \tfrac{\lambda_0}{\lambda_0+c}$ if $t\geq t_1(c)$, we conclude that the above estimate holds in the range
\begin{align} \label{rangeinproof2}
\dfrac{1}{2}+\dfrac{\lambda_0+c}{\log\log t} \leq \sigma \leq 1 - \frac{c}{\sqrt{\log \log t}}\quad \text{and} \quad t\geq t_2(c),
\end{align}
where $t_2(c)=\max(t_1(c),3+\sqrt{3L})$. To finish the proof we note that if $3\leq t \leq t_2(c)$ then a simple compactness argument gives the full desired range. \qed
\section*{Acknowledgements}
AC was supported by Grant 275113 of the Research Council of Norway. The authors are grateful to Kristian Seip for his helpful remarks and suggestions.
|
\section{Introduction.}
{Let $K$ be a field. We say that a polynomial $f\in K[x]$ is \textit{separable} if its roots in an algebraic closure of $K$ are distinct. This is equivalent to $(f,f')=K[x]$, where $f'$ denotes the formal derivative of $f$. More abstractly, this is also equivalent to $A=K[x]/f$ being a separable $K$-algebra (meaning that $A$ is projective as an $A\otimes_KA$-module). For example, $x(x+1)$ is separable, but $(x+1)^2$ is not. We may generalize this definition to commutative rings.}
Let $R$ be a commutative ring. We say that a polynomial $f\in R[x]$ is \textit{separable} if $A=R[x]/f$ is a separable $R$-algebra {(meaning that $A$ is projective as an $A\otimes_RA$-module). When $f$ is monic, this turns out to be equivalent to $(f,f')=R[x]$ as in the case of polynomials defined over a field (we refer the readers to \cite{AG,DI,polak} for details)}. If $f,g\in R[x]$, we say that $f$ and $g$ are \textit{relatively prime} or \textit{coprime} if there is no monic polynomial of positive degree in $R[x]$ that divides both $f$ and $g$.
The motivation for this article comes from two articles, namely \cite{polak}, where the proportion of separable monic polynomials in $(\mathbf{Z}/p^k\mathbf{Z})[x]$ is derived from a previous result of Carlitz \cite{car} on separable polynomials in $(\mathbf{Z}/p\mathbf{Z})[x]$, and \cite{HH}, where certain formulae {for} the probability that two monic polynomials in $(\mathbf{Z}/p^k\mathbf{Z})[x]$ are relatively prime are found. The results we are interested in are as follows.
\begin{theorem}[Polak, \cite{polak}]\label{thm:polak}
Let $p$ be a prime number and $k\geq$ 1 an integer. The proportion of monic polynomials of degree $d\geq2$ that are separable in $(\mathbf{Z}/p^k\mathbf{Z})[x]$ is $1-p^{-1}$.
\end{theorem}
\begin{theorem}[Hagedorn and Hatley, \cite{HH}]\label{thm:HH}
Let $p$ be an odd prime number and $m,k\geq$ 1 integers. The probability that two randomly chosen monic polynomials of degrees $m$ and 2 in $(\mathbf{Z}/p^k\mathbf{Z})[x]$ are relatively prime is given by
$$P_{\mathbf{Z}/p^k\mathbf{Z}}(m,2) = 1 - \frac{f_k(p)}{p^{3k}},$$
where $f_k(x)\in\frac{1}{2}\mathbf{Z}[x]$ is an explicit monic polynomial of degree $2k$.
\end{theorem}
{Results similar to Theorem~\ref{thm:HH} have been found for multiple polynomials over a finite field in \cite{BB,Cor}. Other similar problems on polynomials over finite fields can be found in \cite{Hou} and \cite{Gao}, where multivariate polynomials and common divisors of multiple polynomials are studied, respectively.}
Let $\mathbf{Z}_p=\varprojlim \mathbf{Z}/p^k\mathbf{Z}$ denote the ring of $p$-adic integers. We caution readers that some authors write $\mathbf{Z}_p$ for $\mathbf{Z}/p\mathbf{Z}$. In the present article, $\mathbf{Z}_p$ is \textit{very different} from $\mathbf{Z}/p\mathbf{Z}$. It is the ring of sequences $(a_k)_{k\ge 1}$, where $a_k\in\mathbf{Z}/p^k\mathbf{Z}$ {is} such that the image of $a_{k+1}$ under the natural projection map $\mathbf{Z}/p^{k+1}\mathbf{Z}\rightarrow \mathbf{Z}/p^k\mathbf{Z}$ equals $a_k$ for all $k\ge1$. There is a natural bijection between $\mathbf{Z}_p$ and the set of formal sums
\begin{equation}\label{eq:formalsum}
\left\{\sum_{i\ge 0}c_ip^i:c_i\in\{0,1,\ldots, p-1\}\right\}.
\end{equation}
{In particular, there is a natural projection map $\mathbf{Z}_p\rightarrow \mathbf{Z}/p^k\mathbf{Z}$ for all $k\ge1$.}
We shall see in the main part of the article that the inverse limit definition of $\mathbf{Z}_p$ is fundamental for our theoretical proofs, whereas representing elements of $\mathbf{Z}_p$ by formal sums is more convenient for dealing with explicit examples.
We observe that Polak's result, Theorem~\ref{thm:polak}, does not depend on $k$, and Hagedorn and Hatley's formula in Theorem~\ref{thm:HH} converges to 1 as $k\rightarrow \infty$. It therefore seems natural to speculate that the probability {that} a monic polynomial over $\mathbf{Z}_p$ {is} separable should be $1-p^{-1}$, whereas the probability {that} two monic polynomials of degree $m$ and $2$ are {relatively prime} over $\mathbf{Z}_p$ should be $1$.
{In order to make sense of probabilities on polynomials over $\mathbf{Z}_p$, in this article} we consider the Haar measure on $\mathbf{Z}_p$, which can be extended to the set of polynomials over $\mathbf{Z}_p$ in a natural way. {This is akin to \cite{weiss}, where the distribution of splitting types and Galois groups of polynomials over extensions of $\mathbf{Z}_p$ are studied.} Our first result is the following generalization of Theorem~\ref{thm:polak}.
\begin{theorem}\label{thm:a}
Let $p$ be a prime number and $d\ge 2$ an integer. With respect to the Haar measure, the probability that a degree $d$ monic polynomial over $\mathbf{Z}_p$ is separable is given by $1-p^{-1}$.
\end{theorem}
{This is Theorem~\ref{thm:A} below.}
{After our manuscript was first submitted to the journal, we learned that our result recovers the first part of \cite[Theorem 1.1]{weiss} when $K_p=\mathbf{Q}_p$. }
In this article, we give two proofs of this theorem. {The first one is based on discriminants, which were also used by Weiss in \cite{weiss}, and builds on results in \cite{polak} for $ \mathbf{Z} /p^k\mathbf{Z}$.} The second proof is based on a lifting lemma for monic polynomials that we prove in {Section 2}. More specifically, we show that if $f,g\in\mathbf{Z}_p[x]$ are monic, then the ideal generated by $f$ and $g$ {equals} $\mathbf{Z}_p[x]$ if and only if their images under the canonical projection modulo $p$ generate $(\mathbf{Z}/p\mathbf{Z})[x]$. We make use of the fact that a monic polynomial $f$ defined over a commutative ring $R$ is separable if and only if $(f,f')=R[x]$, where $f'$ denotes the formal derivative of $f$ ({see} \cite[\S1.4]{magid}). Therefore, our lemma allows us to translate the separability of a monic polynomial in $\mathbf{Z}_p[x]$ to the separability of its image in $(\mathbf{Z}/p\mathbf{Z})[x]$. We can then apply Carlitz's result on separable polynomials over $\mathbf{Z}/p\mathbf{Z}$ to obtain a new proof of Theorem~\ref{thm:a} without using discriminants. {The second method we present here is very different from the work of Weiss. It would be interesting to see whether our lifting technique can be generalized to give an alternative proof of Weiss's result in the full generality. It would also be interesting to investigate whether our method can be used to recover other results in \cite{weiss}.}
Our lifting lemma leads us to define the following new notion on polynomials. We say that two polynomials $f$ and $g$ defined over a commutative ring $R$ are \textit{strongly coprime} if they generate $R[x]$. This is a stronger condition than being relatively prime (having no common {nonunit} factor). Our lifting lemma allows us to prove the following {theorem (which is Theorem~\ref{thm:relsep} below)}.
\begin{theorem}
Let $p$ be a prime number and $d, e\ge 1$ integers. With respect to the Haar measure, the probability that two polynomials $f, g\in\mathbf{Z}_p[x]$ of degree $d$ and $e${,} respectively{,} are strongly coprime is given by $1-p^{-1}$.
\end{theorem}
Finally, we show in Theorem~\ref{thm:C} that our method can be used to extrapolate the formulae of Theorem~\ref{thm:HH} to calculate the probability of monic polynomials over $\mathbf{Z}_p[x]$ to be relatively prime.
\begin{theorem}
Let $p$ be an odd prime number and $m\geq$ 1 an integer. With respect to the Haar measure, the probability that two randomly chosen monic polynomials of degrees $m$ and 2 in $\mathbf{Z}_p[x]$ are relatively prime is equal to $1$.
\end{theorem}
The methods used in our proofs are inspired by Hensel's lemma, which says that the roots of a polynomial $f\in \mathbf{Z}_p[x]$ can be found by lifting the roots of $\widetilde f\in (\mathbf{Z}/p\mathbf{Z})[x]$ recursively, where $\widetilde f$ is the polynomial obtained from $f$ by projecting its coefficients from $\mathbf{Z}_p$ to $\mathbf{Z}/p\mathbf{Z}$. To quote Neal Koblitz in \cite{Kob},
\begin{quote}
Hensel's lemma is often called the $p$-adic Newton's lemma because the approximation technique used to prove it is essentially the same as Newton's method for finding a real root of a polynomial equation with real coefficients. $\ldots$ In one respect the $p$-adic Newton's method is much better than Newton's method in the real case. In the $p$-adic case, it's guaranteed to converge to a root of a polynomial. In the real case, Newton's method usually converges, but not always. $\ldots$ Such perverse silliness is impossible in $\mathbf{Q}_p$.
\end{quote}
\section{Lifting of polynomials from $\mathbf{Z}/\MakeLowercase{p^k}\mathbf{Z}$ to $\mathbf{Z}_\MakeLowercase{p}$.}\label{S:lift}
We begin {with} the following lemma on Euclidean division for polynomials over a commutative ring (rather than a field).
\begin{lemma}[Division algorithm]\label{lem:division}
Let $R$ be a commutative ring {and} $f,g\in R[x]$ such that the leading coefficient of $g$ is a unit of $R$. Then there exist $q,r\in R[x]$ such that
\[
f=qg+r,
\]
{where either $r = 0$ or $\deg(r) < \deg(g)$.}
\end{lemma}
\begin{proof}
Since the lemma is a simple generalization of the usual division algorithm for polynomials defined over a field, we only give a sketch {of a} proof here.
If $\deg(f)<\deg(g)$, then we may simply take $q=0$ and $r=f$. So, we may assume that $\deg(f)\ge \deg(g)$. Let $i=\deg (f) - \deg (g) \ge0$ and write $a$ and $u$ for the leading coefficients of $f$ and $g${,} respectively. Since $u$ is a unit of $R$, there exists $b\in R$ such that $a=ub$. Then the leading terms of both $f$ and $bX^ig$ are $aX^{\deg(f)}$. In particular,
\begin{align*}
\deg (f - bX^i g) < \deg (f).
\end{align*}
If the left-hand side is smaller than $\deg(g)$, then we may take $q=bX^i$ and $r=f-bX^ig$ and we are done. Otherwise, we may repeat this procedure with $f$ replaced by $f - bX^ig$, which will produce another polynomial whose degree is strictly smaller than that of $f- bX^ig$. We may keep on subtracting appropriate multiples of $g$ and eventually this will produce a polynomial of degree strictly less than $\deg (g)$ {or the zero polynomial, }as required.
\end{proof}
If $f\in\mathbf{Z}_p[x]$, we write $\widetilde{f}_k$ for its natural image in $(\mathbf{Z}/p^{k}\mathbf{Z})[x]$ under the reduction map induced by $\mathbf{Z}_p\rightarrow \mathbf{Z}/p^{k}\mathbf{Z}$. Note that if $f$ is monic, then so is $\widetilde{f}_k$. Furthermore, $\deg(f) = \deg(\widetilde{f}_k)$.
\begin{theorem}\label{thm:lift}
Let $f,g\in\mathbf{Z}_p[x]$ be two monic polynomials of degree at least $1$. Then the $\mathbf{Z}_p[x]$-ideal generated by $f$ and $g$ equals $\mathbf{Z}_p[x]$ if and only if the $(\mathbf{Z}/p\mathbf{Z})[x]$-ideal generated by $\widetilde{f}_1$ and $\widetilde{g}_1$ equals $(\mathbf{Z}/p\mathbf{Z})[x]$.
\end{theorem}
\begin{proof}
It suffices to show the following equivalence:
$$\exists \alpha,\beta \in \mathbf{Z}_p[x], \alpha f + \beta g = 1 \Longleftrightarrow \exists \alpha_0,\beta_0 \in (\mathbf{Z}/p\mathbf{Z})[x], \alpha_0 \widetilde{f}_1 + \beta_0 \widetilde{g}_1 = 1.$$
\noindent
($\Rightarrow$) Given $f,g,\alpha,\beta \in\mathbf{Z}_p[x]$ such that $\alpha f+\beta g=1$, one can take $\alpha_0$ and $ \beta_0$ to be $\widetilde{\alpha}_1$ and $ \widetilde{\beta}_1${,} respectively. Then we have trivially $\alpha_0 \widetilde{f}_1 + \beta_0 \widetilde{g}_1 = 1$.\\
\noindent
($\Leftarrow$) Given $f,g \in\mathbf{Z}_p[x]$ and $\alpha_0,\beta_0 \in(\mathbf{Z}/p\mathbf{Z})[x]$ such that
\begin{equation}\label{eq:eqnFp}
\alpha_0 \widetilde{f}_1 + \beta_0 \widetilde{g}_1 = 1,
\end{equation}
{we} will construct a sequence $(r_i, s_i)_{i\in\mathbf{Z}_{\ge0}}$, where $r_i,s_i\in(\mathbf{Z}/p^{2^i}\mathbf{Z})[x]$ such that $\deg(r_i)<\deg(g)$, $\deg(s_i) < \deg(f)${,} and
$$r_i \widetilde{f}_{2^i} + s_i \widetilde{g}_{2^i} = 1.$$
We will construct this sequence by induction.\\
\noindent
\textbf{Base case}: Since $g$ is monic, so is $\widetilde{g}_1$ and the division algorithm of Lemma~\ref{lem:division} yields $q_0,r_0\in (\mathbf{Z}/p\mathbf{Z})[x]$ such that $\deg(r_0) < \deg(g)$ and
$$\alpha_0 = q_0 \widetilde{g}_1 + r_0.$$
We may rewrite \eqref{eq:eqnFp} {as}
$$r_0 \widetilde{f}_1 + s_0\widetilde{g}_1 = 1,$$
where $s_0 = q_0\widetilde{f}_1 + \beta_0$. Note that
\begin{align*}
\deg(s_0)+\deg(g)&=\deg(s_0)+\deg(\widetilde{g}_1)\\
&=\deg(s_0\widetilde{g}_1)\\
&=\deg(r_0\widetilde{f}_1)\\
&=\deg(r_0)+\deg(f)< \deg(g)+\deg(f).
\end{align*}
Hence, we deduce that $\deg(s_0)<\deg(f)$ as required.\\
\noindent
\textbf{Inductive hypothesis}: We assume that there exist $r_i, s_i\in (\mathbf{Z}/p^{2^i}\mathbf{Z})[x]$ such that $\deg(r_i)<\deg(g)$, $\deg(s_i) < \deg(f)${,} and
$$r_i \widetilde{f}_{2^i} + s_i \widetilde{g}_{2^i} = 1.\\$$
\noindent
\textbf{Induction step}: Let $\hat r_i, \hat s_i\in\mathbf{Z}_p[x] $ be two arbitrary lifts of $r_i$ and $s_i${,} respectively. Then
$$\hat r_i f + \hat s_i g = 1 + p^{2^i} Q_i$$
for certain $Q_i\in\mathbf{Z}_p[x]$. Multiplying both sides by $1 - p^{2^i} Q_i$ yields
$$(1 - p^{2^i} Q_i)\hat r_i f + (1 - p^{2^i} Q_i)\hat s_i g = 1 - p^{2^{i+1}} Q^2_i.$$
We define $\alpha_{i+1}$ and $\beta_{i+1}$ {to} be the natural images of $(1 - p^{2^i} Q_i)\hat r_i$ and $(1 - p^{2^i} Q_i)\hat s_i$ in $\mathbf{Z}/p^{2^{i+1}}\mathbf{Z}${,} respectively. This gives
$$\alpha_{i+1}\widetilde{f}_{2^{i+1}}+\beta_{i+1}\widetilde{g}_{2^{i+1}} = 1$$
inside $(\mathbf{Z}/p^{2^{i+1}}\mathbf{Z})[x]$. By the same argument as in the base case, we may replace $\alpha_{i+1}$ and $\beta_{i+1}$ by polynomials $r_{i+1}$ and $s_{i+1}$ such that $\deg(r_{i+1})<\deg(g)$ and $\deg(s_{i+1})<\deg (f)$ using the division algorithm of Lemma~\ref{lem:division}, as required.\\
Since $\mathbf{Z}_p$ is compact and $\deg(r_i)$ and $\deg(s_i)$ are of bounded degrees, $(r_i,s_i)$ admits a subsequence that converges to a pair of polynomials $(r_\infty,s_\infty)$ in $\mathbf{Z}_p[x]$ satisfying
\[r_\infty f+s_\infty g=1.\]
This concludes the proof of $(\Leftarrow)$.
\end{proof}
\begin{remark}\label{rk:general} Note that the same proof would go through if we replace {$\mathbf{Z}/p\mathbf{Z}$} by $\mathbf{Z}/p^k\mathbf{Z}$ for an arbitrary integer $k\ge1$. This proof gives a constructive algorithm for a linear combination in $\mathbf{Z}_p[x]$. \end{remark}
We give an explicit example that illustrates the inductive step of the algorithm.
\begin{example}
Take $p=5$ and consider elements of $\mathbf{Z}_5$ as formal sums $$c_0+c_1\cdot 5+c_2\cdot 5^2+\cdots,\quad c_i\in\{0,1,2,3,4\}$$ as in \eqref{eq:formalsum}. We consider the following monic polynomials
\begin{align*}
f&:=x^2 + (3+ 4\cdot5 + 2 \cdot 5^2 + \cdots)x + (2 + 3\cdot5 + 4\cdot 5^2 + \cdots),\\
g&:=x + (4 + 2\cdot 5 + 4 \cdot 5^2 + \cdots).
\end{align*}
One can verify that, in $(\mathbf{Z}/5\mathbf{Z})[x],$
$$\widetilde{f}_1 + (4x + 1) \widetilde{g}_1 = 1.$$
Taking the lifts $\hat r_0$ and $\hat s_0$ in $\mathbf{Z}_5[x]$ to be $1 $ and $4x+1 $ respectively, we have
\begin{align*}
\hat r_0 f + \hat s_0 g& = (5+5^2 + \cdots)x + (1 + 5 + 4\cdot 5^2 + \cdots) \\
&=1 + 5\cdot (x^2+(1+5 + \cdots)x+(1 + 4\cdot 5 + \cdots)).
\end{align*}
In particular, $ Q_0$ is given by $x^2+(1+5 + \cdots)x+(1 + 4\cdot 5 + \cdots)$.
Multiplying $\hat r_0$ and $\hat s_0$ by $ 1 - 5\cdot Q_0$ yields
\begin{align*}
(1 - 5\cdot Q_0)\hat r_0 &= (4\cdot 5+\cdots)x^2+( 4 \cdot 5 + \cdots)x + (1 + 4\cdot5 + \cdots),\\
(1 - 5\cdot Q_0)\hat s_0 &=(5+\cdots)x^3+( \cdots)x^2 + (4 +\cdots)x + (1 + 4\cdot5 + \cdots)
\end{align*}
On projecting to $(\mathbf{Z}/5^2\mathbf{Z})[x]$, we obtain
$$\alpha_1 = (4\cdot 5)x^2+ (4\cdot 5)x+ (1 + 4\cdot 5),\quad \beta_1 = 5x^3 + 4x + (1 + 4\cdot5).$$
The division algorithm of Lemma{~\ref{lem:division}} (with $R=\mathbf{Z}/5^2\mathbf{Z}$) gives
$$
\alpha_1=((4\cdot 5)x+3\cdot 5) \tilde g_2+2\cdot 5+1.
$$
Therefore, we obtain
$$r_1=2\cdot 5+1,\quad s_1=((4\cdot 5)x+3\cdot 5 ) \tilde f_2+\beta_1=(2\cdot 5+4)x+1.$$
\end{example}
\section{Probability of separable polynomials over $\mathbf{Z}_\MakeLowercase{p}$.}
We recall that if $R$ is a commutative ring, a polynomial $f\in R[x]$ is said to be \textit{separable} if $R[x]/f$ is a separable $R$-algebra. When $f$ is monic, this is equivalent to
\begin{equation}
(f,f')=R[x], \label{eq:criterion}
\end{equation}
where $f'$ denotes the formal derivative of $f$ ({see} \cite[\S1.4]{magid}). Let us write $S_R^d$ for the set of separable monic polynomials of degree $d$ in $R[x]$. Let $p$ be a fixed prime number. In \cite{polak}, Polak showed that the proportion of {separable} degree $d$ monic polynomials in $(\mathbf{Z}/p^k\mathbf{Z})[x]$ is given by $1-p^{-1}$ for all integers $k\ge1$ and $d\ge 2$. {In particular}, we have
\begin{equation}
\# S^d_{\mathbf{Z}/p^k\mathbf{Z}}=p^{dk}(1-p^{-1}).\label{eq:polak}
\end{equation}
The goal of this section is to generalize Polak's result to polynomials defined over the ring of $p$-adic integers $\mathbf{Z}_p$.
Let $P_{d}(\mathbf{Z}_p)$ denote the set of monic polynomials of degree $d$ defined over $\mathbf{Z}_p$. In particular, if $f=X^d+a_{d-1}X^{d-1}+\cdots +a_0\in P_d(\mathbf{Z}_p)$, we may {identify} $f$ with the $d$-tuple $(a_0,\ldots,a_{d-1})\in\mathbf{Z}_p^d$. We equip $P_d(\mathbf{Z}_p)=\mathbf{Z}_p^d$ with the product measure, denoted by $\mu_{\Haar}^d$, coming from the unique Haar measure on $\mathbf{Z}_p$. When $d=1$, we omit $d$ from the notation and simply write $\mu_{\Haar}$.
\begin{lemma}\label{lem:pre-image}Let $f \in (\mathbf{Z}/p^k\mathbf{Z})[x]$ be a monic polynomial of degree $d$. Write $[f]\subset P_d(\mathbf{Z}_p)$ for the {preimage} of $f$ under the natural projection $\mathbf{Z}_p[x]\rightarrow (\mathbf{Z}/p^k\mathbf{Z})[x]$. Then
$$\mu_{\Haar}^d\left([f]\right) = \frac{1}{p^{kd}}.$$
\end{lemma}
\begin{proof}
By definition, $\mu_{\Haar}(a+p^k\mathbf{Z}_p) = \frac{1}{p^k}$ for all $a\in\mathbf{Z}_p$. Hence, the {preimage} of any element in $\mathbf{Z}/p^k\mathbf{Z}$ in $\mathbf{Z}_p$ has measure $\frac{1}{p^k}$. Hence the lemma follows by considering the {preimage} of each coefficient of $f$.
\end{proof}
\begin{theorem}\label{thm:A}
Let $p$ be a prime number and $d\ge 2$ an integer. Then $$\mu^d_{\Haar}\left( S_{\mathbf{Z}_p}^d\right)=1-p^{-1},$$
{where $S_{\mathbf{Z}_p}^d$ denotes the set of separable monic polynomials of degree $d$ in $\mathbf{Z}_p[x]$.}
\end{theorem}
We give two proofs. The first one is an easy generalization of the proof given in \cite{polak} using discriminants, whereas the second one is based on Theorem~\ref{thm:lift}.
\begin{proof}[Proof 1] Let us first recall from \cite[Proposition~2.1]{polak} the following result.
\begin{proposition} Let $R$ be a commutative ring with no nontrivial idempotents and let $f\in R[x]$ be a monic polynomial. Then $f$ is separable if and only if {the discriminant }$\mathrm{disc}(f) \in R$ is a unit.
\end{proposition}
For a polynomial of a fixed degree, $\mathrm{disc}(f)$ can be realized as a polynomial in the coefficients of $f$, which is independent of the ring $R$. In particular, given any $f\in\mathbf{Z}_p[x]$, we have $$\mathrm{disc}(f) \equiv \mathrm{disc}(\widetilde f_1) \;(\bmod\; p).$$
In particular, $f$ is separable in $\mathbf{Z}_p[x]$ if and only if $\widetilde{f}_1$ is separable in $(\mathbf{Z}/p\mathbf{Z})[x]$. Therefore,
$$S^d_{\mathbf{Z}_p} = \bigsqcup_{{f} \in S^d_{\mathbf{Z}/p\mathbf{Z}}}[{f}],$$
where $[{f}]$ denotes the {preimage} of ${f}$ in $\mathbf{Z}_p[x]$ under the natural projection {and $\sqcup$ denotes the disjoint union of sets}. By Lemma~\ref{lem:pre-image} and \eqref{eq:polak}, we deduce that
\begin{align*}
\mu_{\Haar}^d\left(S^d_{\mathbf{Z}_p}\right)& = \mu_{\Haar}^d\left(\bigsqcup_{{f} \in S^d_{\mathbf{Z}/p\mathbf{Z}}}[{f}]\right)\\
&=\sum_{{f} \in S^d_{\mathbf{Z}/p\mathbf{Z}}}\mu_{\Haar}^d([{f}])\\
&=\frac{\# S^d_{\mathbf{Z}/p\mathbf{Z}}}{p^d}\\
&=\frac{p^d(1-p^{-1})}{p^d}\\
&=1-p^{-1},
\end{align*}
as required.
\end{proof}
\begin{proof}[Proof 2]
Let $f\in \mathbf{Z}_p[x]$. Recall that its natural image in $(\mathbf{Z}/p\mathbf{Z})[x]$ is denoted by $\widetilde{f}_1$. Theorem \ref{thm:lift} tells us that
$$(f,f') = \mathbf{Z}_p[x] \Leftrightarrow (\widetilde{f}_1,\widetilde{f}_1') = (\mathbf{Z}/p\mathbf{Z})[x].$$
{Thus, by the criterion of separability given in \eqref{eq:criterion}}, $f$ is separable in $\mathbf{Z}_p[x]$ if and only if $\widetilde{f}_1$ is separable in $(\mathbf{Z}/p\mathbf{Z})[x]$. {As in Proof 1, we may now deduce Theorem~\ref{thm:A} from the fact that $ \# S^d_{\mathbf{Z}/p\mathbf{Z}}=p(1-p^{-1})$ as given by \eqref{eq:polak}, which is a special case of the main result of \cite{polak} (see Theorem~\ref{thm:polak}). }
\end{proof}
\section{Probability of strongly coprime polynomials over $\mathbf{Z}_\MakeLowercase{p}$.}
If $K$ is a field, then a polynomial $ f\in K[x]$ is separable if and only if
$$(f,f')=K[x].$$
There is a similar notion for relatively prime polynomials. That is, if $f,g \in K[x]$, then $f$ and $g$ are relatively prime if and only if
$$(f,g) = K[x].$$
However, if we replace $K$ by a commutative ring $R$, then it is possible for two relatively prime polynomials $f,g\in R[x]$ {to be} such that $f$ and $g$ generate a proper ideal of $R[x]$. We define the following new notion that allows us to extrapolate information on relatively prime polynomials in $(\mathbf{Z}/p\mathbf{Z})[x]$ to polynomials in $\mathbf{Z}_p[x]$.
\begin{definition} \label{def:sep}
Let $R$ be a commutative ring. We say that two polynomials $f,g\in R[x]$ are \textbf{strongly coprime} if
$$(f,g) = R[x].$$
\end{definition}
\begin{theorem}\label{thm:relsep}
Let $p$ be a prime number and $d, e\ge 1$ integers. With respect to the Haar measures on $P_d(\mathbf{Z}_p)$ and $P_e(\mathbf{Z}_p)$, the probability that two random polynomials in $P_d(\mathbf{Z}_p)$ and $ P_e(\mathbf{Z}_p)$ are strongly coprime is given by $1-p^{-1}$.
\end{theorem}
\begin{proof}
Given a ring $R$, let us write $\mathcal{R}^{d,e}_R$ for the set of pairs of relatively prime polynomials $(f,g)$, where $f,g\in R[x]$ such that $\deg(f)=d$ and $\deg(g)=e$.
Recall from Theorem~\ref{thm:lift} that
$$(f,g) = \mathbf{Z}_p[x] \Leftrightarrow (\widetilde{f}_1,\widetilde{g}_1) =( \mathbf{Z}/p\mathbf{Z})[x].$$
In other words, $f$ and $g$ are strongly coprime {if and} only if their projections are. Hence,
$$\mathcal{R}^{d,e}_{\mathbf{Z}_p} = \bigsqcup_{(f,g) \in \mathcal{R}^{d,e}_{\mathbf{Z}/p\mathbf{Z}}}[f]\times[g].$$
Let $\mu_{\Haar}^{d,e} := \mu_{\Haar}^d{{\times}}\mu_{\Haar}^e$ be the product measure on $P_d(\mathbf{Z}_p)\times P_e(\mathbf{Z}_p)$. Then, Lemma~\ref{lem:pre-image} tells us that
\begin{align*}
\mu_{\Haar}^{d,e}(\mathcal{R}^{d,e}_{\mathbf{Z}_p})& =\sum_{(f,g) \in \mathcal{R}^{d,e}_{\mathbf{Z}/p\mathbf{Z}}}\mu_{\Haar}^{d,e}\left([f]\times[g]\right)\\
&= \frac{\#\mathcal{R}^{d,e}_{\mathbf{Z}/p\mathbf{Z}}}{p^{d+e}}.
\end{align*}
It {was} proved in \cite{BB} that $$\#\mathcal{R}^{d,e}_{\mathbf{Z}/p\mathbf{Z}}=p^{d+e}(1-p^{-1}){,}$$
{hence the result follows}.
\end{proof}
Note that we may deduce a similar statement {for} polynomials defined over $\mathbf{Z}/p^k\mathbf{Z}$ for any integers $k\ge1$.
\begin{corollary}
Let $p$ be a prime number and $d,e, k\ge 1$ integers. The probability that two monic polynomials of degree $d$ and $e$ in $\mathbf{Z}/p^k\mathbf{Z}$[x] are strongly coprime is given by $1-p^{-1}$.
\end{corollary}
\begin{proof}
As explained in Remark~\ref{rk:general}, we have the equivalence
$$(f,g) = \mathbf{Z}_p[x] \Leftrightarrow (\widetilde{f}_k,\widetilde{g}_k) = (\mathbf{Z}/p^k\mathbf{Z})[x]\Leftrightarrow (\widetilde{f}_1,\widetilde{g}_1) = (\mathbf{Z}/p\mathbf{Z})[x].$$
Hence, the calculation in the proof of Theorem~\ref{thm:relsep} goes through if we replace $\mathbf{Z}_p$ by $\mathbf{Z}/p^k\mathbf{Z}$.
\end{proof}
\section{Probability of relatively prime polynomials over $\mathbf{Z}_\MakeLowercase{p}$.}
{For a} polynomial over $\mathbf{Z}_p${,} being square-free is weaker than being separable. In fact, as remarked in \cite{weiss}, the set of square-free polynomials over $\mathbf{Z}_p$ has full Haar measure, whereas that of separable {polynomials} has measure $1-p^{-1}$ by Theorem~\ref{thm:A}. Similarly, two polynomials over $\mathbf{Z}_p$ being relatively prime polynomials (i.e.{,} having no common {nonunit} factor) is weaker than being strongly coprime. In this section we illustrate how a similar calculation to what we made in the previous sections allows us to extrapolate Hagedorn and Hatley's formulae in Theorem~\ref{thm:HH} to a result on relatively prime polynomials over $\mathbf{Z}_p$.
\begin{theorem}\label{thm:C}
Let $p$ be an odd prime number and $m\geq1$ an integer. With respect to the Haar measure, the probability that two randomly chosen monic polynomials in $P_m(\mathbf{Z}_p)$ and $P_2(\mathbf{Z}_p)$ are relatively prime is $1$.
\end{theorem}
\begin{proof}
Let $f,g\in \mathbf{Z}_p[x]$. Observe that if $\widetilde{f}_k$ and $\widetilde{g}_k$ are relatively prime as polynomials in $(\mathbf{Z}/p^k\mathbf{Z})[x]$, then $f$ and $g$ are also relatively prime since any common {nonunit} factors between them would give common {nonunit} factors of $\widetilde{f}_k$ and $\widetilde{g}_k$.
For $R=\mathbf{Z}_p$ or $\mathbf{Z}/p^k\mathbf{Z}$, let us write $\mathfrak{R}^{m}_{R}$ for the set of relatively prime polynomials $(f,g)$ with $\deg(f)=m$ and $\deg(g)=2$. {Recall that, by our notation, the measure on $\mathfrak{R}^{m}_{\mathbf{Z}_p}$ will be $\mu_{\Haar}^{m,2}$}.Then our observation above tells us that
$$\mathfrak{R}^{m}_{\mathbf{Z}_p} \supset \bigsqcup_{(f,g) \in \mathfrak{R}^{m}_{\mathbf{Z}/p^k\mathbf{Z}}}[f]\times[g].$$
Therefore, on applying Lemma~\ref{lem:pre-image} and Theorem~\ref{thm:HH}, we obtain the following inequality{:}
\begin{align*}
\mu_{\Haar}^{m,2}\left(\mathfrak{R}^{m}_{\mathbf{Z}_p}\right)& \geq \mu_{\Haar}^{m,2}\left(\bigsqcup_{(f,g) \in \mathfrak{R}^{m}_{\mathbf{Z}/p^k\mathbf{Z}}}[f]\times[g]\right)\\
&= \frac{\#\mathfrak{R}^{m}_{\mathbf{Z}/p^k\mathbf{Z}}}{p^{(2+m)k}}\\
&=1-\frac{f_k(p)}{p^{3k}}.
\end{align*}
From \cite[p. 224]{HH} we have that the polynomial $f_k$ is of degree $2k$ and its coefficients have absolute value at most $2$. Therefore, $$1-\frac{f_k(p)}{p^{3k}}\rightarrow 1,\quad \text{as }k\rightarrow \infty.$$ But $\mu_{\Haar}^{m,2}\left(\mathfrak{R}^{m}_{\mathbf{Z}_p}\right)$ is at most $1$ by definition. This forces
$$\mu_{\Haar}^{m,2}\left(\mathfrak{R}^{m}_{\mathbf{Z}_p}\right)=1,$$
as required.
\end{proof}
To conclude, we would like to outline a number of future problems that may be studied using our method.
\begin{itemize}
\item[(i)] We may calculate the probability of two polynomials over $\mathbf{Z}_p$ of any degrees to be relatively prime by estimating the number of polynomials over $\mathbf{Z}/p^k\mathbf{Z}$ of the same degrees that are relatively prime.
\item[(ii)] On generalizing techniques of \cite{HH}, we may generalize results of \cite{BB,Cor,Gao} to multiple, potentially multivariate, polynomials over $\mathbf{Z}/p^k\mathbf{Z}$ (instead of fields). Once this is achieved, we may then apply our method to study multiple, potentially multivariate, polynomials over $\mathbf{Z}_p$.
\item[(iii)] We may, as in \cite{weiss}, consider the ring of integers of a finite extension of $\mathbf{Q}_p$ and generalize our results on coprime and strongly coprime polynomials.
\item[(iv)] We may give a new proof of Weiss's formula on the distribution of splitting types of irreducible polynomials defined over the ring of integers of a finite extension of $\mathbf{Q}_p$.
\item[(v)] It would also be interesting to investigate whether we may refine the different estimates on the distribution of Galois groups of irreducible polynomials in \cite[Theorems 1.2--1.6]{weiss} using our lifting technique.
\end{itemize}
\subsection*{Acknowledgments.}
We are grateful to Jeffrey Hatley and Benjamin Weiss for answering our questions. We thank Hugues Bellemare and Gautier Ponsinet for helpful discussions. Finally, we thank the anonymous referees and the editor for many useful comments and suggestions on earlier versions of this article. The first named author's research is supported by the NSERC Discovery Grants Program 05710. Parts of this work were carried out during the second named author's research internship at Laval University in the summer of 2018; he was supported by a NSERC Undergraduate Student Research Award during the internship.
|
\section{Introduction}\label{sec:introduction}
RDF knowledge bases (KBs) are used in many domains, e.g bibliographic, medical, and biological data. Most knowledge bases face the problem that they are potentially incomplete, incorrect or outdated. Considering how much new data is generated daily it is highly desirable to integrate missing data provided by external sources. Thus, data integration approaches~\cite{koutraki_cikm_2015,koutraki_eswc_2017,qian_2012,bernstein_2011,madhavan_2001} are used to expand KBs and correct erroneous data. The usual process of data integration is to download data dumps and align the schemas of a local KB and these dumps. ``Aligning" describes the process by which relations and classes from the local KB are mapped to relations and entities of external sources, thus creating a mapping between the local and the external data schemas. Afterwards, the integration process can be done and the data of the KB is expanded or updated.
However, data dumps are often updated only infrequently. Using live data through APIs instead of dumps~\cite{koutraki_cikm_2015,koutraki_eswc_2017} allows access to more recent data. In addition, the number of potential data sources becomes much larger when using APIs since most data providers share their data not via dumps, but via APIs. According to Koutraki et al.~\cite{koutraki_cikm_2015}, \emph{APIs seem to be a sweet-spot between making data openly accessible and protecting it}. The problems of data integration, i.e. how two different schemas can be mapped, remain. In the worst case, the schema of an external source has a completely different structure than the local KB. Hence, data integration remained a manual task for most parts~\cite{koutraki_cikm_2015}.
\textbf{Motivation.} Connecting KBs with data behind APIs can significantly improve existing intelligent applications. As a motivating example, we consider dblp\footnote{\url{https://dblp.uni-trier.de/}}, a bibliographic database of computer science publications. It accommodates different meta data about publications, e.g., titles, publisher names, and author names and can be represented as an RDF KB. Data from dblp is often used for reviewer, venue or paper recommendation, and extending dblp with information from APIs like CrossRef, or SciGraph, for example titles or abstracts, can improve these applications. Missing information about authors like ORCIDs (an ORCID is a code to uniquely identify scientific authors) can be supplemented by these APIs and help to disambiguate author profiles. Furthermore, such information is also useful for a user querying dblp for authors or publications, where missing information can be completed using external data sources. Therefore it is important that multiple APIs can be used and missing data can be integrated from many different sources. Additionally, the determined alignments can be used to identify erroneous data and correct it if necessary.
\textbf{Contributions.} We present FiLiPo (\textbf{Fi}nding \textbf{Li}nkage \textbf{Po}ints)~\footnote{Code available at \url{https://github.com/dbis-trier-university/FiLiPo}}, a system to automatically discover alignments between KBs and APIs, focusing on detecting property/path alignments. We omit aligning classes because classes and types (in terms of semantic classes, e.g. URLs) do not exist in typical API responses. FiLiPo\ is designed to work with single record response APIs, i.e. APIs that return only a single record as response and not a list of most similar search results, and works for datasets of arbitrary domains. In contrast to other systems~\cite{qian_2012}, users of FiLiPo\ only require knowledge about a local KB (e.g. class names) but no prior knowledge about the APIs' data structure. To the best of our knowledge, FiLiPo\ is the first aligning system that automatically detects what information from a KB has to be used as input of an API to retrieve responses. Thus end users do not have to determine the best input, significantly reducing manual effort. In contrast to other state-of-the-art systems~\cite{koutraki_cikm_2015}, FiLiPo\ uses fifteen different string similarity metrics to find an alignment between the schema of a KB and that of an API. A single string similarity method is not suited to compare different kinds of data, for example both ORCIDs (requiring exact matches), ISBNs (with some variation) and abbreviated names. A user only needs to specify the number of requests sent to the API in order to keep the approach simple.
\section{Problem Statement}\label{sec:problem_statement}
This paper addresses five challenges when aligning local KBs with APIs. The first challenge is to determine which input values (e.g. DOI, etc.) have to be sent to the API to retrieve a valid response. A valid response is a response that contains information about the requested entity. In contrast, invalid responses contain information about similar entities (e.g. a list of most similar search results) or an error message. Note that the user has to specify the URL and the parameter of an API (e.g. \texttt{www.example.com/api?q=}). When a resource is requested that is unknown to the API, it can respond in several ways. The classic case is that it returns an HTTP status code (e.g. \texttt{404}). The more complicated case is a JSON response that contains an error message or returns information on a ``similar" resource (e.g., with a similar DOI). This cannot be easily distinguished from a ``real" response which contains data about the requested resource.
An alignment between the schemata of an API and a KB are determined by collecting several responses from an API and comparing these information with the one stored in a KB. Semantically equal data values between API responses and KB entities are denoted as (sample) matches (e.g. the match of a DOI value). In order to determine such matches, the second challenge is that the same value may be represented slightly differently in the KB than in the API (e.g., names with and without abbreviated first names), hence the comparison needs to apply string similarity methods. The various existing similarity methods have different strengths and weaknesses. For example, Levenshtein distance is good for comparing the titles of a paper or movie, but performs poorly when comparing names of authors or actors because names are often abbreviated and first and last names may be in different order. Hence, a suitable similarity method needs to be determined automatically for each type of data.
A special case of this challenge is comparing identifiers, e.g. ISBNs. Identifiers need to be equal in order to yield as match. However, the ISBN of a book can be written in different forms (e.g. without hyphens) but should be considered equal. For this reason a simple check for equality is not sufficient, otherwise possible alignments are lost. Note that such identifiers (e.g. IBANs, tax numbers and others) also exist in other domains.
Finding a match between the information of KBs and APIs can be particularly problematic if APIs respond with records similar to the requested one. For example, a request for a book with title ``\emph{Some example Title}" may lead to an API response of a book with title ``\emph{Some Title}". The information of the API and the KB may overlap, especially for values that appear in many entities (e.g. year). Thus, the fourth challenge is to check if APIs respond with the requested information. Koutraki et. al~\cite{koutraki_cikm_2015} state that if KBs and APIs share the same domain, it is likely that the data of their entities overlap. This means that if the information of the API and the KB overlaps sufficiently, the API has probably responded with the requested record.
The last challenge is that some data values are contained in an API response several times, e.g. year values. In this case, they may represent a different piece of information, e.g. some bibliographic APIs respond with data containing references and citations of a paper, which often include author names and publication years. During the matching process, care must be taken as to which information is matched. Just because the values match, they do not form a valid match (e.g. matching a papers author names with the author names of the papers references). Hence the semantics and structure of the paths should be considered but API responses do not always have a clear or a directly resulting semantics.
\section{Related Work}\label{sec:related_work}
\textbf{Web API Alignment.} Some work has already been done regarding the aligning of different datasets. However, only the DORIS system~\cite{koutraki_cikm_2015,koutraki_iswc_2015} has dealt with the alignment of KBs and APIs so far and is used as baseline system for the evaluation of FiLiPo. The core idea of DORIS is to build upon the schema and structure of an existing KB containing instances and facts about these instances. First, the system sends some probing requests to a chosen API. It uses label information of instances as its predefined input relation for APIs. However, this is not always the appropriate input parameter for the API. For example, some APIs expect DOIs or ISBNs as input parameters.
One key assumption of the DORIS system is that it is more likely to find information on well-known, popular or famous entities (e.g. famous actors, acclaimed books, or big cities) via APIs calls than it would be for unknown entities. Additionally, Koutraki et al. assume that KBs contain more facts (triples) for well-known entities and therefore rank the entities of the input class by descending number of available facts. While this is a reasonable approach for open-topic knowledge bases like YAGO, it is likely to fail for domain-specific KBs. For a publication, for example, the number of facts stored by a bibliographic KB is often determined by the meta data of that publication, not by its popularity (unless citations etc. are stored). In contrast to this approach FiLiPo\ picks randomly chosen entities of a KB. This is done to prevent the entities from being very similar to each other and thus increase the probability of an response. For example, assuming that an API only responds to entities with a specific publisher, e.g. Springer. If entities are selected in any non-random way, e.g. according to the amount of facts like in the DORIS system, it is possible that no entities with publisher Springer are included, and the API cannot respond. As a consequence no aligning can be done and the approach will be unsuccessful.
DORIS normalises values by lower casing strings, ignoring punctuation, and reordering the words in alphabetical order. A benefit of this approach is that a pairwise comparison of all combinations of KB and API values is no longer necessary. A relation and a path are considered as a match if the corresponding values are exactly equal after normalisation. Therefore, the system can use an efficient merge-join algorithm. Normalised values of the paths and relations are sorted in alphabetic order. Afterwards, the two lists can be merged to produce the relation-path matches. This stands in contrast to our approach since, as stated previously, a single method is not suited to compare all various data types. The limitations of DORIS become clear when examining, for example, author names or titles. Names are often abbreviated and the matching approach will fail because DORIS performs an exact match on the normalised names. Similar problem will arise when examining other data values containing typos or minor differences. In contrast to this approach FiLiPo\ uses a set of similarity methods and picks randomly chosen entities of a KB.
\textit{Wrapper Inference.} The problem of aligning KBs and APIs shares similarities with various other fields~\cite{rahm_survey_2001,bernstein_2011,koutraki_cikm_2015} like schema alignment, query discovery and wrapper inference approaches. Wrapper inference approaches~\cite{senellart_widm_2008,derouiche_icde_2012} face similar problems as alignment systems from other fields. Senellart et al.~\cite{senellart_widm_2008} present an approach which uses domain knowledge (concept names and instance data) in order to identify the input of form fields. They assume that there are no specifically required fields in the form. However, this does not apply to the majority of APIs, since most have a mandatory parameter. Afterwards the structure of the data behind the form fields is aligned with concept names by exploiting the semantics of form fields and web tables (e.g. labels, table headers, etc.). Since paths in API responses do not always have a clear or any semantic at all, FiLiPo\ does not use path semantics. Derouiche et al.~\cite{derouiche_icde_2012} also use domain knowledge to extract data from Web sources. Additionally, they use for every concept (e.g. date) a form of regular expression. Since users have to specify these expressions, this approach significantly raises the manual effort and the needed knowledge.
\textbf{Schema/Ontology Alignment.} Aligning data of KBs and APIs has similar problems as schema/ontology alignment. The major difference is that API responses often do not have explicit semantics or any semantics at all, and the data schema of the API is often not directly accessible to external parties. In addition, names of the paths are often ambiguous. Semantics in form of rules (as with RDF/OWL) does not exist in API responses. Also, responses usually do not provide information about classes/relations that can be used for the alignment process. When using APIs, only instance information is available and hence classical schema/ontology approaches are not suitable. Additionally, Madhavan et al.~\cite{madhavan_2005} state that KBs often contain multiple schemas to materialise similar concepts and hence build variations in entities and their relations. This makes schema-based matching inaccurate, which must therefore be supported by evidence in form of instances.
\textit{Machine Learning.} Machine Learning is experiencing a big boom in the past years. Approaches like BERT\cite{bert2018} or Flair\cite{flair} (both frameworks that learn contextual relations between words in a text) enable to grasp the semantics of data and to compare them with others. A clear disadvantage of machine learning alignment approaches~\cite{schmidts_2019,sahay_2020,koutraki_eswc_2017} is that they require training data, which is either provided by experts or learned from predefined mappings. Even though the results look promising, the approach has the problem that sufficient training data must be available. However, there is only a small number of available alignments and data sources. In addition, the training data must cover many different data structures and different hierarchical data types from many different domains. Therefore, this approach is currently still subject to strong limitations. In contrast, DORIS and FiLiPo\ do not require the user to be a machine learning expert and assume no assistance through experts during the mapping process. Additionally, the results are often worse than with a rule-based program or classic approaches.
\textit{Schema Alignment.} Classical approaches for schema or ontology alignment take a set of independently developed schemas as input and construct a global view~\cite{aumueller_2005,cruz_2009} over the data. Since the schemas are independently developed, they often have different structure and semantics. This is especially the case when the schemes are from different domains, of different granularity or simply developed by different people in different real-world contexts~\cite{rahm_survey_2001}. The first step when performing schema alignment is to identify and characterise relationships that are shared by the schemas. After identifying the shared relations they can be included in a global schema. Since APIs do not provide any schema information it is not possible to use classical schema or ontology alignment strategies.
Approaches like COMA++\cite{aumueller_2005} represent customisable generic matching tools for schemas and ontologies. COMA++ relies on a taxonomy to determine an alignment and uses a so-called fragment based match approach (breaking down a large matching problem into smaller problems). Additionally, it enables various interaction possibilities to the user in order to influence the alignment process. Furthermore, COMA++ does not use any instance information of the KBs. Madhavan et al.~\cite{madhavan_2005} state that KBs often contain multiple schemas and data models to materialise similar concepts and hence build variations in entities and their relations. This makes purely schema-based matching inaccurate, which must therefore be supported by evidence in form of instances from the KB. FiLiPo\ accomplishes this by working with instances from the KB and comparing the actual values, not just determining a match at the schema level.
Systems like BLOOMS~\cite{jain_2010} use schema information if it is present in the Linked Open Data (LOD) cloud. This means that a schema no longer needs to be explicitly declared and the schema information of reused vocabularies (ontologies) can be accessed via the LOD cloud. However, since API responses (mostly) do not contain explicit schema information (of the LOD domain), the procedure is not applicable. In addition, the collected answers of an API implicitly contain a schema which only needs to be extracted~\cite{benedetti_2014}. This is similar to KBs which contain implicit schema information even without the specification of a schema. To keep the process as simple as possible much user assistance and knowledge should not be required. Furthermore, our goal is a fully automatic determination of an alignment without any user assistance during the process.
Systems like AgreementMaker~\cite{cruz_2009} are based on the assumption that users of the system are domain experts and thus build on user assistance. The system uses a large set of matching methods and enables the user to define the types of components to be used in the aligning process, i.e. using the schema only or both schemas and instances.
\textit{Instance-Based Alignment.} Instance-based alignment systems use the information bound to instances in KBs in order to find shared relations and instances between two KBs. These approaches can be divided into instance-based class alignment approaches and instance-based relation alignment approaches. The main difference between class and relation alignment lies in the fact that relations have a domain and range. Even if relations share the same value, they can have different semantics (e.g. \texttt{editor} and \texttt{author}).
A lot of works~\cite{qian_2012,dhamankar_2004,madhavan_2005,koutraki_edbt_2016} focus on instance-based relation alignment between two KBs. However, most of them focus on finding 1:1 matches, e.g. matching \texttt{publicationYear} to \texttt{year}. The iMAP system~\cite{dhamankar_2004} semi-automatically determines 1:1 matches, but also considers the complex case of 1:n matches. iMAP consists of a set of search modules, called searchers. Each of the searchers handles specific types of attribute combinations (e.g. a text searcher). FiLiPo\ follows a similar approach. Additionally, iMAP offers users an explanation of the determined match containing information about why a particular match is or is not created, and why a certain match is ranked higher than another. Instead of searchers, FiLiPo\ only distinguishes between the type of information (numeric, string, or is it a key). Then, in case of strings, a number of different similarity methods are used, and the best method is automatically determined and used.
Similar to iMAP, MW\textsc{eaver}~\cite{qian_2012} also needs user assistance. MW\textsc{eaver} realises a sample-driven schema mapping approach which automatically constructs schema mappings from sample target instances given by the user. The idea of this system is to allow the user to implicitly specify mappings by providing sample data. However, this approach needs significant manual effort. The user must be familiar with the target schema in order to provide samples. In contrast to this approach, FiLiPo\ draws the sample data randomly from the KB and thus tries to cover a wide range of information.
SOFYA~\cite{koutraki_edbt_2016} is an instance-based on-the-fly approach for relation alignment between two KBs. The approach works with data samples from both KBs in order to identify matching relations. The core aspect of SOFYA is that the standard relation ``sameAs" is used to find identical entities in two different KBs. However, this mechanism cannot be used for the alignment of KBs and APIs, because APIs do not contain standardised ``sameAs'' links.
\textit{Holistic Approaches.} Some developed systems cannot be categorised easily since they use techniques of all fields. ILIADS~\cite{udrea_2007} for example takes two OWL ontologies as input and determines afterwards an alignment based on lexical, structural and extensional similarity. They combine a flexible similarity matching algorithm with an incremental logical inference algorithm. Additionally, ILIADS uses a clustering algorithm which considers relationships among sets of equivalent entities, rather than individual pairs of entities.
\textsc{PARIS}~\cite{suchanek_2011} is an instance-based approach that aligns related entities and relationship instances, but also related classes and relations. The goal of \textsc{PARIS} is to discover and link identical entities automatically across ontologies. It was designed such that no training data or parameter tuning is needed. \textsc{PARIS} does not use any kind of heuristics on relation names and therefore it is able to align relations with completely different names. However, a downside of \textsc{PARIS} is that it is not able to deal with structural heterogeneity. This is a major problem, because most KBs are structured differently from each other, since they have been developed by different people~\cite{rahm_survey_2001}.
Madhaven et. al. developed a system called Cupid~\cite{madhavan_2001} which is used to discover an alignment between KBs based on the names of the schema elements, data types, constraints and structure. It combines a broad set of techniques of various categories (e.g. instance-based, schema alignment, etc.). The system uses an linguistic and structural approach in order to find a valid alignment.
\section{Preliminaries}\label{sec:preliminaries}
\textbf{Knowledge Bases.} An RDF KB can be represented as graph with labelled nodes and edges. A KB consists of triples of the form $(s,p,o)$ which represent a fact in the KB. The subject (start node) $s$ describes the entity the fact is about, e.g. a paper entity. An entity is represented by an URI, which is an identifier of a real-world entity such as a paper or an abstract concept (e.g. a conference). The predicate $p$ describes the relation between the subject and the object, e.g. \texttt{title}. The object (target node) $o$ describes an entity, e.g. an author, or is a literal, e.g. the title of a publication. A class in a KB is an entity that represents a group of entities. Entities assigned to a class are instances of that class. In Figure~\ref{fig:knowledge_graph}, the entity \texttt{PaperEntity} is an instance of the class \texttt{Publication}.
\textbf{Relations.} Since this paper focuses on aligning relations, we introduce a formal definition for relation (paths). Given a KB $K$, if $(s,r,o)\in K$, we say that $s$ and $o$ are in relation $r$, or formally $r(s,o)$; in other words, there is a path from $s$ to $o$ with label $r$. Also, we write $r_1.r_2.....r_n(s,o)$ to denote that there exists a path of relations $r_1,r_2,...,r_n$ in $K$ from subject $s$ to object $o$ visiting every node only once. For example, in Figure~\ref{fig:knowledge_graph} the relation \texttt{year(PaperEntity,"2020")} describes the path from the entity \texttt{PaperEntity} to the value \texttt{"2020"}. In the following we will refer to $r_1.r_2.....r_n(s,o)$ as relation-value path.
\textbf{Identifier Relations.} Some KBs contain globally standardised identifiers such as DOIs, IBANs (International Bank Account Numbers), tax numbers and others. Identifiers are only bound to a single entity and should be unique. Therefore, relations $r$ that model identifier relations have the constraint that their inverse relations ($r^{-1}$) are ``quasi-functions", i.e., their inverse relations have a high functionality. Many works~\cite{koutraki_cikm_2015,suchanek_2011,hogan_nefors_2010} have used the following definition for determining the functionality of relations:
\begin{equation*}
fun(r) \coloneqq \frac{|\{x : \exists y : r(x,y)\}|}{|\{(x,y) : r(x,y)\}}
\end{equation*}
\begin{figure}[t]
\centering
\subfloat[Response Example.\label{fig:request_response}]{
\includegraphics[scale=0.55]{img/web_api_response.pdf}
}\hfil
\subfloat[Fragment of an RDF KB.\label{fig:knowledge_graph}]{%
\includegraphics[scale=0.45]{img/knowledge_graph.pdf}
}
\caption{Record of a KB and the corresponding API response.}
\label{fig:records}
\end{figure}
Since real world KBs are designed by humans identifier relations are often error-prone which is why some identifier values may appear more than once. Hence, we consider every relation $r$ contained in $K$ with $fun(r^{-1}) \geq \theta_{id}$, where $\theta_{id} \in [0,1]$ is a threshold, as \textit{identifier relation}. From now on we denote $R^{id}_{K}$ as the set of all identifier relations (e.g., \texttt{doi}, \texttt{isbn}, etc.) contained in a KB $K$ . Note that we ignore identifier relations that are composed of several relations.
\textbf{Web API.} A Web service can provide one or multiple APIs to access data. APIs are called via parameterised URLs (see Figure~\ref{fig:request_response}). As shown in Figure~\ref{fig:request_response} the response of an API can be represented as an unordered and labelled tree. Inner nodes in the tree represent an object (similar to an entity in a KB) or an array, leaf nodes represent values. The path to a node represents a relation between an instance (similar to an entity in a KB) and another instance or value. To avoid confusion we will describe these relations in a response only as paths.
\textbf{Path-Value-Pairs.} In order to find valid alignments between KBs and APIs the information in the API responses has to be compared with the values of the corresponding entities in a KB. Since comparing objects and arrays from the API response with entities from the KB to determine alignments is not promising, only paths to leafs (literals) have to be considered. Given an API response $res$ we will write $p_1.p_2.....p_n(o)$ to denote that there is a path $p_1,p_2,...,p_n$ in $res$ from the root of the response to the leaf $o$ with these labels. For example, in Figure~\ref{fig:request_response} the path \texttt{label("Some example Title")} describes the path from the root of the API response to the leaf \texttt{"Some example Title"} via the path \texttt{label}.
\textbf{Branching Points.} A branching point in an API response indicates that there are several outgoing edges from one node, labelled by numeric index values 0 to n. These branching points represent arrays. In the example in Figure~\ref{fig:request_response}, the path \texttt{authors.0.name("Tobias Zeimetz")} contains a branching point. To indicate a branching point, we will use the symbol \texttt{*} instead of the numeric index in paths; in the example, we will write \texttt{authors.*.name("Tobias Zeimetz")}. Using the same logic, a relation in a KB that points to a set of entities is considered to be a branching point (e.g. \texttt{creatorList} in Figure~\ref{fig:knowledge_graph}). Additionally, we write $P*$ to indicate a path $P*p$ that has $P$ as prefix and $p$ as suffix, with a branching point separating the two parts.
\section{System Overview}\label{sec:system_overview}
In order to better understand how FiLiPo\ proceeds, we will first give an overview of the system components. The FiLiPo\ architecture shown in Figure~\ref{fig:system_overview} is divided into two main components, the \textit{Alignment Core} and the \textit{Identifier Extractor}. Additionally, the system uses a set of configuration files to manage local KBs and APIs that will be used for the alignment process.
\begin{figure}
\centering
\includegraphics[scale=0.7]{img/system_overview.pdf}
\caption{FiLiPo\ System Architecture.}
\label{fig:system_overview}
\end{figure}
\textbf{Configuration Files.} There are two types of settings in FiLiPo. The first one (\texttt{Global Settings}) stores all global settings like the paths to output files and a set of different thresholds values (more in in Section~\ref{sec:matching_mapping}). The second setting (\texttt{Data Management}) stores information about KBs and APIs. It is used to manage multiple data sources and therefore stores the paths to registered KBs and the URLs (see Figure~\ref{fig:data_management}) under which the registered APIs can be accessed. Additionally, the input class (e.g. \texttt{Publication}) for every API that is used is specified. The input class describes the class of entities from the used KB whose facts are used to request information from the API. For example, the API presented in Figure~\ref{fig:api_management} has as input class \texttt{Publication} and values of the input relation \texttt{doi} are used to request the API.
\begin{figure}[t]
\centering
\subfloat[KB Management.\label{fig:kb_management}]{
\includegraphics[scale=0.42]{img/database_management.JPG}
}\hfil
\subfloat[API Management.\label{fig:api_management}]{%
\includegraphics[scale=0.47]{img/api_management.JPG}
}
\caption{Example Screenshots of FiLiPos Data Management.}
\label{fig:data_management}
\end{figure}
\textbf{Identifier Extractor.} The Identifier Extractor is used to derive the identifier relations (e.g. ISBNs, ISSNs, etc.) contained in a given KB. Therefore, the system computes the functionality of each relation. Since real world KBs may be noisy and contain errors, a perfect functional relation is unlikely. Therefore, we determined the functionality of all relations in a KB. In case a relation has a functionality greater or equal to 0.99 (in case the KB contains erroneous data), the system assumes that the relation describes an identifier. It is important to determine the identifiers of the KB because the FiLiPo\ system uses several similarity methods that may be too fuzzy to compare identifier values. However, this explained in more detail in Section~\ref{sec:aligning}.
\textbf{Alignment Core.} The \textit{Alignment Core} consists of three components; the \texttt{Alignment Processor}, the \texttt{Similarity Processor} and the gradient boosting classifier (\texttt{GB Classifier}). The Alignment Processor interacts with the other components to determine a correct alignment. The \texttt{Similarity Processor} is used by the \texttt{Alignment Processor} to compare values of a KB record and an API response. FiLiPo\ uses the string similarity library developed by Baltes et al.~\cite{sotorrent_msr_2018} in order to compare these values and to find valid matches. This similarity library uses three types of similarity methods: (1) equal, (2) edit and (3) set-based. String similarity methods of the equal category check for the equality of two strings; edit-based methods (e.g. Levenshtein) define the similarity of two strings based on the number of edit operations needed to transform one string into the other~\cite{sotorrent_msr_2018}. Set-based methods determine how large the intersection of two strings in terms of tokens (e.g. n-grams, n-shingles, etc.). We excluded the overlap method in the set-based category since this method is too fuzzy and would lead to an erroneous aligning (e.g. aligning a title and an abstract since they have in most cases many tokens in common). By using this library FiLiPo\ can use up to 15 different similarity methods with several variants.
\textbf{Gradient Boosting Classifier.} In addition to the similarity methods, the \texttt{Alignment Processor} uses a specialised method to compare identifier values (\texttt{GB Classifier}). For example, in order to match an ISBN with a value returned by an API the values need to be equal. As explained previously, identifiers can have several writing styles and therefore need to be normalised before comparing, e.g. removing hyphens in ISBNs. Using fuzzy similarity methods like Levenshtein is inaccurate but using \textit{equals} is too strict. Therefore FiLiPo\ utilises a gradient boosting classifier working on Flair~\cite{flair} embeddings of identifiers to determine whether two (identifier) values are equal. We use Flair embeddings instead of other embeddings since this framework is character-based and therefore suits better for the comparison of two identifier strings. A detailed explanation of the procedure of the Classifier can be found in Section~\ref{sec:aligning}.
\section{Schema Matching and Mapping}\label{sec:matching_mapping}
FiLiPo\ operates in two phases. First (\emph{probing phase}), FiLiPo\ sends various information (e.g. DOIs, titles, etc.) to an API to determine which information the API responds to. Afterwards (\emph{aligning phase}), the information returned is used to guess the APIs schema and to determine an alignment between the local and external data. The input of the aligning process is the URL of the API (see Figure~\ref{fig:request_response}) and the corresponding input classes in the KB. An input class is a class of entities that will be used to request the API.
\begin{figure}[t]
\centering
\includegraphics[scale=0.8]{img/probing.pdf}
\caption{Short Example of the Probing Process.}
\label{fig:probing}
\end{figure}
\subsection{Probing Phase}
The probing phase is used to find the set $R_{in}$ of relations of the input class that point to values which can be used to request the API successfully (e.g., a DOI relation). To illustrate this with an example (see Figure~\ref{fig:probing}), we assume that the input class of the API whose result is presented in Figure~\ref{fig:request_response} is \texttt{Publication}. The illustrated fragment in Figure~\ref{fig:knowledge_graph} has five relations to describe the metadata of a publication but the API only responds to DOIs. First, all relations that are not connected to literals (e.g., \texttt{type}) are ignored. In addition, values that occur more than once in the KB (year numbers, ambiguous titles and names) are not used as input values. The reason for this is that more than one record can be returned and possibly a not matching one is returned. Afterwards $n_p$ initial requests are sent to the API for each remaining relation of the input class (i.e. \texttt{title} and \texttt{doi}). The created URL to request the API is a concatenation of the API URL specified by the user (see Figure~\ref{fig:request_response} and values for the corresponding input relations, e.g. for \texttt{doi} an example call URL is \texttt{www.example.com/api?q=10.1145/3340531.3417438}.
The input values for each relation are picked uniformly at random from entities of the input class in the KB. As explained previously, this is done to prevent the entities from being very similar to each other and thus increase the probability of an response. For example, assuming that an API only responds to entities with a specific publisher, e.g. Springer. If entities are selected in any non-random way, e.g. according to the amount of facts, it is possible that no entities with publisher Springer are included, and the API cannot respond and no aligning can be done.
After sending a request to the API it can respond in several ways. In the best case, the API responds with the HTTP status code \texttt{200 OK} or with an HTTP error code (e.g. \texttt{404 Not Found}). In the worst case, the server responds with a document containing an error message (see Figure~\ref{fig:error_message}). In this case the system cannot easily detect that some input values did not lead to a (successful) response and therefore will continue with the alignment phase with the corresponding relation. Since this would result in a considerable increase of requests and runtime it is important to identify error messages.
\begin{figure}[t]
\centering
\includegraphics[scale=0.5]{img/error_message.JPG}
\caption{Example of an API Error Message.}
\label{fig:error_message}
\end{figure}
In order to identify error responses, the system iterates over all answers and compares how similar they are to one another. This procedure is based on the observation that error responses are always similar or even the same, i.e. they usually contain the same error message or consist of an generic error message in combination with the request value. An example of this assumption is shown by the error response of SciGraph in Figure~\ref{fig:error_message}. The error response of SciGraph always looks similar. The only difference is in the field ``query", because it will always contain the value which was used to request SciGraph. In contrast, correct answers are different to one another since they contain information about various different entities. As a result, an error response is determined by counting how often a response was similar (by using Levenshtein) to other responses. The one that is most often similar (i.e. the similarity is higher than 0.80) to other responses is considered an error message. Then all responses similar to this response will be deleted and all relations $r_{in}$ which have not received enough answers will no longer be considered as valid input relations. In this way unnecessary requests are prevented.
Next, the alignment phase begins, considering only the set $R_{in}$ of relations that led to valid answers (for the example in Figure~\ref{fig:probing} only relations with a green check mark will be used in the next phase). The aligning phase itself is divided into two parts: (1) determining candidate alignments and (2) determining the final alignments.
\subsection{Aligning Phase: Candidate Alignment}\label{sec:aligning}
This phase takes as input the set of valid input relations $R_{in}$, a KB $K$ and the corresponding identifier relations $R^{id}_{K}$.
For each input relation $r_{in}\in R_{in}$, the algorithm sends $n_r$ further requests to the API. A random entity $e$ is chosen from the input class. FiLiPo\ then retrieves the set $rec$ of all facts that $K$ contains for $e$ in form of relation-value paths $r(e,l$) (see Figure~\ref{fig:paths}, left side). Note that $r$ can be a path of multiple relations, e.g. $r_1.r_2...r_n(e,l)$. Like Koutraki et al.~\cite{koutraki_cikm_2015} we take only facts into account up to depth three. This depth was chosen because all other facts usually do not make statements about the entity $e$. To exclude the case that entities are connected to other entities in only one direction, inverse relations are also considered. Afterwards FiLiPo\ calls the API with values $v_{req}$ of the input relation $r_{in}$ of $e$ and stores the response in $res$ (see Figure~\ref{fig:paths}, middle part). Note, that for the sake of simplicity not all KB and API paths are shown in Figure~\ref{fig:paths}.
\begin{figure}[t]
\centering
\includegraphics[scale=0.6]{img/paths_example.pdf}
\caption{Fragment of a KB Record and an API Response.}
\label{fig:paths}
\end{figure}
The next step is to find all relation matches $R$ between $rec$ and $res$ (see Figure~\ref{fig:paths}, right side). The set $res$ encodes information from the response as path-value pairs of the form $p(v)$ where $p$ is the path in the response from the root to the value $v$. Note that $p$ can be a path of multiple components, e.g. $p_1.p_1...p_n(v)$. All values $l$ of $rec$ must be compared with all values $v$ of $res$. Figure~\ref{fig:paths} presents an example for the title relation. The coloured lines represent comparisons between the values, red lines denote invalid matches and the green line represents a valid match. For each pair ($r(e,l),p(v)$), a suitable similarity method is determined. If $l$ or $v$ is an IRI, it is important that they are compared with \texttt{equals} as IRIs are identifiers and hence only the same if they are identical. The same holds for numerical values. In all other cases FiLiPo\ uses a set $M_{sim}$ of fifteen different similarity methods\footnote{All used similarity methods are listed in our manual at \url{https://github.com/dbis-trier-university/FiLiPo/blob/master/README.md}} with several variants since one string similarity method is not sufficient to compare several data types. The method $m \in M_{sim}$ returning the largest similarity of $l$ and $v$ is considered (temporarily) to be a suitable method to compare both values and is stored for the later process.
We used the string similarity library developed by Baltes et al.~\cite{sotorrent_msr_2018} since it contains all major similarity methods, divided into three categories: equal, edit and set based. Since fuzzy methods are not appropriate for identifier relations and comparing them for equality would be too strict, identifier relations in $R^{id}_{K}$ are therefore compared with a gradient boosting classifier working on Flair~\cite{flair} embeddings. We use Flair embeddings since this framework is character-based and therefore suits better for the comparison of identifier values. Once the best similarity method has been determined, and if it yields a similarity of at least $\theta_{str}$, the triple $(r,p,m)$ is created and added to the set of record matches $R$.
\begin{figure}[t]
\centering
\includegraphics[scale=0.8]{img/branching_example.pdf}
\caption{Explanation of BPM and FPM.}
\label{fig:branching_example}
\end{figure}
If enough matches are found, it is assumed that the input entity $e$ and the API response overlap in their information (the overlapping information is highlighted in Figure~\ref{fig:paths} in blue) and that the API has responded with information about the requested entity. We compute the overlap by dividing the number of matches $|R|$ by the number of entries of the smallest record $rec$ or $res$. If the overlap is greater than a threshold $\theta_{rec}$, the overlap is considered sufficient and the matches $R$ will be added to $A_{r_{in}}$ (an example of overlapping values/paths is presented in blue in Figure~\ref{fig:paths} and an example of the set $A_{r_{in}}$ is given in Figure~\ref{fig:alignment}). This set represents matches found for the input relation $r_{in}$. If not enough matches are found, it is assumed that the API has responded with information of a different entity; in this case, any matches found between the records must be ignored.
\subsection{Aligning Phase: Final Alignment}
Afterwards $A_{r_{in}}$ is used to determine the final alignment. For each relation in $A_{r_{in}}$ the best path match on the API side is searched (if existing). It is easy to match relations and paths without branching points, e.g. \texttt{label} or \texttt{title} in Figure~\ref{fig:paths} (see (1)). However, for matches with a branching point path (see (2)), we need to decide if all entries of the corresponding array provide the same type of information or different types (see Figure~\ref{fig:branching_example} for more details). In the first case, e.g. an array specifying the authors of a paper, we need to match \emph{all paths} that are equal (index values omitted) of the API response with the same relation. This is the case in the example in Figure~\ref{fig:request_response} for the path \texttt{authors.*.name}. In the last case, where every entry of the array has a different type, each different index value at the branching point should be mapped to one specific relation, possibly different relations for the different index values. In the example, \texttt{facets.0.value("2020")} always denotes the year of the publication, whereas \texttt{facets.1.value("Computer Science")} denotes the genre of the publication. Therefore, matching either the year or the genre relation of $K$ to \texttt{facets.*.value} is incorrect and should be prevented.
\begin{figure}[t]
\centering
\includegraphics[scale=0.62]{img/alignment.pdf}
\caption{Example Fragment of $A_{r_{in}}$ with abbreviated names for readability.}
\label{fig:alignment}
\end{figure}
In order to solve the problems above, FiLiPo\ distinguishes two cases: fixed path matches (FPM) and branching point matches (BPM). First, for every relation $r$ for which at least one tuple $(r,p,m)$ exists in $A_{r_{in}}$ we determine the path $P*$ (index values are replaced by the wild card symbol) that was matched most often in $A_{r_{in}}$, regardless of which similarity method $m$ was used.
Next it is determined if $(r,P*) \in A_{r_{in}}$ is a BPM or FPM. Hence, it is checked if the path $P*$ that was matched to $r$ in $ A_{r_{in}}$ only had one index value at the branching point or multiple different ones (see $A_{r_{in}}$ in Figure~\ref{fig:alignment}, blue highlighted lines). An example of a fixed path is \texttt{facets.0.value} in the set $A_{r_{in}}$ in Figure~\ref{fig:alignment}. To indicate the year, the same path is always used in the API response. The first entry of the array \texttt{facets} describes always the year of publication. If only one index value is found, it is considered as FPM. To ensure that it is a valid FPM, a confidence score for this match is determined. If a path was found only a few times, a match is not convincing. Hence, we calculate a confidence score for the matching by dividing the number of valid matches for $r$ by the number of responses. This confidence must be greater than the confidence threshold $\theta_{rec}$. We reuse $\theta_{rec}$ based on the assumption that the overlapping of records is also reflected in the overlapping of relations. In the example in Figure~\ref{fig:alignment} (right side) it is shown that for \texttt{facet.0.value} and \texttt{year} 85 matches (using Equal) are found. Assuming that 100 requests are sent to the API and all of them are answered, this results in a confidence score of $\frac{85}{100} = 0.85$ for this match. If the score is greater or equals than $\theta_{rec}$, it will yield as valid FPM and the relation-path match is added to the final alignment set. Note that another example for a FPM is the match of \texttt{title} and \texttt{label}.
Some relations and paths are dependent on the previous entity. For example, to match the name path for an author we have to include the whole author array of the API response because matching only one specific path (e.g. \texttt{authors.0.name}) excludes information of other authors. Hence, if more than one index value was found for $P*$ it is possible that $(r,P*)$ is a BPM. A match of $r$ and a branching point path $P*$ is considered valid if the following two conditions are satisfied: (1) if the relation $r$ has led to a match often enough, i.e. the previously computed confidence value is $\geq \theta_{rec}$, and (2) if the matched $(r,P*)$ occurs frequently enough in all matches $A_{r_{in}}$. If both conditions are met, the match $(r,P*)$ is considered a BPM and added to the final alignment set. In all other cases, the match was not convincing and is therefore discarded.
For the sake of simplicity, one aspect has yet not been considered in detail. Some relations can potentially be matched with multiple paths in the API response. For example, the relation for the publication year could be incorrectly matched with the path to the publication years of the article's references. To mitigate such errors, a reciprocal discount is used, i.e. the number $n$ of matches found for a possibly incorrect path $p$ and a relation $r$ is discounted by the length difference of the paths to $n/|(len(r)-len(p))|$. Thus paths with the same length (and potentially same structure) as the KB are preferred. At the end the final alignment set contains all valid matches found for the input relation $r_{in}$.
\section{Evaluation}\label{sec:evaluation}
\textbf{Baseline System.} Many systems~\cite{qian_2012,dhamankar_2004} in Section~\ref{sec:related_work} work semi-automatically with user assistance and are mostly designed for data of the same format. Some of the systems exploit schema information, use semantics or ``sameAs'' relations to find alignments. However, schema information exists rarely on the API side and using semantics or relations is difficult since API responses do not always have clear semantics. Furthermore, ``sameAs'' predicates are a concept of RDF and not present in classical API responses. Thus, we only use DORIS as baseline.
\textbf{Datasets and Platform.} We evaluated DORIS and FiLiPo\footnote{\url{https://github.com/dbis-trier-university/FiLiPo}} on three local KBs, seven bibliographic APIs and two movie APIs. One KB is an RDF version of the dblp\footnote{provided by dblp: \url{https://basilika.uni-trier.de/nextcloud/s/A92AbECHzmHiJRF}}. The other KBs are the Linked Movie DB\footnote{\url{http://www.cs.toronto.edu/~oktie/linkedmdb/linkedmdb-18-05-2009-dump.nt}} and a self created RDF version of IMDB\footnote{\url{https://www.imdb.com/}}, both containing movie information. The used APIs are SciGraph~\footnote{\url{https://scigraph.springernature.com/explorer/api/}}, CrossRef~\footnote{\url{https://www.crossref.org/services/metadata-delivery/rest-api/}}, Elsevier\footnote{\url{https://api.elsevier.com}}, ArXiv\footnote{\url{https://arxiv.org/help/api}}, two APIs provided by Semantic Scholar\footnote{\url{https://api.semanticscholar.org}} (one with DOIs and one with ArXiv keys as input parameters) and the COCI API of Open Citations\footnote{\url{https://opencitations.net/index/coci/api/v1}}. All of these APIs respond with metadata about scientific articles. To align the movie KBs we used the APIs of the Open Movie Database (OMDB)\footnote{\url{http://www.omdbapi.com}} and The Movie Database\footnote{\url{https://developers.themoviedb.org/3/find/find-by-id}}. It responds with metadata about movies, e.g. movie director and movie genres. All experiments are done on a workstation (AMD Ryzen 7 2700X, 48GB RAM) and all KBs are processed and stored as triple databases by using the Apache Jena Framework. However, note that the hardware used is not the bottleneck for the runtime, instead it is the latency and response speed of the APIs used.
As a gold standard\footnote{Code and gold standard can be found at~\url{https://zenodo.org/record/4778531}}, we manually determined the correct path alignments for each suitable combination of KB and API. Alignments were ignored that could not be determined based on the data, but for which a human may have been able to draw a connection. For example sameAs relations, in most cases, cannot be determined automatically since the URLs may differ completely.
{
\small
\begin{table*}[t]
\caption{Probing Time (PT), Alignment Time (AT), (Average) Alignments (A), (Mean) Precision (P), (Mean) Recall (R), (Mean) F1 Score (F1)}
\label{tab:filipo_eval}
\centering
\begin{tabu}{|l|c|c|c|c|c|c|c|c|c|c|c|}\hline
& \multicolumn{7}{c|}{\textbf{FiLiPo}} & \multicolumn{4}{c|}{\textbf{DORIS}}\\
Data Sets & Requests & APT & AT & A & P & R & F1 & A & P & R & F1 \\
\hline
dblp $\leftrightarrow$ CrossRef & 25/75 & 18.0 & 4.0 & 18 & 0.97 & 0.78 & \textbf{0.91} & 9 & 0.89 & 0.36 & 0.51\\
dblp $\leftrightarrow$ SciGraph & 25/75 & 14.5 & 2.5 & 18 & 0.96 & 0.78 & \textbf{0.86} & 11 & 1.00 & 0.38 & 0.55\\
dblp $\leftrightarrow$ S2 (DOI) & 25/75 & 24.5 & 8.0 & 15 & 0.89 & 0.87 & \textbf{0.88} & 12 & 0.83 & 0.47 & 0.60\\
dblp $\leftrightarrow$ S2 (ArXiv) & 25/75 & 24.5 & 9.0 & 7 & 1.00 & 0.88 & \textbf{0.94} & 6 & 0.83 & 0.33 & 0.47\\
dblp $\leftrightarrow$ COCI & 25/75 & 23.0 & 19.0 & 16 & 1.00 & 0.78 & \textbf{0.88} & 9 & 1.00 & 0.33 & 0.50\\
dblp $\leftrightarrow$ Elsevier & 25/375 & 17.5 & 5.5 & 13 & 0.92 & 0.92 & \textbf{0.92} & 13 & 0.85 & 0.85 & 0.85\\
LMDB $\leftrightarrow$ TMDB & 25/75 & 4.5 & 2.0 & 6 & 0.94 & 1.00 & \textbf{0.97} & 7 & 0.57 & 0.80 & 0.67\\
\hline
dblp $\leftrightarrow$ ArXiv & 25/75 & 11.5 & 3.5 & 8 & 0.83 & 0.86 & \textbf{0.85} & 5 & 1.00 & 0.43 & 0.60\\
LMDB $\leftrightarrow$ OMDB & 25/75 & 36.5 & 3.5 & 14 & 0.93 & 0.95 & \textbf{0.94} & 11 & 0.55 & 0.56 & 0.55\\
IMDB $\leftrightarrow$ OMDB & 25/75 & 4.0 & 14.5 & 9 & 0.73 & 0.66 & 0.69 & 9 & 1.00 & 0.90 & \textbf{0.95}\\
\hline
\end{tabu}
\end{table*}
}
\textbf{FiLiPo\ Evaluation.} In order to find a suitable configuration (sample size and similarity thresholds) that works for most APIs, we performed several experiments. FiLiPo\ works with two different thresholds: the string similarity $\theta_{str}$ and the record overlap $\theta_{rec}$. To determine a combination of both thresholds that provides good alignment results, we tested several combinations of values for both thresholds (steps of 0.1) and calculated precision, recall and F1 score. The found alignments had a very high precision for $\theta_{str}$ between 1.0 and 0.5; recall was significantly better at 0.5. This is mainly due to the fact that data which are slightly different (e.g. names) can still be matched. For large values of $\theta_{rec}$, many alignments are lost, because the data of a KB and an API overlap only slightly in the worst case. Here, a value of 0.1 to 0.2 was already sufficient to prevent erroneous matching. Hence, we used $\theta_{str}=0.5$ and $\theta_{rec}0.1$ in the experiments. Regarding the sample size we determined that 25 probing and 75 additional requests (sample size of 100) is suitable for most APIs. However, since some KBs and APIs have little data in common, the sample size may need to be adjusted.
We assume that users have no in-depth knowledge of used APIs, but are familiar with the structure of the KB and that users have domain knowledge and hence understand common data structures from the genre of the KB (e.g. bibliographic meta data). Additionally, users can make further settings (e.g., changing the sample size) to fine-tune FiLiPo. All APIs were executed with default settings, i.e. 25 probing with 75 additional requests (in total 100 requests) are made for every valid input relation. Since dblp contains relatively few publications by Elsevier, we set the number of additional requests for Elsevier to 375.
One current limitation of FiLiPo\ becomes clear when using IMDB. We had to set the record overlap threshold from 0.1 to 0.3. This is because IMDB contains several relations with low functionality (e.g. \texttt{movieLanguage}) and hence incorrect matches would be tolerated. In contrast, DORIS excludes all relations with a very low functionality from the alignment process. Hence, it prevents the result for erroneous matches but but also loses some (possibly important) matches.
Since FiLiPo\ pulls random records from a KB and uses them to request an API, the alignments found may differ slightly between different runs. Hence, the evaluation was performed three times for each combination of KB and API. The average runtime was approx. 25 minutes. If input relations are known, as is the case with DORIS, then the system usually needs no longer than a few minutes because the probing phase can be skipped. The probing phase is expensive in runtime because an API is requested a significant number of times (see Table~\ref{tab:filipo_eval}).
FiLiPo\ was able to identify all correct input relations for almost all APIs. The only exception is the combination of IMDB and OMDB: IMDB contains a relation (\texttt{alternativeVersion}) to specify an alternative version of a movie (e.g. a directors cut is an alternative version of a movie) which is a valid input for OMDB. Of four possible input relations, it was able to identify all (alternative) title relations (\texttt{title}, \texttt{label} and \texttt{alternativeTitle}) as input relation in all runs, but only determined in 60\% of the runs the \texttt{alternativeVersion} as input. The reason for this is that especially the alternative version of lesser-known movies are unknown to OMDB. It can be summarised that \emph{in all cases a valid input was found} but only in 9 of 10 cases \emph{all} valid input relations were found.
For the evaluation of the alignments we used the metrics precision, recall and F1 Score. FiLiPo\ was able to achieve a precision between 0.73 to 1.00 and a recall between 0.66 to 1.00. Values close to 1.0 were achieved mainly because there were only a few possible alignments. The corresponding F1 scores for FiLiPo\ are between 0.69 and 0.95.
\textbf{Baseline Evaluation.} We re-implemented DORIS for our evaluation. It uses label information of instances as its predefined input relation for APIs. Since this is not always the appropriate input parameter for an API (e.g. some APIs expect DOIs as input) we modified DORIS such that the input relation can be specified by the user. Compared to FiLiPo, DORIS has an advantage in the evaluation, since it does not have to determine valid input relations for the used APIs. In contrast to FiLiPo, these input relations must be specified by the user and hence the runtime is shorter and there is no risk of alignment with wrong input relations. DORIS uses two different confidence metrics to determine an alignment: the overlap and PCA confidence. We assessed that the PCA confidence delivers better results for the alignment and hence DORIS is able to match journal-related relations. Since most of the entities in dblp are conference papers, journal specific relations are lost when using the overlap confidence. The downside is that a path that was found only once in the responses only needs to match once to achieve a high confidence. In such cases it is risky to trust the match and hence a re-probing is performed which increases the runtime considerably, since entities that share the matched relation are subsequently searched and ranked. DORIS has been configured in order to send 100 requests to the APIs. The threshold for the PCA confidence has been set to 0.1 based on a calibration experiment similarly to FiLiPo\, testing several threshold values between 0.1 and 1.0 (in steps of 0.1). With threshold 0.1, no erroneous alignments were made; recall was significantly larger at 0.1 than with larger values.
FiLiPo\/ outperforms DORIS in terms of precision in most cases and clearly in terms of recall and F1. This is mainly caused by the two disadvantages of DORIS discussed before: First, aligning with entities with most facts often misses rare features of entities (e.g. a specific publisher like Elsevier). As a result, it is not possible for DORIS to determine an alignment between dblp and Elsevier's API. Second, using only one similarity method results in a relatively high precision, but is also too rigid to recognise slightly different data (abbreviations of author names), thus leading to low recall. However, DORIS was able to achieve better results using IMDB, mainly because DORIS excludes all relations with a very low functionality from the alignment process. This is also the reason why DORIS was significantly worse in terms of recall in the other alignment tests. However, since OMDB responds with only a small amount of information, in which no information with a high functionality was included, this limitation does not have a negative effect but rather a positive one.
\section{Conclusion}
We presented FiLiPo, a system to automatically discover alignments between KBs and APIs. A user only needs knowledge about the KB but no prior knowledge about the APIs data schema. In contrast to the current state-of-the-art system DORIS, our system is additionally able to determine valid input relations for APIs which significantly reduces manual effort by the user. In all cases a valid input relation was found by FiLiPo\ but only in 9 of 10 cases \emph{all} input relations were found. Our evaluation showed that FiLiPo\ outperformed DORIS and delivered better alignment results in all but one case. As FiLiPo\ is currently only able to determine 1:1 matches, we are already working on a version that will also allow 1:n matches.
\bibliographystyle{splncs04}
|
\section{Setting-up the proof of Theorem \ref{theorem:bogomolov}}
\label{section:bogomolov}
\label{section::first}
As in the statement of the theorem, let $S$ be a base variety, let $E_j \rightarrow S$ ($1\leq j \leq g$) be families of elliptic curves, and set $$\pi: A = E_1 \times_S \cdots \times_S E_g \rightarrow S.$$ Furthermore, let $X \subseteq A$ be a subvariety of dimension $d$, for which we want to prove (RBC). We start by making some additional assumptions for the proof of the theorem in Section \ref{subsection::reductions} and introduce coordinates in Section \ref{subsection::coverings}. Following this, we give an overview of the main argument in Section \ref{section::overview}.
\section{Reductions}
\label{subsection::reductions}
(i) In our proof, we suppose that the conclusion of (RBC) is false and show that its main assumption cannot hold under this assumption. This means our goal is to show that there exists a horizontal torsion coset $Y \subseteq A$ such that $X$ is a subvariety of codimension $\leq \dim(S)$ in $Y$. In the sequel, we can hence work with an $X$-generic sequence $(x_i) \in X^\mathbb{N}$ such that $\widehat{h}_{\iota}(x_i) \rightarrow 0$.
\vspace{0.2cm}
(ii)
We can assume that $g = d+1$. In fact, if
\begin{equation*}
\dim(A) - \dim(S) = g < d + 1 = \dim(X) + 1,
\end{equation*}
then $\mathrm{codim}_A(X) < \dim(S) + 1$ so that the assumption of (RBC) is not satisfied. If $g > d + 1$, we choose a projection
\begin{equation*}
\varphi: A \rightarrow E_{j_1} \times E_{j_2} \times \cdots \times E_{j_{d+1}}, \ 1 \leq j_1 < j_2 < \cdots < j_{d+1}\leq g.
\end{equation*}
It clearly suffices to prove (RBC) for $\varphi(X)$.
(iii\textsubscript{0}) We can also make the following assumption: For any fibered product
\begin{equation*}
\pi^\prime: A^\prime = E_{1}^\prime \times_{S^\prime} E_{2}^\prime \times_{S^\prime} \cdots \times_{S^\prime} E_{g^\prime}^\prime \rightarrow S^\prime
\end{equation*}
of families of elliptic curves $E_j^\prime \rightarrow S^\prime$ ($1\leq j\leq g^\prime \leq g$) and any commutative diagram
\begin{equation}
\label{equation::new_family}
\begin{tikzcd}
A \ar[r, "\varphi", two heads] \ar[d, "\pi"]
& A^\prime \ar[d, "\pi^\prime"] \\
S \ar[r, two heads] & S^\prime
\end{tikzcd}
\end{equation}
with $\varphi$ a fiberwise homomorphism, we have
\begin{equation}
\label{equation::dimension_decent}
\dim(\varphi(X)) \geq \dim(X) - (g - g^\prime)
\end{equation}
with equality if and only if $\dim(A)=\dim(A^\prime)$.
In fact, the special case $\dim(A)=\dim(A^\prime)$ is trivial as then $\varphi$ is a fiberwise isogeny and $g=g^\prime$. Thus, we may suppose that there exist such $\pi^\prime: A^\prime \rightarrow S^\prime$ and $\varphi: A \rightarrow A^\prime$ with $\dim(A^\prime)<\dim(A)$ and
\begin{equation}
\label{equation::violation}
\dim(\varphi(X)) \leq \dim(X) - (g - g^\prime).
\end{equation}
By an induction on $\dim(A)$, we can also assume that (RBC) is already proven for the family $\pi^\prime: A^\prime \rightarrow S^\prime$. The sequence $\varphi(x_i)$ is $\varphi(X)$-generic and satisfies $\widehat{h}_{\iota^\prime}(\varphi(x_i)) \rightarrow 0$ for any immersion $\iota^\prime: A^\prime \hookrightarrow \mathbb{P}^{N^\prime}$. Therefore $\varphi(X)$ has to violate the assumption in (RBC), which means that there exists a horizontal torsion coset $Y^\prime \subseteq A^\prime$ containing $\varphi(X)$ and satisfying
\begin{equation*}
\dim(Y^\prime) - \dim(\varphi(X)) \leq \dim(S^\prime).
\end{equation*}
Using the inequality \eqref{equation::violation}, we infer further that
\begin{equation*}
\dim(Y^\prime) - \dim(X) + (g - g^\prime) \leq \dim(S^\prime).
\end{equation*}
The irreducible components of $\varphi^{-1}(Y^\prime)$ are horizontal torsion cosets. We can pick such an irreducible component $Y$ containing $X$ and notice that
\begin{equation*}
\dim(Y) \leq \dim(Y^\prime) + \dim(S) - \dim(S^\prime) + (g - g^\prime).
\end{equation*}
Combining the last two inequalities, we obtain
\begin{equation*}
\dim(Y) - \dim(X) \leq \dim(S).
\end{equation*}
This is a violation of the assumption in (RBC) for $X \subseteq A$, and thus there is nothing left to prove.
(iii) Before continuing with our reductions, let us point out some consequences of the previous assumption. For each $1 \leq k \leq g$, we write $$\mathrm{pr}_{\widehat{k}}: \textstyle\prod_{j=1}^g E_j \longrightarrow \textstyle\prod_{j=1, j \neq k}^g E_j$$ for the standard projection. The images $\mathrm{pr}_{\widehat{k}}(X)$, $1 \leq k \leq g$, have then all dimension $\dim(X)$. In fact, we have a commutative square
\begin{equation*}
\begin{tikzcd}
A = \prod_{j=1}^g E_j \ar[r, "\mathrm{pr}_{\widehat{k}}", two heads] \ar[d]
& \prod_{j=1, j \neq k}^g E_j \ar[d] \\
S \ar[r, equal] & S
\end{tikzcd}
\end{equation*}
as in \eqref{equation::new_family} above so that \eqref{equation::dimension_decent} implies
\begin{equation*}
\dim(\mathrm{pr}_{\widehat{k}}(X)) > \dim(X) - 1.
\end{equation*}
and thus $\dim(\mathrm{pr}_{\widehat{k}}(X)) = \dim(X)$.
A further consequence of the previous reduction is that $X$ is non-degenerate. In fact, if $X$ were degenerate, then \cite[Theorem 1.1 (i)]{Gao2018a} would produce a new family $\pi^\prime: A^\prime \rightarrow S^\prime$ and a fiberwise homomorphism $\varphi: A \twoheadrightarrow A^\prime$ filling a diagram \eqref{equation::new_family} but violating the constraint \eqref{equation::dimension_decent} on the dimension of $\varphi(X)$.
Even more, all the images $\mathrm{pr}_{\widehat{k}}(X)$, $1 \leq k \leq g$, are non-degenerate as well. Indeed, assume that this is not the case. Then, \cite[Theorem 1.1 (i)]{Gao2018a} supplies a commuting diagram
\begin{equation*}
\begin{tikzcd}
A = \prod_{j=1}^g E_j \ar[r, "\mathrm{pr}_{\widehat{k}}", two heads] \ar[d]
& \prod_{j=1, j \neq k}^g E_j \ar[d] \ar[r, "\varphi"] & \prod_{j=1}^{g^\prime} E_j^\prime \ar[d] \\
S \ar[r, equal] & S \ar[r] & S^\prime
\end{tikzcd}
\end{equation*}
with fiberwise homomorphisms along the upper row and such that
\begin{equation*}
\dim(\varphi(\mathrm{pr}_{\widehat{k}}(X))) < \dim(\mathrm{pr}_{\widehat{k}}(X)) - (g - 1 - g^\prime).
\end{equation*}
Using our assumption, we deduce conversely from \eqref{equation::dimension_decent} that
\begin{equation*}
\dim(\varphi(\mathrm{pr}_{\widehat{k}}(X))) > \dim(X) - (g - g^\prime).
\end{equation*}
A combination of these two inequalities yields
\begin{equation*}
\dim(\mathrm{pr}_{\widehat{k}}(X)) - (g - 1 - g^\prime) \geq \dim(X) - (g - g^\prime) + 2,
\end{equation*}
which is equivalent to the absurdity
\begin{equation*}
\dim(X) = \dim(\mathrm{pr}_{\widehat{k}}(X)) \geq \dim(X) + 1.
\end{equation*}
This proves our claim about the non-degeneracy of $\mathrm{pr}_{\widehat{k}}(X)$, $1 \leq k \leq g$.
For the convenience of the reader, let us briefly summarize the assumptions that we can and do tacitly assume in the following:
\begin{enumerate}
\item[(i)] there exists an $X$-generic sequence $(x_i) \in X^\mathbb{N}$ such that $\widehat{h}_{\iota}(x_i) \rightarrow 0$,
\item[(ii)] $\dim(A) - \dim(S) = g = d+1 = \dim(X) + 1$,
\item[(iii)] $X$ is non-degenerate, and every projection $\mathrm{pr}_{\widehat{k}}(X)$, $1\leq k \leq g$, is non-degenerate and has dimension $\dim(X)$.
\end{enumerate}
We continue with imposing two further restrictions on the family $\pi: A \rightarrow S$.
(iv) First, we can assume without loss of generality that it is a subfamily of the $g$-fold self-product of the universal family $\xi_\mathcal{N}: \mathcal{E}(\mathcal{N}) \rightarrow Y(\mathcal{N})$, $\mathcal{N} \geq 3$. There exists a classifying map $\mathcal{c}: S \rightarrow Y(1)^g$ (of algebraic stacks) such that
\begin{equation*}
\begin{tikzcd}
A \ar[r, "\varphi"] \ar[d] & \mathcal{E}(1)^g \ar[d] \\
S \ar[r, "\mathcal{c}"] & Y(1)^g
\end{tikzcd}
\end{equation*}
is a cartesian square, and we consider its pullback
\begin{equation*}
\begin{tikzcd}
A^\prime = A \times_{S} S^\prime \ar[r, "\varphi^\prime"] \ar[d] & \mathcal{E}(\mathcal{N})^g \ar[d] \\
S^\prime = S \times_{Y(1)} Y(\mathcal{N}) \ar[r, "\mathcal{c}^\prime"] & Y(\mathcal{N})^g
\end{tikzcd}
\end{equation*}
along $Y(\mathcal{N}) \rightarrow Y(1)$. As $S^\prime \rightarrow S$ is finite, it clearly suffices to prove (RBC) for the subvariety $X^\prime = X \times_S S^\prime \subseteq A^\prime$. Consider the induced subfamily $\pi^\prime: \varphi^\prime(A) \rightarrow \mathcal{c}^\prime(S)$. Assuming that (RBC) holds for this subfamily, we obtain as above that there exists a horizontal torsion coset $Y^{\prime\prime} \subseteq \varphi^\prime(A^\prime)$ with the property that
\begin{equation*}
\dim(Y^{\prime\prime}) - \dim(\varphi^\prime(X^\prime)) \leq \dim(\mathcal{c}^\prime(S^\prime)).
\end{equation*}
The preimage $Y^\prime=(\varphi^\prime)^{-1}(Y^{\prime\prime})$ is evidently a horizontal torsion coset of dimension $\dim(Y^{\prime\prime}) + \dim(S^\prime) - \dim(\mathcal{c}(S^\prime))$ containing $X$, and furthermore
\begin{equation*}
\dim(Y^\prime)-\dim(X^\prime) \leq \dim(Y^{\prime\prime}) + \dim(S^\prime) - \dim(\mathcal{c}^\prime(S^\prime)) - \dim(\varphi^\prime(X^\prime)) \leq \dim(S^\prime)
\end{equation*}
this is again contradicting the assumption of (RBC) for $X^\prime \subset A^\prime$ and hence also for $X \subset A$. We can and do hence assume that $A= \mathcal{E}(\mathcal{N})^g|_S$ for some $S \subseteq Y(\mathcal{N})^g$ where $\mathcal{N} \geq 3$ is fixed once and for all in the sequel.
(v) Second, we can use our free choice of the immersion $\iota: A \hookrightarrow \mathbb{P}^N_K$ in the statement of (RBC) to guarantee that
\begin{equation*}
\iota = (\sigma \circ (\iota_0 \times \cdots \times \iota_0))|_S
\end{equation*}
where $\iota_0: \mathcal{E}(\mathcal{N}) \hookrightarrow \mathbb{P}^{N_0}_K$ is an arbitrary projective immersion such that $\iota_0^\ast \mathcal{O}(1)$ is fiberwise symmetric and $\sigma: \mathbb{P}^{N_0}_K \times \cdots \times \mathbb{P}^{N_0}_K \hookrightarrow \mathbb{P}^N_K$ is the Segre embedding.
\section{Coverings and coordinates}
\label{subsection::coverings}
We recall the following commutative diagram, whose horizontal rows are universal coverings: \tikzcdset{every label/.append style = {font = \normalsize}}
\begin{equation*}
\begin{tikzcd}
\arrow[loop left, "{\normalsize \Gamma = (\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g}"] (\mathbb{C} \times \mathcal{H}_1)^g \ar[rr, "\mathcal{u}_{\mathrm{mixed}}"] \ar[d, two heads, "\ \widetilde{\pi}"]
& & \mathcal{E}(\mathcal{N})^g(\mathbb{C}) \ar[d, two heads, "\ \xi_{\mathcal{N}} \times \cdots \times \xi_{\mathcal{N}}"]
\\
\arrow[loop left, "{\normalsize \Gamma(\mathcal{N})^g}"] \mathcal{H}_1^g \ar[rr, "\mathcal{u}_{\mathrm{pure}}"] & & Y(\mathcal{N})^g(\mathbb{C}).
\end{tikzcd}
\end{equation*}
The covering transformations of $\mathcal{u}_{\mathrm{pure}}$ (resp.\ $\mathcal{u}_{\mathrm{mixed}}$) are given by the group $\Gamma(\mathcal{N})^g$ (resp.\ $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g$) where
\begin{equation*}
\Gamma(\mathcal{N}) = \left\{ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in \SL_2(\mathbb{Z}) \ \middle| \
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\equiv
\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} (\text{mod $\mathcal{N}$})
\right\}
\end{equation*}
acts on $\mathbb{Z}^2$ through its standard representation. This identification is such that the group element
\begin{equation*}
\left(
\begin{pmatrix} m_1 \\ n_1 \end{pmatrix},
\begin{pmatrix} a_1 & b_1 \\ c_1 & d_1 \end{pmatrix},
\dots,
\begin{pmatrix} m_g \\ n_g \end{pmatrix},
\begin{pmatrix} a_g & b_g \\ c_g & d_g \end{pmatrix} \right)
\in (\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g
\end{equation*}
sends $(z_1,\dots,z_g,\tau_1,\dots,\tau_g) \in (\mathbb{C} \times \mathcal{H}_1)^g$ to
\begin{equation*}
\left(\frac{z_1+m_1+n_1\tau_1}{c_1\tau_1+d_1},\dots, \frac{z_g+m_g+n_g\tau_g}{c_g\tau_g+d_g}, \frac{a_1\tau_1+b_1}{c_1\tau_1+d_1}, \dots, \frac{a_g\tau_g+b_g}{c_g\tau_g+d_g} \right)
\end{equation*}
(compare e.g.\ \cite[Section 8.8]{Birkenhake2004}).
On the complex manifold $(\mathbb{C} \times \mathcal{H}_1)^g$, we have the global holomorphic standard coordinates $z_l, \tau_l$ ($1\leq l \leq g$) and their complex-conjugates $\overline{z}_l, \overline{\tau}_l$. In addition, we define $2g$ real-analytic functions
\begin{equation*}
x_l, y_l: (\mathbb{C} \times \mathcal{H}_1)^g \longrightarrow \mathbb{R}, \ 1 \leq l \leq g,
\end{equation*}
by demanding $z_l = x_l + \tau_l y_l$.
The preimage $\mathcal{u}_{\mathrm{pure}}^{-1}(S)$ (resp.\ $\mathcal{u}_{\mathrm{mixed}}^{-1}(X)$) decomposes into irreducible analytic components of dimension $\dim(S)$ (resp.\ $\dim(X)$), on which the group $\Gamma(\mathcal{N})^g$ (resp.\ $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g$) acts transitively. Due to the absence of elliptic fixed points on $Y(\mathcal{N})$ (see e.g.\ \cite[Exercise 2.3.7]{Diamond2005}), the map $\mathcal{u}_{\mathrm{pure}}$ (resp.\ $\mathcal{u}_{\mathrm{mixed}}$) is étale and these components coincide with the connected components of $\mathcal{u}_{\mathrm{pure}}^{-1}(S)$ (resp.\ $\mathcal{u}_{\mathrm{mixed}}^{-1}(X)$) in the euclidean topology. In the sequel, we keep fixed an irreducible component $\widetilde{X}$ of $X$. Its image $\widetilde{S}=\widetilde{\pi}(\widetilde{X})$ is then an analytic component of the preimage of $S$.
\section{Overview of the proof}
\label{section::overview}
For convenience of the reader, we briefly expose the main lines of the argument employed for the proof of Theorem \ref{theorem:bogomolov} in the following sections. In Section \ref{subsection::equidistribution}, we use the product structure and the equidistribution results of \cite{Kuehnea} to obtain differential-geometric conditions on $\widetilde{X}$. These conditions appear as real-analytic differential equations \eqref{equation::differential_equation_1}, which can be written down explicitly in local charts of $\widetilde{X}$ and the local coordinates introduced in Section \ref{subsection::coverings} above.
A natural way to exploit these is to use monodromy, to wit, the fact that the stabilizer $\mathrm{Stab}(\widetilde{X}) \subseteq (\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g$ is rather large. This largeness follows by Hodge-theoretic techniques, which are exposed in Sections \ref{section::hodge1} to \ref{subsection::monodromy}. Besides rather explicit computations, we make use of a theorem of André \cite[Theorem 1]{Andre1992} on the normality of the algebraic monodromy group. Unfortunately, the equations \eqref{equation::differential_equation_1} are invariant under monodromy so that a direct application of monodromy fails; this failure is not really surprising since the Betti form, which gives rise to these equations, is invariant under monodromy.
To the rescue comes an important idea of André, Corvaja, and Zannier \cite[Subsection 5.2]{Andre2020} that allows us to actually take advantage of the fact that the real-analytic equations \eqref{equation::differential_equation_1} contain both holomorphic and anti-holomorphic terms. In short, we replace $\widetilde{X}$ and \eqref{equation::differential_equation_1} with $\widetilde{X} \times \widetilde{X}$ and a new set of real-analytic differential equations \eqref{equation::differential_equation_2}. This is the content of Section \ref{subsection::separation}.
Following a computation of the transformation behavior of \eqref{equation::differential_equation_2} under monodromy (Section \ref{section::monodromy}) and a final technical preparation in Section \ref{section::technical}, we use explicit elements of the algebraic monodromy group to prove first that -- under the assumptions of (RBC) -- all factors are isogeneous (Sections \ref{section::reduction1} and \ref{subsection::diagonal}). With this at our disposal, we then deduce a linear equation \eqref{equation::linear_equation} on $\widetilde{X}$ in the coordinates $z_1,\dots,z_n$. Gao's mixed Ax-Schaunel theorem \cite{Gao2018} enables us then to conclude the proof of Theorem \ref{theorem:bogomolov} (Section \ref{section::last}).
\section{Equidistribution}
\label{subsection::equidistribution}
Let us start with defining the equilibrium measure. The $(1,1)$-form
\begin{equation}
\label{equation::invariant_form}
\frac{i}{\mathrm{Im}(\tau_j)} (dz_j - y_j d\tau_j ) \wedge (d\overline{z}_j - y_j d\overline{\tau}_j)
\end{equation}
on $(\mathbb{C} \times \mathcal{H}_1)^g$ is $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g$-invariant (see \cite[Lemma 2.6]{Dimitrov2021}) and hence descends to a $(1,1)$-form $\alpha_j$ on $A(\mathbb{C})$. We define the $(1,1)$-form
\begin{equation*}
\beta = \sum_{j=1}^g \alpha_i
\end{equation*}
and consider its $d$-fold exterior power
\begin{equation}
\label{equation:formula_mu}
\beta^{\wedge d} = d! \cdot \sum_{j=1}^{g} \alpha^\prime_j, \ \alpha^\prime_j =
\alpha_1 \wedge \cdots \wedge \alpha_{j-1} \wedge \alpha_{j+1} \wedge \cdots \wedge \alpha_g.
\end{equation}
Up to multiplication with some (strictly) positive real number, this coincides with the smooth closed $(1,1)$-form on $A(\mathbb{C})$ provided by \cite[Lemma 2.6]{Dimitrov2021a} (compare also the proofs of \cite[Lemmas 7 and 11]{Kuehnea}). By Theorem \cite[Theorem 1]{Kuehnea} (and its proof), there exists some $\mathcal{k}_X>0$ such that
\begin{equation}
\label{equation:equidistribution_bogo1}
\frac{1}{\# \mathbf{O}(x_i)}\sum_{x \in \mathbf{O}(x_i)} f(x)\longrightarrow \mathcal{k}_{X} \int_{X(\mathbb{C})} f \beta^{\wedge d},
\ i \rightarrow \infty,
\end{equation}
for every continuous function $f \in \mathscr{C}^0_c(X)(\mathbb{C})$. Note that each $\alpha_j^\prime|_{X(\mathbb{C})}$, $1\leq j \leq g$, is non-zero as $\mathrm{pr}_{\widehat{j}}(X)$ is non-degenerate by the reductions in Section \ref{subsection::reductions} above.
For given integers $n_1,\dots,n_{g} > 0$, we consider the homomorphism
\begin{equation*}
\varphi: E_1 \times_S \cdots \times_S E_{g} \longrightarrow E_1 \times_S \cdots \times_S E_{g}, \ (x_1,\dots,x_{g}) \longmapsto ([n_1]x_1,\dots,[n_{g}]x_{g}),
\end{equation*}
and set $Y=\varphi(X)$. We claim that $(\varphi^\ast \beta|_Y)^{\wedge d}$ is real-proportional to $(\beta|_X)^{\wedge d}$. As $\varphi$ is étale, there exists a non-empty open subset $U \subseteq X(\mathbb{C})$ such that the restriction $\varphi|_U: U \rightarrow \varphi(U)$ is a biholomorphism. Writing $y_i = \varphi(x_i)$, the sequence $(y_i)$ is $Y$-generic and satisfies $\widehat{h}_\iota(y_i)\rightarrow 0$. By the above argument applied to $Y$ instead of $X$, we have hence
\begin{equation}
\label{equation:equidistribution_bogo2}
\frac{1}{\# \mathbf{O}(y_i)}\sum_{y \in \mathbf{O}(y_i)} g(y)\longrightarrow \mathcal{k}_Y \int_{Y(\mathbb{C})} g \beta^{\wedge d},
\ i \rightarrow \infty,
\end{equation}
for every $g\in \mathcal{C}^0_c(Y(\mathbb{C}))$. For any continuous function $f\in \mathcal{C}^0_c(U)$, there exists a (unique) continuous function $g\in \mathcal{C}^0_c(\varphi(U))$ such that $f = g \circ \varphi$. As $\varphi(\mathbf{O}(x_i))=\mathbf{O}(y_i)$, we have
\begin{equation*}
\frac{1}{\# \mathbf{O}(x_i)}\sum_{x \in \mathbf{O}(x_i)} f(x) = \frac{1}{\# \mathbf{O}(y_i)}\sum_{y \in \mathbf{O}(y_i)} g(y)
\end{equation*}
in this situation. Hence the limits in \eqref{equation:equidistribution_bogo1} and \eqref{equation:equidistribution_bogo2} are equal, which means that
\begin{equation*}
\mathcal{k}_X \int_{X(\mathbb{C})} f \beta^{\wedge d} =
\mathcal{k}_Y \int_{X(\mathbb{C})} f (\varphi^\ast \beta)^{\wedge d}
\end{equation*}
for any $f\in\mathcal{C}^0_c(V)$. Varying the test function $f$, we infer that $\mathcal{k}_X (\beta|_V)^{\wedge d} = \mathcal{k}_Y (\varphi^\ast \beta|_V)^{\wedge d}$. Since $\beta$ has real-analytic coefficients, this completes the proof of the claim.
As $\varphi^\ast \alpha_j = n_j^2 \alpha_j$, we have $$\varphi^\ast \alpha_j^\prime = (\textstyle\prod_{\substack{k \in \{1,\dots, g\}, k \neq j}} n_k^2) \cdot \alpha_j^\prime$$ for every $j \in \{1,\dots, g\}$. Thus, we have
\begin{equation*}
(\varphi^\ast \beta|_{X(\mathbb{C})})^{\wedge d} = d! \cdot \sum_{j=1}^g (\textstyle\prod_{\substack{k \in \{1,\dots, g\}, k \neq j}} n_k^2) \cdot \alpha_j^\prime|_{X(\mathbb{C})}
\end{equation*}
and hence the $(d,d)$-forms
\begin{equation*}
\sum_{j=1}^g \alpha_j^\prime|_{X(\mathbb{C})} \ \text{ and } \ \sum_{j=1}^g (\textstyle\prod_{\substack{k \in \{1,\dots, g\}, k \neq j}} n_k^2) \cdot \alpha_j^\prime|_{X(\mathbb{C})}
\end{equation*}
are proportional by a positive real constant, which depends on $n_1,\dots,n_g$.
We claim that all $(d,d)$-forms $\alpha_j^\prime|_{X(\mathbb{C})}$, $j \in \{1,\dots, g\}$, are pairwise proportional up to positive real constants. In fact, choosing for example $n_{1} = n_2 = \cdots = n_{g-1} = 1$ and $n_g = 2$ yields that
\begin{equation*}
\sum_{j=1}^{g} \alpha_j^\prime|_{X(\mathbb{C})} \ \text{ and } \ \sum_{j=1}^{g-1} \alpha_j^\prime|_{X(\mathbb{C})} + \frac{1}{4} \cdot \alpha_g^\prime|_{X(\mathbb{C})}
\end{equation*}
are proportional by a real positive constant. Rewriting this proportionality, we obtain that
\begin{equation*}
\sum_{j=1}^{g-1} \alpha_j^\prime|_{X(\mathbb{C})} \ \text{ and } \ \alpha_g^\prime|_{X(\mathbb{C})}
\end{equation*}
are proportional by a positive real constant. (Note that the positivity of the volume forms $\alpha_j^\prime|_{X(\mathbb{C})}$, $1\leq j \leq g$, is used here to ensure that these proportionality factors are (strictly) positive.) This implies that also
\begin{equation*}
\sum_{j=1}^{g} \alpha_j^\prime|_{X(\mathbb{C})} \ \text{ and } \ \alpha_g^\prime|_{X(\mathbb{C})}
\end{equation*}
are proportional by a positive real constant. We obtain similarly that each $\alpha_j^\prime|_{X(\mathbb{C})}$, $j \in \{1,\dots, g -1 \}$, is proportional to $\sum_{j=1}^{g} \alpha_j^\prime|_{X(\mathbb{C})}$, whence our claim. For later reference, let us choose reals $r_1,\dots,r_g>0$ such that
\begin{equation*}
r_1 \alpha_1^{\prime}|_{X(\mathbb{C})} = r_2 \alpha_2^{\prime}|_{X(\mathbb{C})} = \cdots = r_g \alpha_g^{\prime}|_{X(\mathbb{C})}.
\end{equation*}
This constitutes a differential-geometric restriction on the analytic subset $X(\mathbb{C})$ of $\mathcal{E}(\mathcal{N})(\mathbb{C})$. Pulling these back along $\mathcal{u}_{\mathrm{mixed}}$, we obtain similar restrictions on $\widetilde{X} \subset (\mathbb{C} \rtimes \mathcal{H}_1)^g$. Let us spell these out in terms of a general local chart
\begin{equation*}
\chi: B_1(0)^d = \{ (w_1,\dots,w_d) \in \mathbb{C}^d \ | \ \max\{|w_1|,|w_2|,\dots,|w_d|\} < 1 \} \longrightarrow \widetilde{X}.
\end{equation*}
For each function $f$ on $\widetilde{X}$, we simply write $f$ (resp.\ $\partial f/ \partial w_m$, $\partial f/ \partial \overline{w}_m$) instead of $f \circ \chi$ (resp.\ $\partial (f \circ \chi)/\partial w_m$, $\partial (f \circ \chi)/\partial \overline{w}_m$). With this notation, the $(1,1)$-form $(\chi \circ \mathcal{u}_{\mathrm{mixed}})^\ast \alpha_j$, $j \in \{1,\dots, d\}$, on $B_1(0)^d$ equals
\begin{align*}
\frac{i}{\mathrm{Im}(\tau_j)} \left( \sum_{m=1}^d \left[ \frac{\partial z_j}{\partial w_m} - \frac{\mathrm{Im}(z_j)}{\mathrm{Im}(\tau_j)} \frac{\partial \tau_j}{\partial w_m} \right] dw_m\right) \wedge
\left( \sum_{m=1}^d \overline{\left[ \frac{\partial z_j}{\partial w_m} - \frac{\mathrm{Im}(z_j)}{\mathrm{Im}(\tau_j)} \frac{\partial \tau_j}{\partial w_m} \right]} d\overline{w}_m\right).
\end{align*}
Consequently, the $(d,d)$-form $(\chi \circ \mathcal{u}_{\mathrm{mixed}})^\ast \alpha_j^\prime$, $j \in \{1,\dots, d\}$, on $B_1(0)^d$ equals
\begin{equation}
\label{equation::alpha_j_prime}
\frac{i^d}{\prod_{k \in \{1,\dots,g\},k\neq j} \mathrm{Im}(\tau_k)}
\left| \det (\mathbf{A}_j) \right|^2 w_1 \wedge \overline{w}_1 \wedge \cdots \wedge w_d \wedge \overline{w}_d
\end{equation}
with
\begin{equation*}
\mathbf A_j = \left( \frac{\partial z_l}{\partial w_m} - \frac{\mathrm{Im}(z_l)}{\mathrm{Im}(\tau_l)} \frac{\partial \tau_l}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}.
\end{equation*}
Therefore, the equality $r_j \alpha_j^{\prime}|_X = r_k \alpha_k^{\prime}|_X$, $j,k \in \{1,\dots, g\}$, implies
\begin{equation}
\label{equation::differential_equation_1}
r_j(\tau_j-\overline{\tau}_j)^3 \det(\mathbf B_j) \det(\mathbf C_j)
=
r_k(\tau_k-\overline{\tau}_k)^3 \det(\mathbf B_k) \det(\mathbf C_k)
\end{equation}
on $B_1(0)^d$ where we set
\begin{equation*}
\mathbf B_j = \left( (\tau_l -\overline{\tau}_l) \cdot \frac{\partial z_l}{\partial w_m} - (z_l - \overline{z}_l) \cdot \frac{\partial \tau_l}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}},
\end{equation*}
and
\begin{equation*}
\mathbf C_j = \left( (\tau_l -\overline{\tau}_l) \cdot \frac{\partial \overline{z}_l}{\partial \overline{w}_m} - (z_l - \overline{z}_l) \cdot \frac{\partial \overline{\tau}_l}{\partial \overline{w}_m} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\end{equation*}
for each $j \in \{1,\dots, g\}$.
\section{A variation of mixed Hodge structures on $X(\mathbb{C})$}
\label{section::hodge1}
In this section, we decorate the complex analytic space $X(\mathbb{C})$ with a variation of mixed $\mathbb{Z}$-Hodge structures. We refer to \cite[Subsection 14.4.1]{Peters2008} for basic definitions concerning (admissible) variations of mixed $\mathbb{Z}$-Hodge structures on complex analytic spaces.
As a starting point, we endow the family $\mathcal{E}(\mathcal{N})(\mathbb{C})$ with a variation $H^\prime=(\mathbb{V}_\mathbb{Z},\mathcal{F}^\bullet,W_\bullet)$ of mixed $\mathbb{Z}$-Hodge structures following Deligne \cite[Section 10]{Deligne1974}: The $\mathbb{Z}$-modules
\begin{equation*}
\mathbb{V}_{\mathbb{Z},x} = \{ (l,n) \in \mathrm{Lie}(\mathcal{E}(\mathcal{N})_{\xi_\mathcal{N}(x)})(\mathbb{C}) \times \mathbb{Z} \ | \ \exp_{\xi_\mathcal{N}(x)}(l) = [n](x) \}
\end{equation*}
are naturally the stalks of a local system $\mathbb{V}_{\mathbb{Z}}$ on $\mathcal{E}(\mathcal{N})(\mathbb{C})$ having $\mathbb{Z}$-rank $3$. Furthermore, the Lie group exponential yields an exact sequence
\begin{equation*}
0 \longrightarrow \xi_{\mathcal{N}}^\ast (R^{1} \xi_{\mathcal{N},\ast} \underline{\mathbb{Z}}_{\mathcal{E}(\mathcal{N})(\mathbb{C})})^\vee \longrightarrow \mathbb{V}_{\mathbb{Z}} \longrightarrow \underline{\mathbb{Z}}_{\mathcal{E}(\mathcal{N})(\mathbb{C})} \longrightarrow 0
\end{equation*}
of $\mathbb{Z}$-local systems on $\mathcal{E}(\mathcal{N})(\mathbb{C})$. (We write $\underline{\mathbb{Z}}_{\mathcal{E}(\mathcal{N})(\mathbb{C})}$ for the locally constant sheaf with stalk $\mathbb{Z}$ on $\mathcal{E}(\mathcal{N})(\mathbb{C})$.) We use this to define the weight filtration as
\begin{equation*}
W_0 = \mathbb{V}_{\mathbb{Z}}, \ W_{-1} = \xi_{\mathcal{N}}^\ast (R^{1} \xi_{\mathcal{N},\ast} \underline{\mathbb{Z}}_{\mathcal{E}(\mathcal{N})(\mathbb{C})})^\vee, \ W_{-2} = 0.
\end{equation*}
Writing $\mathcal{V} = \mathbb{V}_\mathbb{Z} \otimes \mathcal{O}_{\mathcal{E}(\mathcal{N})(\mathbb{C})}$ for the associated holomorphic vector bundle, we note that the stalk-wise projections $\mathbb{V}_{\mathbb{Z},x} \rightarrow \mathrm{Lie}(\mathcal{E}(\mathcal{N})_{\xi_{\mathcal{N}}(x)})(\mathbb{C})$ extend to a map
\begin{equation*}
\phi: \mathcal{V} \rightarrow \xi_{\mathcal{N}}^\ast \mathrm{Lie}(\mathcal{E}(\mathcal{N}))(\mathbb{C})
\end{equation*}
of $\mathcal{O}_{\mathcal{E}(\mathcal{N})(\mathbb{C})}$-sheaves where $\mathrm{Lie}(\mathcal{E}(\mathcal{N}))(\mathbb{C})$ is the sheaf on $Y(\mathcal{N})(\mathbb{C})$ having stalks $\mathrm{Lie}(\mathcal{E}(\mathcal{N})_x)$, $x \in Y(\mathcal{N})(\mathbb{C})$. We use this to define the Hodge filtration
\begin{equation*}
\mathcal{F}^1 = 0, \ \mathcal{F}^0 = \mathrm{ker}(\phi), \ \mathcal{F}^{-1} = \mathcal{V},
\end{equation*}
so that we obtain a mixed Hodge structure of type $\{(0,0), (-1,0), (0,-1)\}$.
The induced mixed $\mathbb{Q}$-Hodge structure $H_\mathbb{Q}=(\mathbb{V}_\mathbb{Q},\mathcal{F}^\bullet,W_{\bullet,\mathbb{Q}})$ can also be described in terms of Shimura theory. For this, we note that $\mathcal{E}(\mathcal{N})(\mathbb{C})$ is one of the connected components of the mixed Shimura variety associated to the datum $(\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{GL}_{2,\mathbb{Q}}, \mathbb{C} \times \mathcal{H}_1)$ where $\GL_{2,\mathbb{Q}}$ acts on $\mathbb{G}_{a,\mathbb{Q}}^2$ via its standard representation (compare \cite[Chapter 10]{Pink1990}) and the neat open compact subgroup
\begin{equation*}
\mathcal{K}(\mathcal{N}) = \left\{ \left(\begin{pmatrix} m \\ n \end{pmatrix}, \begin{pmatrix} a & b \\ c & d \end{pmatrix} \right) \in \widehat{\IZ}^2 \times \GL_2(\widehat{\IZ}) \ \middle| \
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\equiv
\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} (\text{mod $\mathcal{N}$})
\right\};
\end{equation*}
see \cite[Section 0.6]{Pink1990} for the definition of neatness in adelic groups and the proof that $\mathcal{K}(\mathcal{N})$, $\mathcal{N} \geq 3$, is neat. The mixed $\mathbb{Q}$-Hodge structure $H_\mathbb{Q}^\prime$ is then induced in the standard way (\cite[Propositions 1.7 and 1.10]{Pink1990}) from the representation
\begin{equation}
\label{equation::product}
\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{GL}_{2,\mathbb{Q}} =
\begin{pmatrix} \GL_{2,\mathbb{Q}} & \mathbb{G}_a^2 \\ 0 & 1 \end{pmatrix} \hookrightarrow \mathrm{GL}_{3,\mathbb{Q}}.
\end{equation}
Writing $\mathrm{pr}_i: \mathcal{E}(\mathcal{N})^g \rightarrow \mathcal{E}(\mathcal{N})$ for the projection to the $i$-th factor, we endow $\mathcal{E}(\mathcal{N})^g(\mathbb{C})$ with the variation $H = \bigoplus_{j=1}^g\mathrm{pr}_j^\ast H^\prime$ of mixed $\mathbb{Z}$-Hodge structures. The base change $H_\mathbb{Q}$ can again be interpreted in Shimura-theoretic terms as arising from the $g$-fold product of the representation in \eqref{equation::product}. This allows to invoke a result of Wildeshaus \cite[Theorem II.2.2]{Wildeshaus1997} implying that $H$ is an admissible variation of mixed $\mathbb{Z}$-Hodge structures. Finally, the restriction $H|_{X(\mathbb{C})}$ is the desired admissible variation of mixed $\mathbb{Z}$-Hodge structures on $X(\mathbb{C})$. (By definition (see e.g.\ \cite[Definition 14.49]{Peters2008}), admissibility is trivially perserved by passing to analytic subvarieties.) In the following, we write $H|_X$ instead of $H|_{X(\mathbb{C})}$ to simplify our notation. We also write $H_x$ for the mixed Hodge structure associated with a point $x \in X(\mathbb{C})$.
\section{The generic Mumford-Tate group of $H|_X$}
\label{subsection::mumfordtategroup}
Write $\mathrm{MT}(H|_X)$ for the generic Mumford-Tate group of $H|_{X}$. It is clear that $\mathrm{MT}(H|_X) \subseteq (\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{GL}_{2,\mathbb{Q}})^g$ -- both from the explicit description and the Shimura-theoretic formulation. There exists a countable union $\mathcal{Z} \subseteq X(\mathbb{C})$ of proper analytic subvarieties such that $\mathrm{MT}(H|_X)=\mathrm{MT}(H_x)$ for all $x \in X(\mathbb{C}) \setminus \mathcal{Z}$ and that, for all points $x\in X(\mathbb{C})$, we have $\mathrm{MT}(H_x)\subseteq \mathrm{MT}(H|_X)$; we refer the reader to \cite[Section 4]{Andre1992} or \cite[Section 6]{Milne2013} for details.
Analogous results are true for the generic Mumford-Tate group $\mathrm{MT}(H_{-1}|_X) \subseteq \GL_{2,\mathbb{Q}}^g$ of the variation $H_{-1}|_X = W_{-1}/W_{-2}(H|_X)$ of pure $\mathbb{Z}$-Hodge structures of weight $-1$. There is an evident surjective homomorphism $\mathrm{MT}(H|_X) \twoheadrightarrow \mathrm{MT}(H_{-1}|_X)$ between the generic Mumford-Tate groups; we hence determine $\mathrm{MT}(H_{-1}|_X)$ first. Its structure is mostly related to the presence or absence of generic isogenies between the factors of $A=\prod_{j=1}^g E_j$.
For this reason, we make a further assumption to simplify our notation: Write $\eta$ for the generic point of $S$. In the sequel, we may and do assume that there exist integers
\begin{equation*}
i_1 = 1 < i_2 < \cdots < i_{p+1} = g + 1
\end{equation*}
such that the elliptic curves
\begin{equation*}
E_{i_q, \eta}, E_{i_q+1, \eta}, \dots, E_{i_{q+1}-1, \eta}
\end{equation*}
are isogeneous for each $1\leq q \leq p$, and the elliptic curves
\begin{equation*}
E_{i_1,\eta}, E_{i_2,\eta}, \dots, E_{i_p,\eta}
\end{equation*}
are pairwise non-isogeneous. Set also $g_q = i_{q+1} - i_q$ for each $q \in \{1,\dots, p \}$. For the proof of Theorem \ref{theorem:bogomolov}, we can even assume that
\begin{equation*}
E_{i_q, \eta} = E_{i_q+1, \eta} = \cdots = E_{i_{q+1}-1, \eta}
\end{equation*}
for each $1\leq q \leq p$. We also assume that there exists a $p^\prime \in \{0,\dots, p\}$ such that the families
\begin{equation*}
E_{i_1} \rightarrow S, \ E_{i_2} \rightarrow S, \ \dots, \ E_{i_{p^\prime}} \rightarrow S
\end{equation*}
are non-isotrivial, and the families
\begin{equation*}
E_{i_{p^\prime+1}} \rightarrow S, \ E_{i_{p^\prime+2}} \rightarrow S, \ \dots, \ E_{i_{p}} \rightarrow S
\end{equation*}
are constant. (In particular, all families are constant if $p^\prime=0$ and non-isotrivial if $p^\prime=p$.) We set $g^\prime = i_{p^\prime+1}-1$ and $A_{\mathrm{cst}} \times S = E_{g^\prime+1} \times_S \cdots \times_S E_{g}$. For any sufficiently generic point $s \in S(\mathbb{C})$ (i.e., $s$ is not contained in a countable union of proper analytic subvarieties of $S(\mathbb{C})$), the elliptic curves
\begin{equation*}
E_{i_1,s}, E_{i_2,s}, \dots, E_{i_{p},s}
\end{equation*}
are pairwise non-isogeneous and none of the curves
\begin{equation*}
E_{i_1,s}, E_{i_2,s}, \dots, E_{i_{p^\prime},s}
\end{equation*}
has complex multiplication. Using \cite[Theorems B.53 and B.72]{Lewis1999}, we obtain for every point $x \in \pi^{-1}(s)$ that
\begin{equation}
\label{equation::genMT-1}
\mathrm{MT}(H_{-1,x}) = \mathbb{G}_m (\Delta_{g_1}(\mathrm{SL}_{2,\mathbb{Q}}) \times \cdots \times \Delta_{g_{p^\prime}}(\mathrm{SL}_{2,\mathbb{Q}}) \times \mathrm{Hg}(A_{\mathrm{cst}})) \subseteq \GL_{2,\mathbb{Q}}^g
\end{equation}
where $\Delta_k: \SL_{2,\mathbb{Q}} \rightarrow \SL_{2,\mathbb{Q}}^k$, $k \in \mathbb{Z}^{>0}$, denotes the diagonal map and $\mathrm{Hg}(A_{\mathrm{cst}})$ is the Hodge group of $A_{\mathrm{cst}}$, which we do not need to determine here. As $s$ is sufficiently generic, the subgroup in \eqref{equation::genMT-1} equals the generic Mumford-Tate group $\mathrm{MT}(H_{-1}|_X)$.
For each $x\in X$, we let $U_x$ denote the unipotent radical of $\mathrm{MT}(H_x)$. By \cite[Lemma 2.(c)]{Andre1992}, the sequence
\begin{equation*}
\begin{tikzcd}
1 \ar[r] & U_x \ar[r] & \mathrm{MT}(H_{x}) \ar[r] & \mathrm{MT}(H_{-1,x}) \ar[r] & 1
\end{tikzcd}
\end{equation*}
is exact. We claim that $\dim(U_x)=2g = 2 \sum_{q=1}^p g_q$ for a sufficiently general $x \in X(\mathbb{C})$. This leads immediately to
\begin{equation}
\label{equation::genMT-2}
\mathrm{MT}(H_x) = \mathbb{G}_m \prod_{q=1}^{p^\prime} \left( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}} \right) \times (\mathbb{G}_{a,\mathbb{Q}}^{2(g-g^\prime)} \rtimes \mathrm{Hg}(A_{\mathrm{cst}})) \subseteq (\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{GL}_{2,\mathbb{Q}})^g
\end{equation}
by comparing dimensions; here each copy of $\mathrm{SL_2}$ acts on the respective additive group $\mathbb{G}_{a,\mathbb{Q}}^{2g_q} = \mathbb{G}_{a,\mathbb{Q}}^2 \times \cdots \times \mathbb{G}_{a,\mathbb{Q}}^2$ diagonally on each factor $\mathbb{G}_{a,\mathbb{Q}}^2$. Similarly, $\mathrm{Hg}(A_{\mathrm{cst}})$ acts on $\mathbb{G}_{a,\mathbb{Q}}^{2(g-g^\prime)}$ but we do not need to specify this action further. Again, it follows that the generic Mumford-Tate group $\mathrm{MT}(H|_X)$ is the group in \eqref{equation::genMT-2}.
The remaining claim follows by applying \cite[Proposition 1]{Andre1992} for the mixed Hodge structure $H_x$ at a sufficiently general point
\begin{equation}
\label{equation::gen_point}
x = (x_1,\dots,x_g) \in X \subset E_1 \times_S \cdots \times_S E_g = A
\end{equation}
such that the elliptic curves $\mathcal{E}(\mathcal{N})_{\xi_{\mathcal{N}}(x_{i_q})}$, $1\leq q \leq p$, are pairwise non-isogeneous. We can freely assume that, as \eqref{equation::gen_point} varies, the generic rank of
\begin{equation}
\label{equation::rank}
\mathrm{rank}_{R_q}(R_q x_{i_q} + \cdots + R_q x_{i_{q+1}-1}), \ R_q=\mathrm{End}(\mathcal{E}(\mathcal{N})_{\xi_{\mathcal{N}}(x_{i_q})}),
\end{equation}
equals $i_{q+1} - i_q = g_q$; for otherwise $X$ would be contained in a proper horizontal torsion coset of $A$, which contradicts the assumption made in the statement of (RBC). This allows us to choose \eqref{equation::gen_point} further such that, for all $q \in \{1,\dots, p \}$, the rank in \eqref{equation::rank} is $g_q$.
We invoke the said proposition from \cite{Andre1992} for the $1$-motive $[u: \mathbb{Z}^g \rightarrow A_{\pi(x)}]$ where
\begin{equation*}
u: (n_1, n_2, \dots,n_g) \longmapsto (n_1 x_1 , n_2 x_2, \dots, n_g x_g).
\end{equation*}
The Zariski closure of $u(\mathbb{Z}^g)$ is $A_{\pi(x)}$ by our assumptions \eqref{equation::rank}. Furthermore, we have
\begin{equation*}
\mathrm{End}(A_{\pi(x)}) =
R_1^{g_1 \times g_1} \times
\cdots \times
R_p^{g_p \times g_p}.
\end{equation*}
so that
\begin{multline}
\label{equation::unipotent_andre}
\mathrm{Hom}_{\mathrm{End}_\mathbb{Q}(A_{\pi(x)})}
(\mathrm{End}_\mathbb{Q}(A_{\pi(x)})\cdot u(\mathbb{Z}^g),H_1(A_{\pi(x)},\mathbb{Q})) \\
=
\prod_{q=1}^p
\mathrm{Hom}_{R_{q,\mathbb{Q}}}
(R_{q,\mathbb{Q}} \cdot u_q(\mathbb{Z}^{g_q}),H_1(A_{\pi(x)},\mathbb{Q}))
\end{multline}
where $u_q: \mathbb{Z}^{g_q} \rightarrow E_{i_q} \times E_{i_q+1} \times \cdots \times E_{i_{q+1}-1} = E_{i_q}^{g_q}$, $1 \leq q \leq p$, is defined by
\begin{equation*}
u_q(n_{i_q},n_{i_q+1},\dots,n_{i_{q+1}-1})=(n_{i_q} x_{i_q} , n_{i_q+1} x_{i_q+1}, \dots, n_{i_{q+1}-1} x_{i_{q+1}-1}).
\end{equation*}
If the elliptic curve $\mathcal{E}(\mathcal{N})_{\xi_{\mathcal{N}}(x_{i_q})}$, $q \in \{1,\dots, p\}$, has no complex multiplication, then \eqref{equation::rank} implies
\begin{align*}
\mathrm{Hom}_{R_{q,\mathbb{Q}}}
(R_{q,\mathbb{Q}} \cdot u_q(\mathbb{Z}^{g_q}),H_1(A_{\pi(x)},\mathbb{Q}))
&\approx \Hom_{\mathbb{Q}^{g_q\times g_q}}(\mathbb{Q}^{g_q\times g_q}\cdot u_q(\mathbb{Z}^{g_q}), (\mathbb{Q}^{2})^{g_p}) \\
&\approx \Hom_{\mathbb{Q}}(\mathbb{Q} \cdot u_q(\mathbb{Z}^{g_q}),\mathbb{Q}^2) \\
&\approx \Hom_{\mathbb{Q}}(\mathbb{Q}^{g_p},\mathbb{Q}^2) \approx \mathbb{Q}^{2g_p}.
\end{align*}
Similarly, if the elliptic curve $\mathcal{E}(\mathcal{N})_{\xi_{\mathcal{N}}(x_{i_q})}$, $q \in \{1,\dots, p\}$, has complex multiplication, then
\begin{align*}
\mathrm{Hom}_{R_{q,\mathbb{Q}}}
(R_{q,\mathbb{Q}} \cdot u_q(\mathbb{Z}^{g_q}),H_1(A_{\pi(x)},\mathbb{Q}))
&\approx \Hom_{R_{q,\mathbb{Q}}^{g_q\times g_q}}(R_{q,\mathbb{Q}}^{g_q\times g_q}\cdot u_q(\mathbb{Z}^{g_q}),R_{q,\mathbb{Q}}^{g_q}) \\
&\approx \Hom_{R_{q,\mathbb{Q}}}(R_{q,\mathbb{Q}} \cdot u_q(\mathbb{Z}^{g_q}),R_{q,\mathbb{Q}}) \\
&\approx \Hom_{R_{q,\mathbb{Q}}}(R_{q,\mathbb{Q}}^{g_p},R_{q,\mathbb{Q}}) \approx R_{q,\mathbb{Q}}^{g_q} \approx \mathbb{Q}^{2g_q}
\end{align*}
by \eqref{equation::rank}. Thus the $\mathbb{Q}$-dimension of \eqref{equation::unipotent_andre} is $2g$. By André's proposition, the dimension of $U_x$ equals the $\mathbb{Q}$-dimension of the linear space \eqref{equation::unipotent_andre}, whence \eqref{equation::genMT-2}.
Finally, let us note that the generic derived Mumford-Tate group is
\begin{equation}
\label{equation::derivedMT}
\mathrm{MT}^{\mathrm{der}}(H|_X)=\prod_{q=1}^{p^\prime} \left( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}} \right) \times (\mathbb{G}_{a,\mathbb{Q}}^{2(g-g^\prime)} \rtimes \mathrm{Hg}(A_{\mathrm{cst}}))^{\mathrm{der}}.
\end{equation}
In fact, it is a normal subgroup of $\mathrm{MT}(H|_X)$. Furthermore, its normal subgroup
\begin{equation*}
G = \mathrm{MT}^{\mathrm{der}}(H|_X) \cap \left(\prod_{q=1}^{p^\prime} \left( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}} \right) \times \{ e \}\right)
\end{equation*}
projects surjectively onto
\begin{equation*}
\mathrm{MT}^{\mathrm{der}}(H_{-1,x}) = \Delta_{g_1}(\mathrm{SL}_{2,\mathbb{Q}}) \times \cdots \times \Delta_{g_{p^\prime}}(\mathrm{SL}_{2,\mathbb{Q}}) = \SL_{2,\mathbb{Q}}^{p^\prime} \subseteq \SL_{2,\mathbb{Q}}^{g^\prime} = (\GL_{2,\mathbb{Q}}^{g^\prime})^{\mathrm{der}}.
\end{equation*}
The following lemma, which is also of use in the next section, yields \eqref{equation::derivedMT}.
\begin{lemma}
\label{lemma::normality}
Let $G \subseteq \prod_{q=1}^{p^\prime} ( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}})$ be a normal $\mathbb{Q}$-algebraic subgroup projecting onto $\mathrm{SL}_{2,\mathbb{Q}}^{p^\prime}$. Then, we have $G=\prod_{q=1}^{p^\prime} ( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}})$.
\end{lemma}
\begin{proof}
We first consider the case $p^\prime=1$ and write $g$ instead of $g_1$. Note that for every $$(v_1,\dots,v_{g})\in (\overline{\mathbb{Q}}^2)^{g}$$ and every $$(w_1,\dots,w_{g},\gamma) \in (\overline{\mathbb{Q}}^2)^{g} \rtimes \SL_2(\overline{\mathbb{Q}}),$$
the conjugate
\begin{equation*}
\left(v_1,\dots,v_{g},\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\right)
\cdot (w_1,\dots,w_{g},\gamma)
\cdot \left(v_1,\dots,v_{g},\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\right)^{-1}
\end{equation*}
equals
\begin{equation*}
(v_1-\gamma(v_1) + w_1,\dots,v_{g}-\gamma(v_{g}) + w_{g},\gamma).
\end{equation*}
Choose now a $\gamma = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\in \SL_2(\overline{\mathbb{Q}})$ such that
\begin{equation}
\label{equation::invertible_matrix}
\begin{pmatrix} 1 & 0 \\ 0 & 1\end{pmatrix} - \begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} 1- a & -b \\ -c & 1-d \end{pmatrix}
\end{equation}
is invertible; an explicit admissible choice would be $a=d=0$ and $b = -c = 1$. By assumption, there exists some
\begin{equation*}
(w_1,\dots,w_g,\gamma) \in G(\overline{\mathbb{Q}}).
\end{equation*}
Moreover, the normality of $G(\overline{\mathbb{Q}})$ implies that
\begin{equation*}
(v_1-\gamma(v_1) + w_1,\dots,v_{g}-\gamma(v_{g}) + w_{g},\gamma) \in G(\overline{\mathbb{Q}})
\end{equation*}
for all $(v_1,\dots,v_g) \in (\overline{\mathbb{Q}}^2)^g$. The invertibility of \eqref{equation::invertible_matrix} implies that the preimage of $\gamma \in \SL_2(\overline{\mathbb{Q}})$ in $G(\overline{\mathbb{Q}}) \subseteq \overline{\mathbb{Q}}^{2g} \rtimes \mathrm{SL}_2(\overline{\mathbb{Q}})$ is of (algebraic) dimension $2g$ as each of the maps
\begin{equation*}
\overline{\mathbb{Q}}^2 \longrightarrow \overline{\mathbb{Q}}^2: v_i \longmapsto v_i-\gamma(v_i), \ i \in \{1,\dots,g\},
\end{equation*}
is surjective. This means that the quotient map $q: \mathbb{G}_{a,\mathbb{Q}}^{2g} \rtimes \mathrm{SL}_{2,\mathbb{Q}} \rightarrow \mathrm{SL}_{2,\mathbb{Q}}$ restricts to a surjective homomorphism $q|_G: G \rightarrow \mathrm{SL}_{2,\mathbb{Q}}$ whose kernel is of dimension $2g$. This is only possible if $G= \mathbb{G}_{a,\mathbb{Q}}^{2g} \rtimes \SL_{2,\mathbb{Q}}$, whence the assertion of the lemma in case $p=1$.
The general case $p>1$ can be proven similarly, working with a lifting of $(\gamma,\dots, \gamma) \in \SL_2(\overline{\mathbb{Q}}^2)^p$ in $G(\overline{\mathbb{Q}})$ and using the above argument in parallel on each of the $p$ factors. This shows that the kernel of $q|_G: G \rightarrow \mathrm{SL}_{2,\mathbb{Q}}^p$ is of dimension $\sum_{q=1}^p 2(i_{q+1} - i_q) = 2g$, which forces again the asserted equality.
\end{proof}
\section{The monodromy of $H|_X$}
\label{subsection::monodromy}
Let $x_0 \in X(\mathbb{C})$ be a sufficiently general point such that $\mathrm{MT}(H_{x_0})=\mathrm{MT}(H|_X)$ and let $\mathrm{Mon}(H|_X) \subseteq \mathrm{MT}(H|_X)(\mathbb{Q})$ denote the (ordinary) monodromy group at $x_0$ of the local system $\mathbb{V}_\mathbb{Z}^g$ underlying $H|_X$. We write $\mathrm{Mon}^{\mathrm{alg}}(H|_X) \subseteq \mathrm{MT}(H|_X)$ for the connected component of its $\mathbb{Q}$-algebraic closure (i.e., the (connected) algebraic monodromy group of $H|_X$ with base point $x_0$ in \cite{Andre1992}). By \cite[Theorem 1]{Andre1992}, the group $\mathrm{Mon}^{\mathrm{alg}}(H|_X)$ (resp.\ $\mathrm{Mon}^{\mathrm{alg}}(H_{-1}|_X)$) is a $\mathbb{Q}$-normal subgroup of $\mathrm{MT}^{\mathrm{der}}(H|_X)$ (resp.\ $\mathrm{MT}^{\mathrm{der}}(H_{-1}|_X)$). (Note that the notion of ``good'' variation of mixed Hodge structures used in \cite{Andre1992} agrees with that of an admissible variation of mixed Hodge structures. In fact, the latter notion is even trivially stronger than the former, but a result of Kashiwara \cite[Theorem 4.5.2]{Kashiwara1986} allows also to prove the converse implication.)
In \cite{Habegger2012a}, it is proven that $\mathrm{Mon}^{\mathrm{alg}}(H_{-1}|_X) = \SL_{2,\mathbb{Q}}^{p^\prime}$ in our situation (see the proof of Equation (10) in \textit{loc.cit.}). As the natural map $\mathrm{Mon}^{\mathrm{alg}}(H|_X) \rightarrow \mathrm{Mon}^{\mathrm{alg}}(H_{-1}|_X)$ is evidently surjective, we infer from another use of Lemma \ref{lemma::normality} that $\mathrm{Mon}^{\mathrm{alg}}(H|_X)$ projects onto $\prod_{q=1}^{p^\prime} ( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}})$.
Consider again the connected component $\widetilde{X}$ of $\mathcal{u}^{-1}_{\mathrm{mixed}}(X)$
from Section \ref{subsection::coverings} and its stabilizer $\mathrm{Stab}(\widetilde{X})$ under the action of $(\mathbb{Z}^{2} \rtimes \Gamma(\mathcal{N}))^g$ on $(\mathbb{C} \times \mathcal{H}_1)^g$. Both $\mathrm{Stab}(\widetilde{X})$ and $\mathrm{Mon}(H|_X)$ are canonically subgroups of $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^g$, and in fact they are equal to each other. This seems well-known, but we include the argument here for lack of reference and convenience of the reader. For this purpose, we choose an arbitrary lifting $\widetilde{x}_0 \in \widetilde{X}$ of the point $x_0 \in X(\mathbb{C})$. If $\gamma \in \Stab_\Gamma(\widetilde{X})$, then there exists a path $\widetilde{\phi}: [0, 1] \rightarrow \widetilde{X}$ with $\widetilde{\phi}(0) = \widetilde{x}_0$ and $\widetilde{\phi}(1) = \gamma \cdot \widetilde{x}_0$. Through transport along the $\mathbb{Z}$-local system $\widetilde{\mathbb V}^g_{\mathbb{Z}} = \mathcal{u}_{\mathrm{mixed}}^{\ast}(\mathbb{V}_{\mathbb{Z}}^g)$, the path $\widetilde{\phi}$ induces a $\mathbb{Z}$-linear map
\begin{equation}
\label{equation::parallel_transport}
\mathbb{V}_{\mathbb{Z},x_0}^g = \widetilde{\mathbb{V}}_{\mathbb{Z},\widetilde{x}_0}^g \longrightarrow \widetilde{\mathbb{V}}_{\mathbb{Z}, \gamma \cdot \widetilde{x}_0}^g = \mathbb{V}_{\mathbb{Z},x_0}^g,
\end{equation}
which can be seen to equal $\gamma \in \mathrm{MT}(H_x)$ by unraveling definitions. Thus $\gamma \in \mathrm{Mon}(H|_X)$. If conversely $g \in \mathrm{Mon}(H|_X)$ is induced by a path $\phi: [0,1] \rightarrow X$ with $\phi(0)=\phi(1)=x$, then the lifting $\widetilde{\gamma}: [0,1] \rightarrow \widetilde{X}$ with $\widetilde{\phi}(0)=\widetilde{x}_0$ yields a point $\widetilde{\phi}(1)=\gamma \cdot \widetilde{x}_0$ for some $\gamma \in (\mathbb{Z}^{2} \rtimes \Gamma(\mathcal{N}))^g$ . Considering again \eqref{equation::parallel_transport}, we infer $\gamma = g$. This means that the intersection $g \widetilde{X} \cap \widetilde{X}$ is non-empty. As both $\widetilde{X}$ and $g \widetilde{X}$ are connected components of $\mathcal{u}_{\mathrm{mixed}}^{-1}(X)$, we infer that actually $\widetilde{X} = g \widetilde{X}$, whence $g \in \Stab(\widetilde{X})$.
\section{Separating holomorphic and anti-holomorphic terms}
\label{subsection::separation}
The $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))$-invariance of the $(1,1)$-form in \eqref{equation::invariant_form} implies that, for every local chart $\chi: B_1(0)^d \rightarrow \widetilde{X}$ and every $\gamma \in \mathrm{Stab}(\widetilde{X})$, the equations \eqref{equation::differential_equation_1} associated with the charts $\chi: B_1(0)^d \rightarrow \widetilde{X}$ and $\gamma \circ \chi: B_1(0)^d \rightarrow \widetilde{X}$ are equivalent. In order to extract non-trivial information from monodromy, we pass to the product $\widetilde{X} \times \widetilde{X} \subset (\mathbb{C} \times \mathcal{H}_1)^{2g}$ and exploit the fact that both holomorphic and anti-holomorphic terms appear in \eqref{equation::differential_equation_1}. The author owes this important idea to \cite[Subsection 5.2]{Andre2020}.
We write $\mathrm{pr}_i: \widetilde{X} \times \widetilde{X} \rightarrow \widetilde{X}$, $i \in \{1, 2\}$, for the projection to the $i$-th factor. On $\widetilde{X} \times \widetilde{X}$, we consider the holomorphic functions
\begin{align*}
z_l^{\sharp} = z_l \circ \mathrm{pr}_1, \ \tau_l^{\sharp} = \tau_l \circ \mathrm{pr}_1, \ 1\leq l \leq g,
\end{align*}
and the antiholomorphic functions
\begin{align*}
\overline{z}_l^{\flat} = \overline{z}_l \circ \mathrm{pr}_2, \ \overline{\tau}_l^{\flat} = \overline{\tau}_l \circ \mathrm{pr}_2, \ 1\leq l \leq g.
\end{align*}
We next deduce from the equations \eqref{equation::differential_equation_1} on $\widetilde{X}$ new equations constraining the analytic subvariety $\widetilde{X} \times \widetilde{X}$. These equations actually change under the product action of $(\mathbb{Z}^2 \rtimes \Gamma(\mathcal{N}))^{2g}$ on $(\mathbb{C} \times \mathcal{H}_1)^{2g}$, so that we can use the action of $\Stab(\widetilde{X}) \times \Stab(\widetilde{X})$ to obtain non-trivial information. Let $\chi_1: B_1(0)^d \rightarrow \widetilde{X}$ (resp.\ $\chi_2: B_1(0)^d \rightarrow \widetilde{X}$) be a chart with local coordinates $w_1^\sharp,\dots, w_d^\sharp$ (resp.\ $w_1^\flat,\dots,w_d^\flat$) on $B_1(0)^d$. To increase readability, we write here $f$ (resp.\ $\partial f/ \partial w_m^\sharp$, $\partial f/ \partial \overline{w}_m^\flat$) instead of $f \circ (\chi_1,\chi_2)$ (resp.\ $\partial (f \circ (\chi_1,\chi_2))/\partial w_m^\sharp$, $\partial (f \circ (\chi_1,\chi_2))/\partial \overline{w}_m^\flat$) for functions $f$ on $\widetilde{X} \times \widetilde{X}$. For each $j \in \{1,\dots, g\}$, we set
\begin{equation*}
\mathbf B_j^\prime = \left( (\tau_l^\sharp - \overline{\tau}_l^\flat) \cdot \frac{\partial z_l^\sharp}{\partial w_m^\sharp} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial
\tau_l^\sharp}{\partial w_m^\sharp} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}},
\end{equation*}
and
\begin{equation*}
\mathbf C_j^\prime = \left( (\tau_l^\sharp - \overline{\tau}_l^\flat) \cdot \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \overline{\tau}_l^\flat}{\partial \overline{w}_m^\flat} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}.
\end{equation*}
(Note that $\partial z_l^\sharp/\partial w_m^\sharp$ and $\partial \tau_l^\sharp/\partial w_m^\sharp$ (resp.\ $\overline{\partial z_l^\flat/\partial w_m^\flat} = \partial \overline{z}_l^\flat/\partial \overline{w}_m^\flat$ and $\overline{\partial \tau_l^\flat/\partial w_m^\flat}=\partial \overline{\tau}_l^\flat/\partial \overline{w}_m^\flat$) are holomorphic (resp.\ antiholomorphic) functions on $B_1(0)^d \times B_1(0)^d$.)
We claim that, for every choice of charts $\chi_i: B_1(0)^d \rightarrow \widetilde{X}$ ($i \in \{1,2\}$), the product chart $$(\chi_1,\chi_2): B_1(0)^d \times B_1(0)^d \rightarrow \widetilde{X} \times \widetilde{X},$$ satisfies the relations
\begin{equation}
\label{equation::differential_equation_2}
r_j(\tau_j^\sharp-\overline{\tau}_j^\flat)^3 \det(\mathbf B_j^\prime) \det(\mathbf C_j^\prime)
=
r_k(\tau_k^\sharp-\overline{\tau}_k^\flat)^3 \det(\mathbf B_k^\prime) \det(\mathbf C_k^\prime), \ j,k \in \{1,\dots g\},
\end{equation}
on $B_1(0)^d \times B_1(0)^d$. With this aim in mind, we consider the set
\begin{equation*}
\mathcal{R} = \bigcup_{(\chi_1, \chi_2)} (\chi_1(0),\chi_2(0))
\end{equation*}
where $$(\chi_1: B_1(0)^d \rightarrow \widetilde{X},\chi_2: B_1(0)^d \rightarrow \widetilde{X})$$ ranges through all pairs of charts on $\widetilde{X}$ such that $\chi_1 \times \chi_2$ satisfies the relation \eqref{equation::differential_equation_2} at $(0,0)$. The following three statements are equivalent:
\begin{enumerate}
\item $(\widetilde{x}_1,\widetilde{x}_2) \in \mathcal{R}$.
\item There exists a pair of charts $(\chi_1: B_1(0)^d \rightarrow \widetilde{X},\chi_2: B_1(0)^d \rightarrow \widetilde{X})$ such that $(\widetilde{x}_1,\widetilde{x}_2) \in \im(\chi_1 \times \chi_2)$ and \eqref{equation::differential_equation_2} is satisfied at $(\chi_1,\chi_2)^{-1}(\widetilde{x}_1,\widetilde{x}_2)$.
\item For every pair of charts $(\chi_1: B_1(0)^d \rightarrow \widetilde{X},\chi_2: B_1(0)^d \rightarrow \widetilde{X})$ such that $(\widetilde{x}_1,\widetilde{x}_2) \in \im(\chi_1 \times \chi_2)$, the equation \eqref{equation::differential_equation_2} is satisfied at $(\chi_1,\chi_2)^{-1}(\widetilde{x}_1,\widetilde{x}_2)$.
\end{enumerate}
Indeed, the implications $(3)\Rightarrow (2)$ and $(2) \Rightarrow (1)$ are trivial and the implication $(1)\Rightarrow (3)$ follows from the fact that \eqref{equation::differential_equation_2} is independent under transformations of the local coordinates $w_1^\sharp,\dots, w_d^\sharp,w_1^\flat,\dots,w_d^\flat$. From these equivalences, we deduce that $\mathcal{R}$ is locally cut out by a real-analytic equation. We also see that our above claim amounts to $\mathcal{R} = \widetilde{X} \times \widetilde{X}$.
Since $\widetilde{X} \times \widetilde{X}$ is irreducible (as a complex-analytic subset of $(\mathbb{C} \times \mathcal{H}_1)^{2g}$), it suffices hence to show that $\mathcal{R}$ contains a non-empty open subset of $\widetilde{X} \times \widetilde{X}$. For this purpose, we consider an arbitrary point $(\widetilde{x},\widetilde{x}) \in \widetilde{X} \times \widetilde{X}$ on the diagonal. Let $\chi: B_1(0)^d \rightarrow \widetilde{X}$ be a chart such that $\chi(0)=\widetilde{x}$. By the above equivalences, the real-analytic set $(\chi, \chi)^{-1}(\mathcal{R}) \subseteq B_1(0)^d \times B_1(0)^d$ coincides with
\begin{multline*}
\mathcal{R}_{(\chi,\chi)} = \left\{ (w_1^\sharp,\dots,w_d^\sharp, w_1^\flat,\dots,w_d^\flat) \in B_1(0)^d \times B_1(0)^d \right. \\
\left\vert \
\text{$(\chi \times \chi)$ satisfies \eqref{equation::differential_equation_2} at $(w_1^\sharp,\dots,w_d^\sharp, w_1^\flat,\dots,w_d^\flat)$}
\right\}.
\end{multline*}
Writing $\overline{(\cdot)}: B_1(0)^d \rightarrow B_1(0)^d$ for the component-wise complex conjugation, the set $(\mathrm{id}_{B_1(0)^d} \times \overline{(\cdot)})^{-1}(\mathcal{R}_{(\chi,\chi)})$ is a \textit{complex}-analytic subset of $B_1(0)^d \times B_1(0)^d$ as can be seen by inspecting \eqref{equation::differential_equation_2}; this relies on the following elementary fact: If $f(w_1,\dots,w_d) = \sum_{i_1,\dots,i_d} a_{i_1,\dots,i_d} w_1^{i_1}\cdots w_d^{i_d}$ is a holomorphic function on $B_1(0)^d$, then $\overline{f(\overline{w}_1,\dots,\overline{w}_d)}= \sum_{i_1,\dots,i_d} \overline{a_{i_1,\dots,i_d}} w_1^{i_1}\cdots w_d^{i_d}$ is holomorphic as well. Furthermore, the fact that the chart $\chi$ satisfies the previous equation \eqref{equation::differential_equation_1} implies immediately that
\begin{align*}
\Delta_{\mathrm{skew}}
&= \{ (w_1,\dots, w_d, \overline{w}_1,\dots, \overline{w}_d) \ | \ (w_1,\dots, w_d) \in B_1(0)^d \} \\
&\subseteq (\mathrm{id}_{B_1(0)^d} \times \overline{(\cdot)})^{-1}(\mathcal{R}_{(\chi,\chi)});
\end{align*}
in fact, plugging in the local coordinates $(w_1,\dots,w_d,w_1,\dots,w_d)$ into the equation \eqref{equation::differential_equation_2} for the chart $(\chi \times \chi)$ yields the original equation \eqref{equation::differential_equation_1} for the chart $\chi$ back. As the smallest complex-analytic set of $B_1(0)^d \times B_1(0)^d$ containing $\Delta_{\mathrm{skew}}$ is $B_1(0)^d \times B_1(0)^d$, we infer that
\begin{equation*}
(\mathrm{id}_{B_1(0)^d} \times \overline{(\cdot)})^{-1}(\mathcal{R}_{(\chi,\chi)})=B_1(0)^d \times B_1(0)^d
\end{equation*}
and hence $\mathcal{R}_{(\chi,\chi)}=B_1(0)^d \times B_1(0)^d$, whence $\mathcal{R} = \widetilde{X} \times \widetilde{X}$. In other words, the equations \eqref{equation::differential_equation_2} are satisfied on all of $\widetilde{X} \times \widetilde{X}$.
\section{Enter monodromy}
\label{section::monodromy}
Let $\chi_i: B_1(0)^d \rightarrow \widetilde{X}$, $i \in \{1,2\}$, two local charts and $\gamma \in \mathrm{Stab}(\widetilde{X})$. As $\gamma(\widetilde{X}) = \widetilde{X}$, the composite $\gamma \circ \chi_1: B_1(0)^d \rightarrow \widetilde{X}$ is a local chart of $\widetilde{X}$ as well. Writing
\begin{equation*}
\gamma = \left(
\begin{pmatrix} m_1 \\ n_1 \end{pmatrix},
\begin{pmatrix} a_1 & b_1 \\ c_1 & d_1 \end{pmatrix},
\dots,
\begin{pmatrix} m_g \\ n_g \end{pmatrix},
\begin{pmatrix} a_g & b_g \\ c_g & d_g \end{pmatrix} \right),
\end{equation*}
we note that
\begin{equation*}
z_l \circ \gamma = \frac{z_l+m_l+n_l\tau_l}{c_l\tau_l+d_l} \ \ \text{and} \ \ \tau_l \circ \gamma = \frac{a_l\tau_l+b_l}{c_l\tau_l+d_l}, \ l \in \{1, \dots, g \},
\end{equation*}
as functions on $\widetilde{X}$. We infer that
\begin{equation*}
z_l^\sharp \circ (\gamma,\mathrm{id}) = \frac{z_l^\sharp+m_l+n_l\tau_l^\sharp}{c_l\tau_l^\sharp+d_l}
\ \ \text{and} \ \
\tau_l^\sharp \circ (\gamma, \mathrm{id}) = \frac{a_l\tau_l^\sharp+b_l}{c_l\tau_l^\sharp+d_l}, \ l \in \{1, \dots, g \},
\end{equation*}
as functions on $\widetilde{X} \times \widetilde{X}$. We also need the derivatives
\begin{equation*}
\frac{\partial (z_l^\sharp \circ (\gamma,\mathrm{id}))}{\partial w_m^\sharp} = \frac{1}{(c_l\tau_l^\sharp+d_l)}\cdot \left(\frac{\partial z_l^\sharp}{\partial w_m^\sharp} + n_l \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}\right)
- \frac{c_l(z_l^\sharp+m_l+n_l\tau_l^\sharp)}{(c_l\tau_l^\sharp+d_l)^2} \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}
\end{equation*}
and
\begin{equation*}
\frac{\partial (\tau_l^\sharp \circ (\gamma,\mathrm{id}))}{\partial w_m^\sharp} = \frac{1}{(c_l\tau_l^\sharp+d_l)^2} \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}
\end{equation*}
on $B_1(0)^d \times B_1(0)^d$. With this preparation, we can compute the equations \eqref{equation::differential_equation_2} for the chart
\begin{equation*}
(\gamma \circ \chi_1, \chi_2): B_1(0)^d \times B_1(0)^d \longrightarrow \widetilde{X} \times \widetilde{X};
\end{equation*}
these are
\begin{multline}
\label{equation::differential_equation_3}
r_j\left(\frac{a_j\tau_j^\sharp+b_j}{c_j\tau_j^\sharp+d_j}-\overline{\tau}_j^\flat\right)^3 \det(\mathbf B_j^{\prime \prime}) \det(\mathbf C_j^{\prime \prime})
=
r_k\left(\frac{a_k\tau_k^\sharp+b_k}{c_k\tau_k^\sharp+d_k}-\overline{\tau}_k^\flat\right)^3 \det(\mathbf B_k^{\prime \prime}) \det(\mathbf C_k^{\prime \prime}), \\ j,k \in \{1,\dots g\},
\end{multline}
with the $(d \times d)$-matrices
\begin{equation*}
(\mathbf B_j^{\prime\prime})_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\text{\ \ and \ \ }
(\mathbf C_j^{\prime\prime})_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\end{equation*}
where
\begin{multline*}
(\mathbf B_j^{\prime\prime})_{lm} =
\left(\frac{a_l\tau_l^\sharp+b_l}{c_l\tau_l^\sharp+d_l} - \overline{\tau}_l^\flat\right) \cdot \left( \frac{1}{(c_l\tau_l^\sharp+d_l)}\cdot \left[\frac{\partial z_l^\sharp}{\partial w_m^\sharp} + n_l \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}\right] - \frac{c_l(z_l^\sharp+m_l+n_l\tau_l^\sharp)}{(c_l\tau_l^\sharp+d_l)^2} \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp} \right) \\ - \left(\frac{z_l^\sharp+m_l+n_l\tau_l^\sharp}{c_l\tau_l^\sharp+d_l} - \overline{z}_l^\flat\right) \cdot \frac{1}{(c_l\tau_l^\sharp+d_l)^2} \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}
\end{multline*}
and
\begin{equation*}
(\mathbf C_j^{\prime\prime})_{lm} = \left(\frac{a_l\tau_l^\sharp+b_l}{c_l\tau_l^\sharp+d_l} - \overline{\tau}_l^\flat\right) \cdot \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat} - \left(\frac{z_l^\sharp+m_l+n_l\tau_l^\sharp}{c_l\tau_l^\sharp+d_l} - \overline{z}_l^\flat\right) \cdot \frac{\partial \overline{\tau}_l^\flat}{\partial \overline{w}_m^\flat}.
\end{equation*}
In summary, each pair $(\chi_1,\chi_2)$ of charts $\chi_i: B_1(0)^d \rightarrow \widetilde{X}$, $i \in \{1,2\}$, does not only satisfy the equation \eqref{equation::differential_equation_2}, but also the equations \eqref{equation::differential_equation_3} for all $\gamma \in \mathrm{Stab}(\widetilde{X})$. Moreover, we can consider each of these equations at each point of $B_1(0)^d \times B_1(0)^d$ as an algebraic equation on $\gamma \in \mathrm{Stab}(\widetilde{X})$, giving a $\mathbb{C}$-algebraic hypersurface of $\mathrm{MT}(H|_X)$ containing the $\mathbb{Q}$-rational points $\mathrm{Mon}(H|_X) = \mathrm{Stab}(\widetilde{X})$. By \cite[Corollary AG.14.6]{Borel1991}, this hypersurface contains also the algebraic monodromy group $\mathrm{Mon}^{\mathrm{alg}}(H|_X)$, which is the $\mathbb{Q}$-algebraic closure of these $\mathbb{Q}$-rational points. We infer that each pair $(\chi_1,\chi_2)$ satisfies \eqref{equation::differential_equation_3} for all $\gamma \in \mathrm{Mon}^{\mathrm{alg}}(H|_X)(\mathbb{Q})$.
\section{A non-vanishing determinant}
\label{section::technical}
We make a final reduction before we start exploiting the equations \eqref{equation::differential_equation_3} obtained in the last section. To be precise, we show that we can assume the following: For each chart
\begin{equation*}
\chi_0: B_1(0)^d \longrightarrow \widetilde{X}, \
\underline{w} = (w_1,\dots,w_d) \longmapsto \left( z_l \circ \chi_0(\underline{w}), \tau_l \circ \chi_0(\underline{w}) \right)_{1\leq l \leq g},
\end{equation*}
the determinant
\begin{equation}
\label{equation::non_vanishing_determinant}
\det \left( \left( \frac{\partial (z_l \circ \chi_0)}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g-1\} \\ m \in \{1,\dots, d\}}} \right)
\end{equation}
is a \textit{non-zero} holomorphic function on $B_1(0)^d$. Note that this condition holds for every chart if and only if it holds for a single one.
For each finite map $S^\prime \rightarrow S$, note that (RBC) for a subvariety $X$ in a family $\pi: A \rightarrow S$ is equivalent to (RBC) for the subvariety $X_{S^\prime} = X \times_S S^\prime$ in the family $\pi_{S^\prime}: A \times_S S^\prime \rightarrow S^\prime$. Furthermore, (RBC) for a subvariety $X \subseteq A$ is equivalent to (RBC) for any translate $X + \tau \subseteq A$ by a torsion section $\tau: S \rightarrow A$. By assumption, $S$ is a subvariety of $Y(\mathcal{N})$ and $A = \mathcal{E}(\mathcal{N})|_S$.
Let $\underline{q}=(s_1/t_1,\dots,s_g/t_g) \in \mathbb{Q}^g$ be given with $\gcd(s_i,t_i)=1$ for all $i \in \{1,\dots,g \}$, we set $\mathcal{N}^\prime = \mathrm{lcm}(t_1,\dots,t_g,\mathcal{N})$, so that all torsion points of order $\mathrm{lcm}(t_1,\dots,t_g)$ in the generic fiber $\mathcal{E}(\mathcal{N}^\prime)_{\eta_{Y(\mathcal{N}^\prime)}}$ extend to torsion sections $Y(\mathcal{N}^\prime) \rightarrow \mathcal{E}(\mathcal{N}^\prime)$. Writing $\xi_{\mathcal{N}^\prime/\mathcal{N}}: \mathcal{E}(\mathcal{N}^\prime) \rightarrow \mathcal{E}(\mathcal{N})$ for the standard covering and setting $X^\prime_{\underline{q}} = \xi_{\mathcal{N}^\prime/\mathcal{N}}^{-1}(X)$, the analytic variety $\widetilde{X}$ is also a connected component of $\mathcal{u}_{\mathrm{mixed}}^{-1}(X^\prime_{\underline{q}})$. Thus, there exists a torsion section $\tau: Y(\mathcal{N}^\prime) \rightarrow \mathcal{E}(\mathcal{N}^\prime)$ such that the translate
\begin{equation*}
\widetilde{X}_{\underline{q}} = \left\{ \left(z_i + \frac{s_i}{t_i} \cdot \tau_i,\tau_i\right)_{1\leq i \leq g} \in (\mathbb{C} \times \mathcal{H}_1)^g \ \middle| \ \left(z_i,\tau_i\right)_{1\leq i \leq g} \in \widetilde{X} \right\}
\end{equation*}
is a connected component of $\mathcal{u}_{\mathrm{mixed}}^{-1}(X^\prime_{\underline{q}} + \tau)$.
For a fixed local chart
\begin{equation*}
\chi_0: B_1(0)^d \longrightarrow \widetilde{X}, \
\underline{w} \longmapsto \left( z_i \circ \chi_0(\underline{w}), \tau_i \circ \chi_0(\underline{w}) \right)_{1\leq i \leq g},
\end{equation*}
each of its translates
\begin{equation*}
\chi_{0,\underline{q}}: B_1(0)^d \longrightarrow \widetilde{X}_{\underline{q}}, \
\underline{w} \longmapsto \left( z_i \circ \chi_0(\underline{w}) + \frac{s_i}{t_i} \cdot \tau_i, \tau_i \circ \chi_0(\underline{w}) \right)_{1\leq i \leq g},
\end{equation*}
is a chart of $\widetilde{X}_{\underline{q}}$. As (RBC) for $X^\prime_{\underline{q}}$ is equivalent to (RBC) for $X$ by the above remarks, it suffices to prove that the determinant \eqref{equation::non_vanishing_determinant} is a non-zero holomorphic function for a single chart $\chi_{0,\underline{q}}$ ($\underline{q} \in \mathbb{Q}^g$). If this would not be the case, then
\begin{equation*}
\det \left( \left( \frac{\partial (z_l \circ \chi_0)}{\partial w_m} + \frac{s_l}{t_l} \cdot \frac{\partial (\tau_l \circ \chi_0)}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g-1\} \\ m \in \{1,\dots, d\}}} \right) (\underline{w}) = 0
\end{equation*}
for all $(s_1/t_1,\cdots,s_g/t_g) \in \mathbb{Q}^g$ and all $\underline{w} \in B_1(0)^d$. By continuity, this means
\begin{equation*}
\det \left( \left( \frac{\partial (z_l \circ \chi_0)}{\partial w_m} + u_l \cdot \frac{\partial (\tau_l \circ \chi_0)}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g - 1\} \\ m \in \{1,\dots, d\}}} \right)(\underline{w}) = 0
\end{equation*}
for all $(u_1,\dots,u_g) \in \mathbb{R}^g$ and all $\underline{w} \in B_1(0)^d$. In particular, we can take
\begin{equation*}
u_l = \frac{-\mathrm{Im}(z_l \circ \chi_0)}{\mathrm{Im}(\tau_l \circ \chi_0)}(\underline{w}), \ 1 \leq l \leq g,
\end{equation*}
so that
\begin{equation}
\label{equation::volume_zero}
\det \left( \left( \frac{\partial (z_l \circ w_0)}{\partial w_m} - \frac{\mathrm{Im}(z_l)}{\mathrm{Im}(\tau_l)} \cdot \frac{\partial (\tau_l \circ \chi_0)}{\partial w_m} \right)_{\substack{l\in \{1,\dots, g-1\} \\ m \in \{1,\dots, d\}}} \right)(\underline{w}) = 0
\end{equation}
for all $\underline{w} \in B_1(0)^d$. Comparing with \eqref{equation::alpha_j_prime}, we infer that $\alpha_{1}^\prime = 0$, which is a clear contradiction to the non-degeneracy of $\mathrm{pr}_{\widehat{1}}(X)$.
In summary, we can use without loss of generality that \eqref{equation::non_vanishing_determinant} is a non-zero holomorphic function for each chart $\chi: B_1(0)^d \rightarrow \widetilde{X}$ and a fixed $j_0 \in \{1, \dots, g\}$.
\section{Proof that $p^\prime = 0$ or $p^\prime = p$}
\label{section::reduction1}
We claim that either all the families $\pi: E_i \rightarrow S$ are constant (i.e., $p^\prime=0$) or non-constant (i.e., $p^\prime=p$). For this purpose, assume that $p^\prime\geq 1$ so that the family $E_{1} = \cdots = E_{i_2-1} \rightarrow S$ is non-isotrivial and that the family $E_{i_p} = \cdots = E_{g} \rightarrow S$ is constant.
From Section \ref{subsection::monodromy}, we know that $\mathrm{Mon}^{\mathrm{alg}}(H|_X) \subseteq (\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{SL}_{2,\mathbb{Q}})^g$ projects onto the first $p^\prime$ factors $\prod_{q=1}^{p^\prime} ( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}})$, which gives rise to a surjective map between their $\overline{\mathbb{Q}}$-points. For every integer $N$, there hence exists an element
\begin{equation*}
\gamma =
\left(
\begin{pmatrix} m_1 \\ n_1 \end{pmatrix},
\begin{pmatrix} a_1 & b_1 \\ c_1 & d_1 \end{pmatrix},
\dots,
\begin{pmatrix} m_g \\ n_g \end{pmatrix},
\begin{pmatrix} a_g & b_g \\ c_g & d_g \end{pmatrix} \right)
\in \mathrm{Mon}^{\mathrm{alg}}(H|_X)(\overline{\mathbb{Q}})
\end{equation*}
with
\begin{equation*}
a_l = 1, \ b_l = N, \ c_l = 0, \ d_l = 1, \ m_l = 0, \ n_l = 0
\end{equation*}
for all $1 \leq l \leq i_{p^\prime+1}-1$. Since the families $E_l$ ($i_{p^\prime+1} \leq l \leq g$) are trivial, we have furthermore
\begin{equation*}
a_l = 1, \ b_l = 0, \ c_l = 0, \ d_l = 1
\end{equation*}
for all $i_{p^\prime+1} \leq l \leq g$. Let us additionally fix a chart $\chi_0: B_1(0)^d \rightarrow \widetilde{X}$. Specializing to the chart $(\gamma \circ \chi_0, \chi_0): B_1(0)^d \times B_1(0)^d \rightarrow \widetilde{X} \times \widetilde{X}$, equation \eqref{equation::differential_equation_3} for $j=1$ and $k=g$ becomes
\begin{equation}
\label{equation::differential_equation_4}
r_1(\tau_1^\sharp+N-\overline{\tau}_1^\flat)^3 \det(\mathbf B_1^{\prime \prime}) \det(\mathbf C_1^{\prime \prime})
=
r_g(\tau_g^\sharp-\overline{\tau}_g^\flat)^3 \det(\mathbf B_g^{\prime \prime}) \det(\mathbf C_g^{\prime \prime})
\end{equation}
with
\begin{equation*}
\mathbf B_j^{\prime\prime} = \left( (\tau_l^\sharp + b_l - \overline{\tau}_l^\flat) \cdot \frac{\partial z_l^\sharp}{\partial w_m^\sharp} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\end{equation*}
and
\begin{equation*}
\mathbf C_j^{\prime\prime} = \left((\tau_l^\sharp+b_l - \overline{\tau}_l^\flat) \cdot \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \overline{\tau}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}.
\end{equation*}
We can consider the difference between the left-hand and the right-hand side of \eqref{equation::differential_equation_4} as a polynomial over the ring of (real-analytic) functions on $B_1(0)^d \times B_1(0)^d$ and indeterminate $N$. As this polynomial vanishes for each integer, it has to vanish identically. Expanding the left-hand side of the equation for the term of highest order in $N$, we note that its term of highest degree in $N$ is
\begin{equation*}
r_1 \prod_{l = i_{p^\prime+1}}^g (\tau_l^\sharp - \overline{\tau}^\flat_l)^2 \cdot \det \left( \left( \frac{\partial z_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{2,\dots, g\} \\ m \in \{1,\dots, d\}}} \right) \det \left( \left( \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{2,\dots, g\} \\ m \in \{1,\dots, d\}}} \right) N^{2i_{p^\prime +1}-1}
\end{equation*}
by our assumption on the non-vanishing of \eqref{equation::non_vanishing_determinant}.
However, the leading term on the right-hand side has degree $\leq 2(i_{p^\prime+1}-1) = 2i_{p^\prime+1}-2$. From this contradiction, we conclude that $p^\prime=0$ or $p^\prime = p$. Note that by our assumptions in Section \ref{subsection::reductions}, $p^\prime=0$ implies $\dim(S)=0$. This means that $A$ is just an abelian variety, for which (RBC) is proven in \cite{Zhang1998}. We hence concentrate on the case $p^\prime = p$ in the following.
\section{Existence of generic isogenies}
\label{subsection::diagonal}
In this section, we prove that the generic fibers $E_{i,\eta}$ ($1\leq i \leq g$) are all isogeneous (i.e., $p=1$) in the remaining case that all families $E_i \rightarrow S$ ($1\leq i \leq g$) are non-isotrivial (i.e., $p^\prime = p$). Let $M_q$, $1\leq q \leq p$, be arbitrary integers and set
\begin{equation*}
N_{i_q} = N_{i_q+1} = \cdots = N_{i_{q+1}-1} = M_q
\end{equation*}
for all $1 \leq q \leq p$. Again by the results from Section \ref{subsection::monodromy}, we know that $\mathrm{Mon}^{\mathrm{alg}}(H|_X) = \prod_{q=1}^{p} ( \mathbb{G}_{a,\mathbb{Q}}^{2g_q} \rtimes \mathrm{SL}_{2,\mathbb{Q}})$ (diagonally embedded in $(\mathbb{G}_{a,\mathbb{Q}}^2 \rtimes \mathrm{SL}_{2,\mathbb{Q}})^g$). Thus, there exists an element
\begin{equation*}
\gamma =
\left(
\begin{pmatrix} m_1 \\ n_1 \end{pmatrix},
\begin{pmatrix} a_1 & b_1 \\ c_1 & d_1 \end{pmatrix},
\dots,
\begin{pmatrix} m_g \\ n_g \end{pmatrix},
\begin{pmatrix} a_g & b_g \\ c_g & d_g \end{pmatrix} \right)
\in \mathrm{Mon}^{\mathrm{alg}}(H|_X)(\mathbb{Q})
\end{equation*}
with
\begin{equation*}
a_l = 1, \ b_l = N_l, \ c_l = 0, \ d_l = 1, \ m_l = 0, \ n_l = 0
\end{equation*}
for all $1 \leq l \leq g$. Since there is nothing to prove if $p=1$, we can assume that there exists $k \in \{i_2,\dots, i_3 -1 \}$. Specializing again to the chart $(\gamma \circ \chi_0, \chi_0): B_1(0)^d \times B_1(0)^d \rightarrow \widetilde{X} \times \widetilde{X}$, the equation \eqref{equation::differential_equation_3} for $j=1$ and $k$ as here becomes
\begin{multline}
\label{equation::differential_equation_5}
r_1(\tau_1^\sharp+N_1-\overline{\tau}_1^\flat)^3 \det(\mathbf B_1^{\prime \prime}) \det(\mathbf C_1^{\prime \prime})
=
r_k(\tau_k^\sharp+N_k-\overline{\tau}_k^\flat)^3 \det(\mathbf B_k^{\prime \prime}) \det(\mathbf C_k^{\prime \prime})
\end{multline}
with the $(d \times d)$-matrices
\begin{equation*}
\mathbf B_j^{\prime\prime} = \left( (\tau_l^\sharp+N_l - \overline{\tau}_l^\flat) \cdot \frac{\partial z_l^\sharp}{\partial w_m^\sharp} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\end{equation*}
and
\begin{equation*}
\mathbf C_j^{\prime\prime} = \left( (\tau_l^\sharp+N_l - \overline{\tau}_l^\flat) \cdot \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \overline{\tau}_l^\flat}{\partial \overline{w}_m^\flat} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}.
\end{equation*}
The difference of both sides in \eqref{equation::differential_equation_5} can be considered as a multivariate polynomial in the variables $M_q = N_{i_q} = \cdots = N_{i_{q+1}-1} $, $1\leq q \leq p$, of total degree $\leq (2d+3)$, which has to vanish identically because its evaluations for all $(M_1,\dots,M_p) \in \mathbb{Z}^p$ vanish. In fact, the sum of its terms of highest degree $2d+3$ is
\begin{multline*}
r_1 \det \left( \left( \frac{\partial z_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{2,\dots, g\} \\ m \in \{1,\dots, d\}}} \right) \det \left( \left( \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{2,\dots, g\} \\ m \in \{1,\dots, d\}}} \right) \cdot M_1 \prod_{l=1}^g N_l^2 \\
-
r_k \det \left( \left( \frac{\partial z_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right) \det \left( \left( \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right) \cdot M_2 \prod_{l=1}^g N_l^2.
\end{multline*}
Since the two terms contain different monomials in $M_1,\dots,M_p$, their coefficients must vanish. As in the previous section, the vanishing of the first coefficient yields a contradiction to the non-vanishing of \eqref{equation::non_vanishing_determinant}, whence $p=1$. Recall that this implies
\begin{equation*}
E_1 = E_2 = \cdots = E_g
\end{equation*}
by the assumptions made in Subsection \ref{subsection::mumfordtategroup}. Our assumptions on $S$ from Section \ref{subsection::reductions} imply furthermore that $S$ is the diagonal of $\mathcal{E}(\mathcal{N})^g$ in this case.
\section{Existence of a linear equation on $z_l|_{\widetilde{X}}$ ($1\leq l \leq g$).}
\label{section::linear}
In this section, we deduce a linear equation governing the restrictions of the functions $z_l$, $1\leq l \leq g$, to $\widetilde{X}$. For each integer $N$, there exists an element
\begin{equation*}
\gamma =
\left(
\begin{pmatrix} m_1 \\ n_1 \end{pmatrix},
\begin{pmatrix} a_1 & b_1 \\ c_1 & d_1 \end{pmatrix},
\dots,
\begin{pmatrix} m_g \\ n_g \end{pmatrix},
\begin{pmatrix} a_g & b_g \\ c_g & d_g \end{pmatrix} \right)
\in \mathrm{Mon}^{\mathrm{alg}}(H|_X)(\mathbb{Q})
\end{equation*}
with
\begin{equation*}
a_l = 1, \ b_l = N, \ c_l = 0, \ d_l = 1, \ m_l = 0, \ n_l = 0
\end{equation*}
for all $1 \leq l \leq g$. Specializing again to the chart $$(\gamma \circ \chi_0, \chi_0): B_1(0)^d \times B_1(0)^d \rightarrow \widetilde{X} \times \widetilde{X},$$ the equations \eqref{equation::differential_equation_3} become
\begin{multline}
\label{equation::differential_equation_6}
r_j(\tau_j^\sharp+N-\overline{\tau}_j^\flat)^3 \det(\mathbf B_j^{\prime \prime}) \det(\mathbf C_j^{\prime \prime})
=
r_k(\tau_k^\sharp+N-\overline{\tau}_k^\flat)^3 \det(\mathbf B_k^{\prime \prime}) \det(\mathbf C_k^{\prime \prime}), \\ j,k \in \{1,\dots, g\},
\end{multline}
with the $(d \times d)$-matrices
\begin{equation*}
\mathbf B_j^{\prime\prime} = \left( (\tau_l^\sharp+N - \overline{\tau}_l^\flat) \cdot \frac{\partial z_l^\sharp}{\partial w_m^\sharp} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \tau_l^\sharp}{\partial w_m^\sharp} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}
\end{equation*}
and
\begin{equation*}
\mathbf C_j^{\prime\prime} = \left( (\tau_l^\sharp+N - \overline{\tau}_l^\flat) \cdot \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat} - (z_l^\sharp - \overline{z}_l^\flat) \cdot \frac{\partial \overline{\tau}_l^\flat}{\partial \overline{w}_m^\flat} \right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}.
\end{equation*}
Regarding again the difference of both sides of \eqref{equation::differential_equation_6} as a polynomial in the indeterminate $N$ with coefficients in the ring of (real-analytic) functions on $B_1(0)^d \times B_1(0)^d$ and considering the term of highest degree, we obtain
\begin{multline*}
r_j \det \left( \left( \frac{\partial z_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}} \right) \det \left( \left( \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}} \right) \\
=
r_k \det \left( \left( \frac{\partial z_l^\sharp}{\partial w_m^\sharp}\right)_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right) \det \left( \left( \frac{\partial \overline{z}_l^\flat}{\partial \overline{w}_m^\flat}\right)_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right)
\end{multline*}
Specializing to the diagonal $B_1(0)^d \subset B_1(0)^d \times B_1(0)^d$, this yields
\begin{equation*}
r_j
\left\vert \det \left( \begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}} \right)
\right\vert^2
= r_k
\left\vert \det \left(\begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right)
\right\vert^2
\end{equation*}
for the chart $\chi_0: B_1(0)^d \rightarrow \widetilde{X}$. As both determinants are holomorphic functions on $B_1(0)^d$, this implies
\begin{equation}
\label{equation::delz}
r_j^{1/2} \det \left( \begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}} \right) = u_{j,k} \cdot r_k^{1/2} \det \left(\begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g\}, l \neq k \\ m \in \{1,\dots, d\}}} \right)
\end{equation}
for some $u_{j,k} \in S^1 = \{ z \in \mathbb{C} \ | \ |z|=1\}$. Since the determinant \eqref{equation::non_vanishing_determinant} does not vanish, we can specialize \eqref{equation::delz} to $k=g$ and obtain
\begin{equation*}
\frac{\det \begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g\}, l \neq j \\ m \in \{1,\dots, d\}}}}
{\det \begin{pmatrix}
\frac{\partial z_l}{\partial w_m}
\end{pmatrix}_{\substack{l\in \{1,\dots, g-1\} \\ m \in \{1,\dots, d\}}}} = \frac{u_{j,g} \cdot r_g^{1/2}}{r_j^{1/2}}
\end{equation*}
for each $j \in \{1,\dots, g-1 \}$. Setting $f_j= (-1)^{(g-l-1)}u_{j,g}r_g^{1/2}/r_j^{1/2} \in \mathbb{C}^\times$ for $j \in \{1,\dots,g-1\}$, we can use Kramer's rule to obtain
\begin{equation*}
f_1
\begin{pmatrix}
\frac{\partial z_1}{\partial w_1} \\
\frac{\partial z_1}{\partial w_2} \\
\cdots \\
\frac{\partial z_1}{\partial w_d}
\end{pmatrix}
+
f_2
\begin{pmatrix}
\frac{\partial z_2}{\partial w_1} \\
\frac{\partial z_2}{\partial w_2} \\
\cdots \\
\frac{\partial z_2}{\partial w_d}
\end{pmatrix}
+
\cdots
+
f_{g-1}
\begin{pmatrix}
\frac{\partial z_{g-1}}{\partial w_1} \\
\frac{\partial z_{g-1}}{\partial w_2} \\
\cdots \\
\frac{\partial z_{g-1}}{\partial w_d}
\end{pmatrix}
=
\begin{pmatrix}
\frac{\partial z_{g}}{\partial w_1} \\
\frac{\partial z_{g}}{\partial w_2} \\
\cdots \\
\frac{\partial z_{g}}{\partial w_d}
\end{pmatrix}
\end{equation*}
on $B_1(0)^d$. Therefore, we obtain
\begin{equation*}
\frac{\partial}{\partial w_m} \left( f_1 z_1 + f_2 z_2 + \dots + f_{g-1} z_{g-1} + z_g \right) = 0, \ 1 \leq m \leq d,
\end{equation*}
for all $m \in \{1, \dots, d\}$. In conclusion, we obtain a non-trivial linear equation
\begin{equation}
\label{equation::linear_equation}
f_1 z_1 + f_2 z_2 + \dots + f_g z_g = b, \ b \in \mathbb{C},
\end{equation}
valid on all of $\widetilde{X}$ by real-analytic continuation.
\section{Completion of the proof of Theorem \ref{theorem:bogomolov}}
\label{section::last}
By Section \ref{subsection::diagonal}, the variety $S$ is the diagonal in $Y(\mathcal{N})^g$ and hence a special Shimura subvariety. Thus by \cite[Section 3.3]{Gao2018}, the bi-algebraic closure $X^{\mathrm{biZar}}$ of $X$ as defined in \cite{Gao2018} is the minimal horizontal torsion coset containing $X$. It is therefore our goal to prove that $\dim(X^{\mathrm{biZar}}) \leq g$ by means of the Ax-Schanuel conjecture for mixed Shimura varieties; in fact, this contradicts the assumption in (RBC). For this purpose, we set
\begin{equation*}
Y = \{ (\widetilde{x},x) \in \widetilde{X} \times X(\mathbb{C}) \ | \ \mathcal{u}_{\mathrm{mixed}}(\widetilde{x})=x\} \subseteq (\mathcal{H}_1 \times \mathbb{C})^g \times \mathcal{E}(\mathcal{N})^g(\mathbb{C}).
\end{equation*}
The mixed Ax-Schanuel conjecture in the form of \cite[Theorem 1.1]{Gao2018} yields
\begin{equation*}
\dim(X^{\mathrm{biZar}}) \leq \dim(Y^{\mathrm{Zar}}) - \dim(Y)
\end{equation*}
where $Y^{\mathrm{Zar}}$ is the Zariski closure of $Y$ in $(\mathbb{P}^1(\mathbb{C}) \times \mathbb{C})^g \times \mathcal{E}(\mathcal{N})^g(\mathbb{C})$. Writing $H \subset \mathbb{C}^g$ for the linear hypersurface determined by \eqref{equation::linear_equation} and $\Delta(\mathbb{P}^1(\mathbb{C}))$ for the diagonal in $\mathbb{P}^1(\mathbb{C})$, the analytic variety $Y$ is contained in the algebraic subset
\begin{equation*}
(\Delta(\mathcal{H}_1) \times H) \times X \subset (\mathbb{P}^1(\mathbb{C}) \times \mathbb{C})^g \times \mathcal{E}(\mathcal{N})^g(\mathbb{C}).
\end{equation*}
It follows that
\begin{align*}
\dim(Y^{\mathrm{Zar}}) \leq 1 + (g-1) + \dim(X) = \dim(X) + g.
\end{align*}
As $\dim(Y) = \dim(X)$, we conclude that
\begin{equation*}
\dim(X^{\mathrm{biZar}}) \leq \dim(Y^{Zar}) - \dim(Y) \leq g,
\end{equation*}
which concludes our proof of Theorem \ref{theorem:bogomolov}.
\textbf{Acknowledgements:} The author thanks Laura DeMarco, Ziyang Gao, Philipp Habegger, Myrto Mavraki, and Fabien Pazuki for their advice, discussion and encouragement. Finally, he thanks the anonymous referee for their attentive reading and their many suggestions that helped to improve the exposition substantially. He also thanks Jakob Stix for pointing out some inaccuracies in the article.
\bibliographystyle{plain}
|
\section{Introduction}
In the current understanding of long gamma ray bursts (GRBs), a collapsing core of a massive star (e.g., a Wolf Rayet star) leads to the observed GRB phenomenon \citep{1993ApJ...418..386L, 1993AAS...182.5505W, 1999ApJ...524..262M} while two compact stars gravitationally merge to produce a short GRB. In both the cases, a double sided jet is produced from the centre of the burst. As it propagates through the envelope of the collapsing star, this jet collects material ahead of it thereby forming a dense stellar cork which expands ahead of it. This cork is less energetic in short GRBs compared to long GRBs \citep{2017ApJ...834...28N}. After crossing the stellar envelope, the jet eventually pierces through the cork and escapes the system \citep{2002MNRAS.331..197R, 2003ApJ...586..356Z, 2004ApJ...608..365Z, 2014ApJ...784L..28N}. Energetic electrons inside the jet produce the observed signal responsible for the GRB prompt phase.
The observed spectrum is often interpreted in the framework of synchrotron radiation \citep{1993ApJ...415..181M,1996ApJ...466..768T,1998ApJ...494L.167P, 2015AdAst2015E..22P,2015PhR...561....1K}.
An alternate picture of the prompt phase was proposed and developed by \cite{2008ApJ...689L..85E, 2014ApJ...787L..32E, 2018ApJ...869L...4E, 2021ApJ...908....9V} according to which most of the photons are produced at the centre of the star near the time of the burst through pair annihilation, in a plasma dominated by $e^\pm$ pairs. Pair annihilation in this plasma naturally produces a radiation pattern having an equilibrium temperature around a few MeV \citep{1986ApJ...308L..47G, 1986ApJ...308L..43P,2014ApJ...787L..32E,2018ApJ...869L...4E}. The cork in this picture, after being pushed by the expanding gas and radiation pressure, moves with relativistic speed ahead of the radiation beam emitted by the pair plasma. The radiation beam is not able to pierce through it, and most of the photons are reflected backward. Due to the relativistic aberration, these photons are beamed towards the motion of the cork before being detected by the observer.
{In previous attempts of incorporating comptonization in the GRB atmosphere, \cite{1994ApJ...428...21B} assumed a power law spectrum as seed photons' distribution and studied its attenuation through the medium assumed above the burst. He explained spectral features of the burst including the spectral peak energies.
\cite{2011A&A...526A.110D} assumed seed photons having synchrotron spectrum and studied its modification due to Compton scattering in the burst atmosphere.
Compared to these works, here we do not consider synchrotron or nonthermal power law process. Rather, our setup assumes a thermal (Maxwellian) distribution of pairs which emit photons via annihilation in the inner region of an empty jet funnel. Annihilation spectrum intrinsically has bremsstrahlung contribution and the photons are Comptonized within the pair plasma to produce the final seed spectrum. These photons then propagate through the jet funnel, after which they interact with the outflowing cork, producing the observed prompt GRB signal. As we show below, the obtained spectrum has a negative low energy photon index. Further, power laws at high energy are generated due to multiple Compton scattering of the seed photons inside the cork.
In \cite{2021ApJ...908....9V} (Hereafter VPE21), we showed that multiple scattering of photons inside the cork that scattered from different angles with respect to the observer can explain some key observations such as Amati correlation [a correlation between spectral peak energies $\varepsilon_{peak}$ and equivalent isotropic energies $\varepsilon_{iso}$; see \cite{2006MNRAS.372..233A, 2021MNRAS.501.5723F}] and spectral lag, which could not be addressed in other works.}
However, following the assumption of monoenergetic seed photons, the obtained low energy slopes in VPE21 were {positive and hence} deviating compared to the observed slopes.
In this letter, we resolve this problem by considering {Comptonized} pair annihilation spectra for the seed photons at the centre of the burst {as explained above}. With this modification, the typical magnitudes of obtained low energy spectra are consistent with observations.
In section \ref{sec_model} we briefly describe the model and proceed to detail of assumed electron positron pair annihilation spectrum for seed radiation field in section \ref{sec_seed_dist}. We discuss the results in section \ref{sec_results} before summarizing the paper in section \ref{sec_summary}.
\begin {figure}[h]
\begin{center}
\includegraphics[width=7cm, angle=0]{geom.eps}
\caption{Geometry of the system. Source of the radiation is electron positron pair plasma producing annihilation spectrum at the centre of the burst.The photons enter the cork that expands with Lorentz factor $\gamma$ and temperature $T_c$. The opening angle of the jet (and cork) is $\theta_j$ while the observer, situated at $\theta_{obs}$, observes photons that are scattered backwards by the inner surface of the cork.}
\label{lab_geom}
\end{center}
\end{figure}
\section{Brief picture of the backscattering dominated model}
\label{sec_model}
The seed photons' produce near the centre of the burst due to pair annihilation and Comptonization. The detailed process of which is described in section \ref{sec_seed_dist}.
These photons propagate inside the empty jet funnel to radially enter an optically thick cork with an opening angle $\theta_j$. The cork adiabatically expands with a constant Lorentz factor $\gamma$ and temperature $T_c$ at initial distance $r_i$ from the centre of the star (Figure \ref{lab_geom}). We carry out Monte Carlo simulations for studying the interaction of these photons with the relativistic electrons inside the cork. These photons may go through multiple Compton scattering with the energetic electrons before escaping through the cork's back surface. If the photons do not escape within $25$ scatterings, we consider them to be lost inside. Following the relativistic motion of the cork, all escaped photons are relativistically beamed in the forward direction and a fraction of these photons is observed by an observer situated at an angle $\theta_{obs}$ from the jet axis and at azimuth $\phi_{obs}$. The detected photons thus produce a spectral as well as a temporal evolution (light curve). Here, $\theta$ and $\phi$ are the spherical coordinates measured from the centre of the star. The system possesses azimuthal or $\phi$ symmetry. We extend the work of VPE21, considering relativistic {Comptonized }electron positron pair annihilation spectrum with temperature $T_r$ as a source of seed photons and reproduce the spectra.
Other details of the model are identical to those given in VPE21.
\section{Seed photon distribution : Comptonized Pair annihilation spectrum}
\label{sec_seed_dist}
{In a collapsing star, free neutrinos are generated and annihilate near the centre of the star in an empty funnel behind the outflowing jet. The neutrino annihilation near the centre of the star produces a copious amount of electron positron ($e^-e^+$) pairs \citep{1993ApJ...405..273W,1999ApJ...518..356P,1999ApJ...524..262M, 2003ApJ...594L..19L, 2005astro.ph..6368M, 2005astro.ph..6369M, 2014ApJ...796...26G}. The $e^-e^+$ pairs fall towards gravitating centre below a stagnation surface due to gravity and they escape outwards above it [see eg., Figure 1 of \cite{2005astro.ph..6368M}]. This plasma is hot with relativistic temperatures, and the pairs are in equilibrium with radiation produced within the plasma \citep{2013ApJ...770..159L}. The pair plasma produces a pair annihilation spectrum and associated bremsstrahlung radiation. This spectrum is further modified due to Compton scattering within the plasma. The emerging spectra that follow bremmstrahlung and Comptonization from thermal distribution of plasma at temperature $T_r$ were studied by \cite{1984PhST....7..124Z} through Monte Carlo simulations. There, he showed that the resultant spectrum at relativistic temperatures is flat in nature and decays exponentially at high frequencies.
For a typical plasma with density $n=2\times 10^{18}$ cm$^{-3}$, $\Theta_r=k_BT_r/m_ec^2$, and escape optical depth $\tau=1$.
We obtain the following numerical fit to the respective spectrum integrated over the emitting surface,
\begin{equation}
F_{\varepsilon}=C_0 \exp \left(-\frac{C_1 \varepsilon^2}{\Theta_r^2}\right) {~~~\rm KeV/s/}{\rm KeV}^{-1}
\label{eq_zd_fit}
\end{equation}
Here $\varepsilon$ is energy of the photons normalized to electron's rest energy $m_ec^2$, $k_B$ is Boltzmann's constant, $m_e$ is the mass of the electron, $c$ is the light speed and $C_1=0.045$. $C_0(=2\times 10^{40}$ KeV s$^{-1}/$KeV) is a normalization parameter that depends on the pair density. As long as the plasma is relativistic it is independent of $T_r$. Note that its value does not affect the overall spectral shape, hence its exact parametric dependence will not affect the results presented here.
Our Equation \ref{eq_zd_fit} provides good fit to the data presented by \cite{1984PhST....7..124Z} in his Figures 1(d) and 1(e). We find that this fit is applicable for relativistic temperatures $\Theta_r>0.3$ where the emergent spectra are flat.}
{These photons, then, propagate and enter the outflowing optically thick cork with temperature $\Theta_c=k_BT_c/m_ec^2$.
Further, the outcome of this seed spectrum intrinsically considers a constant temperature $\Theta_r$. It is a reasonable assumption as long as we are considering the prompt phase spectra where only initial temperature of the pair plasma is important. Thus we retain the assumption of delta function in injection time used in the previous paper. Later evolution of $\Theta_r$ to lower temperatures, related emission and their scattering with the cork may contribute to GRB emissions at late times $i.e.,$ afterglows and are beyond the current scope of this letter.}
\begin {figure}[h]
\begin{center}
\includegraphics[width=7.5cm, angle=0]{2Spectrum_Inj_flat_th_0.1_Tr_2_g_100.eps}
\includegraphics[width=7.5cm, angle=0]{2Spectrum_Inj_flat_th_0.1_Tr_2_g_100_e2dnde.eps}
\caption{Upper panel : Photon spectrum (solid black) for $\gamma=100$ and $\theta_{obs}=0.175$ obtained for pair temperature $\Theta_r=3$. \textbf{The jet opening angle is $\theta_j=0.1$ rad.} It is fitted for low energy photon index $\alpha=-1.1$, $\beta=-2.75$. Both the photon indices are connected at spectral peak energy $\varepsilon_{peak}=1020$ KeV. Blue dotted curves are corresponding monoenergetic photons for $\varepsilon_0=378,1000$ and $3000$ KeV. Lower panel : corresponding spectral emissivity $\epsilon_1^2 dN/d\epsilon_1$. \textbf{Overplotted solid black curve in both the panels is obtained by applying Savitzky–Golay filter for data smoothing}}.
\label{lab_Spectrum_th_0.05}
\end{center}
\end{figure}
\section{Results}
\label{sec_results}
\begin {figure}[h]
\begin{center}
\includegraphics[width=7.5cm, angle=0]{2Spectrum_Obs_vary_multi.eps}
\includegraphics[width=7.5cm, angle=0]{2Spectrum_Obs_vary_multi_e2dnde.eps}
\includegraphics[width=7.5cm, angle=0]{2Thobs_vs_Epeak.eps}
\caption{\textbf{Variation of spectra (top and middle panels) with observing angles in the range $\theta_{obs}=0.005-0.35$ rad. Overplotted dotted curves show the corresponding smoothed spectra by applying Savitzky–Golay filter. Variation of $\varepsilon_{peak}$ with $\theta_{obs}$ (bottom panels). Other parameters are same as Figure \ref{lab_Spectrum_th_0.05}.}}
\label{lab_Spectrum_Obs_vary_multi}
\end{center}
\end{figure}
\begin {figure}[h]
\begin{center}
\includegraphics[width=7.5cm, angle=0]{2Spectrum_gamma_vary_multi.eps}
\includegraphics[width=7.5cm, angle=0]{2Gamma_vs_alpha_beta.eps}
\caption{\textbf{Top panel : Spectra for various Lorentz factors $\gamma=10,20,100$ for the pair temperature $\Theta_r=3$, cork temperature $\Theta_c=0.06$ and $\theta_{obs}=0.105$ rad. Overplotted dotted curves are obtained smoothed data points after applying Savitzky–Golay filter. Bottom panels : variation of $\alpha$ and $\beta$ with $\gamma$ for the same parameters. }}
\label{lab_Spectrum_gamma_vary_multi}
\end{center}
\end{figure}
\subsection{General appearance of the spectrum}
\textbf{The cork forms effectively below the surface of the star with a typical radius $r_s = 10^{10}-3\times 10^{12}$cm. It is accelerated above it reaching an uncertain Lorentz factor which can be a few tens at a distance $r_i\ge r_s$ from the centre of the star.
Is was shown by \cite{2003ApJ...584..390W} that the cork may reach terminal Lorentz factor as high as 100 under specific conditions. However, other authors argue that a more typical value of the terminal Lorentz factor is only a few tens [see \cite{2003ApJ...586..356Z, lopez2013three} for details]. Hence, lacking a complete theory, in this manuscript, we explore the emerging spectra from a range of possible terminal Lorentz factors, $\gamma \sim 10-100$. We further consider the cork to expand radially and lose its energy adiabatically at a distance $~r_i=10^{12.5}$cm from the centre of the star.}
To generate \textbf{a typical} resultant spectrum, we consider a constant Lorentz factor of the cork $\gamma=100$, with opening angle $\theta_j=0.1$ rad and a temperature $\Theta_c=0.4$.\textbf{
Approximately $\sim$26 million photons are injected in the code and scaled with the burst having energy $10^{50}$ erg to calculate the fluxes. Hence the spectra are shown in the rest frame of the burst and are independent of cosmic redshift.
In the upper panel of Figure \ref{lab_Spectrum_th_0.05}, the spectrum obtained for seed distribution of Comptonized pair annihilation and bremsstrahlung spectrum [according to equation \ref{eq_zd_fit}] is shown by black solid curve. To explain how this spectrum is generated, we plot the scattered spectra obtained for three different cases of monoenergetic photons, $\varepsilon_0=378,1000$ and $3000$ KeV (blue dotted curves); this is the setup considered in VPE21. Here the number of photons at each energy $\varepsilon_0$ are supplied according to the Comptonized pair annihilation spectral distribution of photons $dN/dt d\varepsilon=(F_{\varepsilon}/\varepsilon)$ in Equation \ref{eq_zd_fit}. It can be seen that the resulting spectrum is a superposition of the spectra generated by monoenergetic seed photons. The blueshifted peaks represent the increasing values of $\varepsilon_0$. In the lower panel, corresponding spectral emissivity $\varepsilon^2dN/d\varepsilon_1dA$ (KeV cm$^{-2}$) is plotted.
\textbf{We used Savitzky–Golay filter to show the nature of the spectra by data smoothing. The filtered curves are shown by overplotted solid curves in both the spectra.}
For the parameters used, the spectral peak energy $\varepsilon_{peak}$ is obtained at $1020$ KeV and it separates the two spectral regimes with slopes $\alpha$ and $\beta$. All three monoenergetic spectra have positive low energy photon indices $\alpha=1$ while the resultant spectrum produces a negative slope $\alpha=-1.1$. The high energy photon index is obtained to be $\beta=-2.75$. This result is similar to the observational result of the prompt GRB spectra that show $\alpha=-1$ and $\beta=-2.5~$\citep{2006ApJS..166..298K, 2015AdAst2015E..22P}. In our model, generation of power laws at high energy follows from multiple scattering inside the cork; a complete explanation for this part of the spectrum appears in section 3.2.1, [eg. Figure 4] of VPE21. The obtained peak energies are also in accordance with the most abundant observed values for redshifted corrected spectra [see Figure 3 of \cite{2011A&A...531A..20G}].
\\
\subsection{Parametric dependence and explaining the observed spectra}
\textbf{The spectrum shown in Figure \ref{lab_Spectrum_th_0.05} is generated for specific parameters. Due to the high uncertainty in the theoretical models describing the formation, acceleration and composition of the cork, there is a high uncertainty in a number of key physical parameters describing the system. We here show that this uncertainty, by large, has only a moderate effect on the observed signal. In this respect, we analyze the dependence of
$\alpha, \beta$ and $\varepsilon_{peak}$ on system variables like cork Lorentz factor $\gamma$, cork temperature $\Theta_c$, the pair temperature $\Theta_r$ on which the seed photon's energy depends and the observer's angle $\theta_{obs}$.}
\subsubsection*{Dependence of observed spectra on observing angle $\theta_{obs}$}
\textbf{In the top two panels of Figure \ref{lab_Spectrum_Obs_vary_multi} we plot respective spectra (flux and spectral emissivity) as seen by different observers situated at different observing positions $\theta_{obs}(=0.005-0.355$ rad). All other parameters are kept identical to Figure \ref{lab_Spectrum_th_0.05}. In the bottom panel, we show the variation of $\varepsilon_{peak}$ with $\theta_{obs}$.
The observer's position doesn't change the spectral slopes and hence $\alpha$ and $\beta$ are constant for all the observers situated at different angular positions. However, due to relativistic beaming, the observers at larger angular positions receive less flux as well as the spectral peak becomes softer. Variation of $\varepsilon_{peak}$ with $\theta_{obs}$ is shown in the last panel. For the observers within the jet angle $\theta_j=0.1$ rad, $\varepsilon_{peak}$ is roughly constant (few 10 MeV) while it monotonically decreases for $\theta_{obs}>\theta_j$ and falls upto few KeV for $\theta_{obs}\sim 0.35$ rad. }
\subsubsection*{Spectral evolution with cork Lorentz factors ($\gamma$)}
\textbf{In the top panel of Figure \ref{lab_Spectrum_gamma_vary_multi}, we consider three values of $\gamma=10,20$ and $100$ and plot the spectrum scattered by a cork with temperature $\Theta_c=0.06$. These spectra are seen by an observer at $\theta_{obs}=0.105$rad. The spectral shape is not very sensitive to $\gamma$ as the seed photons are first redshifted in the cork frame by a factor of $2\gamma$ and then after backscattering, these are again blueshifted for an on axis observer by the same amount. However, the flux received from less relativistic corks significantly decreases due to less effective relativistic beaming towards the observer. The low energy photon indices are unaffected by $\gamma$.
In the bottom panel, we show that the spectra are harder showing smaller magnitudes of $\beta$ for larger $\gamma$. This can be understood as the seed photons transforms to less energy for higher $\gamma$ and thus these photons are more efficiently inverse Comptonized to gain energy inside the cork thereby making the spectrum harder. Variation of $\gamma$ between 10-100 thus produces range of $\beta=-3.1$ to $-2.4$.}
\subsubsection*{Effect of plasma temperature $\Theta_r$ and cork temperatures $\Theta_c$ on the spectra}
\textbf{The spectrum evolves with the seed photons' energy which is governed by pair temperature $\Theta_r$. Corresponding spectral variation is shown in the top left panel of Figure \ref{lab_Spectrum_Tr_vary_multi} for $\Theta_r=1,3$ and $10$. Here $\gamma=20$, $\Theta_c=0.06$ and $\theta_{obs}=0.105$ rad. The spectrum gets harder when the plasma assumes higher temperature and subsequently emits more photons at higher energy.
In the subsequent panels below the spectra, we plot the variation of $\alpha$ $\beta$ and $\varepsilon_{peak}$ as functions of $\Theta_r$. As $\Theta_r$ varies in range 1-10, $\alpha$ mildly changes from -1.95 to -1.85, $\beta$ changes from -3.5 to -2.5 while the spectral peak energy $\varepsilon_{peak}$ evolves from 102 KeV to 186 KeV.}
\textbf{As the photons lose or gain energy by multiple scattering inside the cork, all the spectral parameters are sensitives to $\Theta_c$. In the top right panel of Figure \ref{lab_Spectrum_Tr_vary_multi}, we show the spectra for different choices of $\Theta_c$ in the range $0.06-0.4$. Here $\gamma=20$, $\Theta_r=3$ and $\theta_{obs}=0.105$ rad are kept constant. As the electrons are more energetic in the hotter cork, the spectra are harder showing decrease in magnitudes of $\alpha$, $\beta$ and increase in $\varepsilon_{peak}$, respectively shown in lower panels in the right column of Figure \ref{lab_Spectrum_Tr_vary_multi}. As $\Theta_c$ increases from $0.06$ to $0.4$, $\alpha$ varies from -1.9 to -1.55, $\beta$ changes from -3.0 to -2.4 and $\varepsilon_{peak}$ covers a large range between 187 KeV and 1.19 MeV. All these values are within the observed ranges seen in GRB prompt phase observations.}
\begin {figure*}[h]
\begin{center}
\includegraphics[width=7cm, angle=0]{2Spectrum_Tr_vary_multi.eps}
\includegraphics[width=7cm, angle=0]{2Spectrum_Tempk_vary_multi.eps}
\includegraphics[width=7cm, angle=0]{2Tr_vs_alpha.eps}
\includegraphics[width=7cm, angle=0]{2Temp_k_vs_alpha.eps}
\includegraphics[width=7cm, angle=0]{2Tr_vs_beta.eps}
\includegraphics[width=7cm, angle=0]{2Temp_k_vs_beta.eps}
\includegraphics[width=7cm, angle=0]{2Tr_vs_Epeak.eps}
\includegraphics[width=7cm, angle=0]{2Temp_k_vs_Epeak.eps}
\caption{\textbf{First row : Dependence of spectra on various choices of pair temperatures $\Theta_r=1,3,10$ choosing cork temperature $\Theta_c=0.06$ (left panel) and $\Theta_c=0.06,0.3,0.4$ keeping $\Theta_r=3$ (right panel). In both the panels, the overplotted dotted curves are corresponding smoothed spectra by applying Savitzky–Golay filter. Second row : variation of $\alpha$ with $\Theta_r$ (left) and $\Theta_c$ (left). Third row : $\beta$ as a function of $\Theta_r$ (left) and $\Theta_c$ (left). In the bottom row, dependence of $\varepsilon_{peak}$ is shown upon $\Theta_r$ (left panel) and $\Theta_c$ (right panel). For all the panels, $\theta_{obs}=0.105$ rad, $\theta_j=0.1$ rad and $\gamma=20$.}}
\label{lab_Spectrum_Tr_vary_multi}
\end{center}
\end{figure*}
\section{Summary}
\label{sec_summary}
In this letter we have considered {Comptonized }pair equilibrium {and bremsstrahlung} spectra near the centre of the star when gamma ray burst takes place. These seed photons interact with a radially expanding stellar cork outside the stellar surface and are backscattered after undergoing Compton scattering with the relativistic electrons within the cork. The backscattered photons are then observed by an observer situated at angle $\theta_{obs}$ from the jet axis.
The obtained spectra have a {negative} low energy photon index $\alpha$ {and} steeper high energy photon index $\beta$.
\textbf{Our model predicts a large range of parameters $\alpha=-1.95$ to $-1.1$, $\beta=-3.5$ to $\sim -2.4$ and $\varepsilon_{peak}=$ a few KeV to few $10\times$ MeV.
}
In the observed surveys, the peak values of low \textbf{and high } energy photon indices for the GRB population are obtained to be $\alpha=-1$ $\beta\sim -2.5$ and $\varepsilon_{peak} \sim 1$ MeV \citep{2000ApJS..126...19P,2006ApJS..166..298K,20115MNRAS.418L.109G, 2015AdAst2015E..22P} \textbf{with a large of variation their respective ranges in the GRB population}.
\textbf{The obtained range of all the spectral parameters that govern the GRB prompt phase spectra are consistent with the observed ranges.}
Hence, the modification makes the spectra in the backscattering model to be consistent with observations keeping all other findings in VPE21 unchanged.
In future works, we will shed light on the analytic understanding of the high energy photon indices $\beta$ and their dependence on physical parameters of the system. The evolution of pair plasma by expansion and subsequent emission of low energy seed photons can potentially contribute to the afterglow that we aim at examining further.
\acknowledgments
AP wishes to acknowledge support from the EU via ERC consolidator grant $773062$ (O.M.J.). MKV acknowledges the PBC program from the government of Israel {and Hüsne Dereli Bégué, Damien Bégué and Christoffer Lundman} for important discussions. DE acknowledges support from The Israel Science Foundation grant 2131.
|
\section{Introduction}
Optimal transport theory has a long and distinguished history in mathematics dating back to the seminal work of \citet{monge1781memoire} and \citet{kantorovich1942transfer}. While originally envisaged for applications in civil engineering, logistics and economics, optimal transport problems provide a natural framework for comparing probability measures and have therefore recently found numerous applications in statistics and machine learning. Indeed, the minimum cost of transforming a probability measure~$\mu$ on $\mathcal{X}$ to some other probability measure~$\nu$ on $\mathcal{Y}$ with respect to a prescribed cost function on~$\mathcal{X}\times \mathcal{Y}$ can be viewed as a measure of distance between~$\mu$ and $\nu$. If $\mathcal{X}=\mathcal{Y}$ and the cost function coincides with (the $p^{\text{th}}$ power of) a metric on~$\mathcal{X}\times \mathcal{X}$, then the resulting optimal transport distance represents (the $p^{\text{th}}$ power of) a Wasserstein metric on the space of probability measures over~$\mathcal{X}$ \citep{villani}. In the remainder of this paper we distinguish {\em discrete}, {\em semi-discrete} and {\em continuous} optimal transport problems in which either both, only one or none of the two probability measures~$\mu$ and~$\nu$ are discrete, respectively.
In the wider context of machine learning, {\em discrete} optimal transport problems are nowadays routinely used, for example, in the analysis of mixture models \citep{kolouri2017optimal, nguyen2013convergence} as well as in image processing \citep{alvarez2017structured, ferradans2014regularized, kolouri2015transport, papadakis2017convex, tartavel2016wasserstein}, computer vision and graphics \citep{pele2008linear, pele2009fast, rubner2000earth, solomon2014earth, solomon2015convolutional}, data-driven bioengineering \citep{feydy2017optimal, kundu2018discovery, wang2010optimal}, clustering \citep{ho2017multilevel}, dimensionality reduction \citep{cazelles2018geodesic, flamary2018wasserstein, rolet2016fast, schmitzer2016sparse, seguy2015principal}, domain adaptation \citep{courty2016optimal, murez2018image}, distributionally robust optimization \citep{esfahani2018data, nguyen2020distributionally, NIPS2015_5745, shafieezadeh2019regularization}, scenario reduction \citep{heitsch2007note, rujeerapaiboon2018scenario}, scenario generation \citep{pflug2001scenario, hochreiter2007financial}, the assessment of the fairness properties of machine learning algorithms \citep{gordaliza2019obtaining, taskesen2020distributionally, taskesen2020statistical} and signal processing \citep{thorpe2017transportation}.
The discrete optimal transport problem represents a tractable linear program that is susceptible to the network simplex algorithm \citep{orlin1997polynomial}. Alternatively, it can be addressed with dual ascent methods \citep{bertsimas1997introduction}, the Hungarian algorithm for assignment problems \citep{kuhn1955hungarian} or customized auction algorithms \citep{bertsekas1981new, bertsekas1992auction}.
The currently best known complexity bound for computing an {\em exact} solution is attained by modern interior-point algorithms.
Indeed, if $N$ denotes the number of atoms in~$\mu$ or in~$\nu$, whichever is larger, then the discrete optimal transport problem can be solved in time\footnote{We use the soft-O notation $\tilde{\mathcal O}(\cdot)$ to hide polylogarithmic factors.}~$\mathcal{\tilde{O}}(N^{2.5})$ with an interior point algorithm by \citet{lee2014path}.
The need to evaluate optimal transport distances between increasingly fine-grained histograms has also motivated efficient approximation schemes. \citet{blanchet2018towards} and \citet{quanrud2018approximating} show that an $\epsilon$-optimal solution can be found in time~$\mathcal{O}(N^2/\epsilon)$ by reducing the discrete optimal transport problem to a matrix scaling or a positive linear programming problem, which can be solved efficiently by a Newton-type algorithm.
\citet{jambulapati2019direct} describe a parallelizable primal-dual first-order method that achieves a similar convergence~rate.
The tractability of the discrete optimal transport problem can be improved by adding an entropy regularizer to its objective function, which penalizes the entropy of the transportation plan for morphing~$\mu$ into~$\nu$. When the weight of the regularizer grows, this problem reduces to the classical Schr\"odinger bridge problem of finding the most likely random evolution from~$\mu$ to~$\nu$ \citep{schrodinger1931umkehrung}. Generic linear programs with entropic regularizers were first studied by \citet{fang1992unconstrained}. \citet{cominetti1994asymptotic} prove that the optimal values of these regularized problems converge exponentially fast to the optimal values of the corresponding unregularized problems as the regularization weight drops to zero.
Non-asymptotic convergence rates for entropy regularized linear programs are derived by \citet{weed2018explicit}.
\citet{sinkhorn} was the first to realize that entropic penalties are computationally attractive because they make the discrete optimal transport problem susceptible to a fast matrix scaling algorithm by \citet{sinkhorn1967diagonal}. This insight has spurred widespread interest in machine learning and led to a host of new applications of optimal transport in color transfer \citep{chizat2016scaling}, inverse problems \citep{karlsson2017generalized, adler2017learning}, texture synthesis \citep{peyre2017quantum}, the analysis of crowd evolutions \citep{peyre2015entropic} and shape interpolation \citep{solomon2015convolutional} to name a few. This surge of applications inspired in turn several new algorithms for the entropy regularized discrete optimal transport problem such as a greedy dual coordinate descent method also known as the Greenkhorn algorithm \citep{altschuler2017near, chakrabarty2018better, abid2018greedy}.
\citet{dvurechensky2018computational} and \citet{lin2019efficient} prove that both the Sinkhorn and the Greenkhorn algorithms are guaranteed to find an $\epsilon$-optimal solution in time $\tilde{\mathcal{O}}({N^2}/{\epsilon^2})$. In practice, however, the Greenkhorn algorithm often outperforms the Sinkhorn algorithm~\citep{lin2019efficient}. The runtime guarantee of both algorithms can be improved to $\tilde{\mathcal{O}}(N^{7/3}/\epsilon)$ via a randomization scheme \citep{lin2019acceleration}.
In addition, the regularized discrete optimal transport problem can be addressed by tailoring general-purpose optimization algorithms such as accelerated gradient descent algorithms \citep{dvurechensky2018computational}, iterative Bregman projections \citep{benamou2015iterative}, quasi-Newton methods \citep{blondel2017smooth} or stochastic average gradient descent algorithms \citep{genevay2016stochastic}. While the original optimal transport problem induces sparse solutions, the entropy penalty forces the optimal transportation plan of the regularized optimal transport problem to be strictly positive and thus completely dense. In applications where the interpretability of the optimal transportation plan is important, the lack of sparsity could be undesirable; examples include color transfer \citep{pitie2007automated}, domain adaptation \citep{courty2016optimal} or
ecological inference \citep{muzellec2017tsallis}.
Hence, there is merit in exploring alternative regularization schemes that retain the attractive computational properties of the entropic regularizer but induce sparsity. Examples that have attracted significant interest include smooth convex regularization and Tikhonov regularization \citep{dessein2018regularized, blondel2017smooth, seguy2017large, essid2018quadratically}, Lasso regularization \citep{li2016fast}, Tsallis entropy regularization \citep{muzellec2017tsallis} or group Lasso regularization \citep{courty2016optimal}.
Much like the discrete optimal transport problems, the significantly more challenging \emph{semi-discrete} optimal transport problems emerge in numerous applications including variational inference \citep{ambrogioni2018wasserstein}, blue noise sampling \citep{qin2017wasserstein}, computational geometry \citep{levy2015numerical}, image quantization \citep{de2012blue} or deep learning with generative adversarial networks \citep{arjovsky2017wasserstein, genevay2017learning, gulrajani2017improved}. Semi-discrete optimal transport problems are also used in fluid mechanics to simulate incompressible fluids \citep{de2015power}.
Exact solutions of a semi-discrete optimal transport problem can be constructed by solving an incompressible Euler-type partial differential equation discovered by \citet{brenier1991polar}. Any optimal solution is known to partition the support of the non-discrete measure into cells corresponding to the atoms of the discrete measure \citep{aurenhammer1998minkowski}, and the resulting tessellation is usually referred to as a power diagram.
\citet{ref:mirebeau2015discretization} uses this insight to solve Monge-Amp{\`e}re equations with a damped Newton algorithm, and \citet{kitagawa2016convergence} show that a closely related algorithm with a global linear convergence rate lends itself for the numerical solution of generic semi-discrete optimal transport problems. In addition, \citet{merigot2011multiscale} proposes a quasi-Newton algorithm for semi-discrete optimal transport, which improves a method due to~\citet{aurenhammer1998minkowski} by exploiting Llyod's algorithm to iteratively simplify the discrete measure.
If the transportation cost is quadratic, \citet{bonnotte2013knothe} relates the optimal transportation plan to the Knothe-Rosenblatt rearrangement for mapping~$\mu$ to~$\nu$, which is very easy to compute.
As usual, regularization improves tractability. \citet{genevay2016stochastic} show that the dual of a semi-discrete optimal transport problem with an entropic regularizer is susceptible to an averaged stochastic gradient descent algorithm that enjoys a convergence rate of~$\mathcal O(1/\sqrt{T})$, $T$ being the number of iterations. {\color{black} \citet{ref:altschuler2022asymptotics} show that the optimal value of the entropically regularized problem converges to the optimal value of the unregularized problem at a quadratic rate as the regularization weight drops to zero. Improved error bounds under stronger regularity conditions are derived by~\citet{ref:delalande2021nearly}.}
{\em Continuous} optimal transport problems constitute difficult variational problems involving infinitely many variables and constraints. \citet{benamou2000computational} recast them as boundary value problems in fluid dynamics,
and \citet{papadakis2014optimal} solve discretized versions of these reformulations using first-order methods. For a comprehensive survey of the interplay between partial differential equations and optimal transport we refer to \citep{evans1997partial}. As nearly all numerical methods for partial differential equations suffer from a curse of dimensionality, current research focuses on solution schemes for {\em regularized} continuous optimal transport problems.
For instance, \citet{genevay2016stochastic} embed their duals into a reproducing kernel Hilbert space to obtain finite-dimensional optimization problems that can be solved with a stochastic gradient descent algorithm. \citet{seguy2017large} solve regularized continuous optimal transport problems by representing the transportation plan as a multilayer neural network. This approach results in finite-dimensional optimization problems that are non-convex and offer no approximation guarantees. However, it provides an effective means to compute approximate solutions in high dimensions. {\color{black} Indeed, the optimal value of the entropically regularized continuous optimal transport problem is known to converge to the optimal value of the unregularized problem at a linear rate as the regularization weight drops to zero \citep{ref:chizat2020faster, ref:conforti2021formula, ref:erbar2015large,ref:pal2019difference}.} Due to a lack of efficient algorithms, applications of continuous optimal transport problems are scarce in the extant literature. \citet{peyre2019computational} provide a comprehensive survey of numerous applications and solution methods for discrete, semi-discrete and continuous optimal transport problems.
This paper focuses on semi-discrete optimal transport problems. Our main goal is to formally establish that these problems are computationally hard, to propose a unifying regularization scheme for improving their tractability and to develop efficient algorithms for solving the resulting regularized problems, {\color{black} assuming only that we have access to independent samples from the continuous probability measure~$\mu$}. Our regularization scheme is based on the observation that any {\em dual} semi-discrete optimal transport problem maximizes the expectation of a piecewise affine function with $N$ pieces, where the expectation is evaluated with respect to~$\mu$, and where $N$ denotes the number of atoms of the discrete probability measure~$\nu$. We argue that this piecewise affine function can be interpreted as the optimal value of a {\em discrete choice problem}, which can be smoothed by adding random disturbances to the underlying utility values \citep{thurstone1927law, mcfadden1973conditional}. As probabilistic discrete choice problems are routinely studied in economics and psychology, we can draw on a wealth of literature in choice theory to design various smooth (dual) optimal transport problems with favorable numerical properties. For maximal generality we will also study {\em semi-parametric} discrete choice models where the disturbance distribution is itself subject to uncertainty \citep{natarajan2009persistency, mishra2014theoretical, feng2017relation, ahipasaoglu2018convex}. Specifically, we aim to evaluate the best-case (maximum) expected utility across a Fr\'echet ambiguity set containing all disturbance distributions with prescribed marginals. Such models can be addressed with customized methods from modern distributionally robust optimization \citep{natarajan2009persistency}. For Fr\'echet ambiguity sets, we prove that smoothing the dual objective is equivalent to regularizing the primal objective of the semi-discrete optimal transport problem. The corresponding regularizer penalizes the discrepancy between the chosen transportation plan and the product measure~$\mu\otimes \nu$ with respect to a divergence measure constructed from the marginal disturbance distributions. Connections between primal regularization and dual smoothing were previously recognized by \citet{blondel2017smooth} and \citet{paty2020regularized} in discrete optimal transport and by \citet{genevay2016stochastic} in semi-discrete optimal transport. As they are constructed ad hoc or under a specific adversarial noise model, these existing regularization schemes lack the intuitive interpretation offered by discrete choice theory and emerge as special cases of our unifying scheme.
The key contributions of this paper are summarized below.
\begin{enumerate}[label=\roman*.]
\item We study the computational complexity of semi-discrete optimal transport problems. Specifically, we prove that computing the optimal transport distance between two probability measures~$\mu$ and~$\nu$ on the same Euclidean space is $\#$P-hard {\color{black} even if only approximate solutions are sought and} even if~$\mu$ is the Lebesgue measure on the standard hypercube and~$\nu$ is supported on merely two points.
\item We propose a unifying framework for regularizing semi-discrete optimal transport problems by leveraging ideas from distributionally robust optimization and discrete choice theory \citep{natarajan2009persistency, mishra2014theoretical, feng2017relation, ahipasaoglu2018convex}. Specifically, we perturb the transportation cost to every atom of the discrete measure~$\nu$ with a random disturbance, and we assume that the vector of all disturbances is governed by an uncertain probability distribution from within a Fr\'echet ambiguity set that prescribes the marginal disturbance distributions. Solving the dual optimal transport problem under the least favorable disturbance distribution in the ambiguity set amounts to smoothing the dual and regularizing the primal objective function. We show that numerous known and new regularization schemes emerge as special cases of this framework, and we derive a priori approximation bounds for the resulting regularized optimal transport problems.
\item We derive new convergence guarantees for an averaged stochastic gradient descent (SGD) algorithm that has only access to a {\em biased} stochastic gradient oracle. Specifically, we prove that this algorithm enjoys a convergence rate of $\mathcal O(1/\sqrt{T})$ for Lipschitz continuous and of~$\mathcal O(1/T)$ for generalized self-concordant objective functions. We also show that this algorithm lends itself to solving the smooth dual optimal transport problems obtained from the proposed regularization scheme. When the smoothing is based on a semi-parametric discrete choice model with a Fr\'echet ambiguity set, the algorithm's convergence rate depends on the smoothness properties of the marginal noise distributions, and its per-iteration complexity depends on our ability to compute the optimal choice probabilities. We demonstrate that these choice probabilities can indeed be computed efficiently via bisection or sorting, and in special cases they are even available in closed form. As a byproduct, we show that our algorithm can improve the state-of-the-art $\mathcal O(1/\sqrt{T})$ convergence guarantee of~\citet{genevay2016stochastic} for the semi-discrete optimal transport problem with an {\em entropic} regularizer.
\end{enumerate}
The rest of this paper unfolds as follows. In Section~\ref{sec:complexity} we study the computational complexity of semi-discrete optimal transport problems, and in Section~\ref{sec:smooth_ot} we develop our unifying regularization scheme.
In Section~\ref{sec:computation} we analyze the convergence rate of an averaged SGD algorithm with a biased stochastic gradient oracle that can be used for solving smooth dual optimal transport problems, and in Section~\ref{sec:numerical} we compare its empirical convergence behavior against the theoretical convergence guarantees.
\paragraph{Notation.}
We denote by $\|\cdot\|$ the 2-norm, by $[N] = \{1, \ldots, N \}$ the set of all integers up to $N\in\mathbb N$ and by $\Delta^d = \{\boldsymbol x \in \mathbb R_+^d : \sum_{i = 1}^d x_i =1\}$ the probability simplex in $\mathbb R^d$.
For a logical statement $\mathcal E$ we define $\mathds{1}_{\mathcal E} = 1$ if $\mathcal E$ is true and $\mathds{1}_{\mathcal E} = 0$ if $\mathcal E$ is false.
For any closed set $\mathcal{X}\subseteq \mathbb{R}^d$ we define $\mathcal{M}(\mathcal{X})$ as the family of all Borel measures and $\mathcal{P}(\mathcal{X})$ as its subset of all Borel probability measures on~$\mathcal{X}$.
For $\mu\in\mathcal{P}(\mathcal{X})$, we denote by $\mathbb{E}_{\boldsymbol x \sim \mu}[\cdot]$ the expectation operator under $\mu$ and define $\mathcal{L}(\mathcal{X}, \mu)$ as the family of all $\mu$-integrable functions $f:\mathcal{X}\rightarrow\mathbb{R}$, that is, $f \in \mathcal{L}(\mathcal{X}, \mu)$ if and only if $\int_{\mathcal{X}} |f(\boldsymbol x)| \mu(\mathrm{d} \boldsymbol x)<\infty$.
The Lipschitz modulus of a function $f: \mathbb{R}^d \to \mathbb{R}$ is defined as $\lip(f) = \sup_{\boldsymbol x, \boldsymbol{x}'}\{|f(\boldsymbol x) - f(\boldsymbol{x}')|/\|\boldsymbol x - \boldsymbol{x}'\|: \boldsymbol x \neq \boldsymbol{x}'\}$. The convex conjugate of $f: \mathbb{R}^d \to [-\infty,+\infty]$ is the function $f^*:\mathbb{R}^d\rightarrow [-\infty,+\infty]$ defined through $f^{*}(\boldsymbol y) = \sup_{\boldsymbol x \in \mathbb{R}^d}\boldsymbol y^\top \boldsymbol x - f(\boldsymbol x)$.
\section{Hardness of Computing Optimal Transport Distances}
\label{sec:complexity}
If $\mathcal{X}$ and $\mathcal{Y}$ are closed subsets of finite-dimensional Euclidean spaces and $c: \mathcal{X} \times \mathcal{Y} \to [0,+\infty]$ is a lower-semicontinuous cost function, then the Monge-Kantorovich {\em optimal transport distance} between two probability measures $\mu\in\mathcal P(\mathcal{X})$ and $\nu\in\mathcal P(\mathcal{Y})$ is defined as
\begin{equation}
W_c(\mu, \nu) = \min\limits_{\pi \in \Pi(\mu,\nu)} ~ \mathbb{E}_{(\boldsymbol x, \boldsymbol y) \sim \pi}\left[{c(\boldsymbol x, \boldsymbol y)}\right],
\label{eq:primal}
\end{equation}
where $\Pi(\mu,\nu)$ denotes the family of all {\em couplings} of $\mu$ and $\nu$, that is, the set of all probability measures on $\mathcal{X} \times \mathcal{Y}$ with marginals $\mu$ on $\mathcal{X}$ and $\nu$ on $\mathcal{Y}$. One can show that the minimum in~\eqref{eq:primal} is always attained \citep[Theorem~4.1]{villani}. If $\mathcal{X}=\mathcal{Y}$ is a metric space with metric $d:\mathcal{X}\times \mathcal{X}\rightarrow \mathbb{R}_+$ and the transportation cost is defined as $c(\boldsymbol x, \boldsymbol y)=d^p(\boldsymbol x,\boldsymbol y)$ for some $p \geq 1$, then $W_c(\mu, \nu)^{1/p}$ is termed the $p$-th Wasserstein distance between $\mu$ and $\nu$. The optimal transport problem~\eqref{eq:primal} constitutes an infinite-dimensional linear program over measures and admits a strong dual linear program over functions \citep[Theorem~5.9]{villani}.
\begin{proposition}[Kantorovich duality]
\label{prop:kantorovich}
The optimal transport distance between $\mu \in \mathcal{P}(\mathcal{X})$ and $\nu \in \mathcal{P}(\mathcal{Y})$ admits the dual representation
\begin{equation}
\label{eq:dual}
W_c(\mu, \nu) =\left\{ \begin{array}{c@{\quad}l@{\qquad}l}
\sup & \displaystyle \mathbb{E}_{\boldsymbol y \sim \nu}\left[ {\phi(\boldsymbol y)}\right] - \mathbb{E}_{\boldsymbol x \sim \mu}\left[{\psi(\boldsymbol x)}\right] & \\ [0.5em]
\mathrm{s.t.} & \psi \in \mathcal{L}(\x, \mu),~ \phi \in \mathcal{L}(\y, \nu) & \\ [0.5em]
& \phi(\boldsymbol y) - \psi(\boldsymbol x) \leq c(\boldsymbol x, \boldsymbol y) \quad \forall \boldsymbol x \in \mathcal{X},~ \boldsymbol y \in \mathcal{Y}.
\end{array}\right.
\end{equation}
\end{proposition}
The linear program~\eqref{eq:dual} optimizes over the two {\em Kantorovich potentials} $\psi \in \mathcal{L}(\x, \mu)$ and $\phi \in \mathcal{L}(\y, \nu)$, but it can be reformulated as the following non-linear program over a single potential function,
\begin{equation}
\label{eq:ctans_dual}
W_c(\mu, \nu) =\sup_{\phi \in \mathcal{L}(\mathcal{Y}, \nu)} ~ \displaystyle \mathbb{E}_{\boldsymbol y \sim \nu}\left[\phi(\boldsymbol y)\right] - \mathbb{E}_{\boldsymbol x \sim \mu}\left[ \phi_c(\boldsymbol x) \right],
\end{equation}
where $\phi_c:\mathcal{X}\rightarrow [-\infty,+\infty]$ is called the \textit{$c$-transform} of $\phi$ and is defined through
\begin{equation}
\label{eq:$c$-transform}
\phi_c(\boldsymbol x) = \sup_{\boldsymbol y \in \mathcal{Y}} ~ \phi(\boldsymbol y) - c(\boldsymbol x, \boldsymbol y) \qquad \forall \boldsymbol x \in \mathcal{X},
\end{equation}
see \citet[\S~5]{villani} for details. The Kantorovich duality is the key enabling mechanism to study the computational complexity of the optimal transport problem~\eqref{eq:primal}.
\begin{theorem}[Hardness of computing optimal transport distances]
\label{theorem:hard}
Computing $W_c(\mu, \nu)$ is \#P-hard even if $\mathcal{X}=\mathcal{Y}=\mathbb{R}^d$, $c(\boldsymbol x, \boldsymbol y) = \|\boldsymbol x-\boldsymbol y\|^{p}$ for some $p\geq 1$, $\mu$ is the Lebesgue measure on the standard hypercube~$[0,1]^d$, and $\nu$ is a discrete probability measure supported on only two points.
\end{theorem}
To prove Theorem~\ref{theorem:hard}, we will show that computing the optimal transport distance $W_c(\mu, \nu)$ is at least as hard computing the volume of the knapsack polytope $P( \boldsymbol{w}, b) = \{\boldsymbol x\in [0,1]^d : \boldsymbol{w}^\top \boldsymbol x\leq b\}$ for a given $\boldsymbol{w}\in \mathbb{R}^d_+$ and $ b \in \mathbb{R}_+$, which is known to be $\#$P-hard \citep[Theorem~1]{dyer1988complexity}. Specifically, we will leverage the following variant of this hardness result, which establishes that approximating the volume of the knapsack polytope $P( \boldsymbol{w}, b)$ to a sufficiently high accuracy is already $\#$P-hard.
\begin{lemma}[{\citet[Lemma~1]{Grani}}]
\label{lemma:Grani}
Computing the volume of the knapsack polytope $P( \boldsymbol{w}, b)$ for a given $\boldsymbol{w}\in \mathbb{R}^d_+$ and $ b \in \mathbb{R}_+$ to within an absolute accuracy of $\delta>0$ is $\#$P-hard
whenever
\begin{equation}
\label{eq:Granis-delta}
\delta <\frac{1}{ {2d!(\|\boldsymbol{w}\|_1+2)^d(d+1)^{d+1}\prod_{i = 1}^{d}w_i}}.
\end{equation}
\end{lemma}
Fix now any knapsack polytope $P( \boldsymbol{w}, b)$ encoded by $\boldsymbol{w}\in \mathbb{R}_+^d$ {\color{black}and $ b \in \mathbb{R}_+$. Without loss of generality, we may assume that~$\bm w \neq \bm 0$ and~$b > 0$. Indeed, we are allowed to exclude~$\bm w = \bm 0 $ because the volume of~$P(\bm 0, b) $ is trivially equal to 1. On the other hand, $b= 0$ can be excluded by applying a suitable rotation and translation, which are volume-preserving transformations.} In the remainder, we denote by $\mu$ the Lebesgue measure on the standard hypercube $[0,1]^d$ and by ${\nu}_ t = t \delta_{\boldsymbol y_1} + (1-t) \delta_{\boldsymbol y_2}$ a family of discrete probability measures with two atoms at $\boldsymbol y_1=\boldsymbol 0$ and $\boldsymbol y_2=2b\boldsymbol{w}/ \|\boldsymbol w\|^2$, respectively, whose probabilities are parameterized by $t \in [0, 1]$.
The following preparatory lemma relates the volume of $P( \boldsymbol{{w}},b)$ to the optimal transport problem~\eqref{eq:primal} and is thus instrumental for the proof of Theorem~\ref{theorem:hard}.
\begin{lemma}
\label{lem:vol}
If $c(\boldsymbol x, \boldsymbol y)=\|\boldsymbol x- \boldsymbol y \|^p$ for some $p\ge 1$, then we have $\mathop{\rm Vol}(P( \boldsymbol{{w}},b)) = \argmin_{ t \in [0,1]} W_c(\mu, {\nu}_ t )$.
\end{lemma}
\begin{proof}
By the definition of the optimal transport distance in~\eqref{eq:primal} and our choice of~$c(\boldsymbol x, \boldsymbol y)$, we have
\begin{align*}
\underset{ t \in [0,1]}{\min}W_c(\mu, {\nu}_ t )&= \underset{ t \in [0,1]}{\min} ~ \min\limits_{\pi \in \Pi(\mu,\nu_t)} ~ \mathbb{E}_{(\boldsymbol x, \boldsymbol y)\sim\pi}\left[\|\boldsymbol x- \boldsymbol y \|^p \right] \\[0.5ex] &=\min\limits_{ t \in [0,1]}~ \left\{\begin{array}{cl} \min\limits_{q_1, q_2 \in \mathcal{P}(\mathbb{R}^d)}& t \displaystyle\int_{\mathbb{R}^d} \|\boldsymbol x-\boldsymbol y_1\|^p q_1(\mathrm{d} \boldsymbol x) + (1-t) \displaystyle\int_{\mathbb{R}^d}\left \|\boldsymbol x-\boldsymbol y_2 \right\|^p q_2(\mathrm{d} \boldsymbol x)\\ [3ex]
\textrm{s.t.}& t \cdot q_1 + (1-t) \cdot q_2 = \mu,
\end{array}\right.
\end{align*}
where the second equality holds because any coupling $\pi$ of $\mu$ and $\nu_t$ can be constructed from the marginal probability measure $\nu_t$ of $\boldsymbol y$ and the probability measures $q_1$ and $q_2$ of $\boldsymbol x$ conditional on $\boldsymbol y =\boldsymbol y_1$ and $\boldsymbol y = \boldsymbol y_2$, respectively, that is, we may write $\pi= t\cdot q_1\otimes \delta_{\boldsymbol y_1} + (1-t)\cdot q_2\otimes \delta_{\boldsymbol y_2}$. The constraint of the inner minimization problem ensures that the marginal probability measure of $\boldsymbol x$ under $\pi$ coincides with $\mu$. By applying the variable transformations $q_1\leftarrow t \cdot q_1 $ and $q_2 \leftarrow (1-t)\cdot q_2$ to eliminate all bilinear terms, we then obtain
\begin{equation*}
\underset{ t \in [0,1]}{\min}W_c(\mu, {\nu}_ t )=\left\{\begin{array}{cll}
\underset{\substack{ t \in [0,1] \\ q_1, q_2 \in \mathcal{M}(\mathbb{R}^d)}}{\min} &\displaystyle\int_{\mathbb{R}^d} \|\boldsymbol x -\boldsymbol y_1\|^p q_1(\mathrm{d} \boldsymbol x) + \displaystyle\int_{\mathbb{R}^d} \left\|\boldsymbol x-\boldsymbol y_2 \right\|^p q_2(\mathrm{d} \boldsymbol x)\\[3ex]
\textrm{s.t.} &\displaystyle\int_{\mathbb{R}^d} q_1(\mathrm{d} \boldsymbol x) = t \\[3ex]
&\displaystyle\int_{\mathbb{R}^d} q_2(\mathrm{d} \boldsymbol x) = 1- t \\[3ex]
& q_1 + q_2 = \mu.
\end{array}\right.
\end{equation*}
Observe next that the decision variable $t$ and the two normalization constraints can be eliminated without affecting the optimal value of the resulting infinite-dimensional linear program because the Borel measures $q_1$ and $q_2$ are non-negative and because the constraint $q_1+q_2=\mu$ implies that $q_1(\mathbb{R}^d)+q_2(\mathbb{R}^d)=\mu(\mathbb{R}^d)=1$. Thus, there always exists $t\in[0,1]$ such that $q_1(\mathbb{R}^d)=t$ and $q_2(\mathbb{R}^d)=1-t$. This reasoning implies that
\begin{equation*}
\underset{ t \in [0,1]}{\min}W_c(\mu, {\nu}_ t )=\left\{\begin{array}{ccll}
&\min\limits_{q_1,q_2\in \mathcal{M}(\mathbb{R}^d)}\; &
\displaystyle\int_{\mathbb{R}^d} \|\boldsymbol x -\boldsymbol y_1\|^p q_1(\mathrm{d} \boldsymbol x) + \displaystyle\int_{\mathbb{R}^d}\left \|\boldsymbol x-\boldsymbol y_2 \right\|^p q_2(\mathrm{d} \boldsymbol x) \\[3ex]
& \textrm{s.t.} & q_1 + q_2= \mu.
\end{array}\right.
\end{equation*}
The constraint $q_1+q_2=\mu$ also implies that $q_1$ and $q_2$ are absolutely continuous with respect to $\mu$, and~thus
\begin{align}
\underset{ t \in [0,1]}{\min}W_c(\mu, {\nu}_ t )& =\left\{\begin{array}{ccll}
&\min\limits_{q_1,q_2\in \mathcal{M}(\mathbb{R}^d)}\; &
\displaystyle\int_{\mathbb{R}^d} \|\boldsymbol x -\boldsymbol y_1\|^p \frac{\mathrm{d} q_1}{\mathrm{d} \mu}(\boldsymbol x) +\left \|\boldsymbol x-\boldsymbol y_2 \right\|^p \, \frac{\mathrm{d} q_2}{\mathrm{d} \mu}(\boldsymbol x)\, \mu(\mathrm{d} \boldsymbol x) \\[3ex]
& \textrm{s.t.} & \displaystyle \frac{\mathrm{d} q_1}{\mathrm{d} \mu}(\boldsymbol x) + \frac{\mathrm{d} q_2}{\mathrm{d} \mu}(\boldsymbol x)= 1 \quad \forall \boldsymbol x\in [0,1]^d
\end{array}\right. \nonumber\\
&= \int_{\mathbb{R}^d} \min\left\{\|\boldsymbol x -\boldsymbol y_1 \|^p,\left\|\boldsymbol x - \boldsymbol y_2 \right\|^p \right\}\,\mu(\mathrm{d}\boldsymbol x),
\label{eq:min-Wc}
\end{align}
where the second equality holds because at optimality the Radon-Nikodym derivatives must satisfy
\[
\frac{\mathrm{d} q_i}{\mathrm{d} \mu}(\boldsymbol x)=\left\{\begin{array}{cl}
1 & \text{if } \|\boldsymbol x-\boldsymbol y_i\|^p \le \|\boldsymbol x-\boldsymbol y_{3-i}\|^p \\
0 & \text{otherwise}
\end{array} \right.
\]
for $\mu$-almost every $\boldsymbol x\in \mathbb{R}^d$ and for every $i=1,2$.
In the second part of the proof we will demonstrate that the minimization problem $\min_{t\in[0,1]} W_c(\mu, \nu_ t )$ is solved by $t^\star=\textrm{Vol}(P(\boldsymbol{w}, b))$. By Proposition~\ref{prop:kantorovich} and the definition of the $c$-transform, we first note that
\begin{align}
W_c(\mu, \nu_ {t^\star} )
&=\underset{\phi \in \mathcal{L}(\mathbb{R}^d, \nu_{t^\star})}{\max} ~ \mathbb{E}_{\boldsymbol y\sim \nu_{t^\star}}[\phi(\boldsymbol y)] - \mathbb{E}_{\boldsymbol x\sim\mu}[\phi_c(\boldsymbol x)] \nonumber \\
\label{eq:min_wass}
&= \underset{\boldsymbol \phi \in \mathbb{R}^2}{\max} ~ t^\star \cdot \phi_1 + (1- t^\star ) \cdot\phi_2- \int_{\mathbb{R}^d}\max_{i=1,2}\left\{\phi_i- \|\boldsymbol x-\boldsymbol y_i \|^p\right\}\mu(\mathrm{d} \boldsymbol x)\\
&= \max\limits_{\boldsymbol \phi \in \mathbb{R}^2} ~ t^\star \cdot \phi_1 + (1-t^\star)\cdot \phi_2- \sum\limits_{i = 1}^2 \int_{\mathcal{X}_i(\boldsymbol \phi)}(\phi_i - \|\boldsymbol x - \boldsymbol {y_i}\|^p)\,\mu(\mathrm{d} \boldsymbol x), \nonumber
\end{align}
where
\[
\mathcal{X}_i(\boldsymbol \phi) = \{\boldsymbol x\in\mathbb{R}^d: \phi_i - \|\boldsymbol x-\boldsymbol y_i \|^p \geq \phi_{3-i} - \left \|\boldsymbol x - \boldsymbol y_{3-i} \right\|^p\}\quad \forall i=1,2.
\]
The second equality in~\eqref{eq:min_wass} follows from the construction of $\nu_{t^\star}$ as a probability measure with only two atoms at the points $\boldsymbol y_i$ for $i=1,2$. Indeed, by fixing the corresponding function values $\phi_i=\phi(\boldsymbol y_i)$ for $i=1,2$, the expectation $\mathbb{E}_{\boldsymbol y \sim \nu_{t}}[\phi(\boldsymbol y)]$ simplifies to $t^\star \cdot \phi_1 + (1-t^\star)\cdot \phi_2$, while the negative expectation $-\mathbb{E}_{\boldsymbol x \sim \mu}[\phi_c(\boldsymbol x)]$ is maximized by setting $\phi(\bm y)$ to a large negative constant for all $\boldsymbol y\notin\{\boldsymbol y_1,\boldsymbol y_2\}$, which implies~that
\[
\phi_c(\boldsymbol x) = \sup_{\boldsymbol y \in \mathbb{R}^d} \phi(\boldsymbol y) - \|\boldsymbol x - \boldsymbol y\|^p = \max_{i=1,2}\left\{\phi_i- \|\boldsymbol x-\boldsymbol y_i \|^p\right\} \quad \forall \boldsymbol x\in [0,1]^d.
\]
Next, we will prove that any $\boldsymbol \phi^\star\in\mathbb{R}^2$ with $\phi^\star_1=\phi^\star_2$ attains the maximum of the unconstrained convex optimization problem on the last line of~\eqref{eq:min_wass}. To see this, note that
\[
\nabla_{\boldsymbol \phi} \left[\sum\limits_{i = 1}^2 \int_{\mathcal{X}_i(\boldsymbol \phi)}(\phi_i - \|\boldsymbol x - \boldsymbol {y}_i\|^p)\,\mu(\mathrm{d} \boldsymbol x)\right] = \sum\limits_{i = 1}^2 \int_{\mathcal{X}_i(\boldsymbol \phi)} \nabla_{\boldsymbol \phi}(\phi_i - \|\boldsymbol x - \boldsymbol {y}_i\|^p)\,\mu(\mathrm{d} \boldsymbol x) =\begin{bmatrix} \mu(\mathcal{X}_1(\boldsymbol \phi))\\ \mu(\mathcal{X}_2(\boldsymbol \phi)) \end{bmatrix}
\]
by virtue of the Reynolds theorem. Thus, the first-order optimality condition\footnote{Note that the first-order condition $1-t^\star=\mu(\mathcal{X}_2(\boldsymbol \phi))$ for $\phi_2$ is redundant in view of the first-order condition $t^\star=\mu(\mathcal{X}_1(\boldsymbol \phi))$ for $\phi_1$ because $\mu$ is the Lebesgue measure on $[0,1]^d$, whereby $\mu(\mathcal{X}_1(\boldsymbol \phi)\cup\mathcal{X}_2(\boldsymbol \phi))=\mu(\mathcal{X}_1(\boldsymbol \phi))+\mu(\mathcal{X}_2(\boldsymbol \phi))=1$.} $t^\star=\mu(\mathcal{X}_1(\boldsymbol \phi))$ is necessary and sufficient for global optimality. Fix now any $\boldsymbol \phi^\star\in\mathbb{R}^2$ with $\phi^\star_1=\phi^\star_2$ and observe that
\begin{align*}
t^\star=\textrm{Vol}(P(\boldsymbol{w}, b)) =& \mu\left(\left\{\boldsymbol x\in\mathbb{R}^d: \boldsymbol w^\top\boldsymbol x\leq b \right\}\right)\\
=&\mu\left( \left\{\boldsymbol x\in\mathbb{R}^d: \|\boldsymbol x \|^2\leq \|\boldsymbol x-2b \boldsymbol w/\|\boldsymbol w\|^2\|^2 \right\}\right)\\
=& \mu\left(\left\{\boldsymbol x\in\mathbb{R}^d: \|\boldsymbol x -\boldsymbol y_1\|^p\leq \|\boldsymbol x-\boldsymbol y_2\|^p \right\}\right)=\mu(\mathcal{X}_1(\boldsymbol \phi^\star)),
\end{align*}
where the first and second equalities follow from the definitions of $t^\star$ and the knapsack polytope $P(\boldsymbol{w}, b)$, respectively, the fourth equality holds because $\boldsymbol y_1=\boldsymbol 0$ and $\boldsymbol y_2=2b\boldsymbol w/\|\boldsymbol w\|^2$, and the fifth equality follows from the definition of $\mathcal{X}_1(\boldsymbol \phi^\star)$ and our assumption that $\phi^\star_1=\phi^\star_2$. This reasoning implies that $\boldsymbol \phi^\star$ attains indeed the maximum of the optimization problem on the last line of~\eqref{eq:min_wass}. Hence, we find
\begin{align*}
W_c(\mu, \nu_ {t^\star} ) &= t^\star \cdot \phi^\star_1 + (1-t^\star)\cdot \phi^\star_2- \sum\limits_{i = 1}^2 \int_{\mathcal{X}_i(\boldsymbol \phi^\star)}(\phi^\star_i - \|\boldsymbol x - \boldsymbol {y_i}\|^p)\,\mu(\mathrm{d} \boldsymbol x)\\
&= \sum\limits_{i = 1}^2 \int_{\mathcal{X}_i(\boldsymbol \phi^\star)} \|\boldsymbol x - \boldsymbol {y_i}\|^p \,\mu(\mathrm{d} \boldsymbol x) = \int_{\mathbb{R}^d} \min_{i=1,2}\left\{\|\boldsymbol x -\boldsymbol y_i \|^p\right\}\,\mu(\mathrm{d}\boldsymbol x) =\underset{ t \in [0,1]}{\min}W_c(\mu, {\nu}_ t ),
\end{align*}
where the second equality holds because $\phi^\star_1=\phi^\star_2$, the third equality exploits the definition of $\mathcal{X}_1(\boldsymbol \phi^\star)$, and the fourth equality follows from~\eqref{eq:min-Wc}. We may therefore conclude that $t^\star=\textrm{Vol}(P(\boldsymbol{w}, b))$ solves indeed the minimization problem $\min_{t\in[0,1]} W_c(\mu, \nu_ t )$. {\color{black} Using similar techniques, one can further prove that~$\partial_t W_c(\mu, \nu_t)$ exists and is strictly increasing in~$t$, which ensures that~$W_c(\mu, \nu_t)$ is strictly convex in~$t$ and, in particular, that~$t^\star $ is the unique solution of $\min_{t\in[0,1]} W_c(\mu, \nu_ t )$. Details are omitted for brevity.}
\end{proof}
\begin{proof}[Proof of Theorem~\ref{theorem:hard}.]
Lemma~\ref{lem:vol} applies under the assumptions of the theorem, and therefore the volume of the knapsack polytope~$P(\boldsymbol{w}, b)$ coincides with the unique minimizer of
\begin{equation}
\label{eq:min-Wass}
\min_{ t \in [0,1]} W_c(\mu, {\nu}_ t ).
\end{equation}
{\color{black} From the proof of Lemma~\ref{lem:vol} we know that the Wasserstein distance $W_c(\mu,{\nu}_ t )$ is strictly convex in~$t$, which implies that the minimization problem~\eqref{eq:min-Wass} constitutes a one-dimensional convex program with a unique minimizer. A near-optimal solution that approximates the exact minimizer to within an absolute accuracy~$\delta=(6d!(\|\boldsymbol{w}\|_1+2)^d(d+1)^{d+1}\prod_{i = 1}^{d}w_i)^{-1}$ can readily be computed with a binary search method such as Algorithm~\ref{algorithm:binary} described in Lemma~\ref{lemma:strictly_convex_min}\,(i), which evaluates~$g(t)=W_c(\mu,\nu_t)$ at exactly~$2L=2(\ceil{\log_2(1/\delta)} + 1)$ test points. Note that~$\delta$ falls within the interval $(0, 1)$ and satisfies the strict inequality~\eqref{eq:Granis-delta}. Note also that~$L$ grows only polynomially with the bit length of $\bm w$ and $b$; see Appendix~\ref{appendix:polynomial_calls} for details. One readily verifies that all operations in Algorithm~\ref{algorithm:binary} except for the computation of~$W_c(\mu, \nu_t)$ can be carried out in time polynomial in the bit length of~$\boldsymbol{w}$ and~$b$.} Thus, if we could compute $W_c(\mu, \nu_t)$ in time polynomial in the bit length of $\boldsymbol{w}$, $b$ and $t$, then we could efficiently compute the volume of the knapsack polytope~$P( \boldsymbol{w}, b)$ to within accuracy $\delta$, which is $\#$P-hard by Lemma~\ref{lemma:Grani}. We have thus constructed a polynomial-time Turing reduction from the $\#$P-hard problem of (approximately) computing the volume of a knapsack polytope to computing the Wasserstein distance $W_c(\mu, {\nu}_ t )$. By the definition of the class of $\#$P-hard problems (see, {\em e.g.}, \citep[Definition~1]{ref:van1990handbook}), we may thus conclude that computing $W_c(\mu, \nu_t)$ is $\#$P-hard.
\end{proof}
{\color{black}
\begin{corollary}[Hardness of computing approximate optimal transport distances]
\label{corollary:approximate-hard}
Computing $W_c(\mu, \nu)$ to within an absolute accuracy of
\[
\varepsilon =\frac{1}{4} \min\limits_{l\in [ 2^L]} \left\{ |W_c(\mu, \nu_{t_{l}}) - W_c(\mu, \nu_{t_{l-1}})| : W_c(\mu, \nu_{t_{l}}) \neq W_c(\mu, \nu_{t_{l-1}})\right\},
\]
where $L = \ceil{\log_2(1/ \delta)} + 1$, $\delta = (6 d!(\|\boldsymbol{w}\|_1+2)^d(d+1)^{d+1}\prod_{i = 1}^{d}w_i)^{-1} $ and $t_l = l/ 2^{L}$ for all~$l =0, \ldots, 2^L$, is \#P-hard even if $\mathcal{X}=\mathcal{Y}=\mathbb{R}^d$, $c(\boldsymbol x, \boldsymbol y) = \|\boldsymbol x-\boldsymbol y\|^{p}$ for some $p\geq 1$, $\mu$ is the Lebesgue measure on the standard hypercube~$[0,1]^d$, and $\nu$ is a discrete probability measure supported on only two points.
\end{corollary}
\begin{proof}
{\color{black}
Assume that we have access to an inexact oracle that outputs, for any fixed~$t\in[0,1]$, an approximate optimal transport distance~$\widetilde W_c(\mu, \nu_t)$ with~$|\widetilde W_c(\mu, \nu_t) - W_c(\mu, \nu_t) |\leq \varepsilon$. By Lemma~\ref{lemma:strictly_convex_min}\,(ii), which applies thanks to the definition of~$\varepsilon$, we can then find a $2\delta$-approximation for the unique minimizer of~\eqref{eq:min-Wass} using $2L$ oracle calls. Note that $\delta'=2\delta$ falls within the interval $(0, 1)$ and satisfies the strict inequality~\eqref{eq:Granis-delta}. Recall also that $L$ grows only polynomially with the bit length of $\bm w$ and $b$; see Appendix~\ref{appendix:polynomial_calls} for details. Thus, if we could compute $\widetilde W_c(\mu, \nu_t)$ in time polynomial in the bit length of $\boldsymbol{w}$, $b$ and $t$, then we could efficiently compute the volume of the knapsack polytope~$P( \boldsymbol{w}, b)$ to within accuracy $\delta'$, which is $\#$P-hard by Lemma~\ref{lemma:Grani}. Computing $W_c(\mu, \nu)$ to within an absolute accuracy of~$\varepsilon$ is therefore also $\#$P-hard.
}
\end{proof}
}
The hardness of optimal transport established in Theorem~\ref{theorem:hard} {\color{black} and Corollary~\ref{corollary:approximate-hard}} is predicated on the hardness of numerical integration. A popular technique to reduce the complexity of numerical integration is smoothing, whereby an initial (possibly discontinuous) integrand is approximated with a differentiable one \citep{dick2013high}.
Smoothness is also a desired property of objective functions when designing scalable optimization algorithms \citep{bubeck2015convex}.
These observations prompt us to develop a systematic way to smooth the optimal transport problem that leads to efficient approximate numerical solution schemes.
\section{Smooth Optimal Transport}
\label{sec:smooth_ot}
The semi-discrete optimal transport problem evaluates the optimal transport distance~\eqref{eq:primal} between an arbitrary probability measure~$\mu$ supported on $\mathcal{X}$ and a discrete probability measure $\nu = \sum_{i=1}^N {\nu}_i\delta_{\boldsymbol {y_i}}$ with atoms~$\boldsymbol y_1,\ldots, \boldsymbol {y}_N \in \mathcal{Y}$ and corresponding probabilities $\boldsymbol \nu =(\nu_1,\ldots, \nu_N)\in \Delta^N$ for some $N\ge 2$.
In the following, we define the {\em discrete $c$-transform} $\psi_c:\mathbb{R}^N\times \mathcal{X} \rightarrow [-\infty,+\infty)$ of $\boldsymbol\phi\in\mathbb{R}^N$ through
\begin{equation}
\label{eq:disc-c-transform}
\psi_c(\boldsymbol \phi, \boldsymbol x) = \max\limits_{i \in [N]} \phi_i - c(\boldsymbol x, \boldsymbol y_i) \quad \forall \boldsymbol x \in \mathcal{X}.
\end{equation}
Armed with the discrete $c$-transform, we can now reformulate the semi-discrete optimal transport problem as a finite-dimensional maximization problem over a single dual potential vector.
\begin{lemma}[Discrete $c$-transform]
\label{lem:disc_ctrans}
The semi-discrete optimal transport problem is equivalent to
\begin{equation}
\label{eq:ctans_dual_semidisc}
W_c(\mu, \nu) = \sup_{ \boldsymbol{\phi} \in \mathbb{R}^N} \boldsymbol {\nu}^\top \boldsymbol {\phi} - \mathbb{E}_{\boldsymbol x \sim \mu}[{\psi_c(\boldsymbol \phi, \boldsymbol x) } ].
\end{equation}
\end{lemma}
\begin{proof}
As $\nu = \sum_{i=1}^N {\nu}_i\delta_{\boldsymbol {y_i}}$ is discrete, the dual optimal transport problem~\eqref{eq:ctans_dual} simplifies to
\begin{align*}
W_c(\mu, \nu) & =\sup_{\boldsymbol \phi\in\mathbb{R}^N} \sup_{\phi \in \mathcal{L}(\mathcal{Y}, \nu)} \left\{ \boldsymbol \nu^\top\boldsymbol \phi - \mathbb{E}_{\boldsymbol x \sim \mu}\left[ \phi_c(\boldsymbol x) \right]\;:\;\phi(\boldsymbol y_i)=\phi_i~\forall i\in[N] \right\}\\
&=\sup_{\boldsymbol \phi\in\mathbb{R}^N}~ \boldsymbol \nu^\top\boldsymbol \phi - \inf_{\phi \in \mathcal{L}(\mathcal{Y}, \nu)} \Big\{ \mathbb{E}_{\boldsymbol x \sim \mu}\left[ \phi_c(\boldsymbol x) \right]\;:\;\phi(\boldsymbol y_i)=\phi_i~\forall i\in[N] \Big\} .
\end{align*}
Using the definition of the standard $c$-transform, we can then recast the inner minimization problem as
\begin{align*}
&\inf_{\phi \in \mathcal{L}(\mathcal{Y}, \nu)} \left\{ \mathbb{E}_{\boldsymbol x \sim \mu}\left[ \sup_{\boldsymbol y \in \mathcal{Y}} \phi(\boldsymbol y) - c(\boldsymbol x, \boldsymbol y) \right]\;:\;\phi(\boldsymbol y_i)=\phi_i~\forall i\in[N] \right\}\\
&\quad = ~\mathbb{E}_{\boldsymbol x \sim \mu} \left[\max_{i \in [N]}\left\{\phi_i- c(\boldsymbol x, \boldsymbol y_i)\right\} \right] ~=~ \mathbb{E}_{\boldsymbol x \sim \mu} \left[{\psi_c(\boldsymbol \phi, \boldsymbol x) } \right],
\end{align*}
where the first equality follows from setting $\phi(\bm y)=\underline \phi$ for all $\boldsymbol y\notin\{\boldsymbol y_1, \ldots, \boldsymbol y_N\}$ and letting~$\underline\phi$ tend to $-\infty$, while the second equality exploits the definition of the discrete $c$-transform. Thus, \eqref{eq:ctans_dual_semidisc} follows.
\end{proof}
The discrete $c$-transform~\eqref{eq:disc-c-transform} can be viewed as the optimal value of a {\em discrete choice model}, where a utility-maximizing agent selects one of $N$ mutually exclusive alternatives with utilities $\phi_i - c(\boldsymbol x, \boldsymbol y_i)$, $i\in[N]$, respectively. Discrete choice models are routinely used for explaining the preferences of travelers selecting among different modes of transportation \citep{ben1985discrete}, but they are also used for modeling the choice of residential location \citep{mcfadden1978modeling}, the interests of end-users in engineering design \citep{wassenaar2003approach} or the propensity of consumers to adopt new technologies \citep{hackbarth2013consumer}.
In practice, the preferences of decision-makers and the attributes of the different choice alternatives are invariably subject to uncertainty, and it is impossible to specify a discrete choice model that reliably predicts the behavior of multiple individuals. Psychological theory thus models the utilities as random variables \citep{thurstone1927law}, in which case the optimal choice becomes random, too. The theory as well as the econometric analysis of probabilistic discrete choice models were pioneered by \citet{mcfadden1973conditional}.
The availability of a wealth of elegant theoretical results in discrete choice theory prompts us to add a random noise term to each deterministic utility value $\phi_i - c(\boldsymbol x, \boldsymbol y_i)$ in~\eqref{eq:disc-c-transform}. We will argue below that the expected value of the resulting maximal utility with respect to the noise distribution provides a smooth approximation for the $c$-transform $\psi_c(\boldsymbol \phi, \boldsymbol x)$, which in turn leads to a smooth optimal transport problem that displays favorable numerical properties. For a comprehensive survey of additive random utility models in discrete choice theory we refer to \citet{dubin1984econometric} and \citet{daganzo2014multinomial}. Generalized semi-parametric discrete choice models where the noise distribution is itself subject to uncertainty are studied by \citet{natarajan2009persistency}. Using techniques from modern distributionally robust optimization, these models evaluate the best-case (maximum) expected utility across an ambiguity set of multivariate noise distributions. Semi-parametric discrete choice models are studied in the context of appointment scheduling \citep{mak2015appointment}, traffic management \citep{ahipacsaouglu2016flexibility} and product line pricing \citep{qi2019product}.
We now define the {\em smooth} ({\em discrete}) {\em $c$-transform} as a best-case expected utility of the type studied in semi-parametric discrete choice theory, that is,
\begin{equation}
\label{eq:smooth_c_transform}
\overline{\psi}_c(\boldsymbol \phi, \boldsymbol x) = \sup_{\theta \in \Theta}\;\mathbb{E}_{\boldsymbol z
\sim\theta}\left[\max_{i \in [N]} \phi_i -c(\boldsymbol x, \boldsymbol {y_i}) +z_i \right],
\end{equation}
where $\boldsymbol z$ represents a random vector of perturbations that are independent of $\boldsymbol x$ and $\boldsymbol y$. Specifically, we assume that~$\boldsymbol z$ is governed by a Borel probability measure $\theta$ from within some ambiguity set $\Theta\subseteq\mathcal{P}(\mathbb{R}^N)$. Note that if~$\Theta$ is a singleton that contains only the Dirac measure at the origin of~$\mathbb{R}^N$, then the smooth $c$-transform collapses to ordinary $c$-transform defined in \eqref{eq:disc-c-transform}, which is piecewise affine and thus non-smooth in~$\boldsymbol \phi$. For many commonly used ambiguity sets, however, we will show below that the smooth $c$-transform is indeed differentiable in $\boldsymbol \phi$. In practice, the additive noise~$z_i$ in the transportation cost could originate, for example, from uncertainty about the position~$\boldsymbol y_i$ of the $i$-th atom of the discrete distribution~$\nu$. This interpretation is justified if $c(\boldsymbol x,\boldsymbol y)$ is approximately affine in~$\boldsymbol y$ around the atoms~$\boldsymbol y_i$, $i\in[N]$. The smooth $c$-transform gives rise to the following {\em smooth} ({\em semi-discrete}) {\em optimal transport problem} in dual form.
\begin{equation}
\label{eq:smooth_ot}
\overline W_c (\mu, \nu)
= \sup\limits_{\boldsymbol {\phi} \in \mathbb{R}^N} \mathbb{E}_{\boldsymbol x \sim \mu} \left[ \boldsymbol \nu^\top \boldsymbol \phi - \overline\psi_c(\boldsymbol \phi, \boldsymbol x)\right]
\end{equation}
Note that~\eqref{eq:smooth_ot} is indeed obtained from the original dual optimal transport problem~\eqref{eq:ctans_dual_semidisc} by replacing the original $c$-transform $\psi_c(\boldsymbol \phi, \boldsymbol x)$ with the smooth $c$-transform $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$. As smooth functions are susceptible to efficient numerical integration, we expect that~\eqref{eq:smooth_ot} is easier to solve than~\eqref{eq:ctans_dual_semidisc}. A key insight of this work is that the smooth {\em dual} optimal transport problem~\eqref{eq:smooth_ot} typically has a primal representation of the~form
\begin{equation}
\label{eq:reg_ot_pri_abstract}
\min\limits_{\pi \in \Pi(\mu,\nu)}\mathbb E_{(\boldsymbol x, \boldsymbol y) \sim \pi}\left[ c(\boldsymbol x, \boldsymbol y)\right] + R_\Theta(\pi),
\end{equation}
where $R_\Theta(\pi)$ can be viewed as a regularization term that penalizes the complexity of the transportation plan~$\pi$.
In the remainder of this section we will prove~\eqref{eq:reg_ot_pri_abstract} and derive~$R_\Theta(\pi)$ for different ambiguity sets~$\Theta$. We will see that this regularization term is often related to an $f$-divergence, where $f:\mathbb{R}_+ \to \mathbb{R} \cup \{\infty\}$ constitutes a lower-semicontinuous convex function with $f(1) = 0$. If $\tau$ and $\rho$ are two Borel probability measures on a closed subset $\mathcal Z$ of a finite-dimensional Euclidean space, and if~$\tau$ is absolutely continuous with respect to~$\rho$, then the continuous $f$-divergence form~$\tau$ to $\rho$ is defined as
$D_f(\tau \parallel \rho) = \int_{\mathcal Z} f({\mathrm{d} \tau}/{\mathrm{d} \rho}(\boldsymbol z)) \rho(\mathrm{d} \boldsymbol z)$, where ${\mathrm{d} \tau}/{\mathrm{d} \rho}$ stands for the Radon-Nikodym derivative of $\tau$ with respect to $\rho$. By slight abuse of notation, if $\boldsymbol \tau$ and $\boldsymbol \rho$ are two probability vectors in~$\Delta^N$ and if $\boldsymbol\rho>\boldsymbol 0$, then the discrete $f$-divergence form $\boldsymbol \tau$ to $\boldsymbol \rho$ is defined as
$D_f(\boldsymbol \tau \parallel \boldsymbol \rho) = \sum_{i =1}^N f({\tau_i}/{\rho_i}) \rho_i$. The correct interpretation of $D_f$ is usually clear from the context.
The following lemma shows that the smooth optimal transport problem~\eqref{eq:reg_ot_pri_abstract} equipped with an $f$-divergence regularization term is equivalent to a finite-dimensional convex minimization problem. This result will be instrumental to prove the equivalence of~\eqref{eq:smooth_ot} and~\eqref{eq:reg_ot_pri_abstract} for different ambiguity sets~$\Theta$.
\begin{lemma}[Strong duality]
\label{lem:strong_dual_reg_ot}
If $\boldsymbol\eta\in\Delta^N$ with $\boldsymbol\eta>\boldsymbol 0$ and $\eta = \sum_{i=1}^N \eta_i \delta_{\boldsymbol y_i}$ is a discrete probability measure on~$\mathcal{Y}$, then problem~\eqref{eq:reg_ot_pri_abstract} with regularization term $R_\Theta (\pi ) = D_{f}(\pi\|\mu \otimes \eta)$ is equivalent to
\begin{align}
\label{eq:dual_regularized_ot}
\sup\limits_{ \boldsymbol {\phi}\in \mathbb{R}^N} ~
\mathbb{E}_{\boldsymbol x \sim \mu}\left[\min\limits_{\boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N{\phi_i\nu_i}- (\phi_i - c(\boldsymbol x, \boldsymbol {y_i}))p_i + D_f(\boldsymbol p \parallel \boldsymbol \eta)
\right].
\end{align}
\end{lemma}
\begin{proof}[Proof of Lemma~\ref{lem:strong_dual_reg_ot}]
If $\mathbb{E}_{\boldsymbol x \sim \mu}[c(\boldsymbol x,\boldsymbol y_i)]=\infty$ for some $i\in[N]$, then both~\eqref{eq:reg_ot_pri_abstract} and~\eqref{eq:dual_regularized_ot} evaluate to infinity, and the claim holds trivially. In the remainder of the proof we may thus assume without loss of generality that $\mathbb{E}_{\boldsymbol x \sim \mu}[c(\boldsymbol x,\boldsymbol y_i)]<\infty$ for all $i\in[N]$. Using \citep[Theorem~14.6]{rockafellar2009variational} to interchange the minimization over $\boldsymbol p$ with the expectation over $\boldsymbol x$, problem~\eqref{eq:dual_regularized_ot} can first be reformulated as
\begin{equation*}
\begin{array}{ccccll}
& &\sup\limits_{ \boldsymbol{\phi}\in \mathbb{R}^N} &\min\limits_{\boldsymbol p\in\mathcal L_\infty^N(\mathcal{X},\mu)} ~ &\mathbb{E}_{\boldsymbol x \sim \mu}\left[\displaystyle\sum\limits_{i=1}^N{\phi_i\nu_i} - (\phi_i - c(\boldsymbol x, \boldsymbol {y_i}))p_i(\boldsymbol x)+ D_f(\boldsymbol p(\boldsymbol x)\|\boldsymbol \eta)\right] \\[3ex]
&&&\textrm{s.t.} &\displaystyle \boldsymbol p(\boldsymbol x)\in\Delta^N \quad \mu\text{-a.s.},
\end{array}
\end{equation*}
where $\mathcal L_\infty^N(\mathcal{X},\mu)$ denotes the Banach space of all Borel-measurable functions from~$\mathcal{X}$ to~$\mathbb{R}^N$ that are essentially bounded with respect to~$\mu$. Interchanging the supremum over~$\boldsymbol \phi$ with the minimum over~$\boldsymbol p$ and evaluating the resulting unconstrained linear program over~$\boldsymbol \phi$ in closed form then yields the dual problem
\begin{equation}
\label{eq:primal_dual_relation_final}
\begin{array}{ccl}
& \min\limits_{\boldsymbol p\in\mathcal L_\infty^N(\mathcal{X},\mu)} &\displaystyle \mathbb{E}_{\boldsymbol x \sim \mu}\Bigg[ \sum\limits_{i=1}^Nc(\boldsymbol x, \boldsymbol {y_i})p_{i}(\boldsymbol x) +\displaystyle D_f (\boldsymbol p(\boldsymbol x) \! \parallel \!\boldsymbol \eta) \Bigg] \\[3ex]
&\textrm{s.t.} &\displaystyle\mathbb{E}_{\boldsymbol x \sim \mu}\left[ \boldsymbol p(\boldsymbol x)\right] = \boldsymbol \nu,\quad \boldsymbol p(\boldsymbol x)\in\Delta^N \quad \mu\text{-a.s.}
\end{array}
\end{equation}
Strong duality holds for the following reasons. As $c$ and $f$ are lower-semicontinuous and $c$ is non-negative, we may proceed as in~\citep[\S~3.2]{shapiro2017distributionally} to show that the dual objective function is weakly${}^*$ lower semicontinuous in $\boldsymbol p$. Similarly, as $\Delta^N$ is compact, one can use the Banach-Alaoglu theorem to show that the dual feasible set is weakly${}^*$ compact. Finally, as $f$ is real-valued and $\mathbb{E}_{\boldsymbol x \sim \mu}[c(\boldsymbol x,\boldsymbol y_i)]<\infty$ for all $i\in[N]$, the constant solution $\boldsymbol p(\boldsymbol x)=\boldsymbol \nu$ is dual feasible for all $\boldsymbol \nu \in\Delta^N$. Thus, the dual problem is solvable and has a finite optimal value. This argument remains valid if we add a perturbation $\boldsymbol \delta\in H=\{\boldsymbol\delta'\in\mathbb{R}^N: \sum_{i=1}^N\delta'_i=0\}$ to the right hand side vector~$\boldsymbol \nu$ as long as $\boldsymbol \delta>-\boldsymbol \nu$. The optimal value of the perturbed dual problem is thus pointwise finite as well as convex and---consequently---continuous and locally bounded in~$\boldsymbol \delta$ at the origin of~$H$. As $\boldsymbol \nu>\boldsymbol 0$, strong duality therefore follows from~\citep[Theorem~17\,(a)]{rockafellar1974conjugate}.
Any dual feasible solution $\boldsymbol p\in \mathcal L^N_\infty(\mathcal{X},\mu)$ gives rise to a Borel probability measure $\pi \in \mathcal P(\mathcal X \times \mathcal Y)$ defined through $\pi( \boldsymbol y \in \mathcal B) = \nu(\boldsymbol y \in \mathcal B)$ for all Borel sets $\mathcal B \subseteq \mathcal Y$ and $\pi(\boldsymbol x \in \mathcal A | \boldsymbol y = \boldsymbol y_i) = \int_{ \mathcal A} p_i(\boldsymbol x) \mu(\mathrm{d} \boldsymbol x) / \nu_i$ for all Borel sets $\mathcal A \subseteq \mathcal X$ and $i \in [N]$. This follows from the law of total probability, whereby the joint distribution of~$\boldsymbol x$ and~$\boldsymbol y$ is uniquely determined if we specify the marginal distribution of~$\boldsymbol y$ and the conditional distribution of~$\boldsymbol x$ given~$\boldsymbol y=\boldsymbol y_i$ for every~$i\in[N]$. By construction, the marginal distributions of $\boldsymbol x$ and $\boldsymbol y$ under $\pi$ are determined by $\mu$ and $\nu$, respectively. Indeed, note that for any Borel set $\mathcal A \subseteq \mathcal X$ we have
\begin{align*}
\pi(\boldsymbol x \in \mathcal A) &= \sum\limits_{i=1}^N \pi(\boldsymbol x \in \mathcal A | \boldsymbol y = \boldsymbol y_i) \cdot \pi(\boldsymbol y = \boldsymbol y_i) = \sum\limits_{i=1}^N \pi(\boldsymbol x \in \mathcal A | \boldsymbol y = \boldsymbol y_i) \cdot \nu_i\\ &= \sum\limits_{i=1}^N \int_{\mathcal A} {p_i(\boldsymbol x)}\mu(\mathrm{d} \boldsymbol x) = \int_{\mathcal A} \mu(\mathrm{d} \boldsymbol x) = \mu(\boldsymbol x\in \mathcal A),
\end{align*}
where the first equality follows from the law of total probability, the second and the third equalities both exploit the construction of~$\pi$, and the fourth equality holds because $\boldsymbol p(\boldsymbol x)\in\Delta^N$ $\mu$-almost surely due to dual feasibility. This reasoning implies that $\pi$ constitutes a coupling of $\mu$ and $\nu$ (that is, $\pi \in \Pi(\mu, \nu)$) and is thus feasible in~\eqref{eq:reg_ot_pri_abstract}. Conversely, any $\pi\in\Pi(\mu,\nu)$ gives rise to a function $\boldsymbol p\in\mathcal L_\infty^N(\mathcal{X},\mu)$ defined through
\[
p_i(\boldsymbol x) =\nu_i\cdot \frac{\mathrm{d} \pi}{\mathrm{d} (\mu \otimes \nu)} (\boldsymbol x, \boldsymbol y_i)\quad \forall i\in [N].
\]
By the properties of the Randon-Nikodym derivative, we have $p_i(\boldsymbol x)\ge 0$ $\mu$-almost surely for all $i\in[N]$. In addition, for any Borel set $\mathcal A\subseteq \mathcal{X}$ we have
\begin{align*}
\int_{\mathcal A}\sum_{i=1}^N p_i(\boldsymbol x)\,\mu(\mathrm{d}\boldsymbol x) & = \int_{\mathcal A} \sum_{i=1}^N \nu_i\cdot \frac{\mathrm{d} \pi}{\mathrm{d} (\mu \otimes \nu)} (\boldsymbol x, \boldsymbol y_i)\,\mu(\mathrm{d}\boldsymbol x)\\ & = \int_{\mathcal A\times \mathcal{Y}} \frac{\mathrm{d} \pi}{\mathrm{d} (\mu\otimes \nu)} (\boldsymbol x, \boldsymbol y)\,(\mu\otimes \nu)(\mathrm{d} \boldsymbol x,\mathrm{d}\boldsymbol y) \\&= \int_{\mathcal A\times \mathcal{Y}} \pi(\mathrm{d}\boldsymbol x, \mathrm{d} \boldsymbol y) = \int_{\mathcal A}\mu(\mathrm{d}\boldsymbol x),
\end{align*}
where the second equality follows from Fubini's theorem and the definition of $\nu=\sum_{i=1}^N\nu_i\delta_{\boldsymbol y_i}$, while the fourth equality exploits that the marginal distribution of $\boldsymbol x$ under $\pi$ is determined by $\mu$. As the above identity holds for all Borel sets $\mathcal A\subseteq \mathcal{X}$, we find that $\sum_{i=1}^N p_i(\boldsymbol x)=1$ $\mu$-almost surely. Similarly, we have
\begin{align*}
\mathbb E_{\boldsymbol x\sim\mu}\left[ p_i(\boldsymbol x)\right] &=\int_\mathcal{X} \nu_i\cdot \frac{\mathrm{d} \pi}{\mathrm{d} (\mu \otimes \nu)} (\boldsymbol x, \boldsymbol y_i) \,\mu(\mathrm{d}\boldsymbol x) \\ &=\int_{\mathcal{X}\times\{\boldsymbol y_i\}} \frac{\mathrm{d} \pi}{\mathrm{d} (\mu \otimes \nu)} (\boldsymbol x, \boldsymbol y) \,(\mu\otimes\nu)(\mathrm{d}\boldsymbol x,\mathrm{d}\boldsymbol y) \\ &= \int_{\mathcal{X}\times\{\boldsymbol y_i\}} \pi(\mathrm{d}\boldsymbol x,\mathrm{d}\boldsymbol y)=\int_{\{\boldsymbol y_i\}}\nu(\mathrm{d} \boldsymbol y)=\nu_i
\end{align*}
for all $i\in[N]$. In summary, $\boldsymbol p$ is feasible in~\eqref{eq:primal_dual_relation_final}. Thus, we have shown that every probability measure $\pi$ feasible in~\eqref{eq:reg_ot_pri_abstract} induces a function $\boldsymbol p$ feasible in~\eqref{eq:primal_dual_relation_final} and vice versa. We further find that the objective value of~$\boldsymbol p$ in~\eqref{eq:primal_dual_relation_final} coincides with the objective value of the corresponding~$\pi$ in~\eqref{eq:reg_ot_pri_abstract}. Specifically, we have
\begin{align*}
& \mathbb{E}_{\boldsymbol x \sim \mu}\Bigg[ \sum\limits_{i=1}^N c(\boldsymbol x, \boldsymbol {y_i})\, p_{i}(\boldsymbol x) +\displaystyle D_f (\boldsymbol p(\boldsymbol x) \| \boldsymbol \eta) \Bigg] =\displaystyle\int_\mathcal{X} \sum\limits_{i=1}^N c(\boldsymbol x, \boldsymbol y_i) p_i(\boldsymbol x) \,\mu( \mathrm{d}\boldsymbol x) + \displaystyle\int_\mathcal{X}\sum_{i=1}^N f\left(\frac{p_i(\boldsymbol x)}{\eta_i}\right) \eta_i \, \mu (\mathrm{d} \boldsymbol x) \\ &\hspace{1cm}=\displaystyle\int_\mathcal{X} \sum\limits_{i=1}^N c(\boldsymbol x, \boldsymbol y_i) \cdot\nu_i\cdot \frac{\mathrm{d} \pi}{\mathrm{d}(\mu \otimes \nu)}(\boldsymbol x, \boldsymbol y_i)\, \mu( \mathrm{d}\boldsymbol x) + \int_\mathcal{X} \sum_{i=1}^N f\left( \frac{\nu_i}{\eta_i} \cdot \frac{\mathrm{d} \pi}{\mathrm{d}(\mu \otimes \nu)}(\boldsymbol x, \boldsymbol y_i)\right) \cdot \eta_i \,\mu ( \mathrm{d} \boldsymbol x) \\ &\hspace{1cm}=\displaystyle\int_{\mathcal{X}\times \mathcal{Y}} c(\boldsymbol x, \boldsymbol y)\frac{\mathrm{d} \pi}{\mathrm{d}(\mu \otimes \nu)}(\boldsymbol x, \boldsymbol y) \,(\mu \otimes \nu)(\mathrm{d}\boldsymbol x, \mathrm{d}\boldsymbol y) + \displaystyle\int_{\mathcal{X}\times\mathcal{Y}} f\left( \frac{\mathrm{d} \pi}{\mathrm{d}(\mu \otimes \eta)}(\boldsymbol x, \boldsymbol y)\right) (\mu\otimes \eta)(\mathrm{d} \boldsymbol x,\mathrm{d} \boldsymbol y) \\[1ex] &\hspace{1cm}=\mathbb E_{(\boldsymbol x, \boldsymbol y) \sim \pi} \left[c(\boldsymbol x, \boldsymbol y)\right] + D_f(\pi \| \mu \otimes \eta),
\end{align*}
where the first equality exploits the definition of the discrete $f$-divergence, the second equality expresses the function~$\boldsymbol p$ in terms of the corresponding probability measure~$\pi$, the third equality follows from Fubini's theorem and uses the definitions $\nu=\sum_{i=1}^N \nu_i\delta_{\boldsymbol y_i}$ and $\eta=\sum_{i=1}^N \eta_i\delta_{\boldsymbol y_i}$, and the fourth equality follows from the definition of the continuous $f$-divergence. In summary, we have thus shown that~\eqref{eq:reg_ot_pri_abstract} is equivalent to~\eqref{eq:primal_dual_relation_final}, which in turn is equivalent to~\eqref{eq:dual_regularized_ot}. This observation completes the proof.
\end{proof}
\begin{proposition}[Approximation bound]
\label{prop:approx_bound}
If $\boldsymbol\eta\in\Delta^N$ with $\boldsymbol\eta>\boldsymbol 0$ and $\eta = \sum_{i=1}^N \eta_i \delta_{\boldsymbol y_i}$ is a discrete probability measure on~$\mathcal{Y}$, then problem~\eqref{eq:reg_ot_pri_abstract} with regularization term $R_\Theta (\pi ) = D_{f}(\pi\|\mu \otimes \eta)$ satisfies
\[|\overline W_c(\mu, \nu) - W_c(\mu, \nu)| \leq \max\Bigg\{\bigg|\min_{\boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta )\bigg|, \bigg|\max_{i \in [N]}\bigg\{ f\bigg(\frac{1}{\eta_i}\bigg) \eta_i+ f(0) \sum_{k \neq i} \eta_k\bigg\}\bigg|\Bigg\}.\]
\end{proposition}
\begin{proof}
By Lemma~\ref{lem:strong_dual_reg_ot}, problem~\eqref{eq:reg_ot_pri_abstract} is equivalent to~\eqref{eq:dual_regularized_ot}. Note that the inner optimization problem in~\eqref{eq:dual_regularized_ot} can be viewed as an $f$-divergence regularized linear program with optimal value $\boldsymbol \nu^\top \boldsymbol\phi-\ell(\boldsymbol \phi, \boldsymbol x)$, where
\[
\ell(\boldsymbol \phi, \boldsymbol x) = \max\limits_{\boldsymbol p \in \Delta^N} \sum\limits_{i=1}^N (\phi_i - c(\boldsymbol x, \boldsymbol y_i)) p_i - D_f(\boldsymbol p \| \boldsymbol \eta).
\]
Bounding $D_f(\boldsymbol p \| \boldsymbol \eta)$ by its minimum and its maximum over $\boldsymbol p\in\Delta^N$ then yields the estimates
\begin{equation}
\label{eq:bound:c_trans_ineq}
\psi_c(\boldsymbol \phi, \boldsymbol x) - \max_{ \boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta) \leq \ell(\boldsymbol \phi, \boldsymbol x) \leq \psi_c(\boldsymbol \phi, \boldsymbol x) - \min_{\boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta).
\end{equation}
Here, $\psi_c(\boldsymbol \phi, \boldsymbol x)$ stands as usual for the discrete $c$-transform defined in~\eqref{eq:disc-c-transform}, which can be represented as
\begin{equation}
\label{eq:bound:ot_ineq}
\psi_c(\boldsymbol \phi, \boldsymbol x) = \max\limits_{\boldsymbol p \in \Delta^N}\sum\limits_{i=1}^N (\phi_i - c(\boldsymbol x, \boldsymbol y_i)) p_i.
\end{equation}
Multiplying~\eqref{eq:bound:c_trans_ineq} by~$-1$, adding $\boldsymbol\nu^\top\boldsymbol \phi$, averaging over~$\boldsymbol x$ using the probability measure~$\mu$ and maximizing over~$\boldsymbol \phi \in \mathbb{R}^N$ further implies via~\eqref{eq:ctans_dual_semidisc} and~\eqref{eq:dual_regularized_ot} that
\begin{equation}
\label{eq:smooth_ot_approximation_bounds}
W_c(\mu,\nu)+ \min_{ \boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta) \leq \overline W_c(\mu, \nu) \leq W_c(\mu,\nu) + \max_{\boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta).
\end{equation}
As $D_f(\boldsymbol p \| \boldsymbol \eta)$ is convex in~$\boldsymbol p$, its maximum is attained at a vertex of~$\Delta^N$ \citep[Theorem~1]{hoffman1981method}, that~is,
\[
\max_{\boldsymbol p \in \Delta^N} D_f(\boldsymbol p \| \boldsymbol \eta) = \max_{i \in [N]}\bigg\{ f\bigg(\frac{1}{\eta_i}\bigg) \eta_i + f(0) \sum_{k \neq i} \eta_k\bigg\}.
\]
The claim then follows by substituting the above formula into~\eqref{eq:smooth_ot_approximation_bounds} and rearranging terms.
\end{proof}
In the following we discuss three different classes of ambiguity sets $\Theta$ for which the dual smooth optimal transport problem~\eqref{eq:smooth_ot} is indeed equivalent to the primal reguarized optimal transport problem~\eqref{eq:reg_ot_pri_abstract}.
\subsection{Generalized Extreme Value Distributions}
\label{sec:gevm}
Assume first that the ambiguity set~$\Theta$ represents a singleton that accommodates only one single
Borel probability measure $\theta$ on $\mathbb{R}^N$ defined through
\begin{equation}
\label{eq:dist_gevd}
\theta(\boldsymbol z \leq \boldsymbol s) = \exp \left(-G \left( \exp(-s_1),\ldots, \exp(-s_N) \right) \right)\quad \forall \boldsymbol s\in\mathbb{R}^N,
\end{equation}
where $G:\mathbb{R}^N \to \mathbb{R}_+$ is a smooth generating function with the following properties. First, $G$ is homogeneous of degree $1/\lambda$ for some $\lambda>0$, that is, for any $\alpha \neq 0$ and $\boldsymbol s\in \mathbb{R}^N$ we have $G(\alpha \boldsymbol s) = \alpha^{1/\lambda}G(\boldsymbol s)$. In addition, $G(\boldsymbol s)$ tends to infinity as $s_i$ grows for any $i \in [N]$. Finally, the partial derivative of $G$ with respect to $k$ distinct arguments is non-negative if $k$ is odd and non-positive if $k$ is even. These properties ensure that the noise vector $\boldsymbol z$ follows a generalized extreme value distribution in the sense of \citep[\S~4.1]{train2009discrete}.
\begin{proposition}[Entropic regularization]
\label{prop:gumbel}
Assume that $\Theta$ is a singleton ambiguity set that contains only a generalized extreme value distribution with $G( \boldsymbol{s}) = \exp(-e)N\sum_{i=1}^N \eta_i s_i^{1/\lambda}$ for some $\lambda > 0$ and~$\boldsymbol \eta \in \Delta^N$, $\boldsymbol\eta> \boldsymbol 0${\color{black}, where~$e$ stands for Euler's constant}. Then, the components of $\boldsymbol z$ follow independent Gumbel distributions with means $\lambda \log(N \eta_i)$ and variances $\lambda^2 \pi^2 /6$ for all $i\in[N]$,
while the smooth $c$-transform~\eqref{eq:smooth_c_transform} reduces to the $\log$-partition function \begin{equation}
\label{eq:partition:function}
\overline\psi(\boldsymbol \phi, \boldsymbol x) = \lambda \log\left(\sum_{i=1}^N \eta_i \exp\left( \frac{\phi_i -c(\boldsymbol x,\boldsymbol {y_i})}{\lambda} \right) \right).
\end{equation}
In addition, the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $f(s) =\lambda s\log(s)$ and $\eta = \sum_{i =1}^N \eta_i \delta_{\boldsymbol y_i}$.
\end{proposition}
Note that the log-partition function~\eqref{eq:partition:function} constitutes indeed a smooth approximation for the maximum function in the definition~\eqref{eq:disc-c-transform} of the discrete $c$-transform. As $\lambda$ decreases, this approximation becomes increasingly accurate. It is also instructive to consider the special case where $\mu=\sum_{i=1}^M\mu_i\delta_{\boldsymbol x_i}$ is a discrete probability measure with atoms $\boldsymbol x_1,\ldots,\boldsymbol x_M\in\mathcal{X}$ and corresponding vector of probabilities $\boldsymbol \mu\in \Delta^M$. In this case, any coupling $\pi\in\Pi(\mu,\nu)$ constitutes a discrete probability measure $\pi=\sum_{i=1}^M\sum_{j=1}^N \pi_{ij}\delta_{(\boldsymbol x_i,\boldsymbol y_j)}$ with matrix of probabilities $\boldsymbol
\pi\in\Delta^{M\times N}$. If $f(x)=s\log(s)$, then the continuous $f$-divergence reduces to
\begin{align*}
D_f(\pi \| \mu \otimes \eta)&=\sum_{i=1}^M\sum_{j=1}^N \pi_{ij}\log(\pi_{ij})-\sum_{i=1}^M\sum_{j=1}^N \pi_{ij}\log(\mu_i)-\sum_{i=1}^M\sum_{j=1}^N \pi_{ij}\log(\eta_j)\\
&=\sum_{i=1}^M\sum_{j=1}^N \pi_{ij}\log(\pi_{ij})-\sum_{i=1}^M\mu_i\log(\mu_i)-\sum_{j=1}^N \nu_j\log(\eta_j),
\end{align*}
where the second equality holds because $\pi$ is a coupling of $\mu$ and $\nu$. Thus, $D_f(\pi \| \mu \otimes \eta)$ coincides with the negative entropy of the probability matrix~$\boldsymbol \pi$ offset by a constant that is independent of~$\boldsymbol \pi$. For $f(s)=s\log(s)$ the choice of $\boldsymbol \eta$ has therefore no impact on the minimizer of the smooth optimal transport problem~\eqref{eq:reg_ot_pri_abstract}, and we simply recover the celebrated entropic regularization proposed by \citet{sinkhorn, genevay2016stochastic, rigollet2018entropic, peyre2019computational} and \cite{ref:clason2019entropic}.
\begin{proof}[Proof of Proposition~\ref{prop:gumbel}]
Substituting the explicit formula for the generating function $G$ into~\eqref{eq:dist_gevd} yields
\begin{align*}
\theta(\boldsymbol z \leq \boldsymbol s) = \exp\left(-\exp(-e)N\sum\limits_{i=1}^N \eta_i \exp\left(-\frac{s_i}{\lambda}\right)\right) &=\prod\limits_{i=1}^N \exp\left(-\exp(-e)N\eta_i \exp\left(-\frac{s_i}{\lambda}
\right)\right)\\
&= \prod\limits_{i=1}^N \exp\left(-\exp\left(-\frac{s_i - \lambda(\log(N\eta_i)-e)}{\lambda}\right)\right),
\end{align*}
where $e$ stands for Euler's constant. The components of the noise vector $\boldsymbol z$ are thus independent under~$\theta$, and $z_i$ follows a Gumbel distribution with location parameter $\lambda(\log(N\eta_i)-e)$ and scale parameter $\lambda$ for every $i \in [N]$. Therefore, $z_i$ has mean $\lambda \log(N \eta_i)$ and variance $\lambda^2 \pi^2/6$.
If the ambiguity set $\Theta$ contains only one single probability measure~$\theta$ of the form~\eqref{eq:dist_gevd}, then Theorem~5.2 of \citet{mcfadden1981econometric} readily implies that the smooth $c$-transform \eqref{eq:smooth_c_transform} simplifies~to
\begin{equation}
\label{eq:gev_smooth_ctrans}
\overline\psi(\boldsymbol \phi , \boldsymbol x) = \lambda \log G \left(\exp(\phi_1 -c(\boldsymbol x,\boldsymbol y_1)),\dots, \exp(\phi_N - c(\boldsymbol x, \boldsymbol {y}_N)) \right) + \lambda e.
\end{equation}
The closed-form expression for the smooth $c$-transform in~\eqref{eq:partition:function} follows immediately by substituting the explicit formula for the generating function~$G$ into~\eqref{eq:gev_smooth_ctrans}. One further verifies that~\eqref{eq:partition:function} can be reformulated~as
\begin{equation}
\label{eq:partition:reg_c_trans}
\overline{\psi}_c(\boldsymbol \phi, \boldsymbol x) = \max\limits_{\boldsymbol p \in \Delta^N} \sum\limits_{i=1}^N (\phi_i - c(\boldsymbol x, \boldsymbol y_i)) p_i - \lambda \sum\limits_{i=1}^N p_i \log\left(\frac{p_i}{\eta_i}\right).
\end{equation}
Indeed, solving the underlying Karush-Kuhn-Tucker conditions analytically shows that the optimal value of the nonlinear program~\eqref{eq:partition:reg_c_trans} coincides with the smooth $c$-transform~\eqref{eq:partition:function}. In the special case where $\eta_i = 1/N$ for all $i \in [N]$, the equivalence of~\eqref{eq:partition:function} and~\eqref{eq:partition:reg_c_trans} has already been recognized by \citet{anderson1988representative}. Substituting the representation~\eqref{eq:partition:reg_c_trans} of the smooth $c$-transform into the dual smooth optimal transport problem~\eqref{eq:smooth_ot} yields~\eqref{eq:dual_regularized_ot} with $f(s)= \lambda s \log(s)$. By Lemma~\ref{lem:strong_dual_reg_ot}, problem~\eqref{eq:smooth_ot} is thus equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $\eta = \sum_{i =1}^N \eta_i \delta_{\boldsymbol y_i}$.
\end{proof}
\subsection{Chebyshev Ambiguity Sets}
\label{sec:chebyshev}
Assume next that $\Theta$ constitutes a Chebyshev ambiguity set comprising all Borel probability measures on~$\mathbb{R}^N$ with mean vector $\boldsymbol 0$ and positive definite covariance matrix $\lambda \boldsymbol \Sigma$ for some $\boldsymbol \Sigma\succ \boldsymbol 0$ and $\lambda> 0$. Formally, we thus set $\Theta = \{\theta \in \mathcal P(\mathbb{R}^N) : \mathbb{E}_\theta [\boldsymbol z] = \boldsymbol 0,\, \mathbb E_\theta [\boldsymbol z \boldsymbol z^\top] = \lambda \boldsymbol \Sigma\}$.
In this case, \citep[Theorem~1]{ahipasaoglu2018convex} implies that the smooth $c$-transform~\eqref{eq:smooth_c_transform} can be equivalently expressed as
\begin{equation}
\label{eq:moment_ambig_ctrans}
\overline\psi_c(\boldsymbol \phi, \boldsymbol x) = \max_{\boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N(\phi_i -c(\boldsymbol x, \boldsymbol {y_i}))p_i + \lambda\,\textrm{tr}\left((\boldsymbol \Sigma^{1/2}(\textrm{diag}(\boldsymbol p)-\boldsymbol p\boldsymbol p^\top)\boldsymbol \Sigma^{1/2})^{1/2}\right),
\end{equation}
where $\textrm{diag}(\boldsymbol p)\in\mathbb{R}^{N\times N}$ represents the diagonal matrix with $\boldsymbol p$ on its main diagonal. Note that the maximum in~\eqref{eq:moment_ambig_ctrans} evaluates the convex conjugate of the extended real-valued regularization function
\[
V(\boldsymbol p)=\left\{ \begin{array}{cl}
-\lambda\,\textrm{tr}\left((\boldsymbol \Sigma^{1/2}(\textrm{diag}(\boldsymbol p)-\boldsymbol p\boldsymbol p^\top)\boldsymbol \Sigma^{1/2})^{1/2}\right) & \text{if }\boldsymbol p\in\Delta^N \\
\infty & \text{if }\boldsymbol p\notin\Delta^N
\end{array}\right.
\]
at the point $(\phi_i -c(\boldsymbol x, \boldsymbol {y_i}))_{i\in [N]}$. As $\boldsymbol\Sigma\succ \boldsymbol 0$ and $\lambda>0$, \citep[Theorem~3]{ahipasaoglu2018convex} implies that~$V(\boldsymbol p)$ is strongly convex over its effective domain~$\Delta^N$. By~\cite[Proposition~12.60]{rockafellar2009variational}, the smooth discrete $c$-transform~$\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ is therefore indeed differentiable in~$\boldsymbol \phi$ for any fixed~$\boldsymbol x$. It is further known that problem~\eqref{eq:moment_ambig_ctrans} admits an exact reformulation as a tractable semidefinite program; see \citep[Proposition~1]{mishra2012choice}. If $\boldsymbol \Sigma = \boldsymbol I$, then the regularization function $V(\boldsymbol p)$ can be re-expressed in terms of a discrete $f$-divergence, which implies via Lemma~\ref{lem:strong_dual_reg_ot} that the smooth optimal transport problem is equivalent to the original optimal transport problem regularized with a continuous $f$-divergence.
\begin{proposition}[Chebyshev regularization]
\label{prop:chebyshev-regularization}
If $\Theta$ is the Chebyshev ambiguity set of all Borel probability measures with mean $\boldsymbol 0$ and covariance matrix~$\lambda\boldsymbol I$ with $\lambda> 0$, then the smooth $c$-transform~\eqref{eq:smooth_c_transform} simplifies~to
\begin{equation}
\label{eq:marginal_moment_ctrans}
\overline \psi_c(\boldsymbol \phi, \boldsymbol x) = \max_{ \boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N(\phi_i -c(\boldsymbol x, \boldsymbol {y_i})) p_i + \lambda\sum_{i=1}^N\sqrt{p_i(1-p_i)}.
\end{equation}
In addition, the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)+ \lambda \sqrt{N-1}$, where $\eta = \frac{1}{N} \sum_{i =1}^N \delta_{\boldsymbol y_i}$ and \begin{equation}
\label{eq:chebychev_f}
f(s) = \begin{cases}
-\lambda\sqrt{s(N - s)} + \lambda s \sqrt{N-1} \quad & \text{if }0 \leq s \leq N\\
+\infty & \text{if }s>N.
\end{cases}\end{equation}
\end{proposition}
\begin{proof}
The relation~\eqref{eq:marginal_moment_ctrans} follows directly from~\eqref{eq:moment_ambig_ctrans} by replacing $\boldsymbol \Sigma$ with $\boldsymbol I$. Next, one readily verifies that $-\sum_{i \in [N]} \sqrt{p_i(1-p_i)} $ can be re-expressed as the discrete $f$-divergence $D_f(\boldsymbol p\| \boldsymbol \eta)$ from $\boldsymbol p$ to $\boldsymbol\eta=(\frac{1}{N},\ldots,\frac{1}{N})$, where $f(s) =-\lambda \sqrt{s (N - s)}+ \lambda \sqrt{N-1}$. This implies that~\eqref{eq:marginal_moment_ctrans} is equivalent to
\[
\overline \psi_c(\boldsymbol \phi, \boldsymbol x) = \max_{ \boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N(\phi_i -c(\boldsymbol x, \boldsymbol {y_i})) p_i - D_f(\boldsymbol p\| \boldsymbol \eta).
\]
Substituting the above representation of the smooth $c$-transform into the dual smooth optimal transport problem~\eqref{eq:smooth_ot} yields~\eqref{eq:dual_regularized_ot} with $f(s)= -\lambda \sqrt{s (N - s)} +\lambda s \sqrt{N-1} $. By Lemma~\ref{lem:strong_dual_reg_ot}, \eqref{eq:smooth_ot} thus reduces to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $\eta = \frac{1}{N} \sum_{i =1}^N \delta_{\boldsymbol y_i}$.
\end{proof}
Note that the function $f(s)$ defined in~\eqref{eq:chebychev_f} is indeed convex, lower-semicontinuous and satisfies $f(1)=0$. Therefore, it induces a standard $f$-divergence. Proposition~\ref{prop:chebyshev-regularization} can be generalized to arbitrary diagonal matrices $\boldsymbol \Sigma$, but the emerging $f$-divergences are rather intricate and not insightful. Hence, we do not show this generalization. We were not able to generalize Proposition~\ref{prop:chebyshev-regularization} to non-diagonal matrices $\bm \Sigma$.
\subsection{Marginal Ambiguity Sets}
\label{sec:marginal}
We now investigate the class of marginal ambiguity sets of the form
\begin{equation}
\label{eq:marginal_ambiguity_set}
\Theta = \Big\{ \theta \in \mathcal{P}(\mathbb{R}^N) \, : \, \theta(z_i \leq s) = F_i(s)\;\forall s\in \mathbb{R}, \; \forall i \in [N] \Big\},
\end{equation}
where~$F_i$ stands for the cumulative distribution function of the uncertain disturbance~$z_i$, $i\in[N]$. Marginal ambiguity sets completely specify the marginal distributions of the components of the random vector~$\bm z$ but impose no restrictions on their dependence structure ({\em i.e.}, their copula). Sometimes marginal ambiguity sets are also referred to as Fr\'echet ambiguity sets \citep{frechet1951}. We will argue below that the marginal ambiguity sets explain most known as well as several new regularization methods for the optimal transport problem. In particular, they are more expressive than the extreme value distributions as well as the Chebyshev ambiguity sets in the sense that they induce a richer family of regularization terms. Below we denote by $F_i^{-1} : [0, 1] \to \mathbb{R}$ the (left) quantile function corresponding to $F_i$, which is defined through
$$
F_i^{-1}(t) = \inf \{s :F_i(s) \geq t \}\quad \forall t\in\mathbb{R}.
$$
We first prove that if $\Theta$ constitutes a marginal ambiguity set, then the smooth $c$-transform~\eqref{eq:smooth_c_transform} admits an equivalent reformulation as the optimal value of a finite convex program.
\begin{proposition}[Smooth $c$-transform for marginal ambiguity sets]
\label{proposition:regularized_ctrans}
If $\Theta$ is a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set}, and if the underlying cumulative distribution functions $F_i$, $i\in[N]$, are continuous, then the smooth $c$-transform~\eqref{eq:smooth_c_transform} can be equivalently expressed as
\begin{equation}
\label{eq:regularized_c_transform}
\overline \psi_c(\boldsymbol \phi, \boldsymbol x) = \max_{ \boldsymbol p \in \Delta^N} \displaystyle \sum\limits_{i=1}^N ~ (\phi_i - c(\boldsymbol x, \boldsymbol {y_i}))p_i + \sum_{i=1}^N \int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t
\end{equation}
for all $\bm x\in\mathcal{X}$ and $\bm \phi\in \mathbb{R}^N$. In addition, the smooth $c$-transform is convex and differentiable with respect to $\boldsymbol \phi$, and $\nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ represents the unique solution of the convex maximization problem~\eqref{eq:regularized_c_transform}.
\end{proposition}
Recall that the smooth $c$-transform~\eqref{eq:smooth_c_transform} can be viewed as the best-case utility of a semi-parametric discrete choice model. Thus, \eqref{eq:regularized_c_transform} follows from~\cite[Theorem~1]{natarajan2009persistency}.
To keep this paper self-contained, we provide a new proof of Proposition~\ref{proposition:regularized_ctrans}, which exploits a natural connection between the smooth $c$-transform induced by a marginal ambiguity set and the conditional value-at-risk (CVaR).
\begin{proof}[Proof of Proposition~\ref{proposition:regularized_ctrans}]
Throughout the proof we fix $\bm x\in\mathcal{X}$ and $\bm \phi\in \mathbb{R}^N$, and we introduce the nominal utility vector~$\boldsymbol u \in \mathbb{R}^N$ with components~$u_i= \phi_i - c(\boldsymbol x, \boldsymbol y_i)$ in order to simplify notation. In addition, it is useful to define the binary function $\boldsymbol r: \mathbb{R}^N \to \{ 0, 1 \}^N$ with components
\begin{align*}
r_i(\boldsymbol z) =
\begin{cases}
1 & \text{if } i = \displaystyle \min \argmax_{j \in [N]} ~ u_j + z_j, \\
0 & \text{otherwise.}
\end{cases}
\end{align*}
For any fixed~$\theta \in \Theta$, we then have
\begin{align*}
\mathbb{E}_{\boldsymbol z \sim \theta} \Big[ \max\limits_{i \in [N]} u_i + z_{i} \Big]
= \mathbb{E}_{\boldsymbol z \sim \theta} \Big[ \; \sum_{i=1}^N ( u_i + z_i) r_i(\boldsymbol z) \Big]
&= \sum_{i=1}^N u_i p_i + \sum_{i=1}^N \mathbb{E}_{\boldsymbol z \sim \theta} \left[ z_i q_i(z_i) \right],
\end{align*}
where $p_i = \mathbb{E}_{\boldsymbol z \sim \theta} [ r_i(\boldsymbol z) ]$ and $q_i(z_i) = \mathbb{E}_{\boldsymbol z \sim \theta} [ r_i(\boldsymbol z) | z_i ]$ almost surely with respect to~$\theta$. From now on we denote by $\theta_i$ the marginal probability distribution of the random variable $z_i$ under $\theta$. As $\theta$ belongs to a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set}, we thus have~$\theta_i (z_i \leq s) = F_i(s)$ for all $s \in \mathbb{R}$, that is, $\theta_i$ is uniquely determined by the cumulative distribution function $F_i$. The above reasoning then implies that
\begin{align}
\nonumber
\overline \psi_c(\boldsymbol \phi, \boldsymbol x)
= \sup_{\theta \in \Theta} ~ \mathbb{E}_{\boldsymbol z \sim \theta} \Big[ \max_{i \in [N]} u_i + z_i \Big]
&= \left\{
\begin{array}{cll}
\sup & \displaystyle \sum_{i=1}^N u_i p_i + \sum_{i=1}^N \mathbb{E}_{\boldsymbol z \sim \theta} \left[ z_i q_i(z_i) \right] \\[3ex]
\text{s.t.} & \theta \in \Theta, ~\boldsymbol p \in \Delta^N, ~\boldsymbol q \in \mathcal L^N(\mathbb{R}) \\ [1ex]
& \mathbb{E}_{\boldsymbol z \sim \theta} \left[ r_i(\boldsymbol z) \right] = p_i & \forall i \in [N] \\[2ex]
& \mathbb{E}_{\boldsymbol z \sim \theta} [ r_i(\boldsymbol z) | z_i ] = q_i(z_i) \quad \theta\text{-a.s.} & \forall i \in [N]
\end{array} \right.\\
&\leq \left\{
\begin{array}{cll}
\sup & \displaystyle \sum_{i=1}^N u_i p_i + \sum_{i=1}^N \mathbb{E}_{z_i \sim \theta_i} \left[ z_i q_i(z_i) \right] \\[3ex]
\text{s.t.} & \boldsymbol p \in \Delta^N,~ \boldsymbol q \in \mathcal L^N(\mathbb{R}) \\ [1ex]
& \mathbb{E}_{z_i \sim \theta_i} \left[ q_i(z_i) \right] = p_i & \forall i \in [N] \\[2ex]
& 0 \leq q_i(z_i) \leq 1 \quad \theta_i\text{-a.s.} & \forall i \in [N].
\end{array} \right.
\label{eq:upper-bound}
\end{align}
The inequality can be justified as follows. One may first add the redundant expectation constraints~$p_i = \mathbb{E}_{z_i \sim \theta} [q_i(z_i)]$ and the redundant $\theta_i$-almost sure constraints $0\leq q_i(z_i)\leq 1$ to the maximization problem over $
\theta$, $\bm p$ and $\bm q$ without affecting the problem's optimal value. Next, one may remove the constraints that express $p_i$ and $q_i(z_i)$ in terms of $r_i(\bm z)$. The resulting relaxation provides an upper bound on the original maximization problem. Note that all remaining expectation operators involve integrands that depend on~$\bm z$ only through~$z_i$ for some $i\in[N]$, and therefore the expectations with respect to the joint probability measure~$\theta$ can all be simplified to expectations with respect to one of the marginal probability measures~$\theta_i$. As neither the objective nor the constraints of the resulting problem depend on~$\theta$, we may finally remove~$\theta$ from the list of decision variables without affecting the problem's optimal value.
For any fixed $\boldsymbol p \in \Delta^N$, the upper bounding problem~\eqref{eq:upper-bound} gives rise the following $N$ subproblems indexed by~$i\in[N]$.
\begin{subequations}
\begin{align}
\label{eq:dual:CVaR}
\sup_{q_i \in \mathcal L(\mathbb{R})} \bigg\{ \mathbb{E}_{z_i \sim \theta_i} \left[ z_i q_i(z_i) \right]:
\mathbb{E}_{z_i \sim \theta_i} \left[ q_i(z_i) \right] = p_i, ~
0 \leq q_i(z_i) \leq 1 ~ \theta_i\text{-a.s.} \bigg\}
\end{align}
If $p_i > 0 $, the optimization problem~\eqref{eq:dual:CVaR} over the functions $q_i \in \mathcal L(\mathbb{R})$ can be recast as an optimization problem over probability measures $\tilde \theta_i \in \mathcal P(\mathbb{R})$ that are absolutely continuous with respect to~$\theta_i$,
\begin{align}
\label{eq:dual:CVaR2}
\sup_{\tilde \theta_i \in \mathcal P(\mathbb{R})} \bigg\{ p_i \; \mathbb{E}_{z_i \sim \tilde \theta_i} \left[ z_i \right]: \frac{\mathrm{d} \tilde \theta_i}{\mathrm{d} \theta_i}(z_i) \leq \frac{1}{p_i} ~ \theta_i\text{-a.s.} \bigg\},
\end{align}
\end{subequations}
where $\mathrm{d} \tilde \theta_i / \mathrm{d} \theta_i $ denotes as usual the Radon-Nikodym derivative of $\tilde \theta_i$ with respect to $\theta_i$. Indeed, if $q_i$ is feasible in~\eqref{eq:dual:CVaR}, then $\tilde \theta_i$ defined through $\tilde \theta_i[\mathcal B]= \frac{1}{p_i} \int_B q_i(z_i) \theta_i(\mathrm{d} z_i)$ for all Borel sets $B\subseteq \mathbb{R}$ is feasible in~\eqref{eq:dual:CVaR2} and attains the same objective function value. Conversely, if $\tilde\theta_i$ is feasible in~\eqref{eq:dual:CVaR2}, then $q_i (z_i)= p_i \, \mathrm{d} \tilde \theta_i / \mathrm{d} \theta_i (z_i)$ is feasible in~\eqref{eq:dual:CVaR} and attains the same objective function value. Thus, \eqref{eq:dual:CVaR} and~\eqref{eq:dual:CVaR2} are indeed~equivalent. By \cite[Theorem~4.47]{follmer2004stochastic}, the optimal value of~\eqref{eq:dual:CVaR2} is given by $p_i \, \theta_i \text{-CVaR}_{p_i}(z_i) = \int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t$, where $\theta_i \text{-CVaR}_{p_i}(z_i)$ denotes the CVaR of~$z_i$ at level~$p_i$ under~$\theta_i$.
If $p_i = 0$, on the other hand, then the optimal value of~\eqref{eq:dual:CVaR} and the integral $\int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t$ both evaluate to zero. Thus, the optimal value of the subproblem~\eqref{eq:dual:CVaR} coincides with $\int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t$ irrespective of $p_i$. Substituting this optimal value into~\eqref{eq:upper-bound} finally yields the explicit upper bound
\begin{align}
\label{eq:upper:bound:choice}
\sup_{\theta \in \Theta} ~ \mathbb{E}_{z \sim \theta} \Big[ \max\limits_{i \in [N]} u_i + z_i \Big]
&\leq \sup_{\boldsymbol p \in \Delta^N} ~ \sum_{i=1}^N u_i p_i + \sum_{i=1}^N \int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t.
\end{align}
Note that the objective function of the upper bounding problem on the right hand side of~\eqref{eq:upper:bound:choice} constitutes a sum of the strictly concave and differentiable univariate functions $u_i p_i + \int_{1-p_i}^1 F_i^{-1}(t)$. Indeed, the derivative of the $i^{\text{th}}$ function with respect to $p_i$ is given by $u_i + F_i^{-1}(1-p_i)$, which is strictly increasing in~$p_i$ because $F_i$ is continuous by assumption. The upper bounding problem in~\eqref{eq:upper:bound:choice} is thus solvable as it has a compact feasible set as well as a differentiable objective function. Moreover, the solution is unique thanks to the strict concavity of the objective function. In the following we denote this unique solution by~$\boldsymbol p^\star$.
It remains to be shown that there exists a distribution $\theta^\star \in \Theta$ that attains the upper bound in~\eqref{eq:upper:bound:choice}.
To this end, we define the functions $ q_i^\star(z_i) = \mathds{1}_{\{ z_i > F_i^{-1}(1 - p_i^\star) \}}$ for all $i \in [N]$.
By \citep[Remark~4.48]{follmer2004stochastic}, $q_i^\star(z_i)$ is optimal in~\eqref{eq:dual:CVaR} for $p_i=p_i^\star$. In other words, we have $\mathbb{E}_{z_i \sim \theta_i} [q_i^\star(z_i)] = p_i^\star$ and $\mathbb{E}_{z_i \sim \theta_i}[z_i q_i^\star(z_i)] = \int_{1 - p_i^\star}^1 F_i^{-1}(t) \mathrm{d} t$.
In addition, we also define the Borel measures $\theta_i^+$ and $\theta_i^-$ through
\begin{align*}
\theta_i^+(B) = \theta_i(B | z_i > F_i^{-1}(1 - p_i^\star))
\quad \text{and} \quad
\theta_i^-(B) = \theta_i(B | z_i \leq F_i^{-1}(1 - p_i^\star))
\end{align*}
for all Borel sets $B \subseteq \mathbb{R}$, respectively. By construction, $\theta_i^+$ is supported on~$(F_i^{-1}(1 - p_i^\star), \infty)$, while $\theta_i^-$ is supported on~$(-\infty, (F_i^{-1}(1 - p_i^\star)]$. The law of total probability further implies that $\theta_i = p_i^\star \theta_i^+ + (1 - p_i^\star) \theta_i^-$.
In the remainder of the proof we will demonstrate that the maximization problem on the left hand side of~\eqref{eq:upper:bound:choice} is solved by the mixture distribution
\begin{align*}
\theta^\star = \sum_{j=1}^N p_j^\star \cdot \left( \otimes_{k=1}^{j-1} \theta_k^- \right) \otimes \theta_j^+ \otimes \left( \otimes_{k=j+1}^{N} \theta_k^- \right).
\end{align*}
This will show that the inequality in~\eqref{eq:upper:bound:choice} is in fact an equality, which in turn implies that the smooth $c$-transform is given by~\eqref{eq:regularized_c_transform}.
We first prove that $\theta^\star \in \Theta$. To see this, note that for all $i \in [N]$ we have
\begin{align*}
\textstyle
\theta^\star (z_i \leq s)
= p_i^\star \theta_i^+ (z_i \leq s) + ( \sum_{j \neq i} p_j^\star ) \theta_i^- (z_i \leq s)
= \theta_i (z_i \leq s)
= F_i(s),
\end{align*}
where the second equality exploits the relation $\sum_{j \neq i} p_j^\star = 1 - p_i^\star$. This observation implies that $\theta^\star \in \Theta$. Next, we prove that $\theta^\star$ attains the upper bound in~\eqref{eq:upper:bound:choice}. By the definition of the binary function $\boldsymbol r$, we~have
\begin{align*}
\mathbb{E}_{\boldsymbol z \sim \theta^\star} \Big[ \max\limits_{i \in [N]} u_i + z_{i} \Big] &=\mathbb{E}_{\boldsymbol z \sim \theta^\star} \left[ ( u_i + z_i) r_i(\boldsymbol z) \right] \\
&= \mathbb{E}_{z_i \sim \theta_i} \left[ (u_i + z_i) \mathbb{E}_{\boldsymbol z \sim \theta^\star} \left[r_i(\boldsymbol z) | z_i \right] \right] \\
&= \mathbb{E}_{z_i \sim \theta_i} \Big[ ( u_i + z_i) \, \theta^\star \Big( i = \min \argmax\limits_{j \in [N]} ~ u_j + z_j \big| z_i \Big) \Big] \\
&= \mathbb{E}_{z_i \sim \theta_i} \left[ ( u_i + z_i) \, \theta^\star \left( z_j < u_i + z_i - u_j~ \forall j \neq i \big| z_i \right) \right],
\end{align*}
where the third equality holds because $r_i(\boldsymbol z)=1$ if and only if $i = \min \argmax_{j \in [N]} u_j + z_j$, and the fourth equality follows from the assumed continuity of the marginal distribution functions $F_i$, $i\in[N]$, which implies that $\theta^\star ( z_j = u_i + z_i - u_j~ \forall j \neq i \big| z_i ) = 0$ $\theta_i$-almost surely for all $i,j\in[N]$.
Hence, we find
\begin{subequations}
\label{eq:both:exp}
\begin{align}
\mathbb{E}_{\boldsymbol z \sim \theta^\star} \Big[ \max\limits_{i \in [N]} u_i + z_{i} \Big]
&= p_i^\star\, \mathbb{E}_{z_i \sim \theta_i^+} \left[ ( u_i + z_i) \, \theta^\star \left( z_j < u_i + z_i - u_j~ \forall j \neq i \big| z_i \right) \right] \notag \\
&\quad + (1 - p_i^\star)\, \mathbb{E}_{z_i \sim \theta_i^-} \left[ ( u_i + z_i) \, \theta^\star \left( z_j < u_i + z_i - u_j~ \forall j \neq i \big| z_i \right) \right] \notag \\
&= \displaystyle p_i^\star\, \mathbb{E}_{z_i \sim \theta_i^+} \Big[ (u_i + z_i) \Big( \prod_{j \neq i} \theta_j^-(z_j < z_i + u_i - u_j) \Big) \Big] \label{eq:first:exp}\\
&\quad + \displaystyle \sum_{j \neq i} p_j^\star \,\mathbb{E}_{z_i \sim \theta_i^-} \Big[ (u_i + z_i) \Big( \!\prod_{k \neq i, j} \theta_k^-(z_k < z_i + u_i - u_k) \Big) \theta_j^+(z_j < z_i + u_i - u_j) \Big], \label{eq:second:exp}
\end{align}
\end{subequations}
where the first equality exploits the relation $\theta_i = p_i^\star \theta_i^+ + (1 - p_i^\star) \theta_i^-$, while the second equality follows from the definition of $\theta^\star$. The expectations in~\eqref{eq:both:exp} can be further simplified by using the stationarity conditions of the upper bounding problem in~\eqref{eq:upper:bound:choice}, which imply that the partial derivatives of the objective function with respect to the decision variables $p_i$, $i\in[N]$, are all equal at $\bm p=\bm p^\star$. Thus, $\boldsymbol p^\star$ must satisfy
\begin{align}
\label{eq:KKT}
u_i + F_i^{-1}(1 - p_i^\star) = u_j + F_j^{-1}(1 - p_j^\star) \quad \forall i, j \in [N].
\end{align}
Consequently, for every $z_i > F_i^{-1}(1 - p_i^\star)$ and $j\neq i$ we have
\begin{align*}
\theta_j^-(z_j < z_i + u_i - u_j)
\geq \theta_j^-(z_j \leq F_i^{-1}(1 - p_i^\star) + u_i - u_j)
= \theta_j^-(z_j \leq F_j^{-1}(1 - p_j^\star)) = 1,
\end{align*}
where the first equality follows from~\eqref{eq:KKT}, and the second equality holds because $\theta_j^-$ is supported on $(-\infty, F_j^{-1}(1 - p_j^\star)]$. As no probability can exceed~1, the above reasoning implies that $\theta_j^-(z_j < z_i + u_i - u_j)=1$ for all $z_i > F_i^{-1}(1 - p_i^\star)$ and $j\neq i$. Noting that $q_i^\star(z_i)= \mathds{1}_{\{ z_i > F_i^{-1}(1 - p_i^\star) \}}$ represents the characteristic function of the set $(F_i^{-1}(1 - p_i^\star), \infty)$ covering the support of $\theta_i^+$, the term~\eqref{eq:first:exp} can thus be simplified to
\begin{align}
& p_i^\star \,\mathbb{E}_{z_i \sim \theta_i^+} \Big[ (u_i + z_i) \Big( \prod_{j \neq i} \theta_j^-(z_j < z_i + u_i - u_j) \Big) q_i^\star(z_i) \Big] \notag = \mathbb{E}_{z_i \sim \theta_i} \left[ (u_i + z_i) q_i^\star(z_i) \right]. \label{eq:first:term}
\end{align}
Similarly, for any $z_i \leq F_i^{-1}(1 - p_i^\star)$ and $j\neq i$ we have
\begin{align*}
\theta_j^+(z_j < z_i + u_i - u_j)
\leq \theta_j^+(z_j < F_i^{-1}(1 - p_i^\star) + u_i - u_j)
= \theta_j^+(z_j < F_j^{-1}(1 - p_j^\star)) = 0,
\end{align*}
where the two equalities follow from~\eqref{eq:KKT} and the observation that $\theta_j^+$ is supported on $(F_j^{-1}(1 - p_j^\star), \infty)$, respectively. As probabilities are non-negative, the above implies that $\theta_j^+(z_j < z_i + u_i - u_j)=0$ for all $z_i \leq F_i^{-1}(1 - p_i^\star)$ and $j\neq i$. Hence, as $\theta_i^-$ is supported on $(-\infty, F_i^{-1}(1 - p_i^\star)]$, the term~\eqref{eq:second:exp} simplifies to
\begin{align*}
\sum_{j \neq i} p_j^\star \mathbb{E}_{z_i \sim \theta_i^-} \Big[ (u_i + z_i) \Big( \prod_{k \neq i, j} \theta_k^-(z_k < z_i + u_i - u_k) \Big) \theta_j^+(z_j < z_i + u_i - u_j) \mathds{1}_{\{ z_i \leq F_i^{-1}(1 - p_i^\star) \}} \Big] = 0.
\end{align*}
By combining the simplified reformulations of~\eqref{eq:first:exp} and~\eqref{eq:second:exp}, we finally obtain
\begin{align*}
\mathbb{E}_{\boldsymbol z \sim \theta^\star} \Big[ \max\limits_{i \in [N]} u_i + z_{i} \Big]
= \sum_{i=1}^N \mathbb{E}_{z_i \sim \theta_i} \left[ ( u_i + z_i) q_i^\star(z_i) \right] = \sum_{i=1}^N u_i p_i^\star + \sum_{i=1}^N \int_{1-p_i^\star}^1 F_i^{-1}(t) \mathrm{d} t,
\end{align*}
where the last equality exploits the relations $\mathbb{E}_{z_i \sim \theta_i} [q_i^\star(z_i)] = p_i^\star$ and $\mathbb{E}_{z_i \sim \theta_i}[z_i q_i^\star(z_i)] = \int_{1 - p_i^\star}^1 F_i^{-1}(t) \mathrm{d} t$ derived in the first part of the proof. We have thus shown that the smooth $c$-transform is given by~\eqref{eq:regularized_c_transform}.
Finally, by the envelope theorem~\citep[Theorem~2.16]{de2000mathematical}, the gradient of $\nabla_{\boldsymbol \phi}\overline \psi(\boldsymbol \phi, \boldsymbol x)$ exists and coincides with the unique maximizer $\bm p^\star$ of the upper bounding problem in~\eqref{eq:regularized_c_transform}.
\end{proof}
The next theorem reveals that the smooth dual optimal transport problem~\eqref{eq:smooth_ot} with a marginal ambiguity set corresponds to a regularized primal optimal transport problem of the form~\eqref{eq:reg_ot_pri_abstract}.
\begin{theorem}[Fr\'echet regularization]
\label{theorem:primal_dual}
Suppose that $\Theta$ is a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set} and that the marginal cumulative distribution functions are defined through
\begin{equation}
\label{eq:marginal_dists}
F_i(s) = \min\{1, \max\{0, 1-\eta_i F(-s)\}\}
\end{equation}
for some probability vector $\boldsymbol \eta \in \Delta^N$ and strictly increasing function $F: \mathbb{R} \to \mathbb{R}$ with $\int_0^1 F^{-1} (t) \mathrm{d} t = 0$. Then, the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with $R_\Theta = D_f(\pi \| \mu \otimes \eta)$, where
$f(s) = \int_{0 }^{s} F^{-1}(t) \mathrm{d} t$ and $\eta = \sum_{i=1}^N \eta_i \delta_{y_i}$.
\end{theorem}
The function~$f(s)$ introduced in Theorem~\ref{theorem:primal_dual} is smooth and convex because its derivative $ \mathrm{d} f(s) / \mathrm{d} s = F^{-1}(s)$ is strictly increasing, and
$f(1) = \int_0^1 F^{-1}(t) \mathrm{d} t=0$ by assumption. Therefore, this function induces a standard $f$-divergence. From now on we will refer to $F$ as the {\em marginal generating function}.
\begin{proof} [Proof of Theorem~\ref{theorem:primal_dual}]
By Proposition~\ref{proposition:regularized_ctrans}, the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent~to
\begin{align*}
\overline{W}_{c}(\mu, \nu) &= \sup\limits_{ \boldsymbol {\phi}\in \mathbb{R}^N} ~ \mathbb{E}_{\boldsymbol x \sim \mu}\left[\min\limits_{\boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N{\phi_i\nu_i}- \sum\limits_{i=1}^N(\phi_i - c(\boldsymbol x, \boldsymbol {y_i}))p_i - \sum_{i=1}^N \displaystyle\int_{1-p_i}^1 F_i^{-1}(t)\mathrm{d} t
\right].
\end{align*}
As $F$ is strictly increasing, we have $F_i^{-1}(s) = -F^{-1}((1-s) / \eta_i)$ for all $s \in (0, 1)$. Thus, we find
\begin{align}
\label{eq:integral_rep_f}
f(s) = \int_{0}^{s} F^{-1}(t) \mathrm{d} t = -\frac{1}{\eta_i} \int_{1}^{1 - s \eta_i} F^{-1} \left( \frac{1 - z}{\eta_i} \right) \mathrm{d} z= -\frac{1}{ \eta_i} \int_{1 - s \eta_i}^1 F_i^{-1}(z) \mathrm{d} z,
\end{align}
where the second equality follows from the variable substitution $z\leftarrow 1-\eta_i t$. This integral representation of~$f(s)$ then allows us to reformulate the smooth dual optimal transport problem as
\begin{align*}
\overline{W}_{c}(\mu, \nu)= \sup\limits_{ \boldsymbol {\phi}\in \mathbb{R}^N} ~ \mathbb{E}_{\boldsymbol x \sim \mu}\left[\min\limits_{\boldsymbol p\in \Delta^N} \sum\limits_{i=1}^N{\phi_i\nu_i}- \sum\limits_{i=1}^N(\phi_i - c(\boldsymbol x, \boldsymbol {y_i}))p_i + \sum\limits_{i=1}^N \eta_i \,f\left( \frac{p_i}{\eta_i} \right) \right],
\end{align*}
which is manifestly equivalent to problem~\eqref{eq:dual_regularized_ot} thanks to the definition of the discrete $f$-divergence. Lemma~\ref{lem:strong_dual_reg_ot} finally implies that the resulting instance of~\eqref{eq:dual_regularized_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with regularization term $R_\Theta (\pi ) = D_{f}(\pi\|\mu \otimes \eta)$.
Hence, the claim follows.
\end{proof}
Theorem~\ref{theorem:primal_dual} imposes relatively restrictive conditions on the marginals of~$\boldsymbol z$. Indeed, it requires that all marginal distribution functions $F_i$, $i\in[N]$, must be generated by a single marginal generating function~$F$ through the relation~\eqref{eq:marginal_dists}. The following examples showcase, however, that the freedom to select~$F$ offers significant flexibility in designing various (existing as well as new) regularization schemes. Details of the underlying derivations are relegated to Appendix~\ref{appendix:derivations}. {\color{black} Table~\ref{tab:summary_examples} summarizes the marginal generating functions~$F$ studied in these examples and lists the corresponding divergence generators~$f$.}
\begin{table}[h!]
\scriptsize
\centering
{\color{black}
\begin{tabular}{||l|c|c|c||}
\hline \hline
Marginal Distribution & $F(s)$ & $f(s)$ & Regularization \\ \hline\hline
Exponential & $ \exp(s/\lambda - 1)$ & $\lambda s \log(s)$ & Entropic \\ \hline
Uniform & $s/(2\lambda) + 1/2$ &$\lambda (s^2 - s)$ &$\chi^2$-divergence\\\hline
Pareto & $(s(q-1)/(\lambda q) + 1/q)^{\frac{1}{q-1}}$ & $\lambda (s^q - s) / (q-1)$ & Tsallis divergence\\ \hline
Hyperbolic cosine & ${\sinh(s/\lambda \!-\! k),~k = \sqrt{2} \!-\! 1\!-\! \textrm{arcsinh}(1)} $ & $\lambda(s\, \text{arcsinh}(s) \!-\! \sqrt{s^2 \!+\!1} \!+\! 1\! +\! ks)$ & Hyperbolic divergence\\ \hline
$t$-distribution &$\frac{N}{2}\left(1 + \frac{s-\sqrt{N\!-\!1}}{\sqrt{\lambda^2 + (s \!-\! \sqrt{N\!-\!1})^2}}\right)$ & \!\!\!\!$\begin{cases}-\lambda \sqrt{s(N\!-\!s)} \! +\! \lambda s \sqrt{N\!-\!1} ~&\text{if}~0\leq \!s\! \leq N\\
+\infty &\text{if} ~s\!>\!N\end{cases}$& Chebychev\\
\hline\hline
\end{tabular}
\caption{\color{black} Marginal generating functions~$F$ with parameter~$\lambda$ and corresponding divergence generators~$f$.}
\label{tab:summary_examples}}
\end{table}
\begin{example}[Exponential distribution model]
\label{ex:exp}
Suppose that $\Theta$ is a marginal ambiguity set with (shifted) exponential marginals of the form~\eqref{eq:marginal_dists} induced by the generating function
$F(s) = \exp(s / \lambda - 1)$ with $\lambda > 0$.
Then the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with an entropic regularizer of the form $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $f(s) =\lambda s \log(s)$, while the smooth $c$-transform~\eqref{eq:smooth_c_transform} reduces to the log-partition function~\eqref{eq:partition:function}. This example shows that entropic regularizers are not only induced by singleton ambiguity sets containing a generalized extreme value distribution (see Section~\ref{sec:gevm}) but also by marginal ambiguity sets with exponential marginals.
\end{example}
\begin{example}[Uniform distribution model]
\label{ex:uniform}
Suppose that $\Theta$ is a marginal ambiguity set with uniform marginals of the form~\eqref{eq:marginal_dists} induced by the generating function $F(s) = s/(2\lambda) + 1/2$ with $\lambda > 0$.
In this case the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with a $\chi^2$-divergence regularizer of the form $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $f(s) = \lambda (s^2 -s)$. Such regularizers were previously investigated by \citet{blondel2017smooth} and~\citet{seguy2017large} under the additional assumption that $\eta_i$ is independent of $i\in[N]$, yet their intimate relation to noise models with uniform marginals remained undiscovered until now. In addition, the smooth $c$-transform~\eqref{eq:smooth_c_transform} satisfies
\begin{align*}
\overline\psi(\boldsymbol \phi, \boldsymbol x) = \lambda + \lambda \spmax_{i \in [N]} \;\frac{\phi_i - c(\boldsymbol x, \boldsymbol {y_i})}{\lambda},
\end{align*}
where the sparse maximum operator `$\spmax$' inspired by \citet{sparsemax} is defined through
\begin{align}
\label{eq:spmax}
\spmax_{i \in [N]} \; u_i = \max_{\boldsymbol p \in \Delta^N} \; \sum_{i=1}^N u_i p_i - {p_i^2}/{\eta_i} \qquad \forall \bm u\in\mathbb{R}^N.
\end{align}
The envelope theorem~\citep[Theorem~2.16]{de2000mathematical} ensures that $\spmax_{i \in[N]} u_i$ is smooth and that its gradient with respect to~$\bm u$ is given by the unique solution~$\bm p^\star$ of the maximization problem on the right hand side of~\eqref{eq:spmax}. We note that $\bm p^\star$ has many zero entries due to the sparsity-inducing nature of the problem's simplicial feasible set. In addition, we have $\lim_{\lambda\downarrow 0} \lambda \spmax_{i \in [N]} u_i/\lambda = \max_{i\in[N]}u_i$. Thus, the sparse maximum can indeed be viewed as a smooth approximation of the ordinary maximum. In marked contrast to the more widely used LogSumExp function, however, the sparse maximum has a sparse gradient. Proposition~\ref{proposition:spmax} in Appendix~\ref{appendix:spmax} shows that $\bm p^\star$ can be computed efficiently by sorting.
\end{example}
\begin{example}[Pareto distribution model]
\label{ex:pareto}
Suppose that $\Theta$ is a marginal ambiguity set with (shifted) Pareto distributed marginals of the form~\eqref{eq:marginal_dists} induced by the generating function
$F(s) = (s (q-1) / (\lambda q)+1/q)^{1/(q-1)}$ with $\lambda,q>0$.
Then the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with a Tsallis divergence regularizer of the form $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $f(s) = \lambda (s^q - s)/(q-1)$. Such regularizers were investigated by~\citep{muzellec2017tsallis} under the additional assumption that $\eta_i$ is independent of $i\in[N]$. The Pareto distribution model encapsulates the exponential model (in the limit $q\to 1$) and the uniform distribution model (for $q=2$) as special cases. The smooth $c$-transform admits no simple closed-form representation under this model.
\end{example}
\begin{example}[Hyperbolic cosine distribution model]
\label{ex:hyperbolic}
Suppose that $\Theta$ is a marginal ambiguity set with hyperbolic cosine distributed marginals of the form~\eqref{eq:marginal_dists} induced by the generating function $F(s) = \sinh(s/\lambda - k)$ with $k = \sqrt{2} - 1 - \textrm{arcsinh}(1)$ and $\lambda > 0$. Then the marginal probability density functions are given by scaled and truncated hyperbolic cosine functions, and the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the regularized optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with a hyperbolic divergence regularizer of the form $R_\Theta(\pi) = D_f(\pi \| \mu \otimes \eta)$, where $f(s) = \lambda(s \hspace{0.1em} \textrm{arcsinh}(s) - \sqrt{s^2 + 1} + 1 + ks)$. Hyperbolic divergences were introduced by \citet{ghai2019exponentiated} in order to unify several gradient descent algorithms.
\end{example}
\begin{example}[$t$-distribution model]
\label{ex:t-distribution}
Suppose that $\Theta$ is a marginal ambiguity set where the marginals are determined by~\eqref{eq:marginal_dists}, and assume that the generating function is given by
\[
F(s) = \frac{N}{2}\left(1 + \frac{s - \sqrt{N-1}} {\sqrt{\lambda^2 + (s - \sqrt{N-1})^{2}}}\right)
\]
for some $\lambda > 0$. In this case one can show that all marginals constitute $t$-distributions with $2$ degrees of freedom. In addition, one can show that the smooth dual optimal transport problem~\eqref{eq:smooth_ot} is equivalent to the Chebyshev regularized optimal transport problem described in Proposition~\ref{prop:chebyshev-regularization}.
\end{example}
To close this section, we remark that different regularization schemes differ as to how well they approximate the original (unregularized) optimal transport problem. Proposition~\ref{prop:approx_bound} provides simple error bounds that may help in selecting suitable regularizers. For the entropic regularization scheme associated with the exponential distribution model of Example~\ref{ex:exp}, for example, the error bound evaluates to
$\max_{i\in [N]}\lambda \log(1/\eta_i)$, while for the $\chi^2$-divergence regularization scheme associated with the uniform distribution model of Example~\ref{ex:uniform}, the error bound is given by $\max_{i \in [N]}\lambda (1/\eta_i - 1)$. In both cases, the error is minimized by setting~$\eta_i = 1/N $ for all $i \in [N]$. Thus, the error bound grows logarithmically with $N$ for entropic regularization and linearly with $N$ for $\chi^2$-divergence regularization. Different regularization schemes also differ with regard to their computational properties, which will be discussed in Section~\ref{sec:computation}.
\section{Numerical Solution of Smooth Optimal Transport Problems}
\label{sec:computation}
The smooth semi-discrete optimal transport problem~\eqref{eq:smooth_ot} constitutes a stochastic optimization problem and can therefore be addressed with a stochastic gradient descent (SGD) algorithm. In Section~\ref{section:AGD} we first derive new convergence guarantees for an averaged gradient descent algorithm that has only access to a biased stochastic gradient oracle. This algorithm outputs the uniform average of the iterates (instead of the last iterate) as the recommended candidate solution. We prove that if the objective function is Lipschitz continuous, then the suboptimality of this candidate solution is of the order~$\mathcal O(1/\sqrt{T})$, where $T$ stands for the number of iterations. An improvement in the non-leading terms is possible if the objective function is additionally smooth. We further prove that a convergence rate of $\mathcal O(1/{T})$ can be obtained for generalized self-concordant objective functions. In Section~\ref{section:ASGD-OT} we then show that the algorithm of Section~\ref{section:AGD} can be used to efficiently solve the smooth semi-discrete optimal transport problem~\eqref{eq:smooth_ot} corresponding to a marginal ambiguity set of the type~\eqref{eq:marginal_ambiguity_set}. As a byproduct, we prove that the convergence rate of the averaged SGD algorithm for the semi-discrete optimal transport problem with {\em entropic} regularization is of the order~$\mathcal O(1/T)$, which improves the $\mathcal O(1/\sqrt{T})$ guarantee of~\citet{genevay2016stochastic}.
\subsection{Averaged Gradient Descent Algorithm with Biased Gradient Oracles}
\label{section:AGD}
Consider a general convex minimization problem of the form
\begin{equation}
\label{eq:convex:problem}
\min_{\bm \phi \in \mathbb{R}^n} ~ h(\bm \phi),
\end{equation}
where the objective function $h: \mathbb{R}^n \to \mathbb{R}$ is convex and differentiable. We assume that problem~\eqref{eq:convex:problem} admits a minimizer $\bm \phi^\star$. We study the convergence behavior of the inexact gradient descent algorithm
\begin{equation} \label{eq:gd}
\bm \phi_{t} = \bm \phi_{t-1} - \gamma \bm g_t(\bm \phi_{t-1}),
\end{equation}
where $\gamma > 0$ is a fixed step size, $\bm \phi_0$ is a given deterministic initial point and the function $\bm g_t: \mathbb{R}^n \to \mathbb{R}^n$ is an inexact gradient oracle that returns for every fixed $\bm \phi\in\mathbb{R}^n$ a random estimate of the gradient of~$h$ at~$\bm \phi$. Note that we allow the gradient oracle to depend on the iteration counter~$t$, which allows us to account for increasingly accurate gradient estimates. In contrast to the previous sections, we henceforth model all random objects as measurable functions on an abstract filtered probability space $(\Omega, \mathcal F, (\mathcal F_t)_{t \geq 0}, \mathbb P)$, where $\mathcal{F}_0 = \{ \emptyset,\Omega \}$ represents the trivial $\sigma$-field, while the gradient oracle $\bm g_t(\bm \phi)$ is $\mathcal F_t$-measurable for all $t\in\mathbb N$ and $\bm \phi \in\mathbb{R}^n$. In order to avoid clutter, we use $\mathbb E[\cdot]$ to denote the expectation operator with respect to~$\mathbb P$, and all inequalities and equalities involving random variables are understood to hold $\mathbb P$-almost surely.
In the following we analyze the effect of averaging in inexact gradient descent algorithms. We will show that after $T$ iterations with a constant step size~$\gamma = \mathcal O(1 / \sqrt{T})$, the objective function value of the uniform average of all iterates generated by~\eqref{eq:gd} converges to the optimal value of~\eqref{eq:convex:problem} at a sublinear rate. Specifically, we will prove that the rate of convergence varies between $\mathcal{O}(1 / \sqrt{T})$ and $\mathcal{O}(1/T)$ depending on properties of the objective function.
Our convergence analysis will rely on several regularity conditions.
\begin{assumption}[Regularity conditions] Different combinations of the following regularity conditions will enable us to establish different convergence guarantees for the averaged inexact gradient descent algorithm.
\label{assumption:main}~
\begin{enumerate}[label=(\roman*)]
\item
\textbf{Biased gradient oracle:}
\label{assumption:main:gradients}
There exists tolerances $\varepsilon_t>0$, $t\in\mathbb N\cup\{0\}$, such that
\begin{align*}
\left\| \mathbb{E} \left[ \bm g_t(\bm \phi_{t-1}) \big| \mathcal F_{t-1} \right] - \nabla h(\bm \phi_t) \right\| \leq \varepsilon_{t-1}\quad \forall t\in\mathbb N.
\end{align*}
\item
\textbf{Bounded gradients:}
\label{assumption:main:bounded}
There exists $R > 0$ such that
$$ \| \nabla h(\bm \phi) \| \leq R\quad \text{and} \quad \| \bm g_t(\bm \phi) \| \leq R \quad \forall \bm \phi \in \mathbb{R}^n,~ \forall t \in \mathbb N. $$
\item
\textbf{Generalized self-concordance:}
\label{assumption:main:concordance}
The function~$h$ is $M$-generalized self-concordant for some $M > 0$, that is, $h$ is three times differentiable, and for any $\bm \phi, \bm \phi' \in \mathbb{R}^n$ the function $u(s) = h(\bm \phi + s (\bm \phi' - \bm \phi))$ satisfies the inequality
$$ \left| \frac{\mathrm{d}^3 u(s)}{\mathrm{d} s^3} \right| \leq M \| \bm \phi - \bm \phi' \| \, \frac{\mathrm{d}^2 u(s)}{\mathrm{d} s^2} \quad \forall s \in \mathbb{R}.$$
\item
\textbf{Lipschitz continuous gradient:}
\label{assumption:main:smooth}
The function $h$ is $L$-smooth for some $L > 0$, that is, we have
$$ \| \nabla h(\bm \phi) - \nabla h(\bm \phi') \| \leq L \| \bm \phi - \bm \phi' \| \quad \forall \bm \phi, \bm \phi' \in \mathbb{R}^n. $$
\item
\textbf{Bounded second moments:}
\label{assumption:main:moment}
There exists $\sigma > 0$ such that
\begin{align*}
\mathbb{E} \left[\left\| \bm g_t(\bm \phi_{t-1}) - \nabla h(\bm \phi_{t-1}) \right\|^2 | \mathcal F_{t-1} \right] \leq \sigma^2 \quad \forall t \in \mathbb N.
\end{align*}
\end{enumerate}
\end{assumption}
The averaged gradient descent algorithm with biased gradient oracles lends itself to solving both deterministic as well as stochastic optimization problems. In deterministic optimization, the gradient oracles $\bm g_t$ are deterministic and output inexact gradients satisfying $\| \bm g_t(\bm \phi) - \nabla h(\bm \phi) \| \leq \varepsilon_t$ for all $\bm \phi\in \mathbb{R}^n$, where the tolerances $\varepsilon_t$ bound the errors associated with the numerical computation of the gradients. A vast body of literature on deterministic optimization focuses on exact gradient oracles for which these tolerances can be set to~$0$. Inexact deterministic gradient oracles with bounded error tolerances are investigated by \citet{nedic2001convergence} and \citet{d2008smooth}. In this case exact convergence to $\bm \phi^\star$ is not possible. If the error bounds decrease to~$0$, however, \citet{luo1993error, schmidt2011convergence} and \citet{friedlander2012hybrid} show that adaptive gradient descent algorithms are guaranteed to converge to $\bm \phi^\star$.
In stochastic optimization, the objective function is representable as $h(\bm \phi) = \mathbb{E} [H(\bm \phi, \bm x)]$, where the marginal distribution of the random vector $\bm x$ under $\mathbb P$ is given by~$\mu$, while the integrand $H(\bm \phi,\bm x)$ is convex and differentiable in~$\bm \phi$ and $\mu$-integrable in~$\bm x$. In this setting it is convenient to use gradient oracles of the form $\bm g_t(\bm \phi) = \nabla_{\bm \phi} H(\bm \phi, \bm x_t)$ for all $t \in \mathbb N$, where the samples $\bm x_t$ are drawn independently from~$\mu$. As these oracles output unbiased estimates for $\nabla h(\bm \phi)$, all tolerances $\varepsilon_t$ in Assumptions~\ref{assumption:main}\,(i) may be set to~$0$. SGD algorithms with unbiased gradient oracles date back to the seminal paper by~\citet{robbins1951stochastic}. Nowadays, averaged SGD algorithms with Polyak-Ruppert averaging figure among the most popular variants of the SGD algorithm~\citep{ruppert1988efficient, polyak1992acceleration, nemirovski2009robust}. For general convex objective functions the best possible convergence rate of any averaged SGD algorithm run over~$T$ iterations amounts to $\mathcal{O}(1 / \sqrt{T})$, but it improves to $\mathcal{O}(1 / T)$ if the objective function is strongly convex; see for example \citep{nesterov2008confidence, nemirovski2009robust, shalev2009stochastic, duchi2009efficient, xiao2010dual, moulines2011non, shalev2011pegasos, lacoste2012simpler}.
While smoothness plays a critical role to achieve acceleration in deterministic optimization, it only improves the constants in the convergence rate in stochastic optimization \citep{srebro2010optimistic, dekel2012optimal, lan2012optimal, cohen2018acceleration, kavis2019unixgrad}.
In fact, \citet{tsybakov2003optimal} demonstrates that smoothness does not provide any acceleration in general, that is, the best possible convergence rate of any averaged SGD algorithm can still not be improved beyond $\mathcal{O}(1 / \sqrt{T})$. Nevertheless, a substantial acceleration is possible when focusing on special problem classes such as linear or logistic regression problems \citep{bach2013adaptivity, bach2013non, hazan2014logistic}. In these special cases, the improvement in the convergence rate is facilitated by a generalized self-concordance property of the objective function~\citep{bach2010self}.
Self-concordance was originally introduced in the context of Newton-type interior point methods \citep{nesterov1994interior} and later generalized to facilitate the analysis of probabilistic models \citep{bach2010self} and second-order optimization algorithms \citep{sun2019generalized}.
In the following we analyze the convergence properties of the averaged SGD algorithm
when we have only access to an {\em inexact} stochastic gradient oracle, in which case the tolerances $\varepsilon_t$ cannot be set to~$0$. To our best knowledge, inexact stochastic gradient oracles have only been considered by~\citet{cohen2018acceleration, hu2020analysis} and \citet{ajalloeian2020analysis}. Specifically, \citet{hu2020analysis} use sequential semidefinite programs to analyze the convergence rate of the averaged SGD algorithm when~$\mu$ has a finite support. In contrast, we do not impose any restrictions on the support of~$\mu$. \citet{cohen2018acceleration} and \citet{ajalloeian2020analysis}, on the other hand, study the convergence behavior of accelerated gradient descent algorithms for smooth stochastic optimization problems under the assumption that~$\bm \phi$ ranges over a compact domain. The proposed algorithms necessitate a projection onto the compact feasible set in each iteration. In contrast, our convergence analysis does not rely on any compactness assumptions. We note that compactness assumptions have been critical for the convergence analysis of the averaged SGD algorithm in the context of convex stochastic optimization \citep{nemirovski2009robust, dekel2012optimal, bubeck2015convex, cohen2018acceleration}. By leveraging a trick due to \citet{bach2013adaptivity}, however, we can relax this assumption provided that the objective function is Lipschitz continuous.
\begin{proposition}
\label{proposition:moments}
Consider the inexact gradient descent algorithm~\eqref{eq:gd} with constant step size $\gamma > 0$. If Assumptions~\ref{assumption:main}\,\ref{assumption:main:gradients}--\ref{assumption:main:bounded} hold with $\varepsilon_t \leq {\bar \varepsilon}/{(2\sqrt{1+t})}$ for some $\bar \varepsilon \geq 0$, then we have for all $ p \in \mathbb N$ that
\begin{align*}
\mathbb{E} \left[ \left( h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \right)^p \right]^{1/p}
\leq \frac{\| \bm \phi_0 - \bm \phi^\star \|^2}{\gamma T} + 20 \gamma \left( R + \bar \varepsilon \right)^2 p.
\end{align*}
If additionally Assumption~\ref{assumption:main}\,\ref{assumption:main:concordance} holds and if $G = \max\{ M, R + \bar \varepsilon \}$, then we have for all $ p \in \mathbb N$ that
\begin{align*}
\mathbb{E} \left[ \left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|^{2p} \right]^{1/p}
&\leq \frac{G^{2}}{T} \left( 10 \sqrt{p} + \frac{4p}{\sqrt{T}} + 80 G^2 \gamma \sqrt{T} p + \frac{2 \| \bm \phi_0 - \bm \phi^\star \|^2}{\gamma \sqrt{T}} + \frac{3 \| \bm \phi_0 - \bm \phi^\star \|}{G \gamma \sqrt{T}} \right)^2.
\end{align*}
\end{proposition}
The proof of Proposition~\ref{proposition:moments} relies on two lemmas. In order to state these lemmas concisely, we define the $L_p$-norm, of a random variable $\bm z \in \mathbb{R}^n$ for any $p > 0$ through $\| \bm z \|_{L_p} = \left( \mathbb{E} \left[ \| \bm z \|^p \right] \right)^{1/p}$. For any random variables $\bm z, \bm z' \in \mathbb{R}^n$ and $p \geq 1$, Minkowski's inequality~\citep[\S~2.11]{boucheron2013concentration} then states that
\begin{equation}
\label{eq:minkowski}
\| \bm z + \bm z' \|_{L_p} \leq \| \bm z \|_{L_p} + \| \bm z' \|_{L_p}.
\end{equation}
Another essential tool for proving Proposition~\ref{proposition:moments} is the Burkholder-Rosenthal-Pinelis (BRP) inequality~\citep[Theorem~4.1]{pinelis1994optimum}, which we restate below without proof to keep this paper self-contained.
\begin{lemma}[BRP inequality]
\label{lemma:BRP}
Let $\bm z_t$ be an $\mathcal F_t$-measurable random variable for every $t\in\mathbb N$ and assume that $p \geq 2$. For any $t \in [T]$ with $\mathbb{E}[\bm z_t | \mathcal F_{t-1}] = 0 $ and $\| \bm z_t \|_{L_p}<\infty$ we then have
\begin{align*}
\left\| \max_{t \in [T]} \left\| \sum_{k=1}^t \bm z_k \right\| \right\|_{L_p}
\leq \sqrt{p} \left\| \sum_{t=1}^T \mathbb{E}[ \| \bm z_t \|^2 | \mathcal F_{t-1}] \right\|_{L_{p/2}}^{1/2} + p \left\| \max_{t \in [T]} \| \bm z_t \| \right\|_{L_p}.
\end{align*}
\end{lemma}
The following lemma reviews two useful properties of generalized self-concordant functions.
\begin{lemma} \label{lemma:concordance} [Generalized self-concordance]
Assume that the objective function
$h$ of the convex optimization problem~\eqref{eq:convex:problem} is $M$-generalized self-concordant in the sense of Assumption~\ref{assumption:main}\,\ref{assumption:main:concordance} for some $M>0$.
\begin{enumerate} [label=(\roman*)]
\item
\label{lemma:smoothness}
{\citep[Appendix~D.2]{bach2013adaptivity}} For any sequence $\bm \phi_0, \dots, \bm \phi_{T-1} \in \mathbb{R}^n$, we have
\begin{align*}
\left\| \nabla h \left( \frac{1}{T} \sum_{t=1}^T \bm \phi_{t-1} \right) - \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\| \leq 2 M \left( \frac{1}{T} \sum_{t=1}^T h(\bm \phi_{t-1}) - h(\bm \phi^\star) \right).
\end{align*}
\item
\label{lemma:stong:convexity}
{\citep[Lemma~9]{bach2013adaptivity}}
For any $\bm \phi \in \mathbb{R}^n$ with $ \| \nabla h(\bm \phi) \| \leq 3 \kappa / (4 M) $, where $\kappa$ is the smallest eigenvalue of $\nabla^2 h(\bm \phi^\star)$, and $\bm \phi^\star$ is the optimizer of~\eqref{eq:convex:problem}, we have
$ h(\bm \phi) - h(\bm \phi^\star) \leq 2 {\| \nabla h(\bm \phi) \|^2}/{\kappa}.$
\end{enumerate}
\end{lemma}
Armed with Lemmas~\ref{lemma:BRP} and~\ref{lemma:concordance}, we are now ready to prove Proposition~\ref{proposition:moments}.
\begin{proof}[Proof of Proposition~\ref{proposition:moments}]
The first claim generalizes Proposition~5 by~\citet{bach2013adaptivity} to inexact gradient oracles.
By the assumed convexity and differentiability of the objective function $h$, we have
\begin{align} \label{eq:lip:update}
h(\bm \phi_{k-1})
&\leq h(\bm \phi_{\star}) + \nabla h(\bm \phi_{k-1})^\top (\bm \phi_{k-1} - \bm \phi_{\star}) \\
&= h(\bm \phi_{\star}) + \bm g_k(\bm \phi_{k-1})^\top (\bm \phi_{k-1} - \bm \phi_{\star}) + \left( \nabla h(\bm \phi_{k-1}) - \bm g_k(\bm \phi_{k-1}) \right)^\top (\bm \phi_{k-1} - \bm \phi_{\star}). \notag
\end{align}
In addition, elementary algebra yields the recursion
\begin{equation*}
\| \bm \phi_{k} - \bm \phi^\star \|^2 = \| \bm \phi_{k} - \bm \phi_{k-1} \|^2 + \| \bm \phi_{k-1} - \bm \phi^\star \|^2 + 2 (\bm \phi_{k} - \bm \phi_{k-1})^\top (\bm \phi_{k-1} - \bm \phi^\star).
\end{equation*}
Thanks to the update rule~\eqref{eq:gd}, this recursion can be re-expressed as
\begin{equation*}
\bm g_k(\bm \phi_{k-1})^\top (\bm \phi_{k-1} - \bm \phi^\star) = \frac{1}{2 \gamma} \left( \gamma^2 \| \bm g_k(\bm \phi_{k-1}) \|^2 + \| \bm \phi_{k-1} - \bm \phi^\star \|^2 - \| \bm \phi_{k} - \bm \phi^\star \|^2 \right),
\end{equation*}
where $\gamma > 0$ is an arbitrary step size. Combining the above identity with~\eqref{eq:lip:update} then yields
\begin{align*}
& ~h(\bm \phi_{k-1}) \\
\leq & ~h(\bm \phi_{\star}) + \frac{1}{2 \gamma} \left( \gamma^2 \| \bm g_k(\bm \phi_{k-1}) \|^2 + \| \bm \phi_{k-1} - \bm \phi^\star \|^2 - \| \bm \phi_{k} - \bm \phi^\star \|^2 \right) + \left( \nabla h(\bm \phi_{k-1}) - \bm g_k(\bm \phi_{k-1}) \right)^\top \! (\bm \phi_{k-1} - \bm \phi_{\star}) \\
\leq & ~h(\bm \phi_{\star}) + \frac{1}{2 \gamma} \left( \gamma^2 R^2 + \| \bm \phi_{k-1} - \bm \phi^\star \|^2 - \| \bm \phi_{k} - \bm \phi^\star \|^2 \right) + \left( \nabla h(\bm \phi_{k-1}) - \bm g_k(\bm \phi_{k-1}) \right)^\top (\bm \phi_{k-1} - \bm \phi_{\star}),
\end{align*}
where the last inequality follows from Assumption~\ref{assumption:main}\,\ref{assumption:main:bounded}.
Summing this inequality over $k$ then shows that
\begin{align}
\label{eq:bound:A}
2 \gamma \sum_{k=1}^t \big( h ( \bm \phi_{k-1}) - h(\bm \phi_{\star}) \big) + \| \bm \phi_{t} - \bm \phi^\star \|^2 \leq A_t,
\end{align}
where
\begin{align*}
A_t = t \gamma^2 R^2 + \| \bm \phi_{0} - \bm \phi^\star \|^2 + \sum_{k=1}^t B_k \quad \text{and} \quad B_t = 2 \gamma \left( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right)^\top (\bm \phi_{t-1} - \bm \phi_{\star})
\end{align*}
for all $t \in\mathbb N$. Note that the term on the left hand side of~\eqref{eq:bound:A} is non-negative because $\bm \phi^\star$ is a global minimizer of $h$, which implies that the random variable $A_t$ is also non-negative for all $t\in\mathbb N$. For later use we further define $A_0 = \| \bm \phi_{0} - \bm \phi^\star \|^2$. The estimate~\eqref{eq:bound:A} for $t=T$ then implies via the convexity of $h$ that
\begin{align}
\label{eq:bound:A:convexity}
h \left( \frac{1}{T} \sum_{t=1}^T \bm \phi_{t-1} \right) - h(\bm \phi_{\star})
\leq \frac{A_T}{2 \gamma T },
\end{align}
where we dropped the non-negative term $\|\bm \phi_T-\bm \phi^\star\|^2/(2\gamma T)$ without invalidating the inequality. In the following we analyze the $L_p$-norm of $A_T$ in order to obtain the desired bounds from the proposition statement. To do so, we distinguish three different regimes for $p \in \mathbb N$, and we show that the $L_p$-norm of the non-negative random variable $A_T$ is upper bounded by an affine function of~$p$ in each of these regimes.
\textbf{Case I ($p \geq T / 4$):}
By using the update rule~\eqref{eq:gd} and Assumption~\ref{assumption:main}\,\ref{assumption:main:bounded}, one readily verifies that
\begin{align*}
\| \bm \phi_k - \bm \phi^\star \|
\leq \| \bm \phi_{k-1} - \bm \phi^\star \| + \| \bm \phi_k - \bm \phi_{k-1} \|
\leq \| \bm \phi_{k-1} - \bm \phi^\star \| + \gamma R.
\end{align*}
Iterating the above recursion $k$ times then yields the conservative estimate $\| \bm \phi_k - \bm \phi^\star \|\leq \| \bm \phi_{0} - \bm \phi^\star \| + k \gamma R$. By definitions of $A_t$ and $B_t$ for $t\in\mathbb N$, we thus have
\begin{align*}
A_t
&\textstyle
= t \gamma^2 R^2 + \| \bm \phi_{0} - \bm \phi^\star \|^2 + 2 \gamma \sum_{k=1}^t \left( \nabla h(\bm \phi_{k-1}) - \bm g_k(\bm \phi_{k-1}) \right)^\top (\bm \phi_{k-1} - \bm \phi_{\star}) \\
&\textstyle
\leq t \gamma^2 R^2 + \| \bm \phi_{0} - \bm \phi^\star \|^2 + 4 \gamma R \sum_{k=1}^t \| \bm \phi_{k-1} - \bm \phi_{\star} \| \\
&\textstyle
\leq t \gamma^2 R^2 + \| \bm \phi_{0} - \bm \phi^\star \|^2 + 4 \gamma R \sum_{k=1}^t \left( \| \bm \phi_{0} - \bm \phi^\star \| + (k-1) \gamma R \right) \\
&\leq t \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 4 t \gamma R \| \bm \phi_0 - \bm \phi^\star \| + 2 t^2 \gamma^2 R^2 \notag \\
&\leq t \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 4 t^2 \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 2 t^2 \gamma^2 R^2 \leq 7 t^2 \gamma^2 R^2 + 2 \| \bm \phi_0 - \bm \phi^\star \|^2,
\end{align*}
where the first two inequalities follow from Assumption~\ref{assumption:main}\,\ref{assumption:main:bounded} and the conservative estimate derived above, respectively, while the fourth inequality holds because $2 a b \leq a^2 + b^2$ for all $a,b\in\mathbb{R}$. As $A_t \geq 0$, the random variable $A_t$ is bounded and satisfies $| A_t| \leq 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 7 t^2 \gamma^2 R^2$ for all $t\in\mathbb N$, which implies that
\begin{align}
\label{eq:bound:A:T/4}
\| A_T \|_{L_p}
\leq 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 7 T^2 \gamma^2 R^2
&\leq 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 28 T \gamma^2 R^2 p,
\end{align}
where the last inequality holds because $p \geq T/4$. Note that the resulting upper bound is affine in~$p$.
\textbf{Case II $({2 \leq p \leq T/4})$:}
The subsequent analysis relies on the simple bounds
\begin{align}
\label{eq:bound:varepsilon}
\textstyle
\max_{t \in [T]} \varepsilon_{t-1} \leq \frac{\bar \varepsilon}{2} \quad \text{and} \quad \sum_{t=1}^T \varepsilon_{t-1} \leq \bar \varepsilon \sqrt{T},
\end{align}
which hold because $\varepsilon_t \leq \bar \varepsilon / (2 \sqrt{1+t})$ by assumption and because $\sum_{t=1}^T 1 / \sqrt{t} \leq 2 \sqrt{T}$, which can be proved by induction.
In addition, it proves useful to introduce the martingale differences $ \bar B_t = B_t - \mathbb{E}[B_t | \mathcal F_{t-1}]$ for all $t\in\mathbb N$. By the definition of $A_t$ and the subadditivity of the supremum operator, we then have
\begin{align*}
\max_{t \in [T+1]} A_{t-1}
&= \max_{t \in [T+1]} \left\{ (t-1) \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \sum_{k=1}^{t-1} \mathbb{E}[B_k | \mathcal F_{k-1}] + \sum_{k=1}^{t-1} \bar B_k \right\} \\
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \max_{t \in [T]} \sum_{k=1}^t \mathbb{E}[B_k | \mathcal F_{k-1}] + \max_{t \in [T]} \sum_{k=1}^t \bar B_k .
\end{align*}
As $p \geq 2$, Minkowski's inequality~\eqref{eq:minkowski} thus implies that
\begin{align}
\label{eq:bound:sup:A}
\left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_p}
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \left\| \max_{t \in [T]} \sum_{k=1}^t \mathbb{E}[B_k | \mathcal F_{k-1}] \right\|_{L_p} + \left\| \max_{t \in [T]} \sum_{k=1}^t \bar B_k \right\|_{L_p}.
\end{align}
In order to bound the penultimate term in~\eqref{eq:bound:sup:A}, we first note that
\begin{align}
\left| \mathbb{E}[B_k | \mathcal F_{k-1}] \right|
&= 2 \gamma \left| \mathbb{E} \left[ \left( \nabla h(\bm \phi_{k-1}) - \bm g_t(\bm \phi_{k-1}) \right) | \mathcal F_{k-1} \right]^\top (\bm \phi_{k-1} - \bm \phi_{\star}) \right| \notag \\
&\leq 2 \gamma \| \mathbb{E} \left[ \left( \nabla h(\bm \phi_{k-1}) - \bm g_k(\bm \phi_{k-1}) \right) | \mathcal F_{k-1} \right] \| \| \bm \phi_{k-1} - \bm \phi_{\star} \| \notag \\
&\leq 2 \gamma \varepsilon_{k-1} \| \bm \phi_{k-1} - \bm \phi_{\star} \|
\leq 2 \gamma \varepsilon_{k-1}\sqrt{ A_{k-1}} \label{eq:bound:B}
\end{align}
for all $k\in\mathbb N$, where the second inequality holds due to Assumption~\ref{assumption:main}\,\ref{assumption:main:gradients}, and the last inequality follows from \eqref{eq:bound:A}. This in turn implies that for all $t \in [T]$ we have
\begin{align*}
\left| \sum_{k=1}^t \mathbb{E}[B_k | \mathcal F_{k-1}] \right|
\leq 2 \gamma \sum_{k=1}^t \varepsilon_{k-1} \sqrt{A_{k-1}}
\leq 2 \gamma \left( \sum_{k=1}^t \varepsilon_{k-1} \right) \left( \max_{k \in [t]} \sqrt{A_{k-1}} \right)
\leq 2 \gamma \bar \varepsilon \sqrt{t} \max_{k \in [t]} \sqrt{A_{k-1}},
\end{align*}
where the last inequality exploits~\eqref{eq:bound:varepsilon}. Therefore, the penultimate term in~\eqref{eq:bound:sup:A} satisfies
\begin{align}
\label{eq:B_k:1}
\left\| \max_{t \in [T]} \sum_{k=1}^t \mathbb{E}[B_k | \mathcal F_{k-1}] \right\|_{L_p}
\leq 2 \gamma \bar \varepsilon \sqrt{T} \left\| \max_{t \in [T+1]} \sqrt{A_{t-1}} \right\|_{L_p}
= 2 \gamma \bar \varepsilon \sqrt{T} \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2},
\end{align}
where the equality follows from the definition of the $L_p$-norm.
Next, we bound the last term in~\eqref{eq:bound:sup:A} by using the BRP inequality of Lemma~\ref{lemma:BRP}. To this end, note~that
\begin{align*}
|\bar B_t |
& \leq | B_t | + | \mathbb{E}[B_t | \mathcal F_{t-1}] | \\
&\leq 2 \gamma \| \bm \phi_{t-1} - \bm \phi_{\star} \| \| \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \| + 2 \gamma \varepsilon_{t-1} \sqrt{A_{t-1}} \\
&\leq 2 \gamma \sqrt{A_{t-1}} \left( \| \nabla h(\bm \phi_{t-1}) \| + \| \bm g_t(\bm \phi_{t-1}) \| \right) + 2 \gamma \varepsilon_{t-1} \sqrt{A_{t-1}}
\leq 2 \gamma (2R + \varepsilon_{t-1}) \sqrt{A_{t-1}}
\end{align*}
for all $t\in\mathbb N$, where the second inequality exploits the definition of~$B_t$ and~\eqref{eq:bound:B}, the third inequality follows from~\eqref{eq:bound:A}, and the last inequality holds because of Assumption~\ref{assumption:main}\,\ref{assumption:main:bounded}. Hence, we obtain
\begin{align*}
\textstyle
\left\| \max_{t \in [T]} | \bar B_t | \right\|_{L_p}
\leq 2 \gamma \left( 2 R + \max_{t \in [T]} \varepsilon_{t-1} \right) \left\| \max_{t \in [T]} \sqrt{A_{t-1}} \right\|_{L_p}
\leq ( 4 \gamma R + \gamma \bar \varepsilon) \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2},
\end{align*}
where the second inequality follows from~\eqref{eq:bound:varepsilon} and the definition of the $L_p$-norm. In addition, we have
\begin{align*}
\left\| \sum_{t=1}^T \mathbb{E}[ \bar B_t^2 | \mathcal F_{t-1}] \right\|_{L_{p/2}}^{1/2}
= \left\| \sqrt{\sum_{t=1}^T \mathbb{E}[ \bar B_t^2 | \mathcal F_{t-1}]} \right\|_{L_p}
&\leq 2 \gamma \left\| \sqrt{ \sum_{t=1}^T (2R + \varepsilon_{t-1})^2 A_{t-1} } \right\|_{L_p} \\
&\leq 2 \gamma \left( \sum_{t=1}^T (2R + \varepsilon_{t-1})^2 \right)^{1/2}
\left\| \max_{t \in [T+1]} A_{t-1}^{1/2} \right\|_{L_p} \\
&\leq 2 \gamma \left( 2 R \sqrt{T} + \sqrt{\sum_{t=1}^T \varepsilon_{t-1}^2} \right)
\left\| \max_{t \in [T+1]} A_{t-1}^{1/2} \right\|_{L_p} \\
&\leq \left( 4 \gamma R \sqrt{T} + \gamma \bar \varepsilon \sqrt{T} \right) \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2},
\end{align*}
where the first inequality exploits the upper bound on $|\bar B_t|$ derived above, which implies that
$\mathbb{E}[ \bar B_t ^2 | \mathcal F_{t-1}] \leq 4 \gamma^2 (2R + \varepsilon_{t-1})^2 A_{t-1}$. The last three inequalities follow from the H\"{o}lder inequality, the triangle inequality for the Euclidean norm and the two inequalities in~\eqref{eq:bound:varepsilon}, respectively. Recalling that $p \geq 2$, we may then apply the BRP inequality of Lemma~\ref{lemma:BRP} to the martingale differences $\bar B_t$, $t\in[T]$, and use the bounds derived in the last two display equations in order to conclude that
\begin{align}
\label{eq:BRP-application}
\left\| \max_{t \in [T]} \left| \sum_{k=1}^t \bar B_k \right| \right\|_{L_p}
&\leq \left( 4 \gamma R \sqrt{pT} + \gamma \bar \varepsilon \sqrt{pT} + \gamma \bar \varepsilon p + 4 \gamma R p \right) \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2}.
\end{align}
Substituting~\eqref{eq:B_k:1} and~\eqref{eq:BRP-application} into~\eqref{eq:bound:sup:A}, we thus obtain
\begin{align*}
\left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_p}
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \left( 4 \gamma R \left( \sqrt{pT} + p \right) + \gamma \bar \varepsilon \left( \sqrt{pT} + p +2 \sqrt{T} \right) \right) \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2} \\
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 \gamma \left( R + \bar \varepsilon \right) \sqrt{pT} \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_{p/2}}^{1/2},
\end{align*}
where the second inequality holds because $p \leq T/4$ by assumption, which implies that $\sqrt{pT} + p \leq 1.5 \sqrt{pT} $ and $ \sqrt{pT} + p + 2 \sqrt{T} \leq 6 \sqrt{pT}$. As Jensen's inequality ensures that $\| \bm z \|_{L_{p/2}} \leq \| \bm z \|_{L_p}$ for any random variable~$\bm z$ and $p > 0$, the following inequality holds for all $2 \leq p \leq T/4$.
\begin{align*}
\left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_p}
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 \gamma \left( R + \bar \varepsilon \right) \sqrt{pT} \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_p}^{1/2}
\end{align*}
To complete the proof of Case~II, we note that for any numbers $a, b, c \geq 0$ the inequality $c \leq a + 2b \sqrt{c} $ is equivalent to $\sqrt{c} \leq b + \sqrt{b^2+a}$ and therefore also to $c \leq (b + \sqrt{b^2+a})^2 \leq 4b^2 + 2a$. Identifying $a$ with $T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2$, $b$ with $3\gamma \left( R + \bar \varepsilon \right) \sqrt{pT}$ and $c$ with $\| \max_{t \in [T+1]} A_{t-1}\|_{L_p}$ then allows us to translate the inequality in the last display equation to
\begin{align}
\label{eq:bound:Lp:A}
\left\| A_{T} \right\|_{L_p}
\leq \left\| \max_{t \in [T+1]} A_{t-1} \right\|_{L_p}
&\leq 2 T \gamma^2 R^2 + 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 36 \gamma^2 \left( R + \bar \varepsilon \right)^2 p T.
\end{align}
Thus, for any $2 \leq p \leq T/4$, we have again found an upper bound on $\| A_{T}\|_{L_p}$ that is affine in $p$.
\textbf{Case III $({p = 1})$:} Recalling the definition of $A_T\ge 0$, we find that
\begin{align*}
\| A_T \|_{L_{1}} = \mathbb{E} [A_T]
&= T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \mathbb{E} \left[ \, \sum_{t=1}^T \mathbb{E} [B_t | \mathcal F_{t-1}] \right] \\
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + \left\| \max_{t \in [T]} \sum_{k=1}^t \mathbb{E}[B_k | \mathcal F_{k-1}] \right\|_{L_1} \\
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 2 \gamma \bar \varepsilon \sqrt{T} \left\| \max_{t \in [T+1]} A_{t-1} \right\|^{1/2}_{L_{1/2}} \\
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 2 \gamma \bar \varepsilon \sqrt{T} \left\| \max_{t \in [T+1]} A_{t-1} \right\|^{1/2}_{L_{2}},
\end{align*}
where the second inequality follows from the estimate~\eqref{eq:B_k:1}, which holds indeed for all~$p\in\mathbb N$, while the last inequality follows from Jensen's inequality. By the second inequality in~\eqref{eq:bound:Lp:A} for $p=2$, we thus find
\begin{subequations}
\label{eq:bound:E:A}
\begin{align}
\label{eq:bound:E:A1}
\| A_T \|_{L_{1}}
&\leq T \gamma^2 R^2 + \| \bm \phi_0 - \bm \phi^\star \|^2 + 2 \bar \varepsilon \gamma \sqrt{T} \cdot \sqrt{2 T \gamma^2 R^2 + 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 72 \gamma^2 (R + \bar \varepsilon)^2 T} \\
&\leq 2 T \gamma^2 R^2 + 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 36 \gamma^2 (R + \bar \varepsilon)^2 T + 2 \bar \varepsilon^2 \gamma^2 T ,
\label{eq:bound:E:A2}
\end{align}
\end{subequations}
where the last inequality holds because $2ab \leq 2a^2 + b^2/ 2$ for all $a,b\in\mathbb{R}$.
We now combine the bounds derived in Cases~I, II and~III to obtain a universal bound on $\left\| A_{T} \right\|_{L_p}$ that holds for all $p\in\mathbb N$. Specifically, one readily verifies that the bound
\begin{align}
\label{eq:universal-bound}
\left\| A_{T} \right\|_{L_p}
&\leq 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 40 \gamma^2 \left( R + \bar \varepsilon \right)^2 p T,
\end{align}
is more conservative than each of the bounds~\eqref{eq:bound:A:T/4}, \eqref{eq:bound:Lp:A} and \eqref{eq:bound:E:A}, and thus it holds indeed for any $p \in \mathbb N$. Combining this universal bound with~\eqref{eq:bound:A:convexity} proves the first inequality from the proposition statement.
In order to prove the second inequality, we need to extend \citep[Proposition~7]{bach2013adaptivity} to biased gradient oracles. To this end, we first note that
\begin{align*}
\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|
&\leq \left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\|
+ \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\| \\
&\leq 2 M \left( \frac{1}{T} \sum_{t=1}^T h(\bm \phi_{t-1}) - h(\bm \phi^\star) \right) + \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\| \\
&\leq \frac{M}{T \gamma} A_T + \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\|,
\end{align*}
where the second inequality follows from Lemma~\ref{lemma:concordance}\,\ref{lemma:smoothness}, and the third inequality holds due to~\eqref{eq:bound:A}. By Minkowski's inequality \eqref{eq:minkowski}, we thus have for any $p \geq 1$ that
\begin{align*}
\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|_{L_{2p}}
&\leq \frac{M}{T \gamma} \| A_T \|_{L_{2p}} + \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\|_{L_{2p}} \\
&\leq \frac{2 M}{T \gamma} \| \bm \phi_0 - \bm \phi^\star \|^2 + 80 M \gamma \left( R + \bar \varepsilon \right)^2 p + \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\|_{L_{2p}},
\end{align*}
where the last inequality follows from the universal bound~\eqref{eq:universal-bound}. In order to estimate the last term in the above expression, we recall that the update rule~\eqref{eq:gd} is equivalent to $\bm g_t(\bm \phi_{t-1}) = \left( \bm \phi_{t-1} - \bm \phi_{t} \right) / \gamma ,$ which in turn implies that $\sum_{t=1}^T \bm g_t(\bm \phi_{t-1}) = \left( \bm \phi_0 - \bm \phi_T \right) / \gamma.$ Hence, for any $p \geq 1$, we have
\begin{align*}
\left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) \right\|_{L_{2p}}
&= \left\| \frac{1}{T} \sum_{t=1}^T \Big( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \Big) + \frac{\bm \phi_0 - \bm \phi^\star}{T \gamma} + \frac{\bm \phi^\star - \bm \phi_T}{T \gamma} \right\|_{L_{2p}} \\
&\leq \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right\|_{L_{2p}} + \frac{1}{T \gamma} \left\| \bm \phi_0 - \bm \phi^\star \right\| + \frac{1}{T \gamma} \left\| \bm \phi^\star - \bm \phi_T \right\|_{L_{2p}} \\
&\leq \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right\|_{L_{2p}} + \frac{1}{T \gamma} \left\| \bm \phi_0 - \bm \phi^\star \right\| + \frac{1}{T \gamma} \left\| A_T \right\|_{L_{p}}^{1/2} \\
&\leq \left\| \frac{1}{T} \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right\|_{L_{2p}} + \frac{1 + \sqrt{2}}{T \gamma} \left\| \bm \phi_0 - \bm \phi^\star \right\| + \frac{2 \sqrt{10} \left( R + \bar \varepsilon \right) \sqrt{p}}{\sqrt{T}},
\end{align*}
where the first inequality exploits Minkowski's inequality~\eqref{eq:minkowski}, the second inequality follows from~\eqref{eq:bound:A}, which implies that $\| \bm \phi^\star - \bm \phi_T \| \leq \sqrt{A_T}$, and the definition of the $L_p$-norm. The last inequality in the above expression is a direct consequence of the universal bound~\eqref{eq:universal-bound} and the inequality $ \sqrt{a+b} \leq \sqrt{a} + \sqrt{b}$ for all $a,b\ge 0$. Next, define for any $t\in\mathbb N$ a martingale difference of the form
$$\bm C_t = \frac{1}{T} \Big( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) - \mathbb{E}[\nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) | \mathcal F_{t-1}] \Big).$$
Note that these martingale differences are bounded because
\begin{align*}
\| \bm C_t \|
&\leq \frac{1}{T} \Big( \| \nabla h(\bm \phi_{t-1}) \| + \| \bm g_t(\bm \phi_{t-1}) \| + \| \mathbb{E}[\nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) | \mathcal F_{t-1}] \| \Big) \leq \frac{2R + \varepsilon_{t-1}}{T} \leq \frac{2R + \bar \varepsilon}{T},
\end{align*}
and thus the BRP inequality of Lemma~\ref{lemma:BRP} implies that
\begin{align*}
\left\| \sum_{t=1}^T \bm C_t \right\|_{L_{2p}} \leq \sqrt{2p} \, \frac{2R + \bar \varepsilon}{\sqrt{T}} + 2p \, \frac{2R + \bar \varepsilon}{T}.
\end{align*}
Recalling the definition of the martingale differences $\bm C_t$, $t\in\mathbb N$, this bound allows us to conclude that
\begin{align*}
\frac{1}{T} \left\| \sum_{t=1}^T \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right\|_{L_{2p}}
&\leq \left\| \sum_{t=1}^T \bm C_t \right\|_{L_{2p}} + \frac{1}{T} \left\| \sum_{t=1}^T \mathbb{E}[\nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) | \mathcal F_{t-1}] \right\|_{L_{2p}} \\
&\leq \sqrt{2p} \, \frac{2R + \bar \varepsilon}{\sqrt{T}} + 2p \, \frac{2R + \bar \varepsilon}{T} + \frac{\bar \varepsilon}{\sqrt{T}}
\leq 2 \sqrt{2p} \, \frac{R + \bar \varepsilon}{\sqrt{T}} + 4p \, \frac{R + \bar \varepsilon}{T},
\end{align*}
where the second inequality exploits Assumption~\ref{assumption:main}\,\ref{assumption:main:gradients} as well as the second inequality in~\eqref{eq:bound:varepsilon}.
Combining all inequalities derived above and observing that $2\sqrt{2} + 2 \sqrt{10} < 10 $ finally yields
\begin{align*}
\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|_{L_{2p}}
&\leq \frac{2 M}{T \gamma} \| \bm \phi_0 - \bm \phi^\star \|^2 + 80 M \gamma \left( R + \bar \varepsilon \right)^2 p + 2 \sqrt{2p} \, \frac{R + \bar \varepsilon}{\sqrt{T}} + 4p \, \frac{R + \bar \varepsilon}{T} \\
&\qquad + \frac{1 + \sqrt{2}}{T \gamma} \left\| \bm \phi_0 - \bm \phi^\star \right\| + \frac{2 \sqrt{10} \left( R + \bar \varepsilon \right) \sqrt{p}}{\sqrt{T}} \\
&\leq \frac{G}{\sqrt{T}} \left( 10 \sqrt{p} + \frac{4p}{\sqrt{T}} + 80 G^2 \gamma \sqrt{T} p + \frac{2}{\gamma \sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{3}{G \gamma \sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \| \right),
\end{align*}
where $G = \max\{ M, R + \bar \varepsilon \}$. This proves the second inequality from the proposition statement.
\end{proof}
The following corollary follows immediately from the proof of Proposition~\ref{proposition:moments}.
\begin{corollary}
\label{corollary:auxiliary}
Consider the inexact gradient descent algorithm~\eqref{eq:gd} with constant step size $\gamma > 0$. If Assumptions~\ref{assumption:main}\,\ref{assumption:main:gradients}--\ref{assumption:main:bounded} hold with $\varepsilon_t \leq {\bar \varepsilon}/{(2\sqrt{1+t})}$ for some $\bar \varepsilon \geq 0$, then we have
\begin{align*}
\frac{1}{T} \sum_{t=1}^T \mathbb E \left[ \left( \nabla h(\bm \phi_{t}) - \bm g_t(\bm \phi_{t}) \right)^\top (\bm \phi_{t} - \bm \phi_{\star}) \right]
\leq \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 74 \gamma^2 (R + \bar \varepsilon)^2 T}.
\end{align*}
\end{corollary}
\begin{proof}[Proof of Corollary~\ref{corollary:auxiliary}]
Defining $B_t$ as in the proof of Proposition~\ref{proposition:moments}, we find
\begin{align*}
\frac{1}{T} \sum_{t=1}^T \mathbb E \left[ \left( \nabla h(\bm \phi_{t}) - \bm g_t(\bm \phi_{t}) \right)^\top (\bm \phi_{t} - \bm \phi_{\star}) \right]
&=
\frac{1}{2 \gamma T} \mathbb{E} \left[ \sum_{t=1}^T \mathbb{E} [B_t | \mathcal F_{t-1}] \right] \\
&\leq \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 T \gamma^2 R^2 + 2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 72 \gamma^2 (R + \bar \varepsilon)^2 T},
\end{align*}
where the inequality is an immediate consequence of the reasoning in Case~(III) in the proof of Proposition~\ref{proposition:moments}. The claim then follows from the trivial inequality $R+ \bar \varepsilon \geq R$.
\end{proof}
Armed with Proposition~\ref{proposition:moments} and Corollary~\ref{corollary:auxiliary}, we are now ready to prove the main convergence result.
\begin{theorem} \label{theorem:convergence}
Consider the inexact gradient descent algorithm~\eqref{eq:gd} with constant step size $\gamma > 0$. If Assumptions~\ref{assumption:main}\,\ref{assumption:main:gradients}--\ref{assumption:main:bounded} hold with $\varepsilon_t \leq {\bar \varepsilon}/{(2\sqrt{1+t})}$ for some $\bar \varepsilon \geq 0$, then the following statements hold.
\begin{enumerate} [label=(\roman*)]
\item \label{theorem:convergence:Lipschitz}
If $\gamma = 1 / (2 (R + \bar \varepsilon)^2 \sqrt{T})$, then we have
\begin{align*}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right] - h(\bm \phi^\star)
&\leq \frac{(R + \bar \varepsilon)^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{1}{4\sqrt{T}} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{37}{2(R + \bar \varepsilon)^2}} .
\end{align*}
\item \label{theorem:convergence:smooth}
If $\gamma = 1 / (2 (R + \bar \varepsilon)^2 \sqrt{T} + L)$ and the Assumptions~\ref{assumption:main}\,\ref{assumption:main:smooth}--\ref{assumption:main:moment} hold in addition to the blanket assumptions mentioned above, then we have
\begin{align*}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t} \right) \right] - h(\bm \phi^\star)
&\leq \frac{L}{2T}\| \bm \phi_0 - \bm \phi^\star \|^2 +
\frac{(R + \bar \varepsilon)^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{\sigma^2}{4 (R+\bar \varepsilon)^2\sqrt{T}} \\
&\qquad+ \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{37}{2(R + \bar \varepsilon)^2}}.
\end{align*}
\item \label{theorem:convergence:concordance}
If $\gamma = 1 / (2 G^2 \sqrt{T})$ with $G = \max \{M, R + \bar \varepsilon \}$, the smallest eigenvalue $\kappa$ of $\nabla^2 h(\bm \phi^\star)$ is strictly positive and Assumption~\ref{assumption:main}\,\ref{assumption:main:concordance} holds in addition to the blanket assumptions mentioned above, then we have
\begin{align*}
\mathbb E \left[ h\left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1}\right) \right] - h(\bm \phi^\star)
&\leq \frac{G^2}{\kappa T} \left( 4 G \| \bm \phi_0 - \bm \phi^\star \| + 20 \right)^4.
\end{align*}
\end{enumerate}
\end{theorem}
The proof of Theorem~\ref{theorem:convergence} relies on the following concentration inequalities due to \citet{bach2013adaptivity}.
\begin{lemma} \label{lemma:probability101} [Concentration inequalities]~
\begin{enumerate} [label=(\roman*)]
\item
\label{lemma:sub-exponential1}
{\citep[Lemma~11]{bach2013adaptivity}:}
If there exist $a,b>0$ and a random variable $\bm z \in \mathbb{R}^n$ with $ \| \bm z \|_{L_p} \leq a + b p $ for all $p \in \mathbb N$, then we have
$$ \mathbb P \left[ \| \bm z \| \geq 3 b s + 2 a \right] \leq 2 \exp(-s)\quad \forall s \geq 0. $$
\item
\label{lemma:sub-exponential2}
{\citep[Lemma~12]{bach2013adaptivity}:}
If there exist $a,b,c>0$ and a random variable $\bm z \in \mathbb{R}^n$ with $ \| \bm z \|_{L_p} \leq (a \sqrt{p} + b p + c)^2 $ for all $p \in [T]$, then we have
$$ \mathbb P \left[ \| \bm z \| \geq (2 a \sqrt{s} + 2 b s + 2 c)^2 \right] \leq 4 \exp(-s)\quad \forall s \leq T. $$
\end{enumerate}
\end{lemma}
\begin{proof} [Proof of Theorem~\ref{theorem:convergence}]
Define $A_t$ as in the proof of Proposition~\ref{proposition:moments}. Then, we have
\begin{align}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=0}^{T-1} \bm \phi_{t} \right) - h(\bm \phi^\star) \right]
&\leq \frac{\mathbb E[A_T]}{2 \gamma T}
= \frac{\| \bm \phi_0 - \bm \phi^\star \|^2}{2 \gamma T} + \frac{\gamma R^2}{2} + \frac{1}{T} \sum_{t=1}^T \mathbb E \left[ \left( \nabla h(\bm \phi_{t}) - \bm g_t(\bm \phi_{t}) \right)^\top (\bm \phi_{t} - \bm \phi_{\star}) \right] \notag \\
&\leq \frac{\| \bm \phi_0 - \bm \phi^\star \|^2}{2 \gamma T} + \frac{\gamma R^2}{2} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 74 \gamma^2 (R + \bar \varepsilon)^2 T}, \label{eq:main:convergence}
\end{align}
where the two inequalities follow from~\eqref{eq:bound:A:convexity} and from Corollary~\ref{corollary:auxiliary}, respectively.
Setting the step size to $\gamma = 1 / ( 2 (R+ \bar \varepsilon)^2 \sqrt{T} )$ then completes the proof of assertion~\ref{theorem:convergence:Lipschitz}.
Assertion~\ref{theorem:convergence:smooth} generalizes \citep[Theorem~1]{dekel2012optimal}.
By the $L$-smoothness of $h(\bm \phi)$, we have
\begin{align}
h(\bm \phi_{t})
&\leq h(\bm \phi_{t-1}) + \nabla h(\bm \phi_{t-1})^\top (\bm \phi_{t} - \bm \phi_{t-1}) + \frac{L}{2}\|\bm \phi_{t} - \bm \phi_{t-1}\|^2 \notag \\
&= h(\bm \phi_{t-1}) + \bm g_t(\bm \phi_{t-1})^\top (\bm \phi_{t} - \bm \phi_{t-1}) + \bm \left( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right)^\top (\bm \phi_{t} - \bm \phi_{t-1}) + \frac{L}{2}\|\bm \phi_{t} - \bm \phi_{t-1}\|^2 \notag \\
&\leq h(\bm \phi_{t-1}) + \bm g_t(\bm \phi_{t-1})^\top (\bm \phi_{t} - \bm \phi_{t-1}) + \frac{\zeta}{2}\| \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \|^2 + \frac{L + 1/\zeta}{2}\|\bm \phi_{t} - \bm \phi_{t-1}\|^2, \label{eq:smooth:update}
\end{align}
where the last inequality exploits the Cauchy-Schwarz inequality together with the elementary inequality $2ab \leq \zeta a^2 + b^2 / \zeta$, which holds for all $a,b\in\mathbb{R}$ and $\zeta > 0$.
Next, note that the iterates satisfy the recursion
\begin{equation*}
\| \bm \phi_{t-1} - \bm \phi^\star \|^2 = \| \bm \phi_{t-1} - \bm \phi_{t} \|^2 + \| \bm \phi_{t} - \bm \phi^\star \|^2 + 2 (\bm \phi_{t-1} - \bm \phi_{t})^\top (\bm \phi_{t} - \bm \phi^\star),
\end{equation*}
which can be re-expressed as
\begin{equation*}
\bm g_t(\bm \phi_{t-1})^\top (\bm \phi_{t} - \bm \phi^\star) = \frac{1}{2 \gamma} \left( \| \bm \phi_{t-1} - \bm \phi^\star \|^2 - \| \bm \phi_{t-1} - \bm \phi_{t} \|^2 - \| \bm \phi_{t} - \bm \phi^\star \|^2 \right)
\end{equation*}
by using the update rule~\eqref{eq:gd}. In the remainder of the proof we assume that $0 < \gamma < 1 / L$. Substituting the above equality into~\eqref{eq:smooth:update} and setting~$\zeta = \gamma / (1 - \gamma L)$ then~yields
\begin{align*}
h(\bm \phi_{t})
&\leq h(\bm \phi_{t-1}) + \bm g_t(\bm \phi_{t-1})^\top (\bm \phi^\star - \bm \phi_{t-1}) + \frac{\gamma}{2(1 - \gamma L)} \| \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \|^2 \\
& \qquad + \frac{1}{2 \gamma} \left( \| \bm \phi_{t-1} - \bm \phi^\star \|^2 - \| \bm \phi_{t} - \bm \phi^\star \|^2 \right).
\end{align*}
By the convexity of $h$, we have $h(\bm \phi^\star) \geq h(\bm \phi_{t-1}) + \nabla h(\bm \phi_{t-1})^\top (\bm \phi^\star - \bm \phi_{t-1})$, which finally implies that
\begin{align*}
h(\bm \phi_{t})
&\leq h(\bm \phi^\star) + \left( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right)^\top ( \bm \phi_{t-1} - \bm \phi^\star) + \frac{\gamma}{2(1 - \gamma L)} \| \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \|^2 \\
& \qquad + \frac{1}{2\gamma} \left( \| \bm \phi_{t-1} - \bm \phi^\star \|^2 - \| \bm \phi_{t} - \bm \phi^\star \|^2 \right).
\end{align*}
Averaging the above inequality over $t$ and taking expectations then yields the estimate
\begin{align*}
\mathbb E \left[ \frac{1}{T} \sum_{t=1}^T h(\bm \phi_{t}) \right] - h(\bm \phi^\star)
&\leq \frac{\| \bm \phi_0 - \bm \phi^\star \|^2}{2\gamma T} + \frac{\gamma}{2 (1 - \gamma L)} \mathbb E \left[ \frac{1}{T} \sum_{t=1}^T \| \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \|^2 \right] \\
&\qquad + \mathbb E \left[ \frac{1}{T} \sum_{t=1}^T \left( \nabla h(\bm \phi_{t-1}) - \bm g_t(\bm \phi_{t-1}) \right)^\top (\bm \phi_{t-1} - \bm \phi_{\star}) \right] \\
&\leq \frac{\| \bm \phi_0 - \bm \phi^\star \|^2}{2\gamma T} + \frac{\gamma \sigma^2}{2 (1 - \gamma L)} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 74 \gamma^2 (R + \bar \varepsilon)^2 T},
\end{align*}
where the second inequality exloits Assumption~\ref{assumption:main}\,\ref{assumption:main:moment} and Corollary~\ref{corollary:auxiliary}. Using Jensen's inequality to move the average over $t$ inside~$h$, assertion~\ref{theorem:convergence:smooth} then follows by setting $\gamma = 1 / (2 (R + \bar \varepsilon)^2 \sqrt{T} + L)$ and observing that $\gamma / ( 1 - \gamma L) = 1 / ( 2(R+\bar \varepsilon)^2 \sqrt{T} )$.
To prove assertion~\ref{theorem:convergence:concordance}, we distinguish two different cases.
\textbf{Case~I:} Assume first that $4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \leq {\kappa \sqrt{T}}/{(8 G^2)}$, where~$G = \max \{M, R + \bar \varepsilon \}$ and $\kappa$ denotes the smallest eigenvalue of $\nabla^2 h(\bm \phi^\star)$. By a standard formula for the expected value of a non-negative random variable, we find
\begin{align}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \right] \nonumber
&= \phantom{+} \int_{0}^\infty \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u \\
&= \phantom{+} \int_{0}^{u_1} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u \nonumber\\
&\quad + \int_{u_1}^{u_2} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u \label{eq:three-integrals}\\
&\quad + \int_{u_2}^{\infty} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u, \nonumber
\end{align}
where $u_1 = \frac{8 G^2}{\kappa T}(4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \|)^2$ and $u_2 = \frac{8 G^2}{\kappa T}(\frac{\kappa \sqrt{T}}{4 G^2} + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \|)^2$.
The first of the three integrals in~\eqref{eq:three-integrals} is trivially upper bounded by~$u_1$.
Next, we investigate the third integral in~\eqref{eq:three-integrals}, which is easier to bound from above than the second one. By combining the first inequality in Proposition~\ref{proposition:moments} for $\gamma = 1 / (2 G^2 \sqrt{T})$ with the trivial inequality $G \geq R + \bar \varepsilon$, we find
\[
\left\| h\left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \right\|_{L_p} \leq \frac{2G^2}{\sqrt{T}}\,\|\bm \phi_0-\bm \phi^\star\|^2 + \frac{10}{\sqrt{T}} \,p\quad \forall p\in\mathbb N.
\]
Lemma~\ref{lemma:probability101}\,\ref{lemma:sub-exponential1} with $a = 2 G^2 \| \bm \phi_0 -\bm \phi^\star \|^2 / \sqrt{T}$ and $b = 10 / \sqrt{T}$ thus implies that
\begin{align}
\label{eq:large:deviation}
\mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq \frac{30}{\sqrt{T}} s + \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 \right] \leq 2 \exp(-s) \quad \forall s \geq 0.
\end{align}
We also have
\begin{align}
\label{eq:upper:bound:for:u_2}
u_2 - \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2
\geq u_2 - \frac{\kappa}{8 G^2} \geq \frac{8 G^2}{\kappa T} \left( \frac{\kappa \sqrt{T}}{4 G^2} \right)^2 - \frac{\kappa}{8 G^2} = \frac{3 \kappa}{8 G^2} \geq 0,
\end{align}
where the first inequality follows from the basic assumption underlying Case~I, while the second inequality holds due to the definition of $u_2$.
By~\eqref{eq:large:deviation} and~\eqref{eq:upper:bound:for:u_2}, the third integral in~\eqref{eq:three-integrals} satisfies
\begin{align*}
&\int_{u_2}^{\infty} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u \\
=\;& \int_{u_2 - \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2}^{\infty} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u + \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 \right] \mathrm{d} u \\
\leq\; & 2 \int_{u_2 - \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2}^\infty \exp \left( -\frac{\sqrt{T} u}{30} \right) \mathrm{d} u= \frac{60}{\sqrt{T}} \exp \left( -\frac{\sqrt{T}}{30} \left( u_2 - \frac{4 G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 \right) \right) \\
\leq\; & \frac{60}{\sqrt{T}} \exp \left( -\frac{\kappa \sqrt{T}}{80 G^2} \right) \leq \frac{2400 G^2}{\kappa T},
\end{align*}
where the first inequality follows from the concentration inequality~\eqref{eq:large:deviation} and the insight from~\eqref{eq:upper:bound:for:u_2} that $u_2 - \frac{4 G^2}{\sqrt{T}}\| \bm \phi_0 - \bm \phi^\star \|^2 \geq 0$. The second inequality exploits again~\eqref{eq:upper:bound:for:u_2}, and the last inequality holds because $\exp(-x) \leq 1 / (2x)$ for all $ x > 0$. We have thus found a simple upper bound on the third integral in~\eqref{eq:three-integrals}. It remains to derive an upper bound on the second integral in~\eqref{eq:three-integrals}. To this end, we first observe that the second inequality in Proposition~\ref{proposition:moments} for $\gamma = 1 / (2 G^2 \sqrt{T})$ translates to
\[
\left\| \left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|^2 \right\|_{L_p} \leq \frac{G^{2}}{T} \left( 10 \sqrt{p} + \frac{4p}{\sqrt{T}} + 40 p + 4G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6G \| \bm \phi_0 - \bm \phi^\star \| \right)^2 \quad \forall p\in\mathbb N.
\]
Lemma~\ref{lemma:probability101}\,\ref{lemma:sub-exponential2} with $a = 10 G / \sqrt{T}$, $b = 4 G / T + 40 G / \sqrt{T}$ and $c = 4 G^3 \| \bm \phi_0 - \bm \phi^\star \|^2 / \sqrt{T} + 6 G^2 \| \bm \phi_0 - \bm \phi^\star \|/\sqrt{T}$ thus gives rise to the concentration inequality
\begin{align*}
\mathbb P \left[ \;\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \!\right) \right\|^2
\!\!\!\geq\! \frac{4G^2}{T} \left( 10 \sqrt{s} + \frac{4s}{\sqrt{T}} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right)^2 \right] \leq 4 \exp(-s),
\end{align*}
which holds only for small deviations~$s\leq T$. However, this concentration inequality can be simplified to
\begin{align*}
\mathbb P \left[ \;\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|
\geq \frac{2G}{\sqrt{T}} \left( 12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right) \right] \leq 4 \exp(-s),
\end{align*}
which remains valid for all deviations~$ s\ge 0$. To see this, note that if $ s \leq T/4 $, then the simplified concentration inequality holds because $ 4 s / T \leq 2 \sqrt{s / T}$. Otherwise, if $ s > T/4 $, then the simplified concentration inequality holds trivially because the probability on the left hand vanishes. Indeed, this is an immediate consequence of Assumption~\ref{assumption:main}\,\ref{assumption:main:bounded}, which stipulates that the norm of the gradient of $h$ is bounded by $R$, and of the elementary estimate~$24 G \sqrt{s / T} > G\geq R$, which holds for all $s > T / 4$.
In the following, we restrict attention to those deviations $s\ge 0$ that are small in the sense that
\begin{align}
\label{eq:condition:s}
\displaystyle 12 \sqrt{s} + 40 s \leq \frac{ \kappa \sqrt{T}}{4G^2}.
\end{align}
Assume now for the sake of argument that the event inside the probability in the simplified concentration inequality does {\em not} occur, that is, assume that
\begin{align}
\label{eq:inverse-event}
\left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|
< \frac{2G}{\sqrt{T}} \left( 12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right).
\end{align}
By~\eqref{eq:condition:s} and the assumption of Case~I, \eqref{eq:inverse-event} implies that $\| \nabla h ( \frac{1}{T}\sum_{t=1}^T \bm \phi_{t-1} ) \| < 3 \kappa / (4G) < 3 \kappa / (4M)$. Hence, we may apply Lemma~\ref{lemma:concordance}\,\ref{lemma:stong:convexity} to conclude that $h ( \frac{1}{T}\sum_{t=1}^T \bm \phi_{t-1} ) - h(\bm \phi^\star) \leq \frac{2}{\kappa} \| \nabla h ( \frac{1}{T} \sum_{t=1}^T \bm \phi_{t-1} ) \|^2$. Combining this inequality with~\eqref{eq:inverse-event} then yields
\begin{align}
\label{eq:inverse-event-implication}
h \left( \frac{1}{T}\sum_{t=1}^T \bm \phi_{t-1} \right) - h(\bm \phi^\star) < \frac{8G^2}{\kappa T} \left( 12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right)^2.
\end{align}
By the simplified concentration inequality derived above, we may thus conclude that
\begin{align}
\nonumber
4 \exp(-s) \geq \; &\mathbb P \left[ \; \left\| \nabla h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right\|
\geq \frac{2G}{\sqrt{T}} \left( 12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right) \right] \\
\geq \; & \mathbb P \left[ \; h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq \frac{8G^2}{\kappa T} \left( 12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| \right)^2 \right]
\label{eq:small:deviation}
\end{align}
for any $s\ge 0$ that satisfies~\eqref{eq:condition:s}, where the second inequality holds because~\eqref{eq:inverse-event} implies~\eqref{eq:inverse-event-implication} or, equivalently, because the negation of~\eqref{eq:inverse-event-implication} implies the negation of~\eqref{eq:inverse-event}. The resulting concentration inequality~\eqref{eq:small:deviation} now enables us to construct an upper bound on the second integral in~\eqref{eq:three-integrals}. To this end, we define the function
$$ \ell(s) = \frac{8 G^2}{\kappa T} \left(12 \sqrt{s} + 40 s + 4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \|\right)^2 $$
for all $s\ge 0$, and set $\bar s = ((9/400 + \kappa \sqrt{T} / (160 G^2))^{\frac{1}{2}} - 3 / 20)^{2}$. Note that $s\ge 0$ satisfies the inequality~\eqref{eq:condition:s} if and only if $s\le\bar s$ and that $\ell(0) = u_1$ as well as $\ell(\bar s) = u_2$. By substituting $u$ with $ \ell(s)$ and using the concentration inequality~\eqref{eq:small:deviation} to bound the integrand, we find that the second integral in~\eqref{eq:three-integrals} satisfies
\begin{align*}
\int_{u_1}^{u_2} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq u \right] \mathrm{d} u
&= \int_{0}^{\bar s} \mathbb P \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \geq \ell(s) \right] \frac{\mathrm{d} \ell(s)}{\mathrm{d} s} \mathrm{d} s \\
&\leq \int_{0}^{\bar s} 4 \mathrm{e}^{-s} \; \frac{\mathrm{d}}{\mathrm{d} s} \! \left( \frac{8 G^2}{\kappa T} \left(12 \sqrt{s} + 40 s + \tau \right)^2 \right) \mathrm{d} s \\
&\leq \frac{32 G^2}{\kappa T} \int_{0}^{\infty} \mathrm{e}^{-s} \left( 144 + 3200 s + 1440 s^{1/2} + 80 \tau + 12 \tau s^{-1/2} \right) \mathrm{d} s \\
&= \frac{32 G^2}{\kappa T} \big( 144 + 3200 \Gamma(2) + 1440 \Gamma(3/2) + 80 \tau + 12 \tau \Gamma(1/2) \big) \\
&\leq \frac{32 G^2}{\kappa T} ( 4621 + 102 \tau ),
\end{align*}
where $\tau$ is is a shorthand for $4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| $, and $\Gamma$ denotes the Gamma function with $\Gamma(2) = 1$, $\Gamma(1/2) = \sqrt{\pi}$ and $\Gamma(3/2) = \sqrt{\pi}/2$; see for example~\citep[Chapter~8]{rudin1964principles}. The last inequality is obtained by rounding all fractional numbers up to the next higher integer. Combining the upper bounds for the three integrals in~\eqref{eq:three-integrals} finally yields
\begin{align*}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) - h(\bm \phi^\star) \right]
&\leq \frac{8 G^2}{\kappa T} \left( \tau^2 + 18484 + 408 \tau + 300 \right) \\
&= \frac{8 G^2}{\kappa T} \Big( 16 G^4 \| \bm \phi_0 - \bm \phi^\star \|^4 + 48 G^3 \| \bm \phi_0 - \bm \phi^\star \|^3 + 1668 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 \\
&\hspace{4em} + 2448 G \| \bm \phi_0 - \bm \phi^\star \| + 18784 \Big) \\
&\leq \frac{G^2}{\kappa T} (4 G \| \bm \phi_0 - \bm \phi^\star \| + 20)^4.
\end{align*}
This complete the proof of assertion~\ref{theorem:convergence:concordance} in Case~I.
\textbf{Case II:} Assume now that $4 G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 6 G \| \bm \phi_0 - \bm \phi^\star \| > {\kappa \sqrt{T}}/{(8 G^2)}$, where $G$ is defined as before.
Since $h$ has bounded gradients, the inequality~\eqref{eq:main:convergence} remains valid. Setting the step size to $\gamma = 1 / (2 G^2 \sqrt{T})$ and using the trivial inequalities $G \geq R + \bar \varepsilon \geq R$, we thus obtain
\begin{align*}
\mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right] - h(\bm \phi^\star)
&\leq \frac{G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{1}{4\sqrt{T}} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{37}{2G^2}} \\
&\leq \frac{G^2}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \|^2 + \frac{2G}{\sqrt{T}} \| \bm \phi_0 - \bm \phi^\star \| + \frac{5}{\sqrt{T}} ,
\end{align*}
where the second inequality holds because $G \geq \bar \varepsilon$ and $\sqrt{a + b} \leq \sqrt{a} + \sqrt{b}$ for all $a,b\ge 0$.
Multiplying the right hand side of the last inequality by $G^2 (32 G^2 \| \bm \phi_0^\star - \bm \phi^\star \|^2 + 48 G \| \bm \phi_0^\star - \bm \phi^\star \|) / (\kappa \sqrt{T})$, which is strictly larger than~$1$ by the basic assumption underlying Case~II, we then find
\begin{align*}
& \phantom{\leq} \mathbb{E} \left[ h \left(\frac{1}{T} \sum_{t=1}^{T} \bm \phi_{t-1} \right) \right] - h(\bm \phi^\star) \\
&\leq \frac{G^2}{\kappa T}
\left( G^2 \| \bm \phi_0 - \bm \phi^\star \|^2 + 2 G \| \bm \phi_0 - \bm \phi^\star \| + 5 \right) \left( 32 G^2 \| \bm \phi_0^\star - \bm \phi^\star \|^2 +
48 G \| \bm \phi_0^\star - \bm \phi^\star \| \right) \\
&\leq \frac{G^2}{\kappa T} (4 G \| \bm \phi_0 - \bm \phi^\star \| + 20)^4.
\end{align*}
This observation completes the proof.
\end{proof}
\subsection{Smooth Optimal Transport Problems with Marginal Ambiguity Sets}
\label{section:ASGD-OT}
The smooth optimal transport problem \eqref{eq:smooth_ot} can be viewed as an instance of a stochastic optimization problem, that is, a convex maximization problem akin to~\eqref{eq:convex:problem}, where the objective function is representable as $h(\bm \phi) = \mathbb{E}_{\boldsymbol x \sim \mu} [ \boldsymbol \nu^\top \boldsymbol \phi - \overline\psi_c(\boldsymbol \phi, \boldsymbol x)]$. Throughout this section we assume that the smooth (discrete) $c$-transform~$\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ defined in~\eqref{eq:smooth_c_transform} is induced by a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set} with continuous marginal distribution functions. By Proposition~\ref{proposition:regularized_ctrans}, the integrand $\boldsymbol \nu^\top \boldsymbol \phi - \overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ is therefore concave and differentiable in~$\bm \phi$. We also assume that $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ is $\mu$-integrable in~$\bm x$, that we have access to an oracle that generates independent samples from~$\mu$ and that problem~\eqref{eq:smooth_ot} is solvable.
The following proposition establishes several useful properties of the smooth $c$-transform.
\begin{proposition}[Properties of the smooth $c$-transform]
\label{proposition:structural}
If $\Theta$ is a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set} with cumulative distribution functions $F_i$, $i\in[N]$, then $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ has the following properties for all $\boldsymbol x \in \mathcal X$.
\begin{enumerate} [label=(\roman*)]
\item \textbf{Bounded gradient:} \label{proposition:gradient} If $F_i$, $i\in[N]$, are continuous, then we have $ \| \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) \| \leq 1 $ for all $\boldsymbol \phi\in\mathbb{R}^N$.
\item \textbf{Lipschitz continuous gradient:} \label{proposition:smooth} If $F_i$, $i\in[N]$, are Lipschitz continuous with Lipschitz constant~$L>0$, then $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ is $L$-smooth with respect to $\boldsymbol \phi$ in the sense of Assumption~\ref{assumption:main}\,\ref{assumption:main:smooth}.
\item \textbf{Generalized self-concordance:} \label{proposition:concordance} If $F_i$, $i\in[N]$, are twice differentiable on the interiors of their respective supports and if there is $M > 0$ with
\begin{equation}
\label{eq:cumulative:concoradance}
\sup_{s \in F_i^{-1}(0,1)} ~ \frac{|\mathrm{d}^2F_i(s) / \mathrm{d} s^2|}{\mathrm{d} F_i(s) / \mathrm{d} s} \leq M,
\end{equation}
then $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ is $M$-generalized self-concordant with respect to $\boldsymbol \phi$ in the sense of Assumption~\ref{assumption:main}\,\ref{assumption:main:concordance}.
\end{enumerate}
\end{proposition}
\begin{proof}
As for~\ref{proposition:gradient}, Proposition~\ref{proposition:regularized_ctrans} implies that $\nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) \in \Delta^N$, and thus we have $\| \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) \| \leq 1$. As for~\ref{proposition:smooth}, note that the convex conjugate of the smooth $c$-transform with respect to $\boldsymbol \phi$ is given by
\begin{align*}
\overline\psi{}_c^*(\boldsymbol p, \boldsymbol x) &= \sup_{\boldsymbol \phi \in \mathbb{R}^N} \boldsymbol p^\top \boldsymbol \phi - \overline\psi(\boldsymbol \phi, \boldsymbol x) = \sup_{\boldsymbol \phi \in \mathbb{R}^N} \inf_{\boldsymbol q \in \Delta^N} ~ \sum_{i=1}^N p_i \phi_i - (\phi_i - c(\boldsymbol x, \boldsymbol {y_i})) q_i - \int_{1-q_i}^1 F_i^{-1}(t)\mathrm{d} t \\
&= \inf_{\boldsymbol q \in \Delta^N} \sup_{\boldsymbol \phi \in \mathbb{R}^N} ~ \sum_{i=1}^N p_i \phi_i - (\phi_i - c(\boldsymbol x, \boldsymbol {y_i})) q_i - \int_{1-q_i}^1 F_i^{-1}(t)\mathrm{d} t \\
&= \begin{cases}
\;\displaystyle \sum\limits_{i=1}^N c(\boldsymbol x, \boldsymbol {y_i}) p_i - \int_{1-p_i}^1 F_i^{-1}(t)\mathrm{d} t & \text{if } \boldsymbol p \in \Delta^N \\
\;+\infty & \text{otherwise,}
\end{cases}
\end{align*}
where the second equality follows again from Proposition~\ref{proposition:regularized_ctrans}, and the interchange of the infimum and the supremum is allowed by Sion's classical minimax theorem.
In the following we first prove that $\overline\psi{}_c^*(\boldsymbol p, \boldsymbol x)$ is $1/L$-strongly convex in $\boldsymbol p$, that is, the function $\overline\psi{}_c^*(\boldsymbol p, \boldsymbol x) - \| \boldsymbol p\|^2/ (2L)$ is convex in $\boldsymbol p$ for any fixed $\boldsymbol x \in \mathcal X$.
To this end, recall that $F_i$ is assumed to be Lipschitz continuous with Lipschitz constant $L$. Thus, we have
\begin{align*}
L\ge \sup_{\substack{s_1,s_2 \in \mathbb{R}\\ s_1 \neq s_2}}\frac{\left| F_i (s_1) - F_i(s_2)\right|}{|s_1 - s_2|}
= \sup_{\substack{s_1, s_2 \in \mathbb{R}\\ s_1 > s_2}}\frac{ F_i (s_1) - F_i(s_2)}{s_1 - s_2}
\geq \sup_{\substack{p_i, q_i \in (0,1)\\ p_i > q_i}} \frac{p_i - q_i}{F_i^{-1}(p_i) - F_i^{-1}(q_i)},
\end{align*}
where the second inequality follows from restricting $s_1$ and $s_2$ to the preimage of $(0,1)$ with respect to~$F_i$.
Rearranging terms in the above inequality then yields
\begin{align*}
-F_i^{-1}(1 - q_i) - q_i/L &\leq -F_i^{-1}(1-p_i)-p_i/L
\end{align*}
for all $p_i, q_i \in (0, 1)$ with $q_i < p_i$. Consequently, the function $- F_i^{-1}(1-p_i) - {p_i}/L$ is non-decreasing and its primitive $- \int_{1-p_i}^1 F_i^{-1}(t)\mathrm{d} t - p_i^2/(2 L)$ is convex in $p_i$ on the interval $(0,1)$. This implies that
$$ \overline\psi{}_c^*(\boldsymbol p, \boldsymbol x) - \frac{\| \boldsymbol p\|_2^2}{2 L} = \sum_{i=1}^N c(\boldsymbol x, \boldsymbol {y_i}) p_i - \int_{1-p_i}^1 F_i^{-1}(t)\mathrm{d} t - \frac{p_i^2}{2 L}$$
constitutes a sum of convex univariate functions for every fixed $\boldsymbol x\in \mathcal{X}$. Thus, $\overline\psi{}_c^*(\boldsymbol p, \boldsymbol x)$ is $1/L$-strongly convex in $\boldsymbol p$. By \citep[Theorem~6]{kakade2009duality}, however, any convex function whose conjugate is $1/L$-strongly convex is guaranteed to be $L$-smooth. This observation completes the proof of assertion~\ref{proposition:smooth}. As for assertion~\ref{proposition:concordance}, choose any $\boldsymbol \phi, \boldsymbol \varphi \in \mathbb{R}^N$ and $\boldsymbol x \in \mathcal X$, and introduce the auxiliary function
\begin{equation}
\label{eq:u:function}
u(s) = \overline \psi_c \left(\boldsymbol \phi + s (\boldsymbol \varphi - \boldsymbol \phi), \boldsymbol x \right) = \max_{ \boldsymbol p \in \Delta^N} \displaystyle \sum\limits_{i=1}^N ~ (\phi_i + s (\varphi_i - \phi_i) - c(\boldsymbol x, \boldsymbol {y_i}))p_i + \int_{1-p_i}^1 F_i^{-1}(t) \mathrm{d} t.
\end{equation}
For ease of exposition, in the remainder of the proof we use prime symbols to designate derivatives of univariate functions. A direct calculation then yields
\begin{align*}
u'(s) = \left( \boldsymbol \varphi - \boldsymbol \phi \right)^\top \nabla_{\boldsymbol \phi} \overline \psi \left(\boldsymbol \phi + s (\boldsymbol \varphi - \boldsymbol \phi), \boldsymbol x \right) \quad \text{and} \quad u''(s) = \left( \boldsymbol \varphi - \boldsymbol \phi \right)^\top \nabla_{\boldsymbol \phi}^2 \overline \psi \left(\boldsymbol \phi + s (\boldsymbol \varphi - \boldsymbol \phi), \boldsymbol x \right) \left( \boldsymbol \varphi - \boldsymbol \phi \right).
\end{align*}
By Proposition~\ref{proposition:regularized_ctrans}, $\boldsymbol p^\star(s)=\nabla_{\boldsymbol \phi} \overline \psi_c \left(\boldsymbol \phi + s (\boldsymbol \varphi - \boldsymbol \phi), \boldsymbol x \right)$ represents the unique solution of the maximization problem in~\eqref{eq:u:function}. In addition, by~\citep[Proposition~6]{sun2019generalized}, the Hessian of the smooth $c$-transform with respect to $\boldsymbol \phi$ can be computed from the Hessian of its convex conjugate as follows.
$$ \nabla_{\boldsymbol \phi}^2 \overline \psi_c \left(\boldsymbol \phi + s (\boldsymbol \varphi - \boldsymbol \phi), \boldsymbol x \right) = \left( \nabla^2_{\boldsymbol p} \overline \psi{}_c^*(\boldsymbol p^\star(s), \boldsymbol x) \right)^{-1} = \mathrm{diag} \left( [F_1'(F_1^{-1}(1 - p_1^\star(s))), \dots, F_N'(F_N^{-1}(1 - p_N^\star(s))) ] \right)$$
Hence, the first two derivatives of the auxiliary function $u(s)$ simplify to
$$ u'(s) = \sum_{i=1}^N (\varphi_i- \phi_i) p^\star_i(s) \quad \text{and} \quad u''(s) = \sum_{i=1}^N (\varphi_i- \phi_i)^2 F_i'(F_i^{-1}(1 - p_i^\star(s))).$$
Similarly, the above formula for the Hessian of the smooth $c$-transform can be used to show that $(p_i^\star)'(s) = (\varphi_i- \phi_i) F_i'(F_i^{-1}(1 - p_i^\star(s)))$ for all $i \in [N]$. The third derivative of $u(s)$ therefore simplifies to
\begin{align*}
u'''(s) = - \sum_{i=1}^N (\varphi_i- \phi_i)^2 \,\frac{ F_i''(F_i^{-1}(1 - p_i^\star(s)))}{F_i'(F_i^{-1}(1 - p_i^\star(s)))}\, (p_i^\star)'(s) = - \sum_{i=1}^N (\varphi_i- \phi_i)^3 F_i''(F_i^{-1}(1 - p_i^\star(s))).
\end{align*}
This implies via H\"{o}lder's inequality that
\begin{align*}
| u'''(s) |
&= \left| \sum_{i=1}^N (\varphi_i- \phi_i)^2\, F_i'(F_i^{-1}(1 - p_i^\star(s))) \, \frac{F_i''(F_i^{-1}(1 - p_i^\star(s)))}{F_i'(F_i^{-1}(1 - p_i^\star(s)))} \, (\varphi_i- \phi_i) \right| \\
&\leq \left( \sum_{i=1}^N (\varphi_i- \phi_i)^2\, F_i'(F_i^{-1}(1 - p_i^\star(s))) \right) \left( \max_{i \in [N]} \left| \frac{F_i''(F_i^{-1}(1 - p_i^\star(s)))}{F_i'(F_i^{-1}(1 - p_i^\star(s)))} \, (\varphi_i- \phi_i) \right| \right).
\end{align*}
Notice that the first term in the above expression coincides with $u''(s)$, and the second term satisfies
\begin{align*}
\max_{i \in [N]} \left| \frac{F_i''(F_i^{-1}(1 - p_i^\star(s)))}{F_i'(F_i^{-1}(1 - p_i^\star(s)))} \, (\varphi_i- \phi_i) \right|
\leq \max_{i \in [N]} \left| \frac{F_i''(F_i^{-1}(1 - p_i^\star(s)))}{F_i'(F_i^{-1}(1 - p_i^\star(s)))} \right| \, \| \boldsymbol \varphi - \boldsymbol \phi \|_\infty \leq M \| \boldsymbol \varphi \boldsymbol - \boldsymbol \phi \|,
\end{align*}
where the first inequality holds because $\max_{i \in [N]} |a_i b_i| \leq \| \boldsymbol a \|_{\infty} \| \boldsymbol b \|_\infty $ for all $\boldsymbol a, \boldsymbol b \in \mathbb R^N$, and the second inequality follows from the definition of $M$ and the fact that the 2-norm provides an upper bound on the $\infty$-norm. Combining the above results shows that $|u'''(s)|\leq M \| \boldsymbol \varphi \boldsymbol - \boldsymbol \phi \| u''(s)$ for all $s\in\mathbb{R}$. The claim now follows because $\boldsymbol \phi, \boldsymbol \varphi \in \mathbb{R}^N$ and $\boldsymbol x \in \mathcal X$ were chosen arbitrarily.
\end{proof}
\begin{table}[!b]
\centering
\begin{minipage}{0.375\textwidth}
\vspace{-1em}
\begin{algorithm}[H]
\caption{\label{algorithm:asgd}Averaged SGD \protect\phantom{$\nabla_{\boldsymbol \phi} \overline\psi$}}
\begin{algorithmic}[1]
\Require $\gamma, T, \bar \varepsilon$
\vspace{0.05em}
\State Set $\boldsymbol \phi_0 \gets \boldsymbol 0$
\For{$t = 1, 2,\dots, T$}
\State \hspace{-1ex}Sample $\boldsymbol {x_t}$ from $\mu$
\State \hspace{-1ex}Choose $\varepsilon_{t-1} \in (0, \bar \varepsilon / (2 \sqrt{t})]$
\State \hspace{-1ex}Set $ \boldsymbol p \gets \text{Bisection}(\boldsymbol {x_t}, \boldsymbol \phi_{t-1}, \varepsilon_{t-1})$
\State \hspace{-1ex}Set $\boldsymbol \phi_t \leftarrow \boldsymbol \phi_{t-1} + \gamma (\boldsymbol \nu - \boldsymbol p)$
\EndFor
\vspace{0.05em}
\Ensure $\ubar{\boldsymbol \phi}_T = \frac{1}{T}\sum_{t=1}^T \boldsymbol \phi_{t-1}$~ and \phantom{abcd} \phantom{abcd}\hspace{0.85ex} $\bar{\boldsymbol \phi}_T = \frac{1}{T}\sum_{t=1}^T \boldsymbol \phi_{t}$
\end{algorithmic}
\end{algorithm}
\vspace{-1em}
\end{minipage}
\begin{minipage}{0.6175\textwidth}
\vspace{-1em}
\begin{algorithm}[H] \caption{\label{algorithm:bisection}Bisection method to approximate $\nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x)$}
\begin{algorithmic}[1]
\Require $\boldsymbol x, \boldsymbol \phi, \varepsilon$ \vspace{0.1em}
\State Set $\overline{\tau} \gets \max_{i \in [N]} ~ \{c(\boldsymbol x,\boldsymbol {y_i}) - \phi_i - F_i^{-1}(1-1/N) \}$
\State Set $\underline{\tau} \gets \min_{i \in [N]} ~ \{c(\boldsymbol x,\boldsymbol {y_i}) - \phi_i - F_i^{-1}(1-1/N) \}$
\State Evaluate $\delta(\varepsilon)$ as defined in~\eqref{eq:delta(eps)}
\For{$k = 1, 2,\dots, \lceil \log_2 ((\overline{\tau} - \underline{\tau}) / \delta(\varepsilon)) \rceil$}
\State \hspace{-1ex}Set $\tau \gets {(\overline{\tau} + \underline{\tau})}/{2}$
\State \hspace{-1ex}Set $p_i \gets 1-F_i(c(\boldsymbol x,\boldsymbol {y_i}) -\phi_i -\tau)$ for $i \in [N]$
\State \hspace{-1ex}\algorithmicif~~$\sum_{i \in [N]} p_i > 1$~~\algorithmicthen~~$\overline{\tau} \gets \tau$~~\algorithmicelse~~$\underline{\tau} \gets \tau$
\EndFor \vspace{0.1em}
\Ensure $\boldsymbol p $ with $p_i = 1-F_i(c(\boldsymbol x,\boldsymbol {y_i}) -\phi_i -\underline \tau)$, $i\in[N]$
\end{algorithmic}
\end{algorithm}
\vspace{-1em}
\end{minipage}
\end{table}
In the following we use the averaged SGD algorithm of Section~\ref{section:AGD} to solve the smooth optimal transport problem~\eqref{eq:smooth_ot}. A detailed description of this algorithm in pseudocode is provided in Algorithm~\ref{algorithm:asgd}. This algorithm repeatedly calls a sub-routine for estimating the gradient of $\overline\psi_c(\boldsymbol \phi, \boldsymbol x)$ with respect to $\bm \phi$. By Proposition~\ref{proposition:regularized_ctrans}, this gradient coincides with the unique solution~$\boldsymbol p^\star$ of the convex maximization problem~\eqref{eq:regularized_c_transform}. In addition, from the proof of Proposition~\ref{proposition:regularized_ctrans} it is clear that its components are given by
\begin{align*}
p^\star_i = \theta^\star \left[ i = \min \argmax_{j \in [N]} \phi_j - c(\boldsymbol x, \boldsymbol y_j) + z_j \right] \quad \forall i \in [N],
\end{align*}
where $\theta^\star$ represents an optimizer of the semi-parametric discrete choice problem~\eqref{eq:smooth_c_transform}. Therefore, $\boldsymbol p^\star$ can be interpreted as a vector of choice probabilities under the best-case probability measure~$\theta^\star$. Sometimes these choice probabilities are available in closed form. This is the case, for instance, in the exponential distribution model of Example~\ref{ex:exp}, which is equivalent to the generalized extreme value distribution model of Section~\ref{sec:gevm}. Indeed, in this case $\boldsymbol p^\star$ is given by a softmax of the utility values $\phi_i - c(\boldsymbol x, \boldsymbol {y_i})$, $i\in[N]$, {\em i.e.},
\begin{equation}\label{eq:softmax}
p_i^\star= \frac{\eta_i \exp\left(({\phi_i - c(\boldsymbol x, \boldsymbol {y_i}) )}/{\lambda}\right)}{\sum_{j=1}^N \eta_j \exp\left(({\phi_j - c(\boldsymbol x,\boldsymbol {y_j}) })/{\lambda} \right)} \quad \forall i \in [N].
\end{equation}
Note that these particular choice probabilities are routinely studied in the celebrated multinomial logit choice model~\citep[\S~5.1]{ben1985discrete}.
The choice probabilities are also available in closed form in the uniform distribution model of Example~\ref{ex:uniform}. As the derivation of $\boldsymbol p^\star$ is somewhat cumbersome in this case, we relegate it to Appendix~\ref{appendix:spmax}.
For general marginal ambiguity sets with continuous marginal distribution functions, we propose a bisection method to compute the gradient of the smooth $c$-transform numerically up to any prescribed accuracy; see Algorithm~\ref{algorithm:bisection}.
\begin{theorem}[Biased gradient oracle]
\label{theorem:bisection}
If $\Theta$ is a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set} and the cumulative distribution function $F_i$ is continuous for every $i\in[N]$, then, for any $\boldsymbol x \in \mathcal X$, $\boldsymbol \phi \in \mathbb{R}^N$ and $\varepsilon > 0$, Algorithm~\ref{algorithm:bisection} outputs $\boldsymbol p \in \mathbb{R}^N $ with $\| \boldsymbol p \| \leq 1$ and $\| \nabla_{\boldsymbol \phi} \overline\psi(\boldsymbol \phi, \boldsymbol x) - {\boldsymbol p} \| \leq \varepsilon$.
\end{theorem}
\begin{proof}
Thanks to Proposition~\ref{proposition:regularized_ctrans}, we can recast the smooth $c$-transform in dual form as
\begin{equation*}
\overline \psi_c(\boldsymbol \phi, \boldsymbol x) =
\min_{\substack{\boldsymbol \zeta \in \mathbb{R}_+^N \\ \tau \in \mathbb{R}}}\;\sup_{\boldsymbol p \in \mathbb{R}^N} ~ \sum\limits_{i=1}^N (\phi_i - c(\boldsymbol {x},\boldsymbol {y_i}))p_i +\sum\limits_{i=1}^N \int^1_{1- p_i} F_i^{-1}(t)\mathrm{d} t + \tau \left(\sum\limits_{i=1}^N p_i - 1 \right)+ \sum\limits_{i=1}^N \zeta_i p_i.
\end{equation*}
Strong duality and dual solvability hold because we may construct a Slater point for the primal problem by setting $p_i=1/N$, $i\in[N]$. By the Karush-Kuhn-Tucker optimality conditions, $\boldsymbol p^\star$ and $(\tau^\star,\boldsymbol \zeta^\star)$ are therefore optimal in the primal and dual problems, respectively, if and only if we have
\begin{align*}
\begin{array}{lll}
\sum_{i=1}^N p^\star_i =1, ~p^\star_i \geq 0 & \forall i \in [N] & \text{(primal feasibility)}\\
\zeta^\star_i\geq 0 & \forall i \in [N] & \text{(dual feasibility)}\\ \zeta_i^\star p_i^\star=0 & \forall i \in [N] & \text{(complementary slackness)} \\
\phi_i-c(\boldsymbol {x},\boldsymbol {y_i}) + F_i^{-1}(1-p^\star_i) + \tau^\star + \zeta^\star_i = 0 & \forall i \in [N] & \text{(stationarity)}.
\end{array}
\end{align*}
If $p_i^\star > 0$, then the complementary slackness and stationarity conditions imply that $\zeta_i^\star = 0$ and that $\phi_i-c(\boldsymbol {x},\boldsymbol {y_i}) + F_i^{-1}(1-p^\star_i) + \tau^\star = 0$, respectively.
Thus, we have $p_i^\star = 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau^\star)$.
If $p_i^\star = 0$, on the other hand, then similar arguments show that $\zeta_i^\star \geq 0$ and $\phi_i-c(\boldsymbol {x},\boldsymbol {y_i}) + F_i^{-1}(1) + \tau^\star \leq 0$. These two inequalities are equivalent to $1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau^\star) \leq 0$. As all values of~$F_i$ are smaller or equal to~$1$, the last equality must in in fact hold as an equality. Combining the insights gained so far thus yields $p_i^\star = 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau^\star)$, which holds for all~$i\in[N]$ irrespective of the sign of $p_i^\star$. Primal feasibility therefore ensures that $\sum_{i=1}^N 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau^\star) = 1$. Finding the unique optimizer $\boldsymbol p^\star$ of~\eqref{eq:regularized_c_transform} ({\em i.e.}, finding the gradient of $ \overline \psi_c(\boldsymbol \phi, \boldsymbol x)$) is therefore tantamount to finding a root $\tau^\star$ of the univariate equation
\begin{align}
\label{eq:root-finding}
\sum_{i=1}^N 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau) = 1.
\end{align}
Note the function on the left hand side of~\eqref{eq:root-finding} is continuous and non-decreasing in $\tau$ because of the continuity (by assumption) and monotonicity (by definition) of the cumulative distribution functions $F_i$, $i\in[N]$.
Hence, the root finding problem can be solved efficiently via bisection.
To complete the proof, we first show that the interval between the constants $\underline{\tau}$ and $\overline{\tau}$ defined in Algorithm~\ref{algorithm:bisection} is guaranteed to contain~$\tau^\star$. Specifically, we will demonstrate that evaluating the function on the left hand side of~\eqref{eq:root-finding} at $\underline\tau$ or $\overline \tau$ yields a number that is not larger or not smaller than~1, respectively.
For $\tau=\underline\tau$ we have
\begin{align*}
1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\underline\tau) &= 1 - F_i \left( c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i - \min_{j \in [N]} \left\{ c \left( \boldsymbol {x}, \boldsymbol {y_j} \right) - \phi_j -F_j^{-1}(1-1/N) \right\} \right) \\
&\leq 1 - F_i \left( F_i^{-1}(1-1/N) \right) = 1 / N\qquad \forall i\in[N],
\end{align*}
where the inequality follows from the monotonicity of $F_i$. Summing the above inequality over all $i\in[N]$ then yields the desired inequality $\sum_{i =1}^N 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\underline\tau) \leq 1$. Similarly, for $\tau=\overline\tau$ we have
\begin{align*}
1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\overline\tau) &= 1 - F_i \left( c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i - \max_{j \in [N]} \left\{ c \left( \boldsymbol {x}, \boldsymbol {y_j} \right) - \phi_j -F_j^{-1}(1-1/N) \right\} \right) \\
&\geq 1 - F_i \left( F_i^{-1}(1-1/N) \right) = 1/N \qquad \forall i\in[N].
\end{align*}
We may thus conclude that $\sum_{i =1}^N 1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\overline\tau) \geq 1$. Therefore, $[\underline \tau, \overline \tau]$ constitutes a valid initial search interval for the bisection algorithm.
Note that the function $1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau)$, which defines $p_i$ in terms of $\tau$, is uniformly continuous in~$\tau$ throughout~$\mathbb R$. This follows from \citep[Problem~14.8]{billingsley1995} and our assumption that~$F_i$ is continuous. The uniform continuity ensures that the tolerance
\begin{align}
\label{eq:delta(eps)}
\delta(\varepsilon) = \min_{i \in N} \left\{ \max_\delta \left\{ \delta : | F_i(t_1) - F_i(t_2) | \leq \varepsilon / \sqrt{N} ~~ \forall t_1,t_2\in\mathbb{R} \text{ with } | t_1 - t_2 | \leq \delta \right\} \right\}
\end{align}
is strictly positive for every~$\varepsilon>0$.
As the length of the search interval is halved in each iteration, Algorithm~\ref{algorithm:bisection} outputs a near optimal solution $\tau$ with
$| \tau - \tau^\star | \leq \delta(\varepsilon)$ after $\lceil \log_2 ((\overline{\tau} - \underline{\tau}) / \delta(\varepsilon)) \rceil$ iterations.
Moreover, the construction of~$\delta(\varepsilon)$ guarantees that $|1 - F_i(c(\boldsymbol {x},\boldsymbol {y_i})-\phi_i -\tau) - p_i^\star| \leq \varepsilon / \sqrt{N}$ for all $\tau$ with~$|\tau - \tau^\star| \leq \delta(\varepsilon)$. Therefore, the output~$\boldsymbol p\in\mathbb{R}^N_+$ of Algorithm~\ref{algorithm:bisection} satisfies $|p_i - p_i^\star| \leq \varepsilon / \sqrt{N} $ for each~$i\in[N]$, which in turn implies that $ \| \boldsymbol p - \boldsymbol p^\star \| \leq \varepsilon$. By construction, finally, Algorithm~\ref{algorithm:bisection} outputs $\boldsymbol p\ge \boldsymbol 0$ with $\sum_{i \in [N]} p_i < 1$, which ensures that $\| p \| \leq 1$. Thus, the claim follows.
\end{proof}
If all cumulative distribution functions $F_i$, $i\in[N]$, are Lipschitz continuous with a common Lipschitz constant~$L>0$, then the uniform continuity parameter~$\delta(\varepsilon)$ required in Algorithm~\ref{algorithm:bisection} can simply be set to~$\delta(\varepsilon) = \varepsilon / (L \sqrt{N})$.
We are now ready to prove that Algorithm~\ref{algorithm:asgd} offers different convergence guarantees depending on the continuity and smoothness properties of the marginal cumulative distribution functions.
\begin{corollary}
\label{corollary:convergence}
Use $h(\bm \phi) = \mathbb{E}_{\boldsymbol x \sim \mu} [ \boldsymbol \nu^\top \boldsymbol \phi - \overline\psi_c(\boldsymbol \phi, \boldsymbol x)]$ as a shorthand for the objective function of the smooth optimal transport problem~\eqref{eq:smooth_ot}, and let $\boldsymbol \phi^\star$ be a maximizer of~\eqref{eq:smooth_ot}.
If $\Theta$ is a marginal ambiguity set of the form~\eqref{eq:marginal_ambiguity_set} with distribution functions $F_i$, $i\in[N]$, then for any $T \in \mathbb N$ and $\bar \varepsilon\ge 0$, the outputs $\ubar{\boldsymbol \phi}_T = \frac{1}{T} \sum_{t=1}^{T} \boldsymbol \phi_{t-1}$ and $\bar{\boldsymbol \phi}_T = \frac{1}{T} \sum_{t=1}^{T} \boldsymbol \phi_{t}$ of Algorithm~\ref{algorithm:asgd} satisfy the following inequalities.
\begin{enumerate} [label=(\roman*)]
\item \label{corollary:convergence:Lipschitz} If $\gamma = 1 / (2 (2 + \bar \varepsilon) \sqrt{T})$ and $F_i$ is continuous for every $i\in[N]$, then we have
\begin{align*}
\overline W_c (\mu, \nu) - \mathbb{E} \left[ h \big(\ubar{\boldsymbol \phi}_T \big) \right]
\leq \frac{(2 + \bar \varepsilon)^2}{\sqrt{T}} \| \bm \phi^\star \|^2 + \frac{1}{4\sqrt{T}} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi^\star \|^2 + \frac{37}{2(2 + \bar \varepsilon)^2}}.
\end{align*}
\item \label{corollary:convergence:smooth} If $\gamma = 1 / (2 \sqrt{T} + L)$ and $F_i$ is Lipschitz continuous with Lipschitz constant $L>0$ for every $i\in[N]$, then we have
\begin{align*}
\overline W_c (\mu, \nu) - \mathbb{E} \left[ h \big(\bar{\boldsymbol \phi}_T \big) \right]
&\leq \frac{L}{2T}\| \bm \phi^\star \|^2 +
\frac{(2 + \bar \varepsilon)^2}{\sqrt{T}} \| \bm \phi^\star \|^2 + \frac{\bar\varepsilon^2 + 2}{4 (2+\bar \varepsilon)^2\sqrt{T}} + \frac{\bar \varepsilon}{\sqrt{T}} \sqrt{2 \| \bm \phi^\star \|^2 + \frac{37}{2(2 + \bar \varepsilon)^2}}.
\end{align*}
\item \label{corollary:convergence:concordance} If $\gamma = 1 / (2 G^2 \sqrt{T}) $ with $G = \max \{M, 2 + \bar\varepsilon\}$, $F_i$ satisfies the generalized self-concordance condition~\eqref{eq:cumulative:concoradance} with~$M> 0$ for every $i\in[N]$, and the smallest eigenvalue $\kappa$ of $-\nabla^2_{\boldsymbol \phi} h(\boldsymbol \phi^\star)$
is strictly positive, then we have
\begin{align*}
\overline W_c (\mu, \nu) - \mathbb{E} \left[ h \big(\ubar{\boldsymbol \phi}_T \big) \right]
&\leq \frac{G^2}{T \kappa} \left( 4 G \| \bm \phi_0 - \bm \phi^\star \| + 20 \right)^4.
\end{align*}
\end{enumerate}
\end{corollary}
\begin{proof}
Recall that problem \eqref{eq:smooth_ot} can be viewed as an instance of the convex minimization problem~\eqref{eq:convex:problem} provided that its objective function is inverted.
Throughout the proof we denote by $\boldsymbol p_t(\boldsymbol \phi_t, \boldsymbol x_t)$ the inexact estimate for $\nabla_{\boldsymbol \phi} \overline\psi(\boldsymbol \phi_t, \boldsymbol x_t)$ output by Algorithm~\ref{algorithm:bisection} in iteration $t$ of the averaged SGD algorithm. Note that
\begin{align*}
\left\| \mathbb{E} \left[ \bm \nu - \bm p_t(\bm \phi_{t-1}, \bm x_t) \big| \mathcal F_{t-1} \right] - \nabla h(\bm \phi_{t-1}) \right\|
&= \left\| \mathbb{E} \left[ \bm p_t(\bm \phi_{t-1}, \bm x_t) - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x_t)\right] \right\| \\
&\leq \mathbb{E} \left[ \left\| \bm p_t(\bm \phi_{t-1}, \bm x_t) - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x_t) \right\| \right]
\leq \varepsilon_{t-1} \leq \frac{\bar \varepsilon}{2 \sqrt{t}},
\end{align*}
where the two inequalities follow from Jensen's inequality and the choice of $\varepsilon_{t-1}$ in Algorithm~\ref{algorithm:asgd}, respectively. The triangle inequality and Proposition~\ref{proposition:structural}\,\ref{proposition:gradient} further imply that
\begin{align*}
\left\| \nabla h(\bm \phi) \right\|
= \mathbb{E} \left[ \left\| \boldsymbol \nu - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) \right\| \right]
\leq \left\| \boldsymbol \nu \right\| + \mathbb{E} \left[ \left\| \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) \right\| \right] \leq 2.
\end{align*}
Assertion~\ref{corollary:convergence:Lipschitz} thus follows from Theorem~\ref{theorem:convergence}\,\ref{theorem:convergence:Lipschitz} with $R=2$. As for assertion~\ref{corollary:convergence:smooth}, we have
\begin{align*}
&\phantom{=}~\; \mathbb{E} \left[\left\| \bm \nu - \bm p_t(\bm \phi_{t-1}, \bm x_t) - \nabla h(\bm \phi_{t-1}) \right\|^2 | \mathcal F_{t-1} \right] \\
&= \mathbb{E} \left[\left\| \bm p_t(\bm \phi_{t-1}, \bm x_t) - \mathbb{E} \left[ \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \right] \right\|^2 | \mathcal F_{t-1} \right] \\
&= \mathbb{E} \left[\left\| \bm p_t(\bm \phi_{t-1}, \bm x_t) - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) + \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) - \mathbb{E} \left[ \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \right] \right\|^2 | \mathcal F_{t-1} \right] \\
& \leq \mathbb{E} \left[ 2 \left\| \bm p_t(\bm \phi_{t-1}, \bm x_t) - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \right\|^2 + 2 \left\| \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) - \mathbb{E} \left[ \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \right] \right\|^2 | \mathcal F_{t-1} \right] \\
& \leq 2\varepsilon_{t-1}^2 + 2 \leq \bar \varepsilon^2 + 2,
\end{align*}
where the second inequality holds because $\nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \in \Delta^N$ and because $\| \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi_{t-1}, \boldsymbol x) \|_2^2 \leq 1$, while the last inequality follows from the choice of $\varepsilon_{t-1}$ in Algorithm~1.
As $\overline\psi(\boldsymbol \phi, \boldsymbol x)$ is $L$-smooth with respect to~$\boldsymbol \phi$ by virtue of Proposition~\ref{proposition:structural}\,\ref{proposition:smooth}, we further have
\begin{align*}
\| \nabla h(\bm \phi) - \nabla h(\bm \phi') \| = \left\| \mathbb{E} \left[ \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi, \boldsymbol x) - \nabla_{\boldsymbol \phi} \overline\psi_c(\boldsymbol \phi', \boldsymbol x) \right] \right\| \leq L \| \bm \phi - \bm \phi' \| \quad \forall \bm \phi, \bm \phi' \in \mathbb{R}^n.
\end{align*}
Assertion~\ref{corollary:convergence:smooth} thus follows from Theorem~\ref{theorem:convergence}\,\ref{theorem:convergence:smooth} with $R=2$ and $\sigma = \sqrt{\bar \varepsilon^2 + 2}$.
As for assertion~\ref{proposition:concordance}, finally, we observe that $h$ is $M$-generalized self-concordant thanks to Proposition~\ref{proposition:structural}\,\ref{proposition:concordance}. Assertion~\ref{corollary:convergence:concordance} thus follows from Theorem~\ref{theorem:convergence}\,\ref{theorem:convergence:concordance} with $R=2$.
\end{proof}
One can show that the objective function of the smooth optimal transport problem~\eqref{eq:smooth_ot} with marginal exponential noise distributions as described in Example~\ref{ex:exp} is generalized self-concordant. Hence, the convergence rate of Algorithm~\ref{algorithm:asgd} for the exponential distribution model of Example~\ref{ex:exp} is of the order~$\mathcal O(1/T)$, which improves the state-of-the-art $\mathcal O(1/\sqrt{T})$ guarantee established by~\citet{genevay2016stochastic}.
\section{Numerical Experiments}
\label{sec:numerical}
All experiments are run on a 2.6 GHz 6-Core Intel Core i7, and all optimization problems are implemented in MATLAB~R2020a. The corresponding codes are available at \url{https://github.com/RAO-EPFL/Semi-Discrete-Smooth-OT.git}.
We now aim to assess the empirical convergence behavior of Algorithm~\ref{algorithm:asgd} and to showcase the effects of regularization in semi-discrete optimal transport. To this end, we solve the original dual optimal transport problem~\eqref{eq:ctans_dual_semidisc} as well as its smooth variant~\eqref{eq:smooth_ot} with a Fr\'echet ambiguity set corresponding to the exponential distribution model of Example~\ref{ex:exp}, to the uniform distribution model of Example~\ref{ex:uniform} {\color{black} and to the hyperbolic cosine distribution model of Example~\ref{ex:hyperbolic}}.
Recall from Theorem~\ref{theorem:primal_dual} that any Fr\'echet ambiguity set is uniquely determined by a marginal generating function~$F$ and a probability vector~$\boldsymbol \eta$. As for the exponential distribution model of Example~\ref{ex:exp}, we set~$F(s) = \exp(10 s - 1)$ and~$\eta_i = 1/N$ for all~$i\in[N]$. In this case problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with an entropic regularizer, and the gradient $\nabla_{\boldsymbol \phi}\overline \psi_c(\boldsymbol \phi, \boldsymbol x)$, which is known to coincide with the vector~$\boldsymbol p^\star$ of optimal choice probabilities in problem~\eqref{eq:regularized_c_transform}, admits the closed-form representation~\eqref{eq:softmax}. We can therefore solve problem~\eqref{eq:smooth_ot} with a variant of Algorithm~\ref{algorithm:asgd} that calculates $\nabla_{\boldsymbol \phi}\overline \psi_c(\boldsymbol \phi, \boldsymbol x)$ exactly instead of approximately via bisection.
As for the uniform distribution model of Example~\ref{ex:uniform}, we set~$F(s) = s / 20 + 1/2$ and~$\eta_i = 1/N$ for all~$i\in[N]$. In this case problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with a $\chi^2$-divergence regularizer, and the vector~$\boldsymbol p^\star$ of optimal choice probabilities can be computed exactly and highly efficiently by sorting thanks to Proposition~\ref{proposition:spmax} in the appendix. We can therefore again solve problem~\eqref{eq:smooth_ot} with a variant of Algorithm~\ref{algorithm:asgd} that calculates $\nabla_{\boldsymbol \phi}\overline \psi_c(\boldsymbol \phi, \boldsymbol x)$ exactly.
{\color{black} As for the hyperbolic cosine model of Example~\ref{ex:hyperbolic}, we set~$F(s) = \sinh(10s - k)$ with $k=\sqrt{2} - 1 - \textrm{arcsinh}(1)$ and~$\eta_i = 1/N$ for all~$i \in [N]$. In this case problem~\eqref{eq:smooth_ot} is equivalent to the regularized primal optimal transport problem~\eqref{eq:reg_ot_pri_abstract} with a hyperbolic divergence regularizer. However, the vector~$\bm p^\star$ is not available in closed form, and thus we use~Algorithm~\ref{algorithm:bisection} to compute~$\bm p^\star$ approximately.} Lastly, note that the original dual optimal transport problem~\eqref{eq:ctans_dual_semidisc} can be interpreted as an instance of~\eqref{eq:smooth_ot} equipped with a degenerate singleton ambiguity set that only contains the Dirac measure at the origin of~$\mathbb{R}^N$. In this case $\overline \psi_c(\boldsymbol \phi,\boldsymbol x) = \psi_c(\boldsymbol \phi,\boldsymbol x)$ fails to be smooth in~$\boldsymbol \phi$, but an exact subgradient $\boldsymbol p^\star\in\partial_{\boldsymbol \phi} \overline \psi_c(\boldsymbol \phi,\boldsymbol x)$ is given by
\[
p_i^\star = \begin{cases}
1 \quad &\text{if}~ i = \min \argmax\limits_{i \in [N]}~\phi_i - c(\boldsymbol x, \boldsymbol y_i),\\
0 &\text{otherwise.}
\end{cases}
\]
We can therefore solve problem~\eqref{eq:ctans_dual_semidisc} with a variant of Algorithm~\ref{algorithm:asgd} that has access to exact subgradients (instead of gradients) of~$\overline \psi_c(\boldsymbol \phi, \boldsymbol x)$. Note that the maximizer~$\boldsymbol \phi^\star$ of~\eqref{eq:ctans_dual_semidisc} may not be unique. In our experiments, we force Algorithm~\ref{algorithm:asgd} to converge to the maximizer with minimal Euclidean norm by adding a vanishingly small Tikhonov regularization term to~$\psi_c(\boldsymbol \phi,\boldsymbol x)$. Thus, we set $\overline \psi_c(\boldsymbol \phi,\boldsymbol x) = \psi_c(\boldsymbol \phi,\boldsymbol x) + \varepsilon\|\boldsymbol \phi\|_2^2$ for some small regularization weight~$\varepsilon> 0$, in which case~$\boldsymbol p^\star+2\varepsilon \boldsymbol \phi\in\partial_{\boldsymbol \phi}\overline \psi_c(\boldsymbol \phi,\boldsymbol x)$ is an exact subgradient.
In the following we set~$\mu$ to the standard Gaussian measure on~$\mathcal X= \mathbb{R}^2$ and~$\nu$ to the uniform measure on 10 independent samples drawn uniformly from~$\mathcal Y=[-1,\, 1]^2$. We further set the transportation cost to~$c(\boldsymbol x, \boldsymbol y) = \|\boldsymbol x - \boldsymbol y\|_\infty$. Under these assumptions, we use Algorithm~\ref{algorithm:asgd} to solve the original as well as the~{\color{black}three} smooth optimal transport problems approximately {\color{black} for $T=1,\ldots, 10^5$. For each fixed~$T$ the step size is selected in accordance with Corollary~\ref{corollary:convergence}.}
We emphasize that Corollary~\ref{corollary:convergence}\,\ref{corollary:convergence:Lipschitz} remains valid if~$\overline \psi_c(\boldsymbol \phi,\boldsymbol x)$ fails to be smooth in~$\boldsymbol \phi$ and we have only access to subgradients; see \cite[Corollary~1]{nesterov2008confidence}. Denoting by~$\bar{\boldsymbol \phi}_T$ the output of Algorithm~\ref{algorithm:asgd}, we record the suboptimality
\begin{equation*}
\overline W_c(\mu, \nu) - \mathbb{E}_{\boldsymbol x \sim \mu} \left[ \boldsymbol \nu^\top \bar{\boldsymbol \phi}_T - \overline\psi_c(\bar{\boldsymbol \phi}_T , \boldsymbol x)\right]
\end{equation*}
of~$\bar{\boldsymbol \phi}_T$ in~\eqref{eq:smooth_ot} as well as the discrepancy~$\| \bar {\boldsymbol \phi}_T - \boldsymbol \phi^\star \|^2_2$ of~$\bar{\boldsymbol \phi}_T$ to the exact maximizer~$\boldsymbol \phi^\star$ of problem~\eqref{eq:smooth_ot} as a function of~$T$. In order to faithfully measure the convergence rate of $\bar{\boldsymbol \phi}_T$ and its suboptimality, we need to compute~$\boldsymbol \phi^\star$ as well as~$\overline W_c(\mu, \nu)$ to within high accuracy. This is only possible if the dimension of~$\mathcal X$ is small ({\em e.g.}, if~$\mathcal X= \mathbb{R}^2$ as in our numerical example); even though Algorithm~\ref{algorithm:asgd} can efficiently solve optimal transport problems in high dimensions.
We obtain high-quality approximations for~$\overline W_c(\mu, \nu)$ and~$\boldsymbol \phi^\star$ by solving the finite-dimensional optimal transport problem between~$\nu$ and the discrete distribution that places equal weight on $10 \times T$ samples drawn independently from~$\mu$. Note that only the first~$T$ of these samples are used by Algorithm~\ref{algorithm:asgd}. The proposed high-quality approximations of the {\color{black} entropic and $\chi^2$-divergence regularized} optimal transport problems are conveniently solved via Nesterov's accelerated gradient descent method, where the suboptimality gap of the $t^{\text{th}}$ iterate is guaranteed to decay as~$\mathcal O(1/ t^2)$ under the step size rule advocated in~\citep[Theorem~1]{Nesterov1983AMF}.
{\color{black} To our best knowledge, Nesterov's accelerated gradient descent algorithm is not guaranteed to converge with inexact gradients. For the hyperbolic divergence regularized optimal transport problem, we thus use Algorithm~\ref{algorithm:asgd} with $50 \times T$ iterations to obtain an approximation for~$\overline W_c(\mu, \nu)$ and~$\bm \phi^\star$.}
In contrast, we model the high-quality approximation of the original optimal transport problem~\eqref{eq:ctans_dual_semidisc} in YALMIP~\citep{yalmip} and solve it with MOSEK. If this problem has multiple maximizers, we report the one with minimal Euclidean norm.
Figure~\ref{fig:num_results} shows how the suboptimality of~$\bar{\boldsymbol \phi}_T$ and the discrepancy between $\bar {\boldsymbol \phi}_T$ and the exact maximizer decay with~$T$, both for the original as well as for the entropic, the $\chi^2$-divergence and~{\color{black} hyperbolic divergence} regularized optimal transport problems, {\color{black} averaged across 20 independent simulation runs.}
Figure~\ref{fig:suboptimality} suggests that the suboptimality decays as~$\mathcal O(1/\sqrt{T})$ for the original optimal transport problem, which is in line with the theoretical guarantees by~\citet[Corollary~1]{nesterov2008confidence},
and as $\mathcal O(1/ T)$ for the {\color{black} entropic, the $\chi^2$-divergence and the hyperbolic divergence regularized} optimal transport problems, which is consistent with the theoretical guarantees established in Corollary~\ref{corollary:convergence}. Indeed, entropic regularization can be explained by the exponential distribution model of Example~\ref{ex:exp}, where the exponential distribution functions $F_i$ satisfy the generalized self-concordance condition~\eqref{eq:cumulative:concoradance} with~$M =1/ \lambda$. Similarly, $\chi^2$-divergence regularization can be explained by the uniform distribution model of Example~\ref{ex:uniform}, where the uniform distribution functions $F_i$ satisfy the generalized self-concordance condition with any~$M > 0$. {\color{black} Finally, hyperbolic divergence regularization can be explained by the hyperbolic cosine distribution model of Example~\ref{ex:hyperbolic}, where the hyperbolic cosine functions~$F_i$ satisfy the generalized self-concordance condition with $M = 1/\lambda$.} In all cases the smallest eigenvalue of $-\nabla_{\boldsymbol \phi}^2 \mathbb{E}_{\boldsymbol x \sim \mu} [\boldsymbol \nu^\top \boldsymbol \phi^\star - \overline{\psi}_{c}(\boldsymbol \phi^\star, \boldsymbol x)]$, which we estimate when solving the high-quality approximations of the two smooth optimal transport problems, is strictly positive. Therefore, Corollary~\ref{corollary:convergence}~\ref{corollary:convergence:concordance} is indeed applicable and guarantees that the suboptimality gap is bounded above by~$\mathcal O (1/T)$.
Finally, Figure~\ref{fig:dualvars} suggests {\color{black} that~$\| \bar {\boldsymbol \phi}_T - \boldsymbol \phi^\star \|^2_2$ converges to~$0$ at rate~$\mathcal O(1/T)$ for the entropic, the $\chi^2$-divergence and the hyperbolic divergence} regularized optimal transport problems, which is consistent with~\citep[Proposition~10]{bach2013adaptivity}.
\begin{figure}[t]
\centering
\begin{subfigure}[h]{0.43\columnwidth}
\includegraphics[width=\textwidth]{convergence.pdf}
\caption{}
\label{fig:suboptimality}
\end{subfigure}
\hspace{2cm}
\begin{subfigure}[h]{0.43\columnwidth}
\includegraphics[width=\textwidth]{dualvars.pdf}
\caption{}
\label{fig:dualvars}
\end{subfigure}
\caption{Suboptimality (a) and discrepancy to~$\boldsymbol\phi^\star$ (b) of the outputs~$\bar{\boldsymbol \phi}_T$ of Algorithm~\ref{algorithm:asgd} for the original (blue), the entropic regularized (orange), the $\chi^2$-divergence regularized (red) {\color{black} and the hyperbolic divergence regularized (purple)} optimal transport~problems.} \label{fig:num_results}
\end{figure}
\textbf{Acknowledgements.} This research was supported by the Swiss National Science Foundation under the NCCR Automation, grant agreement~51NF40\_180545. The research of the second author is supported by an Early Postdoc.Mobility Fellowship, grant agreement P2ELP2\_195149.
|
\subsection{Graphs with bounded degree and planar graphs}
\label{degree-section}
In this subsection, we will prove the following theorem:
\begin{theorem}
\label{degree-lower-bound}
For each $\Delta \geq 4$ and odd $d \geq 1$,
there exists a graph with maximum degree bounded by $\Delta$
containing a distance-$d$ half graph of order $\left\lfloor \frac{\Delta}{2}\right\rfloor^{
\left\lceil \frac{d}{2} \right\rceil}$.
\end{theorem}
We fix two integer variables, $k \geq 2$ and $h \geq 1$.
We will construct an undirected graph $H_{k,h}$ with the following properties:
\begin{itemize}
\item The degree of each vertex in the graph is bounded by $2k$.
\item The graph contains vertices $a_1, b_1, a_2, b_2, \dots, a_{k^h}, b_{k^h}$
forming a distance-$(2h-1)$ half graph of order~$k^h$.
\end{itemize}
In the construction of $H_{k,h}$, we will create two isomorphic rooted trees
$\mathcal{A}$ and $\mathcal{B}$, each having $k^h$ leaves, and connect pairs of vertices of
these trees using paths of small, positive length.
We fix an alphabet $\Sigma = \{1, 2, \dots, k\}$ with the natural ordering of its elements.
This allows us to introduce a lexicographical ordering of all words in $\Sigma^*$,
denoted $\preccurlyeq$.
For a word $s \in \Sigma^*$, by $|s|$ we mean the length of $s$.
And for a pair of words $x, y \in \Sigma^*$, by $x \cdot y$ we mean the concatenation of
$x$ and $y$.
For each word $s \in \Sigma^*$, $|s| \in [0, h]$, we create two vertices: $a_s \in V(\mathcal{A})$
and $b_s \in V(\mathcal{B})$.
The edges in both trees are constructed in the following way:
for each word $s \in \Sigma^*$, $|s| \leq h-1$, and each character $c \in \Sigma$,
we add an edge between vertices $a_s$ and $a_{s \cdot c}$ in $\mathcal{A}$, and between
the vertices $b_s$ and $b_{s \cdot c}$ in $\mathcal{B}$.
We also connect the trees in the following way:
for each word $s \in \Sigma^*$, $|s| \leq h-1$, and each pair of characters $c, d \in \Sigma$
such that $c < d$, we connect the vertices $a_{s \cdot d} \in V(\mathcal{A})$ and $b_{s \cdot c} \in V(\mathcal{B})$ by
a path of length $2|s| + 1$.
This finishes the construction of $H_{k,h}$.
Examples of such graphs can be found in Figure~\ref{degree-examples-fig}.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.185\textwidth}
\centering
\input{figures/degree-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.285\textwidth}
\centering
\input{figures/degree-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.53\textwidth}
\centering
\input{figures/degree-c.tex}
(c)
\end{minipage}
\caption{Graphs: (a) --- $H_{2,1}$, (b) --- $H_{4,1}$, (c) --- $H_{2,3}$. $\varepsilon$
denotes an empty word.}
\label{degree-examples-fig}
\end{figure}
\vspace{0.5em}
We now need to prove the required properties of $H_{k, h}$.
Firstly, we prove that each vertex has at most $2k$ neighbors in the graph.
Vertices belonging to neither $\mathcal{A}$ nor $\mathcal{B}$ lie on the paths connecting $\mathcal{A}$ with $\mathcal{B}$,
so their degrees are equal to $2$.
Let us now fix a vertex belonging to $\mathcal{A}$ or $\mathcal{B}$.
In its own tree, this vertex has at most $k$ children and one parent.
This vertex is also an endpoint of at most $k-1$ paths connecting $\mathcal{A}$ with $\mathcal{B}$;
the bound is satisfied with equality for vertices $a_{s \cdot k}$ and $b_{s \cdot 1}$
($1, k \in \Sigma$, $s \in \Sigma^*$, $|s| \leq h-1$).
Hence, the total number of neighbors of each vertex of $\mathcal{A}$ and $\mathcal{B}$ is bounded by $2k$.
Secondly, each tree obviously has $k^h$ leaves, since the leaves are parameterized by a word
of length $h$ over an alphabet of size $k$.
Finally, we need to find a half graph in this graph. Let $(t_1, t_2, \dots, t_{k^h})$ be the sequence
of all words of length $h$ over $\Sigma$, ordered lexicographically.
The following lemma proves that the lexicographical ordering of the leaves of $\mathcal{A}$ and $\mathcal{B}$
produces a half graph:
\begin{lemma}
\label{lemma-degree-distance}
Fix two indices $i, j \in [1, k^h]$.
The distance between $b_{t_i}$ and $a_{t_j}$ is equal to $2h-1$ if $i < j$, and is greater
than $2h - 1$ if $i \geq j$.
\begin{proof}
For simplicity, we can assume that each path of length $\ell$ ($\ell \geq 1$)
connecting a vertex of $\mathcal{A}$ with a vertex of $\mathcal{B}$ is, in fact, a weighted edge of length
$\ell$ connecting these two vertices.
We introduce the \textbf{level function} $\xi\,:\,V(\mathcal{A}) \cup V(\mathcal{B}) \to \mathbb{N}$,
defined in the following way:
$$ \xi(v) = \begin{cases}
h - |s| & \text{if }v = a_s\text{ for }s \in \Sigma^*, \\
h + |s| - 1 & \text{if }v = b_s\text{ for }s \in \Sigma^*.
\end{cases} $$
For a vertex $v$, we say that the value $\xi(v)$ is the \textbf{level} of vertex $v$.
We see that the levels of the vertices of $\mathcal{A}$ range between
$0$ and $h$, while the levels of the vertices of $\mathcal{B}$ range between $h-1$ and $2h - 1$
(Figure \ref{degree-levels-fig}).
\begin{figure}[h]
\centering
\input{figures/degree-levels.tex}
\label{degree-levels-fig}
\caption{The levels of vertices of $H_{2,3}$. Each weighted edge resulting from
a contracted path is colored violet and is labeled by its length.}
\end{figure}
We can now observe that:
\begin{itemize}
\item For every two vertices of $\mathcal{A}$ connected by an edge --- $a_s$ and $a_{s \cdot c}$
for some $s \in \Sigma^*$, $c \in \Sigma$ --- we have that $\xi(a_{s}) = \xi(a_{s \cdot c}) + 1$.
\item For every two vertices of $\mathcal{B}$ connected by an edge --- $b_s$ and $b_{s \cdot c}$ ---
we have that $\xi(b_{s \cdot c}) = \xi(b_s) + 1$.
\item For every two vertices $a_{s \cdot d} \in V(\mathcal{A})$, $b_{s \cdot c} \in V(\mathcal{B})$
($s \in \Sigma^*, c, d \in \Sigma, c < d$), connected by a weighted edge of length
$2|s| + 1$, we have
$$\xi(b_{s \cdot c}) - \xi(a_{s \cdot d}) = (h + |s|) - (h - |s| - 1) = 2|s| + 1.$$
\end{itemize}
Hence, for each edge of weight $x$ connecting two vertices $u, v$, we have that
$x = |\xi(u) - \xi(v)|$.
Therefore, for all pairs of vertices $u, v$, the distance between these vertices
is bounded from below by $|\xi(u) - \xi(v)|$, and the bound is satisfied with equality only if
there exists a path between $u$ and $v$ on which the values of $\xi$ change
monotonically.
We will call such paths \textbf{monotonous}.
Fix $i, j \in [1, k^h]$, and consider the vertices $b_{t_i}$ and $a_{t_j}$.
By the definition of $\xi$, we know that $\xi(a_{t_j}) = 0$ and $\xi(b_{t_i}) = 2h - 1$,
hence the distance between these two vertices is at least $2h - 1$.
We will now analyze when this distance is equal to $2h - 1$.
We see that the value of $\xi$ only increases when: going up the tree $\mathcal{A}$ (in the direction
of the root of $\mathcal{A}$), taking a weighted edge from a vertex of $\mathcal{A}$ to a vertex of
$\mathcal{B}$ (but not the other way around), and going down the tree $\mathcal{B}$ (away from the root
of $\mathcal{B}$).
Hence, each path between $b_{t_i}$ and $a_{t_j}$
of length $2h-1$ can only have such three segments, in this exact order, as it needs to
be monotonous.
If $i < j$, then $t_i \prec t_j$, so the words
$t_i$ and $t_j$ admit the following factorization:
$$ t_i = p \cdot c \cdot s_i, \qquad t_j = p \cdot d \cdot s_j $$
for $p, s_i, s_j \in \Sigma^*$, $c, d \in \Sigma$ and $c < d$.
Therefore, the path originating at $a_{t_j}$, going up $\mathcal{A}$ to the vertex $a_{p \cdot d}$, taking
the weighted edge to $b_{p \cdot c}$ connecting both trees (this is possible since $c < d$),
and then going down $\mathcal{B}$ to the destination $b_{t_i}$, is monotonous.
Hence, $\mathrm{dist}(b_{t_i}, a_{t_j}) = 2h - 1$.
Conversely, if a path from $a_{t_j}$ to $b_{t_i}$ has length $2h - 1$, then it is monotonous.
Therefore, it must follow from $a_{t_j}$ to an ancestor of $a_{t_j}$ (we will name it
$a_x$ where $x$ is a prefix of $t_j$), then take a weighted
edge to an ancestor of $b_{t_i}$ (we will call it $a_y$ where $y$ is a prefix of $t_i$),
and then walk down the tree $\mathcal{B}$ to $b_{t_i}$.
By the construction of the tree, $x$ and $y$ must be both of the form
$x = p \cdot d$, $y = p \cdot c$ where $p \in \Sigma^*$, $c, d \in \Sigma$, $d > c$.
Since $x$ and $y$ are prefixes of $t_j$ and $t_i$, respectively, this means
that $t_j \succ t_i$.
Hence, $j > i$.
Therefore, the path of length $2h - 1$ exists between $a_{t_j}$ and $b_{t_i}$ if and only if
$i < j$; otherwise the shortest path between these vertices is longer.
\end{proof}
\end{lemma}
Lemma \ref{lemma-degree-distance} proves that the graph $H_{k, h}$ contains
a half graph of order $k^h$.
Since $k \geq 2$ and $h \geq 1$ were two arbitrary variables, this statement is satisfied
for each choice of these variable.
\vspace{0.5em}
Let us now finish the proof of Theorem \ref{degree-lower-bound}.
For each $\Delta \geq 4$ and odd $d \geq 1$ we can see that the graph
$H_{\left\lfloor\frac{\Delta}{2}\right\rfloor, \frac{d+1}{2}}$ has its maximum degree
bounded by $2\left\lfloor\frac{\Delta}{2}\right\rfloor \leq \Delta$,
and contains a distance-$d$ half graph of order $\left\lfloor\frac{\Delta}{2}\right\rfloor^{
\left\lceil\frac{d}{2}\right\rceil}$.
Hence, the proof of the theorem is complete.
\medskip
We note the following immediate conclusion from Theorem \ref{degree-lower-bound}:
\begin{corollary}
\label{degree-lower-bound-asym}
Let $\mathcal{C}_\Delta$ be the class of graphs with maximum degree bounded by $\Delta \geq 4$.
Then the maximum order of a distance-$d$ half graph ($d \geq 1$) in $\mathcal{C}_\Delta$ is bounded
from below by $\Delta^{\Omega(d)}$.
\end{corollary}
It turns out that the presented family of examples also witness as an exponential lower
bound on the maximum order of a distance-$d$ half graph in the class of planar graphs.
This is proved explained by following lemma:
\begin{lemma}
\label{degree-four-is-planar-lemma}
For each $h \geq 1$, the graph $H_{2, h}$ is planar.
\begin{proof}
For each $h \geq 1$, let $H'_{2, h}$ be the graph obtained from $H_{2, h}$ by contracting
each path connecting two trees to a single edge.
Obviously, $H'_{2, h}$ is planar if and only if $H_{2, h}$ is planar.
Then, for $h \geq 2$, the graph $H'_{2, h}$ can be created from two copies of the graph
$H'_{2, h-1}$ in the following way:
\begin{enumerate}
\item In the $i$-th copy of the graph ($i \in \{1, 2\}$), replace each vertex $a_s$
($s \in \{1, 2\}^*$) by $a_{i \cdot s}$, and analogously each vertex $b_s$ by $b_{i \cdot s}$.
\item Create new roots of $\mathcal{A}$ and $\mathcal{B}$ --- $a_\varepsilon$ and $b_\varepsilon$,
respectively.
\item Add the following edges: $a_\varepsilon a_1$, $a_\varepsilon a_2$,
$b_\varepsilon b_1$, $b_\varepsilon b_2$, $b_1 a_2$.
\end{enumerate}
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.35\textwidth}
\centering
\input{figures/planar-conn-a.tex}
$H'_{2,2}$
\end{minipage}\begin{minipage}[b]{0.63\textwidth}
\centering
\input{figures/planar-conn-b.tex}
$H'_{2,3}$
\end{minipage}
\caption{A step in the inductive process of creating $H'_{2,h}$ for each $h \geq 2$.
Two copies of $H'_{2,2}$ (left; its roots are marked green and yellow) are put side by side,
two new vertices are added, and five new edges (blue) are drawn, resulting in the graph
$H'_{2,3}$ (right).}
\label{planar-conn-fig}
\end{figure}
Note that $H'_{2, 1} = H_{2, 1}$ is planar (Figure \ref{degree-examples-fig}(a)), and moreover,
in the presented embedding, its vertices $a_\varepsilon$ and $b_\varepsilon$ lie on the
outer face of the graph.
These two properties can be maintained inductively:
for $h \geq 2$, we take the embeddings of two copies of $H'_{2, h-1}$ satisfying these
properties, put them side by side,
and add the required edges, making sure that the graph remains planar and
that the new roots of the trees are on the outer face of the graph (Figure \ref{planar-conn-fig}).
\end{proof}
\end{lemma}
We immediately infer the following:
\begin{corollary}
\label{planar-lower-bound}
For every $d \geq 1$, the maximum order of a distance-$d$ half graph ($d \geq 1$)
in the class of planar graphs is bounded from below by $2^{\left\lceil \frac{d}{2} \right\rceil}$.
\begin{proof}
Assume $d$ is odd.
Then, by Lemma \ref{degree-four-is-planar-lemma}, the graph $H_{2, \frac{d+1}{2}}$ is planar.
Also, it contains a distance-$d$ half graph of order
$2^{\frac{d+1}{2}} = 2^{\left\lceil \frac{d}{2} \right\rceil}$.
For even $d$, we construct a planar graph containing a distance-$(d-1)$ half graph
of order $2^{\frac{d}{2}} = 2^{\left\lceil \frac{d}{2} \right\rceil}$, and then for
each vertex $a_i$ in this graph ($1 \leq i \leq 2^{\frac{d}{2}}$), we add an edge whose
one endpoint is $a_i$, and another is a new vertex $a'_i$.
We now can see that the vertices $a'_1, b_1, a'_2, b_2, \dots, a'_{2^{\frac{d}{2}}},
b_{2^{\frac{d}{2}}}$ form a distance-$d$ half graph of required order.
\end{proof}
\end{corollary}
\subsection{Graphs with bounded pathwidth}
\label{pw-section}
In this section, we will find large half graphs in the class of graphs with bounded pathwidth.
Specifically, we will prove the following theorem:
\begin{theorem}
\label{pw-lower-bound}
For each $d \geq 1$ and $p \geq 0$, there exists a graph $P_{p,d}$ with pathwidth
at most $p + 2$ which contains a distance-$(4d-1)$ half graph of order
$(2d+1)^p$.
\begin{proof}
Let $\ell_{p,d} := (2d+1)^p$.
We define a slightly broader class of graphs $\{P_{p,d,k}\,\mid\,d \geq 1,\,
p \geq 0,\,k\geq0\}$
where $P_{p,d,k}$ has the following properties:
\begin{itemize}
\item The graph has pathwidth at most $p + 2$.
\item The graph contains a distance-$(4d-1)$ half graph
$a_1, a_2, \dots, a_{\ell_{p,d}}$, $b_1, b_2,
\dots, b_{\ell_{p, d}}$ in which every two vertices are at distance
$2d$ or more from each other.
\item Each of the vertices of the half graph
has $k$ vertex disjoint paths of length $3d$ attached to it (called
\emph{appendices});
in other words, after removing any of these vertices, there are at least $k$
connected components which are paths with $3d$ vertices.
\end{itemize}
Thanks to the first two conditions, the graph $P_{p, d} := P_{p, d, 0}$ will satisfy
Theorem~\ref{pw-lower-bound}.
The final condition is purely technical and will help us argue that pathwidths
of the graphs constructed in the process described below do not grow too large.
\medskip
The construction will be inductive over $p$.
First, for $d \geq 1$, $k \geq 0$, we choose the graph $P_{0, d, k}$
to be the $3d$-subdivision of two disjoint stars with $k$ edges, with the
distance-$(4d-1)$ half graph of order $\ell_{0,d} = 1$ given by the centers of both stars.
It can be easily verified that this graph satisfies the requirements; in particular,
$\pw{P_{0,d,k}} \leq 2$.
\medskip
We shall now describe how to construct $P_{p, d, k}$ for $p, d \geq 1$ and $k \geq 0$:
\begin{enumerate}
\item Take $2d+1$ disjoint copies of $P_{p-1, d, k+1}$, and renumber the vertices
of the half graph in each of the copies, ordering all $2d+1$ half graphs one after another.
Formally, the labels of the vertices
$a_i$ and $b_i$ of the half graph in the $j$-th disjoint copy of the graph are changed to
$a_{(j-1)\ell_{p-1,d} + i}$ and $b_{(j-1)\ell_{p-1,d} + i}$, respectively.
Since $\ell_{p,d} = (2d+1)\ell_{p-1,d}$,
the graph contains vertices $a_i$, $b_i$ for each $i \in [1, \ell_{p, d}]$.
The following steps of the construction will ensure that these vertices form
a distance-$(4d-1)$ half graph, provided that $P_{p-1,d,k+1}$ satisfies the required properties.
\item Add a new vertex $r$ to the graph.
\item For each vertex $b_i$ in the $j$-th disjoint copy of the graph, $j \in [1, 2d+1]$,
we connect $b_i$ with $r$ with a~path of length $d + (j - 1)$.
In order to do that, we use up one of $k+1$ appendices attached to $b_i$
by connecting $r$ with the $(d+j-2)$-nd vertex of the appendix with an edge
(Figure \ref{pw-appendix-join});
the part of the appendix after this vertex can then be safely discarded.
\item We apply a similar procedure to the vertices $a_i$ of the half graph, only that
the vertex of the half graph in the $j$-th disjoint copy of the graph is connected
with $r$ with a~path of length $3d - (j - 1)$.
This finishes the construction of $P_{p, d, k}$.
\end{enumerate}
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/pw-appendix-join-a.tex}
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/pw-appendix-join-b.tex}
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/pw-appendix-join-c.tex}
\end{minipage}
\caption{The process of turning an appendix attached to $b_i$
into a path of length $5$ connecting $b_i$ with $r$.}
\label{pw-appendix-join}
\end{figure}
Obviously, each vertex $a_i$ and $b_j$ in $P_{p,d,k}$
has $k$ remaining appendices.
We also note that $P_{p, d, k} \setminus \{r\}$ is a subgraph of a graph formed
from $2d+1$ disjoint copies of $P_{p-1, d, k+1}$. Hence,
$$ \pw{P_{p, d, k}} \leq \pw{P_{p,d,k} \setminus \{r\}} + 1 \leq
\pw{P_{p-1, d, k+1}} + 1 \leq p + 2. $$
We also argue that $a_1, a_2, \dots, a_{\ell_{p,d}}$, $b_1, b_2, \dots,
b_{\ell_{p,d}}$ is a distance-$(4d-1)$ half graph satisfying the distance requirements
of $P_{p,d,k}$.
In the construction, multiple disjoint copies of $P_{p-1,d,k+1}$ were connected
by vertex disjoint paths to a new vertex $r$, where each path has length at least
$d$ and at most $3d$.
Hence, the shortest path between any two vertices of the new half graph is either fully
contained in a copy of $P_{p-1,d,k+1}$ (and it must not be shorter than $2d$
by the inductive assumption), or it passes through $r$ and thus it follows two
paths of length at least $d$, so its length is at least $2d$ as well.
From this property,
we infer that if the shortest path between any two vertices of the half graph has length
at most $4d - 1$, then this path must avoid all other vertices of the half graph.
Let us now consider whether there exists a path between two vertices $a_i$ and $b_j$
of the half graph of length $4d - 1$.
Again, this path must either be fully contained in a single copy of
$P_{p-1,d,k+1}$ (and this condition is only satisfied if $i > j$), or it passes through $r$.
In the latter case, this path must consist of a direct connection from $a_i$ to $r$,
and then a direct connection from $r$ to $b_j$.
Assuming that $a_i$ is in the $x$-th disjoint copy of $P_{p-1,d,k+1}$, and $b_j$ is
in the $y$-th copy of the graph ($x, y \in [1, 2d+1]$), we infer that the length of that path
is exactly
$$[d + (y - 1)] + [3d - (x - 1)] = 4d + (y - x).$$
Hence, such a path exists if and only if $x > y$; that is, only if $i > j$ and both
$a_i$ and $b_j$ come from the different copies of $P_{p-1,d,k+1}$.
We conclude that $\mathrm{dist}(a_i, b_j) \leq 4d-1$ if and only if $i > j$.
Therefore, all the required conditions are satisfied, so $P_{p,d,k}$ is defined correctly.
This finishes the proof of the lower bound.
\end{proof}
\end{theorem}
On an end note, we remark the following asymptotic version of Theorem \ref{pw-lower-bound}:
\begin{corollary}
\label{pw-lower-bound-asym}
For each pair of integers $p \geq 2$, $d \geq 4$, the maximum order of a distance-$d$
half graph in the class of graphs with pathwidth bounded by $p$ is bounded from below
by $\Theta(d)^{p - O(1)}$.
\end{corollary}
\subsection{Graphs with bounded treewidth and minor-free graphs}
\label{tw-section}
In this section, we will construct a family of graphs with small treewidth containing large
half graphs.
Since the graphs with bounded treewidth also avoid large cliques as minors, this
family will also serve as examples of graphs avoiding relatively small cliques as minors,
but still containing large half graphs.
To start with, we shall introduce a variant of a tree decomposition of a graph $G$
containing a distance-$2d$ half graph.
\begin{definition}
\label{pairing-td-def}
A rooted tree decomposition $\mathcal{T}$ of a graph $G$ is
a~\textbf{distance-$d$ pairing decomposition} if all the following conditions hold:
\begin{itemize}
\item The root of $\mathcal{T}$ is a bag containing exactly two elements, called $A$ and
$B$.
\item Each leaf of $\mathcal{T}$ is a bag containing exactly two elements, called $a_i$ and
$b_i$, where $i \in \{1, 2, \dots, \ell\}$ and $\ell$ is the number of leaves in $\mathcal{T}$.
\item All vertices $A, B, a_1, b_1, a_2, b_2, \dots, a_\ell, b_\ell$ are pairwise different.
\item For each pair of integers $i, j$ such that $1 \leq i < j \leq \ell$, we have that
$\mathrm{dist}(b_i, a_j) = 2d$.
\item For each pair of integers $i, j$ such that $1 \leq j \leq i \leq \ell$, we have that
$\mathrm{dist}(b_i, a_j) = 2d + 1$.
\end{itemize}
For such a tree decomposition, we define two objects: its root
$\mathsf{Root}(\mathcal{T}) = (A, B)$ and the sequence of vertices in its leaves
$\mathsf{Leaves}(\mathcal{T}) = (a_1, b_1, a_2, b_2, \dots, a_\ell, b_\ell)$.
We will refer to the value $\ell$ as the \textbf{order} of $\mathcal{T}$.
We also define the \textbf{width} of the tree decomposition in the standard way.
\end{definition}
We remark that Definition \ref{pairing-td-def} implies that
the set of vertices $a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$ forms
a distance-$2d$ half graph of order $\ell$ in $G$.
However, the conditions required here are even stronger
as the definition of a half graph only requires that $\mathrm{dist}(b_i, a_j) \leq 2d$ for each pair of integers
$i < j$, and $\mathrm{dist}(b_i, a_j) > 2d$ for $i > j$.
This strengthening will be essential in the proof of the correctness
of the construction.
We also note that $\mathcal{T}$ --- in some way ---
``exposes'' the vertices of the underlying half graph
in the form of the leaf bags of the tree decomposition ($\mathsf{Leaves}(\mathcal{T})$),
and two other vertices in the form of the root bag of the decomposition ($\mathsf{Root}(\mathcal{T})$).
These outer bags of the tree decomposition are ``sockets'' which
can connect to the ``sockets'' of pairing decompositions of other graphs, allowing
a~recursive construction of large graphs.
\begin{example}
\label{pairing-td-example}
We consider the graph $G$ presented in Figure \ref{pairing-td-fig}(a)
with the tree decomposition $\mathcal{T}$ depicted in Figure \ref{pairing-td-fig}(b).
This decomposition is distance-$1$ pairing and has order~$2$ and width~$3$.
The table in Figure \ref{pairing-td-fig}(c) shows the distances between
$a_i$ and $b_j$ for each pair of indices $i, j$.
We can see that $\mathrm{dist}(b_1, a_2) = 2$ and all the remaining distances are equal to~$3$.
Moreover, $\mathsf{Root}(\mathcal{T}) = (A, B)$ and $\mathsf{Leaves}(\mathcal{T}) = (a_1, b_1, a_2, b_2)$.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.37\textwidth}
\centering
\input{figures/tw-basic-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.37\textwidth}
\centering
\input{figures/tw-basic-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.26\textwidth}
\centering
\begin{tabular}{c|c|c}
$\mathrm{dist}(\cdot, \cdot)$ & $a_1$ & $a_2$ \\ \hline
$b_1$ & $3$ & $2$ \\ \hline
$b_2$ & $3$ & $3$
\end{tabular}
\vspace{1em}
(c)
\end{minipage}
\caption{(a) --- the graph $G$ in Example \ref{pairing-td-example};
(b) --- its tree decomposition; (c) --- its distance matrix.}
\label{pairing-td-fig}
\end{figure}
\end{example}
In the construction of our family of graphs, we will need to use a refinement
of Definition~\ref{pairing-td-def}.
Intuitively, we want to expose the root vertices of the decomposition in an efficient way.
We will do it by creating a stronger variant of the pairing decomposition in which
one of the root vertices is adjacent to all the vertices on one side of the half graph, while
the other root vertex is adjacent to the other side.
\begin{definition}
Consider an arbitrary undirected graph $G$ with a distance-$d$ pairing decomposition
$\mathcal{T}$ where $\mathsf{Root}(\mathcal{T}) = (A, B)$ and $\mathsf{Leaves}(\mathcal{T}) = (a_1, b_1, \dots, a_\ell, b_\ell)$.
We will say that $\mathcal{T}$ is \textbf{neighboring} if for each $i \in \{1, 2, \dots, \ell\}$, we have that:
$$ \mathrm{dist}(a_i, A) = \mathrm{dist}(b_i, B) = 1, \quad\ \ \mathrm{dist}(a_i, B) \geq 2d + 1, \quad\ \
\mathrm{dist}(b_i, A) \geq 2d + 1. $$
Moreover, $A$ must be adjacent only
to vertices $a_1, \dots, a_\ell$, and $B$ must be adjacent only to vertices
$b_1, \dots, b_\ell$.
\end{definition}
\vspace{0.5em}
We can verify that the decomposition from Example \ref{pairing-td-example} is not neighboring
since the vertices $A$ and $B$ are connected by an edge.
\vspace{0.5em}
We will now present a few lemmas.
Lemma \ref{make-neighboring-lemma} will allow us to turn an arbitrary decomposition into
a neighboring decomposition by incurring a small cost on the width of the decomposition.
Lemma \ref{tw-combine-lemma} will be a method of combining two pairing decompositions ---
a neighboring decomposition of width $t$ and order $\ell_1$, and a pairing decomposition
of width $t-2$ and order $\ell_2$, into a pairing decomposition of order $\ell_1\ell_2$.
Then, the combination of these two lemmas (Lemma \ref{combine-any-tw}) will provide us
with a procedure, which we will use to create graphs with enormous pairing decompositions.
\begin{lemma}
\label{make-neighboring-lemma}
There exists a procedure which takes an arbitrary undirected graph $G$ with
a distance-$d$ pairing decomposition $\mathcal{T}$ of width $t$ and order $\ell$,
and produces a graph $G'$ with a neighboring distance-$d$
pairing decomposition $\mathcal{T}'$ of width $t+2$ and order $\ell$.
\begin{proof}
Let $\mathsf{Leaves}(\mathcal{T}) = (a_1, b_1, \dots, a_\ell, b_\ell)$.
We construct $G'$ from $G$ by creating two new vertices $A_{\mathrm{new}}$ and
$B_{\mathrm{new}}$, connecting $A_{\mathrm{new}}$ directly by an edge
to each of the vertices $a_i$ for $i \in [1, \ell]$, and analogously connecting
$B_{\mathrm{new}}$ to each of the vertices $b_i$.
We will now construct a rooted tree decomposition $\mathcal{T}'$ from $\mathcal{T}$ in the following way
\begin{enumerate}
\item For each leaf bag $L_i \in V(\mathcal{T})$ containing vertices $a_i$ and $b_i$,
we clone it (without cloning the vertices in the bag), and connect it with $L_i$ in $\mathcal{T}$.
This way, the clone becomes a leaf in the new decomposition instead of $L_i$.
\item We create a new bag $(A_{\mathrm{new}}, B_{\mathrm{new}})$, which we directly
connect to the root of $\mathcal{T}$.
\item To each bag of $\mathcal{T}$ which is neither the root nor a leaf of the new tree decomposition,
we add both $A_{\mathrm{new}}$ and $B_{\mathrm{new}}$.
\end{enumerate}
We can easily see that $\mathcal{T}'$ is a tree decomposition of $G'$ of width $t + 2$.
We will now show that $(G', \mathcal{L}')$ is a neighboring decomposition
by deducing all the required equalities and inequalities between the distances.
Obviously, $\mathrm{dist}(a_i, A_{\mathrm{new}}) = \mathrm{dist}(b_i, B_{\mathrm{new}}) = 1$ for each
$i \in [1, \ell]$.
Furthermore, by considering all neighbors of $B_{\mathrm{new}}$, we can see
that for each $i \in [1, \ell]$, we have that
$$ \mathrm{dist}(a_i, B_{\mathrm{new}}) = \min_{j \in \{1, \dots, \ell\}} \left(
\mathrm{dist}(a_i, b_j) + 1\right) \geq 2d + 1. $$
Analogously, $\mathrm{dist}(b_i, A_{\mathrm{new}}) \geq 2d+1$ for every $i \in [1, \ell]$.
We can now prove that no path connecting $b_i$ and $a_j$ which has length $2d$ or less,
for any choice of indices $i, j \in [1, \ell]$, can pass through $A_{\mathrm{new}}$:
$$ \mathrm{dist}(b_i, A_{\mathrm{new}}) \geq 2d + 1 \qquad\Rightarrow\qquad
\mathrm{dist}(b_i, A_{\mathrm{new}}) + \mathrm{dist}(A_{\mathrm{new}}, a_j) > 2d + 1. $$
Analogously, no such path can pass through $B_{\mathrm{new}}$.
If $i < j$, then $\mathrm{dist}_G(b_i, a_j) = 2d$ holds in $G$.
Since $A_{\mathrm{new}}$ and $B_{\mathrm{new}}$ were the only vertices added to
$G$ in the construction of $G'$, and no path with length $2d$ or less can pass through
these vertices, it means that we also have $\mathrm{dist}_{G'}(b_i, a_j) = 2d$.
Analogously, if $i \geq j$, then $\mathrm{dist}_G(b_i, a_j) = 2d+1$ in also implies
$\mathrm{dist}_{G'}(b_i, a_j) = 2d+1$.
\end{proof}
\end{lemma}
Let the procedure introduced in the statement of Lemma \ref{make-neighboring-lemma}
be named $\mathsf{MakeNeighboring}$.
The procedure takes a graph $G$ together with its pairing distance-$d$ tree
decomposition $\mathcal{T}$, and produces a modified graph $G'$ together with its
neighboring pairing distance-$d$ decomposition $\mathcal{T}'$ of width larger by $2$ than that
of $\mathcal{T}$:
$$ (G', \mathcal{T}') = \mathsf{MakeNeighboring}(G, \mathcal{T}).$$
\begin{lemma}
\label{tw-combine-lemma}
For every $d \geq 2$, $t \geq 1$ and $\ell_1, \ell_2 \geq 2$, there exists a procedure which takes:
\begin{itemize}
\item a graph $G$ with a distance-$(d-1)$ pairing decomposition $\mathcal{T}_G$
of order $\ell_1$ and width $t$,
\item a graph $H$ with a neighboring distance-$d$ pairing decomposition $\mathcal{T}_H$
of order $\ell_2$ and width $t$,
\end{itemize}
and produces a graph with a distance-$d$ pairing decomposition of order $\ell_1\ell_2$
and width $t$.
\begin{proof}
We fix the graph $G$ with its pairing decomposition $\mathcal{T}_G$, and let
$\mathsf{Root}(\mathcal{T}_G) = (A, B)$, $\mathsf{Leaves}(\mathcal{T}_G) = (A_1, B_1, A_2, B_2, \dots,
A_{\ell_1}, B_{\ell_1})$.
We also create $\ell_1$ disjoint copies of the graph $H$ together with its tree decomposition
$\mathcal{T}_H$.
For each $i \in [1, \ell_1]$, we define the graph $H_i$ as the $i$-th copy of $H$.
In its tree decomposition $\mathcal{T}_{H_i}$, we name the vertices of the root bag and the leaf bags:
\begin{equation*}
\begin{split}
\mathsf{Root}(\mathcal{T}_{H_i}) &= (\alpha_i, \beta_i), \\
\quad \mathsf{Leaves}(\mathcal{T}_{H_i}) &= (a_{(i-1)\ell_2 + 1},
b_{(i-1)\ell_2 + 1}, a_{(i-1)\ell_2 + 2}, b_{(i-1)\ell_2 + 2}, \dots, a_{i\ell_2}, b_{i\ell_2}).
\end{split}
\end{equation*}
We remark that the vertices $A_1, B_1, A_2, B_2, \dots, A_{\ell_1}, B_{\ell_1}$ form a half graph
in $G$.
Moreover, for each $i \in [1, \ell_1]$, the set of vertices $a_j, b_j$ for all $j \in [(i-1)\ell_2+1,
i\ell_2]$ forms a half graph in $H_i$.
We also note that in the sequence
$(a_1, b_1, a_2, b_2, \dots, a_{\ell_1\ell_2}, b_{\ell_1\ell_2})$, the vertices of $H_1$ form a prefix,
followed by the vertices of $H_2$, then $H_3$, and so on,
and a suffix of this sequence is the vertices of $H_{\ell_1}$.
We create a new undirected graph $U$, together with its tree decomposition $\mathcal{T}_U$,
in the following way (Figure \ref{combine-tw-algo-fig}):
\begin{enumerate}
\item We take the disjoint union of the graphs $G, H_1, \dots, H_{\ell_1}$, together with
the forest created by the disjoint union of the corresponding tree decompositions
$\mathcal{T}_G, \mathcal{T}_{H_1}, \mathcal{T}_{H_2}, \dots, \mathcal{T}_{H_{\ell_1}}$.
\item For each $i \in \{1, 2, \dots, \ell_1\}$, we fuse the vertices $A_i$ and $\alpha_i$, and
the vertices $B_i$ and $\beta_i$.
\item In the forest of tree decompositions,
for each $i \in \{1, 2, \dots, \ell_1\}$, we fuse the $i$-th leaf bag of $\mathcal{T}_G$
(containing vertices $A_i$ and $B_i$) with the root bag of $\mathcal{T}_{H_i}$ (containing
$\alpha_i$ and $\beta_i$).
This step is possible since $A_i = \alpha_i$ and $B_i = \beta_i$.
We call the resulting tree $\mathcal{T}_U$.
\end{enumerate}
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/tw-combine-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/tw-combine-b.tex}
(b)
\end{minipage}
\caption{(a) --- tree decompositions after Step 1 of the algorithm;
all the bags apart from the root and leaves have been omitted. \\
(b) --- the resulting tree decomposition $\mathcal{T}_U$.}
\label{combine-tw-algo-fig}
\end{figure}
It is straightforward to see that $\mathcal{T}_U$ is a tree decomposition of $U$,
and that its width remains equal to $t$.
In $U$, we can identify the subgraphs $G, H_1, \dots, H_{\ell_1}$, originating from the disjoint
union in Step 1.
We stress that for each $i \in [1, \ell_1]$, subgraphs $G$ and $H_i$ share two vertices ---
$A_i$ and $B_i$.
These two vertices form a bag separating $\mathcal{T}_G$ from $\mathcal{T}_{H_i}$.
This has a couple of consequences, directly implied by the properties of tree decompositions:
\begin{itemize}
\item If a simple path $P$ connects a vertex from $H_i$ with a vertex outside of $H_i$,
then $P$ must pass through one of the vertices $A_i$, $B_i$ (possibly both);
\item If a simple path $P$ has both endpoints in $H_i$, but contains a vertex outside of $H_i$,
then $P$ must pass through both $A_i$ and $B_i$.
\end{itemize}
We now proceed to proving all the distance equalities and inequalities required by the
definition of a distance-$d$ pairing decomposition.
\begin{claim}
\label{tw-claim-bottom-long-path}
For each $k \in [1, \ell_1]$, the vertices $A_k$ and $B_k$ are at distance $2d+2$
in $H_k$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
The set of neighbors of $A_k$ in $H_k$ is exactly
$\{a_j\,\mid\, j \in [(k-1)\ell_2+1,\,k\ell_2]\}$, while
the set of neighbors of $B_k$ in $H_k$ is
$\{b_i\,\mid\, i \in [(k-1)\ell_2+1,\,k\ell_2]\}$.
Hence, the second vertex on the shortest path from $A_k$ to $B_k$ in $H_k$
is $a_j$ for some $j \in [(k-1)\ell_2+1,\,k\ell_2]$,
while the penultimate vertex on this path is $b_i$
for some $i \in [(k-1)\ell_2+1,\,k\ell_2]$.
Since the vertices $a_i, b_i$ for $i \in [(k-1)\ell_2+1,\,k\ell_2]$ are in the distance-$d$ pairing
decomposition $\mathcal{T}_{H_k}$, we get that $\mathrm{dist}_{H_k}(b_i, a_j) = 2d$
if $i < j$; otherwise, this distance is larger than $2d$.
As $\ell_2 \geq 2$, the vertices $b_{k\ell_2-1}$ and $a_{k\ell_2}$ both belong to
$H_k$, and the distance between them is equal to $2d$.
Hence,
\[ \mathrm{dist}_{H_k}(A_k, B_k) = 2 + \min_{i, j \in [(k-1)\ell_2+1,\,k\ell_2]} \mathrm{dist}_{H_k} (b_i, a_j) = 2 +
\mathrm{dist}_{H_k}(b_{k\ell_2 - 1}, a_{k\ell_2}) = 2d + 2. \]
\end{claimproof}
\end{claim}
\begin{claim}
\label{tw-claim-top-same-dists}
For each pair of vertices $u, v \in V(G)$, we have that $\mathrm{dist}_U(u, v) = \mathrm{dist}_G(u, v)$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
We first note that for each $k \in [1, \ell_1]$, the vertices $A_k$ and $B_k$ are at distance
$2d - 1$ in $G$; this is because $\mathcal{T}_G$ is a distance-$(d-1)$ pairing decomposition
of $G$.
Let us fix two vertices $u, v \in V(G)$ and assume that the shortest path in $U$
between them passes through a vertex $x \not\in V(G)$.
Then, $x \in V(H_k)$ for some $k \in [1, \ell_1]$.
Hence, the path enters the subgraph $H_k$ through one of the vertices $A_k, B_k$,
passes through $x$, and then leaves this subgraph through the other of these vertices.
It means that this shortest path contains a subpath connecting $A_k$ and $B_k$ which
is fully contained within $H_k$.
By Claim \ref{tw-claim-bottom-long-path}, this subpath has length at least $2d + 2$,
and therefore it can be replaced by the shortest path in $G$ connecting $A_k$ and $B_k$,
which has length $2d - 1$.
Therefore, the considered path was not a shortest path in the first place --- a contradiction.
Hence, the shortest path between $u$ and $v$ lies fully within $G$ and thus
$\mathrm{dist}_U(u, v) = \mathrm{dist}_G(u, v)$.
\end{claimproof}
\end{claim}
Claim \ref{tw-claim-top-same-dists} significantly simplifies the structure of the distances
between the vertices of $U$;
no shortest path between a pair of vertices in $U$ can enter a subgraph $H_k$ for some
$k \in [1, \ell_1]$ and then leave it, since there exists a strictly shorter path between
these two vertices omitting this subgraph.
Also, as a corollary of Claim \ref{tw-claim-top-same-dists}, we note the following:
for each $k \in [1, \ell_1]$, we have that $\mathrm{dist}_U(A_k, B_k) = \mathrm{dist}_G(A_k, B_k) = 2d - 1$.
We will now prove a claim that will directly imply that $\mathcal{T}_U$ is a distance-$d$
pairing decomposition of $U$.
\begin{claim}
\label{tw-combined-distances}
For each pair of indices $i, j \in [1, \ell_1\ell_2]$, we have that
$$ \mathrm{dist}_U(b_i, a_j) = \begin{cases}
2d & \text{if }i < j, \\
2d+1 & \text{if }i \geq j.
\end{cases} $$
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Firstly, let us assume that $b_i$ and $a_j$
are located in the same subgraph $H_k$ of $U$ for some $k \in [1, \ell_1]$;
that is, $i, j \in [(k-1)\ell_2 + 1, k\ell_2]$.
The shortest path in $U$ between these two vertices will have one of the following shapes:
\begin{itemize}
\item The path is fully contained within $H_k$. In this case,
$$ \mathrm{dist}_U(b_i, a_j) = \mathrm{dist}_{H_k}(b_i, a_j) = \begin{cases}
2d & \text{if }i < j, \\
2d+1 & \text{if }i \geq j,
\end{cases} $$
as required.
\item The path leaves $H_k$ and then reenters this subgraph.
This would, however, require the path to contain a path between $A_k$ and $B_k$
as a subpath.
Since $\mathrm{dist}_U(A_k, B_k) = 2d - 1$, and neither $A_k$ nor $B_k$ can be an endpoint
of the considered path, we get that
$$ \mathrm{dist}_U(b_i, a_j) \geq 2 + \mathrm{dist}_U(A_k, B_k) \geq 2d + 1. $$
However, there exists a path of equal or shorter length contained within $H_k$.
\end{itemize}
Therefore, there is a shortest path between $b_i$ and $a_j$ that is fully contained
within $H_k$, which completes the proof in this case.
\vspace{0.5em}
Let us now assume that $a_i, b_i \in V(H_s)$ and $a_j, b_j \in V(H_t)$ for some
$s, t \in [1, \ell_1]$,
$s < t$, and let us compute the distances $\mathrm{dist}_U(b_i, a_j)$ and $\mathrm{dist}_U(b_j, a_i)$.
By the construction of $U$, we infer that $i < j$.
By our considerations above, we deduce that the shortest path from $b_i$ to $a_j$
originates in $H_s$, then enters $G$ through either of the vertices $A_s$, $B_s$,
then enters $H_t$ through either of the vertices $A_t$, $B_t$, and eventually
terminates in $H_t$ (Figure \ref{tw-shortest-paths-fig}).
The same applies to the shortest path from $b_j$ to $a_i$.
We will split this shortest path into three parts: the first part, terminating at either of
the vertices $A_s, B_s$; the second part, taking off from where the first path finished,
and continuing to either of the vertices $A_t, B_t$; and the final part, continuing until
the reaching $a_j$ or $b_j$.
If there are multiple possible partitions, we pick the split minimizing the length of the first
and the third part.
This ensures us that the first path is fully contained within $H_s$, and the final part is
fully contained within $H_t$.
Since $A_s, B_s, A_t, B_t \in V(G)$, Claim \ref{tw-claim-top-same-dists} asserts that
the second part of the path is also fully contained within $G$.
\begin{figure}[h]
\centering
\input{figures/tw-distances.tex}
\caption{The important vertices on the shortest path from $b_i$ to $a_j$, and
on the shortest path from $b_j$ to $a_j$.
The edges are labeled by the length of the shortest path between the connected vertices
or the lower bound on this length.}
\label{tw-shortest-paths-fig}
\end{figure}
Since $\mathcal{T}_{H_s}$ is a neighboring tree decomposition of $H_s$, we figure that
$$ \mathrm{dist}_{H_s}(a_i, A_s) = \mathrm{dist}_{H_s}(b_i, B_s) = 1, \quad \mathrm{dist}_{H_s}(a_i, B_s) \geq 2d+1, \quad
\mathrm{dist}_{H_s}(b_i, A_s) \geq 2d + 1. $$
Analogously, in $H_t$:
$$ \mathrm{dist}_{H_t}(a_j, A_t) = \mathrm{dist}_{H_t}(b_j, B_t) = 1, \quad \mathrm{dist}_{H_t}(a_j, B_t) \geq 2d+1, \quad
\mathrm{dist}_{H_t}(b_j, A_t) \geq 2d + 1. $$
Finally, in $G$, since $A_s \neq A_t$, we get that $\mathrm{dist}_G(A_s, A_t) \geq 1$; similarly,
$\mathrm{dist}_G(B_s, B_t) \geq 1$.
By the definition of $G$ (which has a distance-$(d-1)$ pairing decomposition)
and the fact that $s < t$, we infer that $\mathrm{dist}_G(B_s, A_t) = 2d - 2$
and $\mathrm{dist}_G(B_t, A_s) = 2d - 1$.
By verifying all possibilities, we can now conclude that (Figure \ref{tw-shortest-paths-fig}):
\begin{equation*}
\begin{split}
\mathrm{dist}_U(b_i, a_j) &= \min_{X_s \in \{A_s, B_s\}} \min_{X_t \in \{A_t, B_t\}}
\left[ \mathrm{dist}_{H_s}(b_i, X_s) + \mathrm{dist}_G(X_s, X_t) + \mathrm{dist}_{H_t}(X_t, a_j) \right] = \\
& = \mathrm{dist}_{H_s}(b_i, B_s) + \mathrm{dist}_G(B_s, A_t) + \mathrm{dist}_{H_t}(A_t, a_j) = 2d
\end{split}
\end{equation*}
and
\begin{equation*}
\begin{split}
\mathrm{dist}_U(a_i, b_j) &= \min_{X_s \in \{A_s, B_s\}} \min_{X_t \in \{A_t, B_t\}}
\left[ \mathrm{dist}_{H_s}(a_i, X_s) + \mathrm{dist}_G(X_s, X_t) + \mathrm{dist}_{H_t}(X_t, b_j) \right] = \\
& = \mathrm{dist}_{H_s}(a_i, A_s) + \mathrm{dist}_G(A_s, B_t) + \mathrm{dist}_{H_t}(B_t, b_j) = 2d + 1.
\end{split}
\end{equation*}
Hence, in this case, $i < j$ implies $\mathrm{dist}(b_i, a_j) = 2d$ and $\mathrm{dist}(b_j, a_i) = 2d+1$.
Therefore, the statement of the claim holds in this case as well.
\vspace{0.5em}
Since the statement of the claim is true for each choice of a pair of indices $i, j$ ---
no matter whether $b_i$ and $a_j$ are in the same subgraph $H_k$ for some $k$
or not --- the proof is complete.
\end{claimproof}
\end{claim}
Claim \ref{tw-combined-distances} directly proves the lemma.
Therefore, there exists a procedure constructing a distance-$d$ pairing decomposition
of $U$ of width $t$ and order $\ell_1\ell_2$.
\end{proof}
\end{lemma}
We will name the procedure described in Lemma \ref{tw-combine-lemma} as
$\mathsf{CombineNeighboring}$.
This procedure:
\begin{itemize}
\item takes a graph $G$, together with its distance-$(d-1)$ pairing decomposition $\mathcal{T}_G$
of order $\ell_1$ and width $t$;
\item and a graph $H$, together with its neighboring distance-$d$
pairing decomposition $\mathcal{T}_H$ of order $\ell_2$ and width $t$;
\item and produces a graph $U$ and its distance-$d$ decomposition $\mathcal{T}_U$
of order $\ell_1\ell_2$ and width $t$.
\end{itemize}
We apply this procedure in the following way:
$$ (U, \mathcal{T}_U) = \textsf{CombineNeighboring}((G, \mathcal{T}_G), (H, \mathcal{T}_H)). $$
We can now combine Lemmas \ref{make-neighboring-lemma} and \ref{tw-combine-lemma}
in order to produce an even stronger procedure combining two pairing decompositions:
\begin{corollary}
\label{combine-any-tw}
There exists a procedure $\sf{Combine}$, which for $d \geq 2$, $t \geq 3$,
$\ell_1, \ell_2 \geq 2$ takes:
\begin{itemize}
\item a graph $G$ with a distance-$(d-1)$ pairing decomposition $\mathcal{T}_G$
of order $\ell_1$ and width $t$, and
\item a graph $H$ with a distance-$d$ pairing decomposition $\mathcal{T}_H$
of order $\ell_2$ and width $t - 2$,
\end{itemize}
and constructs a graph with a distance-$d$ pairing decomposition
of order $\ell_1\ell_2$ and width $t$.
\begin{proof}
We set
$$ \mathsf{Combine}((G, \mathcal{T}_G), (H, \mathcal{T}_H)) = \mathsf{CombineNeighboring}(
(G, \mathcal{T}_G), \mathsf{MakeNeighboring}(H, \mathcal{T}_H)). $$
By Lemma \ref{make-neighboring-lemma}, $\mathsf{MakeNeighboring}(H, \mathcal{T}_H)$
is a graph with a distance-$d$ neighboring pairing decomposition of order
$\ell_2$ and width $t$.
By applying Lemma \ref{tw-combine-lemma} on $G$ and the newly produced graph,
we create a graph with a distance-$d$ pairing decomposition of
order $\ell_1\ell_2$ and width~$t$.
\end{proof}
\end{corollary}
Using this corollary, we will now produce huge pairing decompositions.
Precisely, for each pair of integers $d \geq 1$, $k \geq 1$, we will define
an undirected graph $G_{d,k}$, together with its distance-$d$ pairing decomposition
$\mathcal{T}_{d,k}$ of width $2k+1$.
Since the tree decomposition of the graph in Example \ref{pairing-td-example}
is distance-$1$ pairing and has width $3$, we shall take it as $\mathcal{T}_{1, 1}$, and the corresponding
graph as $G_{1,1}$.
The decomposition $\mathcal{T}_{1, 1}$ has order $2$.
For $d \geq 2$, we create the graph $G_{d, 1}$ and its distance-$d$ decomposition
$\mathcal{T}_{d, 1}$ from $G_{1,1}$ and $\mathcal{T}_{1,1}$ in the
following way: for each vertex $v \in \{a_1, b_1, a_2, b_2\}$, we append to the graph
a path of length $d - 1$ whose one endpoint is $v$, and the other endpoint is a new vertex
$v' \in \{a'_1, b'_1, a'_2, b'_2\}$.
We can easily create a distance-$d$ pairing
decomposition $\mathcal{T}_{d, 1}$ of $G_{d, 1}$ of width $3$ (Figure \ref{tw-longer-fig}).
We remark that $\mathcal{T}_{d, 1}$ also has order $2$.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/tw-longer-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/tw-longer-b.tex}
(b)
\end{minipage}
\caption{(a) --- the graph $G_{3, 1}$; (b) --- an example tree decomposition $T_{3, 1}$.}
\label{tw-longer-fig}
\end{figure}
Also, for $k \geq 2$, we create the graph $G_{1, k}$ and its distance-$1$ pairing
decomposition $\mathcal{T}_{1, k}$ from $G_{1,1}$ and $\mathcal{T}_{1,1}$ by adding $2(k-1)$
isolated vertices to $G_{1, 1}$, and appending each new vertex
to each bag of the decomposition $\mathcal{T}_{1, 1}$.
The resulting decomposition is obviously a distance-$1$ pairing decomposition of width
$2k+1$ and order $2$.
Eventually, for $d \geq 2$, $k \geq 2$, we create the graph $G_{d,k}$ and the corresponding
decomposition $\mathcal{T}_{d, k}$ by applying the procedure $\mathsf{Combine}$:
$$ (G_{d,k}, \mathcal{T}_{d, k}) := \mathsf{Combine}((G_{d-1,k}, \mathcal{T}_{d-1,k}), (G_{d,k-1}, \mathcal{T}_{d,k-1})). $$
We can easily verify that the input to this procedure complies with Corollary \ref{combine-any-tw},
and leads to the construction of a graph with a distance-$d$ pairing decomposition
of width $2k+1$,
whose order is equal to the product of the orders of $\mathcal{T}_{d-1, k}$ and $\mathcal{T}_{d, k-1}$.
\vspace{0.5em}
For $d, k \geq 1$ we set $\ell_{d, k}$ as the order of $\mathcal{T}_{d, k}$.
\begin{lemma}
\label{large-tw-order-lemma}
For each $d, k \geq 1$, the following holds:
$$ \ell_{d, k} = 2^{\displaystyle \binom{d + k - 2}{k - 1}}. $$
\begin{proof}
The formula can be directly verified for $d = 1$ and for $k = 1$.
For $d, k \geq 2$, we know that the order of $\mathcal{T}_{d, k}$ is the product of the orders of
$\mathcal{T}_{d-1, k}$ and $\mathcal{T}_{d, k-1}$.
Therefore, by applying a simple induction on $d$ and $k$, we compute that
\[
\log_2 \ell_{d, k} = \log_2 \ell_{d-1,k} + \log_2 \ell_{d, k-1} =
\binom{d + k - 3}{k - 1} + \binom{d + k - 3}{k - 2} = \binom{d + k - 2}{k - 1}.
\]
\end{proof}
\end{lemma}
Lemma \ref{large-tw-order-lemma} immediately leads to the following conclusion:
\begin{theorem}
\label{tw-lower-bound}
For every even $d \geq 2$ and odd $t \geq 3$, there exists a graph with
treewidth not exceeding $t$ that contains a distance-$d$ half graph of order
$$ 2^{\displaystyle \binom{\frac12(d + t - 5)}{\frac12(t-3)}}. $$
\begin{proof}
We consider the graph $G_{\frac{d}{2}, \frac{t-1}{2}}$ together with its distance-$\frac{d}{2}$
pairing decomposition $\mathcal{T}_{\frac{d}{2}, \frac{t-1}{2}}$.
The decomposition has order $\ell_{\frac{d}{2}, \frac{t-1}{2}}$
(Lemma \ref{large-tw-order-lemma}), which matches the formula in the statement
of the theorem; and width $t$, which ensures that the graph has treewidth not exceeding $t$.
Eventually, by the properties of pairing decompositions,
$\mathsf{Leaves}(\mathcal{T}_{\frac{d}{2}, \frac{t-1}{2}})$
is a distance-$d$ half graph of order $\ell_{\frac{d}{2}, \frac{t-1}{2}}$.
\end{proof}
\end{theorem}
We also remark the asymptotic version of this theorem.
\begin{corollary}
\label{tw-lower-bound-asym}
Fix $t \geq 3$.
Then for $d \geq 2$, the maximum order of a distance-$d$ half graph in the class
of graphs with treewidth at most $t$ is bounded from below by
$ 2^{\displaystyle d^{\Omega(t)}}. $
\end{corollary}
This discovery immediately leads to a lower bound in the class of $K_t$-minor-free graphs:
\begin{theorem}
\label{kt-lower-bound}
For every even $d \geq 2$ and odd $t \geq 5$, there exists a $K_t$-minor-free graph
containing a distance-$d$ half graph of order
$$ 2^{\displaystyle \binom{\frac12(d + t - 7)}{\frac12(t-5)}}. $$
\begin{proof}
Theorem \ref{tw-lower-bound} asserts the existence of a graph with treewidth not exceeding
$t-2$ containing a distance-$d$ half graph of order
$2^{\binom{\frac12(d + t - 7)}{\frac12(t-5)}}. $
By Theorem \ref{tw-minor-free}, this graph is $K_t$-minor-free.
\end{proof}
\end{theorem}
We immediately infer the following asymptotic result:
\begin{corollary}
\label{kt-lower-bound-asym}
Fix $t \geq 5$.
Then for $d \geq 2$, the maximum order of a distance-$d$ half graph in the class
of $K_t$-minor-free graphs is bounded from below by
$ 2^{\displaystyle d^{\Omega(t)}}. $
\end{corollary}
\section{Introduction}\label{introduction-chapter}
\input{introduction}
\section{Preliminaries}\label{preliminaries-chapter}
\input{preliminaries}
\section{Lower bounds on the orders of half graphs}\label{lower-bounds-chapter}
\input{lower-bounds}
\section{Polynomial bound on neighborhood complexity in planar graphs}\label{planar-neighborhood-chapter}
\label{noose-profile-lemma-section}
\input{planar-neighborhood}
\section{Upper bound on the orders of semi-ladders in planar graphs}
\label{planar-upper-bound-section}
\input{planar-upper-bound}
\section{Upper bounds in other classes of graphs}\label{other-upper-bounds-chapter}
\input{other-upper-bounds}
\section{Conclusions}\label{conclusions-chapter}
\input{conclusions}
\bibliographystyle{abbrv}
\subsection{Graphs of bounded degree}
\label{degree-up-section}
The following simple theorem presents an upper bound on the maximum semi-ladder order
in graphs with maximum degree bounded by $\Delta$.
The main idea of the proof is that in a distance-$d$ semi-ladder $a_1, a_2, \dots, a_\ell,
b_1, b_2, \dots, b_\ell$, vertex $b_1$ must remain at distance at most $d$
from vertices $a_2, a_3, \dots, a_\ell$.
\begin{theorem}
\label{degree-upper-bound}
For each $\Delta \geq 2$, $d \geq 1$,
the order of every distance-$d$ semi-ladder in a graph with maximum degree bounded by
$\Delta$ is bounded from above by $\Delta^d + 1$.
\begin{proof}
Fix a graph $G$ in which the maximum degree of a vertex is bounded from above by $\Delta$,
and let $a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$ be a distance-$d$ semi-ladder in $G$
of order $\ell \geq 2$.
By the properties of semi-ladders, we infer that for each $i \in \{2, 3, \dots, \ell\}$, we have that
$\mathrm{dist}(b_1, a_i) \leq d$ --- that is, there are $\ell - 1$ vertices (different than $b_1$)
in the distance-$d$ neighborhood of $b_1$.
Since each vertex $a_2, a_3, \dots, a_\ell$ is different than $b_1$
(by the definition of a distance-$d$ semi-ladder in Section \ref{preliminaries-chapter}),
it means that each of them is at distance at least $1$ and at most $d$ from $b_1$.
Obviously, there are at most $\Delta(\Delta - 1)^k$ vertices at distance exactly $k$
($k \geq 1$) from $b_1$.
Summing this over all $k \in \{1, 2, \dots, d\}$, we get that
\begin{equation*}
\begin{split}
\ell - 1 & \leq \sum_{k = 1}^d \Delta (\Delta - 1)^{k-1} = \Delta + (\Delta-1) \sum_{k=2}^d
\Delta(\Delta-1)^{k-2} \leq \Delta + (\Delta-1) \sum_{k=1}^{d-1} \Delta^k = \\
& = 1 + (\Delta - 1) \sum_{k=0}^{d-1} \Delta^k = 1 + \frac{\Delta^d - 1}{\Delta - 1}(\Delta - 1) =
\Delta^d.
\end{split}
\end{equation*}
\end{proof}
\end{theorem}
We contrast the $\Delta^d + 1$ upper bound with the $\left\lfloor\frac{\Delta}{2}\right\rfloor^{
\left\lceil \frac{d}{2} \right\rceil}$ lower bound (Theorem \ref{degree-lower-bound})
proved in Section \ref{lower-bounds-chapter}.
\subsection{Graphs with bounded pathwidth}
\label{pw-up-section}
We begin this section by reminding about a classic combinatorial result, first proved
by Erd\H{o}s and Rado \cite{sunflower_first}: the \textbf{Sunflower Lemma}.
\begin{definition}
\label{sunflower-def}
Suppose $\Omega$ is a universe and $\mathcal{F} = (F_1, F_2, \dots, F_n)$ is a family of
(not necessarily different) subsets of $\Omega$.
Then $\mathcal{F}$ is a \textbf{sunflower} if there exists a set $C$ (which we call the \textbf{core} of
the sunflower) such that for every two different indices $i, j \in [1, n]$, we have
$F_i \cap F_j = C$.
The \textbf{order} of a sunflower is the number of sets in it, that is, $|\mathcal{F}| = n$.
\end{definition}
\begin{theorem}[Sunflower Lemma]
\label{sunflower-lemma}
Let $\mathcal{G}$ be a family of $b!a^{b+1}$ (not necessarily different) subsets of $\Omega$
in which each subset has at most
$b$ elements. Then $\mathcal{G}$ contains a subfamily $\mathcal{F} \subseteq \mathcal{G}$ which
is a sunflower of order $a$.
\end{theorem}
The ``textbook proof'' of this lemma can be found e.g. in the book by Cygan et al.
\cite{ParamAlgo}.
\medskip
In order to prove an upper bound on the maximum semi-ladder order in the class of graphs with
bounded pathwidth, we first need to generalize the Sunflower Lemma.
\subsubsection*{Labeled Sunflower Lemma}
We wish to generalize the Sunflower Lemma (Theorem \ref{sunflower-lemma})
by allowing the sets in the family to assign \textbf{labels} to the elements of the set.
We first need to describe formally what this labeling means.
\begin{definition}
For a finite set of labels $\Sigma$ and a universe $\Omega$,
a \textbf{labeled subset} $A \subseteq \Omega$ over $\Sigma$
is a subset of $\Omega$ in which each element is also assigned a
label from $\Sigma$.
The \textbf{cardinality} of $A$ is the number of elements belonging to $A$.
In other words, a labeled subset is a partial function $A : \Omega \rightharpoonup \Sigma$,
and the cardinality of $A$ is the size of its domain.
\end{definition}
The definition of a sunflower now naturally generalizes to the families of labeled subsets:
\begin{definition}
For a finite set of labels $\Sigma$ and a universe $\Omega$, a family $\mathcal{F}$ of
(not necessarily different) labeled subsets of $\Omega$ over $\Sigma$ is a
\textbf{labeled sunflower} if:
\begin{itemize}
\item $\mathcal{F}$ is a sunflower (as in Definition \ref{sunflower-def}),
whose core we will call $C$, and
\item for each element $v \in C$, each labeled subset $A \in \mathcal{F}$ assigns the same label to $v$;
that is, for each $v \in C$, there exists a label $\rho \in \Sigma$ such that $A(v) = \rho$
for each $A\in\mathcal{F}$.
\end{itemize}
\end{definition}
It turns out that the textbook proof of the Sunflower Lemma \cite{ParamAlgo} can be
generalized to produce labeled sunflowers in a straightforward manner.
\begin{lemma}[Labeled Sunflower Lemma]
\label{labeled-sunflower-lemma}
For a finite set of labels $\Sigma$, a universe $\Omega$ and two integers $a \geq 1$,
$b \geq 0$, any family of $ab!(a|\Sigma|)^b$ (not necessarily different) labeled subsets of
$\Omega$ over $\Sigma$, each of cardinality at most $b$,
contains a labeled sunflower of order $a$ as a subset.
\begin{proof}
We apply an induction on $b$.
If $b = 0$, then the family contains at least $ab!(a|\Sigma|)^b = a$ empty sets and already
is a labeled sunflower.
Now, assume that $b \geq 1$, and let $\mathcal{F}$ be the family as in the statement of the lemma.
We consider two cases:
\begin{itemize}
\item There exists an element $v \in \Omega$ belonging to at least $(b-1)!(a|\Sigma|)^b$
labeled sets in~$\mathcal{F}$.
Hence, there exists a label $\rho \in \Sigma$ and a subfamily $\mathcal{F}' \subseteq \mathcal{F}$
such that we have $|\mathcal{F}'| \geq a(b-1)!(a|\Sigma|)^{b-1}$, and each set $A \in \mathcal{F}'$
contains $v$ and satisfies $A(v) = \rho$.
We create a modified universe $\Omega' := \Omega \setminus \{v\}$, and form a family
$\mathcal{F}''$ from $\mathcal{F}'$ by removing $v$ from each of the sets within $\mathcal{F}'$.
Then, Labeled Sunflower Lemma applies inductively to $\mathcal{F}''$ and parameters $a$ and $b-1$.
Hence, we can find a labeled sunflower $S$ of order $a$ as a subset of $\mathcal{F}''$.
By reintroducing $v$ to each of the sets in $S$, we find a labeled sunflower $S'$ of order $a$
as a subset of $\mathcal{F}'$.
\item Each element $v \in \Omega$ occurs in fewer than $(b-1)!(a|\Sigma|)^b$
labeled sets in $\mathcal{F}$.
Since $(b-1)!(a|\Sigma|)^b \leq \frac{1}{ab} |\mathcal{F}|$, we can find a family $\mathcal{G}$ of $a$ pairwise
disjoint labeled sets in $\mathcal{F}$ greedily.
In each of $a$ steps, we extend $\mathcal{G}$ by any labeled set $A \in \mathcal{F}$, and remove
from $\mathcal{F}$ all labeled sets intersecting $A$.
As each step removes at most $b!(a|\Sigma|)^b \leq \frac1a |\mathcal{F}|$ elements from $\mathcal{F}$,
we can see that this is a valid construction of $\mathcal{G}$.
Since the labeled sets in $\mathcal{G}$ are pairwise disjoint, they form a labeled sunflower.
\end{itemize}
In both cases, we construct a labeled sunflower of order $a$ as a subset of $\mathcal{F}$, so the
proof is complete.
\end{proof}
\end{lemma}
We remark that the lemma requires a relatively small multiplicative overhead on the size of
the initial family of subsets, compared to the original statement of the lemma (Theorem
\ref{sunflower-lemma}):
$$ \frac{ab!(a|\Sigma|)^b}{b!a^{b+1}} = |\Sigma|^b. $$
As a sidenote, there exists a simpler proof of a looser upper bound:
find a sunflower of order $a|\Sigma|^b$ using the sunflower lemma,
and then find a subset of this sunflower of order $a$ which is a~labeled sunflower
(which is an easy task since there are at most $|\Sigma|^b$ labelings of the core of the
sunflower).
This proof, however, requires the multiplicative overhead equal to $|\Sigma|^{b(b+1)}$
compared to the Sunflower Lemma.
If we used this version of the Labeled Sunflower Lemma later instead of the version
we have just proved in Lemma \ref{labeled-sunflower-lemma}, we would ultimately derive
the $d^{O(p^2)}p^{O(p)}$ upper bound on the maximum distance-$d$ semi-ladder size
in graphs with pathwidth bounded by $p$, which is unfortunately too high for our needs.
\subsubsection*{Upper bound proof}
In the first part of our proof, we will define a structure whose occurrence in a graph
proves that the graph both contains a large semi-ladder and has low pathwidth.
\begin{definition}
In a graph $G$, for $p, d, k, \ell \geq 1$,
a path decomposition $(W_1, W_2, \dots, W_k)$ of width $p$, together with $2\ell$
different vertices $a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$,
and $\ell$ different indices $t_1, t_2, \dots, t_\ell \in [1, k]$,
is a \textbf{distance-$d$ alignment} of order $\ell$ if:
\begin{itemize}
\item vertices $a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$ form a distance-$d$
semi-ladder in $G$;
\item vertices $a_1, a_2, \dots, a_\ell$ belong to the bags $W_{t_1}, W_{t_2}, \dots,
W_{t_\ell}$, respectively.
\end{itemize}
We denote a distance-$d$ alignment in the following way:
$$ \mathsf{Alignment}_d\left( (W_i)_{i=1}^k, (a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, (t_i)_{i=1}^\ell\right).$$
\end{definition}
We note that given a distance-$d$ alignment
$\mathsf{Alignment}_d\left( (W_i)_{i=1}^k, (a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, (t_i)_{i=1}^\ell\right)$,
one can easily take a subset of the underlying semi-ladder, given by indices
$i_1, i_2, \dots, i_m$ such that $1 \leq i_1 < i_2 < \dots < i_m \leq \ell$,
and form a distance-$d$ alignment with order $m$:
$\mathsf{Alignment}_d(\allowbreak
(W_i)_{i=1}^k, (a_{i_j})_{j=1}^m, (b_{i_j})_{j=1}^m, (t_{i_j})_{j=1}^\ell)$.
In our proof, we will transform a graph with bounded pathwidth, and containing a large distance
distance-$d$ semi-ladder, into a distance-$d$ alignment containing this semi-ladder.
Then, we will find a reasonably large subset of this alignment having necessary structural
properties.
The following definition formalizes these properties:
\begin{definition}
For $p, d, k, \ell \geq 1$, a distance-$d$ alignment of width $p$ and order $\ell$:
$$\mathsf{Alignment}_d(\allowbreak (W_i)_{i=1}^k, (a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, (t_i)_{i=1}^\ell)$$
is also a \textbf{distance-$d$ sunflower alignment} if the following additional
properties hold:
\begin{itemize}
\item bags $W_{t_1}, W_{t_2}, \dots, W_{t_\ell}$ form a sunflower, whose core we will
denote by $C$;
\item in $G$, the distance-$d$ profiles on $C$ are identical for each vertex
$a_1, a_2, \dots, a_\ell$.
\end{itemize}
We will refer to distance-$d$ sunflower alignment in the following way:
$$ \mathsf{SunflowerAlignment}_d\left( (W_i)_{i=1}^k, (a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell,
(t_i)_{i=1}^\ell\right).$$
The set $C$ is the \textbf{core} of the decomposition.
\end{definition}
We are now ready to find large distance-$d$ sunflower alignments in the graphs
with large distance-$d$ semi-ladders.
\begin{lemma}
\label{large-sunflower-lemma}
For $p, d, \ell \geq 1$,
every graph with pathwidth not exceeding $p$ and containing a semi-ladder of order
$\ell(p+1)! [\ell(d+2)]^{p+1}$
also contains a distance-$d$ sunflower path decomposition of order $\ell$.
\begin{proof}
Let $L := \ell(p+1)! [\ell(d+2)]^{p+1}$.
Fix a graph $G$, together with its distance-$d$ semi-ladder $a_1, a_2, \dots, a_L$,
$b_1, b_2, \dots, b_L$.
Since $\pw{G} \leq p$, there exists a path decomposition $W = (W_1, W_2, \dots,
W_k)$ of $G$ of width at most $p$; that is, we have $|W_i| \leq p + 1$ for each $i \in [1, k]$.
Moreover, we can assume that $W$ is a \textbf{nice path decomposition}; that is, we have
$W_1 = W_k = \varnothing$, and for
each index $i \in \{2, 3, \dots, k\}$, either of the following conditions is satisfied:
\begin{itemize}
\item $W_i$ \textbf{introduces} a vertex $v \in V(G)$; that is, $W_i = W_{i-1} \cup \{v\}$;
\item $W_i$ \textbf{forgets} a vertex $v \in V(G)$; that is, $W_i = W_{i-1} \setminus \{v\}$.
\end{itemize}
It can be easily shown that each path decomposition can be converted into a
nice path decomposition of the same width \cite{ParamAlgo},
so we can safely assume that $W$ is a nice path decomposition.
For each vertex $a_j$ ($1 \leq j \leq L$) of the semi-ladder, we can locate the bag
$W_{t_j}$ introducing $a_j$ to the decomposition.
Since the path decomposition is nice, the values $t_j$ are different for all $j \in [1, L]$.
Therefore, the following describes a distance-$d$ alignment of order $L$:
$$ \mathsf{Alignment}_d\left((W_i)_{i=1}^k, (a_i)_{i=1}^L, (b_i)_{i=1}^L, (t_i)_{i=1}^L \right). $$
We will now find a subset of this distance-$d$ alignment which is a distance-$d$
sunflower alignment.
We first create a family $\mathcal{F}$ of $L$ labeled subsets of $V(G)$ over $\{0, 1, 2, \dots, d, +\infty
\}$: for each $i \in [1, L]$, we let the $i$-th labeled subset in the family to be the bag
$W_{t_i}$ (containing the vertex $a_i$), where each vertex $v \in W_{t_i}$ has the label
$\pi_d[a_i, W_{t_i}](v)$.
Secondly, since each set in $\mathcal{F}$ contains at most $p + 1$ elements, the cardinality
of the set of labels is equal to $d + 2$, and $|\mathcal{F}| = L = \ell(p+1)! [\ell(d+2)]^{p+1}$,
we infer from the Labeled Sunflower Lemma
(Lemma \ref{labeled-sunflower-lemma}) that there exists a subfamily $\mathcal{F}' \subseteq \mathcal{F}$,
which is a labeled sunflower of order $\ell$.
Finally, we let $\mathcal{F}' = (W_{t_{i_1}}, W_{t_{i_2}}, \dots, W_{t_{i_\ell}})$ for $i_1 < i_2 < \dots < i_\ell$.
We can now easily verify that the following structure is a distance-$d$ sunflower alignment
of order $\ell$:
\[ \mathsf{SunflowerAlignment}_d\left( (W_j)_{j=1}^k, (a_{i_j})_{j=1}^\ell, (b_{i_j})_{j=1}^\ell,
(t_{i_j})_{j=1}^\ell \right). \]
\end{proof}
\end{lemma}
Now, it turns out that we can give an explicit upper bound on the order of every
distance-$d$ sunflower alignment:
\begin{lemma}
\label{no-large-sunflower-lemma}
For $d \geq 1$, no graph can contain a distance-$d$ sunflower alignment of order $2d + 3$.
\begin{proof}
Fix $\ell := 2d + 3$ and a graph $G$ containing a distance-$d$ sunflower alignment
of order $\ell$ and width $p$:
$$\mathsf{SunflowerAlignment}_d\left( (W_i)_{i=1}^k, (a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell,
(t_i)_{i=1}^\ell \right). $$
We will prove that the shortest path connecting $b_1$ with $a_i$ for some $i \in [2, \ell]$
has length greater than $d$, which contradicts the assumption that
$a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$ is a distance-$d$ semi-ladder.
Let $C$ be the core of the sunflower alignment.
Firstly, we will prove that no shortest path from $b_1$ to $a_i$ for $i \in [2, \ell]$ passes
through $C$.
Assume for contradiction that for some $i \in [2, \ell]$, the shortest path from $b_1$ to $a_i$
contains a vertex $x \in C$ (Figure \ref{pw-core-intersection-fig}).
Since $\mathrm{dist}(x, a_i) \leq d$ and $\pi_d[a_1, C] = \pi_d[a_i, C]$, we infer that the vertex $x$ is
equidistant from $a_1$ and $a_i$.
Hence,
$$ \mathrm{dist}(b_1, a_1) \leq \mathrm{dist}(b_1, x) + \mathrm{dist}(x, a_1) = \mathrm{dist}(b_1, x) + \mathrm{dist}(x, a_i) = \mathrm{dist}(b_1, a_i)
\leq d. $$
We have a contradiction as $\mathrm{dist}(b_1, a_1) > d$ is required by the definition of a semi-ladder.
We note that this fact means that, in particular, neither $b_1$ nor any of the vertices $a_2, a_3,
\dots, a_\ell$ belongs to $C$.
\begin{figure}[h]
\centering
\input{figures/pw-core-intersection.tex}
\caption{The setup in the proof that no shortest path from $b_1$ to $a_i$ intersects $C$.}
\label{pw-core-intersection-fig}
\end{figure}
Next, we arrange the vertices $a_2, a_3, \dots, a_\ell$ in the order in which they appear in $W$.
Formally, we define a permutation $\sigma = (\sigma_1, \sigma_2, \dots, \sigma_{\ell-1})$ of
$\{2, 3, \dots, \ell\}$ such that $t_{\sigma_1} < t_{\sigma_2} < \dots < t_{\sigma_{\ell - 1}}$.
This way, for each pair of indices $i, j$ ($i, j \in [1, \ell - 1]$) with $i < j$,
the bag $W_{t_{\sigma_i}}$ containing $a_{\sigma_i}$ appears earlier in $W$ than the
bag $W_{t_{\sigma_j}}$ containing $a_{\sigma_j}$ (as $t_{\sigma_i} < t_{\sigma_j}$).
Let us find the vertex $b_1$ in the path decomposition.
We already know that $b_1 \not\in C$.
Since $W_{t_{\sigma_{d+1}}} \cap W_{t_{\sigma_{d+2}}} = C$, we deduce that $b_1$ may
belong to at most one of the bags $W_{t_{\sigma_{d+1}}}$, $W_{t_{\sigma_{d+2}}}$.
As the definition of a path decomposition requires that $b_1$ belongs to the family of the
bags forming a subinterval of the path decomposition,
we get that at least one of the following cases is satisfied:
\begin{enumerate}[(a)]
\item $b_1$ does not belong to any of the bags
$W_1, W_2, W_3, \dots, W_{t_{\sigma_{d+1}}}$ of the decomposition;
\item $b_1$ does not belong any of the bags $W_{t_{\sigma_{d+2}}}, \dots,
W_{k-2}, W_{k-1}, W_k$ of the decomposition.
\end{enumerate}
As these cases are symmetrical, we assume without loss of generality that the case (a) holds.
With this assumption, we consider the shortest path between $b_1$ and $a_{\sigma_1}$.
We remark two facts about this path:
\begin{itemize}
\item it cannot pass through $C$, and
\item it has to intersect each of the bags $W_{t_{\sigma_1}}, W_{t_{\sigma_2}}, \dots,
W_{t_{\sigma_{d+1}}}$ of the decomposition
(since $t_{\sigma_1} < t_{\sigma_2} < \dots < t_{\sigma_{d+1}}$, and
$a_{\sigma_1} \in W_{t_{\sigma_1}}$).
\end{itemize}
Since each pair of the bags $W_{t_{\sigma_1}}, W_{t_{\sigma_2}}, \dots, W_{t_{\sigma_{d+1}}}$
intersects exactly at $C$, and the path cannot pass through $C$,
we conclude that the path has to intersect each $W_{t_{\sigma_1}},
W_{t_{\sigma_2}}, \dots, W_{t_{\sigma_{d+1}}}$ at a~different vertex.
By our assumption that case (a) holds, $b_1$ does not belong to any of these bags.
We conclude that the path must contain at least $d + 2$ vertices,
hence its length is at least $d+1$ --- a contradiction.
This contradiction completes the proof of the lemma.
\end{proof}
\end{lemma}
This fact immediately allows us to conclude with a concrete upper bound.
\begin{theorem}
\label{pw-upper-bound}
For $p \geq 1$, $d \geq 1$, no graph with pathwidth bounded from above by $p$
contains a distance-$d$ semi-ladder of order
$$ (2d + 3)(p + 1)! [(2d + 3)(d + 2)]^{p + 1}. $$
\begin{proof}
If a graph with pathwidth bounded by $p$ contained a distance-$d$ semi-ladder of this
order, it would also contain a distance-$d$ sunflower alignment of order
$2d + 3$ (Lemma~\ref{large-sunflower-lemma}).
However, by Lemma \ref{no-large-sunflower-lemma}, such an alignment cannot exist.
\end{proof}
\end{theorem}
We also remark the asymptotic version of this bound.
\begin{corollary}
\label{pw-upper-bound-asym}
There exists a constant $\delta > 0$ such that for each $p, d \geq 2$, the maximum order
of a distance-$d$ semi-ladder in the class of graphs with pathwidth bounded by $p$
is bounded from above by $(pd)^{\delta p}$.
\end{corollary}
We recall the construction attesting the $d^{\Omega(p)}$ lower bound in graphs
with pathwidth bounded by $p$ (Corollary \ref{pw-lower-bound-asym}).
\subsection{Graphs with bounded treewidth and minor-free graphs}
\label{kt-up-section}
In this part, we will prove an upper bound on the maximum order of a distance-$d$
semi-ladder in the class of graphs excluding $K_t$ as a minor; an analogous bound for graphs
with bounded treewidth will follow.
We begin by introducing two concepts of Sparsity that will become useful in the proof:
\textbf{weak coloring numbers} and \textbf{uniform quasi-wideness}.
\begin{definition}[weak coloring numbers]
\label{wcol-def}
We follow the definition by Zhu \cite{DBLP:journals/dm/Zhu09}.
Let $\Sigma_{V(G)}$ denote the set of all permutations of $V(G)$.
For a permutation $\sigma \in \Sigma_{V(G)}$ and two vertices $u, v \in V(G)$, we write
$u <_\sigma v$ if $u$ occurs in $\sigma$ before~$v$.
For a fixed distance $d \geq 1$, we say that $v$ is \textbf{weakly $d$-reachable} from $u$
with respect to $\sigma \in \Sigma_{V(G)}$ if $v \leq_\sigma u$ and
there exists a path of length at most $d$
connecting $u$ and $v$ such that $v$ is the minimum vertex on this path with respect to
$\sigma$.
We remark that $u$ is weakly $d$-reachable from itself for every $d \in \mathbb{N}$.
We denote the set of vertices weakly $d$-reachable from $u$ with respect to $\sigma$
as $\mathrm{WReach}_d[G, \sigma, u]$ (Figure \ref{weak-reach-def-fig}).
\begin{figure}[h]
\centering
\input{figures/weak-reach-def.tex}
\caption{An example setup. In a permutation $\sigma$, for a vertex $u$ (red),
$\mathrm{WReach}_4[G, \sigma, u] \setminus \{u\}$ is marked green.}
\label{weak-reach-def-fig}
\end{figure}
Given a graph $G$ and an order $\sigma \in \Sigma_{V(G)}$ we define the weak coloring number
of $G$ with respect to $\sigma$ as $$\wcol_d(G, \sigma) :=
\max_{u \in V(G)} \left|\mathrm{WReach}_d[G, \sigma, u]\right|.$$
Finally, given a graph $G$, we define the \textbf{weak coloring number} of $G$ as
$$\wcol_d(G) := \min_{\sigma \in \Sigma_{V(G)}} \wcol_d(G, \sigma).$$
\end{definition}
\begin{definition}[uniform quasi-wideness]
\label{uniform-quasi-wideness-def}
A class $\mathcal{C}$ of graphs is \textbf{uniformly quasi-wide} with margins $N\,:\,\mathbb{N}\times\mathbb{N}\to\mathbb{N}$ and
$s\,:\,\mathbb{N}\to\mathbb{N}$ if for every $m, d \geq 1$, graph $G\in\mathcal{C}$ and a subset $A$ of vertices such that
$|A| \geq N(m, d)$, there exists a set of vertices $S \subseteq V(G)$, $|S| \leq s(d)$ and
a~subset $B \subseteq A-S$, $|B| \geq m$, which is a distance-$d$ independent set in
$G - S$.
\end{definition}
It turns out that a subgraph-closed class $\mathcal{C}$ of graphs is uniformly quasi-wide for any margins
if and only if it is nowhere dense \cite{DBLP:journals/jsyml/NesetrilM10}.
For more properties and applications of uniform quasi-wideness, we refer to the lecture notes
from the University of Warsaw \cite{SparsityUWNotes}.
In this section, we may provide the margins $N, s$ as partial functions, defined only
for distances $d$ from an infinite subset $D \subsetneq \mathbb{N}$.
It is straightforward to see that these margins can be easily extended to total functions:
given $m, d \in N$, we set $d' := \min \{x \in D\,\mid\,x \geq d\}$, and we put
$N(m, d) := N(m, d')$ and $s(d) := s(d')$.
\medskip
In the proof of the upper bound for $K_t$-minor-free graphs,
we will use the upper bound by Fabiański et al.~\cite{fabiaski2018progressive},
applicable to every uniformly quasi-wide class of graphs:
\begin{lemma}[{{\cite[Lemma 29]{fabiaski2018progressive}}}]
\label{semi-ladder-from-uqw}
In every uniformly quasi-wide class of graphs $\mathcal{C}$ with margins $N\,:\,\mathbb{N} \times \mathbb{N} \to \mathbb{N}$ and
$s\,:\,\mathbb{N} \to \mathbb{N}$, each semi-ladder in every graph $G \in \mathcal{C}$ has its order bounded by
$N(2 \cdot (d + 2)^{s(2d)} + 1,\, 2d)$.
\end{lemma}
We will now prove that the class of $K_t$-minor-free graphs is uniformly quasi-wide by
utilizing the generalized coloring numbers.
Precisely, we will use the following upper bound on the weak coloring numbers in this class,
proved by van den Heuvel et al. \cite{DBLP:journals/endm/HeuvelMRS15}.
\begin{lemma}[\cite{DBLP:journals/endm/HeuvelMRS15}]
\label{kt-wcol-bound}
For $t \geq 4$ and any graph $G$ which excludes $K_t$ as a minor, we have that
$\wcol_d(G) \leq \binom{d+t-2}{t-2}(t - 3)(2d + 1)$.
\end{lemma}
We only need to prove that if a class has fairly low weak coloring numbers, then it is
also uniformly quasi-wide with reasonably low margins.
\begin{lemma}
\label{wcol-gives-uqw}
Assume that a class of graphs $\mathcal{C}$ has a finite weak coloring number
$wcol_d(\mathcal{C})$ for each $d \geq 1$.
Then $\mathcal{C}$ is also uniformly quasi-wide with margins
$$N(m, d) = (\wcol_d(\mathcal{C}))!\,(m+1)^{\wcol_d(\mathcal{C}) + 1}, \quad
s(d) = \wcol_d(\mathcal{C}) \quad \text{for each }d \geq 1,\, m \geq 2. $$
\begin{proof}
Fix integers $d \geq 1, m \geq 2$, a graph $G\in\mathcal{C}$, and a subset $A$ of the vertices of $G$
containing at least $N(m, d)$ vertices.
We will prove the lemma by showing that we can erase at most $\wcol_d(\mathcal{C})$ vertices
from $G$ in order to find a distance-$d$ independent set $B \subseteq A$
of size $m$ in the remaining part of the graph.
In $G$, we can find an ordering $\sigma$ of its vertices for which
$\wcol_d(G, \sigma) \leq \wcol_d(\mathcal{C})$.
Knowing that, we define a family $\mathcal{F}$ of subsets of vertices:
$$ \mathcal{F} := \{R_v\,\mid\, v \in S\} \qquad\text{where }R_v := \mathrm{WReach}_d[G, \sigma, v]
\text{ for } v \in S. $$
Since each set in the family contains at most $\wcol_d(\mathcal{C})$ elements and
$|\mathcal{F}| \geq N(m, d) = (\wcol_d(\mathcal{C}))!\,(m+1)^{\wcol_d(\mathcal{C}) + 1}$,
the Sunflower Lemma (Theorem \ref{sunflower-lemma})
lets us find a subfamily $\mathcal{F}' \subseteq \mathcal{F}$ which is a sunflower of order $m + 1$.
We let $\mathcal{F}' = \{R_{v_1}, R_{v_2}, \dots, R_{v_{m+1}}\}$ for $m+1$ different vertices
$v_1, v_2, \dots, v_{m+1}$. We denote the core of $\mathcal{F}'$ as $D$.
Without loss of generality, we assume that the vertices $v_1, v_2, \dots, v_{m+1}$ are ordered
decreasingly with respect to the order $\sigma$: $v_{m+1} <_\sigma v_m <_\sigma \dots
<_\sigma v_1$.
By the definition of weak reachability in Definition \ref{wcol-def},
for each $i \in [1, m + 1]$, $v_i$ is the maximum element of $R_{v_i}$
with respect to $\sigma$.
Since for $i \in [1, m]$ we have $v_i >_\sigma v_{m + 1}$, and the core $D$ must be a subset
of $R_{v_{m+1}}$, we infer that $v_i \not\in D$ for each $i \in [1, m]$.
Therefore, the set $\{v_1, v_2, \dots, v_m\}$ of vertices is disjoint with $D$.
We now focus on the sunflower $\mathcal{F}'' := \{R_{v_1}, R_{v_2}, \dots, R_{v_m}\}$ of order $m$,
whose core is naturally $D$.
Obviously, $|D| \leq \wcol_d(\mathcal{C})$.
We define the graph $G' := G - D$.
We will now prove that $\{v_1, v_2, \dots, v_m\}$ is a distance\nobreakdash-$d$
independent set in $G'$.
Assume for contradiction that there exists a path of length at most $d$ connecting two
different vertices of the set --- say, $v_i, v_j$ for two different indices $i, j \in [1, m]$.
Let $w_{\min}$ be the vertex on this path which is minimal with respect to $\sigma$.
This, however, implies that $w_{\min}$ belongs to both $\mathrm{WReach}_d[G, \sigma, v_i]$
and $\mathrm{WReach}_d[G, \sigma, v_j]$, and thus $w_{\min} \in R_{v_i} \cap R_{v_j}$.
Since $\mathcal{F}'' = \{R_{v_1}, R_{v_2}, \dots, R_{v_m}\}$, we infer that
$w_{\min}$ belongs to $D$ --- the core of $\mathcal{F}''$.
This is a contradiction since $D$ is disjoint with $G'$.
\end{proof}
\end{lemma}
We remark that a combination of Lemmas \ref{semi-ladder-from-uqw}, \ref{kt-wcol-bound} and
\ref{wcol-gives-uqw} can already provide us a concrete upper bound on the maximum
order of a distance-$d$ semi-ladder in the class of $K_t$-minor-free graphs.
However, the produced bound will be insufficient for our purposes --- it can be verified that
it would result in the $d^{O(d^{2t - 2})}$ upper bound for each fixed $t \geq 4$, while
we aim at the $d^{O(d^{t - 1})}$ bound.
In order to prove a tighter upper bound, we will improve the margins $N, s$ with which the
class of $K_t$-minor-free graphs is uniformly quasi-wide using the lemma below.
This lemma is inspired by Lemma 3.16 from the work of Nešetřil and Ossona de Mendez
\cite{DBLP:journals/jsyml/NesetrilM10}.
However, we significantly modified the original lemma in order to ensure a huge drop of the
margin $s$ while keeping the margin $N$ relatively low.
\begin{lemma}
\label{kt-reduce-uqw}
Fix $t \geq 4$. Assume that a class of graphs $\mathcal{C}$:
\begin{itemize}
\item excludes the complete bipartite graph $K_{t-1, t-1}$ as a minor, and
\item is uniformly quasi-wide with margins $N\,:\,\mathbb{N}\times \mathbb{N}\to\mathbb{N}$, $s\,:\,\mathbb{N}\to\mathbb{N}$.
\end{itemize}
Then $\mathcal{C}$ is also uniformly quasi-wide with margins $\widehat{N}\,:\,\mathbb{N} \times \mathbb{N} \to \mathbb{N}$
and $\widehat{s}\,:\,\mathbb{N} \to \mathbb{N}$, where $\widehat{s}$~is a constant function,
$\widehat{s} \equiv t - 2$, and
$$ \widehat{N}(m, 2d) = N\left(\binom{s(2d) + 1}{t - 1}(m+t),\,2d\right) \quad
\text{for each }m, d \geq 1.$$
\begin{proof}
\vspace{0.5em}
We fix a graph $G \in \mathcal{C}$, integers $m, d \geq 1$, and a set of vertices $A \subseteq V(G)$ of
size at least $\widehat{N}(m, 2d)$.
By our assumption, there exists a~subset $S \subseteq V(G)$ with $|S| \leq s(2d)$
and a~subset $B \subseteq A-S$ with $|B| \geq \binom{s(2d) + 1}{t - 1}(m+t)$
such that $B$ is a distance-$2d$ independent set in $G - S$.
Similarly to \cite[Lemma 3.16]{DBLP:journals/jsyml/NesetrilM10},
for each $v \in B$, we let $L_v$ to be a minimal subset of $S$
such that in $G - L_v$, there is no path of length $d$ or less from $v$
to any vertex from $S \setminus L_v$; such a subset exists since $S$ itself satisfies
this requirement.
Now, we will define a new set $L'_v$ in the following way:
if $|L_v| \leq t - 2$, then we set $L'_v := L_v$; otherwise, we take $L'_v$ to be any subset of
$L_v$ of size exactly $t - 1$.
Since $L'_v \subseteq S$, $|L'_v| \leq t - 1$ and $|S| \leq s(2d)$, we conclude that there
are at most
$$\binom{s(2d)}{0} + \binom{s(2d)}{1} + \dots + \binom{s(2d)}{t - 1} =\binom{s(2d) + 1}{t - 1}$$
different possible sets $L'_v$.
It follows that for some set $C \subseteq S$, $|C| \leq t - 1$, there are at least $m + t$
different vertices $v_1, v_2, \dots, v_{m + t}$ for which $L'_{v_1} = L'_{v_2} = \dots =
L'_{v_{m+t}} = C$.
We consider two cases, distinguished by the cardinality of $C$:
\begin{itemize}
\item If $|C| \leq t - 2$, then $L_{v_1} = L_{v_2} = \dots = L_{v_{m + t}} = C$.
Now, assume there are two different vertices $v_i, v_j$ ($i, j \in [1, m + t]$) at distance
at most $2d$ in $G - C$.
Since $v_i$ and $v_j$ are at distance greater than $2d$ in $G - S$, the shortest path
between these two vertices in $G - C$ must pass through some vertex $x \in S \setminus C$.
This, however, means that $x$ is at distance at most $d$ from one of the vertices $v_i$,
$v_j$ in $G - C$ --- a contradiction since $x \not\in L_{v_i}$ and $x \not\in L_{v_j}$.
Therefore, $\{v_1, v_2, \dots, v_{m+t}\}$ is a distance-$2d$ independent set in $G - C$,
where $|C| \leq t - 2$.
\item If $|C| = t - 1$, then we will find $K_{m + t, t - 1}$ as a minor in $G$, which will lead
to a contradiction with $G \in \mathcal{C}$.
Namely, for each $x \in \{v_1, v_2, \dots, v_{m+t}\}$, we construct a tree $Y_x$ rooted at $x$
with depth not exceeding $d$ whose set of leaves is $L_x$ and that does not contain
any other vertices of $S$.
Such a tree exists as the minimality of $L_x$ implies that for each $v \in L_x$,
the distance between $x$ and $v$ in $G - (L_x \setminus \{v\})$ does not exceed $d$.
We see that no pair of trees $Y_x$, $Y_y$ can intersect at any vertex outside of $S$
--- otherwise, we would be able to construct a path of length at most $2d$
between $x$ and $y$ avoiding $S$.
This is, of course, impossible as $x, y \in A$.
Finally, we can find $K_{m+t, t-1}$ as a minor of $G$ by contracting all subgraphs
$Y_x - S$ into single vertices, and then observing
that for each $x \in \{v_1, v_2, \dots, v_{m+t}\}$ and $y \in C$, the vertex $y$ is adjacent
to the contracted subgraph $Y_x - S$.
We have a contradiction since we assumed $G$ to be $K_{t-1, t-1}$-free.
\end{itemize}
\end{proof}
\end{lemma}
We remark that Lemma \ref{kt-reduce-uqw} also applies if $\mathcal{C}$ excludes $K_t$ as a minor
for some fixed $t \geq 4$, for such classes of graphs exclude $K_{t-1, t-1}$ as a minor as well.
With our additional lemma in hand, we can prove the following upper bound:
\begin{theorem}
\label{kt-upper-bound}
There exists a polynomial $p$ such that for $t \geq 4$, $d \geq 2$,
there is no distance-$d$ semi-ladder of order larger than
$$ d^{p(t) \cdot (2d+1)^{t-1}} $$
in any $K_t$-minor-free graph.
\begin{proof}
In this proof, $\poly(t)$ will denote any polynomial of $t$ with constant coefficients independent
on $d$ or $t$.
However, each occurrence of this term in any equation might mean a different polynomial.
Fix $t \geq 4$ and $d \geq 2$, and consider the class $\mathcal{C}$ of graphs excluding $K_t$ as
a minor.
We first bound the weak coloring number of $\mathcal{C}$ using Theorem \ref{kt-wcol-bound}:
\begin{equation}
\label{kt-wcol-ineq}
\begin{split}
\wcol_d(\mathcal{C}) &\leq \binom{d + t - 2}{t - 2}(t - 3)(2d + 1) =
\frac{(d + 1)(d + 2) \dots (d+t-2)}{(t - 2)!} (t - 3)(2d + 1) = \\
&= \frac{d+1}{1} \cdot \frac{d+2}{2} \cdot \ldots \cdot \frac{d+t-2}{t-2} \cdot
(t - 3)(2d + 1) \leq \\ &\leq (d + 1)^{t-2}(t-3)(2d+1) \leq
\poly(t) \cdot (d + 1)^{t - 1}.
\end{split}
\end{equation}
By Lemma \ref{wcol-gives-uqw}, $\mathcal{C}$ is uniformly quasi-wide with margins
\begin{equation}
\label{kt-init-nmd-ineq}
\begin{split}
N(m, d) & = (\wcol_d(\mathcal{C}))!(m + 1)^{\wcol_d(\mathcal{C}) + 1} \leq
[(m + 1)\wcol_d(\mathcal{C})]^{\wcol_d(\mathcal{C}) + 1} = \\
& \stackrel{(\ref{kt-wcol-ineq})}{=}
[m \cdot \poly(t) \cdot (d + 1)^{t - 1}]^{\poly(t) \cdot (d + 1)^{t - 1}} \leq
(md)^{\poly(t) \cdot (d + 1)^{t - 1}}
\end{split}
\end{equation}
and
\begin{equation}
\label{kt-init-sd-ineq}
s(d) = \wcol_d(\mathcal{C}) \stackrel{(\ref{kt-wcol-ineq})}{\leq} \poly(t) \cdot (d + 1)^{t - 1}.
\end{equation}
In order to apply Lemma \ref{kt-reduce-uqw}, we first bound the following expression for
$m \geq 1$:
\begin{equation}
\label{kt-init-binom-ineq}
\begin{split}
\binom{s(2d) + 1}{t - 1}(m + t) & \leq
[s(2d) + 1]^{t - 1} (m + t) \stackrel{(\ref{kt-init-sd-ineq})}{\leq}
[\poly(t) \cdot (2d + 1)]^{(t - 1)^2} (m + t) \leq \\
& \leq m \cdot [d \cdot \poly(t)]^{(t - 1)^2}.
\end{split}
\end{equation}
Now, we get that $\mathcal{C}$ is also uniformly quasi-wide with margins $\widehat{s} \equiv t - 2$ and
\begin{equation}
\label{kt-later-nmd-ineq}
\begin{split}
\widehat{N}(m, 2d) & = N\left(\binom{s(2d) + 1}{t - 1}(m+t),\,2d\right)
\stackrel{(\ref{kt-init-binom-ineq})}{\leq}
N\left(m \cdot [d \cdot \poly(t)]^{(t - 1)^2},\, 2d\right) \leq \\
& \stackrel{(\ref{kt-init-nmd-ineq})}{\leq}
\left\{ m \cdot [d \cdot \poly(t)]^{(t - 1)^2} \cdot 2d \right\}^{\poly(t) \cdot
(2d + 1)^{t - 1}} \leq (md)^{\poly(t) \cdot (2d + 1)^{t - 1}}.
\end{split}
\end{equation}
Finally, we apply Lemma \ref{semi-ladder-from-uqw} and infer that the maximum order
of any distance-$d$ semi-ladder is bounded from above by
$$ \widehat{N}\left(2 \cdot (d + 2)^{t - 2} + 1, 2d\right) \stackrel{(\ref{kt-later-nmd-ineq})}{\leq}
d^{\poly(t) \cdot (2d + 1)^{t - 1}}. $$
Hence, there exists a polynomial $p$ for which this maximum order is bounded from
above by $d^{p(t) \cdot (2d+1)^{t - 1}}$ for all $t \geq 4$, $d \geq 2$.
\end{proof}
\end{theorem}
We also infer the following asymptotic version of Theorem \ref{kt-upper-bound}:
\begin{corollary}
\label{kt-upper-bound-asym}
For each fixed $t \geq 4$, the maximum order of a distance-$d$ semi-ladder in the class
of graphs excluding $K_t$ as a minor is bounded from above by $d^{O(d^{t - 1})}$.
\end{corollary}
We contrast this result with the $2^{d^{\Omega(t)}}$ lower bound
(Corollary \ref{kt-lower-bound-asym}) in the class of $K_t$-minor-free graphs.
\medskip
By Theorem \ref{tw-minor-free}
(each graph $G$ with $\tw(G) \leq t$ is also $K_{t+2}$-minor-free),
we immediately prove the following result from Corollary \ref{kt-upper-bound-asym}:
\begin{corollary}
\label{tw-upper-bound-asym}
For each fixed $t \geq 2$, the maximum order of a semi-ladder in the class of graphs with
treewidth not exceeding $t$ is bounded from above by $d^{O(d^{t + 1})}$.
\end{corollary}
Similarly, we recall the $2^{d^{\Omega(t)}}$ lower bound on the maximum order
of distance-$d$ semi-ladders in the class of graphs with treewidth bounded by $t$
(Corollary \ref{tw-lower-bound-asym}).
\subsection{Statement of the Noose Profile Lemma}
In order to state Noose Profile Lemma, we first need to define nooses in plane graphs.
\begin{definition}
For any graph $G$ embedded in the plane,
a {\bf noose} is a closed curve in the plane that passes through vertices and faces of this graph
that does not intersect itself or the interiors of any edges.
Note that this definition disallows the curve to pass through any vertex multiple times.
\end{definition}
We let the \textbf{length} of a noose to be the number of vertices on it.
For any noose $\mathcal{L}$ in a plane graph $G$, we define the set of vertices on the noose $V(\mathcal{L})$.
Moreover, for each $v \in V(G)$, we define the distance-$d$ profile of $v$ on $\mathcal{L}$ in $G$:
$\pi_d[v, \mathcal{L}] := \pi_d[v, V(\mathcal{L})]$.
Also, we define the subgraph $G_\mathcal{L}$ as the graph containing all vertices and edges
within the bounded closed region whose boundary is $\mathcal{L}$ (Figure \ref{gl-subgraph-fig}).
The vertices and edges of $G_\mathcal{L}$ are said to be \textbf{enclosed} by~$\mathcal{L}$.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/gl-subgraph-def-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/gl-subgraph-def-b.tex}
(b)
\end{minipage}
\caption{(a) --- an example graph $G$ with a noose $\mathcal{L}$ (blue); (b) --- the graph $G_\mathcal{L}$,
with $V(\mathcal{L})$ marked red.}
\label{gl-subgraph-fig}
\end{figure}
We are now ready to present the lemma in question:
\begin{theorem}[Noose Profile Lemma]
\label{noose-profile-lemma}
Consider any graph $G$ together with its embedding in the plane, and fix any noose
$\mathcal{L}$ containing $c \geq 1$ vertices of $G$.
The set $\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V(G_\mathcal{L})\}$
of different distance-$d$ profiles on $\mathcal{L}$,
measured from the vertices enclosed by $\mathcal{L}$,
has at most $c^3 (d+2)^4$ elements.
\end{theorem}
We remark that if $c$ is bounded by a polynomial of $d$, then the theorem above implies
that the number of distance-$d$ profiles on $\mathcal{L}$ is also
polynomially bounded on $d$.
Subsections \ref{closeness-def-section} through \ref{noose-profile-lemma-conclusion-subsection} are devoted to the proof of the lemma.
\subsection{Definition and properties of closeness}
\label{closeness-def-section}
Let us first describe some helpful notation.
For a closed region $\Omega \subseteq \mathbb{R}^2$ of the plane,
we denote $\partial \Omega$ as the topological boundary of $\Omega$,
and $\Int\Omega$ as its interior.
We also introduce the following majorization relation on distance-$d$ profiles in $G$:
\begin{definition}
For a graph $G$, a subset of vertices $S \subseteq V(G)$, and two vertices
$s, t \in V(G)$, we say that the distance-$d$ profile $\pi_d[s, S]$ {\bf majorizes} $\pi_d[t, S]$ if
$\pi_d[s, S](v) \geq \pi_d[t, S](v)$ for all $v \in S$.
We denote this partial order as $\pi_d[s, S] \succcurlyeq \pi_d[t, S]$.
\end{definition}
As in the statement of the lemma, fix any graph $G$ and a noose $\mathcal{L}$.
Let $v_1, v_2, \dots, v_c$ be the vertices of $\mathcal{L}$, listed
in the clockwise order.
For simplicity, we set $v_0 = v_c$ and $v_{c+1} = v_1$.
Let also $\mathcal{L}[i, j] \subseteq \mathcal{L}$
be the curve from $v_i$ to $v_j$ following the noose clockwise.
That is, $\mathcal{L}[i, j]$ contains vertices $v_i, v_{i+1}, \dots, v_j$ in this order if $i \leq j$,
and $v_i, v_{i+1}, \dots, v_c, v_1, v_2, \dots, v_j$ otherwise.
Moreover, let $\mathcal{L}(i, j) := \mathcal{L}[i, j] \setminus
\{v_i, v_j\}$.
Let us say that a vertex $s \in V(G_\mathcal{L})$ is \textbf{close} to a vertex $v_i \in \mathcal{L}$ if the distance
between these two vertices in $G$ does not exceed $d$, and no shortest path connecting
$v_i$ and $s$ contains any vertex from $\mathcal{L}$ as an internal vertex.
Otherwise, we say that $s$ is \textbf{far} from $v_i$.
For such vertex $s$ we also set $\mathrm{Close}(s) = \{v \in \mathcal{L}\,\mid\,
s\text{ is close to }v\}$.
\begin{lemma}
\label{lemma-majorization-close}
If for any two vertices $s, t \in V(G_\mathcal{L})$ we have $\pi_d[s, \mathrm{Close}(s)] \succcurlyeq
\pi_d[t, \mathrm{Close}(s)]$, then $\pi_d[s, \mathcal{L}] \succcurlyeq \pi_d[t, \mathcal{L}]$.
\begin{proof}
Take any $v \in \mathcal{L}$. If also $v \in \mathrm{Close}(s)$, then
$$ \pi_d[s, \mathcal{L}](v) = \pi_d[s, \mathrm{Close}(s)](v) \geq
\pi_d[t, \mathrm{Close}(s)](v) = \pi_d[s, \mathcal{L}](v). $$
If however $v \not\in \mathrm{Close}(s)$, then either of the following cases holds:
\begin{itemize}
\item The distance between $s$ and $v$ is longer than $d$.
In this case, $\pi_d[s, \mathcal{L}](v) = +\infty \geq \pi_d[t, \mathcal{L}](v)$.
\item The shortest path between $s$ and $v$ has length at most $d$, and
some such shortest path passes through another vertex of $\mathcal{L}$.
Pick a vertex of the noose $v' \in \mathcal{L}$ on any such shortest path.
In case there are multiple such vertices, we pick any vertex minimizing its distance from $s$.
As no shortest path between $s$ and $v'$ contains any other vertex of $\mathcal{L}$
(otherwise, such vertex would be even closer to $s$),
we have that $v' \in \mathrm{Close}(s)$.
Hence,
\begin{equation*}
\begin{split}
\pi_d[s, \mathcal{L}](v) &= \mathrm{dist}(s, v) = \mathrm{dist}(s, v') + \mathrm{dist}(v', v) = \pi_d[s, \mathrm{Close}(s)](v') +
\mathrm{dist}(v', v) \geq \\ &\geq \pi_d[t, \mathrm{Close}(s)](v') + \mathrm{dist}(v', v) =
\mathrm{dist}(t, v') + \mathrm{dist}(v', v) \geq \\
&\geq \mathrm{dist}(t, v) = \pi_d[t, \mathcal{L}](v).
\end{split}
\end{equation*}
\end{itemize}
In all cases, we proved that $\pi_d[s, \mathcal{L}](v) \geq \pi_d[t, \mathcal{L}](v)$.
Thus, $\pi_d[s, \mathcal{L}] \succcurlyeq \pi_d[t, \mathcal{L}]$.
\end{proof}
\end{lemma}
This immediately leads to the following corollary:
\begin{corollary}
\label{only-close-profile}
If for any two vertices $s, t \in V(G_\mathcal{L})$ we have $\mathrm{Close}(s) = \mathrm{Close}(t)$
and $\pi_d[s, \mathrm{Close}(s)] = \pi_d[t, \mathrm{Close}(t)]$, then
$\pi_d[s, \mathcal{L}] = \pi_d[t, \mathcal{L}]$.
\end{corollary}
Hence, $\pi_d[s, \mathcal{L}]$ can be uniquely deduced from the distances between $s$ and
each vertex from $\mathrm{Close}(s)$.
This allows us to safely replace the graph $G$ with $G_\mathcal{L}$ (that is, to remove
all vertices and edges not enclosed by $\mathcal{L}$); this replacement does not change
$\mathrm{Close}(s)$ or any of the distances to the close vertices.
\vspace{1em}
In $G_\mathcal{L}$, let
$\mathcal{C}_i := \{s \in V(G_\mathcal{L})\,\mid\, |\mathrm{Close}(s)| = i\}$.
First, we examine the behavior of the vertices from $\mathcal{C}_0$ and $\mathcal{C}_1$.
Note that $\mathcal{L} \subseteq \mathcal{C}_1$.
\begin{lemma}
There are at most $c(d + 1) + 1$ distinct distance-$d$ profiles on $\mathcal{L}$ measured
from the vertices in $\mathcal{C}_0 \cup \mathcal{C}_1$.
\begin{proof}
Obviously, no vertex from $\mathcal{C}_0$ can reach $\mathcal{L}$ by a path consisting
of at most $d$ edges,
so each such vertex generates the same distance-$d$ profile on $\mathcal{L}$:
the constant function $\lambda v.(+\infty)$.
Now consider any vertex $s \in \mathcal{C}_1$. Its distance-$d$ profile on $\mathcal{L}$
can be unambiguously deduced from the only vertex $v_i \in \mathrm{Close}(s)$
and the distance $\mathrm{dist}(s, v_i) \in [0, d]$ (Corollary \ref{only-close-profile}).
This leads to a maximum of $c(d + 1)$ distinct profiles created by $\mathcal{C}_1$.
Hence, at most $c(d+1) + 1$ distinct distance-$d$ profiles can be generated by the
vertices in $\mathcal{C}_0 \cup \mathcal{C}_1$.
\end{proof}
\end{lemma}
From now on, we only consider remaining vertices.
\subsection{Rightmost shortest paths}
We will now extend slightly the definitions by Klein \cite{10.5555/1070432.1070454}.
\begin{definition}
\label{left-of-def}
Fix any vertex $v \in \mathcal{L}$.
We define a strict partial order $\ll$ on oriented paths originating from $v$, but not necessarily
terminating at the same vertex.
We say that $P_1 \ll P_2$ (or: \textbf{''$P_1$ is left of $P_2$''}) if:
\begin{itemize}
\item neither of the paths is a prefix of another,
\item $P_1$ and $P_2$ have a common prefix $x_1, x_2, \dots, x_k$, where $v = x_1$,
\item $P_i$ contains an oriented edge $x_k \to w_i$ for $i = 1, 2$,
\item edge $x_k \to w_1$ is ``to the left'' of edge $x_k \to w_2$; formally,
edges $x_kx_{k-1}$, $x_kw_1$ and $x_kw_2$ are in the clockwise order around $x_k$
(Figure \ref{figure-to-the-left}(a)).
However, if $k = 1$, the paths do not contain $x_0$.
In order to cope with this problem, we imagine an auxiliary vertex $x_0$
outside of the region enclosed by
$\mathcal{L}$ and connect it by an edge to $x_1$, placed
strictly outside of this region (Figure \ref{figure-to-the-left}(b)).
\end{itemize}
We can also interchangeably say $P_2 \gg P_1$ (or: \textbf{``$P_2$ is right of $P_1$''}.)
\end{definition}
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/to-the-left-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/to-the-left-b.tex}
(b)
\end{minipage}
\caption{(a) --- the path containing $w_1$ is to the left of the path containing $w_2$. \\
(b) --- if the first edges of two compared paths differ, we imagine an auxiliary vertex
$x_0$ and an auxiliary edge $x_0x_1$ which we prepend to both paths.
We then compare the paths as in (a).}
\label{figure-to-the-left}
\end{figure}
The relation $\ll$ was defined in \cite{10.5555/1070432.1070454}
only between the simple paths originating at $v$ and terminating at a fixed vertex $s$.
Then $\ll$ is a linear order.
In that setup, if $v$ and $s$ are in the same connected component of the graph,
this relation limited only to the shortest paths between $v$ and $s$ contains the
maximal element $P_{v, s}$, which we call the \textbf{rightmost shortest path}.
However, Definition \ref{left-of-def} naturally extends $\ll$ to any two paths $P_1$, $P_2$ which both originate
at $v$ and neither is a prefix of the other, but which do not have to terminate at the
same vertex.
We also define the rightmost shortest path tree rooted at $v$ as in
\cite{10.5555/1070432.1070454}.
Notably, for any vertex $s$ of the tree, the path between $v$ and $s$ in this tree is $P_{v, s}$.
Obviously, if $v \in \mathcal{L}$ and for some vertices $a, b \in V(G_\mathcal{L})$,
$a$ belongs to $P_{v, b}$, then $P_{v, a} = P_{v, b}[v, a]$.
Moreover, for $v \in \mathcal{L}$ and $s \in V(G_\mathcal{L})$, we obviously have that
$\mathrm{len}(P_{v,s}) = \mathrm{dist}(v, s)$.
\begin{lemma}
\label{prefix-paths}
For any two distinct vertices $s, t \in \mathcal{L}$, paths
$P_{a,s}$ and $P_{a,t}$ share a common prefix and are vertex-disjoint after removing
this prefix.
\begin{proof}
Consider the rightmost shortest path tree rooted at $a$.
The tree contains paths $P_{a,s}$ and $P_{a,t}$.
The root $a$ belongs to both paths, hence they both
must intersect at a common prefix and nowhere else.
\end{proof}
\end{lemma}
\begin{lemma}
\label{suffix-paths}
Fix any $a, b \in \mathcal{L}$ and $s \in V(G_\mathcal{L}) \setminus V(\mathcal{L})$
such that $a, b \in \mathrm{Close}(s)$.
Paths $P_{a,s}$ and $P_{b,s}$ share a common suffix as a subpath, and
are vertex-disjoint after removing this suffix.
\begin{proof}
Take the first vertex $x \in P_{a,s} \cap P_{b,s}$ on the path between $a$ and $s$,
that is, the one minimizing $\mathrm{dist}(x, a)$.
If $x = s$, we are done.
In the opposite case, we set $a^*$ and $b^*$ as the next vertices after $x$ on the paths
$P_{a,s}$ and $P_{b,s}$, respectively.
Moreover, we set $a_p$ and $b_p$ as the last vertices before $x$ on these paths.
Vertices $a_p$ and $b_p$ exist since $P_{a,s}$ cannot pass through $b$ (otherwise,
$s$ would not be close to $a$), and similarly $P_{b,s}$ cannot pass through $a$.
Hence, $x \not \in \{a, b\}$ --- that is, $x$ cannot be the initial vertex of either
of these paths.
Obviously, the length of each of the paths $P_{a,s}[x,s]$ and $P_{b,s}[x,s]$
must be the same, otherwise we would be able to swap one of the suffixes with another
in one of the paths $P_{a,s}, P_{b,s}$, reducing its length.
This is, however, impossible as we require $P_{a,s}$ and $P_{b,s}$ to be the
shortest paths connecting the corresponding pairs of vertices.
Also, note that paths $P_{a,x}$ and $P_{b,x}$ are vertex-disjoint apart from their common
endpoint $x$.
Consider the closed region $\Omega$ bounded by $P_{a,x}$, $P_{b,x}$ and the part of
the noose between $a$ and $b$ --- either $\mathcal{L}[a, b]$ or $\mathcal{L}[b, a]$ ---
chosen so that $s \in \Int\Omega$.
(Obviously, $s$ cannot belong to $\mathcal{L}$, $P_{a,x}$ or $P_{b,x}$.)
Assume now that $a^* \not\in \Omega$ (Figure \ref{figure-suffix-paths}(a)).
Then, the path $P_{a, s}[a^*, s]$ must intersect $\partial \Omega$.
Hence, one of the following cases occurs:
\begin{itemize}
\item The path intersects $P_{a,x}$ (Figure \ref{figure-suffix-paths}(b)).
In this case, the path $P_{a, s}$ would intersect itself.
\item The path intersects $P_{b,x}$ at some point $y \neq x$
(Figure \ref{figure-suffix-paths}(c)).
In this case, $P_{a,s}$ contains vertices
$x, y$ in this order, while $P_{b, s}$ contains these vertices in the opposite order.
Hence,
$$ \mathrm{len}(P_{a,s}[y, s]) < \mathrm{len}(P_{a,s}[x, s]) = \mathrm{len}(P_{b,s}[x, s]) < \mathrm{len}(P_{b,s}[y, s]). $$
Therefore, $P_{b,s}$ could be shortened by replacing its suffix $P_{b,s}[y, s]$ by
$P_{a, s}[y, s]$.
\item The path enters $\Omega$ through an edge whose either endpoint is in
$\mathcal{L} \setminus \{a, b\}$.
This is impossible as this edge would not be enclosed
by the noose and therefore would not belong to $G_\mathcal{L}$.
\end{itemize}
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/suffix-paths-fig-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/suffix-paths-fig-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/suffix-paths-fig-c.tex}
(c)
\end{minipage}
\caption{(a) --- an example setup. The noose $\mathcal{L}$ is a gray dashed circle.
The region $\Omega$ is shaded.
Green path is $P_{b,s}$, and the blue path is the prefix of $P_{a,s}$. \\
(b) --- a case where $P_{a,s}[a^*, s]$ intersects $P_{a,x}$. \\
(c) --- a case where $P_{a,s}[a^*, s]$ intersects $P_{b,x}$.}
\label{figure-suffix-paths}
\end{figure}
We arrived at a contradiction in each of the cases above.
Therefore $a^* \in \Omega$, and analogously $b^* \in \Omega$.
Assume now that $a^* \neq b^*$.
Then, we remind that $P_{a,s}$ is rightmost among all shortest paths from $a$ to $s$.
Consider the path $Q_a = P_{a,x} \cdot P_{b,s}[x, s]$.
As $\mathrm{len}(P_{a, s}[x, s]) = \mathrm{len}(P_{b, s}[x, s])$, we also have that
$\mathrm{len}(Q_a) = \mathrm{len}(P_{a, s})$.
Since $Q_a \neq P_{a, s}$, we get that $Q_a \ll P_{a,s}$.
Notice that $a_p$ and $x$ are two last common vertices of $Q_a$ and $P_{a,s}$, while
$b^*$ is the first vertex of $Q_a$ not belonging to $P_{a,s}$, and
$a^*$ is the first vertex of $P_{a,s}$ not belonging to $Q_a$.
By the definition of $\ll$, edges $xa_p$, $xb^*$ and $xa^*$
form a clockwise order around $x$.
We similarly deduce that edges $xb_p$, $xa^*$ and $xb^*$ form
a clockwise order around $x$.
This implies the clockwise order of four edges around $x$: $xa_p, xb^*, xb_p, xa^*$.
As $a_px$ and $xb_p$ are two consecutive edges on the boundary of $\Omega$,
we conclude that this boundary separates $a^*$ and $b^*$.
That is however impossible as $a^*, b^* \in \Omega$.
From the contradiction above, $a^* = b^*$.
This means that $P_{a,s}$ and $P_{b,s}$ share an oriented edge $xa^*$.
We now prove that they must share the remaining suffix of the path from $x$ to $s$.
Otherwise, there would be an oriented edge $fg$ shared by both $P_{a,s}$ and $P_{b,s}$,
followed by an oriented edge $gh_a$ in $P_{a,s}$, and by an oriented edge $gh_b$
in $P_{a,s}$ ($h_a \neq h_b$).
Assume without loss of generality that the oriented edges $gf, gh_a, gh_b$ are oriented
clockwise around $g$.
By the Definition \ref{left-of-def}, this means that
$$ P_{a, s} = P_{a,s}[a, g] \cdot P_{a,s}[g, s] \ll P_{a,s}[a,g] \cdot P_{b,s}[g,s] $$
--- a contradiction.
Hence, these paths must share the remaining suffix of the path
from $x$ to~$s$.
As $P_{a,s}[a,x] \cap P_{b,s}[b,x] = \{x\}$ and $P_{a,s}[x,s] = P_{b,s}[x,s]$,
this finishes the proof.
\end{proof}
\end{lemma}
Fix any vertex $s \in \mathcal{C}_k$, $k \geq 2$ and assume that it is close to vertices
$v_{i_1}, v_{i_2}, \dots, v_{i_k}$ of the noose, listed in the clockwise order
($1 \leq i_1 < i_2 < \dots < i_k \leq c$).
For simplicity, we also denote $i_{k+1} = i_1$.
Now, consider $k$ paths $P_{v_{i_1}, s}, P_{v_{i_2}, s}, \dots, P_{v_{i_k}, s}$.
\begin{lemma}
\label{disjoint-paths}
Exactly one of the following conditions holds:
\begin{enumerate}[(1)]
\item There exists $j \in [1, k]$ such that paths
$P_{v_{i_j}, s}$ and $P_{v_{i_{j+1}}, s}$ are vertex disjoint
apart from~$s$,
\item There exists a vertex $s' \neq s$ such that all the paths
$P_{v_{i_1}, s}, P_{v_{i_2}, s}, \dots, P_{v_{i_k}, s}$ contain $s'$.
This vertex is adjacent to $s$ and is the penultimate vertex in each of these paths.
\end{enumerate}
\begin{proof}
Obviously, condition (2) implies that (1) is false.
We only need to prove the opposite implication.
Assume that property (1) holds for no $j \in [1, k]$.
Therefore, by Lemma \ref{suffix-paths}, we see that for each $j \in [1,k]$, paths
$P_{v_{i_j},s}$ and $P_{v_{i_{j+1}}, s}$ share the common suffix, containing at least
two vertices.
Hence, each path $P_{v_{i_1},s}, P_{v_{i_2},s}, \dots, P_{v_{i_k},s}$ shares the same
common suffix, having at least two vertices.
The penultimate vertex in this suffix is $s'$ as in property (2).
\end{proof}
\end{lemma}
Let $V_1$ be the set of vertices from $\mathcal{C}_2 \cup \mathcal{C}_3 \cup \dots \cup
\mathcal{C}_c$ for which the first condition in Lemma~\ref{disjoint-paths} holds,
and $V_2$ --- the analogous set for the second condition.
\begin{lemma}
\label{profile-shift}
For every $s \in V_2$, there exists a vertex $s' \in V_1$ and an integer
$m \in \{1, 2, \dots, d\}$ such that
$$\forall_{v \in \mathcal{L}}\ \pi_d[s, \mathcal{L}](v) = \mathrm{Cap}_d\left(\pi_d[s',
\mathcal{L}](v) +
m\right), $$
where
$$\mathrm{Cap}_d(x) = \begin{cases}
x & \text{ if } x \leq d, \\
+\infty & \text{ otherwise.}
\end{cases}$$
\begin{proof}
If $s \in V_2$, then there exists a sequence $(s_0, s_1, \dots, s_{m-1}, s_m)$ where
$s = s_m$ and $m \geq 1$, which is the longest common suffix of all the paths
$P_{v_{i_1}, s}, P_{v_{i_2}, s}, \dots, P_{v_{i_k}, s}$.
The rightmost shortest paths from $v_{i_1}, v_{i_2}, \dots, v_{i_k}$ to $s_0$ can be
obtained by dropping $m$ last vertices in each of the paths.
In this setup, we have $s_0 \in V_1$ --- otherwise, we would be able to prepend the sequence
defined above by the common neighbor of $s_0$ on all the paths terminating at $s_0$.
We will now prove that $s' = s_0$ and $m$ satisfy the condition stated in the lemma.
Pick any vertex $v \in \mathcal{L}$ and consider the following cases:
\begin{itemize}
\item If $s$ is close to $v$, then $\mathrm{dist}(s, v) = \mathrm{dist}(s_0, v) + m$ (because of the common
prefix above).
\item If $s$ is far from $v$ and $\pi_d[s, \mathcal{L}](v) = \infty$, then
$\mathrm{dist}(s, v) > d$.
Hence, $\mathrm{dist}(s_0, v) > d-m$ as $\mathrm{dist}(s, v) \leq \mathrm{dist}(s, s_0) + \mathrm{dist}(s_0, v) = m + \mathrm{dist}(s_0, v)$.
To put it in the other way, $\mathrm{dist}(s_0, v) + m > d$.
Therefore $\pi_d[s_0, \mathcal{L}](v) + m > d$, which is consistent with the condition
$\pi_d[s, \mathcal{L}](v) = \infty$ required by the statement of the lemma.
\item If $s$ is far from $v$ and $\pi_d[s, \mathcal{L}](v) \leq d$, then by definition of closeness
some shortest path from $s$ to $v$ passes through another vertex $v' \in V(\mathcal{L})
\setminus \{v\}$.
Assume that $v'$ is one of the vertices closest to $s$ with this property.
We see that $s$ is close to $v'$.
Thus, $v' \in \{v_{i_1}, \dots, v_{i_k}\}$, so $P_{v',s}$ is one of the paths in the set
$\{P_{v_{i_1}, s}, \dots, P_{v_{i_k}, s}\}$, and as such, it contains $s_0$.
Therefore, some shortest path from $v$ to $s$ contains $v, v', s_0, s$ in this order.
Hence, $\pi_d[s, \mathcal{L}](v) = \mathrm{dist}(s, v) = \mathrm{dist}(s, s_0) + \mathrm{dist}(s_0, v) = m + \mathrm{dist}(s_0, v) =
\pi_d[s_0, \mathcal{L}](v) + m$.
\end{itemize}
Therefore, the distance-$d$ profile $\pi_d[s, \mathcal{L}]$ is constructed by considering
the profile $\pi_d[s_0, \mathcal{L}]$ where $s_0 \in V_1$,
and increasing each entry in the profile by $m$,
while remembering to replace each integer exceeding $d$ by~$\infty$.
\end{proof}
\end{lemma}
\begin{corollary}
\label{profile-shift-cor}
If
\[ |\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_1\}| = B \quad\text{for an integer }B,\]
then
\[ |\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_1 \cup V_2\}| \leq B \cdot (d + 1). \]
\begin{proof}
By Lemma \ref{profile-shift}, the profile of a vertex $v \in V_2$ can be deduced
from a distance-$d$ profile of a vertex $v' \in V_1$ and an integer $m \in \{1, 2, \dots, d\}$.
Hence,
\[ |\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_2\}| \leq
|\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_1\}| \cdot |\{1, 2, \dots, d\}| = B \cdot d. \]
We also include the vertices in $V_1$ into this inequality and get:
\[ |\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_1 \cup V_2\}| \leq
|\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_1\}| + |\{\pi_d[v, \mathcal{L}]\, \mid\, v \in V_2\}| \leq B \cdot (d+1). \]
\end{proof}
\end{corollary}
Corollary \ref{profile-shift-cor} allows us to focus on
bounding the number of different distance-$d$ profiles
measured only from the vertices in $V_1$.
\subsection{Buckets}
We will now group all the vertices in $V_1$ into a reasonably small number of buckets.
The buckets will be chosen in such a way that all the vertices within one group expose
similar properties in $G$.
This will eventually allow us to bound the number of different distance-$d$ profiles measured
by each individual bucket.
\begin{definition}
For a vertex $s \in V_1$, we define the \textbf{bucket} of $s$ as any quadruple
$(a, b, d_a, d_b)$ satisfying the following conditions (Figure \ref{bucket-def-figure}):
\begin{itemize}
\item $a, b \in V(\mathcal{L})$ and $a, b \in \mathrm{Close}(s)$,
\item $\mathcal{L}(b, a) \cap \mathrm{Close}(s) = \varnothing$; in other words,
each vertex $v \in \mathcal{L}(b, a)$ is far from $s$,
\item paths $P_{a, s}$ and $P_{b, s}$ intersect only at $s$,
\item $d_a = \mathrm{dist}(a, s)$ is the distance between $a$ and $s$ in $G_{\mathcal{L}}$,
and $1 \leq d_a \leq d$,
\item $d_b = \mathrm{dist}(b, s)$ is the distance between $b$ and $s$ in $G_{\mathcal{L}}$,
and $1 \leq d_b \leq d$.
\end{itemize}
\noindent Lemma \ref{disjoint-paths} proves that such an assignment exists since $s \in V_1$.
\end{definition}
\begin{figure}
\centering
\input{figures/bucket-def.tex}
\caption{Definition of a bucket assigned to a vertex $s$. Here, $d_a = 3$ and $d_b = 2$.
Vertex $s$ is far from any vertex on the dashed part of the noose.}
\label{bucket-def-figure}
\end{figure}
Notice that there at most $c(c - 1) d^2$ possible quadruples
$(a, b, d_a, d_b)$ --- $a$ and $b$ are two distinct vertices of the noose in some order,
and $d_a, d_b$ are two positive distances not exceeding $d$.
Fix a bucket $(a, b, d_a, d_b)$ and consider the set $\mathcal{S} =
\mathcal{S}(a, b, d_a, d_b)$ of
vertices $s$ that are assigned to the bucket.
Remember that each $s \in \mathcal{S}$ is far from each vertex of
$\mathcal{L}(b, a)$.
\vspace{1em}
\begin{lemma}
\label{hard-cross-paths}
For any two different vertices $s, t \in \mathcal{S}$, if paths
$P_{a,t}$ and $P_{b,s}$ intersect at any vertex $x$, then $P_{a,s} \gg P_{a,t}$,
$P_{b,t} \gg P_{b,s}$, and $\mathrm{dist}(x, t) = \mathrm{dist}(x, s) > 0$ (Figure \ref{hard-cross-paths-config}).
\begin{figure}[h]
\centering
\input{figures/cross-lemma-config.tex}
\caption{A possible configuration in Lemma \ref{hard-cross-paths}. Paths
$P_{a,s}$ and $P_{b,s}$ are marked blue, while $P_{a,t}$ and $P_{b,t}$ are green.}
\label{hard-cross-paths-config}
\end{figure}
\begin{proof}
Assume that $P_{a, t}$ and $P_{b, s}$ intersect at $x$.
Then we have a couple of simple equalities:
$$
\mathrm{dist}(a, t) = \mathrm{dist}(a, x) + \mathrm{dist}(x, t) \qquad\text{and}\qquad
\mathrm{dist}(b, s) = \mathrm{dist}(b, x) + \mathrm{dist}(x, s).
$$
From the triangle inequality and the fact that $s, t \in \mathcal{S}(a, b, d_a, d_b)$, we infer:
\begin{equation}
\label{xs-geq-xt-eq}
\mathrm{dist}(a, x) + \mathrm{dist}(x, s) \geq \mathrm{dist}(a, s) = d_a = \mathrm{dist}(a, t) = \mathrm{dist}(a, x) + \mathrm{dist}(x, t),
\end{equation}
\begin{equation}
\label{xt-geq-xs-eq}
\mathrm{dist}(b, x) + \mathrm{dist}(x, s) = \mathrm{dist}(b, s) = d_b = \mathrm{dist}(b, t) \leq \mathrm{dist}(b, x) + \mathrm{dist}(x, t).
\end{equation}
We infer that $\mathrm{dist}(x, s) \geq \mathrm{dist}(x, t)$ from (\ref{xs-geq-xt-eq}) and
$\mathrm{dist}(x, s) \leq \mathrm{dist}(x, t)$ from (\ref{xt-geq-xs-eq}).
Therefore, $\mathrm{dist}(x, s) = \mathrm{dist}(x, t)$ and all the inequalities above are satisfied
with equality.
As $x \neq s$ (otherwise we would have $x = s = t$), obviously $\mathrm{dist}(x, s) > 0$.
Hence, $\mathrm{dist}(a, s) = \mathrm{dist}(a, x) + \mathrm{dist}(x, s)$ and $\mathrm{dist}(b,t) = \mathrm{dist}(b,x) +
\mathrm{dist}(x,t)$.
We now see two shortest paths from $a$ to $s$: the rightmost path $P_{a,s}$, and
another path $Q := P_{a,x} \cdot P_{b, s}[x, s]$.
Notice that $P_{a,s}$ cannot be the prefix of $P_{a,x}$ as it is strictly longer than $P_{a,x}$.
Also $P_{a,x}$ cannot be the prefix of $P_{a,s}$
because $x$ lies on $P_{b,s}$ (which is vertex disjoint with $P_{a,s}$ apart from $s$,
and $x \neq s$).
Hence, we have either $P_{a,s} \ll P_{a,x}$ or $P_{a,s} \gg P_{a,x}$.
We however cannot have $P_{a,s} \ll P_{a,x}$,
or otherwise we would have $P_{a,s} \ll P_{a,x} \cdot P_{b,s}[x,s] = Q$,
which is impossible by the definition of $P_{a,s}$.
Therefore $P_{a,s} \gg P_{a,x}$.
As $P_{a,x} = P_{a,t}[a, x]$, we also get $P_{a,s} \gg P_{a,t}$.
An analogous argument shows that $P_{b, t} \gg P_{b, s}$.
\end{proof}
\end{lemma}
\begin{corollary}
For any two distinct vertices $s, t \in \mathcal{S}$, if paths
$P_{a,s}$ and $P_{b,t}$ intersect at any vertex $x$, then $P_{a,t} \gg P_{a,s}$,
$P_{b,s} \gg P_{b,t}$, and $\mathrm{dist}(x, t) = \mathrm{dist}(x, s) > 0$.
\label{hard-cross-paths-sym}
\begin{proof}
In the statement of Lemma \ref{hard-cross-paths}, swap $s$ and $t$.
\end{proof}
\end{corollary}
\begin{corollary}
\label{hard-cross-paths-both}
It is impossible for $P_{a,t}$ and $P_{b,s}$ to intersect, and for $P_{a,s}$ and
$P_{b,t}$ to intersect at the same time.
\begin{proof}
The former condition would imply $P_{a,s} \gg P_{a,t}$ (Lemma \ref{hard-cross-paths}),
while the latter --- $P_{a,t} \gg P_{a,s}$ (Corollary \ref{hard-cross-paths-sym}).
\end{proof}
\end{corollary}
\subsection{Gamma-regions}
We fix any bucket $\mathcal{S} = \mathcal{S}(a, b, d_a, d_b)$.
We will now assign a region of the plane to each vertex $w \in S$.
\begin{lemma}
For any vertex $w \in \mathcal{S}$, the curve $\mathcal{L}[a, b] \cup P_{a,w} \cup P_{b,w}$
is a closed Jordan curve.
\begin{proof}
Notice that $w \not\in V(\mathcal{L})$ and
$w$ is close to $a$, so $P_{a,w}$ cannot contain vertices from $\mathcal{L}$
as internal vertices. Therefore,
$P_{a,w} \cap \mathcal{L}[a, b] = \{a\}$. Analogously,
$P_{b,w} \cap \mathcal{L}[a, b] = \{b\}$. Finally,
$P_{a,w} \cap P_{b,w} = \{w\}$ due to the disjointness of these paths in the sense of
Claim \ref{disjoint-paths}.
Thus the union of these curves is a closed Jordan curve.
\end{proof}
\end{lemma}
\begin{definition}
For any vertex $w \in \mathcal{S}$, we define the \textbf{gamma-region}
$\Gamma_w$ as the
closed, bounded region of the plane whose boundary is $\mathcal{L}[a, b] \cup P_{a,w} \cup P_{b,w}$
(Figure \ref{gamma-def-fig}).
\end{definition}
\begin{figure}[h]
\centering
\begin{minipage}[t]{0.48\textwidth}
\centering
\input{figures/cross-lemma-area-a.tex}
(a)
\end{minipage}\begin{minipage}[t]{0.04\textwidth}\
\end{minipage}\begin{minipage}[t]{0.48\textwidth}
\centering
\input{figures/cross-lemma-area-b.tex}
(b)
\end{minipage}
\caption{Gamma regions in the configuration from Figure \ref{hard-cross-paths-config}:
(a) --- $\Gamma_t$, (b) --- $\Gamma_s$.}
\label{gamma-def-fig}
\end{figure}
We will now prove the potential of this definition.
Intuitively, for any two vertices $s, t \in \mathcal{S}$ in the bucket,
we will either have $t \in \Gamma_s$, which will imply a serious structural relation
between the gamma-regions $\Gamma_s$ and $\Gamma_t$,
or we will have $t \not\in \Gamma_s$, which will in turn have major implications
for the distance-$d$ profiles $\pi_d[s, \mathcal{L}]$ and $\pi_d[t, \mathcal{L}]$.
\begin{lemma}
\label{gamma-contain}
For any two different vertices $s, t \in \mathcal{S}$, if $t \in \Gamma_s$, then
$\Gamma_t \subsetneq \Gamma_s$.
\begin{proof}
Assume that $t \in \Gamma_s$.
We will first prove a couple of helper claims.
\begin{claim}
\label{gamma-contain-claim-b}
\renewcommand{\qed}{\cqedsymbol}
If $P_{b,t}$ is disjoint with $P_{a,s}$,
then $P_{b,t} \gg P_{b,s}$ and $P_{b,t}$ is fully contained within $\Gamma_s$.
\begin{claimproof}
Assume that $P_{b,t}$ is disjoint with $P_{a,s}$.
As $\mathrm{dist}(b, t) = \mathrm{dist}(b, s)$ and $s \neq t$,
neither of paths $P_{b,s}$ and $P_{b,t}$ is a prefix of another and thus
they are ordered by $\ll$.
We notice that $P_{b,s}$ follows $\partial \Gamma_s$ clockwise.
This is because we defined $\mathcal{L}[a, b]$ to run clockwise from $a$ to $b$ on
$\mathcal{L}$, and $P_{b,s}$ is a directed path originating from $b$, where
$\mathcal{L}[a, b]$ terminated.
Hence, both $P_{b,s}$ and $\mathcal{L}[a, b]$ have to be oriented the same way
on $\partial \Gamma_s$.
Let $(y_1, y_2, \dots, y_{k-1}, y_k)$ ($y_k = t$) be the maximal suffix of $P_{b,t}$
which is disjoint with $P_{b,s}$.
For any choice of $i \in \{1, 2, \dots, k\}$, we have that
$y_i \not\in P_{a,s}$ since $P_{b,t}$ is disjoint with $P_{a,s}$,
and $y_i \not\in \mathcal{L}[a,b]$ as $\mathcal{L}[a,b] \cap P_{b,t} = \{b\}$.
Hence $\{y_1, y_2, \dots, y_k\} \cap \partial \Gamma_s = \varnothing$, and thus
these vertices are either all strictly inside of $\Gamma_s$, or all strictly outside of it.
Now, as $P_{b,s}$ is oriented clockwise, it can be easily seen that $y_1 \in \Gamma_s\
\Leftrightarrow\ P_{b,y_1} \gg P_{b,s}$;
in other words, the interior of $\Gamma_s$ is ``to the right'' of $P_{b,s}$.
If $P_{b,y_1} \gg P_{b,s}$, then $P_{b,t} \gg P_{b,s}$ and $P_{b,s}$ is fully within
$\Gamma_s$.
If $P_{b,y_1} \ll P_{b,s}$, then $P_{b,t} \ll P_{b,s}$. Because $y_1 \not\in
\Gamma_s$, we have that $\{y_1, y_2 \dots, y_k\}$ is disjoint with $\Gamma_s$.
In particular, $t \not\in \Gamma_s$.
This however contradicts our assumption that $t \in \Gamma_s$.
\end{claimproof}
\end{claim}
\begin{claim}
\label{gamma-contain-claim-a}
\renewcommand{\qed}{\cqedsymbol}
If $P_{a,t}$ is disjoint with $P_{b,s}$,
then $P_{a,t} \ll P_{a,s}$ and $P_{a,t}$ is fully contained within $\Gamma_s$.
\begin{claimproof}
The proof of this claim follows mostly the proof of Claim \ref{gamma-contain-claim-b}.
However, $P_{a,s}$ follows $\partial \Gamma_s$ anti-clockwise.
This is because $\mathcal{L}[a, b]$ runs clockwise along the noose from $a$ to $b$,
and both $\mathcal{L}[a, b]$ and $P_{a, s}$ originate from the same vertex $a$.
Hence, these two paths are oriented in the opposite way along $\partial \Gamma_s$.
This means that the interior of $\Gamma_s$ is ``to the left'' of $P_{a,s}$.
Hence, $t \in \Gamma_s$ if and only if $P_{a,t} \ll P_{a,s}$.
\end{claimproof}
\end{claim}
Note that if both $P_{b,t}$ is disjoint with $P_{a,s}$, and $P_{a,t}$ is disjoint with $P_{b,s}$,
then by Claims \ref{gamma-contain-claim-b} and \ref{gamma-contain-claim-a}
we get that $\partial\Gamma_t \subseteq \Gamma_s$ and thus $\Gamma_t \subseteq
\Gamma_s$.
Assume that $t \in \Gamma_s$, but $\Gamma_t \not\subseteq \Gamma_s$.
As $\partial\Gamma_t$ is a Jordan curve, there exists a vertex $y$ on
$\partial\Gamma_t$ not belonging to $\Gamma_s$.
We will consider multiple cases, depending on which part of $\partial\Gamma_t$
this vertex belongs to.
\vspace{1em}
\underline{Case 1}: $y \in \mathcal{L}[a, b]$. This is however impossible as $\mathcal{L}[a, b]
\subseteq \Gamma_s$.
\vspace{1em}
\underline{Case 2a}: $y \in P_{b,t}$ and $P_{b,t} \gg P_{b,s}$.
In this case, $P_{b,t}$ cannot intersect $P_{a,s}$ by Corollary~\ref{hard-cross-paths-sym}.
Hence, by Claim~\ref{gamma-contain-claim-b}, we have that $P_{b,t}$ is fully contained
within $\Gamma_s$ --- a contradiction because $y \in P_{b,t}$ must lie outside
of $\Gamma_s$.
\vspace{1em}
\underline{Case 2b}: $y \in P_{b,t}$ and $P_{b,t} \ll P_{b,s}$.
In this case, Claim \ref{gamma-contain-claim-b} requires
that the intersection between $P_{b,t}$ and $P_{a,s}$ must exist.
Hence, we also get $P_{a,t} \gg P_{a,s}$ by Corollary \ref{hard-cross-paths-sym}.
Now, $P_{a,t}$ cannot intersect $P_{b,s}$ as this is forbidden by Corollary
\ref{hard-cross-paths-both}.
This leads to a contradiction due to Claim~\ref{gamma-contain-claim-a}.
\vspace{1em}
\underline{Case 3a}: $y \in P_{a,t}$ and $P_{a,t} \gg P_{a,s}$.
Similarly to the first part of Case 2b, we deduce that $P_{a,t}$ must intersect $P_{b,s}$.
However, by Lemma \ref{hard-cross-paths}, we get that $P_{a,t} \ll P_{a,s}$ ---
a contradiction.
\vspace{1em}
\underline{Case 3b}: $y \in P_{a,t}$ and $P_{a,t} \ll P_{a,s}$.
For our convenience, we take $y$ to be the first vertex of $P_{a,t}$ not in $\Gamma_s$.
We again deduce that $P_{a,t}$ intersects $P_{b,s}$; otherwise, Claim
\ref{gamma-contain-claim-a} would imply that $P_{a,t}$ is
contained within $\Gamma_s$, which contradicts the choice of $y$.
Let $x_1$ and $x_2$ be the first and the last intersection of $P_{a,t}$ with $P_{b,s}$,
respectively.
Notice that $y$ cannot precede $x_1$ on $P_{a,t}$; as $P_{a,t} \ll P_{a,s}$, then
$P_{a,y} \ll P_{a,s}$.
As $P_{a,y}$ would not intersect $P_{b,s}$, we could prove (analogously to the proofs
of Claims \ref{gamma-contain-claim-b} and \ref{gamma-contain-claim-a})
that $P_{a,y}$ is fully contained within $\Gamma_s$,
which contradicts our assumption.
Vertex $y$ cannot also appear after $x_2$ on $P_{a,t}$ --- in this case,
$y \not \in \Gamma_s$ would imply $t \not\in \Gamma_s$
(note that $P_{a,t}[y, t]$ would not be able to intersect $\partial\Gamma_s$),
which again is impossible.
Since vertices $a, x_1, y, x_2, t$ appear on $P_{a,t}$ in this order,
we have that $x_1 \in P_{a, x_2}$.
Also, by Lemma \ref{hard-cross-paths} and the fact that $\mathrm{dist}(x_2, t) < \mathrm{dist}(x_1, t)$,
we get that
\begin{equation*}
\begin{split}
\mathrm{dist}(b, x_1) &= \mathrm{dist}(b,s) - \mathrm{dist}(x_1, s) = \mathrm{dist}(b,s) - \mathrm{dist}(x_1, t) < \mathrm{dist}(b,s) - \mathrm{dist}(x_2, t) =\\
&= \mathrm{dist}(b,s) - \mathrm{dist}(x_2, s) = \mathrm{dist}(b, x_2).
\end{split}
\end{equation*}
We infer that $x_1 \in P_{b,s}[b, x_2] = P_{b, x_2}$.
Now, consider two paths: $P_{a,x_2} = P_{a,t}[a, x_2]$ and $P_{b,x_2} = P_{b,s}[b, x_2]$.
By Lemma \ref{suffix-paths}, these two paths must intersect on their common suffix
and nowhere else.
As $x_1 \in P_{a,x_2} \cap P_{b,x_2}$, we get that $P_{a,x_2}[x_1, x_2] = P_{b,x_2}[x_1, x_2]$.
This means that $P_{b,s}$ shares its vertices with $P_{a,t}$ on the segment between
$x_1$ and $x_2$.
Hence,
$$ P_{a,t}[x_1, x_2] = P_{a, x_2}[x_1, x_2] = P_{b, x_2}[x_1, x_2] =
P_{b, s}[x_1, x_2] \subseteq P_{b,s} \subseteq \partial \Gamma_s. $$
However, we get a contradiction because of our assumptions that
$y \in P_{a, x_2}[x_1, x_2]$ and $y \not\in \Gamma_s$.
\vspace{1em}
After considering all cases above, we have that $\Gamma_t \subseteq \Gamma_s$.
Moreover, $t \not\in P_{a,s}$ (since $\mathrm{dist}(a,s) = \mathrm{dist}(a,t)$) and analogously $t \not\in P_{b,s}$, and
$t \not\in V(\mathcal{L})$ (otherwise $t$ would only be close to itself).
Thus, $t \not\in \partial \Gamma_s$.
Since obviously $t \in \partial\Gamma_t$, we immediately
get that $\Gamma_s \neq \Gamma_t$.
Therefore, $\Gamma_t \subsetneq \Gamma_s$.
\end{proof}
\end{lemma}
\vspace{1em}
The claim above described the case $t \in \Gamma_s$.
Now we try to see what happens when $t \not\in \Gamma_s$.
\begin{lemma}
\label{majorization-lemma}
If $t \not\in \Gamma_s$ for some $s, t \in \mathcal{S}$, then
$\pi_d[t, \mathcal{L}] \succcurlyeq \pi_d[s, \mathcal{L}]$.
\begin{proof}
We will prove that $\pi_d[t, \mathrm{Close}(t)] \succcurlyeq \pi_d[s, \mathrm{Close}(t)]$.
Lemma \ref{lemma-majorization-close} will then conclude our proof.
Recall, by the choice of $a$ and $b$, that $\mathrm{Close}(t) \subseteq \mathcal{L}[a, b]$.
We will now prove that $\mathrm{dist}(v, s) \geq \mathrm{dist}(v, t)$ for each $v \in \mathcal{L}[a, b]$ such that
$v \in \mathrm{Close}(t)$.
For $v \in \{a, b\}$ the inequality is satisfied with equality; thus, we only need to care
about the case $v \in \mathcal{L}(a, b) \cap \mathrm{Close}(t)$.
Notice that $v \in \Gamma_s$, but on the other hand $t \not\in \Gamma_s$.
Therefore, we can take $x$ as the last intersection of $P_{v,t}$ with
$\partial \Gamma_s$.
We cannot have $x = v$, otherwise the edge connecting $x$
with the next vertex on the path would lie outside of the noose
since $v \in \mathcal{L}(a, b)$.
Also, since $v \in \mathrm{Close}(t)$, we get that $P_{v, t} \cap V(\mathcal{L}) = \{v\}$;
hence, $P_{v, t}$ cannot intersect $\mathcal{L}$ at any vertex other than $v$.
Therefore, $x \in P_{a,s} \cup P_{b,s}$.
Without loss of generality, assume that $x \in P_{a, s}$.
As $x$ lies both on the shortest path from $a$ to $s$, and the shortest path from
$v$ to $t$, we have the following equalities:
$$\mathrm{dist}(v, t) = \mathrm{dist}(v, x) + \mathrm{dist}(x, t) \qquad\text{and}\qquad
\mathrm{dist}(a, s) = \mathrm{dist}(a, x) + \mathrm{dist}(x, s).$$
Moreover, $\mathrm{dist}(a, t) = \mathrm{dist}(a, s) = d_a$.
From the triangle inequality and the equations above, we get
$$ \mathrm{dist}(a, x) + \mathrm{dist}(x, t) \geq \mathrm{dist}(a, t) = \mathrm{dist}(a, s) = \mathrm{dist}(a, x) + \mathrm{dist}(x, s), $$
or equivalently, $\mathrm{dist}(x, t) \geq \mathrm{dist}(x, s)$.
Then, from the conditions above and another use of triangle inequality,
we have
\[ \mathrm{dist}(v, t) = \mathrm{dist}(v, x) + \mathrm{dist}(x, t) \geq \mathrm{dist}(v, x) + \mathrm{dist}(x, s) \geq \mathrm{dist}(v, s). \]
\end{proof}
\end{lemma}
\subsection{Conclusion of the proof of Noose Profile Lemma}
\label{noose-profile-lemma-conclusion-subsection}
Assume there are $M$ vertices
$s_1, s_2, \dots, s_M \in \mathcal{S}$ with pairwise distinct distance-$d$ profiles
on $\mathcal{L}$.
Pick any vertices $s_i, s_j$, $i \neq j$, and let us describe their relation with respect to
the regions $\Gamma_{s_i}, \Gamma_{s_j}$ defined by them:
\begin{itemize}
\item If $s_i \not\in \Gamma_{s_j}$ and $s_j \not\in \Gamma_{s_i}$, then from
Lemma \ref{majorization-lemma} we get $\pi_d[s_i, \mathcal{L}] = \pi_d[s_j, \mathcal{L}]$ ---
a contradiction.
\item If $s_i \in \Gamma_{s_j}$ and $s_j \in \Gamma_{s_i}$, the from Lemma
\ref{gamma-contain}
we get $\Gamma_{s_i} \subsetneq \Gamma_{s_j} \subsetneq \Gamma_{s_i}$ ---
another contradiction.
\item Hence, either $\pi_d[s_i, \mathcal{L}] \prec \pi_d[s_j, \mathcal{L}]$
(if $s_j \not\in \Gamma_{s_i}$) or $\pi_d[s_j, \mathcal{L}] \prec \pi_d[s_i, \mathcal{L}]$
(if $s_i \not\in \Gamma_{s_j}$).
\end{itemize}
Therefore, the relation $\preccurlyeq$ defined on the distance-$d$ profiles for $s_1, s_2,
\dots, s_M$
is antisymmetric, transitive (by definition of $\preccurlyeq$) and connex
(by our considerations above).
Hence, it is a linear order and thus contains a chain of length $M$.
However, as $\pi_d$ is a function whose domain contains $c$ elements,
and its codomain contains $d+2$ possible values,
the maximum length of such a chain is $c(d+1) + 1$.
We thus get $M \leq c(d+1) + 1$.
Summing everything up, we proved that each set $\mathcal{S}(a, b, d_a, d_b)$
generates at most $c(d+1) + 1$ different distance-$d$ profiles.
There are at most $c(c-1)d^2$ such sets, as $a \neq b$ and $1 \leq d_a, d_b \leq d$.
Hence, the number of different profiles induced in $G$ by $V_1$ is bounded by
$$c(c - 1)d^2 \cdot [c(d+1) + 1] \leq c^3 (d+1)^3.$$
The number of profiles in $\mathcal{C}_2 \cup \mathcal{C}_3 \cup \dots \cup
\mathcal{C}_c = V_1 \cup V_2$ is then bounded by
$c^3 (d+1)^4$ (Corollary \ref{profile-shift-cor}).
The vertices from $\mathcal{C}_0 \cup \mathcal{C}_1$ induce at most
$c(d + 1) + 1$ additional profiles.
The total number of profiles can be thus bounded by
$$ c^3 (d+1)^4 + c(d + 1) + 1 \leq c^3(d+2)^4. $$
This concludes the proof of the Noose Profile Lemma.
We note a simple corollary which is a direct consequence of it:
\begin{corollary}
\label{noose-profille-lemma-rev}
Consider any graph $G$ together with its embedding in the plane, and fix any noose
$\mathcal{L}$ containing $c \geq 1$ vertices of $G$.
The set $\{\pi_d[v, \mathcal{L}]\, \mid\, v \not\in V(G_\mathcal{L})\}$
of different distance-$d$ profiles on $\mathcal{L}$,
measured from the vertices \textbf{not enclosed} by $\mathcal{L}$,
has at most $c^3 (d+2)^4$ elements.
\begin{proof}
Let us take the embedding of $G$ in the plane, and apply to it an inversion
with any positive radius
and a center in any point enclosed by $\mathcal{L}$ that does not lie on any vertex or
edge of $G$.
After this transformation,
the images of all vertices of $G$ that have not been enclosed by $\mathcal{L}$
in the original embedding will now be enclosed by the inversive image $\mathcal{L}'$ of the noose.
Noose Profile Lemma applies to the inversed embedding as well,
which allows us to reason that there are at most $c^3 (d+2)^4$ different distance-$d$
profiles on $\mathcal{L}$, measured from the vertices whose images are enclosed by $\mathcal{L}'$
--- or, in other words, measured from the vertices which were not enclosed by $\mathcal{L}$
in the original embedding.
\end{proof}
\end{corollary}
\subsection{Proof of Theorem \ref{neighborhood-complexity-planar}}
\label{beyond-noose-profile-lemma-section}
We now lift the Noose Profile Lemma to the general setting, where the noose can
be replaced with any non-empty set of vertices.
For convenience, we restate the theorem here.
\neighborhoodcomplthm*
\begin{proof}
We fix $G$ and embed it in the plane.
We also fix the set $A$ as in the statement of the theorem.
Let $V_d = \{v \in V(G)\,\mid\,\exists_{s\in A} \,\mathrm{dist}(v, s) \leq d\}$ be the set of vertices
of $G$ which are at~distance at most $d$ from any vertex in $A$.
We observe that for each vertex $v \not\in V_d$, the distance-$d$ profile
$\pi_d[v, A]$ is the constant function equal to $+\infty$.
Now, we define the graph $G_d = G[V_d]$ induced by $V_d$.
We can easily see that for each vertex $v \in V_d$, the distance-$d$ profile of $v$ on $A$
in $G_d$ is identical to the distance-$d$ profile of $v$ on $A$ in $G$.
Hence, the number of different distance-$d$ profiles on $A$ in $G_d$ is at most $1$ less
than the number of different distance-$d$ profiles on $A$ in $G$.
We first assume that $G_d$ is connected;
we will resolve the case where $G_d$ is disconnected at the end of the proof.
Let $\mathcal{T}$ be the minimum Steiner tree on $A$ in $G_d$; that is, the smallest possible tree
which is a connected subgraph of $G_d$ and spans all vertices of $A$.
\begin{claim}
\label{claim-small-steiner-tree}
$\mathcal{T}$ has at most $(c-1)(2d+1)$ edges.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Let $G_A$ be the complete weighted graph whose set of vertices is $A$, and for every
pair of vertices $u, v \in A$, the edge between these vertices has weight $\mathrm{dist}_{G_d}(u, v)$.
Let also $\mathcal{T}_A$ be the minimum-weight spanning tree of $G_A$.
We now prove that no edge of $\mathcal{T}_A$ has weight greater than $2d + 1$.
Assume for contradiction that $uv \in E(\mathcal{T}_A)$ is an edge with weight at least $2d + 2$.
In this case, take a shortest path from $u$ to $v$ in $G_d$:
$(x_0, x_1, x_2, \dots, x_\delta)$, where $x_0 = u$, $x_\delta = v$, $\delta \geq 2d+2$.
We have that $\mathrm{dist}_{G_d}(x_{d+1}, u) = d + 1$ and $\mathrm{dist}_{G_d}(x_{d+1}, v) = \delta - (d+1)$.
As $x_{d+1} \in V_d$, there exists a vertex $s \in A$ at distance at most $d$ from $x_{d+1}$.
By the triangle inequality, we infer that
\begin{equation*}
\begin{split}
\mathrm{dist}_{G_d}(s, u)& \leq \mathrm{dist}_{G_d}(s, x_{d+1}) + \mathrm{dist}_{G_d}(x_{d+1}, u) \leq
d + (d + 1) < \delta, \\
\mathrm{dist}_{G_d}(s, v)& \leq \mathrm{dist}_{G_d}(s, x_{d+1}) + \mathrm{dist}_{G_d}(x_{d+1}, v) \leq
d + (\delta - (d+1)) < \delta.
\end{split}
\end{equation*}
Hence, $G_A$ contains a three-vertex cycle $(u, v, s)$, in which the edge $uv$ is strictly
the heaviest.
Therefore, $uv$ cannot belong to $\mathcal{T}_A$ --- a contradiction.
\smallskip
Now, for each edge $uv \in \mathcal{T}_A$, we connect $u$ with $v$ in $G_d$ using the shortest
path between these two vertices.
We can easily see that the union of these paths is a connected subgraph of $G_d$ containing
all the vertices in $A$.
Hence, $\mathcal{T}$, the minimum Steiner tree on $A$, is at most as long as the union of these paths.
Since we used $|A|-1 = c - 1$ paths, and each of them has length at most $2d + 1$,
we infer that $\mathcal{T}$ has at most $(c-1)(2d+1)$ edges.
\end{claimproof}
\end{claim}
\newcommand{G_{\mathrm{cut}}}{G_{\mathrm{cut}}}
We now create a new graph $G_{\mathrm{cut}}$, which is a modified version of $G_d$,
by ``cutting the plane open'' along the Steiner tree $\mathcal{T}$ (Figure \ref{cutting-fig}).
This process is inspired by a similar idea by Pilipczuk et al.
\cite{DBLP:journals/talg/PilipczukPSL18}.
Formally, $G_{\mathrm{cut}}$ is the result of the following process:
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/cut-tree-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.5\textwidth}
\centering
\input{figures/cut-tree-b.tex}
(b)
\end{minipage}
\caption{Creating $G_{\mathrm{cut}}$. (a) --- original graph $G_d$, with tree $\mathcal{T}$ (blue).
(b) --- the resulting graph, with an Euler tour of $\mathcal{T}$.}
\label{cutting-fig}
\end{figure}
\begin{enumerate}
\item We find an Euler tour of $\mathcal{T}$ which does not intersect itself in the plane embedding
of $G_d$. This tour traverses each edge of $\mathcal{T}$ twice, in the opposite directions.
\item For each vertex $v \in V(\mathcal{T})$, we let $s_1, s_2, \dots, s_\Delta$ to be the neighbors of
$v$ in $\mathcal{T}$, ordered anti-clockwise around $v$.
For simplicity, we assume $s_{\Delta+1} = s_1$.
If $\Delta \geq 2$, we create $\Delta$~copies of $v$ (including the original vertex $v$):
$v_1, v_2, \dots, v_\Delta$, and we put the $i$-th copy, $v_i$, very close to the
original vertex $v$, and
between the edges $vs_i$ and $vs_{i+1}$ in the embedding of $G_d$.
Moreover, for each neighbor $x$ of $v$ such that $vx \not \in E(\mathcal{T})$, we find the only
index $i$ such that the edges $vs_i$, $vx$, $vs_{i+1}$ are ordered anti-clockwise around
$v$;
then, we replace the edge $vx$ with $v_ix$.
\item We duplicate each edge $uv$ of the Euler tour of $\mathcal{T}$, so that we have one copy for
each orientation of $uv$ in the Euler tour.
We then use both copies to connect the corresponding copies of vertices $u, v$
in $G_{\mathrm{cut}}$.
We can easily see that all new edges form a cycle enclosing~$\mathcal{T}$, which we call $C$.
Naturally, $C$ has twice as many edges as $\mathcal{T}$.
\item We remove the edges of $\mathcal{T}$ from the graph.
\end{enumerate}
Let $V(C)$ be the set of vertices of $C$, and $E(C)$ --- the set of edges of $C$.
Since $|E(\mathcal{T})| \leq (c-1)(2d+1)$ (Claim \ref{claim-small-steiner-tree}),
we have that $|E(C)| = 2|E(\mathcal{T})| \leq 2(c-1)(2d+1)$.
Also, for every vertex $v \in V(\mathcal{T})$, we let $\operatorname{deg}_\mathcal{T}(v)$ to be the degree of $v$ in $\mathcal{T}$.
Hence, for $v \in V(\mathcal{T})$, the graph $G_{\mathrm{cut}}$ contains vertices $v_1, \dots, v_{\operatorname{deg}_\mathcal{T}(v)}$.
\begin{claim}
\label{claim-steiner-dist-profile}
For any two different vertices $p, q \in V(G_{\mathrm{cut}}) \setminus V(C)$,
if $\pi_d[p, V(C)] = \pi_d[q, V(C)]$ in $G_{\mathrm{cut}}$, then
$\pi_d[p, V(\mathcal{T})] = \pi_d[q, V(\mathcal{T})]$ in $G_d$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
We will show that the distance-$d$ profile of any vertex $p \in V(G_{\mathrm{cut}}) \setminus V(C)$
on $V(C)$ in $G_{\mathrm{cut}}$ uniquely determines the distance-$d$ profile of $p$ on $V(\mathcal{T})$
in $G_d$.
The statement of the lemma will follow.
We first remark that for each $x \in V(\mathcal{T})$ and $i \in [1, \operatorname{deg}_\mathcal{T}(v)]$, we have that
$\mathrm{dist}_{G_{\mathrm{cut}}}(p, x_i) \geq \mathrm{dist}_{G_d}(p, x)$.
This is true since we can pick a shortest path from $p$ to $x_i$ in $G_{\mathrm{cut}}$, and replace
each vertex of this path belonging to $V(C)$ with the corresponding vertex of $V(\mathcal{T})$
in $G_d$.
The resulting path connects $p$ with $x$ in $G_d$, and has length $\mathrm{dist}_{G_{\mathrm{cut}}}(p, x_i)$.
We fix a vertex $v \in V(\mathcal{T})$, and we want to determine $\pi_d[p, V(\mathcal{T})](v)$ in $G_d$ from
$\pi_d[p, V(C)]$ in $G_{\mathrm{cut}}$.
Obviously, for each $x \in V(\mathcal{T})$ and $i \in [1, \operatorname{deg}_\mathcal{T}(v)]$ we have
$$ \mathrm{dist}_{G_d}(p, v) \leq \mathrm{dist}_{G_d}(p, x) + \mathrm{dist}_{G_d}(x, v) \leq
\mathrm{dist}_{G_{\mathrm{cut}}}(p, x_i) + \mathrm{dist}_{G_d}(x, v). $$
On the other hand, we pick a shortest path $P$ from $p$ to $v$ in $G_d$.
We let $x$ to be the first intersection of $P$ with $V(\mathcal{T})$, and $y$ --- the vertex
immediately preceding $x$ on $P$.
Since $y \not\in V(\mathcal{T})$, then by the construction of $G_{\mathrm{cut}}$ we infer that $y$ is adjacent to
a copy of $x$ in $G_{\mathrm{cut}}$ --- say, $x_i$ for some $i \in [1, \operatorname{deg}_\mathcal{T}(x)]$.
For this choice of $x$ and $i$ we have that
\begin{equation*}
\begin{split}
\mathrm{dist}_{G_d}(p, v) &= \mathrm{dist}_{G_d}(p, y) + 1 + \mathrm{dist}_{G_d}(x, v) =
\mathrm{dist}_{G_{\mathrm{cut}}}(p, y) + \mathrm{dist}_{G_{\mathrm{cut}}}(y, x_i) + \mathrm{dist}_{G_d}(x, v) \geq \\
&\geq \mathrm{dist}_{G_{\mathrm{cut}}}(p, x_i) + \mathrm{dist}_{G_d}(x, v).
\end{split}
\end{equation*}
We conclude that
$$ \mathrm{dist}_{G_d}(p, v) = \min \{ \mathrm{dist}_{G_{\mathrm{cut}}}(p, x_i) + \mathrm{dist}_{G_d}(x, v)\,\mid\,
x \in V(\mathcal{T}), i \in [1, \operatorname{deg}_\mathcal{T}(x)]\}. $$
It is now straightforward to determine $\pi_d[p, V(\mathcal{T})](v)$ in $G_d$ from
$\pi_d[p, V(C)]$ in $G_{\mathrm{cut}}$ and the distances in $G_d$ between each pair of vertices
of $\mathcal{T}$ (which are independent on the choice of~$p$).
\end{claimproof}
\end{claim}
We now observe that $C$ is a cycle in $G_{\mathrm{cut}}$, which does not enclose any
other vertices of $G_{\mathrm{cut}}$; hence, there exists a noose
$\mathcal{L}$, closely following $C$, that passes through each vertex of $C$ exactly once
and that does not enclose any other vertex of $G_{\mathrm{cut}}$.
The variant of Noose Profile Lemma (Corollary \ref{noose-profille-lemma-rev}) applies
to $\mathcal{L}$.
Hence, there are at most $|C|^3 (d+2)^4$ different distance-$d$ profiles on $C$ in
$G_{\mathrm{cut}}$, measured from the vertices not enclosed by $\mathcal{L}$.
We fix two vertices $p, q \in V(G_{\mathrm{cut}}) \setminus V(C)$ such that
$\pi_d[p, V(C)] = \pi_d[q, V(C)]$ in $G_{\mathrm{cut}}$.
Firstly, we see that neither $p$ nor $q$ are enclosed by $\mathcal{L}$.
We know from Claim \ref{claim-steiner-dist-profile} that $\pi_d[p, V(\mathcal{T})] = \pi_d[q, V(\mathcal{T})]$
in $G_d$.
Since $A \subseteq V(\mathcal{T})$, we infer that $\pi_d[p, A] = \pi_d[q, A]$ in $G_d$.
By the construction of $G_d$, we also get that $\pi_d[p, A] = \pi_d[q, A]$ in $G$.
Since there are at most $|C|^3 (d+2)^4$ different distance-$d$ profiles on $C$
in $G_{\mathrm{cut}}$, measured from the vertices not enclosed by $\mathcal{L}$,
we get that there are at most $|C|^3 (d+2)^4$ different distance-$d$ profiles on $A$
in $G_d$, measured from the vertices in $V(G_d) \setminus V(\mathcal{T})$.
Therefore, $G_d$ has at most $|C|^3 (d+2)^4 + |V(\mathcal{T})|$ different distance-$d$ profiles
on $A$ in total.
Recall that $G$ has at most one more distance-$d$ profile on $A$ compared to $G_d$
--- that is, the constant function equal to $+\infty$.
Hence, the number of distance-$d$ profiles on $A$ in $G$ is bounded by
\begin{equation*}
\begin{split}
|C|^3 (d+2)^4 + |V(\mathcal{T})| + 1 &\leq
[2(c-1)(2d+1)]^3(d+2)^4 + (c-1)(2d+1) + 1 \leq \\ &\leq
8c^3[(2d+1)^3(d+2)^4 + (2d+1) + 1] \leq 64c^3(d+2)^7.
\end{split}
\end{equation*}
Let us finally consider the case where $G_d$ is disconnected.
Assume that the vertices of $A$ are spread among $k$ different connected components
in $G_d$, and the $i$-th connected component contains $c_i$ vertices of $A$ for each
$i \in [1, k]$ ($c_1, c_2, \dots, c_k \geq 1$, $\sum c_i = c$).
Then, we apply this theorem to each connected component of $G_d$ separately.
We get that the number of different distance-$d$ profiles on $A$ in $G_d$ is bounded by
$$ \sum_{i=1}^k 64c_i^3(d+2)^7 < 64c^3(d+2)^7. $$
Hence, the number of different distance-$d$ profiles on $A$ in $G$ is also bounded by
$64c^3(d+2)^7$.
\end{proof}
\subsection{Quasi-cages and cages}
\label{quasi-cages-subsection}
We begin by introducing a prototype for cages --- quasi-cages.
In order to do this, we first need to define a special kind of a rooted tree.
\begin{definition}
Oriented paths $P_1, P_2, \dots, P_\ell$ in a planar graph $G$ create a \textbf{geodesic tree}
$\mathcal{T} = \bigcup P_i = \mathsf{Tree}(P_1, P_2, \dots, P_\ell)$ of
order $\ell$ rooted at a vertex $r$ if the following conditions hold:
\begin{itemize}
\item the union of all the paths is an oriented subtree $\mathcal{T}$ of $G$,
\item all paths $P_i$ are shortest paths in $G$ and have the same length,
not exceeding $d$,
\item each path $P_i$ originates at $r$ and terminates at a different leaf of the tree.
\end{itemize}
We say that $\mathcal{T}$ \textbf{avoids} $s$ if none of the paths contain $s$ as a vertex.
Also, if for all different $i, j$, the intersection of $P_i$ and $P_j$ is equal to $\{r\}$,
we call $\mathcal{T}$ a \textbf{simple geodesic tree}.
\end{definition}
We also use the following notation:
$\mathsf{Root}(\mathcal{T})$ is the root $r$ of the geodesic tree, and
$\mathsf{Path}(\mathcal{T}, i)$ is the oriented path $P_i$.
Moreover, for any two vertices $u, v \in \mathcal{T}$, we define
$\lca_\mathcal{T}(u, v)$ as the lowest common ancestor of these two vertices in $\mathcal{T}$,
where $\mathcal{T}$ is considered rooted at $r$.
We may write $\lca$ instead of $\lca_\mathcal{T}$ if the tree is clear from the context.
\medskip
We can now define a quasi-cage:
\begin{definition}
\label{def-quasi-cage}
A \textbf{quasi-cage} of order $\ell$ in a planar graph $G$ is a structure consisting of:
\begin{itemize}
\item a semi-ladder of order $\ell$ consisting of distinct vertices
$a_1, a_2, \dots, a_\ell$, and $b_1, b_2, \dots, b_\ell$,
\item two distinct root vertices $p, q \not\in \{a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell\}$,
\item shortest paths $P_1, P_2, \dots, P_\ell$, where $P_i$ is an oriented path from $p$ to $a_i$ for
each $i \in [1, \ell]$, which form a simple geodesic tree $\mathcal{P} = \mathsf{Tree}(P_1, P_2, \dots, P_\ell)$
rooted at $p$ and avoiding $q$,
\item shortest paths $Q_1, Q_2, \dots, Q_\ell$, where $Q_i$ is a directed path from $q$ to $a_i$
for each $i \in [1, \ell]$, which form a geodesic tree $\mathcal{Q} = \mathsf{Tree}(Q_1, Q_2, \dots, Q_\ell)$
rooted at $q$ and avoiding $p$.
\end{itemize}
We stress that while $\mathcal{P}$ must be a simple geodesic tree, $\mathcal{Q}$ is not necessarily simple
(Figure~\ref{quasi-cage-sample-fig}).
With the notation above, we denote a quasi-cage by
$$\mathsf{QuasiCage}((a_1, a_2, \dots, a_\ell), (b_1, b_2, \dots, b_\ell), \mathcal{P}, \mathcal{Q}). $$
\end{definition}
\begin{figure}[h]
\centering
\input{figures/quasi-cage-img.tex}
\caption{An example quasi-cage of order $6$. Tree $\mathcal{P}$ is marked blue and tree $\mathcal{Q}$ is
marked green. Vertices $b_1, b_2, \dots, b_6$ were omitted from the figure.
Note that trees $\mathcal{P}$ and $\mathcal{Q}$ can share vertices and edges, but $\mathcal{P}$ must not contain
$q$, and $\mathcal{Q}$ must not contain $p$.}
\label{quasi-cage-sample-fig}
\end{figure}
We remark that the definitions of semi-ladders, geodesic trees, simple
geodesic trees, and quasi-cages are closed to taking subsets.
Formally, fix a subsequence of indices $i_1, i_2, \dots, i_m$ ($1 \leq i_1 < i_2 < \dots < i_m
\leq \ell$).
Then:
\begin{itemize}
\item For a semi-ladder $(a_1, a_2, \dots, a_\ell), (b_1, b_2, \dots, b_\ell)$,
vertices
$(a_{i_1}, a_{i_2}, \dots, a_{i_m})$, $(b_{i_1}, b_{i_2}, \dots, b_{i_m})$ form
a semi-ladder of order $m$.
\item For a geodesic tree $\mathsf{Tree}(P_1, P_2, \dots, P_\ell)$ of order $\ell$, also
$\mathsf{Tree}(P_{i_1}, P_{i_2}, \dots, P_{i_m})$ is a geodesic tree of order $m$.
If the original geodesic tree was simple, its subset is simple as well.
\item For a quasi-cage of order $\ell$
$$\mathsf{QuasiCage}((a_1, a_2, \dots, a_\ell), (b_1, b_2, \dots, b_\ell),
\mathsf{Tree}(P_1, P_2, \dots, P_\ell), \mathsf{Tree}(Q_1, Q_2, \dots, Q_\ell)), $$
the following describes a quasi-cage of order $m$:
$$\mathsf{QuasiCage}((a_{i_1}, \dots, a_{i_m}), (b_{i_1}, \dots, b_{i_m}),
\mathsf{Tree}(P_{i_1}, \dots, P_{i_m}), \mathsf{Tree}(Q_{i_1}, \dots, Q_{i_m})). $$
\end{itemize}
This fact will also be true for each further refinement of the definition of a quasi-cage.
Therefore, from now on, we will refer to the subsets of any object (semi-ladder, geodesic tree,
quasi-cage and any its refinement) by taking the original object
and specifying the indices $i_1, i_2, \dots, i_m$.
\vspace{1em}
As the first step of our proof, we will demonstrate that planar graphs with large distance-$d$
semi-ladders also contain large quasi-cages.
\begin{lemma}
\label{quasi-cage-exists}
If $G$ contains a distance-$d$ semi-ladder of order $d(d\ell + 2)^d + 1$, then
$G$ also contains a quasi-cage of order $\ell$.
\begin{proof}
We will state and prove a series of claims, each imposing more structure on the semi-ladder.
We will call a distance-$d$ semi-ladder $(a_1, a_2, \dots, a_k), (b_1, b_2, \dots, b_k)$ of order $k$,
together with another vertex $r$,
\textbf{R-equidistant} if:
\begin{itemize}
\item $r \not\in \{a_1, a_2, \dots, a_k, b_1, b_2, \dots, b_k\}$,
\item each vertex $a_i$ is at the same distance from $r$, not exceeding $d$.
\end{itemize}
We will denote such semi-ladder as $\mathsf{RSemiLadder}((a_1, \dots, a_k), (b_1, \dots, b_k),
r)$.
\begin{claim}
\label{quasi-cage-exists-r-claim}
Every distance-$d$ semi-ladder of order $d\ell + 1$ contains an R-equidistant semi-ladder of order $\ell$
as a subset.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Take a distance-$d$ semi-ladder of order $d\ell + 1$ in $G$: $(a_1, a_2, \dots, a_{d\ell + 1}),
(b_1, b_2, \dots, b_{d\ell + 1})$.
Notice that $1 \leq \mathrm{dist}(a_i, b_1) \leq d$ for each $i \geq 2$.
This means that the set $\{a_2, a_3, \dots, a_{d\ell + 1}\}$ of vertices contains
a subset with at least $\frac{(d\ell + 1) - 1}{d} = \ell$ elements
where each element is at the same distance from $b_1$, not exceeding $d$.
Let this subset be $a_{i_1}, a_{i_2}, \dots, a_{i_\ell}$ ($2 \leq i_1 < i_2 < \dots < i_\ell \leq
d\ell + 1$).
Then, the following structure is an R-equidistant semi-ladder:
$$ \mathsf{RSemiLadder}((a_{i_1}, \dots, a_{i_\ell}), (b_{i_1}, \dots, b_{i_\ell}), b_1). $$
By our definition of a semi-ladder, the vertices of any semi-ladder must be different.
Hence, $b_1 \not\in \{a_{i_1}, \dots, a_{i_\ell}, b_{i_1}, \dots, b_{i_\ell}\}$.
\end{claimproof}
\end{claim}
A \textbf{simple geodesic semi-ladder} of order $k$ is a distance-$d$ semi-ladder
$(a_1, a_2, \dots, a_k)$, $(b_1, b_2, \dots, b_k)$, together with a simple geodesic tree
$\mathcal{P} = \mathsf{Tree}(P_1, P_2, \dots, P_k)$,
where for each $i \in [1, k]$, the path $P_i$ terminates at $a_i$.
We denote such a simple geodesic semi-ladder as
$\mathsf{SGSemiLadder}((a_1, \dots, a_k), (b_1, \dots, b_k), \mathcal{P})$.
\begin{claim}
\label{quasi-cage-exists-sg-claim}
Every R-equidistant semi-ladder of order $\ell^d$ contains a
simple geodesic semi-ladder of order $\ell$ as a subset.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Take an R-equidistant semi-ladder of order $\ell^d$:
$$\mathsf{RSemiLadder}((a_1, \dots, a_{\ell^d}), (b_1, \dots, b_{\ell^d}), r).$$
Let $\delta := \mathrm{dist}(r, a_1)$. We also take
$\mathcal{T}$ as a shortest paths tree rooted at $r$ whose leaves are exactly
$a_1, a_2, \dots, a_{\ell^d}$; this tree exists since all hypothetical leaves
are at the same distance $\delta \leq d$ from $r$.
This tree has depth $\delta$ and $\ell^d$ leaves.
Thus, $\mathcal{T}$ contains a vertex which has at least $\ell^{d / \delta} \geq \ell$ children.
Let $p$ be any such vertex.
Since $p$ has at least $\ell$ children in $\mathcal{T}$, and each child is a root of a subtree
in $\mathcal{T}$ containing at least one leaf of $\mathcal{T}$,
we can pick a subset $A = \{a_{i_1}, a_{i_2}, \dots, a_{i_\ell}\}$ ($1 \leq i_1 < i_2 < \dots <
i_\ell \leq \ell^d$)
of leaves of $\mathcal{T}$ where each leaf is in a different subtree of $\mathcal{T}$ rooted at a child of $p$.
Also, for each $j \in [1, \ell]$, we define $P_j$ as the shortest oriented path in $\mathcal{T}$
which originates at $p$ and terminates at $a_{i_j}$.
By the choice of $A$, all paths $P_1, P_2, \dots, P_\ell$ are vertex-disjoint apart
from their common origin~$p$.
They also have the same length since all leaves of $\mathcal{T}$ are at the same depth,
and all leaves in $A$ are in the subtree of $\mathcal{T}$ rooted at $p$.
Finally, they are shortest paths in $G$ by the choice of $\mathcal{T}$ as a shortest paths tree.
Therefore, $\mathsf{Tree}(P_1, P_2, \dots, P_\ell)$ is a simple geodesic tree.
We can now see that the following structure is a simple geodesic semi-ladder:
\[ \mathsf{SGSemiLadder}((a_{i_1}, \dots, a_{i_\ell}), (b_{i_1}, \dots, b_{i_\ell}),
\mathsf{Tree}(P_1, P_2, \dots, P_\ell)). \]
\end{claimproof}
\end{claim}
A simple geodesic semi-ladder
$\mathsf{SGSemiLadder}((a_1, \dots, a_k), (b_1, \dots, b_k), \mathcal{P})$ of order $k$,
together with another vertex $q$, is \textbf{Q-equidistant} if:
\begin{itemize}
\item $\mathcal{P}$ avoids $q$,
\item $q \not\in \{a_1, a_2, \dots, a_k, b_1, b_2, \dots, b_k\}$,
\item $q$ is at the same distance from each vertex $a_i$, and
\item $\mathrm{dist}(q, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_i) > d$ for each $i \in [1, k]$.
\end{itemize}
We use the following notation for a Q-equidistant simple geodesic semi-ladder:
$\mathsf{QSemiLadder}(\allowbreak (a_1, \dots, a_k),\allowbreak (b_1, \dots, b_k),\allowbreak \mathcal{P}, q)$.
\begin{claim}
\label{quasi-cage-exists-q-claim}
Every simple geodesic semi-ladder of order $d\ell + 2$ contains
a Q-equidistant simple geodesic semi-ladder of order $\ell$
as a subset.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Take a simple geodesic semi-ladder of order $d\ell + 2$:
$$ \mathsf{SGSemiLadder}((a_1, \dots, a_{d\ell + 2}), (b_1, \dots, b_{d\ell + 2}), \mathcal{P}) \qquad
\text{where }\mathcal{P} = \mathsf{Tree}(P_1, P_2, \dots, P_{d\ell + 2}).$$
Notice that $b_1 \neq \mathsf{Root}(\mathcal{P})$; otherwise, we would have
$d < \mathrm{dist}(b_1, a_1) = \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_1) = \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_2) =
\mathrm{dist}(b_1, a_2) \leq d$.
Since paths $P_2, \dots, P_{d\ell + 2}$ are vertex-disjoint apart from $\mathsf{Root}(\mathcal{P})$,
this means that at most one of them passes through $b_1$.
Hence, at least $d\ell$ such paths do not contain $b_1$.
Moreover, for each $i \in [2, d\ell + 2]$, we have $\mathrm{dist}(a_i, b_1) \in [1, d]$.
By the pigeonhole principle, we can fix $\ell$ indices $i_1, i_2, \dots, i_\ell$
($2 \leq i_1 < i_2 < \dots < i_\ell \leq d\ell + 2$) with the following properties:
\begin{itemize}
\item for each $j \in [1, \ell]$, the path $P_{i_j}$ does not contain $b_1$,
\item $b_1$ is at the same distance from each vertex $a_{i_j}$ ($j \in [1, \ell]$).
\end{itemize}
We will prove that the following structure is a Q-equidistant simple geodesic semi-ladder:
$$ \mathsf{QSemiLadder}((a_{i_1}, \dots, a_{i_\ell}), (b_{i_1}, \dots, b_{i_\ell}),
\mathsf{Tree}(P_{i_1}, \dots, P_{i_\ell}), b_1). $$
Since the choice of the indices $i_1, \dots, i_\ell$ already met the first and the third
condition in the definition of a Q-equidistant simple geodesic semi-ladder,
we only need to verify the remaining requirements.
As any two vertices in the semi-ladder are different,
we have $b_1 \neq a_{i_j}$ and $b_1 \neq b_{i_j}$ for each $j \in [1, \ell]$, which
confirms the second condition.
Moreover, for every $j \in [1, \ell]$, we have that
\begin{equation*}
\begin{split}
\mathrm{dist}(b_1, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_{i_j}) &=
\mathrm{dist}(b_1, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_1) \geq \\ &\geq
\mathrm{dist}(b_1, a_1) > d.
\end{split}
\end{equation*}
All the required conditions are satisfied, so the structure defined above
is a Q-equidistant simple geodesic semi-ladder.
\end{claimproof}
\end{claim}
Now we will see that a large Q-equidistant simple geodesic semi-ladder in $G$
directly witnesses the existence of a large quasi-cage in $G$.
\begin{claim}
\label{quasi-cage-exists-qc-claim}
Every graph with a Q-equidistant simple geodesic semi-ladder of order $\ell$ also
contains a quasi-cage of order $\ell$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Fix a Q-equidistant simple geodesic semi-ladder as in the statement of the claim:
$$\mathcal{L} = \mathsf{QSemiLadder}((a_1, \dots, a_\ell),\allowbreak (b_1, \dots, b_\ell), \mathcal{P}, q).$$
Let also $\mathcal{S}$ denote the semi-ladder $a_1, \dots, a_\ell$, $b_1, \dots, b_\ell$ underlying
$\mathcal{L}$, and set $p := \mathsf{Root}(\mathcal{P})$.
Let us also take $\mathcal{Q}$ as any shortest-path tree rooted at $q$ whose leaves
are $a_1, a_2, \dots, a_\ell$.
We will now verify that according to Definition \ref{def-quasi-cage}, the following structure
is a quasi-cage:
$$ \mathsf{QuasiCage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q}). $$
We first note that $p \not\in \mathcal{S}$ since $\mathcal{L}$ is also an R-equidistant semi-ladder.
Similarly, $q$ is disjoint with $\mathcal{S}$, which follows immediately from the definition of $\mathcal{L}$ as
a Q-equidistant simple geodesic semi-ladder.
The geodesic tree $\mathcal{P}$ is simple (since $\mathcal{L}$ is a simple geodesic semi-ladder)
and avoids $q$ (since $\mathcal{L}$ is a Q-equidistant simple geodesic semi-ladder).
We only need to prove that $\mathcal{Q}$ avoids $p$.
Assume for contradiction that for some $i \in [1, \ell]$, a path $Q_i = \mathsf{Path}(\mathcal{Q}, i)$
contains $p$ as a vertex.
This would mean that the shortest path between $q$ and $a_i$ contains
$p$ as a vertex.
However, by the definition of a Q-equidistant simple geodesic semi-ladder:
$$ \mathrm{dist}(q, a_i) = \mathrm{dist}(q, p) + \mathrm{dist}(p, a_i) = \mathrm{dist}(q, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_i) > d $$
--- a contradiction.
\end{claimproof}
\end{claim}
We can now combine the claims above to prove our lemma.
Take any distance-$d$ semi-ladder $L_1$ in $G$ of order $d(d\ell + 2)^d + 1$.
By Claim \ref{quasi-cage-exists-r-claim}, $L_1$ contains an R-equidistant semi-ladder
$L_2$ of order $(d\ell + 2)^d$ as a subset.
By Claim \ref{quasi-cage-exists-sg-claim}, $L_2$ contains a simple geodesic semi-ladder
$L_3$ of order $d\ell + 2$ as a subset.
By Claim \ref{quasi-cage-exists-q-claim}, $L_3$ contains a Q-equidistant
simple geodesic semi-ladder $L_4$ of order $\ell$ as a subset.
Hence, by Claim \ref{quasi-cage-exists-qc-claim}, $L_4$ asserts the existence of
a quasi-cage of order $\ell$ in $G$.
\end{proof}
\end{lemma}
Next, we refine the definition of a quasi-cage by defining cages --- variants of
quasi-cages ensuring that both geodesic trees in a definition of a quasi-cage intersect
in a controlled way.
\begin{definition}
A \textbf{cage} of order $\ell$ is a quasi-cage
$\mathsf{QuasiCage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q})$
in which for every two indices $i, j \in [1, \ell]$, the paths $\mathsf{Path}(\mathcal{P}, i)$ and $\mathsf{Path}(\mathcal{Q}, j)$
have a non-empty intersection if and only if $i = j$.
We denote this structure in the following way:
$$ \mathsf{Cage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q}). $$
\end{definition}
\begin{figure}[h]
\centering
\input{figures/cage-img.tex}
\caption{An example cage.
This cage is a subset of the quasi-cage from Figure \ref{quasi-cage-sample-fig}.
The pair of vertices $(a_2, b_2)$ has been removed from the original semi-ladder,
and the remaining indices have been renumbered.
Analogously to Figure \ref{quasi-cage-sample-fig}, vertices $b_1, b_2, \dots, b_5$ were
removed from the picture.}
\label{cage-sample-fig}
\end{figure}
To see that the definition of a cage is slightly stronger than the one of a quasi-cage,
we can verify that a quasi-cage in Figure \ref{quasi-cage-sample-fig} is not a cage ---
its path connecting $q$ with $a_6$ intersects the path connecting $p$ with $a_2$.
However, a large subset of it is a cage (Figure \ref{cage-sample-fig}).
This is not a coincidence, as proved in the following lemma.
\begin{lemma}
\label{cage-exists}
Every graph with a quasi-cage of order $(2d - 1)\ell$
contains a cage of order $\ell$ as a subset.
\begin{proof}
Fix a quasi-cage:
$$\mathsf{QuasiCage}((a_1, a_2, \dots, a_{(2d - 1)\ell}),
(b_1, b_2, \dots, b_{(2d - 1)\ell}), \mathcal{P}, \mathcal{Q})$$
where $\mathcal{P} = \mathsf{Tree}(P_1, \dots, P_{(2d-1)\ell})$,
$\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_{(2d-1)\ell})$.
Firstly, note that for every $i \in [1, (2d-1)\ell]$, paths $P_i$ and $Q_i$ intersect, because
they share their final vertex $a_i$.
Our aim is now to find a subset of indices $I \subseteq \{1, 2, \dots, (2d - 1)\ell\}$
such that $|I| = \ell$ and for any two different indices $i, j \in I$, paths
$P_i$ and $Q_j$ do not intersect.
As soon as we achieve this, the subset of the quasi-cage given by the set of indices $I$
will form the sought cage.
Let us create an auxiliary directed graph $H$ where $V(H) = \{1, 2, \dots, (2d - 1)\ell\}$,
such that $H$ contains an oriented edge $i \to j$ for $i \neq j$ if and only if
$P_i$ and $Q_j$ intersect.
Let also $\widehat{H}$ be the undirected graph underlying $H$.
We plan to find an independent set $I \subseteq V(\widehat{H})$ of size at least $\ell$.
Then for any two indices $i, j \in I$, we will have that paths $P_i$ and $Q_j$ are disjoint,
as well as paths $P_j$ and $Q_i$.
Therefore, $I$ will be a subset of indices forming a cage.
We note that each path $Q_j$ has length at most $d$.
As $Q_j$ does not pass through $p$ (the root of the simple geodesic tree $\mathcal{P}$),
each vertex other than its origin $q$ can lie on at most one of the paths $P_i$.
Thus, $Q_j$ intersects at most $d$ different paths in $\mathcal{P}$.
Since $Q_j$ intersects with $P_j$ for every $j \in [1, (2d-1)\ell]$, we get that
$Q_j$ has a non-empty intersection with at most $d-1$ paths $P_i$ for $i \neq j$.
This means that no vertex of $H$ has in-degree larger than $d-1$.
In every non-empty subset $S$ of vertices of $\widehat{H}$,
the total number of edges in the subgraph
of $\widehat{H}$ induced by $S$ does not exceed $|S| \cdot (d-1)$;
this is because in the subgraph of $H$ induced by $S$, each vertex has in-degree not
exceeding $d-1$.
Thus, $\mathcal{S}$ contains a vertex with degree not exceeding the average degree of the vertices
in $S$, which can be bounded from above by
$$\frac{2 \cdot [|S| \cdot (d - 1)]}{|S|} = 2d - 2.$$
Hence, $\widehat{H}$ is $(2d-2)$-degenerate \cite{lick_white_1970}.
Since $(2d-2)$-degenerate graphs are $(2d-1)$-colorable~\cite{SZEKERES19681},
$\widehat{H}$ contains an independent set of size at least
\[\frac{|V(\widehat{H})|}{2d-1} = \ell.\]
\end{proof}
\end{lemma}
\subsection{Ordered cages}
\label{ordered-cages-section}
So far, the definition of a cage does not involve any topological properties of the plane.
In this subsection, we will introduce the topology to the cages by defining
ordered cages.
We will, however, need some notation beforehand.
\begin{definition}
For a cage $\mathcal{C} := \mathsf{Cage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q})$
of order $\ell$ in a graph $G$, and an index $i \in \{1, 2, \dots, \ell\}$, we define:
\begin{itemize}
\item the \textbf{$i$-th splitting vertex} $\mathsf{Split}(\mathcal{C}, i)$
as the vertex of the intersection of $\mathsf{Path}(\mathcal{P}, i)$ and $\mathsf{Path}(\mathcal{Q}, i)$
which is the closest to $\mathsf{Root}(\mathcal{P})$ (this vertex is unique since $\mathsf{Path}(\mathcal{P}, i)$ is
a shortest path in $G$);
\item the \textbf{$i$-th splitting path} $\mathsf{SPath}(\mathcal{C}, i)$
as the oriented simple path originating at $\mathsf{Root}(\mathcal{P})$,
following the prefix of $\mathsf{Path}(\mathcal{P}, i)$ until $\mathsf{Split}(\mathcal{C}, i)$,
and then --- the prefix of $\mathsf{Path}(\mathcal{Q}, i)$ in the opposite direction.
Formally,
$$ \mathsf{SPath}(\mathcal{C}, i) = \mathsf{Path}(\mathcal{P}, i)[\mathsf{Root}(\mathcal{P}),
\mathsf{Split}(\mathcal{C}, i)]\ \cdot\ (\mathsf{Path}(\mathcal{Q}, i))^{-1}[\mathsf{Split}(\mathcal{C}, i),
\mathsf{Root}(\mathcal{Q})].$$
\end{itemize}
\end{definition}
The definitions are also explained in Figure \ref{splitting-sample-fig}.
\begin{figure}[h]
\centering
\input{figures/splitting-img.tex}
\caption{Example splitting vertices and splitting paths in the cage $\mathcal{C}$ from
Figure~\ref{cage-sample-fig}.
Objects $\mathsf{Split}(\mathcal{C}, 2)$ and $\mathsf{SPath}(\mathcal{C}, 2)$ are marked yellow,
objects $\mathsf{Split}(\mathcal{C}, 4)$ and $\mathsf{SPath}(\mathcal{C}, 4)$ are marked orange,
and $\mathsf{SPath}(\mathcal{C}, 1)$ is marked green.}
\label{splitting-sample-fig}
\end{figure}
We derive the following facts about splitting paths:
\begin{lemma}
\label{two-splitting-paths-lemma}
Fix a cage $\mathcal{C} = ((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$,
two different indices $i, j \in [1, \ell]$ and a vertex $x \in V(\mathcal{Q})$.
If $x \in Q_i$ and $x \in Q_j$, then $x \in \mathsf{SPath}(\mathcal{C}, i) \cap \mathsf{SPath}(\mathcal{C}, j)$.
\begin{proof}
Note that $\mathsf{Split}(\mathcal{C}, i) \in P_i \cap Q_i$.
Hence, path $Q_j$ cannot contain $\mathsf{Split}(\mathcal{C}, i)$ or otherwise
paths $P_i$ and $Q_j$ would intersect.
Therefore, $x$ is an ancestor of $\mathsf{Split}(\mathcal{C}, i)$ in $\mathcal{Q}$, so
$$x \in (\mathsf{Path}(\mathcal{Q}, i))^{-1}[\mathsf{Split}(\mathcal{C}, i), \mathsf{Root}(\mathcal{Q})].$$
Thus, $x \in \mathsf{SPath}(\mathcal{C}, i)$.
We prove that $x \in \mathsf{SPath}(\mathcal{C}, j)$ analogously.
\end{proof}
\end{lemma}
\begin{lemma}
\label{splitting-path-intersection}
For a cage $\mathcal{C} = ((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ in a graph $G$,
and two different indices $i, j \in [1, \ell]$:
$$ \mathsf{SPath}(\mathcal{C}, i) \cap \mathsf{SPath}(\mathcal{C}, j)\ =\ \{\mathsf{Root}(\mathcal{P})\} \cup
\mathsf{SPath}(\mathcal{C}, i)[\lca_{\mathcal{Q}}(a_i, a_j), \mathsf{Root}(\mathcal{Q})]. $$
In other words, any two distinct paths $\mathsf{SPath}(\mathcal{C}, i)$, $\mathsf{SPath}(\mathcal{C}, j)$
intersect exactly in their first vertex $p$ and in their common suffix.
\begin{proof}
We first note that the following condition is simple to verify.
By Lemma \ref{two-splitting-paths-lemma}, we have that
$$\mathsf{SPath}(\mathcal{C}, i)[\lca_{\mathcal{Q}}(a_i, a_j), \mathsf{Root}(\mathcal{Q})] =
\mathsf{SPath}(\mathcal{C}, j)[\lca_{\mathcal{Q}}(a_i, a_j), \mathsf{Root}(\mathcal{Q})].$$
Hence:
$$ \mathsf{SPath}(\mathcal{C}, i) \cap \mathsf{SPath}(\mathcal{C}, j)\ \supseteq\ \{\mathsf{Root}(\mathcal{P})\} \cup
\mathsf{SPath}(\mathcal{C}, i)[\lca_{\mathcal{Q}}(a_i, a_j), \mathsf{Root}(\mathcal{Q})]. $$
We only need to prove the $\subseteq$ part of the equality.
Let $\mathcal{P} = \mathsf{Tree}(P_1, P_2, \dots, P_\ell)$ and $\mathcal{Q} = \mathsf{Tree}(Q_1, Q_2, \dots,
Q_\ell)$, and fix two different indices $i, j$.
By the definition of a cage, paths $P_i$ and $Q_j$ are vertex-disjoint,
and paths $P_j$ and $Q_i$ are vertex-disjoint.
Since $\mathsf{SPath}(\mathcal{C}, i) \subseteq P_i \cup Q_i$ and $\mathsf{SPath}(\mathcal{C}, j) \subseteq P_j \cup Q_j$, we
conclude that
$$ \mathsf{SPath}(\mathcal{C}, i) \cap \mathsf{SPath}(\mathcal{C}, j) \subseteq (P_i \cap P_j) \cup (Q_i \cap Q_j). $$
We conclude the proof by noting that $P_i \cap P_j = \{p\}$ ($\mathcal{P}$ is a simple geodesic tree)
and $Q_i \cap Q_j = \mathsf{SPath}(\mathcal{C}, i)[\lca_\mathcal{Q}(a_i, a_j), \mathsf{Root}(\mathcal{Q})]$.
\end{proof}
\end{lemma}
In the example in Figure \ref{splitting-sample-fig}, paths $\mathsf{Split}(\mathcal{C}, 2)$
and $\mathsf{Split}(\mathcal{C}, 4)$ intersect at $p$ and $q$ only,
whereas paths $\mathsf{Split}(\mathcal{C}, 1)$ and $\mathsf{Split}(\mathcal{C}, 4)$ intersect
at $p$ and their common suffix, $\mathsf{Split}(\mathcal{C}, 4)[x, q]$
where $x = \lca_\mathcal{Q}(a_1, a_4)$.
\vspace{1em}
We will now introduce the concept of an order of a cage $\mathcal{C}$.
Roughly speaking, if we let $\mathcal{C} = \mathsf{Cage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$, then
the paths $\mathsf{Path}(\mathcal{P}, 1), \mathsf{Path}(\mathcal{P}, 2), \dots, \mathsf{Path}(\mathcal{P}, \ell)$ originate at the common vertex
$\mathsf{Root}(\mathcal{P})$ and are vertex disjoint otherwise.
Therefore, we can order all these paths cyclically around $\mathsf{Root}(\mathcal{P})$.
We stress that this cyclic order might not necessarily be consistent with
the numbering of the paths.
Fortunately, it turns out that we can order these paths in such a way that
the paths $\mathsf{Path}(\mathcal{Q}, 1), \mathsf{Path}(\mathcal{Q}, 2), \dots, \mathsf{Path}(\mathcal{Q}, \ell)$ are also sorted
in a meaningful way.
This is formalized by the following definition:
\begin{definition}
\label{order-def}
In a cage $\mathcal{C} = \mathsf{Cage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ of order $\ell$ in a graph $G$
embedded in the plane, where $\mathcal{P} = \mathsf{Tree}(P_1, \dots, P_\ell)$,
$\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_\ell)$,
an \textbf{order} is a permutation $\sigma = (\sigma_1, \sigma_2, \dots, \sigma_\ell)$ of
$\{1, 2, \dots, \ell\}$ such that:
\begin{itemize}
\item the first edges on paths $P_{\sigma_1}, P_{\sigma_2}, \dots, P_{\sigma_\ell}$
are ordered anti-clockwise around $\mathsf{Root}(\mathcal{P})$ in the embedding of $G$ in the plane, and
\item for each vertex $v \in V(\mathcal{Q})$, there exist two indices $L, R$
($1 \leq L \leq R \leq \ell$) such that
$v$ lies on paths $Q_{\sigma_L}, Q_{\sigma_{L+1}}, \dots, Q_{\sigma_R}$ and on no other path
$Q_i$.
\end{itemize}
\end{definition}
For instance, the cage in Figure \ref{splitting-sample-fig} has an order; permutations
$\sigma = (1, 4, 5, 2, 3)$ and $\sigma = (5, 2, 3, 1, 4)$ are example orders.
However, not all cyclic shifts of $(1, 4, 5, 2, 3)$ are correct orders --- for instance,
$\sigma = (4, 5, 2, 3, 1)$ is \emph{not} an order because the vertex marked $x$ in
Figure \ref{splitting-sample-fig} would belong to paths $P_{\sigma_1}$ and $P_{\sigma_5}$
and no other paths.
Using Definition \ref{order-def}, we can naturally refine the definition of a cage.
\begin{definition}
\label{ordered-cage-def}
An \textbf{ordered cage} of order $\ell$ in a graph $G$ embedded in the plane
is a cage together with its order $\sigma$.
We denote this structure as
$$ \mathsf{OrderedCage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q}, \sigma). $$
\end{definition}
We are now ready to present a lemma which allows us to turn each cage into an ordered cage:
\begin{lemma}
\label{order-lemma}
Each cage in a graph $G$ embedded in the plane has an order.
\begin{proof}
Fix a cage $\mathcal{C} = ((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ in $G$.
We let $\mathcal{P} = \mathsf{Tree}(P_1, \dots, P_\ell)$, $\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_\ell)$,
$p = \mathsf{Root}(\mathcal{P})$, $q = \mathsf{Root}(\mathcal{Q})$.
If $\ell = 1$, the lemma is trivial.
From now on, we assume that $\ell \geq 2$.
Consider a permutation $\mu^1 = (\mu^1_1, \mu^1_2, \dots, \mu^1_\ell)$ of
$\{1, 2, \dots, \ell\}$ for which the first edges on paths $P_{\mu^1_1}, P_{\mu^1_2}, \dots,
P_{\mu^1_\ell}$ are ordered anti-clockwise around $p$.
We also consider all cyclic shifts of $\mu^1$ --- for each $k \in [1, \ell]$, we define
$\mu^k = (\mu^k_1, \mu^k_2, \dots, \mu^k_\ell)$ as follows:
$$ \mu^k = (\mu^1_k, \mu^1_{k+1}, \dots, \mu^1_\ell, \mu^1_1, \mu^1_2, \dots, \mu^1_{k-1}). $$
Clearly, for each $k \in [1, \ell]$, the first edges on the paths
$P_{\mu^k_1}, P_{\mu^k_2}, \dots, P_{\mu^k_\ell}$ are ordered anti-clockwise around $p$.
We will prove that at least one of the permutations $\mu^1, \mu^2, \dots, \mu^\ell$ is an order.
We begin by taking a vertex $v \in V(\mathcal{Q})$ and describing the set
of paths $Q_i$ containing $v$.
\begin{claim}
\label{order-lemma-claim-no-interleave}
For every $v \in V(\mathcal{Q})$,
no cyclic shift $\mu^k$ ($k \in [1,\ell]$) of $\mu^1$ contains four distinct indices
$\mu^k_x, \mu^k_y, \mu^k_z, \mu^k_t$ ($1 \leq x < y < z < t \leq \ell$) such that
$$ v \in Q_{\mu^k_x}, \quad v\not\in Q_{\mu^k_y}, \quad v \in Q_{\mu^k_z}, \quad
v \not\in Q_{\mu^k_t}. $$
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
For the sake of contradiction let us pick a vertex $v \in V(\mathcal{Q})$, an index $k \in [1, \ell]$,
and indices $1 \leq x < y < z < t \leq \ell$ for which the conditions above hold.
We simplify the notation by setting $\ddot{x} = \mu^k_x$, $\ddot{y} = \mu^k_y$,
$\ddot{z} = \mu^k_z$, $\ddot{t} = \mu^k_t$ (Figure \ref{no-interleave-claim-fig}(a)).
We first remark that since $q$ is the root of $\mathcal{Q}$, it belongs to all paths $Q_i$.
Therefore, we must have that $v \neq q$.
\begin{figure}
\centering
\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/ordering-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/ordering-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/ordering-c.tex}
(c)
\end{minipage}
\caption{(a) --- the setup in the proof of Claim \ref{order-lemma-claim-no-interleave}. \\
(b) --- the edges added in $G'$ (green). \\
(c) --- sets {$\color{green!70!white}A_1$},
{$\color{cyan!90!white}A_2$},
{$\color{pink!90!black}A_3$},
{$\color{brown!90!black}A_4$},
{$\color{violet!80!white}A_5$}
of vertices used in locating the $K_5$ clique as a minor of $G'$. }
\label{no-interleave-claim-fig}
\end{figure}
We will create another planar graph $G'$ which is a version of $G$ with some edges added
and some edges removed.
Let $f_{\ddot{x}}$, $f_{\ddot{y}}$, $f_{\ddot{z}}$, $f_{\ddot{t}}$ be the second
vertices on each of the paths $P_{\ddot{x}}$, $P_{\ddot{y}}$,
$P_{\ddot{z}}$, and $P_{\ddot{t}}$, respectively --- that is, the vertices immediately
following $p$ on the corresponding paths.
We create a graph $G'$ from $G$ with the same set of vertices and the same
embedding in the plane, but with the following
modifications (Figure \ref{no-interleave-claim-fig}(b)):
\begin{itemize}
\item We disconnect $p$ (the root of $\mathcal{P}$) from all its neighbors apart
from $f_{\ddot{x}}$, $f_{\ddot{y}}$, $f_{\ddot{z}}$, $f_{\ddot{t}}$.
\item We add the following edges to $G'$: $f_{\ddot{x}}f_{\ddot{y}}$,
$f_{\ddot{y}}f_{\ddot{z}}$, $f_{\ddot{z}}f_{\ddot{t}}$, and
$f_{\ddot{t}}f_{\ddot{x}}$.
\end{itemize}
Removing edges from the graph does not spoil its planarity.
Afterwards, four edges are inserted to $G'$.
In this graph, the anti-clockwise cyclic order of all edges incident to $p$ is
$pf_{\ddot{x}}, pf_{\ddot{y}}, pf_{\ddot{z}}, pf_{\ddot{t}}$.
Each new edge $f_if_j$ connects a neighbor of $p$ with its next neighbor
in this cyclic order.
In order to preserve the planarity of $G'$, we draw an edge $f_if_j$ so that
the triangle created by oriented edges $f_if_j$, $f_jp$, $pf_i$ is oriented anti-clockwise,
and $f_if_j$ lies very close to edges $pf_i$ and $pf_j$ in the embedding
(Figure \ref{no-interleave-claim-fig}(b)).
Since $p$ has only four neighbors in $G'$, we can draw each edge without breaking
the planarity of the embedding of $G'$.
\vspace{0.5em}
We will now find the clique $K_5$ as a minor of $G'$.
We define five subgraphs of $G'$, induced by the following sets of vertices
(Figure \ref{no-interleave-claim-fig}(c)):
\begin{equation*}
\begin{split}
A_1 &= \{p\}, \\
A_2 &= \mathsf{SPath}(\mathcal{C}, \ddot{x})[f_{\ddot{x}}, v], \\
A_3 &= \mathsf{SPath}(\mathcal{C}, \ddot{y})[f_{\ddot{y}}, q], \\
A_4 &= \mathsf{SPath}(\mathcal{C}, \ddot{z})[f_{\ddot{z}}, v]\ \setminus\ A_2, \\
A_5 &= \mathsf{SPath}(\mathcal{C}, \ddot{t})[f_{\ddot{t}}, q]\ \setminus\ A_3. \\
\end{split}
\end{equation*}
Since $v \in Q_{\ddot{x}}$ and $v \in Q_{\ddot{z}}$,
Lemma \ref{two-splitting-paths-lemma} asserts that
$v \in \mathsf{SPath}(\mathcal{C}, \ddot{x})$ and $v \in \mathsf{SPath}(\mathcal{C}, \ddot{z})$.
It is also obvious that all other ends of paths in the definitions of $A_2, A_3, A_4, A_5$
belong to the respective paths.
Hence, the sets above are defined correctly.
These sets are also non-empty since
$$ p \in A_1,\ \ f_{\ddot{x}} \in A_2,\ \ f_{\ddot{y}} \in A_3,\ \ f_{\ddot{z}} \in A_4,\ \
f_{\ddot{t}} \in A_5. $$
We now prove that each of the induced subgraphs $G'[A_1], G'[A_2], G'[A_3], G'[A_4], G'[A_5]$
is connected.
This fact is obvious for $A_1$, $A_2$, and $A_3$.
For $A_4$, we need to observe that because of Lemma \ref{splitting-path-intersection},
paths $\mathsf{SPath}(\mathcal{C}, \ddot{x})$ and $\mathsf{SPath}(\mathcal{C}, \ddot{z})$
intersect exactly at $p$ and their common suffix.
Therefore, removing $A_2$ from $\mathsf{SPath}(\mathcal{C}, \ddot{z})[f_{\ddot{z}}, v]$
erases a suffix from the path, and leaves a subpath as a result.
An analogous argument applies to $A_5$.
Therefore, each of the subgraphs is connected.
\vspace{0.5em}
We can also prove the pairwise disjointness of $A_1, \dots, A_5$.
Obviously, $A_1$ is disjoint with all the remaining sets $A_2, A_3, A_4, A_5$.
Also, $A_2$ is disjoint with $A_4$ by the definition of $A_4$,
and $A_3$ is disjoint with $A_5$ by the definition of $A_5$.
Now, take any indices $i \in \{\ddot{x}, \ddot{z}\}$, $j \in \{\ddot{y}, \ddot{t}\}$, and let us prove
that paths $\mathsf{SPath}(\mathcal{C}, i)[f_i, v]$ and $\mathsf{SPath}(\mathcal{C}, j)[f_j, q]$
are vertex-disjoint.
By Lemma \ref{splitting-path-intersection} we have that
\begin{equation}
\label{k5-spath-intersection-eq}
\mathsf{SPath}(\mathcal{C}, i) \cap \mathsf{SPath}(\mathcal{C}, j) = \{p\} \cup \mathsf{SPath}(\mathcal{C}, i)[\lca_\mathcal{Q}(a_i, a_j), q]
\end{equation}
(where $\mathsf{SPath}(\mathcal{C}, i)[\lca_\mathcal{Q}(a_i, a_j), q]$ is the common suffix of $\mathsf{SPath}(\mathcal{C}, i)$ and
$\mathsf{SPath}(\mathcal{C}, j)$).
Naturally, $p \not\in \mathsf{SPath}(\mathcal{C}, i)[f_i, v]$.
Moreover, since $v \not\in Q_j$, we infer that
$v \not\in \mathsf{SPath}(\mathcal{C}, i)[\lca_\mathcal{Q}(a_i, a_j), q]$,
so $\mathsf{SPath}(\mathcal{C}, i)[f_i, v]$ is also disjoint with
$\mathsf{SPath}(\mathcal{C}, i)[\lca_\mathcal{Q}(a_i, a_j), q]$.
Hence, by \ref{k5-spath-intersection-eq}, $\mathsf{SPath}(\mathcal{C}, i)[f_i, v]$ is disjoint with
$\mathsf{SPath}(\mathcal{C}, j)$ as well.
This means that we proved the vertex-disjointness of each pair of sets $A_1, \dots, A_5$.
\vspace{0.5em}
We are left to see that there is an edge between each pair of sets:
\begin{itemize}
\item There is a direct edge $pf_{\ddot{x}}$ connecting sets $A_1$ and $A_2$;
we analogously show edges connecting $A_1$ with each remaining set.
\item There is a direct edge $f_{\ddot{x}}f_{\ddot{y}}$ connecting sets $A_2$ and $A_3$;
we analogously show edges connecting $A_3$ with $A_4$, $A_4$ with $A_5$,
and $A_5$ with $A_2$.
\item Since the sets $A_2 = \mathsf{SPath}(\mathcal{C}, \ddot{x})[f_{\ddot{x}}, v]$ and
$\mathsf{SPath}(\mathcal{C}, \ddot{z})[f_{\ddot{z}}, v]$ induce connected graphs and
have a non-empty intersection, then
naturally $A_4 = \mathsf{SPath}(\mathcal{C}, \ddot{z})[f_{\ddot{z}}, v] \setminus A_2$ is connected
by an edge with $A_2$.
We analogously show that $A_3$ and $A_5$ are connected by an edge.
\end{itemize}
\vspace{0.5em}
Summing everything up, we created a modified planar graph $G'$ and indicated
five non-empty connected subgraphs such that each pair of subgraphs is vertex-disjoint,
yet there exist edges connecting each pair of subgraphs.
Therefore, $G'$ contains $K_5$ as a minor and hence --- by Wagner's theorem
\cite{agnarsson2007graph} --- it cannot be planar.
The contradiction concludes the proof of the claim.
\end{claimproof}
\end{claim}
As a direct consequence of Claim \ref{order-lemma-claim-no-interleave},
we can see that no cyclic shift $\mu^k$ of $\mu^1$ can contain four direct indices
$\mu^k_x, \mu^k_y, \mu^k_z, \mu^k_t$ (defined as in Claim
\ref{order-lemma-claim-no-interleave}) such that
$$ v \not\in Q_{\mu^k_x}, \quad v\in Q_{\mu^k_y}, \quad v \not\in Q_{\mu^k_z}, \quad
v \in Q_{\mu^k_t}. $$
If this set of conditions was true, we could consider the cyclic shift of $\mu^k$
with $\mu^k_y$ at the first position.
We can easily see that this cyclic shift would be contradictory with
Claim \ref{order-lemma-claim-no-interleave}.
\vspace{1em}
For a vertex $v \in V(\mathcal{Q})$ and integer $k \in [1, \ell]$,
we set $\mathcal{K}^k_v := \{i \in [1, \ell]\, \mid\,
v \in Q_{\mu^k_i}\}$; in other words, $\mathcal{K}^k_v$ is the set of positions $i$
in the permutation $\mu^k$ for which the corresponding path $Q_{\mu_i^k}$
contains $v$ as a vertex.
Note that for every $k_1, k_2 \in [1, \ell]$ and every vertex $v \in V(\mathcal{Q})$,
set $\mathcal{K}^{k_1}_v$ is a cyclic shift of $\mathcal{K}^{k_2}_v$; this is because the permutations
$\mu^{k_1}$ and $\mu^{k_2}$ are also mutual cyclic shifts.
\begin{claim}
\label{order-lemma-cyclic-interval}
Each set $\mathcal{K}^k_v$ is a cyclic interval in $[1, \ell]$; that is, it is either an interval or
a set of the form $[x, \ell] \cup [1, y]$ for some $x > y$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Fix a vertex $v \in V(\mathcal{Q})$, integer $k \in [1, \ell]$,
and the corresponding set $\mathcal{K}^k_v$.
Assume that $\mathcal{K}^k_v$ is not a (non-cyclic) interval in $[1, \ell]$.
In this setup, there must exist
three indices $x, y, z$ ($1 \leq x < y < z \leq \ell$) for which
$x \in \mathcal{K}^k_v$, $y \not\in \mathcal{K}^k_v$, and $z \in \mathcal{K}^k_v$.
Without loss of generality, we can assume that $[x+1, z-1]$ is disjoint with $\mathcal{K}^k_v$.
Note that there cannot exist an index $t > z$ such that $t \not\in \mathcal{K}^k_v$ as this would
directly contradict Claim \ref{order-lemma-claim-no-interleave}.
Therefore, we have $[z, \ell] \subseteq \mathcal{K}^k_v$.
Also, there cannot exist an index $t < x$ such that $t \not\in \mathcal{K}^k_v$ as this would
pose a contradiction with the direct consequence of Claim
\ref{order-lemma-claim-no-interleave}.
Thus, we have $[1, x] \subseteq \mathcal{K}^k_v$.
Since $[1,x] \subseteq \mathcal{K}^k_v$, $[x+1, z-1] \cap \mathcal{K}^k_v = \varnothing$, and
$[z, \ell] \subseteq \mathcal{K}^k_v$, we have that $\mathcal{K}^k_v = [1, x] \cup [z, \ell]$.
\end{claimproof}
\end{claim}
In order to complete our proof, we also need to know how the cyclic intervals
$\mathcal{K}^k_v$ interact with each other.
It turns out that these intervals form a laminar family:
\begin{claim}
\label{order-lemma-laminar-family}
For any two vertices $u, v \in V(\mathcal{Q})$ and $k \in [1, \ell]$, the sets $\mathcal{K}^k_u$ and
$\mathcal{K}^k_v$ are either disjoint, or one of them is a subset of the other.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
We remark that for $v \in V(\mathcal{Q})$, we have the following equivalent definition
of $\mathcal{K}^k_v$:
$$ \mathcal{K}^k_v = \{i \in [1, \ell]\, \mid\, a_{\mu^k_i}\text{ is in the subtree of }
\mathcal{Q}\text{ rooted at }v\}. $$
This is true since the path $Q_{\mu^k_i}$ in the original definition of $\mathcal{K}^k_v$
originates at $\mathsf{Root}(\mathcal{Q})$ and terminates at $a_{\mu^k_i}$ (a leaf in $\mathcal{Q}$).
Hence, $v$ belongs to this path if and only if its endpoint --- $a_{\mu^k_i}$ ---
is in the subtree rooted at $v$.
It is however well-known that the family of sets of leaves in every rooted tree $T$, where each
set corresponds to a subset of leaves in a rooted subtree of $T$, is laminar.
The proof of the claim follows.
\end{claimproof}
\end{claim}
Having proved all the necessary observations, we can find the cyclic shift $\mu^k$ of $\mu^1$
which forms an order in the embedding of the graph.
Fix any vertex $v^* \in V(\mathcal{Q})$ for which the cyclic interval $\mathcal{K}^1_{v^*}$
is not equal to $[1, \ell]$, but otherwise contains the largest number of indices.
Such a vertex exists since $\ell \geq 2$, so the leaves in $\mathcal{Q}$ do not cover the whole interval
$[1, \ell]$.
We now take the cyclic shift $\mu^k$ for which $\mathcal{K}^k_{v^*}$ is a prefix of $[1, \ell]$;
this is possible since $\mathcal{K}_{v^*}$ is a cyclic interval in $\mu^1$.
\begin{claim}
\label{order-lemma-found-claim}
$\mu^k$ is an order in $\mathcal{C}$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Let $M$ be an integer such that $\mathcal{K}^k_{v^*} = [1, M]$.
We will now prove that $\mu^k$ is an order.
Firstly, since $\mu^k$ is a cyclic shift of $\mu^1$, the first edges on the paths
$P_{\mu^k_1}, P_{\mu^k_2}, \dots, P_{\mu^k_\ell}$ form an anti-clockwise order
around $p$.
In order to comply with Definition \ref{order-def},
we still need to prove that for each vertex $v \in V(\mathcal{Q})$, there exist two indices $L, R$
($1 \leq L \leq R \leq \ell$) such that $v$ lies exactly on paths
$Q_{\mu^k_L}, Q_{\mu^k_{L+1}}, \dots, Q_{\mu^k_R}$.
Fix a vertex $v \in \mathcal{Q}$.
Note that $\mathcal{K}^k_v$ is a cyclic interval (Claim \ref{order-lemma-cyclic-interval}).
If $\mathcal{K}^k_v = [1, \ell]$, then the proposition we are proving is trivial.
On the other hand, assume that $\mathcal{K}_v \neq [1, \ell]$.
From our assumptions, we have that $|\mathcal{K}^1_v| \leq |\mathcal{K}^1_{v^*}|$, so
also $|\mathcal{K}^k_v| \leq |\mathcal{K}^k_{v^*}|$.
From Claim \ref{order-lemma-laminar-family}, we get that $\mathcal{K}^k_v$ is either disjoint
or fully contained within $\mathcal{K}^k_{v^*}$; it cannot contain $\mathcal{K}^k_{v^*}$ strictly due to
$|\mathcal{K}^k_v| \leq |\mathcal{K}^k_{v^*}|$.
Recall that $\mathcal{K}^k_{v^*} = [1, M]$.
If $\mathcal{K}^k_v$ is disjoint with $\mathcal{K}^k_{v^*}$, then $\mathcal{K}^k_v \subseteq [M+1, \ell]$,
and $\mathcal{K}^k_v$ is a non-cyclic interval.
If $\mathcal{K}^k_v$ is fully contained within $\mathcal{K}^k_{v^*}$, then $\mathcal{K}^k_v \subseteq [1, M]$,
and again $\mathcal{K}^k_v$ is a non-cyclic interval.
Hence, every $v \in V(\mathcal{Q})$ can be assigned a subinterval $
\mathcal{K}^k_v = [L, R] \subseteq [1, \ell]$
such that $v$ lies exactly on paths $Q_{\mu^k_L}, Q_{\mu^k_{L+1}}, \dots, Q_{\mu^k_R}$.
This finishes the proof that $\mu^k$ is an order.
\end{claimproof}
\end{claim}
Claim \ref{order-lemma-found-claim} finishes the proof of the lemma.
\end{proof}
\end{lemma}
While it is possible to proceed to the next parts of the proof
using ordered cages, the fact that we need to use
two different orderings --- one imposed by the semi-ladder, and one imposed by
the order $\sigma$ in the ordered cage --- will be excessively unwieldy.
In order to remedy this inconvenience, we will introduce a~variant of ordered cages unifying
both orderings.
This variant will lead us to a slightly weaker upper bound on the maximum semi-ladder size,
though the bound will still remain asymptotically the same.
\begin{definition}
An \textbf{identity ordered cage} of order $\ell$ is an ordered cage
$$\textsf{OrderedCage}(\allowbreak(a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q}, \sigma)\ \ \text{where }\sigma = (1, 2, \dots, \ell)\text{ is the identity permutation.}$$
\noindent We denote this structure as
$$ \textsf{IdOrderedCage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q}). $$
\end{definition}
We immediately follow with a proof that large identity ordered cages exist in planar graphs
given that large ordered cages exist.
We, however, remark that the proof might alter the embedding of a graph in the plane.
\begin{lemma}
\label{identity-ordered-cage-exists}
If a graph $G$ embedded in the plane contains an ordered cage of order $(\ell - 1)^2 + 1$
for $\ell \geq 1$,
then there exists an embedding of $G$ in the plane in which $G$ contains an
identity ordered cage of order $\ell$.
\begin{proof}
Take any graph $G$ with an ordered cage $\mathcal{C}$ of order $(\ell-1)^2 + 1$:
$$\mathcal{C} = \mathsf{OrderedCage}((a_i)_{i=1}^{(\ell-1)^2+1},
(b_i)_{i=1}^{(\ell-1)^2+1}, \mathcal{P}, \mathcal{Q}, \sigma).$$
By Erd\H{o}s-Szekeres Theorem \cite{10.1007/978-1-4612-0801-3_9},
$\sigma$ contains either an increasing subsequence
of length $\ell$, or a decreasing subsequence of length $\ell$.
If $\sigma$ contains an increasing subsequence $\sigma_{\mathrm{inc}}$ of length $\ell$,
then a subset of $\mathcal{C}$ with indices $\sigma_{\mathrm{inc}}$
is an identity ordered cage of order $\ell$ in $G$ with the original embedding in the plane.
Assume now that $\sigma$ contains a decreasing subsequence $\sigma_{\mathrm{dec}}$
of length $\ell$.
In this case, we modify the embedding of $G$ in the plane by reflecting it through
any line in the Euclidean plane.
Since in the original embedding, the first edges on paths $P_{\sigma_1}, P_{\sigma_2}, \dots,
P_{\sigma_{(\ell-1)^2+1}}$ were ordered anti-clockwise around $\mathsf{Root}(\mathcal{P})$,
these edges are ordered clockwise in the reflected embedding.
Hence, the reversed permutation $\sigma^{\rev} =
(\sigma_{(\ell-1)^2 + 1}, \sigma_{(\ell-1)^2}, \dots, \sigma_1)$ is an order in the
modified embedding, since
the first edges on paths $P_{\sigma_{(\ell-1)^2+1}}, P_{\sigma_{(\ell-1)^2}}, \dots, P_{\sigma_1}$
are ordered anti-clockwise in the altered embedding.
The remaining condition in Definition \ref{ordered-cage-def} can be verified in a
straightforward way.
Now, we notice that $\sigma_{\mathrm{dec}}^{\rev}$ (the reversed subsequence
$\sigma_{\mathrm{dec}}$) is an increasing subsequence in the newly formed order
$\sigma^{\rev}$.
Hence, the subset of $\mathcal{C}$ indicated by $\sigma_{\mathrm{dec}}^{\rev}$
in the transformed embedding is an identity ordered cage.
\end{proof}
\end{lemma}
An example identity ordered cage is depicted in Figure \ref{figure-neighbor-areas}(a).
In identity ordered cages, the following useful fact holds:
\begin{lemma}
\label{lca-composition-lemma}
Fix an identity ordered cage $\mathsf{IdOrderedCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$
in a graph $G$ and three indices $i, j, k$ ($1 \leq i < j < k \leq \ell$).
In the set $\{\lca_\mathcal{Q}(a_i, a_j), \lca_\mathcal{Q}(a_j, a_k)\}$,
one of the elements is equal to $\lca_\mathcal{Q}(a_i, a_k)$ and is an ancestor of
the other element in the set (it can be, in particular, equal to it).
\begin{proof}
Since both elements of the set $\{\lca_\mathcal{Q}(a_i, a_j), \lca_\mathcal{Q}(a_j, a_k)\}$
are the ancestors of $a_j$ in $\mathcal{Q}$, one of these elements is an ancestor of the other.
Without loss of generality, assume that $\lca_\mathcal{Q}(a_i, a_j)$ is an ancestor of the other
element of the set.
This means that $a_k$ is in the subtree rooted at $\lca_\mathcal{Q}(a_i, a_j)$.
As both $a_i$ and $a_k$ are in this subtree, we infer that $\lca_\mathcal{Q}(a_i, a_j)$ is an ancestor
of $\lca_\mathcal{Q}(a_i, a_k)$.
Since $\lca_\mathcal{Q}(a_i, a_k) \in Q_i$, $\lca_\mathcal{Q}(a_i, a_k) \in Q_k$, and $j \in [i, k]$,
by the definition of an identity ordered cage we also have $\lca_\mathcal{Q}(a_i, a_k) \in Q_j$.
Therefore, $\lca_\mathcal{Q}(a_i, a_k)$ is also an ancestor of $a_j$ in $\mathcal{Q}$.
Hence, $\lca_\mathcal{Q}(a_i, a_k)$ is an ancestor of $\lca_\mathcal{Q}(a_i, a_j)$.
We conclude that $\lca_\mathcal{Q}(a_i, a_j) = \lca_\mathcal{Q}(a_i, a_k)$.
\end{proof}
\end{lemma}
\subsection{Neighbor areas}
\label{neighbor-area-section}
Until now, we were concerned about the structure imposed only by
some vertices of the semi-ladder --- that is, the vertices $a_1, a_2, \dots, a_\ell$.
It is now time to include the corresponding vertices $b_1, b_2, \dots, b_\ell$ in the picture.
It turns out that each sufficiently large ordered cage contains a smaller ordered cage as a subset
in which for every $i$, the vertex $b_i$ is, in some topological sense, \emph{near} $a_i$.
This is where the upper bounds on the neighborhood complexity in planar graphs proved in Section
\ref{noose-profile-lemma-section}, will come into play.
First, we need to design technical tools allowing us to formalize this idea.
\begin{definition}
Let $\mathcal{C} = \mathsf{IdOrderedCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ be an identity ordered
cage of order $\ell$ in $G$.
For every two integers $i, j$ ($ 1\leq i < j \leq \ell$), we set $v_{i,j} = \lca_\mathcal{Q}(a_i, a_j)$.
Note that by Lemma \ref{splitting-path-intersection}, $v_{i,j}$ is the first vertex of the common
suffix of $\mathsf{SPath}(\mathcal{C}, i)$ and $\mathsf{SPath}(\mathcal{C}, j)$.
For these integers $i, j$,
we define the \textbf{neighbor area} $\mathsf{Area}(\mathcal{C}, i, j)$ as the closed
part of the plane whose boundary is traversed anti-clockwise by the following directed cycle:
$$ \mathsf{SPath}(\mathcal{C}, i)[\mathsf{Root}(\mathcal{P}), v_{i, j}] \cdot
(\mathsf{SPath}(\mathcal{C}, j))^{-1}[v_{i, j}, \mathsf{Root}(\mathcal{P})]. $$
\end{definition}
Note that neighbor areas are not necessarily bounded (Figure \ref{figure-neighbor-areas}).
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-area-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-area-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-area-c.tex}
(c)
\end{minipage}
\caption{(a) --- an example identity ordered cage $\mathcal{C}$ of order $8$ embedded in the plane. \\
(b) --- neighbor areas $\mathsf{Area}(\mathcal{C}, 1, 2)$ (green), $\mathsf{Area}(\mathcal{C}, 2, 4)$ (violet), and
$\mathsf{Area}(\mathcal{C}, 5, 8)$ (orange). \\
(c) --- an unbounded neighbor area $\mathsf{Area}(\mathcal{C}, 2, 7)$ (blue). The area is unbounded
since its boundary is traversed anti-clockwise first by $\mathsf{SPath}(\mathcal{C}, 2)$, and later
by $(\mathsf{SPath}(\mathcal{C}, 7))^{-1}$.}
\label{figure-neighbor-areas}
\end{figure}
We can easily see from Figure \ref{figure-neighbor-areas} that the union
of two neighbor areas $\mathsf{Area}(\mathcal{C}, 1, 2)$ and $\mathsf{Area}(\mathcal{C}, 2, 4)$ in the presented example is
$\mathsf{Area}(\mathcal{C}, 1, 4)$, and that the intersection of these is a prefix of $\mathsf{SPath}(\mathcal{C}, 2)$.
It turns out that this observation is satisfied in general:
\begin{lemma}
\label{area-sum-lemma}
In an identity ordered cage $\mathcal{C}$ of order $\ell$, for every indices $i, j, k$ such that
$1 \leq i < j < k \leq \ell$, we have that:
\begin{equation*}
\begin{split}
\mathsf{Area}(\mathcal{C}, i, j) \cup \mathsf{Area}(\mathcal{C}, j, k) &= \mathsf{Area}(\mathcal{C}, i, k), \\
\mathsf{Area}(\mathcal{C}, i, j) \cap \mathsf{Area}(\mathcal{C}, j, k) &= \partial\mathsf{Area}(\mathcal{C},i,j) \cap \partial\mathsf{Area}(\mathcal{C},j,k) \subseteq
\mathsf{SPath}(\mathcal{C}, j).
\end{split}
\end{equation*}
\begin{proof}
We first define vertices $v_{i, j} = \lca_\mathcal{Q}(a_i, a_j)$, $v_{j, k}=\lca_\mathcal{Q}(a_j, a_k)$
as in the definition of neighbor areas.
We also let $\mathcal{C} = \mathsf{IdOrderedCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$,
$p := \mathsf{Root}(\mathcal{P})$, and $\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_\ell)$.
These definitions tell us that
\begin{equation*}
\begin{split}
\partial\mathsf{Area}(\mathcal{C}, i, j) &= \mathsf{SPath}(\mathcal{C}, i)[p, v_{i, j}] \cdot
(\mathsf{SPath}(\mathcal{C}, j))^{-1}[v_{i, j}, p], \\
\partial\mathsf{Area}(\mathcal{C}, j, k) &= \mathsf{SPath}(\mathcal{C}, j)[p, v_{j, k}] \cdot
(\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{j, k}, p].
\end{split}
\end{equation*}
Since $v_{i, j}$ and $v_{j, k}$ are both ancestors of $a_j$ in $\mathcal{Q}$, either of these is
an ancestor of the other (in particular, we might have $v_{i, j} = v_{j, k}$).
Without loss of generality, we assume that $v_{j, k}$ is an ancestor of $v_{i, j}$ in $\mathcal{Q}$
or equal to $v_{i, j}$ (Figure \ref{area-sum-layout-fig}).
Then, $\mathsf{SPath}(\mathcal{C}, j)[p, v_{i, j}] \subseteq \mathsf{SPath}(\mathcal{C}, j)[p, v_{j, k}]$.
Moreover, by Lemma \ref{lca-composition-lemma}, $v_{i,k} := \lca(a_i, a_k)$ is equal to $v_{j,k}$.
\begin{figure}[h]
\centering
\input{figures/area-sum-layout.tex}
\caption{The configuration assumed in Lemma \ref{area-sum-lemma}. The vertices
$v_{i,j}$ and $v_{j,k}$ may overlap. The blue area is $\mathsf{Area}(\mathcal{C}, i, j)$. The green area is
$\mathsf{Area}(\mathcal{C}, j, k)$. The brown path is $\mathsf{SPath}(\mathcal{C}, j)$.}
\label{area-sum-layout-fig}
\end{figure}
\vspace{0.5em}
We first note that $\partial\mathsf{Area}(\mathcal{C}, i, j) \cap \partial\mathsf{Area}(\mathcal{C}, j, k) \subseteq \mathsf{SPath}(\mathcal{C}, j)$;
this is because any intersection of both boundaries outside of $\mathsf{SPath}(\mathcal{C}, j)$ would
have to be an intersection of $\mathsf{SPath}(\mathcal{C}, i)$ with $\mathsf{SPath}(\mathcal{C}, k)$.
These paths intersect only at $p$ and $\mathsf{SPath}(\mathcal{C}, i)[v_{i, k}, q]$ (Lemma
\ref{splitting-path-intersection}).
However, $v_{i, k} = v_{j, k} \in \mathsf{SPath}(\mathcal{C}, j)$, so also $\mathsf{SPath}(\mathcal{C}, i)[v_{i, k}, q] \subseteq
\mathsf{SPath}(\mathcal{C}, j)$.
Obviously, $p \in \mathsf{SPath}(\mathcal{C}, j)$ as well.
Therefore, no intersection of $\partial\mathsf{Area}(\mathcal{C}, i, j)$ and $\partial\mathsf{Area}(\mathcal{C}, j, k)$ can occur
outside of $\mathsf{SPath}(\mathcal{C}, j)$.
Thanks to this fact, we can now compute $\partial\mathsf{Area}(\mathcal{C}, i, j) \cap \partial\mathsf{Area}(\mathcal{C}, j, k)$:
\begin{equation*}
\begin{split}
\partial\mathsf{Area}(\mathcal{C}, i, j) & \cap \partial\mathsf{Area}(\mathcal{C}, j, k) = \\
& = (\partial\mathsf{Area}(\mathcal{C}, i, j) \cap \mathsf{SPath}(\mathcal{C}, j)) \cap (\partial\mathsf{Area}(\mathcal{C}, j, k) \cap \mathsf{SPath}(\mathcal{C}, j))
= \\
& = \mathsf{SPath}(\mathcal{C}, j)[p, v_{i, j}] \cap \mathsf{SPath}(\mathcal{C}, j)[p, v_{j, k}] = \mathsf{SPath}(\mathcal{C}, j)[p, v_{i, j}]
\end{split}
\end{equation*}
--- that is, this intersection is a prefix of $\mathsf{SPath}(\mathcal{C}, j)$.
Therefore, the two boundaries intersect at exactly one segment.
We can use this information to prove that the interiors of $\mathsf{Area}(\mathcal{C}, i, j)$ and $\mathsf{Area}(\mathcal{C}, j, k)$
are disjoint.
Let us name $f_i, f_j, f_k$ as the second vertices on the paths $P_i, P_j, P_k$, respectively;
that is, the vertices immediately following $p = \mathsf{Root}(\mathcal{P})$ on the respective paths.
Since the counter-clockwise orientation of $\partial\mathsf{Area}(\mathcal{C}, i, j)$ contains
oriented edges $f_jp$ and $pf_i$ in this order,
and the counter-clockwise orientation of $\partial\mathsf{Area}(\mathcal{C}, j, k)$ contains
oriented edges $f_kp$ and $pf_j$ in this order,
we only need to verify the cyclic order of the edges $pf_i, pf_j, pf_k$ around vertex $p$.
These edges are ordered anti-clockwise around $p$ (by the definition of an ordered
cage), so the interiors of the areas $\mathsf{Area}(\mathcal{C}, i, j)$, $\mathsf{Area}(\mathcal{C}, j, k)$
are disjoint (Figure \ref{area-sum-layout-fig}).
From the considerations above, we conclude that
$$ \mathsf{Area}(\mathcal{C}, i, j) \cap \mathsf{Area}(\mathcal{C}, j, k) = \partial\mathsf{Area}(\mathcal{C}, i, j) \cap \partial \mathsf{Area}(\mathcal{C}, j, k)
\subseteq \mathsf{SPath}(\mathcal{C}, j). $$
Moreover, since the interiors of both neighbor areas are disjoint,
given the anti-clockwise orientations of $\partial\mathsf{Area}(\mathcal{C}, i, j)$ and
$\partial\mathsf{Area}(\mathcal{C}, j, k)$, both starting and finishing at their common vertex $p$,
we can compute the anti-clockwise orientation of $\partial[\mathsf{Area}(\mathcal{C}, i, j) \cup
\mathsf{Area}(\mathcal{C}, j, k)]$ by composing the anti-clockwise orientations of
$\partial\mathsf{Area}(\mathcal{C}, i, j)$ and $\partial\mathsf{Area}(\mathcal{C}, j, k)$:
\begin{equation*}
\begin{split}
& \partial[\mathsf{Area}(\mathcal{C}, i, j) \cup \mathsf{Area}(\mathcal{C}, j, k)] = \\
& = \mathsf{SPath}(\mathcal{C}, i)[p, v_{i, j}] \cdot (\mathsf{SPath}(\mathcal{C}, j))^{-1}[v_{i, j}, p] \cdot
\mathsf{SPath}(\mathcal{C}, j)[p, v_{j, k}] \cdot (\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{j, k}, p] = \\
& = \mathsf{SPath}(\mathcal{C}, i)[p, v_{i, j}] \cdot \mathsf{SPath}(\mathcal{C}, j)[v_{i, j}, v_{j, k}] \cdot
(\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{j, k}, p] \stackrel{(\star)}{=} \\
& \stackrel{(\star)}{=} \mathsf{SPath}(\mathcal{C}, i)[p, v_{i, j}] \cdot \mathsf{SPath}(\mathcal{C}, i)[v_{i, j}, v_{j, k}] \cdot
(\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{j, k}, p] = \\
& = \mathsf{SPath}(\mathcal{C}, i)[p, v_{j, k}] \cdot (\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{j, k}, p] = \\
& =
\mathsf{SPath}(\mathcal{C}, i)[p, v_{i, k}] \cdot (\mathsf{SPath}(\mathcal{C}, k))^{-1}[v_{i, k}, p] =
\partial\mathsf{Area}(\mathcal{C}, i, k).
\end{split}
\end{equation*}
In the equality $(\star)$, we use the definition of $v_{i, j}$ --- it is the first vertex
of the common suffix of $\mathsf{SPath}(\mathcal{C}, i)$ and $\mathsf{SPath}(\mathcal{C}, j)$.
Therefore, $\mathsf{Area}(\mathcal{C}, i, j) \cup \mathsf{Area}(\mathcal{C}, j, k) = \mathsf{Area}(\mathcal{C}, i, k)$.
\end{proof}
\end{lemma}
We can immediately infer the following fact from Lemma \ref{area-sum-lemma}:
\begin{corollary}
\label{area-int-lemma}
In any identity ordered cage $\mathcal{C}$ of order $\ell$, for every triple of indices $i, j, k$ such that
$1 \leq i < j < k \leq \ell$, we have that:
$$ \mathsf{Area}(\mathcal{C}, i, j) \cap \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, j, k) = \varnothing,
\qquad \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, i, j) \cap \mathsf{Area}(\mathcal{C}, j, k) = \varnothing. $$
\begin{proof}
Since areas $\mathsf{Area}(\mathcal{C}, i, j)$ and $\mathsf{Area}(\mathcal{C}, j, k)$ intersect only at their boundaries,
the interior of either neighbor area is disjoint with the other neighbor area.
\end{proof}
\end{corollary}
Now we will examine the importance of neighbor areas in identity ordered cages.
For an identity ordered cage $\mathcal{C}$ of order $\ell$ and two indices $i, j$ ($i < j$),
we can observe which vertices of the semi-ladder underlying $\mathcal{C}$:
$a_1, a_2, \dots, a_\ell, b_1, b_2, \dots, b_\ell$ belong to $\mathsf{Area}(\mathcal{C}, i, j)$,
and which do not.
It turns out that there cannot be too many pairs of vertices $(a_k, b_k)$ for $k \in [1, \ell]$
such that one vertex in the pair belongs to $\mathsf{Area}(\mathcal{C}, i, j)$ and the other does not.
For simplicity of the further part of the proof, we use the following definition:
\begin{definition}
\label{separated-from-def}
Fix a neighbor area $\mathsf{Area}(\mathcal{C}, i, j)$ in an identity ordered cage $\mathcal{C}$.
For a~pair of vertices $u, v$, if exactly one of them belongs to $\mathsf{Area}(\mathcal{C}, i, j)$,
we will say that $u$ \textbf{is separated from} $v$ by $\mathsf{Area}(\mathcal{C}, i, j)$.
\end{definition}
For instance, in Figure \ref{figure-neighbor-areas}, $a_5$ is separated from $a_3$ by
$\mathsf{Area}(\mathcal{C}, 2, 4)$, but $a_5$ is not separated from $a_7$ by the same neighbor area.
It turns out that the definition of ``being separated'' is connected in a non-trivial way
to the distinctness of distance-$d$ profiles.
This will allow us to employ the Noose Profile Lemma (Theorem \ref{noose-profile-lemma}),
which bounds the neighborhood complexity of nooses in planar graphs,
in order to limit the number of pairs
of the vertices of the semi-ladder separated by neighbor areas.
\begin{lemma}
\label{neighbor-separation-lemma}
In an identity ordered cage $\mathcal{C} = \mathsf{IdOrderedCage}((a_i)_{i=1}^\ell,
(b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ of order~$\ell$, for every pair of indices $i, j$ ($1 \leq i < j \leq
\ell$), the neighbor area $\mathsf{Area}(\mathcal{C}, i, j)$ separates at most $128d^3(d+2)^4$ distinct pairs
of vertices $(a_k, b_k)$ for $k \in [1, \ell]$.
\begin{proof}
Fix two integers $i, j$ ($1 \leq i < j \leq \ell$) for the proof.
Denote the set of vertices on the boundary of $\mathsf{Area}(\mathcal{C}, i, j)$ as $B$.
\begin{claim}
\label{large-neighbor-small-noose}
$|B| \leq 4d$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
We first note that $|E(\mathsf{SPath}(\mathcal{C}, k))| \leq 2d$ for each $k \in [1, L]$ since
$\mathsf{SPath}(\mathcal{C}, k)$ is the concatenation of subpaths of two paths,
$\mathsf{Path}(\mathcal{P}, k)$ and $\mathsf{Path}(\mathcal{Q}, k)$, whose lengths do not exceed $d$.
The boundary of $\mathsf{Area}(\mathcal{C}, i, j)$ is a cycle and
consists of two prefixes of paths $\mathsf{SPath}(\mathcal{C}, i)$ and $\mathsf{SPath}(\mathcal{C}, j)$.
Therefore,
\[ |B| = |V(\partial \mathsf{Area}(\mathcal{C}, i, j))| = |E(\partial \mathsf{Area}(\mathcal{C}, i, j))| \leq
|E(\mathsf{SPath}(\mathcal{C}, i))| + |E(\mathsf{SPath}(\mathcal{C}, j))| \leq 4d. \]
\end{claimproof}
\end{claim}
Let $I$ denote the set of indices $k$ for which $a_k$ is separated from $b_k$ by
$\mathsf{Area}(\mathcal{C}, i, j)$; we need to prove that $|I| \leq 128d^3(d + 2)^4$.
For each $k \in I$, two cases are possible --- either $a_k$ belongs to $\mathsf{Area}(\mathcal{C}, i, j)$,
which implies that $b_k \not\in \mathsf{Area}(\mathcal{C}, i, j)$; or $a_k \not\in \mathsf{Area}(\mathcal{C}, i, j)$, which
implies that $b_k \in \mathsf{Area}(\mathcal{C}, i, j)$.
We will partition $I$ into two subsets --- $I_1$ and $I_2$ --- depending on which
case holds for a given $k$:
$$ I_1 = \{k \in I\, \mid\, a_k \in \mathsf{Area}(\mathcal{C}, i, j),\ b_k \not\in \mathsf{Area}(\mathcal{C}, i, j)\}, $$
$$ I_2 = \{k \in I\, \mid\, a_k \not\in \mathsf{Area}(\mathcal{C}, i, j),\ b_k \in \mathsf{Area}(\mathcal{C}, i, j)\}. $$
We will prove that both $I_1$ and $I_2$ contain no more than $64d^3(d + 2)^4$ indices;
the statement of the lemma will follow immediately.
\begin{claim}
\label{large-neighbor-distinct-profiles}
For any $t \in \{1, 2\}$ and two different indices $x, y \in I_t$,
vertices $a_x$ and $a_y$ have different distance-$d$ profiles on $B$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Assume on the contrary that $a_x$ and $a_y$ have identical distance-$d$ profiles on $B$.
Without loss of generality, assume that $x < y$.
Because vertices $a_x, a_y, b_x, b_y$ form a distance-$d$ semi-ladder of order $2$,
it follows that
$$
\mathrm{dist}(a_y, b_x) \leq d, \quad\text{ but }\quad \mathrm{dist}(a_x, b_x) > d.
$$
\begin{figure}[h]
\centering
\input{figures/separating-profiles.tex}
\caption{The configuration in Claim \ref{large-neighbor-distinct-profiles}.}
\label{separating-profiles-fig}
\end{figure}
Since $x, y \in I_k$, we have that $a_y$ is separated from $b_x$ by $\mathsf{Area}(\mathcal{C}, i, j)$.
Therefore, the shortest path
between these two vertices must pass through a vertex of $\partial \mathsf{Area}(\mathcal{C}, i, j)$ ---
that is, some vertex $z \in B$ (Figure \ref{separating-profiles-fig}).
Thus,
$$
\mathrm{dist}(a_y, b_x) = \mathrm{dist}(a_y, z) + \mathrm{dist}(z, b_x).
$$
It follows that $\mathrm{dist}(a_y, z) \leq d$ and hence $\pi_d[a_y, B](z) = \mathrm{dist}(a_y, z)$.
Because distance-$d$ profiles of $a_y$ and $a_x$ on $B$ are equal, this implies that
$\pi_d[a_x, B](z) = \pi_d[a_y, B](z) = \mathrm{dist}(a_y, z)$.
Since also $\pi_d[a_x, B](z) \leq d$, we get that $\mathrm{dist}(a_x, z) = \pi_d[a_x, B](z) = \mathrm{dist}(a_y, z)$,
so the following inequality follows from the triangle inequality:
$$
\mathrm{dist}(a_x, b_x) \leq \mathrm{dist}(a_x, z) + \mathrm{dist}(z, b_x) = \mathrm{dist}(a_y, z) + \mathrm{dist}(z, b_x) = \mathrm{dist}(a_y, b_x)
\leq d
$$
--- a contradiction.
Therefore, $a_x$ and $a_y$ must have distinct distance-$d$ profiles on $B$.
\end{claimproof}
\end{claim}
A combination of both claims above provides us with a link between the notion of cages and
the Noose Profile Lemma.
Assume for contradiction that for an integer $t \in \{1, 2\}$, the set $I_t$ contains more than
$64 d^3 (d+2)^4$ elements.
By Claim \ref{large-neighbor-distinct-profiles}, we infer that
$\left|\{\pi_d[a_x, B]\, \mid\, x \in I_k\}\right| > 64 d^3 (d + 2)^4$.
We also remark that since $B$ is a cycle in $G$, there exists a noose $\mathcal{L}$ in the embedding
of $G$ in the plane passing through vertices in $B$ and no other vertices
($\mathcal{L}$ should closely follow the cycle $B$, passing through each vertex of $B$ in the
same order as $B$, but not touching the edges of the graph).
$\mathcal{L}$ is now subject to the Noose Profile Lemma.
We can see that either all vertices in $\{a_k\,\mid\, k \in I_t\}$ are enclosed by $\mathcal{L}$, or
none of them are enclosed by $\mathcal{L}$ (depending on the value of $t$ and whether
$\mathsf{Area}(\mathcal{C}, i, j)$ is bounded or unbounded).
If these vertices are all enclosed by $\mathcal{L}$, then Noose Profile Lemma (Theorem
\ref{noose-profile-lemma}) applies, so the number of different distance-$d$ profiles
seen from $\mathcal{L}$ is bounded from above by
$$ |B|^3 \cdot (d+2)^4 \leq (4d)^3 \cdot (d + 2)^4 = 64d^3 (d+2)^4 $$
--- a contradiction.
Analogously, if none of vertices in $\{a_k\,\mid\, k \in I_t\}$ are enclosed by $\mathcal{L}$,
then a variant of the Noose Profile Lemma (Corollary \ref{noose-profille-lemma-rev}) applies,
and we contradict our assumption in the same fashion.
Therefore, $|I_t| \leq 64d^3 (d+2)^4$.
Hence, $|I| = |I_1| + |I_2| \leq 128d^3 (d+2)^4$.
\end{proof}
\end{lemma}
We will also prove that in an identity ordered cage $\mathcal{C}$, for each $i \in [2, \ell - 1]$,
we can expect to find the vertex $a_i$ in the interior of the neighbor area $\mathsf{Area}(\mathcal{C},i-1,i+1)$
--- roughly speaking, ``near'' the path $\mathsf{SPath}(\mathcal{C}, i)$.
\begin{lemma}
\label{neighbor-cage-ai-good-lemma}
In an identity ordered cage $\mathcal{C} =
\mathsf{IdOrderedCage}((a_1, \dots, a_\ell), (b_1, \dots, b_\ell), \mathcal{P}, \mathcal{Q})$ in graph $G$,
for every $i \in [2, \ell - 1]$,
we have that $a_i \in \mathrm{Int}\, \mathsf{Area}(\mathcal{C}, i-1, i+1)$.
\begin{proof}
For the sake of contradiction assume that $a_i \not\in \mathrm{Int}\, \mathsf{Area}(\mathcal{C}, i-1, i+1)$.
For all $j \in [1, \ell]$, we choose $f_j$ as the second vertex on $\mathsf{Path}(\mathcal{P}, j)$ --- that is,
the vertex on this path immediately following $\mathsf{Root}(\mathcal{P})$.
We also let $p := \mathsf{Root}(\mathcal{P})$,
$\mathcal{P} = \mathsf{Tree}(P_1, \dots, P_\ell)$,
and $\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_\ell)$.
Since edges $pf_{i-1}, pf_i, pf_{i+1}$ are ordered anti-clockwise around $p$ (by the
definition of an ordered cage), and because the boundary of $\mathsf{Area}(\mathcal{C}, i-1, i+1)$,
when ordered anti-clockwise, contains edges $f_{i+1}p$ and $pf_{i-1}$ in this order,
we have that $pf_i \subseteq \mathsf{Area}(\mathcal{C}, i-1, i+1)$ (Figure~\ref{ai-acw-ordering-fig}).
Thus, $f_i \in \mathsf{Area}(\mathcal{C}, i-1, i+1)$.
Since $a_i \not\in \mathrm{Int}\, \mathsf{Area}(\mathcal{C}, i-1, i+1)$, the path $P_i[f_i, a_i]$ must intersect
$\partial\mathsf{Area}(\mathcal{C}, i-1, i+1)$.
\begin{figure}[h]
\centering
\input{figures/ai-acw-ordering.tex}
\caption{A simple geodesic tree $\mathcal{P}$ (a part of the identity ordered cage $\mathcal{C}$)
with important vertices in Lemma \ref{neighbor-cage-ai-good-lemma}.
$\mathsf{Area}(\mathcal{C}, i-1, i+1)$ is shaded.}
\label{ai-acw-ordering-fig}
\end{figure}
By the definition of neighbor areas, $\partial\mathsf{Area}(\mathcal{C}, i-1, i+1) \subseteq
P_{i-1} \cup P_{i+1} \cup Q_{i-1} \cup Q_{i+1}$.
However, $P_i[f_i, a_i]$ is vertex-disjoint with $P_j$ for each $j \neq i$ (since
by the definition of a quasi-cage, paths $P_i$ and $P_j$ are vertex-disjoint apart
from $p$).
Similarly, $P_i$ is vertex-disjoint with $Q_j$ for each $j \neq i$ (by the
definition of a cage).
Hence, $P_i[f_i, a_i]$ is vertex-disjoint with $\partial\mathsf{Area}(\mathcal{C}, i-1, i+1)$ --- a contradiction.
\end{proof}
\end{lemma}
\subsection{Neighbor cages}
\label{neighbor-cages-section}
We are now ready to use the tools developed in Section \ref{neighbor-area-section}
to define neighbor cages and explore their properties.
\begin{definition}
\label{neighbor-cage-def}
An identity ordered cage $\mathcal{C} = \mathsf{IdOrderedCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$
of order $\ell$ is also a \textbf{neighbor cage}
if for each index $i \in \{2, 3, \dots, \ell - 1\}$, the vertex $b_i$ belongs to
$\mathsf{Area}(\mathcal{C}, i - 1, i + 1)$.
We denote neighbor cages in the following way:
$$ \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q}). $$
\end{definition}
Figure \ref{neighbor-examples-fig} shows an example of a neighbor cage.
Unnecessary parts of the graph (including the edges connecting the vertices $b_i$
with the remaining part of the graph) have been omitted.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-b.tex}
(b)
\end{minipage}\begin{minipage}[b]{0.33\textwidth}
\centering
\input{figures/neighbor-c.tex}
(c)
\end{minipage}
\caption{(a) --- An example neighbor cage of order $5$, with edges connecting
$b_1, \dots, b_5$ with the remaining part of the graph removed. Note that $b_1$ and $b_5$ may
be anywhere in the graph. \\
(b) --- The neighbor area which must contain $b_2$ is shaded. \\
(c) --- The neighbor area which must contain $b_3$ is shaded.}
\label{neighbor-examples-fig}
\end{figure}
We will now employ the toolchain we have developed to prove that large identity ordered cages
contain large neighbor cages as subsets.
\begin{lemma}
\label{large-neighbor-lemma}
Each identity ordered cage of order $[256d^3(d+2)^4 + 2] \ell + 2$ contains a neighbor cage
of order $\ell$ as a subset.
\begin{proof}
Let $L := [256d^3(d+2)^4 + 1] \ell + 2$,
and fix an identity ordered cage of order $L$:
$$\mathcal{C} = \mathsf{IdOrderedCage}((a_i)_{i=1}^L, (b_i)_{i=1}^L, \mathcal{P}, \mathcal{Q}).$$
We build a permutation $\pi$ of vertices of the semi-ladder $\{a_1, a_2, \dots, a_L,
b_1, b_2, \dots, b_L\}$ in the following way:
\begin{itemize}
\item $\pi$ contains vertices $a_1, a_2, \dots, a_L$ in this order; immediately after each $a_i$
(for $i \in [1, L]$), we add a (possibly empty) sequence $\Gamma_i$ which is a
permuted subset of $\{b_1, b_2, \dots, b_L\}$. That is,
$$ \pi = (a_1) \cdot \Gamma_1 \cdot (a_2) \cdot \Gamma_2 \cdot \dots \cdot (a_L) \cdot
\Gamma_L, $$
where $\cdot$ denotes the concatenation of sequences.
\item For each index $i \in [1, L - 1]$, $\Gamma_i$ contains those vertices $b_1, \dots, b_L$
which belong to $\mathsf{Area}(\mathcal{C}, i, i+1)$,
but do not belong to any previous sequence $\Gamma_1, \dots, \Gamma_{i-1}$.
Formally, the set of vertices in $\Gamma_i$ is
$$ \left[\{b_1, b_2, \dots, b_L\} \cap \mathsf{Area}(\mathcal{C}, i, i+1)\right] \setminus (\Gamma_1 \cup
\dots \cup \Gamma_{i-1}). $$
\item $\Gamma_L$ contains all vertices in $\{b_1, b_2, \dots, b_L\}$ which do not belong
to any previous sequence $\Gamma_1, \dots, \Gamma_{L-1}$.
\item Each sequence $\Gamma_i$ (for $i \in [1, L]$) is ordered arbitrarily.
\end{itemize}
It can be clearly seen that the procedure above produces a permutation $\pi$.
\vspace{1em}
We will now find a large subsequence of $\pi$ with the following property:
if $a_i$ belongs to the subsequence for some $i \in [1,L]$, then $b_i$ is a neighbor of $a_i$
in this subsequence; and conversely, if $b_i$ belongs to this subsequence, then
$a_i$ neighbors $b_i$ in this subsequence.
For all integers $i \in [1, L]$, we define the values $\alpha(i)$ and $\beta(i)$
so that $a_i = \pi_{\alpha(i)}$ and $b_i = \pi_{\beta(i)}$.
Note that by the definition of $\pi$, we have $\alpha(1) < \alpha(2) < \dots < \alpha(L)$.
This definition allows us to define the \textbf{conflict interval} $X_i$ for each $i \in [2, L-1]$ ---
a closed interval whose endpoints are at $\alpha(i)$ and $\beta(i)$.
Each conflict interval is a subinterval of the interval $[1, 2L]$.
We stress that we do not define $X_1$ or $X_L$.
We note the following property of the conflict intervals:
\begin{claim}
\label{large-neighbor-separation-claim}
For every two different integers $s, t$ ($s \in [2, L-1]$, $t \in [2, L]$),
$a_s$ is separated from $b_s$ by $\mathsf{Area}(\mathcal{C}, 1, t)$
if and only if $\alpha(t) \in X_s$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Let us first remark that
\begin{equation}
\label{prefix-area-sum-eq}
\mathsf{Area}(\mathcal{C}, 1, t) = \mathsf{Area}(\mathcal{C}, 1, 2) \cup \mathsf{Area}(\mathcal{C}, 2, 3) \cup \dots \cup \mathsf{Area}(\mathcal{C}, t-1, t)
\end{equation}
(Lemma \ref{area-sum-lemma}).
Therefore, if $\beta(s) < \alpha(t)$, then $b_s$ was added to $\pi$ before $a_t$;
it follows that $b_s$ belongs to one of the subsequences $\Gamma_1, \Gamma_2, \dots,
\Gamma_{t-1}$.
Hence, $b_s$ belongs to $\mathsf{Area}(\mathcal{C}, i, i+1)$ for some $i < t$.
By (\ref{prefix-area-sum-eq}), we conclude that $b_s \in \mathsf{Area}(\mathcal{C}, 1, t)$.
Conversely, if $b_s \in \mathsf{Area}(\mathcal{C}, 1, t)$, then $b_s \in \mathsf{Area}(\mathcal{C}, i, i+1)$ for some $i < t$.
If we fix $i$ to be the smallest index for which $b_s \in \mathsf{Area}(\mathcal{C}, i, i+1)$, we will
get that $b_s \in \Gamma_i$, where $i < t$, so also $\beta(s) < \alpha(t)$.
We conclude that
\begin{equation}
\label{large-neighbor-separation-bs}
b_s \in \mathsf{Area}(\mathcal{C}, 1, t)\ \Leftrightarrow\ \beta(s) < \alpha(t).
\end{equation}
Now, let us compare $\alpha(s)$ with $\alpha(t)$.
Naturally, we have $\alpha(s) < \alpha(t)$ if and only if $s < t$.
Also, by Lemma \ref{neighbor-cage-ai-good-lemma}
we have that $a_s \in \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, s-1, s+1)$.
If $s < t$, we immediately get that $a_s \in \mathsf{Area}(\mathcal{C}, 1, t)$.
However, if $s > t$, then we infer the following relation from Corollary~\ref{area-int-lemma}:
$$ \mathsf{Area}(\mathcal{C}, 1, s-1) \cap \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, s-1, s+1) = \varnothing. $$
Hence, $a_s \not\in \mathsf{Area}(\mathcal{C}, 1, s - 1)$, so also $a_s \not\in \mathsf{Area}(\mathcal{C}, 1, t)$.
We now proved that
\begin{equation}
\label{large-neighbor-separation-as}
a_s \in \mathsf{Area}(\mathcal{C}, 1, t)\ \Leftrightarrow\ \alpha(s) < \alpha(t).
\end{equation}
It is obvious that $\alpha(t) \in X_s$ if and only if exactly one of the conditions
$\alpha(s) < \alpha(t)$, $\beta(s) < \alpha(t)$ holds.
From (\ref{large-neighbor-separation-bs}) and (\ref{large-neighbor-separation-as})
it follows that this is equivalent to exactly one of the conditions
$a_s \in \mathsf{Area}(\mathcal{C}, 1, t)$, $b_s \in \mathsf{Area}(\mathcal{C}, 1, t)$ being satisfied.
A verification with Definition \ref{separated-from-def} concludes the proof.
\end{claimproof}
\end{claim}
This claim enables us to prove that the conflict intervals do not intersect \emph{too frequently}:
\begin{claim}
\label{large-neighbor-sparse-conflicts}
For each $x \in \mathbb{R}$, at most $256d^3(d+2)^4 + 2$ conflict intervals contain $x$.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
Fix $x \in \mathbb{R}$, and consider the set $I = \{i \in [2, L-1]\,\mid\, x \in X_i\}$ of all indices
for which the corresponding conflict interval contains $x$.
We partition $I$ into two subsets, depending on whether $\alpha(i)$ is the left or the right
endpoint of the conflict interval $X_i$:
\begin{equation*}
\begin{split}
I_{\alpha\beta} &= \{i \in I\,\mid\, \alpha(i) < \beta(i)\}, \\
I_{\beta\alpha} &= \{i \in I\,\mid\, \alpha(i) > \beta(i)\}.
\end{split}
\end{equation*}
Let $m = |I_{\alpha\beta}|$ and $I_{\alpha\beta} = \{i_1, i_2, \dots, i_m\}$ where
$2 \leq i_1 < i_2 < \dots < i_m \leq L-1$.
Since $\alpha(i_1) < \alpha(i_2) < \dots < \alpha(i_m)$ and each interval $X_{i_j}$ for
$j \in [1, m]$ has its left endpoint at $\alpha(i_j)$, we conclude that
$\alpha(i_m)$ also belongs to each conflict interval $X_{i_1}, X_{i_2}, \dots, X_{i_m}$.
Hence, by Claim \ref{large-neighbor-separation-claim}, each pair of vertices
$a_{i_j}, b_{i_j}$ for $j \in [1, m - 1]$ is separated by $\mathsf{Area}(\mathcal{C}, 1, i_m)$.
By Lemma \ref{neighbor-separation-lemma} we conclude that $m - 1 \leq
128d^3(d+2)^4$, so $|I_{\alpha\beta}| \leq 128d^3(d+2)^4 + 1$.
We can prove in a similar fashion that $|I_{\beta\alpha}| \leq 128d^3(d+2)^4 + 1$ ---
if $I_{\beta\alpha} = \{j_1, j_2, \dots, j_n\}$ for some $n \in \mathbb{N}$
and $2 \leq j_1 < j_2 < \dots < j_n \leq L-1$,
then $\alpha(j_1)$ belongs to each conflict interval $X_{j_1}, X_{j_2}, \dots, X_{j_n}$,
and the remaining part of the argument follows.
Therefore, $|I| = |I_{\alpha\beta}| + |I_{\beta\alpha}| \leq 256d^3(d+2)^4 + 2$.
\end{claimproof}
\end{claim}
We now consider an auxiliary undirected graph $H$ where $V(H) = \{2, 3, \dots, L-1\}$ and
vertices $i$ and $j$ are connected by an edge if the conflict intervals $X_i$ and $X_j$
intersect.
This is a well-known definition of an interval graph.
Every interval graph is also a perfect graph \cite{west2001introduction},
so $H$ has a proper coloring where the number of colors is equal
to the maximum size of a clique in $H$.
In interval graphs, the maximum size of a clique is equal to the maximum number of intervals
which intersect at a single point.
This number is bounded by Claim \ref{large-neighbor-sparse-conflicts} by
$256d^3(d+2)^4 + 2$,
and therefore $H$ can be colored using that many colors.
Since $L = [256d^3(d+2)^4 + 2] \ell + 2$, we have
$|V(H)| = [256d^3(d+2)^4 + 2] \ell$ and there exists a color that has been used for at least
$\ell$ vertices of $H$.
Therefore, $H$ contains an independent set of size $\ell$, or in other words,
there exists a set of $\ell$ pairwise disjoint conflict intervals
$X_{d_1}, X_{d_2}, \dots, X_{d_\ell}$ ($2 \leq d_1 < d_2 < \dots < d_\ell \leq L-1$).
\vspace{0.5em}
We create a modified identity ordered cage $\mathcal{C}'$ which is a subset of $\mathcal{C}$
given by indices $d_1, d_2, \dots, d_\ell$.
\begin{claim}
\label{large-neighbor-found}
$\mathcal{C}'$ is a neighbor cage.
\begin{claimproof}
\renewcommand{\qed}{\cqedsymbol}
We fix an index $i \in \{2, 3, \dots, \ell - 1\}$, and we prove that
$b_{d_i}$ belongs to $\mathsf{Area}(\mathcal{C}, d_{i - 1}, d_{i + 1})$.
Naturally, $\mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1}) = \mathsf{Area}(\mathcal{C}', i-1, i+1)$, so this is enough to
complete the proof of the claim.
Lemma \ref{neighbor-cage-ai-good-lemma} asserts that $a_{d_i} \in \mathrm{Int}\,\mathsf{Area}(
\mathcal{C}, d_i-1, d_i+1) \subseteq \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1})$.
Hence, $a_i \in \Int\mathsf{Area}(\mathcal{C}, 1, d_{i+1})$.
Moreover, from Corollary \ref{area-int-lemma} we deduce that
$\mathsf{Area}(\mathcal{C}, 1, d_{i-1}) \cap \Int\mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1}) = \varnothing$.
Hence, $a_i \not\in \mathsf{Area}(\mathcal{C}, 1, d_{i-1})$.
Now, we apply Claim \ref{large-neighbor-separation-claim}.
Since the conflict intervals $X_{d_1}, X_{d_2}, \dots, X_{d_\ell}$ are pairwise disjoint,
we get that $\alpha(d_i) \not\in X_{d_{i-1}}$ and $\alpha(d_i) \not\in X_{d_{i+1}}$, and therefore
$a_{d_i}$ is separated from $b_{d_i}$ by neither $\mathsf{Area}(\mathcal{C}, 1, d_{i-1})$ nor
$\mathsf{Area}(\mathcal{C}, 1, d_{i+1})$.
Due to the fact that $a_{d_i} \in \Int\mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1})$, we get that
$b_{d_i} \not\in \mathsf{Area}(\mathcal{C}, 1, d_{i-1})$ and $b_i \in \mathsf{Area}(\mathcal{C}, 1, d_{i+1})$.
Now, we observe that
$$\mathsf{Area}(\mathcal{C}, 1, d_{i + 1}) = \mathsf{Area}(\mathcal{C}, 1, d_{i-1}) \cup \mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1})$$
(Lemma \ref{area-sum-lemma}).
Since $b_{d_i} \in \mathsf{Area}(\mathcal{C}, 1, d_{i+1})$ and $b_{d_i} \not\in \mathsf{Area}(\mathcal{C}', 1, d_{i-1})$, we
infer that $b_{d_i} \in \mathsf{Area}(\mathcal{C}, d_{i-1}, d_{i+1})$.
Hence, $\mathcal{C}'$ is a neighbor cage of order $\ell$.
\end{claimproof}
\end{claim}
Claim \ref{large-neighbor-found} completes the proof.
\end{proof}
\end{lemma}
Let us now verify a few basic properties of neighbor cages.
\begin{lemma}
\label{neighbor-cage-spread-lemma}
Fix a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ in
a graph $G$ embedded in the plane, and consider an edge $uv \in E(G)$.
Assume that for some $L, R$ ($2 \leq L < R < \ell$), we have that
$u \in \mathsf{Area}(\mathcal{C}, L, R)$, but $u \not\in V(\mathcal{Q}) \cup \{p\}$.
Then $v \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$.
\begin{proof}
Let $\mathcal{P} = \mathsf{Tree}(P_1, P_2, \dots, P_\ell)$.
Since $\mathsf{Area}(\mathcal{C}, L, R) \subseteq \mathsf{Area}(\mathcal{C}, L-1, R+1)$ (a consequence of Lemma
\ref{area-sum-lemma}),
we have that $u \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$.
We now want to prove that $u \in \Int\mathsf{Area}(\mathcal{C}, L-1, R+1)$.
Assume on the contrary that $u \in \partial\mathsf{Area}(\mathcal{C}, L-1, R+1)$.
As $\mathsf{Area}(\mathcal{C}, L, R) \subseteq \mathsf{Area}(\mathcal{C}, L-1, R+1)$ and $u \in \mathsf{Area}(\mathcal{C}, L, R)$,
it follows that $u \in \partial\mathsf{Area}(\mathcal{C}, L, R)$.
Hence,
$$ u \in \left[\partial\mathsf{Area}(\mathcal{C}, L-1, R+1) \cap \partial\mathsf{Area}(\mathcal{C}, L, R)\right] \setminus \left[
V(\mathcal{Q}) \cup \{p\}\right]. $$
Since $\partial\mathsf{Area}(\mathcal{C}, L, R)\,\subseteq\,V(\mathcal{P}) \cup V(\mathcal{Q})$, we infer from the definition
of a neighbor area that
$$u \in \partial\mathsf{Area}(\mathcal{C}, L, R) \setminus V(\mathcal{Q})\quad\Rightarrow\quad
u \in \partial\mathsf{Area}(\mathcal{C}, L, R) \cap V(\mathcal{P})\quad\Rightarrow\quad
u \in P_L \cup P_R. $$
Analogously, $u \in P_{L-1} \cup P_{R+1}$.
However, as $\mathcal{P}$ is a simple geodesic tree,
every pair of different paths $P_i, P_j$ ($1 \leq i, j \leq \ell$) intersects only at $p$.
Hence, $u = p$ --- a contradiction, since we assumed that $u \neq p$.
\end{proof}
\end{lemma}
Therefore, short paths can only reach very local parts of the neighbor cage without
intersecting $\mathcal{Q}$ or passing through $p$.
This fact is explored in the following lemmas:
\begin{lemma}
\label{semiladder-path-no-root}
Fix a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$
and two indices $i, j$ ($1 \leq i < j \leq \ell$).
No shortest path between $b_i$ and $a_j$ can pass through $\mathsf{Root}(\mathcal{P})$.
\begin{proof}
If any shortest path connecting $b_i$ and $a_j$ contains $\mathsf{Root}(\mathcal{P})$ as a vertex, then
\begin{equation*}
\begin{split}
d &< \mathrm{dist}(b_i, a_i) \leq \mathrm{dist}(b_i, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_i) = \\
&= \mathrm{dist}(b_i, \mathsf{Root}(\mathcal{P})) + \mathrm{dist}(\mathsf{Root}(\mathcal{P}), a_j) = \mathrm{dist}(b_i, a_j) \leq d
\end{split}
\end{equation*}
--- a contradiction.
\end{proof}
\end{lemma}
\begin{lemma}
\label{path-first-intersection-lemma}
Fix a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ in $G$
and two indices $i, j$ ($i < j$, $i \in [d+2, \ell-d-1]$).
Take an oriented shortest path $R$ from $b_i$ to $a_j$.
Note that this path intersects $\mathcal{Q}$ because $a_j \in V(\mathcal{Q})$.
The first intersection of $R$ with $\mathcal{Q}$ belongs
to $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
\begin{proof}
From the definition of a neighbor cage, we have that $b_i \in \mathsf{Area}(\mathcal{C}, i-1, i+1)$.
Let $R = (v_0, v_1, \dots, v_\delta)$ be the shortest path from $b_i$ to $a_j$,
where $v_0 = b_i$, $v_\delta = a_j$, and $\delta \leq d$ (as required by the definition
of a semi-ladder).
Let also $v_k$ be the first vertex of this path belonging to $V(\mathcal{Q})$.
Since $p \not\in (v_0, v_1, \dots, v_\delta)$ (Lemma \ref{semiladder-path-no-root}),
by applying Lemma~\ref{neighbor-cage-spread-lemma}
we inductively deduce that $v_t \in \mathsf{Area}(\mathcal{C}, i-t-1, i+t+1)$ for each $t \in \{0, 1, \dots, k\}$.
Therefore, $v_k \in \mathsf{Area}(\mathcal{C}, i-k-1, i+k+1)$.
As $k \leq \delta \leq d$, we infer that $v_k \in \mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
\end{proof}
\end{lemma}
Now, for a vertex $v$ belonging to a geodesic tree $\mathcal{T}$, we define
the \textbf{depth} $\mu_\mathcal{T}(v)$ of $v$ as the distance from $v$ to $\mathsf{Root}(\mathcal{T})$ in $\mathcal{T}$.
Note that it is implied by the definition of a geodesic tree that $\mu_\mathcal{T}(v)$ is also
equal to the distance between $v$ and $\mathsf{Root}(\mathcal{T})$ in $G$.
We remark a few simple facts about $\mu_\mathcal{T}$:
\begin{itemize}
\item $\mu_\mathcal{T}(\mathsf{Root}(\mathcal{T})) = 0$.
\item $\mu_\mathcal{T}$ is constant on the set of leaves of $\mathcal{T}$.
\item If a vertex $u$ is an ancestor of another vertex $v$ in $\mathcal{T}$, then
$\mathrm{dist}(u, v) = \mu_\mathcal{T}(v) - \mu_\mathcal{T}(u)$.
\item More generally, for any two vertices $u, v \in V(\mathcal{T})$,
we have $\mathrm{dist}(u, v) \geq |\mu_\mathcal{T}(u) - \mu_\mathcal{T}(v)|$.
\item On any oriented simple path in $\mathcal{T}$, the depths of vertices are first decreasing,
and then increasing. In other words, there do not exist three vertices $x, y, z$ lying
on an oriented simple path in $\mathcal{T}$ in this order,
for which $\mu_\mathcal{T}(x) < \mu_\mathcal{T}(y) > \mu_\mathcal{T}(z)$.
\end{itemize}
\vspace{0.5em}
We already know from Lemmas \ref{semiladder-path-no-root} and
\ref{path-first-intersection-lemma} that each shortest path $R$ connecting the vertices
$b_i$ and $a_j$ of the semi-ladder ($i < j$) must avoid $\mathsf{Root}(\mathcal{P})$ and the first intersection
of $R$ with $\mathcal{Q}$ occurs inside of $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
It turns out that this first intersection imposes serious restrictions on each following intersection
of $R$ with $\mathcal{Q}$.
\begin{lemma}
\label{intersection-depth-lower-bound-lemma}
Fix a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$
and two indices $i, j$ ($1 \le i < j \le \ell$).
Consider any shortest path from $b_i$ to $a_j$: $R = (v_0, v_1, v_2, \dots, v_\delta)$ for some
$\delta \leq d$, $v_0 = b_i$, $v_\delta = a_j$.
Suppose that for some indices $0 \leq x \leq y \leq \delta$ we have $v_x, v_y \in V(\mathcal{Q})$.
Then $\mu_\mathcal{Q}(v_y) > \mu_\mathcal{Q}(\mathrm{lca}_\mathcal{Q}(v_x, a_i))$.
\begin{proof}
We set $\mu := \mu_\mathcal{Q}$, $\lca := \lca_\mathcal{Q}$.
For the sake of contradiction let us fix a shortest path $R$
from $b_i$ to $a_j$ and two indices $x, y$ as above such that
$\mu(v_y) \leq \mu(\lca(v_x, a_i))$.
We consider a path $G$ from $b_i$ to $a_i$ which first follows $R$ from $b_i$ to $v_x$,
then goes up the tree $\mathcal{Q}$ from $v_x$ to $\lca(v_x, a_i)$, and then goes down the tree
$\mathcal{Q}$ from $\lca(v_x, a_i)$ to $a_i$ (Figure \ref{intersection-depth-setup-fig}).
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.49\textwidth}
\centering
\input{figures/depth-lca-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.49\textwidth}
\centering
\input{figures/depth-lca-b.tex}
(b)
\end{minipage}
\caption{The setup in Lemma \ref{intersection-depth-lower-bound-lemma}. \\
(a) --- The shortest path $R$ from $b_i$ to $a_j$ (red) crosses $\mathcal{Q}$ twice.
We are going to prove
that there exists a path $G$ from $b_i$ to $a_i$ (green) which is not longer than $R$. \\
(b) --- Both $R$ and $G$ have been split into three parts: red, blue and green. $R$ and
$G$ share the red fragment. (\ref{intersection-depth-eq-b}) proves that the blue segment
in $G$ is not longer than the blue segment in $R$. (\ref{intersection-depth-eq-c}) proves
that the green segment in $G$ is not longer than the green segment in $R$.}
\label{intersection-depth-setup-fig}
\end{figure}
We obviously have that
\begin{equation}
\label{intersection-depth-main-eq}
\mathrm{dist}(b_i, a_i) \leq \mathrm{len}(G) = \mathrm{len}(G[b_i, v_x]) + \mathrm{len}(G[v_x, \lca(v_x, a_i)]) +
\mathrm{len}(G[\lca(v_x, a_i), a_i]).
\end{equation}
As $G$ follows $R$ on the fragment between $b_i$ and $v_x$, we have that
\begin{equation}
\label{intersection-depth-eq-a}
\mathrm{len}(G[b_i, v_x]) = \mathrm{len}(R[b_i, v_x]).
\end{equation}
Next, $\lca(v_x, a_i)$ is an ancestor of $v_x$ in $\mathcal{Q}$ and thus
\begin{equation}
\label{intersection-depth-eq-b}
\begin{split}
\mathrm{len}(G[v_x, \mathrm{lca}(v_x, a_i)]) & = \mu(v_x) - \mu(\mathrm{lca}(v_x, a_i)) \leq
\mu(v_x) - \mu(v_y) \leq \mathrm{dist}(v_x, v_y) = \\ &= \mathrm{len}(R[v_x, v_y]).
\end{split}
\end{equation}
Analogously, $\mathrm{lca}(v_x, a_i)$ is an ancestor of $a_i$ in $\mathcal{Q}$.
Therefore,
\begin{equation}
\label{intersection-depth-eq-c}
\begin{split}
\mathrm{len}(G[\mathrm{lca}(v_x, a_i), a_i]) & = \mu(a_i) - \mu(\mathrm{lca}(v_x, a_i)) \leq
\mu(a_i) - \mu(v_y) = \mu(a_j) - \mu(v_y) \leq \\
& \leq \mathrm{dist}(v_y, a_j) = \mathrm{len}(R[v_y, a_j]).
\end{split}
\end{equation}
By substituting (\ref{intersection-depth-eq-a}), (\ref{intersection-depth-eq-b}),
(\ref{intersection-depth-eq-c}) into (\ref{intersection-depth-main-eq}), we conclude that
\begin{equation*}
\begin{split}
\mathrm{dist}(b_i, a_i) & \leq \mathrm{len}(R[b_i, v_x]) + \mathrm{len}(R[v_x, v_y]) +
\mathrm{len}(R[v_y, a_j]) = \mathrm{len}(R) = \mathrm{dist}(b_i, a_j) = \\ &= \delta \leq d
\end{split}
\end{equation*}
--- a contradiction since the semi-ladder requires that $\mathrm{dist}(b_i, a_i) > d$.
\end{proof}
\end{lemma}
A less formal way of thinking about Lemma \ref{intersection-depth-lower-bound-lemma}
is that as soon as the shortest path from $b_i$ to $a_j$ touches any vertex of $\mathcal{Q}$,
all subsequent intersections of the path with $\mathcal{Q}$ need to happen
sufficiently deep in the tree.
There are also some limitations on where this path may intersect $\mathcal{Q}$ at all ---
by letting $x = y$ in the lemma above, we infer that each intersection $v_x$
of a shortest path from $b_i$ to $a_j$ must satisfy $v_x \neq \lca_\mathcal{Q}(v_x, a_i)$.
That is, no intersection of this path with $\mathcal{Q}$ can be an ancestor of $a_i$ in $\mathcal{Q}$.
The most important conclusion will become clear in a moment:
since the first intersection of every oriented shortest path from $b_i$ to $a_j$ ($i < j$)
with $\mathcal{Q}$ must happen topologically relatively close to $b_i$
(Lemma \ref{path-first-intersection-lemma}),
we should be able to infer a common lower bound on the depth of
every such intersection, no matter the path or value of $j$.
This is indeed possible, albeit with slightly stronger assumptions,
as proved in Lemma \ref{ladder-path-depth-bound-lemma} below.
In order to proceed, we need a small definition.
\begin{definition}
In a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$,
a neighbor area $\mathsf{Area}(\mathcal{C}, i, j)$ is \textbf{rootless} if $\mathsf{Root}(\mathcal{Q}) \not\in \Int\mathsf{Area}(\mathcal{C}, i, j)$.
Note that not all neighbor areas must be rootless, as seen in Figure \ref{rootless-def-figure}.
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.4\textwidth}
\centering
\input{figures/rootless-def-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.4\textwidth}
\centering
\input{figures/rootless-def-b.tex}
(b)
\end{minipage}
\caption{(a) --- An example neighbor cage $\mathcal{C}$ of order $5$. $\mathsf{Area}(\mathcal{C}, 3, 4)$ (green) is
rootless, but $\mathsf{Area}(\mathcal{C}, 1, 3)$ (red) is not. Vertices $b_1, \dots, b_5$ were omitted
for clarity. \\
(b) --- Another neighbor cage $\mathcal{D}$. Now, both $\mathsf{Area}(\mathcal{D}, 1, 3)$ and $\mathsf{Area}(\mathcal{D}, 3, 4)$ are
rootless.}
\label{rootless-def-figure}
\end{figure}
\end{definition}
We are now ready to introduce the promised lemma.
\begin{lemma}
\label{ladder-path-depth-bound-lemma}
Fix a neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$
and an index $i$ ($i \in [d + 2, \ell - d - 1]$). If $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$ is rootless, then
each intersection $v$ of an oriented shortest path from $b_i$ to $a_j$ ($j > i$)
with $\mathcal{Q}$ satisfies
$$ \mu_\mathcal{Q}(v) > \mu_\mathcal{Q}(\lca_\mathcal{Q}(a_{i-d-1}, a_{i+d+1})). $$
\begin{proof}
We set $\mu := \mu_\mathcal{Q}$, $\lca := \lca_\mathcal{Q}$.
We also let $v_{\lca} := \lca(a_{i-d-1}, a_{i+d+1})$ and $\mathcal{Q} = \mathsf{Tree}(Q_1, \dots, Q_\ell)$.
Basing on the definition of neighbor areas, we infer that $v_{\lca}$ is the shallowest vertex
in $\mathcal{Q}$ belonging to $\partial\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
We will now prove that $v_{\lca}$ is also the shallowest vertex in $\mathcal{Q}$ belonging to
$\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
Assume for contradiction that there exists a vertex $x \in \mathsf{Area}(\mathcal{C}, i-d-1, i+d+1) \cap V(\mathcal{Q})$
for which $\mu(x) < \mu(v_{\lca})$.
Since $\mathsf{Root}(\mathcal{Q}) \not\in \Int\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$,
the unique simple path in $\mathcal{Q}$ connecting $x$ with $\mathsf{Root}(\mathcal{Q})$ must intersect
$\partial\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$ at some vertex $s \in V(\mathcal{Q})$.
Obviously, $\mu(s) \geq \mu(v_{\lca})$.
However, it means that the simple path in $\mathcal{Q}$ connecting $x$ with $\mathsf{Root}(\mathcal{Q})$
contains three vertices in the following order: $x, s, \mathsf{Root}(\mathcal{Q})$. But
$$ \mu(x) < \mu(v_{\lca}) \leq \mu(s) > \mu(\mathsf{Root}(\mathcal{Q})) = 0 \qquad
\Rightarrow \qquad \mu(x) < \mu(s) > \mu(\mathsf{Root}(\mathcal{Q})) $$
--- a contradiction.
Hence, $v_{\lca}$ is the shallowest vertex of $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1) \cap V(\mathcal{Q})$.
\vspace{0.5em}
We fix a shortest path $R$ from $b_i$ to $a_j$. Let $v_1$ be the first intersection of $R$
with $V(\mathcal{Q})$.
By Lemma \ref{path-first-intersection-lemma}, we have that
$v_1 \in \mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
\begin{figure}[h]
\centering
\input{figures/common-bound-setup.tex}
\caption{An example of the setup in Lemma \ref{ladder-path-depth-bound-lemma} ---
a cage $\mathcal{C}$, $d = 6$ and $i = 8$.
We consider $v_1$ ---
the first intersection of the shortest path between $b_8$ and $a_{11}$ (green) with $\mathcal{Q}$.
We prove that the simple path $S$ in $\mathcal{Q}$ connecting $v_1$ with $a_8$ (red) fully belongs
to $\mathsf{Area}(\mathcal{C}, 1, 15)$ (shaded).
It will follow that $\mu(\lca(v_1, a_8)) \geq \mu(v_{\lca})$, and Lemma
\ref{intersection-depth-lower-bound-lemma} will conclude the proof.}
\label{common-bound-setup-fig}
\end{figure}
We now prove (Figure \ref{common-bound-setup-fig})
that the simple path in $\mathcal{Q}$ between $v_1$ and $a_i$ --- call it $S$ --- is fully contained
within $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
Firstly, from the properties of neighbor cages, it follows that
$a_i \in \mathsf{Area}(\mathcal{C}, i-1, i+1)$; thus, $a_i \in \mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
Secondly, by the definition of neighbor areas, the intersection of
$\partial\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$ with $\mathcal{Q}$ is the simple path in $\mathcal{Q}$
connecting $\mathsf{Split}(\mathcal{C}, i-d-1)$ with $\mathsf{Split}(\mathcal{C}, i+d+1)$.
Let us call this path $B$.
Therefore, if $S$ was not contained
within $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$, it would have to intersect $R$ at least twice ---
once when leaving the neighbor area, and once when reentering it.
This would, however, mean that $\mathcal{Q}$ contains a cycle --- which is impossible.
Hence, $S$ fully belongs to $\mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)$.
It means in particular that
\begin{equation*}
\begin{split}
\mu(\lca(v_1, a_i)) &=
\min \{\mu(w)\,\mid\, w \in S\} \geq \\
&\geq \min\{\mu(w)\,\mid\, w \in \mathsf{Area}(\mathcal{C}, i-d-1, i+d+1)\,\cap\,V(\mathcal{Q})\} = \mu(v_{\lca}).
\end{split}
\end{equation*}
Therefore, by Lemma \ref{intersection-depth-lower-bound-lemma},
each intersection $v$ of $R$ with $\mathcal{Q}$ --- either $v_1$, or any
later intersection --- must satisfy
$$ \mu(v) > \mu(\lca(v_1, a_i)) \geq \mu(v_{\lca}). $$
\end{proof}
\end{lemma}
\subsection{Separating cages}
\label{separating-cages-lemma}
Lemma \ref{ladder-path-depth-bound-lemma}
allows us to introduce the final variant of a cage, which will eventually lead us
to a polynomial bound on the maximum order of any neighbor cage.
This in turn will produce an upper bound on the maximum order of any distance-$d$ semi-ladder.
\begin{definition}
A neighbor cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q})$ in a graph $G$
is a \textbf{separating cage} if there exists an integer $\lambda \in \{0, 1, 2, \dots, d - 1\}$,
called \textbf{threshold}, such that the following properties hold
(Figure~\ref{separating-def-fig}):
\begin{itemize}
\item for every two different indices $i, j$ ($1 \leq i, j \leq \ell$),
paths $\mathsf{Path}(\mathcal{Q}, i)$ and $\mathsf{Path}(\mathcal{Q}, j)$ do not share any vertices
which are at depth larger than $\lambda$ in $\mathcal{Q}$;
\item for every pair of indices $i, j$ ($1 \leq i < j \leq \ell$),
no shortest path from $b_i$ to $a_j$ contains any vertex belonging to $\mathcal{Q}$ which is at
depth at most $\lambda$ in $\mathcal{Q}$.
\end{itemize}
We denote a separating cage in the following way:
$$ \mathsf{SeparatingCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q}, \lambda). $$
\begin{figure}[h]
\centering
\begin{minipage}[b]{0.495\textwidth}
\centering
\input{figures/separating-def-a.tex}
(a)
\end{minipage}\begin{minipage}[b]{0.495\textwidth}
\centering
\input{figures/separating-def-b.tex}
(b)
\end{minipage}
\caption{An example separating cage $\mathcal{C}$ of order $9$ and threshold $\lambda = 2$.
The threshold is a blue dotted
line; no two paths connecting $\mathsf{Root}(\mathcal{Q})$ with a leaf of $\mathcal{Q}$ can intersect above the
line, and no path connecting $b_i$ with $a_j$ (for $i < j$)
can intersect $\mathcal{Q}$ at this line or below. \\
(a) --- Three valid paths connecting $b_i$ with $a_j$ for $i < j$ (green). \\
(b) --- Two invalid paths connecting $b_i$ with $a_j$ for $i < j$ (red).
These cannot occur in the separating cage because
each of them passes through a vertex of $\mathcal{Q}$ at depth $\lambda$ or less.}
\label{separating-def-fig}
\end{figure}
\end{definition}
We will now prove that graphs with large neighbor cages also contain large separating cages.
\begin{lemma}
\label{large-separating-cage-lemma}
Each neighbor cage of order $2(2d+3)((\ell-1)d + 1)$ contains a separating cage
of order $\ell$ as a subset.
\begin{proof}
Let $L := 2(2d+3)((\ell-1)d + 1)$ and
fix a cage $\mathcal{C} = \mathsf{NeighborCage}((a_i)_{i=1}^L,
(b_i)_{i=1}^L, \mathcal{P}, \mathcal{Q})$ of order $L$.
We let $\mathcal{Q} = \mathsf{Tree}(Q_1, Q_2, \dots, Q_L)$.
Let also $M := 2((\ell - 1)d + 1)$. We define a sequence of $M$ neighbor areas
$(A_1, A_2, \dots, A_M)$:
$$ A_i = \mathsf{Area}(\mathcal{C},\, (2d + 3)(i - 1) + 1,\, (2d + 3)i) \qquad \text{for each index }i \in [1, M]. $$
We remark that because the set $\{[(2d + 3)(i-1) + 1,\, (2d+3)i]\,\mid\, i \in \{1, \dots, M\}\}$
contains only pairwise disjoint segments,
we infer from Lemma \ref{area-int-lemma} that the interiors of the neighbor areas
$A_1, A_2, \dots, A_M$ are pairwise disjoint.
Hence, at least $M - 1 = 2(\ell - 1)d + 1$ out of neighbor areas $A_1, A_2, \dots, A_M$
are rootless.
For each neighbor area $A_i$, we define its depth $\mu(A_i) = \mu_\mathcal{Q}(\lca_\mathcal{Q}(
a_{(2d + 3)(i - 1) + 1},\, a_{(2d+3)i}))$.
Note that $\mu(A_i)$ is chosen specifically to match the conditions of Lemma
\ref{ladder-path-depth-bound-lemma}:
provided that $A_i$ is rootless, each intersection $v$ of a shortest path from
$b_{(2d+3)(i-1) + (d+2)}$ to $a_j$ (for $j > (2d+3)(i-1) + (d+2)$) with $\mathcal{Q}$ satisfies
$\mu_\mathcal{Q}(v) > \mu(A_i)$.
We also remark that $\mu(A_i) \in \{0, 1, 2, \dots, d-1\}$ for each $i \in [1, M]$.
\newcommand{\mathsf{Block}}{\mathsf{Block}}
The pigeonhole principle allows us to select $2\ell-1$ out of $(2\ell-2)d + 1$ rootless
neighbor areas so that the selected neighbor areas have the same depth $\mu$.
We fix this subset of rootless neighbor areas: $A_{t_1}, A_{t_2}, \dots, A_{t_{2\ell-1}}$ where
$1 \leq t_1 < t_2 < \dots < t_{2\ell-1} \leq M$. Note that
$$ \mu(A_{t_1}) = \mu(A_{t_2}) = \dots = \mu(A_{t_{2\ell-1}}) =: \lambda, \qquad
\mathsf{Root}(\mathcal{Q}) \not\in \Int\mathsf{Area}(A_{t_j})\text{ for }j\in[1,2\ell-1]. $$
We also define $m_j$ for $j \in [1, 2\ell-1]$ as the index of the central vertex of the semi-ladder
in the neighbor area $A_{t_j}$: $m_j = (2d + 3)(t_j - 1) + (d + 2)$.
Naturally, the sequence of indices $m_j$ is increasing: $m_1 < m_2 < \dots < m_{2\ell-1}$.
Also, for every pair of indices $i, j \in [1, 2\ell - 1]$ ($i < j$), each intersection $v$ of
a shortest path from $b_{m_i}$ to $a_{m_j}$ with $\mathcal{Q}$ satisfies $\mu_\mathcal{Q}(v) > \lambda$.
\vspace{0.5em}
Let $\mathcal{C}'$ be the neighbor cage of order $\ell$ which is a subset of $\mathcal{C}$ given by
the sequence of indices $m_1, m_3, m_5, \dots, m_{2\ell-1}$:
$$ \mathcal{C}' = \mathsf{NeighborCage}((a_{m_1}, a_{m_3}, \dots, a_{m_{2\ell-1}}),
(b_{m_1}, b_{m_3}, \dots, b_{m_{2\ell-1}}), \mathcal{P}', \mathcal{Q}'), \quad \mathcal{P}' \subseteq \mathcal{P},\
\mathcal{Q}' \subseteq \mathcal{Q}. $$
We verify that $\mathcal{C}'$ is a separating cage with threshold $\lambda$.
Firstly, we see that $\lambda = \mu(B_{t_1}) \in \{0, 1, 2, \dots, d-1\}$.
Secondly, we want to prove that no shortest path whose shortness is required
by the semi-ladder in $\mathcal{C}'$ contains any vertex belonging to $\mathcal{Q}$ that is at
depth at most $\lambda$ in $\mathcal{Q}$.
This is quickly resolved by Lemma \ref{ladder-path-depth-bound-lemma}.
Fix any two vertices of the semi-ladder in $\mathcal{C}'$ which require a short path:
$b_{m_i}, a_{m_j}$ ($i < j$, both $i, j$ odd), and fix a shortest path $R$ between
these two vertices.
As mentioned before, each intersection $v$ of $R$ with $\mathcal{Q}$ satisfies $\mu_\mathcal{Q}(v) > \lambda$.
Since $\mathcal{Q}' \subseteq \mathcal{Q}$, we obviously have $\mu_{\mathcal{Q}'}(v) > \lambda$ as well.
Finally, we want to prove that no two different oriented paths connecting $\mathsf{Root}(\mathcal{Q}')$
with the leaves of $\mathcal{Q}'$ intersect at any vertex at depth larger than $\lambda$.
We again fix two vertices of the semi-ladder in $\mathcal{C}'$: $a_{m_i}, a_{m_j}$
($i < j$, both $i, j$ odd), and consider paths $Q_{m_i}$ and $Q_{m_j}$, connecting
$\mathsf{Root}(\mathcal{Q})$ with $a_{m_i}$ and $a_{m_j}$, respectively.
Assume for contradiction that these paths intersect at a vertex $v$ such that
$\mu(v) > \lambda$.
This means that $v \in Q_{m_i}$ and $v \in Q_{m_j}$.
By the definition of identity ordered cages, we have that $v \in Q_k$ for every
$k \in [m_i, m_j]$.
However, since both $i$ and $j$ are odd, we have that $i + 1 < j$.
This means that $$[m_{i+1}-d-1, m_{i+1}+d+1] \subseteq [m_i, m_j].$$
Hence, $v \in Q_{m_{i+1}-d-1}$ and $v \in Q_{m_{i+1}+d+1}$ since $\mathcal{C}$ is an identity
ordered cage.
However, we verify that
$$ \mu_\mathcal{Q}\left(\lca_\mathcal{Q}(a_{m_{i+1}-d-1}, a_{m_{i+1}+d+1})\right) =
\mu(A_{t_{i+1}}) = \lambda. $$
This means that paths $Q_{m_{i+1}-d-1}$ and $Q_{m_{i+1}+d+1}$ do not intersect
at any vertex at depth greater than $\lambda$, yet $v$ is an intersection of these paths
at depth greater than $\lambda$ --- a contradiction.
Therefore, paths $Q_{m_i}, Q_{m_j}$ do not share any vertex at depth larger than $\lambda$.
Since these paths were chosen arbitrarily from $\mathcal{Q}'$,
all the paths connecting $\mathsf{Root}(\mathcal{Q})$ with a leaf of $\mathcal{Q}'$ are vertex-disjoint,
as long as vertices at depth larger than $\lambda$ are concerned.
Since all required properties of separating cages have been verified, $\mathcal{C}'$ together
with threshold $\lambda$ is a separating cage.
\end{proof}
\end{lemma}
In separating cages, we can prove a much more powerful variant of Lemma
\ref{neighbor-cage-spread-lemma}:
\begin{lemma}
\label{separating-cage-spread-lemma}
Consider a separating cage
$\mathcal{C} = \mathsf{SeparatingCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q}, \lambda)$.
For every pair of indices $i, j$ ($1 \leq i < j \leq \ell$) and every edge $uv$ on a shortest
path between $b_i$ and $a_j$, if $u \in \mathsf{Area}(\mathcal{C}, L, R)$ for some integers $2 \leq L < R < \ell$,
then $v \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$.
\begin{proof}
In a similar vein to the proof of Lemma \ref{neighbor-cage-spread-lemma}, we will prove that
$u \not\in \partial\mathsf{Area}(\mathcal{C}, L-1, R+1)$; the correctness of the statement of the lemma
will follow.
We remark that $u \in \mathsf{Area}(\mathcal{C}, L, R)$, and thus $u \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$.
We assume for contradiction that $u \in \partial\mathsf{Area}(\mathcal{C}, L-1, R+1)$.
Since $\mathsf{Area}(\mathcal{C}, L, R) \subseteq \mathsf{Area}(\mathcal{C}, L-1, R+1)$, we also have that
$u \in \partial\mathsf{Area}(\mathcal{C}, L, R)$.
Therefore, both conditions below must be satisfied:
\begin{equation*}
\begin{split}
u \in \mathsf{SPath}(\mathcal{C}, L-1)\ \ &\vee\ \ u \in \mathsf{SPath}(\mathcal{C}, R+1), \\
u \in \mathsf{SPath}(\mathcal{C}, L)\ \ &\vee\ \ u \in \mathsf{SPath}(\mathcal{C}, R).
\end{split}
\end{equation*}
Hence, $v$ belongs to the intersection of $\mathsf{SPath}(\mathcal{C}, i)$ and $\mathsf{SPath}(\mathcal{C}, j)$
for $i \neq j$.
Therefore, by Lemma~\ref{splitting-path-intersection}, these paths intersect exactly at $p$
and their common suffix belonging to $\mathcal{Q}$.
However, since $u$ lies on the shortest path whose shortness is required by the
semi-ladder, Lemma \ref{semiladder-path-no-root} applies
and asserts that $u \neq p$.
It means that $u$ belongs to the intersection of paths $\mathsf{Path}(\mathcal{Q}, i)$ and $\mathsf{Path}(\mathcal{Q}, j)$.
But the definition of a separating cage requires that each such intersection must occur
at depth at most $\lambda$.
This means that the considered shortest path intersects $\mathcal{Q}$ at a vertex $u$
located at depth at most $\lambda$, which is explicitly forbidden by the definition
of a~separating cage --- a contradiction.
As $u \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$, $u \not\in \partial\mathsf{Area}(\mathcal{C}, L-1, R+1)$, and $v$ is
connected to $u$ by an edge, we have that $v \in \mathsf{Area}(\mathcal{C}, L-1, R+1)$.
\end{proof}
\end{lemma}
The lemma above leads to a straightforward linear bound on the maximum order of any
separating cage:
\begin{lemma}
\label{no-large-separating-cage}
Every separating cage has order smaller than $2d+5$.
\begin{proof}
Assume for contradiction
that $\mathcal{C} = \mathsf{SeparatingCage}((a_i)_{i=1}^\ell, (b_i)_{i=1}^\ell, \mathcal{P}, \mathcal{Q}, \lambda)$
is a separating cage of order $\ell \geq 2d + 5$.
We consider a shortest path from $b_{d+2}$ to $a_{2d+4}$: $(u_0, u_1, u_2, \dots, u_\delta)$
where $u_0 = b_{d+2}$, $u_\delta = a_{2d+4}$ and $\delta \leq d$
(as required by the semi-ladder).
By the properties of neighbor cages, we have that $u_0 \in \mathsf{Area}(\mathcal{C}, d + 1, d + 3)$.
Using Lemma \ref{separating-cage-spread-lemma},
we prove inductively that $u_i \in \mathsf{Area}(\mathcal{C}, d - i + 1, d + i + 3)$ for each
$i \in \{0, 1, \dots, \delta\}$.
In particular, we infer that $a_{2d+4} = u_\delta \in \mathsf{Area}(\mathcal{C}, d - \delta + 1, d + \delta + 3)$.
Since $\delta \leq d$, we get that $a_{2d+4} \in \mathsf{Area}(\mathcal{C}, 1, 2d + 3)$.
However, Lemma \ref{neighbor-cage-ai-good-lemma} asserts
that $a_{2d+4} \in \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, 2d+3, 2d+5)$.
Since
$$\mathsf{Area}(\mathcal{C}, 1, 2d+3) \cap \mathrm{Int}\,\mathsf{Area}(\mathcal{C}, 2d+3, 2d+5) = \varnothing$$
(Corollary \ref{area-int-lemma}), we have a contradiction.
\end{proof}
\end{lemma}
We can now finalize the proof of Theorem \ref{planar-upper-bound} bounding the maximum
distance-$d$ semi-ladder order in planar graphs:
\begin{corollary}
\label{planar-upper-bound-cor}
For $d \geq 1$,
all distance-$d$ semi-ladders in planar graphs have order smaller than
$$ d \cdot \left\{ d \cdot (2d - 1) \cdot
\left(\left\{[256d^3(d+2)^4 + 2] \cdot 2(2d+3)[(2d+4)d + 1]
+ 1\right\}^2 + 1\right)
+ 2 \right\}^d + 1. $$
\begin{proof}
We define the following polynomial functions:
\begin{equation*}
\begin{split}
\chi_1(d) &= 2d + 5, \\
\chi_2(d) &= 2(2d+3)[(\chi_1(d) - 1)d + 1], \\
\chi_3(d) &= [256d^3(d+2)^4 + 2]\chi_2(d) + 2, \\
\chi_4(d) &= (\chi_3(d) - 1)^2 + 1, \\
\chi_5(d) &= (2d-1)\chi_4(d).
\end{split}
\end{equation*}
It can be verified that the formula in the statement of the corollary simplifies to
$$d \left\{ d \cdot \chi_5(d) + 2\right\}^d + 1 =: M_d.$$
Assume that a distance-$d$ semi-ladder of order at least $M_d$ exists.
We take its subset which is a semi-ladder of order $M_d$, and call it $\mathcal{C}_1$.
Using Lemma \ref{quasi-cage-exists}, we find a quasi-cage $\mathcal{C}_2$ of order
$\chi_5(d)$ in the graph.
Using Lemma \ref{cage-exists}, we find a cage $\mathcal{C}_3$ of order $\chi_4(d)$ as
a subset of $\mathcal{C}_3$.
Using Lemma \ref{order-lemma}, we associate the cage $\mathcal{C}_3$ with an order and
create an ordered cage $\mathcal{C}_4$ underlying the same semi-ladder as $\mathcal{C}_3$.
Using Lemma \ref{identity-ordered-cage-exists}, we find an identity ordered cage $\mathcal{C}_5$ of
order $\chi_3(d)$ as a subset of $\mathcal{C}_4$.
Note that this may require altering the embedding of the graph in the plane.
Using Lemma \ref{large-neighbor-lemma}, we find a neighbor cage $\mathcal{C}_6$ of
order $\chi_2(d)$ as a subset of $\mathcal{C}_5$.
Using Lemma \ref{large-separating-cage-lemma}, we find a separating cage $\mathcal{C}_7$ of
order $\chi_1(d)=2d+5$ as a subset of $\mathcal{C}_6$.
Finally, Lemma \ref{no-large-separating-cage} contradicts our assumption since
it asserts that $\mathcal{C}_7$ cannot exist.
Hence, all distance-$d$ semi-ladders in the class of planar graphs must have
order smaller than $M_d$.
\end{proof}
\end{corollary}
We remark that this upper bound is of the form $d \cdot \rho(d)^d + 1$ where
$\rho(d)$ is a polynomial of degree $22$,
so the upper bound is of the form $d^{O(d)}$.
This concludes the proof of Theorem \ref{planar-upper-bound}.
|
\section{Introduction}
Let $\Delta\in S_{12}(\mathrm{SL}_2(\mathbb{Z}))$ be the unique normalized cuspidal modular form of weight twelve and level one defined by Ramanujan's tau function $\tau:\mathbb{N}\rightarrow \mathbb{Z}$, given explicitly by the $q$-expansion
\[
\Delta(z)=\sum_{n\ge1}\tau(n)q^n=q\prod_{n\ge1}\left(1-q^n\right)^{24},
\]
where $q=e^{2\pi i z}$ with $z$ being a variable in the upper half plane $\{z\in\mathbb{C}:\mathrm{Im}(z)>0\}$. This modular form encodes very rich arithmetic information and plays an important role in modern day Number Theory. Ramanujan's tau function satisfies interesting congruence relations, many of which can be explained by the theory of modular forms (see \cite{S-D1,S-D2,S-Dtau,serre-tau,serre-cong} for detailed discussions). One important feature in the theory of $p$-adic families of modular forms is congruence relations between Fourier coefficients of modular forms (see \cite{hida,serre-zeta,emerton}). It is therefore natural to study congruences between $\Delta$ and other modular forms. In \cite[\S6]{sujatha}, Sujatha discussed a congruence relation between $\Delta$ and the elliptic curve $X_0(11)$ modulo 11. We note in particular that $11\nmid \tau(11)= 534612$, meaning that $11$ is an ordinary prime for $\Delta$. The congruence modulo $11$ above originates from the fact that both $\Delta$ and the weight-two modular form attached to $X_0(11)$ lie inside a Hida family.
The starting point of the present article is to study congruence relations between $\Delta$ and other elliptic curves. Let $f_1$ and $f_2$ be two modular forms of weights $k_1$ and $k_2$ respectively. A necessary condition for the two modular forms to satisfy a congruence relation modulo a prime number $p$ is that $k_1\equiv k_2\mod p-1$. The fact that $\Delta$ is of weight $12$ means that if it satisfies a congruence relation with a weight two modular form, $p-1$ has to divide $10$. The only possible values $p$ can take are $2,3$ and $11$. We have $2\mid\tau(2)=-24$ and $3\mid\tau(3)=252$. In particular, $2$ and $3$ are both non-ordinary primes for $\Delta$. This means that any congruences between $\Delta$ and an elliptic curve modulo 2 or 3 cannot come from Hida Theory. Nonetheless, our first main result tells us that such congruences exist.
\begin{lthm}[Theorem~\ref{thm:cong}]\label{thm:A}
Let $p\in\{2,3\}$. Let $E/\mathbb{Q}$ be an elliptic curve and denote its conductor by $N_E$. Suppose that $E$ admits a $p$-torsion point defined over $\mathbb{Q}$. Then $$a_\ell(E) \equiv \tau (\ell)\mod p$$ for all primes $\ell \nmid pN_E$.
\end{lthm}
Curiously, even though $\Delta$ is non-ordinary at $p\in\{2,3\}$, an elliptic curve $E$ admitting a rational $p$-torsion, as imposed by Theorem~\ref{thm:A} can be ordinary at $p$. Indeed, if $E$ has good reduction at $p$ and $p\big| |E(\mathbb{F}_p)|$, then $a_p(E)\equiv 1\mod p$, meaning that $p$ is an anomalous ordinary prime for $E$.
For a fixed prime $p$ and a modular form $f$ with good reduction at $p$, we write $\theta_{n,f}$ for the Mazur--Tate element attached to $f$ over the sub-extension of the cyclotomic $\ZZ_p$-extension of $\mathbb{Q}$ of degree $p^n$. We shall write $\lambda(\theta_{n,f})$ for the $\lambda$-invariant of $\theta_{n,f}$ (see \S\ref{sec:MT} for a summary of the definitions of these objects). When $p$ is an ordinary prime for $f$, $\lambda(\theta_{n,f})$ is relatively well understood. We are interested in studying $\lambda(\theta_{n,\Delta})$ when $p$ is a non-ordinary prime for $\Delta$. Using algorithms of Pollack, we have been able to calculate these $\lambda$-invariants explicitly for small $n$. Our numerical data suggest that they are given by $2^{n-2}-2$, $3^n-2$, $5^n-1$ and $7^n-1$ respectively; see Table~\ref{tab:table4} in \S\ref{sec:data} of the main body of the article.
Pollack and Weston \cite{PW} have proved several formulae for $\lambda(\theta_{n,f})$ when $f$ is non-ordinary at $p$ with Serre weight 2 under various hypotheses on the residual representation, the weight, the prime number $p$ and the $p$-adic valuation of the $p$-th Fourier coefficient. One of the key ingredients in the work of Pollack--Weston is to compare $f$ to a weight 2 modular form $g$ via congruences modulo $p$. We may in fact describe the Iwasawa invariants of $\theta_{n,f}$ in terms of those of $\theta_{n,g}$, which can be described explicitly.
While the results of \cite{PW} do not apply to $\Delta$ at the {primes $p=2$ and $3$, the congruences modulo $p$ exhibited by Theorem~\ref{thm:A} suggest that some of the techniques in loc. cit. may allow us to study the Iwasawa invariants of $\theta_{n,\Delta}$, shedding light on the regular patterns exhibited by the numerical data given in Table~\ref{tab:table4}. The following theorem where we compare the $\lambda$-invariants of $\theta_{n,\Delta}$ and $\theta_{n,E}:=\theta_{n,f_E}$, where $f_E$ is a weight-two modular form corresponding to an elliptic curve $E$ defined over $\mathbb{Q}$ with conductor $32$ and $27$ (via the modularity theorem), is obtained along the lines of argument presented in \cite{PW}. We note that there exists a single isogeny class of such curves with four isomorphism classes. Three of the isomorphism classes of curves of conductor $27$ admit a rational $3$-torsion and all four isogeny classes of curves of conductor $32$ admit a rational $2$-torsion, so Theorem~\ref{thm:A} applies for these curves. In fact, we obtain a full congruence between $E$ and $\Delta$ in the sense that
\[
a_\ell(E)\equiv \tau(\ell)\mod p
\]
for all primes $\ell$ (including $\ell=p$).} This allows us to establish:
\begin{lthm}[Theorem~\ref{thm:Delta3}]\label{thm:B}
{Let $(p,N)=(2,32)$ or $(3,27)$, $n\ge1$ and $E$ an elliptic curve defined over $\mathbb{Q}$ of conductor $N$.} If $\theta_{n,\Delta}\notin p\ZZ_p[\mathcal{G}_n]$, then
\[
\lambda(\theta_{n,\Delta})=\lambda(\theta_{n,E}).
\]
\end{lthm}
Note that the elliptic curves over $\mathbb{Q}$ of conductor $32$ and $27$ have additive reduction at $2$ and $3$ respectively. It led us to study the following question.
\noindent\textbf{Question.} Is there a general formula for $\lambda(\theta_{n,E})$ if $E/\mathbb{Q}$ is an elliptic curve with additive reduction at $p$?
We carry out numerical calculations of $\lambda(\theta_{n,E})$ at a prime $p\in\{2,3,5,7\}$, where $E$ has additive reduction, using Pollack's algorithm. The codes we used are available on \url{https://github.com/anthonydoyon/Ramanujan-s-tau-and-MT-elts} and our results are presented in Tables~\ref{tab:table1}-\ref{tab:table3} in \S\ref{sec:data}. To our surprise, for a given $E$ and a given $p$, there seems to always exist a very regular formula for $\lambda(\theta_{n,E})$ in terms of $n$ when $n$ is sufficiently large. While we are not able to fully explain the origins of these formulae, we are able to explain why $\lambda(\theta_{n,E})$ is always at least $p^{n-1}$ (see Corollary~\ref{cor:lambda-add}). When $E$ has potentially good ordinary or potentially multiplicative reduction, Delbourgo \cite{del-compositio,del-JNT} has defined a $p$-adic $L$-function and formulated an Iwasawa main conjecture for $E$ under the hypothesis that $E$ is the twist of a modular form with good reduction at $p$ by a Dirichlet character. We believe that our formulae on $\lambda(\theta_{n,E})$ should be related to Delbourgo's $p$-adic $L$-function. We intend to investigate this further in a future project. For certain potentially supersingular elliptic curves, the formulae we find depends on the parity of $n$, which has a great resemblance of the formulae for elliptic curves that have good supersingular reduction at $p$. We plan to develop the supersingular analogue of Delbourgo's theory in order to better understand these formulae from a theoretical view-point.
\subsection*{Acknowledgement}
We thank Ashay Burungale, Henri Darmon, Daniel Delbourgo, Cédric Dion, Jeffrey Hatley, Chan-Ho Kim, Robert Pollack, Katharina M\"uller and Sujatha Ramdorai for interesting discussions during the preparation of this article. {We would also like to thank the anonymous referee for very helpful comments on an earlier version of the article, which led to many improvements. In particular, we thank the referee for encouraging us to study the case $p=2$ in \S\ref{S:3MT}.} The authors' research is supported by the NSERC Discovery Grants Program RGPIN-2020-04259 and RGPAS-2020-00096. Parts of this work were carried during a summer research project carried out by the first named author at Université Laval in 2020, which was supported by an NSERC Undergraduate Student Research Award.
\section{Congruences between Ramanujan's tau function and elliptic curves with rational 2 or 3 torsions}
We study a congruence relation between $\Delta$ and elliptic curves defined over $\mathbb{Q}$ which admit a rational $2$-torsion or a $3$-torsion. We begin with the following lemma on the values of $\tau$ modulo $2$ and modulo $3$.
\begin{lemma}\label{lem:tau23}
Let $p\in\{2,3\}$. For all primes $\ell\ne p$, we have
\[
\tau(\ell) \equiv 1 +\ell\mod p
\]
\end{lemma}
\begin{proof}
Lehmer has proven that $\tau(\ell) \equiv 1 +\ell^{11} \mod 2^5$ if $\ell \neq 2$ and $\tau(\ell) \equiv \ell^{2} +\ell^{9} \mod 3^3$ if $\ell \neq 3$ (see for example \cite[\S2.1]{serre-tau}). But $\ell^{p-1}\equiv 1\mod p$ for all $\ell\ne p$ by Fermat's little theorem. Hence the result follows.
\end{proof}
We can now relate $\Delta$ to elliptic curves admitting a rational $2$-torsion or a rational $3$-torsion.
\begin{theorem}\label{thm:cong}
Let $p\in\{2,3\}$. Let $E/\mathbb{Q}$ be an elliptic curve and denote its conductor by $N_E$. Suppose that $E$ admits a $p$-torsion point defined over $\mathbb{Q}$. Then $$a_\ell(E) \equiv \tau (\ell)\mod p$$ for all primes $\ell \nmid pN_E$.
\end{theorem}
\begin{proof}
Lemma~\ref{lem:tau23} tells us that $\tau(\ell) \equiv 1 +\ell\mod p$ for all $\ell \neq p$ . Since
\[
a_\ell(E)=1+\ell-|E(\mathbb{F}_\ell)|,
\]
it suffices to show that $|E(\mathbb{F}_\ell)| \equiv 0\mod p$. Let $\alpha \in E(\mathbb{Q})[p]$ be a non-trivial $p$-torsion of $E$. Then, $\langle\alpha\rangle$ is a subgroup of $E(\mathbb{Q})[p]$ of order $ p$.
Consider the natural group homomorphism $\pi_\ell : E(\mathbb{Q}) \to E(\mathbb{F}_\ell)$ given by reduction modulo $\ell$. By \cite[Proposition~VII.3.1]{Si}, $\pi_\ell$ induces an injective group homomorphism $$E(\mathbb{Q})[p]\hookrightarrow E(\mathbb{F}_\ell).$$ In particular, $\pi_\ell(\langle\alpha\rangle)$ is a subgroup of order $p$ inside $E(\mathbb{F}_\ell)$. Thus, Lagrange's theorem tells us that $p\big | |E(\mathbb{F}_p)|$ as required.
\end{proof}
\begin{remark}
An alternative approach to prove Theorem~\ref{thm:cong} is to consider the Galois representation $\rho_{E,p}: G_\mathbb{Q}\rightarrow \mathrm{GL}(E[p])=\mathrm{GL}_2(\mathbb{Z}/p\mathbb{Z})$. Since $E$ admits a rational $p$-torsion, $\rho_{E,p}$ admits a one-dimensional trivial $\mathbb{F}_p$-linear sub-representation. Since the determinant of $\rho_{E,p}$ is given by the mod $p$ cyclotomic character $\chi_p:G_\mathbb{Q}\rightarrow (\mathbb{Z}/p\mathbb{Z})^\times$, we have
\[
\rho_{E,p}\cong \begin{pmatrix}
1&*\\
0&\chi_p
\end{pmatrix}.
\]
Therefore, for all $\ell\nmid pN_E$, we have
\[
a_\ell(E)\equiv \mathrm{Tr}(\rho_{E,p}(\mathrm{Frob}_\ell))=1+\chi_p(\mathrm{Frob}_\ell)=1+\ell \mod p,
\]
where $\mathrm{Frob}_\ell$ is the Frobenius at $\ell$.
\end{remark}
In the same vein as the results presented in \cite{PW}, Theorem~\ref{thm:cong} suggests that there might be a link between Iwasawa-theoretic objects of $\Delta$ and elliptic curves admitting a rational $2$-torsion or a $3$-torsion. In the next section, we shall review the objects we are interested in, namely Mazur--Tate elements attached to modular forms. We will then relate the 3-adic Mazur--Tate elements attached to $\Delta$ to certain elliptic curves admitting a rational $3$-torsion in \S\ref{S:3MT}.
\section{Review of Mazur--Tate elements and Iwasawa invariants}\label{sec:MT}
\subsection{Definition and basic properties of Mazur--Tate elements}
In this section, we review the definition and some basic properties of the Mazur--Tate elements defined in \cite{MT}. We follow closely the exposition of Pollack--Weston in \cite[\S2.1 and \S2.2]{PW}. Throughout this section, $p$ is a fixed prime number and $f \in S_{k}(\Gamma_0(N))$ is a fixed normalized cuspidal eigenform. For simplicity, we assume throughout that the Fourier coefficients of $f$ lie in $\mathbb{Z}$ (which is indeed the case when $f=\Delta$ or when $f$ corresponds to an elliptic curves defined over $\mathbb{Q}$, which are the cases of interest in the present article).
Suppose that $p$ is odd. Let $G_n =\mathrm{Gal}(\mathbb{Q} (\mu_{p^n}) / \mathbb{Q})$. We identify an element $a \in (\mathbb{Z} / p^n \mathbb{Z})^{\times}$ with the unique element $\sigma_a \in G_n$ satisfying $\sigma_a(\zeta) = \zeta^a$ for all $\zeta \in \mu_{p^n}$. Let $K_n$ be the unique sub-extension of $\mathbb{Q}(\mu_{p^{n+1}})$ such that $[K_n:\mathbb{Q}]=p^n$. We write $\mathcal{G}_n=\mathrm{Gal}\left(K_n/\mathbb{Q}\right)$, which we may identify with a quotient of $G_{n+1}$ and we are equipped with a natural projection map $\pi_n:G_{n+1}\twoheadrightarrow\mathcal{G}_n$.
When $p=2$, we define $G_n$ to be $\mathrm{Gal}(\mathbb{Q}(\mu_{p^{n+1}})/\mathbb{Q})$ and $\sigma_a\in G_n$ for $a\in(\mathbb{Z}/p^{n+2}\mathbb{Z})^\times$ as before. Let $K_n$ be the fixed field of $\sigma_{-1}$ inside $\mathbb{Q}(\mu_{p^{n+2}})$. Then, $K_n$ is a Galois extension of $\mathbb{Q}$ of degree $p^n$ with $\mathrm{Gal}(K_n/\mathbb{Q})\cong \mathbb{Z}/p^n\mathbb{Z}$. We define $\mathcal{G}_n$ and $\pi_n:G_{n+1}\twoheadrightarrow\mathcal{G}_n$ as before.
\begin{defn}\label{def:modsymb}
Let $\mathcal{R}$ be a commutative ring. We denote by $V_k (\mathcal{R})$ the space of homogenous polynomials of degree $k$ in two variables. Let $\Gamma \subset \mathrm{SL}_2(\mathbb{Z})$ be a congruence subgroup. As in \cite[\S2.2]{PW}, we define a modular symbol $$\varphi_f\in H^1_c(\Gamma_0(N),V_{k-2}(\mathbb{C}))\cong \mathrm{Hom}_{\Gamma_0(N)}\left(\mathrm{Div}^0(\mathbb{P}^1(\mathbb{Q}),V_{k-2}(\mathbb{C}))\right)$$ attached to $f$ satisfying $$\varphi_f(\{r\} - \{s\}) = 2 \pi i \int_s^r f(z)(zX+Y)^{k-2} dz$$
for $r,s\in\mathbb{P}^1(\mathbb{Q})$, where $\{r\}$ and $\{s\}$ are divisors associated to $r $ and $s$ respectively.
\end{defn}
\begin{defn}\label{def:MT}
Fix $n \in \mathbb{N}$. When $p$ is odd, we define $$\Theta_{n,f} = \sum_{a \in (\mathbb{Z} / p^{n+1} \mathbb{Z})^\times} \varphi_f (\{\infty\} - \{a/p^{n+1}\}) \big |_{(X,Y) = (0,1)} \cdot \sigma_a \in \mathbb{C}[G_{n+1}]$$
and denote the image of $\Theta_{n,f}$ in $\mathbb{C}[\mathcal{G}_n]$ under the natural norm map induced by $\pi_n$ by $\tilde\Theta_{n,f}$. When $p=2$, $\Theta_{n,f}$ is defined similarly with $(\mathbb{Z}/p^{n+1}\mathbb{Z})^\times$ and $a/p^{n+1}$ replaced by $(\mathbb{Z}/p^{n+2}\mathbb{Z})^\times$ and $a/p^{n+2}$ respectively.
The $p$-adic \textbf{Mazur--Tate element} of level $n$ attached to $f$ is defined to be
\[
\theta_{n,f}=\frac{\tilde\Theta_{n,f}}{\Omega_f^+},
\]
where $\Omega_f^+$ is the cohomological period for $f$ given in \cite[Definition~2.1]{PW}.
\end{defn}
\begin{remark}
We are only looking at the $+1$-eigenspace of the involution induced by $\begin{pmatrix}-1&0\\0&1\end{pmatrix}$ on the space of modular {symbols} since this is where our numerical calculations will be carried out. This is why we only make use of the period $\Omega_f^+$ in the Definition~\ref{def:MT}.
Furthermore, as explained in \cite[Remark~2.2]{PW}, the choice of $\Omega_f^+$ ensures that $\theta_{n,f}\in\ZZ_p[\mathcal{G}_n]$.
\end{remark}
By the modularity theorem, if $E/\mathbb{Q}$ is an elliptic curve of conductor $N_E$, then its $L$-function coincides with a unique normalized eigenform $f_E\in S_2(\Gamma_0(N_E))$. We let $\theta_{n,E}$ denote the Mazur--Tate element $\theta_{n,f_E}$.
We now recall the definitions of Iwasawa $\mu$ and $\lambda$ invariants attached to $\theta_{n,f}$. For further discussion on this topic, we invite the reader to consult \cite[\S4]{pollack05} or \cite[\S3.1]{PW}.
Given an element $F\in \ZZ_p[\mathcal{G}_n]$, we choose a generator $\gamma_n$ of the Galois group $\mathcal{G}_n$. We may write $F$ as a polynomial $\sum_{i=0}^{p^n-1}a_iX^i$, where $X=\gamma_n-1$.
\begin{defn}\label{def:mu-lambda}
For a non-zero element $F =\sum_{i=0}^{p^n-1} a_i X^i\in \ZZ_p[\mathcal{G}_n]$, we define the mu and lambda invariants of $F$ by
\begin{align*}
\mu(F)& = \min\limits_{i} \mathrm{ord}_p (a_i),\\
\lambda (F)& = \min \{i:\mathrm{ord}_p (a_i) = \mu (L) \},
\end{align*}
where $\mathrm{ord}_p$ denotes the $p$-adic valuation on $\mathbb{Z}$. When $F=0$, we set $$\mu(F)=\lambda(F)=\infty.$$
\end{defn}
\begin{remark}
The definitions above are independent of the choice of the generator $\gamma_n$.
\end{remark}
We explain the strategy we use to compute these Iwasawa invariants for $\theta_{n,f}$ in the case $p$ is odd. When $p=2$, the strategy is very similar.
Explicitly, given
\[
\Theta_{n,f}=\sum_{a \in (\mathbb{Z} / p^{n+1} \mathbb{Z})^\times} C_a \cdot \sigma_a\in\mathbb{C}[G_{n+1}],
\]
we obtain its projection $\tilde\Theta_{n,f}\in\mathbb{C}[\mathcal{G}_n]$ via
\[
\tilde\Theta_{n,f}=\sum_{a \in (\mathbb{Z} / p^{n+1} \mathbb{Z})^\times} \frac{C_a}{\omega(a)} \cdot \pi_n(\sigma_a),
\]
where $\omega:G_n\rightarrow \ZZ_p^\times$ is the Teichmüller character. Once we fix a generator $\gamma_n$ of $G_n$, we may write $\pi_n(\sigma_n)=(1+X)^{a'}$ for some integer $a'\in\{0,1,\ldots,p^n-1\}$. This gives
\[
\theta_{n,f}=\frac{1}{\Omega_f^+}\cdot\sum_{a \in (\mathbb{Z} / p^{n+1} \mathbb{Z})^\times} \frac{C_a}{\omega(a)} \cdot (1+X)^{a'},
\]
which is the formula we use in our numerical calculations below.
When $\theta_{n,E}$ is non-zero, we may multiply $\theta_{n,E}$ by an appropriate constant so that its coefficients as a polynomial in $X$ are not divisible by $p$ simultaneously. If we write $\tilde{\theta}_{n,E}$ for this scaled polynomial, we may calculate $\lambda(\theta_{n,f})$ by finding the degree of the polynomial $\mathbb{F}_p[X]$ obtained from $\tilde{\theta}_{n,E}$ modulo $p$.
For the elliptic curves we consider in our calculations, we may work with a particular choice of $E'$ in the isogeny class containing $E$ where $\tilde{\theta}_{n,E'}=\theta_{n,E'}$. Indeed, $\lambda$-invariants are constant in an isogeny class and it is conjectured that there always exists an $E'$ in any given isogeny class satisfying $\mu(\theta_{n,E'})=0$ (see \cite[Conjecture~1.11]{greenberg} in the good ordinary case and \cite[Conjecture~7.1]{PR} in the good supersingular case).
We are interested in $p$-adic Mazur-Tate elements mostly because they are closely related to the L-function. More precisely, $p$-adic Mazur-Tate elements satisfy the following interpolation property as pointed out in \cite[\S2]{PW}.
\begin{theorem}\label{thm:interpol}
Let $\chi$ be a Dirichlet character factoring through $\mathcal{G}_n$, but not $\mathcal{G}_{n-1}$, where $n\ge1$ is an integer. Let $\theta_{n,f}$ be the $p$-adic Mazur-Tate element as defined in Definition~\ref{def:MT}. Then, $$\chi(\theta_{n,f}) = \tau(\chi) \frac{L(f, \chi^{-1}, 1)}{\Omega^{+}_f},$$ where $\tau(\chi)$ is the Gauss sum of $\chi$.
\end{theorem}
\begin{proof}
See \cite[\S2]{PW} and \cite[\S8]{MT}. Note that $\chi$ is an even character, which is why we always have $\Omega_f^+$ in the denominator.
\end{proof}
\begin{remark}\label{rk:nonzero}
Let $k$ denote the weight of $f$. When $k\ge3$, $L(f, \chi^{-1}, 1)\ne0$ for all $\chi$ (by the functional equation, it is a non-zero multiple of $L(f,\chi,k-1)$, which is non-zero since it can be expressed as an Euler product). In particular, Theorem~\ref{thm:interpol} implies that $\theta_{n,f}\ne0$ for all $n\ge1$. When $k=2$, the main result of \cite{Roh} tells us that $L(\overline{f}, \bar{\chi}, 1)\ne0$ for all but finitely many $\chi$. Thus, Theorem~\ref{thm:interpol} implies that $\theta_{n,f}\ne0$ for $n\gg0$.
\end{remark}
\section{Mazur--Tate elements of Ramanujan's tau function at {$p=2$ and $3$}}\label{S:3MT}
We link the $\lambda$-invariants of the Mazur--Tate elements attached to $\Delta$ at $p=2$ and $3$ to those attached to certain elliptic curves defined over $\mathbb{Q}$ with additive reduction at $p$. Throughout this section, we fix $p\in\{2,3\}$ and $N\in\{27,32\}$ so that $p|N$. In other words, $(p,N)=(2,32)$ or $(3,27)$.
According to the online database LMFDB, the complex vector space $S_2(\Gamma_0(N))$ is of dimension one. Let $f_N$ denote the unique normalized cuspform in this space. All elliptic curves of conductor $N$ that are defined over $\mathbb{Q}$ have to correspond to this modular form under the modularity theorem.
For both choices of $N$, there is one single isogeny class and four isomorphism classes of elliptic curves of conductor $N$ that are defined over $\mathbb{Q}$. At least one of the isomorphism classes admit non-trivial $p$-torsions over $\mathbb{Q}$. Thus, Theorem~\ref{thm:cong} says that $a_\ell(E)\equiv\tau(\ell) \mod p$ for all $\ell\ne p$. Recall that $\tau(p)\equiv 0\mod p$. Furthermore, since $E$ has additive reduction at $p$, we have $a_p(E)=0$. Thus,
\[
\tau(p)\equiv a_p(E)\mod p.
\]
Consequently, all Fourier coefficients of $\Delta$ and $f$ are congruent modulo $p$ and we have
\begin{equation}
f\equiv \Delta\mod p
\label{eq:cong-Delta-3}
\end{equation}
as modular forms.
\begin{remark}
We thank the referee for pointing out to us that \eqref{eq:cong-Delta-3} may be obtained directly in the following way. Let $$\eta(z)=q^{\frac{1}{24}}\prod_{n\ge1}(1-q^n)$$ be the Dedekind eta function. Then,
\begin{align*}
f_{32}=\eta(4z)^2\eta(8z)^2=q\prod_{n\ge1}(1-q^{4n})^2(1-q^{8n})^2\equiv q\prod(1-q^n)^{24}=\Delta\mod 2;\\
f_{27}=\eta(3z)^2\eta(9z)^2=q\prod_{n\ge1}(1-q^{3n})^2(1-q^{9n})^2\equiv q\prod(1-q^n)^{24}=\Delta\mod 3.
\end{align*}
\end{remark}
The congruence \eqref{eq:cong-Delta-3} allows us to prove Theorem~\ref{thm:B}:
\begin{theorem}\label{thm:Delta3}
Let $(p,N)=(2,32)$ or $(3,27)$, $n\ge1$ and $E$ an elliptic curve defined over $\mathbb{Q}$ of conductor $N$. If $\mu(\theta_{n,\Delta})=0$, then
\[
\lambda(\theta_{n,\Delta})=\lambda(\theta_{n,E}).
\]
\end{theorem}
\begin{proof}
We define $\alpha'$ to be the composition
\[
H^1_c(\Gamma_0(1),V_{10}(\ZZ_p))\stackrel{\alpha}\rightarrow H^1_c(\Gamma_0(N),\ZZ_p/N\ZZ_p)\rightarrow H^1_c(\Gamma_0(N),\mathbb{F}_p),
\]
where $\alpha$ is the Hecke equivariant map defined as in \cite[\S7]{PW} and the second arrow is given by the natural projection map.
Recall that $f_N\in S_2(\Gamma_0(N))$ denotes the modular form corresponding to $E$. Let us write $\overline{\varphi}_\Delta\in H^1_c(\Gamma_0(1),V_{10}(\mathbb{F}_p))$ (resp. {$\overline{\varphi}_{f_N}\in H^1_c(\Gamma_0(p^r),\mathbb{F}_p)$}) for the image of $\varphi_\Delta/\Omega_\Delta^+$ (resp. {$\varphi_{f_N}/\Omega_{f_N}^+$}) modulo $p$. {The choice of periods ensures that $\overline{\varphi}_\Delta$ and $\overline{\varphi}_{f_N}$} are both non-zero (see \cite[Definition~2.1]{PW}).
Since we have assumed that $\theta_{n,\Delta}\not\in p\ZZ_p[\mathcal{G}_n]$ and that
\[
\vartheta_n(\alpha'(\overline{\varphi}_\Delta))\equiv \theta_{n,\Delta}\mod p\ZZ_p[G_n]
\]
by \cite[Lemma~4.6]{PW} (here, $\vartheta$ is defined as in \cite[(2) on P.357]{PW}), it follows that $\alpha'(\overline{\varphi}_\Delta)\ne0$. Furthermore, as $\alpha'$ is Hecke equivariant, \eqref{eq:cong-Delta-3} implies that
$$\alpha'(\overline{\varphi}_\Delta) = \overline{\varphi}_{f_N}.$$ Hence, applying \cite[Lemma~4.6]{PW} once more gives
\[
\theta_{n,\Delta}\equiv \theta_{n,f}\not\equiv 0\mod p\ZZ_p[\mathcal{G}_n],
\]
from which the desired equality of $\lambda$-invariants follows.
\end{proof}
When $p=2$, our numerical investigations show that $\mu(\theta_{n,\Delta})$ is not always zero. Nonetheless, it turns out that the conclusion of Theorem~\ref{thm:Delta3} still holds for $n>3$, with
$$\lambda(\theta_{n,\Delta}) = \lambda(\theta_{n,E}) = 2^{n-1} - 2.$$
When $p=3$, our numerical investigations have led us to believe that the hypothesis $\theta_{n,\Delta}\notin p\ZZ_p[\mathcal{G}_n]$ is always true. We have found that $$\lambda(\theta_{n,\Delta}) = \lambda(\theta_{n,E}) = 3^n - 2$$ for all values of $n$ that we have studied (see \S6).
\section{Mazur--Tate elements at additive primes}
Let $E/ \mathbb{Q}$ be an elliptic curve having additive reduction at a fixed prime $p$. Other than the the settings where the works of Delbourgo \cite{del-compositio,del-JNT} apply, it is not known how to define a $p$-adic L-function that would interpolate the complex $L$-values of $E$. Nonetheless, it is possible to compute $p$-adic Mazur--Tate elements of level $n$ attached to $E$ as given in Definition~\ref{def:MT}. Interestingly, the calculations we made (see \S\ref{sec:data}) show that the lambda invariants of such elements behave in a surprisingly regular manner, even though we do not know whether such patterns can be explained using Iwasawa-theoretic objects. In this section, we prove a theoretical lower bound on these lambda invariants (see Corollary~\ref{cor:lambda-add} below). We note that this lower bound is attained by the curves $45a, 63a, 72a,90c,99a,99b,99d$ when $p=3$, $150a $ when $p=5$ and $147c,294b$ when $p=7$ (see Tables \ref{tab:table1}-\ref{tab:table3} in \S\ref{sec:data}).
We recall the following norm relation satisfied by the Mazur--Tate elements.
\begin{defn}\label{def:pi}
We denote by $\mathrm{cor}_n^{n+1}: \mathbb{Z}[G_{n+1}] \to \mathbb{Z}[G_{n}]$ the natural projection map.
\end{defn}
\begin{lemma}\label{lem:tau27}
Let $E/\mathbb{Q}$ be an elliptic curve of conductor $N_E$ and denote by $\theta_{n,E}$ its associated Mazur--Tate element as given in Definition~\ref{def:MT}. If $p \big | N_E$ and $m\ge 1$, then $$ \mathrm{cor}_{m}^{m+1} (\theta_{m+1}) = a_{p}(E) \cdot \theta_m .$$
\end{lemma}
\begin{proof}
See \cite[\S1.3]{MT}.
\end{proof}
In the case of $p$ being an additive prime, it has the following consequence on the $\lambda$-invariant of the Mazur--Tate elements.
\begin{corollary}\label{cor:lambda-add}
Let $E/\mathbb{Q}$ be an elliptic curve with additive reduction at $p$. Then $$\lambda(\theta_{n,E}) \ge p^{n-1}$$
for all $n\ge1$.
\end{corollary}
\begin{proof}
Lemma~\ref{lem:tau27} tells us that that $\mathrm{cor}_n^{n+1}(\theta_n(f_{E})) = 0$ for all $n \geq 1$ since $a_p(E)=0$ when $E$ has additive reduction at $p$. This implies that $\theta_{n+1} = g_n \cdot \omega_n${, where $\omega_n=(1+X)^{p^n}-1$ and} $g_n \in \mathbb{Z}_p [{X} ]$. So, $\lambda(\theta_{n+1}) = \lambda(g_n) + p^n\ge p^n$ as required.
\end{proof}
The same is true for the Mazur--Tate elements attached to $\Delta$ at $p=3$:
\begin{corollary}
At $p=2$ or $3$, if $\mu(\theta_{n,\Delta})=0$, we have
\[
\lambda(\theta_{n,\Delta})\ge p^{n-1}
\]
for all $n\ge1$.
\end{corollary}
\begin{proof}
This follows from Theorem~\ref{thm:Delta3} and Corollary~\ref{cor:lambda-add}.
\end{proof}
\section{Numerical data}\label{sec:data}
In this section, we present a brief summary of the numerical results we have obtained. In Tables~\ref{tab:table0}, \ref{tab:table1}, \ref{tab:table2} and \ref{tab:table3}, we give the $\lambda$-invariants of Mazur--Tate elements attached to elliptic curves having additive reduction at a fixed prime $2$, $3$, $5$ and $7$ that we have computed respectively. We have found very uniform behaviour of these invariants. It seems to suggest that the Mazur--Tate elements we computed might be related to certain bounded $p$-adic $L$-functions attached to these elliptic curves. We plan to study this in a future project.
The following tables contain our computations of the Iwasawa $\lambda$-invariants of $p$-adic Mazur--Tate elements of level $n$ attached to elliptic curves having additive reduction at $p$. Since the Mazur--Tate elements are the same up to multiplication by a scalar for all elliptic curves in a given isogeny class, we organize our data by isogeny class using Cremona label. In the last column, we indicate our predictions for $\lambda(\theta_m)$ for $m$ sufficiently large according to the values we computed.
The calculations we did were carried out on Sage modifying slightly Pollack's algorithm, available on \url{https://github.com/rpollack9974/OMS}. The codes we used for our computations can be found at \url{https://github.com/anthonydoyon/Ramanujan-s-tau-and-MT-elts}.
In what follows, we write
$$q_m = \left\{
\begin{array}{ll}
p^{m-1} - p^{m-2} + \dots + p - 1 \quad \text{if } m \text{ is even}\\
p^{m-1} - p^{m-2} + \dots + p^2 - p \quad \text{if } m \text{ is odd.}\\
\end{array}
\right. $$
For some specific isogeny classes, for instance, $153a, 153c, 225a$ and $225b$, we could not find one single formula for $\lambda(\theta_m)$ in terms of $m$, but rather, two separate formulas depending on the parity of $m$, involving $q_m$. The term $q_m$ appears naturally for elliptic curves with good supersingular reduction at $p$ where the $\theta$ elements are related to Pollack's plus and minus $p$-adic $L$-functions defined in \cite{pollack03} (see \cite[\S4.1]{PW}). As given in Tables~\ref{tab:table5} and \ref{tab:table6}, these curves all have potentially supersingular reduction at $p$. This suggests that the Mazur--Tate elements for these curves might be related to Pollack's plus and minus $p$-adic $L$-functions. Curiously, there are certain curves with potentially supersingular reduction whose Mazur--Tate elements do not exhibit such patterns. We will look for a theoretic explanation on how these two distinct cases arise in our follow-up project.
\clearpage
\begin{table}[h!]
\begin{center}
\caption{$\lambda$-invariants for $p$-adic Mazur--Tate elements of level $n$ of some elliptic curves with additive reduction at $p = 2$.}
\label{tab:table0}
\begin{tabular}{l|l|l|l|l|l|l|l|l}
\toprule
\textbf{Isogeny class} &\boldmath $ n=1$ & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \boldmath$m$\\
\midrule
\multirow{2}{*}{$20a$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$1$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$7$} & \multirow{2}{*}{$9$} & \multirow{2}{*}{$31$} & \multirow{2}{*}{$33$} & $2^{m-1}-1$ ($m$ even)\\
& & & & & & & & $2^{m-2} + 1$ ($m$ odd)\\
\midrule
$24a, 48a$ & $\infty$ & $1$ & $3$ & $7$ & $15$ & $31$ & $63$ & $2^{m-1} - 1$\\
\midrule
$32a$ & $\infty$ & $1$ & $2$ & $6$ & $14$ & $30$ & $62$ & $2^{m-1}-2$\\
\midrule
$36a, 56a$ & $\infty$ & $\infty$ & $2$ & $4$ & $8$ & $16$ & $32$ & $2^{m-2}$\\
\midrule
\multirow{2}{*}{$40a$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$3$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$15$} & \multirow{2}{*}{$17$} & \multirow{2}{*}{$63$} & $2^{m-2} + 1$ ($m$ even)\\
& & & & & & & & $2^{m-1} - 1$ ($m$ odd)\\
\midrule
\multirow{2}{*}{$44a$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$1$} & \multirow{2}{*}{$3$} & \multirow{2}{*}{$5$} & \multirow{2}{*}{$11$} & \multirow{2}{*}{$21$} & \multirow{2}{*}{$43$} & $q_m$ ($m$ even)\\
& & & & & & & & $q_m + 1$ ($m$ odd)\\
\midrule
\multirow{2}{*}{$52a$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$1$} & \multirow{2}{*}{$3$} & \multirow{2}{*}{$7$} & \multirow{2}{*}{$11$} & \multirow{2}{*}{$31$} & \multirow{2}{*}{$35$} & $2^{m-1} - 1$ ($m$ even)\\
& & & & & & & & $2^{m-2} + 3$ ($m$ odd)\\
\midrule
$64a$ & $\infty$ & $1$ & $3$ & $4$ & $10$ & $22$ & $46$ & $3 \cdot 2^{m-3} - 2$\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\vspace{0.5cm}
\begin{table}[h!]
\begin{center}
\caption{$\lambda$-invariants for $p$-adic Mazur--Tate elements of level $n$ of some elliptic curves with additive reduction at $p = 3$.}
\label{tab:table1}
\begin{tabular}{l|l|l|l|l|l|l|l|l}
\toprule
\textbf{Isogeny class} &\boldmath $ n=1$ & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \boldmath$m$\\
\midrule
$27a, 54a$ & $1$ & $7$ & $25$ & $79$ & $241$ & $727$ & $2185$ & $3^m - 2$\\
\midrule
$36a, 54b, 90a,$ & \multirow{2}{*}{$2$} & \multirow{2}{*}{$8$} & \multirow{2}{*}{$26$} & \multirow{2}{*}{$80$} & \multirow{2}{*}{$242$} & \multirow{2}{*}{$728$} & \multirow{2}{*}{$2186$} & \multirow{2}{*}{$3^m - 1$}\\
$90b, 108a$ & & & & & & & &\\
\midrule
$45a, 63a, 72a,$ & \multirow{3}{*}{$1$} & \multirow{3}{*}{$3$} & \multirow{3}{*}{$9$} & \multirow{3}{*}{$27$} & \multirow{3}{*}{$81$} & \multirow{3}{*}{$243$} & \multirow{3}{*}{$729$} & \multirow{3}{*}{$3^{m-1}$}\\
$90c, 99a, 99b,$ & & & & & & & &\\
$99d$ & & & & & & & &\\
\midrule
$99c$ & $\infty$ & $6$ & $18$ & $54$ & $162$ & $486$ & $1458$ & $2 \cdot 3^{m-1}$\\
\midrule
\multirow{2}{*}{$153a$} & \multirow{2}{*}{$1$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$11$} & \multirow{2}{*}{$39$} & \multirow{2}{*}{$101$} & \multirow{2}{*}{$309$} & \multirow{2}{*}{$911$} & $3^{m-1} + q_{m-1} + 6$ ($m$ even)\\
& & & & & & & & $3^{m-1} + q_{m-1}$ ($m$ odd)\\
\midrule
\multirow{2}{*}{$153c$} & \multirow{2}{*}{$\infty$} & \multirow{2}{*}{$5$} & \multirow{2}{*}{$21$} & \multirow{2}{*}{$47$} & \multirow{2}{*}{$147$} & \multirow{2}{*}{$425$} & \multirow{2}{*}{$1281$} & $3^{m-1} + q_m$ ($m$ even)\\
& & & & & & & & $3^{m-1} + q_m + 6$ ($m$ odd)\\
\midrule
$153d$ & $2$ & $6$ & $20$ & $60$ & $182$ & $546$ & $1640$ & $q_{m+1}$\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\clearpage
\begin{table}[h!]
\begin{center}
\caption{$\lambda$-invariants for $p$-adic Mazur--Tate elements of level $n$ of some elliptic curves with additive reduction at $p = 5$.}
\label{tab:table2}
\begin{tabular}{l|l|l|l|l|l|l}
\toprule
\textbf{Isogeny class} & \boldmath $ n=1$& \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \boldmath$m$\\
\midrule
$50b, 75c$ & $4$ & $24$ & $124$ & $624$ & $3124$ & $5^m - 1$\\
\midrule
$75b, 100a, 150c$ & $2$ & $10$ & $50$ & $250$ & $1250$ & $2 \cdot 5^{m-1}$\\
\midrule
$50a, 75a, 150b, 175c$ & $3$ & $15$ & $75$ & $375$ & $1875$ & $3 \cdot 5^{m-1}$\\
\midrule
$175b$ & $4$ & $12$ & $52$ & $252$ & $1252$ & $2 \cdot 5^{m-1} + 2$\\
\midrule
$175a$ & $2$ & $6$ & $26$ & $126$ & $626$ & $5^{m-1} + 1$\\
\midrule
$150a$ & $1$ & $5$ & $25$ & $125$ & $625$ & $5^{m-1}$\\
\midrule
\multirow{2}{*}{$225a$} & \multirow{2}{*}{$1$} & \multirow{2}{*}{$8$} & \multirow{2}{*}{$37$} & \multirow{2}{*}{$188$} & \multirow{2}{*}{$937$} & $5^{m-1} + 3 \cdot q_{m-1} + 3$ ($m$ even)\\
& & & & & & $5^{m-1} + 3 \cdot q_{m-1}$ ($m$ odd)\\
\midrule
\multirow{2}{*}{$225b$} & \multirow{2}{*}{$4$} & \multirow{2}{*}{$17$} & \multirow{2}{*}{$88$} & \multirow{2}{*}{$437$} & \multirow{2}{*}{$2188$} & $3 \cdot 5^{m-1} + 3 \cdot q_{m-1} + 2$ ($m$ even)\\
& & & & & & $3 \cdot 5^{m-1} + 3 \cdot q_{m-1} + 1$ ($m$ odd)\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\vspace{0.5cm}
\begin{table}[h!]
\begin{center}
\caption{$\lambda$-invariants for $p$-adic Mazur--Tate elements of level $n$ of some elliptic curves with additive reduction at $p = 7$.}
\label{tab:table3}
\begin{tabular}{l|l|l|l|l|l}
\toprule
\textbf{Isogeny class} &\boldmath $ n=1$ & \textbf{2} & \textbf{3} & \textbf{4} & \boldmath$m$\\
\midrule
$49a, 245b, 294e, 294f, 392b, 441a$ & $5$ & $35$ & $245$ & $1715$ & $5 \cdot 7^{m-1}$\\
\midrule
$98a, 147a, 294c, 392d$ & $3$ & $21$ & $147$ & $1029$ & $3 \cdot 7^{m-1}$\\
\midrule
$147b, 196b, 294a, 392e, 441e$ & $4$ & $28$ & $196$ & $1372$ & $4 \cdot 7^{m-1}$\\
\midrule
$147c, 294b$ & $1$ & $7$ & $49$ & $343$ & $7^{m-1}$\\
\midrule
$245a, 294d, 294g, 441d$ & $2$ & $14$ & $98$ & $686$ & $2 \cdot 7^{m-1}$\\
\midrule
$196a, 392f$ & $2$ & $8$ & $50$ & $344$ & $7^{m-1} + 1$\\
\midrule
$245c, 392a, 441c$ & $4$ & $22$ & $148$ & $1030$ & $3 \cdot 7^{m-1} + 1$\\
\midrule
$392c, 441b$ & $3$ & $15$ & $99$ & $687$ & $2 \cdot 7^{m-1} + 1$\\
\midrule
$441f$ & $3$ & $9$ & $51$ & $345$ & $7^{m-1}+2$\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\clearpage
In the following table, we give the values of $\lambda$-invariants of the Mazur--Tate elements attached to $\Delta$ at the non-ordinary primes $p=3,5,7$ that we have been able to compute, We note that the values for $p = 3$ agree with those for the isogeny classes 27a and 54a in Table~\ref{tab:table1}, as predicted by Theorem~\ref{thm:Delta3}.
\vspace{0.5cm}
\begin{table}[h!]
\begin{center}
\caption{$\lambda$-invariants of $p$-adic Mazur--Tate elements of level $n$ associated to $\Delta$.}
\label{tab:table4}
\begin{tabular}{l|l|l|l|l|l|l|l|l}
\toprule
\boldmath$p$ & \boldmath $ n=1$ & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \boldmath$m$\\
\midrule
$2$ & $0$ & $1$ & $3$ & $6$ & $14$ & $30$ & $62$ & $2^{m-1} - 2$\\
\midrule
$3$ & $1$ & $7$ & $25$ & $79$ & $241$ & $727$ & ----- & $3^m - 2$\\
\midrule
$5$ & $4$ & $24$ & $124$ & $624$ & ----- & ----- & ----- & $5^m - 1$\\
\midrule
$7$ & $6$ & $48$ & $342$ & ----- & ----- & ----- & ----- & $7^m - 1$\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
If $E/\mathbb{Q}$ is an elliptic curve with additive reduction at $p$, we recall it has either potentially good or potentially multiplicative reduction at $p$. We have observed that the formulae of $\lambda$-invariants we have found in Tables~\ref{tab:table1} to \ref{tab:table3} seem to be related to the potential reduction type of the curves. We give in Tables~\ref{tab:table5}, \ref{tab:table6} and \ref{tab:table7} the potential reduction types that we have been able to work out for the curves we have studied with $p=3,5$ and $7$ respectively. When $p=3$ and $E=54a$ or $54b$, we have found that these curves have potentially good reduction. But we have been unable to find the number field where good reduction is attained. As a result, we do not know whether it has potentially good ordinary reduction or potentially good supersingular reduction. It seems even more difficult to determine the potential type of an elliptic curve with additive reduction at $p=2$. Since we are mostly interested in further investigations in Iwasawa Theory for odd primes, we have decided not to study the potential reduction types of the elliptic curves in Table~\ref{tab:table0}.
\begin{table}[h!]
\begin{center}
\caption{Potential reduction of elliptic curves having additive reduction at $p=3$.}
\label{tab:table5}
\begin{tabular}{l|l|l}
\toprule \multirow{2}{*}{\textbf{Isogeny class}} & \multirow{2}{*}{\textbf{\boldmath $K = \mathbb{Q}( \cdot )$}} & \textbf{Reduction of} \boldmath $E / K$ \textbf{at a prime}\\
& & \textbf{ideal of} \boldmath $K$ \textbf{lying above} \boldmath $p$\\
\midrule
$27a$ & $54^{\frac{1}{12}}$ & supersingular\\
\midrule
$36a$ & $3^{\frac{1}{4}}$ & supersingular\\
\midrule
$45a$ & $3^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$54a$ & ?? & good\\
\midrule
$54b$ & ?? & good\\
\midrule
$63a$ & $3^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$72a$ & $3^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$90a$ & $3^{\frac{1}{4}}$ & supersingular\\
\midrule
$90b$ & $3^{\frac{1}{4}}$ & supersingular\\
\midrule
$90c$ & $3^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$99a$ & $3^{\frac{1}{4}}$ & supersingular\\
\midrule
$99b$ & $3^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$99c$ & $3^{\frac{1}{4}}$ & supersingular\\
\midrule
$99d$ & $3^{\frac{1}{2}}$ & good ordinary\\
\midrule
$108a$ & $54^{\frac{1}{12}}$ & supersingular\\
\midrule
$153a$ & $6^{\frac{1}{4}}$ & supersingular\\
\midrule
$153c$ & $3^{\frac{1}{2}}$ & supersingular\\
\midrule
$153d$ & $3^{\frac{1}{4}}$ & supersingular\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\begin{table}[h!]
\begin{center}
\caption{Potential reduction of elliptic curves having additive reduction at $p=5$.}
\label{tab:table6}
\begin{tabular}{l|l|l}
\toprule \multirow{2}{*}{\textbf{Isogeny class}} & \multirow{2}{*}{\textbf{\boldmath $K = \mathbb{Q}( \cdot )$}} & \textbf{Reduction of} \boldmath $E / K$ \textbf{at a prime}\\
& & \textbf{ideal of} \boldmath $K$ \textbf{lying above} \boldmath $p$\\
\midrule
$50a$ & $5^{\frac{1}{3}}$ & supersingular\\
\midrule
$50b$ & $5^{\frac{1}{6}}$ & supersingular\\
\midrule
$75a$ & $5^{\frac{1}{3}}$ & supersingular\\
\midrule
$75b$ & $5^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$75c$ & $5^{\frac{1}{6}}$ & supersingular\\
\midrule
$100a$ & $5^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$150a$ & $5^{\frac{1}{4}}$ & good ordinary\\
\midrule
$150b$ & $5^{\frac{1}{4}}$ & good ordinary\\
\midrule
$150c$ & $5^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$175a$ & $5^{\frac{1}{4}}$ & good ordinary\\
\midrule
$175b$ & $5^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$175c$ & $5^{\frac{1}{4}}$ & good ordinary\\
\midrule
$225a$ & $5^{\frac{1}{6}}$ & supersingular\\
\midrule
$225b$ & $5^{\frac{1}{3}}$ & supersingular\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\newpage
\begin{table}[h!]
\begin{center}
\caption{Potential reduction of elliptic curves having additive reduction at $p=7$.}
\label{tab:table7}
\begin{tabular}{l|l|l}
\toprule \multirow{2}{*}{\textbf{Isogeny class}} & \multirow{2}{*}{\textbf{\boldmath $K = \mathbb{Q}( \cdot )$}} & \textbf{Reduction of} \boldmath $E / K$ \textbf{at a prime}\\
& & \textbf{ideal of} \boldmath $K$ \textbf{lying above} \boldmath $p$\\
\midrule
$49a$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$98a$ & $7^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$147a$ & $7^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$147b$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$147c$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$196a$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$196b$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$245a$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$245b$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$245c$ & $7^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$294a$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$294b$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$294c$ & $7^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$294d$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$294e$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$294f$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$294g$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$392a$ & $7^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$392b$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$392c$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$392d$ & $7^{\frac{1}{2}}$ & non-split multiplicative\\
\midrule
$392e$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$392f$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$441a$ & $7^{\frac{1}{6}}$ & good ordinary\\
\midrule
$441b$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$441c$ & $7^{\frac{1}{2}}$ & split multiplicative\\
\midrule
$441d$ & $7^{\frac{1}{4}}$ & supersingular\\
\midrule
$441e$ & $7^{\frac{1}{3}}$ & good ordinary\\
\midrule
$441f$ & $7^{\frac{1}{6}}$ & good ordinary\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\clearpage
\bibliographystyle{amsalpha}
|
\section{Introduction}
Deep neural networks have demonstrated impressive performances in many areas.
These areas encompass not only classical computer vision tasks, like object
detection or semantic segmentation, but also safety- and security-critical
tasks, such as skin cancer detection \cite{perez2018data} or predicting
recidivism \cite{angwin2016machine}. However, many people, including domain
experts, advise against employing deep learning in those
applications, even if these classifiers outperform human experts, for
example, in skin lesion classification \cite{tschandl2019comparison}.
One reason for their concerns is bias in the classifiers.
Indeed, almost all image datasets contain some kind of bias
\cite{wang2020revise} and, consequently, the
performance of classifiers varies significantly across subgroups.
For example, the skin lesion classification performance varies
across age groups \cite{muckatira2020properties}, and recidivism prediction
is biased against ethnic groups \cite{angwin2016machine}.
\begin{figure}
\includegraphics[width=\linewidth]{images/teaser.pdf}
\caption{
In adversarial debiasing, a debiasing loss $\mathcal L_{db}$ is
often used to enforce independence between the bias variable
$B$ and a representation $R$. In this work, we show that it is
beneficial to condition this independence on the label $L$.}
\label{fig:teaser}
\end{figure}
One major reason for bias in classifiers is dataset bias. Every dataset is a
unique slice through the visual world \cite{torralba2011unbiased}.
Therefore, an image dataset often does not represent the real world
perfectly but contains spurious dependencies between meaningless
features and the labels of its samples. This spurious connection can be
caused by incautious data collection or by
justified concerns. If, for example, the acquirement of particular examples
is dangerous, these examples might be left out of a dataset due to justified
safety concerns.
A classifier trained on such a dataset might pick the spuriously
dependent feature to predict the label and is, thus, biased.
In order to mitigate such a bias, it is important to understand the nature of
the spurious dependence. Therefore, we start our investigation at the
data generation process. We provide a formal description of the data
generation model for a common computer vision bias in Section~\ref{sec:bias}.
In contrast to other approaches that do not provide a model for the data
generation process and, hence, rely solely on empirical evaluations, this
allows us to investigate our proposed method theoretically. We discuss
the resulting differences to related work in Section~\ref{sec:related}.
Additionally, our model provides a simple way for practitioners to determine
whether our solution applies to a specific problem.
The main contribution of our work is a novel adversarial debiasing strategy.
The basic concept of adversarial
debiasing and the idea of our improvement can be observed in
Figure~\ref{fig:teaser}. For adversarial debiasing, a second loss $\mathcal L_{db}$ is used in
addition to the regular training loss $\mathcal L_{cl}$ of a neural network classifier.
This second loss penalizes the dependence between the bias variable
$B$ and an intermediate representation $R$ from the
neural network. The main difference we propose in this paper is replacing
this dependence $B \not\independent R$ by the
conditional dependence $B \not\independent R \,|\,
L$ with $L$ being the label. In fact, it turns out that this conditional dependence is better
suited than the unconditional dependence for the considered kind of bias.
The motivation for this replacement can be found in
Section~\ref{sec:theory}.
Even more important, the formal description of the data generation model
allows us to provide a rigorous mathematical proof for the linear case in
Section~\ref{sec:theory}, which can also be extended to the non-linear case.
This proof demonstrates that our new approach fits the specific bias well.
To use our new conditional independence criterion for adversarial debiasing,
we have to implement it as a differentiable loss. We provide three possible
implementations in Section~\ref{sec:implementation}. To this end, we extend
existing ideas from
\cite{perez2017fair, kim2019learning, Li2019kernel, adeli2019bias}
for implementing the unconditional independence criterion and provide
realizations for their conditional counterparts. We demonstrate that these
new loss functions lead to larger accuracies on unbiased test sets.
In Section~\ref{sec:synthetic}, we provide results of experiments on a
synthetic dataset that maximizes the difference between the conditional and
the unconditional dependence. Further, in Section~\ref{sec:real}, we present
results on a dataset with real-world images of cats and dogs that is used by
previous work to evaluate adversarial debiasing. These
experiments show that our new approach outperforms existing methods on both
synthetic and real-world data.
Further experiments shown in Section~\ref{sec:ablation} indicate that the proposed change of the criterion
causes the increasing accuracies.
\section{Related work}\label{sec:related}
The goal of debiasing is to prevent a classifier from using biased features.
To reach this goal, we first have to choose a criterion to determine whether
the classifier uses a feature. Second, we have to turn this criterion into a
differentiable loss. In this section, we compare our choices to related work
from the literature.
First, we compare our criterion for determining whether the classifier uses
a feature. Traditionally, adversarial debiasing aims to learn a feature
representation that is informative for a task but independent of
the bias.
Hence, a second neural network that should predict the bias from the feature
representation is introduced to enforce this independence. The
original network for classification and this second network are then trained
in an adversarial fashion.
To this end, different loss functions for the
original network are suggested to decrease the performance of the second
network for predicting the bias.
In
\cite{alvi2018turning}, the authors
minimize the cross-entropy between bias prediction and a uniform
distribution. The mean squared error between the reconstruction and the bias
is used in \cite{zhang2018mitigating}. The authors of \cite{kim2019learning}
maximize the cross-entropy between the predicted distribution of the bias
and the bias variable. Additionally, they maximize the entropy of the
distribution of the predicted bias. In \cite{adeli2019bias}, the authors
minimize the correlation between the ground-truth bias and the prediction of
the bias. However, as demonstrated in \cite{reimers2020determining},
independence is too restrictive as a criterion for determining whether a
deep neural network uses a certain feature. This fact is also reflected in
the experimental results of the abovementioned papers. The resulting
classifiers are less biased, but this often leads to decreasing performance
on unbiased test sets. For example, \cite{alvi2018turning} report
significantly less bias in an age classifier trained on a dataset biased by
gender but the performance on the unbiased test set drops from $0.789$ to
$0.781$. Our work is fundamentally different. Instead of a different loss,
we suggest a different criterion to determine whether a neural network uses
a feature. We use the conditional independence criterion proposed by
\cite{reimers2020determining} rather than independence between the
representation and the bias.
To turn the chosen criterion, in our case, conditional independence, into
a differentiable loss, we extend three ideas from the literature. We build
on work of \cite{perez2017fair} and \cite{Li2019kernel}, which use the
Hilbert-Schmidt independence criterion (HSIC) \cite{gretton2008kernel} as well as
on the ideas of using mutual information presented in \cite{kim2019learning} or the
predictability criterion presented by \cite{adeli2019bias}. All three
criteria are unconditional. Our work extends them to conditional
independence criteria.
For understanding deep neural networks, \cite{reimers2020determining}
demonstrate that conditional dependence is a sharper criterion than
unconditional dependence. For adversarial domain adaptation,
\cite{wang2020classes} show significant improvements of conditional
adversarial losses compared to unconditional adversarial losses. However,
our work is the first one that makes use of these advantages in adversarial
debiasing.
The authors of \cite{rieger2020interpretations} use contextual decomposition
\cite{murdoch2018beyond} to force a neural network to focus on useful
areas of an image. In contrast, we use the approach of
\cite{reimers2020determining}, which can not only be applied to image areas
but arbitrary features.
While the vast majority of adversarial debiasing methods acknowledge that
bias has many forms, they rarely link the suggested solutions to the
processes that generate the biased data. Instead, they rely exclusively on
empirical evaluations. In contrast, we provide a specific model for a
specific kind of bias as well as a theoretical proof that our approach is
better suited for this case.
\section{Proposed debiasing approach}\label{sec:method}
In this section, we introduce and motivate our novel approach to adversarial
debiasing. First, in Section~\ref{sec:bias}, we define a model for the bias
we consider in this work. Even though the bias model is quite specific, it
covers many relevant cases in computer vision. We corroborate this claim
with two examples at the end of Section~\ref{sec:bias}. Afterward, we
introduce our novel adversarial debiasing criterion.
Section~\ref{sec:theory} provides a theoretical motivation and a mathematical
proof that the new criterion fits our specific bias model better than
existing solutions from the literature.
Finally, we provide three possible implementations for loss functions that realize this
criterion in Section~\ref{sec:implementation}.
\subsection{Bias model}\label{sec:bias}
\begin{figure}[t]
\centering
\includegraphics{images/graph_small.pdf}
\caption{A graphical representation of the specific bias. Circles
represent variables, dotted circles represent unobserved variables.
The label $L$ is only dependent on a signal $S$, while the
input $I$ is also dependent on some
variable $B$. In the training set, the signal $S$
influences the variable $B$ due to bias. This is indicated by the
red dashed arrow.}
\label{fig:bias}
\end{figure}
Many different kinds of bias exist and influence visual datasets in
various ways \cite{wang2020revise}. In this work, we consider a specific
kind of bias. We will later argue that this specific model covers many
relevant tasks in computer vision.
To describe the bias model, we start with a graphical model of the
underlying data generation process displayed in Figure~\ref{fig:bias}.
For classification tasks, like separating cats
from dogs, we assume that a process following this graphical model
generates the label $L$ (cat or dog) from a signal $S$. This
signal $S$ is contained in and can be extracted from the input
$I$.
However, the input $I$ is a mixture of multiple signals: Besides
$S$, another signal $B$ influences $I$. In the
cat/dog example, $B$ might relate to the fur’s color.
Since the fur’s color is not meaningful in distinguishing cats and dogs,
$B$ is independent of $S$ and $L$
during the application of the machine learning method in practice, i.e.,
on an unbiased test set,
\begin{equation}
\textup{Test:} \quad B \independent L .
\end{equation}
In contrast, in a biased training set, we find an unwanted dependence
between the signal $S$ and the signal
$B$. Hence, we call $B$ the bias variable in this case.
The training dataset in the cat/dog example might contain only images of
dogs with bright fur and images of cats with dark fur, leading to
\begin{equation}
\textup{Training:} \quad B \not\independent L .
\end{equation}
This dependence can be utilized by a machine-learning algorithm to
predict $L$ using $B$, resulting in a biased classifier.
To better understand the direction of the arrow from $S$ to
$B$, we want to emphasize, that data for a task is selected
with a purpose. Images are included in the dataset because they show cats or dogs and
one will, if necessary, deliberately accept imbalances in variables like
fur-color. In contrast, if one find that our dataset misrepresents
fur-color one would never accept a major misrepresentation of the ratio
of cats and dogs to compensate for this problem. This demonstrates, that
$S$ influences $B$ through the dataset creation while
$B$ does not influence $S$.
This bias model covers many relevant situations in computer vision. In
the following, we give two examples where the bias model fits the data
and one where it does not.
The first example is a driver assistance system that uses a camera to
estimate aquaplaning risk \cite{hartmann2018aquaplaning}. To train such
a system, a dataset is needed that contains images of safe conditions
and aquaplaning conditions. While the images of safe conditions can be
easily collected in the wild, it is dangerous to drive a car under
aquaplaning conditions. Therefore, the images of aquaplaning conditions
must be collected in a specific facility. In this example, the signal
$S$ is the standing water, and the bias variable $B$ is
the location that determines the background of the image. Because of
this safety risk, they are dependent in the training set, but not at the
time of application.
The second example is automatic classification of skin
lesions from images \cite{tschandl2018ham10000}. The classification
systems are trained on images taken by dermatologists. Since the growth
of the skin lesion is informative for skin lesion classification,
dermatologists sometimes draw a scale next to the skin lesion if they
suspect it is malignant. In this example, the characteristics of the
skin lesion form the signal $S$, while the drawn scale is the bias
variable $B$. These are dependent in the training set, but
this bias is not present in the application.
The third example is the one, where the bias model does not fit the
data. The example is a system that predicts absenteeism
in the workplace, for example \cite{ali2020enhanced}. If an automated
system predicts absenteeism, it might be unfair to women because of
pregnancy. And we might want a system that does not take this effect
into account. Here, the bias variable $B$ is the sex and the
signal $S$ is the time an employee will be absent from work. Here,
our bias model does not fit because the data contain a $B$ to
$L$ link.
\subsection{Conditional independence for debiasing}\label{sec:theory}
Deep neural networks unite a feature extractor and a predictor
\cite{reimers2020deep}. For adversarial debiasing, we separate the two
at some intermediate layer. We denote the output of the feature
extractor $R$.
Note that it is a valid approach to use the whole network for
feature extraction. In this case, $R$ is the
prediction of the neural network. Both networks are
trained using a classification loss $\mathcal L_{cl}$, e.g., cross-entropy loss.
Additionally, a debiasing loss $\mathcal L_{db}$ is used to prevent the extraction of the
bias variable $B$.
For a visualization, see Figure~\ref{fig:teaser}.
Most approaches for adversarial debiasing
\cite{alvi2018turning, zhang2018mitigating, adeli2019bias,
kim2019learning} aim to find a representation $R$ of $I$
that is independent of the bias variable $B$ while still
being informative for the label $L$, i.e.,
\begin{equation}\label{eqn:ad_old}
R \independent B \quad\land\quad R
\not\independent L.
\end{equation}
In this work, we propose a novel strategy: Instead of
independence, we aim for conditional independence of $R$
and $B$, given the label $L$, i.e.,
\begin{equation}\label{eqn:ad_new}
R \independent B \, |\, L \quad\land\quad
R \not\independent L.
\end{equation}
Our strategy is better suited for the specific bias model presented in
Section~\ref{sec:bias}. In this section, we show that our strategy
agrees with state-of-the-art results in explaining deep neural networks
\cite{reimers2020determining}. An optimal classifier fulfills the
conditional independence \eqref{eqn:ad_new} but not the independence
\eqref{eqn:ad_old}. We prove this statement for the case that all
data generation processes are linear.
Consequently, loss functions that enforce the independence
\eqref{eqn:ad_old} will decrease the classifier's performance,
while loss functions that ensure the conditional independence
\eqref{eqn:ad_new} will not.
The goal of debiasing is to prevent a deep neural network from using a
biased feature. To reach this goal, we first need to determine whether a
classifier uses a feature.
So far, most approaches for adversarial debiasing use the dependence
between a feature and the classifier's prediction to measure whether a
classifier is using a feature. In contrast, we build on previous work
for understanding deep neural networks \cite{reimers2020determining}.
While the independence criterion \eqref{eqn:ad_old} obviously ensures
that a bias variable $B$ is not used for
classification, the authors of \cite{reimers2020determining} reveal that
independence is too restrictive to determine whether a deep neural
network uses a certain feature. They employ the framework
of causal inference \cite{pearl2009causality} to show that the
ground-truth labels are a confounding variable for features of the input
and the predictions of a deep neural network. In theoretical
considerations and empirical experiments, they further demonstrate that
the prediction of a neural network and a feature of the input can be
dependent even though the feature is not used by the deep neural
network. The authors, therefore, suggest using the conditional
independence \eqref{eqn:ad_new}, which we employ in our method for
adversarial debiasing.
Thus, the independence criterion \eqref{eqn:ad_old}
is too strict. Even if the deep neural network ignores the bias, it
might not satisfy \eqref{eqn:ad_old} and, hence, not minimize a
corresponding loss. Furthermore, minimizing such a loss based on the
independence criterion will likely result in a less accurate classifier.
To corroborate this claim, we present a mathematical proof for the
following statement. If the bias can be modeled as explained in
Section~\ref{sec:bias}, the optimal classifier, which recovers the
signal and calculates the correct
label for every input image, fulfills the conditional independence
\eqref{eqn:ad_new} but not the independence \eqref{eqn:ad_old}.
In this work, we only include the proof for the linear case, i.e., all
data generating processes are linear.
However, this proof can further be extended to the non-linear case by
using a kernel space in which the data generation processes are linear
and replacing covariances with the inner product of that space.
\begin{theorem}
If the bias can be modeled as described in Section~\ref{sec:bias},
the optimal classifier fulfills the conditional independence in
(\ref{eqn:ad_new}) but not the independence in (\ref{eqn:ad_old}).
\end{theorem}
\begin{proof}
Throughout this proof, we denote all variables with capital Latin
letters.
Capital Greek letters denote processes.
For these processes, we denote the
linear coefficients with lower-case Greek letters.
The only exception to this is the optimal classifier that is denoted
by $F^\ast$.
We start the proof by defining all functions involved in the model.
Afterward, since dependence results in correlation in the linear
case, a simple calculation proves the claim.
Let $S$ denote the signal according to the bias model, as
explained in Section~\ref{sec:bias}.
Since we are in the linear case, the bias variable $B$ can
be split into a part that is fully determined by $S$ and a
part that is independent of $S$.
Let $B^{\ast}$ be the part of the bias
variable that is independent of $S$. The bias variable $B$
is given by
\begin{equation}
B = \alpha_1 S + \alpha_2 B^{\ast}
=: \Phi \left(S, B^{\ast}\right).
\end{equation}
Further, the label $L$ can be calculated from the signal
$S$
\begin{equation}\label{eqn:labzs}
L = \zeta_1 S =: \Xi \left(S\right)
\end{equation}
and the image $I$ is given by
\begin{equation}
I =: \Psi \left(S, B\right) = \Psi\left(
S, \Phi \left(S, B^{\ast}\right)\right).
\end{equation}
The optimal solution $F^\ast$ of the machine learning problem will recover the
signal and calculate the label. By the assumptions of the bias
model, the signal can be recovered from the input. Thus, there
exists a function $\Psi^{\dagger}$ such that
\begin{equation}
\Psi^{\dagger} \left(\Psi \left(S, B\right)
\right) = S
\end{equation}
holds. Therefore, $F^\ast$ is given by
\begin{equation}
F^\ast := \Xi \Psi^{\dagger}.
\end{equation}
Now, we have defined all functions appearing in the model. The rest
of the proof are two straightforward calculations.
In the linear case, the independence of variables is equivalent to
variables being uncorrelated. We denote the covariance of two
variables $A, B$ with $\langle A, B \rangle$.
To prove that \eqref{eqn:ad_old} does not hold, we calculate
\begin{equation}\label{eqn:corr}
\begin{split}
\left\langle F^\ast (I), B \right\rangle
&= \left\langle \Xi \Psi^{\dagger} \Psi \left( S, \Phi \left(
S ,B^{\ast} \right)\right),
\Phi \left(S, B^{\ast} \right) \right\rangle
\\ &= \left\langle \zeta_1S, \alpha_1 S + \alpha_2
B^{\ast} \right\rangle
= \zeta_1\alpha_1 \left\langle S, S \right\rangle.
\end{split}
\end{equation}
This is equal to zero if and only if either all inputs contain an
identical signal ($\left\langle S, S \right\rangle = 0$),
the dataset is unbiased ($\alpha_1 = 0$), or the label does not
depend on the signal ($\zeta_1 = 0$).
For conditional independence, we can use partial correlation and obtain
that $\left\langle F^\ast(I), B \right\rangle | L$
equals
\begin{equation}
\left\langle F^\ast(I) - \frac{\left\langle F^\ast(I), L
\right\rangle}{\left\langleL, L
\right\rangle}L, B - \frac{\left\langle
B, L \right\rangle}{\left\langleL, L
\right\rangle} L \right \rangle.
\end{equation}
We substitute $L$ by \eqref{eqn:labzs} and use the properties of the
inner product to arrive at
\begin{equation}
\begin{split}
&\left\langle F^\ast(I), B \right\rangle - \frac{\left\langle
\zeta_1S, \zeta_1 S\right\rangle\left\langle
\zeta_1 S, B \right\rangle}{\left\langle \zeta_1
S, \zeta_1S\right\rangle}
\\& = \zeta_1\alpha_1 \left\langle S, S \right\rangle -
\frac{\alpha_1\zeta_1^3\left\langle S, S
\right\rangle^2}{\zeta_1^2\left\langle S, S
\right\rangle} = 0.
\end{split}
\end{equation}
This completes the proof for the linear case. For more detailed
calculations see Section~\ref{sec:ape:calc} in the Appendix.
\end{proof}
The optimal classifier does not minimize loss criteria based on the
independence \eqref{eqn:ad_old}. Further, from
\eqref{eqn:corr}, we see that the dependence contains
$\zeta_1$, which is the correlation between the signal $S$ and the
neural network's prediction. Loss functions based on that criterion aim to
reduce this parameter and, hence, will negatively affect the
classifier's performance. We demonstrate this effect using a synthetic
dataset in Section~\ref{sec:experiments}.
In contrast, loss terms
based on our new criterion \eqref{eqn:ad_new} are minimized by the
optimal classifier. Thus, corresponding loss functions do not reduce the
accuracy to minimize bias.
\subsection{Implementation details}\label{sec:implementation}
In Section~\ref{sec:theory}, we presented two reasons that indicate why
our new criterion \eqref{eqn:ad_new} is better suited than the old criterion
\eqref{eqn:ad_old} for the bias described in Section~\ref{sec:bias}.
In practice, we are faced with the problem of integrating our criterion
into the end-to-end learning framework of deep neural networks. As a
consequence, we provide three possibilities to realize
(\ref{eqn:ad_new}) as a loss function.
Turning an independence criterion into a loss function is not
straightforward. First, the result of an independence test is binary
and, hence, non-differentiable. Second, we need to consider
distributions of variables to perform an independence test.
However, we only see one mini-batch at a time during the training of a deep
neural network. Nevertheless, multiple solutions exist in the
unconditional case.
In this section, we describe three possible solutions, namely: mutual
information~(MI), the Hilbert-Schmidt independence criterion~(HSIC) and
the maximum correlation criterion~(MCC).
We adapt the corresponding solutions from the unconditional case and
extend them to conditional independence criteria.
The first solution makes use of the mutual information of $R$
and $B$ as suggested in \cite{kim2019learning},
\begin{equation}
\textup{MI}(R; B) = \sum_{r \in \mathcal R,
b \in \mathcal B} p_{R, B}
(r, b) \log\frac{p_{R, B}
(r, b)}{p_{R}(r)p_{B}
(b)}.
\end{equation}
Here, the criterion for independence is $\textup{MI}(R;
B) = 0$, and the mutual information is the differentiable loss
function. However, to evaluate this loss, we must estimate the densities
$p_{R, B}, p_{R}$ and $p_{B}$ in every
step, which is difficult. To mitigate this issue, the authors of
\cite{kim2019learning} make simplifications to find a bound that
is tractable for single examples.
In contrast, we use conditional independence. Our criterion is
$\textup{MI}(R; B| L) = 0$, and the loss is given
by the conditional mutual information $\textup{MI}(R;
B| L)$
\begin{equation}
\sum_{\substack{l
\in \mathcal L, b \in \mathcal B\\ r \in
\mathcal R}} p_{R, B, L}\left(r,
b, l\right) \log\frac{p_{L}(l)p_{R,
B, L}\left(r, b, l\right)}{
p_{R, L}(r, l)p_{B, L)}}.
\end{equation}
We use kernel density estimation on the mini-batches to determine
the densities and employ a Gaussian kernel with a
variance of one-fourth of the average pairwise distance within a
mini-batch.
This setting proved best in preliminary experiments on
reconstructing densities.
As a second solution, we extend the Hilbert Schmidt independence criterion
\cite{gretton2008kernel}
\begin{equation}
\textup{HSIC}(R, B) = \frac{1}{(m - 1)^2}
\textup{tr}\,K_{R}HK_{B}H.
\end{equation}
Here, $K_{R}$ and $K_{B}$ denote the kernel matrices for
$R$ and $B$, respectively. For the Kronecker-Delta
$\delta_{ij}$ and $m$ the number of examples, $H$ is given
by $H_{ij} = \delta_{ij} - m^{-2}$.
The variables are independent if and only if
$\textup{HSIC}(R, B) = 0$ holds for a sufficiently large
kernel space. The HSIC was suggested for classical machine learning methods by
\cite{perez2017fair} and \cite{Li2019kernel}.
Since we aim for conditional independence rather than independence, we use the
conditional independence
criterion \cite{fukumizu2008kernel}
\begin{equation}
\textup{tr} \, G_R S_L G_B S_L = 0.
\end{equation}
Here, for $X \in \{B,R,L\}$, we use $G_X = HK_XH$
and $S_L = \left(\mathbb I + 1/m G_L\right)^{-1}$ with the identity matrix $\mathbb I$.
For the relation to HSIC
and further explanations, we refer to \cite{fukumizu2008kernel}.
We use the same kernel as above and estimate the loss on
every mini-batch independently.
The third idea we extend is the predictability criterion from \cite{adeli2019bias}
\begin{equation}\label{eqn:adeli}
\max_{f} \quad \textup{Corr}(f(R), B) = 0.
\end{equation}
To use this criterion within a loss function, they parametrize $f$ by a
neural network. However, this is not an independence criterion as it can
be equal to zero, even if $R$ and $B$ are dependent.
Therefore, it is unclear how to incorporate the conditioning on
$L$. As a consequence, we decided to extend the proposed criterion in
two ways. First, we use the maximum correlation coefficient (MCC)
\begin{equation}\label{eqn:mcc}
\textup{MCC}(R, B) = \max_{f,g} \quad \textup{Corr}(f(R), g(B)) = 0\quad,
\end{equation}
which is equal to zero if and only if the two variables are independent
\cite{sarmanov1958maximum}. Second, we use the partial correlation
conditioned on the label $L$, which leads to
\begin{equation}\label{eqn:ours_mcc}
\max_{f,g} \quad \textup{PC}(f(R),
g(B)\,|\,L) = 0.
\end{equation}
To parameterize both functions $f$ and $g$, we use neural networks.
The individual effects of the two extensions can be observed through our
ablation study in Section~\ref{sec:ablation}.
Note that all three of these implementations can be used for
vector-valued variables. Therefore, they can also be used for multiple
bias variables in parallel.
\section{Experiments and results}\label{sec:experiments}
This section contains empirical results that confirm our theoretical
claims and form the third reason for the suitability of our proposed method.
To this end, we first present
experiments on a synthetic dataset that is designed to maximize the
difference between the independence criterion \eqref{eqn:ad_old} and the
conditional independence criterion \eqref{eqn:ad_new}. Afterward, we report
the results of an ablation study demonstrating that the gain in performance
can be credited to the change of the independence criterion. Finally,
we show that our findings also apply to a real-world dataset. For this
purpose, we present experiments on different biased subsets of the cats and
dogs dataset presented in \cite{lakkaraju2016discovering}.
To evaluate our experiments, we measure the accuracy on an unbiased testset.
We do this for multiple reasons. First, we designed this method for
situations in which a dataset is biased, but we expect the system to be used
in an unbiased, real-world situation. Hence, the accuracy on an unbiased
testset is our goal and evaluating it directly is the most precise measure
for our method.
Nevertheless, our method is also applicable to some situations of
algorithmic fairness where we do not have access to an unbiased testset. In
these situations it is common to use other evaluation methods like the
``equalized odds'' \cite{hardt2016equality}
\begin{equation}
R \independent B \,|\, L
\end{equation}
or
``demographic parity'' \cite{dwork2012fairness}
\begin{equation}
R \independent B
\end{equation}
both of which are the same in this situation, since the testset is unbiased.
The main drawback of these measures is that they are binary and, therefore,
rather coarse-grained. Hence, we focus on the accuracy on unbiased testsets
in this paper, but include the evaluations of these fairness criteria in
Section~\ref{sec:ape:fair} of the appendix.
\subsection{Synthetic data}\label{sec:synthetic}
If a feature is independent of the label for a given classification task, the
independence criterion \eqref{eqn:ad_old} and the conditional independence
criterion \eqref{eqn:ad_new} agree.
Since we aim to maximize the difference between the two criteria, we use a
dataset with a strong dependence between the label $L$ and the variable
$B$.
We create a dataset of eight-by-eight pixels images that combine two
signals. The first signal $S$, determines the
shape of high-intensity pixels in the image. This shape is either a cross or
a square, both consisting of the same number of pixels. The second
signal $B$ is the color of the image. The hue of all pixels is
either set to 0.3 (green) or to 0.9 (violet). Afterward, we add noise to the
hue and the intensity value of every pixel. The noise is sampled from a uniform
distribution on the interval $[-0.1, 0.1]$.
Finally, the images are converted to the RGB colorspace. To maximize the
dependence between the label $L$ and the bias variable $B$,
every training image of a cross is green and every training image of a
square is violet. In the test set, these two signals are independent.
Example images from the training and test set can be seen in
Figure~\ref{fig:examples}. We decided to limit the training set to 600
images for two reasons. First, small datasets are the expected use-case for
adversarial debiasing. Second, this limitation increases the
difficulty of debiasing.
\begin{figure*}[t]
\centering
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=\textwidth]{images/train_set_small.pdf}
\subcaption{Images from the training set}
\end{subfigure}%
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=\textwidth]{images/test_set_small.pdf}
\subcaption{Images from the test set}
\end{subfigure}
\caption{Example images from the synthetic dataset. In the training set,
the color and the shape are dependent. In the test set, the two signals
are independent.}
\label{fig:examples}
\end{figure*}
For our first experiment, we use the shape as a categorical label $L$ and
the color as the bias variable $B$. For this purpose, we calculate
the mean color of the image after the noise is applied and use this value as
the variable $B$. We report the results of this experiment in
Table~\ref{tab:results} in the column titled Setup~I.
To avoid any influence of shape- or color-preference, we also report results
for the inverse setting in a second experiment, denoted as Setup~II. For this
experiment, we use the color as a categorical label $L$.
The bias variable $B$ is then calculated as the difference between
the values of pixels in the square shape and those in the cross.
As the backbone, we use a neural network that first contains two convolutional layers, each
having 16 filter kernels of size $3{\times}3$. Then, a dense layer follows
with 128 hidden neurons. These layers use ReLU activations.
Finally, we use a dense layer with two
neurons and softmax activation for classification.
If a method from the literature uses an intermediate representation, we use
the representation after the last convolutional layer. Otherwise,
we use the prediction of the whole network as the representation $R$.
Whenever an additional
neural network is required by a method, i.e., all literature methods and
ours based on MCC, we use a neural network with one
hidden layer of 1024 neurons. For optimization, we use Adam
\cite{kingma2014adam}.
As a baseline, we use the backbone neural network without any debiasing method. We have
reimplemented four methods from the literature using the descriptions in the respective papers.
The corresponding references can be found in Table~\ref{tab:results}. Two methods are
proposed in \cite{zhang2018mitigating}. We call the first, which penalizes
the predictability of $B$ from $R$,
\emph{Zhang et al. I}. The second one, which penalizes predictability of
$B$ from $R$ and $L$, is called
\emph{Zhang et al. II}.
In addition, we report the averaged accuracies for these and all three implementations of our
proposed criterion in
Table~\ref{tab:results}.
We have set the hyperparameters for the competing methods to the values
found in the corresponding papers. For all unpublished or problem-specific
hyperparameters such as learning rates, as well as for all hyperparameters
for our implementation, we used a grid search.
To this end, we trained ten neural networks for each combination of
different hyperparameters and evaluated them on an unbiased validation set.
We included the list of the hyperparameters for every method in
Section~\ref{sec:ape:hyp} in the appendix.
For the second setup, we applied the same hyperparameter search.
This resulted in different hyperparameters compared to the
first setup for all methods, which are also described in
Section~\ref{sec:ape:hyp} in the appendix.
\begin{table}[t]
\caption{The results from 100 runs of our method and all baseline methods.
For both experiments, we report the mean accuracy {\scriptsize$\pm $
standard error}. Best results are marked in \textbf{bold}}
\label{tab:results}
\centering
\begin{tabular}{lcc}
\toprule
Method & Setup~I & Setup~II\\
\midrule
Baseline & $0.819$ \scriptsize{$\pm 0.016$}
& $0.791$ \scriptsize{$\pm 0.016$} \\
\midrule
Adeli et al. \cite{adeli2019bias} & $0.747$ \scriptsize{$\pm 0.015$}
& $0.776$ \scriptsize{$\pm 0.014$}\\
Zhang et al. I \cite{zhang2018mitigating} & $0.736$ \scriptsize{$\pm 0.018$}
& $0.837$ \scriptsize{$\pm 0.017$} \\
Zhang et al. II \cite{zhang2018mitigating} & $0.747$ \scriptsize{$\pm 0.016$}
& $0.750$ \scriptsize{$\pm 0.013$} \\
Kim et al. \cite{kim2019learning} & $0.771$ \scriptsize{$\pm 0.012$}
& $0.767$ \scriptsize{$\pm 0.016$}\\
\midrule
Ours(MI) & $0.840$ \scriptsize{$\pm 0.014$} & $\textbf{0.871}$ \scriptsize{$\pm 0.012$}\\
Ours(HSIC) & $0.846$ \scriptsize{$\pm 0.021$} & $0.868$ \scriptsize{$\pm 0.013$}\\
Ours(MCC) & $\textbf{0.854}$ \scriptsize{$\pm 0.013$} & $0.867$ \scriptsize{$\pm 0.013$}\\
\bottomrule
\end{tabular}
\end{table}
We observe that the baseline reaches a test accuracy of more than 75\% in
both experiments. Hence, hyperparameter selection influences which feature
(color or shape) the neural network uses for classifications. Since there is
no analytical way to determine the best hyperparameters, this strong impact
might obscure the effect of debiasing methods. We tried to prevent this by
rigorous hyperparameter optimization and a large number of runs.
We see that
the difference between the methods from the literature using the independence
criterion \eqref{eqn:ad_old} and the methods using our new conditional
independence criterion \eqref{eqn:ad_new} is much larger than the
differences between methods within these groups. For the first experiment,
the worst method using \eqref{eqn:ad_new} performs $5.9$ percentage points
better than the best method using \eqref{eqn:ad_old}. The difference between
the best and worst methods within these groups is $1.4$ percentage points
and $3.5$ percentage points, respectively. In the second setup, the
results are similar. Only the method suggested in
\cite{zhang2018mitigating} performs surprisingly good in this experiment.
We draw two conclusions from these experiments. First,
as intended, the synthetic dataset is challenging for all existing methods
found in the literature. In the first setup, none of them were able to
improve the results of the baseline. In the second experiment, only one
method outperformed the baseline.
This coincides with observations from
the literature that adversarial debiasing methods are challenged in
situations with strong bias and lose accuracy to reduce bias. It
also agrees with \eqref{eqn:corr}, which we discussed
at the end of Section~\ref{sec:theory}.
It is important to note that we were able to reach the baseline performance
for every method by allowing hyperparameters that deactivate the debiasing,
e.g., by setting the weight of the debiasing loss to zero.
To avoid this deactivation, we have limited the hyperparameters to the range
that is used in the respective publications. Second, we observe that all
methods that use our new debiasing criterion \eqref{eqn:ad_new} reach a
higher test accuracy than the baseline and, consequently, also a higher
accuracy than existing methods.
\subsection{Ablation study}\label{sec:ablation}
In the previous experiment, we observed that our new methods reached a
higher accuracy than the methods from the literature. To show that this
increase in accuracy can be attributed to the conditional independence
criterion \eqref{eqn:ad_new}, we conduct an ablation study for the three
methods described in Section~\ref{sec:implementation}.
More specifically, we first report results for a method using unconditional
mutual information, calculated in the same way we calculate the conditional
mutual information. Second, we present results for a method using the
unconditional HSIC as a loss. Third, we present two methods that
investigate the gap between the method presented by
Adeli et al.~\cite{adeli2019bias} and our method using the conditional
maximal correlation coefficient. The first one uses the unconditional
maximum correlation coefficient, and the second one incorporates the partial
correlation (PC) instead of the correlation in \eqref{eqn:adeli}. We use the
settings and evaluation protocol of Setup~I and Setup~II from the previous
section. The results are presented in Table~\ref{tab:ablation}.
\begin{table}[t]
\caption{The results of the ablation study. Every method is trained on a
biased training set and evaluated on an unbiased test set. We report
the accuracy averaged over 100 runs and the standard error.
Best results are marked in \textbf{bold}}
\label{tab:ablation}
\centering
\begin{tabular}{lcc}
\toprule
Method & Setup I & Setup II\\
\midrule
Unconditional MI & $0.583$ \scriptsize{$\pm 0.010$} & $0.833$\scriptsize{$\pm0.011$}\\
Conditional MI & $\textbf{0.840}$ \scriptsize{$\pm 0.014$} & $\textbf{0.871}$\scriptsize{$\pm0.012$}\\
\midrule
Unconditional HSIC & $0.744$ \scriptsize{$\pm 0.011$} & $0.590$\scriptsize{$\pm0.011$}\\
Conditional HSIC & $\textbf{0.846}$ \scriptsize{$\pm 0.021$} & $\textbf{0.868}$\scriptsize{$\pm0.013$}\\
\midrule
Adeli et al. \cite{adeli2019bias} & $0.747$ \scriptsize{$\pm 0.015$} & $0.776$\scriptsize{$\pm0.014$} \\
Ours(MCC) -- {\small only MCC} & $0.757$ \scriptsize{$\pm 0.016$} & $0.807$\scriptsize{$\pm0.015$}\\
Ours(MCC) -- {\small only PC} & $0.836$ \scriptsize{$\pm 0.014$} & $0.830$\scriptsize{$\pm0.015$}\\
Ours(MCC) -- {\small complete} & $\textbf{0.854}$ \scriptsize{$\pm 0.013$} & $\textbf{0.867}$\scriptsize{$\pm0.013$}\\
\bottomrule
\end{tabular}
\end{table}
We find that the unconditional versions of our methods, especially for
mutual information (``Unconditional MI'') and HSIC (``Unconditional HSIC''),
perform worse than almost all methods from the literature (see Setup~I in
Table~\ref{tab:results}). For the third method, we observe
that the change from the predictability criterion
to the maximum correlation coefficient
increases the accuracy by 1.0 and
1.8 percentage points for the correlation and partial correlation case,
respectively. In contrast, the change from correlation to partial correlation
increases the accuracy by 8.9 percentage points with the
predictability criterion and by 9.7 percentage points with the maximum
correlation coefficient. These observations indicate that the improvements
that we found in Section~\ref{sec:synthetic} can be
attributed to the difference between \eqref{eqn:ad_old} and
\eqref{eqn:ad_new} and not to implementation details.
\subsection{Real-world data}\label{sec:real}
\begin{table*}[th]
\caption{Experimental results on the cats and dogs dataset. All methods were trained
on a dataset in which p\% of all dogs are dark-furred dogs and $p$\% of all cats are light-furred.
The first column of the table indicates the fraction $p$. The following columns
contain the accuracies on an unbiased test set averaged over three runs.
We also report the standard error
\label{tab:real}
\centering
\begin{tabular}{cccccc}
\toprule
Fraction & Baseline& Adeli et al. \cite{adeli2019bias} &
Zhang et al. I \cite{zhang2018mitigating} & Zhang et al. II \cite{zhang2018mitigating} & Ours(HSIC) \\
\midrule
0\% &\textbf{0.627} \tiny{$\pm 0.004$}
& 0.597 \tiny{$\pm 0.004$}
& 0.590 \tiny{$\pm 0.002$}
& 0.617 \tiny{$\pm 0.001$}
& 0.615 \tiny{$\pm 0.005$}
\\
10\% & 0.800 \tiny{$\pm 0.001$}
& 0.774 \tiny{$\pm 0.002$}
& 0.779 \tiny{$\pm 0.005$}
& 0.785 \tiny{$\pm 0.007$}
& \textbf{0.801} \tiny{$\pm 0.001$}
\\
20\% & 0.845 \tiny{$\pm 0.003$}
& 0.829 \tiny{$\pm 0.000$}
& 0.812 \tiny{$\pm 0.002$}
& 0.809 \tiny{$\pm 0.005$}
& \textbf{0.855} \tiny{$\pm 0.004$}
\\
30\% & 0.852 \tiny{$\pm 0.007$}
& 0.842 \tiny{$\pm 0.003$}
& 0.837 \tiny{$\pm 0.004$}
& 0.834 \tiny{$\pm 0.003$}
& \textbf{0.863} \tiny{$\pm 0.002$}
\\
40\% & 0.859 \tiny{$\pm 0.007$}
& 0.855 \tiny{$\pm 0.004$}
& 0.870 \tiny{$\pm 0.002$}
& 0.850 \tiny{$\pm 0.001$}
& \textbf{0.875} \tiny{$\pm 0.003$}
\\
50\% & 0.859 \tiny{$\pm 0.006$}
& \textbf{0.866} \tiny{$\pm 0.003$}
& 0.856 \tiny{$\pm 0.001$}
& 0.853 \tiny{$\pm 0.001$}
& 0.860 \tiny{$\pm 0.002$}
\\
60\% & \textbf{0.866} \tiny{$\pm 0.006$}
& 0.837 \tiny{$\pm 0.001$}
& 0.850 \tiny{$\pm 0.003$}
& 0.860 \tiny{$\pm 0.004$}
& 0.856 \tiny{$\pm 0.005$}
\\
70\% & 0.844 \tiny{$\pm 0.003$}
& 0.854 \tiny{$\pm 0.003$}
& 0.835 \tiny{$\pm 0.005$}
& 0.841 \tiny{$\pm 0.005$}
& \textbf{0.859} \tiny{$\pm 0.000$}
\\
80\% & 0.829 \tiny{$\pm 0.002$}
& 0.822 \tiny{$\pm 0.005$}
& 0.820 \tiny{$\pm 0.005$}
& 0.826 \tiny{$\pm 0.003$}
& \textbf{0.836} \tiny{$\pm 0.002$}
\\
90\% & 0.773 \tiny{$\pm 0.010$}
& 0.743 \tiny{$\pm 0.001$}
& 0.758 \tiny{$\pm 0.001$}
& 0.731 \tiny{$\pm 0.002$}
& \textbf{0.791} \tiny{$\pm 0.004$}
\\
100\% & 0.612 \tiny{$\pm 0.001$}
& 0.612 \tiny{$\pm 0.004$}
& 0.604 \tiny{$\pm 0.001$}
& 0.609 \tiny{$\pm 0.001$}
& \textbf{0.616} \tiny{$\pm 0.002$}
\\
\bottomrule
\end{tabular}
\end{table*}
\begin{table}[th]
\caption{The results of the ablation study on the real data. Our conditional
HSIC and an unconditional HSIC methods were trained
on a dataset in which p\% of all dogs are dark-furred dogs and $p$\% of all cats are light-furred.
The first column of the table indicates the fraction $p$. The following columns
contain the accuracies on an unbiased test set averaged over three runs.
We also report the standard error}
\label{tab:real:abl}
\centering
\begin{tabular}{lccc}
\toprule
& Unconditional & & \\
Fraction & HSIC & HSIC (Ours) & Diff \\
\midrule
0\% & $0.611$\scriptsize{$\pm 0.003$} & 0.615\scriptsize{$\pm 0.005$} & 0.004 \\
10\% & $0.759$\scriptsize{$\pm 0.012$} & 0.801\scriptsize{$\pm 0.001$} & 0.042 \\
20\% & $0.816$\scriptsize{$\pm 0.002$} & 0.855\scriptsize{$\pm 0.004$} & 0.039 \\
30\% & $0.834$\scriptsize{$\pm 0.002$} & 0.863\scriptsize{$\pm 0.002$} & 0.029 \\
40\% & $0.861$\scriptsize{$\pm 0.003$} & 0.875\scriptsize{$\pm 0.003$} & 0.014 \\
50\% & $0.863$\scriptsize{$\pm 0.004$} & 0.860\scriptsize{$\pm 0.002$} & -0.003 \\
60\% & $0.844$\scriptsize{$\pm 0.001$} & 0.856\scriptsize{$\pm 0.005$} & 0.012 \\
70\% & $0.835$\scriptsize{$\pm 0.003$} & 0.859\scriptsize{$\pm 0.000$} & 0.024 \\
80\% & $0.820$\scriptsize{$\pm 0.007$} & 0.836\scriptsize{$\pm 0.002$} & 0.016 \\
90\% & $0.757$\scriptsize{$\pm 0.003$} & 0.791\scriptsize{$\pm 0.004$} & 0.034 \\
100\% & $0.606$\scriptsize{$\pm 0.002$} & 0.616\scriptsize{$\pm 0.002$} & 0.010 \\
\bottomrule
\end{tabular}
\end{table}
After we have demonstrated the effectiveness of our approach on a synthetic
dataset, we conduct a third experiment to investigate whether the
increase in accuracy can be observed in real-world image data as well. Even
though the described bias is present in many computer vision tasks, most datasets
are inadequate for our investigations. To evaluate the performance of our
debiasing method, we require an unbiased test set. However, most datasets
contain the same bias in their training and test sets since both sets are
collected in the same way. To mitigate this problem, we consider a
dataset, which has labels for multiple signals per image. This allows us to
introduce a bias in the training set but not in the test set. To this end, we
use the cats and dogs dataset that was used for the same
purpose in \cite{lakkaraju2016discovering}.
This dataset contains images of cats and dogs that are
additionally labeled as dark-furred or light-furred. We first remove 20\% of
each class/fur combination as an unbiased test set. Then, we
create eleven training sets with different levels of bias. We start with a
training set that contains only light-furred dogs and only dark-furred cats.
For each of the other sets, we increase the fraction of dark-furred dogs and
light-furred cats by ten percent. Therefore, the last dataset contains only
dark-furred dogs and light-furred cats. We equalize the size of all these
training sets to perform a fair evaluation.
Unfortunately, this limits the training set size to 80\% of the rarest
class/fur combination. Therefore, the training sets contain only $2{,}469$
images, which is $14.7\%$ of the original training set.
As a backbone network, we use a ResNet-18 \cite{he2016deep}. We train the
network for 150 epochs using the Adam optimizer \cite{kingma2014adam}. The
learning rate follows a cosine decay with warm restarts
\cite{loshchilov2016sgdr}. Additionally, we use random cropping during training and
center cropping during inference \cite{simonyan2014very} as well as a
progressive resizing scheme.
Whenever a method requires an additional neural
network, we use a network with
one hidden layer of 1024 neurons.
We apply a grid search to optimize hyperparameters for the baseline and
adapt the hyperparameters of Setup~I from Section~\ref{sec:synthetic} for
method-specific settings. We use the same implementations as in Section~\ref{sec:synthetic}
for the competing approaches and our implementation based on HSIC because it was
most robust against different hyperparameters among our methods.
The results reported in Table~\ref{tab:real} are averaged across three runs.
Since the labels $L$ and the bias variable $B$ are binary, the
two signals are indistinguishable for 0\% and 100\% dark-furred dogs, respectively.
Furthermore, we obtain an unbiased training set for 50\% dark-furred dogs.
Our method reaches the highest accuracy in seven out of the remaining eight biased
scenarios and the highest overall accuracy of 0.875 for 40\% dark-furred
dogs in the training set. For six out of these seven scenarios, the baseline was outside of our
method's 95\% confidence interval. We observe that the methods from the
literature only outperform the baseline in situations with little bias.
This result supports our finding that these methods are not suited for
the bias model described in Section~\ref{sec:bias}.
To further investigate the effectiveness of our method we compare the
conditional and unconditional HSIC in this setting as well. The results are
reported in Table~\ref{tab:real:abl}. They are averaged over three runs.
We find that the conditional HSIC outperforms the unconditional HSIC in all
biased scenarios. The stronger the bias, the bigger is the difference between
the two methods. The correlation between the bias, measured as the absolute
value between the difference of fractions of dark- and light-furred dogs,
and the difference in accuracy between the conditional and unconditional
HSIC method is $0.858$.
The test set accuracies
reported here are lower than, for example, reported in
\cite{kim2019learning}. This difference has two reasons. First, to guarantee
a fair evaluation, we fixed the size of the training set to be the same for every
bias level. This constraint reduces the number of images in the training set. Second, to solely focus on the bias in our training sets,
we refrain from pretraining on ImageNet \cite{deng2009imagenet} because this dataset already contains
several thousand images of dogs. Instead, we train our networks from scratch, which leads to a
more objective evaluation for the debiasing methods.
\section{Conclusion}\label{sec:conclusion}
In this work, we investigated a specific kind of bias described in
Section~\ref{sec:bias}. The exact model formulation allowed us to provide
theoretical evidence, including a mathematical proof to confirm our proposed
solution. With these findings, our work clearly differs from most related
work on adversarial debiasing, which solely relies on empirical evaluations.
Our experimental results also support our theoretical claims made in this
work. If a bias can be modeled as explained in Section~\ref{sec:bias}, a
conditional independence criterion is a better choice compared to an
unconditional independence criterion. This is the result of the theoretical
considerations in Section~\ref{sec:method} and confirmed by the
experiments in Section~\ref{sec:experiments}, where the difference between
the two criteria has been maximized. We further demonstrated that this
difference is the reason for the increase in accuracy and that this increase
is also observable for real-world data.
To estimate the effect in unbiased data or in situations where the bias
model does not apply, we used the unbiased situation (50\% in
Table~\ref{tab:real}) and the situations with only light- or dark-furred
dogs (0\% and 100\% in Table~\ref{tab:real}). In these experiment, our
method performs slightly worse but similar to the baseline.
\bibliographystyle{acm}
|
\section{Introduction.} \label{sec:introduction}
The main purpose of the present work is to provide an exact formula for the second moment of the empirical correlation of two independent Gaussian random walks, and to apply the method of proof to the question of how fast that correlation converges to that of two independent Wiener processes. We begin this introduction by briefly providing our study's mathematical context. We then divulge an outline of the mathematical derivation used in our paper for computing the second moment, which is novel and of independent interest. We also provide an outline of the strategy for our convergence result, which is motivated both by numerics presented herein, made possible by our explicit second moment formula, and by the tools developed to compute the second moment.
Let $\{X_{k}\}_{k=1}^{\infty}$ and $\{Y_{k}\}_{k=1}^{\infty}$ be two independent sequences of independent identically distributed random variables with mean $0$ and variance $1$. Define the corresponding partial sums by
\begin{equation}
S_n = \sum_{j=1}^{n} X_j \quad \text{and} \quad T_n = \sum_{j=1}^{n} Y_j. \label{eq:defforST}
\end{equation}
The empirical correlation of these two random walks is then defined in the usual way as
\begin{equation}
\theta_{n} := \frac{ \frac{1}{n} \sum_{i=1}^{n} S_i T_i - \frac{1}{n^2} (\sum_{i=1}^{n} S_i) (\sum_{i=1}^{n} T_i) }{ \sqrt{ \frac{1}{n} \sum_{i=1}^{n} S_i^2 - \frac{1}{n^2} (\sum_{i=1}^{n} S_i)^2 } \sqrt{ \frac{1}{n} \sum_{i=1}^{n} T_i^2 - \frac{1}{n^2} (\sum_{i=1}^{n} T_i)^2 }}. \label{eq:defforthetan}
\end{equation}
Despite Udny Yule's warning in \cite{yule1926we} that in the case of two independent
random walks, the observed correlation coefficient has a very different distribution
than that of the nominal $t$-distribution, it has been erroneously assumed that for large enough $n$, these empirical correlations should be small (see \cite{ernst2017yule} and references therein). \\
\indent In \cite{phillips1986understanding}, Phillips calculated an expression for the limit of these correlations (in the sense of weak convergence), which can be viewed as the empirical correlation of two independent Wiener processes. Henceforth, we shall denote $\theta$ to be the limit of the correlations $\theta_{n}$. In 2017, Ernst et al. \cite{ernst2017yule} investigated the distribution of the limit $\theta$ by explicitly calculating the standard deviation of the limit to be nearly $0.5$, providing the first formal proof that these correlations $\theta_{n}$ are not small even for arbitrarily large $n$. In 2019, Ernst et al. \cite{ernst2019distribution} succeeded in calculating the moments of $\theta$ up to order 16 and provided the first approximation to the the density of Yule’s ``nonsense correlation''.
In this paper, we explore a question that has not been addressed in the aforementioned references: what is the exact distribution of $\theta_{n}$? This question is of interest not least because discrete stochastic process data (for example, time series data) occur most frequently and extensively in the real world. A test statistic for discrete processes is thus easier for practitioners to apply than that for continuous stochastic processes. Studying the discrete-data test statistic directly is also a means of minimizing the risk of using the continuous statistic abusively when the discrete-data situation is not sufficiently well approximated by a continuous-data one.
However, the task of finding the exact distribution of $\theta_{n}$ for any $n$ and for \textit{any random walk} has proved elusive. Relevant work in this vein includes a series of papers by Andersen (\cite{andersen1953sums,andersen1954fluctuations,andersen1955fluctuations}) provided a combinatorial method based on the idea of cyclic permutations to investigate problems of discrete sequences of partial sums. However, Andersen's methods cannot be applied to evaluate the moments of $\theta_{n}$ since an event generated by $\theta_{n}$ is not invariant under cyclic permutations. The methods used in \cite{phillips1998new} to develop asymptotic theory for spurious regressions, namely, decomposing continuous stochastic process in terms of their orthonormal representations, cannot be employed to find the exact distribution of $\theta_n$ due to the lack of a continuous pattern in the partial sums $S_{k}$ and $T_{k}$.
We now mention a few works which have most directly inspired the present work. In \cite{erd1946certain}, Erd\"{o}s and Kac investigated the asymptotic distributions of four statistics of partial sums of independent identically distributed random variables each having mean $0$ and variance $1$. In \cite{magnus1986exact}, Magnus evaluated the moments of the ratio of a pair of quadratic forms in normal variables, i.e., $x'Ax / x'B x$, where $A$ is symmetric, $B$ positive semidefinite and $x$ is a Gaussian random vector. It is this work in particular which motivates the present work's focus on Gaussian random walks.
Henceforth, in addition to assuming that $\{X_{k}\}_{k=1}^{\infty}$ and $\{Y_{k}\}_{k=1}^{\infty}$ are two independent sequences of independent random variables, we shall also assume that these variables are standard Gaussian. This specific context will allow us to derive an explicit formula to calculate the second moment of the empirical correlation $\theta_{n}$ for any $n$.
Our proof of this formula is based on a symbolically tractable integro-differential representation formula for the moments of any order in a class of empirical correlations, established by \cite[Proposition 1]{ernst2019distribution} and investigated previously in \cite{ernst2017yule} (see Proposition \ref{propErnst2019} below). The key step in applying this formula is the explicit computation of the joint moment generating function (mgf) $\phi_n$ of the three empirical sums of products and squares which appear in the empirical correlation $\theta_{n}$. This is the topic of Section \ref{sec:jointmgf}. One may also use this representation formula to compute moments of $\theta_{n}$ of any order numerically, using symbolic algebra software. Indeed, we provide these moments up to order 16 for any $n$ via \textsf{Mathematica}. Thus the method for evaluating all moments relies on the joint mgf for the three bilinear and quadratic forms appearing in $\theta_{n}$ (\cite{ernst2019distribution,ernst2017yule}).
The main mathematical contribution in the present paper is the explicit computation of the joint trivariate mgf $\phi_n$ in Section \ref{sec:jointmgf}. To express the second moment of $\theta_{n}$ via the aforementioned representation, it is necessary to compute the partial derivative of $\phi_n$ with respect to its middle variable (the variable representing the empirical covariance). This latter calculation, in Section \ref{sec:momentforguassian}, is only straightforward because of the explicitness of our formula for $\phi_n$. The technical path followed in Section \ref{sec:jointmgf} to compute $\phi_n$ is to express in matrix form the bilinear form mapping the two i.i.d. data sequences $X$ and $Y$ up to the $n$th terms into the empirical covariance of their partial sums $S_n$ and $T_n$, and to compute the matrix's alternative characteristic polynomial $d_n$. We derive a fully explicit expression for $d_n$ in the Appendix, recursively for $n \ge 5$, by using standard operations to convert $d_n$ into a linear recursion involving a new determinant in tri-diagonal form except for one line along which to expand said new determinant. In doing so, we notice a slight break in the new determinant's recursive nature. When substituting a cell in the determinant's matrix which fixes this break, a second-order recursion emerges, which can be solved explicitly. Relating this back to the original $d_n$ reveals a simple explicit relation, and thus, an explicit formula for $d_n$.
From a probabilistic standpoint, the Gaussian property of $(X,Y)$ is what allows us to complete this calculation so explicitly. Specifically, we use the properties that the multivariate standard normal law is invariant under orthogonal transformations, and that the Laplace transform of a quadratic form of a bivariate normal vector is a function of a quadratic function. From an analytical standpoint, to compute $d_n$ explicitly, we drew inspiration from the limiting case of $S$ and $T$ distributed as Brownian motions, where Hilbert's approach to Fredholm theory gave us a strong motivation to believe that $d_n$ could be computed. Indeed, the limit of $d_n(\lambda )$ under the appropriate Brownian scaling is explicit, equal to $\sinh (i \sqrt{ \lambda})/(i \sqrt{ \lambda})$ which was a main ingredient in \cite{ernst2017yule}, and also equal, via Mercer's theorem, to $\prod_k (1-\lambda / (k \pi)^2)$ where one recognizes the eigenvalues identified in \cite{ernst2017yule}.
An ultimate contribution of this paper is the study of the rate of convergence of the empirical correlation $\theta_n$ of Gaussian random walks to the empirical correlation $\theta$ of Wiener processes in Wasserstein distance. Inspired by Hilbert's approach to Fredholm theory, we first construct a ratio $A_{n}/\sqrt{B_n C_n}$ identically distributed with $\theta_n$, where $A_n$, $B_n$ and $C_n$ are second-chaos variables up to constants. We also rewrite $\theta$ as $A/\sqrt{BC}$, where $A$, $B$ and $C$ are also second-chaos variables up to constants. A key element in the setup is to note that, not only can the empirical correlations be represented as ratios involving second-chaos variables, but they can be coupled on the same Wiener space $\Omega$ by using their kernel representations as double integrals with respect to the same pair of independent Wiener processes. Relying on techniques of Wiener chaos, the convergences in $L^2(\Omega)$ of $A_n$, $B_n$ and $C_n$ to $A$, $B$ and $C$ respectively at rate $n^{-2}$ are derived. We then note the Wasserstein distance between $\theta_n$ and $\theta$ is bounded by the $L^1(\Omega)$-norm of $A_{n}/\sqrt{B_n C_n}-A/\sqrt{BC}$, which is
bounded by a function of the second moments of $A_n -A$, $B_n -B$ and $C_n -C$ and the negative moments of $B_n$, $C_n$, $B$ and $C$. What is left is to give upper bounds for the negative moments. Our idea is to represent these negative moments as a single integral of the product of a positive power function and their moment generating functions (mgfs) and then give upper bounds for mgfs, hence, for negative moments. This idea only works when the mgfs are integrable at $0$ and decay rapidly when approximating to $\infty$. Fortunately, these mgfs follow immediately from the joint mgfs $\phi_n$ and $\phi$ and satisfy the above properties.
It is worth mentioning that the mgf of $B_n$ or $C_n$ is $1$ over the square root of $d_{n}(-2s/n)$, which is a polynomial with strictly positive coefficients. Furthermore, the coefficients of $d_{n}(-2s/n)$ are eigenvalues of the positive definite matrix $K_n$ (as defined in Section \ref{sec:notations}) after appropriate scaling. We anticipate that these eigenvalues converge to those of the positive definite operator $T_{M}$ defined in \cite{ernst2017yule}.
This insight motivates us to establish the existence of a lower bound for $d_{n}(-2s/n)$ for $s\geq 0$ which is uniform for large enough $n$, hence, a uniform upper bound for $E[B_{n}^{-1}]$ and $E[C_{n}^{-1}]$. All of these details are presented in Section \ref{sec:convergenceinWasserstein}. We also conjecture that the entire eigenstructure of $K_n$ converges in some sense to that of $T_M$, though this additional insight is not needed to motivate the uniform lower bound on the negative moments.
The remainder of the paper is organized as follows. In Section \ref{sec:notations}, we introduce necessary notation. In Section \ref{sec:jointmgf}, Theorem \ref{thm1} provides the joint moment generating function needed for obtaining the distribution of $\theta_{n}$ for all $n$. In Section \ref{sec:momentforguassian}, Theorem \ref{thm2} provides an explicit formula for the second moment of $\theta_n$ for any $n$. Numerics for all moments of $\theta_n$ for all $n$ are also given in Section ref{sec:momentforguassian}. The latter motivates our investigation in Section \ref{sec:convergenceinWasserstein} of the rate of convergence of $\theta_n$ to $\theta$. We conclude with Section \ref{sec6}, which provides opportunities for future work which should be tractable given some known tools and techniques in the analysis on Wiener chaos, and could have potential applications to statistical testing based on paths of time series.
\section{Notation.} \label{sec:notations}
We use $I_{n}$ to denote the $n\times n$ identity matrix. For $n \geq 2$ an integer, we define the $(n-1)\times (n-1)$ symmetric matrix $K_{n}$ by
\begin{equation*}
K_{n} = \left\{ \min(j,k)/n - jk/n^2 \right\}_{j,k=1}^{n-1},
\end{equation*}
and its ``alternative characteristic polynomial" $d_{n}(\lambda)$ by
\begin{equation*}
d_{n}(\lambda) = \det(I_{n-1} - \lambda K_n).
\end{equation*}
We explained in the introduction that the matrix $K_n$ is identified as the discrete-time version of the operator $T_M$ which was identified as a key to the calculations in \cite{ernst2017yule}. In that paper, it was shown that the numerator of the continuous-time Yule's ``nonsense correlation'' $\theta$ (see the definition of $\theta$ in \eqref{theta} in Section \ref{sec:convergenceinWasserstein}) can be written as a member of the second Wiener chaos in its double-Wiener-integral representation, where the bivariate kernel $M$ in that integral is none other than $M(s,t)=\min (s,t)-st$. The expression above for $K_n$ thus comes as no surprise, as the discrete version of $M$. However, as we will see in the next section, $K_n$ also arises naturally when one attempts to express the numerator of $\theta_n$ using the increments $X,Y$ of the random walks $S,T$. That natural phenomenon is exactly the discrete-time analogue of what occurs when identifying the numerator of $\theta$ as a double Wiener integral.
Denoting the eigenvalues of $K_{n}$ generically by $\lambda_2, \cdots, \lambda_n$ (where the numbering starting at 2 is used as a matter of convenience, whose utility will become apparent in the next section), then the alternative characteristic polynomial can be written as
\begin{equation}
d_{n}(\lambda) =\prod_{j=2}^{n} (1- \lambda_j \lambda). \label{eq:anotherformofacp}
\end{equation}
We also define two $ (n-1) \times 1$ column random vectors $\mathbf{X}_{n}$ and $\mathbf{Y}_{n}$ by
\begin{equation*}
\mathbf{X}_{n} := \left( X_2, X_3, \cdots, X_n \right)^{\intercal} \quad \text{and} \quad
\mathbf{Y}_{n} := \left( Y_2, Y_3, \cdots, Y_n \right)^{\intercal},
\end{equation*}
where $\{X_{k}\}_{k=1}^{\infty}$ and $\{Y_{k}\}_{k=1}^{\infty}$ are the two independent sequences of independent standard Gaussian random variables used to define the Gaussian random walks $S$ and $T$.
Let
\begin{eqnarray}
&& Z_{11}^n := \frac{1}{n} \sum_{i=1}^{n} S_i^2 - \frac{1}{n^2} \left(\sum_{i=1}^{n} S_i\right)^2, \label{eq:defz11} \\
&& Z_{22}^n := \frac{1}{n} \sum_{i=1}^{n} T_i^2 - \frac{1}{n^2} \left(\sum_{i=1}^{n} T_i\right)^2, \label{eq:defz22} \\
&& Z_{12}^n := \frac{1}{n} \sum_{i=1}^{n} S_i T_i - \frac{1}{n^2} \left(\sum_{i=1}^{n} S_i\right) \left(\sum_{i=1}^{n} T_i\right), \label{eq:defz12}
\end{eqnarray}
where $S_{i}$ and $T_{i}$ are defined in \eqref{eq:defforST}. Together with \eqref{eq:defforthetan}, we can check easily that
$$\theta_n = \frac{Z_{12}^n}{\sqrt{Z_{11}^n Z_{22}^n}}.$$ Finally, let us define the joint moment generating function (joint mgf) of the random vector $\left( Z^n_{11}, Z^n_{12}, Z^n_{22} \right)$ by
\begin{equation*}
\phi_{n}(s_{11}, s_{12}, s_{22}) := E \left[ \exp \left\{ -\frac{1}{2} \left( s_{11} Z_{11}^{n} + 2 s_{12} Z_{12}^{n} + s_{22} Z_{22}^{n} \right) \right\} \right],
\end{equation*}
where $s_{11}, s_{12} $ and $s_{22}$ are such that $s_{11}, s_{22} \geq 0$ and $s_{12}^2 \leq s_{11} s_{22}$.
These inequalities ensure that $\phi_{n}(s_{11}, s_{12}, s_{22})$ is well-defined, as we shall see in Section \ref{sec:jointmgf}. The reader may also check, as a heuristic, that if the possibly ex-centered second-chaos variables $Z_{i,i}^n$ are thought of as independent squares of standard normals, and $Z_{1,2}^n$ is the product of the normals, then condition $s_{12}^2 \leq s_{11} s_{22}$ is necessary.
\section{Calculating the joint moment generating function.} \label{sec:jointmgf}
In this section, we provide an expression for the joint moment generating function $\phi_{n}(s_{11}, s_{12}, s_{22})$. This is the key piece in enabling us to compute the moments of $\theta_{n}$ for all $n$. In the continuous-time setting of \cite{ernst2017yule}, being able to compute this mgf was also a key element, which relied on the fact that the kernel $M(s,t)=\min (s,t)-st$ of the operator $T_M$ was immediately identified as the covariance of the pinned Brownian motion (a.k.a Brownian bridge) on $[0,1]$, for which the eigenvalues happen to be known. In the discrete case herein, there is no such analogous shortcut.
First, by definition,
\begin{eqnarray}
&& \sum_{i=1}^{n} S_{i} T_{i} = \sum_{i=1}^{n} \left( \sum_{j=1}^{i} X_j \right) \left( \sum_{k=1}^{i} Y_k \right) \notag \\
&=& \sum_{j,k=1}^{n}\, \sum^{n}_{i=\max(j,k)} X_j Y_k = \sum_{j,k=1}^{n} (n- \max(j,k) +1) X_j Y_k. \label{eq:sumST}
\end{eqnarray}
Further,
\begin{equation*}
\sum_{i=1}^{n} S_i = \sum_{i=1}^{n} \sum_{j=1}^{i} X_j = \sum_{j=1}^{n} \sum_{i=j}^{n} X_j
= \sum_{j=1}^{n} (n-j+1) X_j.
\end{equation*}
Similarly,
\begin{equation*}
\sum_{i=1}^{n} T_i = \sum_{k=1}^{n} (n-k+1) Y_k.
\end{equation*}
Hence,
\begin{equation*}
\left(\sum_{i=1}^{n} S_i\right)\left( \sum_{i=1}^{n} T_i\right)
= \sum_{j,k=1}^{n} (n-j+1)(n-k+1) X_j Y_k.
\end{equation*}
Together with \eqref{eq:defz12} and \eqref{eq:sumST}, we have
\begin{eqnarray}
Z^{n}_{12} &=& \sum_{j,k=1}^{n} \left( \frac{1}{n} \, \Big(n-\max(j,k) +1\Big) - \frac{1}{n^2}\,(n-j+1)(n-k+1) \right) X_j Y_k \notag \\
&=& \sum_{j,k=1}^{n} \left( \frac{1}{n} \, \Big(\min(j,k) -1\Big) - \frac{1}{n^2} \,(j-1)(k-1) \right) X_j Y_k \label{eq:quadraticformcoefficients} \\
&=& \sum_{j,k=2}^{n} \left( \frac{1}{n} \, \Big(\min(j,k) -1\Big) - \frac{1}{n^2} \,(j-1)(k-1) \right) X_j Y_k \notag \\
&=& \sum_{j,k=1}^{n-1} \left( \frac{1}{n} \,\min(j,k) - \frac{1}{n^2} \,jk \right) X_{j+1} Y_{k+1} \notag \\
&=& \mathbf{X}_{n}^{\intercal} K_{n} \mathbf{Y}_{n}, \notag
\end{eqnarray}
where the third equality holds because $\left(\min(j,k) -1\right)/n - (j-1)(k-1)/n^{2}$ equals to $0$ if either one of the indices $j,k$ is $1$ and the fourth equality holds by making the change of variables $j:=j-1$ and $k := k-1$. As announced in the previous section, we recognize $K_n(j,k)$ defined there and identified here in the last displayed line above, as the discrete version of $M(s,t)=\min(s,t)-st$. Similarly to the expression for $Z_{12}^n$, we have
\begin{equation*}
Z^{n}_{11} = \mathbf{X}_{n}^{\intercal} K_{n} \mathbf{X}_{n}
\quad \text{and} \quad
Z^{n}_{22} = \mathbf{Y}_{n}^{\intercal} K_{n} \mathbf{Y}_{n}.
\end{equation*}
We now note that since $K_{n}$ is a $(n-1) \times (n-1)$ symmetric matrix, there exits a $(n-1) \times (n-1)$ orthogonal matrix $P_n$ such that
\begin{equation*}
K_{n} = P_{n}^{\intercal} \mathrm{diag} (\lambda_2, \lambda_3, \cdots, \lambda_{n}) P_{n},
\end{equation*}
where $\lambda_2, \lambda_3, \cdots, \lambda_{n}$ are eigenvalues of $K_n$ and $\mathrm{diag} (\lambda_2, \lambda_3, \cdots, \lambda_{n})$ is a diagonal matrix whose entry in the $j$-th row and the $j$-th column is $\lambda_{j+1}$. Let
\begin{eqnarray*}
&&\mathbf{\widetilde{X}}_{n} = \left( \widetilde{X}_2, \widetilde{X}_3, \cdots, \widetilde{X}_n \right)^{\intercal}
:= P_{n} \mathbf{X}_{n}, \\
&&\mathbf{\widetilde{Y}}_{n} = \left( \widetilde{Y}_2, \widetilde{Y}_3, \cdots, \widetilde{Y}_n \right)^{\intercal}
:= P_{n} \mathbf{Y}_{n},
\end{eqnarray*}
be two $(n-1)\times 1$ column random vectors. Since $\mathbf{X}_{n}$ and $\mathbf{Y}_{n}$ are two independent Gaussian random vectors with distribution $\mathcal{N}\left( \mathbf{0}, I_{n-1} \right)$ and because $P_n$ is an orthogonal matrix, then $\mathbf{\widetilde{X}}_{n}$ and $\mathbf{\widetilde{Y}}_{n}$ are also two independent Gaussian random vectors with distribution $\mathcal{N}\left( \mathbf{0}, I_{n-1} \right)$. This implies that $\widetilde{X}_2, \widetilde{X}_3, \cdots, \widetilde{X}_n$, $\widetilde{Y}_2, \widetilde{Y}_3, \cdots, \widetilde{Y}_n$ are independent standard Gaussian random variables.
Before presenting our formula for the trivariate mgf $\phi_n$ in Theorem \ref{thm1} below, we reveal an explicit calculation of the alternative characteristic polynomial $d_{n}(\lambda)$. The proof is relegated to the Appendix.
\begin{lemma}\label{lem1}
The alternative characteristic polynomial $d_{n}(\lambda)$ may be written as
\begin{eqnarray}
d_{n}(\lambda)
&=& \frac{1}{n \sqrt{\left(\frac{\lambda}{n}-2\right)^2 -4}}\left( - \dfrac{\left(\frac{\lambda}{n} -2\right) - \sqrt{\left(\frac{\lambda}{n}-2\right)^2 - 4}}{2} \right)^{n} \notag \\
&& -\frac{1}{n \sqrt{\left(\frac{\lambda}{n}-2\right)^2 -4}}
\left( - \frac{\left(\frac{\lambda}{n} -2\right) + \sqrt{\left(\frac{\lambda}{n}-2\right)^2 - 4}}{2} \right)^{n} \notag \\ [1mm]
&=& \frac{(-1)^{n-1}}{n \cdot 2^{n-1} } \, \sum_{k=1}^{\lceil n/2 \rceil} {n \choose 2k-1} \, \left(\frac{\lambda}{n}-2\right)^{n-(2k-1)} \, \left( \left(\frac{\lambda}{n}-2\right)^2 -4 \right)^{k-1}, \label{eq:representationfordinmaindocument}
\end{eqnarray}
where $\lceil x \rceil$ is the least integer greater than or equal to $x$.
\end{lemma}
\begin{proof}
See Appendix.
\end{proof}
With above in hand, we now calculate the joint mgf $\phi_{n}$.
\begin{theorem}\label{thm1}
The joint moment generating function $\phi_n$ for the triple $(Z_{11}^n,Z_{12}^n,Z_{22}^n)$ of random variables defined in \eqref{eq:defz11}, \eqref{eq:defz12}, \eqref{eq:defz22} is given for $s_{11}, s_{22} \geq 0$ and $s_{12}^2 \leq s_{11} s_{22}$, by
\begin{equation*}
\phi_{n}(s_{11}, s_{12}, s_{22})= \left( d_{n}(\alpha) \, d_{n}(\beta) \right)^{-1/2}
\end{equation*}
where $\alpha$ and $\beta$ are defined as follows:
\begin{eqnarray}
&&\alpha := \alpha\left(s_{11}, s_{12}, s_{22}\right) = -\frac{s_{11}+s_{22} + \sqrt{(s_{11}-s_{22})^2 + 4 s_{12}^{2}}}{2} , \label{eq:alpha} \\ [1mm]
&&\beta := \beta\left(s_{11}, s_{12}, s_{22}\right) = -\frac{s_{11}+s_{22} - \sqrt{(s_{11}-s_{22})^2 + 4 s_{12}^{2}}}{2}, \label{eq:beta}
\end{eqnarray}
\end{theorem}
\begin{proof}
We first calculate
\begin{eqnarray*}
&&s_{11} Z^{n}_{11} + 2 s_{12} Z^{n}_{12} + s_{22} Z^{n}_{22} \\ [1mm]
&=& s_{11} \mathbf{X}_{n}^{\intercal} K_{n} \mathbf{X}_{n} + 2 s_{12} \mathbf{X}_{n}^{\intercal} K_{n} \mathbf{Y}_{n} + s_{22} \mathbf{Y}_{n}^{\intercal} K_{n} \mathbf{Y}_{n} \\ [1mm]
&=& s_{11}\, \mathbf{\widetilde{X}}_{n}^{\intercal}\, \mathrm{diag} (\lambda_2, \lambda_3, \cdots, \lambda_{n}) \, \mathbf{\widetilde{X}}_{n}
+ 2s_{12}\, \mathbf{\widetilde{X}}_{n}^{\intercal}\, \mathrm{diag} (\lambda_2, \lambda_3, \cdots, \lambda_{n}) \, \mathbf{\widetilde{Y}}_{n} \\ [1mm]
&& + s_{22}\, \mathbf{\widetilde{Y}}_{n}^{\intercal}\, \mathrm{diag} (\lambda_2, \lambda_3, \cdots, \lambda_{n}) \, \mathbf{\widetilde{Y}}_{n} \\
&=& s_{11} \,\sum_{j=2}^{n} \lambda_{j} \widetilde{X}_{j}^{2} + 2s_{12} \,\sum_{j=2}^{n} \lambda_{j} \widetilde{X}_{j} \widetilde{Y}_{j} + s_{22} \,\sum_{j=2}^{n} \lambda_{j} \widetilde{Y}_{j}^{2} \\
&=& \sum_{j=2}^{n} \lambda_{j} \left( s_{11} \widetilde{X}_{j}^{2} + 2 s_{12} \widetilde{X}_{j} \widetilde{Y}_{j} + s_{22} \widetilde{Y}_{j}^{2} \right).
\end{eqnarray*}
By independence of $\widetilde{X}_{j}$ and $\widetilde{Y}_{k}$ for $j,k \in \{2,3,\cdots,n\}$,
\begin{eqnarray}
\phi_{n}(s_{11}, s_{12}, s_{22}) &=& E \left[ \exp \left\{ -\frac{1}{2} \left( s_{11} Z_{11}^{n} + 2 s_{12} Z_{12}^{n} + s_{22} Z_{22}^{n} \right) \right\} \right] \notag \\
&=& \prod_{j=2}^{n} E \left[ \exp\left\{ -\frac{1}{2} \lambda_{j} \left( s_{11} \widetilde{X}_{j}^{2} + 2 s_{12} \widetilde{X}_{j} \widetilde{Y}_{j} + s_{22} \widetilde{Y}_{j}^{2} \right) \right\} \right] \notag \\
&=& \prod_{j=2}^{n} \left( 1 + (s_{11} + s_{22}) \lambda_{j} + (s_{11}s_{22} - s_{12}^{2}) \lambda_{j}^{2} \right)^{-1/2} \label{eq:laplaceofquadraticform} \\
&=& \prod_{j=2}^{n} \left( (1- \alpha \lambda_j) (1- \beta \lambda_j) \right)^{-1/2} \notag \\
&=& \left( \prod_{j=2}^{n} (1-\alpha \lambda_j) \, \prod_{j=2}^{n} (1-\beta \lambda_j) \right)^{-1/2} \notag \\
&=& \left( d_{n}(\alpha) \, d_{n}(\beta) \right)^{-1/2}, \label{eq:phibyd}
\end{eqnarray}
where $\alpha$ and $\beta$ are defined in the statement of the theorem. Note that in line \eqref{eq:laplaceofquadraticform} a standard expression for the mgf of a linear-quadratic functional of a normal variable has been used (iteratively twice), and, further, the independence of $\widetilde{X}_j$ and $\widetilde{Y}_j$ has been employed. Note that in line \eqref{eq:laplaceofquadraticform} the conditions $s_{11}, s_{22} \geq 0$ and $s_{12}^{2} \leq s_{11} s_{22}$ ensure the applicability of the standard expression for the mgf of a linear-quadratic functional of a bivariate random vector. The last equality holds by the representation of the alternative characteristic polynomial of $K_{n}$ by the eigenvalues of $K_n$, see \eqref{eq:anotherformofacp}. Combining \eqref{eq:representationfordinmaindocument}, \eqref{eq:alpha}, and \eqref{eq:beta} allows us to represent the joint mgf $\phi_{n}(s_{11}, s_{12}, s_{22})$ explicitly in terms of $d_{n}(\lambda)$, $\alpha(s_{11}, s_{12}, s_{22})$ and $\beta(s_{11}, s_{12}, s_{22})$, as is given by \eqref{eq:phibyd}, and as announced in Theorem \ref{thm1}.
\end{proof}
\section{Moments of $\theta_{n}$.} \label{sec:momentforguassian}
In the previous section, we gave an exact representation for the joint trivariate mgf $\phi_{n}$. In this section, we use it to calculate the moments of $\theta_{n}$ by a method provided by Ernst et al. (see Proposition 1 in \cite{ernst2019distribution}), which we cite as follows:
\begin{proposition}[Ernst et al. (2019)] \label{propErnst2019}
For $m = 0,1,2,\cdots$, we have
\begin{equation}
E \left( \theta_{n}^{m} \right) = \frac{(-1)^{m}}{2^{m} \Gamma(m/2)^{2} }
\int_{0}^{\infty} \int_{0}^{\infty} s_{11}^{m/2-1} s_{22}^{m/2-1}\, \frac{\partial^{m}\phi_{n}}{\partial s_{12}^{m}}(s_{11}, 0 , s_{22})\, ds_{11} ds_{22}. \label{eq:allmoments}
\end{equation}
\end{proposition}
\bigskip
An immediate application of this proposition yields that the second moment of $\theta_{n}$ is given by the following double Riemann integral:
\begin{equation}
E \left( \theta_{n}^{2} \right) = \frac{1}{4} \int_{0}^{\infty} \int_{0}^{\infty} \frac{\partial^2 \phi_{n}}{\partial s_{12}^{2}}(s_{11}, 0, s_{22}) \, ds_{11} ds_{22}. \label{eq:thetasecondmoment}
\end{equation}
\subsection{Explicit formula for the second moments of $\theta_{n}$.}
We now calculate the integrand in the previous integral representation explicitly, yielding the next theorem, which is a closed-form expression for the second moment of $\theta_n$ for any $n$.
\begin{theorem}\label{thm2}
The second moment of $\theta_n$ is
\begin{eqnarray}
&&E \left( \theta_{n}^{2} \right) \notag \\
&=& - \frac{1}{4} \int_{0}^{\infty} \int_{0}^{\infty} \frac{(s_{11}+2n)(s_{22} + 2n) + 4 n^2}{\left[ s_{11} s_{22} (s_{11}+4n) (s_{22}+4n) \right]^{3/4}} \left[ f(s_{11}/n)^{n} - f(s_{11}/n)^{-n} \right]^{-1/2} \notag \\
&& \quad \quad \quad \times \left[ f(s_{22}/n)^{n} - f(s_{22}/n)^{-n} \right]^{-1/2}\, ds_{11} ds_{22} \notag \\ [1mm]
&& + \frac{1}{4} \int_{0}^{\infty} \int_{0}^{\infty} \, \Bigg\{ \frac{n(s_{11} + s_{22} + 4n) }{\sqrt{s_{11}^{2} + 4n s_{11}} + \sqrt{s_{22}^{2} + 4ns_{22}}} \cdot \big[ f(s_{11}/n)^{n} f(s_{22}/n)^{n} \notag \\
&& \quad \quad - f(s_{11}/n)^{-n} f(s_{22}/n)^{-n} \big]
+ \frac{1}{2} \bigg( \sqrt{s_{11}^{2} + 4n s_{11}} + \sqrt{s_{22}^{2} + 4ns_{22}} + s_{11} + s_{22} +4n \bigg) \notag \\
&& \quad \quad\cdot \frac{ f(s_{11}/n)^{n} f(s_{22}/n)^{-n} - f(s_{22}/n)^{n} f(s_{11}/n)^{-n} }{f(s_{11}/n)- f(s_{22}/n)} \Bigg\} \cdot \left[ f(s_{11}/n)^{n} - f(s_{11}/n)^{-n} \right]^{-3/2} \notag \\
&& \quad \quad \cdot \left[ f(s_{22}/n)^{n} - f(s_{22}/n)^{-n} \right]^{-3/2} \cdot \left[ s_{11} s_{22} (s_{11} +4n)(s_{22}+4n) \right]^{-1/4} \, ds_{11} ds_{22}, \label{eq:exactsecondmomentoftheta}
\end{eqnarray}
where
\begin{equation}\label{eqf}
f(\lambda) := \frac{(\lambda+2) + \sqrt{(\lambda+2)^2 -4} }{2}.
\end{equation}
\end{theorem}
\begin{proof}
It is sufficient to provide the announced closed form expression for $\frac{\partial^2 \phi_{n}}{\partial s_{12}^{2}}(s_{11}, 0, s_{22})$. Recalling the definition of $f(\lambda)$ in \eqref{eqf}, a direct calculation yields
\begin{equation}
d_{n}(-\lambda) = \frac{1}{n \sqrt{(\lambda/n +2)^2 -4}} \left[ f(\lambda/n)^{n} - f(\lambda/n)^{-n} \right], \label{eq:dbyf}
\end{equation}
\begin{eqnarray}
d_{n}'(-\lambda) &=& \frac{1}{n^2} \, \frac{\lambda/n +2}{\left[(\lambda/n+2)^2 -4\right]^{3/2} } \left[ f(\lambda/n)^{n} - f(\lambda/n)^{-n} \right] \notag \\
&& - \frac{1}{n} \, \frac{1}{(\lambda/n+2)^2 -4} \left[ f(\lambda/n)^{n} + f(\lambda/n)^{-n} \right], \label{eq:dprimebyf}
\end{eqnarray}
and
\begin{eqnarray}
\frac{\partial^2 \phi_{n}}{\partial s_{12}^2} &=&
\frac{3}{4} \big( d_{n}(\alpha) d_{n}(\beta) \big)^{-5/2} \, \left(d_{n}'(\alpha) \, d_{n}(\beta) \, \frac{\partial \alpha}{\partial s_{12}} + d_{n}(\alpha) \, d_{n}'(\beta) \, \frac{\partial \beta}{\partial s_{12}} \right)^{2} \notag \\
&& - \frac{1}{2} \big( d_{n}(\alpha) d_{n}(\beta) \big)^{-3/2} \,
\sum_{j=0}^{2} {2 \choose j} \, d_{n}^{(j)}(\alpha) \, d_{n}^{(2-j)}(\beta) \left(\frac{\partial \alpha}{\partial s_{12}}\right)^{j} \left(\frac{\partial \beta}{\partial s_{12}}\right)^{2-j} \notag \\
&& - \frac{1}{2} \big( d_{n}(\alpha) d_{n}(\beta) \big)^{-3/2} \,
\left(d_{n}'(\alpha) \, d_{n}(\beta) \, \frac{\partial^2 \alpha}{\partial s_{12}^{2}} + d_{n}(\alpha) \, d_{n}'(\beta) \, \frac{\partial^2 \beta}{\partial s_{12}^{2}} \right), \label{eq:phisecondderivative}
\end{eqnarray}
where $\alpha$ and $\beta$ are defined in \eqref{eq:alpha} and \eqref{eq:beta}. Note that
\begin{eqnarray*}
&& - \frac{\partial \alpha}{\partial s_{12}} = \frac{\partial \beta}{\partial s_{12}} = \frac{2 s_{12}}{\sqrt{(s_{11}-s_{22})^2 + 4 s_{12}^2}} \\
&& - \frac{\partial^2 \alpha}{\partial s_{12}^{2}} = \frac{\partial^2 \beta}{\partial s_{12}^{2}}
= \frac{2(s_{11}-s_{22})^2}{\left[ (s_{11}-s_{22})^2 + 4s_{12}^{2} \right]^{3/2}}.
\end{eqnarray*}
It follows easily that $\alpha(s_{11}, 0 , s_{22}) = - \max(s_{11}, s_{22})$, $\beta(s_{11}, 0 , s_{22}) = - \min(s_{11}, s_{22})$, and
\begin{eqnarray*}
&& - \frac{\partial \alpha}{\partial s_{12}} (s_{11}, 0 , s_{22}) = \frac{\partial \beta}{\partial s_{12}} (s_{11}, 0 , s_{22}) =0 \\
&& - \frac{\partial^2 \alpha}{\partial s_{12}^{2}} (s_{11}, 0 , s_{22}) = \frac{\partial^2 \beta}{\partial s_{12}^{2}} (s_{11}, 0 , s_{22}) = 2 |s_{11} - s_{22}|^{-1}.
\end{eqnarray*}
Plugging the above results into \eqref{eq:phisecondderivative} yields
\begin{eqnarray}
\frac{\partial^2 \phi_{n}}{\partial s_{12}^2}(s_{11}, 0, s_{22})
= \frac{ \frac{d_{n}'(-\max(s_{11}, s_{22}))}{ d_{n} (-\max(s_{11}, s_{22}))} - \frac{d_{n}'(-\min(s_{11}, s_{22}))}{ d_{n} (-\min(s_{11}, s_{22}))}}{\left[ d_{n}(-\max(s_{11}, s_{22})) d_{n}(-\min(s_{11}, s_{22})) \right]^{1/2} |s_{11}-s_{22}|}. \label{eq:phi2plugvalue}
\end{eqnarray}
Combining \eqref{eq:thetasecondmoment}, \eqref{eq:dbyf}, \eqref{eq:dprimebyf} and \eqref{eq:phi2plugvalue} and performing straightforward calculations, we arrive at an explicit formula for $\frac{\partial^2 \phi_{n}}{\partial s_{12}^{2}}(s_{11}, 0, s_{22})$ and the announced double integral expression for the second moment of $\theta_n$ for all $n$.
\end{proof}
\subsection{Numerics.}
We now turn to numerics. \textsf{Mathematica} allows us to calculate the second moment of Yule's ``nonsense correlation'' $\theta_{n}$ for any given $n$. The numerical results are summarized in Table \ref{tab:Yulenumerical}.
\begin{table}[H]
\centering
\begin{tabular}{ccccccc}
\toprule[1.5pt]
$n$ & 2 & 5 & 10 & 20 & 50 & 100 \\
$E \left(\theta_{n}^{2} \right)$ & 1.000000 & 0.341109 & 0.265140 & 0.246645 & 0.241501 & 0.240767 \\
\hline
$n$ & 200 & 500 & 1000 & 2000 & 5000 & $\infty$ \\
$E \left(\theta_{n}^{2} \right)$ & 0.240584 & 0.240532 & 0.240525 & 0.240523 & 0.240523 & 0.240523 \\
\bottomrule[1.5pt]
\end{tabular}
\caption{Numerical Results of the second moment of $\theta_n$ for various values of $n$}
\label{tab:Yulenumerical}
\end{table}
For higher-order moments as represented in \eqref{eq:allmoments}, we can use \textsf{Mathematica} to perform symbolic high-order differentiation and then the two dimensional integration, thereby implicitly calculating higher moments of $\theta_n$ for all $n$. The numerical results of some higher-order moments of $\theta_{50}$ are summarized in Table \ref{tab:Yulenumericalhighmomentfor50}.
\begin{table}[H]
\centering
\begin{tabular}{ccccc}
\toprule[1.5pt]
$k$ & 2 & 4 & 6 & 8 \\
$E \left(\theta_{50}^{k} \right)$ & 0.241501 & 0.109961 & 0.061465 & 0.038257 \\
\hline
$k$ & 10 & 12 & 14 & 16 \\
$E \left(\theta_{50}^{k} \right)$ & 0.025485 & 0.017803 & 0.012885 & 0.009586 \\
\bottomrule[1.5pt]
\end{tabular}
\caption{Numerical Results of higher-order moments of $\theta_{50}$}
\label{tab:Yulenumericalhighmomentfor50}
\end{table}
\section{Convergence in Wasserstein distance.} \label{sec:convergenceinWasserstein}
Table \ref{tab:Yulenumerical} and Table \ref{tab:Yulenumericalhighmomentfor50} in the last section give us insight into the behavior of the distribution of $\theta_n$ for large $n$, as it approximates the distribution of its limit $\theta$ defined below in \eqref{theta}. In Table \ref{tab:Yulenumerical}, we note the rather rapid convergence of $E \left(\theta_{n}^{2} \right)$ as $n \to \infty$. We observe that this convergence occurs at a rate which appears to be faster than $n^{-1}$. This fact motivates us to investigate the rate of convergence of $\theta_n$ to $\theta$. In this section, we give an upper bound for the Wasserstein distance between $\theta_n$ and $\theta$, which comes from a coupling of $\theta_n$ and $\theta$ on the same probability space $\Omega$, in which the convergence occurs in $L^1(\Omega)$.
Let $W_1$ and $W_2$ be two independent Wiener processes. Then Yule's ``nonsense correlation'' (see \cite{ernst2017yule}) is given by
\begin{equation}
\label{theta}
\theta = \frac{\int_{0}^{1} W_{1}(t)W_{2}(t) dt - \int_{0}^{1} W_{1}(t) dt \int_{0}^{1} W_{2}(t) dt }{\sqrt{\int_{0}^{1} W_{1}^{2}(t) dt - \left(\int_{0}^{1} W_{1}(t) dt \right)^{2} } \sqrt{\int_{0}^{1} W_{2}^{2}(t) dt - \left(\int_{0}^{1} W_{2}(t) dt \right)^{2} } }.
\end{equation}
If $X,Y$ are two real-valued random variables, recall that the Wasserstein distance between the law of $X$ and the law of $Y$ is given by
\begin{equation*}
d_{W} (X,Y) := \sup_{f \in \mathrm{Lip}(1)} |Ef(X) - Ef(Y)|,
\end{equation*}
where $\mathrm{Lip}(1)$ is the set of all Lipschitz functions with Lipschitz constant $\leq 1$. Our key result (Theorem \ref{thm:boundwassertain}) regarding the convergence of $\theta_n$ to $\theta$ is as follows:
\begin{equation}
d_{W}(\theta_n, \theta) = \mathcal{O}\left(\frac{1}{n}\right).
\end{equation}
We prove this by showing that $E\left[ \left|\theta_n - \theta \right| \right] = \mathcal{O}\left(\frac{1}{n}\right)$ under a natural coupling of $\theta_n$ and $\theta$.
The reader will find some heuristic comments regarding how this result arises, and what more could be expected for other processes, at the end of the next, short, subsection which provides the preparatory setup needed to prove Theorem \ref{thm:boundwassertain}.
\subsection{Notation, coupling, extensions and implications}\label{sec:coupling}
Define $M(s,t) := \min(s,t) - st$. For every $n \in \mathds{N}_{+}$, define
\begin{equation}\label{emenn}
M_{n}(s,t) := \sum_{1\leq j,k \leq n} M\left(\frac{j-1}{n}, \frac{k-1}{n}\right) \mathds{1}_{\{(j-1)/n < s \leq j/n\}}
\mathds{1}_{\{(k-1)/n < t \leq k/n\}}.
\end{equation}
For every $n \in \mathds{N}_{+}$, define
\begin{eqnarray*}
A_n &=& \int_{0}^{1} \int_{0}^{t} M_{n}(s,t) \, dW_{1}(s) \, dW_{2}(t)
+ \int_{0}^{1} \int_{0}^{s} M_{n}(s,t) \, dW_{2}(t) \, dW_{1}(s), \\
B_{n} &=& 2\int_{0}^{1} \int_{0}^{t} M_{n}(s,t) \, dW_{1}(s) \, dW_{1}(t)
+ \frac{1}{n} \sum_{j=1}^{n} M\left(\frac{j-1}{n}, \frac{j-1}{n}\right), \\
C_{n} &=& 2\int_{0}^{1} \int_{0}^{t} M_{n}(s,t) \, dW_{2}(s) \, dW_{2}(t)
+ \frac{1}{n} \sum_{j=1}^{n} M\left(\frac{j-1}{n}, \frac{j-1}{n}\right).
\end{eqnarray*}
Further, let
\begin{eqnarray*}
A &=& \int_{0}^{1} \int_{0}^{t} M(s,t) \, dW_{1}(s) \, dW_{2}(t)
+ \int_{0}^{1} \int_{0}^{s} M(s,t) \, dW_{2}(t) \, dW_{1}(s), \\
B &=& 2\int_{0}^{1} \int_{0}^{t} M(s,t) \, dW_{1}(s) \, dW_{1}(t)
+ \int_{0}^{1} M(t,t) \, dt , \\
C &=& 2 \int_{0}^{1} \int_{0}^{t} M(s,t) \, dW_{2}(s) \, dW_{2}(t)
+ \int_{0}^{1} M(t,t) \, dt .
\end{eqnarray*}
A key point here, mentioned in the introduction, is that we choose to use the same pair $(W_1,W_2)$ of independent Wiener processes to represent all six of these variables. This is a natural coupling on the common Wiener space $\Omega$ defined by this pair, which allows us to relate the two empirical correlations to each other in a way that easily yields the Wasserstein distance between their distributions. In particular, in Section \ref{sec:propertyofAnBnCnABC}, we will show $\theta_{n} \overset{D}{=}A_n/\sqrt{B_n C_n}$ and $\theta = A/\sqrt{B C}$, while in the first step in the proof of Theorem \ref{thm:boundwassertain} in Section \ref{sec:UBWass}, we establish that $d_{W}(\mathcal{L}(X),\mathcal{L}(Y)) \leq E[|X-Y|]$ for any pair of integrables rv's $(X,Y)$ on the same probability space, from which we conclude
\begin{equation*}
d_{W}(\theta_n, \theta) = d_{W} \left( \mathcal{L}\left(\frac{A_n}{\sqrt{B_n C_n}} \right), \mathcal{L}\left(\frac{A}{\sqrt{B C}} \right) \right) \leq E\left[ \left| \frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}} \right| \right].
\end{equation*}
In the sequel, we shall restrict our attention to $A_n, B_n, C_n, A, B$ and $C$. One key reason for defining $A_n, B_n, C_n, A, B$ and $C$ is that, being defined as second-chaos variable plus a constant (which may be 0), the upper bounds for the second moments of $A_n - A$, $B_n -B$ and $C_n -C$ can be estimated as $\mathcal{O}(n^{-2})$. Hence, $A_n$, $B_n$ and $C_n$ converge in $L^2(\Omega)$ to $A$, $B$ and $C$ respectively at rate $\sqrt{n^{-2}}$. In fact, the second moments of $A_n - A$, $B_n -B$ and $C_n -C$ can be calculated explicitly. These details will be stated and proved in Section \ref{sec:propertyofAnBnCnABC}.
This convergence rate $\mathcal{O}(n^{-2})$ converts into the rate $\mathcal{O}(n^{-1})$ in Theorem \ref{thm:boundwassertain} because of the need to separate numerator from denominator. One might view this as the cost to pay for this conversion. However, we think it is more fruitful to view the rate of convergence at the level of norms, which preserve scales: the $\mathcal{O}(n^{-1})$ is the rate of convergence of the three elements constituting $\theta_n$ in $L^2(\Omega)$-norm. This leads us to presume this Wasserstein-distance rate of convergence is sharp, though it is beyond the scope of this paper to establish this rigorously. From the so-called property of hyper-contractivity on fixed Wiener chaos (see \cite{NourdinPeccati} Chapter 2), for all $p > 1$, all $L^p(\Omega)$-norms of the three differences $A_n-A, B_n-B, C_n-C$ are equivalent, making it unnecessary to speculate whether computing the convergence rates of any specific higher moment might provide additional insight. Expanding the ratios defining $\theta_n - \theta$ into tri-variate Taylor series did not lead us to any further insight based on those explicit norm-equivalence universal constants.
In our mind, it is more interesting to ask oneself whether the rate $\mathcal{O}(n^{-1})$ for $d_W(\theta_n,\theta)$, which is inherited from the rate of $\mathcal{O}(n^{-2})$ for $Var(A_n-A),\,Var(B_n-B),$ and $Var(C_n-C)$, is generic, or whether it is specific to random walks. Resolving this question rigorously is also beyond the scope of this paper, but our preliminary calculations indicate that the aforementioned $\mathcal{O}(n^{-2})$ only holds because of the property of independence of increments of a random walk defined as a partial sum of a sequence of independent terms.
We believe that for other Markov chains which might converge in law, and specifically for any reasonable discretization of processes which are far from having independent increments, such as long-memory processes or mean-reverting processes, the rate of convergence to 0 of $Var(A_n-A),\,Var(B_n-B),$ and $Var(C_n-C)$ is $\mathcal{O}(n^{-1})$. Using a simple polarization argument, the rates of convergence to 0 of these three differences should be essentially equivalent, so that looking at merely one of them would give the order for all of them. As mentioned elsewhere (e.g. Section \ref{sec6}), the method of proof below to establish the rate $\mathcal{O}(n^{-2})$ is one of direct calculations, but the same rate can also be established using a more generic, less precise calculation where one compares Riemann integrals to their approximations using step functions. When attempting that calculation, the property of independence of increments comes plainly into view, implying a number of cancellations much like what one observes when computing the quadratic variation of a martingale. This same methodology seems to indicate that no such cancellations occur for non-independent-increment cases, but that our conjectured rate $\mathcal{O}(n^{-1})$ is straightforward to establish for other Gaussian processes, using the same type of coupling as for Gaussian random walks. Extending the conjecture to non-Gaussian processes would require more work.
The distinction which we conjecture above between Gaussian random walks and other Gaussian processes is far from merely academic. It means that the use of the properties of the continuous-time limit of Yule's ``nonsense correlation'' $\theta$, which are straightforward to establish using simulations, to infer statistical properties of discrete-time random walks, is legitimate for moderate sample sizes, but not so if the data does not behave like the path of a random walk with independent increments. For instance, a statistic on $\theta$ that relates to the construction of the Wasserstein metric (e.g. a mean value or a moment) can be presumed generically accurate at a 1\% level for a Gaussian random walk with several hundred data points, while tens of thousands of data points would be needed, according to our conjecture, when working with a mean-reverting time series. In the environmental sciences, where such time series are ubiquitous, and where many have yearly frequencies, no such reliance on $\theta$ directly can be assumed on a historical scale. In other application domains, such as in quantitative finance, high-frequency studies over several years, such as when studying the long-term distribution and movements of interest rates or of market volatility, can routinely draw on enough data points, however. Also in finance, shorter-term studies of other objects, like stock returns, relate more readily to Gaussian random walks, where our results herein indicate that only hundreds of measurements over time would allow the use of $\theta$'s law instead of needing to rely on $\theta_n$. For random-walk time series which are shorter yet, our explicit results on $\theta_n$ from Section \ref{sec:momentforguassian} are available.
\subsection{Properties of $A_n, B_n, C_n, A, B$, and $C$.} \label{sec:propertyofAnBnCnABC}
In this section, we derive several properties of $A_n, B_n, C_n, A, B$, and $C$, including justifying the coupling, some convenient a.s. constraints we point out, explicit formulae for univariate moment-generating functions, and most importantly from the standpoint of our quantitative analysis, the last two propositions in this section provide the aforementioned convergences to zero of the variances of the differences between the approximating and limiting three elements constituting $\theta_n$ and $\theta$.
\begin{proposition} \label{prop:identicaldistribution}
The following statements hold, where the equality in (a) and the first equality in (c) are in distribution:
\begin{enumerate}[(a)]
\item $(Z_{11}^{n}/n, Z_{12}^{n}/n, Z_{22}^{n}/n ) \overset{D}{=} (B_n, A_n, C_n)$ for every $n \in \mathds{N}_{+}$;
\item
\begin{eqnarray}
A &=& \int_{0}^{1} W_{1}(t)W_{2}(t) dt - \int_{0}^{1} W_{1}(t) dt \int_{0}^{1} W_{2}(t) dt , \label{eq:A} \\
B &=& \int_{0}^{1} W_{1}^{2}(t) dt - \left(\int_{0}^{1} W_{1}(t) dt \right)^{2} , \label{eq:B} \\
C &=& \int_{0}^{1} W_{2}^{2}(t) dt - \left(\int_{0}^{1} W_{2}(t) dt \right)^{2}. \label{eq:C}
\end{eqnarray}
\item $\theta_{n} \overset{D}{=}A_n/\sqrt{B_n C_n}$ and $\theta = A/\sqrt{B C}$.
\end{enumerate}
\end{proposition}
\begin{proof}
See Appendix.
\end{proof}
A helpful corollary of Proposition \ref{prop:identicaldistribution} is as follows.
\begin{corollary} \label{coro:1}
(a) $| A_n/ \sqrt{B_n C_n} | \leq 1$ a.s.;
(b) $| A/ \sqrt{B C} | \leq 1$ a.s.;
(c) $B_n, C_n >0$ a.s. for $n \geq 2$;
(d) $B,C >0$ a.s..
\end{corollary}
\begin{proof}
By the Cauchy-Schwarz inequality, $|Z_{12}^{n}/\sqrt{Z_{11}^{n} Z_{22}^{n}}| \leq 1$. By Proposition \ref{prop:identicaldistribution}, $(Z_{11}^{n}/n, Z_{12}^{n}/n, Z_{22}^{n}/n ) \overset{D}{=} (B_n, A_n, C_n)$, and so $|Z_{12}^{n}/\sqrt{Z_{11}^{n} Z_{22}^{n}}| \overset{D}{=} A_n/ \sqrt{B_n C_n}$. Statement (a) thus follows. Similarly, statement (b) follows from Cauchy-Schwarz inequality and from Proposition \ref{prop:identicaldistribution}.
The non-negativity of the terms in statements (c) and (d) comes from Proposition \ref{prop:identicaldistribution} and Jensen's inequality as is well known. For $n\geq 2$, $Z_{11}^{n}/n = 0$ implies $X_1 = X_2 = \dots = X_n$, where $X_1, X_2, \dots, X_n$ are mutually independent standard Gaussian random variables as defined in Section \ref{sec:introduction}. We immediately note that the probability of the event $\{X_1 = X_2 = \dots = X_n\}$ is $0$. Thus, $Z_{11}^{n}/n > 0$ a.s., and hence $B_n > 0$ a.s.. Similarly, $C_n >0$ a.s. This proves statement (c). Finally, by Proposition \ref{prop:identicaldistribution}, $B=0$ implies that $W_{1}(t)$ is a constant on the interval $[0,1]$, the probability of which is $0$. Hence $B>0$ a.s. and similarly, $C>0$ a.s. This proves statement (d).
\end{proof}
Let $\phi_{B}(s) := E[e^{-sB}]$ and $\phi_{C}(s) := E[e^{-sC}]$. $\phi_{B}(s)$ and $\phi_{C}(s)$ are the moment generating functions of $B$ and $C$ respectively. Similarly, let $\phi_{B_n}(s)$ and $\phi_{C_n}(s)$ be the moment generating functions of $B_n$ and $C_n$ respectively. These functions can be computed explicitly, as the following lemma shows.
\begin{lemma} \label{lm:mgf}
We have
\begin{eqnarray*}
&&\phi_{B_n}(s) = \phi_{C_n}(s) = \left( d_{n}\left(-2s/n\right) \right)^{-1/2}, \quad \text{for every $n \in \mathds{N}_{+}$}, \\
&& \phi_{B}(s) = \phi_{C}(s) = \left( \frac{\sinh\sqrt{2s}}{\sqrt{2s}} \right)^{-1/2}.
\end{eqnarray*}
\end{lemma}
\begin{proof}
By Theorem \ref{thm1}, the joint moment generating function of $(Z_{11}^{n}, Z_{12}^{n}, Z_{22}^{n})$ is
\begin{eqnarray*}
&& E\left[\exp \left\{ -\frac{1}{2} (s_{11} Z_{11}^{n} + 2 s_{12} Z_{12}^{n} + s_{22} Z_{22}^{n}) \right\} \right]
= (d_n(\alpha(s_{11}, s_{12}, s_{22})) d_n(\beta(s_{11}, s_{12}, s_{22})))^{-1/2}.
\end{eqnarray*}
Plugging $s_{11} = 2s/n$, $s_{12}=0$ and $s_{22}=0$ into the last display, it follows that
\begin{equation*}
E[e^{-s\,Z_{11}^{n} /n}] = \left( d_{n}(-2s/n) d_{n}(0)\right)^{-1/2}
= \left( d_{n}(-2s/n) \right)^{-1/2},
\end{equation*}
where the last equality comes from the fact that $d_{n}(0)=1$. Note that since (by Proposition \ref{prop:identicaldistribution}) $Z_{11}^{n}/n \overset{D}{=} B_n$,
\begin{equation*}
\phi_{B_n}(s) = E[e^{-s B_n}] = E[e^{-s\,Z_{11}^{n} /n}] = \left( d_{n}(-2s/n) \right)^{-1/2}.
\end{equation*}
Symmetrically, $\phi_{C_n}(s) = \left( d_{n}\left(-2s/n\right) \right)^{-1/2}$.
Combining the results of Section 4.1 of \cite{ernst2019distribution} with Proposition \ref{prop:identicaldistribution}, the joint moment generating function of $(A,B,C)$ is
\begin{eqnarray*}
E\left[\exp \left\{ -\frac{1}{2} (s_{11} B + 2 s_{12} A + s_{22} C) \right\} \right]
= \left( \frac{\sinh\sqrt{-\alpha} \sinh\sqrt{-\beta} }{\sqrt{-\alpha} \sqrt{-\beta}} \right)^{-1/2},
\end{eqnarray*}
where $\alpha$ and $\beta$ are defined in \eqref{eq:alpha} and \eqref{eq:beta}. Plugging $s_{11} = 2s$, $s_{12}=0$ and $s_{22}=0$ into the last display, and recalling that $\sinh x/x$ equals $1$ at $x=0$, it follows that the moment generating function $\phi_{B}$ of $B$ is
\begin{equation*}
\phi_{B}(s) = E[e^{-sB}] = \left( \frac{\sinh\sqrt{2s}}{\sqrt{2s}} \right)^{-1/2}.
\end{equation*}
Symmetrically, $\phi_{C}(s) = (\sinh\sqrt{2s} / \sqrt{2s})^{-1/2}$.
\end{proof}
We now proceed to give upper bounds for the second moments of $A_n -A$, $B_n -B$ and $C_n -C$.
\begin{proposition} \label{prop:secondmoment}
For $n>2$, we have $E[(A_n - A)^2] = \frac{5}{72} n^{-2} - \frac{7}{120} n^{-4}$. Hence, $E[(A_n - A)^2] \leq \frac{5}{72} n^{-2}$ for $n>2$.
\end{proposition}
\begin{proof}
From the definition \eqref{emenn}, a routine calculation shows that $M$ is a sublinear function in both its variables, with Lipshitz constant 1:
$|M( s_2, t_2 ) - M( s_1, t_1 )| \leq \max(s_2 - s_1, t_2 - t_1)$, for $0\leq s_1 \leq s_2 \leq 1$ and $0 \leq t_1 \leq t_2 \leq 1$. It follows immediately that $$|M_{n}(s,t) - M(s,t) | \leq \frac{1}{n}.$$ By definitions of $A_n$ and $A$,
\begin{eqnarray*}
A_n - A &=& \int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{2}(t) \\
&& + \int_{0}^{1} \int_{0}^{s} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{2}(t) \, dW_{1}(s).
\end{eqnarray*}
By Jensen's inequality,
\begin{eqnarray*}
(A_n - A)^{2} &\leq& 2 \left( \int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{2}(t) \right)^2 \\
&& + 2 \left( \int_{0}^{1} \int_{0}^{s} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{2}(t) \, dW_{1}(s) \right)^2.
\end{eqnarray*}
Taking expectations on both sides yields
\begin{eqnarray*}
&& E[(A_n - A)^{2}] \\
&\leq& 2 E \left[ \left( \int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{2}(t) \right)^2 \right] \\
&& + 2 E \left[ \left( \int_{0}^{1} \int_{0}^{s} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{2}(t) \, dW_{1}(s) \right)^2 \right] \\
&=& 2 \int_{0}^{1} \int_{0}^{t} E \left[ \left(M_{n}(s,t) - M(s,t) \right)^2 \right] \, ds\, dt
+ 2 \int_{0}^{1} \int_{0}^{s} E\left[ \left(M_{n}(s,t) - M(s,t) \right)^2 \right] \, dt\, ds \\
&\leq& 2 \int_{0}^{1} \int_{0}^{t} \frac{1}{n^2} \, ds\, dt
+ 2 \int_{0}^{1} \int_{0}^{s} \frac{1}{n^2} \, dt\, ds
= \frac{2}{n^2},
\end{eqnarray*}
where in the first equality the It\^{o} isometry has been applied. In the last display, letting $n \rightarrow \infty$ yields $\lim_{n \rightarrow \infty} E[(A_n - A)^{2}] = 0$. Hence, $\lim_{n \rightarrow \infty} E[A_n^2] = E[A^2]$.
By \eqref{eq:An} in the appendix, we have
\begin{equation*}
A_n = \sum_{j,k=1}^{n} M\left( \frac{j-1}{n}, \frac{k-1}{n} \right) \left( W_1\left( \frac{j}{n}\right) - W_1\left( \frac{j-1}{n}\right) \right) \left( W_2\left( \frac{k}{n}\right) - W_2\left( \frac{k-1}{n}\right) \right).
\end{equation*}
Then
\begin{eqnarray}
&& E[A_n^2] \notag \\
&=& E\Bigg[ \sum_{j,k,i,l=1}^{n} M\left( \frac{j-1}{n}, \frac{k-1}{n} \right) M\left( \frac{i-1}{n}, \frac{l-1}{n} \right) \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right) \notag \\
&& \left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right)
\left( W_{1}\left(\frac{i}{n}\right) - W_{1}\left( \frac{i-1}{n}\right) \right)
\left( W_{2}\left(\frac{l}{n}\right) - W_{2}\left( \frac{l-1}{n}\right) \right) \Bigg] \notag \\
&=& \sum_{j,k,i,l=1}^{n} \Bigg\{ M\left( \frac{j-1}{n}, \frac{k-1}{n} \right) M\left( \frac{i-1}{n}, \frac{l-1}{n} \right) \notag \\
&& \quad \quad \quad \quad \times E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right) \left( W_{1}\left(\frac{i}{n}\right) - W_{1}\left( \frac{i-1}{n}\right) \right) \right] \notag \\
&& \quad \quad \quad \quad \times E\left[ \left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) \left( W_{2}\left(\frac{l}{n}\right) - W_{2}\left( \frac{l-1}{n}\right) \right) \right] \Bigg\} \notag \\
&=& \sum_{j,k,i,l=1}^{n} M\left( \frac{j-1}{n}, \frac{k-1}{n} \right) M\left( \frac{i-1}{n}, \frac{l-1}{n} \right) \cdot \frac{1}{n} \mathds{1}_{\{i=j\}} \cdot \frac{1}{n} \mathds{1}_{\{l=k\}} \notag \\
&=& \sum_{j,k=1}^{n} M\left( \frac{j-1}{n}, \frac{k-1}{n} \right)^2 \cdot \frac{1}{n^2} \notag \\
&=& 2 \sum_{j=1}^{n}\sum_{k=1}^{j-1} \frac{1}{n^2} \left( \frac{k-1}{n} - \frac{(j-1)(k-1)}{n^2} \right)^2
+ \sum_{j=1}^{n} \frac{1}{n^2} \left( \frac{j-1}{n} - \frac{(j-1)^2}{n^2} \right)^2, \label{eq:longexpandofAn}
\end{eqnarray}
where the second equality follows by the independence of the Wiener processes $W_{1}$ and $W_{2}$. Note that the first term on the right-hand side of \eqref{eq:longexpandofAn} is $2$ times a double summation of a polynomial of $j$ and $k$, calculating the summation with respect to $k$ by Faulhaber's formula yields $2$ times a single summation of a polynomial of $j$ over $j=1,\dots, n$. Applying Faulhaber's formula again to this summation, we have that the first term on the right-hand side of \eqref{eq:longexpandofAn} is equal to
\begin{equation}
\frac{1}{90} - \frac{1}{30} n^{-1} + \frac{1}{36} n^{-2} - \frac{7}{180} n^{-4} + \frac{1}{30} n^{-5}. \label{eq:Andoublesum}
\end{equation}
Note that the second term on the right-hand side of \eqref{eq:longexpandofAn} is a single summation of a polynomial of $j$, applying Faulhaber's formula again gives
\begin{equation}
\frac{1}{30} n^{-1} - \frac{1}{30} n^{-5}. \label{eq:Ansinglesum}
\end{equation}
Combining \eqref{eq:longexpandofAn}, \eqref{eq:Andoublesum} and \eqref{eq:Ansinglesum}, we have
\begin{equation}
E[A_{n}^{2}] = \frac{1}{90} + \frac{1}{36} n^{-2} - \frac{7}{180} n^{-4}. \label{eq:expectationofAn2}
\end{equation}
In the last display, letting $n \rightarrow \infty$, we have
\begin{equation}
E[A^2] = \lim_{n \rightarrow \infty} E[A_{n}^{2}] = \frac{1}{90}. \label{eq:expectationofA2}
\end{equation}
In what follows, we proceed to calculate the expectation of $A_n A$, which, of course, is handy to compute the variance of $A_n-A$. By Fubini's theorem and the independence of $W_1$ and $W_2$,
\begin{eqnarray*}
&& E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right)
\left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) \int_{0}^{1} W_{1}(t) W_{2}(t) \, dt \right] \\
&=& \int_{0}^{1} E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right)
\left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) W_{1}(t) W_{2}(t) \right] \, dt \\
&=& \int_{0}^{1} E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right) W_{1}(t) \right]
E\left[ \left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) W_{2}(t) \right] \, dt \\
&=& \int_{0}^{1} \left( t \wedge \left( \frac{j}{n} \right) - t \wedge \left( \frac{j-1}{n} \right)\right) \cdot
\left( t \wedge \left( \frac{k}{n} \right) - t \wedge \left( \frac{k-1}{n} \right)\right) \, dt \\
&=& \frac{1}{n^2} + \frac{1}{2} \frac{1}{n^3} - \frac{j \vee k}{n^3} - \frac{1}{6} \frac{1}{n^3} \mathds{1}_{\{j=k\}}.
\end{eqnarray*}
Similarly,
\begin{eqnarray*}
&& E \left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right)
\left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) \int_{0}^{1} W_{1}(t) \, dt \int_{0}^{1} W_{1}(t) \, dt \right] \\
&=& \int_{0}^{1} \int_{0}^{1} E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right)
\left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) W_{1}(t) W_{2}(s) \right] \,ds\,dt \\
&=& \int_{0}^{1} \int_{0}^{1} E\left[ \left( W_{1}\left(\frac{j}{n}\right) - W_{1}\left( \frac{j-1}{n}\right) \right) W_{1}(t) \right]
E\left[ \left( W_{2}\left(\frac{k}{n}\right) - W_{2}\left( \frac{k-1}{n}\right) \right) W_{2}(s) \right] \,ds\,dt \\
&=& \int_{0}^{1} \int_{0}^{1} \left( t \wedge \left( \frac{j}{n} \right) - t \wedge \left( \frac{j-1}{n} \right)\right) \cdot
\left( s \wedge \left( \frac{k}{n} \right) - s \wedge \left( \frac{k-1}{n} \right)\right) \,ds\,dt \\
&=& \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{j}{n^2} \right) \cdot \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{k}{n^2} \right).
\end{eqnarray*}
Combing the last two displays and by linearity of expectation, we have
\begin{eqnarray}
&& E[A_n A] \notag \\
&=& \sum_{j,k=1}^{n} M\left( \frac{j-1}{n}, \frac{k-1}{n} \right) \bigg[ \frac{1}{n^2} + \frac{1}{2} \frac{1}{n^3} - \frac{j \vee k}{n^3} - \frac{1}{6} \frac{1}{n^3} \mathds{1}_{\{j=k\}} \notag \\
&& \quad \quad \quad - \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{j}{n^2} \right) \cdot \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{k}{n^2} \right) \bigg] \notag \\
&=& 2 \sum_{j=1}^{n} \sum_{k=1}^{j-1} \left( \frac{k-1}{n} - \frac{j-1}{n}\cdot \frac{k-1}{n}\right) \bigg[ \frac{1}{n^2} + \frac{1}{2} \frac{1}{n^3} - \frac{j }{n^3} \notag \\
&& \quad \quad \quad \quad \quad - \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{j}{n^2} \right) \cdot \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{k}{n^2} \right) \bigg] \notag \\
&& + \sum_{j=1}^{n} \left( \frac{j-1}{n} - \frac{j-1}{n}\cdot \frac{j-1}{n}\right) \bigg[ \frac{1}{n^2} + \frac{1}{2} \frac{1}{n^3} - \frac{j }{n^3} - \frac{1}{6} \frac{1}{n^3} \notag \\
&& \quad \quad \quad - \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{j}{n^2} \right) \cdot \left( \frac{1}{n} + \frac{1}{2} \frac{1}{n^2} - \frac{j}{n^2} \right) \bigg]. \label{eq:longexpandofAnA}
\end{eqnarray}
By a similar argument to that of the calculation of the right-hand side of \eqref{eq:longexpandofAn}, the right-hand side of \eqref{eq:longexpandofAnA} is
\begin{equation*}
\frac{1}{90} - \frac{1}{48}n^{-2} + \frac{7}{720}n^{-4}.
\end{equation*}
Hence,
\begin{equation*}
E[A_n A] = \frac{1}{90} - \frac{1}{48}n^{-2} + \frac{7}{720}n^{-4}.
\end{equation*}
Together with \eqref{eq:expectationofAn2} and \eqref{eq:expectationofA2}, we have
\begin{equation*}
E[(A_n - A)^2] = E[A_{n}^{2}] + E[A^2] - 2 E[A_n A] = \frac{5}{72} n^{-2} - \frac{7}{120} n^{-4}.
\end{equation*}
\end{proof}
\begin{proposition} \label{prop:upperboundforBn-B}
We have $E[(B_n- B)^2] = E[(C_n - C)^2]= \frac{5}{36}n^{-2} - \frac{4}{45} n^{-4}$. Hence, $E[(B_n- B)^2] = E[(C_n - C)^2] \leq \frac{5}{36}n^{-2}$.
\end{proposition}
\begin{proof}
The second assertion is a direct result of the first, which we proceed to establish.
By the definitions of $B_n$ and $B$,
\begin{eqnarray}
B_n - B &=& 2\int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{1}(t) \notag \\
&& + \frac{1}{n} \sum_{j=1}^{n} M\left(\frac{j-1}{n}, \frac{j-1}{n}\right) - \int_{0}^{1} M(t,t)\, dt. \label{eq:BnminusB}
\end{eqnarray}
By a standard property of the Wiener stochastic integral,
\begin{equation*}
E \left[ \int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{1}(t) \right] =0.
\end{equation*}
Taking squares and then expectation on both sides of \eqref{eq:BnminusB}, we have (after rearrangement of terms) that
\begin{eqnarray}
E[ (B_n -B)^2 ] &=& 4 E\left[ \left(\int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right) \, dW_{1}(s) \, dW_{1}(t)\right)^2
\right] \notag \\
&& + \left( \frac{1}{n} \sum_{j=1}^{n} M\left(\frac{j-1}{n}, \frac{j-1}{n}\right) - \int_{0}^{1} M(t,t)\, dt \right)^2. \label{eq:boundB2}
\end{eqnarray}
By the It\^{o} isometry, the first term on the right-hand side of \eqref{eq:boundB2} is
\begin{eqnarray}
&& 4 \int_{0}^{1} \int_{0}^{t} E \left[ \left(M_{n}(s,t) - M(s,t) \right)^2 \right] \, ds\, dt \notag \\
&=& 4 \int_{0}^{1} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right)^2 \, ds\, dt
= 4 \sum_{j=1}^{n} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \int_{0}^{t} \left(M_{n}(s,t) - M(s,t) \right)^2 \, ds\, dt \notag \\
&=& 4 \sum_{j=1}^{n} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \left( \sum_{k=1}^{j-1} \int_{\frac{k-1}{n}}^{\frac{k}{n}} \left(M_{n}(s,t) - M(s,t) \right)^2 \, ds + \int_{\frac{j-1}{n}}^{t} \left(M_{n}(s,t) - M(s,t) \right)^2 \, ds \right) \,dt \notag \\
&=& 4 \sum_{j=1}^{n} \sum_{k=1}^{j-1} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \int_{\frac{k-1}{n}}^{\frac{k}{n}} \left(M_{n}(s,t) - M(s,t) \right)^2 \,ds\,dt \notag \\
&& + 4 \sum_{j=1}^{n} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \int_{\frac{j-1}{n}}^{t} \left(M_{n}(s,t) - M(s,t) \right)^2 \,ds\,dt \notag \\
&=& 4 \sum_{j=1}^{n} \sum_{k=1}^{j-1} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \int_{\frac{k-1}{n}}^{\frac{k}{n}} \left(\frac{k-1}{n}- \frac{k-1}{n}\cdot \frac{j-1}{n} -s + st \right)^2 \,ds\,dt \notag \\
&& + 4 \sum_{j=1}^{n} \int_{\frac{j-1}{n}}^{\frac{j}{n}} \int_{\frac{j-1}{n}}^{t} \left( \frac{j-1}{n} - \frac{j-1}{n} \cdot \frac{j-1}{n} -s+st \right)^2 \, ds \, dt \notag \\
&=& 4 \sum_{j=1}^{n} \sum_{k=1}^{j-1} \left( \frac{2j^2 + 2k^2 + 3jk}{6n^6} - \frac{(4n+5)j}{6n^6} - \frac{(3n+5)k}{6n^6} + \frac{6n^2 + 15n +11}{18n^6} \right) \notag \\
&& + 4 \sum_{j=1}^{n} \left( \frac{7 j^2}{12n^6} - \frac{5(n+2)j}{12n^6} + \frac{15n^2 + 51n +55}{180 n^6} \right), \label{eq:longexpansionofBn1}
\end{eqnarray}
where in the last equality we have explicitly calculated the two double integrals. Note that the first term on the right-hand side of \eqref{eq:longexpansionofBn1} is $4$ times a double summation of a polynomial of $j$ and $k$, calculating the summation with respect to $k$ by Faulhaber's formula yields $4$ times a single summation of a polynomial of $j$ over $j=1,\dots, n$. Applying Faulhaber's formula again to this summation, we have that the first term on the right-hand side of \eqref{eq:longexpansionofBn1} is
\begin{equation}
\frac{5}{36} n^{-2} - \frac{5}{18} n^{-3} + \frac{1}{12}n^{-4} + \frac{1}{18} n^{-5}. \label{eq:momentofBdoublesum}
\end{equation}
Again, by Faulhaber's formula, the second term on the right-hand side of \eqref{eq:longexpansionofBn1} is
\begin{equation}
\frac{5}{18}n^{-3} - \frac{1}{5} n^{-4} - \frac{1}{18} n^{-5}. \label{eq:momentofBsinglesum}{}
\end{equation}
Combing \eqref{eq:momentofBdoublesum} and \eqref{eq:momentofBsinglesum}, the first term on the right-hand side of \eqref{eq:boundB2} is
\begin{equation}
\frac{5}{36}n^{-2} - \frac{7}{60} n^{-4}. \label{eq:B2term1}
\end{equation}
The second term on the right-hand side of \eqref{eq:boundB2} is
\begin{eqnarray}
&& \left( \frac{1}{n} \sum_{j=1}^{n} \left( \frac{j-1}{n} - \left(\frac{j-1}{n}\right)^2 \right) - \int_{0}^{1} (t - t^2)\, dt \right)^2 \notag \\
&=& \left( \frac{n^2-1}{6n^2} - \frac{1}{6} \right)^2 = \frac{1}{36} n^{-4}. \label{eq:B2term2}
\end{eqnarray}
Combining \eqref{eq:boundB2}, \eqref{eq:B2term1}, \eqref{eq:B2term2} gives $E[(B_n- B)^2] = \frac{5}{36}n^{-2} - \frac{4}{45} n^{-4}$. Symmetrically, $E[(C_n- C)^2] = \frac{5}{36}n^{-2} - \frac{4}{45} n^{-4}$ too. This completes the proof.
\end{proof}
\subsection{An upper bound for the Wasserstein distance.}
\label{sec:UBWass}
In this section, we will derive an upper bound for $d_{W}(A_{n}/ \sqrt{B_{n} C_{n}}, A/\sqrt{BC})$. The result relies on three preparatory lemmas. The first, Lemma \ref{lm:momentinverse}, is a special case of Proposition 1 in \cite{ernst2019distribution}. When used in conjunction with Lemma \ref{lm:mgf}, it shows that we must have a good lower-bound handle on the behavior of $d_n$, which is the topic of the Lemma \ref{lm:lowerboundfordn}. These then culminate in showing (Lemma \ref{lm:boundforBinverse}) that $B$ and $B_n$ have inverse moments, with the latter being uniformly bounded in $n$. This fact may seem surprising, since, as second chaos variables, negative moments can explode, but this does not apply because $B,B_n$ are non-centered, and a.s. positive. The uniformity over $n$ in Lemma \ref{lm:boundforBinverse} is a consequence of the convergence of the moment-generating functions of the $B_n$'s to a limit which decays rapidly at $+\infty$ (at the rate $\sqrt{2s}e^{-2s}$), ensuring control of the tails.
We exploit the explicit nature of these expressions to prove Lemma \ref{lm:boundforBinverse} and the results that precede it, but our strategy could also work for other processes, for instance by invoking dominated convergence and by controlling $d_n$ via its constituent eigenvalues. This means that our methodology could handle other processes, or other quadratic forms than $B_n$, if one could still control $d_n$, via the properties of the matrix $K_n$, whose positive-definite character is very general. This is an important point in understanding the ingredients in the proof of Lemma \ref{lm:lowerboundfordn}. We obtain lower bounds for $d_n$ by estimating selected terms in its sum representation, ignoring others because none of them are negative, and the positive-definite property of $K_n$ is the reason all terms in the sum are non-negative. This last justification is not entirely trivial, and though it is not used in our proofs because all our formulas are explicit, it is worth mentioning the reason here which is generically true. We are interested in lower bounds on the moment-generating function of $B_n$, which equals $d_n(-2s/n)=\prod_{k=2}^n(1+2\lambda_k s/n)$. Since all $\lambda_k$ are positive, this expression is thus a polynomial in $s$ with positive coefficients. That positivity translates into the one used in the proof of Lemma \ref{lm:lowerboundfordn}.
\begin{lemma} \label{lm:momentinverse}
Let $X$ be a random variable satisfying $X>0$ a.s. and $\phi_{X}(s) = E[e^{-sX}]$ be its moment generating function. Then for every $m \in \mathds{N}_{+}$,
\begin{equation*}
E\left[ X^{-m} \right] = \frac{1}{(m-1)!} \int_{0}^{\infty} s^{m-1} \phi_{X}(s) \, ds.
\end{equation*}
\end{lemma}
\begin{proof}
See Proposition 1 in \cite{ernst2019distribution}.
\end{proof}
We now turn to Lemma \ref{lm:lowerboundfordn}.
\begin{lemma} \label{lm:lowerboundfordn}
For $n \geq 11$, we have
\begin{enumerate}[(a)]
\item $d_{n}(-2s/n) \geq 1$ for $s \geq 0$;
\item $d_{n}(-2s/n) \geq 2^{5} {n \choose 11}\, n^{-11} s^{5} $ for $s \geq 0$;
\item $d_{n}(-2s/n) \geq \left( e^{\sqrt{s/2} } - e^{-\sqrt{s/2} } \right)/ \sqrt{10s}$ for $ 0 \leq s \leq n^2 /2$.
\end{enumerate}
\end{lemma}
\begin{proof}
It follows from \eqref{eq:representationfordinmaindocument} that
\begin{eqnarray}
d_{n}\left( - \frac{2s}{n} \right) &=& \frac{(-1)^{n-1}}{n \cdot 2^{n-1}} \, \sum_{k=1}^{\lceil n/2 \rceil} {n \choose 2k-1} \left(-\frac{2s}{n^2} -2\right)^{n-(2k-1)} \left( \left(-\frac{2s}{n^2} -2\right)^2 -4 \right)^{k-1} \notag \\
&=& \sum_{k=1}^{\lceil n/2 \rceil} \frac{1}{n} \, {n \choose 2k-1} \left( \frac{s}{n^2} +1 \right)^{n-(2k-1)} \left( \frac{2s}{n^2} + \frac{s^2}{n^4} \right)^{k-1}. \label{eq:partialsum}
\end{eqnarray}
Note the first term of the summation on the right-hand side of \eqref{eq:partialsum} is $(s/n^2 +1)^{n-1}$. Then,
\begin{equation*}
d_{n}\left( - \frac{2s}{n} \right) \geq \left( \frac{s}{n^2} +1 \right)^{n-1} \geq 1.
\end{equation*}
This proves statement (a). We now note that $n \geq 11$, $\lceil n/2 \rceil \geq 6$. Let us consider the sixth term of the summation on the right-hand side of \eqref{eq:partialsum}, i.e.
\begin{equation*}
\frac{1}{n} \, {n \choose 11} \left( \frac{s}{n^2} +1\right)^{n-11} \left( \frac{2s}{n^2} + \frac{s^2}{n^4} \right)^{5}
\geq \frac{1}{n} \, {n \choose 11} \left( \frac{2s}{n^2} \right)^{5}
= 2^{5} {n \choose 11}\, n^{-11} s^{5}.
\end{equation*}
Then $d_{n}(-2s/n) \geq 2^{5} {n \choose 11}\, n^{-11} s^{5} $. This completes the proof of statement (b). Finally, it follows from \eqref{eq:representationfordinmaindocument} that
\begin{eqnarray}
d_{n}\left( - \frac{2s}{n} \right) =
\frac{1}{2 \sqrt{2s + s^2 /n^2}} \left[ \left( \frac{s}{n^2} + 1 + \sqrt{\frac{2s}{n^2} + \frac{s^2}{n^4}} \right)^{n} - \left( \frac{s}{n^2} + 1 - \sqrt{\frac{2s}{n^2} + \frac{s^2}{n^4}} \right)^{n} \right]. \label{eq:assertionc1}
\end{eqnarray}
Recall the useful fact that $\log(1+x) \geq x/2$ for $0 \leq x \leq 1$. Then for $ 0 \leq s \leq n^2 /2$,
\begin{eqnarray}
\left( \frac{s}{n^2} + 1 + \sqrt{\frac{2s}{n^2} + \frac{s^2}{n^4}} \right)^{n}
\geq \left( 1+ \frac{\sqrt{2s}}{n} \right)^{n}
= e^{n \log(1 + \sqrt{2s}/n)}
\geq e^{\sqrt{s/2}}, \label{eq:assertionc2}
\end{eqnarray}
Further,
\begin{eqnarray}
\left( \frac{s}{n^2} + 1 - \sqrt{\frac{2s}{n^2} + \frac{s^2}{n^4}} \right)^{n}
= \left( \frac{s}{n^2} + 1 + \sqrt{\frac{2s}{n^2} + \frac{s^2}{n^4}} \right)^{- n}
\leq e^{-\sqrt{s/2}}. \label{eq:assertionc3}
\end{eqnarray}
Note that
\begin{eqnarray*}
2 s + \frac{s^2}{n^2} \leq 2 s + \frac{n^2}{2} \cdot \frac{s}{n^2} = \frac{5s}{2},
\end{eqnarray*}
Together with \eqref{eq:assertionc1}, \eqref{eq:assertionc2} and \eqref{eq:assertionc3}, statement (c) follows.
\end{proof}
We now turn to Lemma \ref{lm:boundforBinverse} below.
\begin{lemma} \label{lm:boundforBinverse}
We have
\begin{enumerate}[(a)]
\item $E[B^{-m}] = E[C^{-m}] < \infty$ for every $m \in \mathds{N}_{+}$;
\item $\sup_{n\geq 11} E[B_{n}^{-1}] = \sup_{n\geq 11} E[C_{n}^{-1}] < \infty$.
\end{enumerate}
\end{lemma}
\begin{proof}
We first consider statement (a). Since $B$ and $C$ are identically distributed, it suffices to prove that $E[B^{-m}] < \infty$ for every $m \in \mathds{N}_{+}$. Applying Lemma \ref{lm:momentinverse} gives
\begin{equation*}
E[B^{-m}] = \frac{1}{(m-1)!} \int_{0}^{\infty} s^{m-1} \phi_{B}(s) \, ds.
\end{equation*}
By Lemma \ref{lm:mgf}, we have $\phi_{B}(0)=1$ and $\phi_{B}(s) \sim 2^{3/2}\, s^{1/4} \, e^{-\sqrt{s/2}}$ as $s \rightarrow \infty$. Then the boundedness of $E[B^{-m}]$ follows immediately. For statement (b), similarly, we need only prove that $\sup_{n\geq 11} E[B_{n}^{-1}] < \infty$. By Lemma \ref{lm:mgf}, Lemma \ref{lm:momentinverse} and Lemma \ref{lm:lowerboundfordn}, we have
\begin{eqnarray*}
&&E[B_{n}^{-1}] = \int_{0}^{\infty} \phi_{B_n}(s) \, ds
= \int_{0}^{\infty} d_{n}\left(- \frac{2s}{n}\right)^{-1/2} \, ds \\
&=& \int_{0}^{1} d_{n}\left(- \frac{2s}{n}\right)^{-1/2} \, ds
+ \int_{1}^{n^2/2} d_{n}\left(- \frac{2s}{n}\right)^{-1/2} \, ds
+ \int_{n^2/2}^{\infty} d_{n}\left(- \frac{2s}{n}\right)^{-1/2} \, ds \\
&\leq& \int_{0}^{1} 1 \, ds
+ \int_{1}^{n^2/2} \left( \left( e^{\sqrt{s/2} } - e^{-\sqrt{s/2} } \right)/ \sqrt{10s} \right)^{-1/2} \, ds
+ \int_{n^2/2}^{\infty} 2^{-\frac{5}{2}} {n \choose 11}^{-\frac{1}{2}} n^{\frac{11}{2}} s^{-\frac{5}{2}} \, ds \\
&=& 1 + \int_{1}^{n^2/2} \left( \left( e^{\sqrt{s/2} } - e^{-\sqrt{s/2} } \right)/ \sqrt{10s} \right)^{-1/2} \, ds
+ \frac{1}{3} {n \choose 11}^{-\frac{1}{2}} n^{\frac{5}{2}},
\end{eqnarray*}
where in the first inequality we have applied Lemma \ref{lm:lowerboundfordn}. Taking the supremum over $n\geq 11$ on the both sides of the last display yields
\begin{equation}
\sup_{n\geq 11} E[B_{n}^{-1}]
\leq 1 + \int_{1}^{\infty} \left( \left( e^{\sqrt{s/2} } - e^{-\sqrt{s/2} } \right)/ \sqrt{10s} \right)^{-1/2} \, ds
+ \sup_{n\geq 11} \frac{1}{3} {n \choose 11}^{-\frac{1}{2}} n^{\frac{5}{2}}. \label{eq:boundednessofbniverse}
\end{equation}
The boundedness of the second term on the right-hand side of \eqref{eq:boundednessofbniverse} follows by the fact that, as $n \rightarrow \infty$, $\left( \left( e^{\sqrt{s/2} } - e^{-\sqrt{s/2} } \right)/ \sqrt{10s} \right)^{-1/2} \sim (10s)^{1/4}\, e^{-\sqrt{s/8}}$. The boundedness of the third term on the right-hand side of \eqref{eq:boundednessofbniverse} follows by the fact ${n \choose 11}^{-\frac{1}{2}} n^{\frac{5}{2}} \rightarrow 0$ as $n \rightarrow \infty$. This completes the proof of statement (b).
\end{proof}
Let us define $C_{m} := E[B^{-m}] = E[C^{-m}]$ for $m=1,2,3$ and $C_4 := \sup_{n\geq 11} E[B_{n}^{-1}] = \sup_{n\geq 11} E[C_{n}^{-1}]$. With above preparations in hand, we are ready to reveal the section's main result.
\begin{theorem} \label{thm:boundwassertain}
For $n \geq 11$, with $A,B,C,A_n,B_n,C_n$ defined in Section \ref{sec:propertyofAnBnCnABC}, we have
\begin{equation*}
d_{W}(\theta_n, \theta) \leq E \left| \frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}} \right| \leq \frac{C_5}{n},
\end{equation*}
where, via the constants $C_1,C_3,C_4$ defined above, the constant $C_5$ is defined as
\begin{equation*}
C_5 := \frac{1}{12} \left\{ \frac{1}{132} \, \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} + 2 \right\}
\left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} + \frac{1}{6} \left(\frac{5}{2}\right)^{\frac{1}{2}} C_1.
\end{equation*}
\end{theorem}
\begin{proof}
By Proposition \ref{prop:identicaldistribution}, we have
\begin{equation*}
d_{W}(\theta_n, \theta)
= d_{W} \left( \frac{A_n}{\sqrt{B_n C_n}}, \frac{A}{\sqrt{B C}} \right)
= \sup_{f \in \mathrm{Lip}(1)} \left|Ef\left( \frac{A_n}{\sqrt{B_n C_n}} \right) - E f\left(\frac{A}{\sqrt{B C}}\right) \right|.
\end{equation*}
For every $f \in \mathrm{Lip}(1)$, and every pair of integrable random variables $(X,Y)$ on the same probability space,
\begin{equation*}
\left|Ef\left( X \right) - E f\left(Y\right) \right|
\leq E \left| f\left( X \right) - f\left( Y \right)\right| \\
\leq E \left| X - Y \right|.
\end{equation*}
Taking the supremun over $f \in \mathrm{Lip}(1)$ on both sides of the above displays with $X,Y$ replaced by $A_n /\sqrt{B_n C_n}, A/\sqrt{B C}$ yields
\begin{equation*}
d_{W}(\theta_n, \theta) \leq E \left| \frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}} \right|.
\end{equation*}
Thus, we need only bound the expectation of $| A_{n}/ \sqrt{B_n C_n} - A/\sqrt{BC} |$. Note that
\begin{eqnarray*}
&&\frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}}
= \frac{A_n \sqrt{B C} - A \sqrt{B_n C_n}}{\sqrt{B_n C_n} \sqrt{B C}} \\
&=& \frac{A_n(\sqrt{B C} - \sqrt{B_n C_n}) + (A_n -A) \sqrt{B_n C_n}}{\sqrt{B_n C_n} \sqrt{B C}} \\
&=& \frac{A_n}{\sqrt{B_n C_n}} \cdot \frac{\sqrt{B C} - \sqrt{B_n C_n}}{\sqrt{B C}} + \frac{A_n -A}{\sqrt{B C}}.
\end{eqnarray*}
Then,
\begin{eqnarray}
&&\left| \frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}} \right|
\leq \left| \frac{A_n}{\sqrt{B_n C_n}}\right| \cdot \frac{|\sqrt{B C} - \sqrt{B_n C_n}|}{\sqrt{B C}}
+ \frac{|A_n -A|}{\sqrt{B C}} \notag \\
&\leq& \frac{|\sqrt{B C} - \sqrt{B_n C_n}|}{\sqrt{B C}}
+ \frac{|A_n -A|}{\sqrt{B C}} \notag \\
&=& \frac{|(\sqrt{B}- \sqrt{B_n})\sqrt{C} + \sqrt{B_n}(\sqrt{C}- \sqrt{C_n})|}{\sqrt{B C}}
+ \frac{|A_n -A|}{\sqrt{B C}} \notag \\
&\leq& \frac{|\sqrt{B}- \sqrt{B_n}|}{\sqrt{B}} + \frac{\sqrt{B_n}}{\sqrt{B}}\, \frac{|\sqrt{C}- \sqrt{C_n}|}{\sqrt{C}}
+ \frac{|A_n -A|}{\sqrt{B C}}, \label{eq:differenceoffraction}
\end{eqnarray}
where in the second inequality we have invoked Corollary \ref{coro:1}. By the inequality of arithmetic and geometric means,
\begin{eqnarray*}
\frac{|\sqrt{B}- \sqrt{B_n}|}{\sqrt{B}}
= \frac{|B_n - B|}{\sqrt{B} (\sqrt{B} + \sqrt{B_n})}
\leq \frac{|B_n - B|}{2 \sqrt{B} \sqrt{\sqrt{B} \sqrt{B_n}}}
= \frac{|B_n - B|}{2 B^{\frac{3}{4}}\, B_{n}^{\frac{1}{4}}}.
\end{eqnarray*}
Then by H\"{o}lder's inequality,
\begin{eqnarray}
&&E\left[ \frac{|\sqrt{B}- \sqrt{B_n}|}{\sqrt{B}} \right]
\leq E\left[ \frac{|B_n - B|}{2 B^{\frac{3}{4}}\, B_{n}^{\frac{1}{4}}} \right]
\leq \left \{E\left[ \left(B_n - B\right)^2 \right] \right \} ^{\frac{1}{2}}
\left \{ E\left[ \frac{1}{4} B^{-\frac{3}{2}} \, B_{n}^{-\frac{1}{2}} \right] \right \}^{\frac{1}{2}} \notag \\
&\leq& \left\{ E\left[ \left(B_n - B\right)^2 \right] \right\}^{\frac{1}{2}}
\left\{ E\left[ \frac{1}{8} \left( B^{-3} + B_{n}^{-1}\right) \right] \right\}^{\frac{1}{2}}
\leq \left(\frac{5}{36n^2}\right)^{\frac{1}{2}} \, \left[ \frac{1}{8} (C_3 +C_4) \right]^{\frac{1}{2}} \notag \\
&=& \frac{1}{12} \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} \, \frac{1}{n}, \label{eq:difference1}
\end{eqnarray}
where the third inequality follows from the inequality of arithmetic and geometric means, and the fourth inequality is due to Proposition \ref{prop:upperboundforBn-B}. Similarly, we have
\begin{equation*}
E\left[ \frac{|\sqrt{C}- \sqrt{C_n}|}{\sqrt{C}} \right] \leq \frac{1}{12} \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} \, \frac{1}{n},
\end{equation*}
and
\begin{eqnarray*}
&& E\left[ \frac{\sqrt{B_n}}{\sqrt{B}} \right]
= E\left[ \frac{\sqrt{B_n} - \sqrt{B}}{\sqrt{B}} +1 \right]
\leq E\left[ \frac{|\sqrt{B_n} - \sqrt{B}|}{\sqrt{B}} +1 \right] \\
&\leq& \frac{1}{12} \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} \, \frac{1}{n} +1
\leq \frac{1}{132} \, \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} + 1.
\end{eqnarray*}
Since $(B_n, B)$ and $(C_n ,C)$ are independent, we have
\begin{eqnarray}
&& E\left[ \frac{\sqrt{B_n}}{\sqrt{B}}\, \frac{|\sqrt{C}- \sqrt{C_n}|}{\sqrt{C}} \right]
= E\left[ \frac{\sqrt{B_n}}{\sqrt{B}} \right] \, E\left[ \frac{|\sqrt{C}- \sqrt{C_n}|}{\sqrt{C}} \right] \notag \\
&\leq& \frac{1}{12} \left\{ \frac{1}{132} \, \left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} + 1 \right\}
\left[ \frac{5}{2} (C_3 +C_4) \right]^{\frac{1}{2}} \, \frac{1}{n}. \label{eq:difference2}
\end{eqnarray}
By H\"{o}lder's inequality and Proposition \ref{prop:secondmoment},
\begin{eqnarray}
&&E\left[\frac{|A_n -A|}{\sqrt{B C}}\right]
\leq \left\{ E\left[ (A_n -A)^{2} \right] \right\}^{\frac{1}{2}} \, \left\{E\left[ B^{-1}C^{-1} \right] \right\}^{\frac{1}{2}} \notag \\
&=& \left\{E\left[ (A_n -A)^{2} \right] \right\}^{\frac{1}{2}} \, \left\{E[B^{-1}] E[C^{-1}]\right\}^{\frac{1}{2}}
\leq \left(\frac{5}{72 n^2}\right)^{\frac{1}{2}} \cdot C_1= \frac{1}{6} \left(\frac{5}{2}\right)^{\frac{1}{2}} C_1 \,\frac{1}{n} . \label{eq:difference3}
\end{eqnarray}
Combining \eqref{eq:differenceoffraction}, \eqref{eq:difference1}, \eqref{eq:difference2} and \eqref{eq:difference3} yields
\begin{equation*}
E\left[\left| \frac{A_n}{\sqrt{B_n C_n}} - \frac{A}{\sqrt{B C}} \right|\right]
\leq \frac{C_5}{n}.
\end{equation*}
This completes the proof.
\end{proof}
\section{Future work.} \label{sec6}
In this section, we present conjectures which, while beyond the scope of the present paper, should constitute opportunities for future work which should be tractable given some known tools and techniques in the analysis on Wiener chaos, and could have interesting applications to statistical testing based on paths of time series.
The reader can refer to Section \ref{sec:coupling} for conjectures on convergence rates, and their implications, regarding the distinction between random walks and other types of time series. Those conjectures would apply to statistics which can be related to the Wasserstein distance.
Going beyond them, we conjecture that, for practical purposes, the convergence of $\theta_n$ to $\theta$ also occurs in total variation at the same rate as in Wasserstein distance, in the sense that the probability law of $\theta_{n}$ converges at the rate $r(n):= c n^{-1}$ for some constant $c$
though this may be harder to establish except empirically or via simulations. The practical conjecture, that extends from the Wasserstein to the total variation distance, would be significant for several reasons, including because the total variation distance is an upper bound on the Kolmogorov distance, but only the square root of the Wasserstein distance bounds the Kolmogorov distance. As the latter is the supremum norm for the distance between cumulative distribution functions (CDFs), an application of the practical conjecture, using specifically the implication for the Kolmogorov distance, would be as follows. An upper bound of order of magnitude $10^{-2}$, say, could legitimately imply that any estimate on the $\alpha$-th percentile of $\theta$ could result in the same estimate on the $(\alpha -10^{-2})$-th percentile of $\theta_{n}$. One could thus build a test of independence of two (Gaussian) random walks of length $n$ where the rejection region at the confidence level $\alpha$ could be equated to the rejection region using the CDF of $\theta$ at the confidence level $\alpha + 10^{-2}$ as long as $r(n)<10^{-2}$. This argument could take into account the multiplicative constant $c$ in the speed of convergence $r(n)$, which could also be determined from simulations. Without our conjecture on total variation rate of convergence, using instead our Theorem \ref{thm:boundwassertain}, this strategy for rejection regions at level $\alpha + 10^{-2}$ would follow from $r(n)^{1/2}<10^{-2}$, because, as we mentioned, the Wasserstein distance only bounds the square root of the Kolmogorov distance.
Other options for conjectures for statistical testing could include studying the speed of convergence of moment ratios of paths, such as a kurtosis-type statistic, and their fluctuations. Though this is also beyond the scope of this paper, we conjecture that, unlike the limit of the law of $\theta_{n}$ itself, whose numerator and denominator converge in the second chaos, the polarization of an empirical Kurtosis for two Gaussian random walks has normal fluctuations. Such a study could use either the technique presented in Section \ref{sec:convergenceinWasserstein} via bounding the negative moments of the denominator from its moment-generating function, or the so-called optimal fourth moment theorem (\cite{Nourdin}), where the speed of convergence of normal fluctuation for chaos sequences is known sharply in total variation.
We also suspect that the convergence phenomena we uncover here in the previous section are not restricted to Gaussian random walks, but hold for a wide range of random walks and other processes, including walks with other step distributions. Because of the heavy reliance on the Gaussian property in our work, particularly to be able to work in the second Wiener chaos, using non-Gaussian step distributions would require different tools. However, going from Gaussian random walks and Wiener processes to other Gaussian time series and their continuous limits could preserve a number of the tools we present here. For instance, we rely on the extraordinary convenience of Lemma \ref{lm:momentinverse} and the explicit nature of the corresponding moment-generating function, to estimate negative moments, but this can be done by other means for other Gaussian processes and their discrete-time observations. Similarly, as mentioned in Section \ref{sec:coupling}, we use the convenience of being able to calculate the exact value of the $L^2(\Omega)$ distance between the constituent elements of $\theta$ and $\theta_n$ (e.g. by employing Faulhaber's formula for the partial sum of the powers of integers). But these expressions can be estimated nearly as precisely, using the kernel representations, by invoking comparisons between series and Riemann integrals, with error terms of the same order as the second-order terms in Propositions \ref{prop:secondmoment} and \ref{prop:upperboundforBn-B}.
\newpage
\bibliographystyle{plain}
|
\section{\label{sec:intro}Introduction}
Double wedge configuration for studying hypersonic flows over solid surfaces is an ingenious idealization. It is geometrically simple yet produces a diversity of complex flow physics. Double wedge configuration is useful for understanding the high thermo-mechanical loads generated near corners contained between the control surfaces and the fuselage of hypersonic vehicles. High thermo-mechanical loads on the vehicle can cause loss of control as well as spoil the structural integrity of the vehicle. The catastrophic failure of the X-15 aircraft is an apt example of this problem in the research community. Also, a hypersonic flow intake is designed with a similar double ramp configuration to provide compression of inflow for the operation of scramjet engines. A large unsteadiness in the flow or significant separation can reduce the efficiency of the engine; moreover, it causes instabilities\cite{devaraj2020experimental,sekar2020unsteady}.
Although the experimental study of hypersonic flows is a challenging task due to the scarcity of observation techniques as well as the inordinate cost of assembling and running such a facility, a continuous effort has been made towards understanding such high thermal and mechanical loads in hypersonic flows. The earliest account is from ref.\cite{edney1968anomalous}, where shock-shock interaction mechanisms have been categorized into six types, and their roles are identified in the generation of high peak pressure and peak heat-transfer rates near shock impingement point on the model. This categorization has been widely acknowledged in analyzing and understanding shock-shock interactions in all the further experimental as well as numerical studies. Olejniczak\cite{olejniczak1996high} first studied the flow over double wedge experimentally and numerically to validate the non-equilibrium chemistry models used in Computational Fluid Dynamics (CFD). They found a discrepancy between heat transfer rates obtained from CFD compared to experiments and attributed it to the deficiencies of the chemistry models; however, the flow was very dependent on the size of the separation zone predicted. Later, Olejniczak \cite{olejniczak1997numerical} further investigated inviscid shock-shock interactions and transition between different types of interactions depending on the second wedge angle in a double wedge configuration exposed to supersonic as well as hypersonic flows. The study performed for a diatomic perfect gas ($\gamma$ = 1.4), Mach number ($M_\infty$) = 9, fore-wedge angle ($\theta_1$) = $15^\circ$, fore to aft-wedge length ratio ($L_1/L_2$) = 1 and aft-wedge angle variation from $35^\circ$ to $60^\circ$ revealed that the inviscid shock-shock interaction mechanism transitions from type VI $\rightarrow$ V $\rightarrow$ IV $\rightarrow$ IVr. This interaction mechanism results in an under-expanded supersonic jet along the surface and causes high oscillations in pressure along the wall surface. Ben-dor\cite{ben2003self} in their study showed a self-induced oscillation of the shock system in the range of $42^\circ < \theta_2 < 43^\circ$ with the same flow configuration as described in ref.\cite{olejniczak1997numerical} with $L_1/L_2$ = 2. Later, a high-resolution numerical study was performed in ref.\cite{hu2008numerical}, where $M_\infty$ = 7 and 9 were simulated over a double wedge with $\theta_1=15^\circ$ and $L_1/L_2$=2. They have considered the variation of caloric properties of the gas with temperature, but the flow was still modeled as inviscid. A difference in $\theta_2$ was observed compared to the study of ref.\cite{ben2003self}, where self-induced oscillations occur, and it was demonstrated that the difference was due to the difference of gas model used and not due to the numerical resolutions or schemes. It was also conjectured that a viscous dissipation might damp down such self-sustained oscillations of the shock system due to a change in flow topology. Still, no detailed viscous computations were carried out due to numerical difficulties.
In ref.\cite{swantek2012heat}, a range of new experimental data was put forward regarding shock wave and separation region interaction on a double wedge configuration and the coupling between fluid mechanics and thermochemistry of hypersonic flow. This work has attracted a portion of the CFD community because of the availability of heat transfer rate and flow visualization through schlieren data for a high fore-wedge angle ($\theta_1$)=$30^\circ$ as well as an aft-wedge angle ($\theta_2$)=$55^\circ$ where the flow separation at the corner is significant. A large number of research groups participated in a study to predict the flow features of ref.\cite{swantek2012heat}, numerically, in ref.\cite{knight2017assessment} for both low enthalpy as well as high enthalpy flows where thermochemistry plays an important role. Various programs have achieved different degrees of accuracy for predicting overall flow features and wall heat transfer rates. Still, most of the simulations show issues in matching the separated flow region with the experiment. The double wedge case in ref.\cite{swantek2012heat} was first numerically investigated in detail by Komieves et al. in ref.\cite{komives2014numerical}. It was observed that a numerically first-order accurate solution could predict the wall heat flux in the separation region and shock impingement regions very well compared to the experiment but failed to predict it right in the attached flow region, bringing caution while interpreting a solution method that is numerically less accurate. Further investigation with second-order numerical methods revealed more detailed features, and the flow was seen to reach a low-frequency periodic state. 3D simulations showed differences with the 2D simulation results, and span-wise variations in the flow was seen. However, it should also be noted that the wedge has a low span-wise to fore-wedge length ratio ($L_z/L_1$) = 2, which results in a large contribution of edge effect from the geometry. Overall, none of the computational results were found to be in complete agreement with the experiment. Some other published research also points towards the effect of side walls on the three-dimensionality of the separation region for high speed flows.\cite{funderburk2016experimental,huang2016evolution} Durna et al.\cite{durna2016shock} also investigated the detailed flow physics involved in the low enthalpy case of ref.\cite{swantek2012heat} with Nitrogen ($N_2$) as a working fluid where the effect of thermochemistry is negligible with the complete viscous flow simulation. Effect of variation of aft-wedge angle ($45^\circ<\theta_2<60^\circ$) was also considered to find out the change in shock-shock interaction mechanism. In recent work, Durna et al.\cite{durna2019time} further showed that in a long term unsteady simulation of this flow configuration, the flow never achieves a steady-state rather it settles down in a periodic self-sustained oscillation of the complete shock system. A similar observation was also made in ref.\cite{knight2017assessment}, contrary to the experiments in ref.\cite{swantek2012heat}, which was conducted for a very small time duration. In ref.\cite{durna2020effects}, Durna et al. further investigated the effects of flow three-dimensionality in the separated flow region at a large aft-wedge angle ($\theta_2 = 55^\circ$). The study reveals 3-D flow structures are influencing overall shock-structures and thermo-mechanical loading, which is mainly due to low span-wise to a fore-wedge length of the wedge ($L_z/L_1$=2). Still, there is a large discrepancy between experimental and numerical wall heat transfer rate prediction. A more recent numerical work in ref.\cite{reinert2020simulations} further showed that the flow is completely in the continuum regime, and other observations about separation region and unsteadiness from the previous pieces of literature were corroborated.
The investigations conducted by Durna et al. in \cite{durna2016shock,knight2017assessment,durna2019time,durna2020effects} reveal valuable insight in the physics related to the shock-shock and shock-boundary layer/separation region on the double wedge configuration. These simulations are performed using a solver called \textit{rhoCentralFoam}\cite{greenshields2010implementation} in OpenFOAM\cite{greenshields2015openfoam}, which is an open-source C++ based CFD platform. This solver has been extensively used for various kinds of supersonic and hypersonic flow simulations in the CFD community for a long time\cite{soni2018role,soni2018investigation}. This solver is second-order accurate in space and only first-order accurate in time. This deficiency produces many issues in simulating unsteady hypersonic flows. Authors have found out that the sequential time-integration of inviscid fluxes of conservation equations used in this solver has made this solver inherently unstable for time integration at a high CFL number ($\approx 1.0$). This kind of restriction is well known to the OpenFOAM CFD community, and a relatively lower CFL number ($\approx 0.2$) is recommended for the CFD simulations. This, still, can produce small oscillations and instabilities in the solution and make a long-duration simulation expensive due to the choice of a very small time step. Moreover, the use of a first-order time integration method also contributes to the above problem as well as adds excess numerical dissipation in unsteady simulation, which has not been of importance when the flow had to be studied only when in steady-state. Considering these limitations of {\it rhoCentralFoam} solver for a very long duration unsteady computation of hypersonic flow over a double wedge configuration, authors have developed an improved algorithm for \textit{rhoCentralFoam} solver in OpenFOAM framework which time integrates all conservation equations simultaneously removing the instabilities from \textit{rhoCentralFoam}. It is stable at CFL$\approx1.0$ for unsteady flow simulations. This improvement is further enhanced by the implementation of a $3^{rd}$ order TVD Runge-Kutta time integration method. A brief description of this new solver is given in sec. \ref{sec:math}.
Despite a large number of studies available on this topic, there is a large variation between the numerical predictions best summarized in ref.\cite{knight2017assessment} and actual experimental observations in ref.\cite{swantek2012heat}. Authors think these discrepancies can be attributed to two reasons. The first reason points towards the extremely short duration of the experiment in which the flow was not fully developed, especially the corner flow separation region. Due to the difference in the time-averaging window, a discrepancy in the wall heat flux can be seen. The second reason is the numerical inaccuracies, as pointed out in ref.\cite{komives2014numerical}. This manuscript provides more accurate computational validation of the experimental data along with the improved observation of unsteady flow over the double wedge configuration. The unsteadiness is shown to go away for the exact geometry of ref.\cite{swantek2012heat} with grid refinement, and a parameter regarding geometric configuration for shock reflection is identified, which results in a self-sustained oscillating shock system.
A brief description of the mathematical methods used in the current simulations is provided in sec. \ref{sec:math} and a few validation cases relevant to the resolution of current flow physics are shown in appendix \ref{Validation}. Computational setup for the double wedge flow is described in sec. \ref{sec:setup}. A detailed and systematics grid refinement study is performed in sec. \ref{sec:grid comparison} and the flow physics obtained from the computation is discussed in detail in sec. \ref{sec:result}.
\section{\label{sec:math}Mathematical method}
For compressible flow simulation, a set of conservation equations of mass, momentum, and energy as given by eq. (\ref{conservationEqn}) is solved. Here $\vec{W} = [\rho\quad \rho \vec{u}\quad \rho E]^T$ represents mass density, linear momentum, and total energy of the control volume.
\begin{equation}
\frac{\partial}{\partial t}\int_{\Omega}\vec{W} d\Omega + \oint_{\partial\Omega}(\vec{F_c} - \vec{F_\nu}) dS = 0
\label{conservationEqn}
\end{equation}
Here, $\vec{F_c}$ and $\vec{F_\nu}$ are convective and diffusive fluxes, respectively. The expressions for these terms are given in eq. (\ref{fluxRepresentation}). $\hat{n}$ represents unit normal vector to the faces of the control volume.
\begin{equation}
\vec{F}_c = \left[
\begin{array}{c}
\rho(\vec{u}.\hat{n}) \\
\rho\vec{u}(\vec{u}.\hat{n})+p \hat{n} \\
(\rho E + p)(\vec{u}.\hat{n}) \\
\end{array} \right]\quad
\vec{F}_\nu = \left[
\begin{array}{c}
0 \\
\overline{\overline{\tau}}^T.\hat{n} \\
(\overline{\overline{\tau}}^T.\hat{n}).\vec{u} + \kappa(\nabla T).\hat{n} \\
\end{array} \right]
\label{fluxRepresentation}
\end{equation}
E is defined as $E = e+ \frac{1}{2}|\vec{u}|^2$ where e is the internal energy of the control volume. $e$ relates to temperature $T$ as $e(T)=e(T_0)+\int_{T_0}^{T}C_v(T)dT$ and variation of $C_v(T)$ with temperature is estimated using JANAF table\cite{chase1998nist}. $\overline{\overline{\tau}}= \mu[(\nabla \vec{u}) + (\nabla \vec{u})^T] -\frac{2\mu}{3} tr(\nabla \vec{u})$ is the viscous stress tensor and $\mu$ and $\kappa$ are dynamic viscosity and thermal conductivity coefficient. In addition to eqs. (\ref{conservationEqn}) and (\ref{fluxRepresentation}), the state equation for an ideal gas is used. Sutherland relation accounts for the variation of $\mu$ and $k$ with temperature.
To solve the above set of governing equations, a new, improved algorithm for {\it rhoCentralFoam} is developed in OpenFOAM framework\cite{greenshields2015openfoam}. This solution method deploys an operator-splitting method that splits the inviscid and viscous part of the solution. The inviscid part of the solution is time-integrated explicitly using the third-order TVD Runge-Kutta method in conjunction with the flux-vector splitting method described in ref.\cite{greenshields2010implementation} with the K-T (Kurganov-Tadmor) method from ref.\cite{kurganov2000new}. The viscous term is discretized using $2^{nd}$ order central scheme, and the viscous corrector part of the solution is computed using an implicit temporal discretization of the governing equation.
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth, trim={0 2cm 0 2cm}, clip]{1.pdf}
\caption{Comparison between solution algorithm for the \textit{rhoCentralFoam} (left) and it's improved version (right)}
\label{fig:algorithm}
\end{figure}
The main difference in the new solver compared to the previous solver \textit{rhoCentralFoam}, apart from the implementation of the high order time integration method, is time integration of inviscid flux. In \textit{rhoCentralFoam}, convective fluxes for mass, momentum, and energy are time-integrated sequentially, which causes instability in the computational method due to the use of a lagging field value from the previous time integration. To avoid this issue, the new solver time-integrates all three convective fluxes simultaneously for a single time step (or stage of Runge-Kutta integration method) so that no lag in the field value from previous time is created. For this, the field $\vec{W}$ is transformed in $\vec{W_p} = [p \quad \vec{u}\quad e]$ using a transformation matrix. Details of such a transformation matrix can be found in ref.\cite{blazek2015computational}. This difference in the algorithm is graphically shown in fig. \ref{fig:algorithm}. The accuracy of this new implementation has been verified for various engineering problems, and only a few test cases of interest are shown in appendix \ref{Validation} for validation.
\section{\label{sec:setup}Computational setup}
Figure \ref{fig:dwDomain} illustrates the domain used for the computation of double wedge hypersonic flow. The fore-wedge length ($L_1$) is 50.8 mm (2 in) long, and aft-wedge length is $L_1$/2 based on the experimental setup of ref. \cite{swantek2012heat}.
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth]{2.pdf}
\caption{Domain for double wedge configuration}
\label{fig:dwDomain}
\end{figure}
Inlet is placed at a distance $L_1/8$ upstream from the leading edge (LE) in order to remove the effect of enforced inlet boundary condition near the LE. A plane horizontal wall of length 0.75$L_1$ is used downstream of the second wedge in order to remove any effect of outlet to the flow over the wedges. For the same reason, the top boundary is also kept at a distance of 1.5$L_1$ to avoid any flow obstruction due to partial reflection from the outflow boundaries. For this simulation, the fore-wedge angle ($\theta_1$) is fixed at $30^\circ$, and the aft-wedge angle ($\theta_2$) is considered to be $55^\circ$ based on experiments in ref.\cite{swantek2012heat}.
A fixed inflow condition is provided at the inlet where velocity ($U_\infty$) = 1972 m/s, pressure ($P_\infty$) = 391 Pa, and temperature ($T_\infty$) = 191 K based on the experimental setup in ref.\cite{swantek2012heat}. This results in a freestream Mach no. ($M_\infty$) = 7.0. A symmetry boundary condition is provided at the symmetry plane, and the top and the right outlet are assigned wave transmissive boundary condition. Both the wedges and the downstream plane is considered isothermal no-slip viscous wall with surface temperature ($T_\infty$) = 300 K in accordance with the experimental setup in ref.\cite{swantek2012heat}. The flow in the internal domain is initialized with the inflow velocity ($U_\infty$), pressure ($P_\infty$) and temperature ($T_\infty$). Gaseous Nitrogen (N$_2$) is considered as the working fluid, and the JANAF tables\cite{chase1998nist} are used for calculating the caloric properties of the fluid at different temperature values. From the experiment\cite{swantek2012heat} and previous numerical computations\cite{durna2016shock,durna2019time,durna2020effects,knight2017assessment} it has been established that the flow is laminar. Hence, only a laminar flow simulation is considered here.
\section{Grid independence study\label{sec:grid comparison}}
In numerical simulations, truncation error could be accumulated either through insufficient grid size or large time-integration steps, or low order numerical schemes. Since a $3^{rd}$ order TVD Runge-Kutta time integration method with a second-order spatial accuracy is used, which can provide a stable solution at CFL number =1, all the simulations are performed at CFL=1. This results in time-step size in the range of 1 to 3 ns for all the simulations considered here, which is much smaller than the physical time scale.
For a grid independence study, two sets of studies need to be considered. The first study involves sufficient resolution of gradients in the inviscid shock-shock interaction region and vortices in the separated flow region. The second study focuses on a sufficient wall resolution so that correct velocity and temperature gradients are predicted at the wall.
\subsection{Study 1: Resolution of gradients away from the wall}
A structured grid is generated within the domain, details of which are given in table \ref{tab:dwGrid}. Grid blocking information is shown using lines named "Block lines" in fig. \ref{fig:dwDomain}. Block line numbered "5" runs parallel to the wedge surface along with the domain at a height $0.15L_1$ such that on the aft-wedge it passes through the shock-shock intersection region, and on the fore-wedge it confines the separation region with the wall. In the first grid independence study, the grid is refined only between the aft-wedge compression corner and expansion corner. The details of variation in horizontal and vertical size of grid cells are shown in Table \ref{tab:dwGrid}.
\begin{table}[h!]
\centering
\begin{tabular}{|l |l |l |l |l |l |l |l |l |l |l |}\hline
Grid & $\Delta x_0/L_1$ & $\Delta x_1/L_1$ & $\Delta x_2/L_1$ & $\Delta x_3/L_1$ & $\Delta x_4/L_1$ & $\Delta y_w/L_1$ & $\Delta y_1/L_1$ & $\Delta y_2/L_1$ & No. of cells & $U_\infty\overline{\Delta t}/L_1$\\ \hline
Coarse & 0.01 & 0.01 & 0.01 & 0.01 & 0.025 & $10^{-4}$ & 0.01 & 0.04 & 91524 & $1.12\times10^{-4}$\\
Medium & 0.01 & 0.01 & 0.005 & 0.005 & 0.025 & $10^{-4}$ & 0.005 & 0.04 & $1.99\times10^5$ & $7.92\times10^{-5}$ \\
Fine & 0.01 & 0.01 & 0.001 & 0.001 & 0.025 & $10^{-4}$ & 0.001 & 0.04 & $1.27\times10^6$ & $4.98\times10^{-5}$ \\
Finer & 0.01 & 0.01 & $5\times10^{-4}$ & $5\times10^{-4}$ & 0.025 & $10^{-4}$ & $5\times10^{-4}$ & 0.04 & $2.95\times10^6$ & $4.6\times10^{-5}$ \\ \hline
\end{tabular}
\captionof{table}{Grid details for the first grid comparison study. $\Delta x_i$ represents horizontal cell length at vertical block line "i" and $\Delta y_j$ represents vertical cell length at horizontal block line "j" in fig. \ref{fig:dwDomain}.}
\label{tab:dwGrid}
\end{table}
In the aft-wedge grid refinement, stream-wise grid stretching is avoided so that the truncation error locally reduces quadratically with grid refinement, and $\Delta y_1 \approx \Delta x_1$ is chosen so that the local grid aspect ratio is close to 1. The boundary layer is resolved in the region 0.15$L_1$ above the wedges such that the first cell height above the wedges (w) is $10^{-4}L_1$. While refining the grid in the internal domain, grid sizes at the domain boundaries are kept constant, as shown in Table \ref{tab:dwGrid}. All the variations in the grid sizes between block lines are matched using a geometric grid stretching.
Figure \ref{fig:30_55_2_260us} shows a comparison of flow structure using the grids from Table \ref{tab:dwGrid} at t = 260 $\mu s$. Qualitatively all four grids provide very similar flow structures such as shock-shock interaction pattern and separation regions. The leading edge shock (LS) and the Intermediate shock (IS) after LE shock interacts with the separation shock (SS) are closely comparable to one seen in schlieren photograph from Swantek's experiment\cite{swantek2012heat}. The variation in separation point location on the fore-wedge and the transmitted shock impingement location on the aft-wedge is also small among the simulations using four grid resolutions. But the major difference is seen in the resolution of the strength of the shear layer and size of vortices formed inside the separation region. Figure \ref{fig:sch260us} shows a schematic of the shock-shock interaction and reflection of transmitted shock from the wedge. This schematic provides an overall view of the interaction and reflection pattern omitting the complex details of the separation region. Figure \ref{fig:pressure260usStudy1} shows the distribution of wall pressure along the wedge length at t = 260 $\mu s$. The location of separation point (SP) on the fore-wedge region and shock impingement point/reattachment point (RP) on the aft-wedge region is shifted upstream when resolving grid from Coarse to the medium where cell sizes are halved.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=0.55\linewidth]{3a.pdf}
\caption{}
\label{fig:30_55_2_swantek_260us}
\end{subfigure}
\end{figure}
\begin{figure}[h!]\ContinuedFloat
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 30cm 9cm}, clip]{3b.pdf}
\caption{}
\label{fig:30_55_2_Coarse_260us}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 30cm 9cm}, clip]{3c.pdf}
\caption{}
\label{fig:30_55_2_Medium_260us}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 30cm 9cm}, clip]{3d.pdf}
\caption{}
\label{fig:30_55_2_Fine_260us}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 30cm 9cm}, clip]{3e.pdf}
\caption{}
\label{fig:30_55_2_Finer_260us}
\end{subfigure}
\caption{A comparison of shock pattern resolution with four different grids with $\theta_2=55^\circ$ and $L_1/L_2=2$ at t = 260$\mu s$. (\subref{fig:30_55_2_swantek_260us}) Experiment (Reproduced from Swantek\cite{swantek2012heat} with permission from the author) (\subref{fig:30_55_2_Coarse_260us}) Coarse grid (\subref{fig:30_55_2_Medium_260us}) Medium grid (\subref{fig:30_55_2_Fine_260us}) Fine grid (\subref{fig:30_55_2_Finer_260us}) Finer grid. Visualization using schlieren images ($|\nabla \rho|$ in computation) }
\label{fig:30_55_2_260us}
\end{figure}
It should be noted that the reattachment point is the same as the shock impingement location because the separation region is not yet fully developed, and the growth of the separation region is under the influence of adverse pressure gradient generated due to the transmitted shock (TS). But the further resolution of the grid from Medium to Fine where cell sizes are reduced by a factor of 5, the shifts in SP and RP are marginal. Further halving the cell size in finer grid does not provide any different results from the fine grid within engineering accuracy. The most important observation is the sharp resolution of the peak pressure on the aft-wedge and the sharpness of pressure peaks in the separated region. The pressure peak increases because of the increased strength of the transmitted shock resolved using refined grids. The improvement is shown due to grid resolution in the pattern of the wall pressure in fig. \ref{fig:pressure260usStudy1} and schlieren visualization in fig. \ref{fig:30_55_2_260us} complement each other.
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth, trim={0 0 0 12cm}, clip]{4.pdf}
\caption{A schematic of shock-shock interaction and shock reflection pattern with small separation region. Nomenclature: LE (Leading edge), CC (Compression corner), EC (Expansion corner), SP (Separation point), RP (Reattachment point), TP1 (First tripple point), TP2 (Second tripple point), LS(Leading edge shock), SS (Separation shock), IS (Intermediate shock), BS (Bow shock), RS (Reflected shock), TS (Transmitted shock). Dashed lines represent the shear layer.}
\label{fig:sch260us}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth]{5.pdf}
\caption{Instantaneous wall pressure distribution with $\theta_2=55^\circ$ and $L_1/L_2=2$ at t = 260 $\mu s$}
\label{fig:pressure260usStudy1}
\end{figure}
Figure \ref{fig:qMeanStudy1} shows the comparison of average wall heat flux with the experimental results of Swantek\cite{swantek2012heat}. There is a discrepancy in the published literature regarding the time window of comparison between computed and experimental wall heat flux. In the experiments\cite{swantek2012heat}, average heat flux data is acquired after the flow has completely established. But the published computational research shows that the flow is not fully developed in the experimental duration of the measurement.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=0.7\linewidth]{6a.pdf}
\caption{}
\label{fig:qMeanExpStudy1}
\end{subfigure}
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=0.7\linewidth]{6b.pdf}
\caption{}
\label{fig:qMeanExp400usAvgStudy1}
\end{subfigure}
\caption{Mean wall heat flux with $\theta_2=55^\circ$ and $L_1/L_2=2$. (\subref{fig:qMeanExpStudy1}) Average between t = 150 $\mu s$ and 310 $\mu s$ (\subref{fig:qMeanExp400usAvgStudy1}) Average between t = 0 and 400 $\mu s$. Experimental data is from Swantek (Reproduced from Swantek\cite{swantek2012heat} with permission from the author)}.
\label{fig:qMeanStudy1}
\end{figure}
Following the averaging time window used in ref.\cite{durna2016shock,durna2019time}, figure \ref{fig:qMeanExpStudy1} shows the comparison of wall heat flux averaged between t = 150 $\mu s$ and 310 $\mu s$ for the four grids used in the simulation. All four grids show very similar results and are in good agreement with the experimental data from ref.\cite{swantek2012heat} except near the shock impingement point. With increased grid resolution, peak wall heat flux increases along with a movement upstream. The discrepancy between computation and experiment is attributed to the ambiguity in the time-averaging window used in the experiment. It is not surprising to see that a coarse grid predicts better peak wall heat flux compared to more resolved grids, but with the coarse grid, the separation region is also underpredicted with the incorrect resolution of shock waves and vortices. A similar observation was also made in ref.\cite{komives2014numerical} when using first-order numerical schemes. A time-averaging window of 400 $\mu s$ from the starting of the simulation, shown in fig. \ref{fig:qMeanExp400usAvgStudy1}, gives a very close match between the computed results and the experiment. In fig. \ref{fig:qMeanExp400usAvgStudy1}, near the shock impingement location on the aft-wedge, all the features with correct magnitude of the experimental wall heat flux data are closely replicated by the fine grid computation, and a smoothening of features is seen on a coarser grid. This behavior can be easily understood using the flow structure comparison shown in fig. \ref{fig:30_55_2_260us}.
Until now, the comparison is made in a small time window ($\approx$ 310 $\mu s$) in accordance with the duration of the experiment; but, the computational studies in the literature reveal that the complete flow development takes much longer than the experimental duration and the simulations need to be run for a longer time. It has been seen that the small separation region formed in fig. \ref{fig:30_55_2_260us} is not fully developed. Though all three grids give small variation in overall flow at the early stages of flow development, after the flow is fully developed, a large separation region will be formed. In fig. \ref{fig:30_55_2_8ms}, a comparison between the four grids is shown at t = 8ms when the flow is fully developed. It also shows the time-dependent variation of wall pressure distribution along the surface for the three grids. In figures \ref{fig:30_55_2_Coarse_pressure}, \ref{fig:30_55_2_Medium_pressure} and \ref{fig:30_55_2_Fine_pressure} pressure contours are shown in x-t dimensions. The X-axis represents the horizontal location on the wedge surface, whereas the y-axis represents the physical time of the flow. X/L = 0 is the location of the leading edge. Due to a large variation in pressure at the separation point, reattachment point, or shock impingement points, pressure iso-contours can be used in tracing the movement of such flow structures in space and time simultaneously.
In fig. \ref{fig:30_55_2_Coarse_8ms} and \ref{fig:30_55_2_Medium_8ms}, the resolution of shock strengths and vorticity has improved with grid resolution so that the overall size of the separation region is larger on the medium grid compared to the coarse grid. This has also pushed the shock-shock interaction region upwards, and the transmitted shock no longer impinges near the expansion corner for the medium grid. A schematic for this shock-shock interaction pattern is shown in fig. \ref{fig:sch3ms}. This defers from the shock pattern on the aft-wedge shown in fig. \ref{fig:sch260us} in two ways. First, the transmitted shock (TS) no longer impinges on the aft-wedge and has moved downstream of the expansion corner. Second, the tripple point (TP2) has moved farther away from the wedge so that a type V shock-shock interaction pattern is formed.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{0.545\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{7a.pdf}
\caption{}
\label{fig:30_55_2_Coarse_8ms}
\end{subfigure}
\begin{subfigure}[t]{0.445\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{7b.pdf}
\caption{}
\label{fig:30_55_2_Coarse_pressure}
\end{subfigure}
\begin{subfigure}[t]{0.545\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{7c.pdf}
\caption{}
\label{fig:30_55_2_Medium_8ms}
\end{subfigure}
\begin{subfigure}[t]{0.445\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{7d.pdf}
\caption{}
\label{fig:30_55_2_Medium_pressure}
\end{subfigure}
\end{figure}
\begin{figure}[h!]\ContinuedFloat
\begin{subfigure}[t]{0.545\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{7e.pdf}
\caption{}
\label{fig:30_55_2_Fine_8ms}
\end{subfigure}
\begin{subfigure}[t]{0.445\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{7f.pdf}
\caption{}
\label{fig:30_55_2_Fine_pressure}
\end{subfigure}
\begin{subfigure}[t]{0.545\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{7g.pdf}
\caption{}
\label{fig:30_55_2_Finer_8ms}
\end{subfigure}
\begin{subfigure}[t]{0.445\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{7h.pdf}
\caption{}
\label{fig:30_55_2_Finer_pressure}
\end{subfigure}
\caption{Numerical schlieren visualization of shock waves and separation region and spatio-temporal variation of wall pressure at $L_1/L_2=2$ and $\theta_2 = 55^\circ$ with different grid resolutions. (\subref{fig:30_55_2_Coarse_8ms}, \subref{fig:30_55_2_Coarse_pressure}) Coarse grid (\subref{fig:30_55_2_Medium_8ms}, \subref{fig:30_55_2_Medium_pressure}) Medium grid ( \subref{fig:30_55_2_Fine_8ms}, \subref{fig:30_55_2_Fine_pressure}) Fine grid (\subref{fig:30_55_2_Finer_8ms}, \subref{fig:30_55_2_Finer_pressure}) Finer grid }
\label{fig:30_55_2_8ms}
\end{figure}
This has a significant impact on the overall unsteady flow physics in this case. In fig. \ref{fig:30_55_2_Coarse_pressure}, it can be seen that the pressure distribution on the wedge periodically changes with time due to a sustained oscillation of the shock structure over the second wedge. This has also been studied in detail in the previous literature\cite{durna2016shock,durna2019time}. But in \ref{fig:30_55_2_Medium_pressure}, flow is seen to reach a steady state because of improvement in the prediction of separation region size due to better grid resolution. Further resolutions of the grid in fine and finer grid cases have revealed a series of primary, secondary, and tertiary vortices confined within the separation region, which shows unsteady motion and produces small time-dependent oscillation in the pressure distribution as shown in fig. \ref{fig:30_55_2_Fine_pressure}. More detailed vorticity pattern comparison between medium, fine and finer grid is shown in fig. \ref{fig:30_55_2_7p04ms_vorticity}. In fig. \ref{fig:Medium_vorticity}, only one primary and one secondary vortices are generated at the compression corner, which reaches a steady state after the separation region is fully developed. A similar vorticity pattern was also seen in 3D simulations of ref.\cite{komives2014numerical} But on further resolving the grid in fig. \ref{fig:Fine_vorticity} and \ref{fig:Finer_vorticity}, more primary and secondary vortices are seen in the separation region along with a pair of oscillating tertiary vortices, which makes the complete flow unsteady.
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth, trim={0 0 0 12cm}, clip]{8.pdf}
\caption{A schematic of shock-shock interaction and shock reflection pattern with a large separation region. Nomenclature: LE (Leading edge), CC (Compression corner), EC (Expansion corner), SP (Separation point), RP (Reattachment point), TP1 (First tripple point), TP2 (Second tripple point), LS(Leading edge shock), SS (Separation shock), IS (Intermediate shock), BS (Bow shock), RS (Reattachment shock), TS (Transmitted shock). Dashed lines represent the shear layer.}
\label{fig:sch3ms}
\end{figure}
Hence, it is shown that the fine grid is best suited for long-duration flow simulation in this case. The medium grid produces results very close to Fine grid, but the high-frequency oscillation of the shock-system generated due to vortical motion inside the separation region is lost. The coarse grid cannot be used because it produces a result similar to other grids at the beginning of flow development, but in the long term, it produces a spurious low-frequency shock oscillation due to incorrect prediction of separation region and transmitted shock. And, the finer grid produces the same results as the fine grid without any significant improvement. This shows that the fine grid is the converged grid and is sufficient for correctly resolving such high speed separated flows for a very long time.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=\linewidth, trim={1cm 20cm 0 0}, clip]{9a.pdf}
\caption{}
\label{fig:Medium_vorticity}
\end{subfigure}
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=\linewidth, trim={1cm 20cm 0 0}, clip]{9b.pdf}
\caption{}
\label{fig:Fine_vorticity}
\end{subfigure}
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=\linewidth, trim={1cm 20cm 0 0}, clip]{9c.pdf}
\caption{}
\label{fig:Finer_vorticity}
\end{subfigure}
\caption{Comparison of span-wise vorticity in the corner separated flow region with $\theta_2 = 55^\circ$ and $L_1/L_2=2$ due to grid resolution. (\subref{fig:Medium_vorticity}) Medium grid (\subref{fig:Fine_vorticity}) Fine grid (\subref{fig:Finer_vorticity}) Finer grid}
\label{fig:30_55_2_7p04ms_vorticity}
\end{figure}
\subsection{Study 2}
In the previous grid comparison study, the grid had been resolved, maintaining the wall and the boundary cells resolution the same. But wall resolution can also affect the separation point location and shock boundary layer interaction pattern. Hence in this subsection, two additional grids with first grid cell height at the wall = 2$\times10^{-4}\times L_1$ (Medium wall grid), and 4$\times10^{-4}\times L_1$ (Coarse wall grid) has been considered along with fine grid ($10^{-4}\times L_1$). Averaged wall heat flux between t = 150 $\mu s$ and 310 $\mu s$ is shown in fig. \ref{fig:qMeanExpStudy2} and between t = 0 and 400 $\mu s$ is fig. \ref{fig:qMeanExp400usAvgStudy2}. Both figures show that Medium and fine wall resolution produces the same result, and a slightly increased peak value of wall heat flux is observed for coarse wall grid. Also, instantaneous wall pressure distribution along the wedge is shown in fig.\ref{fig:pressure3msStudy2} for t = 3ms. A negligible variation in the pressure distribution is seen, and the grid independence study can be considered converged for the fine grid solutions. This should also be noted that the overall flow physics is much more sensitive to the grid resolution outside the boundary layer as compared to inside the boundary at the wall due to the presence of a large separation bubble.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=0.7\linewidth]{10a.pdf}
\caption{}
\label{fig:qMeanExpStudy2}
\end{subfigure}
\begin{subfigure}[t]{\linewidth}
\centering
\includegraphics[width=0.7\linewidth]{10b.pdf}
\caption{}
\label{fig:qMeanExp400usAvgStudy2}
\end{subfigure}
\caption{Mean wall heat flux with $\theta_2=55^\circ$ and $L_1/L_2=2$. (\subref{fig:qMeanExpStudy2}) Average between t = 150 $\mu s$ and 310 $\mu s$ (\subref{fig:qMeanExp400usAvgStudy2}) Average between t = 0 and 400 $\mu s$. Experimental data is from Swantek (Reproduced from Swantek\cite{swantek2012heat} with permission from the author)}
\label{fig:qMeanStudy2}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.7\linewidth]{11.pdf}
\caption{Instantaneous wall pressure distribution with $\theta_2=55^\circ$ and $L_1/L_2=2$ at t = 3 ms}
\label{fig:pressure3msStudy2}
\end{figure}
\section{Results and Discussion\label{sec:result}}
In the previous section, we saw that with an insufficient grid, an underpredicted separation region could result in the wrong locations of shock structures. If this results in the incidence shock impinging on the aft-wedge, there could be a spurious unsteady and periodic shock-shock interaction, which was a topic of discussion in ref.\cite{durna2016shock,durna2019time}. However, a further grid resolved simulation on the fine grid has shown that the shock-shock interaction becomes quasi-steady with a high-frequency oscillation due to the tertiary vortices.
Although, for $L_1/L_2$ = 2, $\theta_1=30^\circ$ and $\theta_2=55^\circ$, it is shown that the unsteady and periodic shock-shock interaction mechanism, seen for the coarse grid, is not real because on subsequent grid refinments such oscillations disappear. But such differences are due to change in location of incidence shock as the size of separation region changes. The interaction mechanism observed with a coarse mesh encourages us to investigate it for a parameteric variation of the geometry where such interaction can be seen realistically on a refined grid. To that end, the same configuration has been simulated for $L_1/L_2$ = 1.5 such that fore-wedge length is kept constant (=50.8 mm). Due to increased length of the aft-wedge, the separation region is enlarged by a small amount, and more importantly, the expansion corner comes closer to the transmitted shock resulting in an unsteady and periodic shock-shock interaction mechanism. This can be seen in fig. \ref{fig:30_55_1p5} (multimedia view). In fig. \ref{fig:30_55_1p5_pressure}, a change in pressure distribution along with the wedge with respect to time, is shown. The distribution is very similar to one seen for coarse mesh simulation of $L_1/L_2$ = 2 case in fig. \ref{fig:30_55_2_Coarse_pressure}. The differences are seen in the separation point location, which has shifted more towards the leading edge of the fore-wedge. Also, the frequency of oscillation is larger than seen before in the case of coarse grid simulation on $L_1/L_2$ = 2 case due to growth of separation region size.
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{12a.pdf}
\caption{}
\label{fig:30_55_1p5_6p3ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{12b.pdf}
\caption{}
\label{fig:30_55_1p5_7ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{12c.pdf}
\caption{}
\label{fig:30_55_1p5_7p5ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{12d.pdf}
\caption{}
\label{fig:30_55_1p5_8ms}
\end{subfigure}
\caption{A numerical schlieren visualization of shock waves and separation region at $L_1/L_2=1.5$ and $\theta_2 = 55^\circ.$ (\subref{fig:30_55_1p5_6p3ms}) t = 6.3 ms (\subref{fig:30_55_1p5_7ms}) t = 7 ms (\subref{fig:30_55_1p5_7p5ms}) t = 7.5 ms (\subref{fig:30_55_1p5_8ms}) t = 8 ms. Watch animation (1.mp4) for more details. \protect\href{run:./1.mp4}{(Multimedia view)}}
\label{fig:30_55_1p5}
\end{figure}
It can be seen from fig.\ref{fig:30_55_1p5_pressure} that the oscillation cycles have a time-period of approximately 1.7 ms. Also, it can be seen from fig. \ref{fig:30_55_1p5_6p3ms} and \ref{fig:30_55_1p5_8ms} that the two states are very similar to each other, which are 1.7 ms delayed in time. It should be noted that the size of the separation region is larger in fig. \ref{fig:30_55_1p5_6p3ms} at t = 6.3 ms compared to \ref{fig:30_55_1p5_7ms} at t = 7 ms even in the absence of any shock impingement on the aft-wedge. This is due to the slow relaxation of the separation region from the shock impingement on the aft-wedge from the previous cycle of the flow. Between t = 6.3 ms and 7 ms, as the separation region contracts, it brings the impingement point of the transmitted shock from the plane region downstream of the expansion corner to the aft-wedge region. At t = 7 ms, the reattachment point is still undisturbed, but as time passes, the adverse pressure gradient generated due to shock impingement reaches the reattachment region and disturbs the separation region. This causes the separation point to move upstream and changes the shock-shock interaction pattern in the flow outside the separation region. Due to a change in shock-shock interaction pattern, there is no transmitted shock impinging on the aft-wedge. This again causes relaxation of the separation region and brings the state of the flow at t = 8 ms to a state similar to one seen at t = 6.3 ms completing a cycle. This pattern is seen for $L_1/L_2 = 1.5$ and not $L_1/L_2 = 2$ mainly because of the geometric constraint. For $L_1/L_2 = 2$ case, as the separation region relaxes for the first time when the flow is still developing, the transmitted shock never crosses the expansion corner to impinge on the aft-wedge due to shorter aft-wedge length. So, the separation region relaxes to the smallest stable size possible, and a quasi-steady state is achieved.
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{13.pdf}
\caption{A spatio-temporal variation of wall pressure at $L_1/L_2=1.5$ and $\theta_2 = 55^\circ.$}
\label{fig:30_55_1p5_pressure}
\end{figure}
This mechanism is further assessed for a smaller aft-wedge angle $\theta_2 = 50^\circ$ where the separation region will be smaller than in the previous case with $\theta_2 = 55^\circ$. The simulated density gradient and spatio-temporal variation of pressure is shown in fig. \ref{fig:30_50_2} (multimedia view), which has $L_1$ = 50.8 mm, $L_1/L_2 = 2$, $\theta_1 = 30^\circ$ and $\theta_2 = 50^\circ$ with the fine grid resolution. As expected, the size of the separation region is significantly smaller than the $\theta_2 = 55^\circ$ case, and the flow reaches a complete steady state in the absence of any tertiary vortex at the compression corner (CC).
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{0.545\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{14a.pdf}
\caption{}
\label{fig:30_50_2_gradRho}
\end{subfigure}
\begin{subfigure}[t]{0.445\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 20cm 0}, clip]{14b.pdf}
\caption{}
\label{fig:30_50_2_pressure}
\end{subfigure}
\caption{A numerical schlieren visualization of shock waves and separation region and spatio-temporal variation of wall pressure at $L_1/L_2=2$ and $\theta_2 = 50^\circ.$ (\subref{fig:30_50_2_gradRho}) Density gradient ($|\nabla \rho|$) (\subref{fig:30_50_2_pressure}) Wall pressure variation. Watch animation (2.mp4) for more details. \protect\href{run:./2.mp4}{(Multimedia view)}}
\label{fig:30_50_2}
\end{figure}
Figure \ref{fig:30_50_1p5_pressure} shows the spatio-temporal variation of pressure over the wedge for $\theta_2 = 50^\circ$ and $L_1/L_2 = 1.5$. It can be clearly seen that the flow achieves a time-periodic oscillatory state. It should also be noted that it takes a significantly long time to reach this periodic state of flow as compared to $\theta_2 = 55^\circ$ case. This difference should be attributed to the slower relaxation of the separation region at a smaller aft-wedge angle. From fig. \ref{fig:30_50_1p5_pressure} as well as fig.\ref{fig:30_50_1p5} (multimedia view), it can be seen that the period of oscillation is approximately 2.25 ms as the flow states in fig.\ref{fig:30_50_1p5_8ms} and \ref{fig:30_50_1p5_10p25ms} are almost identical. In fig. \ref{fig:30_50_1p5_9ms}, the separation region is comparatively smaller than the one seen at t = 8 ms, and the incidence shock impinges on the aft wedge. This disturbance near the reattachment point causes the separation region to grow and pushes the incidence shock away from the aft-wedge. This results in a further relaxation of the separation region, and the cycle repeats.
\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth]{15.pdf}
\caption{A spatio-temporal variation of wall pressure at $L_1/L_2=1.5$ and $\theta_2 = 50^\circ.$}
\label{fig:30_50_1p5_pressure}
\end{figure}
\begin{figure}[h!]
\centering
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{16a.pdf}
\caption{}
\label{fig:30_50_1p5_8ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{16b.pdf}
\caption{}
\label{fig:30_50_1p5_9ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{16c.pdf}
\caption{}
\label{fig:30_50_1p5_9p5ms}
\end{subfigure}
\begin{subfigure}[t]{0.495\linewidth}
\centering
\includegraphics[width=\linewidth, trim={0 0 10cm 0}, clip]{16d.pdf}
\caption{}
\label{fig:30_50_1p5_10p25ms}
\end{subfigure}
\caption{A numerical schlieren visualization of shock waves and separation region at $L_1/L_2=1.5$ and $\theta_2 = 50^\circ.$ (\subref{fig:30_50_1p5_8ms}) t = 8 ms (\subref{fig:30_50_1p5_9ms}) t = 9 ms (\subref{fig:30_50_1p5_9p5ms}) t = 9.5 ms (\subref{fig:30_50_1p5_10p25ms}) t = 10.25 ms. Watch animation (3.mp4) for more details. \protect\href{run:./3.mp4}{(Multimedia view)}}
\label{fig:30_50_1p5}
\end{figure}
\section{Conclusion}
A more accurate numerical simulation is performed for a hypersonic flow over a double wedge configuration. This is achieved using a more stable numerical solver as well as a better-resolved grid. A systematic grid comparison study is performed to establish the true nature of the flow. It is shown that with proper accuracy of the solution a quasi-steady flow is achieved for double wedge configuration at $\theta_1=30^\circ$, $\theta_2=55^\circ$, and $L_1/L_2=2$ at Mach number = 7. This is in contradiction to the general consensus among the published literature that after a long time, the flow settles down into a low frequecy periodically oscillating state for this configuration. It is also shown that by changing the wedge length ratio, a geometric constraint can be achieved where overall flow settles down in an oscillatory state, similar to one seen in previous literature. It is shown that the size of the separation region influences the overall shock-shock interaction pattern, which finally influences the steady or unsteady nature of the flow. The location of the incidence shock impingement point is more important while determining the nature of the developed flow, as seen by a comparison of $\theta_2 = 50^\circ$ and $55^\circ$ cases. Hence, the presence of incidence shock just downstream of the expansion corner while the separation region is overstretched is the single important parameter determining if the flow is going to be steady or periodic in nature. Different configuration can be achieved by varying different geometric parameters such as wedge lengths and wedge angles but a periodic state is achieved only when the incidence shock crosses the expansion corner to impinge on the aft-wedge while the over-stretched separation region is relaxing. This disturbes the process of separation region relaxation and makes the flow repeat the previous cycle.
\section*{Data Availability}
The data that support the findings of this study are available from the corresponding author upon reasonable request.
\section*{Supplementary Material}
See \protect\href{run:./4.mp4}{video (4.mp4)} for animation of the flow simulation with $L_1/L_2=2$ and $\theta_2=55^\circ$
\begin{acknowledgments}
Simulations are carried out on the computers provided by National PARAM Supercomputing Facility (CDAC) (www.cdac.in), and the manuscript preparation, as well as data analysis, has been carried out using the resources available at IITK (www.iitk.ac.in/cc). The support is gratefully acknowledged.
\end{acknowledgments}
|
\section{Introduction}
The \textit{credit assignment} problem in reinforcement learning~\citep{minsky1961steps,sutton1985temporal,sutton1988learning} is concerned with identifying the contribution of past actions on observed future outcomes. Of particular interest to the reinforcement-learning (RL) problem~\citep{sutton1998introduction} are observed future returns and the value function, which quantitatively answers \textit{``how does choosing an action $a$ in state $s$ affect future return?''} Indeed, given the challenge of sample-efficient RL in long-horizon, sparse-reward tasks, many approaches have been developed to help alleviate the burdens of credit assignment~\citep{sutton1985temporal,sutton1988learning,sutton1998introduction,singh1996reinforcement,precup2000eligibility,riedmiller2018learning,harutyunyan2019hindsight,hung2019optimizing,arjona2019rudder,ferret2019credit,trott2019keeping,van2020expected}.
The long-horizon, sparse-reward problems examined by many existing works on efficient credit assignment are often recognized as tasks that require prolonged periods of interaction prior to observing non-zero feedback; in the extreme case, these are ``goal-based'' problems with only a positive reward at terminal states and zero rewards everywhere else.
To see why the sparsity of rewards cannot serve as a true hardness measure of credit assignment in RL, consider any sparse-reward MDP. Notice that for any fixed constant $c > 0$, we can have a RL agent interact with the same MDP except under the reward function $\tilde{\mc{R}}(s,a) = \mc{R}(s,a) + c$. Clearly, this new reward function is no longer sparse; in fact, it is guaranteed to offer non-zero feedback on every timestep. And yet, it is also clear that this modification has neither changed the optimal policy $\pi^\star$ nor has it alleviated any of the burdens of credit assignment that stand in the way of efficiently learning $\pi^\star$. This simple example illustrates how rectifying the sparsity of rewards does not yield a reduction in the difficulty of credit assignment. And yet, there are well-known examples of how a prudent choice of reward bonus can substantially accelerate learning~\citep{ng1999policy}.
While it seems rather easy to show that the sparsity of reward is not the key factor that determines the hardness of credit assignment, the intuitive connection between reward sparsity and the difficulty of credit assignment persists; several works decompose problem difficulties into dichotomies of sparse- and dense-reward tasks~\citep{romoff2019separating,bellemare2013arcade}. In this work, we maintain that while sparse-reward problems may serve as quintessential examples of decision-making problems where credit assignment is challenging, the underlying mechanism that drives this hardness can be more aptly characterized using information theory. We make this precise by introducing \textit{information sparsity} as a formalization of the real driving force behind the credit assignment challenge; namely, a lack of information between behavior (actions taken under a particular behavior policy) and observed returns, yielding a case of information scarcity.
Beyond clarifying what makes credit assignment difficult, our goal is to show that information theory can also serve as a tool for facilitating efficient credit assignment. To that end, we offer several information-theoretic measures with which an agent may quantitatively allocate credit to specific state-action pairs, under a fixed behavior policy. Each of our proposed measures quantifies a precise relationship between behavior and trajectory returns. We then expand our consideration to not just the single full return of a trajectory, but the entire sequence of returns encountered at each state-action pair, exposing a connection with causal information theory. Our work leaves open the question of how these information-theoretic connections with credit assignment may integrate into existing RL algorithms. More broadly, we hope that the insights presented here inspire subsequent research on the role of information theory in analyzing efficient credit assignment in RL.
Our paper proceeds as follows: we define our problem formulation in Section \ref{sec:form}, introduce our notion of information sparsity in Section \ref{sec:info_sparse}, outline further directions for information-theoretic credit assignment in Section \ref{sec:info_ca}, and conclude with discussions of future work in Section \ref{sec:disc}. Due to space constraints, background on information theory, related work, and all proofs have been relegated to the appendix.
\section{Problem Formulation}
\label{sec:form}
We consider a finite-horizon Markov Decision Process (MDP)~\citep{bellman1957markovian,Puterman94} defined by $\mc{M} = \langle \mc{S}, \mc{A}, \mc{R}, \mc{T}, H, \beta, \gamma \rangle$ where $\mc{S}$ denotes the state space, $\mc{A}$ is the action set, $\mc{R}:\mc{S} \times \mc{A} \mapsto \mathbb{R}$ is a (deterministic) reward function, $\mc{T}:\mc{S} \times \mc{A} \mapsto \Delta(\mc{S})$ is the transition function producing a distribution over next states given the current state-action pair, $H$ is the finite, fixed episode horizon, $\beta \in \Delta(\mc{S})$ is the initial state distribution, and $\gamma \in [0,1)$ is the discount factor. We assume that both $\mc{S}$ and $\mc{A}$ are finite and use $|\mc{S}| = S$ and $|\mc{A}| = A$ to denote their respective sizes. At each timestep $h \in [H]$ of the current episode, the agent observes the current state $s_h$ and samples an action $a_h$ according to its current (stochastic) policy $\pi_h:\mc{S} \mapsto \Delta(\mc{A})$. The agent's objective is to find a policy so as to maximize the expected sum of future discounted rewards $\mathbb{E}[\sum\limits_{h=1}^H \gamma^{h-1}\mc{R}(s_h,a_h)]$, where the expectation is taken with respect to randomness in the initial state, environment transitions, and policy.
The value function of a (non-stationary) policy $\pi = (\pi_1,\ldots,\pi_H)$ denotes the expected future return by following the policy from a given state $s$ at timestep $h$,
$V_h^\pi(s) = \mathbb{E}[\sum\limits_{h'=h}^H \gamma^{h'-h}\mc{R}(s_{h'}, a_{h'}) | s_h = s]$,
where the expectation is taken with respect to the policy $\pi$ and the environment transition dynamics $\mc{T}$. Similarly, we use the Bellman equation to define the action-value function $Q^\pi(s,a)$ representing the expected future return from timestep $h$, taking action $a$ from state $s$, and following policy $\pi$ thereafter, $Q_h^\pi(s, a) = \mc{R}(s,a) + \gamma\mathbb{E}_{s' \sim \mc{T}(\cdot | s, a)}[V_{h+1}^\pi(s')]$, where $V_{H+1}^\pi(s) = 0$.
A fixed behavior policy $\pi$ induces a stationary visitation distribution over states and state-action pairs denoted as $d^\pi(s)$ and $d^\pi(s,a)$, respectively. Moreover, we let $\rho^\pi(\tau)$ denote the distribution over trajectories generated by a policy $\pi$ with $\rho^\pi(\tau | s)$ and $\rho^\pi(\tau | s,a)$ conditioning on a particular choice of start state $s$ or starting state-action pair $(s,a)$ respectively. Following the notation from distributional RL~\citep{bellemare2017distributional}, we let $Z(\tau)$ be a random variable denoting the random return obtained after completing trajectory $\tau \sim \rho^\pi(\cdot)$ under behavior policy $\pi$; analogously, $Z \triangleq Z(s,a)$ is a random variable denoting the return observed at state $s$ having taken $a$ and then following $\pi$ thereafter\footnote{For clarity, we ignore issues that arise from the mismatch between the continuous random variables $Z(\tau),Z$ and discrete variables involving states, actions, and trajectories. Instead, we think of returns as discrete random variables obtained from a sufficiently fine quantization of the real-valued return.}. Given a trajectory $\tau = \{(s_1,a_1),(s_2,a_2),\ldots,(s_{H-1},a_{H-1}),(s_H,a_H) \}$, we may ``index'' into its constituent state-action pairs using the following notation: $\tau_h = (s_h,a_h)$, $\tau^h = \{(s_1,a_1),(s_2,a_2),\ldots,(s_h,a_h)\}$, $\tau_i^j = \{(s_i,a_i),(s_{i+1},a_{i+1}),\ldots,(s_{j-1},a_{j-1}),(s_j,a_j)\}$, and $\tau^{-h} = \{(s_1,a_1),\ldots,(s_{h-1},a_{h-1}), (s_{h+1},a_{h+1}),\ldots,(s_H,a_H)\}$.
\section{Information Sparsity}
\label{sec:info_sparse}
The sparsity of rewards is a property of MDPs often mentioned when describing ``difficult'' decision-making problems. While most works offer a verbal explanation of what constitutes a sparse reward MDP, few papers~\citep{riedmiller2018learning,trott2019keeping} offer a precise definition through the specification of the reward function as $\mc{R}(s,a,s') = \delta_{s_g}(s')$ if $d(s',s_g) \leq \epsilon$ and $\mc{R}(s,a,s') = 0$ otherwise, where $d: \mc{S} \times \mc{S} \rightarrow \mathbb{R}_{\geq 0}$ is a metric on the state space, $\epsilon$ is a small constant, and $\delta_{s_g}(s')$ is an arbitrary function defining the reward structure for states within $\epsilon$ distance of some goal state $s_g$, as measured by $d$; the common choice is to have $\delta_{s_g}(s')$ be a constant function (for instance, $\delta_{s_g}(s') = 1$).
While a complete lack of feedback across several timesteps demands judicious exploration to encounter the first nontrivial reward signal, exploration is not the only complication. Even after an agent has acquired the first non-zero reward, it still faces a demanding credit-assignment challenge wherein it must decide which step(s) of a long trajectory were critical to the observed outcome. Stemming from this fact, reward sparsity and the credit-assignment challenge are often discussed together leading to a notion that the former is itself a driving force behind the difficulty of the latter.
In this work, we maintain that this phenomenon can be explained via information theory. Recalling the example posed in the introduction, we call attention to how the addition of a positive constant to a sparse reward function, while eliminating sparsity, offers no useful information. In contrast, a more careful choice of, for example, negated distance to goal removes sparsity in an informative way. We can make this precise by examining the following quantity:
\begin{align}
\mc{I}^{\pi}_{s,a}(Z) = \kl{p(Z | s, a)}{p(Z|s)},
\label{eq:info_sparse_kl}
\end{align}
where $p(Z|s,a)$ denotes the distribution over returns for a random state-action pair conditioned on a particular realization of the state and action. Analogously, $p(Z|s) = \sum\limits_{a \in \mc{A}} \pi(a|s)p(Z|s, a)$ denotes the distribution over the random returns for the state-action pair conditioned on a particular realization of the state. The quantity $\mc{I}^{\pi}_{s,a}(Z)$ is itself a random variable depending on the particular realization of the state-action pair $(s,a)$.
Intuitively, Equation \ref{eq:info_sparse_kl} measures how much the distribution over returns of a given state-action pair shifts relative to the distribution over returns for the particular state, marginalizing over all actions. Recalling that $Q^\pi(s,a) = \mathbb{E}_{p(Z|s, a)}[Z]$ and $V^\pi(s) = \mathbb{E}_{p(Z|s)}[Z]$, one may interpret Equation \ref{eq:info_sparse_kl} as distributional analogue to the advantage function $A^\pi(s,a) = Q^\pi(s,a) - V^\pi(s)$. To connect this quantity with information theory, we need only apply an expectation:
\begin{align}
\mc{I}(A;Z|S) &= \mathbb{E}_{(s,a) \sim d^\pi}\left[\kl{p(Z | s, a)}{p(Z|s)}\right]
\label{eq:info_sparse_mi}
\end{align}
This quantity carries a very intuitive meaning in the context of credit assignment: conditioned upon states visited by policy $\pi$, how much information do the actions of $\pi$ carry about the returns of those state-action pairs? Difficulties with overcoming the credit-assignment challenge in long-horizon problems arise when $\mc{I}(A;Z|S)$ is prohibitively small. That is, a decision-making problem where the actions of the initial policy have little to no dependence on returns cannot acquire the signal needed to learn an optimal policy; sparse-reward problems are a natural example of this. More formally, we can define this notion of \textit{information sparsity} as follows:
\newpage
\ddef{Information Sparsity}{
Given an MDP $\mc{M}$ with non-stationary policy class $\Pi^H$, let $\Pi_0 \subset \Pi^H$ denote the set of initial policies employed at the very beginning of learning in $\mc{M}$. For a small constant $\varepsilon > 0$, we classify $\mc{M}$ as $\varepsilon$-information-sparse if
\begin{align*}
\sup\limits_{\pi_0 \in \Pi_0} \mc{I}^{\pi_0}(A;Z|S) \leq \varepsilon
\end{align*}
\label{def:info_sparse}
}
Under Definition 1, $\varepsilon$-sparse MDPs with small parameter $\varepsilon$ (inducing higher sparsity of information) represent a formidable credit-assignment challenge. Using sparse reward problems as an illustrative example and taking information sparsity to be the core obstacle to efficient credit assignment, we may consider how various approaches to dealing with such tasks also resolve information sparsity. Perhaps the most common approach is to employ some form of intrinsic motivation or reward shaping~\citep{ng1999policy,chentanez2005intrinsically} with heuristics such as the distance to goal, curiosity, or random network distillation~\citep{pathak2017curiosity,burda2018exploration}. In all of these cases, reward sparsity is resolved in a manner that also corrects for information sparsity; to help visualize this, consider a sufficiently-large gridworld MDP with actions for each cardinal direction and a goal-based reward function. Prior to reward augmentation, sparse rewards would likely result in returns of zero across the entire space of state-action pairs visited by a uniform random policy. In contrast, by using a reward bonus equal to, for instance, the negated distance to goal, individual actions taken in almost every state can create meaningful deviations between the distributions $p(Z|s,a)$ and $p(Z|s)$, translating into an increase in the available bits of information measured by information sparsity. A similar comment can also be made for approaches that invoke Thompson sampling~\citep{thompson1933likelihood} as a tool for facilitating deep exploration~\citep{osband2016deep,osband2019deep}; the random noise perturbations used by such approaches translate into excess information that accumulates in the $\mc{I}^{\pi_0}(A;Z|S)$ term.
Alternatively, there are other techniques for handling credit assignment that either change the problem formulation altogether or address the long-horizon aspect of decision making. In the latter category, the options framework~\citep{sutton1999between,bacon2017option} has served as a powerful tool for accommodating efficient RL over long horizons by adopting a two-timescale approach. Similar to a judicious choice of reward shaping function, provision of the right options to an agent can eliminate the difficulty of credit assignment that stems from having a long horizon. In our framework, this can be seen as picking a new (hierarchical) policy class $\Pi_0$ to resolve information sparsity. Finally, some approaches simply shift to the multi-task setting and assume access to a function that can identify failed trajectories of one task as successful behaviors for other tasks~\citep{andrychowicz2017hindsight}. As long as these hindsight approaches can generate informative feedback for some subset of the task distribution, they can bootstrap learning of more complicated tasks.
To conclude this section, we consider the computability of information sparsity and recall that, for any function $f: \mc{S} \times \mc{A} \rightarrow \mathbb{R}$,
\begin{align}
\mathbb{E}_{(s,a) \sim d^\pi}[f(s,a)] &= \mathbb{E}_{\tau \sim \rho^\pi}[\sum\limits_{h=1}^H \gamma^{h-1} f(s_h,a_h)]
\end{align}
Taking $f(s,a) = \kl{p(Z | s, a)}{p(Z|s)}$, it follows that we need only choose an algorithm for recovering $p(Z|s,a)$~\citep{morimura2010nonparametric,morimura2012parametric,bellemare2017distributional} to compute information sparsity.
\section{Information-Theoretic Credit Assignment}
\label{sec:info_ca}
In this section, we present potential quantities of interest for deciding how to award credit to an individual state-action pair given the outcome (return) of an entire trajectory.
\subsection{Measuring Credit}
One possible choice for deciding how responsible or culpable a single step of behavior is for the outcome of the whole trajectory is by performing a sort of sensitivity analysis wherein a single point in the trajectory is varied while all other points are held fixed. This first proposition for measuring the credit of state-action pairs embodies this idea exactly using conditional mutual information.
\begin{proposition}
Let $\pi$ be a fixed behavior policy such that $\tau \sim \rho^\pi$. Let $R_h$ be a random variable denoting the reward observed at timestep $h$ (where the randomness of the deterministic reward follows from the randomness of the state-action pair at $h$, $\tau_h$). It follows that:
\begin{align*}
\mc{I}\left(Z(\tau);\tau_h|\tau^{-h}\right) &= \mc{H}\left(R_h | \tau^{h-1}\right)
\end{align*}
\label{prop:credit}
The proof is provided in Appendix~\ref{sec:proofs}.
\end{proposition}
The left-hand side of Proposition \ref{prop:credit} is a conditional mutual information term quantifying the information between a single state-action pair $\tau_h$ and the policy return $Z(\tau)$, conditioned on the entire trajectory excluding timestep $h$. The statement of Proposition \ref{prop:credit} shows that this measure of credit is equal to the entropy in rewards conditioned on the trajectory up to timestep $h-1$, $\tau^{h-1}$. In practice, this encourages an approach that is reminiscent of RUDDER~\citep{arjona2019rudder} wherein a recurrent neural network learns a representation of $\tau^{h-1}$ and is trained as a reward classifier (for some discretization of the reward interval); the entropy of the resulting classifier can then be used as a weighting strategy for policy parameter updates or to bias exploration as a reward bonus.
Alternatively, it may be desirable to examine the importance of the current state-action pair towards policy returns conditioned only on the past history, $\tau^{h-1}$. To help facilitate such a measure, it is useful to recall the hindsight distribution $h(a|s,Z(\tau)$ of \citet{harutyunyan2019hindsight} that captures the probability of having taken action $a$ from state $s$ conditioned on the observed trajectory return $Z(\tau)$.
\begin{proposition}
Let $\pi$ be a fixed behavior policy such that $\tau \sim \rho^\pi$ and let $h(a|s,Z(\tau))$ be the hindsight distribution as defined above. We have that
\begin{align*}
\mc{I}(Z(\tau);\tau_h|\tau^{h-1}) &= \mathbb{E}_{\tau^h}\left[\mathbb{E}_{Z(\tau) | \tau^h}\left[ \log\left(\frac{h(a_h|s_h, Z(\tau))}{\pi(a_h | s_h)}\right)\right] \right]
\end{align*}
Moreover,
\begin{align*}
\mc{I}(Z(\tau);\tau) &= \sum\limits_{h=1}^H \mathbb{E}_{\tau^h}\left[\mathbb{E}_{Z(\tau) | \tau^h}\left[ \log\left(\frac{h(a_h|s_h, Z(\tau))}{\pi(a_h | s_h)}\right)\right] \right]
\end{align*}
\label{prop:hca}
The proof is provided in Appendix~\ref{sec:hingsight_proof}.
\end{proposition}
Proposition \ref{prop:hca} tells us that learning the hindsight distribution as proposed in \citet{harutyunyan2019hindsight} can also be effectively used to tackle credit assignment in an information-theoretic manner by estimating the conditional mutual information between individual state-action pairs and returns, conditioned on the trajectory up to the previous timestep. While this measure captures a useful quantity intuitively, how to best incorporate such an estimate into an existing RL algorithm remains an open question for future work.
\subsection{Causal Information Theory \& Hindsight}
In the previous section, we examined the information content between a trajectory and its return, leveraging the fact that the trajectory random variable is a sequence of random variables denoting the individual state-action pairs. In this section, we draw attention to the fact that individual returns, like the state-action pairs of a trajectory, are also random variables that appear at each timestep. Typically, we are largely concerned with only one of these random variables, attributed to the first timestep of the trajectory $Z(\tau) \triangleq Z_1$, since returns are computed in hindsight. Naturally, of course, there is an entire sequence of these return random variables $Z_1,\ldots,Z_H$ at our disposal. Accordingly, a quantity that may be of great interest when contemplating issues of credit assignment in RL is the following:
\begin{align*}
\mc{I}(\tau,Z_1,\ldots,Z_H) &= \mc{I}(\tau_1,\ldots,\tau_H;Z_1,\ldots,Z_H)
\end{align*}
which captures all information between a completed trajectory and the sequence of observed returns at each timestep. Recall the chain rule of mutual information:
\begin{align*}
\mc{I}(X_1,\ldots,X_n;Y) &= \sum\limits_{i=1}^n \mc{I}(X_i;Y|X^{i-1})
\end{align*}
where $X^{i-1} = (X_1,\ldots,X_{i-1})$ and $X^{-1} = \emptyset$. In the previous section, this allowed for a decomposition of the trajectory in temporal order so that we could examine a current state-action pair $\tau_h$ conditioned on the history $\tau^{h-1}$. The analogous step for the sequence of return variables creates a slight oddity where we have the return at a timestep $Z_h$ conditioned on the returns of previous timesteps $Z^{h-1}$. Here, the temporal ordering that was advantageous in breaking apart a trajectory now results in conditioning on returns that are always computed after observing $Z_h$. Fortunately, multivariate mutual information is not sensitive to any particular ordering of the random variables, a fact which can be demonstrated quickly for the two-variable case:
\begin{fact}
Let $X,Y,Z$ be three random variables.
\begin{align*}
\mc{I}(X;Y,Z) &= \mc{I}(X;Z,Y)
\end{align*}
\label{fact:mi_swap}
\end{fact}
Fact \ref{fact:mi_swap} implies that we have a choice between a forward view (for processing variables in temporal order) and a backwards view (for processing in hindsight). This fact by itself is an interesting property of information theory that may deserve more attention in its own right as it blurs the line between the forward-looking perspective of RL and the opposing retrospective view used by credit-assignment techniques for supervised learning~\citep{ke2018sparse}. It is also reminiscent of the forward and backwards views of the widely-studied eligibility trace~\citep{sutton1985temporal,sutton1988learning,sutton1998introduction,singh1996reinforcement}. Since we would like to consider the impact of the entire trajectory on each individual return, we can begin by decomposing the return random variables in hindsight:
\begin{align*}
\mc{I}(\tau_1,\ldots,\tau_H;Z_1,\ldots,Z_H) &= \sum\limits_{h=1}^H \mc{I}(Z_h; \tau_1,\ldots,\tau_H|Z_{h+1}^H)
\end{align*}
Further expansion of the above multivariate mutual information gives rise to the following proposition that draws a direct connection to causal information theory.
\begin{proposition}
Let $\tau = (\tau_1,\ldots,\tau_H)$ be a $H$-step trajectory and let $Z^H = (Z_H,Z_{H-1},\ldots,Z_1)$ be the associated time-sychronized sequence of return random variables. Then, we have that $$ \mc{I}(\tau;Z_1,\ldots,Z_H) = \mc{I}(\tau^H \rightarrow Z^H)$$
\label{prop:directedinfo}
The proof is provided in Appendix~\ref{sec:proofs_causal}.
\end{proposition}
Notice that, in general, Proposition \ref{prop:directedinfo} is not always true for two arbitrary, time-synchronized stochastic processes as the multivariate mutual information and directed information obey a conservation law~\citep{massey2005conservation}.
By following the first steps from the proof of Proposition \ref{prop:directedinfo}, we can also recover an analog to Proposition \ref{prop:credit} that prescribes a connection between $\mc{I}(\tau;Z_1,\ldots,Z_H)$ and individual rewards $R_h$.
\begin{proposition}
\begin{align*}
\mc{I}(\tau;Z_1,\ldots,Z_H) &= \mc{I}(\tau^H \rightarrow Z^H) = \sum\limits_{h=1}^H \mc{H}(R_h |Z_{h+1}^H)
\end{align*}
The proof is provided in Appendix~\ref{sec:proofs_causal}.
\label{prop:directed_credit}
\end{proposition}
Taken together, Propositions \ref{prop:directedinfo} and \ref{prop:directed_credit} offer an interesting connection between information theory and causal inference, a link which has appeared before~\citep{amblard2013relation}. We leave the question of how an agent might leverage such quantities to actively reason about the underlying causal structure of the environment to future work.
\section{Discussion \& Conclusion}
\label{sec:disc}
In this work, we take an initial step towards a rigorous formulation of the credit-assignment problem in reinforcement learning. At the core of our approach is information theory, which we find naturally suited for obtaining quantitative answers to the core question facing an agent when dealing with credit assignment: \textit{how does choosing an action $a$ in state $s$ affect future return?} While this work offers preliminary ideas for how information theory can then be used to to understand credit assignment, it remains to be seen how these measures can be integrated into existing RL algorithms.
\bibliographystyle{plainnat}
|
\section{Introduction}
It is a well established fact that discrete (quantum or classical) groups provide a source of interesting examples to the theory of von Neumann algebras. One of the most prominent examples of von Neumann algebras associated with groups are the free group factors. Let $F_n$ the free group with generators $g_1,\dotsc, g_n\,(n\ge 2)$ and let $\LL(F_n)=\lambda(F_n)''$ be the corresponding group von Neumann algebra. Inside $\LL(F_n)$ one finds the so called radial subalgebra $\mathscr{R}$, the von Neumann algebra generated by the operator $(\lambda_{g_1}+\lambda_{g_1}^*)+\cdots +(\lambda_{g_n}+\lambda_{g_n}^*)$. Its name stems from the property that if we (informally) write $x=\sum_{w\in F_n} f(w)\lambda_w\in \LL(F_n)$ then $x\in \mathscr{R}$ if and only if $f$ is a radial function on $F_n$, i.e. $f(w)$ depends only on the length $|w|$ of $w$. The radial algebra was intensively studied -- let us mention that it was proved to be maximal abelian (MASA) in $\LL(F_n)$ \cite{Pytlik} and later to be singular \cite{Radulescu} and even maximal injective \cite{inj}.\\
One may look at the element $(\lambda_{g_1}+\lambda_{g_1}^*)+\cdots +(\lambda_{g_n}+\lambda_{g_n}^*)$ from a different perspective. It is the character of the fundamental representation of the compact quantum group $\widehat{F_n}$, dual to $F_n$. Consequently, the radial algebra $\mathscr{R}$ is the von Neumann algebra generated by this character.
It is therefore natural to wonder whether similar properties hold for other discrete (or, by duality, compact) quantum groups. This question was studied in particular in the case of the (Kac type) free orthogonal quantum group $O_N^+$. In \cite{RadialMasa} it was shown that $\mathscr{C}_{O_N^+}$, the von Neumann algebra generated by the character of the fundamental representation, is a singular MASA in $\LL^{\infty}(O_N^+)$. Observe that now $\mathscr{C}_{O_N^+}$ has also a different description -- it coincides with the von Neumann algebra generated by all characters of irreducible representations. Let us take this description as a general definition of $\mathscr{C}_{\mathbb{G}}$ for a compact quantum group $\mathbb{G}$\footnote{Note however that for $\mathbb{G}=\widehat{F_n}$ we do not have equality of $\mathscr{R}$ and $\mathscr{C}_{\mathbb{G}}$. In fact, $\mathscr{C}_{\mathbb{G}}=\LL^{\infty}(\mathbb{G})$ holds for all abelian compact quantum groups (meaning that the function algebra $\LL^{\infty}(\mathbb{G})$ is cocommutative).}.
\begin{definition}[{See \cite[after Corollary 5.10]{pseudogroups}}]\label{def:classfun}
For a compact quantum group $\mathbb{G}$ we define the von Neumann algebra of class functions $\mathscr{C}_{\mathbb{G}}:=\{\chi_{\alpha}\,|\,\alpha\in\Irr(\mathbb{G})\}'' \subseteq L^{\infty}(\mathbb{G})$ .
\end{definition}
We choose to call $\mathscr{C}_{\mathbb{G}}$ ``the von Neumann algebra of class functions'' because the two coincide for classical compact groups (see Lemma \ref{lem:classfunctions}).
In this article we will focus on non-Kac type compact quantum groups, thus in many cases we enter the realm of type $\operatorname{III}$ von Neumann algebras. It means that we cannot use one of the most important tools -- the conditional expectation -- unless our subalgebra is preserved by the modular group. In fact, many examples of MASAs in type III factors admit a conditional expectation, for example the Cartan subalgebras inside crossed products by non-singular actions or the von Neumann subalgebra generated by the positive part in the polar decomposition of a generalized circular element in the free Araki-Woods factors (see \cite[Theorem 4.8]{MR1444786}). However, the abelian subalgebras of free Araki-Woods factors that are counterparts of the famous generator subalgebras of the free group factors, are not preserved by the modular group and are not MASAs (this is also known in the case of $q$-Araki-Woods algebras, see \cite{Bikram}). The crucial notion in this setting is that of a (quasi-)split inclusion (see \cite{MR345546} and \cite{MR735338}), which will also be central to our present work.
In Section \ref{sec:quasi-split} we will discuss the basics of quasi-split inclusions of von Neumann algebras. We record there precise statements that will allow us to prove that the inclusion of the von Neumann algebra of class functions is quasi-split in some cases. In our first result we obtain a concrete criterion in terms of the relation between the usual and quantum dimensions of irreducible representations (this criterion is satisfied for many, but not all, non-Kac type quantum groups, see Remark \ref{Rem:UFnonexample}).
\begin{theoremlet}[{Theorem \ref{Thm:quasi-split}}]
Let $\mathbb{G}$ be a compact quantum group. Suppose that $\sum_{\alpha \in \Irr(\mathbb{G})} \sqrt{\tfrac{\op{dim}(\alpha)}{\op{dim}_q(\alpha)}}$ converges. Then the inclusion of the von Neumann algebra of class functions into $\LL^{\infty}(\mathbb{G})$ is quasi-split.
\end{theoremlet}
This result is sufficient to prove that the von Neumann algebra of class functions is not a MASA in the case that $\LL^{\infty}(\mathbb{G})$ is a type $\op{III}$ factor. One of the cases of most interest to us is the compact quantum group $O_{F}^{+}$, for which it is not known in full generality whether $\LL^{\infty}(O_{F}^{+})$ is a factor. Therefore in Section \ref{sec:3} we develop a new approach, involving the scaling group, a unique symmetry of the non-Kac type quantum groups. What we show, in broad strokes, is that if being non-Kac is witnessed by all non-trivial irreducible representations then the von Neumann algebra of class functions cannot be a MASA as soon as the inclusion is quasi-split. More precisely, we prove that if it were a MASA then $\LL^{\infty}(\mathbb{G})$ would have to be factor, and the quasi-split property would force this factor to be of type $\op{I}$. In this case a non-trivial inner scaling automorphism must exist, which we show to be excluded by our assumptions.
\begin{theoremlet}[{Theorem \ref{Thm:nonmasa}}]
Let $\mathbb{G}$ be a non-trivial compact quantum group such that the inclusion of the von Neumann algebra of class functions is quasi-split and $\uprho_{\alpha} \neq \mathds{1}_{\alpha}$ for all non-trivial representations $\alpha \in \Irr(\mathbb{G})$. Then the von Neumann algebra of class functions is not a MASA.
\end{theoremlet}
Here $\uprho_{\alpha} \in \op{B}(\mathsf{H}_{\alpha})$ is the unique positive matrix intertwining the irreducible representation $\alpha$ with its double conjugate and satisfying $\op{Tr}(\uprho_{\alpha}) = \op{Tr}(\uprho_{\alpha}^{-1})$; for an arbitrary finite dimensional representation $U$ we can define $\uprho_{U}$ using the decomposition of $U$ into irreducible representations, see \cite[Section 1.4]{NeshTu}.
In Section \ref{sec:examples} we focus on studying concrete examples. More specifically, in Subsection \ref{subsec:abelian} we introduce a class of compact quantum groups for which we can verify the criterion from Section \ref{sec:quasi-split} for the quasi-split property. Combined with the results from Section \ref{sec:3} we obtain the following.
\begin{theoremlet}[{Corollary \ref{Cor:quasisplit}}]
Let $\mathbb{G} = O_{F}^{+}$ -- the free orthogonal quantum group -- or $\mathbb{G} = \mathbb{G}_{Aut}(B,\psi)$ -- the quantum automorphism group of a finite dimensional $C^{\ast}$-algebra equipped with a $\delta$-form. If $\mathbb{G}$ is not of Kac type then $\mathscr{C}_{\mathbb{G}}$ is not a MASA in $\LL^{\infty}(\mathbb{G})$.
\end{theoremlet}
In the same section we study the compact quantum group $\mathrm{SU}_q(2)$. In this case the von Neumann algebra of class functions is not a MASA in $\LL^{\infty}(\mathrm{SU}_q(2))$, but it is a MASA in the fixed point subalgebra of the scaling group. From the action by scaling automorphisms (restricted to the rational numbers, treated as a discrete group) we build a new compact quantum group using the bicrossed product construction. It is a non-Kac type compact quantum group for which we can prove that the von Neumann algebra of class functions is a MASA.
\begin{theoremlet}[{Proposition \ref{prop4.2.1}}]
Let $\mathbb{H}$ be the bicrossed product $\mathbb{Q}\bowtie\mathrm{SU}_q(2)$. Then $\mathscr{C}_{\mathbb{H}}$ is a MASA in $\LL^{\infty}(\mathbb{H})$.
\end{theoremlet}
The bicrossed product construction above actually depends on the choice of a non-zero real number and for most choices $\LL^{\infty}(\mathbb{H})$ is the unique injective factor of type $\op{II}_{\infty}$.
In the last section of the paper we investigate the properties of the free unitary groups $U_{F}^{+}$. In this case the von Neumann algebra of class functions is non-commutative, but it remains tracial (see \cite[Equation (5.33)]{pseudogroups}). We show that the inclusion is quasi-split as long as the quantum group is ``sufficiently non-Kac''.
\begin{theoremlet}[{See Corollary \ref{Cor:UF} for a precise statement}]
Let $\mathbb{G}= U_{F}^{+}$. If the ratio $\frac{\dim(\alpha)}{\dim_q(\alpha)}$, where $\alpha$ is the fundamental representation, is sufficiently small then the inclusion $\mathscr{C}_{U_F^+} \subseteq \LL^{\infty}(U_F^+)$ is quasi-split. As a consequence, the relative commutant $\mathscr{C}_{U_F^+}' \cap \LL^{\infty}(U_F^+)$ is not contained in $\mathscr{C}_{U_F^+}$.
\end{theoremlet}
\subsection{Preliminaries}
We would like to start by motivating our terminology from Definition \ref{def:classfun}.
\begin{lemma}\label{lem:classfunctions}
Let $G$ be a compact group. Then $\{\chi_\alpha\,|\, \alpha\in \Irr(G)\}''$ equals the von Neumann algebra of essentially bounded measurable class functions, i.e. the set of ~$f\in\LL^{\infty}(G)$ satisfying $f(hgh^{-1})=f(g)\,(g,h\in G)$.
\end{lemma}
\begin{proof}
Since every character $\chi_\alpha$ is a class function, one of the inclusions is clear. Let $\mu_G$ be the Haar measure on $G$ and $\mathbb{E} \colon f\mapsto \int_G f(h\cdot h^{-1})\operatorname{d}\!\mu_G(h)\;(f\in\LL^{\infty}(G))$ the normal conditional expectation onto the von Neumann algebra of essentially bounded measurable class fuctions. As matrix coefficients of irreducible representations span a $w^*$-dense subspace in $\LL^{\infty}(G)$, it is enough to show that $\mathbb{E}(u^{\alpha}_{\xi,\eta})= \frac{\ismaa{\xi}{\eta}}{\dim(\alpha)} \chi_{\alpha}$ for all $\alpha\in\Irr(G)$ and vectors $\xi,\eta\in \mathsf{H}_\alpha$. Using orthogonality relations one can check that $\ismaa{\Lambda_h( \chi_{\alpha})}{ \Lambda_h(u_{v,w}^{\beta})} = \delta_{\alpha \beta} \frac{\ismaa{v}{w}}{\dim(\alpha)}$, so it is sufficient to check that $\ismaa{\Lambda_h( \mathbb{E}(u_{\xi, \eta}^{\alpha}))}{\Lambda_h( u_{v,w}^{\beta})} = \frac{\delta_{\alpha \beta}}{(\dim(\alpha))^{2}}\ismaa{ \eta}{ \xi}\ismaa{v}{w} $. This can, once again, be verified using the orhogonality relations:
\begin{align*}
\ismaa{\Lambda_h( \mathbb{E}(u_{\xi, \eta}^{\alpha}))}{ \Lambda_h(u_{v,w}^{\beta})} &= \int_{G} \int_{G} \ismaa{ \alpha(hgh^{-1}) \eta}{ \xi}\ismaa{v}{\beta(g) w} \operatorname{d}\!\mu_{G}(h)\operatorname{d}\!\mu_{G}(g) \\
&= \int_{G} \ismaa{\Lambda_h( u_{\alpha(h^{-1}) \xi, \alpha(h^{-1})\eta}^{\alpha})}{\Lambda_h( u_{v,w}^{\beta})} \operatorname{d}\!\mu_{G}(h) \\
&=\frac{ \delta_{\alpha \beta}}{\dim(\alpha)} \int_{G} \ismaa{v}{ \alpha(h^{-1})\xi}\ismaa{ \alpha(h^{-1}) \eta}{w} \operatorname{d}\!\mu_{G}(h) \\
&= \frac{\delta_{\alpha \beta}}{\dim(\alpha)} \ismaa{\Lambda_h( u_{\xi, v}^{\alpha})}{\Lambda_h( u_{\eta, w}^{\alpha})} \\
&= \frac{\delta_{\alpha \beta}}{(\dim(\alpha))^2} \ismaa{ \eta}{ \xi}\ismaa{ v}{w}.
\end{align*}
\end{proof}
\begin{remark}
Actually, it has been proved in \cite[Theorem 3.7]{MR3679720} that for any compact quantum group $\mathbb{G}$ the algebra of class functions $\mathscr{C}_{\mathbb{G}}$ is equal to $\{x \in \LL^{\infty}(\mathbb{G}): \Delta(x) = \Sigma \Delta(x)\}$, where $\Delta: \LL^{\infty}(\mathbb{G}) \to \LL^{\infty}(\mathbb{G}) \overline{\otimes} \LL^{\infty}(\mathbb{G})$ is the comultiplication and $\Sigma: \LL^{\infty}(\mathbb{G}) \overline{\otimes} \LL^{\infty}(\mathbb{G}) \to \LL^{\infty}(\mathbb{G}) \overline{\otimes} \LL^{\infty}(\mathbb{G})$ is the flip; this answered a question left open by Woronowicz, see \cite[after Proposition 5.11]{pseudogroups}. In the classical case it corresponds to functions $f$ satisfying $f(gh) = f(hg)$, i.e. precisely the class functions.
\end{remark}
\begin{lemma}[{\cite[Equation (5.33)]{pseudogroups}}]
Let $\mathbb{G}$ be a compact quantum group. The Haar integral integral $h$ restricted to $\mathscr{C}_{\mathbb{G}}$ is tracial.
\end{lemma}
In most of the examples $\mathscr{C}_{\mathbb{G}}$ will actually be commutative (the fusion rules will be commutative), with the important exception of the free unitary quantum groups $U_{F}^{+}$.
We will work with non-Kac type compact quantum groups and these objects naturally admit two one-parameter automorphism groups: the modular group (because the Haar integral is non-tracial) and the scaling group (because the antipode is not involutive). For more information on compact quantum groups consult e.g.~\cite{NeshTu}.
There will be two main classes of compact quantum groups to which our results apply: we will start with free orthogonal (unitary) quantum groups.
\begin{definition}[{\cite{MR1382726}}]
Let $N\geqslant 2$ be an integer and let $F$ be an invertible matrix in $M_N(\mathbb{C})$. Let
\begin{enumerate}[(i)]
\item $\Pol(U_F^{+})$ be the universal $\ast$-algebra generated by the entries of a unitary matrix $U \in M_{N}(\Pol(U_F^{+}))$ subject to the condition that $F\overline{U} F^{-1}$ is also a unitary matrix;
\item $\Pol(O_{F}^{+})$ be the universal $\ast$-algebra generated by the entries of a unitary matrix $U \in M_{N}(\Pol(O_F^{+}))$ subject to the condition that $U=F\overline{U} F^{-1}$; we also assume in this case that $F\overline{F} = c\mathds{1}$ for some $c\in \mathbb{R}$.
\end{enumerate}
Then the comultiplication $\Delta(u_{ij}):= \sum_{k=1}^{N} u_{ik} \otimes u_{kj}$ gives both $\Pol(U_F^{+})$ and $\Pol(O_F^{+})$ the structure of a Hopf $\star$-algebra. After the universal $\mathrm{C}^*$-completion, they give rise to compact quantum groups $U_{F}^{+}$ and $O_{F}^{+}$.
\end{definition}
Before introducing the quantum automorphism groups of finite-dimensional $\mathrm{C}^{\ast}$-algebras, we need to recall the definition of a $\delta$-form. Let $B$ be a finite-dimensional $C^{\ast}$-algebra, let $m: B \otimes B \to B$ be the multiplication map, and let $\psi: B \to \mathbb{C}$ be a faithful state. Then $\psi$ defines natural inner products on both $B$ and $B\otimes B$ and we can compute the Hermitian adjoint of $m$, i.e. $m^{\ast}$. We say that $\psi$ is a $\delta$-form if $mm^{\ast} = \delta^2 \op{Id}$.
\begin{definition}[{\cite{MR1637425}}]
Let $B$ be a finite-dimensional $C^{\ast}$-algebra equipped with a $\delta$-form $\psi$. Then there exists a universal compact quantum group acting on $B$ in a $\psi$-preserving way -- we denote it by $\mathbb{G}_{Aut}(B,\psi)$ and the corresponding action by $\alpha$.
It means that whenever we have a compact quantum group $\mathbb{G}$ with a $\psi$-preserving action $\beta: B \to \mathrm{C}_u(\mathbb{G}) \otimes B$, i.e. $\beta$ is a $\ast$-homomorphism satsifying $(\Delta \otimes \op{Id})\circ \beta = (\op{Id} \otimes \beta)\circ \beta$ and $(\op{Id} \otimes \psi) (\beta(f)) = \psi(f) \mathds{1}$, then there exists a unique quantum group morphism $\Phi: \mathrm{C}_u(\mathbb{G}_{Aut}(B,\psi)) \to \mathrm{C}_u(\mathbb{G})$ such that $(\Phi\otimes \op{Id})\alpha = \beta$.\\
Let us mention here that in the Kac case, operator algebras associated with $\mathbb{G}_{Aut}(B,\psi)$ were extensively studied e.g.~in \cite{BrannanTrace}.
\end{definition}
\subsection{Notation}
For a faithful normal state $\omega$ on a von Neumann algebra $\N$ we will denote by $(\sigma^{\omega}_t)_{t\in\mathbb{R}}$ the modular group, by $\nabla_\omega$ the modular operator, by $J_\omega$ the modular conjugation and by $\Lambda_{\omega}$ the canonical map $\N\rightarrow \LL^2(\N,\omega)$. When there is no risk of confusion, we will simply write $(\sigma_t)_{t\in\mathbb{R}}$ etc. Similarly, for a compact quantum group $\mathbb{G}$ we will often write $(\tau_t)_{t\in\mathbb{R}}$ for the scaling group. We will use von Neumann subalgebras $\LL^{\infty}(\mathbb{G})^{\tau},\LL^{\infty}(\mathbb{G})^{\sigma}\subseteq\operatorname{L}^{\infty}(\mathbb{G})$ of those $x\in \operatorname{L}^{\infty}(\mathbb{G})$ which are invariant under the scaling group (respectively~the modular group of the Haar integral $h$). Algebraic tensor products will be denoted by $\odot$.
\section{Quasi-split inclusions}\label{sec:quasi-split}
The split property arose in the study of inclusions of von Neumann algebras appearing in algebraic quantum field theory (see \cite{MR345546}). A more systematic study of related properties was conducted in \cite{MR735338}. The main tool for proving that a given inclusion is split was developed in \cite{MR1038440}, albeit only in the case of factor inclusions, and we need to resort to subsequent work \cite{MR1855628}, which deals with the general case. The precise criterion that we will use comes from \cite{Bikram}.
\begin{definition}\label{def:quasi-split}
Let $\mathsf{N}\subseteq \mathsf{M}$ be an inclusion of von Neumann algebras. We say this inclusion is \textbf{split} if there exists an intermediate type $\operatorname{I}$ factor $\mathsf{B}$. We say that the inclusion is \textbf{quasi-split} if the $\ast$-homomorphism $\mathsf{N} \odot \mathsf{M}^{op} \ni x\otimes y^{op} \mapsto x Jy^{\ast} J \in \B(\LL^{2}(\mathsf{M}))$, where $L^{2}(\mathsf{M})$ is the standard form, extends to a surjective normal $\ast$-homomorphism from $\mathsf{N} \overline{\otimes} \mathsf{M}^{op}$ onto $\mathsf{N} \vee \mathsf{M}^{\prime}$.
\end{definition}
\begin{remark}\label{rem:splitfactor}
If both $\mathsf{N}$ and $\mathsf{M}$ are factors or one of them is a type $\operatorname{III}$ algebra then a quasi-split inclusion is automatically split (see \cite[Corollary 1, (iv) and (vi)]{MR703083}).
\end{remark}
The most important consequence of the quasi-split property for our work is that it can be used as a tool for proving that some abelian subalgebras are not MASAs.
\begin{proposition}[{\cite[Corollary 3.11]{Bikram}}]\label{Prop:notmasa}
If $\mathsf{M}$ is a type $\operatorname{III}$ von Neumann algebra and $\mathsf{N} \subseteq \mathsf{M}$ is a quasi-split inclusion then $\mathsf{N}^{\prime} \cap \mathsf{M}$ is also of type $\operatorname{III}$. In particular $\mathsf{N}$ cannot be a MASA.
\end{proposition}
We would like to present now a useful criterion for proving that a given inclusion is quasi-split, which is a variant of Proposition 2.3 from \cite{MR1038440}. Recall first that if a von Neumann algebra $\mathsf{M}$ is represented on a Hilbert space $\mathsf{H}$ with a cyclic and separating vector $\Omega$ then $\mathsf{H}$ can be identified with $\LL^{2}(\mathsf{M})$ and we have an inclusion $\Phi_{2}: \mathsf{M} \to \LL^{2}(\mathsf{M})$ given by $x \mapsto \nabla^{\frac{1}{4}} x\Omega$.
We will also need the notion of a nuclear map between two Banach spaces $X$ and $Y$. A map $T:X \to Y$ is called nuclear if there are sequences $(y_n)_{n\in \mathbb{N}} \subseteq Y$ and $(x_n^{\ast})_{n\in \mathbb{N}} \subseteq X^{\ast}$ such that $Tx = \sum_{n\in \mathbb{N}} x_{n}^{\ast}(x) y_n$ and $\sum_{n\in \mathbb{N}} \|x_n^{\ast}\| \|y_n\| < \infty$.
\begin{proposition}[{\cite[Proposition 3.7]{Bikram}}]\label{Prop:nuclear}
Let $\mathsf{N} \subseteq \mathsf{M}$ be a pair of von Neumann algebras. If the map $\Phi_{2| \mathsf{N}}: \mathsf{N} \to \LL^{2}(\mathsf{M})$ is nuclear then the inclusion $\mathsf{N} \subseteq \mathsf{M}$ is quasi-split.
\end{proposition}
\subsection{Quasi-split inclusion of the algebra of class functions}
In this subsection we will present examples of compact quantum groups for which the inclusion of the algebra of class functions is quasi-split. Before doing that we need some preparation regarding the action of the modular group on characters of unitary representations.
Recall that our aim is to show that the map $\Phi_{2|\mathscr{C}_{\mathbb{G}}}: \mathscr{C}_{\mathbb{G}} \to \LL^{2}(\mathbb{G})$ given by $x \mapsto \nabla^{\frac{1}{4}} \Lambda_{h}(x)$ is nuclear. Note that $\mathscr{C}_{\mathbb{G}}$ is given by the closed linear span of the characters of the (finite dimensional) unitary representations and these characters are analytic elements for the modular group. Therefore $\nabla^{\frac{1}{4}} \Lambda_h(\chi) = \Lambda_h(\sigma_{-\frac{i}{4}}(\chi))$ holds for every character $\chi$; we first have to understand the action of the modular group on the characters.
Recall that (see \cite[Page 30]{NeshTu}) for any representation $U$ on $\mathsf{H}_{U}$ we have $(\op{Id} \otimes \sigma_z)(U) = (\uprho_U^{iz} \otimes \mathds{1}_{U})U(\uprho_U^{iz} \otimes \mathds{1}_{U})$. If we choose an orthonormal basis of $\mathsf{H}_{U}$ in which $\uprho_{U}$ is diagonal then we can write more concretely that $\sigma_{z}(u_{kl}) = \uprho_{U,k}^{iz} \uprho_{U,l}^{iz} u_{kl}$. Therefore for the character $\chi_U:= \sum_{k} u_{kk}$ we have $\sigma_z(\chi_U) = \sum_{k} \uprho_{U,k}^{2iz} u_{kk}$. We will now compute the $\LL^{2}$-norm of this element.
\begin{lemma}\label{modularcharacter}
If $U$ is irreducible then we have $\|\sigma_{a+ib}(\chi_U)\|_2^2 = \frac{\op{Tr} (\uprho_U^{-4b-1})}{\op{Tr}(\uprho_U)}$ for all $a,b\in\mathbb{R}$.
\end{lemma}
\begin{proof}
Recall that by definition $\|x\|_2^2 = h(x^{\ast}x)$, so in our case we get
\[
\|\sigma_{a+ib}(\chi_U)\|_2^2 = \sum_{k,l} \uprho_{U,k}^{-2ia-2b} \uprho_{U,l}^{2ia - 2b} h(u_{kk}^{\ast} u_{ll}).
\]
Using the orthogonality relations (see \cite[Theorem 1.4.3]{NeshTu}) we get $h(u_{kk}^{\ast} u_{ll}) = \delta_{k,l} \frac{\uprho^{-1}_{U,k}}{\op{dim}_q(U)}$. Therefore we obtain
\[
\|\sigma_{a+ib}(\chi_U)\|_2^2 = \sum_{k} \uprho_{U,k}^{-4b} \frac{\uprho_{U,k}^{-1}}{\op{dim}_q(U)} = \frac{\op{Tr}(\uprho_{U}^{-4b-1})}{\op{dim}_q(U)}.
\]
To finish the proof we just have to recall that $\dim_q(U) = \op{Tr}(\uprho_U)$.
\end{proof}
\begin{corollary}\label{Cor:modularchar}
We have $\|\chi_U\|_2=1$ and $\|\sigma_{-\frac{i}{4}}(\chi_U)\|_2^2 = \frac{\op{dim}(U)}{\op{dim}_q(U)}$.
\end{corollary}
The relation between quantum dimension and the usual dimension will be crucial for proving that the inclusion of the algebra of class functions is quasi-split. We will present here a precise criterion and then describe a class of compact quantum groups to which it applies.
\begin{theorem}\label{Thm:quasi-split}
Let $\mathbb{G}$ be a compact quantum group. Suppose that $\sum_{\alpha \in \Irr(\mathbb{G})} \left(\frac{\op{dim}(\alpha)}{\op{dim}_q(\alpha)}\right)^{\frac{1}{2}} < \infty$. Then the inclusion $\mathscr{C}_{\mathbb{G}} \subseteq \LL^{\infty}(\mathbb{G})$ is quasi-split.
\end{theorem}
\begin{proof}
We want to show that the map $\Phi_{2|\mathscr{C}_{\mathbb{G}}}: \mathscr{C}_{\mathbb{G}} \to \LL^{2}(\mathbb{G})$ is nuclear. Recall that it is a composition of two maps: the inclusion $\Lambda_h: \mathscr{C}_{\mathbb{G}} \to \Lambda_h(\mathscr{C}_{\mathbb{G}})$ and $\nabla^{\frac{1}{4}}: \Lambda_h(\mathscr{C}_{\mathbb{G}}) \to \LL^{2}(\mathbb{G})$.
We will first show that $\nabla^{\frac{1}{4}}$ extends to a contraction from $\LL^{2}(\mathscr{C}_{\mathbb{G}}):= \overline{\Lambda_h(\mathscr{C}_{\mathbb{G}})}$ to $\LL^{2}(\mathbb{G})$. Note that the characters of irreducible representations are linearly dense in $\LL^{2}(\mathscr{C}_{\mathbb{G}})$ and the characters form an orthonormal set, by the orthogonality relations. Let $x:= \sum_{\alpha} c_{\alpha}\chi_{\alpha}$ be a finite sum of characters of irreducible representations. Note that $\|\Lambda_h(x^{\ast})\|^2 = \|\sum_{\alpha} \overline{c_{\alpha}} \Lambda_h(\chi_{\overline{\alpha}})\|^2 = \sum_{\alpha} |c_{\alpha}|^2 = \|\Lambda_h(x)\|^2$. It follows that
\begin{align*}
\|\nabla^{\frac{1}{4}} \Lambda_h(x)\|^2 &= \ismaa{\Lambda_h(x)}{\nabla^{\frac{1}{2}} \Lambda_h(x)} \\
&= \ismaa{J\nabla^{\frac{1}{2}} \Lambda_h(x)}{J \Lambda_h(x)} \\
&= \ismaa{\Lambda_h(x^{\ast})}{J \Lambda_h(x)} \\
&\leqslant \|\Lambda_h(x^{\ast})\|\cdot \|\Lambda_h(x)\| = \|\Lambda_h(x)\|^2,
\end{align*}
so $\nabla^{\frac{1}{4}}$ extends to a contraction from $\LL^{2}(\mathscr{C}_{\mathbb{G}})$ to $\LL^2(\mathbb{G})$.
We will now show that $\Phi_2$ from $\mathscr{C}_{\mathbb{G}}$ to $\LL^{2}(\mathbb{G})$ is a nuclear map. We have $\Phi_2(x) = \nabla^{\frac{1}{4}} \Lambda_h(x)$. As $\Lambda_h(x) \in \LL^{2}(\mathscr{C}_{\mathbb{G}})$, we can write $\Lambda_h(x) = \sum_{\alpha} \ismaa{ \Lambda_{h}(\chi_{\alpha})}{ \Lambda_{h}(x)} \Lambda_h(\chi_{\alpha})$. As $\nabla^{\frac{1}{4}}: \LL^{2}(\mathscr{C}_{\mathbb{G}}) \to \LL^{2}(\mathbb{G})$ is bounded, we have
\[
\Phi_2(x) = \sum_{\alpha \in \Irr(\mathbb{G})} \ismaa{ \Lambda_{h}(\chi_{\alpha})}{ \Lambda_h(x)} \nabla^{\frac{1}{4}}\Lambda_h(\chi_{\alpha}).
\]
If we define functionals $\omega_{\alpha}(x):= \ismaa{\Lambda_{h}(\chi_{\alpha})}{\Lambda_{h}(x)}$ then it suffices to check that $\sum_{\alpha} \|\omega_{\alpha}\|\cdot \|\nabla^{\frac{1}{4}} \Lambda_h(\chi_{\alpha})\| < \infty$. We already know that $\|\nabla^{\frac{1}{4}} \Lambda_h(\chi_{\alpha})\| = \left(\frac{\op{dim}(\alpha)}{\op{dim}_q(\alpha)}\right)^{\frac{1}{2}}$ and it is clear that $\|\omega_{\alpha}\|\leqslant \|\chi_{\alpha}\|_2 = 1$, hence
\[
\sum_{\alpha\in\Irr(\mathbb{G})} \|\omega_{\alpha}\|\cdot \|\nabla^{\frac{1}{4}} \Lambda_h(\chi_{\alpha})\| \leqslant \sum_{\alpha\in\Irr(\mathbb{G})} \left(\frac{\op{dim}(\alpha)}{\op{dim}_q(\alpha)}\right)^{\frac{1}{2}} < \infty.
\]
By Proposition \ref{Prop:nuclear} the inclusion $\mathscr{C}_{\mathbb{G}} \subseteq \LL^{\infty}(\mathbb{G})$ is quasi-split.
\end{proof}
This result is already enough to prove that in many cases the radial subalgebra in $\LL^{\infty}(O_{F}^{+})$ is not a MASA; it follows from \cite{Boundary} that $\LL^{\infty}(O_{F}^{+})$ is often a type $\operatorname{III}$ factor and we can use Proposition \ref{Prop:notmasa}. We will generalize this result in the next section (see Corollary \ref{Cor:quasisplit}).
\section{Relative commutant of $\mathscr{C}_{\mathbb{G}}$ and inner scaling automorphisms}\label{sec:3}
We will be interested in the relative commutant $\mathscr{C}_{\mathbb{G}}^{\prime} \cap \LL^{\infty}(\mathbb{G})$. If $\mathscr{C}_{\mathbb{G}}$ is commutative, as is the case for example for the free orthogonal quantum groups, then the condition $\mathscr{C}_{\mathbb{G}}^{\prime} \cap \LL^{\infty}(\mathbb{G}) \subseteq \mathscr{C}_{\mathbb{G}}$ precisely means that $\mathscr{C}_{\mathbb{G}}$ is a MASA in $\LL^{\infty}(\mathbb{G})$.\\
Our strategy for proving that $\mathscr{C}_{\mathbb{G}}$ cannot be a MASA in many cases will be the following. We will show that if $\mathscr{C}_{\mathbb{G}}$ was a MASA then $\LL^{\infty}(\mathbb{G})$ would have to be a factor. Moreover, if the inclusion $\mathscr{C}_{\mathbb{G}}\subseteq \LL^{\infty}(\mathbb{G})$ is quasi-split then it would have to be a type $\operatorname{I}$ factor. We will then use properties of the scaling automorphisms to exclude this case. Let us now move on to more precise statements.
\begin{proposition}\label{Prop:masafactor}
Let $\mathbb{G}$ be a compact quantum group. Then
\[
\overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha}\,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\} = \mathscr{C}_{\mathbb{G}} \cap \LL^{\infty}(\mathbb{G})^{\sigma} = \bigcap_{t\in \mathbb{R}} \sigma_t(\mathscr{C}_{\mathbb{G}}).
\]
If moreover $\mathscr{C}_{\mathbb{G}}^{\prime}\cap \LL^{\infty}(\mathbb{G}) \subseteq \mathscr{C}_{\mathbb{G}}$ then
\[
\mathcal{Z}(\LL^{\infty}(\mathbb{G})) \subseteq \overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha}\,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\}
\]
In particular, if $\uprho_{\alpha} \neq \mathds{1}_{\alpha}$ for all non-trivial irreducible representations of $\mathbb{G}$ then $\LL^{\infty}(\mathbb{G})$ is a factor.
\end{proposition}
\begin{proof}
It is clear that $\overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha} \,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\} \subseteq \mathscr{C}_{\mathbb{G}} \cap \LL^{\infty}(\mathbb{G})^{\sigma} \subseteq \bigcap_{t\in\mathbb{R}} \sigma_t(\mathscr{C}_{\mathbb{G}})$. Now let $x\in \bigcap_{t\in\mathbb{R}} \sigma_t(\mathscr{C}_{\mathbb{G}})$; we can write $\Lambda_h(\sigma_t(x)) = \sum_{\alpha} c_{\alpha} \Lambda_h(\sigma_t(\chi_{\alpha})) = \sum_{\alpha} c_{\alpha, t} \Lambda_h(\chi_{\alpha})$. It follows from the orthogonality relations that the elements $\sigma_t(\chi_{\alpha})$ and $\chi_{\beta}$ are orthogonal unless $\alpha=\beta$. Therefore we get $c_{\alpha}\sigma_t(\chi_{\alpha}) = c_{\alpha,t} \chi_{\alpha}$ for all $t$, hence either $c_{\alpha} = c_{\alpha,t} = 0$ or $\chi_{\alpha}$ is an eigenvector of the modular group. If $\alpha$ is an irreducible representation on the Hilbert space $\mathsf{H}_\alpha$ and we pick an orthonormal basis $(e_k)_k$ in which the matrix $\uprho_{\alpha}$ is diagonal then $\sigma_z(\chi_{\alpha}) = \sum_{k} \uprho_{\alpha,k}^{2iz} u^{\alpha}_{k,k}$, where $\chi_{\alpha} = \sum_{k} u^{\alpha}_{k,k}$. Thus $\chi_{\alpha}$ is an eigenvector of the modular group iff the matrix $\uprho_{\alpha}$ is a multiple of the identity, which actually forces $\uprho_{\alpha} = \mathds{1}$ due to the condition $\Tr(\uprho_{\alpha}) = \Tr(\uprho_{\alpha}^{-1})$. It follows that if a character of an irreducible representation is an eigenvector of the modular group then it is in fact a fixed point.
Denote $A:= \overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha} \,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\}$. We showed that any element $x\in \bigcap_{t\in\mathbb{R}} \sigma_t(\mathscr{C}_{\mathbb{G}})$ satisfies $\Lambda_h(x) \in \overline{\Lambda_h(A)}$. Since $A$ is contained in the centralizer, there exists a normal, faithful, state-preserving conditional expectation onto it, and it is easy to conclude that it implies $x\in A$. Alternatively one can invoke Lemma \ref{lemma4.2.2} because the Haar integral on the algebra $A$ is tracial.
To finish the proof, note that the condition $\mathscr{C}_{\mathbb{G}}^{\prime} \cap \LL^{\infty}(\mathbb{G})\subseteq \mathscr{C}_{\mathbb{G}}$ implies that $\mathcal{Z}(\LL^{\infty}(\mathbb{G})) \subseteq \mathscr{C}_{\mathbb{G}}$. Moreover the center is always contained in the centralizer, so we obtain $\mathcal{Z}(\LL^{\infty}(\mathbb{G})) \subseteq \mathscr{C}_{\mathbb{G}} \cap \LL^{\infty}(\mathbb{G})^{\sigma}$.
\end{proof}
The next technical ingredient, featuring the scaling group, is the following proposition.
\begin{proposition}\label{Prop:scaling}
Let $\mathbb{G}$ be a compact quantum group and let $t\in \mathbb{R}$. Suppose that $\mathscr{C}_{\mathbb{G}}^{\prime} \cap \LL^{\infty}(\mathbb{G}) \subseteq \mathscr{C}_{\mathbb{G}}$, the scaling automorphism $\tau_t$ is inner and is implemented by $v \in \LL^{\infty}(\mathbb{G})$. Then $v\in \overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha}\,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\}$.
\end{proposition}
\begin{proof}
The scaling group acts trivially on characters, so we have $\chi_{\alpha} = \tau_t(\chi_{\alpha}) = v\chi_{\alpha} v^{\ast}$ for any $\alpha \in \Irr(\mathbb{G})$. Therefore $v \in \mathscr{C}_{\mathbb{G}}^{\prime} \cap \LL^{\infty}(\mathbb{G}) \subseteq \mathscr{C}_{\mathbb{G}}$. Because of that we can write $\Lambda_h(v) = \sum_{\alpha} c_{\alpha} \Lambda_h(\chi_{\alpha})$.
We will now use the fact that the scaling group and the modular group commute, so for any $x\in \LL^{\infty}(\mathbb{G})$ we can write
\[
v x v^{\ast} = \tau_t(x) = \sigma_s \tau_t(\sigma_{-s}(x)) = \sigma_s(v \sigma_{-s}(x) v^{\ast}) = \sigma_s(v) x \sigma_{s}(v^{\ast}).
\]
It follows that $\sigma_s(v^{\ast})v x = x \sigma_s(v^{\ast}) v$, hence $\sigma_s(v^{\ast}) v \in \mathcal{Z}(\LL^{\infty}(\mathbb{G}))$ for every $s\in \mathbb{R}$. We can write $\sigma_s(v) = v w_s$ with $w_s = v^{\ast} \sigma_s(v) \in \mathcal{Z}(\LL^{\infty}(\mathbb{G}))$. As $\mathcal{Z}(\LL^{\infty}(\mathbb{G})) \subseteq \mathscr{C}_{\mathbb{G}}$, we have $vw_s \in \mathscr{C}_{\mathbb{G}}$. It follows that $\sigma_s(v) \in \mathscr{C}_{\mathbb{G}}$ for any $s\in \mathbb{R}$, i.e. $v \in \bigcap_{t\in\mathbb{R}} \sigma_t(\mathscr{C}_{\mathbb{G}})$; Proposition \ref{Prop:masafactor} allows us to conclude.
\end{proof}
Before we state and prove the main result of this section, we need to record another useful consequence of having a quasi-split inclusion.
\begin{lemma}[{\cite[Remark 3.10 (2)]{Bikram}}]\label{Lem:typeI}
Suppose that the inclusion $\mathsf{B} \subseteq \mathsf{M}$ is quasi-split and $\mathsf{B}$ is a MASA in $\mathsf{M}$. Then $\mathsf{M}$ is a direct sum of type $\operatorname{I}$ factors.
\end{lemma}
\begin{theorem}\label{Thm:nonmasa}
Suppose that $\mathbb{G}$ is a non-trivial compact quantum group such that the inclusion $\mathscr{C}_{\mathbb{G}}\subseteq \LL^{\infty}(\mathbb{G})$ is quasi-split and $\uprho_{\alpha} \neq \mathds{1}_{\alpha}$ for any non-trivial $\alpha \in \Irr(\mathbb{G})$. Then $\mathscr{C}_{\mathbb{G}}$ is not a MASA in $\LL^{\infty}(\mathbb{G})$.
\end{theorem}
\begin{proof}
Suppose that $\mathscr{C}_{\mathbb{G}}$ is a MASA in $\LL^{\infty}(\mathbb{G})$. It follows from Lemma \ref{Lem:typeI} that $\LL^{\infty}(\mathbb{G})$ is a direct sum of type $\operatorname{I}$ factors. Moreover, it follows from Proposition \ref{Prop:masafactor} that $\LL^{\infty}(\mathbb{G})$ is a factor, so $\LL^{\infty}(\mathbb{G})\simeq \op{B}(\mathsf{H})$ for some Hilbert space $\mathsf{H}$.
By our assumptions there exists an irreducible representation $\alpha$ with $\uprho_{\alpha}\neq \mathds{1}_{\alpha}$, thus $\mathbb{G}$ is not of Kac type, so there exists a non-trivial scaling automorphism $\tau_t$. All automorphisms of $\op{B}(\mathsf{H})$ are inner, so there exists $v\in \LL^{\infty}(\mathbb{G})$ implementing it. By Proposition \ref{Prop:scaling} $v \in \overline{\op{span}}^{w^{\ast}}\{\chi_{\alpha}\,|\, \uprho_{\alpha} = \mathds{1}_{\alpha}\} = \mathbb{C} \mathds{1}$. But that means that $\tau_t$ is a trivial automorphism and this leads us to the desired contradiction.
\end{proof}
We will provide examples to which this result can be applied in Subsection \ref{subsec:abelian} (see Corollary \ref{Cor:quasisplit}).
\begin{remark}
In the proof of Theorem \ref{Thm:nonmasa} we argued using Proposition \ref{Prop:scaling} that if $\mathscr{C}_{\mathbb{G}}$ is a MASA in $\LL^{\infty}(\mathbb{G})$, then $\LL^{\infty}(\mathbb{G})$ is not isomorphic to $\B(\mathsf{H})$. In fact, one can show that $\LL^{\infty}(\mathbb{G})$ is not isomorphic to $\B(\mathsf{H})$ for any non-trivial compact quantum group $\mathbb{G}$, see \cite{KrajczokSoltan}.
\end{remark}
\section{Examples}\label{sec:examples}
\subsection{Properties of $\mathrm{SU}_q(2)$}
Fix $q\in (-1,1)\setminus\{0\}$. In this subsection we establish a number of properties of $\mathscr{C}_{\mathrm{SU}_q(2)}$: we show that it is not a MASA in $\LL^{\infty}(\mathrm{SU}_q(2))$ (Proposition \ref{prop4.1.1}), however it is a MASA in $\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$, the fixed point subalgebra of the scaling group (Proposition \ref{prop4.1.2}). This property will be used in the next subsection, where we construct a new compact quantum group out of $\mathrm{SU}_q(2)$ and $\mathbb{Q}$, using a bicrossed product construction.\\
Let us start with recalling a description of $\mathrm{SU}_q(2)$ from the dual perspective. Since $\mathrm{C}(\mathrm{SU}_q(2))$ is a type $\operatorname{I}$, separable $\ensuremath{\mathrm{C}^*}$-algebra \cite[Theorem A.2.3]{Woronowiczsu2}, $\widehat{\mathrm{SU}_q(2)}$ is a type $\operatorname{I}$ (second countable) discrete quantum group and we can use Desmedt's theorem to describe its structure using decompositions into direct integrals (see \cite{Desmedt} and \cite[Example 7.1]{KrajczokModular}). For each $\lambda\in \mathbb{T}$ there is an irreducible representation
\[
\psi_{\lambda}\colon \mathrm{C}(\mathrm{SU}_q(2))\rightarrow \B(\mathsf{H}_\lambda)=\B(\ell^2(\mathbb{Z}_+)),
\]
given by
\[
\psi_\lambda(\alpha)\phi_k=\sqrt{1-q^{2k}}\phi_{k-1},\quad
\psi_{\lambda} (\gamma)\phi_k = \lambda q^k \phi_k\quad(k\in\mathbb{Z}_+)
\]
($\{\phi_{k}\}_{k\in\mathbb{Z}_+}$ is the standard orthonormal basis in $\ell^2(\mathbb{Z}_+),\, \phi_{-1}=0$ and $\alpha,\gamma$ are the standard generators of $\mathrm{C}(\mathrm{SU}_q(2))$). Denote by $\mu$ the normalized Lebesgue measure on the unit circle $\mathbb{T}$.
Desmedt's theorem provides us with a unitary operator $\mathcal{Q}_L\colon \LL^2(\mathrm{SU}_q(2))\rightarrow \int_{\mathbb{T}}^{\oplus} \HS(\mathsf{H}_\lambda)\operatorname{d}\!\mu(\lambda)$ given by
\[
\mathcal{Q}_L\colon \Lambda_h(a)\mapsto \int_{\mathbb{T}}^{\oplus} \psi_\lambda(a) D_\lambda^{-1}\operatorname{d}\!\mu(\lambda)\quad(a\in \mathrm{C}(\mathrm{SU}_q(2)))
\]
where $D_\lambda^{-1}$ is a positive Hilbert-Schmidt operator
\[
D_\lambda^{-1}= \sqrt{1-q^2} \operatorname{diag}(1, |q|,|q|^{2},\dotsc)
\]
written with respect to the basis $\{\phi_k\}_{k\in\mathbb{Z}_+}$. Furthermore, we have
\begin{equation}\label{eq4.1.1}
\mathcal{Q}_L \LL^{\infty}(\mathrm{SU}_q(2)) \mathcal{Q}_L^*=
\int_{\mathbb{T}}^{\oplus} \B(\mathsf{H}_\lambda)\otimes \mathds{1}_{\overline{\mathsf{H}_\lambda}}
\,\operatorname{d}\!\mu(\lambda).
\end{equation}
The next lemma says that the von Neumann algebra generated by the real part of a weighted shift is MASA in $\B(\ell^2(\mathbb{Z}_+))$.
\begin{lemma}\label{lemma4.1.1}
Let $s\in \B(\ell^2(\mathbb{Z}_+))$ be the shift operator given by $s\phi_k=\phi_{k-1}\,(k\in\mathbb{Z}_+)$, and let $\M_f\in \B(\ell^2(\mathbb{Z}_+))$ be the multiplication operator associated with a function $f\in \ell^{\infty}(\mathbb{Z}_+)$. If $f(\mathbb{N})\subseteq \mathbb{R}_{>0}$ then the von Neumann algebra $\mathscr{B}$ generated by $T=s\M_f+\M_f s^*$ is maximal abelian in $\B(\ell^2(\mathbb{Z}_+))$.
\end{lemma}
\begin{proof}
According to \cite[Theorem 4.7.7]{AnalysisNow}, the claim follows once we show that there exists a cyclic vector for $\mathscr{B}=\{T\}''$. We claim that $\phi_0$ is such a vector. Indeed, it is clear that $\phi_0$ belongs to $V=\overline{ \mathscr{B} \phi_0}$. Next, assume that $\phi_0,\dotsc,\phi_n\in V$ for some $n\in\mathbb{Z}_+$. Then $\phi_{n+1}=\tfrac{1}{f(n+1)}T(\phi_n)-\tfrac{f(n)}{f(n+1)}\phi_{n-1}$ belongs to $V$ and consequently $V=\B(\ell^2(\mathbb{Z}_+))$.
\end{proof}
One easily sees that $\mathscr{C}_{\mathrm{SU}_q(2)}$ is abelian and $\mathscr{C}_{\mathrm{SU}_q(2)}=\{\alpha+\alpha^*\}''$. Indeed, $\alpha+\alpha^*$ is the character of the fundamental representation and the fusion rules of $\mathrm{SU}_q(2)$ imply that $\chi(U^n)\in\{\alpha+\alpha^*\}''$ for all $U^n\in\Irr(\mathrm{SU}_q(2))$. Consequently\footnote{By an abuse of notation, we will write $\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})$ for the von Neumann algebra generated by $\psi_1(\alpha+\alpha^*)$.},
\begin{equation}\label{eq4.1.2}
\mathcal{Q}_L \mathscr{C}_{\mathrm{SU}_q(2)}\mathcal{Q}_L^*=
\bigl\{\int_{\mathbb{T}}^{\oplus} T\otimes\mathds{1}_{\overline{\mathsf{H}_\lambda}}
\operatorname{d}\!\mu(\lambda)\,|\, T\in \psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})\bigr\}\simeq
\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})\otimes \mathds{1}_{\LL^{\infty}(\mathbb{T})}
\end{equation}
(observe that $\psi_\lambda(\alpha+\alpha^*)=\psi_1(\alpha+\alpha^*)$ for all $\lambda\in\mathbb{T}$).
Note, using equation \eqref{eq4.1.2}, that $\mathscr{C}_{\mathrm{SU}_q(2)}$ does not contain the center of $\LL^{\infty}(\mathrm{SU}_q(2))\simeq \B(\ell^2(\mathbb{Z}_{+}))\overline{\otimes} \LL^{\infty}(\mathbb{T})$, so it is certainly not a MASA. The next result describes its relative commutant.
\begin{proposition}\label{prop4.1.1}
The relative commutant of $\mathscr{C}_{\mathrm{SU}_q(2)}$ is given by
\[\begin{split}
\mathcal{Q}_L (\mathscr{C}_{\mathrm{SU}_q(2)}'\cap \LL^{\infty}(\mathrm{SU}_q(2)))\mathcal{Q}_L^*&=
\bigl\{\int_{\mathbb{T}}^{\oplus} T_\lambda\otimes\mathds{1}_{\overline{\mathsf{H}_\lambda}}
\operatorname{d}\!\mu(\lambda)\,|\, T_\lambda \in \psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})\text{ for a.e. }\lambda \in \mathbb{T} \bigr\}\\
&\simeq
\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})\overline{\otimes} \LL^{\infty}(\mathbb{T}).
\end{split}\]
\end{proposition}
\begin{proof}
Inclusion $\supseteq$ clearly follows from equation \eqref{eq4.1.2}, assume that $T$ belongs to $\mathcal{Q}_L (\mathscr{C}_{\mathrm{SU}_q(2)}'\cap \LL^{\infty}(\mathrm{SU}_q(2)))\mathcal{Q}_L^*$. Using \eqref{eq4.1.1} we can write $T=\int_{\mathbb{T}}^{\oplus} T_\lambda\otimes\mathds{1}_{\overline{\mathsf{H}_\lambda}}\operatorname{d}\!\mu(\lambda)$ for some $T_\lambda\in\B(\mathsf{H}_\lambda)$. Our assumption forces $T_\lambda\in \psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})'$ for almost all $\lambda\in\mathbb{T}$. From the definition of $\psi_1$ we see that $\psi_1(\alpha)$ is a weighted shift and Lemma \ref{lemma4.1.1} applies -- $\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})$ is a MASA in $\B(\ell^2(\mathbb{Z}_+))$, hence $T_\lambda\in\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})$ and the claim follows.
\end{proof}
Despite the above negative result, we can nonetheless obtain some examples of MASAs. First of all, since $\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})$ is a MASA in $\B(\ell^2(\mathbb{Z}_+))$ we immediately get that the subalgebra generated by $\mathscr{C}_{\mathrm{SU}_q(2)}$ and the center of $\LL^{\infty}(\mathrm{SU}_q(2))$ is a MASA in $\LL^{\infty}(\mathrm{SU}_q(2))$. More nontrivially, we will prove that $\mathscr{C}_{\mathrm{SU}_q(2)}$ is MASA in the smaller von Neumann algebra of fixed points for the scaling group. Recall that we denote this algebra by $\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$.
\begin{proposition}\label{prop4.1.2}
The algebra of class functions $\mathscr{C}_{\mathrm{SU}_q(2)}$ is a MASA in $\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$, i.e.
\[
\mathscr{C}_{\mathrm{SU}_q(2)}'\cap\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}=\mathscr{C}_{\mathrm{SU}_q(2)}.
\]
\end{proposition}
\begin{proof}
Observe first that since $\mathscr{C}_{\mathrm{SU}_q(2)}$ is generated by characters, we have $\mathscr{C}_{\mathrm{SU}_q(2)}\subseteq \LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$.
Take $T=\int_{\mathbb{T}}^{\oplus}T_\lambda\otimes\mathds{1}_{\overline{\mathsf{H}_{\lambda}}}\operatorname{d}\!\mu(\lambda)$ in $\mathcal{Q}_L(\mathscr{C}_{\mathrm{SU}_q(2)}'\cap \LL^{\infty}(\mathrm{SU}_q(2))^{\tau})\mathcal{Q}_L^*$. Proposition \ref{prop4.1.1} implies that $T_\lambda\in\psi_1(\mathscr{C}_{\mathrm{SU}_q(2)})$ for almost all $\lambda\in\mathbb{T}$. Denote by $P$ the operator implementing the scaling group for $\mathrm{SU}_q(2)$ and its dual \cite[Definition 6.9]{KustermansVaes1}. We know how to express this operator on the level of direct integrals (see \cite[Proposition 7.3]{KrajczokModular}): for all $t\in\mathbb{R}$ we have
\begin{equation}\label{eq4.1.4}
\mathcal{Q}_L P^{it} \mathcal{Q}_L^*\colon \int_{\mathbb{T}}^{\oplus} \HS(\mathsf{H}_\lambda)
\operatorname{d}\!\mu(\lambda)\ni \int_{\mathbb{T}}^{\oplus}\xi_\lambda \operatorname{d}\!\mu(\lambda)\mapsto
\int_{\mathbb{T}}^{\oplus}\xi_{\lambda|q|^{2it}} \operatorname{d}\!\mu(\lambda)
\in \int_{\mathbb{T}}^{\oplus} \HS(\mathsf{H}_\lambda)
\operatorname{d}\!\mu(\lambda),
\end{equation}
and since $T$ is invariant under the (transformed) scaling group we have
\begin{equation}\label{eq4.1.3}
\int_{\mathbb{T}}^{\oplus} T_\lambda \otimes \mathds{1}_{\overline{\mathsf{H}_\lambda}}\operatorname{d}\!\mu(\lambda)=T=(\mathcal{Q}_L P^{it} \mathcal{Q}_L^*) T
(\mathcal{Q}_L P^{-it} \mathcal{Q}_L^*)=
\int_{\mathbb{T}}^{\oplus} T_{\lambda|q|^{2it}}\otimes \mathds{1}_{\overline{\mathsf{H}_\lambda}}\operatorname{d}\!\mu(\lambda).
\end{equation}
It follows that $\mathbb{T}\ni\lambda\mapsto T_\lambda\in \B(\ell^2(\mathbb{Z}_+))$ is constant almost everywhere. Indeed, for $\kappa\in\mathbb{T}$ denote by $f_\kappa\in \B(\ell^2(\mathbb{Z}_+))\overline{\otimes} \LL^{\infty}(\mathbb{T})$ the function $\lambda\mapsto T_{\lambda \kappa}$. Equation \eqref{eq4.1.3} implies $f_1=f_\kappa\,(\kappa\in\mathbb{T})$. For all $\theta\in\LL^1(\mathbb{T}),\omega\in \B(\ell^2(\mathbb{Z}_+))_*$ we get\footnote{Integrals of $\B(\ell^2(\mathbb{Z}_+))$ or $\LL^{\infty}(\mathbb{T})\overline{\otimes}\B(\ell^2(\mathbb{Z}_+))$--valued functions are understood in the sense of Pettis, where the von Neumann algebras are equipped with the $w^*$--topology.}
\[\begin{split}
&\quad\;
(\omega\otimes\theta)f_1=(\omega\otimes\theta)\bigl(\int_{\mathbb{T}} f_\kappa\operatorname{d}\!\mu(\kappa)\bigr)=
\int_{\mathbb{T}} (\omega\otimes\theta) (f_\kappa)\operatorname{d}\!\mu(\kappa)\\
&=
\int_{\mathbb{T}} \int_{\mathbb{T}}\theta(\lambda) \omega(f_{\kappa}(\lambda))\operatorname{d}\!\mu(\lambda)\operatorname{d}\!\mu(\kappa)=
\int_{\mathbb{T}} \theta(\lambda) \int_{\mathbb{T}}\omega(T_{\lambda\kappa})\operatorname{d}\!\mu(\kappa)\operatorname{d}\!\mu(\lambda)\\
&=
\bigl(\int_{\mathbb{T}}\theta(\lambda)\operatorname{d}\!\mu(\lambda)\bigr) \int_{\mathbb{T}} \omega(T_\kappa)\operatorname{d}\!\mu(\kappa)=
(\omega\otimes\theta)\bigl(\int_{\mathbb{T}} T_\kappa \operatorname{d}\!\mu(\kappa)\otimes
\mathds{1}_{\LL^{\infty}(\mathbb{T})}\bigr),
\end{split}\]
hence $f_1=\int_{\mathbb{T}} T_\kappa\operatorname{d}\!\mu(\kappa)\otimes \mathds{1}_{\LL^{\infty}(\mathbb{T})}$. Consequently, $T$ belongs to $\mathcal{Q}_L \mathscr{C}_{\mathrm{SU}_q(2)}\mathcal{Q}_L^*$ (see equation \eqref{eq4.1.2}).
\end{proof}
\subsection{A certain bicrossed product construction}\label{subsec:bicross}
In this subsection we present a construction of a class of compact quantum groups $\mathbb{H}$ given by a bicrossed product of a compact quantum group $\mathbb{G}$ and the additive group of rational numbers $\mathbb{Q}$ (in this paper we equip $\mathbb{Q}$ with the discrete topology), where $\mathbb{Q}$ acts on $\operatorname{L}^{\infty}(\mathbb{G})$ using the scaling group of $\mathbb{G}$. Our construction is a slight variation of a construction presented in \cite[Section 4.1]{DasDawsSalmi} -- the main difference is that we replace $\mathbb{R}$ with a discrete group $\mathbb{Q}$ in order to get a compact quantum group as the bicrossed product. The principal reason why we are interested in this family of quantum groups is the fact that they admit nontrivial inner scaling automorphisms -- a property that appeared in Proposition \ref{Prop:scaling} (see Lemma \ref{lemma4.2.1}. Observe also that equation \eqref{eq4.1.4} implies that nontrivial scaling automorphisms of $\mathrm{SU}_q(2)$ are never inner. Another reason is that these bicrossed products provide examples of compact quantum groups $\mathbb{H}$ with $\LL^{\infty}(\mathbb{H})$ being the type $\operatorname{II}_{\infty}$ injective factor.\\
Later on we will specify to $\mathbb{G}=\mathrm{SU}_q(2)$, for now let $\mathbb{G}$ be an arbitrary compact quantum group. Fix a nonzero number $\nu\in \mathbb{R}\setminus\{0\}$ and denote by $\alpha$ the action of $\mathbb{Q}$ on $\LL^{\infty}(\mathbb{G})$ given by
\[
\alpha_\gamma(x)=\tau_{\nu \gamma}^{\mathbb{G}}(x)\quad(\gamma\in \mathbb{Q}, \, x\in \operatorname{L}^{\infty}(\mathbb{G})).
\]
Let $\mathbb{H}=\mathbb{Q}\bowtie\mathbb{G}$ be the resulting quantum group (see \cite[Section 6]{bicrossed}. One can also define $\mathbb{H}$ as a bicrossed product of $\mathbb{Q}$ and $\mathbb{G}$, hence the notation \cite[Definition 2.1]{VaesVainerman}). For the details of this construction and its properties we refer the reader to \cite{VaesVainerman, Wang, bicrossed}, here we will recall only some of its aspects. By abuse of notation, let us also denote by $\alpha$ the map $\alpha\colon \operatorname{L}^{\infty}(\mathbb{G})\rightarrow \ell^{\infty}(\mathbb{Q})\overline{\otimes} \operatorname{L}^{\infty}(\mathbb{G})$ given by $\alpha(x)(\gamma)=\tau^{\mathbb{G}}_{\nu\gamma}(x)$. We have
\[
\LL^{\infty}(\mathbb{H})=\mathbb{Q}\ltimes_{\alpha}\operatorname{L}^{\infty}(\mathbb{G})=\{\alpha(x), u_\gamma\,|\,
x\in\operatorname{L}^{\infty}(\mathbb{G}), \gamma\in\mathbb{Q}\}''
\]
(where $\mathbb{Q}\ni\gamma\mapsto \lambda_\gamma\in \B(\ell^2(\mathbb{Q}))$ is the left regular representation, $u_\gamma=\lambda_\gamma\otimes\mathds{1}$) and
\[
\ell^{\infty}(\widehat{\mathbb{H}})=\ell^{\infty}(\mathbb{Q})\overline{\otimes}\ell^{\infty}(\widehat{\mathbb{G}}).
\]
These von Neumann algebras are represented on the Hilbert space
\[
\LL^2(\mathbb{H})=\ell^{2}(\mathbb{Q})\otimes \operatorname{L}^{2}(\mathbb{G}).
\]
The bicrossed product $\mathbb{H}$ is compact as it is built from a discrete and a compact quantum group. In fact, the GNS map for $h_{\mathbb{H}}$ is given by
\begin{equation}\label{eq4.2.1}
\Lambda_{h_{\mathbb{H}}}(u_\gamma \alpha(x))=\Lambda_{h_{\widehat{\mathbb{Q}}}}(\lambda_\gamma)\otimes
\Lambda_{h_{\mathbb{G}}}(x)\quad(x\in\operatorname{L}^{\infty}(\mathbb{G}), \gamma\in\mathbb{Q}).
\end{equation}
We can also identify the (left) Haar integral on $\widehat{\mathbb{H}}$ -- it is equal to $\varphi_{\mathbb{Q}}\otimes \varphi_{\widehat{\mathbb{G}}}$ (where $\varphi_{\mathbb{Q}},\varphi_{\widehat{\mathbb{G}}}$ are the left Haar integrals on $\mathbb{Q}$ and $\widehat{\mathbb{G}}$), hence
\[
\nabla_{\varphi_{\widehat{\mathbb{H}}}}=\mathds{1}\otimes \nabla_{\varphi_{\widehat{\mathbb{G}}}}
\]
(it is a combination of Proposition 2.9, Theorem 2.13 and Proposition 2.16 in \cite{VaesVainerman}). Let $P_{\mathbb{G}}$ be the positive operator implementing scaling group, see \cite[Definition 5.1, Remark 5.2]{Daele}. Since equality $\nabla_{\varphi_{\widehat{\mathbb{G}}}}^{it}=P_{\mathbb{G}}^{it}$ holds for any unimodular locally compact quantum group (\cite[Proposition 5.6]{Daele}), we arrive at
\begin{equation}\label{eq4.2.2}
P_{\mathbb{H}}^{it}=\nabla_{\varphi_{\widehat{\mathbb{H}}}}^{it}=
\mathds{1}\otimes \nabla_{\varphi_{\widehat{\mathbb{G}}}}^{it}=
\mathds{1}\otimes P_{\mathbb{G}}^{it}\quad(t\in\mathbb{R}).
\end{equation}
The irreducible representations of $\mathbb{H}$ are indexed by $\mathbb{Q}\times \Irr(\mathbb{G})$. The corresponding characters and $\uprho$ -- operators are given by
\[
\chi_{(\gamma,\delta)}= u_\gamma\alpha(\chi_\delta),\quad
\uprho_{(\gamma,\delta)}=\uprho_{\delta}\quad( (\gamma,\delta)\in \mathbb{Q}\times\Irr(\mathbb{G}))
\]
(see \cite[Theorem 6.1]{bicrossed}).
It is a well known property of crossed products that automorphisms with which $\mathbb{Q}$ acts on $\operatorname{L}^{\infty}(\mathbb{G})$ become inner after the inclusion of $\operatorname{L}^{\infty}(\mathbb{G})$ into $\mathbb{Q}\ltimes_{\alpha}\operatorname{L}^{\infty}(\mathbb{G})$:
\begin{equation}\label{eq4.2.3}
\alpha(\tau^{\mathbb{G}}_{\nu \gamma}(x))=u_\gamma
\alpha(x)
u_\gamma^*\quad(x\in\operatorname{L}^{\infty}(\mathbb{G}),\gamma\in\mathbb{Q}).
\end{equation}
Let us now record a simple result concerning the scaling group of $\mathbb{H}$.
\begin{lemma}\label{lemma4.2.1}$ $
\begin{itemize}
\item We have $\tau^{\mathbb{H}}_{t}(\alpha(x))=\alpha(\tau^{\mathbb{G}}_{t}(x))$ and $\tau^{\mathbb{H}}_t(u_\gamma)=u_\gamma$ for all $t\in\mathbb{R},x\in\operatorname{L}^{\infty}(\mathbb{G}),\gamma\in\mathbb{Q}$.
\item For every $t\in\mathbb{R}$, the scaling automorphism $\tau^{\mathbb{H}}_{t}$ is trivial if and only if $\tau^{\mathbb{G}}_{t}$ is trivial. If $\gamma\in\mathbb{Q}$, then $\tau^{\mathbb{H}}_{\nu\gamma}$ is inner.
\end{itemize}
\end{lemma}
\begin{proof}
The first part is a direct consequence of equations \eqref{eq4.2.1}, \eqref{eq4.2.2}:
\[\begin{split}
&\quad\;
\Lambda_{h_{\mathbb{H}}}(\tau_t^{\mathbb{H}}(\alpha(x)))=
(\mathds{1}\otimes P_{\mathbb{G}}^{it})(\Lambda_{h_{\widehat{\mathbb{Q}}}}(\mathds{1})\otimes \Lambda_{h_{\mathbb{G}}}(x))=
\Lambda_{h_{\widehat{\mathbb{Q}}}}(\mathds{1})\otimes \Lambda_{h_{\mathbb{G}}}(\tau^{\mathbb{G}}_{t}(x))=
\Lambda_{h_{\mathbb{H}}}(\alpha(\tau_t^{\mathbb{G}}(x)))
\end{split}\]
and
\[
\Lambda_{h_{\mathbb{H}}}(\tau^{\mathbb{H}}_t(u_\gamma))=
(\mathds{1}\otimes P_{\mathbb{G}}^{it})(\Lambda_{h_{\widehat{\mathbb{Q}}}}(\lambda_\gamma)\otimes \Lambda_{h_{\mathbb{G}}}(\mathds{1}))=
\Lambda_{h_{\widehat{\mathbb{Q}}}}(\lambda_\gamma)\otimes \Lambda_{h_{\mathbb{G}}}(\mathds{1})=
\Lambda_{h_{\mathbb{H}}}(u_\gamma).
\]
Since $h_{\mathbb{H}}$ is faithful on $\LL^{\infty}(\mathbb{H})$ we get the first claim. As $\alpha$ is a monomorphism, $\tau^{\mathbb{H}}_t$ is trivial if and only so is $\tau^{\mathbb{G}}_{t}$. The last claim follows from equation \eqref{eq4.2.3}.
\end{proof}
Let us end these general considerations with an observation that
\[
u_\gamma\in\mathscr{C}_{\mathbb{H}}\quad(\gamma\in\mathbb{Q})\quad \textnormal{and}\quad \alpha(\mathscr{C}_{\mathbb{G}})\subseteq \mathscr{C}_{\mathbb{H}}.
\]
Indeed, it is a consequence of \cite[Theorem 3.7]{Wang}.\\
Fix $q\in (-1,1)\setminus\{0\}$. From now on we consider the special case $\mathbb{G}=\mathrm{SU}_q(2)$ -- accordingly $\mathbb{H}$ is given by $\mathbb{H}=\mathbb{Q}\bowtie \mathrm{SU}_q(2)$. Note that this quantum group depends on two parameters: $q$ and $\nu$. Using Proposition \ref{prop4.1.2} ($\mathscr{C}_{\mathrm{SU}_q(2)}$ is MASA in $\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$) we are able to deduce the following interesting property of $\mathbb{H}$:
\begin{proposition}\label{prop4.2.1}
Let $\mathbb{H}=\mathbb{Q}\bowtie\mathrm{SU}_q(2)$. The von Neumann algebra $\mathscr{C}_{\mathbb{H}}$ is a MASA in $\LL^{\infty}(\mathbb{H})$.
\end{proposition}
\begin{proof}
First, it is clear that $\mathscr{C}_{\mathbb{H}}$ is commutative. Indeed, since $\mathscr{C}_{\mathrm{SU}_q(2)}$ is commutative, commutativity of $\mathscr{C}_{\mathbb{H}}$ follows from \cite[Theorem 3.7]{Wang}. Take now $T\in \mathscr{C}_{\mathbb{H}}'\cap \LL^{\infty}(\mathbb{H})$ -- we want to show $T\in\mathscr{C}_{\mathbb{H}}$. Let $\mathbb{E}\colon \LL^{\infty}(\mathbb{H})=\mathbb{Q}\ltimes_{\alpha} \LL^{\infty}(\mathrm{SU}_q(2))\rightarrow \LL^{\infty}(\mathrm{SU}_q(2))$ be the canonical faithful normal conditional expectation satisfying $\mathbb{E}(u_\gamma \alpha(x))=\delta_{\gamma,0} x$. Define operators
\[
T_\gamma=\mathbb{E}(u_\gamma^* T)\in\LL^{\infty}(\mathrm{SU}_q(2))\quad(\gamma\in\mathbb{Q}).
\]
Clearly we have
\begin{equation}\label{eq4.2.5}
\ismaa{\xi}{T_\gamma \eta}=
\ismaa{\xi}{\mathbb{E}(u_\gamma^* T) \eta}=
\ismaa{\delta_0 \otimes\xi}{ (u_\gamma^* T) (\delta_0\otimes\eta)}
\end{equation}
for all $\xi,\eta\in\LL^2(\mathrm{SU}_q(2))$.
Fix $\gamma\in\mathbb{Q}$. Using the fact that $T\in \mathscr{C}_{\mathbb{H}}'\cap \LL^{\infty}(\mathbb{H})$ we will now show $T_\gamma\in \mathscr{C}_{\mathrm{SU}_q(2)}'$. Since for any $y\in\mathscr{C}_{\mathrm{SU}_q(2)}$ operator $\alpha(y)$ belongs to $\mathscr{C}_{\mathbb{H}}$, we get
\[\begin{split}
&\quad\;
\ismaa{\xi}{T_\gamma y\eta}=
\ismaa{\delta_\gamma\otimes\xi}{T (\delta_0 \otimes y\eta)}=
\ismaa{\delta_\gamma\otimes\xi}{T \alpha( y)(\delta_0 \otimes \eta)}=
\ismaa{\alpha(y^*)(\delta_\gamma\otimes \xi)}{T (\delta_0\otimes\eta)}\\
&=
\ismaa{\delta_0\otimes y^*\xi}{(u_\gamma^* T)(\delta_0\otimes\eta)}=\ismaa{y^* \xi}{T_\gamma\eta}=\ismaa{\xi}{y T_\gamma\eta}
\end{split}\]
for all vectors $\xi,\eta\in\LL^2(\mathrm{SU}_q(2))$ and consequently $T_\gamma\in \mathscr{C}_{\mathrm{SU}_q(2)}'$.\\
Take $\gamma'\in \mathbb{Q}$. Observe that Lemma \ref{lemma4.2.1} together with equation \eqref{eq4.2.3} implies that $\tau^{\mathbb{H}}_{\nu \gamma'}$ is implemeneted by $u_{\gamma'}\in\mathscr{C}_{\mathbb{H}}$. Using equation \ref{eq4.2.2} we calculate
\[\begin{split}
&\quad\;
\ismaa{\xi}{\tau^{\mathrm{SU}_q(2)}_{\nu\gamma'}(T_\gamma) \eta}=
\ismaa{\delta_0 \otimes P^{-i\nu\gamma'}_{\mathrm{SU}_q(2)}\xi}{
(u_\gamma^* T) (\delta_0\otimes P^{-i\nu\gamma'}_{\mathrm{SU}_q(2)}\eta)}=
\ismaa{\delta_\gamma\otimes\xi}{
P_{\mathbb{H}}^{i\nu\gamma'} T P_{\mathbb{H}}^{-i\nu\gamma'} (\delta_0\otimes \eta)}\\
&=
\ismaa{\delta_\gamma\otimes\xi}{\tau^{\mathbb{H}}_{\nu\gamma'}(T)(\delta_0\otimes\eta)}=
\ismaa{\delta_\gamma\otimes\xi}{u_{ \gamma'} T u_{\gamma'}^* (\delta_0\otimes\eta)}=
\ismaa{\delta_\gamma\otimes\xi}{ T (\delta_0\otimes\eta)}=
\ismaa{\xi}{T_\gamma \eta}
\end{split}\]
and as before we arrive at $\tau_{\nu\gamma'}^{\mathrm{SU}_q(2)}(T_\gamma)=T_\gamma$. Density of $\nu\mathbb{Q}$ in $\mathbb{R}$ implies $T_\gamma\in\LL^{\infty}(\mathrm{SU}_q(2))^{\tau}$. Alternatively, one can also obtain this result by showing that $\mathbb{E}$ commutes with the scaling group and $T\in \LL^{\infty}(\mathbb{H})^{\tau}$.\\
These two properties of $T_\gamma$ imply that $T_\gamma\in \mathscr{C}_{\mathrm{SU}_q(2)}$ (Proposition \ref{prop4.1.2}) and consequently $\alpha(T_\gamma)\in \mathscr{C}_{\mathbb{H}}$. \\
Formally we have $T=\sum_{\gamma\in\mathbb{Q}} u_\gamma \alpha(T_\gamma)$. However, this series does not need to converge in the $w^*$-topology (see \cite{Mercer}), which is why we will argue on the $\LL^2$-level. Let us first prove that
\begin{equation}\label{eq4.2.4}
\Lambda_{h_{\mathbb{H}}}(T)=\sum_{\gamma\in\mathbb{Q}}\Lambda_{h_{\mathbb{H}}}(u_\gamma \alpha(T_\gamma))=
\sum_{\gamma\in\mathbb{Q}} \Lambda_{h_{\widehat{\mathbb{Q}}}}(\lambda_\gamma)\otimes
\Lambda_{h_{\mathrm{SU}_q(2)}}(T_\gamma).
\end{equation}
Since $\{\delta_\gamma\}_{\gamma\in\mathbb{Q}}$ forms an orthonormal basis in $\ell^2(\mathbb{Q})$, we can write $\Lambda_{h_{\mathbb{H}}}(T)=\sum_{\gamma\in\mathbb{Q}} \delta_\gamma\otimes \tilde{T}_{\gamma}$ for some $\tilde{T}_{\gamma}\in \LL^2(\mathrm{SU}_q(2))$. Then
\[
\ismaa{\xi}{\tilde{T}_\gamma}=
\ismaa{\delta_\gamma\otimes\xi}{\sum_{\gamma'\in\mathbb{Q}} \delta_{\gamma'}\otimes \tilde{T}_{\gamma'}}=
\ismaa{\delta_\gamma\otimes\xi}{\Lambda_{h_{\mathbb{H}}}(T)}=
\ismaa{\delta_\gamma\otimes\xi}{T(\delta_0\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(\mathds{1})}=\ismaa{\xi}{\Lambda_{h_{\mathrm{SU}_q(2)}}(T_\gamma)}
\]
for all $\gamma\in\mathbb{Q},\xi\in\LL^2(\mathrm{SU}_q(2))$ which proves \eqref{eq4.2.4}. Recall that $h_{\mathbb{H}}$ is tracial on $\mathscr{C}_{\mathbb{H}}$, hence the claim follows from equation \eqref{eq4.2.4} and the following lemma.
\end{proof}
\begin{lemma}\label{lemma4.2.2}
Let $(\M,\omega)$ be a von Neumann algebra with a fixed faithful normal state. Assume that $\N\subseteq \M$ is a von Neumann subalgebra such that $\omega|_{\N}$ is tracial. If $x\in\M$ and $\Lambda_\omega(x)\in\overline{\Lambda_{\omega}(N)}$ then $x\in \N$.
\end{lemma}
This lemma is well-known to experts but we were not able to locate a precise reference, so we decided to add a proof for completeness.
\begin{proof}
We will show that $x$ commutes with every $y\in\N'$. Take $a,b\in \M$ that are analytic with respect to $(\sigma_t)_{t\in\mathbb{R}}$ and fix a net $(\Lambda_\omega(x_i))_{i\in I}\,(x_i\in \N)$ which converges to $\Lambda_\omega(x)$. Observe that since $\omega|_{\N}$ is tracial, $J\nabla^{\frac{1}{2}}$ is an isometry on $\Lambda_\omega(\N)$. As $J\nabla^{\frac{1}{2}}$ is closed, it follows that $\lim_{i\in I}\Lambda_\omega(x_i^*)=\Lambda_\omega(x^*)$. Consequently
\[\begin{split}
&\quad\;
\ismaa{\Lambda_\omega(a)}{ yx \Lambda_\omega(b)}=
\ismaa{\Lambda_\omega(a)}{y J \sigma_{i/2}(b)^* J \Lambda_{\omega}(x)}=
\lim_{i\in I}
\ismaa{\Lambda_\omega(a)}{y J \sigma_{i/2}(b)^* J \Lambda_{\omega}(x_i)}\\
&=
\lim_{i\in I}
\ismaa{\Lambda_\omega(a)}{y x_i \Lambda_\omega(b)}=
\lim_{i \in I}\ismaa{J\sigma_{i/2}(a)^* J
\Lambda_\omega(x_i^*)}{y\Lambda_\omega(b)}=
\ismaa{J \sigma_{i/2}(a)^* J
\Lambda_\omega(x^*)}{y\Lambda_\omega(b)}\\
&=
\ismaa{x^*\Lambda_\omega(a)}{y\Lambda_\omega(b)}=
\ismaa{\Lambda_\omega(a)}{xy \Lambda_\omega(b)}.
\end{split}\]
A standard density argument implies $x\in \N''=\N$.
\end{proof}
\begin{remark}
In the proof of Proposition \ref{prop4.2.1}, we argued on the $\LL^2$-level that $\alpha(T_\gamma)\in\mathscr{C}_{\mathbb{H}}\,(\gamma\in\mathbb{Q})$ implies that $T\in\mathscr{C}_{\mathbb{H}}$. Alternatively, we could use a Fej\'er-type theorem for crossed products and arrive at the same conclusion (see e.g.~\cite[Theorem 4.10]{CrannNeufang} for a general result).
\end{remark}
In the penultimate result we prove about $\mathbb{H}=\mathbb{Q}\bowtie\mathrm{SU}_q(2)$, we study its von Neumann algebra of bounded functions. In particular, we show that for some values of $\nu,q$, it is a factor of type $\operatorname{II}_\infty$ -- we are not aware of another example of a compact quantum group in the literature with this property.
\begin{proposition}\label{prop4.2.2}$ $
\begin{itemize}
\item $\mathcal{Z}(\LL^{\infty}(\mathbb{H}))$ is equal to $\{u_{\gamma}\,|\, \gamma\in\mathbb{Q}\,\cap\, \tfrac{\pi}{\nu \log(|q|)}\,\mathbb{Z}\}''$. In particular, it is trivial if $\nu\log(|q|)\notin \pi\mathbb{Q}$ and isomorphic to $\LL^{\infty}(\mathbb{T})$ otherwise.
\item Let $t\in\mathbb{R}$. The scaling automorphism $\tau^{\mathbb{H}}_{ t}$ is trivial if and only if $ t\in\tfrac{\pi}{ \log(|q|)}\mathbb{Z}$. It is inner if and only if $t\in\nu\mathbb{Q}+ \tfrac{\pi}{\log(|q|)}\mathbb{Z}$.
\item $\mathbb{H}$ is coamenable and consequently $\LL^{\infty}(\mathbb{H})$ is injective.
\item If $\nu\log(|q|)\notin\pi \mathbb{Q}$ then $\LL^{\infty}(\mathbb{H})$ is a factor of type $\operatorname{II}_{\infty}$.
\end{itemize}
\end{proposition}
\begin{proof}
Observe first that for all $t\in\mathbb{R}$, the scaling automorphism $\tau^{\mathbb{H}}_{t}$ is trivial if and only $\tau^{\mathrm{SU}_q(2)}_{t}$ is trivial (Lemma \ref{lemma4.2.1}) which happens if and only if $t\in\tfrac{\pi}{\log(|q|)}\mathbb{Z}$ (equation \eqref{eq4.1.3}).\\
Take $x\in \mathcal{Z}(\LL^{\infty}(\mathbb{H}))$. Since $\mathscr{C}_{\mathbb{H}}$ is MASA in $\LL^{\infty}(\mathbb{H})$, we know that
\[
x\in \overline{\lin\{\chi_\beta\,|\, \beta\in\Irr(\mathbb{H}):\uprho_\beta=\mathds{1}_{\beta}\}}^{\,\sot}=
\overline{\lin \{u_\gamma\,|\, \gamma\in\mathbb{Q}\}}^{\,\sot}
\]
(Proposition \ref{Prop:masafactor}). Write
\[
x=\sot-\underset{i\in I}{\lim}\sum_{\gamma\in\mathbb{Q}} C^i_\gamma u_{\gamma},\quad
\Lambda_{h_{\mathbb{H}}}(x)=\sum_{\gamma\in \mathbb{Q}} C_\gamma \Lambda_{h_{\mathbb{H}}}(u_\gamma)
\]
for some $C_\gamma,C^i_\gamma\in\mathbb{C}$, where $\sum_{\gamma\in\mathbb{Q}} C^i_\gamma u_\gamma$ belongs to $\lin\{u_\gamma\,|\, \gamma\in\mathbb{Q}\}$ for each $i\in I$. Take now $y\in \LL^{\infty}(\mathrm{SU}_q(2))$. Since $x\in\mathcal{Z}(\LL^{\infty}(\mathbb{H}))$, we have
\[\begin{split}
&\quad\;
\sum_{\gamma\in\mathbb{Q}} C_\gamma \delta_\gamma\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}
(\tau^{\mathrm{SU}_q(2)}_{\nu \gamma}(y))=
\alpha(y) \bigl(\sum_{\gamma\in\mathbb{Q}} C_\gamma \Lambda_{h_{\mathbb{H}}}(u_\gamma)\bigr)=
\Lambda_{h_{\mathbb{H}}}(\alpha(y) x)=\Lambda_{h_{\mathbb{H}}}(x\alpha(y))\\
&=
x(\delta_0\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(y))=
\lim_{i\in I} \sum_{\gamma\in\mathbb{Q}}C^i_\gamma( \delta_\gamma\otimes\Lambda_{h_{\mathrm{SU}_q(2)}}(y)),
\end{split}\]
which implies
\[
C_\gamma \tau^{\mathrm{SU}_q(2)}_{\nu\gamma}(y)=\lim_{i\in I} C^i_\gamma\, y\quad(\gamma\in \mathbb{Q}).
\]
As this equation holds for every $y\in \LL^{\infty}(\mathrm{SU}_q(2))$, we must have $C_\gamma=0$ whenever $\tau^{\mathrm{SU}_q(2)}_{\nu\gamma}$ is nontrivial, i.e. for $\nu\gamma\notin \tfrac{\pi}{\log(|q|)}\mathbb{Z}$. Lemma \ref{lemma4.2.2} gives us
\[
\mathcal{Z}(\LL^{\infty}(\mathbb{H}))\subseteq \{u_\gamma \,|\, \gamma\in\mathbb{Q}\cap \tfrac{\pi}{\nu\log(|q|)}\mathbb{Z}\}''.
\]
Inclusion $\supseteq$ is clear, hence we have identified the center of $\LL^{\infty}(\mathbb{H})$. If $\nu\log(|q|)\notin\pi\mathbb{Q}$ then clearly $\mathbb{Q}\cap\tfrac{\pi}{\nu\log(|q|)}\mathbb{Z}=\{0\}$ and $\LL^{\infty}(\mathbb{H})$ is a factor. Otherwise $\mathbb{Q}\cap \tfrac{\pi}{\nu\log(|q|)}\mathbb{Z}$ is a subgroup of $\mathbb{Q}$ isomorphic to $\mathbb{Z}$ and $\{u_\gamma\,|\, \gamma\in\mathbb{Q}\cap \tfrac{\pi}{\nu\log(|q|)}\mathbb{Z}\}''$ is therefore isomorphic to $\LL(\mathbb{Z})\simeq\LL^{\infty}(\mathbb{T})$ \cite[Theorem A]{Herz}. This proves the first point\footnote{We could also argue that $\LL^{\infty}(\mathbb{H})$ is a factor if $\nu\log(|q|)\notin\pi\mathbb{Q}$ using \cite[Theorem 7.11.11]{Pedersen}.}.\\
Take now $t\in\mathbb{R}$. If $t=\nu\gamma+\tfrac{\pi}{\log(|q|)}s\in\nu\mathbb{Q}+\tfrac{\pi}{\log(|q|)}\mathbb{Z}$ then $\tau^{\mathbb{H}}_{ t}=\tau^{\mathbb{H}}_{\nu \gamma}\tau^{\mathbb{H}}_{\pi s/\log(|q|)}=\tau^{\mathbb{H}}_{\nu\gamma}$ is inner by Lemma \ref{lemma4.2.1}. Assume that $t\notin\nu\mathbb{Q}+\tfrac{\pi}{\log|q|}\mathbb{Z}$ and $\tau^{\mathbb{H}}_{t}=\operatorname{Ad}_v$ for some unitary $v\in\LL^{\infty}(\mathbb{H})$. Proposition \ref{Prop:scaling} implies that $v\in \{u_\gamma\,|\, \gamma\in\mathbb{Q}\}''$, hence we can write
\begin{equation}\label{eq4.2.6}
\Lambda_{h_{\mathbb{H}}}(v)=\sum_{\gamma\in\mathbb{Q}} D_\gamma \Lambda_{h_{\mathbb{H}}}(u_\gamma)=
\sum_{\gamma\in\mathbb{Q}} D_\gamma (\delta_\gamma\otimes\Lambda_{h_{\mathrm{SU}_q(2)}}(\mathds{1}))
\end{equation}
for some $D_\gamma\in\mathbb{C}$. Since $v$ is unitary, we have $\sum_{\gamma\in\mathbb{Q}} |D_\gamma|^2=1$. Let $f\in\LL^{\infty}(\mathbb{T})$ be the characteristic function of the arc $\{e^{i\theta}\,|\, \theta\in [0,\pi]\}\subseteq\mathbb{T}$ and $F=\mathcal{Q}_L^*(\int_{\mathbb{T}}^{\oplus}f(\lambda)\mathds{1}_{\HS(\mathsf{H}_\lambda)}\operatorname{d}\!\mu(\lambda))\mathcal{Q}_L\in\LL^{\infty}(\mathrm{SU}_q(2))$. Equation \eqref{eq4.2.6} together with Lemma \ref{lemma4.2.1} gives us
\[\begin{split}
&\quad\;\sum_{\gamma\in\mathbb{Q}} D_\gamma ( \delta_\gamma \otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(\tau^{\mathrm{SU}_q(2)}_{\nu \gamma}(F)))
=
\alpha(F)\bigl( \sum_{\gamma\in\mathbb{Q}} D_\gamma(\delta_\gamma\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(\mathds{1}))\bigr)=
\Lambda_{h_{\mathbb{H}}}(\alpha(F) v)\\
&=
v\Lambda_{h_{\mathbb{H}}}(\tau^{\mathbb{H}}_{- t}(\alpha(F)))=
v\bigl( \delta_0\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(\tau^{\mathrm{SU}_q(2)}_{- t}(F))\bigr).
\end{split}\]
Since $v\in \{\lambda_{\gamma}\otimes\mathds{1}\,|\, \gamma\in\mathbb{Q}\}''$, the last vector belongs to $\overline{\lin} \{\delta_{\gamma}\otimes \Lambda_{h_{\mathrm{SU}_q(2)}}(\tau^{\mathrm{SU}_q(2)}_{- t}(F))\,|\,\gamma\in\mathbb{Q}\}$. It follows that there exists $\gamma\in \mathbb{Q}$ such that
\[
\tau^{\mathrm{SU}_q(2)}_{\nu \gamma}(F)=c \tau^{\mathrm{SU}_q(2)}_{- t}(F)
\]
for some $c\in \mathbb{C}$. Each scaling automorphism acts by a rotation (equation \eqref{eq4.1.3}), hence $c=1$ and $\tau^{\mathrm{SU}_q(2)}_{t+\nu \gamma}(F)=F$. However, $\tau^{\mathrm{SU}_q(2)}_{t+\nu \gamma}$ is a nontrivial rotation. Indeed, otherwise $t+\nu\gamma \in \tfrac{\pi}{\log(|q|)}\mathbb{Z}$ and we assume that it is not the case. It follows that $f$ is equal to its proper rotation, a contradiction. This ends the proof of the second bullet.\\
The compact quantum group $\mathbb{H}=\mathbb{Q}\bowtie \mathrm{SU}_q(2)$ is coamenable because $\mathbb{Q}$ is amenable and $\mathrm{SU}_q(2)$ is coamenable \cite[Theorem 15]{amenability}. It follows that $\LL^{\infty}(\mathbb{H})$ is injective \cite[Theorem 3.3]{coamenability}. Alternatively, to obtain injectivity of $\LL^{\infty}(\mathbb{H})$ one can also use the fact that a crossed product of an injective von Neumann algebra by an action of an amenable group is injective \cite[Theorem 3.16]{TakesakiIII}.\\
Assume $\nu\log(|q|)\notin \pi\mathbb{Q}$. We already know that $\LL^{\infty}(\mathbb{H})=\mathbb{Q}\ltimes_{\alpha}\LL^{\infty}(\mathrm{SU}_q(2))$ is a factor. Since the n.s.f.~tracial weight on $\LL^{\infty}(\mathrm{SU}_q(2))\simeq \B(\ell^2(\mathbb{Z}_+))\overline{\otimes} \LL^{\infty}(\mathbb{T})$ given by $\Tr\otimes h_{\mathbb{T}}$ is invariant under the action of $\mathbb{Q}$, it gives rise to a n.s.f.~tracial weight on $\LL^{\infty}(\mathbb{H})$ (\cite[Theorem 1.17]{TakesakiII}) and consequently $\LL^{\infty}(\mathbb{H})$ is not of type $\operatorname{III}$. It follows from the proof of \cite[Theorem 1.3]{cqg} that if there was a faithful normal tracial state on $\LL^{\infty}(\mathbb{H})$, then $\mathbb{H}$ would be of Kac type. As this is not the case, $\LL^{\infty}(\mathbb{H})$ cannot be of type $\operatorname{II}_{1}$; we are left with two cases, $\operatorname{I}_{\infty}$ and $\operatorname{II}_{\infty}$. Clearly $|\nu \mathbb{Q} + \tfrac{\pi}{\log(|q|)}\mathbb{Z}|=\aleph_0<|\mathbb{R}|$ hence there exists a scaling automorphism $\tau^{\mathbb{H}}_{t}$ which is not inner. It is well known that all automorphisms of $\B(\ell^2(\mathbb{Z}_+))$ are inner (\cite[II.5.5.14]{Blackadar}), hence $\LL^{\infty}(\mathbb{H})$ has to be of type $\operatorname{II}_{\infty}$.\\
Let us also give an alternative proof of the result that $\LL^{\infty}(\mathbb{H})$ is not of type $\operatorname{I}_{\infty}$. Let
\[
\mathbb{E}\colon \LL^{\infty}(\mathbb{H})=\mathbb{Q}\ltimes_{\alpha} \LL^{\infty}(\mathrm{SU}_q(2))\rightarrow \LL^{\infty}(\mathrm{SU}_q(2))
\]
be the canonical faithful normal conditional expectation. Assume by contradiction that $\LL^{\infty}(\mathbb{H})$ is of type $\operatorname{I}_{\infty}$. Then it is purely atomic and it follows that $\LL^{\infty}(\mathrm{SU}_q(2))\simeq \B(\ell^2(\mathbb{Z}_+))\overline{\otimes} \LL^{\infty}(\mathbb{T})$ is purely atomic as well (\cite[Theorem IV.2.2.4]{Blackadar}), which gives us a contradiction.
Yet another way to prove that $\LL^{\infty}(\mathbb{H})$ is a factor of type $\operatorname{II}_{\infty}$ is to use properties of crossed products. Indeed, we know that $\LL^{\infty}(\mathrm{SU}_q(2)) \simeq \B(\ell^{2}(\mathbb{Z}_{+})) \overline{\otimes} \LL^{\infty}(\mathbb{T})$ and by formula \ref{eq4.1.4} and the scaling group acts trivially on the first factor and by rotations on the second factor, hence $\LL^{\infty}(\mathbb{H}) \simeq \B(\ell^{2}(\mathbb{Z}_{+})) \overline{\otimes} \left( \LL^{\infty}(\mathbb{T}) \rtimes \mathbb{Q}\right)$. If $\nu \log(|q|) \notin \pi \mathbb{Q}$ then all these rotations are irrational, therefore the action is free, ergodic, and it preserves the Lebesgue measure on the unit circle. By \cite[Corollary 7.8]{TakesakiI} $\LL^{\infty}(\mathbb{T}) \rtimes \mathbb{Q}$ is a factor of type $\operatorname{II}_1$, hence $\LL^{\infty}(\mathbb{H})$ is a factor of type $\operatorname{II}_{\infty}$.
\end{proof}
As a corollary, we can show that our family of bicrossed products contains uncountably many different isomorphism classes of quantum groups. To formulate this result, let us denote by $\mathbb{H}_{\nu,q}$ the bicrossed product $\mathbb{Q}\bowtie \mathrm{SU}_q(2)$ constructed using parameter $\nu$.
\begin{corollary}
Let $\nu,\nu'\in \mathbb{R}\setminus\{0\}, q,q'\in (-1,1)\setminus \{0\}$. If $\mathbb{H}_{\nu,q}$ and $\mathbb{H}_{\nu',q'}$ are isomorphic, then $|q|=|q'|$ and $\nu \mathbb{Q} +\tfrac{\pi}{\log(|q|)}\mathbb{Z}=\nu'\mathbb{Q} + \tfrac{\pi}{\log(|q|)}\mathbb{Z}$. In particular, for each $q\in (-1,1)\setminus\{0\}$ the family $\{ \mathbb{H}_{\nu,q}\,|\, \nu\in \mathbb{R}\setminus \{0\}\}$ consists of $\mathfrak{c}$ isomorphism classes of compact quantum groups.
\end{corollary}
\begin{proof}
Let $\phi\colon \mathrm{C}(\mathbb{H}_{\nu,q})\rightarrow \mathrm{C}(\mathbb{H}_{\nu',q'})$ be a Hopf $\star$-isomorphism implementing the isomorphism between $\mathbb{H}_{\nu,q}$ and $\mathbb{H}_{\nu',q'}$ (recall that $\mathbb{H}_{\nu,q}$ is coamenable). Since $\phi$ intertwines scaling groups (\cite[Proposition 3.15]{Hom}) it follows that for each $t\in\mathbb{R}$, $\tau^{\mathbb{H}_{\nu,q}}_t$ is trivial if and only if $\tau^{\mathbb{H}_{\nu',q'}}_t$ is trivial and consequently Proposition \ref{prop4.2.2} implies $\tfrac{\pi}{\log(|q|)}\mathbb{Z}=\tfrac{\pi}{\log(|q'|)}\mathbb{Z}\Rightarrow |q|=|q'|$. Next, since inner scaling automorphisms of $\mathbb{H}_{\nu,q}$ are implemented by elements of $\mathrm{C}(\mathbb{H}_{\nu,q})$ (similarly for $\mathbb{H}_{\nu',q'}$) it follows from the same proposition that $\nu\mathbb{Q}+\tfrac{\pi}{\log(|q|)}\mathbb{Z}=\nu'\mathbb{Q} + \tfrac{\pi}{\log(|q|)} \mathbb{Z}$. The last claim is a consequence of $\dim_{\mathbb{Q}}( \mathbb{R}/(\mathbb{Q} \tfrac{\pi}{\log(|q|)}))=\mathfrak{c}$.
\end{proof}
\subsection{Examples with commutative $\mathscr{C}_{\mathbb{G}}$}\label{subsec:abelian}
In this subsection we will prove that the condition $\sum_{\alpha} \sqrt{\tfrac{\dim(\alpha)}{\dim_q(\alpha)}}<+\infty$ from Theorem \ref{Thm:quasi-split} holds for a certain class of non-Kac type compact quantum groups. More precisely, in this subsection we consider any compact quantum group $\mathbb{G}$ with the following properties:
\begin{enumerate}
\item there exists an irreducible fundamental representation $U$ with $\dim_q(U)>\dim(U)$ and $\overline{U}\simeq U$,
\item irreducible representations of $\mathbb{G}$ are labeled by $\mathbb{Z}_+$, so that $\Irr(\mathbb{G})=\{U^n\}_{n\in\mathbb{Z}_+}$, where $U^1=U$ and $U^0$ is the trivial representation,
\item we have $U^1\tp U^n\simeq \bigoplus_{k=0}^{n+1} C(k,n)U^k$, with $C(n+1,n)\ge 1$ and $\sup_{n\in\mathbb{Z}_+} C(n+1,n)<+\infty$.
\end{enumerate}
Let us mention two classes of compact quantum groups that fit into the above description:
\begin{itemize}
\item
Non-Kac type free orthogonal quantum group $\mathbb{G}=O_F^+$ satisfies the above conditions with $U$ being the standard fundamental representation (see \cite{BanicaO(n)}).
\item Let $(B,\psi)$ be a finite dimensional \ensuremath{\mathrm{C}^*}-algebra with a non-tracial $\delta$-form. The non-Kac type quantum automorphism group $\mathbb{G}_{Aut}(B,\psi)$ also satisfies the above conditions (see \cite{BanicaFuss}).
\end{itemize}
To keep the notation lighter, let us write $\dim(n)=\dim(U^n)$ and $\dim_q(n)=\dim_q(U^n)$ for all $n\in\mathbb{Z}_+$. Using our assumptions on the representation theory of $\mathbb{G}$ we can show that $(\tfrac{\dim(n)}{\dim_q(n)})_{n\in\mathbb{Z}_+}$ decays at an exponential rate.
\begin{lemma}$ $
\begin{itemize}
\item We have $\overline{U^n}\simeq U^n$ and $U^n\tp U^m\simeq U^m\tp U^n$ for all $n,m\in\mathbb{Z}_+$.
\item There exists $d>0,c>1$ such that $\tfrac{ \dim(n)}{\dim_q(n)}\le \tfrac{d}{c^n}$ for all $n\in\mathbb{Z}_+$.
\end{itemize}
\end{lemma}
Let us note that when $\mathbb{G}=O_F^+$ or $\mathbb{G}=\mathbb{G}_{Aut}(B,\psi)$ then numbers $\dim(n),\dim_q(n)$ are known, see \cite{BanicaO(n), Symmetries}.
\begin{proof}
Observe that we have $(U^1)^{\stp n}\simeq \bigoplus_{k=0}^{n+1} c'_{k,n} U^k$ for some $c'_{k,n}\in \mathbb{Z}_+$. As $\overline{U^1}\simeq U^1$, it follows inductively that $\overline{U^n}\simeq U^n$ for all $n\in\mathbb{Z}_+$. Equivalence $U^n \tp U^m\simeq U^m\tp U^n$ can now be justified with the following calculations
\[
U^n\tp U^m\simeq \overline{U^n \tp U^m}\simeq
\overline{U^m}\tp \overline{U^n}\simeq U^m\tp U^n.
\]
To prove the second bullet, let us introduce positive numbers $A_n\ge 1$ via $\dim_q(n)=A_n \dim(n)\,(n\in\mathbb{Z}_+)$. Clearly $A_0=1$ and we assume that $A_1>1$. The fusion rule $U^1\tp U^n\simeq \bigoplus_{k=0}^{n+1} C(k,n) U^k$ implies
\[
A_1 A_n \dim(1) \dim(n)=\dim_q(U^1\tp U^n)=
\dim_q\bigl(\bigoplus_{k=0}^{n+1} C(k,n) U^k\bigr)=\sum_{k=0}^{n+1}C(k,n) A_k \dim(k)
\]
and
\[
\dim(1) \dim(n)=\dim(U^1\tp U^n)=
\dim\bigl(\bigoplus_{k=0}^{n+1} C(k,n) U^k\bigr)=\sum_{k=0}^{n+1}C(k,n) \dim(k).
\]
Combining these equations gives us
\[\begin{split}
&\quad\;
A_1 A_n \dim(1) \dim(n)\le
(\max_{k\in\{0,\dotsc,n\}} A_k) \sum_{k=0}^{n} C(k,n)\dim(k)+
C(n+1,n) A_{n+1} \dim(n+1)\\
&=
(\max_{k\in\{0,\dotsc,n\}} A_k)\bigl(\dim(1)\dim(n)-C(n+1,n)\dim(n+1)\bigr) + C(n+1,n) A_{n+1} \dim(n+1),
\end{split}\]
hence
\[\begin{split}
A_{n+1} &\ge
\max_{k\in\{0,\dotsc,n\}} A_k + \bigl(A_1 A_n-\max_{k\in\{0,\dotsc,n\}} A_k\bigr) \tfrac{\dim(1)\dim(n)}{C(n+1,n) \dim(n+1)}.
\end{split}\]
The above inequality implies $A_{n+1}=\max_{p\in\{0,\dotsc,n+1\}} A_p$. Consequently, we can further write
\[\begin{split}
A_{n+1}\ge A_n + A_n \tfrac{A_1-1}{\sup_{m\in \mathbb{Z}_+} C(m+1,m)} \tfrac{\dim(1) \dim(n)}{\dim(n+1)}.
\end{split}\]
Since $U^{n+1}$ is a subrepresentation of $U^1\tp U^n$, we have $\dim(1)\dim(n)\ge \dim(n+1)$ and
\[
A_{n+1} \ge A_n\bigl(1+ \tfrac{A_1-1}{\sup_{m\in\mathbb{Z}_+} C(m+1,m)}\bigr).
\]
Write $c=1+\tfrac{A_1-1}{\sup_{m\in\mathbb{Z}_+} C(m+1,m)}>1$. We have shown $A_{n+1}\ge c A_n$. Using $\dim_q(n)=A_n \dim(n)$ we arrive at
\[
\dim_q(n)=A_n \dim(n)\ge c^{n-1} A_1 \dim(n)\quad(n\in\mathbb{N}).
\]
\end{proof}
In particular, the above lemma implies that $\mathscr{C}_{\mathbb{G}}$ is an abelian von Neumann algebra. Theorems \ref{Thm:quasi-split} and \ref{Thm:nonmasa} give us the following corollary (it follows from the fusion rules that the assumptions are satisfied).
\begin{corollary}\label{Cor:quasisplit}
We have $\sum_{n=0}^{\infty} \sqrt{\tfrac{\dim(n)}{\dim_q(n)}}<+\infty$, hence the inclusion $\mathscr{C}_{\mathbb{G}}\subseteq \operatorname{L}^{\infty}(\mathbb{G})$ is quasi-split. Furthermore, $\mathscr{C}_{\mathbb{G}}$ is not MASA.
\end{corollary}
\subsection{Quantum unitary group $U_F^+$}
Let $F$ be an invertible matrix with complex entries and $U_F^+$ the associated compact quantum group. In this subsection we show that the sum condition
\begin{equation}\label{eq4.4.1}
\sum_{\gamma\in\Irr(U_F^+)}\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}<+\infty
\end{equation}
is satisfied provided $U_F^+$ is ``sufficiently non-Kac'' (see Proposition \ref{prop4.4.1} for a precise result). Consequently, in this case we obtain information about the inclusion $\mathscr{C}_{U_F^+}\subseteq\LL^{\infty}(U_F^+)$.\\
The representation theory of $U_F^+$ was described by Banica in \cite[Th{\'e}or{\`e}me 1]{BanicaUn}, let us recall some of its aspects. We can identify $\Irr(U_F^+)$ with the free product of monoids $\mathbb{Z}_+\star \mathbb{Z}_+$; let $\alpha,\beta$ be the generators and $e$ the neutral element. Then $\alpha$ corresponds to the fundamental representation, $\beta$ to its conjugate and $e$ to the trivial representation. The unique antimultiplicative involution $\mathbb{Z}_+\star\mathbb{Z}_+\ni x\mapsto \overline{x}\in\mathbb{Z}_+\star\mathbb{Z}_+$ satisfying $\overline{\alpha}=\beta,\overline{e}=e$ corresponds to the conjugation of representations. Finally, the tensor product of representations is given by
\begin{equation}\label{eq4.4.2}
x\tp y\simeq \bigoplus_{\overset{a,b,c\in \mathbb{Z}_+\star \mathbb{Z}_+:}{
x=ac,\;y=\overline{c}b}}ab\quad(x,y\in\mathbb{Z}_+\star\mathbb{Z}_+).
\end{equation}
In order to efficiently calculate the sum \eqref{eq4.4.1}, we need to single out a family of irreducible representations out of which all of $\Irr(U_F^+)$ is built. Observe that each nontrivial word $\gamma\in \Irr(U_F^+)\setminus\{e\}$ has a well defined beginning and an end $s(\gamma),t(\gamma)\in\{\alpha,\beta\}$, e.g. $s(\alpha\beta)=\beta$. Let us define sets
\[\begin{split}
I_{\alpha}&=\{\alpha (\beta\alpha)^n\,|\, n\in\mathbb{Z}_+\}\cup \{(\alpha\beta)^n \,|\, n\in\mathbb{N}\},\\
I_{\beta}&=\{\beta(\alpha\beta)^n \,|\, n\in\mathbb{Z}_+\}\cup \{(\beta\alpha)^n\,|\, n\in\mathbb{N}\}.
\end{split}\]
The following observation was already made e.g.~in \cite{NeshveyevMalacarne}:
\begin{lemma}\label{lemma4.4.1}
Every nontrivial word $\gamma\in \Irr(U_F^+)\setminus\{e\}$ can be uniquely written as
\[
\gamma=x_1\cdots x_p=x_1\tp \cdots\tp x_p
\]
for some $p\in\mathbb{N}$, $x_1,\dotsc, x_p\in I_\alpha\cup I_\beta$ such that $s(x_k)=t(x_{k+1})$ for $1\le k \le p-1$.
\end{lemma}
The above result follows easily from the observation that if $\delta\alpha^{n}\delta'$ for some $\delta,\delta'\in \Irr(U_F^+)$ and $n\ge 2$ then \eqref{eq4.4.2} implies
\[
\delta\alpha^n\delta'=\delta\alpha \tp \alpha^{n-1}\delta'
\]
(and similarly for $\delta\beta^n\delta'$). It follows that in order to calculate the sum \eqref{eq4.4.1} we need to find a (quantum) dimension of representations from the sets $I_{\alpha},I_\beta$.
Let us introduce the q-numbers $\left[n\right]_q=\tfrac{q^{-n} - q^{n} }{q^{-1}-q}$, where $n\in\mathbb{Z}_+$ and $0<q<1$ \cite{KlimykSchmudgen}. Furthermore, for $n\in\mathbb{N}$ we will write $w_n^\gamma=\gamma \overline{\gamma} \gamma\cdots$ ($n$ letters), where $\gamma=\alpha$ or $\gamma=\beta$. Thus $t(w^\gamma_n)=\gamma$ and $s(w^{\gamma}_n)$ is equal to $\gamma$ if $n$ is odd and equal to $\overline{\gamma}$ if $n$ is even. We also define $w^\alpha_0=w^\beta_0=e$.
\begin{lemma}\label{lemma4.4.2}
Let $d$ be the classical or the quantum dimension function, $\gamma\in\{\alpha,\beta\}$ and $n\in\mathbb{Z}_+$. If $d(\alpha)=2$, then $d(w^\gamma_n)=n+1$. If $d(\alpha)>2$, then $d(w^\gamma_n)=[n+1]_{q}$, where $0<q<1$ is chosen so that $q^{-1}+q=d(\alpha)$.
\end{lemma}
\begin{proof}
Fix $n\in\mathbb{Z}_+$. As
\[
(\alpha\beta)^n\alpha\tp\beta=
(\alpha\beta)^{n+1}\oplus (\alpha\beta)^n,
\]
we have
\begin{equation}\label{eq4.4.3}
d(\alpha) d((\alpha\beta)^n\alpha)=
d((\alpha\beta)^{n+1})+d((\alpha\beta)^n).
\end{equation}
Similarly,
\[
(\alpha\beta)^n\alpha \beta\tp \alpha=(\alpha\beta)^{n+1}\alpha\oplus (\alpha\beta)^n\alpha
\]
and
\begin{equation}\label{eq.4.4.4}
d(\alpha) d((\alpha\beta)^{n+1})=
d((\alpha\beta)^{n+1}\alpha)+ d((\alpha\beta)^n \alpha).
\end{equation}
The formula for $d(w^\alpha_n)$ follows from the following elementary claim which can be proven by induction.\\
If $(a_n)_{n\in\mathbb{Z}_+}$ is a sequence in $\mathbb{R}_{\ge 0}$ such that $a_0=1, a_1\ge 2$ and $a_1 a_n=a_{n-1}+a_{n+1}$ for all $n\in\mathbb{N}$, then
\[
a_n=\begin{cases}
n+1 & a_1=2 \\
[n+1]_q & a_1>2
\end{cases}
\]
where $0<q<1$ is such that $q^{-1}+q=a_1$.\\
The formula for $d(w^\beta_n)$ can be proven analogously using $d(\alpha)=d(\beta)$.
\end{proof}
Using the above result we can show that for ``sufficiently non-Kac'' quantum unitary groups, the sum condition \eqref{eq4.4.1} is satisfied.
\begin{proposition}\label{prop4.4.1}
Let $0<q_{\operatorname{q}}\le q_{\operatorname{c}}\le 1$ be given by $q_{\operatorname{c}}^{-1}+q_{\operatorname{c}}=\dim(\alpha)$ and $q_{\operatorname{q}}^{-1}+q_{\operatorname{q}}=\dim_q(\alpha)$. If $\dim(\alpha)=2$ and $q_{\operatorname{q}}<0.0861$ or $\dim(\alpha)\ge 3$ and $\tfrac{q_{\operatorname{q}}}{q_{\operatorname{c}}}<\bigl(1+ \sqrt{ \tfrac{3\sqrt{5}+5}{10}}\,\bigr)^{-2}=0.2306\dotsc$, then $\sum_{\gamma\in\Irr(U_F^+)}\sqrt{\tfrac{\dim(\gamma)}{\dim_q(\gamma)}}<+\infty$.
\end{proposition}
\begin{proof}
Lemma \ref{lemma4.4.1} shows
\begin{equation}\begin{split}\label{eq4.4.6}
&\sum_{\gamma\in \Irr(U_F^+)} \bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=1+
\sum_{\delta\in\{\alpha,\beta\}}
\sum_{p=1}^{\infty}
\sum_{\gamma_1\in I_{\delta}}\sum_{\gamma_2\in I_{s(\gamma_1)}}\cdots
\sum_{\gamma_p\in I_{s(\gamma_{p-1})}}
\bigl(\tfrac{\dim(\gamma_1\stp \cdots \stp \gamma_p)}{\dim_q(\gamma_1\stp\cdots\stp \gamma_p)}\bigr)^{\frac{1}{2}}.
\end{split}
\end{equation}
We have
\begin{equation}\label{eq4.4.12}
\sum_{\gamma\in I_\alpha}
\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=
\sum_{n=1}^{\infty} \bigl(\tfrac{\dim(w^\alpha_n)}{\dim_q(w^\alpha_n)}\bigr)^{\frac{1}{2}},\quad
\sum_{\gamma\in I_\beta}
\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=
\sum_{n=1}^{\infty} \bigl(\tfrac{\dim(w^\beta_n)}{\dim_q(w^\beta_n)}\bigr)^{\frac{1}{2}},
\end{equation}
consequently Lemma \ref{lemma4.4.2} implies
\[
S:=\sum_{\gamma\in I_\alpha}\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=
\sum_{\gamma\in I_\beta}\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}.
\]
It follows from equation \eqref{eq4.4.6} that
\[
\sum_{\gamma\in \Irr(U_F^+)}
\bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=
1+\sum_{\delta\in\{\alpha,\beta\}}\sum_{p=1}^{\infty}
S^p=1+2\sum_{p=1}^{\infty} S^p
\]
thus $\sum_{\gamma\in\Irr(U_F^+)}\sqrt{\tfrac{\dim(\gamma)}{\dim_q(\gamma)}}<+\infty$ if, and only if $S<1$.
Let us first consider the case $\dim(\alpha)\ge 3$. Note that in this case $q_{\operatorname{c}}<1$. Using equation \eqref{eq4.4.12} and Lemma \ref{lemma4.4.2} we calculate
\[\begin{split}
S&=\sum_{n=1}^{\infty} \bigl(\tfrac{ [n+1]_{q_{\operatorname{c}}}}{[n+1]_{q_{\operatorname{q}}}}\bigr)^{\frac{1}{2}}=
\sum_{n=2}^{\infty}\bigl( \tfrac{q_{\operatorname{c}}^{-n} - q_{\operatorname{c}}^n }{q_{\operatorname{q}}^{-n}-q_{\operatorname{q}}^{n}}\,
\tfrac{ q_{\operatorname{q}}^{-1} - q_{\operatorname{q}}}{q_{\operatorname{c}}^{-1} - q_{\operatorname{c}}}\bigr)^{\frac{1}{2}}=
\bigl( \tfrac{ q_{\operatorname{q}}^{-1} - q_{\operatorname{q}}}{q_{\operatorname{c}}^{-1} - q_{\operatorname{c}}} \bigr)^{\frac{1}{2}}
\sum_{n=2}^{\infty}
(\tfrac{q_{\operatorname{c}}}{q_{\operatorname{q}}})^{-\frac{n}{2}}
\bigl( \tfrac{1 - q_{\operatorname{c}}^{2n} }{1-q_{\operatorname{q}}^{2n}}\bigr)^{\frac{1}{2}}\\
&\le
(\tfrac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{-\frac{1}{2}}
\bigl( \tfrac{ 1 - q_{\operatorname{q}}^2}{1 - q_{\operatorname{c}}^2} \bigr)^{\frac{1}{2}}
\tfrac{1}{( 1-q_{\operatorname{q}}^{4})^{\frac{1}{2}}}
\sum_{n=2}^{\infty}
(\tfrac{q_{\operatorname{c}}}{q_{\operatorname{q}}})^{-\frac{n}{2}}=
\tfrac{1}{(1-q_{\operatorname{c}}^2)^{\frac{1}{2}} (1+q_{\operatorname{q}}^2)^{\frac{1}{2}}}\; (\tfrac{q_{\operatorname{c}}}{q_{\operatorname{q}}})^{\frac{1}{2}} \; \bigl( -1 - (\tfrac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{\frac{1}{2}} + \tfrac{1}{1-(\frac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{\frac{1}{2}}}\bigr)\\
&=
\tfrac{1}{(1-q_{\operatorname{c}}^2)^{\frac{1}{2}} (1+q_{\operatorname{q}}^2)^{\frac{1}{2}}}\; (\tfrac{q_{\operatorname{c}}}{q_{\operatorname{q}}})^{\frac{1}{2}}\;
\tfrac{ 1- (1- \frac{q_{\operatorname{q}}}{q_{\operatorname{c}}})}{1-(\frac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{\frac{1}{2}}}=
\tfrac{1}{(1-q_{\operatorname{c}}^2)^{\frac{1}{2}} (1+q_{\operatorname{q}}^2)^{\frac{1}{2}}}\;
\tfrac{(\frac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{\frac{1}{2}}}{1-(\frac{q_{\operatorname{q}}}{q_{\operatorname{c}}})^{\frac{1}{2}}}.
\end{split}\]
In the above inequality we have used $\tfrac{1-q_{\operatorname{c}}^{2n}}{1-q_{\operatorname{q}}^{2n}}\le \tfrac{1}{1-q_{\operatorname{q}}^4}$ for all $n\ge 2$. Now, as $\dim(\alpha)\ge 3$, we have $q_{\operatorname{c}}\le(3-\sqrt{5})/2$ and since $\tfrac{q_{\operatorname{q}}}{q_{\operatorname{c}}}<\bigl(1+ \sqrt{ \tfrac{3\sqrt{5}+5}{10}}\,\bigr)^{-2}$,
\[
S< \tfrac{2}{(4- (3-\sqrt{5})^2)^{\frac{1}{2}}}
\;\tfrac{\bigl(1+ \sqrt{ \frac{3\sqrt{5}+5}{10}}\,\bigr)^{-1}}{1-\bigl(1+ \sqrt{ \frac{3\sqrt{5}+5}{10}}\,\bigr)^{-1}}=
\tfrac{2}{(6\sqrt{5}-10)^{\frac{1}{2}}}\;
\tfrac{1}{
\bigl(1+ \sqrt{ \frac{3\sqrt{5}+5}{10}}\bigr)-1
}=
\bigl(
\tfrac{3\sqrt{5} + 5}{10}
\bigr)^{\frac{1}{2}}
\tfrac{1}{
\sqrt{ \frac{3\sqrt{5}+5}{10}}
}=1
\]
which proves the claim.\\
Let us now consider the case $\dim(\alpha)=2$. We calculate using again Lemma \ref{lemma4.4.2}
\[\begin{split}
S&=\sum_{n=1}^{\infty} \bigl( \tfrac{ n+1}{[n+1]_{q_{\operatorname{q}}}}\bigr)^{\frac{1}{2}}=
\sum_{n=2}^{\infty}\bigl(\tfrac{n}{q^{-n}_{\operatorname{q}} - q^n_{\operatorname{q}}} \,
(q^{-1}_{\operatorname{q}}-q_{\operatorname{q}})\bigr)^{\frac{1}{2}}=
(q_{\operatorname{q}}^{-1} - q_{\operatorname{q}})^{\frac{1}{2}}\sum_{n=2}^{\infty}
(n q_{\operatorname{q}}^{n})^{\frac{1}{2}}\,\tfrac{1}{(1-q_{\operatorname{q}}^{2n})^{\frac{1}{2}}}\\
&\le
q_{\operatorname{q}}^{-\frac{1}{2}}
\bigl(\tfrac{1-q_{\operatorname{q}}^2}{1-q_{\operatorname{q}}^4}\bigr)^{\frac{1}{2}}
\bigl( - q_{\operatorname{q}}^{\frac{1}{2}} + \sum_{n=1}^{\infty} n q_{\operatorname{q}}^{\frac{n}{2}}\bigr)=
\tfrac{q_{\operatorname{q}}^{-\frac{1}{2}}}{(1+q_{\operatorname{q}}^2)^{\frac{1}{2}}}\bigl(-q_{\operatorname{q}}^{\frac{1}{2}} + \tfrac{q_{\operatorname{q}}^{\frac{1}{2}}}{(1-q_{\operatorname{q}}^{\frac{1}{2}})^2}\bigr)=
\tfrac{ 1-(1-q_{\operatorname{q}}^{\frac{1}{2}})^2 }{ (1+q_{\operatorname{q}}^{2})^{\frac{1}{2}} (1-q_{\operatorname{q}}^{\frac{1}{2}})^2}=
\tfrac{q_{\operatorname{q}}^{\frac{1}{2}}(2-q_{\operatorname{q}}^{\frac{1}{2}}) }{ (1+q_{\operatorname{q}}^{2})^{\frac{1}{2}} (1-q_{\operatorname{q}}^{\frac{1}{2}})^2}.
\end{split}\]
One can check that the above expression is increasing for $0<q_{\operatorname{q}}<1$ and smaller than $1$ when $q_{\operatorname{q}}<0.0861$.
\end{proof}
\begin{remark}\label{Rem:UFnonexample}
Calculations in the proof of Proposition \ref{prop4.4.1} are far from optimal, however it is clear that there are non-Kac type quantum unitary groups $U_F^+$ with $\sum_{\gamma\in\Irr(U_F^+)} \bigl(\tfrac{\dim(\gamma)}{\dim_q(\gamma)}\bigr)^{\frac{1}{2}}=+\infty$. Indeed, for $\dim(\alpha)=2$ we have $S=\sum_{n=2}^{\infty} (\tfrac{n}{[n]_{q_{\operatorname{q}}}})^{\frac{1}{2}}> (2/[2]_{q_{\operatorname{q}}})^{\frac{1}{2}}+(3/[3]_{q_{\operatorname{q}}})^{\frac{1}{2}}$ hence $S>1$ when $q_{\operatorname{q}}>0.2134$.
\end{remark}
It follows from the rule \eqref{eq4.4.2} and Lemma \ref{lemma4.4.2} that if $U_F^+$ is not of Kac type, the nontrivial irreducible representations $\gamma$ of $U_F^+$ have $\uprho_{\gamma}\neq \mathds{1}_{\gamma}$. Using Theorem \ref{Thm:quasi-split} we get the following corollary.
\begin{corollary}\label{Cor:UF}
Assume that $\dim(\alpha)=2$ and $q_{\operatorname{q}}< 0.0861$ or $\dim(\alpha)\ge 3$ and $\tfrac{q_{\operatorname{q}}}{q_{\operatorname{c}}}<\bigl(1+\sqrt{\tfrac{3\sqrt{5}+5}{10}}\bigr)^{-2}=0.2306\dotsc$. Then the inclusion $\mathscr{C}_{U_F^+}\subseteq \LL^{\infty}(U_F^+)$ is quasi-split and the relative commutant $\mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+)$ is not contained in $\mathscr{C}_{U_F^+}$.
\end{corollary}
\begin{proof}
By \cite[Theorem 33]{CCAP} $\LL^{\infty}(U_F^+)$ is a type $\operatorname{III}$ factor. Therefore Proposition \ref{Prop:notmasa} applies and we know that $\mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+)$ is a type $\operatorname{III}$ algebra, hence cannot be contained in $\mathscr{C}_{U_F^+}$, which is a finite von Neumann algebra.
An alternative argument can go as follows. By \cite[Th\'{e}or\`{e}me 1 (iii)]{BanicaUn} the character of the fundamental representation of $U_F^+$ has the same distribution (with respect to the Haar integral) as a circular variable\footnote{Recall that $x$ is circular if $x=s_1+is_2$, where $s_1$ and $s_2$ are freely independent semicircular variables.}, so we can conclude that $\mathscr{C}_{U_F^+}$ is isomorphic to the free group factor $\LL(F_2)$, in particular it is a factor. If the relative commutant $\mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+)$ was contained in $\mathscr{C}_{U_F^+}$ then the center of $\LL^{\infty}(U_F^+)$ would be contained in $\mathscr{C}_{U_F^+}$, so $\LL^{\infty}(U_F^+)$ has to be a factor. What is more, if $\mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+) \subseteq \mathscr{C}_{U_F^+}$ then $\mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+) = \mathscr{C}_{U_F^+} \cap \mathscr{C}_{U_F^+}'\cap \LL^{\infty}(U_F^+) = \mathbb{C} \mathds{1}$, i.e. the inclusion is irreducible. By Remark \ref{rem:splitfactor} a quasi-split inclusion of factors is actually split and it is easy to check that a proper split inclusion cannot be irreducible.
\end{proof}
\subsection*{Acknowledgements}
MW was supported by the Research Foundation –- Flanders (FWO) through a Postdoctoral Fellowship, by long term structural funding -- Methusalem grant of the Flemish Government -- and by European Research Council Starting Grant 677120 INDEX. JK was partially supported by the NCN (National Centre of Science) grant 2014/14/E/ST1/00525. Furthermore, JK would like to express his gratitude towards Adam Skalski and Piotr M.~Sołtan for many helpful discussions. The authors would like to thank the anonymous referees for several useful remarks.
|
\section{Introduction}\label{0}
\begin{figure*}\begin{subfigure}[b]{0.3\textwidth}\begin{center} \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{ex}_{1}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ω}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{e}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{f}}\<[E]{}\\
\>[2]{}{\mathbf{where}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{e}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{d}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.2399pt,-2.5000pt)--(-47.2399pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.2399pt,-15.0000pt)--(-47.2399pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-2.5000pt)--(31.4050pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-15.0000pt)--(31.4050pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-33.3650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)--(-33.3650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-15.0000pt)--(-33.3650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,0.0000pt)--(-23.7650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.0000pt)--(-23.7650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-15.0000pt)--(-23.7650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(0.0000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.6000pt,-0.2550pt)--(20.4050pt,-0.2550pt)--(20.4050pt,-4.7450pt)--(13.6000pt,-4.7450pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,-0.2550pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{1}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,3.7450pt)--(24.4050pt,3.7450pt)--(24.4050pt,-8.7450pt)--(9.6000pt,-8.7450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,1.5000pt)..controls(9.6000pt,2.8807pt)and(10.7193pt,4.0000pt)..(12.1000pt,4.0000pt)--(21.9050pt,4.0000pt)..controls(23.2857pt,4.0000pt)and(24.4050pt,2.8807pt)..(24.4050pt,1.5000pt)--(24.4050pt,-6.5000pt)..controls(24.4050pt,-7.8807pt)and(23.2857pt,-9.0000pt)..(21.9050pt,-9.0000pt)--(12.1000pt,-9.0000pt)..controls(10.7193pt,-9.0000pt)and(9.6000pt,-7.8807pt)..(9.6000pt,-6.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-2.5000pt)--(24.4050pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-15.0000pt)--(24.4050pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)..controls(8.0000pt,-10.0000pt)and(1.6000pt,-5.0000pt)..(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-10.0000pt)--(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-15.0000pt)--(-14.1650pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,-7.8075pt)--(-4.0000pt,-7.8075pt)--(-4.0000pt,-17.1925pt)--(-10.1650pt,-17.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,-7.8075pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{2}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-3.8075pt)--(0.0000pt,-3.8075pt)--(0.0000pt,-21.1925pt)--(-14.1650pt,-21.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-6.3075pt)..controls(-14.1650pt,-4.9268pt)and(-13.0457pt,-3.8075pt)..(-11.6650pt,-3.8075pt)--(-2.5000pt,-3.8075pt)..controls(-1.1193pt,-3.8075pt)and(0.0000pt,-4.9268pt)..(0.0000pt,-6.3075pt)--(0.0000pt,-18.6925pt)..controls(0.0000pt,-20.0732pt)and(-1.1193pt,-21.1925pt)..(-2.5000pt,-21.1925pt)--(-11.6650pt,-21.1925pt)..controls(-13.0457pt,-21.1925pt)and(-14.1650pt,-20.0732pt)..(-14.1650pt,-18.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(0.0000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-10.0000pt)--(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-15.0000pt)--(-14.1650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.0000pt)..controls(-15.7650pt,-10.0000pt)and(-22.1650pt,-15.0000pt)..(-14.1650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-15.0000pt)..controls(-15.7650pt,-15.0000pt)and(-22.1650pt,-10.0000pt)..(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-23.7650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)..controls(-25.3650pt,-5.0000pt)and(-31.7650pt,-10.0000pt)..(-23.7650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-15.0000pt)--(-23.7650pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-43.2399pt,2.1925pt)--(-37.3650pt,2.1925pt)--(-37.3650pt,-7.1925pt)--(-43.2399pt,-7.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-43.2399pt,2.1925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{3}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,6.1925pt)--(-33.3650pt,6.1925pt)--(-33.3650pt,-11.1925pt)--(-47.2399pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,3.6925pt)..controls(-47.2399pt,5.0732pt)and(-46.1207pt,6.1925pt)..(-44.7399pt,6.1925pt)--(-35.8650pt,6.1925pt)..controls(-34.4843pt,6.1925pt)and(-33.3650pt,5.0732pt)..(-33.3650pt,3.6925pt)--(-33.3650pt,-8.6925pt)..controls(-33.3650pt,-10.0732pt)and(-34.4843pt,-11.1925pt)..(-35.8650pt,-11.1925pt)--(-44.7399pt,-11.1925pt)..controls(-46.1207pt,-11.1925pt)and(-47.2399pt,-10.0732pt)..(-47.2399pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-33.3650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)--(-33.3650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,-2.5000pt)--(-47.2399pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,-15.0000pt)--(-33.3650pt,-15.0000pt);
\end{tikzpicture}}\end{center}\caption{\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ω}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{σ\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}}\label{4}\end{subfigure}\quad{}\begin{subfigure}[b]{0.3\textwidth}\begin{center} \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{ex}_{2}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu}\>[4]{}{\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }}\<[E]{}\\
\>[4]{}{\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{w}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathbf{where}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{z}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{w}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\mathsf{a}}\<[E]{}\end{parray}}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-82.2950pt,8.6925pt)--(-75.2950pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-82.2950pt,-21.3075pt)--(-75.2950pt,-21.3075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,8.6925pt)--(7.0000pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-21.3075pt)--(7.0000pt,-21.3075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,11.1925pt)--(-62.1650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,6.1925pt)--(-62.1650pt,6.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-18.8075pt)--(-62.1650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-23.8075pt)--(-62.1650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,11.1925pt)--(-52.5650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-8.8075pt)--(-52.5650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-18.8075pt)--(-52.5650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-23.8075pt)--(-52.5650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.1925pt)--(-23.7650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-8.8075pt)--(-23.7650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-18.8075pt)--(-23.7650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-23.8075pt)--(-23.7650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,11.1925pt)--(-14.1650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,6.1925pt)--(-14.1650pt,6.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-18.8075pt)--(-14.1650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-23.8075pt)--(-14.1650pt,-23.8075pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.0200pt,13.3850pt)--(-4.1450pt,13.3850pt)--(-4.1450pt,4.0000pt)--(-10.0200pt,4.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.0200pt,13.3850pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{5}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,17.3850pt)--(-0.1450pt,17.3850pt)--(-0.1450pt,0.0000pt)--(-14.0200pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,14.8850pt)..controls(-14.0200pt,16.2657pt)and(-12.9007pt,17.3850pt)..(-11.5200pt,17.3850pt)--(-2.6450pt,17.3850pt)..controls(-1.2643pt,17.3850pt)and(-0.1450pt,16.2657pt)..(-0.1450pt,14.8850pt)--(-0.1450pt,2.5000pt)..controls(-0.1450pt,1.1193pt)and(-1.2643pt,0.0000pt)..(-2.6450pt,0.0000pt)--(-11.5200pt,0.0000pt)..controls(-12.9007pt,0.0000pt)and(-14.0200pt,1.1193pt)..(-14.0200pt,2.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,8.6925pt)--(-0.1450pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,11.1925pt)--(-14.0200pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,6.1925pt)--(-14.0200pt,6.1925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,-16.6150pt)--(-4.0000pt,-16.6150pt)--(-4.0000pt,-26.0000pt)--(-10.1650pt,-26.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,-16.6150pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{6}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-12.6150pt)--(0.0000pt,-12.6150pt)--(0.0000pt,-30.0000pt)--(-14.1650pt,-30.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-15.1150pt)..controls(-14.1650pt,-13.7343pt)and(-13.0457pt,-12.6150pt)..(-11.6650pt,-12.6150pt)--(-2.5000pt,-12.6150pt)..controls(-1.1193pt,-12.6150pt)and(0.0000pt,-13.7343pt)..(0.0000pt,-15.1150pt)--(0.0000pt,-27.5000pt)..controls(0.0000pt,-28.8807pt)and(-1.1193pt,-30.0000pt)..(-2.5000pt,-30.0000pt)--(-11.6650pt,-30.0000pt)..controls(-13.0457pt,-30.0000pt)and(-14.1650pt,-28.8807pt)..(-14.1650pt,-27.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-21.3075pt)--(0.0000pt,-21.3075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-18.8075pt)--(-14.1650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-23.8075pt)--(-14.1650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.1925pt)--(-14.1650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-8.8075pt)..controls(-15.7650pt,-8.8075pt)and(-22.1650pt,6.1925pt)..(-14.1650pt,6.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-18.8075pt)--(-14.1650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-23.8075pt)--(-14.1650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,11.1925pt)--(-23.7650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-8.8075pt)--(-42.9650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-13.8075pt)--(-42.9650pt,-13.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-23.8075pt)--(-42.9650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-8.8075pt)--(-33.3650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-13.8075pt)--(-33.3650pt,-13.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-23.8075pt)--(-33.3650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-8.8075pt)--(-23.7650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-13.8075pt)..controls(-25.3650pt,-13.8075pt)and(-31.7650pt,-18.8075pt)..(-23.7650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-23.8075pt)--(-23.7650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-8.8075pt)..controls(-34.9650pt,-8.8075pt)and(-41.3650pt,-13.8075pt)..(-33.3650pt,-13.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-13.8075pt)..controls(-34.9650pt,-13.8075pt)and(-41.3650pt,-8.8075pt)..(-33.3650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9650pt,-23.8075pt)--(-33.3650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-8.8075pt)--(-42.9650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-18.8075pt)..controls(-44.5650pt,-18.8075pt)and(-50.9650pt,-13.8075pt)..(-42.9650pt,-13.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.5650pt,-23.8075pt)--(-42.9650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,11.1925pt)--(-52.5650pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,6.1925pt)..controls(-54.1650pt,6.1925pt)and(-60.5650pt,-8.8075pt)..(-52.5650pt,-8.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-18.8075pt)--(-52.5650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-23.8075pt)--(-52.5650pt,-23.8075pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-71.0275pt,13.3350pt)--(-66.4325pt,13.3350pt)--(-66.4325pt,4.0500pt)--(-71.0275pt,4.0500pt)--cycle;
\node[anchor=north west,inner sep=0] at (-71.0275pt,13.3350pt){\savebox{\marxupbox}{{\ensuremath{ξ}}}\immediate\write\boxesfile{7}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.0275pt,17.3350pt)--(-62.4325pt,17.3350pt)--(-62.4325pt,0.0500pt)--(-75.0275pt,0.0500pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.0275pt,14.8350pt)..controls(-75.0275pt,16.2157pt)and(-73.9082pt,17.3350pt)..(-72.5275pt,17.3350pt)--(-64.9325pt,17.3350pt)..controls(-63.5518pt,17.3350pt)and(-62.4325pt,16.2157pt)..(-62.4325pt,14.8350pt)--(-62.4325pt,2.5500pt)..controls(-62.4325pt,1.1693pt)and(-63.5518pt,0.0500pt)..(-64.9325pt,0.0500pt)--(-72.5275pt,0.0500pt)..controls(-73.9082pt,0.0500pt)and(-75.0275pt,1.1693pt)..(-75.0275pt,2.5500pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,11.1925pt)--(-62.4325pt,11.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,6.1925pt)--(-62.4325pt,6.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.2950pt,8.6925pt)--(-75.0275pt,8.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-71.2950pt,-16.6150pt)--(-66.1650pt,-16.6150pt)--(-66.1650pt,-26.0000pt)--(-71.2950pt,-26.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (-71.2950pt,-16.6150pt){\savebox{\marxupbox}{{\ensuremath{ζ}}}\immediate\write\boxesfile{8}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.2950pt,-12.6150pt)--(-62.1650pt,-12.6150pt)--(-62.1650pt,-30.0000pt)--(-75.2950pt,-30.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.2950pt,-15.1150pt)..controls(-75.2950pt,-13.7343pt)and(-74.1757pt,-12.6150pt)..(-72.7950pt,-12.6150pt)--(-64.6650pt,-12.6150pt)..controls(-63.2843pt,-12.6150pt)and(-62.1650pt,-13.7343pt)..(-62.1650pt,-15.1150pt)--(-62.1650pt,-27.5000pt)..controls(-62.1650pt,-28.8807pt)and(-63.2843pt,-30.0000pt)..(-64.6650pt,-30.0000pt)--(-72.7950pt,-30.0000pt)..controls(-74.1757pt,-30.0000pt)and(-75.2950pt,-28.8807pt)..(-75.2950pt,-27.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-18.8075pt)--(-62.1650pt,-18.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.1650pt,-23.8075pt)--(-62.1650pt,-23.8075pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.2950pt,-21.3075pt)--(-75.2950pt,-21.3075pt);
\end{tikzpicture}}\end{center}\caption{\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ξ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ζ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}}\label{9}\end{subfigure}\quad{}\begin{subfigure}[b]{0.3\textwidth}\begin{center} \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{ex}_{3}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu}\>[4]{}{\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{w}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathbf{where}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{w}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ω}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-116.0099pt,-7.5000pt)--(-109.0099pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-116.0099pt,-35.0000pt)--(-109.0099pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(7.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-32.5000pt)--(7.0000pt,-32.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,0.0000pt)--(-95.1350pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-10.0000pt)--(-95.1350pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-15.0000pt)--(-95.1350pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-35.0000pt)--(-95.1350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,0.0000pt)--(-85.5350pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-20.0000pt)--(-85.5350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-25.0000pt)--(-85.5350pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-35.0000pt)--(-85.5350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,0.0000pt)--(-22.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-20.0000pt)--(-22.7300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-30.0000pt)--(-22.7300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-35.0000pt)--(-22.7300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,0.0000pt)--(-13.1300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-5.0000pt)--(-13.1300pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-30.0000pt)--(-13.1300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-35.0000pt)--(-13.1300pt,-35.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.8625pt,2.1425pt)--(-4.2675pt,2.1425pt)--(-4.2675pt,-7.1425pt)--(-8.8625pt,-7.1425pt)--cycle;
\node[anchor=north west,inner sep=0] at (-8.8625pt,2.1425pt){\savebox{\marxupbox}{{\ensuremath{ξ}}}\immediate\write\boxesfile{10}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.8625pt,6.1425pt)--(-0.2675pt,6.1425pt)--(-0.2675pt,-11.1425pt)--(-12.8625pt,-11.1425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.8625pt,3.6425pt)..controls(-12.8625pt,5.0232pt)and(-11.7432pt,6.1425pt)..(-10.3625pt,6.1425pt)--(-2.7675pt,6.1425pt)..controls(-1.3868pt,6.1425pt)and(-0.2675pt,5.0232pt)..(-0.2675pt,3.6425pt)--(-0.2675pt,-8.6425pt)..controls(-0.2675pt,-10.0232pt)and(-1.3868pt,-11.1425pt)..(-2.7675pt,-11.1425pt)--(-10.3625pt,-11.1425pt)..controls(-11.7432pt,-11.1425pt)and(-12.8625pt,-10.0232pt)..(-12.8625pt,-8.6425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(-0.2675pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,0.0000pt)--(-12.8625pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-5.0000pt)--(-12.8625pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.1300pt,-27.8075pt)--(-4.0000pt,-27.8075pt)--(-4.0000pt,-37.1925pt)--(-9.1300pt,-37.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-9.1300pt,-27.8075pt){\savebox{\marxupbox}{{\ensuremath{ζ}}}\immediate\write\boxesfile{11}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-23.8075pt)--(0.0000pt,-23.8075pt)--(0.0000pt,-41.1925pt)--(-13.1300pt,-41.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-26.3075pt)..controls(-13.1300pt,-24.9268pt)and(-12.0107pt,-23.8075pt)..(-10.6300pt,-23.8075pt)--(-2.5000pt,-23.8075pt)..controls(-1.1193pt,-23.8075pt)and(0.0000pt,-24.9268pt)..(0.0000pt,-26.3075pt)--(0.0000pt,-38.6925pt)..controls(0.0000pt,-40.0732pt)and(-1.1193pt,-41.1925pt)..(-2.5000pt,-41.1925pt)--(-10.6300pt,-41.1925pt)..controls(-12.0107pt,-41.1925pt)and(-13.1300pt,-40.0732pt)..(-13.1300pt,-38.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-32.5000pt)--(0.0000pt,-32.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-30.0000pt)--(-13.1300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,-35.0000pt)--(-13.1300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,0.0000pt)--(-13.1300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-20.0000pt)..controls(-14.7300pt,-20.0000pt)and(-21.1300pt,-5.0000pt)..(-13.1300pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-30.0000pt)--(-13.1300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,-35.0000pt)--(-13.1300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,0.0000pt)--(-22.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-20.0000pt)--(-75.9350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-25.0000pt)--(-75.9350pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-35.0000pt)--(-75.9350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-20.0000pt)--(-51.5300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-30.0000pt)--(-51.5300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-35.0000pt)--(-51.5300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-20.0000pt)--(-41.9300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-25.0000pt)--(-41.9300pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-35.0000pt)--(-41.9300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-20.0000pt)--(-32.3300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-25.0000pt)--(-32.3300pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-35.0000pt)--(-32.3300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-20.0000pt)--(-22.7300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-25.0000pt)..controls(-24.3300pt,-25.0000pt)and(-30.7300pt,-30.0000pt)..(-22.7300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.3300pt,-35.0000pt)--(-22.7300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-20.0000pt)..controls(-33.9300pt,-20.0000pt)and(-40.3300pt,-25.0000pt)..(-32.3300pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-25.0000pt)..controls(-33.9300pt,-25.0000pt)and(-40.3300pt,-20.0000pt)..(-32.3300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.9300pt,-35.0000pt)--(-32.3300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-20.0000pt)--(-41.9300pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-30.0000pt)..controls(-43.5300pt,-30.0000pt)and(-49.9300pt,-25.0000pt)..(-41.9300pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-35.0000pt)--(-41.9300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-20.0000pt)--(-66.3350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-30.0000pt)--(-66.3350pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-35.0000pt)--(-66.3350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-20.0000pt)--(-51.5300pt,-20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-62.3350pt,-30.2550pt)--(-55.5300pt,-30.2550pt)--(-55.5300pt,-34.7450pt)--(-62.3350pt,-34.7450pt)--cycle;
\node[anchor=north west,inner sep=0] at (-62.3350pt,-30.2550pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{12}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-26.2550pt)--(-51.5300pt,-26.2550pt)--(-51.5300pt,-38.7450pt)--(-66.3350pt,-38.7450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-28.5000pt)..controls(-66.3350pt,-27.1193pt)and(-65.2157pt,-26.0000pt)..(-63.8350pt,-26.0000pt)--(-54.0300pt,-26.0000pt)..controls(-52.6493pt,-26.0000pt)and(-51.5300pt,-27.1193pt)..(-51.5300pt,-28.5000pt)--(-51.5300pt,-36.5000pt)..controls(-51.5300pt,-37.8807pt)and(-52.6493pt,-39.0000pt)..(-54.0300pt,-39.0000pt)--(-63.8350pt,-39.0000pt)..controls(-65.2157pt,-39.0000pt)and(-66.3350pt,-37.8807pt)..(-66.3350pt,-36.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-30.0000pt)--(-51.5300pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.5300pt,-35.0000pt)--(-51.5300pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-30.0000pt)--(-66.3350pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-66.3350pt,-35.0000pt)--(-66.3350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-20.0000pt)--(-66.3350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-25.0000pt)..controls(-67.9350pt,-25.0000pt)and(-74.3350pt,-30.0000pt)..(-66.3350pt,-30.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.9350pt,-35.0000pt)--(-66.3350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-20.0000pt)..controls(-77.5350pt,-20.0000pt)and(-83.9350pt,-25.0000pt)..(-75.9350pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-25.0000pt)..controls(-77.5350pt,-25.0000pt)and(-83.9350pt,-20.0000pt)..(-75.9350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-85.5350pt,-35.0000pt)--(-75.9350pt,-35.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,0.0000pt)--(-85.5350pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-10.0000pt)..controls(-87.1350pt,-10.0000pt)and(-93.5350pt,-20.0000pt)..(-85.5350pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-15.0000pt)..controls(-87.1350pt,-15.0000pt)and(-93.5350pt,-25.0000pt)..(-85.5350pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-35.0000pt)--(-85.5350pt,-35.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-105.0099pt,-2.8075pt)--(-99.1350pt,-2.8075pt)--(-99.1350pt,-12.1925pt)--(-105.0099pt,-12.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-105.0099pt,-2.8075pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{13}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-109.0099pt,1.1925pt)--(-95.1350pt,1.1925pt)--(-95.1350pt,-16.1925pt)--(-109.0099pt,-16.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-109.0099pt,1.5000pt)..controls(-109.0099pt,2.8807pt)and(-107.8906pt,4.0000pt)..(-106.5099pt,4.0000pt)--(-97.6350pt,4.0000pt)..controls(-96.2543pt,4.0000pt)and(-95.1350pt,2.8807pt)..(-95.1350pt,1.5000pt)--(-95.1350pt,-16.5000pt)..controls(-95.1350pt,-17.8807pt)and(-96.2543pt,-19.0000pt)..(-97.6350pt,-19.0000pt)--(-106.5099pt,-19.0000pt)..controls(-107.8906pt,-19.0000pt)and(-109.0099pt,-17.8807pt)..(-109.0099pt,-16.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,0.0000pt)--(-95.1350pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-10.0000pt)--(-95.1350pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-95.1350pt,-15.0000pt)--(-95.1350pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-109.0099pt,-7.5000pt)--(-109.0099pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-109.0099pt,-35.0000pt)--(-95.1350pt,-35.0000pt);
\end{tikzpicture}}\end{center}\caption{\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ξ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ζ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ω}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}}\label{14}\end{subfigure}\caption{A few {\sc{}smc} morphisms, their encoding as functions, and their string diagram representations.}\label{15}\end{figure*}
\paragraph{Parable}\label{16}
Frankie is designing a
domain-specific language ({\sc{}dsl}), and by working out examples
on paper, realises that the best way to describe objects in that
{\sc{}dsl} is by box-and-wires diagrams, similar to those in
\cref{15}. The story does not say what Frankie
intends to use the {\sc{}dsl} for. Maybe it has to do with linear algebra,
parallel computing, or even quantum computations (see
\cref{36}): this kind of
pattern occurs in many contexts. Following accepted
functional programming methodologies, Frankie searches for the right
abstraction and finds out that Symmetric Monoidal Categories ({\sc{}smc} for
short) capture said diagrams precisely
\citep[Section 3]{selinger_string_diagram_survey_2011}.
Accordingly, Frankie starts coding examples using the combinators of {\sc{}smc}s (\cref{20}),
but disappointment is great after writing a few examples: everything is expressed in point-free
style, resulting in cryptic expressions such as \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ξ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ζ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ω}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} for the
boxes-and-wires diagram of \cref{14}. It becomes obvious
to Frankie why programming languages have variables: in
a language with variables, the same example can be expressed much more
directly. Something like:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{ex}_{3}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu}\>[4]{}{\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{w}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathbf{where}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{w}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{ω}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}} \end{list}
Now, Frankie could roll-out a special-purpose language for {\sc{}smc}s with
variables, together with some compiler, and integrate it into company
praxis. But this would be quite costly! For instance, Frankie would
have to figure out how to share objects between the {\sc{}dsl} and the host
programs. Deploying one's own compiler can be a tricky business.
But is it, really, Frankie's only choice? Either drop lambda notation and use
point-free style, or use a special-purpose compiler to translate from
lambda notation to {\sc{}smc}s? In this paper, we demonstrate that no
compromise is necessary: Frankie can use usual functions to encode
diagrams. Specifically, we show how to evaluate \emph{linear} functions to {\sc{}smc} expressions. We do so by pure evaluation within Haskell.
We require no external tool, no modification to the
compiler nor metaprogramming of any kind.
This makes our solution particularly lightweight, and applicable to every
functional programming language that supports linear types.
Even though we specifically target Linear Haskell
\citep{bernardy_linear_2018}, our technique works in any other
functional languages with linear types, such as Idris2
\citep{brady_idris_2020} or Granule \citep{orchard_quantitative_2019}.
We make the following contributions:
\begin{itemize}\item{}We give a linearly typed {\sc{}api} to construct {\sc{}smc} morphisms
(\cref{33}). This {\sc{}api} is only 5 functions long and
allows the programmer to use the name-binding features of Haskell to
name intermediate results.\item{}We demonstrate with concrete applications how our {\sc{}api} lets one use
Haskell's functions and variables to concisely define
{\sc{}smc} morphisms (\cref{36}).\item{}We describe an implementation of our {\sc{}api}, and prove its
correctness (\cref{60}).
This implementation was tested on all the
examples shown in this paper. In particular, whenever we show a
function and a corresponding diagram, as in \cref{15}, our
library was used to automatically
generate an {\sc{}smc} representation, which was
in turn converted to a diagram, and imported to the
\LaTeX{} source code of the paper. In this sense, this paper is
self-testing.
The library is available on the Hackage repository: \url{https://hackage.haskell.org/package/linear-smc}.
\end{itemize} The rest of the paper discusses salient points and related work
(\cref{139}), before concluding in \cref{146}. Before
any of this, we review the underlying concepts and introduce our
notations for them (\cref{17}).
\section{Notations and conventions}\label{17}
In this section we recall the notions of category theory necessary to
follow our development and examples. In addition we explain our
notation for morphisms and conventions for diagrams.
\subsection{Categories}\label{18} \begin{figure*}\begin{subfigure}[b]{0.45\textwidth}\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column[4em]{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{class}\mskip 3.0mu\mathsf{Category}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{type}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Type}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Constraint}}\<[E]{}\\
\>[2]{}{\mathsf{id}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }}\<[E]{}\\
\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{c}}\<[E]{}\end{parray}} \caption{Category structure}\label{19}\end{subfigure}\quad{}\begin{subfigure}[b]{0.45\textwidth} \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{class}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[4]{}{\mathsf{Category}\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[8]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{σ\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[7]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[7]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{ρ\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[5]{}{\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\bar{ρ}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{a}}\<[E]{}\end{parray}} \caption{Symmetric Monoidal Category structure}\label{20}\end{subfigure}\caption{Categorical structures.}\label{21}\end{figure*}
The fundamental structure is that of a category (\cref{19}).
In general a category \ensuremath{\mathsf{k}} is composed of objects and morphisms, but here we
take objects to be types satisfying a specific constraint
\ensuremath{\mathsf{Obj}}. This choice is convenient because it lets us make the type
of Haskell functions an instance of the \ensuremath{\mathsf{Category}} class. A morphism from \ensuremath{\mathsf{a}} to \ensuremath{\mathsf{b}} is a value of type \ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}}, which
we suggestively note \ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}}. Categories are additionally equipped with an identity at
every type (\ensuremath{\mathsf{id}}), which is represented in diagrams as a line. Additionally, categories have morphism composition (∘),
represented by connecting morphisms with a line
(\cref{28}). This representation neatly captures the laws of
categories: morphisms are equivalent iff they are represented by
topologically equivalent diagrams. (For instance, composing with the
identity simply makes a line longer, and stretching a line is a
topology-preserving transformation.) In this paper we follow the
usual convention for the directions, even though it means that the
layout of diagrams is inverse to that of Haskell expressions. That is, one can think
of information as flowing from right-to-left in the expression \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}}, but left-to-right in the diagram representing it.
\begin{figure*}\begin{tabular}{ccccccccccccc}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.6900pt,0.0000pt)--(-12.6900pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(27.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](11.0000pt,4.6925pt)--(16.7300pt,4.6925pt)--(16.7300pt,-4.6925pt)--(11.0000pt,-4.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,4.6925pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{22}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,8.6925pt)--(20.7300pt,8.6925pt)--(20.7300pt,-8.6925pt)--(7.0000pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,8.6925pt)--(20.7300pt,8.6925pt)--(20.7300pt,-8.6925pt)--(7.0000pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(20.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-8.6900pt,3.3425pt)--(-4.0000pt,3.3425pt)--(-4.0000pt,-3.3425pt)--(-8.6900pt,-3.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (-8.6900pt,3.3425pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{23}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-12.6900pt,7.3425pt)--(0.0000pt,7.3425pt)--(0.0000pt,-7.3425pt)--(-12.6900pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-12.6900pt,7.3425pt)--(0.0000pt,7.3425pt)--(0.0000pt,-7.3425pt)--(-12.6900pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6900pt,0.0000pt)--(-12.6900pt,0.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-20.7300pt,8.6925pt)--(-13.7300pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-20.7300pt,-13.3425pt)--(-13.7300pt,-13.3425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,8.6925pt)--(7.0000pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-13.3425pt)--(7.0000pt,-13.3425pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-9.7300pt,13.3850pt)--(-4.0000pt,13.3850pt)--(-4.0000pt,4.0000pt)--(-9.7300pt,4.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (-9.7300pt,13.3850pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{24}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-13.7300pt,17.3850pt)--(0.0000pt,17.3850pt)--(0.0000pt,0.0000pt)--(-13.7300pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-13.7300pt,17.3850pt)--(0.0000pt,17.3850pt)--(0.0000pt,0.0000pt)--(-13.7300pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,8.6925pt)--(0.0000pt,8.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.7300pt,8.6925pt)--(-13.7300pt,8.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-9.2100pt,-10.0000pt)--(-4.5200pt,-10.0000pt)--(-4.5200pt,-16.6850pt)--(-9.2100pt,-16.6850pt)--cycle;
\node[anchor=north west,inner sep=0] at (-9.2100pt,-10.0000pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{25}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-13.2100pt,-6.0000pt)--(-0.5200pt,-6.0000pt)--(-0.5200pt,-20.6850pt)--(-13.2100pt,-20.6850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-13.2100pt,-6.0000pt)--(-0.5200pt,-6.0000pt)--(-0.5200pt,-20.6850pt)--(-13.2100pt,-20.6850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-13.3425pt)--(-0.5200pt,-13.3425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.7300pt,-13.3425pt)--(-13.2100pt,-13.3425pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-5.0000pt)--(0.0000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-10.0000pt)--(9.6000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-5.0000pt)..controls(8.0000pt,-5.0000pt)and(1.6000pt,-10.0000pt)..(9.6000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,10.0000pt)--(0.0000pt,10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-5.0000pt)--(0.0000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,10.0000pt)--(9.6000pt,10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,5.0000pt)--(9.6000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,10.0000pt)--(9.6000pt,10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)..controls(8.0000pt,0.0000pt)and(1.6000pt,5.0000pt)..(9.6000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,5.0000pt)--(9.6000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)..controls(8.0000pt,5.0000pt)and(1.6000pt,0.0000pt)..(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)..controls(8.0000pt,0.0000pt)and(1.6000pt,5.0000pt)..(9.6000pt,5.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(7.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(7.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(7.0000pt,5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,5.0000pt)..controls(1.0000pt,5.5523pt)and(0.5523pt,6.0000pt)..(0.0000pt,6.0000pt)..controls(-0.5523pt,6.0000pt)and(-1.0000pt,5.5523pt)..(-1.0000pt,5.0000pt)..controls(-1.0000pt,4.4477pt)and(-0.5523pt,4.0000pt)..(0.0000pt,4.0000pt)..controls(0.5523pt,4.0000pt)and(1.0000pt,4.4477pt)..(1.0000pt,5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,0.5000pt)--(3.0000pt,0.5000pt)--(3.0000pt,-5.5000pt)--(-3.0000pt,-5.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-2.5000pt)..controls(1.0000pt,-1.9477pt)and(0.5523pt,-1.5000pt)..(0.0000pt,-1.5000pt)..controls(-0.5523pt,-1.5000pt)and(-1.0000pt,-1.9477pt)..(-1.0000pt,-2.5000pt)..controls(-1.0000pt,-3.0523pt)and(-0.5523pt,-3.5000pt)..(0.0000pt,-3.5000pt)..controls(0.5523pt,-3.5000pt)and(1.0000pt,-3.0523pt)..(1.0000pt,-2.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)..controls(4.0000pt,4.4282pt)and(1.6000pt,0.0000pt)..(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)..controls(4.0000pt,-9.4282pt)and(1.6000pt,-5.0000pt)..(9.6000pt,-5.0000pt);
\end{tikzpicture}}&
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,11.0175pt)--(0.0000pt,11.0175pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,22.0350pt)--(30.3300pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,0.0000pt)--(30.3300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6000pt,26.7275pt)--(19.3300pt,26.7275pt)--(19.3300pt,17.3425pt)--(13.6000pt,17.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,26.7275pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{26}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,22.0350pt)--(23.3300pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](14.1200pt,3.3425pt)--(18.8100pt,3.3425pt)--(18.8100pt,-3.3425pt)--(14.1200pt,-3.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (14.1200pt,3.3425pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{27}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.1200pt,7.3425pt)--(22.8100pt,7.3425pt)--(22.8100pt,-7.3425pt)--(10.1200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.1200pt,7.3425pt)--(22.8100pt,7.3425pt)--(22.8100pt,-7.3425pt)--(10.1200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,0.0000pt)--(22.8100pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(10.1200pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,14.0175pt)--(3.0000pt,14.0175pt)--(3.0000pt,8.0175pt)--(-3.0000pt,8.0175pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,11.0175pt)..controls(1.0000pt,11.5698pt)and(0.5523pt,12.0175pt)..(0.0000pt,12.0175pt)..controls(-0.5523pt,12.0175pt)and(-1.0000pt,11.5698pt)..(-1.0000pt,11.0175pt)..controls(-1.0000pt,10.4652pt)and(-0.5523pt,10.0175pt)..(0.0000pt,10.0175pt)..controls(0.5523pt,10.0175pt)and(1.0000pt,10.4652pt)..(1.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,17.9457pt)and(1.6000pt,22.0350pt)..(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,4.0893pt)and(1.6000pt,0.0000pt)..(9.6000pt,0.0000pt);
\end{tikzpicture}}\\\ensuremath{\mathsf{id}}&\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}}&\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}}&\ensuremath{α}&\ensuremath{\bar{α}}&\ensuremath{σ}&\ensuremath{ρ}&\ensuremath{\bar{ρ}}&\ensuremath{\mathsf{ε}}&\ensuremath{\mathsf{π₁}}&\ensuremath{\mathsf{π₂}}&\ensuremath{\mathsf{δ}}&\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{g}}\end{tabular}\caption{Diagram-Morphism correspondence.}\label{28}\end{figure*}
Even though many applications depend crucially on \ensuremath{\mathsf{Obj}} constraints, they are often lengthy, and orthogonal to our main
points. Thus, to minimise clutter, most of
the time we omit these \ensuremath{\mathsf{Obj}} constraints. To recover them, one
should add an \ensuremath{\mathsf{Obj}} constraint for every relevant type variable,
as well as for the unit type. Additionally, for {\sc{}smc}s (introduced in
\cref{29} below), one needs closure under monoidal product.
\subsection{Symmetric Monoidal Categories}\label{29}
Our main objects of study are Symmetric Monoidal Categories
(abbreviated as {\sc{}smc} throughout the paper). They feature a unit object
and the monoidal product (often also called tensor product), written \ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{b}}. In general the unit can be any type, and
the product can be any type family, but it is sufficient for our applications to let the
unit object be the unit type (written \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}) and the monoidal
product as the product type of Haskell \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}. {\sc{}Smc}s provide a number of
ways to manipulate the product of objects. First, arbitrary morphisms
\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}} and \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{d}} can be combined using the \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} combinator: \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{b}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{d}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}. This combinator is
most often also called a product. In this paper we use different
symbols for the product action on morphisms \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}} and on types \ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{b}}, hopefully minimising confusion. In
diagrams, the product of morphisms is represented by laying out
the diagram representations of the operands on top of each other. This
means that the product morphism has two lines as output and input.
In general we allow drawing parallel lines in place of a single line
if the corresponding object is a monoidal product. Consequently, the
rest of the combinators —associators (\ensuremath{α} and \ensuremath{\bar{α}}),
unitors (\ensuremath{ρ} and \ensuremath{\bar{ρ}}) and swap (\ensuremath{σ})— can be drawn
as a (small) descriptive network of lines rather than as abstract
boxes. For instance, more tightly associated products are represented
by closer parallel lines, and the associators (\ensuremath{α} and
\ensuremath{\bar{α}}) regroup lines accordingly. The purpose of unitors is
to introduce or eliminate the unit object, whose carrying lines are
drawn dotted. Finally the \ensuremath{σ} morphism exchanges objects in a product.
The reader can refer to \cref{20} for a summary, and the
corresponding diagram representations are shown in
\cref{28}. As in the case of simple categories, a great
advantage of this diagrammatic notation is that diagrams which can be
transformed into one another by continuous deformation (including the
removal of disconnected dotted lines) represent equivalent
morphisms. This property makes the laws of {\sc{}smc}s intuitive, and
because they are extensively documented elsewhere
\citep{barr_category_1999}, we won't repeat them here. We clarify
however that lines can pass each other freely: knots are not taken
into account when checking topological equivalence. (For example, two
consecutive \ensuremath{σ} cancel: \ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{id}}.) This property
corresponds to the ``symmetric'' qualifier in ``\emph{Symmetric} Monoidal Categories'', and it is important to us because it means that
one need not worry about the order of binding or use of
variables when using lambda notation to describe morphisms.
\subsection{Cartesian Categories}\label{30}
\begin{figure} \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{class}\mskip 3.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{Cartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{π₁\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{π₂\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{ε\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{δ\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{▵}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}} \caption{Cartesian structure}\label{31}\end{figure}
Another key concept is that of cartesian categories
(\cref{31}). Even though they are often presented as standalone
structures, we instead present them as a layer on top of {\sc{}smc}s. More
precisely, we add only new morphisms: no new way to \emph{combine morphisms} is necessary. (In the boxes-and-wires metaphor, we add only new boxes, and
no layout rule is added.) A
minimal set of such new morphisms is comprised of \ensuremath{ε} and
\ensuremath{δ}, which respectively discard and duplicate an
input. However, it is useful to consider alternative presentations,
which can be more convenient, depending on the purpose. Instead of
\ensuremath{ε}, one can use projections (\ensuremath{\mathsf{π₁}} and \ensuremath{\mathsf{π₂}}), with \ensuremath{π₁\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\bar{ρ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{ε\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} and likewise for \ensuremath{\mathsf{π₂}}.
Likewise, but independently, one may use the
combinator (▵) instead of \ensuremath{\mathsf{δ}}, with \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{δ}. Our
diagram notation makes the latter two variants indistinguishable,
while the former two are equivalent under pruning of dotted lines:
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.6000pt,5.0000pt)--(-16.6000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.6000pt,0.0000pt)--(-16.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(7.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,5.0000pt)--(-7.0000pt,5.0000pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-6.0000pt,0.0000pt)..controls(-6.0000pt,0.5523pt)and(-6.4477pt,1.0000pt)..(-7.0000pt,1.0000pt)..controls(-7.5523pt,1.0000pt)and(-8.0000pt,0.5523pt)..(-8.0000pt,0.0000pt)..controls(-8.0000pt,-0.5523pt)and(-7.5523pt,-1.0000pt)..(-7.0000pt,-1.0000pt)..controls(-6.4477pt,-1.0000pt)and(-6.0000pt,-0.5523pt)..(-6.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,0.0000pt)--(-7.0000pt,0.0000pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(7.0000pt,5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\end{tikzpicture}}.
It is enlightening to consider what becomes of the correspondence
between diagram (topological) equivalence and morphism (algebraic)
equivalence in the presence of the above laws. For \ensuremath{\mathsf{ε}}, the metaphor
can be sustained: continuous deformation of lines involving
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,0.0000pt)..controls(1.0000pt,0.5523pt)and(0.5523pt,1.0000pt)..(0.0000pt,1.0000pt)..controls(-0.5523pt,1.0000pt)and(-1.0000pt,0.5523pt)..(-1.0000pt,0.0000pt)..controls(-1.0000pt,-0.5523pt)and(-0.5523pt,-1.0000pt)..(0.0000pt,-1.0000pt)..controls(0.5523pt,-1.0000pt)and(1.0000pt,-0.5523pt)..(1.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\end{tikzpicture}} capture its laws. For \ensuremath{\mathsf{δ}}, the topological metaphor
begins to break down. Morphisms can commute with \ensuremath{\mathsf{δ}} in the following
way: \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}}. This breakdown has consequences for
computational applications, as we discuss in
\cref{141}.
\subsection{Linear types}\label{32}
We rely on linear types in Haskell in an essential way. Indeed,
every linear function can be interpreted in terms of an {\sc{}smc}. This is a
well known fact, proven for example by
\citet[Ch. 3]{szabo_algebra_2016} or
\citet{benton_lnl_1995}. Unfortunately it does not mean that we have
nothing to do. Indeed, the above result, as it stands, only means that
one can obtain an {\sc{}smc} representation from another \emph{representation} as a (well-typed) lambda term. Such a term is, indeed, constructed by
a compiler, but it is in general not made available to the programs
themselves: some form of metaprogramming would be
required. Unfortunately, outside the Lisp family, such
metaprogramming facilities are often brittle or non-existent. For
instance, the Template Haskell {\sc{}api} is a direct reflection of the
internal representation of source code in use by the Glasgow Haskell
Compiler, and consequently the user-facing {\sc{}api} changes whenever this
internal representation changes.
In this paper we use Linear Haskell as host language, and borrow its
semantics and notations. We refer to \citet{bernardy_linear_2018} if
any doubt should remain, but what the reader should know is that
linear functions are denoted with a lollipop (⊸), and the pointy-headed arrow
(\ensuremath{\mathnormal{\rightarrow }}) corresponds to usual functions, which can use their argument
any number of times. A notable feature of Linear Haskell is that
unrestricted inputs can be embedded in data types (which can themselves
be handled linearly). We make use of this feature in
our implementation (\cref{60}). In sum, any language with the above
feature set is sufficient to host our interface and implementation. In
particular, we do not make use of the ability of Linear Haskell to
quantify over the multiplicity (linear or unrestricted) of function types.
\section{Interface}\label{33}
With all the basic components in place, we can now reveal the interface
that we provide to construct the morphisms of a symmetric monoidal category \ensuremath{\mathsf{k}} using lambda
notation. We introduce a single abstract type: \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}}, where
\ensuremath{\mathsf{r}} is a type variable (unique for the morphism under
construction) and \ensuremath{\mathsf{a}} is an object of the category
\ensuremath{\mathsf{k}}. Values of
the type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}} are called \emph{ports carrying \ensuremath{\mathsf{a}}}. In the
boxes-and-wires metaphor, ports are the output wires of boxes. Indeed, the
type of morphisms \ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}} is encoded as functions of type
\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}}. However, the type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}} is
abstract: it is manipulated solely \textit{via} the combinators of \cref{34}.
(This is enforced according to standard Haskell praxis: the definitions are hidden behind a module boundary, which exports only the prescribed {\sc{}api}.)
\begin{figure}\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{type}\mskip 3.0mu\mathsf{P}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Type}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Type}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Type}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Type}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Type}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Type}}\<[E]{}\\
\>[1]{}{\mathsf{unit}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[5]{}{\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{split}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{merge}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{encode}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{decode}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu∀\mskip 3.0mu\mathsf{r}\mskip 1.0mu.\mskip 3.0mu}\>[7]{}{\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\caption{The port {\sc{}api}}\label{34}\end{figure}
Our bread and butter are the \ensuremath{\mathsf{split}} and \ensuremath{\mathsf{merge}} combinators, which provide the ability to treat ports of type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} as a pair of ports. In fact,
\ensuremath{\mathsf{split}} and \ensuremath{\mathsf{merge}} are ubiquitous enough to deserve a
shorthand notation, suggestive of the pair-like character of \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}:
\begin{itemize}\item{}We write \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} for \ensuremath{\mathsf{merge}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\item{}We also use \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} as a pattern, and interpret it as a call to \ensuremath{\mathsf{split}}.
For instance, \ensuremath{\mathbf{let}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathbf{in}\mskip 3.0mu}\ensuremath{\mathsf{u}} means \ensuremath{\mathbf{let}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{split}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathbf{in}\mskip 3.0mu}\ensuremath{\mathsf{u}}\end{itemize}
Likewise, the presence of \ensuremath{\mathsf{unit}} means that ports of type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} can be created from thin air, which is useful to embed
constants.
Finally and crucially, \ensuremath{\mathsf{encode}} and \ensuremath{\mathsf{decode}} provide means
to convert back and forth between morphisms of an {\sc{}smc} (\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}})
and (\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}}), the corresponding linear functions.
We see in the type of \ensuremath{\mathsf{decode}} how the type variable \ensuremath{\mathsf{r}} is
introduced, ensuring that ports coming from different functions are
not mixed. This interface is guaranteed to satisfy the following
properties:
\begin{definition}{Laws of the interface} \begin{itemize}\item{}\ensuremath{\mathsf{split}} and \ensuremath{\mathsf{merge}} are inverses: \ensuremath{\mathsf{split}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{merge}\mskip 3.0mu}\ensuremath{\mathsf{p}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{p}} and \ensuremath{\mathsf{merge}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{split}\mskip 3.0mu}\ensuremath{\mathsf{p}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{p}}\item{}\ensuremath{\mathsf{encode}} and \ensuremath{\mathsf{decode}} are inverses: \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{f}} and \ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{p}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{p}}\item{}\ensuremath{\mathsf{encode}} is a functor: \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{id}} and \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{ψ}}\item{}\ensuremath{\mathsf{encode}} is compatible with products: \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\item{}\ensuremath{\mathsf{unit}} corresponds to unitors: \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{ρ\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{unit}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} and \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\bar{ρ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{unit}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{a}}\item{}\ensuremath{σ}, \ensuremath{α} and \ensuremath{\bar{α}} are consistent between Haskell and the embedded category:
\begin{itemize}\item{}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{b}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\item{}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{b}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\item{}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\bar{α}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{b}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{c}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\end{itemize}\end{itemize}\label{35}\end{definition} Stating the laws which involve products does require a bit of care.
For instance, it would not have been type-correct to write \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{g}} nor \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{σ\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{σ}: going
through \ensuremath{\mathsf{split}} and \ensuremath{\mathsf{merge}} is necessary.
Another aspect to consider is that many of these laws refer to an
equality on ports. Because the type of ports is abstract, we cannot
define it yet: its concrete definition will be provided together with
the concrete definition of ports.
However, we can already give an intuition for it in terms of diagrams: two ports are equal if
they are one and the same in the diagram.
Even it is abstract, we can already reason with this equality via the following property: two
extensionally equal functions on ports will decode to the same morphism. Formally:
\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{\rightarrow }\mskip 3.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{g}}.
Without introducing any additional concept, we can already observe some
benefits of the above interface. First, one can use all the facilities
of a higher-order language to construct elements of \ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}},
even though \ensuremath{\mathsf{k}} does not have an internal notion of functions (it
need not be a closed category). We owe this benefit to the host
language evaluation, which takes care of evaluating all intermediate
redexes. It can be illustrated by the existence of currying
combinators:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{curry}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[4]{}{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[5]{}{\mathnormal{\Rightarrow }\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathnormal{⊸}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{curry}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{f}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{uncurry}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[4]{}{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[5]{}{\mathnormal{\Rightarrow }\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathnormal{⊸}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}} \\ \ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{uncurry}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{p}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{case}\mskip 3.0mu\mathsf{split}\mskip 3.0mu\mathsf{p}\mskip 3.0mu\mathbf{of}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\end{parray}} \end{list}
Second, if the category \ensuremath{\mathsf{k}} happens to be cartesian, then we can freely copy
and discard ports. This is done by encoding \ensuremath{\mathsf{ε}} and \ensuremath{\mathsf{δ}}, as follows:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{copy}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Cartesian}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[4]{}{\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{copy}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{encode}\mskip 3.0muδ}\<[E]{}\\
\>[1]{}{\mathsf{discard}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Cartesian}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[5]{}{\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{discard}\mskip 3.0mu}\>[3]{}{\mathnormal{=}\mskip 3.0mu\mathsf{encode}\mskip 3.0muε}\<[E]{}\end{parray}}\end{list} It is worth stressing that \ensuremath{\mathsf{copy}} and \ensuremath{\mathsf{discard}} are not part
of the abstract interface. Indeed, in the above the morphisms \ensuremath{\mathsf{δ}} and
\ensuremath{\mathsf{ε}} are treated as black boxes by our implementation, just like any
other morphism of \ensuremath{\mathsf{k}} would be. Consequently the implementation
does not assume that any law holds for them, and in particular it
cannot commute any morphism with (this instance of) \ensuremath{\mathsf{δ}} using the law
\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{δ}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{δ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}}. We come back to this aspect in
\cref{141}.
More generally, thanks to the
\ensuremath{\mathsf{encode}} combinator, every morphism of \ensuremath{\mathsf{k}} can be
turned into a Haskell function on ports.
\section{Applications}\label{36}
In this section, we put the port {\sc{}api} of \cref{34} to
use. Through two examples of diagrammatic languages, we illustrate how
convenient it is to describe box-and-wire diagrams as functions on
ports.
\subsection{Quantum circuits}\label{37}
\begin{figure*}\begin{center}{\small{}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,25.7727pt)--(-332.6168pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,14.1416pt)--(-332.6168pt,14.1416pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,-2.4895pt)--(-332.6168pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.8640pt,34.1515pt)--(30.8640pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.8640pt,29.1515pt)--(30.8640pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.8640pt,0.0000pt)--(30.8640pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,34.1515pt)--(21.2640pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,29.1515pt)--(21.2640pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,0.0000pt)--(21.2640pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,34.1515pt)--(30.8640pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,29.1515pt)--(30.8640pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,0.0000pt)--(30.8640pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,25.7727pt)--(-323.0168pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,14.1416pt)--(-323.0168pt,14.1416pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,-2.4895pt)--(-323.0168pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,25.7727pt)--(-313.4168pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,7.4895pt)--(-313.4168pt,7.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,-2.4895pt)--(-313.4168pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,25.7727pt)--(-277.2858pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,5.0000pt)--(-277.2858pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,0.0000pt)--(-277.2858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,25.7727pt)--(-267.6858pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,20.7727pt)--(-267.6858pt,20.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,0.0000pt)--(-267.6858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,29.3636pt)--(-248.4858pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,11.1220pt)--(-248.4858pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,0.0000pt)--(-248.4858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,29.3636pt)--(-209.6359pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,11.1220pt)--(-209.6359pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,0.0000pt)--(-209.6359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,29.3636pt)--(-200.0359pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,24.3636pt)--(-200.0359pt,24.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,0.0000pt)--(-200.0359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,34.1515pt)--(-180.8359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,9.9790pt)--(-180.8359pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,0.0000pt)--(-180.8359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,34.1515pt)--(-146.1359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,9.9790pt)--(-146.1359pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,0.0000pt)--(-146.1359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,34.1515pt)--(-136.5359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,29.1515pt)--(-136.5359pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,0.0000pt)--(-136.5359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,40.5353pt)--(-117.3359pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,11.1220pt)--(-117.3359pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,0.0000pt)--(-117.3359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,40.5353pt)--(-78.4859pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,11.1220pt)--(-78.4859pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,0.0000pt)--(-78.4859pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,40.5353pt)--(-68.8859pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,22.7676pt)--(-68.8859pt,22.7676pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,0.0000pt)--(-68.8859pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-24.5860pt,42.2020pt)--(-17.5860pt,42.2020pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-24.5860pt,21.1010pt)--(-17.5860pt,21.1010pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,42.2020pt)--(7.0000pt,42.2020pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,21.1010pt)--(7.0000pt,21.1010pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,34.4527pt)--(17.2640pt,34.4527pt)--(17.2640pt,28.8502pt)--(11.0000pt,28.8502pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,34.4527pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{38}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,38.4527pt)--(21.2640pt,38.4527pt)--(21.2640pt,24.8502pt)--(7.0000pt,24.8502pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,43.7020pt)..controls(7.0000pt,45.0827pt)and(8.1193pt,46.2020pt)..(9.5000pt,46.2020pt)--(18.7640pt,46.2020pt)..controls(20.1447pt,46.2020pt)and(21.2640pt,45.0827pt)..(21.2640pt,43.7020pt)--(21.2640pt,19.6010pt)..controls(21.2640pt,18.2203pt)and(20.1447pt,17.1010pt)..(18.7640pt,17.1010pt)--(9.5000pt,17.1010pt)..controls(8.1193pt,17.1010pt)and(7.0000pt,18.2203pt)..(7.0000pt,19.6010pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,34.1515pt)--(21.2640pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,29.1515pt)--(21.2640pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,42.2020pt)--(7.0000pt,42.2020pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,21.1010pt)--(7.0000pt,21.1010pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-11.5110pt,45.1809pt)--(-6.0750pt,45.1809pt)--(-6.0750pt,39.2230pt)--(-11.5110pt,39.2230pt)--cycle;
\node[anchor=north west,inner sep=0] at (-11.5110pt,45.1809pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T}}}}\immediate\write\boxesfile{39}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-15.5110pt,49.1809pt)--(-2.0750pt,49.1809pt)--(-2.0750pt,35.2230pt)--(-15.5110pt,35.2230pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-15.5110pt,46.6809pt)..controls(-15.5110pt,48.0617pt)and(-14.3917pt,49.1809pt)..(-13.0110pt,49.1809pt)--(-4.5750pt,49.1809pt)..controls(-3.1943pt,49.1809pt)and(-2.0750pt,48.0617pt)..(-2.0750pt,46.6809pt)--(-2.0750pt,37.7230pt)..controls(-2.0750pt,36.3422pt)and(-3.1943pt,35.2230pt)..(-4.5750pt,35.2230pt)--(-13.0110pt,35.2230pt)..controls(-14.3917pt,35.2230pt)and(-15.5110pt,36.3422pt)..(-15.5110pt,37.7230pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,42.2020pt)--(-2.0750pt,42.2020pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-17.5860pt,42.2020pt)--(-15.5110pt,42.2020pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.5860pt,25.2230pt)--(-4.0000pt,25.2230pt)--(-4.0000pt,16.9790pt)--(-13.5860pt,16.9790pt)--cycle;
\node[anchor=north west,inner sep=0] at (-13.5860pt,25.2230pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T^{\dagger}}}}}\immediate\write\boxesfile{40}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-17.5860pt,29.2230pt)--(0.0000pt,29.2230pt)--(0.0000pt,12.9790pt)--(-17.5860pt,12.9790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-17.5860pt,26.7230pt)..controls(-17.5860pt,28.1037pt)and(-16.4667pt,29.2230pt)..(-15.0860pt,29.2230pt)--(-2.5000pt,29.2230pt)..controls(-1.1193pt,29.2230pt)and(0.0000pt,28.1037pt)..(0.0000pt,26.7230pt)--(0.0000pt,15.4790pt)..controls(0.0000pt,14.0983pt)and(-1.1193pt,12.9790pt)..(-2.5000pt,12.9790pt)--(-15.0860pt,12.9790pt)..controls(-16.4667pt,12.9790pt)and(-17.5860pt,14.0983pt)..(-17.5860pt,15.4790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,21.1010pt)--(0.0000pt,21.1010pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-17.5860pt,21.1010pt)--(-17.5860pt,21.1010pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-45.8500pt,36.6410pt)--(-38.8500pt,36.6410pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-45.8500pt,26.6620pt)--(-38.8500pt,26.6620pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-34.8500pt,34.4527pt)--(-28.5860pt,34.4527pt)--(-28.5860pt,28.8502pt)--(-34.8500pt,28.8502pt)--cycle;
\node[anchor=north west,inner sep=0] at (-34.8500pt,34.4527pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{41}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-38.8500pt,38.4527pt)--(-24.5860pt,38.4527pt)--(-24.5860pt,24.8502pt)--(-38.8500pt,24.8502pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-38.8500pt,43.7020pt)..controls(-38.8500pt,45.0827pt)and(-37.7307pt,46.2020pt)..(-36.3500pt,46.2020pt)--(-27.0860pt,46.2020pt)..controls(-25.7053pt,46.2020pt)and(-24.5860pt,45.0827pt)..(-24.5860pt,43.7020pt)--(-24.5860pt,19.6010pt)..controls(-24.5860pt,18.2203pt)and(-25.7053pt,17.1010pt)..(-27.0860pt,17.1010pt)--(-36.3500pt,17.1010pt)..controls(-37.7307pt,17.1010pt)and(-38.8500pt,18.2203pt)..(-38.8500pt,19.6010pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-24.5860pt,42.2020pt)--(-24.5860pt,42.2020pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-24.5860pt,21.1010pt)--(-24.5860pt,21.1010pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-38.8500pt,36.6410pt)--(-38.8500pt,36.6410pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-38.8500pt,26.6620pt)--(-38.8500pt,26.6620pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,36.6410pt)--(-59.2859pt,36.6410pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,26.6620pt)--(-59.2859pt,26.6620pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,36.6410pt)--(-45.8500pt,36.6410pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-55.2859pt,29.6410pt)--(-49.8500pt,29.6410pt)--(-49.8500pt,23.6830pt)--(-55.2859pt,23.6830pt)--cycle;
\node[anchor=north west,inner sep=0] at (-55.2859pt,29.6410pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T}}}}\immediate\write\boxesfile{42}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,33.6410pt)--(-45.8500pt,33.6410pt)--(-45.8500pt,19.6830pt)--(-59.2859pt,19.6830pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,31.1410pt)..controls(-59.2859pt,32.5217pt)and(-58.1666pt,33.6410pt)..(-56.7859pt,33.6410pt)--(-48.3500pt,33.6410pt)..controls(-46.9692pt,33.6410pt)and(-45.8500pt,32.5217pt)..(-45.8500pt,31.1410pt)--(-45.8500pt,22.1830pt)..controls(-45.8500pt,20.8023pt)and(-46.9692pt,19.6830pt)..(-48.3500pt,19.6830pt)--(-56.7859pt,19.6830pt)..controls(-58.1666pt,19.6830pt)and(-59.2859pt,20.8023pt)..(-59.2859pt,22.1830pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-45.8500pt,26.6620pt)--(-45.8500pt,26.6620pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-59.2859pt,26.6620pt)--(-59.2859pt,26.6620pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,40.5353pt)..controls(-60.8859pt,40.5353pt)and(-67.2859pt,26.6620pt)..(-59.2859pt,26.6620pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,22.7676pt)..controls(-60.8859pt,22.7676pt)and(-67.2859pt,36.6410pt)..(-59.2859pt,36.6410pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-55.4500pt,0.0000pt)--(6.3970pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](10.3970pt,2.9790pt)--(17.2640pt,2.9790pt)--(17.2640pt,-2.9790pt)--(10.3970pt,-2.9790pt)--cycle;
\node[anchor=north west,inner sep=0] at (10.3970pt,2.9790pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{H}}}}\immediate\write\boxesfile{43}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](6.3970pt,6.9790pt)--(21.2640pt,6.9790pt)--(21.2640pt,-6.9790pt)--(6.3970pt,-6.9790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](6.3970pt,4.4790pt)..controls(6.3970pt,5.8597pt)and(7.5163pt,6.9790pt)..(8.8970pt,6.9790pt)--(18.7640pt,6.9790pt)..controls(20.1447pt,6.9790pt)and(21.2640pt,5.8597pt)..(21.2640pt,4.4790pt)--(21.2640pt,-4.4790pt)..controls(21.2640pt,-5.8597pt)and(20.1447pt,-6.9790pt)..(18.7640pt,-6.9790pt)--(8.8970pt,-6.9790pt)..controls(7.5163pt,-6.9790pt)and(6.3970pt,-5.8597pt)..(6.3970pt,-4.4790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.2640pt,0.0000pt)--(21.2640pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](6.3970pt,0.0000pt)--(6.3970pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-64.8859pt,2.9790pt)--(-59.4500pt,2.9790pt)--(-59.4500pt,-2.9790pt)--(-64.8859pt,-2.9790pt)--cycle;
\node[anchor=north west,inner sep=0] at (-64.8859pt,2.9790pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T}}}}\immediate\write\boxesfile{44}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,6.9790pt)--(-55.4500pt,6.9790pt)--(-55.4500pt,-6.9790pt)--(-68.8859pt,-6.9790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,4.4790pt)..controls(-68.8859pt,5.8597pt)and(-67.7666pt,6.9790pt)..(-66.3859pt,6.9790pt)--(-57.9500pt,6.9790pt)..controls(-56.5692pt,6.9790pt)and(-55.4500pt,5.8597pt)..(-55.4500pt,4.4790pt)--(-55.4500pt,-4.4790pt)..controls(-55.4500pt,-5.8597pt)and(-56.5692pt,-6.9790pt)..(-57.9500pt,-6.9790pt)--(-66.3859pt,-6.9790pt)..controls(-67.7666pt,-6.9790pt)and(-68.8859pt,-5.8597pt)..(-68.8859pt,-4.4790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-55.4500pt,0.0000pt)--(-55.4500pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.8859pt,0.0000pt)--(-68.8859pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,40.5353pt)--(-68.8859pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,11.1220pt)..controls(-70.4859pt,11.1220pt)and(-76.8859pt,22.7676pt)..(-68.8859pt,22.7676pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,0.0000pt)--(-68.8859pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,40.5353pt)--(-78.4859pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-99.7499pt,11.1220pt)--(-92.7499pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-99.7499pt,0.0000pt)--(-92.7499pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-88.7499pt,8.3622pt)--(-82.4859pt,8.3622pt)--(-82.4859pt,2.7598pt)--(-88.7499pt,2.7598pt)--cycle;
\node[anchor=north west,inner sep=0] at (-88.7499pt,8.3622pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{45}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-92.7499pt,12.3622pt)--(-78.4859pt,12.3622pt)--(-78.4859pt,-1.2402pt)--(-92.7499pt,-1.2402pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-92.7499pt,12.6220pt)..controls(-92.7499pt,14.0027pt)and(-91.6306pt,15.1220pt)..(-90.2499pt,15.1220pt)--(-80.9859pt,15.1220pt)..controls(-79.6052pt,15.1220pt)and(-78.4859pt,14.0027pt)..(-78.4859pt,12.6220pt)--(-78.4859pt,-1.5000pt)..controls(-78.4859pt,-2.8807pt)and(-79.6052pt,-4.0000pt)..(-80.9859pt,-4.0000pt)--(-90.2499pt,-4.0000pt)..controls(-91.6306pt,-4.0000pt)and(-92.7499pt,-2.8807pt)..(-92.7499pt,-1.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,11.1220pt)--(-78.4859pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-78.4859pt,0.0000pt)--(-78.4859pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-92.7499pt,11.1220pt)--(-92.7499pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-92.7499pt,0.0000pt)--(-92.7499pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,11.1220pt)--(-99.7499pt,11.1220pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-113.3359pt,4.1220pt)--(-103.7499pt,4.1220pt)--(-103.7499pt,-4.1220pt)--(-113.3359pt,-4.1220pt)--cycle;
\node[anchor=north west,inner sep=0] at (-113.3359pt,4.1220pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T^{\dagger}}}}}\immediate\write\boxesfile{46}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,8.1220pt)--(-99.7499pt,8.1220pt)--(-99.7499pt,-8.1220pt)--(-117.3359pt,-8.1220pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,5.6220pt)..controls(-117.3359pt,7.0027pt)and(-116.2166pt,8.1220pt)..(-114.8359pt,8.1220pt)--(-102.2499pt,8.1220pt)..controls(-100.8692pt,8.1220pt)and(-99.7499pt,7.0027pt)..(-99.7499pt,5.6220pt)--(-99.7499pt,-5.6220pt)..controls(-99.7499pt,-7.0027pt)and(-100.8692pt,-8.1220pt)..(-102.2499pt,-8.1220pt)--(-114.8359pt,-8.1220pt)..controls(-116.2166pt,-8.1220pt)and(-117.3359pt,-7.0027pt)..(-117.3359pt,-5.6220pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-99.7499pt,0.0000pt)--(-99.7499pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-117.3359pt,0.0000pt)--(-117.3359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,40.5353pt)--(-126.9359pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,22.7676pt)--(-126.9359pt,22.7676pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,0.0000pt)--(-126.9359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,40.5353pt)--(-117.3359pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,22.7676pt)..controls(-118.9359pt,22.7676pt)and(-125.3359pt,11.1220pt)..(-117.3359pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-126.9359pt,0.0000pt)--(-117.3359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,34.1515pt)..controls(-128.5359pt,34.1515pt)and(-134.9359pt,22.7676pt)..(-126.9359pt,22.7676pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,29.1515pt)..controls(-128.5359pt,29.1515pt)and(-134.9359pt,40.5353pt)..(-126.9359pt,40.5353pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-136.5359pt,0.0000pt)--(-126.9359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,34.1515pt)--(-136.5359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,9.9790pt)..controls(-138.1359pt,9.9790pt)and(-144.5359pt,29.1515pt)..(-136.5359pt,29.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,0.0000pt)--(-136.5359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,34.1515pt)--(-146.1359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-167.3999pt,9.9790pt)--(-160.3999pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-167.3999pt,0.0000pt)--(-160.3999pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-156.3999pt,7.7907pt)--(-150.1359pt,7.7907pt)--(-150.1359pt,2.1883pt)--(-156.3999pt,2.1883pt)--cycle;
\node[anchor=north west,inner sep=0] at (-156.3999pt,7.7907pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{47}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-160.3999pt,11.7907pt)--(-146.1359pt,11.7907pt)--(-146.1359pt,-1.8117pt)--(-160.3999pt,-1.8117pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-160.3999pt,11.4790pt)..controls(-160.3999pt,12.8597pt)and(-159.2806pt,13.9790pt)..(-157.8999pt,13.9790pt)--(-148.6359pt,13.9790pt)..controls(-147.2552pt,13.9790pt)and(-146.1359pt,12.8597pt)..(-146.1359pt,11.4790pt)--(-146.1359pt,-1.5000pt)..controls(-146.1359pt,-2.8807pt)and(-147.2552pt,-4.0000pt)..(-148.6359pt,-4.0000pt)--(-157.8999pt,-4.0000pt)..controls(-159.2806pt,-4.0000pt)and(-160.3999pt,-2.8807pt)..(-160.3999pt,-1.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,9.9790pt)--(-146.1359pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-146.1359pt,0.0000pt)--(-146.1359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-160.3999pt,9.9790pt)--(-160.3999pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-160.3999pt,0.0000pt)--(-160.3999pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,9.9790pt)--(-167.3999pt,9.9790pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-176.8359pt,2.9790pt)--(-171.3999pt,2.9790pt)--(-171.3999pt,-2.9790pt)--(-176.8359pt,-2.9790pt)--cycle;
\node[anchor=north west,inner sep=0] at (-176.8359pt,2.9790pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T}}}}\immediate\write\boxesfile{48}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,6.9790pt)--(-167.3999pt,6.9790pt)--(-167.3999pt,-6.9790pt)--(-180.8359pt,-6.9790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,4.4790pt)..controls(-180.8359pt,5.8597pt)and(-179.7166pt,6.9790pt)..(-178.3359pt,6.9790pt)--(-169.8999pt,6.9790pt)..controls(-168.5192pt,6.9790pt)and(-167.3999pt,5.8597pt)..(-167.3999pt,4.4790pt)--(-167.3999pt,-4.4790pt)..controls(-167.3999pt,-5.8597pt)and(-168.5192pt,-6.9790pt)..(-169.8999pt,-6.9790pt)--(-178.3359pt,-6.9790pt)..controls(-179.7166pt,-6.9790pt)and(-180.8359pt,-5.8597pt)..(-180.8359pt,-4.4790pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-167.3999pt,0.0000pt)--(-167.3999pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-180.8359pt,0.0000pt)--(-180.8359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,34.1515pt)--(-190.4359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,19.5757pt)--(-190.4359pt,19.5757pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,0.0000pt)--(-190.4359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,34.1515pt)--(-180.8359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,19.5757pt)..controls(-182.4359pt,19.5757pt)and(-188.8359pt,9.9790pt)..(-180.8359pt,9.9790pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-190.4359pt,0.0000pt)--(-180.8359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,29.3636pt)..controls(-192.0359pt,29.3636pt)and(-198.4359pt,19.5757pt)..(-190.4359pt,19.5757pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,24.3636pt)..controls(-192.0359pt,24.3636pt)and(-198.4359pt,34.1515pt)..(-190.4359pt,34.1515pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-200.0359pt,0.0000pt)--(-190.4359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,29.3636pt)--(-200.0359pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,11.1220pt)..controls(-201.6359pt,11.1220pt)and(-208.0359pt,24.3636pt)..(-200.0359pt,24.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,0.0000pt)--(-200.0359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,29.3636pt)--(-209.6359pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-230.8999pt,11.1220pt)--(-223.8999pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-230.8999pt,0.0000pt)--(-223.8999pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-219.8999pt,8.3622pt)--(-213.6359pt,8.3622pt)--(-213.6359pt,2.7598pt)--(-219.8999pt,2.7598pt)--cycle;
\node[anchor=north west,inner sep=0] at (-219.8999pt,8.3622pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{49}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-223.8999pt,12.3622pt)--(-209.6359pt,12.3622pt)--(-209.6359pt,-1.2402pt)--(-223.8999pt,-1.2402pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-223.8999pt,12.6220pt)..controls(-223.8999pt,14.0027pt)and(-222.7806pt,15.1220pt)..(-221.3999pt,15.1220pt)--(-212.1359pt,15.1220pt)..controls(-210.7551pt,15.1220pt)and(-209.6359pt,14.0027pt)..(-209.6359pt,12.6220pt)--(-209.6359pt,-1.5000pt)..controls(-209.6359pt,-2.8807pt)and(-210.7551pt,-4.0000pt)..(-212.1359pt,-4.0000pt)--(-221.3999pt,-4.0000pt)..controls(-222.7806pt,-4.0000pt)and(-223.8999pt,-2.8807pt)..(-223.8999pt,-1.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,11.1220pt)--(-209.6359pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-209.6359pt,0.0000pt)--(-209.6359pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-223.8999pt,11.1220pt)--(-223.8999pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-223.8999pt,0.0000pt)--(-223.8999pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,11.1220pt)--(-230.8999pt,11.1220pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-244.4858pt,4.1220pt)--(-234.8999pt,4.1220pt)--(-234.8999pt,-4.1220pt)--(-244.4858pt,-4.1220pt)--cycle;
\node[anchor=north west,inner sep=0] at (-244.4858pt,4.1220pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{T^{\dagger}}}}}\immediate\write\boxesfile{50}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,8.1220pt)--(-230.8999pt,8.1220pt)--(-230.8999pt,-8.1220pt)--(-248.4858pt,-8.1220pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,5.6220pt)..controls(-248.4858pt,7.0027pt)and(-247.3665pt,8.1220pt)..(-245.9858pt,8.1220pt)--(-233.3999pt,8.1220pt)..controls(-232.0191pt,8.1220pt)and(-230.8999pt,7.0027pt)..(-230.8999pt,5.6220pt)--(-230.8999pt,-5.6220pt)..controls(-230.8999pt,-7.0027pt)and(-232.0191pt,-8.1220pt)..(-233.3999pt,-8.1220pt)--(-245.9858pt,-8.1220pt)..controls(-247.3665pt,-8.1220pt)and(-248.4858pt,-7.0027pt)..(-248.4858pt,-5.6220pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-230.8999pt,0.0000pt)--(-230.8999pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-248.4858pt,0.0000pt)--(-248.4858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,29.3636pt)--(-258.0858pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,17.1818pt)--(-258.0858pt,17.1818pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,0.0000pt)--(-258.0858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,29.3636pt)--(-248.4858pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,17.1818pt)..controls(-250.0858pt,17.1818pt)and(-256.4858pt,11.1220pt)..(-248.4858pt,11.1220pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-258.0858pt,0.0000pt)--(-248.4858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,25.7727pt)..controls(-259.6858pt,25.7727pt)and(-266.0858pt,17.1818pt)..(-258.0858pt,17.1818pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,20.7727pt)..controls(-259.6858pt,20.7727pt)and(-266.0858pt,29.3636pt)..(-258.0858pt,29.3636pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-267.6858pt,0.0000pt)--(-258.0858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,25.7727pt)--(-267.6858pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,5.0000pt)..controls(-269.2858pt,5.0000pt)and(-275.6858pt,20.7727pt)..(-267.6858pt,20.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,0.0000pt)--(-267.6858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,25.7727pt)--(-277.2858pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-298.5498pt,7.4895pt)--(-291.5498pt,7.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-298.5498pt,-2.4895pt)--(-291.5498pt,-2.4895pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-287.5498pt,5.3012pt)--(-281.2858pt,5.3012pt)--(-281.2858pt,-0.3012pt)--(-287.5498pt,-0.3012pt)--cycle;
\node[anchor=north west,inner sep=0] at (-287.5498pt,5.3012pt){\savebox{\marxupbox}{{\ensuremath{\mathnormal{⊕}}}}\immediate\write\boxesfile{51}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-291.5498pt,9.3012pt)--(-277.2858pt,9.3012pt)--(-277.2858pt,-4.3012pt)--(-291.5498pt,-4.3012pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-291.5498pt,8.9895pt)..controls(-291.5498pt,10.3702pt)and(-290.4305pt,11.4895pt)..(-289.0498pt,11.4895pt)--(-279.7858pt,11.4895pt)..controls(-278.4051pt,11.4895pt)and(-277.2858pt,10.3702pt)..(-277.2858pt,8.9895pt)--(-277.2858pt,-3.9895pt)..controls(-277.2858pt,-5.3702pt)and(-278.4051pt,-6.4895pt)..(-279.7858pt,-6.4895pt)--(-289.0498pt,-6.4895pt)..controls(-290.4305pt,-6.4895pt)and(-291.5498pt,-5.3702pt)..(-291.5498pt,-3.9895pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,5.0000pt)--(-277.2858pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-277.2858pt,0.0000pt)--(-277.2858pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-291.5498pt,7.4895pt)--(-291.5498pt,7.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-291.5498pt,-2.4895pt)--(-291.5498pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,7.4895pt)--(-298.5498pt,7.4895pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-309.4168pt,0.4895pt)--(-302.5498pt,0.4895pt)--(-302.5498pt,-5.4685pt)--(-309.4168pt,-5.4685pt)--cycle;
\node[anchor=north west,inner sep=0] at (-309.4168pt,0.4895pt){\savebox{\marxupbox}{{\ensuremath{\ensuremath{H}}}}\immediate\write\boxesfile{52}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,4.4895pt)--(-298.5498pt,4.4895pt)--(-298.5498pt,-9.4685pt)--(-313.4168pt,-9.4685pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,1.9895pt)..controls(-313.4168pt,3.3702pt)and(-312.2975pt,4.4895pt)..(-310.9168pt,4.4895pt)--(-301.0498pt,4.4895pt)..controls(-299.6691pt,4.4895pt)and(-298.5498pt,3.3702pt)..(-298.5498pt,1.9895pt)--(-298.5498pt,-6.9685pt)..controls(-298.5498pt,-8.3492pt)and(-299.6691pt,-9.4685pt)..(-301.0498pt,-9.4685pt)--(-310.9168pt,-9.4685pt)..controls(-312.2975pt,-9.4685pt)and(-313.4168pt,-8.3492pt)..(-313.4168pt,-6.9685pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-298.5498pt,-2.4895pt)--(-298.5498pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-313.4168pt,-2.4895pt)--(-313.4168pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,25.7727pt)--(-313.4168pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,14.1416pt)..controls(-315.0168pt,14.1416pt)and(-321.4168pt,7.4895pt)..(-313.4168pt,7.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-323.0168pt,-2.4895pt)--(-313.4168pt,-2.4895pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,25.7727pt)..controls(-324.6168pt,25.7727pt)and(-331.0168pt,14.1416pt)..(-323.0168pt,14.1416pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,14.1416pt)..controls(-324.6168pt,14.1416pt)and(-331.0168pt,25.7727pt)..(-323.0168pt,25.7727pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-332.6168pt,-2.4895pt)--(-323.0168pt,-2.4895pt);
\end{tikzpicture}}}\end{center}\caption{Toffoli gate in terms of \ensuremath{\ensuremath{H}}, \ensuremath{\ensuremath{T}} and \ensuremath{\mathnormal{⊕}}.}\label{53}\end{figure*}
In quantum computing one of the common ways to represent programs is
as \emph{quantum circuits}. Take, for instance, the circuit
of \cref{53}, which is an implementation of the Toffoli gate in terms of simpler
quantum gates.
For our purposes, it suffices to treat the atomic gates in
\cref{53} as abstract. Regardless, if a reader may be
interested in looking up their definitions, the gate \ensuremath{\ensuremath{H}} stands
for the Hadamard gate, \ensuremath{\ensuremath{T}} for the T gate, and \ensuremath{\mathnormal{⊕}} for
the controlled-not gate.\footnote{Refer for example to
\url{https://en.wikipedia.org/wiki/Quantum\_logic\_gate} and
\url{https://en.wikipedia.org/wiki/Toffoli\_gate}.}
Quantum circuits closely resemble traditional Boolean circuits except
that a circuit represents not a Boolean function, but a unitary matrix
on some finite dimensional \ensuremath{ℂ}-vector space. For our purposes,
unitary matrices have two important properties. First, they form an
{\sc{}smc}, which we call \ensuremath{\mathsf{U}}.
(This is why quantum circuits can be written as
boxes-and-wires diagrams.)
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]
A possible implementation of the \ensuremath{\mathsf{U}} category is
to let \ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{U}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}} be a matrix whose indices range \ensuremath{\mathsf{a}} and \ensuremath{\mathsf{b}}.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\allowbreak{}\mathnormal{\{}\mskip 0.0mu\mathsf{fromM}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Array}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0muℂ\mskip 0.0mu\mathnormal{\}}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Thus this means in particular that all objects in this category must
be finite types: \ensuremath{\mathsf{Finite}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Bounded}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{Ix}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{Eq}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}. This way
we can construct matrices using the following function:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{tabulate}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Finite}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{Finite}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0muℂ\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{U}}{\leadsto}\mskip 0.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathsf{tabulate}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[2]{}{\mathsf{array}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{minBound}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{minBound}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}}\<[E]{}\\
\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{maxBound}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{maxBound}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{[}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{i}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{j}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{i}\mskip 3.0mu\mathsf{j}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{|}\mskip 3.0mu\mathsf{i}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{inhabitants}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{j}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{inhabitants}\mskip 0.0mu\mathnormal{]}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Besides, the main tool for implementation is the Kronecker delta:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{delta}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Eq}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0muℂ}\<[E]{}\\
\>[1]{}{\mathsf{delta}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{y}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{if}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\equiv}\mskip 3.0mu\mathsf{y}\mskip 3.0mu\mathbf{then}\mskip 3.0mu\mathrm{1}\mskip 3.0mu\mathbf{else}\mskip 3.0mu\mathrm{0}}\<[E]{}\end{parray}}\end{list}
We can then construct the \ensuremath{\mathsf{Monoidal}\mskip 3.0mu}\ensuremath{\mathsf{U}} instance:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Category}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{type}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{Finite}}\<[E]{}\\
\>[2]{}{\mathsf{id}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\mathsf{delta}}\<[E]{}\\
\>[2]{}{\mathsf{U}\mskip 3.0mu\mathsf{g}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{i}\mskip 3.0mu\mathsf{j}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu}\>[7]{}{\mathsf{summation}}\<[E]{}\\
\>[7]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{!}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{i}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[8]{}{\mathnormal{*}\mskip 3.0mu}\>[9]{}{\mathsf{g}\mskip 3.0mu\mathnormal{!}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{k}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{j}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{U}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{!}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{*}\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathnormal{!}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{ρ\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{x}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{delta}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\bar{ρ}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{delta}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu}\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[5]{}{\mathsf{delta}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[6]{}{\mathsf{delta}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{σ\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{tabulate}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{delta}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x'}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y'}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Morphism composition is matrix product, and the product \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is
implemented as the Kronecker product.
To be complete, we also would need to show that each method
implemented above preserves the unitary character of matrices. These
proofs can be easily looked up, but for the reader who might prefer to
reconstruct them, the key property is that a matrix is unitary iff its
determinant is 1: \ensuremath{\mathsf{norm}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\mathsf{u}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathrm{1}}. Then one needs to check
that this property is preserved by each operation. The properties to
invoke are \ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{u}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{v}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\mathsf{u}\mskip 3.0mu}\ensuremath{\mathnormal{·}\mskip 3.0mu}\ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\mathsf{v}} and \ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{u}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{v}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\mathsf{u}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\string^\mskip 3.0mu}\ensuremath{\mathsf{n}\mskip 3.0mu}\ensuremath{\mathnormal{·}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{det}\mskip 3.0mu}\ensuremath{\mathsf{v}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\string^\mskip 3.0mu}\ensuremath{\mathsf{m}}, where \ensuremath{\mathsf{n}} and \ensuremath{\mathsf{m}} are the
respective dimensions of \ensuremath{\mathsf{u}} and \ensuremath{\mathsf{v}}.
\end{mdframed} Second, unitary matrices can be inverted
by taking their conjugate transpose.
Notice for example the use of the gate \ensuremath{\ensuremath{T^{\dagger}}} in \cref{53}. It is the conjugate transpose
of \ensuremath{\ensuremath{T}}. That is, \ensuremath{\ensuremath{T^{\dagger}}} is not a primitive gate, but one
defined in terms of \ensuremath{\ensuremath{T}} using the function
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{conjugateTranspose}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu}\>[2]{}{\mathsf{U}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\end{parray}}\end{list}
It would be inconvenient to have to return to the low-level {\sc{}smc} interface every time we want to invert a matrix: what we really want
is to lift the \ensuremath{\mathsf{U}}-level interface to ports (\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{U}}) once and
for all, then work entirely with ports. Fortunately,
we can do just that. The only difference with lifting simple morphisms (\ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{U}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}}) is that lifting \ensuremath{\mathsf{conjugateTranspose}} yields a
higher-order function:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{invert}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu}\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu∀\mskip 3.0mu\mathsf{s}\mskip 1.0mu.\mskip 3.0mu}\>[3]{}{\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{s}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{s}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu∀\mskip 3.0mu\mathsf{r}\mskip 1.0mu.\mskip 3.0mu}\>[4]{}{\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{invert}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{encode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{conjugateTranspose}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{decode}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Consequently we do not have to encode the diagram of
\cref{53} using the methods of the \ensuremath{\mathsf{Monoidal}} class, but we can use the
more familiar lambda notation, manipulating ports. We do so assuming
the gates \ensuremath{\ensuremath{H}}, \ensuremath{\ensuremath{T}}, and \ensuremath{\mathnormal{⊕}}, which we can leave
abstract with the following types:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\ensuremath{H}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}}\<[E]{}\\
\>[1]{}{\ensuremath{T}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}}\<[E]{}\\
\>[1]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{⊕}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Now, we can define the Toffoli gate circuit as follows
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{toffoli}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[3]{}{\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathnormal{⊸}\mskip 3.0mu}\>[3]{}{\mathsf{P}\mskip 3.0mu\mathsf{U}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Bool}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{toffoli}\mskip 3.0mu\mathsf{c}_{1}\mskip 3.0mu\mathsf{c}_{2}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu}\>[4]{}{\mathsf{c}_{1}\mskip 3.0mu}\>[5]{}{\mathnormal{⊕}\mskip 3.0mu}\>[6]{}{\ensuremath{H}\mskip 3.0mu}\>[7]{}{\mathsf{x}\mskip 3.0mu}\>[8]{}{\mathnormal{\&}\mskip 3.0mu}\>[9]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}_{1}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\mathsf{c}_{2}\mskip 3.0mu}\>[5]{}{\mathnormal{⊕}\mskip 3.0mu}\>[6]{}{\ensuremath{T^{\dagger}}\mskip 3.0mu}\>[7]{}{\mathsf{x}\mskip 3.0mu}\>[8]{}{\mathnormal{\&}\mskip 3.0mu}\>[9]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}_{2}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\mathsf{c}_{1}\mskip 3.0mu}\>[5]{}{\mathnormal{⊕}\mskip 3.0mu}\>[6]{}{\ensuremath{T}\mskip 3.0mu}\>[7]{}{\mathsf{x}\mskip 3.0mu}\>[8]{}{\mathnormal{\&}\mskip 3.0mu}\>[9]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}_{1}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\mathsf{c}_{2}\mskip 3.0mu}\>[5]{}{\mathnormal{⊕}\mskip 3.0mu}\>[6]{}{\ensuremath{T^{\dagger}}\mskip 3.0mu}\>[7]{}{\mathsf{x}\mskip 3.0mu}\>[8]{}{\mathnormal{\&}\mskip 3.0mu}\>[9]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}_{2}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\mathsf{c}_{2}\mskip 3.0mu}\>[5]{}{\mathnormal{⊕}\mskip 3.0mu}\>[6]{}{\ensuremath{T}\mskip 3.0mu}\>[7]{}{\mathsf{c}_{1}\mskip 3.0mu}\>[8]{}{\mathnormal{\&}\mskip 3.0mu}\>[9]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}_{2}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\ensuremath{T}\mskip 3.0mu\mathsf{c}_{2}\mskip 3.0mu\mathnormal{⊕}\mskip 3.0mu\ensuremath{T^{\dagger}}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\ensuremath{H}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\ensuremath{T}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[4]{}{\mathbf{where}\mskip 3.0mu\ensuremath{T^{\dagger}}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{invert}\mskip 3.0mu\ensuremath{T}}\<[E]{}\end{parray}}\end{list}
We use explicit β-redexes instead of let-bindings here because we want
to reuse some variable names: since using a linear variable makes
it unavailable in the remainder of the function, we may freely reuse
its name. Unfortunately, Haskell only has recursive lets, so if we
were to write \ensuremath{\mathbf{let}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{c}_{1}\mskip 2.0mu}\ensuremath{\mathnormal{\fatsemi }\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{c}_{1}\mskip 3.0mu}\ensuremath{\mathnormal{⊕}\mskip 3.0mu}\ensuremath{\ensuremath{H}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathbf{in}\mskip 3.0mu}\ensuremath{\mathnormal{…}}, Haskell
would try to define both \ensuremath{\mathsf{c}_{1}} and \ensuremath{\mathsf{x}} recursively, which is
not the intended behaviour. To this effect, we use the reverse-order
linear application operator \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{\&}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} which is defined as
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{\&}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu}\>[2]{}{\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathsf{x}\mskip 3.0mu\mathnormal{\&}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{x}}\<[E]{}\end{parray}}\end{list}
This is a specificity of Haskell. In a language with non-recursive lets
the definition of \ensuremath{\mathsf{toffoli}} would look even more natural.
\subsection{Workflow orchestration}\label{54}
\begin{figure}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-43.8950pt,23.3850pt)--(-36.8950pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-43.8950pt,0.0000pt)--(-36.8950pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,25.8850pt)--(7.0000pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(7.0000pt,2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,25.8850pt)--(-22.7300pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,20.8850pt)--(-22.7300pt,20.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,0.0000pt)--(-22.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,25.8850pt)--(-13.1300pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,5.0000pt)--(-13.1300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,0.0000pt)--(-13.1300pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.8625pt,30.5275pt)--(-4.2675pt,30.5275pt)--(-4.2675pt,21.2425pt)--(-8.8625pt,21.2425pt)--cycle;
\node[anchor=north west,inner sep=0] at (-8.8625pt,30.5275pt){\savebox{\marxupbox}{{\ensuremath{ξ}}}\immediate\write\boxesfile{55}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.8625pt,34.5275pt)--(-0.2675pt,34.5275pt)--(-0.2675pt,17.2425pt)--(-12.8625pt,17.2425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.8625pt,32.0275pt)..controls(-12.8625pt,33.4082pt)and(-11.7432pt,34.5275pt)..(-10.3625pt,34.5275pt)--(-2.7675pt,34.5275pt)..controls(-1.3868pt,34.5275pt)and(-0.2675pt,33.4082pt)..(-0.2675pt,32.0275pt)--(-0.2675pt,19.7425pt)..controls(-0.2675pt,18.3618pt)and(-1.3868pt,17.2425pt)..(-2.7675pt,17.2425pt)--(-10.3625pt,17.2425pt)..controls(-11.7432pt,17.2425pt)and(-12.8625pt,18.3618pt)..(-12.8625pt,19.7425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,25.8850pt)--(-0.2675pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,25.8850pt)--(-12.8625pt,25.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.1300pt,7.1925pt)--(-4.0000pt,7.1925pt)--(-4.0000pt,-2.1925pt)--(-9.1300pt,-2.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-9.1300pt,7.1925pt){\savebox{\marxupbox}{{\ensuremath{ζ}}}\immediate\write\boxesfile{56}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,11.1925pt)--(0.0000pt,11.1925pt)--(0.0000pt,-6.1925pt)--(-13.1300pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,8.6925pt)..controls(-13.1300pt,10.0732pt)and(-12.0107pt,11.1925pt)..(-10.6300pt,11.1925pt)--(-2.5000pt,11.1925pt)..controls(-1.1193pt,11.1925pt)and(0.0000pt,10.0732pt)..(0.0000pt,8.6925pt)--(0.0000pt,-3.6925pt)..controls(0.0000pt,-5.0732pt)and(-1.1193pt,-6.1925pt)..(-2.5000pt,-6.1925pt)--(-10.6300pt,-6.1925pt)..controls(-12.0107pt,-6.1925pt)and(-13.1300pt,-5.0732pt)..(-13.1300pt,-3.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(0.0000pt,2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,5.0000pt)--(-13.1300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-13.1300pt,0.0000pt)--(-13.1300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,25.8850pt)--(-13.1300pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,20.8850pt)..controls(-14.7300pt,20.8850pt)and(-21.1300pt,5.0000pt)..(-13.1300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,0.0000pt)--(-13.1300pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.7500pt,28.0775pt)--(-26.8750pt,28.0775pt)--(-26.8750pt,18.6925pt)--(-32.7500pt,18.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-32.7500pt,28.0775pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{57}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.7500pt,32.0775pt)--(-22.8750pt,32.0775pt)--(-22.8750pt,14.6925pt)--(-36.7500pt,14.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.7500pt,29.5775pt)..controls(-36.7500pt,30.9582pt)and(-35.6307pt,32.0775pt)..(-34.2500pt,32.0775pt)--(-25.3750pt,32.0775pt)..controls(-23.9943pt,32.0775pt)and(-22.8750pt,30.9582pt)..(-22.8750pt,29.5775pt)--(-22.8750pt,17.1925pt)..controls(-22.8750pt,15.8118pt)and(-23.9943pt,14.6925pt)..(-25.3750pt,14.6925pt)--(-34.2500pt,14.6925pt)..controls(-35.6307pt,14.6925pt)and(-36.7500pt,15.8118pt)..(-36.7500pt,17.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,25.8850pt)--(-22.8750pt,25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,20.8850pt)--(-22.8750pt,20.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.8950pt,23.3850pt)--(-36.7500pt,23.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-32.8950pt,4.6925pt)--(-26.7300pt,4.6925pt)--(-26.7300pt,-4.6925pt)--(-32.8950pt,-4.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-32.8950pt,4.6925pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{58}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.8950pt,8.6925pt)--(-22.7300pt,8.6925pt)--(-22.7300pt,-8.6925pt)--(-36.8950pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.8950pt,6.1925pt)..controls(-36.8950pt,7.5732pt)and(-35.7757pt,8.6925pt)..(-34.3950pt,8.6925pt)--(-25.2300pt,8.6925pt)..controls(-23.8493pt,8.6925pt)and(-22.7300pt,7.5732pt)..(-22.7300pt,6.1925pt)--(-22.7300pt,-6.1925pt)..controls(-22.7300pt,-7.5732pt)and(-23.8493pt,-8.6925pt)..(-25.2300pt,-8.6925pt)--(-34.3950pt,-8.6925pt)..controls(-35.7757pt,-8.6925pt)and(-36.8950pt,-7.5732pt)..(-36.8950pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7300pt,0.0000pt)--(-22.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-36.8950pt,0.0000pt)--(-36.8950pt,0.0000pt);
\end{tikzpicture}}\caption{A workflow corresponding to the morphism \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ξ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ζ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}.}\label{59}\end{figure}
Consider a type \ensuremath{\mathsf{Step}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}} representing
computations from type \ensuremath{\mathsf{a}} to type \ensuremath{\mathsf{b}}: a value of type
\ensuremath{\mathsf{Step}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}} may be some Haskell function, or it can run an
external command. Whatever it is, we make the assumption that the side effects
embedded in a \ensuremath{\mathsf{Step}} are commutative. That is, it never
matters if step \ensuremath{\mathsf{φ}} is run before step \ensuremath{\mathsf{ψ}} or the other way
around. And, in fact, if there is no data dependencies between
\ensuremath{\mathsf{φ}} ant \ensuremath{\mathsf{ψ}}, we want to run them in parallel.
What we want to do, in this scenario, is to compose individual steps
together to form bigger computations, typically called a
\emph{workflow}. In \cref{59} we show a simple,
albeit typical, workflow.
What would a {\sc{}dsl} to that effect look like? A first attempt may be to organise the {\sc{}dsl} around a monad \ensuremath{\mathsf{M}}, and define
the workflow of \cref{59} as follows:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{type}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{M}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathsf{workflowM}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{A}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{C}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\mathsf{z}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\mathsf{c}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\mathsf{x}}\<[E]{}\\
\>[2]{}{\mathsf{d}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} The problem with this monadic {\sc{}dsl}, however, is that it forces us
to fully sequentialise our workflow: φ runs before ψ, which runs
before ξ, which runs before ζ. This is wasteful: a glance at
\cref{59} makes it obvious that φ and ψ can be run in
parallel, as well as ξ and ζ, etc. Running independent steps in parallel may
be crucial to performance. But the monad abstraction makes
the inherent parallelism fundamentally unrecoverable.
To improve upon this state of affairs, one could attempt to leverage an
applicative functor structure that \ensuremath{\mathsf{M}} may exhibit. Accordingly
one can recover parallelism as follows:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{workflowA}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{A}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{C}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowA}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{,}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{<{\mkern-6mu}\${\mkern-6mu}>}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{<{\mkern-12mu}*{\mkern-12mu}>}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{,}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{<{\mkern-6mu}\${\mkern-6mu}>}\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{<{\mkern-12mu}*{\mkern-12mu}>}\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} This is
the style advocated, in the context of database query batching, by the Haxl library \citep{haxl_2014}. {\sc{}Ghc} even features an extension
(\ensuremath{\mathsf{ApplicativeDo}} \citep{marlow_desugaring_2016}) that automatically translates code written
using the \ensuremath{\mathbf{do}}-notation (as in \ensuremath{\mathsf{workflowM}}) to use applicative combinators for parallel commands as \ensuremath{\mathsf{workflowA}} does.
Unfortunately, even \ensuremath{\mathsf{workflowA}} doesn't fully expose all
the parallelism opportunities: \ensuremath{\mathsf{workflowA}} will run both φ and ψ in parallel, but it
will wait until both are completed before starting either ξ or ζ. But
only the result of φ is necessary to run ξ. If ψ takes more time to run than φ, then
this is wasteful.
One could try to rewrite the workflow as follows:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{workflowA'}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{A}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{C}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowA'}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{,}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{<{\mkern-6mu}\${\mkern-6mu}>}\mskip 3.0mu\mathsf{part}_{1}\mskip 3.0mu\mathnormal{<{\mkern-12mu}*{\mkern-12mu}>}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\mathsf{d}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathbf{where}\mskip 3.0mu\mathsf{part}_{1}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[3]{}{\mathsf{c}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\mathsf{x}}\<[E]{}\\
\>[3]{}{\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} Now ξ can start as soon as φ completes, and run in parallel with
ψ. But ζ has to wait for ξ to complete before it can start.
In sum, the combined Applicative-Monadic interface prevents \emph{any} implementation to fully expose the parallelism opportunities
inherent in the workflow.
Haskell offers another abstraction, called \emph{arrows} \citep{hughes_generalising_2000}, to model parallelism. This is how
\citet{pars_algebraic_2020} model workflows. In this style, our example
would look like:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Arrow}\mskip 3.0mu\mathsf{Workflow}}\<[E]{}\\
\>[1]{}{\mathsf{workflowArr}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{A}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{C}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowArr}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu}\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{*\mkern-4mu *\mkern-4mu *}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{>\mkern-3mu >\mkern-3mu >}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{arr}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{>\mkern-3mu >\mkern-3mu >}\allowbreak{}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{ξ}\mskip 3.0mu\allowbreak{}\mathnormal{*\mkern-4mu *\mkern-4mu *}\allowbreak{}\mskip 3.0mu\mathsf{ζ}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Or, using the built-in notation for arrows \citep{paterson_new_2001} \begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{workflowArr'}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{A}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{C}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowArr'}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{proc}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\mathnormal{\lefttail }\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\mathsf{z}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\mathnormal{\lefttail }\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\mathsf{c}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ξ}\mskip 3.0mu\mathnormal{\lefttail }\mskip 3.0mu\mathsf{x}}\<[E]{}\\
\>[2]{}{\mathsf{d}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{ζ}\mskip 3.0mu\mathnormal{\lefttail }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{z}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{returnA}\mskip 3.0mu\mathnormal{\lefttail }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} In
\ensuremath{\mathsf{workflowArr}}, like \ensuremath{\mathsf{workflowA}}, \ensuremath{\mathsf{ξ}} must run after
\ensuremath{\mathsf{ψ}}. It is also possible to write a version of the workflow
which, like \ensuremath{\mathsf{workflowA'}}, has \ensuremath{\mathsf{ξ}} running in parallel with
\ensuremath{\mathsf{ψ}}, but \ensuremath{\mathsf{ζ}} must run after \ensuremath{\mathsf{ξ}}.
In sum, This arrow-based {\sc{}dsl} suffers from the same problem as
the applicative {\sc{}dsl}: some over-sequentialisation is unavoidable.\footnote{ This problem with \ensuremath{\mathsf{Arrow}} can be attributed to the \ensuremath{\mathsf{arr}} combinator. Because \ensuremath{\mathsf{arr}} embeds a Haskell function, it is opaque and
thus prevents any efficient scheduling strategy between the morphisms connected to it.
Of course, for some specific \ensuremath{\mathsf{Arrow}} instances, one can provide the combinators
of an {\sc{}smc} and recover a better behaviour when using them instead of \ensuremath{\mathsf{arr}}. However this does not apply when using the arrow notation, because it always
desugars to calls to \ensuremath{\mathsf{arr}}.} Indeed, a situation just as this one, in
an industrial workflow, was one of the motivations behind this paper. It was
impossible to optimise resources usage in that workflow due to the
limitation of the arrow abstraction, wasting resources.
In contrast, if workflows are given an {\sc{}smc} instance, all the
parallelism of \cref{59} is exposed and can be exploited by
the workflow scheduler.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{Workflow}}\<[E]{}\\
\>[1]{}{\mathsf{workflowSMC}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{K}\mskip 3.0mu\mathsf{A}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{K}\mskip 3.0mu\mathsf{B}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{K}\mskip 3.0mu\mathsf{C}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{K}\mskip 3.0mu\mathsf{D}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{workflowSMC}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu}\>[3]{}{\mathsf{φ}\mskip 3.0mu\mathsf{a}\mskip 3.0mu}\>[4]{}{\mathnormal{\&}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[3]{}{\mathsf{ψ}\mskip 3.0mu\mathsf{b}\mskip 3.0mu}\>[4]{}{\mathnormal{\&}\mskip 3.0muλ\mskip 3.0mu\mathsf{z}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[3]{}{\mathsf{ξ}\mskip 3.0mu\mathsf{x}\mskip 3.0mu}\>[4]{}{\mathnormal{\&}\mskip 3.0muλ\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[3]{}{\mathsf{ζ}\mskip 3.0mu\mathsf{y}\mskip 3.0mu\mathsf{z}\mskip 3.0mu}\>[4]{}{\mathnormal{\&}\mskip 3.0muλ\mskip 3.0mu\mathsf{d}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} This version is syntactically close to the monadic
\ensuremath{\mathsf{workflowM}} implementation: the chief difference is the use of reverse application (\ensuremath{\mathnormal{\&}}) instead of the monadic bind. Yet, all the parallelism is retained!
A noteworthy element of this workflow {\sc{}dsl} is the presence of \ensuremath{\mathsf{K}} wrappers around the types \ensuremath{\mathsf{A}}, \ensuremath{\mathsf{B}}, \ensuremath{\mathsf{C}}, and
\ensuremath{\mathsf{D}}. The rationale is that synchronisation points will be at the
level of atomic types, and \ensuremath{\mathsf{K}} indicates such atomic types. That
is, if two sub-workflows are connected by the type \ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{b}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}},
then there can be no parallelisation between them. However, if they
are connected by \ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊗}\mskip 3.0mu}\ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{b}}, then parallelisation can be
discovered by the scheduler. (Another option to identify atomic types
would have to let \ensuremath{\mathnormal{⊗}} be different from the native Haskell
product.)
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15] Composable workflows are implemented as \ensuremath{\mathsf{IO}} actions connecting
two synchronisation \ensuremath{\mathsf{Point}}s. This means in particular that they
embed synchronisation primitives (which reside in \ensuremath{\mathsf{IO}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} in
Concurrent Haskell):
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\allowbreak{}\mathnormal{\{}\mskip 0.0mu\mathsf{taskRun}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{IO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{\}}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
These \ensuremath{\mathsf{Point}}s
must be at the level of base types (not products thereof) so that
synchronisation is as fine-grained as necessary. Hence, the
\ensuremath{\mathsf{Point}} type must be defined by structural induction over types,
such that the synchronisation point of a product is the product of
synchronisation points. For atomic types, synchronisation can be
implemented by any suitable mechanism provided by Haskell.
Here we have chosen the \ensuremath{\mathsf{MVar}}s of concurrent Haskell
\citep{peyton_jones_concurrent_1996}.
Such an induction can be implemented in Haskell by exploiting the
\ensuremath{\mathsf{Obj}} constraint over types. We let it be a type-class
\ensuremath{\mathsf{HasPoint}}, with separate instances for products and for base
types. The form of base type is required to be \ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{a}} with
\ensuremath{\mathbf{data}\mskip 3.0mu}\ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{a}}. If the type \ensuremath{\mathsf{Point}\mskip 3.0mu}\ensuremath{\mathsf{a}} is an associated
data type of the class \ensuremath{\mathsf{HasPoint}}, we get an inductive
definition as desired:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column[3em]{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{class}\mskip 3.0mu\mathsf{HasPoint}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{data}\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Type}}\<[E]{}\\
\>[2]{}{\mathsf{mkPoint}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{IO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{connect}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{IO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{HasPoint}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{HasPoint}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{HasPoint}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{data}\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Point}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Point}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{mkPoint}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{a}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{mkPoint}}\<[E]{}\\
\>[3]{}{\mathsf{b}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{mkPoint}}\<[E]{}\\
\>[3]{}{\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{connect}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a'}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{a'}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{b'}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{HasPoint}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{K}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{data}\mskip 3.0mu\mathsf{Point}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{K}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{Atom}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{MVar}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{mkPoint}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{Atom}\mskip 3.0mu\mathnormal{<{\mkern-6mu}\${\mkern-6mu}>}\mskip 3.0mu\mathsf{newEmptyMVar}}\<[E]{}\\
\>[2]{}{\mathsf{connect}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Atom}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Atom}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[4]{}{\mathnormal{=}\mskip 3.0mu\mathsf{forkIO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{takeMVar}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{>\mkern-3mu >\mkern-2mu =}\allowbreak{}\mskip 3.0mu\mathsf{putMVar}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{>\mkern-3mu >}\allowbreak{}\mskip 3.0mu\mathsf{return}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
The product \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is implemented by
running \ensuremath{\mathsf{f}} and \ensuremath{\mathsf{g}} in separate threads (forking one extra
thread). As described above, the composition \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} runs \ensuremath{\mathsf{f}} and \ensuremath{\mathsf{g}} in parallel, with a new synchronisation point in-between.
This means that if \ensuremath{\mathsf{f}} and \ensuremath{\mathsf{g}} are run as subtasks
with fine-grained dependencies: no unnecessary synchronisation happens. The \ensuremath{σ} morphism is
implemented by forwarding data as appropriate. The other ones (\ensuremath{α} , \ensuremath{ρ}) follow the
same pattern and are omitted for concision.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Category}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathbf{type}\mskip 3.0mu\mathsf{Obj}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{HasPoint}}\<[E]{}\\
\>[2]{}{\mathsf{id}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathsf{connect}}\<[E]{}\\
\>[2]{}{\mathsf{W}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{b}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{mkPoint}}\<[E]{}\\
\>[3]{}{\mathsf{forkIO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{g}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{>\mkern-3mu >}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{c}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\mathsf{Monoidal}\mskip 3.0mu\mathsf{Workflow}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{W}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathnormal{\_}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{forkIO}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[3]{}{\mathsf{g}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{d}}\<[E]{}\\
\>[2]{}{σ\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0mu}\>[5]{}{λ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{c}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{d}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{c}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{d}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{e}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{d}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{e}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathsf{f}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{d}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{e}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathbf{do}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{d}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{e}}\<[E]{}\\
\>[3]{}{\mathsf{connect}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathsf{f}}\<[E]{}\\
\>[2]{}{ρ\mskip 3.0mu}\>[4]{}{\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a'}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathnormal{\_}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{a'}}\<[E]{}\\
\>[2]{}{\bar{ρ}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{W}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt *}\allowbreak{}\mskip 3.0mu\mathnormal{\_}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{a'}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{connect}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{a'}}\<[E]{}\end{parray}}\end{list}
The above implementation is only a prototype for illustrative
purposes. For instance, it causes a synchronisation point to happen
even between every two connected atomic tasks. This excessive
synchronisation can induce significant overheads in some
situations. If this is a concern, one can
perform an analysis of the computation graph (say, by first
reifying it as a data type) and eliminate unneeded synchronisation
points. Additionally, applications may need some mechanism to deal with
errors or dead tasks.
A more fundamental limitation of the prototype resides in
synchronisation being of the simplest kind: connection between ports
is realised by simply forwarding data— always in the same
direction. Thus, another extension to the above prototype would be to
support more complex protocols (corresponding to other base types than
\ensuremath{\mathsf{K}\mskip 3.0mu}\ensuremath{\mathsf{a}}). For example, sequential data can be streamed, one element
at a time. Query-reply protocols are also a possibility. In this
light, we can now examine the question of whether tasks form a
cartesian category (in addition to symmetric monoidal). Because the \ensuremath{δ} morphism corresponds to multiplexing, \ensuremath{\mathsf{Workflow}}s can be enthused
with a cartesian structure only if all base protocols are
multiplexable in their input. (The condition that the unit type is the
unit for multiplexing would normally be satisfied as well.)
\end{mdframed}
\section{Implementation}\label{60}
In this section we reveal the implementation of our abstract type for
the {\sc{}api} from \cref{33}. Unfortunately it is not just a
matter of writing down the specification and calculating an
implementation: some amount of creativity is required. \emph{The key idea is
to represent ports as morphisms from the source (\ensuremath{\mathsf{r}}) to the
object of interest.} In terms of diagrams, they represent the portion of the diagram
which connect the source (on the left) to the port.
\begin{figure} \begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{10}{@{}>{}l<{}@{}}\column{11}{@{}>{}l<{}@{}}\column{12}{@{}>{}l<{}@{}}\column{13}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[8]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{I}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[6]{}{\mathsf{a}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{:\kern -3pt ∘ \kern -3pt:}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[9]{}{\mathsf{b}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[12]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[3]{}{\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[6]{}{\mathsf{a}\mskip 3.0mu\mathsf{c}}\<[E]{}\\
\>[2]{}{\mathsf{Embed}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[5]{}{\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[11]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{:\kern -3pt ▵ \kern -3pt:}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[7]{}{\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[10]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[13]{}{\mathsf{a}\mskip 3.0mu\mathsf{c}}\<[E]{}\\
\>[3]{}{\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[6]{}{\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{P}_{1}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[9]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\mathsf{P}_{2}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[4]{}{\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[9]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{b}}\<[E]{}\end{parray}}\end{list} \begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{instance}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[2]{}{\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu}\>[3]{}{\mathsf{Monoidal}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[4]{}{\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathbf{instance}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[2]{}{\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{Cartesian}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 0.0mu}\>[4]{}{\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} \caption{Definition of the free cartesian category
over an underlying category \ensuremath{\mathsf{k}}, whose morphisms it \ensuremath{\mathsf{Embed}}s.
\ensuremath{\mathsf{P}_{1}} and \ensuremath{\mathsf{P}_{2}} implement respectively \ensuremath{π₁} and \ensuremath{π₂}, while (:▵:) implements (▵). }\label{61}\end{figure}
Such morphisms may therefore discard part of the input. This means that
they are not morphisms of the {\sc{}smc} k, but rather morphisms of the free cartesian
category over \ensuremath{\mathsf{k}} (\ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}}, see
\cref{61}):
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu}\>[3]{}{\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[4]{}{\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[1]{}{\mathsf{fromP}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathsf{r}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[1]{}{\mathsf{fromP}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{f}}\<[E]{}\end{parray}}\end{list}
This free category is implemented as a data type with a constructor for each method in the
\ensuremath{\mathsf{Cartesian}} class, plus a constructor to \ensuremath{\mathsf{Embed}} generators from \ensuremath{\mathsf{k}}. A subtlety is
that, even though \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}} is used linearly everywhere in the
interface, the free cartesian representation that it embeds can be
duplicated at will. In Linear Haskell this is subtly noted by using
using the \ensuremath{\mathnormal{\rightarrow }} arrow instead of \ensuremath{\mathnormal{⊸}} in the declaration of
\ensuremath{\mathsf{P}} constructor. Consequently, when doing \emph{encode φ}, the morphism φ must be
available \emph{unrestricted}, not just linearly. This is not a problem in practice: even if
data cannot be duplicated, closed functions which manipulate such data
can be.
With these technical bits out of the way, let us return to the main
representational idea: a port for the object \emph{a} is a free
cartesian morphism from \ensuremath{\mathsf{r}} to \ensuremath{\mathsf{a}}. Accordingly, the
equality on ports is the usual equality of free cartesian
categories, but quotiented by equations arising from \ensuremath{\mathsf{Embed}} being an
{\sc{}smc} homomorphism:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{Embed}\mskip 3.0mu\mathsf{id}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu}\>[3]{}{\mathsf{id}}\<[E]{}\\
\>[1]{}{\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu}\>[3]{}{\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}}\<[E]{}\\
\>[1]{}{\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu}\>[3]{}{\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}}\<[E]{}\end{parray}}\end{list} etc.
Because \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}} is a morphism from \ensuremath{\mathsf{r}} to \ensuremath{\mathsf{a}}, the
encoding from \ensuremath{\mathsf{a}\mskip 0.0mu}\ensuremath{\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu}\ensuremath{\mathsf{b}} to \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}} can be
thought of as a transformation to continuation-passing-style ({\sc{}cps}), albeit
reversed--- perhaps a ``prefix-passing-style''
transformation. For non-linear functions, the encoding
would be given by the Yoneda lemma \citep{boisseau_what_2018} composed with embedding in the free
cartesian category. The implementation of
the combinators of the interface can then follow the usual (cartesian)
categorical semantics of product and unit types:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{unit}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{P}\mskip 3.0muε}\<[E]{}\\
\>[1]{}{\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
The most challenging part of the implementation is \ensuremath{\mathsf{decode}},
which converts \emph{linear} functions between ports to morphisms in
\ensuremath{\mathsf{k}}.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{decode}\mskip 3.0mu\mathsf{f}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{extract}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\mathsf{extract}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu∀\mskip 3.0mu\mathsf{r}\mskip 1.0mu.\mskip 3.0mu}\>[4]{}{\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathsf{extract}\mskip 3.0mu\mathsf{f}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{fromP}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
As usual in {\sc{}cps}, the first step is to complete the
computation by passing the identity morphism (\ensuremath{\mathsf{extract}}). Then
the obtained \ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}} morphism is projected to
the {\sc{}smc} k, which it carries. The next step is \ensuremath{\mathsf{reduce}}, which
projects the free cartesian representation to a free
{\sc{}smc} representation, referred hereafter as \ensuremath{\mathsf{FreeSMC}}. This is the most difficult
operation, and we return to it shortly.
The \ensuremath{\mathsf{evalM}} part maps a morphism of \ensuremath{\mathsf{FreeSMC}\mskip 3.0mu}\ensuremath{\mathsf{k}} back to a
morphism in \ensuremath{\mathsf{k}} ─it is the natural inductive definition on the
structure of free-{\sc{}smc} morphisms.
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{I}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[4]{}{\mathsf{a}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\mathsf{Embed}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[2]{}{\mathsf{A}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{A'}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{S}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{U}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{U'}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{:\kern -3pt ∘ \kern -3pt:}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}}\<[E]{}\\
\>[3]{}{\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{c}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{:\kern -3pt × \kern -3pt:}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{c}\mskip 3.0mu\mathsf{d}}\<[E]{}\\
\>[3]{}{\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{d}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
The equality for \ensuremath{\mathsf{FreeSMC}} is quotiented by the same laws regarding \ensuremath{\mathsf{Embed}} as the \ensuremath{\mathsf{FreeCartesian}} representation.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[3]{}{\mathsf{Monoidal}\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\Rightarrow }\mskip 3.0mu\mathsf{FreeSMC}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{a}\mskip 0.0mu\overset{\mathsf{k}}{\leadsto}\mskip 0.0mu\mathsf{b}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{I}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{id}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathnormal{:\kern -3pt × \kern -3pt:}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{evalM}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{evalM}\mskip 3.0mu\mathsf{g}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt ∘ \kern -3pt:}\allowbreak{}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{evalM}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{evalM}\mskip 3.0mu\mathsf{g}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{A}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0muα}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{A'}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\bar{α}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{S}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0muσ}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{U}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0muρ}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\mathsf{U'}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\bar{ρ}}\<[E]{}\\
\>[1]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ϕ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[2]{}{\mathnormal{=}\mskip 3.0mu\mathsf{ϕ}}\<[E]{}\end{parray}}\end{list} \end{mdframed}
\subsection{Proving the implementation correct}\label{62}
Even though we have not fully described the implementation yet, we know
enough to prove it correct. (Indeed, the only remaining uncertainty is
in the implementation of \ensuremath{\mathsf{reduce}}, but we already have specified that it must not
change the meaning of morphisms, only project them from free cartesian
to free {\sc{}smc} representations.)
To begin, we show that \ensuremath{\mathsf{decode}} respects the equality on ports.
Indeed, due to this equality being quotiented by \ensuremath{\mathsf{Embed}} being an
{\sc{}smc}-homomorphism, a bit of reasoning is necessary to prove that
functions over ports which are extensionally equal (with the above
equality for outputs) are decoded to equal morphisms:
\begin{lemma}{}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{\rightarrow }\mskip 3.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{g}}\label{63}\end{lemma}\begin{proof}
The idea is that \ensuremath{\mathsf{decode}} subjects all \ensuremath{\mathsf{FreeCartesian}} morphisms to \ensuremath{\mathsf{evalM}}. Because \ensuremath{\mathsf{evalM}} maps representations that are equal
under the \ensuremath{\mathsf{Embed}} homomorphism equations to equal morphisms
in \ensuremath{\mathsf{k}}, we have our result.
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]Formally, the implication is proven by a transitive application of number of congruences:
\begin{align*}&\ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathsf{x}}&\\\ensuremath{\mathnormal{\rightarrow }}&\emph{}&\\&\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}&\\\ensuremath{\mathnormal{\rightarrow }}&\emph{ by congruence}&\\&\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}&\\\ensuremath{\mathnormal{\rightarrow }}& by \cref{64}\\&\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}&\\\ensuremath{\mathnormal{\rightarrow }}&\emph{ by def.}&\\&\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{extract}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{extract}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}&\\\ensuremath{\mathnormal{\rightarrow }}&\emph{ by def.}&\\&\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{decode}\mskip 3.0mu}\ensuremath{\mathsf{g}}&\end{align*}\end{mdframed}
\end{proof}\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]The critical step, which is taken care of by the following lemma, is necessary because we go from an equality on a type where equality is quotiented, to a type where equality is not quotiented.\begin{lemma}{}if \ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{y}} then \ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\mathsf{y}}\label{64}\end{lemma}\begin{proof} We need to
show that the terms which we deem equal by quotienting the equality of
\ensuremath{\mathsf{FreeCartesian}} are mapped to equal terms by \ensuremath{\mathsf{evalM}}. This
is done case by case, and a simple matter of expanding definitions. We
show two cases here: the others follow the same patterns.
\begin{itemize}\item{}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\mathsf{Id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\item{}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\allowbreak{}=\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}\end{itemize} \end{proof}\end{mdframed}
We can then prove all the laws given in \cref{35}.
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]\begin{theorem}{}The implementation respects the laws stated in \cref{35}.\label{65}\end{theorem}\begin{proof}Each case can be proven by equational reasoning. (In these reduction steps we assume that the \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{r}} type forms a cartesian category, obtained by lifting the same structure from \ensuremath{\mathsf{FreeCartesian}}.
This simplification means that we can skip many uninformative conversions between the two types using \ensuremath{\mathsf{P}} and \ensuremath{\mathsf{fromP}}.)\begin{itemize}\item{}split/merge\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by cartesian category properties}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}merge/split\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{split}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathbf{let}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathbf{in}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{y}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by evaluation}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by cartestian laws}}}\<[E]{}\\
\>[2]{}{\mathsf{f}}\<[E]{}\end{parray}}\end{list}\item{}decode/encode\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column[4em]{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{decode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{decode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{extract}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[5]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by β-reduction}}}\<[E]{}\\
\>[2]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by property of host language composition}}}\<[E]{}\\
\>[2]{}{\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by evalM ∘ reduce ∘ Embed = id}}}\<[E]{}\\
\>[2]{}{\mathsf{f}}\<[E]{}\end{parray}}\end{list}\item{}encode/decode\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[3]{}{\mathsf{encode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{decode}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by def of encode}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{decode}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by def of decode}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{evalM}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{reduce}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{fromP}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by Embed ∘ evalM ∘ reduce = id}}}\<[E]{}\\
\>[3]{}{\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by Covariant Yoneda Lemma (naturality of f)}}}\<[E]{}\\
\>[2]{}{\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}} The step one way to see that \ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{reduce}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{id}} is to notice that
\ensuremath{\mathsf{reduce}} does not change the meaning of morphisms, only their representation, from free cartesian to free {\sc{}smc}.
The composition
\ensuremath{\mathsf{Embed}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{evalM}} does the opposite conversion. We have equality because free {\sc{}smc} terms are quotiented by \ensuremath{\mathsf{Embed}} being an homomorphism.
\end{list}\item{}encode/∘\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by Embed property}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of encode}}}\<[E]{}\\
\>[2]{}{\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of encode}}}\<[E]{}\\
\>[2]{}{\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ∘}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{encode}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/id\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0mu\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of encode}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by Embed property}}}\<[E]{}\\
\>[2]{}{\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\mathsf{f}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/merge\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by assumption on Embed}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by properties of free cartesian categories}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{encode}\mskip 3.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/ρ\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0muρ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of encode}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0muρ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of unitor for cartesian categories}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{id}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muε\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by property of ▵}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muε\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by property of ε}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muε\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definitoin of merge}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{unit}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/ρ'\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0mu\bar{ρ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{unit}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\bar{ρ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muε\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of unitor for cartesian categories}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muε\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by properties of cartesian categories}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\mathsf{a}}\<[E]{}\end{parray}}\end{list}\item{}encode/σ\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0muσ\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0muσ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by assumption on Embed}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muσ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by properties of free cartesian categories}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/α\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0muα\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[5]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0muα\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by assumption on Embed}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by properties of free cartesian categories}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[5]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}encode/α'\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\mathsf{encode}\mskip 3.0mu\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[5]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by assumption on Embed}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{b}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[4]{}{\quad{}\text{\textit{by properties of free cartesian categories}}}\<[E]{}\\
\>[3]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[5]{}{\quad{}\text{\textit{by def}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{a}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 2.0mu\mathnormal{\fatsemi }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{c}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\end{itemize}\end{proof}\end{mdframed}
\subsection{Characterisation of the domain of \ensuremath{\mathsf{reduce}}.}\label{66}
As mentioned previously, the bulk of the work is to
define (and prove correct) the \ensuremath{\mathsf{reduce}} function, which converts
a \ensuremath{\mathsf{FreeCartesian}} representation into a \ensuremath{\mathsf{FreeSMC}}. This
\ensuremath{\mathsf{reduce}} function is partial: if its input is not suitable (say if
an input is discarded) then there is no {\sc{}smc} representation. Fortunately,
we only need to deal with representations which have been constructed
using the port interface, namely linear functions built with \ensuremath{\mathsf{encode}},
\ensuremath{\mathsf{merge}}, \ensuremath{\mathsf{split}} and \ensuremath{\mathsf{unit}}.
Our plan is then to
1. prove that the \ensuremath{\mathsf{extract}}ed morphisms are indeed reducible to
the {\sc{}smc} interface, and 2. show how to carry it out algorithmically.
We start by addressing the first problem, and this will put us firmly
on track to address the second one.
\begin{definition}{}A representation \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}} is called linear if it
is it defined using only the {\sc{}smc} subset of the cartesian structure.\label{67}\end{definition}
\begin{definition}{}A representation \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}} is called \emph{protolinear} iff it is equivalent, according to the
laws of a cartesian category, to a linear representation \ensuremath{\mathsf{h}}.\label{68}\end{definition}
\begin{theorem}{}For every function \ensuremath{\mathsf{h}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}}, the morphism \ensuremath{\mathsf{extract}\mskip 3.0mu}\ensuremath{\mathsf{h}} is a
protolinear representation.\label{69}\end{theorem}\begin{proof}
The idea of the proof is to do an induction on the structure of
\ensuremath{\mathsf{h}}. But in general a computational prefix \ensuremath{\mathsf{f}} of \ensuremath{\mathsf{h}} has
several outputs. That is, the type of \ensuremath{\mathsf{f}} has the form \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 0.0mu}\ensuremath{\bigotimes_{i}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{t}_{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}, where where the big circled product
operator is a multary version of the monoidal product with right
associativity. The components of such products represent
ports which are available after the prefix \ensuremath{\mathsf{f}} is run (but \ensuremath{\mathsf{h}} is not complete).
Thus, to obtain a protolinear function from \ensuremath{\mathsf{f}},
its outputs must be merged, by a generalised fork (▵) function,
written \ensuremath{\bigtriangleup}, and defined as follows:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\bigtriangleup\mskip 3.0mu\mathnormal{::}\mskip 0.0mu\bigotimes_{i}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{t}_{i}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{P}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\bigotimes_{i}\mskip 3.0mu\mathsf{t}_{i}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f₁}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{…}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{fₙ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f₁}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{…}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{fₙ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
When there is a single output port, \ensuremath{\bigtriangleup} is the identity, and
thus this theorem is a corollary of the generalised form,
\cref{70}, for a product with one element.
\end{proof}
\begin{lemma}{}If \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 0.0mu}\ensuremath{\bigotimes_{i}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{t}_{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}, then \ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is a protolinear
representation.\label{70}\end{lemma}\begin{proof} First, we need to choose a convenient representation of the function
\ensuremath{\mathsf{f}} itself. A first idea could be to use the term representation of
Haskell. This would however make for a tedious proof, and to fit our
theme, we use a categorical representation for Haskell functions as well.
For this purpose, we make the
simplifying assumption that functions of the type \ensuremath{∀\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}} can be themselves represented as morphisms in another free {\sc{}smc}, the
category of linear functions of Haskell.\footnote{To be fair, this property would only be true of
an idealised language with linear types (\cref{32}). For
an actual programming language, exceptions, non-termination,
etc. should be taken into account. In practice, if the function of
type \ensuremath{\mathnormal{∀}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}} diverges, the \ensuremath{\mathsf{reduce}} function
also diverges. This means that we are limited to finite quantum circuits or workflows.}
Additionally, because the type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{b}} is abstract, we know
that the only possible generators for this {\sc{}smc} are the primitives
\ensuremath{\mathsf{unit}}, \ensuremath{\mathsf{split}}, \ensuremath{\mathsf{merge}} and \ensuremath{\mathsf{encode}}:
we can assume that other constructions are reduced away by the
Haskell evaluator.
Furthermore, this representation can be assumed without loss of
generality to take the form of a composition \ensuremath{\mathsf{s}_{1}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{⋯}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{sₙ}}. (This
corresponds to cutting the corresponding diagram in vertical slices \ensuremath{\mathsf{sᵢ}},
each containing a single generator. By topology-preserving
transformations, it is always possible to move generators so that they
fall in separate slices.)
In fact, without loss of generality, we assume that each slice
\ensuremath{\mathsf{s}} has either of the following forms: 1. \ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}} 2. \ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{split}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} 3. \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{merge}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}} 4. \ensuremath{λ\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{\rightarrow }\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{unit}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}. That is, we assume that the generators act on the
first component of the slice. (The split and merge cases are composed
with associators to preserve the property that the multary monoidal
products on the input and output are right-associated.) We can make this
assumption because we treat permutations over the monoidal product as
separate slices (Of a separate form, referred to as 5. below). Such a slice does not contain any generator;
rather its role is to stage the next variable(s) to be acted upon by
the next generator.
We can now proceed with the induction. The base case reduces to
protolinearity of \ensuremath{\mathsf{id}}, which is obvious. For the induction case,
we assume that \ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is protolinear, and show that so is
\ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{s}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}, for every function \ensuremath{\mathsf{f}} of type
\ensuremath{∀\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 1.0mu}\ensuremath{.\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 0.0mu}\ensuremath{\bigotimes_{i}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{t}_{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}, and every possible slice
\ensuremath{\mathsf{s}}.
Let us calculate a reduced form for \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{s}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}} for each case:
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]\begin{itemize}\item{}Let \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{encode}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}}.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ∘}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by expansion of pairs}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of ×}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of mergeA}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{encode}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of encode}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{fromP}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by property of ×/▵}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by definition of mergeA}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by contraction of pairs}}}\<[E]{}\\
\>[2]{}{\mathsf{P}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} \item{}Let \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{α\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{split}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ∘}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu}\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[8]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by pair expansion}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu}\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[8]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ×}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu}\>[5]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{split}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of split}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}}\<[E]{}\\
\>[6]{}{π₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of assoc}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[7]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}}\<[E]{}\\
\>[7]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of assoc}}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}}\<[E]{}\\
\>[4]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by properties of cartesian categories}}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by contraction of pair}}}\<[E]{}\\
\>[2]{}{α\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}\item{}Let \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{merge}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\bar{α}}.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ∘}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by expansion of pairs, def of assoc.}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}}\<[E]{}\\
\>[4]{}{π₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ×}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{merge}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of merge}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by property of ▵/assoc}}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by contraction of pairs}}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muπ₁\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{,}\mskip 3.0muπ₂\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by contraction of pairs}}}\<[E]{}\\
\>[2]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} \item{}Let \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{λ\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 3.0mu}\ensuremath{\mathnormal{\rightarrow }\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{unit}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{x}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{unit}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by def of ∘}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{unit}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by def of unit}}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{ε}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by def of mergeA}}}\<[E]{}\\
\>[2]{}{ε\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by property of ε}}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0muε\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by property of swap}}}\<[E]{}\\
\>[2]{}{σ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{id}\mskip 3.0mu\mathnormal{▵}\mskip 3.0muε\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[2]{}{\quad{}\text{\textit{by definition of unitor}}}\<[E]{}\\
\>[2]{}{σ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0muρ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list} \item{}Let \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{θ}} be a permutation.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{θ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}\mskip 0.0mu}\>[3]{}{\quad{}\text{\textit{by def of ∘ }}}\<[E]{}\\
\>[2]{}{\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{θ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[1]{}{\allowbreak{}=\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{θ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\bigtriangleup\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
The last step is justified because θ is representable in any symmetric monoidal category.
Furthermore, because \ensuremath{\bigtriangleup} respects the structure of products, it does not
matter if θ is applied before or after \ensuremath{\bigtriangleup}.
\end{itemize}\end{mdframed}
Recall that the induction hypothesis is that \ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is
protolinear. This observation alone concludes the argument for the
\ensuremath{\mathsf{split}}, \ensuremath{\mathsf{merge}} and \ensuremath{\mathsf{unit}} cases. For the other two cases, it suffices to see
that every permutation θ and every generator φ is linear, and we
have protolinearity for the composition.\end{proof}
\subsection{An algorithm for \ensuremath{\mathsf{reduce}}}\label{71}
\begin{figure}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-8.0087pt)--(-9.6000pt,-8.0087pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,24.5350pt)--(37.3300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,0.0000pt)--(37.3300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,-29.5350pt)--(37.3300pt,-29.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)--(0.0000pt,11.0175pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-27.0350pt)--(0.0000pt,-27.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,24.5350pt)--(30.3300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,19.5350pt)--(30.3300pt,19.5350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,24.5350pt)--(30.3300pt,24.5350pt)--(30.3300pt,19.5350pt)--(30.3300pt,19.5350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.3300pt,27.5350pt)--(33.3300pt,27.5350pt)--(33.3300pt,16.5350pt)--(27.3300pt,16.5350pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](31.3300pt,19.5350pt)..controls(31.3300pt,20.0873pt)and(30.8823pt,20.5350pt)..(30.3300pt,20.5350pt)..controls(29.7777pt,20.5350pt)and(29.3300pt,20.0873pt)..(29.3300pt,19.5350pt)..controls(29.3300pt,18.9827pt)and(29.7777pt,18.5350pt)..(30.3300pt,18.5350pt)..controls(30.8823pt,18.5350pt)and(31.3300pt,18.9827pt)..(31.3300pt,19.5350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,24.5350pt)--(30.3300pt,24.5350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6000pt,26.7275pt)--(19.3300pt,26.7275pt)--(19.3300pt,17.3425pt)--(13.6000pt,17.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,26.7275pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{72}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,24.5350pt)--(23.3300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,19.5350pt)--(23.3300pt,19.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](17.6200pt,3.3425pt)--(22.3100pt,3.3425pt)--(22.3100pt,-3.3425pt)--(17.6200pt,-3.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (17.6200pt,3.3425pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{73}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6200pt,7.3425pt)--(26.3100pt,7.3425pt)--(26.3100pt,-7.3425pt)--(13.6200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6200pt,7.3425pt)--(26.3100pt,7.3425pt)--(26.3100pt,-7.3425pt)--(13.6200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,0.0000pt)--(26.3100pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(13.6200pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,14.0175pt)--(3.0000pt,14.0175pt)--(3.0000pt,8.0175pt)--(-3.0000pt,8.0175pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,11.0175pt)..controls(1.0000pt,11.5698pt)and(0.5523pt,12.0175pt)..(0.0000pt,12.0175pt)..controls(-0.5523pt,12.0175pt)and(-1.0000pt,11.5698pt)..(-1.0000pt,11.0175pt)..controls(-1.0000pt,10.4652pt)and(-0.5523pt,10.0175pt)..(0.0000pt,10.0175pt)..controls(0.5523pt,10.0175pt)and(1.0000pt,10.4652pt)..(1.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,17.9457pt)and(1.6000pt,22.0350pt)..(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,4.0893pt)and(1.6000pt,0.0000pt)..(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-24.5350pt)--(20.7300pt,-24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-29.5350pt)--(20.7300pt,-29.5350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-24.5350pt)--(20.7300pt,-24.5350pt)--(20.7300pt,-29.5350pt)--(20.7300pt,-29.5350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](17.7300pt,-21.5350pt)--(23.7300pt,-21.5350pt)--(23.7300pt,-32.5350pt)--(17.7300pt,-32.5350pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.7300pt,-24.5350pt)..controls(21.7300pt,-23.9827pt)and(21.2823pt,-23.5350pt)..(20.7300pt,-23.5350pt)..controls(20.1777pt,-23.5350pt)and(19.7300pt,-23.9827pt)..(19.7300pt,-24.5350pt)..controls(19.7300pt,-25.0873pt)and(20.1777pt,-25.5350pt)..(20.7300pt,-25.5350pt)..controls(21.2823pt,-25.5350pt)and(21.7300pt,-25.0873pt)..(21.7300pt,-24.5350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-29.5350pt)--(30.3300pt,-29.5350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](4.0000pt,-22.3425pt)--(9.7300pt,-22.3425pt)--(9.7300pt,-31.7275pt)--(4.0000pt,-31.7275pt)--cycle;
\node[anchor=north west,inner sep=0] at (4.0000pt,-22.3425pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{74}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,-18.3425pt)--(13.7300pt,-18.3425pt)--(13.7300pt,-35.7275pt)--(0.0000pt,-35.7275pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,-18.3425pt)--(13.7300pt,-18.3425pt)--(13.7300pt,-35.7275pt)--(0.0000pt,-35.7275pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-24.5350pt)--(13.7300pt,-24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-29.5350pt)--(13.7300pt,-29.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-27.0350pt)--(0.0000pt,-27.0350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-8.0087pt)--(-9.6000pt,-8.0087pt)--(-9.6000pt,-8.0087pt)--(-9.6000pt,-8.0087pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-5.0087pt)--(-6.6000pt,-5.0087pt)--(-6.6000pt,-11.0087pt)--(-12.6000pt,-11.0087pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-8.0087pt)..controls(-8.6000pt,-7.4565pt)and(-9.0477pt,-7.0087pt)..(-9.6000pt,-7.0087pt)..controls(-10.1523pt,-7.0087pt)and(-10.6000pt,-7.4565pt)..(-10.6000pt,-8.0087pt)..controls(-10.6000pt,-8.5610pt)and(-10.1523pt,-9.0087pt)..(-9.6000pt,-9.0087pt)..controls(-9.0477pt,-9.0087pt)and(-8.6000pt,-8.5610pt)..(-8.6000pt,-8.0087pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-8.0087pt)..controls(-5.6000pt,-1.0805pt)and(-8.0000pt,11.0175pt)..(0.0000pt,11.0175pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-8.0087pt)..controls(-5.6000pt,-14.9369pt)and(-8.0000pt,-27.0350pt)..(0.0000pt,-27.0350pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.2000pt,-37.9812pt)--(-19.2000pt,-37.9812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.5300pt,0.0000pt)--(49.5300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.5300pt,-5.0000pt)--(49.5300pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.5300pt,-50.0775pt)--(49.5300pt,-50.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(20.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-28.3850pt)--(20.7300pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-61.7700pt)--(20.7300pt,-61.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,0.0000pt)--(30.3300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,-33.3850pt)--(30.3300pt,-33.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,-61.7700pt)--(30.3300pt,-61.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,0.0000pt)--(39.9300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,-45.0775pt)--(39.9300pt,-45.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,-50.0775pt)--(39.9300pt,-50.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,0.0000pt)--(49.5300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,-45.0775pt)..controls(47.9300pt,-45.0775pt)and(41.5300pt,-5.0000pt)..(49.5300pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](39.9300pt,-50.0775pt)--(49.5300pt,-50.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,0.0000pt)--(39.9300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,-33.3850pt)..controls(38.3300pt,-33.3850pt)and(31.9300pt,-50.0775pt)..(39.9300pt,-50.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.3300pt,-61.7700pt)..controls(38.3300pt,-61.7700pt)and(31.9300pt,-45.0775pt)..(39.9300pt,-45.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(30.3300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-28.3850pt)..controls(28.7300pt,-28.3850pt)and(22.3300pt,-33.3850pt)..(30.3300pt,-33.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-61.7700pt)--(30.3300pt,-61.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-14.1925pt)--(-9.6000pt,-14.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-61.7700pt)--(-9.6000pt,-61.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-25.8850pt)--(0.0000pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,0.0000pt)--(20.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-5.0000pt)--(20.7300pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(20.7300pt,0.0000pt)--(20.7300pt,-5.0000pt)--(20.7300pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](17.7300pt,3.0000pt)--(23.7300pt,3.0000pt)--(23.7300pt,-8.0000pt)--(17.7300pt,-8.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.7300pt,-5.0000pt)..controls(21.7300pt,-4.4477pt)and(21.2823pt,-4.0000pt)..(20.7300pt,-4.0000pt)..controls(20.1777pt,-4.0000pt)and(19.7300pt,-4.4477pt)..(19.7300pt,-5.0000pt)..controls(19.7300pt,-5.5523pt)and(20.1777pt,-6.0000pt)..(20.7300pt,-6.0000pt)..controls(21.2823pt,-6.0000pt)and(21.7300pt,-5.5523pt)..(21.7300pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,0.0000pt)--(20.7300pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](4.0000pt,2.1925pt)--(9.7300pt,2.1925pt)--(9.7300pt,-7.1925pt)--(4.0000pt,-7.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (4.0000pt,2.1925pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{75}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,6.1925pt)--(13.7300pt,6.1925pt)--(13.7300pt,-11.1925pt)--(0.0000pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,6.1925pt)--(13.7300pt,6.1925pt)--(13.7300pt,-11.1925pt)--(0.0000pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,0.0000pt)--(13.7300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-5.0000pt)--(13.7300pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-23.3850pt)--(20.7300pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-28.3850pt)--(20.7300pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-23.3850pt)--(20.7300pt,-23.3850pt)--(20.7300pt,-28.3850pt)--(20.7300pt,-28.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](17.7300pt,-20.3850pt)--(23.7300pt,-20.3850pt)--(23.7300pt,-31.3850pt)--(17.7300pt,-31.3850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](21.7300pt,-23.3850pt)..controls(21.7300pt,-22.8327pt)and(21.2823pt,-22.3850pt)..(20.7300pt,-22.3850pt)..controls(20.1777pt,-22.3850pt)and(19.7300pt,-22.8327pt)..(19.7300pt,-23.3850pt)..controls(19.7300pt,-23.9373pt)and(20.1777pt,-24.3850pt)..(20.7300pt,-24.3850pt)..controls(21.2823pt,-24.3850pt)and(21.7300pt,-23.9373pt)..(21.7300pt,-23.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-28.3850pt)--(20.7300pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](4.0000pt,-21.1925pt)--(9.7300pt,-21.1925pt)--(9.7300pt,-30.5775pt)--(4.0000pt,-30.5775pt)--cycle;
\node[anchor=north west,inner sep=0] at (4.0000pt,-21.1925pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{76}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,-17.1925pt)--(13.7300pt,-17.1925pt)--(13.7300pt,-34.5775pt)--(0.0000pt,-34.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](0.0000pt,-17.1925pt)--(13.7300pt,-17.1925pt)--(13.7300pt,-34.5775pt)--(0.0000pt,-34.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-23.3850pt)--(13.7300pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.7300pt,-28.3850pt)--(13.7300pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-25.8850pt)--(0.0000pt,-25.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-14.1925pt)--(-9.6000pt,-14.1925pt)--(-9.6000pt,-14.1925pt)--(-9.6000pt,-14.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-11.1925pt)--(-6.6000pt,-11.1925pt)--(-6.6000pt,-17.1925pt)--(-12.6000pt,-17.1925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-14.1925pt)..controls(-8.6000pt,-13.6402pt)and(-9.0477pt,-13.1925pt)..(-9.6000pt,-13.1925pt)..controls(-10.1523pt,-13.1925pt)and(-10.6000pt,-13.6402pt)..(-10.6000pt,-14.1925pt)..controls(-10.6000pt,-14.7448pt)and(-10.1523pt,-15.1925pt)..(-9.6000pt,-15.1925pt)..controls(-9.0477pt,-15.1925pt)and(-8.6000pt,-14.7448pt)..(-8.6000pt,-14.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-14.1925pt)..controls(-5.6000pt,-7.2643pt)and(-8.0000pt,-2.5000pt)..(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-14.1925pt)..controls(-5.6000pt,-21.1207pt)and(-8.0000pt,-25.8850pt)..(0.0000pt,-25.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](3.2200pt,-58.4275pt)--(7.9100pt,-58.4275pt)--(7.9100pt,-65.1124pt)--(3.2200pt,-65.1124pt)--cycle;
\node[anchor=north west,inner sep=0] at (3.2200pt,-58.4275pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{77}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-0.7800pt,-54.4275pt)--(11.9100pt,-54.4275pt)--(11.9100pt,-69.1124pt)--(-0.7800pt,-69.1124pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-0.7800pt,-54.4275pt)--(11.9100pt,-54.4275pt)--(11.9100pt,-69.1124pt)--(-0.7800pt,-69.1124pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.7300pt,-61.7700pt)--(11.9100pt,-61.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-61.7700pt)--(-0.7800pt,-61.7700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-37.9812pt)--(-19.2000pt,-37.9812pt)--(-19.2000pt,-37.9812pt)--(-19.2000pt,-37.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,-34.9812pt)--(-16.2000pt,-34.9812pt)--(-16.2000pt,-40.9812pt)--(-22.2000pt,-40.9812pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,-37.9812pt)..controls(-18.2000pt,-37.4289pt)and(-18.6477pt,-36.9812pt)..(-19.2000pt,-36.9812pt)..controls(-19.7523pt,-36.9812pt)and(-20.2000pt,-37.4289pt)..(-20.2000pt,-37.9812pt)..controls(-20.2000pt,-38.5335pt)and(-19.7523pt,-38.9812pt)..(-19.2000pt,-38.9812pt)..controls(-18.6477pt,-38.9812pt)and(-18.2000pt,-38.5335pt)..(-18.2000pt,-37.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-37.9812pt)..controls(-15.2000pt,-31.0530pt)and(-17.6000pt,-14.1925pt)..(-9.6000pt,-14.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-37.9812pt)..controls(-15.2000pt,-44.9094pt)and(-17.6000pt,-61.7700pt)..(-9.6000pt,-61.7700pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-46.9300pt,-27.5000pt)--(-39.9300pt,-27.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8000pt,0.0000pt)--(28.8000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8000pt,-5.0000pt)--(28.8000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8000pt,-45.0000pt)--(28.8000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-20.0000pt)--(0.0000pt,-20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-45.0000pt)--(0.0000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-25.0000pt)--(9.6000pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-45.0000pt)--(9.6000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,0.0000pt)--(19.2000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-25.0000pt)--(19.2000pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-45.0000pt)--(19.2000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,0.0000pt)--(28.8000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-25.0000pt)..controls(27.2000pt,-25.0000pt)and(20.8000pt,-5.0000pt)..(28.8000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-45.0000pt)--(28.8000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(19.2000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-25.0000pt)..controls(17.6000pt,-25.0000pt)and(11.2000pt,-45.0000pt)..(19.2000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-45.0000pt)..controls(17.6000pt,-45.0000pt)and(11.2000pt,-25.0000pt)..(19.2000pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-20.0000pt)..controls(8.0000pt,-20.0000pt)and(1.6000pt,-25.0000pt)..(9.6000pt,-25.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-45.0000pt)--(9.6000pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.3300pt,-10.0000pt)--(-30.3300pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.3300pt,-45.0000pt)--(-30.3300pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-7.5000pt)--(-9.6000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-12.5000pt)--(-9.6000pt,-12.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-5.0000pt)--(0.0000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-20.0000pt)--(0.0000pt,-20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,-5.0000pt)--(0.0000pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,3.0000pt)--(3.0000pt,3.0000pt)--(3.0000pt,-8.0000pt)--(-3.0000pt,-8.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-5.0000pt)..controls(1.0000pt,-4.4477pt)and(0.5523pt,-4.0000pt)..(0.0000pt,-4.0000pt)..controls(-0.5523pt,-4.0000pt)and(-1.0000pt,-4.4477pt)..(-1.0000pt,-5.0000pt)..controls(-1.0000pt,-5.5523pt)and(-0.5523pt,-6.0000pt)..(0.0000pt,-6.0000pt)..controls(0.5523pt,-6.0000pt)and(1.0000pt,-5.5523pt)..(1.0000pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt)--(0.0000pt,-20.0000pt)--(0.0000pt,-20.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-12.0000pt)--(3.0000pt,-12.0000pt)--(3.0000pt,-23.0000pt)--(-3.0000pt,-23.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-15.0000pt)..controls(1.0000pt,-14.4477pt)and(0.5523pt,-14.0000pt)..(0.0000pt,-14.0000pt)..controls(-0.5523pt,-14.0000pt)and(-1.0000pt,-14.4477pt)..(-1.0000pt,-15.0000pt)..controls(-1.0000pt,-15.5523pt)and(-0.5523pt,-16.0000pt)..(0.0000pt,-16.0000pt)..controls(0.5523pt,-16.0000pt)and(1.0000pt,-15.5523pt)..(1.0000pt,-15.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-20.0000pt)--(0.0000pt,-20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-7.5000pt)--(-9.6000pt,-7.5000pt)--(-9.6000pt,-12.5000pt)--(-9.6000pt,-12.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-4.5000pt)--(-6.6000pt,-4.5000pt)--(-6.6000pt,-15.5000pt)--(-12.6000pt,-15.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-7.5000pt)..controls(-8.6000pt,-6.9477pt)and(-9.0477pt,-6.5000pt)..(-9.6000pt,-6.5000pt)..controls(-10.1523pt,-6.5000pt)and(-10.6000pt,-6.9477pt)..(-10.6000pt,-7.5000pt)..controls(-10.6000pt,-8.0523pt)and(-10.1523pt,-8.5000pt)..(-9.6000pt,-8.5000pt)..controls(-9.0477pt,-8.5000pt)and(-8.6000pt,-8.0523pt)..(-8.6000pt,-7.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-12.5000pt)..controls(-8.6000pt,-11.9477pt)and(-9.0477pt,-11.5000pt)..(-9.6000pt,-11.5000pt)..controls(-10.1523pt,-11.5000pt)and(-10.6000pt,-11.9477pt)..(-10.6000pt,-12.5000pt)..controls(-10.6000pt,-13.0523pt)and(-10.1523pt,-13.5000pt)..(-9.6000pt,-13.5000pt)..controls(-9.0477pt,-13.5000pt)and(-8.6000pt,-13.0523pt)..(-8.6000pt,-12.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-7.5000pt)..controls(-5.6000pt,-0.5718pt)and(-8.0000pt,0.0000pt)..(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-12.5000pt)..controls(-5.6000pt,-5.5718pt)and(-8.0000pt,-5.0000pt)..(0.0000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-7.5000pt)..controls(-5.6000pt,-14.4282pt)and(-8.0000pt,-15.0000pt)..(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-12.5000pt)..controls(-5.6000pt,-19.4282pt)and(-8.0000pt,-20.0000pt)..(0.0000pt,-20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-26.3300pt,-5.3075pt)--(-20.6000pt,-5.3075pt)--(-20.6000pt,-14.6925pt)--(-26.3300pt,-14.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-26.3300pt,-5.3075pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{78}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-30.3300pt,-1.3075pt)--(-16.6000pt,-1.3075pt)--(-16.6000pt,-18.6925pt)--(-30.3300pt,-18.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-30.3300pt,-1.3075pt)--(-16.6000pt,-1.3075pt)--(-16.6000pt,-18.6925pt)--(-30.3300pt,-18.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-7.5000pt)--(-16.6000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-12.5000pt)--(-16.6000pt,-12.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.3300pt,-10.0000pt)--(-30.3300pt,-10.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-17.5100pt,-41.6575pt)--(-12.8200pt,-41.6575pt)--(-12.8200pt,-48.3425pt)--(-17.5100pt,-48.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (-17.5100pt,-41.6575pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{79}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-21.5100pt,-37.6575pt)--(-8.8200pt,-37.6575pt)--(-8.8200pt,-52.3425pt)--(-21.5100pt,-52.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-21.5100pt,-37.6575pt)--(-8.8200pt,-37.6575pt)--(-8.8200pt,-52.3425pt)--(-21.5100pt,-52.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-45.0000pt)--(-8.8200pt,-45.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.3300pt,-45.0000pt)--(-21.5100pt,-45.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-39.9300pt,-27.5000pt)--(-39.9300pt,-27.5000pt)--(-39.9300pt,-27.5000pt)--(-39.9300pt,-27.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-42.9300pt,-24.5000pt)--(-36.9300pt,-24.5000pt)--(-36.9300pt,-30.5000pt)--(-42.9300pt,-30.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-38.9300pt,-27.5000pt)..controls(-38.9300pt,-26.9477pt)and(-39.3777pt,-26.5000pt)..(-39.9300pt,-26.5000pt)..controls(-40.4823pt,-26.5000pt)and(-40.9300pt,-26.9477pt)..(-40.9300pt,-27.5000pt)..controls(-40.9300pt,-28.0523pt)and(-40.4823pt,-28.5000pt)..(-39.9300pt,-28.5000pt)..controls(-39.3777pt,-28.5000pt)and(-38.9300pt,-28.0523pt)..(-38.9300pt,-27.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-39.9300pt,-27.5000pt)..controls(-35.9300pt,-20.5718pt)and(-38.3300pt,-10.0000pt)..(-30.3300pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-39.9300pt,-27.5000pt)..controls(-35.9300pt,-34.4282pt)and(-38.3300pt,-45.0000pt)..(-30.3300pt,-45.0000pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,11.0175pt)--(0.0000pt,11.0175pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](52.1300pt,24.5350pt)--(52.1300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](52.1300pt,14.7675pt)--(52.1300pt,14.7675pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](52.1300pt,0.0000pt)--(52.1300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,24.5350pt)--(23.3300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,19.5350pt)--(23.3300pt,19.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,0.0000pt)--(23.3300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,24.5350pt)--(32.9300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,5.0000pt)--(32.9300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,0.0000pt)--(32.9300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,24.5350pt)--(42.5300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,5.0000pt)--(42.5300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,0.0000pt)--(42.5300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,24.5350pt)--(52.1300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,5.0000pt)..controls(50.5300pt,5.0000pt)and(44.1300pt,14.7675pt)..(52.1300pt,14.7675pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5300pt,0.0000pt)--(52.1300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,24.5350pt)--(42.5300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,5.0000pt)..controls(40.9300pt,5.0000pt)and(34.5300pt,0.0000pt)..(42.5300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](32.9300pt,0.0000pt)..controls(40.9300pt,0.0000pt)and(34.5300pt,5.0000pt)..(42.5300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,24.5350pt)--(32.9300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,19.5350pt)..controls(31.3300pt,19.5350pt)and(24.9300pt,5.0000pt)..(32.9300pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,0.0000pt)--(32.9300pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6000pt,26.7275pt)--(19.3300pt,26.7275pt)--(19.3300pt,17.3425pt)--(13.6000pt,17.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,26.7275pt){\savebox{\marxupbox}{{\ensuremath{f}}}\immediate\write\boxesfile{80}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,30.7275pt)--(23.3300pt,30.7275pt)--(23.3300pt,13.3425pt)--(9.6000pt,13.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,24.5350pt)--(23.3300pt,24.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,19.5350pt)--(23.3300pt,19.5350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,22.0350pt)--(9.6000pt,22.0350pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](14.1200pt,3.3425pt)--(18.8100pt,3.3425pt)--(18.8100pt,-3.3425pt)--(14.1200pt,-3.3425pt)--cycle;
\node[anchor=north west,inner sep=0] at (14.1200pt,3.3425pt){\savebox{\marxupbox}{{\ensuremath{g}}}\immediate\write\boxesfile{81}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.1200pt,7.3425pt)--(22.8100pt,7.3425pt)--(22.8100pt,-7.3425pt)--(10.1200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.1200pt,7.3425pt)--(22.8100pt,7.3425pt)--(22.8100pt,-7.3425pt)--(10.1200pt,-7.3425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](23.3300pt,0.0000pt)--(22.8100pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(10.1200pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--(0.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,14.0175pt)--(3.0000pt,14.0175pt)--(3.0000pt,8.0175pt)--(-3.0000pt,8.0175pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,11.0175pt)..controls(1.0000pt,11.5698pt)and(0.5523pt,12.0175pt)..(0.0000pt,12.0175pt)..controls(-0.5523pt,12.0175pt)and(-1.0000pt,11.5698pt)..(-1.0000pt,11.0175pt)..controls(-1.0000pt,10.4652pt)and(-0.5523pt,10.0175pt)..(0.0000pt,10.0175pt)..controls(0.5523pt,10.0175pt)and(1.0000pt,10.4652pt)..(1.0000pt,11.0175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,17.9457pt)and(1.6000pt,22.0350pt)..(9.6000pt,22.0350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.0175pt)..controls(4.0000pt,4.0893pt)and(1.6000pt,0.0000pt)..(9.6000pt,0.0000pt);
\end{tikzpicture}}\caption{Undoing a split. Two copies of \ensuremath{\mathsf{f}} have been identified. In the first step re-association is performed.
Then, \ensuremath{\mathsf{f}} is commuted with \ensuremath{\mathsf{δ}}. Finally duplication and
projections are simplified out.}\label{82}\end{figure}
The proof of \cref{69} gives a clear plan for how to
implement \ensuremath{\mathsf{reduce}}, namely reducing the form \ensuremath{\bigtriangleup} (f
id) by induction until we obtain a morphism in {\sc{}smc} form.
However, there are a couple of difficulties to overcome before we
actually have a usable algorithm. First, the proof of
\cref{70} proceeds by case analysis on the form of the
input function (\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 0.0mu}\ensuremath{\bigotimes_{i}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{t}_{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}). But without
metaprogramming this form is inaccessible to programs in Haskell:
we only have access to the \ensuremath{\mathsf{FreeCartesian}} representation which is
\emph{produced} by \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}}.
Regardless, inspection of the proof of
\cref{70} reveals that the bulk of the work,
namely undoing \ensuremath{\mathsf{split}} operations, can be done by
finding two \ensuremath{\mathsf{FreeSMC}} morphisms of the form \ensuremath{\mathsf{π₁}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}} and \ensuremath{\mathsf{π₂}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}} in
the operands of \ensuremath{\bigtriangleup}, associate them to \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{π₁}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{π₂}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} and reduce
them to \ensuremath{\mathsf{h}}. If we had access to the host language representation,
we'd know where these operands were.
But we don't: any permutation may be applied to the operands of
\ensuremath{\bigtriangleup}, and therefore an algorithm must start by re-associating them so
that \ensuremath{\mathsf{π₁}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}} and \ensuremath{\mathsf{π₂}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{h}} are connected to the same fork (▵). This step
is illustrated in \cref{82}. The process can then
continue until all splits have been undone. A complete example involving several such
steps is depicted graphically in \begin{figure}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-35.8000pt,34.9234pt)--(-28.8000pt,34.9234pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-35.8000pt,29.9234pt)--(-28.8000pt,29.9234pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](77.8449pt,58.1256pt)--(84.8449pt,58.1256pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](77.8449pt,6.0962pt)--(84.8449pt,6.0962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,57.5006pt)--(-19.2000pt,57.5006pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,52.5006pt)--(-19.2000pt,52.5006pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,12.3462pt)--(-19.2000pt,12.3462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,7.3462pt)--(-19.2000pt,7.3462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,71.7700pt)--(63.0399pt,71.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,44.4812pt)--(63.0399pt,44.4812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](67.0399pt,60.3706pt)--(73.8449pt,60.3706pt)--(73.8449pt,55.8806pt)--(67.0399pt,55.8806pt)--cycle;
\node[anchor=north west,inner sep=0] at (67.0399pt,60.3706pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{83}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.0399pt,64.3706pt)--(77.8449pt,64.3706pt)--(77.8449pt,51.8806pt)--(63.0399pt,51.8806pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.0399pt,73.2700pt)..controls(63.0399pt,74.6507pt)and(64.1592pt,75.7700pt)..(65.5399pt,75.7700pt)--(75.3449pt,75.7700pt)..controls(76.7256pt,75.7700pt)and(77.8449pt,74.6507pt)..(77.8449pt,73.2700pt)--(77.8449pt,42.9812pt)..controls(77.8449pt,41.6005pt)and(76.7256pt,40.4812pt)..(75.3449pt,40.4812pt)--(65.5399pt,40.4812pt)..controls(64.1592pt,40.4812pt)and(63.0399pt,41.6005pt)..(63.0399pt,42.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](77.8449pt,58.1256pt)--(77.8449pt,58.1256pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.0399pt,71.7700pt)--(63.0399pt,71.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.0399pt,44.4812pt)--(63.0399pt,44.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,69.2700pt)--(-9.6000pt,69.2700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,64.2700pt)--(-9.6000pt,64.2700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,45.7312pt)--(-9.6000pt,45.7312pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,40.7312pt)--(-9.6000pt,40.7312pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,71.7700pt)--(18.2750pt,71.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,66.7700pt)--(18.2750pt,66.7700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](18.2750pt,71.7700pt)--(18.2750pt,71.7700pt)--(18.2750pt,66.7700pt)--(18.2750pt,66.7700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](15.2750pt,74.7700pt)--(21.2750pt,74.7700pt)--(21.2750pt,63.7700pt)--(15.2750pt,63.7700pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2750pt,66.7700pt)..controls(19.2750pt,67.3222pt)and(18.8273pt,67.7700pt)..(18.2750pt,67.7700pt)..controls(17.7227pt,67.7700pt)and(17.2750pt,67.3222pt)..(17.2750pt,66.7700pt)..controls(17.2750pt,66.2177pt)and(17.7227pt,65.7700pt)..(18.2750pt,65.7700pt)..controls(18.8273pt,65.7700pt)and(19.2750pt,66.2177pt)..(19.2750pt,66.7700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](18.2750pt,71.7700pt)--(56.0399pt,71.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,69.2700pt)--(-2.6000pt,69.2700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.4000pt,73.9624pt)--(7.2750pt,73.9624pt)--(7.2750pt,64.5775pt)--(1.4000pt,64.5775pt)--cycle;
\node[anchor=north west,inner sep=0] at (1.4000pt,73.9624pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{84}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,77.9624pt)--(11.2750pt,77.9624pt)--(11.2750pt,60.5775pt)--(-2.6000pt,60.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,75.4624pt)..controls(-2.6000pt,76.8432pt)and(-1.4807pt,77.9624pt)..(-0.1000pt,77.9624pt)--(8.7750pt,77.9624pt)..controls(10.1557pt,77.9624pt)and(11.2750pt,76.8432pt)..(11.2750pt,75.4624pt)--(11.2750pt,63.0775pt)..controls(11.2750pt,61.6968pt)and(10.1557pt,60.5775pt)..(8.7750pt,60.5775pt)--(-0.1000pt,60.5775pt)..controls(-1.4807pt,60.5775pt)and(-2.6000pt,61.6968pt)..(-2.6000pt,63.0775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,71.7700pt)--(11.2750pt,71.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,66.7700pt)--(11.2750pt,66.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,69.2700pt)--(-2.6000pt,69.2700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,69.2700pt)--(-9.6000pt,69.2700pt)--(-9.6000pt,64.2700pt)--(-9.6000pt,64.2700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,72.2700pt)--(-6.6000pt,72.2700pt)--(-6.6000pt,61.2700pt)--(-12.6000pt,61.2700pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,64.2700pt)..controls(-8.6000pt,64.8222pt)and(-9.0477pt,65.2700pt)..(-9.6000pt,65.2700pt)..controls(-10.1523pt,65.2700pt)and(-10.6000pt,64.8222pt)..(-10.6000pt,64.2700pt)..controls(-10.6000pt,63.7177pt)and(-10.1523pt,63.2700pt)..(-9.6000pt,63.2700pt)..controls(-9.0477pt,63.2700pt)and(-8.6000pt,63.7177pt)..(-8.6000pt,64.2700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,69.2700pt)--(-9.6000pt,69.2700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,44.4812pt)--(56.0399pt,44.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,39.4812pt)--(56.0399pt,39.4812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,44.4812pt)--(56.0399pt,44.4812pt)--(56.0399pt,39.4812pt)--(56.0399pt,39.4812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](53.0399pt,47.4812pt)--(59.0399pt,47.4812pt)--(59.0399pt,36.4812pt)--(53.0399pt,36.4812pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](57.0399pt,39.4812pt)..controls(57.0399pt,40.0335pt)and(56.5922pt,40.4812pt)..(56.0399pt,40.4812pt)..controls(55.4877pt,40.4812pt)and(55.0399pt,40.0335pt)..(55.0399pt,39.4812pt)..controls(55.0399pt,38.9289pt)and(55.4877pt,38.4812pt)..(56.0399pt,38.4812pt)..controls(56.5922pt,38.4812pt)and(57.0399pt,38.9289pt)..(57.0399pt,39.4812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,44.4812pt)--(56.0399pt,44.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,50.5775pt)--(34.8750pt,50.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,33.3850pt)--(34.8750pt,33.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](38.8750pt,46.6737pt)--(45.0399pt,46.6737pt)--(45.0399pt,37.2887pt)--(38.8750pt,37.2887pt)--cycle;
\node[anchor=north west,inner sep=0] at (38.8750pt,46.6737pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{85}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,50.6737pt)--(49.0399pt,50.6737pt)--(49.0399pt,33.2887pt)--(34.8750pt,33.2887pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,52.0775pt)..controls(34.8750pt,53.4582pt)and(35.9943pt,54.5775pt)..(37.3750pt,54.5775pt)--(46.5399pt,54.5775pt)..controls(47.9207pt,54.5775pt)and(49.0399pt,53.4582pt)..(49.0399pt,52.0775pt)--(49.0399pt,31.8850pt)..controls(49.0399pt,30.5043pt)and(47.9207pt,29.3850pt)..(46.5399pt,29.3850pt)--(37.3750pt,29.3850pt)..controls(35.9943pt,29.3850pt)and(34.8750pt,30.5043pt)..(34.8750pt,31.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,44.4812pt)--(49.0399pt,44.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,39.4812pt)--(49.0399pt,39.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,50.5775pt)--(34.8750pt,50.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,33.3850pt)--(34.8750pt,33.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,55.5775pt)--(0.0000pt,55.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,50.5775pt)--(0.0000pt,50.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,35.8850pt)--(0.0000pt,35.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,30.8850pt)--(0.0000pt,30.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,55.5775pt)--(0.0000pt,55.5775pt)--(0.0000pt,50.5775pt)--(0.0000pt,50.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,58.5775pt)--(3.0000pt,58.5775pt)--(3.0000pt,47.5775pt)--(-3.0000pt,47.5775pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,55.5775pt)..controls(1.0000pt,56.1298pt)and(0.5523pt,56.5775pt)..(0.0000pt,56.5775pt)..controls(-0.5523pt,56.5775pt)and(-1.0000pt,56.1298pt)..(-1.0000pt,55.5775pt)..controls(-1.0000pt,55.0252pt)and(-0.5523pt,54.5775pt)..(0.0000pt,54.5775pt)..controls(0.5523pt,54.5775pt)and(1.0000pt,55.0252pt)..(1.0000pt,55.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,50.5775pt)--(27.8750pt,50.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,38.3850pt)--(27.8750pt,38.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,33.3850pt)--(27.8750pt,33.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,38.3850pt)--(27.8750pt,38.3850pt)--(27.8750pt,33.3850pt)--(27.8750pt,33.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.8750pt,41.3850pt)--(30.8750pt,41.3850pt)--(30.8750pt,30.3850pt)--(24.8750pt,30.3850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8750pt,38.3850pt)..controls(28.8750pt,38.9373pt)and(28.4273pt,39.3850pt)..(27.8750pt,39.3850pt)..controls(27.3227pt,39.3850pt)and(26.8750pt,38.9373pt)..(26.8750pt,38.3850pt)..controls(26.8750pt,37.8327pt)and(27.3227pt,37.3850pt)..(27.8750pt,37.3850pt)..controls(28.4273pt,37.3850pt)and(28.8750pt,37.8327pt)..(28.8750pt,38.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,33.3850pt)--(27.8750pt,33.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,35.8850pt)--(7.0000pt,35.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,40.5775pt)--(16.8750pt,40.5775pt)--(16.8750pt,31.1925pt)--(11.0000pt,31.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,40.5775pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{86}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,44.5775pt)--(20.8750pt,44.5775pt)--(20.8750pt,27.1925pt)--(7.0000pt,27.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,42.0775pt)..controls(7.0000pt,43.4582pt)and(8.1193pt,44.5775pt)..(9.5000pt,44.5775pt)--(18.3750pt,44.5775pt)..controls(19.7557pt,44.5775pt)and(20.8750pt,43.4582pt)..(20.8750pt,42.0775pt)--(20.8750pt,29.6925pt)..controls(20.8750pt,28.3118pt)and(19.7557pt,27.1925pt)..(18.3750pt,27.1925pt)--(9.5000pt,27.1925pt)..controls(8.1193pt,27.1925pt)and(7.0000pt,28.3118pt)..(7.0000pt,29.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,38.3850pt)--(20.8750pt,38.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,33.3850pt)--(20.8750pt,33.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,35.8850pt)--(7.0000pt,35.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,35.8850pt)--(0.0000pt,35.8850pt)--(0.0000pt,30.8850pt)--(0.0000pt,30.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,38.8850pt)--(3.0000pt,38.8850pt)--(3.0000pt,27.8850pt)--(-3.0000pt,27.8850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,30.8850pt)..controls(1.0000pt,31.4373pt)and(0.5523pt,31.8850pt)..(0.0000pt,31.8850pt)..controls(-0.5523pt,31.8850pt)and(-1.0000pt,31.4373pt)..(-1.0000pt,30.8850pt)..controls(-1.0000pt,30.3327pt)and(-0.5523pt,29.8850pt)..(0.0000pt,29.8850pt)..controls(0.5523pt,29.8850pt)and(1.0000pt,30.3327pt)..(1.0000pt,30.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,35.8850pt)--(0.0000pt,35.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,45.7312pt)--(-9.6000pt,45.7312pt)--(-9.6000pt,40.7312pt)--(-9.6000pt,40.7312pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,48.7312pt)--(-6.6000pt,48.7312pt)--(-6.6000pt,37.7312pt)--(-12.6000pt,37.7312pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,45.7312pt)..controls(-8.6000pt,46.2835pt)and(-9.0477pt,46.7312pt)..(-9.6000pt,46.7312pt)..controls(-10.1523pt,46.7312pt)and(-10.6000pt,46.2835pt)..(-10.6000pt,45.7312pt)..controls(-10.6000pt,45.1789pt)and(-10.1523pt,44.7312pt)..(-9.6000pt,44.7312pt)..controls(-9.0477pt,44.7312pt)and(-8.6000pt,45.1789pt)..(-8.6000pt,45.7312pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,40.7312pt)..controls(-8.6000pt,41.2835pt)and(-9.0477pt,41.7312pt)..(-9.6000pt,41.7312pt)..controls(-10.1523pt,41.7312pt)and(-10.6000pt,41.2835pt)..(-10.6000pt,40.7312pt)..controls(-10.6000pt,40.1789pt)and(-10.1523pt,39.7312pt)..(-9.6000pt,39.7312pt)..controls(-9.0477pt,39.7312pt)and(-8.6000pt,40.1789pt)..(-8.6000pt,40.7312pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,45.7312pt)..controls(-5.6000pt,52.6594pt)and(-8.0000pt,55.5775pt)..(0.0000pt,55.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,40.7312pt)..controls(-5.6000pt,47.6594pt)and(-8.0000pt,50.5775pt)..(0.0000pt,50.5775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,45.7312pt)..controls(-5.6000pt,38.8030pt)and(-8.0000pt,35.8850pt)..(0.0000pt,35.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,40.7312pt)..controls(-5.6000pt,33.8030pt)and(-8.0000pt,30.8850pt)..(0.0000pt,30.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,57.5006pt)--(-19.2000pt,57.5006pt)--(-19.2000pt,52.5006pt)--(-19.2000pt,52.5006pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,60.5006pt)--(-16.2000pt,60.5006pt)--(-16.2000pt,49.5006pt)--(-22.2000pt,49.5006pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,57.5006pt)..controls(-18.2000pt,58.0529pt)and(-18.6477pt,58.5006pt)..(-19.2000pt,58.5006pt)..controls(-19.7523pt,58.5006pt)and(-20.2000pt,58.0529pt)..(-20.2000pt,57.5006pt)..controls(-20.2000pt,56.9483pt)and(-19.7523pt,56.5006pt)..(-19.2000pt,56.5006pt)..controls(-18.6477pt,56.5006pt)and(-18.2000pt,56.9483pt)..(-18.2000pt,57.5006pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,52.5006pt)..controls(-18.2000pt,53.0529pt)and(-18.6477pt,53.5006pt)..(-19.2000pt,53.5006pt)..controls(-19.7523pt,53.5006pt)and(-20.2000pt,53.0529pt)..(-20.2000pt,52.5006pt)..controls(-20.2000pt,51.9483pt)and(-19.7523pt,51.5006pt)..(-19.2000pt,51.5006pt)..controls(-18.6477pt,51.5006pt)and(-18.2000pt,51.9483pt)..(-18.2000pt,52.5006pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,57.5006pt)..controls(-15.2000pt,64.4288pt)and(-17.6000pt,69.2700pt)..(-9.6000pt,69.2700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,52.5006pt)..controls(-15.2000pt,59.4288pt)and(-17.6000pt,64.2700pt)..(-9.6000pt,64.2700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,57.5006pt)..controls(-15.2000pt,50.5724pt)and(-17.6000pt,45.7312pt)..(-9.6000pt,45.7312pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,52.5006pt)..controls(-15.2000pt,45.5724pt)and(-17.6000pt,40.7312pt)..(-9.6000pt,40.7312pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,11.0962pt)--(56.0399pt,11.0962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,6.0962pt)--(56.0399pt,6.0962pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,11.0962pt)--(56.0399pt,11.0962pt)--(56.0399pt,6.0962pt)--(56.0399pt,6.0962pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](53.0399pt,14.0962pt)--(59.0399pt,14.0962pt)--(59.0399pt,3.0962pt)--(53.0399pt,3.0962pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](57.0399pt,11.0962pt)..controls(57.0399pt,11.6485pt)and(56.5922pt,12.0962pt)..(56.0399pt,12.0962pt)..controls(55.4877pt,12.0962pt)and(55.0399pt,11.6485pt)..(55.0399pt,11.0962pt)..controls(55.0399pt,10.5440pt)and(55.4877pt,10.0962pt)..(56.0399pt,10.0962pt)..controls(56.5922pt,10.0962pt)and(57.0399pt,10.5440pt)..(57.0399pt,11.0962pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,6.0962pt)--(77.8449pt,6.0962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,17.1925pt)--(34.8750pt,17.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,0.0000pt)--(34.8750pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](38.8750pt,13.2887pt)--(45.0399pt,13.2887pt)--(45.0399pt,3.9038pt)--(38.8750pt,3.9038pt)--cycle;
\node[anchor=north west,inner sep=0] at (38.8750pt,13.2887pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{87}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,17.2887pt)--(49.0399pt,17.2887pt)--(49.0399pt,-0.0962pt)--(34.8750pt,-0.0962pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,18.6925pt)..controls(34.8750pt,20.0732pt)and(35.9943pt,21.1925pt)..(37.3750pt,21.1925pt)--(46.5399pt,21.1925pt)..controls(47.9207pt,21.1925pt)and(49.0399pt,20.0732pt)..(49.0399pt,18.6925pt)--(49.0399pt,-1.5000pt)..controls(49.0399pt,-2.8807pt)and(47.9207pt,-4.0000pt)..(46.5399pt,-4.0000pt)--(37.3750pt,-4.0000pt)..controls(35.9943pt,-4.0000pt)and(34.8750pt,-2.8807pt)..(34.8750pt,-1.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,11.0962pt)--(49.0399pt,11.0962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,6.0962pt)--(49.0399pt,6.0962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,17.1925pt)--(34.8750pt,17.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,0.0000pt)--(34.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,22.1925pt)--(0.0000pt,22.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,17.1925pt)--(0.0000pt,17.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(0.0000pt,2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,22.1925pt)--(0.0000pt,22.1925pt)--(0.0000pt,17.1925pt)--(0.0000pt,17.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,25.1925pt)--(3.0000pt,25.1925pt)--(3.0000pt,14.1925pt)--(-3.0000pt,14.1925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,22.1925pt)..controls(1.0000pt,22.7448pt)and(0.5523pt,23.1925pt)..(0.0000pt,23.1925pt)..controls(-0.5523pt,23.1925pt)and(-1.0000pt,22.7448pt)..(-1.0000pt,22.1925pt)..controls(-1.0000pt,21.6402pt)and(-0.5523pt,21.1925pt)..(0.0000pt,21.1925pt)..controls(0.5523pt,21.1925pt)and(1.0000pt,21.6402pt)..(1.0000pt,22.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,17.1925pt)--(27.8750pt,17.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,5.0000pt)--(27.8750pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,0.0000pt)--(27.8750pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,5.0000pt)--(27.8750pt,5.0000pt)--(27.8750pt,0.0000pt)--(27.8750pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.8750pt,8.0000pt)--(30.8750pt,8.0000pt)--(30.8750pt,-3.0000pt)--(24.8750pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8750pt,5.0000pt)..controls(28.8750pt,5.5523pt)and(28.4273pt,6.0000pt)..(27.8750pt,6.0000pt)..controls(27.3227pt,6.0000pt)and(26.8750pt,5.5523pt)..(26.8750pt,5.0000pt)..controls(26.8750pt,4.4477pt)and(27.3227pt,4.0000pt)..(27.8750pt,4.0000pt)..controls(28.4273pt,4.0000pt)and(28.8750pt,4.4477pt)..(28.8750pt,5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,0.0000pt)--(27.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(7.0000pt,2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,7.1925pt)--(16.8750pt,7.1925pt)--(16.8750pt,-2.1925pt)--(11.0000pt,-2.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,7.1925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{88}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,11.1925pt)--(20.8750pt,11.1925pt)--(20.8750pt,-6.1925pt)--(7.0000pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,8.6925pt)..controls(7.0000pt,10.0732pt)and(8.1193pt,11.1925pt)..(9.5000pt,11.1925pt)--(18.3750pt,11.1925pt)..controls(19.7557pt,11.1925pt)and(20.8750pt,10.0732pt)..(20.8750pt,8.6925pt)--(20.8750pt,-3.6925pt)..controls(20.8750pt,-5.0732pt)and(19.7557pt,-6.1925pt)..(18.3750pt,-6.1925pt)--(9.5000pt,-6.1925pt)..controls(8.1193pt,-6.1925pt)and(7.0000pt,-5.0732pt)..(7.0000pt,-3.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,5.0000pt)--(20.8750pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,0.0000pt)--(20.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,2.5000pt)--(7.0000pt,2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(0.0000pt,2.5000pt)--(0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,5.5000pt)--(3.0000pt,5.5000pt)--(3.0000pt,-5.5000pt)--(-3.0000pt,-5.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-2.5000pt)..controls(1.0000pt,-1.9477pt)and(0.5523pt,-1.5000pt)..(0.0000pt,-1.5000pt)..controls(-0.5523pt,-1.5000pt)and(-1.0000pt,-1.9477pt)..(-1.0000pt,-2.5000pt)..controls(-1.0000pt,-3.0523pt)and(-0.5523pt,-3.5000pt)..(0.0000pt,-3.5000pt)..controls(0.5523pt,-3.5000pt)and(1.0000pt,-3.0523pt)..(1.0000pt,-2.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,2.5000pt)--(0.0000pt,2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,12.3462pt)--(-19.2000pt,12.3462pt)--(-19.2000pt,7.3462pt)--(-19.2000pt,7.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,15.3462pt)--(-16.2000pt,15.3462pt)--(-16.2000pt,4.3462pt)--(-22.2000pt,4.3462pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,12.3462pt)..controls(-18.2000pt,12.8985pt)and(-18.6477pt,13.3462pt)..(-19.2000pt,13.3462pt)..controls(-19.7523pt,13.3462pt)and(-20.2000pt,12.8985pt)..(-20.2000pt,12.3462pt)..controls(-20.2000pt,11.7940pt)and(-19.7523pt,11.3462pt)..(-19.2000pt,11.3462pt)..controls(-18.6477pt,11.3462pt)and(-18.2000pt,11.7940pt)..(-18.2000pt,12.3462pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,7.3462pt)..controls(-18.2000pt,7.8985pt)and(-18.6477pt,8.3462pt)..(-19.2000pt,8.3462pt)..controls(-19.7523pt,8.3462pt)and(-20.2000pt,7.8985pt)..(-20.2000pt,7.3462pt)..controls(-20.2000pt,6.7940pt)and(-19.7523pt,6.3462pt)..(-19.2000pt,6.3462pt)..controls(-18.6477pt,6.3462pt)and(-18.2000pt,6.7940pt)..(-18.2000pt,7.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,12.3462pt)..controls(-15.2000pt,19.2744pt)and(-8.0000pt,22.1925pt)..(0.0000pt,22.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,7.3462pt)..controls(-15.2000pt,14.2744pt)and(-8.0000pt,17.1925pt)..(0.0000pt,17.1925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,12.3462pt)..controls(-15.2000pt,5.4180pt)and(-8.0000pt,2.5000pt)..(0.0000pt,2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,7.3462pt)..controls(-15.2000pt,0.4180pt)and(-8.0000pt,-2.5000pt)..(0.0000pt,-2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,34.9234pt)--(-28.8000pt,34.9234pt)--(-28.8000pt,29.9234pt)--(-28.8000pt,29.9234pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-31.8000pt,37.9234pt)--(-25.8000pt,37.9234pt)--(-25.8000pt,26.9234pt)--(-31.8000pt,26.9234pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-27.8000pt,34.9234pt)..controls(-27.8000pt,35.4757pt)and(-28.2477pt,35.9234pt)..(-28.8000pt,35.9234pt)..controls(-29.3523pt,35.9234pt)and(-29.8000pt,35.4757pt)..(-29.8000pt,34.9234pt)..controls(-29.8000pt,34.3711pt)and(-29.3523pt,33.9234pt)..(-28.8000pt,33.9234pt)..controls(-28.2477pt,33.9234pt)and(-27.8000pt,34.3711pt)..(-27.8000pt,34.9234pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-27.8000pt,29.9234pt)..controls(-27.8000pt,30.4757pt)and(-28.2477pt,30.9234pt)..(-28.8000pt,30.9234pt)..controls(-29.3523pt,30.9234pt)and(-29.8000pt,30.4757pt)..(-29.8000pt,29.9234pt)..controls(-29.8000pt,29.3711pt)and(-29.3523pt,28.9234pt)..(-28.8000pt,28.9234pt)..controls(-28.2477pt,28.9234pt)and(-27.8000pt,29.3711pt)..(-27.8000pt,29.9234pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,34.9234pt)..controls(-24.8000pt,41.8516pt)and(-27.2000pt,57.5006pt)..(-19.2000pt,57.5006pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,29.9234pt)..controls(-24.8000pt,36.8516pt)and(-27.2000pt,52.5006pt)..(-19.2000pt,52.5006pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,34.9234pt)..controls(-24.8000pt,27.9952pt)and(-27.2000pt,12.3462pt)..(-19.2000pt,12.3462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,29.9234pt)..controls(-24.8000pt,22.9952pt)and(-27.2000pt,7.3462pt)..(-19.2000pt,7.3462pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-35.8000pt,-30.6637pt)--(-28.8000pt,-30.6637pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-35.8000pt,-35.6637pt)--(-28.8000pt,-35.6637pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](80.4449pt,-2.5000pt)--(87.4449pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](80.4449pt,-81.7700pt)--(87.4449pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,0.0000pt)--(56.0399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-43.3850pt)--(56.0399pt,-43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-81.7700pt)--(56.0399pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,0.0000pt)--(65.6399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,-5.0000pt)--(65.6399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,-81.7700pt)--(65.6399pt,-81.7700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](69.6399pt,-0.2550pt)--(76.4449pt,-0.2550pt)--(76.4449pt,-4.7450pt)--(69.6399pt,-4.7450pt)--cycle;
\node[anchor=north west,inner sep=0] at (69.6399pt,-0.2550pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{89}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,3.7450pt)--(80.4449pt,3.7450pt)--(80.4449pt,-8.7450pt)--(65.6399pt,-8.7450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,1.5000pt)..controls(65.6399pt,2.8807pt)and(66.7592pt,4.0000pt)..(68.1399pt,4.0000pt)--(77.9449pt,4.0000pt)..controls(79.3256pt,4.0000pt)and(80.4449pt,2.8807pt)..(80.4449pt,1.5000pt)--(80.4449pt,-6.5000pt)..controls(80.4449pt,-7.8807pt)and(79.3256pt,-9.0000pt)..(77.9449pt,-9.0000pt)--(68.1399pt,-9.0000pt)..controls(66.7592pt,-9.0000pt)and(65.6399pt,-7.8807pt)..(65.6399pt,-6.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](80.4449pt,-2.5000pt)--(80.4449pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,0.0000pt)--(65.6399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,-5.0000pt)--(65.6399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.6399pt,-81.7700pt)--(80.4449pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,0.0000pt)--(65.6399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-43.3850pt)..controls(64.0399pt,-43.3850pt)and(57.6399pt,-5.0000pt)..(65.6399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-81.7700pt)--(65.6399pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-2.5000pt)--(-19.2000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-7.5000pt)--(-19.2000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-58.8275pt)--(-19.2000pt,-58.8275pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-63.8275pt)--(-19.2000pt,-63.8275pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.6750pt,0.0000pt)--(8.6750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.6750pt,-5.0000pt)--(8.6750pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](8.6750pt,0.0000pt)--(8.6750pt,0.0000pt)--(8.6750pt,-5.0000pt)--(8.6750pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](5.6750pt,3.0000pt)--(11.6750pt,3.0000pt)--(11.6750pt,-8.0000pt)--(5.6750pt,-8.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6750pt,-5.0000pt)..controls(9.6750pt,-4.4477pt)and(9.2273pt,-4.0000pt)..(8.6750pt,-4.0000pt)..controls(8.1227pt,-4.0000pt)and(7.6750pt,-4.4477pt)..(7.6750pt,-5.0000pt)..controls(7.6750pt,-5.5523pt)and(8.1227pt,-6.0000pt)..(8.6750pt,-6.0000pt)..controls(9.2273pt,-6.0000pt)and(9.6750pt,-5.5523pt)..(9.6750pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](8.6750pt,0.0000pt)--(56.0399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-2.5000pt)--(-12.2000pt,-2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.2000pt,2.1925pt)--(-2.3250pt,2.1925pt)--(-2.3250pt,-7.1925pt)--(-8.2000pt,-7.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-8.2000pt,2.1925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{90}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.2000pt,6.1925pt)--(1.6750pt,6.1925pt)--(1.6750pt,-11.1925pt)--(-12.2000pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.2000pt,3.6925pt)..controls(-12.2000pt,5.0732pt)and(-11.0807pt,6.1925pt)..(-9.7000pt,6.1925pt)--(-0.8250pt,6.1925pt)..controls(0.5557pt,6.1925pt)and(1.6750pt,5.0732pt)..(1.6750pt,3.6925pt)--(1.6750pt,-8.6925pt)..controls(1.6750pt,-10.0732pt)and(0.5557pt,-11.1925pt)..(-0.8250pt,-11.1925pt)--(-9.7000pt,-11.1925pt)..controls(-11.0807pt,-11.1925pt)and(-12.2000pt,-10.0732pt)..(-12.2000pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.6750pt,0.0000pt)--(1.6750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.6750pt,-5.0000pt)--(1.6750pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.2000pt,-2.5000pt)--(-12.2000pt,-2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-2.5000pt)--(-19.2000pt,-2.5000pt)--(-19.2000pt,-7.5000pt)--(-19.2000pt,-7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,0.5000pt)--(-16.2000pt,0.5000pt)--(-16.2000pt,-10.5000pt)--(-22.2000pt,-10.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,-7.5000pt)..controls(-18.2000pt,-6.9477pt)and(-18.6477pt,-6.5000pt)..(-19.2000pt,-6.5000pt)..controls(-19.7523pt,-6.5000pt)and(-20.2000pt,-6.9477pt)..(-20.2000pt,-7.5000pt)..controls(-20.2000pt,-8.0523pt)and(-19.7523pt,-8.5000pt)..(-19.2000pt,-8.5000pt)..controls(-18.6477pt,-8.5000pt)and(-18.2000pt,-8.0523pt)..(-18.2000pt,-7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-2.5000pt)--(-19.2000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-42.1350pt)--(-9.6000pt,-42.1350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-47.1350pt)--(-9.6000pt,-47.1350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-75.5200pt)--(-9.6000pt,-75.5200pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-80.5200pt)--(-9.6000pt,-80.5200pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-43.3850pt)--(56.0399pt,-43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-48.3850pt)--(56.0399pt,-48.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-43.3850pt)--(56.0399pt,-43.3850pt)--(56.0399pt,-48.3850pt)--(56.0399pt,-48.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](53.0399pt,-40.3850pt)--(59.0399pt,-40.3850pt)--(59.0399pt,-51.3850pt)--(53.0399pt,-51.3850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](57.0399pt,-48.3850pt)..controls(57.0399pt,-47.8327pt)and(56.5922pt,-47.3850pt)..(56.0399pt,-47.3850pt)..controls(55.4877pt,-47.3850pt)and(55.0399pt,-47.8327pt)..(55.0399pt,-48.3850pt)..controls(55.0399pt,-48.9373pt)and(55.4877pt,-49.3850pt)..(56.0399pt,-49.3850pt)..controls(56.5922pt,-49.3850pt)and(57.0399pt,-48.9373pt)..(57.0399pt,-48.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-43.3850pt)--(56.0399pt,-43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-37.2887pt)--(34.8750pt,-37.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-54.4812pt)--(34.8750pt,-54.4812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](38.8750pt,-41.1925pt)--(45.0399pt,-41.1925pt)--(45.0399pt,-50.5775pt)--(38.8750pt,-50.5775pt)--cycle;
\node[anchor=north west,inner sep=0] at (38.8750pt,-41.1925pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{91}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-37.1925pt)--(49.0399pt,-37.1925pt)--(49.0399pt,-54.5775pt)--(34.8750pt,-54.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-35.7887pt)..controls(34.8750pt,-34.4080pt)and(35.9943pt,-33.2887pt)..(37.3750pt,-33.2887pt)--(46.5399pt,-33.2887pt)..controls(47.9207pt,-33.2887pt)and(49.0399pt,-34.4080pt)..(49.0399pt,-35.7887pt)--(49.0399pt,-55.9812pt)..controls(49.0399pt,-57.3619pt)and(47.9207pt,-58.4812pt)..(46.5399pt,-58.4812pt)--(37.3750pt,-58.4812pt)..controls(35.9943pt,-58.4812pt)and(34.8750pt,-57.3619pt)..(34.8750pt,-55.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-43.3850pt)--(49.0399pt,-43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-48.3850pt)--(49.0399pt,-48.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-37.2887pt)--(34.8750pt,-37.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-54.4812pt)--(34.8750pt,-54.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-32.2887pt)--(0.0000pt,-32.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-37.2887pt)--(0.0000pt,-37.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-51.9812pt)--(0.0000pt,-51.9812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-56.9812pt)--(0.0000pt,-56.9812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-32.2887pt)--(0.0000pt,-32.2887pt)--(0.0000pt,-37.2887pt)--(0.0000pt,-37.2887pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-29.2887pt)--(3.0000pt,-29.2887pt)--(3.0000pt,-40.2887pt)--(-3.0000pt,-40.2887pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-32.2887pt)..controls(1.0000pt,-31.7364pt)and(0.5523pt,-31.2887pt)..(0.0000pt,-31.2887pt)..controls(-0.5523pt,-31.2887pt)and(-1.0000pt,-31.7364pt)..(-1.0000pt,-32.2887pt)..controls(-1.0000pt,-32.8410pt)and(-0.5523pt,-33.2887pt)..(0.0000pt,-33.2887pt)..controls(0.5523pt,-33.2887pt)and(1.0000pt,-32.8410pt)..(1.0000pt,-32.2887pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-37.2887pt)--(27.8750pt,-37.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-49.4812pt)--(27.8750pt,-49.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-54.4812pt)--(27.8750pt,-54.4812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-49.4812pt)--(27.8750pt,-49.4812pt)--(27.8750pt,-54.4812pt)--(27.8750pt,-54.4812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.8750pt,-46.4812pt)--(30.8750pt,-46.4812pt)--(30.8750pt,-57.4812pt)--(24.8750pt,-57.4812pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8750pt,-49.4812pt)..controls(28.8750pt,-48.9289pt)and(28.4273pt,-48.4812pt)..(27.8750pt,-48.4812pt)..controls(27.3227pt,-48.4812pt)and(26.8750pt,-48.9289pt)..(26.8750pt,-49.4812pt)..controls(26.8750pt,-50.0335pt)and(27.3227pt,-50.4812pt)..(27.8750pt,-50.4812pt)..controls(28.4273pt,-50.4812pt)and(28.8750pt,-50.0335pt)..(28.8750pt,-49.4812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-54.4812pt)--(27.8750pt,-54.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-51.9812pt)--(7.0000pt,-51.9812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,-47.2887pt)--(16.8750pt,-47.2887pt)--(16.8750pt,-56.6737pt)--(11.0000pt,-56.6737pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,-47.2887pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{92}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-43.2887pt)--(20.8750pt,-43.2887pt)--(20.8750pt,-60.6737pt)--(7.0000pt,-60.6737pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-45.7887pt)..controls(7.0000pt,-44.4080pt)and(8.1193pt,-43.2887pt)..(9.5000pt,-43.2887pt)--(18.3750pt,-43.2887pt)..controls(19.7557pt,-43.2887pt)and(20.8750pt,-44.4080pt)..(20.8750pt,-45.7887pt)--(20.8750pt,-58.1737pt)..controls(20.8750pt,-59.5544pt)and(19.7557pt,-60.6737pt)..(18.3750pt,-60.6737pt)--(9.5000pt,-60.6737pt)..controls(8.1193pt,-60.6737pt)and(7.0000pt,-59.5544pt)..(7.0000pt,-58.1737pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-49.4812pt)--(20.8750pt,-49.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-54.4812pt)--(20.8750pt,-54.4812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-51.9812pt)--(7.0000pt,-51.9812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-51.9812pt)--(0.0000pt,-51.9812pt)--(0.0000pt,-56.9812pt)--(0.0000pt,-56.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-48.9812pt)--(3.0000pt,-48.9812pt)--(3.0000pt,-59.9812pt)--(-3.0000pt,-59.9812pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-56.9812pt)..controls(1.0000pt,-56.4289pt)and(0.5523pt,-55.9812pt)..(0.0000pt,-55.9812pt)..controls(-0.5523pt,-55.9812pt)and(-1.0000pt,-56.4289pt)..(-1.0000pt,-56.9812pt)..controls(-1.0000pt,-57.5335pt)and(-0.5523pt,-57.9812pt)..(0.0000pt,-57.9812pt)..controls(0.5523pt,-57.9812pt)and(1.0000pt,-57.5335pt)..(1.0000pt,-56.9812pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-51.9812pt)--(0.0000pt,-51.9812pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-42.1350pt)--(-9.6000pt,-42.1350pt)--(-9.6000pt,-47.1350pt)--(-9.6000pt,-47.1350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-39.1350pt)--(-6.6000pt,-39.1350pt)--(-6.6000pt,-50.1350pt)--(-12.6000pt,-50.1350pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-42.1350pt)..controls(-8.6000pt,-41.5827pt)and(-9.0477pt,-41.1350pt)..(-9.6000pt,-41.1350pt)..controls(-10.1523pt,-41.1350pt)and(-10.6000pt,-41.5827pt)..(-10.6000pt,-42.1350pt)..controls(-10.6000pt,-42.6873pt)and(-10.1523pt,-43.1350pt)..(-9.6000pt,-43.1350pt)..controls(-9.0477pt,-43.1350pt)and(-8.6000pt,-42.6873pt)..(-8.6000pt,-42.1350pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-47.1350pt)..controls(-8.6000pt,-46.5827pt)and(-9.0477pt,-46.1350pt)..(-9.6000pt,-46.1350pt)..controls(-10.1523pt,-46.1350pt)and(-10.6000pt,-46.5827pt)..(-10.6000pt,-47.1350pt)..controls(-10.6000pt,-47.6873pt)and(-10.1523pt,-48.1350pt)..(-9.6000pt,-48.1350pt)..controls(-9.0477pt,-48.1350pt)and(-8.6000pt,-47.6873pt)..(-8.6000pt,-47.1350pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-42.1350pt)..controls(-5.6000pt,-35.2068pt)and(-8.0000pt,-32.2887pt)..(0.0000pt,-32.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-47.1350pt)..controls(-5.6000pt,-40.2068pt)and(-8.0000pt,-37.2887pt)..(0.0000pt,-37.2887pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-42.1350pt)..controls(-5.6000pt,-49.0632pt)and(-8.0000pt,-51.9812pt)..(0.0000pt,-51.9812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-47.1350pt)..controls(-5.6000pt,-54.0632pt)and(-8.0000pt,-56.9812pt)..(0.0000pt,-56.9812pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-76.7700pt)--(56.0399pt,-76.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-81.7700pt)--(56.0399pt,-81.7700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-76.7700pt)--(56.0399pt,-76.7700pt)--(56.0399pt,-81.7700pt)--(56.0399pt,-81.7700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](53.0399pt,-73.7700pt)--(59.0399pt,-73.7700pt)--(59.0399pt,-84.7700pt)--(53.0399pt,-84.7700pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](57.0399pt,-76.7700pt)..controls(57.0399pt,-76.2177pt)and(56.5922pt,-75.7700pt)..(56.0399pt,-75.7700pt)..controls(55.4877pt,-75.7700pt)and(55.0399pt,-76.2177pt)..(55.0399pt,-76.7700pt)..controls(55.0399pt,-77.3222pt)and(55.4877pt,-77.7700pt)..(56.0399pt,-77.7700pt)..controls(56.5922pt,-77.7700pt)and(57.0399pt,-77.3222pt)..(57.0399pt,-76.7700pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](56.0399pt,-81.7700pt)--(56.0399pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-70.6737pt)--(34.8750pt,-70.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-87.8662pt)--(34.8750pt,-87.8662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](38.8750pt,-74.5775pt)--(45.0399pt,-74.5775pt)--(45.0399pt,-83.9624pt)--(38.8750pt,-83.9624pt)--cycle;
\node[anchor=north west,inner sep=0] at (38.8750pt,-74.5775pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{93}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-70.5775pt)--(49.0399pt,-70.5775pt)--(49.0399pt,-87.9624pt)--(34.8750pt,-87.9624pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-69.1737pt)..controls(34.8750pt,-67.7930pt)and(35.9943pt,-66.6737pt)..(37.3750pt,-66.6737pt)--(46.5399pt,-66.6737pt)..controls(47.9207pt,-66.6737pt)and(49.0399pt,-67.7930pt)..(49.0399pt,-69.1737pt)--(49.0399pt,-89.3662pt)..controls(49.0399pt,-90.7469pt)and(47.9207pt,-91.8662pt)..(46.5399pt,-91.8662pt)--(37.3750pt,-91.8662pt)..controls(35.9943pt,-91.8662pt)and(34.8750pt,-90.7469pt)..(34.8750pt,-89.3662pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-76.7700pt)--(49.0399pt,-76.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](49.0399pt,-81.7700pt)--(49.0399pt,-81.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-70.6737pt)--(34.8750pt,-70.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8750pt,-87.8662pt)--(34.8750pt,-87.8662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-65.6737pt)--(0.0000pt,-65.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-70.6737pt)--(0.0000pt,-70.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-85.3662pt)--(0.0000pt,-85.3662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-90.3662pt)--(0.0000pt,-90.3662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-65.6737pt)--(0.0000pt,-65.6737pt)--(0.0000pt,-70.6737pt)--(0.0000pt,-70.6737pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-62.6737pt)--(3.0000pt,-62.6737pt)--(3.0000pt,-73.6737pt)--(-3.0000pt,-73.6737pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-65.6737pt)..controls(1.0000pt,-65.1214pt)and(0.5523pt,-64.6737pt)..(0.0000pt,-64.6737pt)..controls(-0.5523pt,-64.6737pt)and(-1.0000pt,-65.1214pt)..(-1.0000pt,-65.6737pt)..controls(-1.0000pt,-66.2260pt)and(-0.5523pt,-66.6737pt)..(0.0000pt,-66.6737pt)..controls(0.5523pt,-66.6737pt)and(1.0000pt,-66.2260pt)..(1.0000pt,-65.6737pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-70.6737pt)--(27.8750pt,-70.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-82.8662pt)--(27.8750pt,-82.8662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-87.8662pt)--(27.8750pt,-87.8662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-82.8662pt)--(27.8750pt,-82.8662pt)--(27.8750pt,-87.8662pt)--(27.8750pt,-87.8662pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.8750pt,-79.8662pt)--(30.8750pt,-79.8662pt)--(30.8750pt,-90.8662pt)--(24.8750pt,-90.8662pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8750pt,-82.8662pt)..controls(28.8750pt,-82.3139pt)and(28.4273pt,-81.8662pt)..(27.8750pt,-81.8662pt)..controls(27.3227pt,-81.8662pt)and(26.8750pt,-82.3139pt)..(26.8750pt,-82.8662pt)..controls(26.8750pt,-83.4185pt)and(27.3227pt,-83.8662pt)..(27.8750pt,-83.8662pt)..controls(28.4273pt,-83.8662pt)and(28.8750pt,-83.4185pt)..(28.8750pt,-82.8662pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,-87.8662pt)--(27.8750pt,-87.8662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-85.3662pt)--(7.0000pt,-85.3662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,-80.6737pt)--(16.8750pt,-80.6737pt)--(16.8750pt,-90.0587pt)--(11.0000pt,-90.0587pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,-80.6737pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{94}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-76.6737pt)--(20.8750pt,-76.6737pt)--(20.8750pt,-94.0587pt)--(7.0000pt,-94.0587pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-79.1737pt)..controls(7.0000pt,-77.7930pt)and(8.1193pt,-76.6737pt)..(9.5000pt,-76.6737pt)--(18.3750pt,-76.6737pt)..controls(19.7557pt,-76.6737pt)and(20.8750pt,-77.7930pt)..(20.8750pt,-79.1737pt)--(20.8750pt,-91.5587pt)..controls(20.8750pt,-92.9394pt)and(19.7557pt,-94.0587pt)..(18.3750pt,-94.0587pt)--(9.5000pt,-94.0587pt)..controls(8.1193pt,-94.0587pt)and(7.0000pt,-92.9394pt)..(7.0000pt,-91.5587pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-82.8662pt)--(20.8750pt,-82.8662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-87.8662pt)--(20.8750pt,-87.8662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-85.3662pt)--(7.0000pt,-85.3662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-85.3662pt)--(0.0000pt,-85.3662pt)--(0.0000pt,-90.3662pt)--(0.0000pt,-90.3662pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-82.3662pt)--(3.0000pt,-82.3662pt)--(3.0000pt,-93.3662pt)--(-3.0000pt,-93.3662pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-90.3662pt)..controls(1.0000pt,-89.8139pt)and(0.5523pt,-89.3662pt)..(0.0000pt,-89.3662pt)..controls(-0.5523pt,-89.3662pt)and(-1.0000pt,-89.8139pt)..(-1.0000pt,-90.3662pt)..controls(-1.0000pt,-90.9185pt)and(-0.5523pt,-91.3662pt)..(0.0000pt,-91.3662pt)..controls(0.5523pt,-91.3662pt)and(1.0000pt,-90.9185pt)..(1.0000pt,-90.3662pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-85.3662pt)--(0.0000pt,-85.3662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-75.5200pt)--(-9.6000pt,-75.5200pt)--(-9.6000pt,-80.5200pt)--(-9.6000pt,-80.5200pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-72.5200pt)--(-6.6000pt,-72.5200pt)--(-6.6000pt,-83.5200pt)--(-12.6000pt,-83.5200pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-75.5200pt)..controls(-8.6000pt,-74.9677pt)and(-9.0477pt,-74.5200pt)..(-9.6000pt,-74.5200pt)..controls(-10.1523pt,-74.5200pt)and(-10.6000pt,-74.9677pt)..(-10.6000pt,-75.5200pt)..controls(-10.6000pt,-76.0722pt)and(-10.1523pt,-76.5200pt)..(-9.6000pt,-76.5200pt)..controls(-9.0477pt,-76.5200pt)and(-8.6000pt,-76.0722pt)..(-8.6000pt,-75.5200pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-80.5200pt)..controls(-8.6000pt,-79.9677pt)and(-9.0477pt,-79.5200pt)..(-9.6000pt,-79.5200pt)..controls(-10.1523pt,-79.5200pt)and(-10.6000pt,-79.9677pt)..(-10.6000pt,-80.5200pt)..controls(-10.6000pt,-81.0722pt)and(-10.1523pt,-81.5200pt)..(-9.6000pt,-81.5200pt)..controls(-9.0477pt,-81.5200pt)and(-8.6000pt,-81.0722pt)..(-8.6000pt,-80.5200pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-75.5200pt)..controls(-5.6000pt,-68.5918pt)and(-8.0000pt,-65.6737pt)..(0.0000pt,-65.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-80.5200pt)..controls(-5.6000pt,-73.5918pt)and(-8.0000pt,-70.6737pt)..(0.0000pt,-70.6737pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-75.5200pt)..controls(-5.6000pt,-82.4482pt)and(-8.0000pt,-85.3662pt)..(0.0000pt,-85.3662pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-80.5200pt)..controls(-5.6000pt,-87.4482pt)and(-8.0000pt,-90.3662pt)..(0.0000pt,-90.3662pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-58.8275pt)--(-19.2000pt,-58.8275pt)--(-19.2000pt,-63.8275pt)--(-19.2000pt,-63.8275pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,-55.8275pt)--(-16.2000pt,-55.8275pt)--(-16.2000pt,-66.8275pt)--(-22.2000pt,-66.8275pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,-58.8275pt)..controls(-18.2000pt,-58.2752pt)and(-18.6477pt,-57.8275pt)..(-19.2000pt,-57.8275pt)..controls(-19.7523pt,-57.8275pt)and(-20.2000pt,-58.2752pt)..(-20.2000pt,-58.8275pt)..controls(-20.2000pt,-59.3798pt)and(-19.7523pt,-59.8275pt)..(-19.2000pt,-59.8275pt)..controls(-18.6477pt,-59.8275pt)and(-18.2000pt,-59.3798pt)..(-18.2000pt,-58.8275pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,-63.8275pt)..controls(-18.2000pt,-63.2752pt)and(-18.6477pt,-62.8275pt)..(-19.2000pt,-62.8275pt)..controls(-19.7523pt,-62.8275pt)and(-20.2000pt,-63.2752pt)..(-20.2000pt,-63.8275pt)..controls(-20.2000pt,-64.3798pt)and(-19.7523pt,-64.8275pt)..(-19.2000pt,-64.8275pt)..controls(-18.6477pt,-64.8275pt)and(-18.2000pt,-64.3798pt)..(-18.2000pt,-63.8275pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-58.8275pt)..controls(-15.2000pt,-51.8993pt)and(-17.6000pt,-42.1350pt)..(-9.6000pt,-42.1350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-63.8275pt)..controls(-15.2000pt,-56.8993pt)and(-17.6000pt,-47.1350pt)..(-9.6000pt,-47.1350pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-58.8275pt)..controls(-15.2000pt,-65.7557pt)and(-17.6000pt,-75.5200pt)..(-9.6000pt,-75.5200pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,-63.8275pt)..controls(-15.2000pt,-70.7557pt)and(-17.6000pt,-80.5200pt)..(-9.6000pt,-80.5200pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,-30.6637pt)--(-28.8000pt,-30.6637pt)--(-28.8000pt,-35.6637pt)--(-28.8000pt,-35.6637pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-31.8000pt,-27.6637pt)--(-25.8000pt,-27.6637pt)--(-25.8000pt,-38.6637pt)--(-31.8000pt,-38.6637pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-27.8000pt,-30.6637pt)..controls(-27.8000pt,-30.1114pt)and(-28.2477pt,-29.6637pt)..(-28.8000pt,-29.6637pt)..controls(-29.3523pt,-29.6637pt)and(-29.8000pt,-30.1114pt)..(-29.8000pt,-30.6637pt)..controls(-29.8000pt,-31.2160pt)and(-29.3523pt,-31.6637pt)..(-28.8000pt,-31.6637pt)..controls(-28.2477pt,-31.6637pt)and(-27.8000pt,-31.2160pt)..(-27.8000pt,-30.6637pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-27.8000pt,-35.6637pt)..controls(-27.8000pt,-35.1114pt)and(-28.2477pt,-34.6637pt)..(-28.8000pt,-34.6637pt)..controls(-29.3523pt,-34.6637pt)and(-29.8000pt,-35.1114pt)..(-29.8000pt,-35.6637pt)..controls(-29.8000pt,-36.2160pt)and(-29.3523pt,-36.6637pt)..(-28.8000pt,-36.6637pt)..controls(-28.2477pt,-36.6637pt)and(-27.8000pt,-36.2160pt)..(-27.8000pt,-35.6637pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,-30.6637pt)..controls(-24.8000pt,-23.7355pt)and(-27.2000pt,-2.5000pt)..(-19.2000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,-35.6637pt)..controls(-24.8000pt,-28.7355pt)and(-27.2000pt,-7.5000pt)..(-19.2000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,-30.6637pt)..controls(-24.8000pt,-37.5919pt)and(-27.2000pt,-58.8275pt)..(-19.2000pt,-58.8275pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.8000pt,-35.6637pt)..controls(-24.8000pt,-42.5919pt)and(-27.2000pt,-63.8275pt)..(-19.2000pt,-63.8275pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.2000pt,27.9425pt)--(-19.2000pt,27.9425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.2000pt,22.9425pt)--(-19.2000pt,22.9425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](76.0449pt,43.3850pt)--(83.0449pt,43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](76.0449pt,4.0575pt)--(83.0449pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,45.8850pt)--(27.8750pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,17.5000pt)--(27.8750pt,17.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,0.0000pt)--(27.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,45.8850pt)--(51.6399pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,13.4425pt)--(51.6399pt,13.4425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,4.0575pt)--(51.6399pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,45.8850pt)--(61.2399pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,40.8850pt)--(61.2399pt,40.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,4.0575pt)--(61.2399pt,4.0575pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](65.2399pt,45.6300pt)--(72.0449pt,45.6300pt)--(72.0449pt,41.1400pt)--(65.2399pt,41.1400pt)--cycle;
\node[anchor=north west,inner sep=0] at (65.2399pt,45.6300pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{95}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,49.6300pt)--(76.0449pt,49.6300pt)--(76.0449pt,37.1400pt)--(61.2399pt,37.1400pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,47.3850pt)..controls(61.2399pt,48.7657pt)and(62.3592pt,49.8850pt)..(63.7399pt,49.8850pt)--(73.5449pt,49.8850pt)..controls(74.9256pt,49.8850pt)and(76.0449pt,48.7657pt)..(76.0449pt,47.3850pt)--(76.0449pt,39.3850pt)..controls(76.0449pt,38.0043pt)and(74.9256pt,36.8850pt)..(73.5449pt,36.8850pt)--(63.7399pt,36.8850pt)..controls(62.3592pt,36.8850pt)and(61.2399pt,38.0043pt)..(61.2399pt,39.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](76.0449pt,43.3850pt)--(76.0449pt,43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,45.8850pt)--(61.2399pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,40.8850pt)--(61.2399pt,40.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](61.2399pt,4.0575pt)--(76.0449pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,45.8850pt)--(61.2399pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,13.4425pt)..controls(59.6399pt,13.4425pt)and(53.2399pt,40.8850pt)..(61.2399pt,40.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,4.0575pt)--(61.2399pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,45.8850pt)--(51.6399pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,13.4425pt)--(37.4750pt,13.4425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,4.0575pt)--(37.4750pt,4.0575pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](41.4750pt,13.4425pt)--(47.6399pt,13.4425pt)--(47.6399pt,4.0575pt)--(41.4750pt,4.0575pt)--cycle;
\node[anchor=north west,inner sep=0] at (41.4750pt,13.4425pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{96}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,17.4425pt)--(51.6399pt,17.4425pt)--(51.6399pt,0.0575pt)--(37.4750pt,0.0575pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,14.9425pt)..controls(37.4750pt,16.3232pt)and(38.5943pt,17.4425pt)..(39.9750pt,17.4425pt)--(49.1399pt,17.4425pt)..controls(50.5207pt,17.4425pt)and(51.6399pt,16.3232pt)..(51.6399pt,14.9425pt)--(51.6399pt,2.5575pt)..controls(51.6399pt,1.1768pt)and(50.5207pt,0.0575pt)..(49.1399pt,0.0575pt)--(39.9750pt,0.0575pt)..controls(38.5943pt,0.0575pt)and(37.4750pt,1.1768pt)..(37.4750pt,2.5575pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,13.4425pt)--(51.6399pt,13.4425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](51.6399pt,4.0575pt)--(51.6399pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,13.4425pt)--(37.4750pt,13.4425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](37.4750pt,4.0575pt)--(37.4750pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,17.5000pt)..controls(35.8750pt,17.5000pt)and(29.4750pt,4.0575pt)..(37.4750pt,4.0575pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,0.0000pt)..controls(35.8750pt,0.0000pt)and(29.4750pt,13.4425pt)..(37.4750pt,13.4425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,43.3850pt)--(-9.6000pt,43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,38.3850pt)--(-9.6000pt,38.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,12.5000pt)--(-9.6000pt,12.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,7.5000pt)--(-9.6000pt,7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,45.8850pt)--(18.2750pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,40.8850pt)--(18.2750pt,40.8850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](18.2750pt,45.8850pt)--(18.2750pt,45.8850pt)--(18.2750pt,40.8850pt)--(18.2750pt,40.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](15.2750pt,48.8850pt)--(21.2750pt,48.8850pt)--(21.2750pt,37.8850pt)--(15.2750pt,37.8850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2750pt,40.8850pt)..controls(19.2750pt,41.4373pt)and(18.8273pt,41.8850pt)..(18.2750pt,41.8850pt)..controls(17.7227pt,41.8850pt)and(17.2750pt,41.4373pt)..(17.2750pt,40.8850pt)..controls(17.2750pt,40.3327pt)and(17.7227pt,39.8850pt)..(18.2750pt,39.8850pt)..controls(18.8273pt,39.8850pt)and(19.2750pt,40.3327pt)..(19.2750pt,40.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](18.2750pt,45.8850pt)--(27.8750pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,43.3850pt)--(-2.6000pt,43.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.4000pt,48.0775pt)--(7.2750pt,48.0775pt)--(7.2750pt,38.6925pt)--(1.4000pt,38.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (1.4000pt,48.0775pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{97}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,52.0775pt)--(11.2750pt,52.0775pt)--(11.2750pt,34.6925pt)--(-2.6000pt,34.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,49.5775pt)..controls(-2.6000pt,50.9582pt)and(-1.4807pt,52.0775pt)..(-0.1000pt,52.0775pt)--(8.7750pt,52.0775pt)..controls(10.1557pt,52.0775pt)and(11.2750pt,50.9582pt)..(11.2750pt,49.5775pt)--(11.2750pt,37.1925pt)..controls(11.2750pt,35.8118pt)and(10.1557pt,34.6925pt)..(8.7750pt,34.6925pt)--(-0.1000pt,34.6925pt)..controls(-1.4807pt,34.6925pt)and(-2.6000pt,35.8118pt)..(-2.6000pt,37.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,45.8850pt)--(11.2750pt,45.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.2750pt,40.8850pt)--(11.2750pt,40.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-2.6000pt,43.3850pt)--(-2.6000pt,43.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,43.3850pt)--(-9.6000pt,43.3850pt)--(-9.6000pt,38.3850pt)--(-9.6000pt,38.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,46.3850pt)--(-6.6000pt,46.3850pt)--(-6.6000pt,35.3850pt)--(-12.6000pt,35.3850pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,38.3850pt)..controls(-8.6000pt,38.9373pt)and(-9.0477pt,39.3850pt)..(-9.6000pt,39.3850pt)..controls(-10.1523pt,39.3850pt)and(-10.6000pt,38.9373pt)..(-10.6000pt,38.3850pt)..controls(-10.6000pt,37.8327pt)and(-10.1523pt,37.3850pt)..(-9.6000pt,37.3850pt)..controls(-9.0477pt,37.3850pt)and(-8.6000pt,37.8327pt)..(-8.6000pt,38.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,43.3850pt)--(-9.6000pt,43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,20.0000pt)--(0.0000pt,20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,15.0000pt)--(0.0000pt,15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,22.5000pt)--(27.8750pt,22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,17.5000pt)--(27.8750pt,17.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,22.5000pt)--(27.8750pt,22.5000pt)--(27.8750pt,17.5000pt)--(27.8750pt,17.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.8750pt,25.5000pt)--(30.8750pt,25.5000pt)--(30.8750pt,14.5000pt)--(24.8750pt,14.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](28.8750pt,22.5000pt)..controls(28.8750pt,23.0523pt)and(28.4273pt,23.5000pt)..(27.8750pt,23.5000pt)..controls(27.3227pt,23.5000pt)and(26.8750pt,23.0523pt)..(26.8750pt,22.5000pt)..controls(26.8750pt,21.9477pt)and(27.3227pt,21.5000pt)..(27.8750pt,21.5000pt)..controls(28.4273pt,21.5000pt)and(28.8750pt,21.9477pt)..(28.8750pt,22.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](27.8750pt,17.5000pt)--(27.8750pt,17.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,20.0000pt)--(7.0000pt,20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,24.6925pt)--(16.8750pt,24.6925pt)--(16.8750pt,15.3075pt)--(11.0000pt,15.3075pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,24.6925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{98}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,28.6925pt)--(20.8750pt,28.6925pt)--(20.8750pt,11.3075pt)--(7.0000pt,11.3075pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,26.1925pt)..controls(7.0000pt,27.5732pt)and(8.1193pt,28.6925pt)..(9.5000pt,28.6925pt)--(18.3750pt,28.6925pt)..controls(19.7557pt,28.6925pt)and(20.8750pt,27.5732pt)..(20.8750pt,26.1925pt)--(20.8750pt,13.8075pt)..controls(20.8750pt,12.4268pt)and(19.7557pt,11.3075pt)..(18.3750pt,11.3075pt)--(9.5000pt,11.3075pt)..controls(8.1193pt,11.3075pt)and(7.0000pt,12.4268pt)..(7.0000pt,13.8075pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,22.5000pt)--(20.8750pt,22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,17.5000pt)--(20.8750pt,17.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,20.0000pt)--(7.0000pt,20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,20.0000pt)--(0.0000pt,20.0000pt)--(0.0000pt,15.0000pt)--(0.0000pt,15.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,23.0000pt)--(3.0000pt,23.0000pt)--(3.0000pt,12.0000pt)--(-3.0000pt,12.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,15.0000pt)..controls(1.0000pt,15.5523pt)and(0.5523pt,16.0000pt)..(0.0000pt,16.0000pt)..controls(-0.5523pt,16.0000pt)and(-1.0000pt,15.5523pt)..(-1.0000pt,15.0000pt)..controls(-1.0000pt,14.4477pt)and(-0.5523pt,14.0000pt)..(0.0000pt,14.0000pt)..controls(0.5523pt,14.0000pt)and(1.0000pt,14.4477pt)..(1.0000pt,15.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,20.0000pt)--(0.0000pt,20.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,5.0000pt)--(0.0000pt,5.0000pt)--(0.0000pt,0.0000pt)--(0.0000pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,8.0000pt)--(3.0000pt,8.0000pt)--(3.0000pt,-3.0000pt)--(-3.0000pt,-3.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,5.0000pt)..controls(1.0000pt,5.5523pt)and(0.5523pt,6.0000pt)..(0.0000pt,6.0000pt)..controls(-0.5523pt,6.0000pt)and(-1.0000pt,5.5523pt)..(-1.0000pt,5.0000pt)..controls(-1.0000pt,4.4477pt)and(-0.5523pt,4.0000pt)..(0.0000pt,4.0000pt)..controls(0.5523pt,4.0000pt)and(1.0000pt,4.4477pt)..(1.0000pt,5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(27.8750pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,12.5000pt)--(-9.6000pt,12.5000pt)--(-9.6000pt,7.5000pt)--(-9.6000pt,7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,15.5000pt)--(-6.6000pt,15.5000pt)--(-6.6000pt,4.5000pt)--(-12.6000pt,4.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,12.5000pt)..controls(-8.6000pt,13.0523pt)and(-9.0477pt,13.5000pt)..(-9.6000pt,13.5000pt)..controls(-10.1523pt,13.5000pt)and(-10.6000pt,13.0523pt)..(-10.6000pt,12.5000pt)..controls(-10.6000pt,11.9477pt)and(-10.1523pt,11.5000pt)..(-9.6000pt,11.5000pt)..controls(-9.0477pt,11.5000pt)and(-8.6000pt,11.9477pt)..(-8.6000pt,12.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,7.5000pt)..controls(-8.6000pt,8.0523pt)and(-9.0477pt,8.5000pt)..(-9.6000pt,8.5000pt)..controls(-10.1523pt,8.5000pt)and(-10.6000pt,8.0523pt)..(-10.6000pt,7.5000pt)..controls(-10.6000pt,6.9477pt)and(-10.1523pt,6.5000pt)..(-9.6000pt,6.5000pt)..controls(-9.0477pt,6.5000pt)and(-8.6000pt,6.9477pt)..(-8.6000pt,7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,12.5000pt)..controls(-5.6000pt,19.4282pt)and(-8.0000pt,20.0000pt)..(0.0000pt,20.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,7.5000pt)..controls(-5.6000pt,14.4282pt)and(-8.0000pt,15.0000pt)..(0.0000pt,15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,12.5000pt)..controls(-5.6000pt,5.5718pt)and(-8.0000pt,5.0000pt)..(0.0000pt,5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,7.5000pt)..controls(-5.6000pt,0.5718pt)and(-8.0000pt,0.0000pt)..(0.0000pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,27.9425pt)--(-19.2000pt,27.9425pt)--(-19.2000pt,22.9425pt)--(-19.2000pt,22.9425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.2000pt,30.9425pt)--(-16.2000pt,30.9425pt)--(-16.2000pt,19.9425pt)--(-22.2000pt,19.9425pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,27.9425pt)..controls(-18.2000pt,28.4948pt)and(-18.6477pt,28.9425pt)..(-19.2000pt,28.9425pt)..controls(-19.7523pt,28.9425pt)and(-20.2000pt,28.4948pt)..(-20.2000pt,27.9425pt)..controls(-20.2000pt,27.3902pt)and(-19.7523pt,26.9425pt)..(-19.2000pt,26.9425pt)..controls(-18.6477pt,26.9425pt)and(-18.2000pt,27.3902pt)..(-18.2000pt,27.9425pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.2000pt,22.9425pt)..controls(-18.2000pt,23.4948pt)and(-18.6477pt,23.9425pt)..(-19.2000pt,23.9425pt)..controls(-19.7523pt,23.9425pt)and(-20.2000pt,23.4948pt)..(-20.2000pt,22.9425pt)..controls(-20.2000pt,22.3902pt)and(-19.7523pt,21.9425pt)..(-19.2000pt,21.9425pt)..controls(-18.6477pt,21.9425pt)and(-18.2000pt,22.3902pt)..(-18.2000pt,22.9425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,27.9425pt)..controls(-15.2000pt,34.8707pt)and(-17.6000pt,43.3850pt)..(-9.6000pt,43.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,22.9425pt)..controls(-15.2000pt,29.8707pt)and(-17.6000pt,38.3850pt)..(-9.6000pt,38.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,27.9425pt)..controls(-15.2000pt,21.0143pt)and(-17.6000pt,12.5000pt)..(-9.6000pt,12.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-19.2000pt,22.9425pt)..controls(-15.2000pt,16.0143pt)and(-17.6000pt,7.5000pt)..(-9.6000pt,7.5000pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-10.0000pt)--(-9.6000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-15.0000pt)--(-9.6000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](78.6449pt,-2.5000pt)--(85.6449pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](78.6449pt,-20.6250pt)--(85.6449pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(7.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-22.5000pt)--(7.0000pt,-22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,0.0000pt)--(20.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-5.0000pt)--(20.8750pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-22.5000pt)--(20.8750pt,-22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,0.0000pt)--(30.4750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,-13.7500pt)--(30.4750pt,-13.7500pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,-22.5000pt)--(30.4750pt,-22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,0.0000pt)--(54.2399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-15.6250pt)--(54.2399pt,-15.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-20.6250pt)--(54.2399pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,0.0000pt)--(63.8399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,-5.0000pt)--(63.8399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,-20.6250pt)--(63.8399pt,-20.6250pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](67.8399pt,-0.2550pt)--(74.6449pt,-0.2550pt)--(74.6449pt,-4.7450pt)--(67.8399pt,-4.7450pt)--cycle;
\node[anchor=north west,inner sep=0] at (67.8399pt,-0.2550pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{99}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,3.7450pt)--(78.6449pt,3.7450pt)--(78.6449pt,-8.7450pt)--(63.8399pt,-8.7450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,1.5000pt)..controls(63.8399pt,2.8807pt)and(64.9592pt,4.0000pt)..(66.3399pt,4.0000pt)--(76.1449pt,4.0000pt)..controls(77.5256pt,4.0000pt)and(78.6449pt,2.8807pt)..(78.6449pt,1.5000pt)--(78.6449pt,-6.5000pt)..controls(78.6449pt,-7.8807pt)and(77.5256pt,-9.0000pt)..(76.1449pt,-9.0000pt)--(66.3399pt,-9.0000pt)..controls(64.9592pt,-9.0000pt)and(63.8399pt,-7.8807pt)..(63.8399pt,-6.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](78.6449pt,-2.5000pt)--(78.6449pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,0.0000pt)--(63.8399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,-5.0000pt)--(63.8399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](63.8399pt,-20.6250pt)--(78.6449pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,0.0000pt)--(63.8399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-15.6250pt)..controls(62.2399pt,-15.6250pt)and(55.8399pt,-5.0000pt)..(63.8399pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-20.6250pt)--(63.8399pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,0.0000pt)--(54.2399pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-15.6250pt)--(40.0750pt,-15.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-20.6250pt)--(40.0750pt,-20.6250pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](44.0750pt,-13.4325pt)--(50.2399pt,-13.4325pt)--(50.2399pt,-22.8175pt)--(44.0750pt,-22.8175pt)--cycle;
\node[anchor=north west,inner sep=0] at (44.0750pt,-13.4325pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{100}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-9.4325pt)--(54.2399pt,-9.4325pt)--(54.2399pt,-26.8175pt)--(40.0750pt,-26.8175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-11.9325pt)..controls(40.0750pt,-10.5518pt)and(41.1943pt,-9.4325pt)..(42.5750pt,-9.4325pt)--(51.7399pt,-9.4325pt)..controls(53.1207pt,-9.4325pt)and(54.2399pt,-10.5518pt)..(54.2399pt,-11.9325pt)--(54.2399pt,-24.3175pt)..controls(54.2399pt,-25.6982pt)and(53.1207pt,-26.8175pt)..(51.7399pt,-26.8175pt)--(42.5750pt,-26.8175pt)..controls(41.1943pt,-26.8175pt)and(40.0750pt,-25.6982pt)..(40.0750pt,-24.3175pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-15.6250pt)--(54.2399pt,-15.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](54.2399pt,-20.6250pt)--(54.2399pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-15.6250pt)--(40.0750pt,-15.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](40.0750pt,-20.6250pt)--(40.0750pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,-13.7500pt)..controls(38.4750pt,-13.7500pt)and(32.0750pt,-20.6250pt)..(40.0750pt,-20.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](30.4750pt,-22.5000pt)..controls(38.4750pt,-22.5000pt)and(32.0750pt,-15.6250pt)..(40.0750pt,-15.6250pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,0.0000pt)--(30.4750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-5.0000pt)..controls(28.8750pt,-5.0000pt)and(22.4750pt,-13.7500pt)..(30.4750pt,-13.7500pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-22.5000pt)--(30.4750pt,-22.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](11.0000pt,2.1925pt)--(16.8750pt,2.1925pt)--(16.8750pt,-7.1925pt)--(11.0000pt,-7.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,2.1925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{101}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,6.1925pt)--(20.8750pt,6.1925pt)--(20.8750pt,-11.1925pt)--(7.0000pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,3.6925pt)..controls(7.0000pt,5.0732pt)and(8.1193pt,6.1925pt)..(9.5000pt,6.1925pt)--(18.3750pt,6.1925pt)..controls(19.7557pt,6.1925pt)and(20.8750pt,5.0732pt)..(20.8750pt,3.6925pt)--(20.8750pt,-8.6925pt)..controls(20.8750pt,-10.0732pt)and(19.7557pt,-11.1925pt)..(18.3750pt,-11.1925pt)--(9.5000pt,-11.1925pt)..controls(8.1193pt,-11.1925pt)and(7.0000pt,-10.0732pt)..(7.0000pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,0.0000pt)--(20.8750pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,-5.0000pt)--(20.8750pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-2.5000pt)--(7.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-22.5000pt)--(20.8750pt,-22.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-7.5000pt)--(0.0000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-17.5000pt)--(0.0000pt,-17.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-22.5000pt)--(0.0000pt,-22.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt)--(0.0000pt,-7.5000pt)--(0.0000pt,-7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,0.5000pt)--(3.0000pt,0.5000pt)--(3.0000pt,-10.5000pt)--(-3.0000pt,-10.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-7.5000pt)..controls(1.0000pt,-6.9477pt)and(0.5523pt,-6.5000pt)..(0.0000pt,-6.5000pt)..controls(-0.5523pt,-6.5000pt)and(-1.0000pt,-6.9477pt)..(-1.0000pt,-7.5000pt)..controls(-1.0000pt,-8.0523pt)and(-0.5523pt,-8.5000pt)..(0.0000pt,-8.5000pt)..controls(0.5523pt,-8.5000pt)and(1.0000pt,-8.0523pt)..(1.0000pt,-7.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-2.5000pt)--(0.0000pt,-2.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-17.5000pt)--(0.0000pt,-17.5000pt)--(0.0000pt,-22.5000pt)--(0.0000pt,-22.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-3.0000pt,-14.5000pt)--(3.0000pt,-14.5000pt)--(3.0000pt,-25.5000pt)--(-3.0000pt,-25.5000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](1.0000pt,-17.5000pt)..controls(1.0000pt,-16.9477pt)and(0.5523pt,-16.5000pt)..(0.0000pt,-16.5000pt)..controls(-0.5523pt,-16.5000pt)and(-1.0000pt,-16.9477pt)..(-1.0000pt,-17.5000pt)..controls(-1.0000pt,-18.0523pt)and(-0.5523pt,-18.5000pt)..(0.0000pt,-18.5000pt)..controls(0.5523pt,-18.5000pt)and(1.0000pt,-18.0523pt)..(1.0000pt,-17.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-22.5000pt)--(0.0000pt,-22.5000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-10.0000pt)--(-9.6000pt,-10.0000pt)--(-9.6000pt,-15.0000pt)--(-9.6000pt,-15.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-7.0000pt)--(-6.6000pt,-7.0000pt)--(-6.6000pt,-18.0000pt)--(-12.6000pt,-18.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-10.0000pt)..controls(-8.6000pt,-9.4477pt)and(-9.0477pt,-9.0000pt)..(-9.6000pt,-9.0000pt)..controls(-10.1523pt,-9.0000pt)and(-10.6000pt,-9.4477pt)..(-10.6000pt,-10.0000pt)..controls(-10.6000pt,-10.5523pt)and(-10.1523pt,-11.0000pt)..(-9.6000pt,-11.0000pt)..controls(-9.0477pt,-11.0000pt)and(-8.6000pt,-10.5523pt)..(-8.6000pt,-10.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-15.0000pt)..controls(-8.6000pt,-14.4477pt)and(-9.0477pt,-14.0000pt)..(-9.6000pt,-14.0000pt)..controls(-10.1523pt,-14.0000pt)and(-10.6000pt,-14.4477pt)..(-10.6000pt,-15.0000pt)..controls(-10.6000pt,-15.5523pt)and(-10.1523pt,-16.0000pt)..(-9.6000pt,-16.0000pt)..controls(-9.0477pt,-16.0000pt)and(-8.6000pt,-15.5523pt)..(-8.6000pt,-15.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-10.0000pt)..controls(-5.6000pt,-3.0718pt)and(-8.0000pt,-2.5000pt)..(0.0000pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-15.0000pt)..controls(-5.6000pt,-8.0718pt)and(-8.0000pt,-7.5000pt)..(0.0000pt,-7.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-10.0000pt)..controls(-5.6000pt,-16.9282pt)and(-8.0000pt,-17.5000pt)..(0.0000pt,-17.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-15.0000pt)..controls(-5.6000pt,-21.9282pt)and(-8.0000pt,-22.5000pt)..(0.0000pt,-22.5000pt);
\end{tikzpicture}} =
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.2399pt,-2.5000pt)--(-47.2399pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.2399pt,-15.0000pt)--(-47.2399pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-2.5000pt)--(31.4050pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-15.0000pt)--(31.4050pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-33.3650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)--(-33.3650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-15.0000pt)--(-33.3650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,0.0000pt)--(-23.7650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.0000pt)--(-23.7650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-15.0000pt)--(-23.7650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(0.0000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.6000pt,-0.2550pt)--(20.4050pt,-0.2550pt)--(20.4050pt,-4.7450pt)--(13.6000pt,-4.7450pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,-0.2550pt){\savebox{\marxupbox}{{\ensuremath{ω}}}\immediate\write\boxesfile{102}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,3.7450pt)--(24.4050pt,3.7450pt)--(24.4050pt,-8.7450pt)--(9.6000pt,-8.7450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,1.5000pt)..controls(9.6000pt,2.8807pt)and(10.7193pt,4.0000pt)..(12.1000pt,4.0000pt)--(21.9050pt,4.0000pt)..controls(23.2857pt,4.0000pt)and(24.4050pt,2.8807pt)..(24.4050pt,1.5000pt)--(24.4050pt,-6.5000pt)..controls(24.4050pt,-7.8807pt)and(23.2857pt,-9.0000pt)..(21.9050pt,-9.0000pt)--(12.1000pt,-9.0000pt)..controls(10.7193pt,-9.0000pt)and(9.6000pt,-7.8807pt)..(9.6000pt,-6.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.4050pt,-2.5000pt)--(24.4050pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-5.0000pt)--(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-15.0000pt)--(24.4050pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)..controls(8.0000pt,-10.0000pt)and(1.6000pt,-5.0000pt)..(9.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(9.6000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-10.0000pt)--(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-15.0000pt)--(-14.1650pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,-7.8075pt)--(-4.0000pt,-7.8075pt)--(-4.0000pt,-17.1925pt)--(-10.1650pt,-17.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,-7.8075pt){\savebox{\marxupbox}{{\ensuremath{ψ}}}\immediate\write\boxesfile{103}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-3.8075pt)--(0.0000pt,-3.8075pt)--(0.0000pt,-21.1925pt)--(-14.1650pt,-21.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-6.3075pt)..controls(-14.1650pt,-4.9268pt)and(-13.0457pt,-3.8075pt)..(-11.6650pt,-3.8075pt)--(-2.5000pt,-3.8075pt)..controls(-1.1193pt,-3.8075pt)and(0.0000pt,-4.9268pt)..(0.0000pt,-6.3075pt)--(0.0000pt,-18.6925pt)..controls(0.0000pt,-20.0732pt)and(-1.1193pt,-21.1925pt)..(-2.5000pt,-21.1925pt)--(-11.6650pt,-21.1925pt)..controls(-13.0457pt,-21.1925pt)and(-14.1650pt,-20.0732pt)..(-14.1650pt,-18.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(0.0000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-15.0000pt)--(0.0000pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-10.0000pt)--(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-15.0000pt)--(-14.1650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.0000pt)..controls(-15.7650pt,-10.0000pt)and(-22.1650pt,-15.0000pt)..(-14.1650pt,-15.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-15.0000pt)..controls(-15.7650pt,-15.0000pt)and(-22.1650pt,-10.0000pt)..(-14.1650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-23.7650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)..controls(-25.3650pt,-5.0000pt)and(-31.7650pt,-10.0000pt)..(-23.7650pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-15.0000pt)--(-23.7650pt,-15.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-43.2399pt,2.1925pt)--(-37.3650pt,2.1925pt)--(-37.3650pt,-7.1925pt)--(-43.2399pt,-7.1925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-43.2399pt,2.1925pt){\savebox{\marxupbox}{{\ensuremath{φ}}}\immediate\write\boxesfile{104}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,6.1925pt)--(-33.3650pt,6.1925pt)--(-33.3650pt,-11.1925pt)--(-47.2399pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,3.6925pt)..controls(-47.2399pt,5.0732pt)and(-46.1207pt,6.1925pt)..(-44.7399pt,6.1925pt)--(-35.8650pt,6.1925pt)..controls(-34.4843pt,6.1925pt)and(-33.3650pt,5.0732pt)..(-33.3650pt,3.6925pt)--(-33.3650pt,-8.6925pt)..controls(-33.3650pt,-10.0732pt)and(-34.4843pt,-11.1925pt)..(-35.8650pt,-11.1925pt)--(-44.7399pt,-11.1925pt)..controls(-46.1207pt,-11.1925pt)and(-47.2399pt,-10.0732pt)..(-47.2399pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,0.0000pt)--(-33.3650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-33.3650pt,-5.0000pt)--(-33.3650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,-2.5000pt)--(-47.2399pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-47.2399pt,-15.0000pt)--(-33.3650pt,-15.0000pt);
\end{tikzpicture}}\caption{Example of reduction
steps.}\label{105}\end{figure}\cref{105}.
We remark first that the above procedure is terminating, because
every transformation reduces the size of the multary merge, as in the
proof of \cref{70}. The same lemma also tells us
that what remains after a reduction step is the computational prefix
of the morphism, which is itself protolinear and thus subject to
reduction by the same procedure.
Considering all possible re-associations of morphisms and testing for
equal prefixes is expensive. Therefore in our implementation we
maintain the arguments of \ensuremath{\bigtriangleup} as a sorted list of free
cartesian morphisms, \ensuremath{\mathsf{fs}}.
This ordering is defined lexicographically, considering the components
of a composition in computational order (right to left in textual
order). Additionally, when comparing \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}} and \ensuremath{\mathsf{f'}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g'}},
we ensure that neither \ensuremath{\mathsf{g}} nor \ensuremath{\mathsf{g'}} are compositions
themselves (otherwise we re-associate compositions). This choice of
morphism ordering has two consequences. First, if the morphisms \ensuremath{π₁\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} and
\ensuremath{π₂\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} are in the sorted list of arguments \ensuremath{\mathsf{fs}}, they
must be adjacent to each other: so such a pair is easy to find.
Second, \ensuremath{\mathsf{f}} and \ensuremath{\mathsf{f'}} are compared only when \ensuremath{\mathsf{g}} and
\ensuremath{\mathsf{g'}} are equal, and this is important in what follows.
One final question remains:
how do we arrange to compare \ensuremath{\mathsf{g}} and
\ensuremath{\mathsf{g'}} if they are generators (say \ensuremath{\mathsf{g}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{φ}} and \ensuremath{\mathsf{g'}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{ψ}})? Do
we need to assume a decidable ordering on them? Perhaps surprisingly,
the answer is \emph{no}. Indeed, whenever we would need to compare two generators in the
reduction procedure, it turns out that they are necessarily equal.
This property can be explained by the conjunction of the following two
facts. 1. we compare morphisms only if they have the same source. That
is, when we compare \ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} and \ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f'}}, we consider the generators φ
and ψ only if we already know that \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{f'}} (thanks to using the lexicographical
ordering described above). 2. two generators which have the same
source are necessarily equal. This second property is grounded in
linearity: the same intermediate result can never be used more than
once. Consequently if a generator φ is fed an intermediate result
\ensuremath{\mathsf{x}}, this same \ensuremath{\mathsf{x}} can never be fed to a \emph{different} generator ψ. (We can end up with two copies of generators in
the representation because \ensuremath{\mathsf{split}} makes such copies.)
\begin{mdframed}[linewidth=0pt,hidealllines,innerleftmargin=0pt,innerrightmargin=0pt,backgroundcolor=gray!15]Because we assume that we have two encoded generators φ and ψ with the
same source, the situation corresponds to them being embedded in a
single a morphism of the form
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{h}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}.\end{list}
We start by proving the wanted result, but make a couple of additional
assumptions which we discharge later.
\begin{lemma}{}If \ensuremath{\mathsf{h}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}} is
pseudolinear and \ensuremath{\mathsf{h}} discards neither the output of φ nor of ψ, then
\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{ψ}}.\label{106}\end{lemma}\begin{proof}
We have the following equivalence:
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{h}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{ψ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{h}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{φ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{ψ}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0muδ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{▵}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}
So the morphism can be depicted as follows:
\begin{center}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-58.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.3800pt,-2.5000pt)--(27.3800pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,11.6925pt)--(-41.8650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-28.3850pt)--(-41.8650pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,23.3850pt)--(7.0000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-28.3850pt)--(7.0000pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](11.0000pt,0.9475pt)--(16.3800pt,0.9475pt)--(16.3800pt,-5.9475pt)--(11.0000pt,-5.9475pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,0.9475pt){\savebox{\marxupbox}{{h}}\immediate\write\boxesfile{107}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,4.9475pt)--(20.3800pt,4.9475pt)--(20.3800pt,-9.9475pt)--(7.0000pt,-9.9475pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,27.3850pt)--(20.3800pt,27.3850pt)--(20.3800pt,-32.3850pt)--(7.0000pt,-32.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.3800pt,-2.5000pt)--(20.3800pt,-2.5000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,23.3850pt)--(7.0000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-28.3850pt)--(7.0000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,11.6925pt)--(-23.7650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,23.3850pt)--(-14.1650pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.0200pt,28.0775pt)--(-4.1450pt,28.0775pt)--(-4.1450pt,18.6925pt)--(-10.0200pt,18.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.0200pt,28.0775pt){\savebox{\marxupbox}{{φ}}\immediate\write\boxesfile{108}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,32.0775pt)--(-0.1450pt,32.0775pt)--(-0.1450pt,14.6925pt)--(-14.0200pt,14.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,29.5775pt)..controls(-14.0200pt,30.9582pt)and(-12.9007pt,32.0775pt)..(-11.5200pt,32.0775pt)--(-2.6450pt,32.0775pt)..controls(-1.2643pt,32.0775pt)and(-0.1450pt,30.9582pt)..(-0.1450pt,29.5775pt)--(-0.1450pt,17.1925pt)..controls(-0.1450pt,15.8118pt)and(-1.2643pt,14.6925pt)..(-2.6450pt,14.6925pt)--(-11.5200pt,14.6925pt)..controls(-12.9007pt,14.6925pt)and(-14.0200pt,15.8118pt)..(-14.0200pt,17.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,23.3850pt)--(-0.1450pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,23.3850pt)--(-14.0200pt,23.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,4.6925pt)--(-4.0000pt,4.6925pt)--(-4.0000pt,-4.6925pt)--(-10.1650pt,-4.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,4.6925pt){\savebox{\marxupbox}{{ψ}}\immediate\write\boxesfile{109}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,8.6925pt)--(0.0000pt,8.6925pt)--(0.0000pt,-8.6925pt)--(-14.1650pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,6.1925pt)..controls(-14.1650pt,7.5732pt)and(-13.0457pt,8.6925pt)..(-11.6650pt,8.6925pt)--(-2.5000pt,8.6925pt)..controls(-1.1193pt,8.6925pt)and(0.0000pt,7.5732pt)..(0.0000pt,6.1925pt)--(0.0000pt,-6.1925pt)..controls(0.0000pt,-7.5732pt)and(-1.1193pt,-8.6925pt)..(-2.5000pt,-8.6925pt)--(-11.6650pt,-8.6925pt)..controls(-13.0457pt,-8.6925pt)and(-14.1650pt,-7.5732pt)..(-14.1650pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.7650pt,14.6925pt)--(-20.7650pt,14.6925pt)--(-20.7650pt,8.6925pt)--(-26.7650pt,8.6925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7650pt,11.6925pt)..controls(-22.7650pt,12.2448pt)and(-23.2127pt,12.6925pt)..(-23.7650pt,12.6925pt)..controls(-24.3173pt,12.6925pt)and(-24.7650pt,12.2448pt)..(-24.7650pt,11.6925pt)..controls(-24.7650pt,11.1402pt)and(-24.3173pt,10.6925pt)..(-23.7650pt,10.6925pt)..controls(-23.2127pt,10.6925pt)and(-22.7650pt,11.1402pt)..(-22.7650pt,11.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)..controls(-19.7650pt,18.6207pt)and(-22.1650pt,23.3850pt)..(-14.1650pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)..controls(-19.7650pt,4.7643pt)and(-22.1650pt,0.0000pt)..(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-37.8650pt,15.1400pt)--(-34.7650pt,15.1400pt)--(-34.7650pt,8.2450pt)--(-37.8650pt,8.2450pt)--cycle;
\node[anchor=north west,inner sep=0] at (-37.8650pt,15.1400pt){\savebox{\marxupbox}{{f}}\immediate\write\boxesfile{110}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,19.1400pt)--(-30.7650pt,19.1400pt)--(-30.7650pt,4.2450pt)--(-41.8650pt,4.2450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,19.1400pt)--(-30.7650pt,19.1400pt)--(-30.7650pt,4.2450pt)--(-41.8650pt,4.2450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,11.6925pt)--(-30.7650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,11.6925pt)--(-41.8650pt,11.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-23.4325pt,-24.9575pt)--(-18.4325pt,-24.9575pt)--(-18.4325pt,-31.8125pt)--(-23.4325pt,-31.8125pt)--cycle;
\node[anchor=north west,inner sep=0] at (-23.4325pt,-24.9575pt){\savebox{\marxupbox}{{g}}\immediate\write\boxesfile{111}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-27.4325pt,-20.9575pt)--(-14.4325pt,-20.9575pt)--(-14.4325pt,-35.8125pt)--(-27.4325pt,-35.8125pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-27.4325pt,-20.9575pt)--(-14.4325pt,-20.9575pt)--(-14.4325pt,-35.8125pt)--(-27.4325pt,-35.8125pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-28.3850pt)--(-14.4325pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-28.3850pt)--(-27.4325pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.4650pt,-5.3462pt)--(-48.4650pt,-5.3462pt)--(-48.4650pt,-11.3462pt)--(-54.4650pt,-11.3462pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-50.4650pt,-8.3462pt)..controls(-50.4650pt,-7.7940pt)and(-50.9127pt,-7.3462pt)..(-51.4650pt,-7.3462pt)..controls(-52.0173pt,-7.3462pt)and(-52.4650pt,-7.7940pt)..(-52.4650pt,-8.3462pt)..controls(-52.4650pt,-8.8985pt)and(-52.0173pt,-9.3462pt)..(-51.4650pt,-9.3462pt)..controls(-50.9127pt,-9.3462pt)and(-50.4650pt,-8.8985pt)..(-50.4650pt,-8.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)..controls(-47.4650pt,-1.4180pt)and(-49.8650pt,11.6925pt)..(-41.8650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)..controls(-47.4650pt,-15.2744pt)and(-49.8650pt,-28.3850pt)..(-41.8650pt,-28.3850pt);
\end{tikzpicture}}\end{center}
But, we also know that it is pseudo-linear, so it can be put in {\sc{}smc} form. In particular, this means that the \ensuremath{\mathsf{δ}} node connecting φ and ψ can
be eliminated. There are only three ways to reduce this node. We can either
1. assume φ=ψ, and then we can apply the rule \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{φ}}, and let further reductions take place;
2. prune away one of (or both) the branches; or
3. assume that there is another copy of φ or ψ in \ensuremath{\mathsf{g}} which cause \ensuremath{δ} commutation and elimination.
If we can rule out Case 2 and Case 3, then Case
1. must apply, and we have our result: φ=ψ.
Case 2. corresponds to one of the branches being equivalent to \ensuremath{\mathsf{ε}},
because some discard occurs inside \ensuremath{\mathsf{h}}. Let us assume without
loss of generality that the φ branch is the one equivalent to \ensuremath{\mathsf{ε}}. This
situation is depicted below:
\begin{center}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-58.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](43.4681pt,23.3850pt)--(43.4681pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](43.4681pt,-25.8850pt)--(43.4681pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,11.6925pt)--(-41.8650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-28.3850pt)--(-41.8650pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,23.3850pt)--(0.0000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-28.3850pt)--(0.0000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,23.3850pt)--(9.6000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-23.3850pt)--(9.6000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-28.3850pt)--(9.6000pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](18.4000pt,34.3850pt)--(23.7800pt,34.3850pt)--(23.7800pt,27.4900pt)--(18.4000pt,27.4900pt)--cycle;
\node[anchor=north west,inner sep=0] at (18.4000pt,34.3850pt){\savebox{\marxupbox}{{h}}\immediate\write\boxesfile{112}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](14.4000pt,38.3850pt)--(27.7800pt,38.3850pt)--(27.7800pt,23.4900pt)--(14.4000pt,23.4900pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 3.0000pt off 3.0000pt](14.4000pt,38.3850pt)--(38.6681pt,38.3850pt)--(38.6681pt,-43.3850pt)--(14.4000pt,-43.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,23.3850pt)--(19.2000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-23.3850pt)--(19.2000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-28.3850pt)--(19.2000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](33.8681pt,23.3850pt)--(33.8681pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-25.8850pt)--(33.8681pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,23.3850pt)--(19.2000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-23.3850pt)--(19.2000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-28.3850pt)--(19.2000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,23.3850pt)--(43.4681pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-25.8850pt)--(43.4681pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](33.8681pt,23.3850pt)--(38.6681pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-25.8850pt)--(38.6681pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,23.3850pt)--(14.4000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-23.3850pt)--(14.4000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-28.3850pt)--(14.4000pt,-28.3850pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](34.8681pt,23.3850pt)..controls(34.8681pt,23.9373pt)and(34.4204pt,24.3850pt)..(33.8681pt,24.3850pt)..controls(33.3158pt,24.3850pt)and(32.8681pt,23.9373pt)..(32.8681pt,23.3850pt)..controls(32.8681pt,22.8327pt)and(33.3158pt,22.3850pt)..(33.8681pt,22.3850pt)..controls(34.4204pt,22.3850pt)and(34.8681pt,22.8327pt)..(34.8681pt,23.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,23.3850pt)--(33.8681pt,23.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](23.2000pt,-25.8850pt)--(29.8681pt,-25.8850pt)--(29.8681pt,-25.8850pt)--(23.2000pt,-25.8850pt)--cycle;
\node[anchor=north west,inner sep=0] at (23.2000pt,-25.8850pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{113}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](19.2000pt,-21.8850pt)--(33.8681pt,-21.8850pt)--(33.8681pt,-29.8850pt)--(19.2000pt,-29.8850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](19.2000pt,-19.3850pt)--(33.8681pt,-19.3850pt)--(33.8681pt,-32.3850pt)--(19.2000pt,-32.3850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-25.8850pt)--(33.8681pt,-25.8850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-23.3850pt)--(19.2000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](19.2000pt,-28.3850pt)--(19.2000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,23.3850pt)--(9.6000pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)..controls(8.0000pt,0.0000pt)and(1.6000pt,-23.3850pt)..(9.6000pt,-23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-28.3850pt)--(9.6000pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,11.6925pt)--(-23.7650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,23.3850pt)--(-14.1650pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.0200pt,28.0775pt)--(-4.1450pt,28.0775pt)--(-4.1450pt,18.6925pt)--(-10.0200pt,18.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.0200pt,28.0775pt){\savebox{\marxupbox}{{φ}}\immediate\write\boxesfile{114}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,32.0775pt)--(-0.1450pt,32.0775pt)--(-0.1450pt,14.6925pt)--(-14.0200pt,14.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,29.5775pt)..controls(-14.0200pt,30.9582pt)and(-12.9007pt,32.0775pt)..(-11.5200pt,32.0775pt)--(-2.6450pt,32.0775pt)..controls(-1.2643pt,32.0775pt)and(-0.1450pt,30.9582pt)..(-0.1450pt,29.5775pt)--(-0.1450pt,17.1925pt)..controls(-0.1450pt,15.8118pt)and(-1.2643pt,14.6925pt)..(-2.6450pt,14.6925pt)--(-11.5200pt,14.6925pt)..controls(-12.9007pt,14.6925pt)and(-14.0200pt,15.8118pt)..(-14.0200pt,17.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,23.3850pt)--(-0.1450pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,23.3850pt)--(-14.0200pt,23.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,4.6925pt)--(-4.0000pt,4.6925pt)--(-4.0000pt,-4.6925pt)--(-10.1650pt,-4.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,4.6925pt){\savebox{\marxupbox}{{ψ}}\immediate\write\boxesfile{115}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,8.6925pt)--(0.0000pt,8.6925pt)--(0.0000pt,-8.6925pt)--(-14.1650pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,6.1925pt)..controls(-14.1650pt,7.5732pt)and(-13.0457pt,8.6925pt)..(-11.6650pt,8.6925pt)--(-2.5000pt,8.6925pt)..controls(-1.1193pt,8.6925pt)and(0.0000pt,7.5732pt)..(0.0000pt,6.1925pt)--(0.0000pt,-6.1925pt)..controls(0.0000pt,-7.5732pt)and(-1.1193pt,-8.6925pt)..(-2.5000pt,-8.6925pt)--(-11.6650pt,-8.6925pt)..controls(-13.0457pt,-8.6925pt)and(-14.1650pt,-7.5732pt)..(-14.1650pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--(-23.7650pt,11.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.7650pt,14.6925pt)--(-20.7650pt,14.6925pt)--(-20.7650pt,8.6925pt)--(-26.7650pt,8.6925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7650pt,11.6925pt)..controls(-22.7650pt,12.2448pt)and(-23.2127pt,12.6925pt)..(-23.7650pt,12.6925pt)..controls(-24.3173pt,12.6925pt)and(-24.7650pt,12.2448pt)..(-24.7650pt,11.6925pt)..controls(-24.7650pt,11.1402pt)and(-24.3173pt,10.6925pt)..(-23.7650pt,10.6925pt)..controls(-23.2127pt,10.6925pt)and(-22.7650pt,11.1402pt)..(-22.7650pt,11.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)..controls(-19.7650pt,18.6207pt)and(-22.1650pt,23.3850pt)..(-14.1650pt,23.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,11.6925pt)..controls(-19.7650pt,4.7643pt)and(-22.1650pt,0.0000pt)..(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-37.8650pt,15.1400pt)--(-34.7650pt,15.1400pt)--(-34.7650pt,8.2450pt)--(-37.8650pt,8.2450pt)--cycle;
\node[anchor=north west,inner sep=0] at (-37.8650pt,15.1400pt){\savebox{\marxupbox}{{f}}\immediate\write\boxesfile{116}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,19.1400pt)--(-30.7650pt,19.1400pt)--(-30.7650pt,4.2450pt)--(-41.8650pt,4.2450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,19.1400pt)--(-30.7650pt,19.1400pt)--(-30.7650pt,4.2450pt)--(-41.8650pt,4.2450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,11.6925pt)--(-30.7650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,11.6925pt)--(-41.8650pt,11.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-23.4325pt,-24.9575pt)--(-18.4325pt,-24.9575pt)--(-18.4325pt,-31.8125pt)--(-23.4325pt,-31.8125pt)--cycle;
\node[anchor=north west,inner sep=0] at (-23.4325pt,-24.9575pt){\savebox{\marxupbox}{{g}}\immediate\write\boxesfile{117}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-27.4325pt,-20.9575pt)--(-14.4325pt,-20.9575pt)--(-14.4325pt,-35.8125pt)--(-27.4325pt,-35.8125pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-27.4325pt,-20.9575pt)--(-14.4325pt,-20.9575pt)--(-14.4325pt,-35.8125pt)--(-27.4325pt,-35.8125pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-28.3850pt)--(-14.4325pt,-28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-28.3850pt)--(-27.4325pt,-28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--(-51.4650pt,-8.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.4650pt,-5.3462pt)--(-48.4650pt,-5.3462pt)--(-48.4650pt,-11.3462pt)--(-54.4650pt,-11.3462pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-50.4650pt,-8.3462pt)..controls(-50.4650pt,-7.7940pt)and(-50.9127pt,-7.3462pt)..(-51.4650pt,-7.3462pt)..controls(-52.0173pt,-7.3462pt)and(-52.4650pt,-7.7940pt)..(-52.4650pt,-8.3462pt)..controls(-52.4650pt,-8.8985pt)and(-52.0173pt,-9.3462pt)..(-51.4650pt,-9.3462pt)..controls(-50.9127pt,-9.3462pt)and(-50.4650pt,-8.8985pt)..(-50.4650pt,-8.3462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)..controls(-47.4650pt,-1.4180pt)and(-49.8650pt,11.6925pt)..(-41.8650pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,-8.3462pt)..controls(-47.4650pt,-15.2744pt)and(-49.8650pt,-28.3850pt)..(-41.8650pt,-28.3850pt);
\end{tikzpicture}}\end{center}
Indeed, the only way that this branch can be pruned is when the output
of φ is discarded. However, by assumption, we have rejected this
situation.
Case 3. can only happen when \ensuremath{\mathsf{g}} is of the form
\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} or \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}}. Let us assume the latter
without loss of generality. The situation is then:
\begin{center}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-58.4650pt,14.5425pt)--(-51.4650pt,14.5425pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.3800pt,14.8925pt)--(27.3800pt,14.8925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,40.0775pt)--(-41.8650pt,40.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-10.9925pt)--(-41.8650pt,-10.9925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,51.7700pt)--(7.0000pt,51.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,28.3850pt)--(7.0000pt,28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-21.9850pt)--(7.0000pt,-21.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](11.0000pt,18.3400pt)--(16.3800pt,18.3400pt)--(16.3800pt,11.4450pt)--(11.0000pt,11.4450pt)--cycle;
\node[anchor=north west,inner sep=0] at (11.0000pt,18.3400pt){\savebox{\marxupbox}{{h}}\immediate\write\boxesfile{118}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,22.3400pt)--(20.3800pt,22.3400pt)--(20.3800pt,7.4450pt)--(7.0000pt,7.4450pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](7.0000pt,55.7700pt)--(20.3800pt,55.7700pt)--(20.3800pt,-25.9850pt)--(7.0000pt,-25.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.3800pt,14.8925pt)--(20.3800pt,14.8925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,51.7700pt)--(7.0000pt,51.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,28.3850pt)--(7.0000pt,28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,0.0000pt)--(7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](7.0000pt,-21.9850pt)--(7.0000pt,-21.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,40.0775pt)--(-23.7650pt,40.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,51.7700pt)--(-14.1650pt,51.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,28.3850pt)--(-14.1650pt,28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.0200pt,56.4624pt)--(-4.1450pt,56.4624pt)--(-4.1450pt,47.0775pt)--(-10.0200pt,47.0775pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.0200pt,56.4624pt){\savebox{\marxupbox}{{φ}}\immediate\write\boxesfile{119}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,60.4624pt)--(-0.1450pt,60.4624pt)--(-0.1450pt,43.0775pt)--(-14.0200pt,43.0775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.0200pt,57.9624pt)..controls(-14.0200pt,59.3432pt)and(-12.9007pt,60.4624pt)..(-11.5200pt,60.4624pt)--(-2.6450pt,60.4624pt)..controls(-1.2643pt,60.4624pt)and(-0.1450pt,59.3432pt)..(-0.1450pt,57.9624pt)--(-0.1450pt,45.5775pt)..controls(-0.1450pt,44.1968pt)and(-1.2643pt,43.0775pt)..(-2.6450pt,43.0775pt)--(-11.5200pt,43.0775pt)..controls(-12.9007pt,43.0775pt)and(-14.0200pt,44.1968pt)..(-14.0200pt,45.5775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,51.7700pt)--(-0.1450pt,51.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,51.7700pt)--(-14.0200pt,51.7700pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,33.0775pt)--(-4.0000pt,33.0775pt)--(-4.0000pt,23.6925pt)--(-10.1650pt,23.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,33.0775pt){\savebox{\marxupbox}{{ψ}}\immediate\write\boxesfile{120}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,37.0775pt)--(0.0000pt,37.0775pt)--(0.0000pt,19.6925pt)--(-14.1650pt,19.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,34.5775pt)..controls(-14.1650pt,35.9582pt)and(-13.0457pt,37.0775pt)..(-11.6650pt,37.0775pt)--(-2.5000pt,37.0775pt)..controls(-1.1193pt,37.0775pt)and(0.0000pt,35.9582pt)..(0.0000pt,34.5775pt)--(0.0000pt,22.1925pt)..controls(0.0000pt,20.8118pt)and(-1.1193pt,19.6925pt)..(-2.5000pt,19.6925pt)--(-11.6650pt,19.6925pt)..controls(-13.0457pt,19.6925pt)and(-14.1650pt,20.8118pt)..(-14.1650pt,22.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,28.3850pt)--(0.0000pt,28.3850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,28.3850pt)--(-14.1650pt,28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,40.0775pt)--(-23.7650pt,40.0775pt)--(-23.7650pt,40.0775pt)--(-23.7650pt,40.0775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.7650pt,43.0775pt)--(-20.7650pt,43.0775pt)--(-20.7650pt,37.0775pt)--(-26.7650pt,37.0775pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7650pt,40.0775pt)..controls(-22.7650pt,40.6298pt)and(-23.2127pt,41.0775pt)..(-23.7650pt,41.0775pt)..controls(-24.3173pt,41.0775pt)and(-24.7650pt,40.6298pt)..(-24.7650pt,40.0775pt)..controls(-24.7650pt,39.5252pt)and(-24.3173pt,39.0775pt)..(-23.7650pt,39.0775pt)..controls(-23.2127pt,39.0775pt)and(-22.7650pt,39.5252pt)..(-22.7650pt,40.0775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,40.0775pt)..controls(-19.7650pt,47.0057pt)and(-22.1650pt,51.7700pt)..(-14.1650pt,51.7700pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,40.0775pt)..controls(-19.7650pt,33.1493pt)and(-22.1650pt,28.3850pt)..(-14.1650pt,28.3850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-37.8650pt,43.5250pt)--(-34.7650pt,43.5250pt)--(-34.7650pt,36.6300pt)--(-37.8650pt,36.6300pt)--cycle;
\node[anchor=north west,inner sep=0] at (-37.8650pt,43.5250pt){\savebox{\marxupbox}{{f}}\immediate\write\boxesfile{121}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,47.5250pt)--(-30.7650pt,47.5250pt)--(-30.7650pt,32.6300pt)--(-41.8650pt,32.6300pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,47.5250pt)--(-30.7650pt,47.5250pt)--(-30.7650pt,32.6300pt)--(-41.8650pt,32.6300pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,40.0775pt)--(-30.7650pt,40.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,40.0775pt)--(-41.8650pt,40.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-10.9925pt)--(-23.7650pt,-10.9925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-21.9850pt)--(-14.1650pt,-21.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-10.1650pt,4.6925pt)--(-4.0000pt,4.6925pt)--(-4.0000pt,-4.6925pt)--(-10.1650pt,-4.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-10.1650pt,4.6925pt){\savebox{\marxupbox}{{ψ}}\immediate\write\boxesfile{122}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,8.6925pt)--(0.0000pt,8.6925pt)--(0.0000pt,-8.6925pt)--(-14.1650pt,-8.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,6.1925pt)..controls(-14.1650pt,7.5732pt)and(-13.0457pt,8.6925pt)..(-11.6650pt,8.6925pt)--(-2.5000pt,8.6925pt)..controls(-1.1193pt,8.6925pt)and(0.0000pt,7.5732pt)..(0.0000pt,6.1925pt)--(0.0000pt,-6.1925pt)..controls(0.0000pt,-7.5732pt)and(-1.1193pt,-8.6925pt)..(-2.5000pt,-8.6925pt)--(-11.6650pt,-8.6925pt)..controls(-13.0457pt,-8.6925pt)and(-14.1650pt,-7.5732pt)..(-14.1650pt,-6.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,0.0000pt)--(-14.1650pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-8.4375pt,-18.6925pt)--(-5.7275pt,-18.6925pt)--(-5.7275pt,-25.2775pt)--(-8.4375pt,-25.2775pt)--cycle;
\node[anchor=north west,inner sep=0] at (-8.4375pt,-18.6925pt){\savebox{\marxupbox}{{i}}\immediate\write\boxesfile{123}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-12.4375pt,-14.6925pt)--(-1.7275pt,-14.6925pt)--(-1.7275pt,-29.2775pt)--(-12.4375pt,-29.2775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-12.4375pt,-14.6925pt)--(-1.7275pt,-14.6925pt)--(-1.7275pt,-29.2775pt)--(-12.4375pt,-29.2775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-21.9850pt)--(-1.7275pt,-21.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-14.1650pt,-21.9850pt)--(-12.4375pt,-21.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.9925pt)--(-23.7650pt,-10.9925pt)--(-23.7650pt,-10.9925pt)--(-23.7650pt,-10.9925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.7650pt,-7.9925pt)--(-20.7650pt,-7.9925pt)--(-20.7650pt,-13.9925pt)--(-26.7650pt,-13.9925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.7650pt,-10.9925pt)..controls(-22.7650pt,-10.4402pt)and(-23.2127pt,-9.9925pt)..(-23.7650pt,-9.9925pt)..controls(-24.3173pt,-9.9925pt)and(-24.7650pt,-10.4402pt)..(-24.7650pt,-10.9925pt)..controls(-24.7650pt,-11.5448pt)and(-24.3173pt,-11.9925pt)..(-23.7650pt,-11.9925pt)..controls(-23.2127pt,-11.9925pt)and(-22.7650pt,-11.5448pt)..(-22.7650pt,-10.9925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.9925pt)..controls(-19.7650pt,-4.0643pt)and(-22.1650pt,0.0000pt)..(-14.1650pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-23.7650pt,-10.9925pt)..controls(-19.7650pt,-17.9207pt)and(-22.1650pt,-21.9850pt)..(-14.1650pt,-21.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-37.8650pt,-7.5450pt)--(-34.7650pt,-7.5450pt)--(-34.7650pt,-14.4400pt)--(-37.8650pt,-14.4400pt)--cycle;
\node[anchor=north west,inner sep=0] at (-37.8650pt,-7.5450pt){\savebox{\marxupbox}{{f}}\immediate\write\boxesfile{124}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,-3.5450pt)--(-30.7650pt,-3.5450pt)--(-30.7650pt,-18.4400pt)--(-41.8650pt,-18.4400pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-41.8650pt,-3.5450pt)--(-30.7650pt,-3.5450pt)--(-30.7650pt,-18.4400pt)--(-41.8650pt,-18.4400pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-10.9925pt)--(-30.7650pt,-10.9925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-41.8650pt,-10.9925pt)--(-41.8650pt,-10.9925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,14.5425pt)--(-51.4650pt,14.5425pt)--(-51.4650pt,14.5425pt)--(-51.4650pt,14.5425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-54.4650pt,17.5425pt)--(-48.4650pt,17.5425pt)--(-48.4650pt,11.5425pt)--(-54.4650pt,11.5425pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-50.4650pt,14.5425pt)..controls(-50.4650pt,15.0948pt)and(-50.9127pt,15.5425pt)..(-51.4650pt,15.5425pt)..controls(-52.0173pt,15.5425pt)and(-52.4650pt,15.0948pt)..(-52.4650pt,14.5425pt)..controls(-52.4650pt,13.9902pt)and(-52.0173pt,13.5425pt)..(-51.4650pt,13.5425pt)..controls(-50.9127pt,13.5425pt)and(-50.4650pt,13.9902pt)..(-50.4650pt,14.5425pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,14.5425pt)..controls(-47.4650pt,21.4707pt)and(-49.8650pt,40.0775pt)..(-41.8650pt,40.0775pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-51.4650pt,14.5425pt)..controls(-47.4650pt,7.6143pt)and(-49.8650pt,-10.9925pt)..(-41.8650pt,-10.9925pt);
\end{tikzpicture}}\end{center}
Which reduces to \ensuremath{\mathsf{h}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{i}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}}
But the only way to reduce the \ensuremath{δ} node is if one of its branches is connected to \ensuremath{\mathsf{ε}},
as depicted below:
\begin{center}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-75.0650pt,7.9962pt)--(-68.0650pt,7.9962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,31.9850pt)--(33.8681pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](33.8681pt,0.0000pt)--(33.8681pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-10.0000pt)--(33.8681pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](33.8681pt,-26.9850pt)--(33.8681pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-56.9650pt,7.9962pt)--(-49.9650pt,7.9962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,31.9850pt)--(-40.3650pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,-15.9925pt)--(-40.3650pt,-15.9925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,31.9850pt)--(-30.7650pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-5.0000pt)--(-30.7650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-26.9850pt)--(-30.7650pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,31.9850pt)--(0.0000pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(0.0000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-26.9850pt)--(0.0000pt,-26.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](8.8000pt,42.9850pt)--(14.1800pt,42.9850pt)--(14.1800pt,36.0900pt)--(8.8000pt,36.0900pt)--cycle;
\node[anchor=north west,inner sep=0] at (8.8000pt,42.9850pt){\savebox{\marxupbox}{{h}}\immediate\write\boxesfile{125}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](4.8000pt,46.9850pt)--(18.1800pt,46.9850pt)--(18.1800pt,32.0900pt)--(4.8000pt,32.0900pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 3.0000pt off 3.0000pt](4.8000pt,46.9850pt)--(29.0681pt,46.9850pt)--(29.0681pt,-41.9850pt)--(4.8000pt,-41.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,31.9850pt)--(9.6000pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-10.0000pt)--(9.6000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-26.9850pt)--(9.6000pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,31.9850pt)--(24.2681pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](24.2681pt,0.0000pt)--(24.2681pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-10.0000pt)--(24.2681pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-26.9850pt)--(24.2681pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,31.9850pt)--(9.6000pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(9.6000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-10.0000pt)--(9.6000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-26.9850pt)--(9.6000pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,31.9850pt)--(33.8681pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,0.0000pt)--(33.8681pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-10.0000pt)--(33.8681pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-26.9850pt)--(33.8681pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,31.9850pt)--(29.0681pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](24.2681pt,0.0000pt)--(29.0681pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-10.0000pt)--(29.0681pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-26.9850pt)--(29.0681pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,31.9850pt)--(4.8000pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(4.8000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-10.0000pt)--(4.8000pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-26.9850pt)--(4.8000pt,-26.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6000pt,31.9850pt)--(20.2681pt,31.9850pt)--(20.2681pt,31.9850pt)--(13.6000pt,31.9850pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,31.9850pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{126}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,35.9850pt)--(24.2681pt,35.9850pt)--(24.2681pt,27.9850pt)--(9.6000pt,27.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,35.9850pt)--(24.2681pt,35.9850pt)--(24.2681pt,27.9850pt)--(9.6000pt,27.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,31.9850pt)--(24.2681pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,31.9850pt)--(9.6000pt,31.9850pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](25.2681pt,0.0000pt)..controls(25.2681pt,0.5523pt)and(24.8204pt,1.0000pt)..(24.2681pt,1.0000pt)..controls(23.7158pt,1.0000pt)and(23.2681pt,0.5523pt)..(23.2681pt,0.0000pt)..controls(23.2681pt,-0.5523pt)and(23.7158pt,-1.0000pt)..(24.2681pt,-1.0000pt)..controls(24.8204pt,-1.0000pt)and(25.2681pt,-0.5523pt)..(25.2681pt,0.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,0.0000pt)--(24.2681pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](14.4335pt,-10.0000pt)--(19.4346pt,-10.0000pt)--(19.4346pt,-10.0000pt)--(14.4335pt,-10.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (14.4335pt,-10.0000pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{127}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.4335pt,-6.0000pt)--(23.4346pt,-6.0000pt)--(23.4346pt,-14.0000pt)--(10.4335pt,-14.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](10.4335pt,-6.0000pt)--(23.4346pt,-6.0000pt)--(23.4346pt,-14.0000pt)--(10.4335pt,-14.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-10.0000pt)--(23.4346pt,-10.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-10.0000pt)--(10.4335pt,-10.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](13.6000pt,-26.9850pt)--(20.2681pt,-26.9850pt)--(20.2681pt,-26.9850pt)--(13.6000pt,-26.9850pt)--cycle;
\node[anchor=north west,inner sep=0] at (13.6000pt,-26.9850pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{128}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,-22.9850pt)--(24.2681pt,-22.9850pt)--(24.2681pt,-30.9850pt)--(9.6000pt,-30.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](9.6000pt,-22.9850pt)--(24.2681pt,-22.9850pt)--(24.2681pt,-30.9850pt)--(9.6000pt,-30.9850pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](24.2681pt,-26.9850pt)--(24.2681pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](9.6000pt,-26.9850pt)--(9.6000pt,-26.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-18.3200pt,36.6775pt)--(-12.4450pt,36.6775pt)--(-12.4450pt,27.2925pt)--(-18.3200pt,27.2925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-18.3200pt,36.6775pt){\savebox{\marxupbox}{{φ}}\immediate\write\boxesfile{129}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.3200pt,40.6775pt)--(-8.4450pt,40.6775pt)--(-8.4450pt,23.2925pt)--(-22.3200pt,23.2925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-22.3200pt,38.1775pt)..controls(-22.3200pt,39.5582pt)and(-21.2007pt,40.6775pt)..(-19.8200pt,40.6775pt)--(-10.9450pt,40.6775pt)..controls(-9.5643pt,40.6775pt)and(-8.4450pt,39.5582pt)..(-8.4450pt,38.1775pt)--(-8.4450pt,25.7925pt)..controls(-8.4450pt,24.4118pt)and(-9.5643pt,23.2925pt)..(-10.9450pt,23.2925pt)--(-19.8200pt,23.2925pt)..controls(-21.2007pt,23.2925pt)and(-22.3200pt,24.4118pt)..(-22.3200pt,25.7925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,31.9850pt)--(-8.4450pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,31.9850pt)--(-22.3200pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-5.0000pt)--(-9.6000pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-5.0000pt)--(-9.6000pt,-5.0000pt)--(-9.6000pt,-5.0000pt)--(-9.6000pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-12.6000pt,-2.0000pt)--(-6.6000pt,-2.0000pt)--(-6.6000pt,-8.0000pt)--(-12.6000pt,-8.0000pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-8.6000pt,-5.0000pt)..controls(-8.6000pt,-4.4477pt)and(-9.0477pt,-4.0000pt)..(-9.6000pt,-4.0000pt)..controls(-10.1523pt,-4.0000pt)and(-10.6000pt,-4.4477pt)..(-10.6000pt,-5.0000pt)..controls(-10.6000pt,-5.5523pt)and(-10.1523pt,-6.0000pt)..(-9.6000pt,-6.0000pt)..controls(-9.0477pt,-6.0000pt)and(-8.6000pt,-5.5523pt)..(-8.6000pt,-5.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-5.0000pt)..controls(-5.6000pt,1.9282pt)and(-8.0000pt,0.0000pt)..(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-9.6000pt,-5.0000pt)..controls(-5.6000pt,-11.9282pt)and(-8.0000pt,-10.0000pt)..(0.0000pt,-10.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-26.7650pt,-0.3075pt)--(-20.6000pt,-0.3075pt)--(-20.6000pt,-9.6925pt)--(-26.7650pt,-9.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (-26.7650pt,-0.3075pt){\savebox{\marxupbox}{{ψ}}\immediate\write\boxesfile{130}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,3.6925pt)--(-16.6000pt,3.6925pt)--(-16.6000pt,-13.6925pt)--(-30.7650pt,-13.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,1.1925pt)..controls(-30.7650pt,2.5732pt)and(-29.6457pt,3.6925pt)..(-28.2650pt,3.6925pt)--(-19.1000pt,3.6925pt)..controls(-17.7193pt,3.6925pt)and(-16.6000pt,2.5732pt)..(-16.6000pt,1.1925pt)--(-16.6000pt,-11.1925pt)..controls(-16.6000pt,-12.5732pt)and(-17.7193pt,-13.6925pt)..(-19.1000pt,-13.6925pt)--(-28.2650pt,-13.6925pt)..controls(-29.6457pt,-13.6925pt)and(-30.7650pt,-12.5732pt)..(-30.7650pt,-11.1925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-16.6000pt,-5.0000pt)--(-16.6000pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-5.0000pt)--(-30.7650pt,-5.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-16.7375pt,-23.6925pt)--(-14.0275pt,-23.6925pt)--(-14.0275pt,-30.2775pt)--(-16.7375pt,-30.2775pt)--cycle;
\node[anchor=north west,inner sep=0] at (-16.7375pt,-23.6925pt){\savebox{\marxupbox}{{i}}\immediate\write\boxesfile{131}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-20.7375pt,-19.6925pt)--(-10.0275pt,-19.6925pt)--(-10.0275pt,-34.2775pt)--(-20.7375pt,-34.2775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-20.7375pt,-19.6925pt)--(-10.0275pt,-19.6925pt)--(-10.0275pt,-34.2775pt)--(-20.7375pt,-34.2775pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,-26.9850pt)--(-10.0275pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-30.7650pt,-26.9850pt)--(-20.7375pt,-26.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,31.9850pt)--(-30.7650pt,31.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,-15.9925pt)--(-40.3650pt,-15.9925pt)--(-40.3650pt,-15.9925pt)--(-40.3650pt,-15.9925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-43.3650pt,-12.9925pt)--(-37.3650pt,-12.9925pt)--(-37.3650pt,-18.9925pt)--(-43.3650pt,-18.9925pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-39.3650pt,-15.9925pt)..controls(-39.3650pt,-15.4402pt)and(-39.8127pt,-14.9925pt)..(-40.3650pt,-14.9925pt)..controls(-40.9173pt,-14.9925pt)and(-41.3650pt,-15.4402pt)..(-41.3650pt,-15.9925pt)..controls(-41.3650pt,-16.5448pt)and(-40.9173pt,-16.9925pt)..(-40.3650pt,-16.9925pt)..controls(-39.8127pt,-16.9925pt)and(-39.3650pt,-16.5448pt)..(-39.3650pt,-15.9925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,-15.9925pt)..controls(-36.3650pt,-9.0643pt)and(-38.7650pt,-5.0000pt)..(-30.7650pt,-5.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-40.3650pt,-15.9925pt)..controls(-36.3650pt,-22.9207pt)and(-38.7650pt,-26.9850pt)..(-30.7650pt,-26.9850pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-49.9650pt,7.9962pt)--(-49.9650pt,7.9962pt)--(-49.9650pt,7.9962pt)--(-49.9650pt,7.9962pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-52.9650pt,10.9962pt)--(-46.9650pt,10.9962pt)--(-46.9650pt,4.9962pt)--(-52.9650pt,4.9962pt)--cycle;
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-48.9650pt,7.9962pt)..controls(-48.9650pt,8.5485pt)and(-49.4127pt,8.9962pt)..(-49.9650pt,8.9962pt)..controls(-50.5173pt,8.9962pt)and(-50.9650pt,8.5485pt)..(-50.9650pt,7.9962pt)..controls(-50.9650pt,7.4440pt)and(-50.5173pt,6.9962pt)..(-49.9650pt,6.9962pt)..controls(-49.4127pt,6.9962pt)and(-48.9650pt,7.4440pt)..(-48.9650pt,7.9962pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-49.9650pt,7.9962pt)..controls(-45.9650pt,14.9244pt)and(-48.3650pt,31.9850pt)..(-40.3650pt,31.9850pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-49.9650pt,7.9962pt)..controls(-45.9650pt,1.0680pt)and(-48.3650pt,-15.9925pt)..(-40.3650pt,-15.9925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-64.0650pt,11.4437pt)--(-60.9650pt,11.4437pt)--(-60.9650pt,4.5488pt)--(-64.0650pt,4.5488pt)--cycle;
\node[anchor=north west,inner sep=0] at (-64.0650pt,11.4437pt){\savebox{\marxupbox}{{f}}\immediate\write\boxesfile{132}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-68.0650pt,15.4437pt)--(-56.9650pt,15.4437pt)--(-56.9650pt,0.5488pt)--(-68.0650pt,0.5488pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-68.0650pt,15.4437pt)--(-56.9650pt,15.4437pt)--(-56.9650pt,0.5488pt)--(-68.0650pt,0.5488pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-56.9650pt,7.9962pt)--(-56.9650pt,7.9962pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-68.0650pt,7.9962pt)--(-68.0650pt,7.9962pt);
\end{tikzpicture}}\end{center}
But this could happen only if one of the ψ was discarded to begin
with, which is ruled out by assumption. So we can again reject this
case.
\end{proof}
The next step in the argument is to prove that, if any generator is in a decoded
morphism, its output never (fully) discarded. That is, the situation
depicted in the following diagram cannot occur:
\begin{center}
{\begin{tikzpicture}\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-28.6681pt,5.8462pt)--(-21.6681pt,5.8462pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 1.0000pt](42.5431pt,11.6925pt)--(49.5431pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5431pt,0.0000pt)--(49.5431pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,11.6925pt)--(0.0000pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(0.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.8750pt,11.6925pt)--(20.8750pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](35.5431pt,11.6925pt)--(42.5431pt,11.6925pt);
\path[-,fill=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](43.5431pt,11.6925pt)..controls(43.5431pt,12.2448pt)and(43.0953pt,12.6925pt)..(42.5431pt,12.6925pt)..controls(41.9908pt,12.6925pt)and(41.5431pt,12.2448pt)..(41.5431pt,11.6925pt)..controls(41.5431pt,11.1402pt)and(41.9908pt,10.6925pt)..(42.5431pt,10.6925pt)..controls(43.0953pt,10.6925pt)and(43.5431pt,11.1402pt)..(43.5431pt,11.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](42.5431pt,11.6925pt)--(42.5431pt,11.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](24.8750pt,11.6925pt)--(31.5431pt,11.6925pt)--(31.5431pt,11.6925pt)--(24.8750pt,11.6925pt)--cycle;
\node[anchor=north west,inner sep=0] at (24.8750pt,11.6925pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{133}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](20.8750pt,15.6925pt)--(35.5431pt,15.6925pt)--(35.5431pt,7.6925pt)--(20.8750pt,7.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](20.8750pt,15.6925pt)--(35.5431pt,15.6925pt)--(35.5431pt,7.6925pt)--(20.8750pt,7.6925pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](35.5431pt,11.6925pt)--(35.5431pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](20.8750pt,11.6925pt)--(20.8750pt,11.6925pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](4.0000pt,16.3850pt)--(9.8750pt,16.3850pt)--(9.8750pt,7.0000pt)--(4.0000pt,7.0000pt)--cycle;
\node[anchor=north west,inner sep=0] at (4.0000pt,16.3850pt){\savebox{\marxupbox}{{φ}}\immediate\write\boxesfile{134}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,20.3850pt)--(13.8750pt,20.3850pt)--(13.8750pt,3.0000pt)--(0.0000pt,3.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,17.8850pt)..controls(0.0000pt,19.2657pt)and(1.1193pt,20.3850pt)..(2.5000pt,20.3850pt)--(11.3750pt,20.3850pt)..controls(12.7557pt,20.3850pt)and(13.8750pt,19.2657pt)..(13.8750pt,17.8850pt)--(13.8750pt,5.5000pt)..controls(13.8750pt,4.1193pt)and(12.7557pt,3.0000pt)..(11.3750pt,3.0000pt)--(2.5000pt,3.0000pt)..controls(1.1193pt,3.0000pt)and(0.0000pt,4.1193pt)..(0.0000pt,5.5000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](13.8750pt,11.6925pt)--(13.8750pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,11.6925pt)--(0.0000pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](0.0000pt,0.0000pt)--(42.5431pt,0.0000pt);
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-17.6681pt,5.8462pt)--(-11.0000pt,5.8462pt)--(-11.0000pt,5.8462pt)--(-17.6681pt,5.8462pt)--cycle;
\node[anchor=north west,inner sep=0] at (-17.6681pt,5.8462pt){\savebox{\marxupbox}{{ }}\immediate\write\boxesfile{135}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-21.6681pt,9.8462pt)--(-7.0000pt,9.8462pt)--(-7.0000pt,1.8462pt)--(-21.6681pt,1.8462pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=on 0.4000pt off 2.0000pt](-21.6681pt,15.6925pt)--(-7.0000pt,15.6925pt)--(-7.0000pt,-4.0000pt)--(-21.6681pt,-4.0000pt)--cycle;
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,11.6925pt)--(-7.0000pt,11.6925pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-7.0000pt,0.0000pt)--(-7.0000pt,0.0000pt);
\path[-,draw=black,line width=0.4000pt,line cap=butt,line join=miter,dash pattern=](-21.6681pt,5.8462pt)--(-21.6681pt,5.8462pt);
\end{tikzpicture}}\end{center}
Formally:
\begin{lemma}{}For every \ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{h}\mskip 0.0mu}\ensuremath{\mathnormal{,}\mskip 3.0mu}\ensuremath{\mathsf{i}} if \ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{h}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{i}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{g}}, and \ensuremath{\mathsf{h}} is protolinear, then \ensuremath{\mathsf{i}} cannot be equivalent to \ensuremath{\mathsf{ε}}.\label{136}\end{lemma}\begin{proof} The proof is an immediate consequence of the possible ways to
construct \ensuremath{\mathsf{f}}--- namely, the combinators of our interface. The
only way to discard fully a value is via \ensuremath{\mathsf{ε}}, which is itself
available only via \ensuremath{\mathsf{unit}}. However, 1. \ensuremath{\mathsf{unit}} applies \ensuremath{\mathsf{ε}} to
its input directly and 2. the only construction which places something
before another morphism is \ensuremath{\mathsf{merge}}, which places another \ensuremath{\mathsf{δ}} before the whole construction. Consequently \ensuremath{\mathsf{ε}} can only be connected
directly to the input of \emph{mergeA (f id)}, never after a generator
φ.\end{proof}
To get the desired result, it suffices to put all the pieces together.
\begin{theorem}{} For every function \ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathnormal{:}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{⊸}\mskip 3.0mu}\ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{b}}, if \ensuremath{\bigtriangleup\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\mathsf{id}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{h}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{ψ}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\mathsf{g}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}, then \ensuremath{\mathsf{φ}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{ψ}}.\label{137}\end{theorem}\begin{proof}We apply \cref{106}. The pseudolinearity condition is given by \cref{69}, and non-discardability by
\cref{136}.\end{proof} \end{mdframed}
\subsection{Haskell implementation of \ensuremath{\mathsf{reduce}}}\label{138} In this section we present the main components of the Haskell
implementation of the \ensuremath{\mathsf{reduce}} function. We start by showing the underlying
data structure which is manipulated by \ensuremath{\mathsf{reduce}}. This data structure is a list
of morphisms of type \ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathsf{xᵢ}}, for varying \ensuremath{\mathsf{xᵢ}}. (This list corresponds to the arguments of \ensuremath{\bigtriangleup}.) Because we have to keep track in the
type that all these morphisms share the same source object, we need to
use a {\sc{}gadt} to store them instead of a plain Haskell list:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{data}\mskip 3.0mu\mathsf{Merge}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[4]{}{\mathsf{a}\mskip 3.0mu\mathsf{xs}\mskip 3.0mu\mathbf{where}}\<[E]{}\\
\>[2]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[7]{}{\mathsf{FreeCartesian}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[8]{}{\mathsf{a}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Merge}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[9]{}{\mathsf{a}\mskip 3.0mu\mathsf{xs}}\<[E]{}\\
\>[3]{}{\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Merge}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[6]{}{\mathsf{a}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Cons}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{xs}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{Nil}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu\mathsf{Merge}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathsf{a}\mskip 3.0mu\mathsf{Null}}\<[E]{}\end{parray}}\end{list}
The output of \ensuremath{\mathsf{reduce}} is a morphism whose target object is the
monoidal product of the above \ensuremath{\mathsf{xᵢ}}. So we need to encode the
product of a list of types, as a type family:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathbf{type}\mskip 3.0mu\mathsf{family}\mskip 3.0mu\mathsf{Prod}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{xs}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{[}\mskip 0.0mu\mathsf{Type}\mskip 0.0mu\mathnormal{]}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[3]{}{\mathbf{where}}\<[E]{}\\
\>[2]{}{\mathsf{Prod}\mskip 3.0mu\mathsf{Null}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[2]{}{\mathsf{Prod}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Cons}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{ys}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{ys}}\<[E]{}\end{parray}}\end{list}
As explained above, lists of morphisms will be sorted according to the
lexicographical order on \ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{a}}. To keep lists
in sorted order, we will need a function to merge them while preserving the order.
Even though this kind of function is entirely standard, our version must
only return the resulting merged list, but it must also keep track of
the permutations and re-associations which it applies.
Indeed, this permutation is necessary for the purpose of the
algorithm, because overall the meaning of the morphism must remain the
same: the
composition of the sorted merge operation and the permutations is the
identity. Because we do not know, from types only, the ordering of the
resulting list and hence its type, we must quantify existentially
over it. Because Haskell does not support native existential types, we
use a {\sc{}cps} encoding to define the append function:
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column[6em]{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{10}{@{}>{}l<{}@{}}\column{11}{@{}>{}l<{}@{}}\column{12}{@{}>{}l<{}@{}}\column{13}{@{}>{}l<{}@{}}\column{14}{@{}>{}l<{}@{}}\column{15}{@{}>{}l<{}@{}}\column{16}{@{}>{}l<{}@{}}\column{17}{@{}>{}l<{}@{}}\column{18}{@{}>{}l<{}@{}}\column{19}{@{}>{}l<{}@{}}\column{20}{@{}>{}l<{}@{}}\column{21}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{appendSorted}\mskip 3.0mu}\>[6]{}{\mathnormal{::}\mskip 3.0mu}\>[19]{}{\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[20]{}{\mathsf{a}\mskip 3.0mu\mathsf{xs}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[21]{}{\mathsf{a}\mskip 3.0mu\mathsf{ys}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[7]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[8]{}{∀\mskip 3.0mu\mathsf{zs}\mskip 1.0mu.\mskip 3.0mu}\>[14]{}{\mathsf{FreeSMC}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[17]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{zs}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[17]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{xs}\mskip 3.0mu\mathnormal{⊗}\mskip 3.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{ys}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[18]{}{\mathnormal{\rightarrow }}\<[E]{}\\
\>[8]{}{\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[12]{}{\mathsf{a}\mskip 3.0mu\mathsf{zs}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}}\<[E]{}\\
\>[1]{}{\mathsf{appendSorted}\mskip 3.0mu}\>[6]{}{\mathsf{Nil}\mskip 3.0mu}\>[9]{}{\mathsf{ys}\mskip 3.0mu}\>[10]{}{\mathsf{k}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muσ\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\>[13]{}{ρ\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[16]{}{\mathsf{ys}}\<[E]{}\\
\>[1]{}{\mathsf{appendSorted}\mskip 3.0mu}\>[6]{}{\mathsf{xs}\mskip 3.0mu}\>[9]{}{\mathsf{Nil}\mskip 3.0mu}\>[10]{}{\mathsf{k}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[13]{}{ρ\mskip 3.0mu}\>[16]{}{\mathsf{xs}}\<[E]{}\\
\>[1]{}{\mathsf{appendSorted}\mskip 3.0mu}\>[6]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{xs}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[9]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{ys}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[10]{}{\mathsf{k}\mskip 3.0mu\mathnormal{=}}\<[E]{}\\
\>[2]{}{\mathbf{case}\mskip 3.0mu\mathsf{compareMorphisms}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{y}\mskip 3.0mu\mathbf{of}}\<[E]{}\\
\>[3]{}{\mathsf{GT}\mskip 3.0mu}\>[4]{}{\mathnormal{\rightarrow }\mskip 3.0mu}\>[5]{}{\mathsf{appendSorted}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{xs}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{ys}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{zs}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[5]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muσ\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\>[11]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[15]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{zs}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\\
\>[3]{}{\mathnormal{\_}\mskip 3.0mu}\>[4]{}{\mathnormal{\rightarrow }\mskip 3.0mu}\>[5]{}{\mathsf{appendSorted}\mskip 3.0mu\mathsf{xs}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{y}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{ys}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{zs}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[5]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[11]{}{\bar{α}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{id}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{a}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[15]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{zs}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
Like \ensuremath{\mathsf{appendSorted}}, the rest of the functions must record permutations
which they might apply, and thus are written in the same style, with
existentials encoded in {\sc{}cps}. In fact, when the input sorted list of
morphisms is empty, the accumulated permutation contains the result
morphism in \ensuremath{\mathsf{FreeSMC}} form.
The purpose of the next function is to expose forks (▵) as a sorted
list of morphisms to merge (of type \ensuremath{\mathsf{Merge}}). Additionally, it
shifts embedded morphisms (and \ensuremath{ε}, which when merged is a
no-op) to the accumulated result.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column{2}{@{}>{}l<{}@{}}\column[2em]{3}{@{}>{}l<{}@{}}\column{4}{@{}>{}l<{}@{}}\column{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{10}{@{}>{}l<{}@{}}\column{11}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{expose}\mskip 3.0mu}\>[2]{}{\mathnormal{::}\mskip 3.0mu}\>[10]{}{\mathsf{Cat}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[11]{}{\mathsf{a}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[3]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[4]{}{∀\mskip 3.0mu\mathsf{x}\mskip 1.0mu.\mskip 3.0mu}\>[8]{}{\mathsf{FreeSMC}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[9]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{x}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{b}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[7]{}{\mathsf{a}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}}\<[E]{}\\
\>[1]{}{\mathsf{expose}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}_{1}\mskip 3.0mu\mathnormal{:\kern -3pt ▵ \kern -3pt:}\mskip 3.0mu\mathsf{f}_{2}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathnormal{=}\mskip 3.0mu}\>[6]{}{\mathsf{expose}\mskip 3.0mu\mathsf{f}_{1}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}_{1}\mskip 3.0mu\mathsf{fs}_{1}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[6]{}{\mathsf{expose}\mskip 3.0mu\mathsf{f}_{2}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}_{2}\mskip 3.0mu\mathsf{fs}_{2}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[6]{}{\mathsf{appendSorted}\mskip 3.0mu\mathsf{fs}_{1}\mskip 3.0mu\mathsf{fs}_{2}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathsf{fs}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[6]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{g}_{1}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{g}_{2}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{fs}}\<[E]{}\\
\>[1]{}{\mathsf{expose}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Embed}\mskip 3.0mu\mathsf{ϕ}\mskip 3.0mu\mathsf{:\ensuremath{<}:}\mskip 3.0mu\mathsf{f}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathnormal{=}\mskip 3.0mu}\>[6]{}{\mathsf{expose}\mskip 3.0mu\mathsf{f}\mskip 3.0mu\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathsf{fs}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[6]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{FreeSMC.Embed}\mskip 3.0mu\mathsf{ϕ}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{fs}}\<[E]{}\\
\>[1]{}{\mathsf{expose}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{E}\mskip 3.0mu\mathsf{:\ensuremath{<}:}\mskip 3.0mu\mathnormal{\_}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathnormal{=}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathsf{id}\mskip 3.0mu\mathsf{Nil}}\<[E]{}\\
\>[1]{}{\mathsf{expose}\mskip 3.0mu\mathsf{x}\mskip 3.0mu\mathsf{k}\mskip 3.0mu}\>[5]{}{\mathnormal{=}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\bar{ρ}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{x}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{Nil}\mskip 0.0mu\mathnormal{)}\allowbreak{}}\<[E]{}\end{parray}}\end{list}
To finish we show the code to undo a \ensuremath{\mathsf{split}}. Even though it is
somewhat obscured by the necessary accumulation of result morphisms,
its purpose is simple: searching the sorted list for a pair \ensuremath{\mathsf{π₁}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} and \ensuremath{\mathsf{π₂}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}} and apply the appropriate reduction.
\begin{list}{}{\setlength\leftmargin{1.0em}}\item\relax
\ensuremath{\begin{parray}\column{B}{@{}>{}l<{}@{}}\column[0em]{1}{@{}>{}l<{}@{}}\column[1em]{2}{@{}>{}l<{}@{}}\column{3}{@{}>{}l<{}@{}}\column[3em]{4}{@{}>{}l<{}@{}}\column[4em]{5}{@{}>{}l<{}@{}}\column{6}{@{}>{}l<{}@{}}\column{7}{@{}>{}l<{}@{}}\column{8}{@{}>{}l<{}@{}}\column{9}{@{}>{}l<{}@{}}\column{10}{@{}>{}l<{}@{}}\column{11}{@{}>{}l<{}@{}}\column{12}{@{}>{}l<{}@{}}\column{13}{@{}>{}l<{}@{}}\column{14}{@{}>{}l<{}@{}}\column{15}{@{}>{}l<{}@{}}\column{E}{@{}>{}l<{}@{}}%
\>[1]{}{\mathsf{reduceStep}\mskip 3.0mu}\>[3]{}{\mathnormal{::}\mskip 3.0mu}\>[14]{}{\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[15]{}{\mathsf{a}\mskip 3.0mu\mathsf{xs}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[4]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\>[6]{}{∀\mskip 3.0mu\mathsf{zs}\mskip 1.0mu.\mskip 3.0mu}\>[11]{}{\mathsf{FreeSMC}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[12]{}{\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{zs}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Prod}\mskip 3.0mu\mathsf{xs}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu}\>[13]{}{\mathnormal{\rightarrow }}\<[E]{}\\
\>[5]{}{\mathsf{Merge}\mskip 3.0mu\mathsf{cat}\mskip 3.0mu}\>[10]{}{\mathsf{a}\mskip 3.0mu\mathsf{zs}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{k}}\<[E]{}\\
\>[1]{}{\mathsf{reduceStep}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}_{1}\mskip 3.0mu\mathsf{:\ensuremath{<}:}\mskip 3.0mu\mathsf{f₁}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}_{2}\mskip 3.0mu\mathsf{:\ensuremath{<}:}\mskip 3.0mu\mathsf{f₂}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{rest}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{k}}\<[E]{}\\
\>[2]{}{\mathnormal{|}\mskip 3.0mu\mathsf{EQ}\mskip 3.0mu\mathnormal{\leftarrow }\mskip 3.0mu\mathsf{compareMorphisms}\mskip 3.0mu\mathsf{f₁}\mskip 3.0mu\mathsf{f₂}\mskip 3.0mu\mathnormal{=}}\<[E]{}\\
\>[2]{}{\mathsf{expose}\mskip 3.0mu\mathsf{f₁}\mskip 3.0mu}\>[7]{}{\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathsf{f'}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[2]{}{\mathsf{appendSorted}\mskip 3.0mu\mathsf{f'}\mskip 3.0mu\mathsf{rest}\mskip 3.0mu}\>[7]{}{\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g'}\mskip 3.0mu\mathsf{rest'}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[2]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muα\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{g}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{g'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{rest'}}\<[E]{}\\
\>[1]{}{\mathsf{reduceStep}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{rest}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{k}\mskip 3.0mu\mathnormal{=}}\<[E]{}\\
\>[2]{}{\mathsf{reduceStep}\mskip 3.0mu\mathsf{rest}\mskip 3.0mu}\>[9]{}{\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g}\mskip 3.0mu\mathsf{rest'}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[2]{}{\mathsf{appendSorted}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{:\kern -3pt +}\allowbreak{}\mskip 3.0mu\mathsf{Nil}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{rest'}\mskip 3.0mu}\>[8]{}{\mathnormal{\$}\mskip 3.0muλ\mskip 3.0mu\mathsf{g'}\mskip 3.0mu\mathsf{rest''}\mskip 3.0mu\mathnormal{\rightarrow }}\<[E]{}\\
\>[2]{}{\mathsf{k}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\bar{ρ}\mskip 3.0mu\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu\mathsf{g}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu\mathsf{g'}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathsf{rest''}}\<[E]{}\end{parray}}\end{list}
\section{Discussion and Related work}\label{139}
\subsection{Dynamically checking for linearity}\label{140}
Could we implement a variant of our {\sc{}api} and implementation which performs linearity
checks at runtime, rather than relying on Haskell to perform
them? This sounds reasonable: after all we already construct a representation
of decoded morphisms, and we can run a protolinearity (\cref{68}) check on it.
This could be done, but only if generators are equipped with a
decidable equality. Indeed, consider the morphism \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{π₁\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{φ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathnormal{▵}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{π₂\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{ψ}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}}. It is protolinear if φ=ψ, but not otherwise. The
tradeoff is simple to express: one either needs static linearity checks or a
dynamic equality check on generators (but not both). However, if one
would choose dynamic equality checks, it may be more sensible to
evaluate to cartesian categories instead, as discussed in \cref{141}.
\subsection{Evaluating to Cartesian Categories}\label{141}
Our technique can be adapted to cartesian structures (instead of
monoidal symmetric ones). To do so one shall 1. retain the encoding
of ports as morphisms from an abstract object \ensuremath{\mathsf{r}}: \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{\mathsf{FreeCartesian}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}}, 2. relax the requirement to work with
linear functions, and 3. drop the projection from free cartesian to
free monoidal structures in the implementation of \ensuremath{\mathsf{decode}}. We must however underline that such a
technique places \ensuremath{\mathsf{δ}} at the earliest points in the morphisms, thus
generators are duplicated every time their output is
split. This behaviour follows cartesian laws to the letter: indeed
they stipulate that such duplication has no effect: \ensuremath{\allowbreak{}\mathnormal{(}\mskip 0.0mu}\ensuremath{\mathsf{f}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{×}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}\mskip 0.0mu}\ensuremath{\mathnormal{)}\allowbreak{}\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\mathnormal{=}\mskip 3.0mu}\ensuremath{δ\mskip 3.0mu}\ensuremath{\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 3.0mu}\ensuremath{\mathsf{f}}. However, categories which make both sides of the
above equation equivalent in all respects are rare. For example the
presence of effects tend to break the property. For example,
a Kleisli category is cartesian only if the embedded effects are
commutative and idempotent.
In particular if one takes runtime costs into account,
the equivalence vanishes. Worse, in the presence of other
optimisations, one cannot tell \textit{a priori} which side of the
equation has the lowest cost: it may be beneficial to have a single
instance of \ensuremath{\mathsf{f}} so that work is not duplicated, but it may just
as well be more beneficial to have two instances, so that for example
they can fuse with whatever follows in the computation. Indeed if the
output of \ensuremath{\mathsf{f}} is large, following it with \ensuremath{\mathsf{δ}} may require storing
(parts of) it, whereas each copy of \ensuremath{\mathsf{f}} may be followed by a
function which only require \ensuremath{\mathsf{f}} to be ran lazily, not requiring any storage. In
general, programmers must decide for themselves if it is best to place
\ensuremath{\mathsf{f}} before or after \ensuremath{\mathsf{δ}}. Thus the {\sc{}smc} approach, which we follow, is to ask the
programmer to place \ensuremath{\mathsf{δ}} \emph{explicitly}, using \ensuremath{\mathsf{copy}} from \cref{33}.\footnote{Indeed, duplications which we consider here are coming from
user code, and they are disjoint from those that we insert in the
intermediate free cartesian representations discussed in
\cref{60}. In fact, there is no interaction between
the two.} We regard this approach to be the most appropriate
when there is a significant difference between the left-
and the right-hand side of the above equation. Another possibility
would be to use a decidable check over generators (as discussed in
\cref{140}) and enforce that all applications of a generator
to the same input are realised as a single generator in the
resulting morphism. For example, one can use identity in the
source code (of the host language) as generator equality. Then, each
occurrence in the source is mapped one-to-one with its occurrences in
the representation as a (cartesian) morphism. This sort of
source-code identity is available when one has access to the
representation of the source code (see \cref{143}), or by using
any approach to observable sharing (see \cref{142}).
\subsection{Observable Sharing}\label{142}
One way to recover representations from embedded {\sc{}dsl}s is to leverage
observable sharing techniques. \citet{gill_type-safe_2009} provides a
review of the possible approaches, but in short, one uses unique names
equipped with testable equality for what we call here generators.
Explicit unique names can be provided directly by the programmer, or
generated using a state monad. Alternatively, testable equality can be
implemented by pointer equality. The version of
\citet{claessen_observable_1999} is native, but it breaks referential
transparency. The version of \citet{peyton_jones_stretching_1999} preserves referential transparency, but resides in the catch-all IO
monad.
Turning the problem on its head, we can see our approach as a
principled solution to observable sharing. Essentially, forcing the
programmer to be explicit about duplication means that no implicit
sharing needs to be recovered, and therefore {\sc{}edsl} backends (such as those
presented in \cref{36}) need not deal with it.
\subsection{Compiling to Categories}\label{143}
\citet{elliott_compiling_2017} advertises a compiler plugin which
translates a source code representation to a categorical
representation. This plugin is close in purpose to what we propose here. The first
obvious difference is that our solution is entirely programmed within
Haskell, while Elliott's acts at the level of the
compiler. This makes our approach much less tied to a particular
implementation, and we even expect it to be portable to other
languages with linear types. In return, it demands paying an extra
cost at runtime.
There are more fundamental differences however: because the
input of the plugin is Haskell source code, it is forced to target cartesian
\ensuremath{\mathsf{closed}} categories, even though most of Elliott's applications
naturally reside at the simple cartesian level (keeping in mind the
\textit{caveat} discussed in \cref{141}). This forces one to
provide cartesian closed instances for all applications, or add a
translation layer from cartesian closed to just cartesian categories. Our approach
avoids any of those complications, but
\citet{valliappan_exponential_2019} provide a detailed study of the alternative.
In fact, the present work has much synergy with Elliott's: all his examples
are supported by our technique, out of the box, and we recommend
consulting them for a broader view of the applications of categorical
approaches. Accordingly, in \cref{36} we have focused on the stones left unturned
by Elliott. In
particular the
applications to quantum gates is out of reach when one targets
cartesian closed categories.
\subsection{A practical type theory for {\sc{}smc}s}\label{144}
\citet{shulman_type_theory_for_smc_2019} proposes a type theory for
{\sc{}smc}s. The motivation is different than ours: Shulman wants to provide
set-like reasoning on {\sc{}smc} morphisms to mathematicians, whereas we are
providing a notation to describe {\sc{}smc} morphisms in a programming
language. Shulman's is a dedicated language while ours is embedded in
Haskell. The means are rather different too: Shulman's
type theory doesn't require giving a meaning to ports (Shulman calls
ports ``terms'') instead the semantic is given globally over an entire
judgement. We give a local semantics by giving a meaning to ports. This
difference follows from our implementing the port interface within
Haskell, rather than using metaprogramming, as described in
\cref{143}.
Nevertheless, the end product, as far as the user is concerned, is
pretty similar: one writes expressions on ports that one then needs to
combine together to form a legal expression. This convergence suggests
that there may be value in a further investigation of the mathematical structure
of ports.
\subsection{Quantification over \ensuremath{\mathsf{r}} }\label{145}
Another minor possible improvement in the {\sc{}api} (\cref{33}) would be
to remove the variable \ensuremath{\mathsf{r}} in the type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}}. Such
locally quantified variables are used to ensure that two instances of
an {\sc{}edsl} are not mixed together.
For instance, \citet{launchbury_lazy_1994} use them to capture the identity of state threads.
However, in our case, this role is already fulfilled by the
use of linear types. Indeed, if an initial value type \ensuremath{\mathsf{P}\mskip 3.0mu}\ensuremath{\mathsf{k}\mskip 3.0mu}\ensuremath{\mathsf{r}\mskip 3.0mu}\ensuremath{\mathsf{a}} is introduced
by an instance of \ensuremath{\mathsf{decode}}, linearity checks already prevent it from occuring free
in another instance of \ensuremath{\mathsf{decode}}. The same property holds for values derived from it (using \ensuremath{\mathsf{split}}, \ensuremath{\mathsf{merge}}, etc.).
We leave a proof of this fact to future work.
Besides, even though the implementation does not strictly need the variable \ensuremath{\mathsf{r}}, our proof of its correctness does,
therefore we have not explored this route further.
\section{Conclusion}\label{146}
When defining an embedded domain specific language, there is often a
tension between making the syntax ({\sc{}api}) convenient for the user, and
making the implementation simple. In particular, how to compose
objects is an important choice in the design space. Using explicit
names for intermediate computations is often most convenient for the
user, but can be hard to support by the implementation. In this paper
we have shown a way to bridge the gap between the convenience of lambda
notation on the user-facing side with the convenience of categorical
combinators on the implementation side. The price to pay is
linearity: the user must make duplication and discarding of values explicit.
Indeed, our technique is grounded in the equivalence between symmetric monoidal
categories and linear functions.
While this equivalence is well known, we have pushed the state of
the art by showing that linear functions can \emph{compute their own
representation} in a symmetric monoidal category.
Our technique has several positive aspects: it is usable in practice
in a wide range of contexts; it is comprised of a small interface and
reasonably short implementation; and it does not depend on any
special-purpose compiler modification, nor on metaprogramming. As such,
in the context of Haskell, it has the potential to displace the arrow
notation as a standard means to represent computations whose static
structure is accessible.
In general, we think that this paper provides suitable means to work
with commutative effects in functional languages. Commutative effects
are numerous (environment, supply of unique names, random number
generation, etc.), and proper support for them has been recognised as a
challenge for a long time, for example by
\citet[challenge 2, slide 38]{peyton_jones_wearing_2003}. This paper provides evidence that
{\sc{}smc}s constitute the right abstraction for commutative effects, and that
linear types are key to providing a convenient notation for them.
\begin{acks}
We warmly thank James Haydon and Georgios Karachalias as well as anonymous reviewers for feedback on previous versions of this paper.
Jean-Philippe Bernardy is supported by grant \grantnum{clasp}{2014-39} from the
\grantsponsor{clasp}{Swedish Research Council}{https://www.vr.se}, which funds the Centre for Linguistic Theory and
Studies in Probability (CLASP) in the Department of Philosophy, Linguistics,
and Theory of Science at the University of Gothenburg.
\end{acks}
\bibliographystyle{ACM-Reference-Format}
|
\section{Introduction}
\setcounter{equation}{0}
According to the standard cosmological model, the early universe, in the course of its expansion and cooling, undergoes phase transitions with spontaneous symmetry breaking. Topological defects of various kinds (monopoles, strings, domain walls) are formed in the aftermath of such phase transitions \cite{Ki1,Ki2,Zel,Vil1,Vil2}. Most of these defects are unstable and decay as the universe expands, but some can survive. Namely, linear defects (cosmic strings), starting from a random tangle, evolve into two different sets: the unstable one which consists of a variety of string loops decaying by gravitational radiation and the stable one which consists of several long, approximately straight strings spanning the horizon, see, e.g., reviews in \cite{Vil3,Ki3}. Although a measurement of the cosmic microwave background radiation testifies that the cosmic strings are not abundant, their evolution brings distinct astrophysical effects, in particular, producing detectable gravitational waves \cite{Dam}, gamma-ray bursts \cite{Ber}, and high-energy cosmic rays \cite{Bhat}. The interest in cosmic strings also is amplified by theoretical findings that they almost inevitably emerge in the framework of superstring and supergravity models aiming at the explanation of the inflation (brane inflation)\cite{Sar,Jean,Dva,Pol,Sak,Cop}.
A straight infinitely long cosmic string in its rest frame is characterized by tension (or linear density of energy)
\begin{equation}\label{1.1}
\mu=\frac{1}{16 \pi \c{G}} \int\limits_{\rm core}{\rm d}\sigma\,R,
\end{equation}
where $\c{G}$ is the gravitational constant, $R$ is the curvature scalar, and the integration is over the transverse section of the string core
(natural units $\hbar=c=1$ are used). Space outside the string core is locally flat ($R=0$) but
non-Euclidean, with squared length element
\begin{equation}\label{1.2}
ds^2= dr^2+(1-4\c{G} \mu)^2 r^2 d\varphi^2+dz^2,
\end{equation}
where cylindrical coordinates with the symmetry axis coinciding with the axis of the string are chosen. Such a space can be denoted as a conical one: a surface which is transverse to the string is isometric to the surface of a cone with the deficit angle equal to $8\pi \c{G}\mu$. The observation of discontinuities in the cosmic microwave background radiation imposes an upper bound on the value of the deficit angle to be $2.5 \times 10^{-6}$ rad, see \cite{Bat}; however, it makes sense in a more general context in theory to consider larger values of the deficit angle up to $2\pi$. Moreover, of some interest may be saddle-like conical spaces with the deficit angle taking negative values unbounded from below (unbounded surplus angle), although tension \eqref{1.1} is negative in this case; for instance, such a space effectively emerges in the A phase of superconductive He3 (see \cite{Vol}).
Various nanoconical structures arise in a diverse set of condensed matter systems known as the Dirac materials, ranging from honeycomb crystalline allotropes (graphene \cite{Ge}, silicene and germanene \cite{Cah}, phosphorene \cite{Liu}) to high-temperature cuprate superconductors \cite{Tsu} and topological
insulators \cite{Qi}.
Returning to the concept of a string as of a topological defect, we note that, in the case of spontaneous breakdown of a continuous symmetry, the string acquires an additional global characteristic -- flux
\begin{equation}\label{1.3}
\Phi=\int\limits_{\rm core} d\sigma\, \mbox{\boldmath $\partial$}\times \textbf{V}=\oint d \textbf{x} \cdot \textbf{V},
\end{equation}
where $\textbf{V}$ is the vector potential of the gauge field corresponding to the spontaneously broken gauge symmetry, and the line integral is over a closed contour encircling the string core once. Note also that the gauge field potential is nonvanishing outside the string core, although the gauge field strength vanishes there (this is a general ground for the renowned Aharonov-Bohm effect \cite{Ehre,Aha}).
Matter emerging in the universe in an epoch after the birth of a cosmic string is assumed to interact with its gauge field in the minimal way, i.e., via substitution
\begin{equation}\label{1.33}
\mbox{\boldmath
$\partial$} \rightarrow \mbox{\boldmath
$\partial$} - {\rm i}\tilde e\, \textbf{V}\end{equation}
for the gradient of the matter field ($\tilde e$ is the appropriate coupling constant). A plausible hierarchy of energy scales is as follows
\begin{equation}\label{1.4}
m_{{\rm Planck}} \gg m_{{\rm H}} \gg m,
\end{equation}
where $m_{{\rm Planck}} = \c{G}^{-1/2}$ is the Planck energy scale, $m_{{\rm H}}$ is the energy scale of the spontaneous symmetry breakdown, i.e., the mass of the appropriate Higgs boson, and $m$ is the mass of the matter field. In view of the right inequality in \eqref{1.4}, the direct interaction of the matter field with the Higgs field is negligible. Assuming without a loss of generality that the string has the form of a tube of radius $r_0$, we note that the transverse size of the string core is of the order of the correlation length,
\begin{equation}\label{1.5}
r_0 \sim m_{{\rm H}}^{-1}.
\end{equation}
The string tension is of the order of the inverse correlation length squared,
\begin{equation}\label{1.6}
\mu \sim m_{{\rm H}}^2.
\end{equation}
A study of various effects of vacuum polarization of the quantum relativistic charged spinor matter field in the cosmic string background has a long history of more than three decades (see \cite{Gor,Si0,Flek,Par,Sit6,Sit9,Bez1,Bel1,Bez2,Bel2,Bez4,Bez5,SiG} and references therein). However, this study in no way is exhaustive, and several crucial points should be stressed. A simplifying asssumption in \cite{Gor,Si0,Flek,Par,Sit6,Sit9,Bel2} is to neglect the transverse size of the string. In view of \eqref{1.5}, this corresponds to a requirement of the vanishing correlation length, i.e. infinite $m_{{\rm H}}$ and, surely, infinite $m_{{\rm Planck}}$, keeping ratio $m_{{\rm H}}/m_{{\rm Planck}}$ to be small enough in order to satisfy the left inequality in \eqref{1.4}. Moreover, the matter field has to be subject to a certain (disputable) condition at the location of an infinitely thin string. If the transverse size of the string is taken into account, then an unavoidable obstruction arises so far as the interior of the string core is a ``black box'': the exact forms of the local characteristics (curvature scalar and gauge field strength) inside the core are unknown, and the results are obtained for certain made-up configurations only, see \cite{Bez4,Bez5}. On the other hand, it should be recalled that a phase with the spontaneously broken symmetry exists outside the string core and the vacuum has to be defined there. Hence the matter field is not allowed to penetrate inside the string core, obeying a boundary condition at its edge. What in general can be said about this boundary condition? First, there is a requirement of mathematical consistency: as long as the case of stable matter is considered, the Hamiltonian operator for the matter field has to be self-adjoint. Secondly, a physical requirement, as has been just noted, is in the absence of the penetration of the matter field through the boundary. Actually, for a spatial region with a one-component boundary (and this is space out of the string core), the requirements are equivalent, and they yield, as an outcome, a four-parameter family of boundary conditions, see \cite{Bee,Wie,Si1}; the parameter values may in general differ for different points of the boundary \cite{SiY}. One can comprehend that an arbitrariness in the configuration of the curvature scalar and the gauge field strength inside the string core is translated into an arbitrariness in the choice of boundary conditions at the edge of the string core. Thus, the quantum effects of matter in the cosmic string background depend on the boundary parameters, as well as on the global characteristics of the string -- tension \eqref{1.1} and flux \eqref{1.3}; moreover, as a manifestation of the Aharonov-Bohm effect, the dependence on the flux is periodic with a period equal to the appropriate London flux quantum, $2\pi /\tilde e$.
However, it is needless to say that the above generality is excessive, and some additional physical arguments can restrict the arbitrariness of boundary conditions. For instance, a requirement of various discrete symmetries reduces the number of boundary parameters. As will be shown in the present study, there are further physical requirements that completely remove the arbitrariness of boundary conditions.
Observation of magnetic fields of order $10^{-18} - 10^{-10}$ Gauss in intergalactic voids \cite{Nero} indicates that a magnetic field has emerged in the early universe. The generation of primordial magnetic fields is a hot topic, and different scenarios for this phenomenon are proposed, see \cite{Subr}. Therefore, among a whole variety of the vacuum polarization effects in the cosmic string background, we focus on the induced vacuum magnetic field. As is proven in the present paper, the cosmic string background indeed produces a magnetic field in the vacuum of the quantum relativistic charged spinor matter field, and the dependence of this effect on the global characteristics of the string is unambiguously determined.
In the next section we define the physical characteristics of the vacuum of the quantum relativistic charged spinor matter field in the cosmic string background . In Section 3 we choose boundary conditions ensuring the absence of the matter flux through the edge of the string core and display the role of discrete symmetries. The induced vacuum current and magnetic field strength in the case of the two-parameter position-dependent boundary condition are obtained in Section 4. In Section 5 we consider the total induced vacuum magnetic flux and find out that an arbitrariness in the boundary parameter values is removed by requiring the physically plausible behavior for the flux. Finally, the results are summarized in Section 6. In Appendix A we present the complete set of solutions to the Dirac equation that is relevant to the problem considered. An alternative representation of the results, allowing for the explicit extraction of the dependence on the transverse size of the string, is given in Appendix B. The results for the formal case of the infinitely thin string are given in Appendix C.
\section{Vacuum of quantum spinor matter in \\
the cosmic string background}
\setcounter{equation}{0}
The current that is induced in the vacuum by static background fields is defined by relations
\begin{multline}\label{2.1}
j^0(\textbf{x})= \frac12 \langle {\rm vac}| \left[{\hat\Psi}^\dag(\textbf{x},x^0) \, {\hat\Psi}(\textbf{x},x^0) - {\hat\Psi}^T(\textbf{x},x^0) \, {\hat\Psi}^{\dag T}(\textbf{x},x^0)\right] |{\rm vac}
\rangle \\
=-\frac12\sum\hspace{-1.4em}\int \rm{sgn}(E) \,
\psi^\dag_E(\textbf{x}) \, \psi_E(\textbf{x})
\end{multline}
and
\begin{multline}\label{2.2}
\textbf{j}(\textbf{x})= \frac12 \langle {\rm vac}| \left[{\hat\Psi}^\dag(\textbf{x},x^0) \, \gamma^0
\mbox{\boldmath $\gamma$} \, {\hat\Psi}(\textbf{x},x^0) - {\hat\Psi}^T(\textbf{x},x^0)\left(\gamma^0
\mbox{\boldmath $\gamma$}\right)^T {\hat\Psi}^{\dag T}(\textbf{x},x^0)\right] |{\rm vac}
\rangle \\
=-\frac12\sum\hspace{-1.4em}\int \rm{sgn}(E) \,
\psi^\dag_E(\textbf{x}) \, \gamma^0
\mbox{\boldmath $\gamma$} \, \psi_E(\textbf{x})
\end{multline}
[$\rm{sgn}(t)$ is the sign function, $\rm{sgn}(t)=\pm 1$ at $t \gtrless 0$]; here
\begin{equation}\label{2.3}
{\hat \Psi}({\textbf{x}},x^0)=\sum\hspace{-1.6em}\int\limits_{E>0} {\rm e}^{-{\rm
i}E x^0}\psi_{E}({\bf x})\,{\hat a}_{E}+
\sum\hspace{-1.6em}\int\limits_{E<0}
{\rm e}^{-{\rm i}E x^0}\psi_{E}({\bf
x})\,{\hat b}^\dag_{E}
\end{equation}
is the operator of the second-quantized spinor field, superscripts $T$ and $\dag$ denote a transposition and a Hermitian conjugation, ${\hat a}^\dag_E $ and ${\hat a}_E$ (${\hat b}^\dag_E $ and ${\hat b}_E$) are the spinor particle (antiparticle) creation and destruction operators obeying the anticommutation relations, ground state $|{\rm vac} \rangle$ is defined by relation ${\hat a}_E|{\rm vac}\rangle = {\hat b}_E|{\rm vac}\rangle = 0$, symbol \mbox{$\displaystyle \sum\hspace{-1.4em}\int $} denotes summation over the discrete part and integration (with a certain measure) over the continuous part of the energy spectrum, and ${\rm e}^{-{\rm i}E x^0}\psi_{E}({\bf x})$ is the solution to the stationary equation with the appropriate Dirac Hamiltonian denoted by $H$,
\begin{equation}\label{2.4}
\left({\rm i}\partial_0 - H\right) {\rm e}^{-{\rm i}E x^0}\psi_{E}({\bf x}) = 0.
\end{equation}
If the current given by \eqref{2.1} and \eqref{2.2} is nonvanishing, then electric [$\textbf{E}_I(\textbf{x})$] and magnetic [$\textbf{B}_I(\textbf{x})$] field strengths are also induced in the vacuum, as a consequence of the Maxwell equations,
\begin{equation}\label{2.5}
\mbox{\boldmath $\partial$} \cdot \textbf{E}_I(\textbf{x}) =
e\, j^0(\textbf{x})
\end{equation}
and
\begin{equation}\label{2.6}
\mbox{\boldmath $\partial$}\times \textbf{B}_I(\textbf{x}) =
e\, \textbf{j}(\textbf{x}),
\end{equation}
where the electromagnetic coupling constant, $e$, differs in general from $\tilde e$. The total flux of the induced vacuum magnetic field is
\begin{equation}\label{2.7}
\Phi_I=\int d \, \textbf{S} \cdot \textbf{B}_I(\textbf{x}),
\end{equation}
while the global characteristics that is related to
$\textbf{E}_I(\textbf{x})$ is the total induced vacuum charge,
\begin{equation}\label{2.8}
Q_{\rm I} = \int d \, V \mbox{\boldmath $\partial$} \cdot \textbf{E}_I(\textbf{x});
\end{equation}
here $d \, V$ is the infinitesimal element of the volume of space, and $d \, \textbf{S}$ is the infinitesimal element of the surface which is orthogonal to $\textbf{B}_I(\textbf{x})$.
In the case of the cosmic string background, the Dirac Hamiltonian takes form
\begin{equation}\label{2.9}
H=-{\rm i} \gamma^0
\mbox{\boldmath $\gamma$}\cdot \left[\mbox{\boldmath
$\partial$} - {\rm i}\tilde e\, \textbf{V}(\textbf{x}) + \frac{{\rm i}}2
\mbox{\boldmath $\omega$}(\textbf{x})\right]+\gamma^0 m,
\end{equation}
where $\textbf{V}(\textbf{x})$ is the bundle connection and $\mbox{\boldmath $\omega$}(\textbf{x})$ is the spin connection, corresponding to the cosmic string background. In cylindrical coordinates $r, \varphi, z$ with the symmetry axis coinciding with the axis of a straight cosmic string, only angular components of the connections are nonvanishing,
\begin{equation}\label{2.10}
V_\varphi=\frac{\Phi}{2\pi}, \quad w_\varphi={\rm
i}\frac{1 -\nu}r\, \gamma_\varphi \gamma^r,
\end{equation}
and Hamiltonian \eqref{2.9} takes form
\begin{equation}\label{2.11}
H=-{\rm i}\gamma^0
\left[\gamma^r\left(\partial_r+\frac{1-\nu}{2r}\right)+\gamma^\varphi\left(\partial_\varphi-{\rm
i}\frac{\tilde e \Phi}{2\pi}\right)+\gamma^3 \, \partial_z\right]+\gamma^0 m,
\end{equation}
where $\Phi$ is given by \eqref{1.3}, notation
\begin{equation}\label{2.111}
\nu=(1-4\c{G} \mu)^{-1}
\end{equation}
is introduced, and $\mu$ is given by \eqref{1.1}. Using the following representation for the Dirac matrices,
\begin{equation}\label{2.12}
\gamma^0=\left(\begin{array}{cc}
\sigma^3 & 0\\
0 & \sigma^3
\end{array}\right),\quad
\gamma^1={\rm i}\left(\begin{array}{cc}
\sigma^1 & 0\\
0 & \sigma^1
\end{array}\right),\quad
\gamma^2={\rm i}\left(\begin{array}{cc}
\sigma^2 & 0\\
0 & - \sigma^2
\end{array}\right),\quad
\gamma^3={\rm i}\left(\begin{array}{cc}
0 & \sigma^2\\
\sigma^2 & 0
\end{array}\right)
\end{equation}
($\sigma^1$, $\sigma^2$, and $\sigma^3$ are the Pauli matrices), we obtain the block-diagonal form for matrices
$\gamma^r$ and $\gamma^\varphi$,
\begin{equation}\label{2.13}
\gamma^r=\gamma_r={\rm i}
\left(\begin{array}{cc}
\sigma^1\cos\varphi + \sigma^2\sin\varphi& 0 \\
0 & \sigma^1\cos\varphi - \sigma^2\sin\varphi
\end{array}\right)
\end{equation}
and
\begin{equation}\label{2.14}
\gamma^\varphi=\frac{\nu}{r}\,{\rm i}
\left(\begin{array}{cc}
\sigma^2\cos\varphi - \sigma^1\sin\varphi& 0 \\
0 & - \sigma^2\cos\varphi - \sigma^1\sin\varphi
\end{array}\right),
\quad \gamma_\varphi = \frac{r^2}{\nu^2} \, \gamma^\varphi,
\end{equation}
and present Hamiltonian \eqref{2.11} as
\begin{equation}\label{2.15}
H=\left(\begin{array}{cc}
H_1 & - {\rm i}\sigma^1 \partial_z\\
- {\rm i}\sigma^1 \partial_z & H_{-1}
\end{array}\right),
\end{equation}
where
\begin{multline}\label{2.16}
H_s=-{\rm i}\left[\left(s \sigma^1\sin\varphi - \sigma^2\cos\varphi\right)\left(\partial_r+\frac{1-\nu}{2r}\right) \right.\\
\left. + \frac{\nu}{r}\left(s \sigma^1\cos\varphi + \sigma^2\sin\varphi\right)\left(\partial_\varphi-{\rm
i}\frac{\tilde e \Phi}{2\pi}\right)\right]+\sigma^3 m, \quad s= \pm 1.
\end{multline}
Decomposing the four-component function, $\psi_E(r,\varphi, z)$, into the two-component ones, $\psi_E^{(1)}(r,\varphi)$ and $\psi_E^{(-1)}(r,\varphi)$,
\begin{equation}\label{2.17}
\psi_E(r,\varphi, z) =\frac{e^{{\rm i}k_3 z}}{\sqrt{2\pi}} \left(\begin{array}{c}
\psi_E^{(1)}(r,\varphi) \\
{\rm i} \psi_E^{(-1)}(r,\varphi)
\end{array}\right),
\end{equation}
we note that the stationary Dirac equation, see \eqref{2.4},
\begin{equation}\label{2.18}
\left(E - H\right)\psi_E(r,\varphi, z) = 0,
\end{equation}
is equivalent to system of equations
\begin{equation}\label{2.19}
\left\{
\begin{array}{c}
\left(E - H_{1}\right) \psi_E^{(1)}(r,\varphi) = {\rm i} k_3 \sigma^1 \psi_E^{(-1)}(r,\varphi) \\
\left(E - H_{-1}\right) \psi_E^{(-1)}(r,\varphi) = - {\rm i} k_3 \sigma^1 \psi_E^{(1)}(r,\varphi)
\end{array}
\right\}.
\end{equation}
In view of equalities
\begin{equation}\label{2.20}
H_{1} \sigma^1 + \sigma^1 H_{-1} = \sigma^1 H_{1} + H_{-1} \sigma^1 = 0,
\end{equation}
relation
\begin{equation}\label{2.21}
\left(E^2 - H^2\right)\psi_E(r,\varphi, z) = 0
\end{equation}
which is just a direct consequence of \eqref{2.18} is equivalent to relation
\begin{equation}\label{2.22}
\left(E^2 - k^2_3 - H^2_s\right)\psi_E^{(s)}(r,\varphi) = 0.
\end{equation}
Thus, function $\psi_E^{(s)}(r,\varphi)$ can be regarded as a solution to equation
\begin{equation}\label{2.23}
\left(E - \left.H_s\right|_{m \rightarrow m_3}\right)\psi_E^{(s)}(r,\varphi) = 0, \quad m_3 = \sqrt{m^2 + k^2_3}.
\end{equation}
Decomposing function $\psi_E^{(s)}(r,\varphi)$ as
\begin{equation}\label{2.24}
\psi_E^{(s)}(r,\varphi) = \sum_{n \in \mathbb{Z}}
\left(\begin{array}{c}
f_n^{(s)}(r,E ) \, \exp\left[{\rm i}\left(n + \frac12 - \frac12 \, s\right)\varphi\right] \\
g_n^{(s)}(r,E ) \, \exp\left[{\rm i}\left(n + \frac12 + \frac12 \, s\right)\varphi\right]
\end{array}\right)
\end{equation}
($\mathbb{Z}$ is the set of integer numbers), we present the latter equation as a system of two first-order differential equations for radial functions:
\begin{equation}\label{2.25}
\left\{
\begin{array}{c}
\left\{-\partial_r + r^{-1} \left[s \nu \left(n-n_{\rm c}\right)-G_s\right]\right\} f_n^{(s)}(r,E) =\left(E+m_3\right) g_n^{(s)}(r,E) \\
\left\{\partial_r + r^{-1} \left[s \nu \left(n-n_{\rm c}\right)+1-G_s\right]\right\} g_n^{(s)}(r,E)
=\left(E-m_3\right) f_n^{(s)}(r,E)
\end{array}
\right\},
\end{equation}
where
\begin{equation}\label{2.26}
n_{\rm c}=\left[\!\left| \frac{\tilde e \Phi}{2\pi}
\right|\!\right], \quad F = \left\{\!\!\left| \frac{\tilde
e \Phi}{2\pi} \right|\!\!\right\},\quad G_s =s \nu \left(F - \frac12 \right)+ \frac12,
\end{equation}
$\left[\!\left| u \right|\!\right]$ is the integer part of quantity $u$ (i.e., the integer that
is less than or equal to $u$), and $ \left\{\!\!\left| u \right|\!\!\right\} = u - \left[\!\left| u \right|\!\right]$ is the fractional part of quantity $u$, $ 0\leq \left\{\!\!\left| u \right|\!\!\right\}<1 $.
Using \eqref{2.12} and \eqref{2.24}, one immediately gets $j_r =0$ and $j_z =0$, while the remaining components of the induced vacuum current are $r$-dependent:
\begin{equation}\label{2.27}
j^0(r) = - \frac 12 \sum_{s = \pm 1}\sum\hspace{-1.4em}\int \sum_{n \in
\mathbb{Z}} {\rm sgn} (E) \left\{\left[f_n^{(s)}(r,E)\right]^2 + \left[g_n^{(s)}(r,E)\right]^2\right\}
\end{equation}
and
\begin{equation}\label{2.28}
j_\varphi(r) = - \frac r\nu \sum_{s = \pm 1}\sum\hspace{-1.4em}\int \sum_{n \in
\mathbb{Z}} {\rm sgn} (E) \, s \, f_n^{(s)}(r,E) \, g_n^{(s)}(r,E).
\end{equation}
As is noted in Introduction, parameters of the boundary condition in general case vary from point to point of the boundary. Consequently, $j^0(r)$ \eqref{2.27} and $j_\varphi(r)$ \eqref{2.28} in this case contain an additional dependence on
$\varphi$ and $z$ owing to the boundary condition. A variation of the boundary parameters with $z$ can be moderate enough, and a violation of the translational invariance along the string axis can be regarded as negligible. Therefore, the induced vacuum magnetic field strength is directed along the string axis,
\begin{equation}\label{2.30}
B_{\rm I}(r) = e \nu \int\limits_r^\infty \frac{dr'}{r'} \,
j_\varphi(r'),
\end{equation}
with total flux
\begin{equation}\label{2.31}
\Phi_{\rm I} = \frac{1}{\nu} \int\limits_{0}^{2\pi} d \varphi \int\limits_{r_0}^\infty dr\, r B_{\rm
I}(r)
\end{equation}
($r_0$ is the radius of the string). The total induced vacuum charge is given by expression
\begin{equation}\label{2.29}
Q_{\rm I} = \frac{e}{\nu} \int\limits_{0}^{2\pi} d \varphi \int\limits_{ - \infty}^\infty dz \int\limits_{r_0}^\infty dr\, r j^0(r).
\end{equation}
In the following we shall find quantities \eqref{2.27}-\eqref{2.29} in the case of $1 \leq \nu < \infty$, which corresponds to the deficit angle ranging from $0$ to $2\pi$, and in the case of $\frac12 \leq \nu < 1$, which corresponds to the deficit angle ranging from $-2\pi$ to $0$, for $\frac12 \left(\frac1\nu - 1\right) < F < \frac12 \left(3 - \frac1\nu\right)$.
\section{Boundary condition: self-adjointness and discrete symmetries}
\setcounter{equation}{0}
The most general boundary condition that is compatible with the self-adjointness of the Dirac Hamiltonian in the case of three-dimensional spatial region $X$ with one-component boundary $\partial{X}$ depends on four parameters $u,v,t^1,t^2$, see \cite{Si1}:
\begin{equation}\label{3.1}
(I - K)\psi|_{\mathbf{x}\in
\partial{X}} = 0
\end{equation}
with
\begin{equation}\label{3.2}
K=\frac{(1+u^2-v^2-{\boldsymbol{t}}^2)I+(1-u^2+v^2+{\boldsymbol{t}}^2)\gamma^0}{2{\rm
i}(u^2-v^2-{\boldsymbol{t}}^2)}(u\boldsymbol{n}\cdot\boldsymbol{\gamma}+v\gamma^{5}-{\rm
i}\boldsymbol{t}\cdot\boldsymbol{\gamma});
\end{equation}
here $\gamma^{5}=-{\rm i}\gamma^0\gamma^1\gamma^2\gamma^3$,
$\boldsymbol{n}$ is the outward normal to $\partial{X}$,
${\boldsymbol{n}}^2=1$, and
$\boldsymbol{t}=(t^1,t^2)$ is tangential to $\partial{X}$, $\boldsymbol{t}\cdot\boldsymbol{n}=0$. It should be recalled that
\begin{equation}\label{3.3}
K = - {\rm i} \boldsymbol{n}\cdot\boldsymbol{\gamma}
\end{equation}
corresponds to the so-called quark bag boundary condition that was postulated a long time ago as the condition ensuring the confinement of the matter field, see \cite{Bog,Cho1,Joh}. However, the confinement is ensured equally as well by the four-parameter boundary condition with matrix $K$ given by \eqref{3.2}, and this is the most general confining boundary condition.
Parameters of the boundary condition, $u,v,t^1,t^2$,
can be interpreted as the self-adjoint extension parameters. It should be emphasized that the values
of these parameters may in general vary from point to point of the
boundary. In this respect the ``number'' of self-adjoint extension
parameters is, in fact, infinite, moreover, it is not countable but
is of power of a continuum. This distinguishes the case of an
extended boundary from the case of an excluded point (contact
interaction), when the number of self-adjoint extension parameters
is finite, being equal to $n^2$ for the deficiency index equal to
($n,n$) (see, e.g., \cite{Ree,Alb}).
In the case of spatial region out of the straight cosmic string of radius $r_0$, the boundary condition is
\begin{equation}\label{3.4}
(I-K)\left.\psi \right|_{r = r_0} = 0
\end{equation}
with
\begin{multline}\label{3.5}
K= \frac{\left[1+u^2-v^2-(\nu/r)^2(t_\varphi)^2-(t^z)^2\right]I+\left[u^2+v^2+(\nu/r)^2(t_\varphi)^2+(t^z)^2\right]\gamma^0}{2\left[u^2-v^2-(\nu/r)^2(t_\varphi)^2-(t^z)^2\right]} \\
\times\left({\rm i}u\gamma^r-{\rm i}v\gamma^5-t_\varphi\gamma^\varphi-t^z\gamma^z\right).
\end{multline}
Invariance under spatial reflection,
\begin{equation}\label{3.6}
P:\ \ \ \varphi\rightarrow\varphi+\pi\ \ \ z\rightarrow -z\ \ \ \psi\rightarrow {\rm i}\gamma^0\psi,
\end{equation}
reduces the number of boundary parameters by half:
\begin{equation}\label{3.7}
v=0,\ \ t^z=0,
\end{equation}
and matrix $K$ takes form
\begin{equation}\label{3.8}
K=\frac{\left[1+u^2-(\nu/r)^2(t_\varphi)^2\right]I+\left[1-u^2+(\nu/r)^2(t_\varphi)^2\right]\gamma^0}{2\left[u^2-(\nu/r)^2(t_\varphi)^2\right]}({\rm i}u\gamma^r-t_\varphi\gamma^\varphi).
\end{equation}
Using parametrization
\begin{equation}\label{3.9}
u=\frac{\cos \eta}{\cos \theta+\sin \eta},\ \ t_\varphi=\frac{r}{\nu}\,\frac{\sin \theta}{\cos \theta+\sin \eta},
\end{equation}
we get
\begin{equation}\label{3.10}
K=\frac{I\cos \theta+\gamma^0\sin\eta}{\cos^2\theta-\sin^2\eta}\left({\rm i}\gamma^r\cos\eta-\frac{r}{\nu}\gamma^\varphi\sin\theta\right).
\end{equation}
In view of invariance under the simultaneous shift by $\pi$,
\begin{equation}\label{3.11}
\left.K\right|^{\theta\rightarrow\theta+\pi}_{\eta\rightarrow\eta+\pi} = K,
\end{equation}
it suffices to restrict the range of boundary angular parameters to
\begin{equation}\label{3.12}
0\leq \theta<2\pi, \,\,\,\, 0\leq\eta<\pi.
\end{equation}
A dependence of parameters $\theta$ and
$\eta$ on $\varphi$ and $z$ is admissible, if condition
\begin{equation}\label{3.122}
\theta(\varphi+\pi, -z) = \theta(\varphi, z), \,\,\,\, \eta(\varphi+\pi, -z) = \eta(\varphi, z)
\end{equation}
is satisfied.
It should be noted (see \cite{Si3} for details) that boundary condition \eqref{3.1} can be rewritten as
\begin{equation}\label{3.13}
(I-\tilde{K})\left.\psi\right|_{\mathbf{x}\in
\partial{X}}=0,
\end{equation}
where
\begin{equation}\label{3.14}
\tilde{K}=(1-N)K+N.
\end{equation}
If $N$ is a Hermitian matrix, $N^{\dagger}=N$, which obeys condition
\begin{equation}\label{3.15}
N K - K^{\dagger} N = K - K^\dagger ,
\end{equation}
then $\tilde{K}$ is Hermitian also, $\tilde{K}^{\dagger}=\tilde{K}$. In the case of $K$ given by \eqref{3.10}, we have
\begin{equation}\label{3.16}
N=\gamma^0\cos\theta\sin \eta+{\rm i}\frac{r}{\nu}\gamma^r\gamma^\varphi\sin\theta\cos\eta
\end{equation}
and
\begin{equation}\label{3.17}
\tilde{K}=\left(I\cos\theta-\frac{r}{\nu}\gamma^\varphi\sin\theta\right)
\left({\rm i}\gamma^r\cos\eta+\gamma^0\sin\eta\right).
\end{equation}
Note the following relation under separate shifts by $\pi$:
\begin{equation}\label{3.18}
\left.\tilde{K}\right|_{\theta\rightarrow\theta+\pi}=\left.\tilde{K}\right|_{\eta\rightarrow\eta+\pi}=-\tilde{K}.
\end{equation}
Imposing the boundary condition with either $K$ \eqref{3.10} or $\tilde{K}$ \eqref{3.17} on the decomposition of the wave function into modes, see \eqref{2.17} and \eqref{2.24}, we obtain condition for the modes:
\begin{equation}\label{3.19}
\left.f_n^{(s)}\right|_{r=r_0}+\tau_s(\theta,\eta)\left.g_n^{(s)}\right|_{r=r_0}=0,
\end{equation}
where
\begin{equation}\label{3.20}
\tau_s(\theta,\eta)=\tan\left(s\frac{\theta}{2}+\frac{\eta}{2}+\frac{\pi}{4}\right).
\end{equation}
To end the discussion of the $P$ invariant boundary condition, we list some properties of $\tau_s(\theta,\eta)$:
\begin{multline}\label{3.21}
\tau_s(-\theta,-\eta)=\tau_s^{-1}(\theta,\eta), \, \tau_{-s}(\theta,\eta)=\tau_s^{-1}(\theta,-\eta), \,
\tau_{s}(\theta+\pi,\eta)=\tau_{s}(\theta,\eta+\pi)=-\tau_s^{-1}(\theta,\eta).
\end{multline}
The number of boundary parameters is reduced by half as well, if, instead of $P$ invariance, one requires invariance under the combination of charge conjugation and time reversal,
\begin{equation}\label{3.22}
CT:\,\,\,\,\,\,\,x^0\rightarrow-x^0\,\,\,\,\,\,\,\,\psi\rightarrow-{\rm i}\gamma^0\gamma^5\psi.
\end{equation}
Then
\begin{equation}\label{3.23}
v=0,\,\,\,\,u^2-(\nu/r)^2(t_\varphi)^2-(t^z)^2=1,
\end{equation}
and matrix $K$ takes form
\begin{equation}\label{3.24}
K={\rm i}\gamma^r\sec\theta-\left(\frac{r}{\nu}\gamma^\varphi\cos\zeta+\gamma^3\sin\zeta\right)\tan\theta,
\end{equation}
where the use is made of parametrization
\begin{equation}\label{3.25}
u=\sec\theta,\,\,\,\,t_\varphi=\frac r\nu\tan\theta\cos\zeta,\,\,\,\,t^z=\tan\theta\sin\zeta;
\end{equation}
it suffices to restrict the range to
\begin{equation}\label{3.26}
0\leq\theta<2\pi,\,\,\,\,0\leq\zeta<\pi,
\end{equation}
and a dependence of $\theta$ and $\zeta$ on $\varphi$ and $z$ is admissible.
Determining Hermitian matrix $N$ obeying condition \eqref{3.15}, and defining Hermitian matrix $\tilde{K}$ by \eqref{3.14}, we get
\begin{equation}\label{3.27}
N={\rm i}\gamma^r\left(\frac{r}{\nu}\gamma^{\varphi}\cos\zeta+\gamma^3\sin\zeta\right)\sin\theta
\end{equation}
and
\begin{equation}\label{3.28}
\tilde{K}={\rm i}\gamma^r\left[I\cos\theta+\left(\frac{r}{\nu}\gamma^\varphi\cos\zeta+\gamma^3\sin\zeta\right)\sin\theta\right].
\end{equation}
Because of the appearance of $\gamma^3$ in \eqref{3.24} and \eqref{3.28}, the boundary condition mixes the components of the wave function with $s=1$ and $s=-1$. Assuming nevertheless the condition for the modes in the form, cf. \eqref{3.19},
\begin{equation}\label{3.29}
\left.f_n^{(s)}\right|_{r=r_0}+\tau_s(\theta,\zeta)\left.g_n^{(s)}\right|_{r=r_0}=0,
\end{equation}
one gets relation
\begin{equation}\label{3.30}
\tau_s(\theta,\zeta)\left(1-s\sin\theta\cos\zeta\right)+\tau_{-s}(\theta,\zeta)(1+s\sin\theta\cos\zeta)=\cos\theta\left[1+\tau_s(\theta,\zeta)\tau_{-s}(\theta,\zeta)\right].
\end{equation}
If one requires $P$ invariance \eqref{3.6} in addition to $CT$ invariance \eqref{3.22}, then
\begin{equation}\label{3.31}
t^z=0,
\end{equation}
and one obtains
\begin{equation}\label{3.32}
K={\rm i}\gamma^r\sec\theta-\frac{r}{\nu}\gamma^\varphi\tan\theta
\end{equation}
and
\begin{equation}\label{3.33}
\tilde{K}={\rm i}\gamma^r\left(I\cos\theta+\frac{r}{\nu}\gamma^\varphi\sin\theta\right);
\end{equation}
the same is certainly obtained if one reverses the order of requirements. Thus, in the case of invariance under the $CPT$ transformation,
\begin{equation}\label{3.34}
CPT:\,\,\,\, \varphi\rightarrow\varphi+\pi\,\,\,\,z\rightarrow -z\,\,\,\,x^0\rightarrow -x^0\,\,\,\,\psi\rightarrow \gamma^5\psi,
\end{equation}
the boundary condition depends on one parameter, $\theta$, and we obtain
\begin{equation}\label{3.35}
\tau_s(\theta,0)=\tan\left(s\frac{\theta}{2}+\frac{\pi}{4}\right).
\end{equation}
The most restrictive is the requirement of invariance under charge conjugation,
\begin{equation}\label{3.36}
C:\,\,\,\,\Phi\rightarrow-\Phi\,\,\,\,\psi\rightarrow {\rm i}\gamma^1\psi^*
\end{equation}
(note that $(\gamma^1)^* = - \gamma^1$ in
representation \eqref{2.12}), then
\begin{equation}\label{3.37}
K =\tilde K = \pm {\rm i} \gamma^r
\end{equation}
and
\begin{equation}\label{3.38}
|\tau_s| = 1.
\end{equation}
It should be noted that
\begin{equation}\label{3.39}
K = \tilde K ={\rm i} \gamma^r
\end{equation}
and, consequently,
\begin{equation}\label{3.40}
\tau_s = 1
\end{equation}
correspond to the quark bag boundary condition, cf. \eqref{3.3}.
We conclude that the requirement of discrete symmetries reduces the number of boundary parameters. Both $P$ and $CT$ invariances result in the two-parameter position-dependent boundary condition, whereas $CPT$ invariance results in the one-parameter position-dependent boundary condition. The requirement of $C$ invariance is the strongest one, restricting matrix $K$ to the form given by \eqref{3.37}: no position-dependent parameters, but still some ambiguities. In the present study we shall find the requirement restricting matrix $K$ to the unambiguous form given by \eqref{3.39}, i.e. corresponding to the quark bag boundary condition.
\section{Induced vacuum current and magnetic field}\setcounter{equation}{0}
Presenting the angular component of the induced vacuum current as
\begin{equation}\label{4.1}
j_\varphi(r) = \sum_{s = \pm 1} j_\varphi^{(s)}(r),
\end{equation}
where
\begin{equation}\label{4.2}
j_\varphi^{(s)}(r) = - \frac{s \, r}{\nu} \sum\hspace{-1.4em}\int \sum_{n \in
\mathbb{Z}} {\rm sgn} (E) \, f_n^{(s)}(r,E) \, g_n^{(s)}(r,E),
\end{equation}
we note that current \eqref{4.2} can be related to the current in two-dimensional surface $z={\rm const}$, $j_\varphi^{(2{\rm dim})(s)}(r,m)$,
\begin{equation}\label{4.3}
j_\varphi^{(s)}(r) = \int\limits_0^\infty \frac{dk_3}{\pi} \,\, j_\varphi^{(2{\rm dim})(s)}(r,m_3), \quad m_3 = \sqrt{m^2+k_3^2} .
\end{equation}
Actually, the latter has been computed at $s=1$ in \cite{SiG}, and the computation at $s=-1$ is analogous with the use of the explicit form of modes of the solution to the Dirac equation, see Appendix A; note that one has to substitute $\tau_{s}$ for
$\tan\left(\frac{\theta}{2}+\frac{\pi}{4}\right)$ in \cite{SiG}, see \eqref{3.19} and \eqref{3.29}. We present here the result for the case of $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or $\frac12
\leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$,
\begin{multline}\label{4.4}
j_\varphi^{(2{\rm dim})(s)}(r,m)=-\frac{m}{2\pi}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh(u/2)}\left[1+\frac1{2mr \cosh(u/2)}\right]{\rm e}^{-2mr
\cosh(u/2)}\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]\sinh(\nu u)
\sinh\left[\nu\left(F-\frac12\right)u\right]+ \sin\left[\nu\left(F-\frac12\right)\pi\right]\sin(\nu \pi)
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)}\\
- \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} \left[1 +\frac{1}{2mr\sin(p\pi/\nu)}\right]\,
\exp[-2mr\sin(p\pi/\nu)] \,\frac{\sin[(2F-1)p\pi]}{\sin(p\pi/\nu)}\\
\Biggl. + \frac{1}{4N} \left(1 +\frac{1}{2mr}\right){\rm e}^{-2mr}
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\Biggr\} \\
-\frac{s\,r}{\pi^2}\!\int\limits_m^\infty \!\! \frac{dq\,
q^2}{\sqrt{q^2-m^2}}\left\{\frac12\left[C^{(\wedge)(s)}_{\lambda\left[0, \, s\left(\frac12-F\right)\right]}(qr_0, mr_0) - C^{(\vee)(s)}_{\lambda\left[0, \, s\left(F-\frac12\right)\right]}(qr_0, mr_0)\right] \right.\\
\times K_{\lambda\left(0, \, \frac12-F\right)}(qr)
K_{\lambda\left(0, \, F-\frac12\right)}(qr) \\
+ \sum_{l=1}^{\infty} \left[C^{(\wedge)(s)}_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}(qr_0, mr_0)
K_{\lambda\left[l, \, s\left(\frac12-F\right)\right]} (qr)
K_{\lambda\left[l, \, s\left(\frac12-F\right)\right]-1}(qr) \right. \\
\left.\left. - C^{(\vee)(s)}_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}(qr_0, mr_0) K_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}(qr)K_{\lambda\left[l, \, s\left(F-\frac12\right)\right]-1}(qr)\right]\right\},
\end{multline}
where
\begin{equation}\label{4.44}
\lambda(l, y) = \nu(l + y) + 1/2,
\end{equation}
\begin{multline}\label{4.5}
C^{(\wedge)(s)}_\rho(v,w)=\left\{v
I_\rho(v)K_\rho(v)\tau_s+w\left[I_\rho(v)K_{\rho-1}(v)-I_{\rho-1}(v)K_\rho(v)\right] \right. \\
\left. - vI_{\rho-1}(v)K_{\rho-1}(v)\tau_s^{-1} \right\} \left[vK^2_\rho(v)\tau_s+2wK_\rho(v)K_{\rho-1}(v) + vK^2_{\rho-1}(v)\tau_s^{-1} \right]^{-1}
\end{multline}
and
\begin{multline}\label{4.6}
C^{(\vee)(s)}_\rho(v,w)=\left\{v
I_\rho(v)K_\rho(v)\tau_s^{-1}+w\left[I_\rho(v)K_{\rho-1}(v)-I_{\rho-1}(v)K_\rho(v)\right]\right.\\
\left. - vI_{\rho-1}(v)K_{\rho-1}(v)\tau_s \right\} \left[v
K^2_\rho(v)\tau_s^{-1}+2wK_\rho(v)K_{\rho-1}(v)+vK^2_{\rho-1}(v)\tau_s
\right]^{-1};
\end{multline}
$I_\rho(u)$ and $K_\rho(u)$ are the modified Bessel functions of order $\rho$ with exponential increase and decrease at large real positive values of their argument, $p$ and $N$ are positive integers,
$\delta_{\omega, \, \omega'}$ is the Kronecker symbol, $\delta_{\omega, \, \omega'}=0$
at $\omega' \neq \omega$ and $\delta_{\omega, \, \omega} = 1$. Note that relation
\begin{equation}\label{4.77}
\tau_{-s} = \tau_s^{-1}
\end{equation}
holds in the case of the $CPT$-invariant boundary condition,
see \eqref{3.35}, and, as a consequence, we obtain relation
\begin{equation}\label{4.7}
C^{(\vee)(-s)}_\rho(v,w)=C^{(\wedge)(s)}_\rho(v,w)
\end{equation}
in this case.
In general case, inserting \eqref{4.4} into \eqref{4.3}, we perform integration over $k_3$ of terms in the first figure brackets in \eqref{4.4}; as to the remaining terms, we change the order of integration,
$$
\int\limits_0^\infty dk_3 \int\limits_{\sqrt{k_3^2+m^2}}^\infty dq \,\, = \, \int\limits_m^\infty dq\,\int\limits_0^{\sqrt{q^2-m^2}} dk_3 \,\, ,
$$
and then introduce variable $\xi = \arcsin \left( k_3 / \sqrt{q^2-m^2}\right)$. As a result, we obtain after summing over $s=\pm 1$:
\begin{multline}\label{4.8}
j_\varphi(r)=-\frac{m^2}{\pi^2}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh(u/2)}K_2\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]\sinh(\nu u)
\sinh\left[\nu\left(F-\frac12\right)u\right] + \sin\left[\nu\left(F-\frac12\right)\pi\right]\sin(\nu \pi)
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)}\\
\left. - \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin(p\pi/\nu)}
+ \frac{1}{4N} K_2\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
+\frac{2 r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2
\left\{\frac12\left[C^{(\vee)}_{\lambda\left(0, \, F-\frac12\right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) \right.\right. \\
\left. - C^{(\wedge)}_{\lambda \left(0, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)\right]K_{\lambda\left(0, \, F-\frac12\right)}(qr)
K_{\lambda \left(0, \, \frac12-F \right)}(qr) \\
+ \sum_{l=1}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
K_{\lambda \left(l, \, F-\frac12 \right)} (qr)
K_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) K_{\lambda \left(l, \, \frac12-F \right)}(qr)K_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right\},
\end{multline}
where
\begin{equation}\label{4.9}
C^{(\vee)}_\rho(v,w)=\frac12\left[C^{(\vee)(1)}_\rho(v,w)+C^{(\wedge)(-1)}_\rho(v,w)\right]
\end{equation}
and
\begin{equation}\label{4.10}
C^{(\wedge)}_\rho(v,w)=\frac12\left[C^{(\wedge)(1)}_\rho(v,w)+C^{(\vee)(-1)}_\rho(v,w)\right].
\end{equation}
Inserting \eqref{4.8} into \eqref{2.30}, we obtain the magnetic field strength,
\begin{multline}\label{4.11}
B_I(r)=-\frac{e \nu m}{2 \pi^2 r}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh^2 (u/2)}K_1\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]\sinh(\nu u)
\sinh\left[\nu\left(F-\frac12\right)u\right] + \sin\left[\nu\left(F-\frac12\right)\pi\right]\sin(\nu \pi)
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)}\\
\left. - \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_1\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin^2 (p\pi/\nu)}
+ \frac{1}{4N} K_1\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
-\frac{e \nu r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2 \left\{\frac12\left[C^{(\vee)}_{\lambda\left(0, \, F-\frac12\right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) \right.\right. \\
\left. - C^{(\wedge)}_{\lambda \left(0, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)\right] W_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(qr)
\\
+ \sum_{l=1}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
W_{\lambda \left(l, \, F-\frac12 \right)} (qr)
\\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{\lambda \left(l, \, \frac12-F \right)}(qr)\right\},
\end{multline}
where
\begin{equation}\label{4.112}
W_\rho (v) = K_{\rho}(v)\frac{d}{d \rho} K_{\rho-1}(v) -
K_{\rho-1}(v)\frac{d}{d \rho} K_{\rho}(v).
\end{equation}
Note that both the current and the magnetic field strength change sign under simultaneous change $F \rightarrow 1 - F$ and $\tau_s \rightarrow \tau_s^{-1}$.
The cases when there are no peculiar modes are considered similarly. In the case of $\nu>1$ and $0 < F <
\frac12\left(1-\frac1\nu\right)$, we get
\begin{multline}\label{4.12}
j_\varphi(r)= - \frac{m^2}{\pi^2}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh(u/2)}K_2\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right] \cosh\left[\nu\left(F+\frac12 \right)u\right]
- \cos[\nu\left(F+\frac12 \right)\pi)]
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu
u)-\cos(\nu \pi)}\\
\left. - \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin(p\pi/\nu)}
+ \frac{1}{4N} K_2\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
+\frac{2 r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2\\
\times \left[ \sum_{l=1}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
K_{\lambda \left(l, \, F-\frac12 \right)} (qr)
K_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right. \\
\left. - \sum_{l=0}^{\infty} C^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) K_{\lambda \left(l, \, \frac12-F \right)}(qr)K_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]
\end{multline}
and
\begin{multline}\label{4.13}
B_I (r)=-\frac{e \nu m}{2 \pi^2 r}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh^2(u/2)} K_1\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right] \cosh\left[\nu\left(F+\frac12 \right)u\right]
- \cos[\nu\left(F+\frac12 \right)\pi)]
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu
u)-\cos(\nu \pi)}\\
\left. - \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_1\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin^2(p\pi/\nu)}
+ \frac{1}{4N} K_1\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
-\frac{e \nu r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\,q^2 \left[ \sum_{l=1}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
W_{\lambda \left(l, \, F-\frac12 \right)} (qr)
\right. \\
\left. - \sum_{l=0}^{\infty} C^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{\lambda \left(l, \, \frac12-F \right)}(qr)\right].
\end{multline}
In the case of $\nu>1$ and $\frac12\left(1+\frac1\nu \right) < F < 1$, we get
\begin{multline}\label{4.14}
j_\varphi(r)=\frac{m^2}{\pi^2}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh(u/2)}K_2\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]
\cosh\left[\nu\left(F-\frac32 \right)u\right] -
\cos[\nu\left(F-\frac32 \right)\pi)]
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)}\\
\left. + \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin(p\pi/\nu)}
- \frac{1}{4N} K_2\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
+\frac{2r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2 \\
\times \left[ \sum_{l=0}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
K_{\lambda \left(l, \, F-\frac12 \right)} (qr)
K_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right. \\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)}_
{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) K_{\lambda \left(l, \, \frac12-F \right)}(qr)K_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]
\end{multline}
and
\newpage
\begin{multline}\label{4.15}
B_I (r)=\frac{e \nu m}{2 \pi^2 r}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh^2(u/2)}K_1\left[2mr \cosh(u/2)\right]\right. \\
\times \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]
\cosh\left[\nu\left(F-\frac32 \right)u\right] -
\cos[\nu\left(F-\frac32 \right)\pi)]
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)}\\
\left. + \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_1\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin^2(p\pi/\nu)}
- \frac{1}{4N} K_1\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
-\frac{e \nu r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2 \left[ \sum_{l=0}^{\infty} C^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
W_{\lambda \left(l, \, F-\frac12 \right)} (qr)
\right. \\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{\lambda \left(l, \, \frac12-F \right)}(qr)\right].
\end{multline}
Note that \eqref{4.12} and \eqref{4.13} turn into \eqref{4.14} and \eqref{4.15} with opposite sign under simultaneous change $F \rightarrow 1 - F$ and $\tau_s \rightarrow \tau_s^{-1}$.
In the case of the vanishing string tension, the expressions for the current and the magnetic field strength are simplified:
\begin{multline}\label{4.16}
\left.j_\varphi(r)\right|_{\nu=1} = -\frac{m^2}{\pi^3}\sin(F\pi)\int\limits_1^\infty dv \, v^{-2} \, K_2\left(2mrv\right) \sinh\left[\left(2F - 1\right){\rm arccosh}
v \right]\\
+\frac{2 r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2 \left\{ \frac12 \left[C^{(\vee)}_{F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) \right. \right. \\
\left. - C^{(\wedge)}_{1-F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)\right] K_{F}(qr) K_{1 - F}(qr) \\
+ \sum_{l=1}^{\infty} C^{(\vee)}_{l+F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
K_{l+F} (qr) K_{l - 1 + F}(qr) \\
\left. - \sum_{l=1}^{\infty}C^{(\wedge)}_{l+1-F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) K_{l+1-F}(qr)K_{l-F}(qr)\right\}
\end{multline}
and
\newpage
\begin{multline}\label{4.17}
\left.B_I(r)\right|_{\nu=1} = -\frac{e \nu m}{2 \pi^3 r}\sin(F\pi)\int\limits_1^\infty dv \, v^{-3} \, K_1\left(2mrv\right) \sinh\left[\left(2F - 1\right){\rm arccosh}
v \right]\\
-\frac{e \nu r}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q^2\left\{ \frac12 \left[C^{(\vee)}_{F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) \right. \right. \\
\left. - C^{(\wedge)}_{1-F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)\right] W_{\frac12+\left|F-\frac12\right|} (qr) \\
+ \sum_{l=1}^{\infty} C^{(\vee)}_{l+F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
W_{l+F} (qr) \\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)}_{l+1-F}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{l+1-F}(qr)\right\}.
\end{multline}
In Appendix B the above results at $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or at $\frac12
\leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$, are presented for the cases $F \neq 1/2$ and $F = 1/2$ separately. This allows us to collect the dependence on the transverse size of a cosmic string in pieces denoted by $j_\varphi^{(b)(s)}$ and $B_I^{(b)(s)}$:
\begin{equation}\label{4.18}
j_\varphi^{(s)}(r)= j_\varphi^{(a)(s)}(r) + j_\varphi^{(b)(s)}(r),\qquad
j_\varphi^{(a)(s)}(r)=\lim_{r_0\rightarrow 0}j_\varphi^{(s)}(r)
\end{equation}
and
\begin{equation}\label{4.19}
B_I^{(s)}(r)= B_I^{(a)(s)}(r) + B_I^{(b)(s)}(r),\qquad
B_I^{(a)(s)}(r)=\lim_{r_0\rightarrow 0}B_I^{(s)}(r);
\end{equation}
then it is clear that $j_\varphi^{(a)(s)}(s)$ and $B_I^{(a)(s)}(r)$ correspond to the case of the infinitely thin cosmic string, which is obtained by imposing the condition of minimal irregularity on peculiar mode \eqref{a5} in the $r_0 \rightarrow 0$ limit, see Appendix A; then the mode coefficient takes the form of \eqref{c3}. The current and the magnetic field strength in the case of the infinitely thin cosmic string are given in Appendix C.
Returning to the string with nonvanishing transverse size, we note that the same structute, as that of \eqref{4.18} and \eqref{4.19}, is evident at $\nu > 1$ and $\frac{1}{2\nu} <|F-\frac12|< \frac{1}{2}$, see \eqref{4.12}-\eqref{4.15}. In the case of $F \neq 1/2$, the $r_0$-independent pieces are independent of $\tau_s$, see \eqref{c4} and \eqref{c5}, whereas the $r_0$-dependent pieces, consisting of the integrals over $q$ in \eqref{b1}, \eqref{b2}, \eqref{b11}, \eqref{b12}, and \eqref{4.12}-\eqref{4.15}, depend on $\tau_s$. In the case of $F = 1/2$, the $r_0$-independent pieces depend on $\tau_s$, see \eqref{c9} and \eqref{c10}, while the $r_0$-dependent pieces, consisting of the integrals over $q$ and the appropriate parts of the other terms in \eqref{b7} and \eqref{b13}, depend on $\tau_s$ as well. Let us recall that boundary parameter $\tau_s$ in general depends on $\varphi$ and $z$, see Section 3.
As a consequence of the above, limits $F\rightarrow 1/2$ and $r_0\rightarrow 0$ in most cases do not commute. If limit $r_0\rightarrow 0$ is taken first, we get a discontinuity at $F=1/2$,
\begin{equation}\label{4.20}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
\lim_{r_0\rightarrow 0}j_\varphi^{(s)}(r)\right|_{F \neq 1/2, \, \ln|\tau_s|^s \neq \pm \infty}\!=\pm \frac{1}{(4\pi)^{2}r^2} \left(1+2mr\right){\rm e}^{-2mr}
\end{equation}
and
\begin{equation}\label{4.21}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
\lim_{r_0\rightarrow 0}B_I^{(s)}(r)\right|_{F \neq 1/2, \, \ln|\tau_s|^s \neq \pm \infty}\!= \pm \frac{e \nu}{2 (4\pi)^{2}r^2} \left[\left(1+2mr\right){\rm e}^{-2mr} - (2mr)^2 \Gamma(0,2mr)\right],
\end{equation}
where
$$\Gamma(t,u)=\int\limits_u^\infty dy\,y^{t-1}{\rm e}^{-y} $$
is the incomplete gamma-function. If the order of limits is reversed, then we get
\begin{equation}\label{4.22}
\lim_{r_0\rightarrow0}\, \left.\lim_{F\rightarrow (1/2)_{\pm}}
j_\varphi^{(s)}(r)\right|_{F \neq 1/2, \, \ln|\tau_s|^s \neq \pm \infty}\,= \lim_{r_0\rightarrow0}\,\left.
j_\varphi^{(s)}(r)\right|_{F=1/2,\, \ln|\tau_s|^s \neq \pm \infty}
\end{equation}
and
\begin{equation}\label{4.23}
\lim_{r_0\rightarrow0}\, \left.\lim_{F\rightarrow (1/2)_{\pm}}
B_I^{(s)}(r)\right|_{F \neq 1/2, \, \ln|\tau_s|^s \neq \pm \infty}\!= \lim_{r_0\rightarrow0}\,\left.
B_I^{(s)}(r)\right|_{F=1/2,\, \ln|\tau_s|^s \neq \pm \infty},
\end{equation}
that are depending on $\tau_s$, cf. \eqref{c9} and \eqref{c10}. The limits do commute in special cases only:
\begin{equation}\label{4.24}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
\lim_{r_0\rightarrow 0}j_\varphi^{(s)}(r)\right|_{\ln|\tau_s|^s = \pm \infty}\!=
\left.\lim_{r_0\rightarrow 0} \, \lim_{F\rightarrow (1/2)_{\pm}}
j_\varphi^{(s)}(r)\right|_{\ln|\tau_s|^s = \mp \infty}\!=\mp \frac{1}{(4\pi)^{2}r^2} \left(1+2mr\right){\rm e}^{-2mr}
\end{equation}
and
\begin{multline}\label{4.25}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
\lim_{r_0\rightarrow 0}B_I^{(s)}(r)\right|_{\ln|\tau_s|^s = \pm \infty}\!=
\left.\lim_{r_0\rightarrow 0} \, \lim_{F\rightarrow (1/2)_{\pm}}
B_I^{(s)}(r)\right|_{\ln|\tau_s|^s = \pm \infty}\\
= \mp \frac{e \nu}{2 (4\pi)^{2}r^2} \left[\left(1+2mr\right){\rm e}^{-2mr} - (2mr)^2 \Gamma(0,2mr)\right];
\end{multline}
the discontinuity at $F=1/2$ is absent in these cases.
The temporal component of the induced vacuum current is considered in a similar way. Presenting \eqref{2.27} as
\begin{equation}\label{4.26}
j^0 (r) = \sum_{s = \pm 1} j^{0 (s)} (r),
\end{equation}
where
\begin{equation}\label{4.27}
j^{0 (s)}(r) = - \frac 12 \sum\hspace{-1.4em}\int \sum_{n \in
\mathbb{Z}} {\rm sgn} (E) \left\{\left[f_n^{(s)}(r,E)\right]^2 + \left[g_n^{(s)}(r,E)\right]^2\right\},
\end{equation}
we obtain in the case of $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or $\frac12
\leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$:
\begin{multline}\label{4.28}
j^{0(s)}(r)= - \frac{s \nu m^2}{2 \pi^2 r}
\left\{\frac{1}{2\pi}\int\limits_0^\infty du \left[K_0\Biggl(2mr \cosh(u/2)\Biggr)
+ \frac{1}{2mr \cosh(u/2)}K_1\Biggl(2mr \cosh(u/2)\Biggr)\right] \right. \\
\times \Biggl[\frac{\cos\left[\nu\left(F-\frac12\right)\pi\right]\sinh(\nu u)
\sinh\left[\nu\left(F-\frac12\right)u\right] + \sin\left[\nu\left(F-\frac12\right)\pi\right]\sin(\nu \pi)
\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu
\pi)} \Biggr. \\
\Biggl. - \cos\left[\nu\left(F-\frac12\right)\pi\right]\tanh\left(\frac{u}{2}\right)\sinh\left[\nu\left(F-\frac12\right)u\right] \Biggr] \\
- \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} \left[K_0\Biggl(2mr\sin(p\pi/\nu)\Biggr) + \frac{1}{2mr \sin(p\pi/\nu)}K_1\Biggl(2mr\sin(p\pi/\nu)\Biggr)\right] \,\sin[(2F-1)p\pi] \\
\left. + \frac{1}{4N} \left[K_0\left(2mr\right) + \frac{1}{2mr}K_1\left(2mr\right)\right]
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\} \\
+\frac{\nu}{2 \pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q \,
\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \\
\times \left\{C^{(\vee)(s)}_{\lambda\left[0, \, s\left(F-\frac12\right)\right]}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)K^2_{\lambda\left[0, \, s\left(F-\frac12\right)\right]}(qr) \right. \\
- C^{(\wedge)(s)}_{\lambda\left[0, \, s\left(\frac12-F\right)\right]}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)K^2_{\lambda\left[0, \, s\left(\frac12-F\right)\right]}(qr) \\
+ \sum_{l=1}^{\infty} C^{(\vee)(s)}_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)\left[K^2_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}(qr) - K^2_{\lambda\left[l, \, s\left(F-\frac12\right)\right]-1}(qr)\right] \\
\left. - \sum_{l=1}^{\infty} C^{(\wedge)(s)}_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)\left[K^2_{\lambda\left[l, \, s\left(\frac12-F\right)\right]} (qr) - K^2_{\lambda\left[l, \, s\left(\frac12-F\right)\right]-1}(qr)\right]\right\}.
\end{multline}
Summing over $s$, we get
\begin{multline}\label{4.29}
j^0 (r)= \frac{\nu}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q \sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \left\{{\tilde C}^{(\vee)}_{\lambda\left(0, \, F-\frac12\right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)\right. \\
\times K^2_{\lambda\left(0, \, F-\frac12\right)}(qr) - {\tilde C}^{(\wedge)}_{\lambda \left(0, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right)
K^2_{\lambda \left(0, \, \frac12-F \right)}(qr) \\
+ \sum_{l=1}^{\infty} {\tilde C}^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, F-\frac12 \right)} (qr) - K^2_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right] \\
\left. - \sum_{l=1}^{\infty}{\tilde C}^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, \frac12-F \right)}(qr) - K^2_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]\right\},
\end{multline}
where
\begin{equation}\label{4.30}
{\tilde C}^{(\vee)}_\rho(v,w)=\frac12\left[C^{(\vee)(1)}_\rho(v,w) - C^{(\wedge)(-1)}_\rho(v,w)\right]
\end{equation}
and
\begin{equation}\label{4.31}
{\tilde C}^{(\wedge)}_\rho(v,w)=\frac12\left[C^{(\wedge)(1)}_\rho(v,w) - C^{(\vee)(-1)}_\rho(v,w)\right].
\end{equation}
Also, we obtain in the case of $\nu>1$ and $0 < F <
\frac12\left(1-\frac1\nu\right)$
\begin{multline}\label{4.32}
j^0 (r)= \frac{\nu}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q \sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \\
\times \left\{\sum_{l=1}^{\infty} {\tilde C}^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, F-\frac12 \right)} (qr) - K^2_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right] \right. \\
\left. - \sum_{l=0}^{\infty}{\tilde C}^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, \frac12-F \right)}(qr) - K^2_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]\right\}
\end{multline}
and in the case of $\nu>1$ and $\frac12\left(1+\frac1\nu \right) < F < 1$
\begin{multline}\label{4.33}
j^0 (r)= \frac{\nu}{\pi^3}\!\int\limits_0^{\pi/2} \!\! d{\xi} \!\int\limits_m^\infty \!\! dq\, q \sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \\
\times \left\{\sum_{l=0}^{\infty} {\tilde C}^{(\vee)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, F-\frac12 \right)} (qr) - K^2_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right] \right. \\
\left. - \sum_{l=1}^{\infty}{\tilde C}^{(\wedge)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,r_0\right) \left[K^2_{\lambda \left(l, \, \frac12-F \right)}(qr) - K^2_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]\right\}.
\end{multline}
Note that coefficients ${\tilde C}^{(\vee)}_\rho(v,w)$ \eqref{4.30} and ${\tilde C}^{(\wedge)}_\rho(v,w)$ \eqref{4.31} depend on boundary parameters $\tau_1$ and
$\tau_{-1}$, the latters in general are varying with $\varphi$ and $z$. Clearly, any variation of $\tau_s$ with $z$ cannot ensure a sufficient decrease (as power $|z|^{- 1 - \varepsilon}, \varepsilon > 0$) of
$j^0 (r)$ at $z \rightarrow \pm \infty$ in order to make total charge $Q_{\rm I}$ \eqref{2.29} to be finite. Therefore, as long as ${\tilde C}^{(\vee)}_\rho(v,w)$ and ${\tilde C}^{(\wedge)}_\rho(v,w)$ are nonvanishing, $Q_{\rm I}$ is infinite. However,
${\tilde C}^{(\vee)}_\rho(v,w)$ and ${\tilde C}^{(\wedge)}_\rho(v,w)$ vanish in the case of the $CPT$ invariant boundary condition, as a consequence of \eqref{4.7}; therefore, $j^0 (r)$ and $Q_{\rm I}$ are exactly zero in this case.
In general case, the temporal component of the current at $F \neq 1/2$ is zero in the limit of the vanishing transverse size of a cosmic string; the expression at $F = 1/2$ in this case is given in Appendix C, see \eqref{c17}; note that $\left. \nu ^{-1} j^{0}(r)\right|_{r_0 = 0, \, F=1/2}$ is independent of the string tension.
\section{Finiteness of the induced vacuum magnetic flux}\setcounter{equation}{0}
The induced vacuum current and the induced vacuum magnetic field strength decrease exponentially at large distances from a cosmic string. So the crucial point for the finiteness of the total flux of the induced vacuum magnetic field is the behaviour of the local characteristics in the vicinity of the string location.
In the case of the infinitely thin cosmic string, the current and, consequently, the magnetic field strength increase in the vicinity as the inverse squared distance from the string location [see \eqref{c3}, \eqref{c4}, \eqref{c8}, and \eqref{c9} in Appendix C]; as a result, the flux is infinite. If a transverse size of a string is introduced, this opens an opportunity to make the flux finite, but the opportunity by no means is realized for all boundary conditions. The requirement of the flux finiteness can be formulated as
\begin{equation}\label{5.1}
\lim_{r \rightarrow r_0}j_\varphi(r) \, (r-r_0)^2 = 0,
\end{equation}
or
\begin{equation}\label{5.2}
\lim_{r \rightarrow r_0}B_I(r) \, (r-r_0) = 0,
\end{equation}
then, using integration by parts, flux \eqref{2.31} can be presented as
\begin{equation}\label{5.3}
\Phi_{\rm I} = \frac{e}{2} \int\limits_{0}^{2\pi} d \varphi \int\limits_{r_0}^\infty \frac{dr}{r} \,
j_\varphi(r) \, (r^2-r_0^2).
\end{equation}
The $r \rightarrow r_0$ asymptotics of the current in two-dimensional surface $z = {\rm const}$ was studied in \cite{SiG}, and, as follows from this study, condition
\begin{equation}\label{5.4}
\lim_{r \rightarrow r_0}j^{(2{\rm dim})(s)}_\varphi(r, m) \, (r-r_0)^2 = 0
\end{equation}
is maintained at $|\tau_s| = 1$ only. Integration of $j^{(2{\rm dim})(s)}_\varphi(r, \sqrt {m^2 + k^2_3})$ over $k_3$, see \eqref{4.3}, is hardly to yield zero, however it can yield divergence at $r \rightarrow r_0$. Thus, we have no doubt that conditions \eqref{5.1} and \eqref{5.2} are invalid at $|\tau_s| \neq 1$ and have to check their validity at $|\tau_s| = 1$. As is shown in Appendix B, expression \eqref{b6} that is finite at $r \rightarrow r_0$ turns, after integration, into expression \eqref{b10} that is quadratically diveregent at $r \rightarrow r_0$; consequently,
expression \eqref{b15} is linearly diveregent at $r \rightarrow r_0$. We conclude that, in the case of $F= 1/2$, conditions \eqref{5.1} and \eqref{5.2} are violated and the flux is infinite at $\tau_s \neq 1$. Otherwise, we obtain, see \eqref{b9} and \eqref{b14},
\begin{equation}\label{5.5}
\left.\Phi_{\rm
I}\right|_{F=1/2,\,\tau_1=\tau_{-1}=1} = 0.
\end{equation}
In the case of $F \neq 1/2$, conditions \eqref{5.1} and \eqref{5.2} are maintained at $|\tau_s| = 1$. Defining
\begin{multline}\label{5.6}
C^{(\pm)}_\rho(v, w)=\left\{v
I_\rho(v)K_\rho(v) \pm w\left[I_\rho(v)K_{\rho-1}(v)-I_{\rho-1}(v)K_\rho(v)\right] -
vI_{\rho-1}(v)K_{\rho-1}(v)
\right\} \\
\times \left[v
K^2_\rho(v)\pm 2wK_\rho(v)K_{\rho-1}(v) + vK^2_{\rho-1}(v)\right]^{-1}
\end{multline}
and performing integration over
$\varphi$ and $r$ (see \cite{SiG} for details), we obtain
\begin{multline}\label{5.7}
\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = \pm 1} = \frac{e}{2 \pi}\left\{\frac{1}{2\pi} \int\limits_0^\infty
\frac{du}{\cosh^3(u/2)}\,K_0[2mr_0 \cosh(u/2)]\, \Omega_{{\rm sgn}\left(F - \frac12\right)}(u)\right. \\
\left.+ \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2
\right|\!\right]} K_0[2mr_0\sin(p\pi/\nu)]
\,\frac{\sin[(2F-1)p\pi]}{\sin^3(p\pi/\nu)} - \frac{1}{4N} K_0 (2mr_0)
\sin\left[\left(2F -1\right) N \pi \right] \,
\delta_{\nu, \, 2N}\right\} \\
+ \frac{e}{\pi^2} \!\int\limits_{0}^{\pi/2} \!d\xi\!\int\limits_{m
r_0}^{\infty}\!dv\, v \Biggl\{{\rm sgn}\!\left(F-\frac12\right)C^{(\pm)}_{\lambda \left(0, \, \left|F-\frac12\right| \right)}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right)
D_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(v) \Biggr. \\
+ \sum_{l=1}^\infty \Biggl[C^{(\pm)}_{\lambda \left(l, \, F-\frac12 \right)}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right) D_{\lambda \left(l, \, F-\frac12 \right)}(v) \Biggr. \\
\Biggl. \Biggl. - C^{(\pm)}_{\lambda \left(l, \, \frac12-F \right)}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right)
D_{\lambda \left(l, \, \frac12-F \right)}(v) \Biggr]\Biggr\}
\end{multline}
and
\begin{equation}\label{5.8}
\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1= -\tau_{-1} = \pm 1} = \frac12\left(\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = 1} + \left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = -1}\right),
\end{equation}
where
\begin{equation}\label{5.9}
D_{\rho}(v) = \rho K_\rho^2(v)-(\rho-1)K_{\rho+1}(v)K_{\rho-1}(v)
+ v W_{\rho}(v),
\end{equation}
$W_{\rho}(v)$ is given by \eqref{4.112}, and
\begin{multline}\label{5.10}
\Omega_{\pm 1}(u) \\
=\pm \frac{\cos\left[\nu\left(F-\frac12\right)\pi\right] \cosh\left[\nu\left(F-\frac12 \mp 1\right)u\right]
- \cos\left[\nu\left(F-\frac12 \mp 1\right)\pi\right]\cosh\left[\nu\left(F-\frac12\right)u\right]}{\cosh(\nu u)-\cos(\nu \pi)}.
\end{multline}
Note that the flux changes sign under $F \rightarrow 1-F$; as a consequence, it has to vanish at $F = 1/2$, that is confirmed at
$\tau_1=\tau_{-1} = 1$ by direct calculation, see \eqref{5.5}. The absolute value of the flux at $F \neq 1/2$ increases with the increase of $\nu$, with $e^{-1} \Phi_I$ being positive at $F > 1/2$ and negative at $F < 1/2$.
In the case of the vanishing string tension, the expression for the flux is simplified,
\begin{multline}\label{5.11}
\left. \Phi_{\rm I}\right|_{\nu = 1, \, F \neq 1/2, \, \tau_1=\tau_{-1} = \pm 1} = \frac{e}{2 \pi^2} \, {\rm sgn}\left(F - \frac12\right) \, \sin(F\pi) \int\limits_1^\infty
\frac{dv}{v^4 \sqrt{v^2-1}}\,K_0(2mr_0 v) \\ \times \cosh\left[\left(|2F-1| - 1\right){\rm arccosh} v\right] \\
+ \frac{e}{\pi^2} \!\int\limits_{0}^{\pi/2} \!d\xi \!\int\limits_{m
r_0}^{\infty}\!dv\, v \Biggl\{{\rm sgn}\!\left(F-\frac12\right)C^{(\pm)}_{\frac12+\left|F-\frac12\right|}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right)
D_{\frac12+\left|F-\frac12\right|}(v) \Biggr. \\
+ \sum_{l=1}^\infty \Biggl[C^{(\pm)}_{l+F}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right) D_{l+F}(v) \Biggr. \\
\Biggl. \Biggl. - C^{(\pm)}_{l+1-F}\left(v, \sqrt{v^2\sin^2\xi+m^2 r_0^2\cos^2\xi}\right)
D_{l+1-F}(v) \Biggr]\Biggr\}.
\end{multline}
\begin{figure}[t
\begin{center}
\includegraphics[width=160mm]{contour.eps}
\end{center} \caption{Contour $C_0$ on complex $z$ plane; the vertical parts of the contour can be infinitesimally close to the ordinate axis. Singularities of the integrand in the last line of \eqref{5.12} are indicated by crosses.}\label{Fig}
\end{figure}
A piece of $\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, |\tau_1|=|\tau_{-1}| = 1}$ with terms containing the $K_0(w)$ function is prevailing at $r_0 \ll m^{-1}$: it corresponds to the contribution of current $j_\varphi^{(a)(s)}$ defined according to \eqref{4.18}. This piece can be presented as an integral over contour $C_0$ in the complex $z$ plane, see Figure,
\begin{multline}\label{5.12}
\left. \Phi_{\rm I}^{(a)}\right|_{F \neq 1/2, \, |\tau_1|=|\tau_{-1}| = 1} = \frac{e}{2 \pi}\left\{\frac{1}{2\pi} \int\limits_0^\infty
\frac{du}{\cosh^3(u/2)}\,K_0[2mr_0 \cosh(u/2)]\,\Omega_{{\rm sgn}(F - \frac12)}(u)\right. \\
\left.+ \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2
\right|\!\right]} K_0[2mr_0\sin(p\pi/\nu)]
\,\frac{\sin[(2F-1)p\pi]}{\sin^3(p\pi/\nu)} - \frac{1}{4N} K_0 (2mr_0)
\sin\left[\left(2F -1\right) N \pi \right] \,
\delta_{\nu, \, 2N}\right\} \\
= - \frac{e}{8 \pi}\,\frac{{\rm sgn}\left(F-\frac12\right)}{2\pi {\rm
i}}\int\limits_{C_0}
dz\,K_0 \left(2mr_0\sqrt{-\sinh^2(z/2)}\right)\,\frac{\sinh\left[\nu\left(|F-\frac12| - \frac12\right)z\right]}{\sinh^3(z/2)\sinh(\nu
z/2)};
\end{multline}
here the integral over $u$ corresponds to the contribution of the horizontal parts of contour $C_0$, while other terms correspond to the contribution of simple poles at $|{\rm Im} z| \leq \pi$ on the ordinate axis out of the origin. Using the asymptotics of the $K_0(w)$ function at small values of its argument, one can get
\begin{equation}\label{5.13}
\left. \Phi_{\rm I}\right|_{F \neq 1/2, \,
|\tau_1|=|\tau_{-1}| = 1, \, m r_0 \ll 1} = - \frac{e}{8 \pi}\,\frac{{\rm sgn}\left(F-\frac12\right)}{2\pi {\rm
i}}\int\limits_{C_0}
dz\,\frac{\sinh\left[\nu\left(|F-\frac12| - \frac12\right)z\right]}{\sinh^3(z/2)\sinh(\nu
z/2)}\left[-\ln (m r_0)\right].
\end{equation}
Now, a singularity at the origin of the complex $z$ plane is just an isolated pole, and contour $C_0$ can be continuously deformed into a contour encircling the origin. Calculating the residue of a simple pole at $z=0$, we obtain
\begin{multline}\label{5.14}
\left. \Phi_{\rm I}\right|_{F \neq 1/2, \,
|\tau_1|=|\tau_{-1}| = 1, \, m r_0 \ll 1} \, = \, -\frac{e}{3 \pi} \left[F -\frac12 -
\frac12{\rm sgn}\left(F-\frac12\right)\right] \\ \times \Biggl\{\frac34 -\nu^2
\left[\frac14 - \left|F -\frac12\right| - F(1-F)\right]\Biggr\}\left[-\ln (m r_0)\right].
\end{multline}
Thus, the flux which is induced in the vacuum by a cosmic string of small transverse size is discontinuous at $F = 1/2$, and the discontinuity is independent of the string tension:
\begin{equation}\label{5.15}
\left. \lim_{F\rightarrow (1/2)_{\pm}}\Phi_{\rm I}\right|_{F \neq 1/2, \, |\tau_1|=|\tau_{-1}| = 1, \, m r_0 \ll 1} = \, \pm \, \frac{e}{8 \pi}\left[-\ln (m r_0)\right],
\end{equation}
this is certainly a consequence of \eqref{4.20} or \eqref{4.21}.
Considering the case of a cosmic string of nonsmall transverse size, we present \eqref{5.7} as, cf. \eqref{4.3},
\begin{equation}\label{5.16}
\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = \pm 1} = \int\limits_0^\infty \frac{dk_3}{\pi} \,\, \left. \Phi^{(2dim)}_{\rm I}(m_3)\right|_{F \neq 1/2, \,
\tau_1 = \pm 1} , \quad m_3 = \sqrt{m^2+k_3^2},
\end{equation}
where
\footnote{Note that $\left. \Phi^{(2dim)}_{\rm I}\right|_{F = 1/2, \, \tau_1 = - 1_{\mp}}$ which is proportional to $m^{-1}$, see (6.32) in \cite{SiG}, yields a divergence of $\left. \Phi_{\rm I}\right|_{F = 1/2, \, \tau_1=\tau_{-1} = - 1}$. In contrast to this, terms that are proportional to $m^{-1}$ in \eqref{5.17} are harmless, yielding terms in the first figure brackets in \eqref{5.7}.}
\begin{multline}\label{5.17}
\left. \Phi^{(2dim)}_{\rm I}(m)\right|_{F \neq 1/2, \, \tau_1 = \pm 1} = \frac{e}{2m}\left\{\frac{1}{2\pi} \int\limits_0^\infty
\frac{du}{\cosh^3(u/2)} \, \exp\left[-2mr_0 \cosh(u/2)\right] \, \Omega_{{\rm sgn}(F - \frac12)}(u)\right. \\
\left.+ \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2
\right|\!\right]} \exp [-2mr_0\sin(p\pi/\nu)]
\,\frac{\sin[(2F-1)p\pi]}{\sin^3(p\pi/\nu)} - \frac{1}{4N} {\rm e}^{-2mr_0}
\sin\left[\left(2F -1\right) N \pi \right] \,
\delta_{\nu, \, 2N}\right\} \\
+ \frac{e}{\pi} r_0 \,\int\limits_{m r_0}^{\infty}
\frac{dv\, v}{\sqrt{v^2 - m^2 r_0^2}} \, \Biggl\{{\rm sgn}\!\left(F-\frac12\right)
C^{(\pm)}_{\lambda\left(0, \, \left|F-\frac12\right|\right)}\left(v, m r_0\right)
D_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(v) \Biggr. \\
+ \sum_{l=1}^\infty \Biggl[C^{(\pm)}_{\lambda \left(l, \, F-\frac12 \right)}\left(v, m r_0\right) D_{\lambda \left(l, \, F-\frac12 \right)}(v)
- C^{(\pm)}_{\lambda \left(l, \, \frac12-F \right)}
\left(v, m r_0\right)
D_{\lambda \left(l, \, \frac12-F \right)}(v) \Biggr]\Biggr\}.
\end{multline}
The numerical analysis of the latter quantity as a function of $m r_0$ was performed in \cite{SiG}. Whereas $\left. \Phi^{(2dim)}_{\rm I}(m)\right|_{F \neq 1/2, \, \tau_1 = 1}$ decreases in its absolute value with the increase of $m r_0$, $\left. \Phi^{(2dim)}_{\rm I}(m)\right|_{F \neq 1/2, \, \tau_1 = - 1}$ increases at no allowance in its absolute value with the increase of $m r_0$: this is manifest up to values $m r_0 = 10$ for $0.3 < F < 0.7$ and $1 \leq \nu < 2$, although there is a moderate decrease in vicinities of $F=0$ and $F=1$ at $\nu > 2$; certainly, the increase is in general caused by a zero in the denominator in \eqref{5.6} in the case of $\tau_s = - 1$. Thus, we can conclude that $\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = - 1}$ increases at no allowance in its absolute value with the increase of $m r_0$, whereas $\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = 1}$ decreases in its absolute value with the increase of $m r_0$, and
\begin{equation}\label{5.18}
\left. \lim_{m r_0\rightarrow \infty}\Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1} = 1} = 0.
\end{equation}
\section{Summary}
\setcounter{equation}{0}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
In the present paper, we have shown that a straight cosmic string of nonvanishing transverse size induces a magnetic field in the vacuum of the quantum relativistic charged spinor matter field. Let us recall first that, as was noted in Introduction, the vacuum polarization effects in the cosmic string background depend periodically on the gauge flux of the string, $\Phi$ \eqref{1.3} (this is a consequence of the Aharonov-Bohm effect). The period equals to $2\pi/ \tilde e$ with $\tilde e$ being the coupling constant of the matter field to the gauge field of the string, see \eqref{1.33}, and the effects disappear at $\Phi = 2\pi n/ \tilde e$, where $n \in \mathbb{Z}$. Thus, the dependence is on variable $F$ ranging from $0$ to $1$, and not on $n_c$, see \eqref{2.27}, with $F = 1/2$ corresponding to $\Phi = 2\pi (n + 1/2) / \tilde e$. Of paramount importance is the issue of boundary conditions at the edge of the string core. The most general boundary condition ensures the self-adjointness of the Hamiltonian operator for the matter field and the impenetrability of the string core. Such a condition depends on four parameters with each one depending on a point of the boundary. However, even if the number of parameters is reduced by half, see Section 3, still this generality is excessive and leads to unphysical consequences. Namely, we have obtained analytic expressions for the temporal and spatial components of the induced vacuum current in the case of either $P$ or $CT$ invariant boundary condition, when there are two position-dependent boundary parameters, see Section 4. The total induced vacuum charge is found to be infinite in this case, which is due to a lack of sufficient decrease of the temporal component in the direction of the string axis, and the infinity could hardly be accepted as physically plausible. Therefore the only choice is the $CPT$ invariant boundary condition with one position-dependent boundary parameter, see \eqref{3.34} and \eqref{3.35}: the total induced vacuum charge vanishes in this case (see the ending of Section 4).
Further restrictions on the boundary condition follow from the analysis of the induced vacuum magnetic field which, by virtue of the Maxwell equation, is related to the spatial current component. The total induced vacuum magnetic flux, $\Phi_I$ \eqref{2.31}, is infinite in the case of the two-parameter position-dependent boundary condition, i.e. when either $P$ or $CT$ invariance holds. It is finite at $F \neq 1/2$, see \eqref{5.7} and \eqref{5.8}, in the case of the $C$ invariant boundary condition,
\begin{equation}\label{6.1}
(I \mp {\rm i} \gamma^r)\left.\psi\right|_{r=r_0}=0,
\end{equation}
with boundary parameters taking values
$\tau_1 = \pm 1$ and $\tau_{-1} = \pm 1$. One can conclude that the requirement of the finiteness for $\Phi_I$ at $F \neq 1/2$, being equivalent to the requirement of the charge conjugation invariance, leads to a somewhat ambiguous result (although there are no position-dependent parameters).
An ambiguity in the value of the total induced vacuum magnetic flux is completely removed by elaborating the case of $F=1/2$. We show that the only way to avoid a divergence of flux $\Phi_I$ at $F=1/2$ is to impose the unambiguous condition,
\begin{equation}\label{6.2}
(I-{\rm i} \gamma^r)\left.\psi\right|_{r=r_0}=0,
\end{equation}
then $\tau_1 = \tau_{-1} = 1$ and the flux is zero, see \eqref{5.5}.
Returning to the case of $F \neq 1/2$, we note that $\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1}=-1}$ increases at no allowance in its absolute value with the increase of $m r_0$, see the ending of Section 5. Such a behavior is hardly to be regarded as physically plausible, if the transverse size of the string is somehow identified with the correlation length, see \eqref{1.5}. Really, it looks rather unlikely that a topological defect (cosmic string) influences the surrounding quantum matter with the matter particle mass, $m$, exceeding the energy scale of spontaneous symmetry breaking, $m_{\rm H}$; the more unlikely is the unrestricted growth of this influence with the increase of quotient $m/m_{\rm H}$. The influence of a topological defect on the surrounding quantum matter at $m_{\rm H} \gg m$ (which is the right inequality in \eqref{1.4}) looks much more physically plausible. Namely this situation is realized for $\left. \Phi_{\rm I}\right|_{F \neq 1/2, \, \tau_1=\tau_{-1}=1}$ (note, in particular, relation \eqref{5.18}) and in the case of the quantum charged scalar matter field obeying the Dirichlet boundary condition at the edge of the string core, see \cite{Gor2,Gor3,Gor4,Gor1}.
Thus, we conclude that the requirement of the physically plausible behavior for the induced vacuum magnetic flux results in the unambiguous determination of the boundary condition for the quantum charged spinor matter field at the edge of the string core. The condition coincides with the renowned quark bag boundary condition \cite{Bog,Cho1,Joh}. Apparently, the authors of \cite{Bog,Cho1,Joh} were lucky actually to guess the proper boundary condition, and this has been demonstrated in the present study. We list here the unambiguously determined expressions for the induced vacuum magnetic field strength in the cosmic string background, which are valid in the case of $1 \leq \nu < \infty$ and in the case of $\frac12 \leq \nu < 1$ for $\frac12 \left(\frac1\nu - 1\right) < F < \frac12 \left(3 - \frac1\nu\right)$:
\begin{multline}\label{6.3}
\left.B_I(r)\right|_{F \neq 1/2, \, \tau_{1}=\tau_{-1}=1}
=\frac{e \nu m}{2 \pi^2 r}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh^2 (u/2)}K_1\left[2mr \cosh(u/2)\right]\, \Omega_{{\rm sgn}\left(F - \frac12\right)}(u)\right. \\
\left.+\frac{1}{\nu}\sum\limits_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]}K_1\left[2mr\sin(p\pi/\nu)\right]\frac{\sin\left[(2F-1)p\pi\right]}{\sin^2(p\pi/\nu)}-\frac{1}{4N}K_1(2mr)\sin\left[(2F-1)N\pi\right]\delta_{\nu,2N}\right\}\\
-\frac{e \nu r}{\pi^3}\!\int\limits_0^{\pi/2}\!\!d{\xi}\!\int\limits_m^\infty\!\!dq\, q^2
\Biggl\{{\rm sgn}\!\left(F-\frac12\right)C^{(+)}_{\lambda \left(0, \, \left|F-\frac12\right| \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(qr) \Biggr. \\
+ \sum_{l=1}^{\infty} \Biggl[ C^{(+)}_{\lambda \left(l, \, F-\frac12 \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right)
W_{\lambda \left(l, \, F-\frac12 \right)} (qr)
\Biggr. \\
\Biggl.\Biggl. - C^{(+)}_{\lambda \left(l, \, \frac12-F \right)}\left(qr_0, \sqrt{q^2\sin^2\xi+m^2\cos^2\xi}\,\,r_0\right) W_{\lambda \left(l, \, \frac12-F \right)}(qr)\Biggr]\Biggr\},
\end{multline}
where $\Omega_{\pm}(u)$ is given by \eqref{5.10}, $C^{(+)}_\rho(v, w)$ is given by \eqref{5.6}, $W_{\rho}(v)$ is given by \eqref{4.112}, $\lambda(l, y)$ is given by \eqref{4.44}, and
\begin{equation}\label{6.4}
\left.B_I(r)\right|_{F = 1/2, \, \tau_{1}=\tau_{-1}=1} = 0.
\end{equation}
Note that the strength changes sign under substitution $F \rightarrow 1-F$, vanishing at $F = 0, 1/2, 1$, and decreases at large distances from the string, $r \rightarrow \infty$, as
$$\left\{
\begin{array}{l}
r^{-2}\,\, {\rm exp}(-2mr), \quad \frac12 \leq \nu < 2 \\
\vphantom{\int\limits_0^0}
m^{1/2} r^{-3/2}\,\, {\rm exp}[-2mr\sin(\pi/\nu)], \quad \nu\geq 2
\end{array}
\right\},
$$
while it behaves as $(r-r_0)^{-1 + \varepsilon}$ with $\varepsilon > 0$ at $r \rightarrow r_0$, see \eqref{5.2}. Thereby, a cosmic string is enclosed in a sheath in the form of a tube of the magnetic flux lines along the string; the transverse size of the magnetic tube is of the order of the Compton wavelength of the matter particle, $m^{-1}$, and the latter exceeds the transverse size of the string, which is of the order of the correlation length (see \eqref{1.5} and the right inequality in \eqref{1.4}). The total induced vacuum magnetic flux is given by expression \eqref{5.7} with the ``$+$'' sign.
Although the limit of the vanishing transverse size of a cosmic string can be regarded to be purely formal, it, as unambiguously defined in Appendix C, yields the prevailing contribution in the realistic case of the Compton wavelength of the matter particle exceeding considerably the correlation length. In the $r_0 = 0$ case, the induced vacuum magnetic field strength is given by \eqref{c5}, vanishing at $F = 1/2$; note a discontinuity of the strength at $F = 1/2$, see \eqref{c12}. In the case of a cosmic string of small transverse size, $r_0 \ll m^{-1}$, the total induced vacuum magnetic flux is given by \eqref{5.14}; it is discontinuous at $F = 1/2$, and the discontinuity is independent of the string tension, see \eqref{5.15}. Note that the discontinuity of the results at $F = 1/2$ in the $r_0 \ll m^{-1}$ case is due to the appearance of the peculiar mode in the solution to the Dirac equation [see \eqref{a5} in Appendix A and \eqref{c3} in Appendix C]. It would be interesting to consider other induced vacuum effects, for instance, the induced vacuum energy-momentum tensor in the cosmic string background.
\section*{Acknowledgments}
The work was supported by the National Academy of
Sciences of Ukraine (Project No.01172U000237) and by the Program of
Fundamental Research of the Department of Physics and Astronomy of
the National Academy of Sciences of Ukraine (Project No.0117U000240).
\setcounter{equation}{0}
\renewcommand{\theequation}{A.\arabic{equation}}
\section*{Appendix A: Solution to the Dirac equation}
The solution to the system of equations, \eqref{2.25}, is given in
terms of cylindrical functions. Let us define
\begin{multline}\label{a1}
\left(
\begin{array}{c}
f_n^{(\wedge)(s)} \\ g_n^{(\wedge)(s)}
\end{array}
\right)= \frac12 \sqrt{\frac{\nu}{\pi} } \\
\times \left(
\begin{array}{c}
\sqrt{1+m_3/E} \left[\sin(\mu^{(\wedge)(s)}_{\nu l +1 -G_s}) J_{\nu l-G_s}(kr) + \cos(\mu^{(\wedge)(s)}_{\nu l +1 -G_s}) Y_{\nu l-G_s}(kr)\right] \\
{\rm sgn}(E) \sqrt{1- m_3/E} \left[\sin(\mu^{(\wedge)(s)}_{\nu l +1 -G_s})
J_{\nu l+1-G_s}(kr) + \cos(\mu^{(\wedge)(s)}_{\nu l +1 -G_s}) Y_{\nu
l+1-G_s}(kr)\right]
\end{array}
\right),
\end{multline}
where $l=s (n-n_{\rm c})$, and
\begin{multline}\label{a2}
\left(
\begin{array}{c}
f_n^{(\vee)(s)} \\ g_n^{(\vee)(s)}
\end{array}
\right)= \frac12 \sqrt{\frac{\nu}{\pi} } \\
\times \left(
\begin{array}{c}
\sqrt{1+m_3/E} \left[\sin(\mu^{(\vee)(s)}_{\nu l' +G_s}) J_{\nu l'+G_s}(kr) + \cos(\mu^{(\vee)(s)}_{\nu l' +G_s}) Y_{\nu l'+G_s}(kr)\right] \\
-{\rm sgn}(E) \sqrt{1- m_3/E} \left[\sin(\mu^{(\vee)(s)}_{\nu l' +G_s})
J_{\nu l'-1+G_s}(kr) + \cos(\mu^{(\vee)(s)}_{\nu l' +G_s}) Y_{\nu
l'-1+G_s}(kr)\right]
\end{array}
\right),
\end{multline}
where $l'=-s (n-n_{\rm c})$; here $J_\rho(u)$ and $Y_\rho(u)$ are the Bessel
and Neumann functions of order $\rho$,
$k = \sqrt{E^2 - m^2_3}$.
In the case of $\nu > 1$ and $-\frac12 < s\left(F -\frac12\right) < -\frac1{2\nu}$
$\quad$ $\left( \frac12 ( 1-\nu ) < G_s <0 \right)$, the complete set of solutions to \eqref{2.25} is given by
\begin{equation}\label{a3}
\left.
\left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \geq 0} = \left(
\begin{array}{c}
f_n^{(\wedge)(s)} \\ g_n^{(\wedge)(s)}
\end{array}
\right), \quad
\left. \left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \leq -1} = \left(
\begin{array}{c}
f_n^{(\vee)(s)} \\ g_n^{(\vee)(s)}
\end{array}
\right).
\end{equation}
In the case of $\nu >1 $ and $\frac1{2\nu} < s\left(F -\frac12\right) < \frac12$
$\quad$ $\left( 1<G_s < \frac12(1+\nu)\right)$, the complete set of solutions to \eqref{2.25} is given by
\begin{equation}\label{a4}
\left. \left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \geq 1} = \left(
\begin{array}{c}
f_n^{(\wedge)(s)} \\ g_n^{(\wedge)(s)}
\end{array}
\right), \quad \left. \left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \leq 0} = \left(
\begin{array}{c}
f_n^{(\vee)(s)} \\ g_n^{(\vee)(s)}
\end{array}
\right).
\end{equation}
In the case of $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$ $\quad$ $(0<G_s<1)$,
there is a peculiar mode corresponding to $n=n_{\rm c}$; the mode can be chosen in the following form:
\begin{multline}\label{a5}
\left(
\begin{array}{c}
f_{n_{\rm c}}^{(s)} \\ g_{n_{\rm c}}^{(s)}
\end{array}
\right)= \frac12 \sqrt{\frac{\nu}{\pi} }
\frac1{\sqrt{1+\sin(2\mu_{1-G_s}^{(c)(s)})\cos(G_s\pi) } } \\ \times \left(
\begin{array}{c}
\sqrt{1+m_3/E} \left[\sin(\mu_{1 -G_s}^{(c)(s)}) J_{-G_s}(kr) + \cos(\mu_{1 -G_s}^{(c)(s)}) J_{G_s}(kr)\right] \\
{\rm sgn}(E) \sqrt{1- m_3/E} \left[\sin(\mu_{1 -G_s}^{(c)(s)}) J_{1-G_s}(kr) -
\cos(\mu_{1 -G_s}^{(c)(s)}) J_{-1+G_s}(kr)\right]
\end{array}
\right).
\end{multline}
Modes
\begin{equation}\label{a6}
\left. \left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \geq 1} = \left(
\begin{array}{c}
f_n^{(\wedge)(s)} \\ g_n^{(\wedge)(s)}
\end{array}
\right), \quad \left. \left( \begin{array}{c} f_n^{(s)} \\ g_n^{(s)}
\end{array}
\right)\right|_{s (n-n_{\rm c}) \leq -1} = \left(
\begin{array}{c}
f_n^{(\vee)(s)} \\ g_n^{(\vee)(s)}
\end{array}
\right)
\end{equation}
together with mode \eqref{a5} comprise the set of all solutions with $|E|>m_3$ in this case.
In the case of $\frac12 \leq \nu< 1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$ $\quad$ $(1-\nu < G_s <\nu)$, the set of all solutions with $|E|>m_3$ is also given by \eqref{a5} and \eqref{a6}. In the case of $\frac12 \leq \nu < 1$ and either $-\frac12 < s\left(F -\frac12\right) < - 1 + \frac1{2\nu}$
$\quad$ $\left( \frac12(1-\nu) < G_s < 1-\nu \right)$ or
$ 1 - \frac{1}{2\nu} < s\left(F -\frac12\right) < \frac12$
$\quad$ $\left( \nu < G_s < \frac12(1+\nu) \right)$, there are two peculiar modes. In the case of $0< \nu < \frac12$, there are two and more peculiar modes.
Certainly, the limit of $r\rightarrow 0$ is of no sense for cosmic strings
of nonzero transverse size. However, it is instructive here to discuss briefly the case of an infinitely thin cosmic string (see \cite{SiG} for details). Most of the modes in the $r_0 = 0$ case are obtained by
putting $\mu^{( \wedge )(s)}_\rho = \mu^{( \vee )(s)}_\rho =\pi/2$ in \eqref{a3}, \eqref{a4}, and \eqref{a6}; these modes are regular at $r\rightarrow 0$.
However, peculiar mode \eqref{a5} cannot be
made regular at $r \rightarrow 0$; it is irregular but square
integrable. The latter circumstance requires a quest for a
self-adjoint extension, and the Weyl-von Neumann theory of
deficiency indices (see \cite{Ree,Alb}) has to be employed. In the case of
$\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, as well as in the case of $\frac12 \leq \nu < 1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$, when there is one irregular mode,
the deficiency index is (1,1), and the one-parameter family of self-adjoint extensions is introduced. The induced vacuum current and other vacuum polarization effects in
two-dimensional surface $z={\rm const}$ were comprehensively and exhaustively studied for $\nu=1$ in \cite{Sit6,SiR,Si7,Sit9,Si9} and for carbonlike nanocones in \cite{SiV7,SiV1,SiV2,Si18}.
In the case of $\frac12 \leq \nu<1$ and either $-\frac12 < s\left(F -\frac12\right) < - 1 + \frac1{2\nu}$ or
$ 1 - \frac{1}{2\nu} < s\left(F -\frac12\right) < \frac12$, and other cases, when there are two irregular square integrable modes, the deficiency index is (2,2), and there are four self-adjoint extension parameters. These cases remain unstudied yet.
Imposing the $P$ invariant boundary condition with matrix $K$ \eqref{3.10} or the $CT$ invariant boundary condition with matrix $K$ \eqref{3.24} on the solution to the Dirac equation,
$\psi_E(\textbf{x})$ \eqref{2.17}, we obtain the condition for the modes, see \eqref{3.19} or \eqref{3.29}, which
allows us to determine the mode coefficients:
\begin{align}
& \tan(\mu^{(\wedge)(s)}_\rho) = \frac{k Y_{\rho-1}(kr_0)- \tau_s (m_3-E) Y_{\rho}(kr_0)}
{- k J_{\rho-1}(kr_0)+ \tau_s (m_3-E) J_{\rho}(kr_0)}, \label{a7}\\
& \tan(\mu^{(\vee)(s)}_\rho ) =
\frac{k Y_{\rho-1}(kr_0)- \tau_s^{-1} (m_3+E) Y_{\rho}(kr_0)}
{- k J_{\rho-1}(kr_0)+ \tau_s^{-1} (m_3+E) J_{\rho}(kr_0)}, \label{a8}\\
& \tan(\mu_{1-G_s}^{(c)(s)}) = \frac{k J_{G_s}(kr_0)+ \tau_s (m_3 - E) J_{-1+G_s}(kr_0)}
{- k J_{-G_s}(kr_0) + \tau_s (m_3-E) J_{1-G_s}(kr_0)};
\label{a9}
\end{align}
note that relation $\tau_{-s} = \tau_s^{-1}$ holds in the case of the $CPT$ invariant boundary condition, and, consequently, we obtain
\begin{equation}\label{a10}
\tan(\mu^{(\vee)( - s)}_\rho ) = \left.\tan(\mu^{(\wedge)(s)}_\rho)\right|_{E \rightarrow - E}
\end{equation}
and
\begin{equation}\label{a11}
\tan(\mu_{G_s}^{(c)(-s)}) = - \left.\cot(\mu_{1-G_s}^{(c)(s)})\right|_{E \rightarrow - E}
\end{equation}
in this case.
Because of conditions \eqref{3.19} and \eqref{3.29} in general case, in addition to the continuous spectrum, a bound state with energy $E_{BS}^{(s)}$ in the gap between the continuums, $-m_3 < E_{BS}^{(s)}< m_3$, emerges in section $z={\rm const}$ at $\tau_s < 0$ for $n=n_{\rm c}$
$\quad$ ($\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or $\frac12
\leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$). Its mode is
\begin{multline}\label{a12}
\left( \begin{array}{c} f_{n_{\rm c}}^{(BS)(s)} \vphantom{\int\limits_0^0}\\
g_{n_{\rm c}}^{(BS)(s)}
\end{array}
\right) = \sqrt{\frac{\nu\kappa_s m_3}{2 \pi r_0}}\Biggl\{ m_3 K_{G_s}(\kappa_s r_0)
K_{1-G_s}(\kappa_s r_0) \Biggr. \\
\Biggl.+E_{BS}^{(s)}\Biggl[\kappa_s r_0 K^2_{1-G_s}(\kappa_s r_0)-\kappa_s r_0 K^2_{G_s}(\kappa_s r_0)+ (2G_s-1)K_{G_s}(\kappa_s r_0) K_{1-G_s}(\kappa_s r_0) \Biggr]
\Biggr\}^{-1/2} \\ \times \left(
\begin{array}{c} \sqrt{1+E_{BS}^{(s)}/m_3} \,K_{G_s}(\kappa_s r) \\ \sqrt{1-E_{BS}^{(s)}/m_3} \,K_{1-G_s}(\kappa_s r)
\end{array}
\right),
\end{multline}
where $\kappa_s = \sqrt{m^2_3-(E_{BS}^{(s)})^2}$, and the value of its energy is determined from relation
\begin{equation}\label{a13}
\sqrt{ \frac{1+E_{BS}^{(s)}/m_3}{1-E_{BS}^{(s)}/m_3 }} = - \tau_s \, \frac{K_{1-G_s}(\kappa_s r_0)}{K_{G_s}(\kappa_s r_0)}.
\end{equation}
Comparing the case of a cosmic string of nonzero transverse size with that of an infinitely thin one, we emphasise that in the first case all partial Hamiltonians are extended with the same boundary parameters, whereas in the second case several partial Hamiltonians are extended, and the number of self-adjoint extension parameters can be zero (no need for extension, the operator is essentially self-adjoint), one, four, etc. The values of the self-adjoint extension parameters in the second case can be fixed from the first case by limiting procedure $r_0\rightarrow 0$ which transforms peculiar modes into irregular ones. Namely in this way, the condition of minimal irregularity
\cite{Sit6,Si7} is obtained in the case of the deficiency
index equal to (1,1), i.e. when only one peculiar mode exists.
\setcounter{equation}{0}
\renewcommand{\theequation}{B.\arabic{equation}}
\section*{Appendix B: Extracting the dependence on the transverse size of a cosmic string}
In the situation when peculiar modes are absent, i.e. $\nu \geq 1$ and $\frac{1}{2\nu} < |F-\frac12| < \frac{1}{2}$, all the $r_0$ dependence is contained in integrals over $q$ in \eqref{4.12}-\eqref{4.15}. We are considering below the situation when there is one peculiar mode for each value of $s$, i.e. $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or $\frac12 \leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$.
In the case of $F\neq 1/2$, we present
$j_\varphi^{(s)}(r)$ as
\begin{multline}\label{b1}
\left.j_{\varphi}^{(s)}(r)\right|_{F\neq 1/2, \,(\tau_s)^{-s{\rm sgn}(F-\frac{1}{2})}\neq 0}\\
=\frac{m^2}{2 \pi^2}\left\{\frac{1}{2\pi}\int\limits^{\infty}_{0}\frac{du}{\cosh(u/2)}K_2\left[2mr\cosh(u/2)\right]\Omega_{{\rm sgn}(F-\frac{1}{2})}(u)\right.\\
\left. +\frac{1}{\nu}\sum\limits_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right]\frac{\sin\left[(2F-1)p\pi\right]}{\sin(p\pi/\nu)}-\frac{1}{4N}K_2(2mr)\sin\left[(2F-1)N\pi\right]\delta_{\nu,2N}\right\}\\
+\frac{sr}{\pi^3}\int\limits_{0}^{\pi/2}d\xi\int\limits_{m}^{\infty}dqq^2\left\{\Biggl[\Theta\!\left(sF-\frac{s}{2}\right)
C^{(\vee)(s)}_{\lambda\left[0, \, s\left(F-\frac12\right)\right]}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr.\right. \\
\Biggl. - \Theta\!\left(\frac{s}{2}-sF\right)
C^{(\wedge)(s)}_{\lambda\left[0, \, s\left(\frac12-F\right)\right]}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr] K_{\lambda \left(0, \, F-\frac12 \right)}(qr)K_{\lambda \left(0, \, \frac12-F \right)}(qr)\\
+\sum\limits_{l=1}^{\infty}\left[C_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}^{(\vee)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)K_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}(qr)K_{\lambda\left[l, \, s\left(F-\frac12\right)\right]-1}(qr)\right.\\
\Biggl.\left.-C_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}^{(\wedge)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \,r_0\right)K_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}(qr)K_{\lambda\left[l, \, s\left(\frac12-F\right)\right]-1}(qr)\right]\Biggr\}
\end{multline}
and
\begin{multline}\label{b2}
\left.j_{\varphi}^{(s)}(r)\right|_{F\neq 1/2, \, \ln|\tau_s|^s=\pm\infty}
=\frac{m^2}{2 \pi^2}\left\{\frac{1}{2\pi}\int\limits_{0}^{\infty} \frac{du}{\cosh(u/2)} K_2\left[2mr\cosh(u/2)\right] {\Omega}_{\mp}(u) \right. \\
\left. +\frac{1}{\nu}\sum\limits_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right]\frac{\sin\left[(2F-1)p\pi\right]}{\sin(p\pi/\nu)} - \frac{1}{4N} K_2(2mr)\sin[(2F-1)N\pi]\delta_{\nu,2N}\right\} \\
\mp\frac{r}{2 \pi^2}\int\limits_{m}^{\infty}dqq^2\left\{\frac{I_{\lambda\left[0, \, \mp\left(F-\frac12\right)\right]}(qr_0)}{K_{\lambda\left[0, \, \mp\left(F-\frac12\right)\right]}(qr_0)}K_{\lambda \left(0, \, F-\frac12 \right)}(qr) K_{\lambda \left(0, \, \frac12-F \right)}(qr) \right.\\
+ \sum\limits_{l=1}^{\infty}\left[\frac{I_{\lambda \left(l, \, F-\frac12 \right)-\frac 12\mp\frac 12}(qr_0)}{K_{\lambda \left(l, \, F-\frac12 \right)-\frac 12\mp\frac 12}(qr_0)}K_{\lambda \left(l, \, F-\frac12 \right)}(qr)K_{\lambda \left(l, \, F-\frac12 \right)-1}(qr) \right. \\
\left.\Biggl. + \frac{I_{\lambda \left(l, \, \frac12-F \right)-\frac 12 \pm\frac 12}(qr_0)}{K_{\lambda \left(l, \, \frac12-F \right)-\frac 12\pm\frac 12}(qr_0)}K_{\lambda \left(l, \, \frac12-F \right)}(qr)K_{\lambda \left(l, \, \frac12-F \right)-1}(qr)\right]\Biggr\},
\end{multline}
where $\Theta (t) = \frac12 + \frac12{\rm sgn}(t)$ is the step function, $\Omega_{\pm}(u)$ is given by \eqref{5.10} in Section 5, and the use is made of relations
\begin{equation}\label{b111}
C_{G}^{(\vee)(s)}(v,w) + C_{1 - G}^{(\wedge)(s)}(v,w) = - \frac{2}{\pi}\sin(G\pi)
\end{equation}
and
\begin{equation}\label{b112}
\!\int\limits_{m}^\infty\!\! dq \, q^2 \, K_{G}(qr) K_{1-G}(qr)\!=\!\frac{m^2}{2r}\!\!\int\limits_0^\infty
\!\!\frac{du}{\cosh(u/2)} \,
\cosh\left[\left(G\!-\!\frac12\right)u\right] K_2\left[2mr\cosh(u/2)\right];
\end{equation}
all the $r_0$ dependence is contained in integrals over $q$ in \eqref{b1} and \eqref{b2}.
In the case of $F=1/2$, we obtain the following expression for the current in two-dimensional surface $z={\rm const}$, see \eqref{4.4}:
\begin{multline}\label{b3}
\left.j_{\varphi}^{(2 {\rm dim})(s)}(r)\right|_{F=1/2}=\frac{s}{2 \pi^2}\left(\tau_{s}^{-1}-\tau_s\right)\int\limits_{m}^{\infty}\frac{dq\,q^2}{\sqrt{q^2-m^2}}\Biggl[\frac{{\rm e}^{2q(r_0-r)}}{q(\tau_{s}^{-1}+\tau_s)+2m}\Biggr. \\ \left.+2r\sum\limits_{l=1}^{\infty}C_{\nu l+\frac 12}^{(s)}\left(qr_o,\,mr_0\right)K_{\nu l+\frac 12}(qr) K_{\nu l-\frac 12}(qr)\right],
\end{multline}
where
\begin{multline}\label{b4}
C_{\nu l+\frac 12}^{(s)}(v,w)\equiv\frac{1}{\tau_{s}^{-1}-\tau_{s}}\left[C_{\nu l+\frac 12}^{(\vee)(s)}(v,w)-C_{\nu l+\frac 12}^{(\wedge)(s)}(v,w)\right] \\
=\left\{w\left[K_{\nu l+\frac 12}^{2}(v)+K_{\nu l-\frac 12}^{2}(v)\right]+(\tau_{s}^{-1}+\tau_{s})vK_{\nu l+\frac 12}(v)K_{\nu l-\frac 12}(v)\right\}\\
\times\left\{v\left[K_{\nu l+\frac 12}^{2}(v)+K_{\nu l-\frac 12}^{2}(v)\right]\left[v\left(K_{\nu l+\frac 12}^{2}(v)+K_{\nu l-\frac 12}^{2}(v)\right)+2(\tau_{s}^{-1}+\tau_{s})wK_{\nu l+\frac 12}(v)K_{\nu l-\frac 12}(v)\right]\right.\\
\left.+\left[(\tau_{s}^{-1}-\tau_{s})^2v^2+4w^2\right]K_{\nu l+\frac 12}^{2}(v)K_{\nu l-\frac 12}^{2}(v)\right\}^{-1},
\end{multline}
and the use is made of explicit forms,
\begin{equation}\label{b5}
C_{1/2}^{(\vee)(s)}(v,w) - C_{1/2}^{(\wedge)(s)}(v,w) =\frac{2\left(\tau_{s}^{-1}-\tau_s\right){\rm e}^{2v}/{\pi}}{\tau_{s}^{-1}+\tau_{s}+2w/v},\ \ K_{1/2}(v) ={\rm e}^{-v}\sqrt{\frac{\pi}{2v}}.
\end{equation}
Note that, whereas \eqref{b3} vanishes at $\tau_s=1$, it is nonvanishing and discontinuous at $\tau_s=-1$,
\begin{equation}\label{b6}
\left.\lim\limits_{(-\tau_s)^s\rightarrow 1_\mp}j_{\varphi}^{(2{\rm dim})(s)}(r)\right|_{F=1/2}=\pm\frac{m}{2\pi}{\rm e}^{2m(r_0-r)}.
\end{equation}
Inserting \eqref{b3} into \eqref{4.3} and performing integration over $\xi$ in the term corresponding to the first one in square brackets in \eqref{b3}, we obtain
\begin{multline}\label{b7}
\left.j_{\varphi}^{(s)}(r)\right|_{F=1/2}=\frac{s m^2}{\pi^2} \, \frac{{\rm sgn}\left(1-\tau_{s}^2\right)}{(\tau_{s}^{-1}+\tau_{s})^2}\left[\frac{|\tau_{s}^{-1}+\tau_{s}|}{4m(r-r_0)}K_1\left(\frac{4m(r-r_0)}{|\tau_{s}^{-1}+\tau_{s}|}\right) \right. \\
\left. + K_0\left(\frac{4m(r-r_0)}{|\tau_{s}^{-1}+\tau_{s}|}\right)\right] + \frac{s}{4 \pi^3}(\tau_{s}^{-1}-\tau_{s})\int\limits_{m}^{\infty}dq q\Biggl\{{\rm e}^{2q(r_0-r)}\Biggl[K\left(1-m^2/q^2\right)\Biggr.\Biggr.\\
\left.-\left(\frac{1+\tau_s^2}{1-\tau_s^2}\right)^2 \Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1 - m^2/q^2\right)\right]\\
\left.+4qr \int\limits_{0}^{\pi/2}d\xi\sum\limits_{l=1}^{\infty}C_{\nu l+\frac 12}^{(s)}\left(qr_0,\sqrt{q^2\cos^2\xi+m^2\sin^2\xi} \, r_0\right)K_{\nu l+\frac{1}{2}}(qr) K_{\nu l-\frac 12}(qr)\right\},
\end{multline}
where
$$
K(m)=\int\limits_{0}^{1} \frac{dt}{\sqrt{(1-t^2)(1-mt^2)}}
$$
is the complete elliptic integral of the first kind, and
$$
\Pi(n; m)=\int\limits_{0}^{1} \frac{dt}{(1-nt^2)\sqrt{(1-t^2)(1-mt^2)}}
$$
is the complete elliptic integral of the third kind, see \cite{Abra}. In view of relation
\begin{equation}\label{b8}
\lim\limits_{|\tau_s| \rightarrow 1} \frac{4}{|\tau_{s}^{-1}-\tau_s|}\Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1-m^2/q^2\right) = \frac{\pi q}{\sqrt{q^2-m^2}},
\end{equation}
we get
\begin{equation}\label{b9}
\left.j_{\varphi}^{(s)}(r)\right|_{F=1/2, \, \tau_s=1}=0
\end{equation}
and
\begin{multline}\label{b10}
\left.\lim\limits_{(-\tau_s)^s\rightarrow 1_{\mp}}j_{\varphi}^{(s)}(r)\right|_{F=1/2}=\pm \frac{1}{2 \pi^2}\int\limits_{m}^{\infty}\frac{dqq^2}{\sqrt{q^2-m^2}}{\rm e}^{2q(r_0-r)}\\
=\pm\frac{m^2}{2 \pi^2}\left\{\frac{1}{2m(r-r_0)}K_1\left[2m(r-r_0)\right]+K_0\left[2m(r-r_0)\right]\right\}.
\end{multline}
Inserting \eqref{b1}, \eqref{b2}, and \eqref{b7} into \eqref{2.30}, we obtain expressions
\begin{multline}\label{b11}
\left.B_I^{(s)}(r)\right|_{F\neq 1/2, \, (\tau_s)^{-s {\rm sgn}(F-\frac 12)}\neq 0}
\\
=\frac{e\nu m}{(2\pi)^2r}\left\{\frac{1}{2\pi}\int\limits_{0}^{\infty}\frac{du}{\cosh^2(u/2)}K_1\left[2mr\cosh(u/2)\right]\Omega_{{\rm sgn}(F-\frac{1}{2})}(u) \right.\\
\left.+\frac{1}{\nu}\sum\limits_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]}K_1\left[2mr\sin(p\pi/\nu)\right]\frac{\sin\left[(2F-1)p\pi\right]}{\sin^2(p\pi/\nu)}-\frac{1}{4N}K_1(2mr)\sin\left[(2F-1)N\pi\right]\delta_{\nu,2N}\right\}\\
-\frac{s e \nu r}{2\pi^3} \int\limits_{0}^{\pi/2}d\xi \int\limits_{m}^{\infty}dq q^2\left\{\Biggl[\Theta\!\left(sF-\frac{s}{2}\right)
C^{(\vee)(s)}_{\lambda\left[0, \, s\left(F-\frac12\right)\right]}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr.\right. \\
\Biggl. - \Theta\!\left(\frac{s}{2}-sF\right)
C^{(\wedge)(s)}_{\lambda\left[0, \, s\left(\frac12-F\right)\right]}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr] W_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(qr) \\
+\sum\limits_{l=1}^{\infty}\left[C_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}^{(\vee)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right) W_{\lambda\left[l, \, s\left(F-\frac12\right)\right]}(qr) \right. \\
\left.\Biggl.-C_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}^{(\wedge)(s)}\left(qr_0,\sqrt{q^2\sin^2 \xi+m^2\cos^2\xi} \, r_0\right) W_{\lambda\left[l, \, s\left(\frac12-F\right)\right]}(qr)\right]
\Biggr\},
\end{multline}
\begin{multline}\label{b12}
\left.B_{I}^{(s)}(r)\right|_{F\neq 1/2, \, \ln|\tau_s|^s=\pm\infty}=\frac{e\nu m}{(2\pi)^{2}r}\left\{\frac{1}{2\pi}\int\limits_{0}^{\infty}\frac{du}{\cosh^2(u/2)}K_1\left[2mr\cosh(u/2)\right]\Omega_{\mp}(u) \right. \\
\left. +\frac{1}{\nu}\sum\limits_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]}K_1\left[2mr\sin(p\pi/\nu)\right]\frac{\sin[(2F-1)p\pi]}{\sin^2(p\pi/\nu)}-\frac{1}{4N}K_1(2mr)\sin[(2F-1)N\pi]\delta_{\nu,2N}\right\}\\
\pm\frac{e \nu r}{4 \pi^2}\int\limits_{m}^{\infty}dq q^2\left\{\frac{I_{\lambda\left[0, \, \mp\left(F-\frac12\right)\right]}(qr_0)}{K_{\lambda\left[0, \, \mp\left(F-\frac12\right)\right]}(qr_0)} W_{\lambda \left(0, \, \left|F-\frac12\right|\right)}(qr)\right.\\
\left.+\sum\limits_{l=1}^{\infty}\left[\frac{I_{\lambda \left(l, \, F-\frac12 \right)-\frac 12\mp\frac 12}(qr_0)}{K_{\lambda \left(l, \, F-\frac12 \right)-\frac 12\mp \frac 12}(qr_0)}W_{\lambda \left(l, \, F-\frac12 \right)}(qr) +\frac{I_{\lambda \left(l, \, \frac12-F \right)-\frac 12\pm\frac 12}(qr_0)}{K_{\lambda \left(l, \, \frac12-F \right)-\frac 12\pm \frac 12}(qr_0)}W_{\lambda \left(l, \, \frac12-F \right)}(qr)\right]\right\},
\end{multline}
and
\begin{multline}\label{b13}
\left.B_{I}^{(s)}(r)\right|_{F=1/2}= \frac{s e \nu m}{(2\pi)^2} \, \frac{{\rm sgn}\left(1-\tau_{s}^2\right)}{|\tau_{s}^{-1}+\tau_{s}|}\Biggl[\frac{1}{r}K_1\left(\frac{4m(r-r_0)}{|\tau_{s}^{-1}+\tau_{s}|}\right) \Biggr. \\
\left. - \int\limits_{r}^{\infty}\frac{dr'}{{r'}^2}K_1\left(\frac{4m(r'-r_0)}{|\tau_{s}^{-1}+\tau_{s}|}\right)\right] + \frac{s e \nu}{4 \pi^3}(\tau_{s}^{-1}-\tau_s)\int\limits_{m}^{\infty}dq q\Biggl\{ {\rm e}^{2qr_0} \Gamma(0,2qr)\Biggl[K\left(1-m^2/q^2\right)\Biggr.\Biggr.\\
\left. - \left(\frac{1+\tau_s^2}{1-\tau_s^2}\right)^2 \Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1 - m^2/q^2\right)\right]\\
\left. - 2 q r \int\limits_{0}^{\pi/2}d\xi\sum\limits_{l=1}^{\infty}C_{\nu l+\frac 12}^{(s)}\left(qr_0,\sqrt{q^2\cos^2\xi+m^2\sin^2\xi} \, r_0\right) W_{\nu l+\frac{1}{2}}(qr) \right\}.
\end{multline}
In particular,
\begin{equation}\label{b14}
\left.B_{I}^{(s)}(r)\right|_{F=1/2, \, \tau_s=1}=0
\end{equation}
and
\begin{equation}\label{b15}
\left.\lim\limits_{(-\tau_s)^s\rightarrow 1_{\mp}}B_{I}^{(s)}(r)\right|_{F=1/2}=\pm\frac{e \nu m}{(2\pi)^2}\left\{\frac{1}{r}K_1[2m(r-r_0)]-\int\limits_{r}^{\infty}\frac{dr'}{{r'}^2} K_{1}[2m(r'-r_0)]\right\}.
\end{equation}
In the case of the vanishing string tension, we obtain
\begin{multline}\label{b16}
\left.j_{\varphi}^{(s)}(r)\right|_{\nu=1, \, F\neq 1/2, \, (\tau_s)^{-s{\rm sgn}\left(F-\frac{1}{2}\right)}\neq 0}\\
=\frac{m^2}{2 \pi^3}{\rm sgn}\left(F-\frac{1}{2}\right)\sin(F\pi)\int\limits_{1}^{\infty}\frac{dv}{v^2\sqrt{v^2-1}}K_2(2mrv)\cosh\left[(|2F-1|-1){\rm arccosh} v\right] \\
+\frac{sr}{\pi^3}\int\limits_{0}^{\pi/2}d\xi\int\limits_{m}^{\infty}dqq^2
\left\{\Biggl[\Theta\!\left(sF-\frac{s}{2}\right)
C^{(\vee)(s)}_{\frac12+s\left(F-\frac12\right)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr.\right. \\
\Biggl. - \Theta\!\left(\frac{s}{2}-sF\right)
C^{(\wedge)(s)}_{\frac12-s\left(F-\frac12\right)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr] K_{F}(qr)K_{1 - F}(qr)\\
+\sum\limits_{l=1}^{\infty}\left[C_{l+s\left(F-\frac12\right)+\frac12}^{(\vee)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)K_{l+s\left(F-\frac12\right)+\frac12}(qr)K_{l+s\left(F-\frac12\right)-\frac12}(qr)\right.\\
\Biggl.\left.-C_{l-s\left(F-\frac12\right)+\frac12}^{(\wedge)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)K_{l-s\left(F-\frac12\right)+\frac12}(qr)K_{l-s\left(F-\frac12\right)-\frac12}(qr)\right]\Biggr\},
\end{multline}
\begin{multline}\label{b17}
\left.j_{\varphi}^{(s)}(r)\right|_{\nu=1, \, F\neq 1/2, \, \ln|\tau_s|^s=\pm\infty}\\
=\mp\frac{m^2}{2 \pi^3}\sin(F\pi)\int\limits_{1}^{\infty}\frac{dv}{v^2\sqrt{v^2-1}}K_2(2mrv)\cosh\left[(2F-1\pm 1){\rm arccosh} v\right]\\
\mp\frac{r}{2 \pi^2}\int\limits_{m}^{\infty}dq q^2
\left\{\frac{I_{\frac{1}{2}\mp\left(F-\frac{1}{2}\right)}(qr_0)}{K_{\frac{1}{2}\mp\left(F-\frac{1}{2}\right)}(qr_0)}K_{F}(qr)K_{1-F}(qr)\right.\\
\left.+\sum\limits_{l=1}^{\infty}\left[\frac{I_{l+F-\frac{1}{2}\mp\frac{1}{2}}(qr_0)}{K_{l+F-\frac{1}{2}\mp\frac{1}{2}}(qr_0)}K_{l+F}(qr)K_{l-1+F}(qr)+\frac{I_{l-F+\frac{1}{2}\pm\frac{1}{2}}(qr_0)}{K_{l-F+\frac{1}{2}\pm\frac{1}{2}}(qr_0)}K_{l+1-F}(qr)K_{l-F}(qr)\right]\right\},
\end{multline}
\begin{multline}\label{b18}
\left. B_{I}^{(s)}(r)\right|_{\nu=1, \, F\neq 1/2, \, (\tau_s)^{-s{\rm sgn}\left(F-\frac{1}{2}\right)}\neq 0}\\
=\frac{e m}{4 \pi^3 r}{\rm sgn}\left(F-\frac{1}{2}\right)\sin(F\pi)\int\limits_{1}^{\infty}\frac{dv}{v^3\sqrt{v^2-1}}K_1(2mrv)\cosh\left[(|2F-1|-1){\rm arccosh} v\right]\\
- \frac{s e r}{2\pi^3}\int\limits_{0}^{\pi/2}d\xi\int\limits_{m}^{\infty}dqq^2\left\{\Biggl[\Theta\!\left(sF-\frac{s}{2}\right)
C^{(\vee)(s)}_{\frac12+s\left(F-\frac12\right)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr.\right. \\
\Biggl. - \Theta\!\left(\frac{s}{2}-sF\right)
C^{(\wedge)(s)}_{\frac12-s\left(F-\frac12\right)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right)\Biggr] W_{\frac12+|F-\frac12|}(qr)\\
\left.+\sum\limits_{l=1}^{\infty}\left[C_{l+s\left(F-\frac{1}{2}\right)+\frac{1}{2}}^{(\vee)(s)}\left(qr_0,\sqrt{q^2\sin^2\xi+m^2\cos^2\xi} \, r_0\right) W_{l+s\left(F-\frac{1}{2}\right)+\frac{1}{2}}(qr)\right.\right.\\
\Biggl.\left. - C_{l-s\left(F-\frac{1}{2}\right)+\frac{1}{2}}^{(\wedge)(s)}\left(qr_0,\sqrt{q^2\sin^2 \xi+m^2\cos^2\xi} \, r_0\right) W_{l-s\left(F-\frac{1}{2}\right)+\frac{1}{2}}(qr) \right]\Biggr\},
\end{multline}
and
\begin{multline}\label{b19}
\left.B_{I}^{(s)}(r)\right|_{\nu=1, \, F\neq 1/2, \, \ln|\tau_s|^{s}=\pm\infty}\\
=\mp\frac{e m}{4 \pi^{3}r}\sin(F\pi)\int\limits_{1}^{\infty}\frac{dv}{v^{3}\sqrt{v^2-1}}K_1(2mrv)\cosh[(2F-1 \pm 1){\rm arccosh} v]\\
\pm\frac{e r}{4 \pi^{2}}\int\limits_{m}^{\infty}dq q^2 \left\{\frac{I_{\frac{1}{2}\mp\left(F-\frac{1}{2}\right)}(qr_0)}{K_{\frac{1}{2}\mp\left(F-\frac{1}{2}\right)}(qr_0)}W_{\frac12+\left|F-\frac12\right|}(qr) \right.\\
\Biggl.+\sum\limits_{l=1}^{\infty}\left[\frac{I_{l+F-\frac{1}{2}\mp\frac{1}{2}}(qr_0)}{K_{l+F-\frac{1}{2}\mp\frac{1}{2}}(qr_0)} W_{l+F}(qr) + \frac{I_{l-F+\frac{1}{2}\pm\frac{1}{2}}(qr_0)}{K_{l-F+\frac{1}{2}\pm\frac{1}{2}}(qr_0)} W_{l+1-F}(qr)\right]\Biggr\};
\end{multline}
expressions at $F=1/2$ are immediately obtained by putting $\nu = 1$ in \eqref{b7} and \eqref{b13}.
\setcounter{equation}{0}
\renewcommand{\theequation}{C.\arabic{equation}}
\section*{Appendix C: Case of the infinitely thin cosmic string}
Coefficients $C^{(\wedge)(s)}_\rho$ \eqref{4.5} and $C^{(\vee)(s)}_\rho$ \eqref{4.6} obey relation
\begin{equation}\label{c1}
\lim_{r_0\rightarrow0}\,C^{(\wedge)(s)}_\rho = \lim_{r_0\rightarrow0}\,C^{(\vee)(s)}_\rho = 0, \quad \rho > 1.
\end{equation}
The nonpeculiar modes turn into regular ones at $r_0 \rightarrow 0$, as was already noted, and they are given by \eqref{a1} and \eqref{a2} with (see \eqref{a7} and \eqref{a8})
\begin{equation}\label{c2}
\lim_{r_0\rightarrow0}\,\mu^{(\wedge)(s)}_\rho = \pi/2, \quad \lim_{r_0\rightarrow0}\,\mu^{(\vee)(s)}_\rho = \pi/2.
\end{equation}
If the peculiar mode is absent, i.e. at $\nu > 1$ and $\frac{1}{2\nu} < |F-\frac12| < \frac12$, then, owing to the vanishing of $C^{(\wedge)(s)}_\rho$ and $C^{(\vee)(s)}_\rho$ in the $r_0\rightarrow0$ limit, the current and the magnetic field strength in the $r_0=0$ case are obtained by omitting sums over $l$ in \eqref{4.12}-\eqref{4.15}.
If the peculiar mode for each value of $s$ is present, see \eqref{a5}, i.e. either at $\nu \geq 1$ and $|F-\frac12| < \frac{1}{2\nu}$, or at $\frac12 \leq \nu <1$ and $|F-\frac12| < 1 - \frac{1}{2\nu}$, then, imposing the condition of minimal irregularity on this mode in the $r_0\rightarrow0$ limit, we get (see \eqref{a9})
\begin{equation}\label{c3}
\lim_{r_0\rightarrow 0}\mu^{(c)(s)}_{\frac12-s\nu\left(F-\frac12\right)} =\left\{
\begin{array}{l}
\frac\pi2, \quad s\left(F-\frac12\right) < 0, \\
\vphantom{\int\limits_0^0}
{\rm sgn}(E)\arctan\left(\tau_s \sqrt{
\frac{1-m_3/E}{1+m_3/E}}
\right), \quad F=\frac12,\\
0,\quad s\left(F-\frac12\right) > 0.
\end{array}
\right.
\end{equation}
In the following we imply that namely \eqref{c2} and \eqref{c3} hold for the case of the infinitely thin cosmic string; then, as was already stated in the end of Section 4, we get
$$ \left.j_\varphi(r)\right|_{r_0=0} = \sum_{s=\pm 1} j_\varphi^{(a)(s)}(r) \quad {\rm and} \quad
\left.B_I(r)\right|_{r_0=0} = \sum_{s=\pm 1} B_I^{(a)(s)}(r)
$$
with $j_\varphi^{(a)(s)}$ and $B_I^{(a)(s)}$ defined according to \eqref{4.18} and \eqref{4.19}, respectively.
In the case of $F \neq 1/2$, we use \eqref{b1} and \eqref{b11}, and note that terms in the integrals over $q$ vanish in the $r_0\rightarrow0$ limit. Summing the remaining terms over $s$, we obtain
\begin{multline}\label{c4}
\left.j_\varphi(r)\right|_{r_0=0, \, F\neq 1/2} = \frac{m^2}{\pi^2}\left\{\frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh(u/2)}K_2\left[2mr \cosh(u/2)\right] \, \Omega_{{\rm sgn}\left(F-\frac12\right)}(u)\right. \\
\left. + \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_2\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin(p\pi/\nu)}
- \frac{1}{4N} K_2\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\}
\end{multline}
and
\begin{multline}\label{c5}
\left.B_I(r)\right|_{r_0=0, \, F\neq 1/2} = \frac{e \nu m}{2 \pi^2 r}\left\{ \frac{1}{2\pi}\int\limits_0^\infty
\frac{du}{\cosh^2(u/2)}K_1\left[2mr \cosh(u/2)\right] \, \Omega_{{\rm sgn}\left(F-\frac12\right)}(u)\right. \\
\left. + \frac{1}{\nu}\sum_{p=1}^{\left[\!\left| {\nu}/2 \right|\!\right]} K_1\left[2mr\sin(p\pi/\nu)\right] \,\frac{\sin[(2F-1)p\pi]}{\sin^2(p\pi/\nu)}
- \frac{1}{4N} K_1\left(2mr\right)
\sin[(2F-1)N\pi]\, \delta_{\nu, \, 2N}\right\},
\end{multline}
where $\Omega_{\pm 1}(u)$ is given by \eqref{5.10}; certainly the same expressions are valid at $\nu > 1$ and
$\frac{1}{2\nu} < |F-\frac12| < \frac12$. In the case of the vanishing string tension, the expressions are simplified:
\begin{multline}\label{c6}
\left.j_\varphi(r)\right|_{r_0=0, \, \nu=1, \, F\neq 1/2} = \frac{m^2}{\pi^3}\,{\rm sgn}\left(F-\frac12\right)\sin(F\pi)\int\limits_1^\infty \frac{dv}{v^2\sqrt{v^2-1}} \, K_2\left(2mrv\right) \\
\times\cosh\left[\left(|2F - 1| -1 \right){\rm arccosh}
v \right]
\end{multline}
and
\begin{multline}\label{c7}
\left.B_I(r)\right|_{r_0=0, \, \nu=1, \, F\neq 1/2} = \frac{e \nu m}{2\pi^3 r}\,{\rm sgn}\left(F-\frac12\right)\sin(F\pi)\int\limits_1^\infty \frac{dv}{v^3\sqrt{v^2-1}} \, K_1\left(2mrv\right) \\
\times\cosh\left[\left(|2F - 1| -1 \right){\rm arccosh}
v \right].
\end{multline}
Turning to the case of $F = 1/2$, we foremost note that a bound state with energy $E_{BS}^{(s)} = \frac{\tau_s - \tau_s^{-1}}{\tau_s + \tau_s^{-1}} m_3$ in the gap between the continuums emerges in section $z={\rm const}$ at $\tau_s < 0$ in addition to the continuous spectrum,
\begin{equation}\label{c8}
\left( \begin{array}{c} f_{n_{\rm c}^{(s)}}^{(BS)(s)} \vphantom{\int\limits_0^0}\\
g_{n_{\rm c}^{(s)}}^{(BS)(s)}
\end{array}
\right) = - \frac{1}{\tau_s + \tau_s^{-1}} \sqrt{\frac{2 \nu m_3}{\pi r}}
\left( \begin{array}{c} \sqrt{-\tau_s} \\
\sqrt{-\tau_s^{-1}} \end{array} \right)
{\rm exp}\left(\frac{2m_3 r}{\tau_s + \tau_s^{-1}}\right).
\end{equation}
We use \eqref{b7} and \eqref{b13}, note that terms in the sums over $l$ vanish in the $r_0\rightarrow0$ limit due to the vanishing of ${C}_{\nu l+\frac12}^{(s)}$ \eqref{b4}, and take this limit in the remaining terms. Summing the contribution of all modes over $s$, we obtain
\begin{multline}\label{c9}
\left.j_{\varphi}(r)\right|_{r_0 = 0, \, F=1/2}=\frac{1}{\pi^2} \sum_{s = \pm 1} s \Biggl\{{\rm sgn}\left(1-\tau_{s}^2\right)\frac{m^2}{(\tau_{s}^{-1}+\tau_{s})^2}\left[\frac{|\tau_{s}^{-1}+\tau_{s}|}{4m r}K_1\left(\frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}\right) \right.\Biggr. \\
\left. + K_0\left(\frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}\right)\right] + \frac{1}{4\pi}(\tau_{s}^{-1}-\tau_{s})\int\limits_{m}^{\infty}dq q {\rm e}^{- 2 q r}\Biggl[K\left(1-m^2/q^2\right)\Biggr.\\
\left.\left. - \left(\frac{1+\tau_s^2}{1-\tau_s^2}\right)^2 \Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1 - m^2/q^2\right)\right]\right\}
\end{multline}
and
\begin{multline}\label{c10}
\left.B_{I}(r)\right|_{r_0 = 0, \, F=1/2}= \frac{e \nu}{(2\pi)^2} \sum_{s = \pm 1} s \Biggl\{ {\rm sgn}\left(1-\tau_{s}^2\right)\frac{m}{|\tau_{s}^{-1}+\tau_{s}|}\left[\frac{1}{r}K_1\left(\frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}\right) \right.\Biggr. \\
\left. - \int\limits_{r}^{\infty}\frac{dr'}{{r'}^2}K_1\left(\frac{4m r'}{|\tau_{s}^{-1}+\tau_{s}|}\right)\right] + \frac{1}{\pi}(\tau_{s}^{-1}-\tau_s)\int\limits_{m}^{\infty}dq q \Gamma(0, 2qr)\Biggl[K\left(1-m^2/q^2\right)\Biggr.\\
\Biggl.\left. - \left(\frac{1+\tau_s^2}{1-\tau_s^2}\right)^2 \Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1 - m^2/q^2\right)\right]\Biggr\},
\end{multline}
where $K(m)$ and $
\Pi(n; m)$ are the complete elliptic integrals of the first and third kinds.
Note that \eqref{c9} and \eqref{c10}, in contrast to \eqref{c4} and \eqref{c5}, depend on $\tau_s$ and hence on $\varphi$ and $z$ in general.
Thus, it is of no surprise that the results in the case of the infinitely thin cosmic string are discontinuous at $F = 1/2$,
\footnote{This is distinct from the case of the quantum charged scalar matter field under the Dirichlet boundary condition, when the current and the magnetic field strength that are induced in the vacuum by the infinitely thin cosmic string are continuous and vanishing at $F=1/2$, see \cite{SiB1,SiB2,SiV9}.} see \eqref{4.20} and \eqref{4.21},
\begin{equation}\label{c11}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
j_\varphi(r)\right|_{r_0=0, \, F\neq 1/2}\!=
\pm \frac{1}{2 (2\pi)^{2}r^2} \left(1+2mr\right){\rm e}^{-2mr}
\end{equation}
and
\begin{equation}\label{c12}
\left.\lim_{F\rightarrow (1/2)_{\pm}}
B_I(r)\right|_{r_0=0, \, F\neq 1/2}\!=
\pm \frac{e \nu}{(4\pi)^{2}r^2} \left[\left(1+2mr\right){\rm e}^{-2mr} - (2mr)^2 \Gamma(0,2mr)\right];
\end{equation}
the discontinuity is independent of $\nu$ for
$\left.j_\varphi(r)\right|_{r_0=0, \, F\neq 1/2}$ and is linear in $\nu$ for $\left.B_I(r)\right|_{r_0=0, \, F\neq 1/2}$.
Note also that $\left.j^{(s)}_\varphi(r)\right|_{r_0=0, \, F = 1/2}$ and $\left.B^{(s)}_I(r)\right|_{r_0=0, \, F = 1/2}$, vanishing at $\tau_s=1$, increase monotonically in absolute value as $\tau_s$ departs from this value. Their maximal absolute values for $\tau_s > 0$ are reached at $\tau_s^{-1} = 0$ or $\tau_s = 0$, being equal to
\begin{equation}\label{c13}
\lim_{\ln |\tau_s |^s \rightarrow \mp \infty}\left.j^{(s)}_\varphi(r)\right|_{r_0=0, \, F = 1/2} \!=\left.\lim_{F\rightarrow (1/2)_{\pm}}
j^{(s)}_\varphi(r)\right|_{r_0=0, F\neq 1/2}\!=
\pm \frac{1}{(4\pi)^{2}r^2} \left(1+2mr\right){\rm e}^{-2mr}
\end{equation}
and
\begin{multline}\label{c14}
\lim_{\ln |\tau_s |^s \rightarrow \mp \infty}\left.B^{(s)}_I(r)\right|_{r_0=0, \, F = 1/2}\!=
\left.\lim_{F\rightarrow (1/2)_{\pm}}
B^{(s)}_I(r)\right|_{r_0=0, F\neq 1/2} \\
= \pm \frac{e \nu}{2 (4\pi)^{2}r^2} \left[\left(1+2mr\right){\rm e}^{-2mr} - (2mr)^2 \Gamma(0,2mr)\right].
\end{multline}
The increase in absolute value persists further for
$\tau_s < 0$, reaching the maximum at $\tau_s=-1$,
\begin{equation}\label{c15}
\left.\lim_{(-\tau_s)^s \rightarrow 1_{\mp}}
j^{(s)}_\varphi(r)\right|_{r_0=0, \, F = 1/2}\!=
\pm \frac{m}{(2\pi)^{2}r} \left[K_1\left(2mr\right) + 2mr K_0\left(2mr\right)\right]
\end{equation}
and
\begin{equation}\label{c16}
\left.\lim_{(-\tau_s)^s \rightarrow 1_{\mp}}
B^{(s)}_I(r)\right|_{r_0=0, \, F = 1/2}\!=
\pm \frac{e \nu m}{2 (2\pi)^{2}r} \left[K_1\left(2mr\right) + 2mr \int\limits_r^\infty \frac{dr'}{r'} K_0\left(2mr'\right)\right].
\end{equation}
Turning now to the temporal component of the induced vacuum current in the $r_0 = 0$ case, we note that, as a consequence of \eqref{c1}, it vanishes at $F \neq 1/2$. Since quantity
$$
\lim_{r_0\rightarrow 0}\left({\tilde C}^{(\vee)}_{1/2} - {\tilde C}^{(\wedge)}_{1/2}\right) = \lim_{r_0\rightarrow 0}\left({C}^{(\vee)}_{1/2} - {C}^{(\wedge)}_{1/2}\right)
$$
is nonvanishing, we obtain
\begin{multline}\label{c17}
\left.j^{0}(r)\right|_{r_0 = 0, \, F=1/2} =
\frac{\nu}{(2\pi)^2 r} \sum_{s = \pm 1}
\Biggl\{\frac{\tau_{s}^{-1}-\tau_{s}}{8 r^2}
\left(1 +2 m r\right) \, {\rm e}^{-2m r} \Biggr. \\
- \frac{m}{2 r}{\rm sgn}\left(\tau_{s}^{-1}-\tau_{s}\right)\left[K_1\left(\frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}\right) + \frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}K_0\left(\frac{4m r}{|\tau_{s}^{-1}+\tau_{s}|}\right)\right] \\
- (\tau_{s}^{-2}-\tau_{s}^2)\int\limits_{m}^{\infty}dq q {\rm e}^{-2q r}\Biggl[K\left(1-m^2/q^2\right)\Biggr.\\
\Biggl.\left. - \left(\frac{1+\tau_s^2}{1-\tau_s^2}\right)^2 \Pi\left(-\frac{4(1-m^2/q^2)}{(\tau_{s}^{-1}-\tau_s)^2}; 1 - m^2/q^2\right)\right]\Biggr\}.
\end{multline}
Note also relations [cf. \eqref{b9}, \eqref{c13}, and \eqref{c15}]
\begin{equation}\label{c18}
\left.j^{0 (s)}(r)\right|_{F = 1/2, \, \tau_s =1}\!= 0,
\end{equation}
\begin{equation}\label{c19}
\left.\lim_{\ln |\tau_s |^s \rightarrow \mp \infty}
j^{0 (s)}(r)\right|_{r_0=0, \, F = 1/2}\!=
\pm \frac{s \nu}{2 \pi^{3}r} \int\limits_{m}^{\infty}dq q {\rm e}^{- 2 q r} E\left(1-m^2/q^2\right),
\end{equation}
where
$$
E(m)=\int\limits_{0}^{1}dt \sqrt{\frac{1-m t^2}{1-t^2}}
$$
is the complete elliptic integral of the second kind, see \cite{Abra}, and
\begin{equation}\label{c20}
\left.\lim_{(-\tau_s)^s \rightarrow 1_{\mp}}
j^{0 (s)}(r)\right|_{r_0=0, \, F = 1/2}\!=
\pm \frac{s \nu m}{(2\pi)^{2}r^2} \left[K_1\left(2mr\right) + 2mr K_0\left(2mr\right)\right].
\end{equation}
|
\section{Introduction}
Strontium Ruthenate, \ce{Sr2RuO4}, has played a leading role in discussions of unconventional superconductivity since its discovery almost three decades ago\cite{maeno_superconductivity_1994,Mackenziereview,Sigrist2005,Maenoreview,Kallin2012,Mackenzie2017}. Much of the interest in the community centered on the possibility of chiral $p$-wave pairing, but the compound has also attracted attention simply because of its structural similarity to the cuprates, Fermi liquid behavior at low temperatures, and the availability of very clean samples with high quality surfaces.
Recently, several new experimental results\cite{Pustogow19,ghosh2020thermodynamic,benhabib2020jump,grinenko2020split} have called into question the NMR results
on which the traditional triplet pairing scenario was based\cite{Ishida98_wrong}, providing evidence for spin-singlet rather than triplet pairing and leading to a renaissance in the quest to identify the exact pairing state of this fascinating material.
In principle, direct measurement of the superconducting gap by, e.g., Angular Resolved Photoemission Spectroscopy (ARPES), could provide important guidance, as it did in the cuprates.
However the energy scales involved, such as the transition temperature of only 1.5K in \ce{Sr2RuO4}, or the temperature at which the metamagnetic transitions in \ce{Sr3Ru2O7} occur, are beyond the capabilities of current ARPES instruments. STM is a more appropriate tool, which due to its very high energy resolution that can be achieved at low temperatures and the ability to obtain information about the momentum- and phase-resolved structure of the superconducting gap through quasiparticle interference (QPI) imaging\cite{hoffman_imaging_2002,hanaguri_coherence_2009} promises to resolve the most pressing questions about the superconducting properties of \ce{Sr2RuO4}.
Significant progress has recently been made towards achieving this goal.
The electronic structure in the bulk of \ce{Sr2RuO4} near the Fermi energy is well-known to consist of weakly hybridized 1D sheets ($\alpha$ and $\beta$) of $d_{xz/yz}$ character, as well as a 2D $d_{xy}$ sheet ($\gamma$) that hybridizes with both. The $\gamma$-band has a van-Hove singularity which in the bulk is $\sim 14\,\mathrm{meV}$ above the Fermi energy\cite{shen_evolution_2007}, but whose energy depends sensitively on small structural changes \cite{Sunko2019} with significant consequences for the superconductivity\cite{steppke_strong_2017}. This van Hove singularity plays not only an important role in the properties of \ce{Sr2RuO4}, but also of the bilayer and trilayer ruthenates, where the van-Hove singularity has been suggested to be the origin of the metamagnetic behaviour\cite{binz_metamagnetism_2004}.
\begin{figure*}
\begin{center}
\includegraphics[width=\linewidth]{Figure1}
\end{center}
\caption{\textbf{Electron tunneling and nematicity at the surface of \ce{Sr2RuO4}.} (a) The out-of-plane symmetry of a $d_{yz}$ orbital suggests a high probability of electron tunneling from a metallic tip and significant contribution to the tunneling current. For an in-plane atomic orbital, such as $d_{xy}$, the overlap with the tip orbitals is small, suggesting negligible contribution. (b) High-resolution differential conductance (d$I$/d$V$) spectrum at $T=76\mathrm{mK}$, showing the characteristic gap-like structure at the surface of \ce{Sr2RuO4} ($V_\mathrm{set} =8 \mathrm{mV}$, $I_\mathrm{set}=500.2 \mathrm{pA}$, $V_\mathrm{L} =155 \mu\mathrm{V}$). Four peaks can be clearly identified which are associated with the $d_{xy}$-derived $\gamma$-band\cite{Marques2020}. (c) Sketch of the structure of the reconstructed surface of \ce{Sr2RuO4} with RuO$_6$ octahedra rotated by the angle $\vartheta=6^\circ$. The experimentally observed checkerboard charge order (right hand side) is equivalent to the breaking of $C_4$-symmetry rendering the two Sr atoms (dark blue and light blue) and oxygen bonds along the horizontal and vertical direction inequivalent (indicated by orange and yellow circles)\cite{Marques2020}. This symmetry breaking is described by a nematic order with $d_{x^2-y^2}$ symmetry ($\Delta_\mathrm{nem}$, red and blue indicate positive and negative sign, respectively, of the order parameter). The checkerboard charge order can be accounted for either through an additional staggered bond-centred order ($\Delta_\mathrm{bond}$, colors as for the nematic order parameter), or through a staggered on-site order with different on-site energies for the $d_{xy}$ band at Ru(1) and Ru(2).}
\label{fig1}
\end{figure*}
In STM measurements, the situation has been less clear, and not all bands found in the bulk have been detected so far: Firmo et al.\cite{Firmo2013} argued that
the gap observed in tunneling corresponds to that on the 1D $d_{xz}/d_{yz}$ bands,
with the $d_{xy}$ band not contributing to tunneling spectra but still exhibiting a sizeable gap due to proximity coupling. Tunneling to the STM tip is argued to happen primarily due to the $d_{xz}/d_{yz}$ states in the sample, with the justification that $d_{xy}$ states associated with the $\gamma$-band have lobes that lie in the plane, while $d_{xz}/d_{yz}$ states have lobes pointing out of the surface plane towards the tip (see also Fig.~\ref{fig1}(a)).
Similarly, in recent QPI experiments in the normal state of \ce{Sr2RuO4}, the observed patterns were attributed to bands with $d_{xz}$ and $d_{yz}$ character\cite{Wang2017}. The expected Bogoliubov-QPI in \ce{Sr2RuO4} for a chiral order parameter has been
previously investigated theoretically within a lattice Green's function framework that neglected
the surface reconstruction and effect of the tunneling matrix elements\cite{Akbari2013}. A recent attempt to characterize the momentum-space structure of the superconducting gap was made by Sharma et al.\cite{Sharma20}, who propose that their data was consistent with $d$-wave pairing and the signal from QPI due to the $d_{xz}$/$d_{yz}$ bands.
These results thus all raise the question what the role of the $\gamma$ sheet is which has escaped detection in STM experiments so far. Detection of the $\gamma$ band will allow one to to decide how large the gap is on this sheet, and understand whether it arises only from coupling to the $\alpha$ and $\beta$ bands as argued in Ref.~\onlinecite{Firmo2013}, or whether the STM tip is simply insensitive to states of $d_{xy}$-character\cite{Wang2017, Sharma20}. Recent STM experiments report signatures of the $d_{xy}$ band in tunneling spectra \cite{Marques2020} (Fig.~\ref{fig1}(b)) and an apparent absence of the superconducting gap, raising important questions about its role in superconductivity.
Understanding and reconciling these seemingly contradictory interpretations is of primary importance in the effort to understand the QPI in this material and ultimately determine the momentum space structure of the superconducting gap in \ce{Sr2RuO4}.
An important aspect of studies of clean surfaces of \ce{Sr2RuO4} is the surface reconstruction, which arises as a spontaneous rotation of the RuO$_6$ octahedra similar to the crystal structure in the bulk of \ce{Sr3Ru2O7}\cite{matzdorf_ferromagnetism_2000}. This reconstruction has recently been shown to influence QPI patterns on \ce{Sr2RuO4}, and is possibly relevant for the low-energy electronic structure\cite{Wang2017,Marques2020}.
Here we resolve the mystery of the seeming absence of the $\gamma$-band from tunneling spectroscopy through combination of a phenomenological model of the low energy electronic structure with ab-initio calculations of the tunneling matrix elements and ultra-low temperature scanning tunneling microscopy experiments. Our results demonstrate QPI of the $\gamma$-band and settle the normal state electronic structure and QPI in the surface layer of \ce{Sr2RuO4} and thus provide a reference for modelling of the superconducting QPI.
We show that for the unreconstructed surface tunneling into $d_{xy}$ states is suppressed primarily due to the alternating character of the Bloch $d_{xy}$ function at momenta near the van Hove point, and to a lesser extent due to the weaker extension of this Wannier function in the $z$ direction. In the case of the reconstructed surface, we find that the amplitude of the $d_{xy}$ tunneling is enhanced due to an admixture of $d_{z^2}$ orbital character mediated by the rotation of the oxygen octahedra.
\section{Results}
\subsection{Open questions - coupling to $d_{xy}$ states and emergent orders}
As discussed in the introduction, we begin with the premise that understanding the QPI in the normal state \cite{Wang2017,Sharma20,Marques2020} will be essential to identification of the symmetry and structure of the superconducting gap in \ce{Sr2RuO4} by STM. There are several features of the measured patterns that are challenging to interpret. The first is the dramatic suppression of the features in the measured spectrum that originate from bands with dominant $d_{xy}$ orbital content, compared to a calculation of $N(\bf q,\omega)$ using the lattice Green's function with bulk electronic bands as done in Refs. \cite{Wang2017,Sharma20}, where QPI was modelled by ignoring any $d_{xy}$ contribution to the trace and hence density of states.
This suppression of scattering features associated with the $\gamma$-band has been discussed in terms of $d_{xy}$ orbitals coupling weakly to the tip due to the location of their lobes in the $xy$ plane\cite{Firmo2013}, or to orbital-selective decoherence of these orbitals\cite{RomerPRL}. As a practical matter, QPI data has often been analyzed simply ignoring $d_{xy}$ contributions \cite{Wang2017}, which seems to work up to a point. Nevertheless, there are $\bf q$-peaks observed in these patterns that correspond to scattering from Fermi surface points close to the van Hove singularities dominated by $d_{xy}$ states\cite{Marques2020}, so a complete theory needs to account for these features as well.
A second set of puzzles is associated with the checkerboard charge order and associated nematicity of the \ce{Sr2RuO4} surface\cite{Marques2020}. The phenomena associated with these include a chirality of impurity states emanating from defects on different sublattices, and the bias dependence of the intensity of the atomic peaks. While these have been definitively associated with the reconstructed surface, their origin is unclear. Here we show that all these phenomena can be explained in a natural way with a combination of two types of coexisting orders, a nematic order and a staggered bond order, and by accounting for the vacuum tail of the involved electronic states.
\subsection{Tight-binding model}
We start from a model constructed from Wannier functions of the three Ru orbitals $d_{xz},d_{yz}$ and $d_{xy}$ which have been established as the relevant electronic states in the normal state Fermi surface of \ce{Sr2RuO4} by ARPES experiments~\cite{Tamai2019,Veenstra2014,Haverkort08,Zabolotnyy13}.
The surface Wannier states and the corresponding tight binding model are obtained from an ab-initio calculation (see Methods section
for additional information).
The lattice Hamiltonian is given by
\begin{equation}
H_0=\sum_{\mathbf{R},\mathbf{R}'}\sum_{\alpha\beta} t_{\mathbf{R},\mathbf{R}'}^{\alpha \beta} c_{\mathbf{R},\alpha}^\dagger c_{\mathbf{R}',\beta}^{\phantom{\dagger}},
\label{H_0}
\end{equation}
where $t_{\mathbf{R},\mathbf{R}'}^{\alpha \beta}$ are hopping elements between the elementary cells described by the vectors $\mathbf{R}$ and $\mathbf{R}'$. See Supplementary Note 1 and Supplementary Fig.~1 for a plot of the band structure and Supplementary Note 2 and Supplementary Fig.~2 for a discussion of the Wannier functions. $\alpha$ and $\beta$ are combined orbital and spin indices, the chemical potential enters as an on-site term and spin-orbit coupling has been added as (complex-valued) onsite terms to represent $H_{\mathrm{SOC}}=\lambda \mathbf{L}\cdot \mathbf{S}$ in the usual way, see Methods section
for details.
\subsection{Nematicity and checkerboard charge order}
Unlike theoretical models for bulk \ce{Sr2RuO4}, the surface reconstruction requires adoption of an elementary cell with two Ru atoms to describe the surface electronic structure as observed in STM and ARPES experiments. Therefore, we work in a basis that contains 6 Wannier states per spin, three of them centered at Ru(1) and three at Ru(2), see Fig.~\ref{fig1}(c). As suggested by the crystal structure of the related material \ce{Sr3Ru2O7}, in the surface layer the oxygen octahedra around Ru(1) atoms rotate anticlockwise and clockwise around Ru(2) (details on the resulting crystallographic structure are given in Appendix \ref{app_dft}),
giving rise to the reconstructed surface and yielding qualitatively different tunneling properties as we discuss later.
To fully describe the low energy electronic structure, two order parameters are required: a nematic term and a term describing the checkerboard charge order observed experimentally.
Such terms could in principle be understood from microscopic models as instabilities of the electronic structure as worked out for the related material \ce{Sr3Ru2O7}\cite{Raghu2009,Lee2009,Puetter2010} and do modify hopping amplitudes of the $d_{xy}$ orbital.
The nematic term affects the nearest neighbor (NN) hopping between Ru atoms. To describe the checkerboard charge order, we introduce a staggered bond order on the next nearest neighbor (NNN) hopping terms between Ru atoms, see Fig.~\ref{fig1}(c).
The symmetry properties of the two orders are identical once the
octahedral rotation is present in the reconstructed surface layer\cite{Marques2020}.
The explicit form of the Bloch Hamiltonian as $6\times 6$ matrix is not convenient to discuss at this point since the two sublattice basis already breaks the $C_4$ symmetry. We therefore discuss the symmetries in real space: The NN nematic term is of $d_{x^2-y^2}$ symmetry (see Appendix \ref{app_nem})
and induces a positive shift of the hopping amplitude along [0,1] (red ellipse connecting NN Ru atoms) and a negative shift of the hopping amplitude along [1,0] (blue ellipses) of amplitude $\pm \Delta_{\mathrm{nem}}$, preserving the translational symmetry between the Ru(1) and Ru(2) atoms.
\begin{figure*}
\begin{center}
\includegraphics[width=\linewidth]{Figure2}
\end{center}
\caption{\textbf{Tunneling probabilities and the surface reconstruction.} (a) Calculated cross sections in the $xy$ plane 5\AA{} above the unreconstructed \ce{Sr2RuO4} surface of $d_{xz}$ and $d_{xy}$ Wannier functions. (b) Same, but for reconstructed surface in the presence of $\vartheta=6^\circ$ O-octahedron rotation. Black dot represents the position of the Ru(1) atom, gray dots the neighboring Ru(1) atoms and light red dots the Ru(2) atoms. (c) DFT band structure for the reconstructed surface with $\vartheta=6^\circ$ employed in this work, with $d_{z^2}$ orbital weight highlighted in blue. The right panel shows the projected $d_{z^2}$ density of states for $\vartheta=6^\circ$ as in the panel on the left, as well as for $\vartheta=3^\circ$ and $0^\circ$ (red, yellow). (d) Lattice density of states from model described in text (black: total; blue: $d_{xy}$ on the Ru(1) and Ru(2) atoms exhibiting peaks at the positions marked with arrows, green: $d_{xz/yz}$ (approximately fourfold degenerate) with only tiny structure within the energy range shown) (e) Continuum density of states evaluated 5\AA{} above the surface above the two inequivalent Ru atoms and above the two inequivalent Sr atoms, see inset. Solid lines show result using Wannier functions with octahedral rotation and exhibit features at the peaks of the $d_{xy}$ lattice DOS, while a calculation using Wannier functions without octahedral rotation yields a completely flat cLDOS above the Ru positions within this energy range.}
\label{Fig:Wannier}
\end{figure*}
The maximum contrast of the checkerboard pattern is on the Sr atoms,\cite{Marques2020} suggesting that it is linked to the second-nearest neighbour (NNN) hopping parameter in the tightbinding model, motivating a description through a staggered bond order (see Fig.~\ref{fig1}(c)). This NNN bond order breaks the translational symmetry on the Ru lattice, introducing a staggered next-nearest-neighbour interaction which is alternatingly strengthened and reduced by $\Delta_\mathrm{bond}$. The effect of the nematic and staggered bond order terms on the low energy electronic structure is comparable to the staggered on-site order proposed in Ref.~\onlinecite{Marques2020} and yields
four van Hove singularities in the density of states, see Fig.~\ref{Fig:Wannier}(d), very similar to the spectral features observed in tunneling, see Fig.~\ref{fig1} (b). The resulting electronic structure is shown in Suppl. Fig. 1/Suppl. Note 1. A description of the checkerboard charge order by the staggered on-site order yields similar results. We use the staggered bond order for the rest of the main text, but show key results for the staggered on-site order in Supplementary Note~3 and Supplementary Fig.~3.
\subsection{Tunneling into $d_{xy}$ states}
In Fig. \ref{Fig:Wannier}(a), we plot cuts through the Wannier functions obtained via downfolding a DFT calculation of the unreconstructed surface of \ce{Sr2RuO4} onto a low-energy band structure consisting of three $d$-orbitals. The full isosurfaces of these rather complicated functions are shown in Supplementary Fig.~2, but at the location of the STM tip, some $4-5\text{\AA}$ above the SrO surface plane, they resemble atomic $d$-orbitals. Note that the $d_{xz}$ Wannier function has one maximum roughly half way to the NN Ru atomic positions and the $d_{xy}$ Wannier function is much smaller in magnitude and vanishes by symmetry above the NN Ru atom. The octahedral rotation in the surface layer leads to a number of important changes in the electronic states associated with the $d_{xy}$ band: (1) the van Hove singularity in the $d_{xy}$ band shifts below the Fermi energy, (2) the $d_{xy}$ band acquires $d_{z^2}$ character with increased octahedral rotation and (3) the Wannier functions in the vacuum become chiral, with opposite chirality on Ru(1) and Ru(2) atoms. In Fig.~\ref{Fig:Wannier}(b), we show how the Wannier functions appear at the tip position in the presence of a 6$^\circ$ octahedral rotation. While the $d_{xz,yz}$ states are not qualitatively altered, the Wannier functions associated with the $\gamma$ band acquire a chiral character such that they no longer vanish above the NN Ru positions (light red dot). The Wannier functions shown correspond to a Ru(2) position, with the function associated with Ru(1) having the opposite chirality. Fig.~\ref{Fig:Wannier}(c) shows the electronic structure for an octahedral rotation of $\vartheta=6^\circ$ and the projected density of states for different octahedral rotations. The van-Hove singularity in the $d_{xy}$-derived $\gamma$ band has moved across the Fermi level compared to the unrotated case and has acquired a significant $d_{z^2}$ character, especially close to the M point, as a consequence of the octahedral rotation. The van-Hove singularity at the M point does not have any $d_{z^2}$ character in its projected density of states (PDOS) without rotation. These findings do not change in a fully relativistic ab-initio calculation. It is through this admixture of $d_{z^2}$ character with the octahedral rotation that tunneling into the $\gamma$ band is facilitated and gives rise to peaks in the cLDOS from the vHss. These are absent when employing Wannier functions obtained without oxygen rotation (dashed lines in Fig. \ref{Fig:Wannier}(e)).
\begin{figure}
\begin{center}
\includegraphics[width=\linewidth]{Figure3}
\end{center}
\caption{\textbf{Tunneling probabilities at different tip-sample distances.} (a) Partial norm of the Wannier functions at fixed height $z$ showing the large values close to the atoms and the exponential decay in the vacuum. While the O octahedron rotation has negligible influence on the norm of the Wannier orbitals associated with the $d_{xz/yz}$ bands, it enhances the value of the Wannier orbital associated with the $\gamma$ band, which has predominantly $d_{xy}$ character, significantly, and also increases the decay length in $|W|^2\propto \exp(-z/\alpha)$ from $\alpha_{xy}=1.9\,\text{\AA}$ to $\alpha_{xy}=2.2\,\text{\AA}$. (b) Surface geometry of Sr$_2$RuO$_4$ with the Ru and O atoms on the surface at $z\approx 0$ (green and red dottet lines for these planes) and the STM tip approximately 5\AA{} above (black dashed line).
}
\label{Fig_wannier_decay}
\end{figure}
As a rough estimate of possible tunneling contributions, we plot in Fig.~\ref{Fig_wannier_decay}(a) the square of the Wannier function integrated over the $x-y$ plane, $|W|^2$, as a function of $z$, corresponding to the tip height in a tunneling experiment.
Once sufficiently away from the surface, for $z>2\text{\AA}$, the Wannier functions show the expected exponential decay, i.e. $|W|^2\propto \exp(-z/\alpha)$.
For the case without octahedral rotation, the $d_{xy}$ weight in vacuum at values of $z$ relevant for tunneling (assumed here to be typically at $5\text{\AA{}}$ above the surface, but the exact height is irrelevant for our analysis) is an order of magnitude smaller than the weight of $d_{xz,yz}$, as anticipated in Firmo et al.\cite{Firmo2013} However, once the octahedral rotation is considered, the weight of the $d_{xy}$ orbital is only about 3 times smaller and exhibits a decay length which is $10\%$ larger compared to the $d_{xz/yz}$ orbitals (decay length $\alpha_{xy}=2.2 \text{\AA}$ vs. $\alpha_{xz,yz}=2.0 \text{\AA{}}$). The decay length for the $d_{xy}$ orbital thus changes from a value smaller than that of the $d_{xz,yz}$ orbitals to a larger value due to the rotation.
The suppression of the vacuum overlap in the unreconstructed state alone is therefore not sufficient to explain the lack of most $d_{xy}$ features in QPI. We will show below that the $d_{xy}$ states contribute most strongly near the van Hove point, close to ${\bf k}=(\frac{1}{2},0)$, thus tunneling should be proportional to the value of the Wannier functions at the centre of the NN Ru atom. Without rotation of the oxygen octahedra, this is zero by symmetry, see Fig.~\ref{Fig:Wannier}(a), i.e. no tunneling is expected from states close to ${\bf k}=(\frac{1}{2},0)$. This is also seen by the absence of any features due to the vHs in the cLDOS when calculated without rotation of the oxygen octahedra, see Fig.~\ref{Fig:Wannier}(e).
\begin{figure}
\begin{center}
\includegraphics[width=\linewidth]{Figure4.pdf}
\end{center}
\caption{\textbf{Checkerboard charge order.} (a, b) Experimental differential conductance maps $g(\mathbf{r},V)$ taken at the energy of the vHs\cite{Marques2020} at (a) positive energy, $V=3.5\mathrm{mV}$ and (b) negative energy, $V=-3.5\mathrm{mV}$ at which the checkerboard order is most prominent ($T=59\mathrm{mK}$, $V_\mathrm{set}=7.0\mathrm{mV}$, $I_\mathrm{set}=250\mathrm{pA}$, $V_\mathrm{L}=495 \mathrm{\mu V}$). (c, d) cLDOS $\rho(\mathbf{r}, \epsilon)$ calculated at a height $z=5\text{\AA}$ above the surface at (c) $\epsilon=5\mathrm{meV}$ and (d) $\epsilon=-5\mathrm{meV}$. (e, f) calculated differential conductance map $\rho_\mathrm{t}(\mathbf{r},eV)$ at (e) $V=5\mathrm{mV}$ and (f) $V=-5\mathrm{mV}$, emulating the effect of the feedback loop of the STM (see main text) for $E_\mathrm{set}=10\mathrm{meV}$.
The intensity of all images has been normalized by the spatial average, color bars indicate relative intensity. Filled dark and light blue circles mark the positions of Sr atoms, black filled circles of the Ru atoms, as in Fig.~\ref{Fig:Wannier}(c). For experimental details, see Appendix \ref{app_stm}.}
\label{fig:checkerboard}
\end{figure}
\subsection{Checkerboard charge order}
In experiments, one of the most prominent features of the surface electronic structure is a pronounced Sr-centred checkerboard charge order, which in our model is accounted for through the staggered bond order. In Fig.~\ref{fig:checkerboard}(a) and (b) we show measured differential conductance maps at positive and negative bias voltages, respectively, in comparison to calculated maps (Fig.~\ref{fig:checkerboard}(c, d)) of the continuum local density of states at a constant height above the surface, fully accounting for the vacuum tail of the wave functions. The LDOS maps demonstrate that the staggered bond order indeed leads to a checkerboard charge order centred on the Sr atoms as found experimentally, and reproduces the contrast inversion between positive and negative bias voltages (compare Fig.~\ref{fig:checkerboard}(c, d)). A notable difference between the experimental and calculated maps is that the experimental data is dominated by the checkerboard charge order, whereas the calculated maps show the checkerboard charge order as a subdominant contribution superimposed to the atomic contrast. We attribute this difference between the experimental and calculated maps to the different treatment of the tip-sample distance: in our measurements, the tip-sample distance is set at each point independently to yield a constant current, whereas in the calculations shown in Fig.~\ref{fig:checkerboard}(c, d) the local density of states is taken at constant height. To faithfully reproduce the experimental data requires calculating differential conductance maps where the tip height is locally adjusted to maintain a constant integral $\int_0^{E_\mathrm{set}}\rho(E)\mathrm dE$, emulating the effect of the feedback loop of an STM regulating on a constant tunneling current before the spectrum is recorded. Such maps are shown in Fig.~\ref{fig:checkerboard}(e, f) for the same energies as in (c, d), showing a complete suppression of the atomic contrast. At positive bias voltages, we find excellent agreement between the calculated and measured differential conductance maps (Fig.~\ref{fig:checkerboard}(a, c)), whereas at negative bias voltage the agreement is not quite as good: The LDOS map in Fig.~\ref{fig:checkerboard}(d) reproduces the checkerboard charge order as seen experimentally, but the calculated differential conductance map (Fig.~\ref{fig:checkerboard}(f)) shows the dominant contrast on top of the ruthenium atoms. This difference is likely an artifact because the simulated tip-sample distance is significantly smaller than the one expected for the experiment.
The theoretically tractable tip-sample distances are limited due to technical reasons related to the accuracy of the Wannier functions at large distances, indications for quantitative changes are given by the (slightly) larger decay length of the $d_{xy}$ Wannier function.
Our results show that the setpoint effect, which is normally considered detrimental to the interpretation of spectroscopic maps, suppresses the atomic corrugation in the differential conductance maps. For the following comparison of the quasi-particle interference, we have verified that the main impact of the setpoint effect is a suppression of the atomic contrast in the differential conductance maps, otherwise not affecting the signal due to quasi-particle interference significantly. For comparison, we show in the supplementary material (Suppl. Fig. 3 and Suppl. Note 3) the calculations for the staggered onsite order, showing very similar results.
\begin{figure}[t]
\begin{center}
\includegraphics[width=\linewidth]{Figure5.pdf}
\end{center}
\caption{\textbf{Quasiparticle Interference.} Comparison of an experimental QPI map on the left ($V_\mathrm{set}=5.8\mathrm{mV}$, $I_\mathrm{set}=200\mathrm{pA}$, $T=600\mathrm{mK}$, $B=12\mathrm{T}$, aliased Fourier peaks have been suppressed for clarity) with the theoretically calculated QPI map on the top right obtained from Fourier transformation of the real-space continuum LDOS at $2\mathrm{meV}$, averaging over scattering patterns from both types of Ru impurities (see Suppl. Fig. 4 for real space patterns close to individual Ru-site defects, $V_\mathrm{imp}=+0.1\mathrm{eV}$, $z=5\text{\AA{}}$). The bottom right panel shows the orbital decomposition for the cLDOS calculations with red representing $d_{yz}$-, green $d_{xz}$- and blue $d_{xy}$-character.}
\label{fig3}
\end{figure}
\subsection{Quasiparticle Interference}
In order to provide a full picture of the low energy electronic structure around the Fermi energy, we use QPI imaging and compare our experimental QPI maps to the simulated continuum LDOS maps. Continuum LDOS maps in real space and simulated topographies exhibit chiral QPI patterns around Ru-site defects, as also found experimentally. The rotational sense of these patterns depends on the position of the defect in a Ru(1) or Ru(2) site (see Supplementary Fig.~4 and Supplementary Note 4). For comparison with the experiment, we average over both types of defects, as also the experimental data is acquired over fields of view with defects in both sites. Comparison of the simulated QPI, fully taking into account the tunneling matrix elements through the Wannier functions (for details on the method see Appendix \ref{app_wannier}),
reveals excellent overall agreement between experiment and theory (see Fig.~\ref{fig3}).
We note that the positions of features in $\mathbf{q}$-space deviate slightly between theory and experiment. For example the outer dominant ring-like structure is larger in the calculation. This is because the bare electronic structure from the first principles calculations does not to match exactly the true Fermi surface, a deviation which is not relevant for the following discussion. The key features are qualitatively consistent between theory and experiment: the outer square-shaped scattering from the quasi-1D bands, and the inner square coming from the scattering processes crossing the zone-boundary. At low $\mathbf{q}$-vectors, an intensity distribution with $C_2$ symmetry is seen which is reproduced in the calculation.
As pointed out previously\cite{Wang2017}, the appearance of spectral weight in some parts of the BZ can only be understood accounting for the surface reconstruction; these are essentially the structures parallel to $\mathbf{q}_x$ and $\mathbf{q}_y$ in Fig.~\ref{fig3}, which can be traced back to bands with predominantly $d_{xz}$/$d_{yz}$ character (see also orbital decomposition in fig.~\ref{fig3}). By contrast, as can be seen in Fig.~\ref{fig3} there are scattering processes close to the atomic and reconstruction peaks associated with the $d_{xy}$-derived $\gamma$-band, the band which exhibits the van Hove singularity close to the Fermi energy.
In the following, we will use the model calculations to establish the signatures of the $\gamma$-band and the van-Hove singularity in QPI.
\begin{figure*}[th!]
\begin{center}
\includegraphics[width=\linewidth]{Figure6}
\end{center}
\caption{\textbf{QPI close to the atomic peaks.} (a) Fermi surface from the model with surface reconstruction. The color represents the orbital character of the bands, with $d_{xz}$/$d_{yz}$ character shown in green/red, respectively and $d_{xy}$ character in blue. The grey arrow indicates the $\mathbf{q}$-vector connecting the tips of the pockets ofthe $\gamma$-band close to the van Hove singularity. The QPI dispersion from this $\mathbf{q}$-vector is expected near the atomic peaks. (b) Fourier transformation of a differential conductance map at $V=2.52 \mathrm{mV}$. QPI features due to the $\mathbf{q}$-vector shown in (a) (marked by an arrow) can be observed close to the Bragg peaks at $(1,0)$ (in units of $2\pi/a$). (c, d) Energy-momentum cuts through the QPI map along $\mathbf{q}_x$ (c) and $\mathbf{q}_y$ (d) close to $(1,0)$ and $(0,1)$. A clear dispersing feature is seen which collapses onto the atomic peak (white arrows). The dispersion differs in the $\mathbf{q}_x$ and $\mathbf{q}_y$ directions as a consequence of nematicity ($V_\mathrm{set}=5.6$ mV, $I_\mathrm{set}=225$ pA, $V_\mathrm{L}=300$ $\mu$V, $T=76$ mK, $B=6.5$ T). (e) Differential conductance $\tilde{g}(\mathbf{q}_\mathrm{at},V)$ for the atomic peaks $\mathbf{q}_\mathrm{at}=(1,0)$ and $(0,1)$, showing prominent features at $V=2\mathrm{mV}$ and $3\mathrm{mV}$ where the vHs crosses the zone boundary. (f, g) Corresponding energy-momentum cuts from the model along $\mathbf{q}_x$ (f) and $\mathbf{q}_y$ (g), showing the signatures of the dispersion of the scattering vectors associated with the $\gamma$ band around the atomic peaks. (h) As in (e), Local density of states $\tilde{\rho}(\mathbf{q}_\mathrm{at},E)$ at $\mathbf{q}_\mathrm{at}=(1,0)$ and $(0,1)$ as a function of $E$. As in the experimental data, two maxima are seen due to the vHs at the zone boundary.}
\label{fig4}
\end{figure*}
\subsubsection{QPI of the van Hove singularity}
The QPI signal of the $\gamma$-band and the vHs is dominated by scattering vectors connecting the tips of the constant energy contours close to the vHs. Due to the background near $q\rightarrow 0$ from the impurity distribution, the small $\mathbf{q}$ vectors connecting the tips near the vHs are difficult to detect reliably. We have identified two ways to still accurately detect the dispersion close to the vHs and determine the energy of the vHs: (1) the scattering vectors connecting the points of highest density of states include ones which cross the Brillouin zone, leading to QPI features around the atomic Bragg peaks, where the noise background is much lower. (2) At the van Hove singularity, the scattering vector becomes commensurate with the atomic contrast, resulting in a resonant enhancement of the atomic contrast when the energy becomes equal to that of the vHs.\\
Fig.~\ref{fig4}(a) shows the Fermi surface extracted from our tight-binding model, with one of the scattering vectors with high joint density of states connecting points near the van-Hove singularity leading to QPI around the atomic peaks. This scattering vector is already apparent from the QPI map as a feature in close proximity to the atomic peaks, see Fig.~\ref{fig4}(b). From line cuts through the three-dimensional energy-momentum data along the $\mathbf{q}_x$ and $\mathbf{q}_y$ direction, Fig.~\ref{fig4}(c, d), the dispersion of these peaks can be tracked. A clear hole-like dispersion is observed with a band maximum a few millivolts above the Fermi energy. Fig.~\ref{fig4}(f, g) show for comparison the same cuts obtained from the calculations. While the calculations exhibit more fine structure than seen in the experiment, the main feature of a hole-like dispersion around the atomic peak is faithfully reproduced. As expected from the nematicity of the electronic structure, the van-Hove singularities occur at slightly different energies along the $\mathbf{q}_x$- and $\mathbf{q}_y$- directions, providing an estimate of the magnitude of the nematic term $\Delta_\mathrm{nem}$ in the Hamiltonian.
The nematicity also leads to a pronounced anisotropy of the low-$q$ QPI. As a function of energy, the contributions from small $q$ scattering vectors crossing the zone boundary are expected to evolve according to the touching of the (reconstructed) bands. In real space, these correspond to interference patterns with long wavelength and rotation of the dominant wave vector as a function of energy, as noted in Ref. \onlinecite{Marques2020}. Calculated maps of the continuum LDOS confirm this feature and allow us to unequivocally assign it to tunneling into the $d_{xy}$-derived $\gamma$-band since the van Hove singularity responsible for this low-$q$ scattering occurs only in this orbital channel.
Notably, these results confirm our theoretical conjecture that the $\gamma$ band becomes detectable in tunneling, facilitated by the octahedral rotations.
The crossing of the QPI signal of the dispersion of the $\gamma$-band through the atomic peak seen in Fig.~\ref{fig4}(c, d) provides an alternative measure of the van Hove singularities in the electronic structure: at the energy of a vHs at the zone boundary, the quasi-particle scattering becomes commensurate with the atomic periodicity leading to a significant increase in the intensity of the atomic peaks in spectroscopic maps. In Fig.~\ref{fig4}(c, d), this becomes apparent as saturation of the contrast at distinct points along the $\mathbf{q}_\mathrm{at}=(1,0)$ and $(0,1)$ line. For clarity, we plot the energy dependence of the QPI signal $\tilde{g}(\mathbf{q}_\mathrm{at},V)$ as a function of energy $eV$ in Fig.~\ref{fig4}(e). Traditional (lattice-only) T-matrix calculations are unable to capture this feature because they exhibit the same periodicity as the Brillouin zone, and the QPI signal at the atomic peak is thus identical to the one at the zone centre. The continuum LDOS is able to describe this intensity modulation: in our calculations, the intensities of the atomic peaks at $\mathbf{q}_\mathrm{at}$ in maps of the LDOS $\tilde{\rho}(\mathbf{q},E)$ show sharp peaks when the $\gamma$ band crosses the zone boundary (compare Fig.~\ref{fig4}(h)), providing an alternative way to determine the energy of the van Hove singularities in the electronic structure without the necessity of undertaking a full QPI mapping.
\section{Discussion}
Our theoretical modelling and measurements provide a comprehensive picture of the low energy electronic structure of the surface layer of \ce{Sr2RuO4}, and identify clear signature of the $\gamma$-band in QPI with potential implications for its superconducting state. Quasi-particle interference of the $\gamma$-band which is predominantly of $d_{xy}$-character had hitherto been assumed to only contribute negligibly to the tunneling signal. Our measurements show a clear QPI signal from this band through comparison with theory.
From the calculations for a hypothetical unreconstructed surface, without octahedral rotation, we indeed find that tunneling to the $\gamma$ band would be about an order of magnitude smaller than for the $d_{xz}$ and $d_{yz}$ bands, leading to a negligible contribution to the tunneling conductance. The small tunneling probability is due to the real space properties of the $d_{xy}$ Wannier function and the oscillatory nature of the Bloch wave function near $\mathbf{k}=(\frac{1}{2},0)$.
In the reconstructed surface, the octahedral rotation leads to additional $d_{z^2}$ weight for the $\gamma$-band, making it accessible by QPI.
In summary we have identified the physical ingredients necessary to describe the electronic structure at the surface of \ce{Sr2RuO4} which include spin-orbit coupling, the nematic and staggered charge orders as well as the rotation of the oxygen octathedra. While the terms in the Hamiltonian outlined in detail in the Methods section can in principle be derived from a microscopic description, the effective parameters are subject to renormalizations due to the strongly correlated nature of the material.
Despite the excellent agreement we observe between the experimental data and theoretical modelling, one notable difference remains: while in tunneling spectroscopy the gap-like structure around the Fermi energy leads to a significant suppression of differential conductance by about $40\%$, this is not accurately captured in the calculation, where the suppression remains significantly smaller. This can have a number of origins, including that the calculations are carried out for smaller tip-sample distances than used in the experiments, potential additional relaxation of the surface layer in the $z$-direction and that a larger part of the Fermi surface becomes gapped out than is captured in the model. Nevertheless, our measurements clearly demonstrate that all three bands of the $t_{2g}$ manifold ($d_{xz}$, $d_{yz}$ and $d_{xy}$) which are expected to be present at the Fermi energy can be detected in QPI. We also note that our measurements, taken at 59 mK, do not show evidence of a superconducting gap. This is particularly surprising given that all three bands which contribute to the Fermi surface are clearly detected. The absence of spectral features from such a gap in many high-resolution STM experiments on the SrO-terminated surface of \ce{Sr2RuO4}\cite{kambara_scanning_2006, lupien_mk-stm_2011, Marques2020} remains an important open puzzle. One possibility highlighted by our analysis is that superconductivity is suppressed if the surface is reconstructed by octahedral rotation, as assumed here. It is conceivable that disorder, or other subtle surface effects, may lead to other reconstructions that do not suppress superconductivity -- calling for new ways to suppress the surface reconstruction, possibly through adsorbate layers to facilitate a detection of the superconducting gap in tunneling experiments and thus determination of the superconducting order parameter -- providing a resolution to the long-standing mystery of the symmetry of the superconducting order parameter in \ce{Sr2RuO4}.\\
|
\section{Introduction}
The {\it Juno} spacecraft recently found an ``anomaly'' in Jupiter's
tidal Love number: the measured $k_2=0.565\pm 0.006$ (Durante et
al.~2020) appears to be smaller than the theoretical hydrostatic value
$k_2^{\rm (hs)} =0.590$ (Wahl et al.~2020) by $4\%$. This discrepancy
may be explained in terms of dynamical tides, i.e., Jupiter's response
to the finite-frequency tidal forcings from the Galilean moons (Idini \&
Stevenson 2021). Here we present a simple calculation that explains
this Love number ``anomaly'' quantitatively. Naive expectation would
suggest a $1/(\omega_\alpha^2-\omega^2)$ enhancement (where
$\omega_\alpha$ is the f-mode frequency of the planet) of the tidal
response due to the finite tidal frequency ($\omega$) as compared to
the hydrostatic ($\omega=0$) response. The key to obtain the correct
answer is to treat the rotational (Coriolis) effect on the modes of a rotating
planet and their tidal responses in a self-consistent way. Our general
method also allows for efficient computation of high-order dynamical Love
numbers $k_{lm}$, as well as the inclusion of the contributions to
$k_{lm}$ from the inertial modes (due to planetary rotation) and g-modes (due to
stable stratification in the planetary interior).
\section{Dynamical Love Number and Normal Modes}
Consider a planet (mass $M$, radius $R$ and spin angular frequency $\Omega_s$)
orbited by a satellite (mass $M'$) in a circular
orbit with semi-major axis $a$ and orbital frequency $\Omega_{\rm orb}$. We assume the spin
axis is aligned with the orbital axis. In the frame corotating with the planet,
the $(lm)$-component of the tidal potential produced by $M'$ on the planet is
\begin{equation}
U({\bf r},t)
=-A_{lm}\,r^l\,Y_{lm}(\theta,\phi)\, e^{-i\omega t},
\label{eq:potential}
\end{equation}
where $A_{lm}=(GM'/a^{l+1})W_{lm}$ (with $W_{lm}$ a dimensionless constant;
$W_{lm}\neq 0$ when $l+m=$even),
${\bf r}=(r,\theta,\phi)$ specifies the position vector (in
spherical coordinates) measured from the center of the planet,
and
\begin{equation}
\omega=m(\Omega_{\rm orb}-\Omega_s)
\end{equation}
is the tidal forcing frequency. It suffices to consider only $m>0$.
The relevant non-zero tidal components are $(lm)=(2,2),(3,1),(3,3),(4,2),(4,4)$ etc.
The linear response of the planet to the tidal forcing
is specified by the Lagrangian displacement, ${\mbox{\boldmath $\xi$}}({\bf r},t)$, of a fluid element
from its unperturbed position. In the rotating frame of the planet, the
equation of motion takes the form
\begin{equation}
\frac{\partial^2 {\mbox{\boldmath $\xi$}}}{\partial t^2}+2{\bf \Omega}_s\times
\frac{\partial{\mbox{\boldmath $\xi$}}}{\partial t}+{{\bf C}}\cdot{\mbox{\boldmath $\xi$}}=-\nabla U,
\label{eq:eqnmotion2}
\end{equation}
where ${\bf C}$ is a self-adjoint operator (a function of the pressure and
gravity) acting on ${\mbox{\boldmath $\xi$}}$ (see, e.g., Friedman \& Schutz 1978).
A free mode of frequency $\omega_\alpha$ (in the rotating frame)
with ${\mbox{\boldmath $\xi$}}_\alpha({\bf r},t)={\mbox{\boldmath $\xi$}}_\alpha({\bf r})\,e^{-i\omega_\alpha t}\propto
e^{im\phi-i\omega_\alpha t}$ satisfies
\begin{equation}
-\omega_\alpha^2{\mbox{\boldmath $\xi$}}_\alpha-2i\omega_\alpha{\bf \Omega}_s\times{\mbox{\boldmath $\xi$}}_\alpha+{\bf C}\cdot
{\mbox{\boldmath $\xi$}}_\alpha=0,
\end{equation}
where $\{\alpha\}$ denotes the mode index, which includes the
azimuthal number $m$. We carry out phase-space mode expansion
(Schenk et al.~2002)
\begin{equation}
\left[\begin{array}{c}
{\mbox{\boldmath $\xi$}}\\
{\partial{\mbox{\boldmath $\xi$}}/\partial t}
\end{array}\right]
=\sum_\alpha c_\alpha(t)
\left[\begin{array}{c}
{\mbox{\boldmath $\xi$}}_\alpha({\bf r})\\
-i\omega_\alpha{\mbox{\boldmath $\xi$}}_\alpha({\bf r})
\end{array}\right].
\end{equation}
Using the orthogonality relation
$\langle{\mbox{\boldmath $\xi$}}_\alpha,2i{\bf \Omega}_s\times{\mbox{\boldmath $\xi$}}_{\alpha'}\rangle+
(\omega_\alpha+\omega_{\alpha'})\langle{\mbox{\boldmath $\xi$}}_\alpha,{\mbox{\boldmath $\xi$}}_{\alpha'}
\rangle=0$ (for $\alpha\neq \alpha'$), where
$\langle A,B\rangle\equiv\int\!d^3x\,\rho\, (A^\ast\cdot B)$,
we find (Lai \& Wu 2005)
\begin{equation}
{\dot c}_\alpha+i\omega_\alpha c_\alpha =
{i Q_{\alpha,lm}\over 2\varepsilon_\alpha}\, A_{lm}\, e^{-i\omega t},
\label{eq:adot}
\end{equation}
where
\begin{eqnarray}
&&Q_{\alpha,lm}\equiv\bigl\langle{\mbox{\boldmath $\xi$}}_\alpha,\nabla (r^lY_{lm})
\bigr\rangle = \int\!d^3x\, r^l\, Y_{lm}\,\delta\rho^\ast_\alpha,
\label{eq:Qdefine}\\
&& \varepsilon_\alpha\equiv
\omega_\alpha+\langle{\mbox{\boldmath $\xi$}}_\alpha,i{\bf \Omega}_s\times{\mbox{\boldmath $\xi$}}_{\alpha}\rangle,
\end{eqnarray}
and we have used the normalization $\langle{\mbox{\boldmath $\xi$}}_\alpha,{\mbox{\boldmath $\xi$}}_\alpha\rangle
=1$. In Eq.~(\ref{eq:Qdefine}), $\delta\rho_\alpha$ is the Eulerian density perturbation
associated with the eigenfunction ${\mbox{\boldmath $\xi$}}_\alpha$.
Equation (\ref{eq:adot}) has stationary solution
\begin{equation}
c_\alpha (t)={Q_{\alpha,lm}\over 2\varepsilon_\alpha (\omega_\alpha-\omega)}\, A_{lm}\, e^{-i\omega t}.
\end{equation}
The gravitational perturbation associated with the density perturbation
$\delta\rho({\bf r},t)=\sum_\alpha c_\alpha(t)\delta\rho_\alpha({\bf r})$, evaluated at the planet's surface
($r=R$), is
\begin{equation}
\delta\Phi({\bf r},t)\Bigr|_{r=R}= - \sum_\alpha
c_\alpha (t)\, {4\pi\over 2l+1}\, {GM Q_{\alpha,lm}\over R}\, Y_{lm}.
\end{equation}
Thus the tidal Love number is
\begin{equation}
k_{lm}={\delta\Phi\over U}\Bigr|_{r=R}={2\pi \over 2l+1}\sum_\alpha {\bar Q_{\alpha,lm}^2\over
\bar\varepsilon_\alpha (\bar\omega_\alpha-\bar\omega)}.
\label{eq:klm}\end{equation}
In the above equation, the tidal overlap coefficient $\bar Q_{\alpha,lm}$ and the mode frequencies
$\bar\omega_\alpha$ and $\bar\varepsilon_\alpha$ are in units where
$G=M=R=1$, i.e., $\bar\omega_\alpha=\omega_\alpha/(GM/R^3)^{1/2}$, etc.
Note that for a given $m>0$, the sum in Eq.~(\ref{eq:klm}) includes modes with positive $\omega_\alpha$
and negative $\omega_\alpha$, corresponding to prograde (with respect to the planet's rotation)
and retrograde modes.
\section{F-mode Contribution}
\begin{deluxetable}{ccccc}[!t]
\tablecaption{Oscillation modes of non-rotating polytropic $(n=1)$ planet model\label{tab:table1}}
\tablehead{ & & $\omega_0 $ & $Q_l$ & $C$ }
\startdata
$\Gamma_1=2$ & & & & \\
$l=2$ & f & 0.1227E+01 & 0.5579E+00 & 0.4991E+00\\
& p1& 0.3462E+01 & 0.2690E-01 & 0.1119E+00\\
$l=3$ & f & 0.1698E+01 & 0.5846E+00 & 0.3321E+00\\
& p1& 0.3975E+01& 0.4054E-01& 0.8627E-01\\
$l=4$ & f & 0.2037E+01 & 0.5979E+00 & 0.2489E+00\\
&p1 & 0.4409E+01& 0.4623E-01 & 0.6984E-01\\
$\Gamma_1=2.4$ & & & & \\ $l=2$
&f& 0.1230E+01& 0.5580E+00& 0.4985E+00\\
&g1& 0.4688E+00& -0.1313E-01& 0.1057E+00\\
&g2& 0.3270E+00& 0.3071E-02 & 0.1342E+00\\
&g3& 0.2526E+00& -0.8961E-03 & 0.1464E+00\\
$l=3$ &f& 0.1703E+01& 0.5850E+00& 0.3317E+00\\
&g1& 0.5681E+00& -0.1216E-01& 0.3321E-01\\
&g2& 0.4117E+00& 0.3257E-02& 0.5622E-01\\
&g3& 0.3254E+00& -0.1031E-02& 0.6603E-01\\
$\Gamma_1=2.4$& for & $r\in [0.5,0.7],$& $[0.85,0.93]~~~~$& \\
$l=2$ &f& 0.1228E+01 & 0.5580E+00 & 0.4988E+00\\
&g1& 0.3664E+00 & -0.6986E-02 & 0.9279E-01\\
&g2& 0.2022E+00 & 0.1408E-02 & 0.1207E+00\\
&g3& 0.1565E+00 & -0.1546E-03 & 0.1467E+00\\
$l=3$ &f &0.1701E+01 & 0.5849E+00 & 0.3319E+00\\
&g1& 0.4489E+00& -0.6067E-02& 0.2790E-01\\
&g2& 0.2749E+00& 0.2049E-02& 0.4166E-01\\
&g3& 0.2126E+00& -0.1567E-03& 0.6622E-01\\
\enddata
\tablecomments{$\omega_0$ and $Q_l$ are the mode frequency and tidal
overlap coefficient (Eq.~\ref{eq:Qdefine}), both in units such that
$G=M=R=1$, and $C$ is defined in Eq.~(\ref{eq:c}). The planet's
density profile is that of $n=1$ polytrope (with the equation of
state $P\propto \rho^2$). The first model has $\Gamma_1$ (the
adiabatic index) equal to $\Gamma=1+1/n$, and we list the properties
for the f-mode and the first radial-order p-mode. The second model
has $\Gamma_1=2.4$ throughout the planet, and the third model has
$\Gamma_1=2.4$ only in two regions ($r/R\in
[0.5,0.7],\,[0.85,0.93]$) and $\Gamma_1=\Gamma$ otherwise
(the transition width is $0.025R$; see Eq.~\ref{eq:gam1}),
and we list the properties for the f-mode
and the first three radial-order g-modes. Note that when $|Q_l|\ll 1$, the quoted $Q_l$ values
are only accurate in 2-3 significant figures.}
\end{deluxetable}
In most situations, the sum in Eq.~(\ref{eq:klm}) is dominated by f-modes since they have the largest
tidal overlap $Q_{\alpha,lm}$. For planetary rotation rate $\Omega_s$ much less than the breakup rate $(GM/R^3)^{1/2}$,
(e.g., $\bar\Omega_s=0.288$ for Jupiter),
the effect of rotation on the modes can be treated perturbatively
(e.g. Unno et al.~1989). Let $\omega_0$ ($>0$) be the mode
frequency of a non-rotating planet, then for a given $m>0$, the sum in Eq.~(\ref{eq:klm}) includes
\begin{eqnarray}
&&\varepsilon_\alpha\simeq \pm \omega_0, \label{eq:eps}\\
&&\omega_\alpha=\pm \omega_0 -m C \Omega_s,\label{eq:omeg}
\end{eqnarray}
with
\begin{eqnarray}
mC &\equiv & \int\!d^3x\,\rho\,{\mbox{\boldmath $\xi$}}^\ast_{\alpha,0}\cdot (i{\bf\hat z}\times{\mbox{\boldmath $\xi$}}_{\alpha,0})\nonumber\\
&=& m\int_0^R\!\!dr\,\rho r^2(2\xi_r\xi_\perp+\xi_\perp^2), \label{eq:c}
\end{eqnarray}
where ${\mbox{\boldmath $\xi$}}_{\alpha,0}=\left[\xi_r(r){\bf\hat r}+\xi_\perp(r) r\nabla\!_\perp\right]Y_{lm}$
is the mode eigenvector of a non-rotating planet. To a good
approximation, we can also set $Q_{\alpha,lm}$ to be the non-rotating value, i.e,
\begin{equation}
Q_{\alpha,lm}\simeq Q_l.
\end{equation}
Thus Eq.~(\ref{eq:klm}) reduces to
\begin{equation}
k_{lm}\simeq \left({4\pi\over 2l+1}\right) {\bar Q_l^2\over \bar\omega_0^2-(mC\bar\Omega_s
+\bar\omega)^2}.
\label{eq:general}\end{equation}
\begin{figure}[t]
\centering
\vskip -0.3cm
\includegraphics[width=0.5 \textwidth]{fig1.pdf}
\caption{\label{fig1}
Dynamical correction $\Delta k_{lm}/k_{lm}^{\rm (hs)}=(k_{lm}-k_{lm}^{\rm (hs)})/k_{lm}^{\rm (hs)}$
to Jupiter's tidal Love number as a funtion of the orbital frequency $\Omega_{\rm orb}$ of the perturbing satellite
(in units of the spin frequency $\Omega_s$). All results (solid curves) are computed
using the $n=1$ (isentropic) polytrope model, except that the dot-dashed curve is for $k_2=k_{22}$ computed
using the $n=0.9$ polytrope model. The vertical dashed lines specify the orbital frequencies
of Io, Europa, Ganymede and Callisto (from right to left). The $-4\%$ ``anomaly'' of $k_2$ observed by
{\it Juno} can be explained by the planetary model with $n\simeq 1$.}
\end{figure}
For an incompressible planet model ($n=0$ polytrope), the $l=2$ mode (Kelvin mode) has
\begin{equation}
\bar\omega_0={2\over\sqrt{5}},\quad
\bar Q_2=\left({3\over 2\pi}\right)^{1/2},\quad
C={1\over 2}.
\end{equation}
Thus
\begin{equation}
k_2\equiv k_{22}\simeq {3\over 2}\,\Bigl[1-{5\over 4}(\bar\Omega_s+\bar\omega)^2\Bigr]^{-1},
\end{equation}
with $\bar\omega=2(\bar\Omega_{\rm orb}-\bar\Omega_s)$.
Giant planets are approximately described by a $n=1$ polytrope (corresponding to
$P\propto \rho^2$). Table 1
list the numerical values of $\omega_0,~Q_l$ and $C$ for several non-rotating
poltropic models (with different levels of stratification; see Section 5).
For $l=m=2$ tidal response (and $n=1$), $2C\simeq 1$, we have
\begin{equation}
k_2\simeq 0.520\,\Bigl[1-0.664(\bar\Omega_s+\bar\omega)^2\Bigr]^{-1}.
\end{equation}
Applying to the Jupiter-Io system:
Jupiter has $\bar\Omega_s=0.288$ [with spin period 9.925~hrs and
$2\pi (R^3/GM)^{1/2}=2.863$~hrs], Io has $\bar\Omega_{\rm orb}=0.0674$ (orbital period
1.769~days), so $\bar\omega=-0.441$. Thus the hydrostatic and dynamical $k_s$ values are
\begin{equation}
k_2^{\rm (hs)}=0.550,\quad
k_2=0.528=0.960\,k_2^{\rm (hs)}
\end{equation}
This explains the $4\%$ discrepancy between $k_2$ and $k_2^{(\rm hs)}$. Note that our static $k_2^{(\rm hs)}$
does not agree with the value (0.590) from Wahl et al.~(2020). This could arise for two reasons:
(i) The simple $n=1$ polytropic model does not precisely represent Jupiter's internal structure;
(ii) In deriving Eq.~(\ref{eq:general}), we have neglected order $\bar\Omega_s^2$ corrections to
the mode frequency and the tidal overlap\footnote{Both $\bar\omega_0^2$ and $\bar Q_l^2$
in Eq.~(\ref{eq:general}) can have corrections of order $\bar\Omega_s^2$. These corrections
do not affect $\Delta k_2/k_2^{\rm (hs)}$ to the leading order. Note that for $n=0$ (incompressible
MacLaurin spheroid), the exact expressions for the mode frequency and tidal overlap coefficient
are available [see Eq.~(3.4) and Eq.~(3.22) of Ho \& Lai (1999)].}.
Figure 1 shows the dynamical corrections
$\delta_{lm}\equiv \Delta k_{lm}/k_{lm}^{\rm (hs)}=(k_{lm}-k_{lm}^{\rm (hs)})/k_{lm}^{\rm (hs)}$
to Jupiter's tidal Love numbers as a function of the orbital frequency $\Omega_{\rm orb}$ of the perturbing satellite.
These results are obtained using the $n=1$ isentropic model, which gives the hydrostatic values
$k_{lm}^{\rm (hs)}\simeq 0.550,\,0.213,\,0.219,\,0.121,\,0.123$ for $(lm)=(22),\,(31),\,(33),\,(42),\,(44)$,
respectively. Although these hydrostatic values may not correspond to the ``true'' values for Jupiter
because of the simplicity of the polytrope model and the $\bar\Omega_s^2$ corrections (see above),
the dynamical corrections $\delta_{lm}$ shown in Fig.~1 are robust.
Our results depicted in Fig.~1 can be compared to those of Idini \&
Stevenson (2021) obtained using more complicated calculations (see their Table 2).
Our $\delta_{22}$, $\delta_{33}$ and $\delta_{44}$ values (evaluated for the orbital
frequencies of Io, Europa, Ganymede and Callisto) agree reasonably
well with theirs, but our $\delta_{31}$, $\delta_{42}$ values are a
factor of a few smaller.
Finally, using Table 1, we can easily check that the contributions from p-modes
to $k_{\rm lm}$ are negligible.
\section{Inertial-Mode Contribution}
In addition to f-modes and p-modes, a rotating planet possesses a
spectrum of inertial modes supported by Coriolis force.
For $n=1$ polytrope, the $m=2$ inertial modes have been computed
by Xu \& Lai (2017) using a spectral code. The mode properties are
\begin{equation}
\omega_+=0.556\Omega_s,~\varepsilon_+=0.28\Omega_s,~\bar Q_+=0.015\bar\Omega_s^2
\end{equation}
for the prograde mode, and
\begin{equation}
\omega_-=-1.10\Omega_s,~\varepsilon_-=-0.55\Omega_s,~\bar Q_-=0.010\bar\Omega_s^2
\end{equation}
for the retrograde mode, where $Q_\pm$ is the tidal coupling coefficient $Q_{\alpha,22}$.
Since $\omega<0$, we can write the inertial mode contribution of $k_2$ as
\begin{equation}
k_{2,\rm in}={2\pi\over 5}\left[{\bar Q_+^2\over \bar\varepsilon_+
(\bar\omega_+ + |\bar\omega|)}+{\bar Q_-^2\over |\bar\varepsilon_-|
(|\bar\omega_-| - |\bar\omega|)}\right].
\end{equation}
Define $\hat\omega\equiv \omega/\Omega_s$ (and similarly $\hat\omega_\pm$ and
$\hat\varepsilon_\pm$) and $\hat Q_\pm \equiv \bar Q_\pm/\bar\Omega_s^2$, we have
\begin{equation}
k_{2,\rm in}={2\pi\over 5}\,\bar\Omega_s^2 \left[{\hat Q_+^2\over \hat\varepsilon_+
(\hat\omega_+ + |\hat\omega|)}+{\hat Q_-^2\over |\hat\varepsilon_-|
(|\hat\omega_-| - |\hat\omega|)}\right].
\end{equation}
For $n=1$ polytrope, this gives
\begin{equation}
k_{2,\rm in}={2\pi\over 5}\,\bar\Omega_s^2 \times 10^{-4}\left({8.04\over
0.556 + |\hat\omega|} + {1.82\over
1.10 - |\hat\omega|}\right).
\end{equation}
For Jupiter-Io system, $\hat\omega =2\Omega_{\rm orb}/\Omega_s -2 =-1.53$, it is clear that $k_{2,\rm in}\ll 1$.
In general, unless $|\hat\omega|$ happens to be very close to $|\hat\omega_-|$ (to within
$10^{-4}$), the contribution of the inertial modes to the Love number is negligible.
\section{Stable Stratification and G-Mode Contribution}
\begin{figure}[t]
\centering
\vskip -0.3cm
\includegraphics[width=0.5 \textwidth]{fig2.pdf}
\caption{\label{fig2}
Same as Fig.~1, but for the $n=1$, $\Gamma_1=2.4$ planetary model, which possesses
g-modes. The heavy solid curves include the contributions of f-modes and first three radial-order
g-modes to $k_{lm}$, the light solid curves include only f-modes (for the $n=1$ isentropic model, as
in Fig.~1).}
\end{figure}
\begin{figure}[t]
\centering
\vskip -0.3cm
\includegraphics[width=0.5 \textwidth]{fig3.pdf}
\caption{\label{fig3}
Same as Fig.~2, but for the $n=1$ model with stable stratification only in the
region $r/R \in [0.5,0.7]$ (see Eq.~\ref{eq:gam1}).}
\end{figure}
\begin{figure}[t]
\centering
\vskip -1.cm
\includegraphics[width=0.5 \textwidth]{fig4.pdf}
\caption{\label{fig4}
Same as Fig.~2, but for the $n=1$ model with stable stratification in two regions:
$r/R \in [0.5,0.7]$ and $[0.85,0.93]$.}
\end{figure}
In Sections 3-4 we considered fully isentropic models for Jupiter, i.e., the adiabatic
index $\Gamma_1\equiv (\partial \ln P/\partial\ln\rho)_s$ equals the polytropic
index $\Gamma\equiv d\ln P/d\ln\rho=1+1/n$. In reality, some regions of the planet
may be stably stratified, with $\Gamma_1>\Gamma$. Indeed, the gravity measurement
by {\it Juno} and structural modeling suggest that Jupiter
have a diluted core and a total heavy-element mass of 10-24
Earth masses, with the heavy elements distributed within an extended region
covering nearly half of Jupiter’s radius (Wahl et al.~2017; Debras \& Chaberier 2019;
Stevenson 2020). The composition gradient outside the diluted core
would provide stable stratification, and the planet would then possess g-modes.
Another stable region may exist between (0.8-0.9)$R$ and $0.93R$ (Debras \& Chaberier 2019).
To explore of how g-modes influence the tidal love numbers, we consider three
simple planetary models, all having a $n=1$ density profile ($\Gamma=2$), but
with different adiabatic index profiles:
(i) $\Gamma_1=2.4$ throughout the planet (see Table 1);
(ii) $\Gamma_1=2.4$ only in the stable region $\bar r=r/R \in [0.5,0.7]$ (with a
transition width of 0.025) and $\Gamma_1=\Gamma=1+1/n$
otherwise, i.e.,
\begin{equation}
\Gamma_1(r)=2+ {0.4 \over [1+e^{40(\bar r-0.7)}] [1+e^{-40(\bar r-0.5)}]}
\label{eq:gam1}\end{equation}
(iii) $\Gamma_1=2.4$ only in two stable regions $\bar r=r/R \in [0.5,0.7]$ and
$[0.85,0.93]$ (with a transition width of 0.025) and $\Gamma_1=\Gamma=1+1/n$
otherwise (see Table 1).
For each model, we compute the f-modes and g-modes of a nonrotating
planet (see Table 1), and use Eqs.~(\ref{eq:eps})-(\ref{eq:omeg}) to
account for the effect of rotation on the modes. We include only the
first three radial-order g-modes in our calculation of $k_{lm}$. The
perturbative approach of the rotational effect is approximately valid
for these modes since $mC\Omega_s$ is less than the mode frequency
$|\omega_0|$.
Figures 2-4 show the results for the dynamical Love numbers based on the three models.
It is obvious that significant dynamical correction to the hydrostatic $k_{lm}^{\rm (hs)}$
occurs around the resonance, where $\omega_\alpha=\omega$.
The ``strength'' of each resonance is measured by the tidal overlap coefficient, and a large $|Q_l|$
value implies that the ``width'' of the resonant feature is larger (see Eq.~\ref{eq:general}).
For the $\Gamma_1=2.4$ model, the stratification is strong, the broad/strong resonance with the
g$_1$ mode can affect $k_{lm}$ associated with the Galilean moons (Fig.~2).
For the model with the stable stratified region restricted to $r/R\in [0.5,0.7]$ (Fig.~3),
the resonance feature is much weaker/narrower, but still $\Delta k_2/k_2^{\rm (hs)}$ becomes $-5\%$ for Io.
When the model further includes the stratified region at $r/R\in [0.85,0.93]$ (Fig.~4),
the resonance features shift and broaden, and $k_{31}$ becomes affected for the Galilean moons.
Obviously, these results are for illustrative purpose, but they indicate that resonance features
due to stable stratification in the planet's interior may influence the the measured
dynamical Love numbers.
Note that Figures 2-4 do not include contributions from high-order
g-modes. These modes (with mode frequencies comparable to $\Omega_s$)
become mixed with inertial modes (so-called ``inertial-gravity''
modes; see Xu \& Lai 2017) and cannot be treated using Eqs.~(\ref{eq:eps})-(\ref{eq:omeg}).
However, because of their small tidal overlap coefficients, they are unlikely
to be important contributors to $k_{lm}$ except for the coincidence of an extremely close
resonance.
\section{Conclusion}
We have derived a general equation (Eq.~\ref{eq:klm}) for computing
the dynamical Love number $k_{lm}$ of a rotating giant planet in
response to the tidal forcings from its satellites. In most situations,
the Love number is dominated by the tidal response of f-modes, and the
general expression reduces to Eq.~(\ref{eq:general}), which can be
easily evaluated using the mode properties of nonrotating planet
models (see Table 1). We show that the $4\%$ discrepancy between the measured
$k_2$ of Jupiter and the theoretical hydrostatic value can be naturally
explained by the dynamical response of Jupiter's f-modes to the tidal forcing from Io
-- the key is to include the rotational (Coriolis) effect in the tidal response
in a self-consistent way. We also show that the contributions of the inertial modes
to the Love number $k_2$ are negligible.
We have also explored the effect of stable stratification in Jupiter's
interior on the Love numbers. If sufficiently strong stratification
exists in a large region of the planet's interior, g-mode resonances
may influence the dynamical Love numbers associated with the tidal
forcing from the Galilean moons. Thus, precise measurements of
various $k_{lm}$ could provide constraints on the planet's
interior stratification.
|
\subsection{Conversational Search}
Conversational search is a domain in Information Retrieval, describing a specific form of human-computer interaction. The defining feature of this field is that the device responds to the human, creating a two-way, mixed-initiative interaction system \cite{Radlinski_framework, Kiesel_voice_query}, such as chat-bots or speaking digital assistants. These examples illustrate the two main forms of conversational search: Spoken and textual interfaces \cite{Kiesel_voice_query}. Nevertheless, both variants only allow for returning a small number of documents (often just one) \cite{Aliannejadi_questions_in_IR, Zamani_analysis}, a crucial factor in the need for search clarification.
\subsection{Search clarification: Clarifying Questions}
The importance of clarification in search starts at the user queries. Queries are often short, possibly ambiguous, and faceted, and the intent and information needs of the user might not be clear \cite{Zamani_generation, Zamani_analysis, Krasakis_document_ranking}. In other words, the users \say{often fail to compose a single query that entails all their information needs} \cite{Aliannejadi_questions_in_IR}. An example could be the query \say{\textit{Jaguar}}, which could refer to either the animal or the car brand.
One solution to this would be search result diversification \cite{Santos_query_reformulation, Drosou_search_diversification, Zamani_generation}, which aims to cover most needs and facets of a single query in the returned documents. However, this method's underlying assumption - the possibility to present a ranked list to the user - does not hold for small-screen interfaces, speech devices, or question-answering systems \cite{Zamani_analysis, Aliannejadi_questions_in_IR}. An alternative approach is to inquire the user about the intent of their query by means of one or more clarifying questions \cite{Zamani_generation, Hashemi_neural_interaction_model}. These questions can either have closed form answers, which also have to be generated, or it can be open questions, as done in \cite{Krasakis_document_ranking}. Our research's scope is limited to fixed candidate answers, but posing open clarification questions has already been shown to improve search results significantly \cite{Hashemi_neural_interaction_model}. For the methodology on generating clarifying questions and their answers, we refer the reader to \cite{Zamani_generation}.
With experts assessing the quality of the CPs as good in general \cite{Zamani_generation}, there is one crucial question left: Does the user experience the CPs as helpful for finding relevant documents? Without the use of search clarification, (ambiguous) queries may lead to iterations of query reformulation or scanning multiple result pages, reducing user satisfaction \cite{Aliannejadi_questions_in_IR}. On the other hand, \cite{Kiesel_voice_query} showed that users are not dissatisfied when prompted for voice query clarification and might even like it. Furthermore, the click-through rate relatively improved by a significant $48\%$ compared to query suggestion \cite{Zamani_generation}.
\subsubsection{User engagement}
To estimate the usefulness of different clarification questions, it is important to measure the UE with the CPs. However, it is not possible to observe the actual engagement with the clarification questions. Merely we can observe user interactions with the CP. Many types of interactions can be used to describe the UE, for example, the click-through rate or the dwell time \cite{Lehmann_user_engagement_measures, OBrien_Theoretical_UE}.
Research into UE in real-world applications has already been done. \cite{Mitra_user_interaction_autocomplete} showed that for query autocompletion, the suggested completion position has a big impact on user interaction. The top-ranked completion was chosen more than twice as much as the second-highest ranked completion. \cite{Mitra_user_interaction_autocomplete} also showed that the class of question (e.g., finance or celebrity) influences the UE with the autocomplete results. For autocompletion, the number of characters typed already was also of influence. However, unlike autocompletion, for clarification questions, the query is already typed out in full.
A highly relevant work on predicting user engagement was published recently, making use of the same MIMICS dataset \cite{sekulic2021user}. In this paper, the authors try to predict the user engagement on clarification panes using a Transformer-based model \cite{sekulic2021user}. Their objective is similar to ours, namely to use the user engagement as a proxy for relevance. However, the clarification panes are not reranked based on this. Instead, the focus lies on incorporating parts of the SERP into the model, to improve the accuracy in predicting user engagement.
\subsubsection{Ranking of CPs}
In \cite{Zamani_analysis}, a first attempt was also made to re-rank the questions to suit the users' needs better, but with real user interaction, which is not always available. Moreover, \cite{Rosset_suggesting_useful_questions} rank follow-up questions based on their usefulness to the user. However, this usefulness is based on the assumption that the user's information needs were satisfied using their original query. The follow-up questions are based on different information needs a user might have after finding the answer to the original query, which may help to improve the \say{People Also Ask} section in modern search engines. In our research, the clarification questions for a given query specifically help elucidate the current information need.
To predict whether a CP will be relevant to the user, it is important to predict UE on clarifying questions accurately. Predicting UE has been done in the past in different contexts. For example, \cite{Straton_facebook_prediction} used (deep) neural nets to predict UE on Facebook posts based on post characteristics (e.g. time, post type or country). More recently, \cite{Risch_comment} also used neural networks to predict UE with comments on news articles. To the best of the authors' knowledge, predicting UE for CPs has not been done before. Unlike previous UE prediction attempts, the research in this paper takes (predicted) user engagement as a measure of relevance instead of a measure of popularity. In this paper we will examine whether this assumption holds and use the PUE as a feature for ranking the CPs.
\subsection{Datasets}
The main reason no prior research has been done on predicting UE on clarification questions was the lack of a sufficiently large data set. Until recently, the only dataset that existed specifically on search clarification was Qulac \cite{Aliannejadi_questions_in_IR}. However, this dataset consists of only $200$ queries and is therefore not suited to train (large) neural networks. The questions and answers in this dataset were also not obtained from real users but rather through crowd-sourcing, which might affect the quality of the data.
The publication of the MIMICS dataset by \cite{Zamani_MIMICS} changed this, as the first part of this dataset (MIMICS-Click) consists of approximately $400k$ unique queries, with the associated CP and user interaction signals. MIMICS-Click uses clicks as a measurement for user interaction. Receiving no click on a CP would be a UE of $0$, and all other clicks are binned into engagement levels from $1$ to $10$, using the equal-depth method \cite{Zamani_MIMICS}. The equal-depth binning implies that all nonzero bins contain approximately the same number of samples. The data was taken from real user interaction with the \textit{Bing} search engine. All queries in the dataset have a corresponding CP and are completely in English. Another part of the dataset (MIMICS-ClickExplore) consists of approximately $60k$ unique queries, where each query has multiple different CPs. Using this dataset, we can explore and predict UE on the various CPs corresponding to one query and rank those.
\end{document}
\subsection{Dataset}\label{sec:data}
\subsubsection{Dataset: Regression \& Classification}
For the regression and classification part of the pipeline, the MIMICS-Click dataset will be used \cite{Zamani_MIMICS}. We will use the user-submitted query for the regression and classification models, the generated clarifying question, and the candidate answers. The input of the prediction model is a vectorized representation of these features, using either a BERT embedding or TFIDF representation. For each data instance, an impression level is available (\say{\textit{low}}, \say{\textit{medium}}, \say{\textit{high}}), indicating the level of exposure to users. The target is the UE, represented as an integer value in range $[0, 11]$. The label distribution is severely imbalanced, with $83\%$ of engagement labels being $0$ (i.e., no engagement at all), which is solved by balancing the dataset.
The following Boolean pre-processing options were designed and evaluated using regression and classification models: $1$) \textbf{Balance distribution}: When true, the frequency of engagement level $0$ will be reduced to the median frequency of all labels. In all prediction experiments, the dataset is balanced. $2$) \textbf{Impression level filter}: When set to true, data instances with a \say{\textit{low}} impression-level are removed from the dataset to reduce noise. $3$) \textbf{Reduced classes}: if set to true, the engagement labels are mapped to a binary distribution: No exposure vs. any exposure. $4$) \textbf{Vectorizer}: Can be either \say{BERT} or \say{TFIDF}. If set to \say{BERT}, a sentence embedding is obtained for each remaining data instance using a fixed \texttt{DistilBERT} model, which is not further optimized \cite{Reimers_sentence-bert}. We concatenate these $7$ embeddings (query, question, $5$ answers) of size $768$ to obtain a 1D vector (of size $5376$). If set to \say{TFIDF}, the TFIDF vectorizer from \texttt{scikit-learn} is used to obtain a 1D representation per data instance, with a fixed vocabulary size of $30k$. The resulting dataset is randomly split in a train-, validation- and test set, with respective splits being $70\%$, $15\%$, $15\%$. Each data split is shuffled and split up into batches of size $64$ (the last incomplete batch is dropped). The number of epochs is set to $40$ for both classification and regression, as convergence analysis showed all used parameter settings had converged by then.
\subsubsection{Dataset: Ranker}
For the ranker, the MIMICS-ClickExplore dataset is used \cite{Zamani_MIMICS}. This dataset contains $64,007$ unique user queries, each with at least two corresponding CPs that have been shown to users. The maximum number of questions that are associated with a single query is $89$. There is a total of $168,921$ query-question pairs, which means there are $2.64$ clarifying questions per query on average. The engagement levels distribution in the MIMICS-ClickExplore dataset, while not as severe as the MIMICS-Click dataset, is still unbalanced. There are $89,441$ query-question pairs with a non-zero engagement level, which means that approximately $53\%$ of all pairs has an engagement level of $0$. However, in this case, we keep all the data instances given the low number of CPs to rank per query.
With the low number of average questions per query, negative samples were introduced in the dataset. These negative samples are random CPs corresponding to the different queries. For each query, $10$ negative samples are added to the questions. All negative samples receive a relevance label of $0$, the positive samples with maximum predicted engagement receive a label of $2$, and all other positive samples receive a label of $1$. The pre-processed dataset was split into a training, validation, and test set, with respective splits of $70\%$, $15\%$, and $15\%$. However, for this dataset, the splits were not done on query-question pairs but solely on the queries to ensure that the same query's questions correspond to the same query end up in the same split.
\subsection{Engagement Prediction}
Given the dataset and possible pre-processing options, this research's first goal is to produce an accurate regression and classification model for engagement prediction on the CPs. The regression and classification models have an identical architecture, except for the last layer (mapping to a scalar or to the number of classes).
We set an evaluation frequency on the validation set of $100$ batches for both regression and classification. The model parameters are saved at the point in training where the validation loss is minimal. After convergence ($40$ epochs), the optimal model is loaded from memory and evaluated on the test set.
\subsubsection{Model parameters}\label{sec:parameters}
A \texttt{PyTorch} Multi-Layer Perceptron (MLP) is used for the regression \cite{Paszke_pytorch}. The Mean-Square Error (MSE) loss is used for the regressor, and the Cross-Entropy (CE) loss in the classifier. The optimal layer configuration and other hyperparameter settings are found by extensive hyperparameter tuning. The optimal parameters are defined by the MSE-loss on the test set. Due to computational constraints, and given the similarity of the classification and regression model, the optimal parameters found for regression are also used for the classification model. The following optimal values were found: Both the regression and classification model have two hidden layers of size $300$ and $32$ and make use of a \texttt{LeakyReLU} activation function with a negative slope of $0.02$, as well as batch normalization to ensure stable training. The \texttt{AmsGRAD} optimizer is used (SGD and Adam were also tested, with momentum), with a learning rate of $0.001$, and no weight decay.
\subsection{CP Ranking}
The second goal of this research is determining whether the PUE found using the previously trained regression or classification model may be used to improve the quality of a ranking algorithm. To see if there is any impact an ablation study is performed, where one RankNet model uses the PUE as one of the input features and another identical RankNet model does not. Besides the PUE, Ranknet takes as a input the number of characters in the query and question, the number of answers, and the average number of characters in the answers (all normalized). Next, the number of pairwise errors found in the ranking is minimized \cite{Burges_baselines}. If improvements are found for RankNet, it is plausible they will also improve more sophisticated models based on RankNet, such as LambdaRank. The sped-up version of RankNet is used so all gradients for all pairwise comparisons can be used at once to update the weights of the model.
Both the RankNet with and without the predictions are trained for $5$ epochs. The performance of the model is evaluated using the Normalized Discounted Cumulative Gain (NDCG) and Mean Reciprocal Rank (MRR) measures. NDCG is a metric which compares the returned ranking with the ideal possible ranking to achieve a score that shows how good a ranking is regardless of the number of documents. A higher NDCG means that the ranker performs better. The MRR is an indicator for the reciprocal rank of the first relevant document. A higher MRR means that the first relevant document is found higher in the ranking. After training the model is evaluated in terms of NDCG and MRR on the held-out test set. A perfect model would score $1.0$ on both NCDG and MRR.
\subsection{Baselines}
Simple baselines are constructed for fair evaluation of our prediction models. For the various data pre-processing settings, the mean, median and mode of the engagement labels are computed and the corresponding test loss is compared to the performance of our models. Significance testing is done for every baseline, and between the regression and the classifier (rounding the regression predictions). A paired two-sided t-test was used. The null hypothesis (the two samples have identical average (expected) values) will be rejected if the p-value $<0.001$.
The ablation results for the ranker are compared in terms of NDCG and MRR, using the same significance test for both the NDCG and MRR separately. For this comparison we will use a larger p-value cut-off of $0.05$, as we are not comparing to a naive heuristic baseline.
\end{document}
\subsection{Engagement Prediction}
In Table \ref{tab:results} an overview is given of the performance of both the regression and classification loss for the pre-processing data options (see section \ref{sec:data}), as well as the accuracy for the classification approach. The same metrics are shown for the simple baselines mean, median, and mode. Please note that the baselines are independent of the vectorizer. All zero-labels are balanced, as explained in the methods section, but due to dropping the last incomplete batch, the final label distribution of the test set might not be fully uniform.
It can be observed from Table \ref{tab:results} that our regression and classification models consistently outperform the simple baselines (RQ1). Significance testing showed that almost all configurations are significantly better than the baselines. Note that the mode can vary drastically depending on the distribution of the data (in some cases, the mode might not be close to the mean or median).
Moreover, the table shows that BERT embeddings consistently outperform the TFIDF features (RQ2), regardless of the other data settings. Furthermore, as expected, the models perform better on only two classes (results not shown). A significance test was also performed on the classifier vs. the regression for all $8$ settings by rounding the regression predictions to the nearest integer. For all settings, the predictions on the test set are significantly different.
\subsubsection{Regression}
We observe substantial overfitting for every model, despite the relatively small architecture (which would prevent memorization) and batch normalization. In Table \ref{tab:results} is shown that for these settings, the model is not significantly different than the mean baseline (a p-value of $0.02$ was found, larger than our cutoff of $0.001$). Nevertheless, this means a $98\%$ probability of the model is significantly different than the mean baseline while it outperforms all other settings. Therefore, this model is chosen for future results and to be used in feature construction for the ranker.
\subsubsection{Classification}\label{sec:resultsclassification}
The classification was trained with identical data pre-processing settings, as described above. Similar to the regressor, we observe substantial overfitting in the training versus validation loss, despite regularizing measures. To analyze the predictions of the classifier, confusion matrices for both the $11$- and $2$-class variant were constructed, as shown in Figure \ref{fig:confusion}.
For the $11$-class variant, we see a strong bias towards the lower engagement level labels, and moreover, some classes are not predicted at all. This is partly due to the impression filtering, in which most instances with a low impression have a high engagement level. Nevertheless, the results show that the classification model is sensitive to skewed data distribution, resulting in some classes never predicted, despite occurring quite frequently in the training set.
For the $2$-class variant, better performance is observed, with a strong trend on the confusion matrix's diagonal. As expected, the performance is not perfect, again indicating the difficulty of this task.
\begin{figure*}[t]
\centering
\includegraphics[width=0.48\linewidth]{Media/confusion_classification_Bert_True_False_Adam_0.001_0_0_300,32_0.0,0.0_True_30.png}
\includegraphics[width=0.48\linewidth]{Media/confusion_classification_Bert_True_True_Adam_0.001_0_0_300,32_0.0,0.0_True_30.png}
\caption{Confusion matrices for $11$ class (left) and $2$ class (right) data settings, using optimal parameters. Absolute numbers are shown, no normalization was applied.}
\label{fig:confusion}
\end{figure*}
\subsection{Ranker}
\begin{table}[t]
\centering
\caption{Ranker performance on test set, all differences are significant (p-value $<0.05$)}
\begin{tabular}{|l|c|c|}
\hline
Model & NDCG $\uparrow$ & MRR $\uparrow$ \\\hline\hline
With predictions & \textbf{0.620} & \textbf{0.620} \\
Without predictions & 0.611 & 0.607\\\hline
\end{tabular}
\label{tab:ranker_performance}
\end{table}
Finally, we perform the ablation study on the ranker: one model was trained with the PUE from the best-performing regression model, another model was trained without those predictions. The final NDCG on the test set, as well as the MRR for both models, is shown in Table \ref{tab:ranker_performance}. The NDCG of the two models is significantly different with a p-value of $0.0008$, indicating that using the PUE as a feature improves the results significantly, answering RQ3. Furthermore, a random, untrained model scores an NDCG of $\sim 0.47$ (results not shown), so either model improves substantially on the random baseline. Lastly, the MRR of the PUE model is also significantly better, with a p-value of $0.011$, demonstrating the effectiveness of this approach.
\end{document}
\section{Appendix: Training implementation}
\subsection{Regression/Classification}\label{sec:parameters}
A \texttt{PyTorch} Multi-Layer Perceptron (MLP) is used for the regression \cite{Paszke_pytorch}. The input size is dependent on the representation used (TFIDF yields a larger vector). The Mean-Square Error (MSE) loss is used for training the regressor, and the Cross-Entropy (CE) loss is used for training the classifier. The optimal layer configuration and other hyperparameter settings are found by extensive hyperparameter tuning, performed on the balanced and impression filtered dataset and using regression. The optimal parameters are defined by the MSE-loss on the test set. Due to computational constraints, and given the similarity of the classification and regression model, the optimal parameters found for regression are also used for the classification model. In general, the model is quite robust to hyperparameter changes, but the following optimal values were found: Both the regression and classification model have two hidden layers of size $300$ and $32$ and make use of a \texttt{LeakyReLU} activation function with a negative slope of $0.02$ in every layer, as well as batch normalization ensure stable training and to combat overfitting. Dropout was included in the gridsearch but did not contribute to a better performing model. The \texttt{AmsGRAD} optimizer is used (SGD and Adam were also tested, with momentum), with a learning rate of $0.001$, and no weight decay.
\subsection{Ranker}
The RankNet model used in this paper uses a MLP, implemented in \texttt{PyTorch}, to predict the relative scores that determine the ranking \cite{Paszke_pytorch}. The input size is dependent on whether or not the predictions are included as features. In case they are, the input size is $5$, otherwise the input size is $4$. The model has two hidden layers of size $32$ and $16$. After every layer batch normalization is applied, followed by \texttt{LeakyReLU} as an activation function with a negative slope of $0.02$. The model is optimized using the \texttt{AmsGRAD} optimizer, with a learning rate of $0.001$ and a weight decay of $0.001$. These parameters are based on a limited gridsearch and heuristics.
\end{document}
\subsubsection{0pt}{12pt plus 4pt minus 2pt}{5pt plus 2pt minus 2pt}
\begin{document}
\title{Ranking Clarifying Questions Based on Predicted User Engagement}
\author{Tom Lotze \and
Stefan Klut \and Mohammad Aliannejadi \and Evangelos Kanoulas
\institute{University of Amsterdam}
\email{<EMAIL>, <EMAIL>, \{M.Aliannejadi, E.Kanoulas\}@uva.nl}}
\maketitle
\begin{abstract}
To improve online search results, clarification questions can be used to elucidate the information need of the user. This research aims to predict the user engagement with the clarification pane as an indicator of relevance based on the lexical information: query, question, and answers. Subsequently, the predicted user engagement can be used as a feature to rank the clarification panes.
Regression and classification are applied for predicting user engagement and compared to naive heuristic baselines (e.g. mean) on the new MIMICS dataset \cite{Zamani_MIMICS}. An ablation study is carried out using a RankNet model to determine whether the predicted user engagement improves clarification pane ranking performance.
The prediction models were able to improve significantly upon the naive baselines, and the predicted user engagement feature significantly improved the RankNet results in terms of NDCG and MRR. This research demonstrates the potential for ranking clarification panes based on lexical information only and can serve as a first neural baseline for future research to improve on. The code is available online\footnote{\url{https://github.com/Tom-Lotze/IR2_5}}.
\keywords{Search Clarification \and Conversational Search \and User Engagement}
\end{abstract}
\section{Introduction}\label{sect:Introduction}
\subfile{Sections/1-Introduction}
\section{Related Work}\label{sect:Related}
\subfile{Sections/2-RelatedWork}
\section{Methods}\label{sect:Methods}
\subfile{Sections/3-Methods}
\section{Results}\label{sect:Results}
\subfile{Sections/4-Results}
\section{Conclusion \& Limitations}\label{sect:Conclusion}
\subfile{Sections/5-Conclusion}
\bibliographystyle{splncs04}
|
\section{Introduction}
{In the past decade, the advent of ride-hailing platforms such as Lyft and Uber has revolutionized urban mobility. While commuter transit needs in cities were traditionally satisfied by personal vehicles or mass transit systems, ride-hailing platforms have grown immensely in popularity and gained a seemingly permanent footing in the landscape of mobility solutions.
However, despite the increasingly important role played by \emph{Mobility-on-Demand (MoD)} services in today's society, the intermingling of various modes of transportation has yet to make its way into the status quo: by and large, if not for using their personal vehicles, commuters either choose to complete their trips in a low-capacity ride-hailing vehicle, or opt for public mass transit options, each of these options equipped with their respective benefits and disadvantages. On the one hand, ride-hailing services have been lauded for their convenience, competitive pricing, and the creation of flexible, gig economy jobs. On the other, these services have been associated with negative environmental impacts, chief of which are increased emissions due to higher volumes of traffic congestion and vehicle-miles traveled. Moreover, despite the fact that these options are often less expensive than taxi services, they remain out of reach for lower-income populations, for whom mass transit such as bus and subway services remains the most accessible option. And, while these public transit systems are more affordable and environmentally sustainable, they fail to adequately serve areas that are not as densely populated. Further, due to their inability to dynamically adapt to passenger demand, public transit vehicles are often overly packed during rush hour and significantly underfilled in off-peak hours~\citep{nyc_packed_subways}, an inefficiency from which ride-hailing options do not suffer.}
In light of this, it should be clear that there exist potentially massive gains from integrating the on-demand capabilities of ride-hailing services with mass transit options to create a smarter transportation system. The benefits of such a synergy have been uncovered in both the academic literature~\citep{benefit_integration}, as well as in the wild, with ride-hailing platforms such as Lyft experimenting with mass transit-like options in recent years~\citep{hawkins2017lyft}. Indeed, the need for such integration has become all the more stark throughout 2020, when cities have turned to microtransit as a means of addressing reduced public transit services due to the coronavirus pandemic~\citep{pandemic_microtransit}. The value of real-time, adaptive hybrid transportation options that retain both the convenience of ride-hailing and the sustainability of mass transit, is perhaps best evidenced by New York City's months-long overnight, for-hire vehicle program for essential workers, discontinued in August 2020 due to high costs~\citep{nyc_pandemic_buses}. {The extremes of the mobility spectrum to which the Metropolitan Transit Authority (MTA) turned as a stopgap in this relatively short period of time typifies the potential perils of relying on an unintegrated system: the free, late-night for-hire vehicle program was a boon to essential workers who had been deprived of a means to get to their shifts, but the city could not sustain this as a long-term solution; mass transit solutions, though sustainable, were not flexible enough to appropriately serve workers living in communities historically underserved by these services~\citep{nyc_underserved_comms}. As an alternative to these two extremes, the city recently turned to the creation of overnight bus routes that mirror workers' most popular trips~\citep{nyc_pandemic_buses}. In doing so, the MTA is faced with a number of fundamental questions upon which the success of such a system hinges: {given these essential workers' origins and destinations, {\it which} routes should the transit agency operate? {\it How frequently} should it operate each route? How can {\it short, for-hire vehicle trips} help to connect passengers to these routes?}} This paper aims to answer these questions in order to effectively operate such an integrated system.
Just as cities have yet to successfully operate integrated mobility services, the operations research and transportation communities have by and large studied ride-hailing and mass transit systems separately. On the one hand, there exists an active line of work on approximate-optimal policies for dispatching drivers to ride requests, and rebalancing empty vehicles~\citep{banerjee2016pricing,braverman2019empty,banerjee2018state,kanoria2019near}.
On the other, the problem of designing the optimal bus routes to serve passenger demand
dates back to the mid-1970s~\citep{magnanti1984network}. And, though the question of integrating mass transit and single-occupancy vehicle solutions has attracted increasing attention in recent years, operational questions have largely been restricted to using ride-hailing services to connect to {\it pre-existing} transit networks~\citep{Ma,MA2019417}. The joint problem of adaptively designing bus routes in near real-time, and connecting passengers to these routes via ride-hailing services has to our knowledge yet to be explored.
The key obstacle in designing real-time algorithms with provable guarantees for transit-network design is the size of the decision space: the number of possible routes is exponential in the number of nodes of the road network. As such, approaches have either been heuristic~\citep{CEDER,Pape,Borndorfer} (lacking any guarantees), or exact~\citep{nachtigall2008simultaneous} (requiring extensive computation time); the former may lead to severe losses in efficiency, while the latter are more properly suited for designing {\it long-term} bus routes, rather than routes that adapt to changing demand patterns.
In this paper, we show that it is possible to design efficient algorithms for line planning that both provide passengers with the experience of near-real-time booking and service {\it and} have theoretical guarantees.
However, this is only true up to a point: as the designer expands her solution space of feasible transit options, one runs into fundamental limits in terms of how good an approximation one can hope to achieve via efficient algorithms. Overall, our work provides \emph{theoretically sound and practically meaningful algorithms for real-time line planning, and also exposes the computational limits of line planning.}
\subsection{Summary of our contributions}
We consider a model in which a Mobility-on-Demand provider (henceforth \emph{platform}) has control of a vehicle fleet comprising both single-occupancy and high-capacity vehicles (henceforth \emph{cars} and \emph{buses} respectively).
The platform is faced with a number of trip requests to fill during a window of time (e.g., one hour), and has full knowledge of passenger demands (source and destination locations, and constraints on start and end times) prior to the beginning of the time window.
This assumption is practically motivated by scheduling services now offered by ride-hailing apps like Lyft and Uber, and/or the use of accurate demand forecasting models.
The platform{} can service these trip requests via different \emph{trip options}: it can send a car to transport the passenger from her source to her destination; it can use a car for the first and last legs of the passenger's trip, and have her travel by bus in between; or it can use more complicated trips comprising of multiple car and bus legs.
Each passenger matched to a trip option leads to an associated value (or \emph{reward}), which can reflect both the passenger's utility for the trip-time, comfort, transfers, etc., as well as platform costs in terms of car-miles; in addition, the platform{} also incurs a cost for operating each bus route at a given frequency. We define the combination of a route and a frequency to be a {\it line}. The goal of the platform is to determine the optimal set of lines to operate (given a fixed budget $B$ for opening lines), as well as the assignment of passengers to trip options utilizing these lines, in order to maximize the total reward.
We refer to this problem as the {\it Real-Time Line Planning Problem} (\textsc{Rlpp}).
As discussed earlier, though there exist exact methods for solving the Line Planning Problem that can be adapted to the \textsc{Rlpp}\ setting (e.g., by formulating and solving an associated integer linear program),
the extensive computation time required to obtain the optimal set of lines runs counter to our goal of computing short-term lines that adapt to demand patterns throughout the day.
This motivates studying the task of finding good approximate solutions to \textsc{Rlpp}. In this context, we make two contributions:
\begin{itemize}[leftmargin=*]
\item[1.] We first demonstrate the computational limits of \textsc{Rlpp}\ by showing that no constant-factor approximation is possible if we relax any one of two assumptions: $(i)$ access to a pre-specified set of feasible bus lines, and $(ii)$ no inter-line (i.e., bus-to-bus) transfers.
\item[2.] Under both above assumptions, we design an efficient algorithm for \textsc{Rlpp}\, that respects budget constraints with high probability, while guaranteeing a welfare that is within a $\left(1-\frac1e-\varepsilon\right)$-factor of the optimal (where $\varepsilon$ trades-off the quality of approximation and probability of exceeding the budget).
\end{itemize}
While assumptions $(i)$ and $(ii)$ are commonly made both in practice and in the academic literature, our work provides \emph{strong theoretical justifications} for these assumptions in that if either fails to hold, there is no hope of obtaining a constant-factor approximation.
Assumption $(i)$ forms the basis of all {exact} ILP-based methods; it is also practically relevant due to both constraints imposed by cities on bus routes, as well as expert knowledge of transit designers as to which routes are useful. Assumption $(ii)$ reflects a practical constraint that, given a passenger may already incur car-bus transfers in the first/last legs of her trip, additional bus-bus transfers could be deemed excessive.
Even when both hold, however, we show that the problem is still far from trivial: in particular, it does not inherit the attractive combinatorial property of submodularity, and so one cannot employ standard techniques to get the classical $1-\frac1e$ approximation guarantee~\citep{Wolsey}.
Moreover, we also show that the natural linear programming (LP) relaxation has a worst-case integrality gap of at least $\frac12$.
In spite of this, in our main technical contribution, we provide a $\left(1-\frac1e-\varepsilon\right)$-factor approximation for Real-Time Line Planning Problem{}.
More specifically, our algorithm uses a novel LP relaxation followed by a randomized rounding procedure, that can be tuned to guarantee that the budget constraint is met with any desired high-probability bound, while losing an $\varepsilon$-factor in the welfare guarantee.
Our key technical insight is that the Real-Time Line Planning Problem{} can be relaxed and re-formulated as an exponential-size \emph{configuration LP}, and that this formulation then allows us to use ideas from randomized rounding for the Separable Assignment Problem~\citep{SAP}. We then leverage the additional structure in \textsc{Rlpp}{} to show that the rounding step is the {\it only} source of loss in our algorithm. Our results hold under an assumption which we term {\it trip optimality} (i.e., of all the ways in which a passenger can join a given line via car, she must be assigned to the best such option). However, we later show how this assumption can be relaxed, and, with slight modification to our algorithm, we lose at most a constant factor.
Finally, we investigate the practical efficacy of our approach via numerical experiments on real-world and synthetic datasets. We note that, although our algorithm does not guarantee a solution that is always within budget, in practice it is easy to run multiple replications (which are cheap, and can be run in parallel) and choose the best realization satisfying budget constraints.
Our numerical experiments simulate this procedure, and we observe that given a time budget on computation (as would be necessary for real-time line planning), our algorithm outperforms state-of-the-art ILP solvers for large problem instances, thereby demonstrating its practicality for the problem of designing integrated and flexible transit networks at scale.
\noindent\textbf{Structure of the paper}.
In Section~\ref{sec:related}, we survey relevant literature. We present our model and define the Real-Time Line Planning Problem{} in Section~\ref{sec:preliminaries}.
In Section~\ref{sec:hardness}, we characterize fundamental computational limits of \textsc{Rlpp}, establishing the need for a candidate set of lines and precluding bus transfers; we also show that standard techniques are inadequate for our setting. We present our main algorithm and guarantees in Section~\ref{sec:main-result}, and back this up with numerical results in Section~\ref{sec:numerical-experiments} and Appendix~\ref{app:synthetic_experiments}.
Extensions to our main results can be found in Appendix~\ref{ssec:extensions}.
\section{Related work}
\label{sec:related}
\noindent\textbf{Line planning in public transportation:} {Our work falls under the large umbrella of transportation network design; see~\citet{magnanti1984network,guihaire2008transit,farahani2013review} for excellent expositions.} Much of this work has historically involved heuristics, including greedy approaches based on simpler network primitives such as shortest-paths and minimum spanning trees~\citep{Dubois,gattermann2017line}, and metaheuristics~\citep{zhao2006simulated,zhao2004transit}.
The largest-scale use of heuristic methods is, to our knowledge, the work of~\citet{Borndorfer}, who rely on column generation and {greedy heuristics}; more importantly, the formulation requires allowing for \emph{arbitrarily many bus transfers}.
In practice, it is desirable to enforce a maximum number of allowable transfers (something which we explicitly model in our work); enforcing this however severely impacts computational performance.
In a followup work,~\citet{borndorfer2012direct} incorporate transfer penalties (a type of ``soft'' constraint), but the resulting algorithms require on the order of 10 hours of computation time, which for our setting is infeasible.
More recently, exact methods based on ILP formulations have gained in popularity~\citep{wan2003mixed,barra2007solving,marin2009urban,nachtigall2008simultaneous}, though these only scale to small networks.
\noindent\textbf{Ride-pooling:} Our problem is also closely related to {\it ride-pooling}, where the goal is to combine multiple trips to improve the efficiency of ride-sharing platforms. To model trade-offs between passenger inconvenience and sharing rides,~\citet{Santi} introduced the abstraction of a {\it shareability network}, and showed via simulations that pairing up to two requests per vehicle could lead to significant savings in cumulative driver miles. Their methods, however, accommodate at most three passengers per vehicle (with heuristics). \citet{Alonso-Mora} develop algorithms which perform well (in simulations) for up to 10 passengers per vehicle. Their method is based on clique decompositions of the shareablity network, which again scales poorly with increasing vehicle capacity; it also imposes strict quality of service constraints leading to fewer feasible trip configurations, which may greatly reduce efficiency in the setting we consider.
\noindent\textbf{Multi-modal solutions to the first-mile/last-mile problem:} From a practical perspective, the transportation community has explored public-private partnerships to exploit both the high capacity of public transit buses and the flexibility of MoD fleets~\citep{benefit_integration,MA2019417}. These works, however, focus not on designing the transit network, but rather on dynamic vehicle dispatching and routing between origin or destination and transit hubs.
\noindent\textbf{Stochastic control for ride-sharing:} A more recent line of work has developed stochastic models for ride-sharing with trip requests arriving via a random process. This has enabled the use of techniques from stochastic control for scheduling and routing~\citep{banerjee2016pricing,braverman2019empty,banerjee2018state,kanoria2019near}, as well as the study of system-level questions such as the effect of competing platforms~\cite{sejourne2018price}.
The algorithms developed in these papers largely rely on assuming that under appropriate scaling (in particular, in the `large-market' scaling, where the number of cars scales with the demand), the system is well approximated via a steady-state problem. This is practically meaningful in ride-sharing systems, which can be thought of as being near-stationary over sufficiently small time-scales; such an assumption, however, critically depends on the impact of a single car being ``small'' relative to the rest of the system. In a setting with high-capacity vehicles, however, this ceases to be true, and it is unclear if a stochastic model of our system would exhibit the rapid mixing property with which low-capacity ride-sharing models are endowed, and which allows for these attractive guarantees.
\noindent\textbf{Randomized rounding for resource allocation problems:} Our methodological approach is inspired by the use of {\it configuration programs} for improved approximations for a number of combinatorial optimization problems~\citep{MBA,LP_conf_scheduling,SAP}. At a high level, the approximation algorithms proposed in this line of work reformulate the resource allocation problem as an exponential-size integer program that optimizes over all feasible sets of resources; the LP relaxation of this program can be (approximately) solved in polynomial time, and used to produce approximately optimal solutions to the original problem via rounding. Our main result relies on the randomized rounding scheme proposed by~\citet{SAP} for the Separable Assignment Problem, which comprises a set of bins and items, with a separate packing constraint on each bin, and rewards for each item-bin pair. The objective is to pack items into bins such that the aggregate value of all packed items is maximized. The analogy to the Real-Time Line Planning Problem{} is natural: items correspond to passengers, bins correspond to lines, and the packing constraints correspond to capacity constraints for each bus. The key difference between these two problems is that, in the case of \textsc{Sap}, \emph{bins are provided in advance}, with no associated cost for using a bin. In contrast, the main difficulty in \textsc{Rlpp}{} is in determining which lines to open, given costs for opening each line, and a budget constraint which further couples all lines (bins) together.
\section{Preliminaries}
\label{sec:preliminaries}
\subsection{System Model}
We model the transit network as an undirected weighted graph $G=(V,E)$, with $|V|=n$ potential origin/destination nodes, edges representing roads between these nodes, and edge weights $(\tau_e)_{e\in E}$ representing the \emph{cost} (for example, travel time) required to traverse an edge.
We assume that $\tau_e \geq \tau_{\min}$ for some constant $\tau_{\min} > 0$.
The network is operated by a single Mobility-on-Demand provider (henceforth \emph{platform}), which employs a fleet comprising two types of vehicles: single-occupancy vehicles (\emph{cars}), and high-capacity vehicles (\emph{buses}). The platform makes all scheduling and routing decisions in a centralized manner. These decisions are made over a fixed time-window, wherein prior to the beginning of the window, the platform receives a set of trip-requests (henceforth \emph{passengers}), and then must decide on a set of bus routes, and match passengers to these routes, using cars to cover `first-last mile' travel. The final trip option presented to each passenger must satisfy her travel needs, which we abstract via the notion of \emph{feasible trip options} for each passenger. The aim of the platform is to maximize some appropriate notion of \emph{system welfare}, which incorporates both utilities of passengers, and costs and constraints of the platform.
\begin{figure}[!t]
\centering
\tikzset{every picture/.style={line width=0.75pt}}
\begin{tikzpicture}[x=1.5pt,y=1.5pt,yscale=-1,xscale=1.1]
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (140,170) -- (160,170) ;
\draw [shift={(160,170)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [shift={(140,170)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw (100,130) -- (100,150) ;
\draw (100,150) -- (100,170) ;
\draw (120,130) -- (120,150) ;
\draw (120,150) -- (120,170) ;
\draw (140,130) -- (140,150) ;
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (140,150) -- (140,170) ;
\draw (160,130) -- (160,150) ;
\draw (180,150) -- (180,170) ;
\draw (180,150) -- (180,170) ;
\draw (160,150) -- (160,170) ;
\draw (180,130) -- (180,150) ;
\draw [color={rgb, 255:red, 3; green, 35; blue, 255 } ,draw opacity=1 ] (101,123) -- (158,123) ;
\draw [shift={(161,123)}, rotate = 180] [fill={rgb, 255:red, 3; green, 35; blue, 255 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (93,130) -- (93,140) -- (93,149) ;
\draw [shift={(93,152)}, rotate = 270] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] [dash pattern={on 4.5pt off 4.5pt}] (100,156) -- (137,156) ;
\draw [shift={(140,156)}, rotate = 180] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (140,156) -- (157,156) ;
\draw [shift={(160,156)}, rotate = 180] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (166.5,150) -- (166.5,133) ;
\draw [shift={(166.5,130)}, rotate = 450] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw (140,150) -- (160,150) ;
\draw (160,150) -- (180,150) ;
\draw [shift={(180,150)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [shift={(160,150)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (160,170) -- (180,170)
;
\draw [shift={(180,170)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(160,170)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw (100,170) -- (120,170) ;
\draw [shift={(120,170)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [shift={(100,170)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw (120,170) -- (140,170) ;
\draw [shift={(140,170)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [shift={(120,170)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (100,130) -- (120,130)
;
\draw [shift={(120,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(100,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 200; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (120,130) -- (140,130) ;
\draw [shift={(140,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(120,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (140,130) -- (160,130)
;
\draw [shift={(140,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw (160,130) -- (169.5,130) -- (180,130) ;
\draw [shift={(180,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (100,150) -- (120,150) ;
\draw [shift={(120,150)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(100,150)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (120,150) -- (140,150) ;
\draw [shift={(140,150)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(120,150)}, rotate = 0] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][fill={rgb, 255:red, 208; green, 2; blue, 27 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw [shift={(160,130)}, rotate = 0] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][fill={rgb, 255:red, 0; green, 200; blue, 0 } ,fill opacity=1 ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35]
;
\draw (95,115.4) node [anchor=north west][inner sep=0.75pt] [font=\normalsize] {$s$};
\draw (164,115.4) node [anchor=north west][inner sep=0.75pt] [font=\normalsize] {$d$};
\draw (105,110) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small direct travel by car}};
\draw (52,135) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small hybrid travel}};
\draw (148,179) node [anchor=north west][inner sep=0.75pt] [font=\small,color={rgb, 255:red, 208; green, 2; blue, 27 } ,opacity=1 ] [align=left] {bus line};
\end{tikzpicture}
\caption{Example transit network with a single bus route (marked in red) and a single passenger traveling from source node $s$ to destination node $d$ (marked in green). The passenger has $2$ trip options: she can travel directly by car from $s$ to $d$ (blue arrow), or use a hybrid trip option comprising the dashed portion of the bus route, completing the rest of the trip by car (solid black arrow).}
\label{fig:passenger-options}
\end{figure}
\noindent\textbf{Vehicle Fleet Model.} {As mentioned above, the platform controls both a fleet of cars (which can serve a single passenger) and buses (which are high-capacity). Since in most ride-hailing systems, the former fleet is much larger, and has a high density throughout the city, we primarily focus on the routing/scheduling decisions for buses, incorporating the constraints and costs of the car fleet in the value function of passengers.
}
Buses have a fixed capacity $C \in \mathbb{N}$, corresponding to the maximum number of passengers a bus can simultaneously accommodate.
We define a {\it route} $r$ to be a fixed sequence of consecutive edges of $G$, and let $\mathcal{R}$ denote the set of all routes of cost at most $D \in (0,T]$, where $D$ is a constant determined by the platform (for example, the duration of the longest bus ride such that the trip is completed within the time window). Moreover, the platform is said to serve route $r \in \mathcal{R}$ at frequency $f \in \mathbb{N}$ if $f$ buses traverse $r$ during the time window.
A key abstraction in this paper is that of a {\it line}, which we formally define below.
\begin{definition}[Line]
The platform is said to operate a {\it line} $\ell = (r_{\ell},f_{\ell})$ if it runs high-capacity vehicles on route $r_{\ell}$ at frequency $f_{\ell}$.
\end{definition}
We use $\mathcal{L} = \left\{(r, f) \mid (r,f) \in \mathcal{R}\times\mathbb{N}\right\}$ to denote the set of all \emph{feasible} lines the platform can operate, and let $L=|\mathcal{L}|$. Note that a line can accommodate at most $C\times f_{\ell}$ passengers for each edge $e \in r_{\ell}$, and as such it is without loss of generality to assume that $f_{\ell} \in \{1,\ldots,\lceil N/C \rceil\} \, \forall \, \ell \in \mathcal{L}$, where $N$ is the total number of trip requests during the time window.
The platform has a \emph{budget} $B \in \mathbb{R}_+$ with which to open a set of lines. Let $c_{\ell}$ denote the cost of operating line $\ell$.
We assume that line costs are {{\it strictly increasing}} and {\it subadditive} in the frequencies. That is, suppose lines $\ell_1$ and $\ell_2$ use the same route $r$ and have frequencies $f_1, f_2$, respectively. Then:
\begin{enumerate}[$(i)$]
\item strictly increasing: $f_1 < f_2 \implies c_{\ell_1} < c_{\ell_2}$
\item subadditive: $c_{\ell_1} + c_{\ell_2} \leq c_{\ell_3}$, where $\ell_3 = (r, f_1 + f_2)$.
\end{enumerate}
\noindent\textbf{Passenger Model.}
We use $\mathcal{P}$ to denote the set of all passengers requesting a trip during the time window, and $N = |\mathcal{P}|$ the total number of all such passengers. Each passenger $p\in \mathcal{P}$ is associated with fixed source and destination nodes $(s_p,d_p)$.
To travel between these nodes, she can use a combination of cars and buses: in particular, she can travel directly from $s_p$ to $d_p$ exclusively by car; alternatively, she can travel by bus for the `middle leg' of her journey, and use cars for the first and last legs (if source/destination is not on the bus route). Figure~\ref{fig:passenger-options} illustrates these possibilities.
In principle, a more complex trip option could also involve multiple bus segments. In this work, however, we restrict passengers to take one of the above two trip options.
\textbf{Assumption 1 (No inter-bus transfers).}
A trip can only comprise of a {\it single} bus leg; i.e., the platform cannot assign any passenger to multiple lines.
From a practical perspective, this is a reasonable assumption, given that a passenger may already incur two transfers for the first and last miles of her trip.
More importantly, in Section~\ref{sec:hardness} we show that if we relax this assumption by allowing the platform to use trip options involving even just two inter-line transfers, then we can not hope to achieve any constant-factor approximation.
Given line $\ell$, let $\Omega_{\ell p}$ denote the set of all trip options matching passenger $p$ to line $\ell$ that are \emph{feasible}, i.e., where the passenger completes her journey within the time window. Formally,
\begin{align*}
\Omega_{\ell p} = \Big\{(s_p,i,j,d_p)|\; i,j \in r_{\ell},
p \text{ travels } s_p \rightarrow i \text{ and } j \rightarrow d_p \text{ by car, and } i \rightarrow j \text{ by bus line } \ell\Big\}
\end{align*}
Let {$\Omega_p = \{(\omega, \ell):\omega\in\Omega_{\ell p}, \ell \in \mathcal{L}\}$.}
For each passenger $p$, there is an associated reward (or value) function {$v_p: \Omega_{p} \mapsto \mathbb{R}_+$}, representing the quality (from either the platform or the passenger's perspective) of a trip option using line $\ell$ (including potential costs incurred by the platform for the passenger's short car trip). We assume that $v_{p}(\cdot)$ is {\it non-decreasing} in the frequency of a line. Formally, suppose lines $\ell_1$ and $\ell_2$ use the same route $r$ and have frequencies $f_1$ and $f_2$, respectively. Since $\ell_1$ and $\ell_2$ share the same route $r$, we have $\Omega_{\ell_1 p} = \Omega_{\ell_2 p}$ for all $p \in \mathcal{P}$. Then, $f_1 \leq f_2 \implies v_p(\omega, \ell_1) \leq v_p(\omega, \ell_2)$ for all $\omega \in \Omega_{\ell_1 p}$.
The above formalism naturally covers trip options that {do not involve a bus segment}; in particular, we use $\omega = \varnothing$ to denote the option which consists of a passenger traveling directly from source to destination by car (the {\it no-line} option). With slight abuse of notation, we assume that $v_p(\varnothing) = 0$ for all $p \in \mathcal{P}$. Hence, one can think of the value associated with assigning a passenger to a trip option as being {relative to} the status quo ride-hailing service.
For any passenger $p$ and line $\ell$, we define the \emph{value} associated with matching the two as follows:
\begin{definition}[Passenger-line value]
We define $\omega_{\ell p}$ and $v_{\ell p}$ to respectively be the optimal trip option, and its corresponding value, over all feasible trip options matching passenger $p$ to line $\ell$, i.e.,
\begin{align*}
v_{\ell p} = \max\left\{v_p(\omega,\ell)|\omega \in \Omega_{\ell p}\right\}, \qquad \omega_{\ell p} = \arg\max\left\{v_p(\omega,\ell)|\omega \in \Omega_{\ell p}\right\}
\end{align*}
\end{definition}
If $v_{\ell p} > 0$, we say that line $\ell$ {\it covers} passenger $p$. Let $r_{\ell p}$ denote the sub-route of $r_\ell$ used by passenger $p$ for this option.
If $e \in r_{\ell p}$, we say that the passenger {\it uses} edge $e$. Note that computing $v_{\ell p}$ can be done in polynomial time. This follows from the fact that, if $r_{\ell}$ consists of $n_{\ell}$ edges, there are $O(n_{\ell}^2)$ possible trip options to consider for passenger $p$. Since the maximum cost (duration) of a route $D$ is constant, and $\tau_e$ is lower bounded by a constant for all $e \in E$, then $n_\ell$ is polynomial in $n$.
Using the above notation, we assume throughout that if passenger $p$ is matched to line $\ell$, she uses trip option $\omega_{\ell p}$. This assumption is primarily for the sake of simplifying the presentation; in Appendix~\ref{ssec:relaxing-trip-optimality} we discuss how our algorithm can be modified to consider all possible trip options for each line-passenger pair, and show that this only leads to an additional constant factor loss in the approximation guarantee.
\noindent\textbf{Platform Objective.}
The following example illustrates a natural value function for a platform seeking to design such an integrated mobility service.
\begin{example}\label{ex:value-function}
We abuse notation and assume that, for this example, a trip option can be parametrized by the total duration of the trip $T$ and the duration of the portion of the trip completed by car, denoted $t^{\text{car}}$. Consider the following piecewise linear function, representing the reduction in time traveled by car as compared to a direct trip by car:
\begin{equation}
v_p(T,t^{\text{car}}) = \begin{cases} \beta t_{s_pd_p}^\star-t^{\text{car}} \quad &\text{if } T < (1+\alpha)t_{s_pd_p}^\star, \, t^{\text{car}} < \beta t_{s_pd_p}^\star \\
0 &\text{otherwise}
\end{cases}
\end{equation}
where $t_{s_pd_p}^\star$ represents the time required to travel from $s_p$ to $d_p$ directly by car, $\alpha \in \mathbb{R}_+$ represents passengers' tolerance for the duration of a trip relative to the most direct route, and $\beta \in (0,1]$ controls the gains in efficiency of a trip option.
For this value function, the trip optimality assumption implies that the passenger must be picked up and dropped off at the bus stops that are closest to $s_p$ and $d_p$, respectively.
\end{example}
{Finally, in line with the motivating application of the platform receiving trip requests in advance via a scheduling service, we assume that the platform sees batch demand, and that passengers are willing to wait for the entirety of the time window. As such, we abstract away the notions of travel and clock times.} {In Appendix~\ref{ssec:travel-times} we show that such an assumption is without loss of generality, and that all results hold for a more realistic model in which there are travel times, passengers are associated with the time at which they made the request, and as a result should only be matched to lines whose schedule lines up with the time at which they are traveling.}
\subsection{The Real-Time Line Planning Problem{} (\textsc{Rlpp})}\label{ssec:rlpp}
Let $S \subseteq \mathcal{L}$ denote a subset of lines to be created, and $\mathbf{x} \in \{0,1\}^{N\times L}$ denote an assignment of passengers to the chosen subset of lines. We first define the {\it system welfare} induced by $S$ and $\mathbf{x}$.
{\begin{definition}[Welfare]
Given $S$ and $\mathbf{x}$, the {\it welfare} $W$ of the system is the sum of all passenger-line values for the lines created under this assignment. Formally:
\begin{align*}
W = \sum_{p \in \mathcal{P}}\sum_{\ell \in S} v_{\ell p} x_{\ell p}
\end{align*}
\end{definition}}
We now define the Real-Time Line Planning Problem{}.
\begin{definition}[Real-Time Line Planning Problem{}]
The Real-Time Line Planning Problem{} is defined by a graph $G$, a set of passengers $\mathcal{P}$, costs $\{c_{\ell}\}_{\ell \in \mathcal{L}}$ for opening lines, passenger valuations $\{v_{\ell p}\}_{\ell \in \mathcal{L},p\in\mathcal{P}}$ for using each line, an overall budget $B$, and a bus capacity $C$.
The goal is to find a subset of lines to open and an assignment of passengers to lines that maximize the welfare of the system, such that:
\begin{enumerate}[$(i)$]
\item the total cost of creating all lines in this subset does not exceed the platform's budget;
\item the number of passengers assigned to line $\ell$ and whose trip uses edge $e \in r_{\ell}$ does not exceed the capacity $C\times f_\ell$ of the buses, for all $e \in r_{\ell}$;
\item a passenger is assigned to at most one line (which implies no inter-bus transfers).
\end{enumerate}
\end{definition}
We allow for a passenger to not be assigned to any line. In this case, we assume that the passenger's trip is completed exclusively by car, and yields a value of zero.
Formally, the platform's optimization problem is given by:
\begin{align
{(P)} \qquad \max_{\mathbf{y}, \mathbf{x}} \qquad &\sum_{p \in \mathcal{P}}\sum_{\ell \in \mathcal{L}} v_{\ell p} x_{\ell p} \notag \\
\text{s.t.} \qquad & \sum_{\ell \in \mathcal{L}} c_\ell y_\ell \leq B \label{eq:budget-constraint}\\
& \sum_{\substack{p \in P:\\ e \in r_{\ell p}}} x_{\ell p} \leq C \, f_\ell \, y_\ell \quad \forall \, \ell \in \mathcal{L}, e \in r_\ell \label{eq:capacity-constraint}\\
&\sum_{\ell \in \mathcal{L}} x_{\ell p} \leq 1 \quad \forall \, p \in \mathcal{P} \label{eq:transfer-constraint} \\
&x_{\ell p} \in \{0,1\} \quad \forall \, p \in \mathcal{P}, \ell \in \mathcal{L} \quad \notag \\
&y_{\ell} \in \{0,1\} \quad \forall\, \ell \in \mathcal{L} \notag
\end{align}
Let $OPT$ denote the optimal value of this optimization problem. In this formulation, the decision variables $\mathbf{y} \in \{0,1\}^{L}$ represent the set of lines to be opened. Recall, $\mathbf{x} \in \{0,1\}^{N\times L}$ corresponds to the assignment of passengers to lines. Constraints~\eqref{eq:budget-constraint},~\eqref{eq:capacity-constraint},~\eqref{eq:transfer-constraint} respectively encode the budget, capacity, and assignment to at most one line.
For any passenger $p \in \mathcal{P}$, in the worst case there are exponentially many routes between $s_p$ and $d_p$, and as a result $(P)$ has exponentially many variables and constraints. For our main result, we make the following assumption regarding the set of routes input to \textsc{Rlpp}.
\textbf{Assumption 2 (Candidate set of routes).} The platform has access to a pre-specified set of feasible routes that is polynomial in the size of the network.
We let $L$ denote the size of the set of lines $\mathcal{L}$ induced by the candidate set of routes and all possible frequencies. Note that the candidate set of routes assumption implies that $L$ is polynomial in $n$.
The assumption of such a candidate set is practically rooted in the reality of transportation systems, in which experts typically have knowledge of a priori ``acceptable'' bus routes and can develop good heuristics. Moreover, such an assumption is in line with the approach adopted in prior work on line planning, which typically generates the candidate set of routes via such heuristics~\citep{CEDER, Chakr, Fan}. In Section~\ref{sec:hardness}, we show that one cannot hope to obtain a constant-factor approximation to the Real-Time Line Planning Problem{} unless the platform has access to such a candidate set.
{We note that the above integer linear programming (ILP) formulation problem is the most natural formulation of the platform's optimization problem, as well as the formulation upon which existing exact methods are based~\citep{wan2003mixed,barra2007solving,marin2009urban,nachtigall2008simultaneous}. In Section~\ref{sec:main-result}, we present an equivalent, less-immediate formulation of the platform's optimization problem upon which our algorithm relies. We nonetheless present this natural formulation, as we will benchmark our algorithm's performance against it in Section~\ref{sec:numerical-experiments}.}
Table~\ref{table:notation} summarizes the most frequently-used notation in the paper.
\begin{table*}[h!]
\begin{tabular}{l|l}
\textbf{Symbol} & \textbf{Definition} \\
\hline
$G(V,E)$ & Transit network with $|V|=n$ nodes\\
$\mathcal{L}$ & Pre-specified set of lines, with $L = |\mathcal{L}|$\\
$\mathcal{P}$ & Set of passengers, with $N = |\mathcal{P}|$ \\
$\Omega_{\ell p}$ & Set of feasible trip options for passenger $p$ traveling via line $\ell$ \\
$C$ & Bus capacity \\
$B$ & Platform budget for opening lines \\
$v_{p}(\omega, \ell)$ & Value of trip option $\omega \in \Omega_{\ell p}$ for passenger $p$ traveling via line $\ell$\\
$v_{\ell p}$ & Value of optimal trip option for passenger $p$ on line $\ell$\\
$c_{\ell}$ & Cost of opening line $\ell$ \\
$f_{\ell}$ & Frequency of line $\ell$ \\
\hline
\end{tabular}
\caption{List of frequently-used notations}
\label{table:notation}
\end{table*}
\section{Fundamental limits of real-time routing}
\label{sec:hardness}
The model in Section~\ref{sec:preliminaries} is endowed with two assumptions: $(i)$ the existence of a pre-specified \emph{candidate set} of feasible lines $\mathcal{L}$ that is polynomial in the number of nodes $n$, and $(ii)$ that trip options can involve at most a single bus segment.
In this section, we show that these assumptions are not just practically relevant, but also have strong theoretical justifications: if either assumption fails to hold, a constant-factor approximation is out of reach. We moreover show that, even in the setting where these two assumptions hold, standard approximation techniques that leverage naive LP relaxations and rely on submodularity are inadequate, emphasizing the non-triviality of the task of designing provably good approximations for fast, real-time routing.
In the remainder of this section, we provide the main ideas of our reductions, and defer proofs of all auxiliary propositions to Appendix~\ref{app:hardness-proofs}.
\subsection{Necessity of a candidate set of lines}
Suppose first that the platform{} does not have access to a candidate set of lines, and thus, for each passenger $p \in \mathcal{P}$, must consider all possible walks of bounded cost between source $s_p$ and destination $d_p$. We show that this problem is hard to approximate even in a particularly simple instance of \textsc{Rlpp}\ with only a single allowed line, which we term the Single Line Problem (\textsc{Slp}).
\begin{definition}[Single Line Problem]
In the Single Line Problem, the feasible routes are the walks in the graph of cost at most $D$. Suppose $c_{\ell} = cf_{\ell}$ for all $\ell \in \mathcal{L}$, for some constant $c > 0$. Moreover, suppose $B = c$. That is, only a single line of frequency $f_\ell = 1$ can be opened. The goal is to find the line that maximizes the social welfare of the system.
\end{definition}
Using this, we get our first hardness result for \textsc{Rlpp}.
\begin{theorem}\label{thm:necessity-of-candidate-set}
Unless NP has polynomial Las Vegas algorithms, the Single Line Problem is hard to approximate to a ratio better than $\Omega(\log^{1-\varepsilon} n)$.
\end{theorem}
To establish this inapproximability result, we give a reduction from the Orienteering group TSP problem (\textsc{OgTSP}), for which the approximation lower bound is $\Omega\left(\log^{1-\varepsilon} n\right)$~\citep{recursive_greedy}.
\begin{definition}[Orienteering group TSP]
Given an undirected graph $G=(V,E)$, with edge costs $w: E \mapsto \mathbb{R}_+$, $k$ sets (or groups) of vertices $S_{1},\ldots, S_{k} \subseteq V$, a root vertex $r$ and a budget $D>0$, the goal is to find a walk of cost no more than $D$ which spans the maximum number of groups.\footnote{We assume without loss of generality that the root does not belong to any of the groups.}
\end{definition}
\begin{proof}[Proof of Theorem~\ref{thm:necessity-of-candidate-set}]
Consider an instance of \textsc{OgTSP}. Recall, we've assumed that there exists a constant $\tau_{\min} > 0$ such that $\tau_e > \tau_{\min} \, \forall \, e \in E$. Define $\varepsilon \in (0, \tau_{\min}]$. We use $diam(G)$ to denote the diameter of the graph, and let $t \in \mathbb{R}$ be such that $t > \max\{ diam(G)+\varepsilon, D + \varepsilon\}$.
We construct an instance of \textsc{Slp} as follows. For each group $S_i$, we add a node $g_i$ to $G$, an edge $(r,g_i)$ of cost $t$ and an edge $(j,g_i)$ of cost $t-\varepsilon$ for each node $j \in S_i$. Let $G' = (V',E')$ denote this augmented graph, and let $D$ be the maximum cost of any feasible route on $G'$. For each $i \in [k]$, create a passenger $p_i$ with $s_{p_i} = r$ and $d_{p_i} = g_i$.
For line-passenger pair $(\ell,p_i)$, suppose trip option $\omega$ is such that passenger $p_i$ travels by car from $r$ to $j_1(\omega)$, and from $j_2(\omega)$ to $g_i$, where $j_1(\omega), j_2(\omega) \in V.$ We use $t^{\text{car}}(\omega)$ to denote the total cost of the min-cost paths from $r$ to $j_1(\omega)$ and from $j_2(\omega)$ to $g_i$, and let $t^\star_{p_i}$ denote the min-cost path from $r$ to $g_i$. If $p_i$ travels directly from $r$ to $g_i$ via edge $(r,g_i)$, then $t^{\text{car}}(\omega) = t$.
We define the value function as follows:
\begin{align*}
v_{p_i}(\omega,\ell) = \begin{cases}
1 &\quad \text{ if } t^{\text{car}}(\omega) \leq (1-\frac{\varepsilon}{t})t_{p_i}^\star \\
0 &\quad \text{ otherwise.}
\end{cases}
\end{align*}
\begin{figure}\label{fig:two-lines}
\centering
\includegraphics[scale=0.12]{hardness_51bis.png}
\caption{Construction of graph $G'$ from an instance of \textsc{OgTSP} with two groups $S_1$ and $S_2$. The dashed lines represent the edges of the original graph $G$.}
\end{figure}
Propositions~\ref{prop:helper} and~\ref{prop:hardness-helper} characterize the ways in which $p_i$ can feasibly travel from $r$ to $g_i$.
{\begin{proposition}\label{prop:helper}
For all $\omega$ such that $t^{\text{car}}(\omega) > t-\varepsilon$, $v_{p_i}(\omega,\ell) = 0$.
\end{proposition}}
\begin{proposition}\label{prop:hardness-helper}
Passenger $p_i$ can travel from $r$ to $g_i$ in one of two ways:
\begin{enumerate}[(i)]
\item via edge $(r, g_i)$, in which case this must be by car.
\item by bus from $r$ to $j \in S_i$, and by car via edge $(j,g_i)$.
\end{enumerate}
\end{proposition}
Let $\ell^\star$ denote the optimal solution to \textsc{Slp} for this instance.
\begin{proposition}\label{prop:collect-pos-val}
To collect strictly positive value from passenger $p_i$, $\ell^\star$ {\it must} traverse a node $j \in S_i$.
\end{proposition}
Finally, observe that $\ell^\star$ necessarily only uses edges from $E$. This follows from the fact that all edges in $E'\setminus E$ have cost greater than $D$ by construction, and thus any route using at least one such edge is infeasible.
Putting these facts together, if line $\ell^\star$ collects value $k' \leq k$ then this implies the existence of a walk of $G$ of cost at most $D$ that has visited $k'$ groups. Thus any $\alpha$-approximation algorithm for the Single Line Problem gives an $\alpha$-approximation for the \textsc{OgTSP}, hence the $\Omega(\log^{1-\varepsilon}(n))$ lower bound for the Single Line Problem.
\end{proof}
\subsection{Hardness of multiple transfers}
Suppose now that the platform{} has access to a candidate set of lines, but allows itself to assign passengers to {at most} {\it two} lines. More specifically, a passenger $p$ can feasibly be assigned to the following trip options:
\begin{enumerate}[$(i)$]
\item Travel directly from $s_p$ to $d_p$ by car;
\item Use a single bus line $\ell \in \mathcal{L}$: for some $v_1 \in r_{\ell}, v_2 \in r_{\ell}$, travel from $s_p$ to $v_1$ by car; join line $\ell$ at $v_1$ and travel to $v_2$ by bus; travel from $v_2$ to $d_p$ by car;
\item Use two intersecting bus lines $(\ell_1,\ell_2) \in \mathcal{L}\times\mathcal{L}$: for some $v_1 \in r_{\ell_1}, v_2 \in r_{\ell_1}\bigcap r_{\ell_2}, v_3 \in r_{\ell_2}$, travel from $s_p$ to $v_1$ by car; join line $\ell_1$ at $v_1$ and travel to $v_2$ by bus; join line $\ell_2$ at $v_2$ and travel to $v_3$ by bus; travel from $v_3$ to $d_p$ by car. Figure~\ref{fig:two-lines} illustrates such a trip. {We use $\Omega_{(\ell_1,\ell_2),p}$ to denote the set of all such trips.}
\end{enumerate}
Let $v_{(\ell_1,\ell_2),p}$ denote the maximum value passenger $p$ has for all feasible trips using lines $\ell_1$ and $\ell_2$, where $r_{\ell_1}$ and $r_{\ell_2}$ intersect. That is, $v_{(\ell_1,\ell_2),p}= \max\limits_{\substack{\omega \in \Omega_{(\ell_1,\ell_2),p}}} v_{p}(\omega)$. If $v_{(\ell_1,\ell_2),p} > 0$, we say that passenger $p$ is {\it covered} by $\ell_1$ and $\ell_2$.\
\begin{figure}[!t]
\centering
\tikzset{every picture/.style={line width=0.75pt}}
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
\draw (120,90) -- (160,130) ;
\draw [shift={(160,130)}, rotate = 45] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw [shift={(120,90)}, rotate = 45] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw (160,130) -- (200,170) ;
\draw (160,130) -- (230,100) ;
\draw [shift={(230,100)}, rotate = 336.8] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw (260,90) -- (230,100) ;
\draw (90,160) -- (160,130) ;
\draw [shift={(160,130)}, rotate = 336.8] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (0, 0) circle [x radius= 3.35, y radius= 3.35] ;
\draw (100,70) -- (120,90) ;
\draw [color={rgb, 255:red, 3; green, 3; blue, 226 } ,draw opacity=1 ] (139,63) -- (121.12,80.88) ;
\draw [shift={(119,83)}, rotate = 315] [fill={rgb, 255:red, 3; green, 3; blue, 226 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [color={rgb, 255:red, 3; green, 3; blue, 226 } ,draw opacity=1 ] (234,93) -- (221.17,62.76) ;
\draw [shift={(220,60)}, rotate = 427.01] [fill={rgb, 255:red, 3; green, 3; blue, 226 } ,fill opacity=1 ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [dash pattern={on 4.5pt off 4.5pt}] (130,92) -- (157.81,117.95) ;
\draw [shift={(160,120)}, rotate = 223.03] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw [dash pattern={on 4.5pt off 4.5pt}] (168,121) -- (215.21,102.11) ;
\draw [shift={(218,101)}, rotate = 518.2] [fill={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.08] [draw opacity=0] (5.36,-2.57) -- (0,0) -- (5.36,2.57) -- cycle ;
\draw (101,80.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$v_{1}$};
\draw (151,137.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$v_{2}$};
\draw (221,103.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$v_{3}$};
\draw (141,47.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$s$};
\draw (223,47.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$d$};
\draw (204,159.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$\ell _{1} \ $};
\draw (71,143.4) node [anchor=north west][inner sep=0.75pt] [font=\small] {$\ell _{2} \ $};
\end{tikzpicture}
\caption{Assignment of a passenger to a pair of lines. The passenger travels by car from $s$ to $v_1$. Between $v_1$ and $v_2$, she travels by bus via line $\ell_1$. At $v_2$ she travels via line $\ell_2$ until being dropped off at $v_3$. She completes her trip by car between $v_3$ and $d$.}
\label{fig:two-lines}
\end{figure}
We refer to the problem of matching passengers to at most two bus lines as the {\it Two-Transfer Problem} (\textsc{Ttp}), which we formally define below.
\begin{definition}[Two-Transfer Problem]
Given a budget $B$ and costs $\{c_\ell\}$, the goal is to find a subset $S \subseteq \mathcal{L}$ of budget-respecting lines to open and a feasible assignment of passengers to $S$ which maximizes the social welfare of the system, given by:
\begin{equation*}
\sum_{p\in \mathcal{P}}\left( \sum_{\ell\in S} v_{\ell p} x_{\ell p} + \sum_{(\ell_1,\ell_2)\in S\times S} v_{(\ell_1,\ell_2),p} \, x_{(\ell_1,\ell_2),p}\right).
\end{equation*}
As before, $\mathbf{x}$ is an indicator variable representing the assignment of passengers to lines.
\end{definition}
Our next hardness result shows that allowing even two inter-bus transfers banishes any hope of obtaining a constant-factor approximation for \textsc{Rlpp}.
\begin{theorem}\label{thm:hardness-many-transfers}
Under the exponential time hypothesis, the Two-Transfer Problem is hard to approximate to a ratio better than $\Omega\left(n^{{1}/{(\log\log(n))^c}}\right)$, where $c > 0$ is a universal constant.
\end{theorem}
To prove the theorem, we give a reduction from the densest $k$-subgraph problem, {which admits an approximation lower bound of $\Omega(n^{1/(\log\log n)^c})$ under the exponential time hypothesis~\citep{manurangsi2017almost}.} Given a graph $G=(V,E)$ and a subgraph $G_s=(V_s,E_s)$ of $G$, the density of any subgraph $G_s$ is the ratio of number of edges to the number of nodes in $G_s$ (i.e.$\frac{|E_s|}{|V_s|}$). Now, the densest $k$-subgraph problem is as follows:
\begin{definition}[Densest $k$-subgraph]
Given a graph $G=(V,E)$ with $n = |V|$ and $k\in [n]$, the objective is to find a subgraph $G_s$ of $G$ containing {exactly} $k$ vertices with maximum density.
\end{definition}
{Note that, for fixed $k$, finding the subgraph of maximum density is equivalent to finding a subgraph of size $k$ with the maximum number of edges.}
\begin{proof}[Proof of Theorem~\ref{thm:hardness-many-transfers}]
Given an instance of densest $k$-subgraph, we build an instance of \textsc{Ttp} as follows. For each node $i \in V$, construct a line $\ell_i$, with $c_{\ell_i} = 1$ and frequency $f_{\ell_i}$ large enough to cover all passengers. For every edge $(i,j) \in E$, define a passenger $p_{ij}$, and suppose that $p_{ij}$ can only be covered by the pair of lines $(\ell_i, \ell_j)$, with $v_{(\ell_i,\ell_j),p_{ij}} = 1$. That is, $p_{ij}$ {\it has no value associated with a single bus line.} Finally, let $B = k$.
We first claim that, for any \textsc{Ttp} feasible solution of value $k'$ which opens $k'' < k$ lines, one can construct a feasible solution which opens {\it exactly} $k$ lines and has value at least $k'$. This simply follows from non-negativity of the value function and the fact that $c_{\ell_i} = 1$ for all $i$. Thus, the platform can always open $k-k''$ more lines until hitting its budget constraint and not decrease the objective, and it is without loss of generality to only consider feasible solutions that open exactly $k$ lines.
We complete the proof by noting that a feasible solution of value $k'$ corresponds exactly to a subgraph of $G$ containing $k'$ edges (passengers) and $k$ nodes (lines). Thus, if we had a constant-factor approximation algorithm for \textsc{Ttp}, then we would also be able to approximate densest $k$-subgraph within a constant factor
\end{proof}
Henceforth, we operate under the no inter-bus transfers and candidate set of lines assumptions.
\subsection{Inefficacy of standard approximation techniques}
Observe that the ILP formulation of the Real-Time Line Planning Problem{} bears a strong resemblance to the Capacitated Facility Location Problem (\textsc{Cflp}), for which~\citet{Wolsey} provides a $1-\frac1e$ approximation algorithm, a guarantee relying on the underlying {\it submodular} structure of \textsc{Cflp}. Our problem crucially differs from this latter problem, however, in the way capacity is accounted for. Whereas the number of clients assigned to a location cannot exceed its capacity in \textsc{Cflp}, in the Real-Time Line Planning Problem{} the number of passengers assigned to a bus {\it can exceed} its capacity, as passengers may require non-overlapping subpaths of a bus route. In this section, we show that this simple fact fundamentally alters the structure of our problem, and as such precludes the use of standard techniques for submodular function maximization.
Let $w: \{0,1\}^{L} \mapsto \mathbb{R}$ denote the social welfare induced by the optimal assignment of passengers to lines, for a given subset of open lines, represented by $\mathbf{y}$. Formally:
\begin{align*}
w(\mathbf{y}) = \max_{\mathbf{x}} \qquad &\sum_{p \in \mathcal{P}}\sum_{\ell \in \mathcal{L}} v_{\ell p} x_{\ell p} \notag \\
\text{s.t.} \qquad
& \sum_{\substack{p \in P:\\ e \in r_{\ell p}}} x_{\ell p} \leq C \, f_\ell \, y_\ell \quad \forall \, \ell \in \mathcal{L}, e \in r_{\ell} \notag \\
&\sum_{\ell \in \mathcal{L}} x_{\ell p} \leq 1 \quad \forall \, p \in \mathcal{P} \notag \\
&x_{\ell p} \in \{0,1\} \quad \forall \, p \in \mathcal{P}, \ell \in \mathcal{L} \notag
\end{align*}
Then, we have:
\begin{align*}
OPT = \max_{\mathbf{y}} \qquad &w(\mathbf{y}) \\
\text{s.t.} \qquad & \sum_{\ell \in \mathcal{L}} c_\ell y_\ell \leq B\\
&y_{\ell} \in \{0,1\} \quad \forall\, \ell \in \mathcal{L} \notag
\end{align*}
\begin{proposition}\label{prop:not-submodular}
$w$ is not submodular.
\end{proposition}
Another common approach is to develop an approximation algorithm based on an LP relaxation of the ILP. Proposition~\ref{prop:integrality-gap} however shows that such an approach can give strictly worse bounds than the $1-\frac1e$ benchmark.
\begin{proposition}\label{prop:integrality-gap}
The worst-case integrality gap for $(P)$ is no better than $\frac12$.
\end{proposition}
\section{Main result}
\label{sec:main-result}
In this section, we design an approximation algorithm for the Real-Time Line Planning Problem{} that achieves at least $1-\frac1e-\varepsilon$ fraction of the optimal solution in expectation, and produces a solution whose cost is budget-respecting with high probability, as the platform's budget grows large.
{Our high-level approach is as follows. We first formulate the Real-Time Line Planning Problem{} as a configuration ILP, and solve a conservative LP relaxation of this latter program, in the sense that it has a stricter budget than the platform's true budget $B$. We then use a variant of the rounding scheme developed by~\citet{SAP} to produce an approximately feasible integer solution. The key difficulty in such an approach is approximating the exponential-size configuration LP without incurring too much of a loss. Our main contribution in this respect is to show that the structure of \textsc{Rlpp}{} allows us to solve it {\it exactly} in polynomial-time by leveraging the additional structure of our problem in the dual space. Throughout the rest of the section, we defer the proofs of auxiliary facts to Appendix~\ref{app:main-result-proofs}.}
\subsection{An exponential-size configuration ILP}
Consider line $\ell$, and let $\mathcal{I}_{\ell}$ denote the family of all feasible assignments of passengers to $\ell$, where a feasible assignment is such that, for all $e \in r_{\ell}$ the total number of passengers using $e$ does not exceed the capacity of the line. We use $S$ to denote any such assignment in $\mathcal{I}_{\ell}$. $X_{\ell S}$ is the indicator variable representing whether or not the set of passengers $S$ is chosen for line $\ell$. Formally, $S \in \mathcal{I}_{\ell}$ satisfies $\sum\limits_{\substack{p \in S:\\e \in r_{\ell p}}} X_{\ell S} \leq C f_{\ell}$ for all $e \in E$. {Example~\ref{ex:SAP} illustrates this notation.
\begin{example}\label{ex:SAP}
Consider lines $\ell_1, \ell_2$ and passengers $p_1, p_2$, with $p_1$ and $p_2$ using the same edges of each line. If $C = 2$, then $\mathcal{I}_{\ell_i} = \left\{\{p_1\}, \{p_2\}, \{p_1, p_2\}\right\}$ for $i \in \{1,2\}$. If $C = 1$, then $\mathcal{I}_{\ell_i} = \left\{\{p_1\}, \{p_2\}\right\}$ for $i \in \{1,2\}$.
\end{example}
}
We can now represent {\textsc{Rlpp}} as the following exponential-size integer program:
\begin{align}
{\widehat{P}:=} \qquad \max_{\left\{X_{\ell S}\right\}} \qquad
& \sum_{p \in \mathcal{P}} \; \sum_{\ell\in \mathcal{L}} \sum_{\substack{S \in \mathcal{I}_{\ell}:\\p\in S}}v_{\ell p} X_{\ell S} \notag\\
\text{s.t.}\qquad & \sum_{\ell\in \mathcal{L}} c_\ell\left( \sum_{S\in \mathcal{I}_\ell} X_{\ell S}\right) \leq B \label{budget-config-lp-1}\\
& \sum_{S\in \mathcal{I}_\ell} X_{\ell S} \leq 1\qquad\qquad \forall \, \ell \in \mathcal{L} \label{one-set-per-line-1} \\
&\sum_{\ell\in \mathcal{L}} \sum_{\substack{S \in \mathcal{I}_{\ell}:\\p\in S}} X_{\ell S} \leq 1 \qquad \forall \, p \in \mathcal{P} \label{cust-to-one-set-1} \\
& X_{\ell S} \in \{0,1\} \qquad\qquad \forall \, \ell\in \mathcal{L}, S \in \mathcal{I}_{\ell}\notag
\end{align}
Constraint~\eqref{one-set-per-line-1} requires that only one set of passengers be chosen for each line, and Constraint~\eqref{cust-to-one-set-1} ensures that each passenger is only assigned to one line. If a set of passengers is assigned to line $\ell$, that is, if $\sum_{S \in \mathcal{I}_{\ell}} X_{\ell S} > 0$, then $\ell$ is opened and the platform{} incurs cost $c_{\ell}$; else, $\ell$ is not created and no cost is incurred. Let $OPT$ denote the optimal value of $\widehat{P}$.
\subsection{Approximating the exponential-size ILP}
{For a given constant $\varepsilon \in (0,\frac12)$, Algorithm~\ref{alg:rounding} makes use of the following auxiliary configuration LP, which we denote $\widehat{P}^{(\varepsilon)}$.}
{\begin{align}
{\,\widehat{P}^{(\varepsilon)}\,:=} \qquad \max_{\left\{X_{\ell S}\right\}} \qquad
& \sum_{p \in \mathcal{P}} \; \sum_{\ell\in \mathcal{L}} \sum_{\substack{S \in \mathcal{I}_{\ell}:\\p\in S}}v_{\ell p} X_{\ell S} \notag\\
\text{s.t.}\qquad & \sum_{\ell\in \mathcal{L}} c_\ell\left( \sum_{S\in \mathcal{I}_\ell} X_{\ell S}\right) \leq B(1-\varepsilon) \label{budget-constraint-relaxation}\\
& \sum_{S\in \mathcal{I}_\ell} X_{\ell S} \leq 1\qquad\qquad \forall \, \ell \in \mathcal{L} \label{one-set-per-line-relaxation} \\
&\sum_{\ell\in \mathcal{L}} \sum_{\substack{S \in \mathcal{I}_{\ell}:\\p\in S}} X_{\ell S} \leq 1 \qquad \forall \, p \in \mathcal{P} \label{one-passenger-per-set-relaxation} \\
& X_{\ell S} \in [0,1] \qquad\qquad \forall \, \ell\in \mathcal{L}, S \in \mathcal{I}_{\ell}\notag
\end{align}}
Let ${OPT}^{(\varepsilon)}$ denote the optimal value of $\widehat{P}^{(\varepsilon)}$, and $\left\{X_{\ell S}^{(\varepsilon)}\right\}$ its optimal solution.
Algorithm~\ref{alg:rounding} presents a high-level description of our algorithm.
\begin{algorithm}
\begin{algorithmic}
\Require {$G = (V,E), \mathcal{P},\mathcal{L},\left\{\mathcal{I}_{\ell}\right\}_{\ell\in\mathcal{L}}, \varepsilon \in (0,\frac12)$}
\Ensure {set of lines to open, passenger assignment to each line}
\State Compute $v_{\ell p}$ for all $\ell \in \mathcal{L}, p \in \mathcal{P}$.
\State Solve $\widehat{P}^{(\varepsilon)}$.
\State \textbf{Rounding:} For all $\ell \in \mathcal{L}, S \in \mathcal{I}_{\ell}$ such that $X_{\ell S}^{(\varepsilon)} > 0$, {open $\ell$ and}, independently for each line $\ell$, assign $S$ to $\ell$ with probability $X_{\ell S}^{(\varepsilon)}$.
\State \textbf{Re-assignment:} If passenger $p$ is assigned to multiple lines, choose the line maximizing $v_{\ell p}$. Close all lines for which no passengers are any longer assigned.
\State \textbf{Aggregation:} {If there exist open lines $\ell_1, \ell_2$ such that $r_{\ell_1} = r_{\ell_2} = r$ and $f_{\ell_1} \neq f_{\ell_2}$, close $\ell_1$ and $\ell_2$ and open $\ell^\prime = (r, f_{\ell_1} + f_{\ell_2}).$ Assign all passengers formerly using $\ell_1$ or $\ell_2$ to $\ell^{\prime}$.}
\end{algorithmic}
\caption{Randomized rounding for \textsc{Rlpp}\label{alg:rounding}}
\end{algorithm}
Let $ALG$ denote the expected value of the solution returned by Algorithm~\ref{alg:rounding}. Theorem~\ref{thm:main-thm} establishes our main result.
\begin{theorem}\label{thm:main-thm}
Algorithm~\ref{alg:rounding} respects the budget in expectation, and is of cost no more than $B$ with probability at least $1 -e^{-\varepsilon^2B/3c_{\max}}$,
where $c_{\max} = \max_{\ell \in \mathcal{L}} c_\ell$. Moreover,
$$ALG \geq \left(1-\frac1e-\varepsilon\right)OPT.$$
\end{theorem}
{Note that the choice of $\varepsilon$ trades off between quality of approximation and feasibility of the rounded solution: as $\varepsilon$ increases, the solution is exponentially more likely to be budget-respecting; on the other hand, we lose $\varepsilon$-fraction of the optimum in terms of the approximation guarantee.}
{To prove Theorem~\ref{thm:main-thm}, we establish the following facts, which characterize the loss incurred in each step of the algorithm:
\begin{enumerate}[$(i)$]
\item\label{f5} $OPT^{(\varepsilon)} \geq (1-\varepsilon)OPT$ (Proposition~\ref{prop:loss-from-epsilon}).
\item $\widehat{P}^{(\varepsilon)}$ can be solved in polynomial time (Theorem~\ref{thm:hardness-many-transfers});
\item\label{f4} the loss from rounding and re-assignment is at most $\frac1e$ fraction of the optimal value of $\widehat{P}^{(\varepsilon)}$ (Proposition~\ref{thm:rounding_value});
\item\label{f1} the aggregation step maintains a feasible assignment of passengers to lines, and neither increases the cost of the solution nor decreases the objective (Proposition~\ref{prop:final-step-doesnt-matter});
\item\label{f2} the cost of the final solution respects the platform's budget with high probability (Corollary~\ref{cor:cost});
\end{enumerate}}
We first show that the loss incurred from solving the auxiliary LP is not too large.
\begin{proposition}\label{prop:loss-from-epsilon}
For all $\varepsilon \in [0,1]$, $$OPT^{(\varepsilon)} \geq (1-\varepsilon)OPT.$$
\end{proposition}
\begin{proof
Let $\{X_{\ell S}^{(0)}\}$ denote the optimal solution to $\widehat{P}^{(0)}$. Observe that $\{(1-\varepsilon)X_{\ell S}^{(0)}\}$ is feasible for the problem $\widehat{P}^{(\varepsilon)}$, and that the objective of $\widehat{P}^{(\varepsilon)}$ evaluated at this feasible solution is: $$(1-\varepsilon)\sum_{p \in \mathcal{P}}\sum_{\ell\in\mathcal{L}}\sum_{\substack{S \in \mathcal{I}_{\ell}:\\ p \in S}} v_{\ell p}X_{\ell S}^{(0)} = (1-\varepsilon) OPT^{(0)}$$
Observe moreover that $\widehat{P}^{(0)}$ corresponds to the LP relaxation of $\widehat{P}$, and thus $OPT^{(0)} \geq OPT$. Chaining these two inequalities together we obtain the fact.
\end{proof}
We next observe that Algorithm~\ref{alg:rounding} is underdetermined as defined. In particular, it is a priori unclear how, if at all, one can efficiently solve $\widehat{P}^{(\varepsilon)}$ in polynomial time, or if the best we can hope for is an approximation. Our key contribution is showing that this can in fact efficiently be done, and as a result the only losses potentially incurred by the algorithm come from the rounding, re-assignment, and aggregation steps.
\begin{theorem}\label{thm:poly-time-separation}
$\widehat{P}^{(\varepsilon)}$ can be solved in polynomial time.
\end{theorem}
\begin{proof
Since $\widehat{P}^{(\varepsilon)}$ has an exponential number of variables but only a polynomial number of constraints (in the number of passengers and lines, and hence in $n$), its dual has polynomially many variables, and as such can be solved in polynomial time via the ellipsoid method, {\it assuming access to a polynomial-time separation oracle}~{\citep{bland1981ellipsoid}}. {Given this, one can obtain an optimal primal solution by solving the primal problem with only the variables corresponding to the dual constraints present when the ellipsoid method has terminated (of which there are polynomially many, since the ellipsoid method only makes a polynomial number of calls to the separation oracle)~\citep{carr2000randomized}. Thus, it suffices to design a separation oracle which runs in polynomial time.}
Let $\widehat{D}^{(\varepsilon)}$ denote the dual of $\widehat{P}^{(\varepsilon)}$, with $\alpha, \{q_{\ell}\}, \{\lambda_p\}$ the dual variables corresponding{ to constraints~\eqref{budget-constraint-relaxation}, \eqref{one-set-per-line-relaxation} and \eqref{one-passenger-per-set-relaxation}, respectively.} The dual is given by:
\begin{align*}
\widehat{D}^{(\varepsilon)} := \qquad \min_{\substack{\{q_{\ell}\}, \{\lambda_p\}, \alpha}}
\qquad & \sum_{\ell \in \mathcal{L}} q_\ell + \sum_{p \in \mathcal{P}} \lambda_p +B(1-\varepsilon)\alpha\\
\text{s.t.} \qquad & q_\ell + \alpha c_\ell \geq \sum_{p\in S} \left(v_{\ell p} - \lambda_p\right) \qquad \forall \, \ell \in \mathcal{L}, S\in \mathcal{I}_\ell \\
& q_\ell \geq 0 \quad \forall \, \ell \in \mathcal{L},\quad \lambda_p \geq 0 \quad \forall \, p \in \mathcal{P}, \quad \alpha \geq 0
\end{align*}
For all $\ell\in\mathcal{L}$, let $\mathcal{F}_{\ell}$ denote the polytope defined by the set of constraints:
\begin{equation*}
q_\ell + \alpha c_\ell \geq \sum_{p\in S} (v_{\ell p}-\lambda_p) \qquad \forall \, S\in \mathcal{I}_\ell
\end{equation*}
It suffices to show that we can design a polynomial time separation algorithm for the polytope $\mathcal{F}_{\ell}$. That is, given $q_{\ell}, \alpha,$ and $\left\{\lambda_p\right\}$, the separation algorithm must be able to find a violated constraint for $\mathcal{F}_\ell$ or certify that all constraints in $\mathcal{F}_\ell$ are satisfied.
Algorithm~\ref{alg:separation} formally describes our separation oracle.
\begin{algorithm}
\begin{algorithmic}
\Require {$q_{\ell}, \alpha, \{\lambda_p\}, \mathcal{F}_{\ell}$}
\Ensure {violated constraint for $\mathcal{F}_{\ell}$, or a certification that all constraints in $\mathcal{F}_{\ell}$ are satisfied}
\State Solve the following LP:
\begin{align}
\max_{\{x_p\}} \qquad & \sum_{p \in \mathcal{P}} (v_{\ell p}-\lambda_p) x_p\notag\\\
\text{s.t.} \qquad & \sum_{\substack{p \in \mathcal{P}: \\ e \in r_{\ell p}}} x_p \leq Cf_{\ell} \qquad \, \forall \, e \in r_{\ell} \label{single_line_subproblem}\\ & 0 \leq x_p \leq 1 \qquad \forall \, p \in \mathcal{P}.\notag
\end{align}
Let LP-SEP denote its optimal value, and $\{x_p^\star\}$ an optimal solution to this problem.
\State If LP-SEP $\leq q_{\ell} + \alpha c_{\ell}$, then return that all constraints in $\mathcal{F}_{\ell}$ are satisfied. Else, return $S^\star = \{p:x_{p}^\star > 0\}$.
\end{algorithmic}
\caption{Separation Algorithm for the Ellipsoid Method\label{alg:separation}}
\end{algorithm}
Our separation algorithm solves an LP with polynomially many variables and constraints, and as such runs in polynomial time.{\footnote{We note that, given a dual solution, one can efficiently find a primal solution, as observed by~\citet{carr2000randomized}.}} However, correctness of the algorithm is not immediate: the LP is a relaxation of the set problem we are interested in, and as such $\sum_{p} \left(v_{\ell p} - \lambda_p\right) x_p^\star \geq \max_{S \in \mathcal{I}_{\ell}} \sum_{p \in S}\left(v_{\ell p} - \lambda_p\right)$. If this inequality was strict, the separation algorithm would incorrectly return that a constraint has been violated, when in fact all have been satisfied. {Observe that this would only occur if $\{x^\star_p\}$ were fractional; the separation algorithm we propose, however, is a capacitated variant of the assignment problem, for which the linear programming relaxation is known to admit an integral solution~\citep{bertsekas1991linear}.} Lemma~\ref{lem:correctness} formalizes this high-level intuition, and thus establishes that this inequality is in fact always tight.
This then concludes the proof of the fact that $\widehat{P}^{(\varepsilon)}$ is poly-time solvable.
\begin{lemma}\label{lem:correctness}
$\{x_p^\star\}$ is integral. Thus,
$$\sum_{p} \left(v_{\ell p} - \lambda_p\right)x_p^\star = \max_{S \in \mathcal{I}_{\ell}} \sum_{p \in S}\left(v_{\ell p} - \lambda_p\right).$$
\end{lemma}
\end{proof}
Proposition~\ref{thm:rounding_value} establishes the loss incurred from the rounding step, and follows from~\cite{SAP}. For the sake of completeness, we include the proof in Appendix~\ref{app:main-result-proofs}.
\begin{proposition}\label{thm:rounding_value}
Let $\widetilde{ALG}$ denote the value of the solution immediately after the re-assignment step. Then, $\widetilde{ALG} \geq (1-\frac1e)OPT^{(\varepsilon)}$.
\end{proposition}
We next show that no additional loss is incurred in the aggregation step of our algorithm.
\begin{proposition}\label{prop:final-step-doesnt-matter}
The aggregation step maintains a feasible assignment of passengers to lines. Moreover, let $\widetilde{ALG}$ denote the value of the solution {\it before} the final aggregation step, and let $\{\widetilde{Y}_{\ell}\}$ and $\{Y_{\ell}\}$ respectively denote the indicator variables corresponding to whether or not a line was opened, before and after the aggregation step; let $c(\widetilde{Y})$ and $c(Y)$ denote the costs of these respective solutions. Then, ${ALG} \geq \widetilde{ALG}$, and $c(Y) \leq c(\widetilde{Y})$.
\end{proposition}
\begin{proof
The fact that the objective weakly increases after the aggregation step follows from the fact that $\ell_1$ and $\ell_2$ share the same route, and $v_p(\cdot)$ is non-decreasing in the line frequency for all $p \in \mathcal{P}$. Moreover, $c(Y) \leq c(\widetilde{Y})$ follows from subadditivity of the cost function.
We now argue that a feasible assignment of passengers to lines is maintained after the aggregation step, i.e., that the bus capacity constraint is not violated for line $\ell' = (r, f_{\ell_1} + f_{\ell_2})$. Let $\left\{X_{\ell p}\right\}$ and $\{\widetilde{X}_{\ell p}\}$ be the indicator variables respectively denoting the assignment of passengers to lines, after and before the aggregation step. For all $e \in r$, we have:
\begin{align*}
\sum_{p: e \in r_{\ell' p}}X_{\ell' p} \stackrel{(a)}{=} \sum_{p:e \in r_{\ell_1 p}} \widetilde{X}_{\ell_1 p} + \sum_{p:e \in r_{\ell_2 p}} \widetilde{X}_{\ell_2 p} \stackrel{(b)}{\leq} C(f_{\ell_1} + f_{\ell_2}),
\end{align*}
where~$(a)$ follows from the aggregation construction and~$(b)$ follows from the fact that the assignment of passengers to lines {\it before} the aggregation step was feasible by construction, for both $\ell_1$ and $\ell_2$.
\end{proof}
To complete the proof of the theorem, we characterize the cost of the solution returned by Algorithm~\ref{alg:rounding}. We defer the proof of Proposition~\ref{prop:cost-characterization} to Appendix~\ref{app:main-result-proofs}.
\begin{proposition}\label{prop:cost-characterization}
The solution returned by Algorithm~\ref{alg:rounding} satisfies the budget constraint in expectation. Moreover, for all $\delta \in (0,1]$, the cost of the solution returned by Algorithm~\ref{alg:rounding} is at most $B(1-\varepsilon)(1+\delta)$ with probability at least $1 - e^{-\delta^2(1-\varepsilon)B/3c_{\max}}$.
\end{proposition}
The probabilistic budget guarantee follows from taking $\delta = \frac{\varepsilon}{1-\varepsilon}$.
\begin{corollary}\label{cor:cost}
The cost of the solution returned by Algorithm~\ref{alg:rounding} satisfies the budget constraint with probability at least $1-e^{-\varepsilon^2 B/3c_{\max}}$.
\end{corollary}
We complete the proof of Theorem~\ref{thm:main-thm} by putting together the facts established above.
\begin{proof}[Proof of Theorem~\ref{thm:main-thm}.]
Corollary~\ref{cor:cost} establishes the cost characterization.
For the approximation guarantee, putting together Theorem~\ref{thm:poly-time-separation} with Propositions~\ref{thm:rounding_value},~\ref{prop:final-step-doesnt-matter} and~\ref{prop:loss-from-epsilon}, we obtain that
$$ALG \geq \left(1-\frac1e\right)OPT^{(\varepsilon)} \geq \left(1-\frac1e\right)(1-\varepsilon)OPT \geq \left(1-\frac1e-\varepsilon\right)OPT.$$
\end{proof}
\section{Numerical Experiments}
\label{sec:numerical-experiments}
{Finally, we complement our theoretical results by demonstrating the practical efficacy of our algorithm on: $(i)$ the Manhattan network, with real passenger data from for-hire vehicle ride requests, and $(ii)$ on a synthetic dataset based on a random network, designed to minimize any structural advantages. We present the former here, and defer our synthetic experiments to~\cref{app:synthetic_experiments}.}
We compare the solution returned by our algorithm to that of a state-of-the-art ILP solver, run on problem $(P)$ in Section~\ref{ssec:rlpp}. Note that the ILP solver cannot directly solve the configuration LP $\widehat{P}$, due to its exponential size, which is why instead feed it the natural formulation of the problem $(P)$. To emulate the real-time constraints on such a policy in practice, we run both our algorithm and the ILP solver under a strict time budget.
\subsection{Practical Implementation}
\label{procedure}
Although the theoretical analysis of our algorithm relies on using the ellipsoid method for solving the configuration LP, in practice, column generation is known to be more efficient (despite lacking poly-time guarantees){~\citep{desaulniers2006column}}.
Thus, in our experiments we opt for column generation, where the generation of the new columns is done using our separation algorithm (Algorithm~\ref{alg:separation}).
Given an instance $I$ of \textsc{Rlpp}, and parameters $\varepsilon \in (0,\frac12)$, $m \in \mathbb{N}$, we proceed as follows:
\begin{enumerate}
\item Solve the configuration LP $\widehat{P}^{(\varepsilon)}$ in Algorithm~\ref{alg:rounding} via column generation. Return the current LP solution once the time budget has been exceeded.
\item\label{step-2} Simulate the rounding through re-aggregation steps of Algorithm~\ref{alg:rounding} $m$ times.
\item Let $\mathcal{S}_B(I)$ denote the set of all budget-respecting solutions of the $m$ realized solutions;
return the solution of maximum value in $\mathcal{S}_B(I)$.
\end{enumerate}
We note that this procedure retains our polynomial-time guarantees. Moreover, it benefits from the fact that Step~\ref{step-2} is easily parallelizable. In our experiments, we use $\varepsilon = 0.05$ and $m = 10^4$.
\subsection{Experimental setup and results}
To test the performance of our algorithm in a realistic setting, we develop a new dataset for modeling Mobility-on-Demand platforms, based on the Manhattan road network. We obtain the network from the publicly available OpenStreetMap (OSM) geographical data~\citep{boeing2017osmnx}.
\noindent\textbf{Line inputs.} We set the size of the candidate set of lines to be $L = 1,000$, and generate the candidate set based on the skeleton method proposed by~\citet{SILMAN1974201}, by iteratively choosing four nodes in the graph, uniformly at random, and connecting them via shortest path.
We also set {$c_{\ell}$ to be proportional to the total travel time between the start and end nodes of line $\ell$.}
{We set the bus capacity $C = 30$, and assume that all bus routes operate at frequency 1. {Note that increasing the frequency of a line is equivalent to duplicating a route of frequency 1 in our algorithm. In our synthetic experiments (\cref{app:synthetic_experiments}) we observe that our algorithm's performance improves relative to the ILP solver as the size of the candidate set of lines increases. Thus, assuming frequency 1 lines only serves as a lower bound on our algorithm's performance on the real-world dataset.}
\noindent\textbf{Passenger inputs.}
We use records of for-hire vehicle trips in Manhattan using the New York City Open Data platform, considering an hour's worth of trip requests between 5pm and 6pm on the first Tuesday of February, March and April 2018.
Our time windows have $9983$, $13851$, and $12301$ trip requests respectively.
{We note that the more commonly-used taxicab and rideshare datasets are unsuitable for our setting, as these datasets are heavily biased towards short trips (indeed, running our algorithm on this data results in most trips using the car-only option). In contrast, the for-hire trips are longer, and hence lead to significant savings from multi-modal trips.}
{
For each trip, instead of exact pickup and drop-off coordinates, the dataset provides only origin and destination `areas' (the over 4,000 nodes in the Manhattan network are divided into 69 areas). Given the area of an origin or destination, we sample a node in the area from the network uniformly at random. For each passenger $p \in \mathcal{P}$ and line $\ell \in \mathcal{L}$, we define the passenger-line value to be the difference between the time travelled by car when using $\ell$ and the duration of the direct car trip. Thus, our objective function is proportional to the total reduction in miles travelled by car in the system.}
{We moreover impose the constraint that a passenger-line value is only positive if the travel time induced for the passenger is no more than $\beta$ times the time of a direct trip by car, and set this detour factor $\beta = 3$.}
\begin{figure}\label{fig:manhattan_plan}
\centering
\includegraphics[scale=0.19]{line_plan_white_bg_cropped.png}
\caption{An example of line plan generated by our algorithm for the Manhattan network. We consider here the trip requests made on April 3, 2018 from 5pm to 6pm, with $B=3\cdot10^4$, $L=10^3$ and $\beta =3$.}
\end{figure}
{We run the procedure for each of the three sets of requests, averaging the solutions returned by the procedure over these three instances. Let $ALG$ denote the corresponding empirical average. We also report $n_{\text{ILP}}$ and $n_{\text{ALG}}$, the number of lines respectively opened in the solutions returned by our algorithm and the ILP, and $\alpha$, the fraction of the outputs of the rounding process which were budget-respecting (out of the $m=10^4$ solutions of the rounding process)}. {Finally, we compute the {empirical average of the} multiplicative gap between the solution returned by our procedure and the value of the configuration LP $\widehat{P}^{(\varepsilon)}$ at the end of the allotted time. We use $\eta$ to denote this gap and note that, in cases where the configuration LP is not solved to optimality before rounding, $\eta$ may exceed 1.}
We report the results of our experiments in Table~\ref{tab:results_manhattan}. Our findings illustrate the practicality of our algorithm and relative inadequacy of the ILP for the task of real-time routing at scale.
\begin{table}[ht]
\centering
\begin{tabular}{|c|cc|cccc|}
\hline
$B$ & ILP & $ALG$ & $n_{\text{ILP}}$ & $n_{\text{ALG}}$ & $\alpha$ & $\eta$ \\
\hline \hline
$10^4$ & \textbf{289,139} & $279,364$
& $15$ & $16$ & $0.62$ & $0.87$ \\
$2\cdot 10^4$ & $356,621$ & \textbf{509,586}
& $25$ & $27$ & $0.64$ & $0.94$ \\
$3\cdot 10^4$ & --- & \textbf{704,800} & --- & $36$ & $0.65$ & $0.9$\\
$5\cdot 10^4$ & --- & \textbf{917,683} & --- & $60$ & $0.68$ & $0.89$\\
$10^5$ & --- & \textbf{1,140,700} & --- & $106$ & $1$ & $1.12$ \\
$2\cdot 10^5$ & \textbf{2,859,276} & $1,132,616$ & $242$ & $101$ & $1$ & $1.11$ \\
\hline
\end{tabular}
\caption{\emph{Numerical results for different budget values}: We set $L=10^3$, $\beta=3$. Bold values indicate the better solution for the corresponding value of $B$. While the ILP outperforms our algorithm for the smallest and largest budgets, our algorithm consistently outperforms the ILP solver for more realistic intermediary budgets, where the ILP solver is often unable to return a solution within the allotted time.\\
The gap $\eta$ between the solution produced by our procedure and the value of the configuration LP at the end of the allotted time, is consistently above $87\%$, which is a significant improvement on the $0.95 \cdot \left(1-1/e\right)$ (i.e., $60\%$) theoretical guarantee. For larger budgets (i.e., between $10^5$ and $2\cdot 10^5$), the performance of our algorithm plateaus, as the column generation process requires more iterations to optimally solve the configuration LP.
For the largest budget of $2\cdot 10^5$, the ILP is again able to get a solution by opening 242 lines (approximately a quarter of the candidate set). We conjecture that, with such a large budget, any set of lines is good enough, while more refined search is necessary to find the optimal lines for a more restricted budget.
} \label{tab:results_manhattan}
\end{table}
\section{Conclusion}\label{sec:conclusion}
The integration of ride-hailing platforms' flexible demand-responsive services with the sustainability of mass transit systems is the next frontier in urban mobility. As ride-hailing platforms such as Uber and Lyft expand their range of services and look to adding high-capacity vehicles such as buses and shuttles to their fleets, they are faced with the following operational question: {\it Given a set of dynamically changing trip requests and a fleet of high-capacity vehicles, what is the optimal set of bus routes and corresponding frequencies with which to operate them?}
In this work we provided a partial characterization of the hardness landscape of the Real-Time Line Planning Problem{} by proving that, unless the platform{} has access to an existing candidate set of lines and passengers can only travel via one bus line (but are nevertheless allowed to transfer between bus and car services), the problem is hard to approximate within a constant factor. Under these assumptions, however, we developed a $1-\frac1e-\varepsilon$ approximation algorithm. We moreover demonstrated its efficacy in numerical experiments by showing that, when the platform{} is constrained to short computation times (which is precisely the case if it wishes to be demand-responsive), then our algorithm outperforms exact methods on state-of-the-art ILP solvers.
This paper lends itself to a number of natural directions for future work. From a theory perspective, though we showed that our algorithm can be modified with at most a constant-factor loss when the trip optimality assumption is relaxed, {existing approximation bounds for the interval scheduling problem are quite weak. An important area of investigation is whether we can leverage the additional structure of the Real-Time Line Planning Problem{} to strengthen the bounds of existing interval scheduling techniques.}
\begin{acks}
This material is based upon work partially supported by the National Science Foundation under Grant No. CNS-1952011.
\end{acks}
\newpage
\bibliographystyle{ACM-Reference-Format}
|
\section{Introduction}
\label{sec:intro}
Chest radiography is one of the most common imaging modalities for diagnosing pathologies in lungs and heart, with multitudes of scans performed annually. Resulting high number of images require efficient screening. However, shortage of radiological experts, long working hours, manifestation of abnormalities with similar visual cues, etc. make accurate and efficient diagnosis difficult. Thus, there is a need for a computer-aided and explainable decision-support system in the clinical routine that can assist medical experts in reliably identifying pathological chest X-rays (CXR). This task is termed as \emph{multi-label CXR classification} (multiple co-occurring findings can be drawn from one radiograph).
Thanks to large-scale CXR datasets \cite{irvin2019chexpert,bustos2020padchest}, numerous deep learning-based approaches have been proposed to tackle the problem multi-label CXR classification. Two major factions of solutions proposed in the literature include: (1) \emph{ad-hoc} binary multi-label classification \cite{rajpurkar2017chexnet,chen2019dualchexnet} and (2) exploiting label-dependency-based classification \cite{chen2020label,pham2019interpreting,yao2017learning}. Approaches from the latter faction are interesting as they aim to exploit domain knowledge in addition to an image-to-label mapping. Yao \textit{et al.}~\cite{yao2017learning} propose a recurrent neural network-based decoder to learn the inter-dependency among labels. Pham \textit{et al.}~\cite{pham2019interpreting} construct a label tree and propose a hierarchical training regime of learning to classify the leaf nodes followed by the non-leaf ones, which is equivalent to conditional training. Chen \textit{et al.}~\cite{chen2020label}, on the other hand, propose to exploit label co-occurance. A graph based on the co-occurrence of the labels is used to enrich the feature representations learnt by a naive convolutional neural network (CNN) working on images.
\begin{figure}
\begin{minipage}[b]{1.0\linewidth}
\centering
\centerline{\includegraphics[width=7cm]{radKG.png}}
\end{minipage}
\caption{\small An overview of the \textbf{Radiological Knowledge Graph} constructed with the chest X-rays and `findings' as entities.}
\label{fig:radkg}
\end{figure}
Motivated by the idea of elegantly incorporating auxiliary information (e.g. domain knowledge) into the problem of multi-label CXR classification, we propose to reformulate the problem using a relational-learning perspective. Primarily, such a formulation involves a knowledge graph (KG) composed of the CXRs and the diseases (or findings) as the nodes (or entities) and the associations between them denoted by directed edges (or relations). We argue that this formulation is more flexible and show that it results in a better discriminator. New information can be added either as a new node or as a new relation.
\subsection{Background: Link prediction in knowledge graphs}
In this section, we concisely introduce a knowledge graph (KG) and the link-prediction problem in the KG-realm. A knowledge graph $\mathcal{G}$ can formally be represented by a set of triplets $\{(s,r,o)\}$, where each triple denotes a `fact' in the real world. A triple captures the \emph{relation}, $r$, between a \emph{subject}, $s$ and an \emph{object}, $o$. The subject and object belong to a set of entities, $s,o\in\mathcal{E}$, and the relation belongs to a set of relations, $r\in\mathcal{R}$. For example, consider a sub-world with the following: $\mathcal{E}$ = \{\texttt{Kyoto}, \texttt{Japan}, \texttt{Murakami}\} and $\mathcal{R}$ = \{\texttt{bornIn}, \texttt{locatedIn}\}. A KG corresponding to this worlds could have triples such as (\texttt{Murakami}, \texttt{bornIn}, \texttt{Kyoto}), (\texttt{Murakami}, \texttt{bornIn}, \texttt{Japan}), (\texttt{Kyoto}, \texttt{locatedIn}, \texttt{Japan}), etc.
Notice that such a KG can be incomplete due to reasons such as missing facts, corrupted data, etc., and it is of interest to \emph{complete} the graph. \emph{Link prediction} is one of the methods that address graph completion. It can be formalised as a triplet-ranking problem. It involves learning a scoring function, $\psi:\mathcal{E}\times\mathcal{R}\times\mathcal{E} \mapsto \mathbb{R}$, such that for a given triplet $x$, $\psi(x)$ takes a high value if $x$ is a true fact and a low value otherwise.
\subsection{Contribution}
We propose to look at multi-label CXR classification as a link prediction problem in a radiological knowledge graph (RadKG). Example entity- and relation-sets for such a KG would be $\mathcal{E}$ = \{CXRs, diseases, other findings, patient reports, ...\} and $\mathcal{R}$ = \{\texttt{hasDisease}, \texttt{hasFinding}, \texttt{childOf}, ...\}. This formulation enables a seamless combination of multiple modalities of data as well as external domain knowledge such as disease ontologies \cite{bodenreider2004unified} and patient graphs \cite{friedman1990generalized}.
Specifically, we combine the domains of relational machine learning with multi-label classification to makes three key contributions:
\begin{enumerate}
\item We reformulate multi-label CXR classification as a link-prediction problem in a radiological knowledge graph.
\item We show that our reformulation yields an area-under-ROC curve of 83.5\% compared to 83.2\% from prior state of the art \cite{chen2020label}, when tested on CheXpert \cite{irvin2019chexpert}. This is without incorporating any label dependency, unlike \cite{chen2020label}.
\item We demonstrate the flexibility of our KG representation by including additional information: (a) uncertain labels in the ground truth annotations and (b) the dependency among CXR findings.
\end{enumerate}
\section{Method}
\label{sec:method}
We present our approach in two parts: First, we describe the construction of a simple radiological KG; second, we solve CXR multi-label classification using link-prediction in this KG.
\subsection{Radiological Knowledge Graph (RadKG)}
The entity set $\mathcal{E}$ in RadKG is composed of the CXRs and the findings, $\mathcal{E} = \mathcal{E}_X + \mathcal{E}_F$. The CXR entity-subset consists of $m$ CXRs denoted by $X$, $\mathcal{E}_X = \{X_i\}_{i=1}^m$. The findings-subset is denoted by $\mathcal{E}_F = \{F_j\}_{j=1}^n$. In CheXpert \cite{irvin2019chexpert}, $F_j$ corresponds to findings such as `Pneumonia', `Edema', `Fracture' etc., with $n=14$. The image-to-label annotations in multi-label classification are denoted by relations between $\mathcal{E}_X$ and $\mathcal{E}_F$, $\mathcal{R} = \{\texttt{hasFinding}, \texttt{probablyHasFinding}\}$. Fig.~\ref{fig:radkg} illustrates RadKG. Specifically, \texttt{hasFinding} links a CXR and a finding when it is \emph{positively} annotated, while \texttt{probablyHasFinding} captures the uncertain annotations\footnote{CheXpert contains \emph{uncertain} annotations indicating \emph{findings} where the NLP-based automatic annotator was not confident about its prediction.}. Observe that lack of an edge between $X_i$ and $F_j$ implicitly implies a negative annotation.
\begin{figure}
\begin{minipage}[b]{1.0\linewidth}
\centering
\centerline{\includegraphics[width=8.5cm]{overview.png}}
\end{minipage}
\caption{\small Schematic of the forward pass for scoring a given triple $(s,r,o)$ for the relation $r:$\texttt{hasFinding}.}
\label{fig:link_pred}
\end{figure}
\subsection{Link prediction on RadKG}
\noindent
\textbf{Formulating the problem.}
A link-prediction model primarily operates on ascertaining the validity of triples. If a triple, $t = (s,r,o)$, exists in the KG, the model is supposed to predict a \texttt{TRUE} value and a \texttt{FALSE} otherwise. Fig.~\ref{fig:link_pred} illustrates this model for an example triple from the RadKG. The proposed link-prediction model consists of three modules: An \emph{encoding}, an \emph{embedding}, and a \emph{scoring} module. The encoding and embedding modules are responsible for mapping the entities in $t$ to an embedding space with representations denoted by $\mathbf{e}_s, \mathbf{e}_o \in \mathbb{R}^d$ ($d=100$, in this work). The scoring function, $\psi(s,r,o) = \psi_r(\mathbf{e}_s, \mathbf{e}_o) \in \mathbb{R}$, then scores $t$ at a high value if it is a \emph{positive} triple and vice versa. In the following sections, we detail the specifics of the three modules and describe the training and inference procedures.\\
\noindent
\textbf{Encoding the entities.}
In a typical KG, the entities are abstract concepts. The \emph{encoding} module is responsible for representing these concepts as a mathematical entity. In RadKG, this representation concerns $\mathcal{E}_F$: a finding, $F_j$, is encoded into a one-hot vector, $\mathds{1}_j \in \mathbb{R}^{|\mathcal{E}_F|}$, active at the $j^\text{th}$ index. In this work, $|\mathcal{E}_F| = 14$ findings from CheXpert's label set.
Additionally, RadKG also consists of CXRs ($\mathcal{E}_X$) which are visually-rich entities. Instead of one-hot representations as described above, we choose to encode $X_i$s using a convolutional neural network. Such domain-specific encoding not only avoids the \emph{ad-hoc}, orthogonal one-hot codes but enables efficient capture of the visual information in CXRs and results in similar CXRs having similar encodings. For this purpose, we extract the 1024-length feature representations from a 121-layered DenseNet (DenseNet121) pre-trained for multi-label CXR classification.\\
\noindent
\textbf{Embedding the entities.}
The encoding module results in 1024-length codes for CXRs and $|\mathcal{E}_F|$-length codes for the findings. Note that these codes are static, especially since the DenseNet121 is pre-trained (offline) and the one-hot encoding for the findings has no learning component. Therefore, we incorporate an \emph{embedding} module which maps these codes to embedding spaces more suited for the link-prediction task. Denoting the encoded representations with $c_X$ and $c_F$, the embedding module consists of two function: $g_X(c_X): \mathbb{R}^{1024} \mapsto \mathbb{R}^d$ and $g_F(c_F): \mathbb{R}^{|\mathcal{E}_F|} \mapsto \mathbb{R}^d $. We denote the embedded representation by $\mathbf{e}$.\\
\noindent
\textbf{Scoring the triples.}
Once the subject and object entities are embedded into the embedding space, recall that the triple $t$ needs to be scored for its validity. We investigate two scoring functions in this work, DistMult \cite{yang2014embedding} and ConvE \cite{dettmers2018conve}, formally denoted as follows:
\begin{align}
\text{DistMult:}~\psi_r(\mathbf{e}_s, \mathbf{e}_o)&=\langle \mathbf{e}_s, \mathbf{r}_r, \mathbf{e}_o \rangle,\\
\text{ConvE:}~\psi_r(\mathbf{e}_s, \mathbf{e}_o)&=f(\text{vec}(f([\overline{\mathbf{e}_s};\overline{\mathbf{r}_r}]*w))\mathbf{W})\mathbf{e}_o,
\end{align}
where $\mathbf{r}_r \in \mathbb{R}^d$ denotes the embedding for the relation $r$ and $\langle~\rangle$ denotes an inner product of the three vectors. The ConvE score function is relatively `convoluted', involving the reshaped and concatenated entity and relation embeddings, $\overline{\mathbf{e}_s}, \overline{\mathbf{r}_r} \in \mathbb{R}^{k_w, k_h}~(\text{s.t.~} k_w \times k_h = d; k_h = k_w = 10)$. The concatenated embeddings are passed through non-linear functions $f$ (=ReLU), convolved (kernel $w$ of size 5) and finally vectorised and passed through a fully connected-layer with weight $\mathbf{W}$. In order to avoid clutter, we refer the reader to \cite{yang2014embedding} and \cite{dettmers2018conve} for the minutiae of the two scoring functions.\\
\noindent
\textbf{Learning to link.}
In the proposed model, the entity and relation embeddings, along with the parameters of the scoring function parameters are to be learnt. They can be be trained with supervision once the scoring function is defined. This entails sampling valid and invalid samples from the training data and learning to assign high and low scores to them respectively. For this, we apply a sigmoid function on the raw scores, $p = \sigma(\psi_r(\mathbf{e}_s, \mathbf{e}_o))$, and minimise a binary-cross entropy loss, as formulated below:
$$
\mathcal{L}(p,y) = -y\log(p) - (1-y)\log(1-p),
$$
where the target label, $y$, is $1$ if a triple is valid and $0$ otherwise.
Once trained, we infer the labels of an unseen CXR, X$_{test}$, by scoring every completion from RadKG of the form ($X_{test}$, \texttt{hasFinding}, $F$?). The query-triple is scored for every $F_j \in \mathcal{E}_F$ as the object and positively annotated for those findings for which $\sigma(\psi_r(\cdot)) > \tau$, where $r$ is \texttt{hasFinding} and $\tau$ is chosen to appropriately tradeoff sensitivity and specificity.\\
\noindent
\textbf{Data.} CheXpert \cite{irvin2019chexpert} is a publicly-available chest radiograph dataset consisting of 224,315 lateral and frontal chest radiographs annotated for 14 findings with their \emph{presence}, \emph{absence}, or \emph{uncertain} presence. The data is split into three-folds of \emph{train}, \emph{validation}, and a \emph{test} sets with a $70:10:20$ proportion\footnote{Official CheXpert test set is not publicly available} stratified at patient-level. We work with the frontal CXRs padded to squares, resized to $320\times320$ pixels, and z-score normalised using the train-set's pixel mean and variance. Note that the test and validation sets do not contain CXRs with uncertain labels.\\
\section{Results}
\label{sec:exp}
\noindent
The results of our experiments are tabulated in Table~\ref{tab:perf}. We use the area under ROC curve (AUC) as a metric to evaluate classification performance. All our experiments are evaluated over the three random data folds as described above and their mean is reported. We do not report standard deviation as it was less than 0.1\% in all cases. Similar to prior work, we perform two sets of experiments: first, we regard the uncertain labels as positives and second, as negatives. We compare our approach to two prior works \cite{irvin2019chexpert} and \cite{chen2020label}, the former using a typical CNN and the latter using a CNN whose feature are augmented with disease features learnt from a disease co-occurrence graph using a graph convolution network.\\
\emph{Baselines:} Recall that CXRs are encoded using a DenseNet121 trained for multi-label CXR classification. This naturally forms one of our baselines. Observe that the performance of our naive implementation is on par with the that of \cite{chen2020label}. Once the DenseNet is trained, the 1024-length features are stored as CXR codes and used for the consequent experiments. We then employ a 2-layered perceptron (MLP) with weight matrices of size $(1024\times100)$ and $(100\times14)$.\\
\emph{Link prediction on RadKG:} Assessing the ability of a straightforward relational formulation, wherein we incorporate a KG with just the \texttt{hasFinding} relation, indicating positive annotations. The proposed approach consistently outperforms our baselines and prior work in both Tables~\ref{tab:perf}a and \ref{tab:perf}b, irrespective of the chosen scoring function. ConvE marginally outperforms DistMult, but its significance cannot be ascertained due to lack of sufficient samples. Interestingly, the trend of performances when Uncertain$\rightarrow$Positive being inferior to Uncertain$\rightarrow$Negative in the discriminative approaches is flipped in the relational approaches (0.835 vs. 0.833).\\
\emph{Incorporating domain knowledge:} We incorporate new knowledge into RadKG by adding two relations (cf. Table~\ref{tab:domain}): (1) \texttt{probablyHasFinding}, linking a CXR to a finding in cases where the ground truth has an uncertain annotation. (2) \texttt{coOccurs}, linking one finding to another based on their co-occurring probability. Directional co-occurrence is computed as in \cite{chen2020label} and one finding is said to `co-occur' with another if its probability of occurrence conditioned on the other is greater than 0.2. However, we do not observe an significant improvement due to this incorporation of domain knowledge. This behaviour is surprising and we attempt to explain it in the following section.\\
\begin{table}[t!]
\setlength{\tabcolsep}{0.8em}
\scriptsize
\renewcommand{\arraystretch}{1.5}
\caption{\small Performance of the proposed approach on a naive RadKG with only \texttt{hasFinding} relation. Uncertain labels in CheXpert ground truth are considered as positive annotations in (a) and as negative annotations in (b)}\label{tab:perf}
\begin{subtable}{0.48\linewidth}\centering
{
\begin{tabular}{ c | c }
\specialrule{.1em}{0em}{-.1em}
Method & AUC \\ [0.25ex]
\specialrule{.05em}{-0.1em}{0em}
U\_Ones \cite{irvin2019chexpert} & 0.815 \\
CheXGCN\_1s \cite{chen2020label} & 0.827 \\
\hdashline
DenseNet121 & 0.826 \\
MLP & 0.827 \\
RadKG+DistMult & 0.834 \\
\textbf{RadKG+ConvE} & \textbf{0.835} \\[0.25ex]
\specialrule{.1em}{0em}{0em}
\end{tabular}
}
\caption{Uncertain $\rightarrow$ Positive}
\end{subtable}%
~
\begin{subtable}{0.48\linewidth}\centering
{
\begin{tabular}{ c | c }
\specialrule{.1em}{0em}{-.1em}
Method & AUC \\ [0.25ex]
\specialrule{.05em}{-0.1em}{0em}
U\_Zeros \cite{irvin2019chexpert} & 0.823 \\
CheXGCN\_0s \cite{chen2020label} & 0.832 \\
\hdashline
DenseNet121 & 0.830 \\
MLP & 0.831 \\
RadKG+DistMult & 0.832 \\
\textbf{RadKG+ConvE} & \textbf{0.833} \\[0.25ex]
\specialrule{.1em}{0em}{0em}
\end{tabular}
}
\caption{Uncertain $\rightarrow$ Negative}
\end{subtable}
\end{table}
\begin{table}[t!]
\setlength{\tabcolsep}{0.8em}
\scriptsize
\centering
\renewcommand{\arraystretch}{1.5}
\caption{\small Performance of the proposed approach when RadKG is extended with extrinsic information in the form or two relations: \texttt{probablyHasDisease} and \texttt{coOccur}. Since the margins are insignificant, we report the standard deviations for a clearer picture.}\label{tab:domain}
\begin{tabular}{ c | c c }
\specialrule{.1em}{0em}{-.1em}
RadKG+ConvE & Uncertain $\rightarrow$ $+$ve & Uncertain $\rightarrow$ $-$ve \\ [0.25ex]
\specialrule{.05em}{-0.1em}{0em}
+ \texttt{probablyHasFinding} & 0.8339$\pm$0.0004 & 0.8330$\pm$0.0013 \\
+ \texttt{coOccur} & \textbf{0.8343}$\pm$0.0000 & 0.8332$\pm$0.0009 \\[0.25ex]
\specialrule{.1em}{0em}{0em}
\end{tabular}
\end{table}
\section{Discussion}
We discuss our approach in three parts: the DenseNet encoding, the relation formulation, and the domain-knowledge incorporation. The features extracted from the DenseNet can be classified into multiple classes with an AUC of 0.826 and 0.83 depending on the uncertain labels' mapping. Observe that a parametrically stronger classifier results in a marginal increase in performance of 0.001. On the other hand, the relational formulation using DistMult outperforms both these approaches (0.834 vs 0.826). Note that our DistMult formulation with $d=100$ has three embedding layers of size (1024$\times$100) for images, (14$\times$100) for findings and (1$\times$100) for the \texttt{definitelyHas} relation, resulting in as many parameters as the MLP formulation. Moreover, the relational formulation appears to extract information lost during when the uncertain labels are mapped to positives, as evidenced by the boost in performance observed in this regard (cf.~Table~\ref{tab:perf}a). ConvE, on the other hand, with more parameters and an involved entity--relation interaction outperforms DistMult, as shown in \cite{dettmers2018conve}.
Incorporating two additional relations, \texttt{probablyHasFinding} and \texttt{coOccursWith}, did not yield an improvement. Non-success of \texttt{coOccursWith} can be attributed to the relatively fewer finding-to-finding triples compared to an image-to-finding triples, i.e $F_i$ has a far higher degree of edges linked to CXRs than to other $F_j$s. However, it is surprising that the effect of \texttt{probablyHasDisease} is minor. We assume this is due to the uncertain annotations in CheXpert being noise rather than useful information. Observe, in Table 3 of \cite{irvin2019chexpert}, that the experiment considering the uncertain labels as a separate class significantly outperforms others in only one out of the five diseases evaluated on. However, we expect that adding more reliable information, e.g. medical knowledge, will boost the performance further. \\
\noindent
\emph{Future work.} Proposed formulation of classification as a KG-completion problem opens up possibilities to fuse multi-modal data such as text reports and patient-population graphs. However, a encoding component pre-trained towards a certain task (multi-label classification, in our case) could result in representations that do not generalise well across tasks. Therefore, it is of interest to adopt a task-agnostic representation learning framework. Combining the encoding and embedding modules resulting in a fully-end-to-end formulation is also a future research direction.
\section{Conclusion}
\label{sec:conc}
In this work, we present a relation-learning based reformulation of the multi-label CXR classification. A knowledge graph constructed with CXRs and `findings' as entities forms the core of our approach. We then pose the classification as a link-prediction problem in this KG. We demonstrate a superior performance of the proposed approach on publicly available CXR dataset, achieving an AUC of 83.5\%, outperforming state-of-art methods.\\
\section{Acknowledgements.}
The authors do not wish to declare any conflicts of interest.
\section{Compliance With Ethical Standards.}
This study was conducted retrospectively using human subject data made available in open-access as CheXpert \cite{irvin2019chexpert}. Explicit ethical approval from our end was not instructed by the data source.
\bibliographystyle{IEEEbib}
|
\section{Introduction}
The study of the characteristics of the Higgs boson is one of the
primary tasks of the LHC program: the forthcoming Run3 and the High-Luminosity
phase will increase the
accuracy in the measurement of Higgs production cross sections and
decay rates, allowing for a more stringent test of the Standard Model
(SM) predictions. One of the main production processes being
investigated is the so called Higgs-strahlung process $pp\to V H$, in
which a single Higgs boson is emitted together with a weak vector
boson ($V=Z, W$). The leptonic decays of the weak boson can be
exploited as a trigger for measurements of elusive Higgs decays. In
particular, the decay $H \rightarrow b \bar{b}$ has been
observed for the first time by ATLAS and CMS, using an analysis
focused precisely on the associated production category
\cite{Aaboud:2018zhk, Sirunyan:2018kst}.
In this paper, we are interested in the associated production of a
Higgs and a $Z$ boson. The theoretical predictions for $p p \rightarrow
Z H$ are accurate at next-to-next-to-leading-order (NNLO) in QCD, and
at next-to-leading-order (NLO) in the EW interactions \cite{Amoroso:2020lgh}.
The leading and next-to-leading contributions are connected to the
$q \bar{q}$-initiated channel, allowing to interpret $p p \rightarrow Z H$
mainly as a Drell-Yan process \cite{Han:1991ia,Brein:2003wg}.
The gluon-initiated channel $g g \rightarrow Z H$ arises for the first time
at NNLO in QCD. It is an $\mathcal{O}(\as^2)$ correction, but the
contribution from this process to the hadronic cross section is
non-negligible because of the large gluon luminosity at the LHC. It
has been shown that the relevance of $g g \rightarrow Z H$ is even
more enhanced in the boosted kinematic regime, to the point of being
comparable to the quark-initiated contribution near the $t \bar{t}$
threshold \cite{Englert:2013vua}. The factorization- and
renormalization-scale uncertainties related to the gluon-induced
process also affect significantly the uncertainty on the total $p p
\rightarrow Z H$ cross section. This issue is specific to the $Z
H$ final state, since the gluon-induced channel is absent in $p p
\rightarrow W H$. The knowledge of the NLO corrections to $g g
\rightarrow Z H$ would reduce the scale uncertainties, facilitating
precision studies in the next runs of the LHC. The $g g \rightarrow Z H$
contribution is relevant also for New
Physics (NP) studies, since it is sensible to both sign and magnitude
of the top Yukawa coupling, dipole operators \cite{Englert:2016hvy}
and can receive additional contributions
from new particles \cite{Harlander:2013mla}.
An improved knowledge of the SM prediction for the gluon-induced
contribution is therefore very important both for precision
measurements of $Z H$ production within the SM and for testing NP in
this channel. The leading order (LO) contribution to the $g g \rightarrow Z H$
amplitude, given by one-loop diagrams, was computed exactly
in refs.\cite{Kniehl:1990iva, Dicus:1988yh}. At the NLO
the virtual correction part contains two-loop multi-scale integrals that
constitute, at present, an obstacle to an exact evaluation of the NLO
contribution. Specifically, the corrections due to the
two-loop box diagrams are still not known analytically. A first
computation of the NLO terms was obtained in
ref.\cite{Altenkamp:2012sx} using an asymptotic expansion in the limit
$m_t \rightarrow \infty$ and $m_b = 0$, and pointed to a $K$-factor of
about 100\% with respect to the LO contribution. Soft gluon resummation has
been performed in ref.\cite{Harlander:2014wda} including next-to-leading
logarithmic terms, and the result has been matched to the fixed NLO
computation of ref.\cite{Altenkamp:2012sx}. Finite top-quark-mass effects
to $g g \rightarrow Z H$ have been investigated in
ref.\cite{Hasselhuhn:2016rqt} using a combination of large-$m_t$ expansion
(LME) and Pad\'e approximants. In addition, a data-driven method to extract
the non-Drell-Yan part of $p p \rightarrow Z H$, which is dominated by
the gluon-induced contribution, has been proposed in
ref.\cite{Harlander:2018yns}, exploiting the known relation between $W H$
and $ Z H$ associated production when only the Drell-Yan component of
the two processes is considered. A qualitative study focusing on
patterns in the differential distribution has been conducted in
ref.\cite{Hespel:2015zea}, where $2 \rightarrow 2$ and $2 \rightarrow 3$
LO matrix elements were merged and matched to improve the description
of the kinematics.
Very recently, a new analytic computation of the NLO virtual contribution
based on a high-energy expansion of the amplitude, supported by Pad\'e
approximants, and on an improved LME, has been
carried out \cite{Davies:2020drs}. The results are in agreement with a new
exact numerical study \cite{Chen:2020gae}, in the energy regions where the
expansions are legitimate. Nonetheless, an improvement on the analytic
calculation is still desirable, since the heavy-top and the
high-energy expansions do not cover well the region
$350\, {\rm GeV}\lesssim \sqrt{\hat{s}} \lesssim 750\, {\rm GeV}$, where
$\sqrt{\hat{s}}$ is the partonic center of mass energy. It should be
remarked that this region provides a significant part of the hadronic cross
section at the LHC, about 68\%.
In this paper, we present an analytic calculation of the virtual NLO QCD
corrections to the $gg\to Z H$ process that covers the region
$\sqrt{\hat{s}} \lesssim 750\, {\rm GeV}$, which contributes about 98\% to the hadronic
cross section. The most difficult parts, i.e.~the two-loop box
diagrams, are computed in
terms of a forward kinematics \cite{Bonciani:2018omm} via an expansion in
the $Z$ (or Higgs)
transverse momentum, $p_{\scriptscriptstyle T}$, while the rest of the
virtual corrections is computed exactly.
We remark that our calculation is complementary
to the results of ref.\cite{Davies:2020drs}, which covers the region of
large transverse momentum of the $Z$. Furthermore, the merging of the two
analyses
allows an analytic evaluation of the NLO virtual corrections in
$gg\to Z H$ in the entire phase space.
The paper is structured as follows: in the next section we introduce our
notation and the definitions of the form factors in terms of which we
express the amplitude. In \hyperref[sec:tre]{section \ref*{sec:tre}}, we present the expansion of
the
amplitude in terms of the $Z$ transverse momentum. \hyperref[sec:Add]{Section \ref*{sec:Add}}
is devoted to a discussion of the expected range of validity of
the evaluation of the amplitude via a $p_{\scriptscriptstyle T}$-expansion, by comparing the exact
result for the LO cross section with the $p_{\scriptscriptstyle T}$-approximated one. In~\hyperref[sec:quattro]{section \ref*{sec:quattro}} we present an outline of our NLO computation, while
the~\hyperref[sec:sei]{next section} contains our NLO results. Finally we present our \hyperref[sec:conclusion]{conclusions}.
The paper is complemented by two appendices. In \hyperref[app:uno]{appendix \ref*{app:uno}}, we
report the
explicit expressions for the orthogonal projectors we employ in the calculation.
We present also the relation between our form factors and the ones used in
ref.\cite{Davies:2020drs}. In \hyperref[app:due]{appendix \ref*{app:due}}, we report the exact
results
for the triangle and the reducible double-triangle contributions.
\section{Definitions}
In this section we introduce our definitions for the
calculation of the NLO QCD corrections to the associated production of
a Higgs and a $Z$ boson from gluon fusion.
The amplitude $g^\mu_a(p_1)g^\nu_b(p_2)\to Z^\rho(p_3) H(p_4)$ can be written as
\begin{eqnarray}
&&\amp=i \sqrt{2}\frac{m_{ \sss Z} G_{ \sss F} \as(\mu_R)}{\pi}\delta_{ab}\epsilon^a_\mu(p_1)
\epsilon^b_\nu(p_2)\epsilon_\rho(p_3)\hat{\amp}^{\mu\nu\rho}(p_1,p_2,p_3 ),\\
&&\hat{\amp}^{\mu\nu\rho}(p_1,p_2,p_3 )=\sum_{i=1}^{6}
\mathcal{P}_i^{\mu\nu\rho}(p_1,p_2,p_3 )
\amp_i(\hat{s},\hat{t},\hat{u},m_t,m_{ \sss H},m_{ \sss Z}),
\label{eq:amp}
\end{eqnarray}
where $G_{ \sss F}$ is the Fermi constant, $\as(\mu_R)$ is the strong coupling
constant defined at a scale $\mu_R$ and
$\epsilon^a_\mu(p_1)\epsilon^b_\nu(p_2)\epsilon_\rho(p_3)$ are the
polarization vectors of the gluons and the $Z$ boson, respectively. The
tensors $\mathcal{P}_i^{\mu\nu\rho}$ are a set of orthogonal
projectors, whose explicit expressions are presented in appendix \ref{app:uno}.
The corresponding form factors
$\amp_i(\hat{s},\hat{t},\hat{u},m_t,m_{ \sss H},m_{ \sss Z})$ are functions of the
masses of the top quark ($m_t$), Higgs ($m_{ \sss H}$) and $Z$ ($m_{ \sss Z}$) bosons, and of
the partonic Mandelstam variables
\begin{equation}
\hat{s}=(p_1+p_2)^2,~~ \hat{t}=(p_1+p_3)^2,~~ \hat{u}=(p_2+p_3)^2,
\end{equation}
where $\hat{s}+\hat{t}+\hat{u}=m_{ \sss Z}^2+m_{ \sss H}^2$ and we took all the momenta to
be incoming.
The $\amp_i$ form factors can be expanded up to NLO terms as
\begin{equation}
\amp_{i} = \amp_i^{(0)} + \frac{\as}{\pi} \amp_i^{(1)}
\label{eq:ampexp}
\end{equation}
and the Born partonic cross section can be written as
\begin{equation}
\hat{\sigma}^{(0)}(\hat{s})=
\frac{m_{ \sss Z}^2 G_{ \sss F}^2 \as(\mu_R)^2}{64 \hat{s}^2(2\pi)^3}
\int^{\hat{t}^+}_{\hat{t}^-}d\hat{t}\sum_i \left|\amp_i^{(0)}\right|^2,
\end{equation}
where
$\hat{t}^\pm=[-\hat{s}+m_{ \sss H}^2+m_{ \sss Z}^2\pm\sqrt{(\hat{s}-m_{ \sss H}^2-m_{ \sss Z}^2)^2-4m_{ \sss H}^2m_{ \sss Z}^2}\,]/2$.
\label{sec:due}
\begin{figure}
\begin{center}
\includegraphics[width=12cm]{Feynman_LO_und_NLO.pdf}
\caption{Examples of Feynman diagrams contributing to $gg \to ZH$ at LO and
NLO.}
\label{fig:dia}
\end{center}
\end{figure}
The Feynman diagrams that contribute to the $gg \to ZH$ amplitude up to NLO
can be separated into triangle, box and double-triangle
contributions, the last type appearing for the first time at the
NLO level. Examples of LO (NLO) triangle and box
categories are shown in fig.\ref{fig:dia} $(a)$ - $(c)$
($(d)$ - $(f)$).
Due to the presence of a $\gamma_5$ in the axial coupling of the $Z$ boson to
the fermions in the loop, the projectors $\mathcal{P}_i^{\mu\nu\rho}$ are
proportional to the Levi-Civita total anti-symmetric tensor
$\epsilon^{\alpha\beta\gamma\delta}$ (see appendix \ref{app:uno}),
whose treatment in dimensional regularization is, as well known, delicate
and will be discussed in section \ref{sec:quattro}.
In our calculation we treat all the quarks but the top as massless.
As a consequence, the contribution to the amplitude of the first two generations
vanishes. Concerning the third generation, the contribution of the bottom
is present in the triangle diagrams with the exchange of a $Z$ boson
(fig.\ref{fig:dia}$(b),(e)$) and in the double-triangle diagrams
(fig.\ref{fig:dia}$(g)$).
A nice observation in ref.\cite{Altenkamp:2012sx} allows to compute
easily the full (top+bottom) triangle contribution. As noticed in that
reference,
the triangle contribution with a $Z$ exchange contains a $ggZ^*$ subamplitude
which in the Landau gauge can be related to the decay of a massive vector boson
with mass $\sqrt{\hat{s}}$ into two massless ones, a process that is
forbidden by
the Landau-Yang theorem \cite{Landau:1948kw,Yang:1950rg}. As a consequence,
the full triangle contribution can be obtained from the top triangle diagrams
with the exchange of the unphysical scalar $G^0$, with the propagator of the
$G^0$ evaluated in the Landau gauge. This part of the top triangle
diagrams can be obtained from the decay
amplitude of a pseudoscalar boson into two gluons which is known in
the literature in the full mass dependence up to NLO terms \cite{Spira:1995rr,Aglietti:2006tp}.
Given the above observation, our calculation of the NLO corrections to
the $gg \to ZH$ amplitude focuses on the analytic evaluation of the
double-triangle (fig.\ref{fig:dia}$(g)$) and two-loop box contributions
(fig.\ref{fig:dia}$(f)$). The former contribution is evaluated exactly.
The latter is evaluated via two different expansions: i) via a LME, following
ref.\cite{Degrassi:2010eu}, up to and including ${\cal O}(1/m_t^6)$ terms,
which is expected to work below the $2\, m_t$ threshold; ii) via an expansion in
terms of the $Z$ transverse momentum, following ref.\cite{Bonciani:2018omm},
whose details are presented in the next section.
\section{Expansion in the transverse momentum}
\label{sec:tre}
The transverse momentum of the $Z$ boson can be written in
terms of the Mandelstam variables as
\begin{equation}
p_{\scriptscriptstyle T}^2=\frac{\hat{t}\hat{u}-m_{ \sss Z}^2m_{ \sss H}^2}{\hat{s}}.
\label{ptdef}
\end{equation}
From eq.(\ref{ptdef}), together with the relation between
the Mandelstam variables, one finds
\begin{equation}
p_{\scriptscriptstyle T}^2+\frac{m_{ \sss H}^2+m_{ \sss Z}^2}{2}\leq\frac{\hat{s}}{4}+\frac{\Delta_m^2}{\hat{s}},
\label{ptexp}
\end{equation}
where
$\Delta_m = (m_{ \sss H}^2 -m_{ \sss Z}^2)/2$. Eq.(\ref{ptexp}) implies
$p_{\scriptscriptstyle T}^2/\hat{s} < 1$ that, together with the kinematical constraints
$m_{ \sss H}^2/\hat{s}< 1$ and
$m_{ \sss Z}^2/\hat{s} < 1$, allows the expansion of the amplitude in terms of these
three ratios.
A direct expansion in $p_{\scriptscriptstyle T}$ is not possible at amplitude level, since $p_{\scriptscriptstyle T}$
itself does not appear in the amplitudes. However, as we argued in
ref.\cite{Bonciani:2018omm}, the expansion in $p_{\scriptscriptstyle T}^2/\hat{s}\ll 1$ is equivalent
to an expansion in terms of the ratio of the reduced Mandelstam variables
$t^\prime/s^\prime\ll 1$ or $u^\prime/s^\prime\ll 1$, depending whether we are
considering the process to be in a forward or backward kinematics. The
$s^\prime,\,t^\prime$ and $u^\prime$ variables are defined as
\begin{equation}
s^\prime=p_1\cdot p_2=\frac{\hat{s}}{2},~~
t^\prime=p_1\cdot p_3=\frac{\hat{t}-m_{ \sss Z}^2}{2},~~ u^\prime =
p_2\cdot p_3=\frac{\hat{u}-m_{ \sss Z}^2}{2}
\end{equation}
and satisfy
\begin{equation}
s^\prime + t^\prime + u^\prime =\Delta_m.
\end{equation}
The cross section of a $2 \to 2$ process can always be expanded into
a forward and backward contribution. Looking at the dependence of $\sigma$
upon $t^\prime,\, u^\prime$ we can write
\begin{eqnarray}
\sigma&\propto&\int^{t_f}_{t_i}dt^\prime\mathcal{F}(t^\prime,u^\prime)=
\int^{t_m}_{t_i}dt^\prime\mathcal{F}(t^\prime,u^\prime)+
\int^{t_f}_{t_m}dt^\prime\mathcal{F}(t^\prime,u^\prime) \nonumber \\
&\sim&\int^{t_m}_{t_i}dt^\prime\mathcal{F}(t^\prime\sim0,u^\prime\sim-s^\prime)+
\int^{t_f}_{t_m}dt^\prime \mathcal{F}(t^\prime\sim -s^\prime,u^\prime\sim0)
\label{eq:forback}
\end{eqnarray}
where $t_i=(\hat{t}^--m_{ \sss Z}^2)/2$, $t_f=(\hat{t}^+-m_{ \sss Z}^2)/2$ and $t_m$ is the
value of $t^\prime$ at which
$t^\prime =u^\prime=(-s^\prime+\Delta_m)/2$. The two terms in the second
line of eq.(\ref{eq:forback}) represent the expansion in the forward and
backward kinematics, respectively.\\
If the amplitude is symmetric under $t^\prime\leftrightarrow u^\prime$
exchange then
\begin{eqnarray}
\sigma&\propto&\int^{t_m}_{t_i}dt^\prime\mathcal{F}(0,-s^\prime)+
\int^{t_f}_{t_m}dt^\prime\mathcal{F}(-s^\prime,0)= \nonumber \\
&&
\int^{t_m}_{t_i}dt^\prime\mathcal{F}(0,-s^\prime)+
\int^{t_f}_{t_m}dt^\prime\mathcal{F}(0,-s^\prime)=
\int^{t_f}_{t_i}dt^\prime\mathcal{F}(0,-s^\prime)
\end{eqnarray}
so that the expansion in the forward kinematics actually covers the entire
phase space.
In the case of $gg \to ZH$ the process itself is not symmetric
under the $t^\prime\leftrightarrow u^\prime$ exchange. However, as
can be seen from the explicit expressions of the projectors in appendix
\ref{app:uno}, it can be written as a sum of symmetric and antisymmetric
form factors. To perform only the expansion in the forward kinematics
one can proceed in the following way.
On the symmetric form factors the expansion can be directly performed.
For the antisymmetric ones,
it is sufficient first to extract the overall antisymmetric factor
$(\hat{t}-\hat{u})$ just by multiplying the form factor by $1/(\hat{t}-\hat{u})$,
written as $1/( 2 s^\prime - 4 t^\prime - 2 \Delta_m)$,
then perform the expansion in the forward
kinematics and finally multiply back by $(\hat{t}-\hat{u})$.
As discussed in ref.\cite{Bonciani:2018omm}, to implement the $p_{\scriptscriptstyle T}$-expansion
at the level of Feynman diagrams it is convenient
to introduce the vector $r^\mu = p_1^\mu +p_3^\mu$, which satisfies
\begin{equation}
r^2= \hat{t},~~ r\cdot p_1=\frac{\hat{t}-m_{ \sss Z}^2}{2},~~
r\cdot p_2=-\frac{\hat{t}-m_{ \sss H}^2}{2},
\label{rsp}
\end{equation}
and therefore can be also written as
\begin{equation}
r^\mu =-\frac{\hat{t}-m_{ \sss H}^2}{\hat{s}}p_1^\mu +
\frac{\hat{t}-m_{ \sss Z}^2}{\hat{s}} p_2^\mu + r_\perp^\mu =
\frac{t^\prime}{s^\prime}\,(p_2^\mu -p_1^\mu) - \frac{\Delta_m}{s^\prime} \, p_1^\mu +
r_\perp^\mu,
\label{rpp}
\end{equation}
where
\begin{equation}
r_\perp^2=-p_{\scriptscriptstyle T}^2.
\end{equation}
From eq.(\ref{ptdef}) one obtains
\begin{equation}
t^\prime = -\frac{s^\prime}2 \left\{ 1 - \frac{\Delta_m}{s^\prime} \pm
\sqrt{\left( 1 - \frac{\Delta_m}{s^\prime} \right)^2 -
2 \frac{p_{\scriptscriptstyle T}^2 + m_{ \sss Z}^2}{s^\prime}} \right\}
\label{tpdef}
\end{equation}
that implies that the expansion in
small $p_{\scriptscriptstyle T}$ (the minus sign case in eq.(\ref{tpdef})) can be realized
at the level of Feynman diagrams, by expanding the propagators
in terms of the vector $r^\mu$ around $r^\mu \sim 0$ or, equivalently,
$p_3^\mu \sim -p_1^\mu$, see eq.(\ref{rpp}).
The outcome of the evaluation of the $gg \to ZH$ amplitude via a
$p_{\scriptscriptstyle T}$-expansion is expressed in terms of a series of Master Integrals (MIs)
that are functions of $\hat{s}$ and $m_t^2$ only, and whose coefficients can be
organized in terms of powers of ratios of small over large parameters
where $p_{\scriptscriptstyle T}^2, \, m_{ \sss H}^2$ and $m_{ \sss Z}^2$ are identified as the small parameters while
$m_t^2$ and $\hat{s}$ as the large ones.
Thus, the range of validity of the expansion depends
on the condition that $p_{\scriptscriptstyle T}^2$ can be treated as a ``small parameter'' with
respect to $m_t^2$ because all the other ratios, small over
large, are always smaller than 1.
\section{LO Comparison}
\label{sec:Add}
In order to investigate the range of validity of the evaluation of the
$gg \to ZH$ amplitude via a $p_{\scriptscriptstyle T}$-expansion, we compare
the exact result for the LO partonic cross
section \cite{Kniehl:1990iva, Dicus:1988yh} with the result obtained
via our $p_{\scriptscriptstyle T}$-expansion. The latter is expressed in terms of the same four MIs
that enter into the analogous calculation of the
$gg \to HH$ LO amplitude \cite{Bonciani:2018omm}, or
\begin{eqnarray}
B_0[\hat{s},m_t^2,m_t^2] \equiv B_0^+, &
B_0[- \hat{s},m_t^2,m_t^2] \equiv B_0^- , &\\
C_0[0,0,\hat{s},m_t^2,m_t^2,m_t^2] \equiv C_0^+ ,& ~~~
C_0[0,0,-\hat{s},m_t^2,m_t^2,m_t^2] \equiv C_0^- &
\end{eqnarray}
where
\begin{equation}
B_0[q^2,m_1^2,m_2^2] = \frac1{i\pi^2}
\int \frac{d^n k}{\mu^{n-4}} \frac1{(k^2 -m_1^2)((k+q)^2-m_2^2)}
\label{Bzero}
\end{equation}
\begin{align}
\specialcell{ C_0[q_a^2,q_b^2,(q_a+q_b)^2, m_1^2,m_2^2,m_3^2] = \hfill }\nonumber \\
\frac1{i\pi^2} \int \frac{d^n k}{\mu^{n-4}} \frac1{[k^2 -m_1^2][(k+q_a)^2-m_2^2]
[(k-q_b)^2 - m_3^2]} &
\label{Czero}
\end{align}
are the Passarino-Veltman functions \cite{Passarino:1978jh},
with $n$ the dimension of spacetime and $\mu$ the 't Hooft mass.
As an illustration of our LO result we present the explicit expressions for
one symmetric, ${\cal A}_2$, and one antisymmetric,
${\cal A}_6$, form factor including the first correction in the ratio of
small over large parameters which will be referred
to as\footnote{With a slight abuse of notation we indicate the
counting of the orders in the expansion as
$\mathcal{O}(p_{\scriptscriptstyle T}^{2n})$ that actually means the inclusion of terms that
scale as $(x/y)^n$, where $x=p_{\scriptscriptstyle T}^2,\, m_{ \sss Z}^2,\,m_{ \sss H}^2$ and
$y=\hat{s},\,m_t^2$, with respect to the $\hat{s}, m_t^2 \to \infty$
contribution. The latter is indicated as $\mathcal{O}(p_{\scriptscriptstyle T}^0)$ and corresponds
to the first non zero contribution in the expansion of the diagrams
in terms of the vector $r^\mu$.}
${\mathcal O}(p_{\scriptscriptstyle T}^2)$.
We divide the result into triangle ($\triangle$) and
box ($\square$) contribution or
\begin{eqnarray}
\mathcal{A}_{2}^{(0, \triangle)} &=& -
\frac{ p_{\scriptscriptstyle T} }{\sqrt{2} \left( m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2 \right)} (\hat{s}-\Delta_m)\,
m_t^2 C_0^+,
\label{Adt}\\
\mathcal{A}_{2}^{(0, \square)} &=&
\frac{ p_{\scriptscriptstyle T} }{\sqrt{2} \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2 \right)}\, \Biggl\{ \Biggr. \nonumber \\
&& \Biggl( m_t^2 -m_{ \sss Z}^2 \frac{ \hat{s}-6 m_t^2}{4 \hat{s}}-
p_{\scriptscriptstyle T}^2 \frac{ 12 m_t^4-16 m_t^2 \hat{s}+\hat{s}^2}{12 \hat{s}^2}
\Biggr) B_0^+ \nonumber \\
&-& \Biggl( m_t^2 -\Delta_m \frac{m_t^2}{ \left( 4 m_t^2+\hat{s}\right)}
+ m_{ \sss Z}^2 \frac{ 24 m_t^4 -6 m_t^2 \hat{s}-
\hat{s}^2 }{4 \hat{s} \left(4 m_t^2+\hat{s}\right)} -
\nonumber \\
& & ~~~~~~~p_{\scriptscriptstyle T}^2 \frac{ 48 m_t^6-68 m_t^4 \hat{s}-4
m_t^2 \hat{s}^2+\hat{s}^3 }{ 12 \hat{s}^2 \left(
4 m_t^2 +\hat{s} \right) } \Biggr)
B_0^- \nonumber \\
&+&\Biggl( 2 m_t^2- \Delta_m +
m_{ \sss Z}^2 \frac{3 m_t^2-\hat{s}}{\hat{s} } +
p_{\scriptscriptstyle T}^2 \frac{ 3 m_t^2 \hat{s}-2 m_t^4 }{\hat{s}^2}\Biggr)
m_t^2 \, C_0^- \nonumber \\
& +&\Biggl( \hat{s}-2 m_t^2 +
m_{ \sss Z}^2 \frac{\hat{s}-3 m_t^2 }{\hat{s}}+
p_{\scriptscriptstyle T}^2 \frac{ 2 m_t^4-3 m_t^2 \hat{s}+\hat{s}^2}{\hat{s}^2 }\Biggr)
m_t^2 \, C_0^+ \nonumber \\
& +&\log \left(\frac{m_t^2}{\mu^2}\right) \frac{ m_t^2}{\left(4
m_t^2+\hat{s}\right) } \Biggl( \Delta_m + 2 m_{ \sss Z}^2
+p_{\scriptscriptstyle T}^2 \frac{2 \hat{s}-2 m_t^2}{3 \hat{s} }\Biggr)\nonumber \\
&-&\Delta_m \frac{2 m_t^2}{\left(4 m_t^2+\hat{s}\right) } +
m_{ \sss Z}^2 \frac{\hat{s}-12 m_t^2}{4 \left(4 m_t^2+\hat{s}\right)}
+p_{\scriptscriptstyle T}^2 \frac{ 8 m_t^4-2 m_t^2 \hat{s}+ \hat{s}^2 }
{4\hat{s} ( 4m_t^2 + \hat{s})} \Biggl. \Biggl\},\nonumber \\
&&
\label{Adb}
\end{eqnarray}
and
\begin{eqnarray}
\mathcal{A}_{6}^{(0, \triangle)} &=& 0,
\label{Ast} \\
\mathcal{A}_{6}^{(0, \square)} &= &
\frac{\hat{t}-\hat{u}}{\hat{s}^2} \,p_{\scriptscriptstyle T} \Biggl[ \frac{m_t^2}2
\Bigl( B_0^- - B_0^+ \Bigr) -\frac{\hat{s}}{4} \nonumber \\
& -&\frac{2 m_t^2+\hat{s}}{2}m_t^2 \, C_0^-
+\frac{2 m_t^2-\hat{s}}{2} m_t^2 \,C_0^+ \Biggr],
\label{Asb}
\end{eqnarray}
where in eqs.(\ref{Adb},\ref{Asb}) the $B_0$ functions are understood as the
finite part of the integrals on the right hand side of eq.(\ref{Bzero}).
\begin{figure}[t]
\centering
\includegraphics[width=\linewidth]{LO_ptexp_ratio_1000.pdf}
\caption{LO partonic cross section
as a function of the invariant mass $M_{ZH}$.
The full result (red line) is plotted together with results at
different orders in the $p_{\scriptscriptstyle T}$-expansion (dashed lines). In the bottom part,
the ratio of the full result over the $p_{\scriptscriptstyle T}$-expanded one at
various orders is shown.}
\label{fig:LO}
\end{figure}
In fig.\ref{fig:LO} the exact partonic LO cross section (red line) is
shown as a function of the invariant mass of the $ZH$ system, $M_{ZH}$, and
compared to various $p_{\scriptscriptstyle T}$-expanded results.
For the numerical evaluation of the cross section here and in
the following, we used as SM input parameters
\begin{equation}
\begin{split}
m_{ \sss Z}=91.1876 \,\,\textrm{GeV}, ~~m_{ \sss H}=125.1 \,\textrm{GeV}, ~~ m_t=173.21\, \,\textrm{GeV}, \nonumber\\
m_b = 0 \, \,\textrm{GeV}, ~~G_F= 1.16637\,\,\textrm{GeV}^{-2},~~ \alpha_s(m_{ \sss Z})=0.118.
\end{split}
\end{equation}
In the lower part of fig.\ref{fig:LO} the ratio of the
exact result over the $p_{\scriptscriptstyle T}$-expanded one is shown. From this ratio
one can see that
the $\mathcal{O}(p_{\scriptscriptstyle T}^0)$ contribution covers well the $ZH$ invariant mass
region $M_{ZH}\lesssim 2m_t$, corresponding to the range of validity of an
expansion in the large top quark mass. Furthermore, when the contributions up to
$\mathcal{O}(p_{\scriptscriptstyle T}^4)$ are taken into account a remarkable agreement with the
exact result is found up to $M_{ZH}\lesssim 750\,\textrm{GeV}$.
This agreement is extended to
sligthly higher values of $M_{ZH}$ when the $\mathcal{O}(p_{\scriptscriptstyle T}^6)$ contribution is
included, a finding in close analogy to the result for di-Higgs
production \cite{Bonciani:2018omm}. Similar conclusions can be drawn from table
\ref{tab:partonic}, where it is shown that the partonic cross section
at $\mathcal{O}(p_{\scriptscriptstyle T}^4)$ agrees with the full result for
$M_{ZH} \lesssim 600 \,\textrm{GeV}$ on the permille level
and the agreement further improves when $\mathcal{O}(p_{\scriptscriptstyle T}^6)$ terms are included.
As a final remark for this section, we notice that, from the comparison
with the LO exact result, the $p_{\scriptscriptstyle T}$-expanded evaluation of the amplitude is expected to provide an
accurate result up to $M_{ZH}\sim 700-750\,\textrm{GeV}$ that corresponds, from
eq.(\ref{ptexp}), to $p_{\scriptscriptstyle T} \lesssim 300-350\, \,\textrm{GeV}\approx 2\, m_t$.
\begin{table}
\renewcommand{\arraystretch}{1.2}
\centering
\begin{tabular}{| c| c | c | c| c| c|} \hline
\rowcolor{lightgray} $M_{ZH}$ [GeV] & $\mathcal{O}(p_{\scriptscriptstyle T}^0)$ & $\mathcal{O}(p_{\scriptscriptstyle T}^2)$ & $\mathcal{O}(p_{\scriptscriptstyle T}^4)$ & $\mathcal{O}(p_{\scriptscriptstyle T}^6)$ & full \\ \hline
\cellcolor{lightgray} 300 & 0.3547 & 0.3393 & 0.3373 &0.3371& 0.3371 \\
\cellcolor{lightgray} 350 & 1.9385 & 1.8413& 1.8292 &1.8279& 1.8278 \\
\cellcolor{lightgray} 400 & 1.6990 & 1.5347 & 1.5161 &1.5143& 1.5142 \\
\cellcolor{lightgray} 600 & 0.8328 & 0.5653 & 0.5804 &0.5792& 0.5794 \\
\cellcolor{lightgray} 750 & 0.5129 & 0.2482 & 0.3129 & 0.2841 & 0.2919 \\ \hline
\end{tabular}
\caption{The partonic cross section $\hat{\sigma}^{(0)}$ at
various orders in $p_{\scriptscriptstyle T}$ and the full computation for several values of $M_{ZH}$. \label{tab:partonic}}
\end{table}
\section{Outline of the NLO Computation}
\label{sec:quattro}
In this section we discuss our evaluation of the three different types of
diagrams that appear in the virtual corrections to the $gg \to ZH$ amplitude
at the NLO.
The triangle contribution (fig.\ref{fig:dia}$(d),(e)$) was evaluated using the
observation of ref.\cite{Altenkamp:2012sx}, i.e.~we adapted
the result of ref.\cite{Aglietti:2006tp} for the decay of a
pseudoscalar boson into two gluons to our case. This contribution is evaluated
exactly and explicit expressions for the form factors are presented in
appendix \ref{app:due}. We notice that if we interpret the exact result
in terms of our counting of the expansion in $p_{\scriptscriptstyle T}$, the $p_{\scriptscriptstyle T}$-expansion of the triangle contribution stops at ${\cal O}(p_{\scriptscriptstyle T}^2)$.
Given the reducible structure of the double-triangle diagrams
(fig.\ref{fig:dia}$(g)$), an exact result for the double-triangle contribution
can be derived in terms of products of one-loop Passarino-Veltman functions
\cite{Passarino:1978jh}.
Explicit expressions for this contribution are presented in
appendix \ref{app:due}. Although we write the amplitude using a different
tensorial structure with respect to ref.\cite{Davies:2020drs} we checked,
using the relations between the two tensorial structures reported in appendix
\ref{app:uno}, that our result is in agreement with the one presented
in ref.\cite{Hasselhuhn:2016rqt}.
The box contribution (fig.\ref{fig:dia}$(f)$) was computed evaluating
the two-loop multi-scale Feynman integrals via two different expansions:
a LME up to and including $\mathcal{O}(1/m_t^6)$ terms, and an
expansion in the transverse momentum up to and including
${\cal O}(p_{\scriptscriptstyle T}^4)$ terms.
The former expansion was used as ``control'' expansion of the latter.
Indeed, the $p_{\scriptscriptstyle T}$-expanded result actually ``contains'' the LME one. The LME
differs from the expansion in $p_{\scriptscriptstyle T}$ by the fact that $\hat{s}$ is
treated as a small parameter with respect to $m_t^2$, and not on the same
footing as in the latter case. This implies that if the $p_{\scriptscriptstyle T}$-expanded result is
further expanded in terms of the $\hat{s}/m_t^2$ ratio the LME result has to
be recovered. This way, we were able to reproduce, at the analytic level,
our LME result.
We conclude this section outlining some technical details concerning our
computation. We generated the amplitudes using \texttt{FeynArts} \cite{Hahn:2000kx} and
contracted them with the projectors as defined in appendix \ref{app:uno}
using \texttt{FeynCalc }\cite{Mertig:1990an,Shtabovenko:2016sxi} and in-house
Mathematica routines. We used dimensional regularization and
the rule for the contraction of two epsilon tensors written in terms of
the determinant of $n$-dimensional metric tensors. This is not a consistent
procedure and needs to be corrected. A correction term should be added
\cite{Larin:1993tq} to the form factors computed as described
above, $\amp^{(1,ndr)}_i$, namely
\begin{equation}
\amp^{(1)}_i = \amp^{(1,ndr)}_i -\frac{\as}{\pi} C_F \amp_i^{(0)}~.
\label{eq:larin}
\end{equation}
In order to check eq.(\ref{eq:larin}), following ref.\cite{Degrassi:2011vq}
we bypassed the problem of the treatment of
$\gamma_5$ in dimensional regularization computing the amplitude via
a LME working in 4 dimension, employing the Background Field Method (BFM)
\cite{Abbott:1980hw} and using as regularization scheme the Pauli-Villars
method. This result was compared with the LME evaluation of
$\amp^{(1,ndr)}_i$, finding that the difference between the two
evaluations was indeed given by the second term on the right-hand-side of
eq.(\ref{eq:larin}).
After the contraction of the epsilon tensors the diagrams were expanded as
described in section \ref{sec:tre}. They were reduced to MIs
using \texttt{FIRE} \cite{Smirnov:2014hma} and \texttt{LiteRed} \cite{Lee:2013mka}. The
resulting MIs were exactly the same as previously found for di-Higgs
production \cite{Bonciani:2018omm}. Nearly all of them are expressed
in terms of generalised harmonic polylogarithms with the exception of
two elliptic integrals \cite{vonManteuffel:2017hms, Bonciani:2018uvv}.
The top quark mass was renormalized in the onshell scheme\footnote{Different choices
for the renormalized top mass can be easily implemented in our calculation.}
and the IR poles were subtracted as in ref.\cite{Degrassi:2016vss}.
\section{NLO results} \label{sec:sei}
We now present our numerical results for the virtual corrections.
We have implemented our results into a \texttt{FORTRAN} programme.
For the evaluation of the generalised harmonic polylogarithms we use
the code \texttt{handyG} \cite{Naterop:2019xaf}, while
the elliptic integrals are evaluated using the routines of
ref.\cite{Bonciani:2018uvv}.
In order to facilitate the comparison of our results with the ones
presented in the literature, we define the finite part of the virtual corrections
as in
ref.\cite{Davies:2020drs}\footnote{Our definition of the matrix elements
differs by a factor of
$\frac{1}{\hat{s}}$ from ref.\cite{Davies:2020drs}, \textit{cf}. also
appendix \ref{app:uno}.}
\begin{equation}
\begin{split}
\mathcal{V}_{fin}&=\frac{G_F^2 m_Z^2}{16}\left(\frac{\as}{\pi}\right)^2
\left[ \sum_{i} \left|\mathcal{A}_i^{(0)} \right|^2\frac{C_A}{2}\left(\pi^2-
\log^2\left(\frac{\mu_R^2}{\hat{s}}\right)\right)\right. \\
& \left. +2\sum_i\text{Re}\left[\mathcal{A}_i^{(0)}\left(\mathcal{A}_i^{(1)}\right)^*\right]\right]\,
\label{eq:vfin}
\end{split}
\end{equation}
and in the numerical evaluation of eq.(\ref{eq:vfin}) we fixed
$\mu_R= \sqrt{\hat{s}}$.
First, both the triangle and box LME contributions to $\mathcal{A}_i^{(1)}$ up
to $\mathcal{O}(1/m_t^6)$ terms were checked, at the analytic level, against
the results of refs.\cite{Hasselhuhn:2016rqt,Davies:2020drs} finding perfect
agreement. Then, the $p_{\scriptscriptstyle T}$-expanded results for low $M_{ZH}$ were
confronted numerically with the LME ones, finding a good numerical agreement.
We recall that, at the same order in the expansion,
the $p_{\scriptscriptstyle T}$-expanded terms are more accurate than
the LME ones, although computationally more demanding.
In ref.\cite{Chen:2020gae} a numerical evaluation of eq.(\ref{eq:vfin})
was presented. In that reference the exact NLO amplitude was reduced to a
set of MIs that were evaluated numerically using the code \texttt{pySecDec}
\cite{Borowka:2017idc,Borowka:2018goh}. Table 3 of that reference presents
the numerical results\footnote{The values in table 3 of ref.\cite{Chen:2020gae}
are defined as $V_{fin} 4/(\as^2 \alpha^2)$.} for various points in the
phase space. For the four points in that table lying within the range of
validity of our expansion we find a difference with respect to our results of
less than 1 permille in 3 cases and reaching the 1 permille level in one case, similarly to what we find at LO.
It should be noticed that small differences
on the permille level can be explained not only by the different
approaches (exact vs. $p_{\scriptscriptstyle T}$-expanded) but also by the fact that
in ref.\cite{Chen:2020gae} the $m_{ \sss Z}^2/m_t^2$ and $m_{ \sss H}^2/m_t^2$ ratios were
approximated by a ratio of two integer numbers.
\begin{figure}[th]
\includegraphics[width=\textwidth]{sigma_part_virt_LMEreweighted.pdf}
\caption{$\Delta \hat{\sigma}_{virt}$ defined by eq.\eqref{eq:deltasigma}, shown as a function of $M_{ZH}$. The various orders of the $p_{\scriptscriptstyle T}$-expansion are plotted as dashed lines, while the black and red continuous lines stand for the LME and reweighted $m_t \rightarrow \infty$ results, respectively.}
\label{fig:deltasigma}
\end{figure}
In order to present our results we define a virtual part of the partonic cross section
from the finite part of the virtual corrections in eq.\eqref{eq:vfin} by
\begin{equation}
\Delta \hat{\sigma}_{virt}=
\int_{\hat{t}^-}^{\hat{t}^+} d\hat{t}
\frac{\alpha_s}{16\pi^2}\frac{1}{\hat{s}^2}\mathcal{V}_{fin}\,
\label{eq:deltasigma}
\end{equation}
and show it in fig.\ref{fig:deltasigma}. The dashed lines in the
plot show the different orders in our expansion.
For all parts of the matrix elements we use the best results
available, i.e.~both $\mathcal{A}^{(0)}$ and the double-triangle
contribution are evaluated exactly, while for
$\mathcal{A}^{(1)}$ we use the various orders in the $p_{\scriptscriptstyle T}$-expansion.
For comparison, we show the results where
$\mathcal{A}^{(1)}$ is replaced by the one computed in LME up to
$\mathcal{O}(1/m_t^6)$ (full black line), which as mentioned before is valid
up to $M_{ZH}< 2 m_t$. We see that within the validity of the LME our
results agree well with it.
Furthermore, we show the results in the infinite top
mass limit reweighted by the full amplitudes squared (full red line), corresponding to the
approach of ref.\cite{Altenkamp:2012sx}, keeping though the double triangle
contribution in full top mass dependence.
Differently from the LME line, the $m_t \to \infty$ reweighted one
shows a behaviour, for $M_{ZH} \gtrsim 400\,\textrm{GeV}$, similar to the behaviour of
the $p_{\scriptscriptstyle T}$ lines. Still, the difference
between the reweighted result and the $p_{\scriptscriptstyle T}$-expanded ones is significant.
The $p_{\scriptscriptstyle T}$-expanded results show
very good convergence. The zero order in our expansion agrees
extremely well with the higher orders in the expansion, and all the
three results are very close up to $M_{ZH} \sim 500\,\textrm{GeV}$.
Finally, we note that the evaluation of $\mathcal{V}_{fin}$ requires a
running time per phase space point less than
one second. In addition, the integration over the $\hat{t}$ variable
in eq.(\ref{eq:deltasigma}) converges very well, such that
fig.\ref{fig:deltasigma} could be produced on a standard laptop in a
few hours. Thus, our computation of the two-loop virtual corrections
in $gg \to ZH$ is suitable to be used within a Monte Carlo code.
\section{Conclusion \label{sec:conclusion}}
In this paper, we computed the two-loop NLO virtual corrections to the
$gg \to ZH$ process. Among the two-loop Feynman diagrams contributing
to the process, the ones belonging to the triangle and
double-triangle topology were computed exactly. The ones belonging
to the box topology, which contain multiscale integrals, were evaluated via an
expansion in the $Z$ transverse momentum. This novel approach of
computing a process in the forward kinematics
was originally proposed in ref.\cite{Bonciani:2018omm} for
double Higgs production where the particles in the final state have
the same mass. In this paper, we extended
the method to the more general case of two different masses in the
final state and to a process whose amplitude is not symmetric
under the $\hat{t}\leftrightarrow \hat{u}$ exchange.
The result of the evaluation of the box contribution is expressed,
both at one- and two-loop level, in terms of the
same set of MIs that was found in ref.\cite{Bonciani:2018omm} for
double Higgs production. The two-loop MIs can be all
expressed in terms of generalised harmonic polylogarithms with the
exception of two elliptic integrals.
As we have shown explicitly at the LO, the range of validity of our
computation covers values of the invariant mass
$M_{ZH}\lesssim 750\text{ GeV}$ corresponding to 98.5\% of the phase
space at LHC energies. We showed that few terms in our
expansion were sufficient to obtain an incredible good agreement with the
numerical evalution of ${\mathcal V}_{fin}$ presented in ref.\cite{Chen:2020gae},
at the level of a permille or less difference between our analytic result and the numerical one.
The advantage of our analytic approach compared to the numerical
calculation is also in the computing time. With an average evaluation
time of half a second per phase space point, an inclusion into a Monte Carlo
programme is realistic. Due to the flexibility of our analytic
results, an application to beyond-the-Standard Model is certainly
possible.
Finally, we remark that our calculation complements
nicely the results obtained in ref.\cite{Davies:2020drs} using a high-energy
expansion, that according to the authors provides precise results for
$p_{\scriptscriptstyle T} \gtrsim 200\,\textrm{GeV}$. The merging of the two analyses is going to provide
a result that covers the whole phase space, can be easily implemented into a
Monte Carlo code and presents the flexibility of an analytic calculation.
\section*{Acknowledgements}
We are indebted to R.~Bonciani for his contribution during the first stage of
this work.
We thank G.~Heinrich and J.~Schlenk for help with the comparison with
their results, E.~Bagnaschi for help with optimising the numerical
evaluation of the GPLs, and M.~Kraus for discussions.
The work of G.D. was partially supported by the Italian Ministry of Research
(MUR) under grant PRIN 20172LNEEZ. The work of
P.P.G. has received financial support from Xunta de Galicia (Centro
singular de investigaci\'on de Galicia accreditation 2019-2022), by
European Union ERDF, and by ``Mar\'ia de Maeztu" Units of Excellence
program MDM-2016-0692 and the Spanish Research State Agency; L.A 's research is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - Projektnummer 417533893/GRK2575 ``Rethinking Quantum Field Theory".
\begin{appendletterA}
\section{Orthogonal Projectors in $gg \to ZH$}
\label{app:uno}
In this appendix we present
the explicit expressions of the projectors $\mathcal{P}_i^{\mu\nu\rho}$
appearing in eq.(\ref{eq:amp}). The projectors are all normalized to 1.
They are:
\begin{eqnarray}
\mathcal{P}_1^{\mu\nu\rho}&=&\frac{m_{ \sss Z}}{\sqrt{2}s'p_{\scriptscriptstyle T}^2}\biggl[ p_1^\nu
\epsilon^{\mu\rho p_1 p_2}-p_2^\mu \epsilon^{\nu\rho p_1 p_2}+
q_t^\mu \epsilon^{\nu\rho p_2 p_3}\\
&+&q_u^\nu \epsilon^{\mu\rho p_1 p_3}+s' \epsilon^{\mu\nu\rho p_2}-s'
\epsilon^{\mu\nu\rho p_1}\biggr],\\
\mathcal{P}_2^{\mu\nu\rho}&=&\frac{1}{\sqrt{2}s'p_{\scriptscriptstyle T}}
\biggl[ q_u^\nu \epsilon^{\mu\rho p_1 p_3}+q_t^\mu\epsilon^{\nu\rho p_2 p_3}\biggr],\\
\mathcal{P}_3^{\mu\nu\rho}&=&\frac{\sqrt{3}}{2s'p_{\scriptscriptstyle T}}
\biggl[ s' \epsilon^{\mu\nu\rho p_1}+s' \epsilon^{\mu\nu\rho p_2}-
p_1^\nu\epsilon^{\mu\rho p_1 p_2}-p_2^\mu \epsilon^{\nu\rho p_1 p_2} \nonumber \\
&+& \left( q_u^\nu \epsilon^{\mu\rho p_1 p_3} -q_t^\mu \epsilon^{\nu\rho p_2 p_3}
\right) \left(\frac13 + \frac{m_{ \sss Z}^2}{p_{\scriptscriptstyle T}^2} \right) \nonumber\\
&+& \frac{m_{ \sss Z}^2}{p_{\scriptscriptstyle T}^2}\left( q_t^\mu\epsilon^{\nu\rho p_2 p_1}-
q_u^\nu\epsilon^{\mu\rho p_1 p_2} \right) \biggr], \\
\mathcal{P}_4^{\mu\nu\rho}&=&\frac{m_{ \sss Z}}{\sqrt{2}s'p_{\scriptscriptstyle T}^2}
\biggl[ q_t^\mu(\epsilon^{\nu\rho p_2 p_1}-\epsilon^{\nu\rho p_2 p_3})-
q_u^\nu (\epsilon^{\mu\rho p_1 p_2}-\epsilon^{\mu\rho p_1 p_3})\biggr], \\
\mathcal{P}_5^{\mu\nu\rho}&=&\frac{1}{\sqrt{6}s'p_{\scriptscriptstyle T}}
\biggl[ q_t^\mu\epsilon^{\nu\rho p_2 p_3}-q_u^\nu \epsilon^{\mu\rho p_1 p_3}\biggr],\\
\mathcal{P}_6^{\mu\nu\rho}&=&\frac1{s'p_{\scriptscriptstyle T}}\biggl[
g^{\mu\nu} \epsilon^{\rho p_1 p_2 p_3}+s' \epsilon^{\mu\nu\rho p_3}+
p_1^\nu \epsilon^{\mu\rho p_2 p_3}-p_2^\mu \epsilon^{\nu\rho p_1 p_3}-
\frac{s'}2 \epsilon^{\mu\nu\rho p_2} \nonumber \\
&+&\frac12 \left( p_1^\nu\epsilon^{\mu\rho p_1 p_2}+p_2^\mu \epsilon^{\nu\rho p_1 p_2}+
q_u^\nu \epsilon^{\mu\rho p_1 p_3}-q_t^\mu \epsilon^{\nu\rho p_2 p_3}
- s' \epsilon^{\mu\nu\rho p_1} \right) \nonumber \\
&+& \frac{m_{ \sss Z}^2}{2p_{\scriptscriptstyle T}^2} (q_t^\mu\epsilon^{\nu\rho p_2 p_1}-
q_u^\nu\epsilon^{\mu\rho p_1 p_2}+ q_u^\nu \epsilon^{\mu\rho p_1 p_3}-
q_t^\mu \epsilon^{\nu\rho p_2 p_3})\biggr]~,
\end{eqnarray}
where we defined $q_t^\mu=(p_3^\mu-\frac{t'}{s'} p_2^\mu)$ and $q_u^\nu=(p_3^\nu-\frac{u'}{s'} p_1^\nu)$ and we used the shorthand notation $\epsilon^{\mu\nu\rho p_2}\equiv \epsilon^{\mu\nu\rho\sigma}p_2^\sigma$.
Using these projectors we obtained the relations between the form factors
$\amp_i$ defined in in eq.(\ref{eq:amp}) and those defined in
section 2 of ref.\cite{Davies:2020drs}:
\begin{eqnarray}
\amp_1&=&\frac{p_{\scriptscriptstyle T}^2}{2\sqrt{2}m_{ \sss Z}(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)}
\biggl[ (t'+u')F_{12}^+-(t'-u')F_{12}^- \biggr], \\
\amp_2&=&-\frac{p_{\scriptscriptstyle T}}{2\sqrt{2}(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)} \biggl[
(t'+u')F_{12}^+-(t'-u')F_{12}^- \nonumber \\
&-&\frac{p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2}{2 s'}((t'+u')F_{3}^+-(t'-u')F_{3}^-) \biggr],\\
\amp_3&=&\frac{p_{\scriptscriptstyle T}}{2\sqrt{3}(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)} \biggl[
(t'+u')F_{12}^--(t'-u')F_{12}^+ \nonumber \\
&+& (p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)(F_{2}^-+F_4) \biggr],\\
\amp_4&=&-\frac{m_{ \sss Z}}{2\sqrt{2}(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)} \biggr[
(t'+u')F_{12}^--(t'-u')F_{12}^+ \nonumber \\
&+&(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)\left( (1-\frac{p_{\scriptscriptstyle T}^2}{m_{ \sss Z}^2})F_2^-+2F_4 \right) \biggl],\\
\amp_5&=&\frac{p_{\scriptscriptstyle T}}{2\sqrt{6}(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2)} \biggr[
(t'+u')F_{12}^--(t'-u')F_{12}^+ \nonumber \\
&+& (p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2) \left(
4(F_2^-+F_4)+\frac{3}{2s'}\left( (t'+u')F_{3}^--(t'-u')F_{3}^+ \right) \right)
\biggr],\nonumber\\
&& \\
\amp_6&=&\frac{p_{\scriptscriptstyle T}}{2}F_4.
\end{eqnarray}
\end{appendletterA}
\begin{appendletterB}
\section{Two-loop Results}
\label{app:due}
The NLO amplitude can be written in terms of three contributions,
namely the two-loop 1PI triangle, the two-loop 1PI box and the
reducible double-triangle diagrams,
\begin{equation}
\mathcal{A}_{i}^{(1)} = \mathcal{A}_{i}^{(1, \triangle) } +
\mathcal{A}_{i}^{(1, \square) } + \mathcal{A}_{i}^{(1, \bowtie) }~.
\end{equation}
We present here the exact results for the
double-triangle and triangle contributions to all the form factors. We find
\begin{eqnarray}
\mathcal{A}_{1}^{(1, \bowtie)} &=& -\frac{m_t^2 p_{\scriptscriptstyle T}^2}{4 \sqrt{2}~ m_{ \sss Z} \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2\right)^2} \Biggl[ F_t(\hat{t}) \left(G_t(\hat{t},\hat{u})-G_b(\hat{t},\hat{u})\right)+ (\hat{t} \leftrightarrow \hat{u}) \Biggr], \\
\mathcal{A}_{2}^{(1, \bowtie)} &=& \frac{m_t^2 p_{\scriptscriptstyle T}}{4 \sqrt{2} \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2\right)^2} \Biggl[ F_t(\hat{t}) \left(G_t(\hat{t},\hat{u})-G_b(\hat{t},\hat{u})\right)+ (\hat{t} \leftrightarrow \hat{u})\Biggr], \\
\mathcal{A}_{3}^{(1, \bowtie)} &=& \frac{m_t^2 p_{\scriptscriptstyle T}}{4 \sqrt{3} ~ \hat{s} \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2\right)^2} \Biggl[\left(m_{ \sss H}^2-\hat{t}\right) F_t(\hat{t}) \left(G_t(\hat{t},\hat{u})-G_b(\hat{t},\hat{u})\right)- (\hat{t} \leftrightarrow \hat{u})\Biggr], \nonumber\\
&&\\
\mathcal{A}_{4}^{(1, \bowtie)} &=& -\frac{m_t^2}{4 \sqrt{2} ~ m_{ \sss Z} \hat{s}^2 \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2\right)^2} \Biggl[ \Bigl(m_{ \sss Z}^2 \left(m_{ \sss H}^2-\hat{t}\right)^2\nonumber \\
& -&\hat{t} \left(m_{ \sss Z}^2-\hat{u}\right)^2\Bigr) F_t(\hat{t})
\left(G_t(\hat{t},\hat{u})-G_b(\hat{t},\hat{u})\right)
- (\hat{t} \leftrightarrow \hat{u}) \Biggr], \\
\mathcal{A}_{5}^{(1, \bowtie)} &=& -\frac{m_t^2 p_{\scriptscriptstyle T}}{4 \sqrt{6} ~ \hat{s} \left(m_{ \sss Z}^2+p_{\scriptscriptstyle T}^2\right)^2} \Biggl[ \left(4 m_{ \sss Z}^2-\hat{s}-4
\hat{u}\right) F_t(\hat{t}) \left(G_t(\hat{t},\hat{u})-G_b(\hat{t},\hat{u})\right)\nonumber \\
&-& (\hat{t} \leftrightarrow \hat{u}) \Biggr], \\
\mathcal{A}_{6}^{(1, \bowtie)} &=& 0,
\end{eqnarray}
where
\begin{eqnarray}
F_t(\hat{t}) &=& \frac{1}{\left(m_{ \sss H}^2-\hat{t}\right)^2}
\Biggl[2 \hat{t} \Bigl( B_0\left(\hat{t},m_t^2,m_t^2\right)-
B_0\left(m_{ \sss H}^2,m_t^2,m_t^2\right) \Bigr)\nonumber \\
& +&\left(m_{ \sss H}^2-\hat{t}\right)
\Bigl(\left(m_{ \sss H}^2-4 m_t^2-\hat{t}\right)
C_0\left(0,m_{ \sss H}^2,\hat{t},m_t^2,m_t^2,m_t^2\right)-2\Bigr)\Biggr], \nonumber\\
&&\\
G_x(\hat{t},\hat{u}) &=& \left(m_{ \sss Z}^2-\hat{u}\right) \Biggl[m_{ \sss Z}^2
\Bigl( B_0\left(\hat{t},m_x^2,m_x^2\right) -
B_0\left(m_{ \sss Z}^2,m_x^2,m_x^2\right) \Bigr) \nonumber\\
& +&\left(\hat{t}-m_{ \sss Z}^2\right) \Bigl(2 m_x^2
C_0\left(0,\hat{t},m_{ \sss Z}^2,m_x^2,m_x^2,m_x^2\right)+1\Bigr)\Biggr].
\end{eqnarray}
Instead, for the triangle diagrams, we obtain
\begin{eqnarray}
\mathcal{A}_{1}^{(1, \triangle) } &=& \frac{ p_{\scriptscriptstyle T}^2 ~
( \hat{s}-\Delta_m)}{4 \sqrt{2} m_{ \sss Z} } \frac{\mathcal{K}_t^{(2l)}}{
\left(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2\right)}, \\
\mathcal{A}_{2}^{(1, \triangle) } &=& - \frac{ p_{\scriptscriptstyle T} ~ ( \hat{s}-\Delta_m)}{4 \sqrt{2} }
\frac{\mathcal{K}_t^{(2l)}}{ \left(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2\right)},\\
\mathcal{A}_{3}^{(1, \triangle) } &=& \frac{ p_{\scriptscriptstyle T} ~ (\hat{t}-\hat{u})}{4 \sqrt{3} }
\frac{\mathcal{K}_t^{(2l)}}{\left(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2\right)}, \\
\mathcal{A}_{4}^{(1, \triangle) } &=& -\frac{ m_{ \sss Z} ~ (\hat{t}-\hat{u})}{4 \sqrt{2} }
\frac{\mathcal{K}_t^{(2l)}}{ \left(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2\right)}, \\
\mathcal{A}_{5}^{(1, \triangle) } &=& -\frac{ p_{\scriptscriptstyle T} ~ (\hat{t}-\hat{u})}{4 \sqrt{6} }
\frac{\mathcal{K}_t^{(2l)}}{\left(p_{\scriptscriptstyle T}^2+m_{ \sss Z}^2\right)}, \\
\mathcal{A}_{6}^{(1, \triangle) } &=& 0,
\end{eqnarray}
where the $\mathcal{K}_t^{(2l)}$ function is defined in eq.(4.11) of
ref.\cite{Aglietti:2006tp}.
We do not show the explicit results for the $p_{\scriptscriptstyle T}$-expansion of the
two-loop box diagrams, since the analytic expressions are very
lengthy, even for the lowest order term of the expansion.
\end{appendletterB}
\bibliographystyle{utphys}
|
\section{Introduction}
Let $\mathbb{C}^{m\times n}$ be the space of $m\times n$ complex matrices.
For $A\in \Bbb C^{n\times n}$, we denote the eigenvalues
of $A$ by $\lambda_1(A), \lambda_2(A), \dots, \lambda_n(A)$
and the singular values of $A$ by
$\sigma_1(A), \sigma_2(A), \dots, \sigma_n(A)$. If $\lambda_1(A), \lambda_2(A), \dots, \lambda_n(A)$
are all real, we arrange them in decreasing order:
$\lambda_1(A)\ge\lambda_2(A)\ge \cdots\ge\lambda_n(A)$. The singular values are always
ordered decreasingly: $\sigma_1(A)\ge\sigma_2(A)\ge\dots\ge\sigma_n(A)$.
Horn conjecture ...
There is a large family of matrix inequalities concerning the eigenvalues and singular values of the product (including Schur or Hadamard product)
and sum of matrices. These inequalities may be sorted in four types:
$\sum\zeta_{_\mathcal{I}}(A+B), \, \prod\zeta_{_\mathcal{I}} (A+B), \, \sum \zeta_{_\mathcal{I}} (AB), \, \prod\zeta_{_\mathcal{I}} (AB)$, where
$A$ and $B$ are generic matrices, and $\zeta_{_\mathcal{I}}(\cdot)$ represents selected
eigenvalues or singular values indexed by a sequence ${\mathcal{I}}$. The inequalities in sum $\sum$ are usually called majorization type (\cite[p.\,45]{HLP},
\cite{M-O-A-2011}), while the ones in product {$\prod$} are referred to as logarithmic (log-)
majorization type.
See \cite[p.\,16]{M-O-A-2011}, \cite{AndoLogMaj94, HiLim17}).
For example, the following inequalities \cite{Fiedler-1971}
(or \cite[G.2.a, p.\,333]{M-O-A-2011})
\label{lem-Fiedler} are log-majorization type with $\mathcal{I}=\{k, \dots, n\}$: for each $k=1, \dots, n$,
\begin{equation}\label{lem-Fiedler}
\prod\limits_{t=k}^n\lambda_{t}(A+B)\ge\prod\limits_{t=k}^n[\lambda_{t}(A)+\lambda_{t}(B)]\ge
\prod\limits_{t=k}^n\lambda_{t}(A)+\prod\limits_{t=k}^n \lambda_{t}(B),
\end{equation}
where $A$ and $B$ are $n\times n$ positive semidefinite matrices.
Closely related inequalities of the same type, due to Oppenheim \cite{Oppenheim-AMM-1954} (or \cite[F.2, p.\,685]{M-O-A-2011}), are, for $n\times n$ positive semidefinite $A$ and $B$, and for each $k=1, \dots, n,$
\begin{align}\label{Mink-2}
\left [ \prod\limits_{t=k}^n\lambda_{t}(A + B)\right]^{\frac{1}{n-k+1}}
\ge& \left[ \prod\limits_{t=k}^n\lambda_{t}(A)\right]^{\frac{1}{n-k+1}} + \left [ \prod\limits_{t=k}^n\lambda_{t}(B)\right]^{\frac{1}{n-k+1}},
\end{align}
which give the Minkowski inequality by setting $k=1$
(\cite[p.\,685]{M-O-A-2011} or \cite[p.\,215]{ZFZbook11})
\begin{align}\label{Mink-1}
\left[\det(A+B)\right]^{\frac{1}{n}}\ge\left[\det(A)\right]^{\frac{1}{n}}+
\left[\det(B)\right]^{\frac{1}{n}}.
\end{align}
In \cite{XiZ19}, we showed majorization inequalities of $\sum \zeta_{_\mathcal{I}} (AB)$ for Hermitian matrices $A$ and $B$ with an arbitrary index set $\mathcal{I}$. In this paper, we present
some log-majorization inequalities of $\prod \zeta_{_\mathcal{I}} (A+B)$ with any index set
$\mathcal{I}$ for positive semidefinite matrices $A$ and $B$, extending (\ref{lem-Fiedler}) and (\ref{Mink-2}).
Our theorems are more general and stronger than some existing results. We apply
main results to improve the Hua-Marcus inequalities for contractive matrices.
\medskip
\section{Some lemmas}
Let $X^*$ denote the conjugate transpose of matrix or vector $X$.
For a square matrix $A$, we write $A\ge 0$ if $A$ is
positive semidefinite and $A>0$ if $A$ is positive definite. For Hermitian matrices $A, B\in \Bbb C^{n\times n}$,
we write $A\ge B$ if $A-B\ge 0$.
Through the paper,
let $n$ be a positive integer. Let $\mathcal{I}=\{i_1, \dots, i_k\}$, where
$1\le i_1<\cdots<i_k\le n$ is any subsequence of $1, \dots, n$,
$k=1, \dots, n$. If $A\in \mathbb{C}^{n\times n}$ is positive semidefinite, then
$\l_{i_1}(A)\geq \cdots \geq \l_{i_k}(A)$ are $k$ eigenvalues of $A$
indexed by $\mathcal{I}=\{i_1, \dots, i_k\}$. For $t=1, \dots, k$,
setting $i_t=t$ gives
the first $k$ largest eigenvalues of $A$; putting $i_t=n-k+t$ gives
the last $k$ smallest eigenvalues of $A$.
\begin{lem}[Hoffman {\cite[Cor.~2.5]{Amir-Moez-DMJ-1956}}] \label{lem1-Amir}
Let $A\in \mathbb{C}^{n\times n}$ be positive semidefinite. Then
\begin{eqnarray*}
\prod\limits_{t=1}^k\lambda_{i_t}(A)
& = & \max\limits_{\mathbb{S}_1\subset\cdots\subset \mathbb{S}_k\subset \mathbb{C}^n\hfill \atop \dim \mathbb{S}_t=i_t}
\min\limits_{ {x}_t\in \mathbb{S}_t, ({x}_r,{x}_s)=\delta_{rs}\hfill\atop U_k=\left(x_{1},\dots,x_{k}\right)}
\det({U_k^*AU_k}),
\end{eqnarray*}
where $\delta_{rs}$ is the Kronecker delta, i.e., $\delta_{rs}=1$ if $r=s$, or 0 otherwise.
\end{lem}
\begin{lem}[Lidski\v{i} \cite{Lid50}]\label{lem2-LWZ}
Let $A, B \in \mathbb{C}^{n\times n}$ be positive semidefinite. Then
\begin{equation}\label{lem2-LWZ-2}
\prod\limits_{t=1}^k\lambda_{i_t}(A)\lambda_{n-t+1}(B)
\le \prod\limits_{t=1}^k\lambda_{i_t}(AB)\le\prod\limits_{t=1}^k\lambda_{i_t}(A)\lambda_t(B).
\end{equation}
\end{lem}
More general inequalities of (\ref{lem2-LWZ-2}) for singular values are
due to Gel’fand and Naimark (see, e.g., \cite[p.\,340]{M-O-A-2011}). The inequalities
on the left-hand side of (\ref{lem2-LWZ-2})
can be found explicitly in \cite{Wang-Zhang-LAA-1992}.
\begin{lem}\label{lem5Z}
Let $a_1, \dots, a_n$ and $b_1, \dots, b_n$ be nonnegative real numbers.
Then
\begin{equation}\label{lem2.3-1}
\prod\limits_{t=1}^n
(a_t+b_t)\geq \prod\limits_{t=1}^n
a_t+\prod\limits_{t=1}^n
b_t +(2^n-2) \left [ \prod\limits_{t=1}^n
(a_tb_t)\right ]^{\frac12}.
\end{equation}
In particular, for
$x, y\geq 0$,
\begin{align}\label{lem-5-1}
&\big(x^{\frac{1}{n}}+y^{\frac{1}{n}}\big)^n
\ge x+y+\left(2^n-2\right)(xy)^{\frac{1}{2}}.
\end{align}
\end{lem}
\begin{proof}
Use induction on $n$ and apply the arithmetic-geometric mean inequality.
\end{proof}
\begin{comment}
Note: Equality occurs in (\ref{lem2.3-1}) if and only if
one of the following holds:
(1) $n=1$, (2) $n=2$, $a_1b_2=a_2b_1$,
(3)
$a_t =0$ for all $t$,
(4) $b_t=0$ for all $t$, (5) $a_t=b_t=0$ for some $t$, (6) $a_t=b_t$ for all $t$.
Thus, if $n>2$ and all $a_t$ and $b_t$ are positive, then
equality holds if and only if $a_t=b_t$ for all $t$.
Detailed proof of Lemma \ref{lem5Z}. (omitted in v.8, submission version)
Inequality case: $n=1$ case is trivial. $n=2$ case by GM-AM inequality.
Suppose that it is true for $n-1$. We show by induction that the inequality holds for $n$.
\begin{eqnarray*}
\prod\limits_{t=1}^n
(a_t+b_t) & = & (a_n+b_n) \prod\limits_{t=1}^{n-1}
(a_t+b_t) \\
& \geq & (a_n+b_n) \big ( \prod\limits_{t=1}^{n-1}
a_t+\prod\limits_{t=1}^{n-1}
b_t +(2^{n-1}-2) \left [ \prod\limits_{t=1}^{n-1}
(a_tb_t)\right ]^{\frac12} \big )\\
& = & \prod\limits_{t=1}^n
a_t + \prod\limits_{t=1}^n
b_t + a_n \prod\limits_{t=1}^{n-1}
b_t+ b_n \prod\limits_{t=1}^{n-1}
a_t \\
& & + (a_n+b_n)(2^{n-1}-2) \left [ \prod\limits_{t=1}^{n-1}
(a_tb_t)\right ]^{\frac12} \;\; (\mbox{use AM-GM ineq. twice})\\
& \geq & \prod\limits_{t=1}^n
a_t + \prod\limits_{t=1}^n b_t +2 \left [ \prod\limits_{t=1}^{n}
(a_tb_t)\right ]^{\frac12} + 2(a_nb_n)^{\frac12} (2^{n-1}-2) \left [ \prod\limits_{t=1}^{n-1}
(a_tb_t)\right ]^{\frac12}\\
& \geq & \prod\limits_{t=1}^n
a_t + \prod\limits_{t=1}^n b_t +(2^{n}-2) \left [ \prod\limits_{t=1}^{n}
(a_tb_t)\right ]^{\frac12}.
\end{eqnarray*}
Equality is not used, not as important, unfinished. 2020Dec9
To prove the equality case, by induction. Suppose it is true for n-1.
For the case of n, the identity for n reduces to the case of n-1 by AM-GM, with
a_n=b_n ...
\end{comment}
We remark that Lemma \ref{lem5Z} implies immediately
a result of Hartfiel \cite{Hartfiel-PAMS-1973}:
\begin{equation}\label{Hartfiel-1}
\det(A + B)\ge \det A + \det B+(2^n-2)[\det A\det B]^{\frac12}
\end{equation}
because of the fact that any two positive semidefinite matrices
of the same size are simultaneously ${}^*$-congruent to diagonal matrices (see, e.g., \cite[p.\,209]{ZFZbook11}).
\section{Main Results}
We begin with a result that is important to the proof of our main theorem.
\begin{lem}\label{lem2-N}
Let
$D={\rm{diag}}\big(\lambda_{1},\lambda_{2},\dots,\lambda_{n}\big)$, where
$\lambda_1\ge\lambda_2\ge \cdots\ge\lambda_n\ge0$, and let
$U_k=\left(u_{1},\dots,u_{k}\right)=\left(u_{ij}\right)$ be a partial isometry,
i.e., $U_k$ is an $n\times k$
matrix such that $U^*_kU_k=I_k$. If $m\geq 1$ and $u_{i1}=0$ for all $i> m$, then
\begin{align}\label{lem2-N-1}
& \det(U^*_kDU_k)\ge\lambda_{m}\det\left [\left(u_{2},\dots,u_{k}\right)^*D_m\left(u_{2},\dots,u_{k}\right)\right ],
\end{align}
where $D_{m}={\rm{diag}}\big(\underbrace{\lambda_{m},\dots,\lambda_{m}}_{m},
\lambda_{m+1},\dots,\lambda_{n}\big).$
\end{lem}
\begin{proof}
Let $V=\left(u_{2},\dots,u_{k}\right)$. Since $D\ge D_{m}$
and $u_{i1}=0$ for $i>m$, we have
\begin{eqnarray*}
\det(U_k^*DU_k)& \ge & \det(U_k^*D_{m}U_k)
=\det\begin{pmatrix}
\lambda_{m}u^*_1u_1 & \lambda_{m}u^*_1V \\
\lambda_{m}V^*u_1 & V^*D_{m}V
\end{pmatrix}\\
& =&\det\begin{pmatrix}
\lambda_{m} & 0 \\
0 & V^*D_{m}V
\end{pmatrix}
=\lambda_{m}\det\left(V^*D_mV\right)\\
& = & \lambda_{m}\det\left [\left(u_{2},\dots,u_{k}\right)^*D_m\left(u_{2},\dots,u_{k}\right)\right ].
\end{eqnarray*}
\end{proof}
\begin{comment}
\begin{lem}\label{MainLem}
Let $A$ be an $n\times n$ positive semidefinite matrix and let $u_1, \dots, u_n$ be orthonormal eigenvectors associated with $\l_1(A), \dots, \l_n(A)$, respectively. Then
\begin{align*}
\det(U_k^*AU_k)\ge \prod\limits_{t=1}^k\lambda_{i_t}(A),
\end{align*}
where $U_k=(x_1, \dots, x_k)$ is an $n\times k$ matrix whose columns
$x_1, \dots, x_k$ are any orthonormal vectors such that $x_t$
is contained in $\Span (u_1, \dots, u_{i_t})$, $t=1, \dots, k$.
\end{lem}
\begin{proof} For simplicity, let $\l_i=\l_i(A)$ for each $i$.
Let $D_{0}$ be the $i_k\times i_k$ diagonal matrix with $\l_1, \l_2, \dots \l_{i_k}$
on the main diagonal, i.e., $D_0=\diag (\l_1, \l_2, \dots, \l_{i_k})$. As a subsequence of
$\l_1, \l_2, \dots \l_{i_k}$, the selected $k$ eigenvalues $\l_{i_1}, \dots \l_{i_k}$ are also on the main diagonal of $D_0$. For each $j$ (as subscript of $i_j$),
we define an $i_k\times i_k$ matrix $D_{j}$ by replacing the diagonal entries
from $\l_1$ down to $ \l_{i_j}$ of $D_0$ by $\l_{i_j}$, that is,
$$D_{1}=\diag (\underbrace{\l_{i_1},\dots, \l_{i_1}}_{i_1}\,, \l_{{i_1}+1}, \dots, \l_{i_k}),$$
\vspace{-.1in}
$$D_{2}=\diag (\underbrace{\l_{i_2},\dots, \l_{i_2}}_{i_2}\,, \l_{{i_2}+1}, \dots, \l_{i_k}),$$
\vspace{-.1in}
$$\vdots$$
\vspace{-.2in}
$$D_{k}=\diag (\l_{i_k},\dots, \l_{i_k})=\l_{i_k} I_{i_k}.$$
Apparently,
$$D_{0}\geq D_{1}\geq D_{2}\geq \cdots \geq D_{k}.$$
Let $\{x_1, \dots, x_k\}$ be any set of orthonormal vectors,
where $x_t\in \Span (u_1, \dots, u_{i_t})$, $t=1, \dots, k$. Let
$x_t=a_{t1}u_1+\cdots +a_{ti_t} u_{i_t}+0u_{i_t+1}+\dots + 0 u_{i_k}=(u_1, \dots, u_{i_k})\a_t$, where $\a_t = (a_{t1}, \dots, a_{ti_t}, 0, \dots, 0)^{\tiny T}$
(here ${}^{\tiny T}$ is for transpose),
$t=1, \dots, k$. Then
$$U_k=(x_1, \dots, x_k)= (u_1, \dots, u_{i_k})(\a_1, \dots, \a_k).$$
Let $C=(\a_1, \dots, \a_k)$. Since
$\{x_1, \dots, x_k\}$ and $\{u_1, \dots, u_{i_k}\}$ are orthonormal sets,
we obtain that
$ C^*C=I_k$. Denote by $C_{j}$ the submatrix of $C$ by
deleting the first $j-1$ columns, i.e., $C_{j}= (\a_{j}, \dots, \a_k)$.
So, $C=(\a_1, C_2)$.
Then $C^*C=I_k$ reveals $\a_1^* C_{2}=0$. Note that
the components of $\a_1$ are zeros except the first $i_1$ components (i.e.,
the last $i_k-i_1$ components of $\a_1$ are all equal to zero).
A computation yields
$\a_1^*D_{1}C_{2}=\l_{i_1}\a_1^*C_{2}=0$.
It follows that
\begin{eqnarray*}
\det (U^*_kAU_k) & = & \det \big ( (\a_1, \dots, \a_k)^*(u_1, \dots, u_{i_k})^*A (u_1, \dots, u_{i_k})(\a_1, \dots, \a_k)\big )\\
& = & \det \big( (\a_1, \dots, \a_k)^*\diag (\l_1, \dots, \l_{i_k})(\a_1, \dots, \a_k)\big )\\
& \geq & \det \big( (\a_1, \dots, \a_k)^*D_{1}(\a_1, \dots, \a_k)\big)\\
& = & \det \big( (\a_1,C_{2})^*D_{1}(\a_1,C_{2})\big)\\
& = & \det \left ( \begin{matrix}
\l_{i_1} & \a_1^*D_{1}C_{2}\\
C_{2}^*D_{1}^*\a_1 & C_{2}^*D_{1}C_{2} \end{matrix}\right ) \\
& = & \det \left ( \begin{matrix}
\l_{i_1} & 0\\
0 & C_{2}^*D_{1}C_{2} \end{matrix}\right ) \\
& = & \l_{i_1} \det \left ( C_{2}^*D_{1}C_{2} \right ) \\
& \geq & \l_{i_1} \det \left ( C_{2}^*D_{2}C_{2} \right ).
\end{eqnarray*}
Now consider $\det \left ( C_{2}^*D_{2}C_{2} \right )$.
By $C^*C=I_k$ again, we have $\a_2^* C_{3}=0$, and
$\a_2^*D_{2}C_{3}=\l_{i_2} \a_2^* C_{3}=0$. So,
$ (\a_2,C_{3})^*D_{2}(\a_2,C_{3}) =
\left ( \begin{matrix}
\l_{i_2} & 0\\
0 & C_{3}^*D_{2}C_{3} \end{matrix}\right ).$
Thus,
$$\det \left ( C_{2}^*D_{2}C_{2} \right )=
\l_{i_2} \det \left ( C_{3}^*D_{2}C_{3}\right )\geq
\l_{i_2}\det \left ( C_{3}^*D_{3}C_{3}\right ).$$
Repeating this process, we obtain that
$$\det (U^*_kAU_k) \geq
\l_{i_1} \det \left ( C_{2}^*D_{2}C_{2} \right )\geq
\cdots \geq
\l_{i_1} \l_{i_2} \cdots \l_{i_k}.$$
\end{proof}
\end{comment}
We are ready to present our main result.
\begin{thm}\label{thm10}
Let $A$ and $B$ be $n\times n$ positive semidefinite matrices. Then
\begin{eqnarray}\label{thm10-1z}
\prod\limits_{t=1}^k\lambda_{i_t}^{\frac1k}(A + B)
\ge\prod\limits_{t=1}^k\lambda_{i_t}^{\frac1k}(A) + \prod\limits_{t=1}^k\lambda_{n-t+1}^{\frac1k}(B)
\end{eqnarray}
and
\begin{eqnarray}\label{thm10-1}
{\small \prod\limits_{t=1}^k\lambda_{i_t}(A + B)
\ge\prod\limits_{t=1}^k\lambda_{i_t}(A) + \prod\limits_{t=1}^k\lambda_{n-t+1}(B)
+(2^k-2)\prod\limits_{t=1}^k\left[\lambda_{i_t}(A)\lambda_{n-t+1}(B)\right]^{\frac{1}{2}}\!.\;}
\end{eqnarray}
\end{thm}
\begin{proof}
If $n=1$, the inequalities become equalities and
hold trivially. Let $n\ge 2$. By spectral decomposition,
there exists a unitary matrix
$U=(u_1, u_2, \dots, u_n)\in \mathbb{C}^{n\times n} $, where
$u_1, u_2, \dots, u_n$ are orthonormal eigenvectors associated with
$\lambda_1(A), \lambda_2(A), \dots,$ $\lambda_n(A)$, respectively, such that
\begin{equation*}
A=U\,{\rm{diag}}(\lambda_1(A), \lambda_2(A), \dots,\lambda_n(A))U^*.
\end{equation*}
For each $i_t$ in the sequence $i_1<i_2<\cdots < i_k$,
let
$\mathbb{S}^{(0)}_{t}={\rm{Span}}(u_{1},u_{2}, \ldots,u_{i_t}),$ $ t=1, 2, \dots, k.$
Then
$\mathbb{S}^{(0)}_1\subset \mathbb{S}^{(0)}_2\subset \cdots \subset \mathbb{S}^{(0)}_k$
and $\dim \big(\mathbb{S}^{(0)}_t\big)={i_t},$ $t=1, 2, \dots, k.$
Let $\{x_1, \dots, x_k\}$ be any set of orthonormal vectors,
where $x_t\in\mathbb{S}^{(0)}_t,$ $t=1, 2, \dots, k.$ Let
$x_t=a_{1t}u_1+\cdots +a_{i_t t} u_{i_t}+0u_{i_t+1}+\dots + 0 u_{i_k}=(u_1, \dots, u_{i_k})\a_t$,
where $\a_t = (a_{1t}, \dots, a_{i_{t} t}, 0, \dots, 0)^{\tiny T}$
(here ${}^{\tiny T}$ is for transpose),
$t=1, 2, \dots, k$. Then
$$U_k=(x_1, \dots, x_k)= (u_1, \dots, u_{i_k})(\a_1, \dots, \a_k).$$
Let $V_k=(\a_1, \dots, \a_k)\in \Bbb C^{i_k\times k}$. Since
$\{x_1, \dots, x_k\}$ and $\{u_1, \dots, u_{i_k}\}$ are orthonormal sets,
we see that
$V_k^*V_k=I_k$. So $V_k$ is a partial isometry, and
the components of the first column of $V_k$
are zeros except the first $i_1$ components (i.e.,
the last $i_k-i_1$ components of $\a_1$ are all equal to zero).
In Lemma \ref{lem2-N}, setting $n=i_k$, $m=i_1$, $U_k=V_k$,
and applying (\ref{lem2-N-1}) to the $i_k\times i_k$ matrix
$D_{i_1}=\diag (\underbrace{\l_{i_1}(A),\dots, \l_{i_1}(A)}_{i_1}\,, \l_{{i_1}+1}(A), \dots, \l_{i_k}(A)),$
we obtain
\begin{eqnarray*}
\det (U^*_kAU_k) & = & \det \big [ (\a_1, \dots, \a_k)^*(u_1, \dots, u_{i_k})^*A (u_1, \dots, u_{i_k})(\a_1, \dots, \a_k)\big ]\\
& = & \det \big [(\a_1, \dots, \a_k)^*\diag (\l_1(A), \dots, \l_{i_k}(A))(\a_1, \dots, \a_k)\big]\\
&= & \det \big [ V_k^* \diag (\l_1(A), \dots, \l_{i_k}(A)) V_k\big ]\\
& \geq & \l_{i_1}(A) \det \big [(\a_2, \dots, \a_k)^*D_{i_1}(\a_2, \dots, \a_k) \big ].
\end{eqnarray*}
Repeatedly using Lemma \ref{lem2-N}, we get
\begin{equation}\label{KeyLemma}
\det(U_k^*AU_k)\ge \prod\limits_{t=1}^k\lambda_{i_t}(A).
\end{equation}
A minimax eigenvalue result of Fan (see \cite{Fan1949, Fan1950}
or \cite[A.3.a, p.\,787]{M-O-A-2011}) ensures
\begin{align*}
\det(U_k^*BU_k)\ge \min_{U^*U=I_k}\det (U^*BU)=\prod\limits_{t=1}^k\lambda_{n-t+1}(B).
\end{align*}
An application of the Minkowski inequality \eqref{Mink-1} together with (\ref{KeyLemma}) reveals
\begin{eqnarray*}
\det\big [ {U_k^*(A + B)U_k}\big ] & = & \det({U_k^*AU_k + U_k^*BU_k})\\
& \ge & \left[\big (\det({U_k^*AU_k }) \big )^{\frac{1}{k}}+\big(\det({U_k^*BU_k})\big)^{\frac{1}{k}}\right]^{k}\notag\\
& \ge & \left [\prod\limits_{t=1}^k\lambda^{\frac{1}{k}}_{i_t}(A)+\prod\limits_{t=1}^k\lambda^{\frac{1}{k}}_{n-t+1}(B)\right]^{k}.
\end{eqnarray*}
Thus, by Lemma \ref{lem1-Amir}, we derive (\ref{thm10-1z}) and (\ref{thm10-1}) as follows:
\begin{eqnarray}\label{thm3-2}
\prod\limits_{t=1}^k\lambda_{i_t}(A + B)
& = & \max\limits_{\mathbb{S}_1\subset\cdots\subset \mathbb{S}_k\subset \mathbb{C}^n\hfill \atop \dim \mathbb{S}_t=i_t}
\min\limits_{ {y}_t\in \mathbb{S}_t, \,({y}_r,{y}_s)=\delta_{rs}\hfill\atop W_k=\left(y_{1},\dots,y_{k}\right)}
\det \big [{W_k^*(A + B)W_k}\big ]\notag\\
& \ge & \min\limits_{ {x}_t\in \mathbb{S}^{(0)}_t\, ({x}_r,{x}_s)=\delta_{rs}\hfill\atop U_k=\left(x_{1},\dots,x_{k}\right)}
\det\big [{U_k^*(A + B)U_k}\big ] \notag\\
& \ge & \left [\prod\limits_{t=1}^k\lambda^{\frac{1}{k}}_{i_t}(A)
+\prod\limits_{t=1}^k\lambda^{\frac{1}{k}}_{n-t+1}(B)\right]^{k}\notag \\
& \geq & \prod\limits_{t=1}^k\lambda_{i_t}(A) + \prod\limits_{t=1}^k\lambda_{n-t+1}(B)\notag\\
& &
+(2^k-2)\prod\limits_{t=1}^k\left[\lambda_{i_t}(A) \lambda_{n-t+1}(B)\right]^{\frac{1}{2}}. \notag
\end{eqnarray}
The last inequality is by (\ref{lem-5-1})
with $x= \prod\limits_{t=1}^k\lambda_{i_t}(A)$ and $y= \prod\limits_{t=1}^k\lambda_{n-t+1}(B)$.
\end{proof}
In (\ref{thm10-1z}), letting $i_t=n-k+t$, $t=1, 2, \ldots, k$, we arrive at the inequalities
(\ref{Mink-2}) of Oppenhiem for the product of $k$ smallest eigenvalues. Setting $i_t=t$, $t=1, 2, \ldots, k$, we obtain analogous
inequalities of \ref{Mink-2} for the product of $k$ largest eigenvalues.
\begin{cor}\label{cor2020Dec6a}
Let $A$ and $B$ be $n\times n$ positive semidefinite matrices. Then
\begin{align}\label{cor2020Dec6a}
&\prod\limits_{t=1}^k\lambda_{t}^{\frac1k}(A + B)
\ge\prod\limits_{t=1}^k\lambda_{t}^{\frac1k}(A) + \prod\limits_{t=1}^k\lambda_{n-t+1}^{\frac1k}(B).
\end{align}
\end{cor}
What follows is a lower bound for the
product of any two eigenvalues of the sum in terms of the eigenvalues of individual matrices.
\begin{cor}\label{cor2020Dec6a}
Let $A$ and $B$ be $n\times n$ positive semidefinite matrices. Then
\begin{eqnarray*}
\l_i(A+B)\l_j(A+B)
& \ge & \lambda_{i}(A)\l_j(A) +\lambda_{n-1}(B)\l_n(B)\\
& &
+2\big [\lambda_{i}(A)\l_j(A) \lambda_{n-1}(B)\l_n(B)\big ]^{\frac{1}{2}}.
\end{eqnarray*}
\end{cor}
Remark: In view of Fiedler's (\ref{lem-Fiedler}) and inequalities
(\ref{thm10-1}), it is tempting to have
\begin{eqnarray}\label{thm10-1z2020Dec6}
\prod\limits_{t=1}^k\lambda_{i_t}(A + B)
\ge\prod\limits_{t=1}^k \big [ \lambda_{i_t}(A) + \lambda_{n-t+1}(B)\big ].
\end{eqnarray}
However, this need not be true. Take
$A=B=\left ( \begin{smallmatrix}
1 & 0 \\
0 & 0
\end{smallmatrix}\right )$, $k=2, i_1=1, i_2=2$. Then
the left-hand side of (\ref{thm10-1z2020Dec6}) is 0, while the
right-hand side is 1. (Note: it is always true that
$\lambda_{i}(A + B)\geq \lambda_{i}(A) + \lambda_{n}(B)$. See, e.g.,
\cite[p.\,274]{ZFZbook11}).
The following inequality in (\ref{cor1-21a}) is Fiedler's 1st inequality
in (\ref{lem-Fiedler}). Inequality in (\ref{cor1-21b}) is stronger than
Fiedler's 2nd inequality.
(\ref{cor1-21b}) is proved by Lemma \ref{lem5Z}.
The inequalities in (\ref{cor1-21c}) are immediate from the inequalities
(\ref{thm10-1}) in the theorem.
\begin{cor}\label{cor1-2}
Let $A, B\in \mathbb{C}^{n\times n}$ be positive semidefinite matrices. Then
\begin{eqnarray}\label{cor1-21}
\prod\limits_{t=n-k+1}^n\lambda_{t}(A + B) &\ge & \prod\limits_{t=n-k+1}^n \big [\lambda_{t}(A)+\lambda_{t}(B)\big ] \label{cor1-21a} \\
& \ge&\prod\limits_{t=n-k+1}^n\lambda_{t}(A) + \prod\limits_{t=n-k+1}^n\lambda_{t}(B) \label{cor1-21b} \\
&&
+\left(2^{k}-2\right)\prod\limits_{t=n-k+1}^n\left [\lambda_{t}(A)\lambda_{t}(B)\right ]^{\frac{1}{2}}
\notag
\end{eqnarray}
and
\begin{eqnarray}
\prod\limits_{t=1}^k\lambda_{t}(A + B)
& \ge&\prod\limits_{t=1}^k\lambda_{t}(A) + \prod\limits_{t=1}^k\lambda_{n-t+1}(B) \label{cor1-21c}\\
&&
+\left(2^{k}-2\right)\prod\limits_{t=1}^k \left [\lambda_{t}(A)\lambda_{n-t+1}(B)\right ] ^{\frac{1}{2}}.
\notag
\end{eqnarray}
\end{cor}
Remark: In view of (\ref{cor1-21a}), it is appealing in the display (\ref{cor1-21c} to have
$$\prod\limits_{t=1}^k\lambda_{t}(A + B)\;\; \ge \;\; \prod\limits_{t=1}^k \big [\lambda_{t}(A)+\lambda_{t}(B)\big ]\;\; \mbox{or}\;\;
\prod\limits_{t=1}^k \big [\lambda_{t}(A)+\lambda_{n-t+1}(B)\big ] . $$
But neither one is true. Let
$A=\left ( \begin{smallmatrix}
1 & 0 \\
0 & 0
\end{smallmatrix}\right )$, $B=\left ( \begin{smallmatrix}
0& 0 \\
0 & 1
\end{smallmatrix}\right )$, $k=1$. Then $\l_1(A+B)=1<2= \l_1(A)+\l_1(B).$
See the counterexample below (\ref{thm10-1z2020Dec6}) for the second case.
\section{Hua-Marcus inequalities for contractions}
A matrix $A\in \mathbb{C}^{m\times n}$ is said to be (strictly) \emph{contractive} if $I_n-A^*A\geq 0$ ($>0$), equivalently, the largest singular value (i.e., the spectral norm)
of $A$ is less than or equal to (resp. $<$) $1$. We use
$\mathcal{C}_{m\times n}$ to denote the set of $m\times n$ contractive matrices and
$\mathcal{SC}_{m\times n}$ to denote the
set of $m\times n$ strictly
contractive matrices.
In this section we apply our main theorem to derive some inequalities of Hua-Marcus type
for contractive matrices.
We begin by citing Hua's results in \cite{Hua-AMS-1955}.
\begin{thm}[Hua {\cite[Theorems~1~and ~2]{Hua-AMS-1955}}] \label{thm-Hua-1}
Let $A,B\in \mathcal{SC}_{n\times n}$. Then
\begin{align}\label{thm-Hua-2}
\det(I-A^*A) \det(I-B^*B) + \left|\det(A-B)\right|^2\le \left|\det(I-A^*B)\right|^2.
\end{align}
Consequently,
\begin{align}\label{thm-Hua-2z}
\det(I-A^*A) \det(I-B^*B)\le \left|\det(I-A^*B)\right|^2.
\end{align}
Equality in \eqref{thm-Hua-2} holds if and only if $A=B$.
\end{thm}
The following {\cite[Theorem ~7.18]{ZFZbook11}} is a reversal of the Hua inequality \ref{thm-Hua-2}
for general $n\times n$
matrices $A$ and $B$ that need not be contractive:
\begin{align}\label{thm-Zhang-2}
\left|\det(I-A^*B)\right|^2\le\det(I+A^*A)\det(I+B^*B)-\left|\det(A+B)\right|^2.
\end{align}
Marcus \cite{Marcus-1958} extended the Hua
inequality \eqref{thm-Hua-2z} to the inequalities of eigenvalues.
\begin{thm}[Marcus {\cite[Theorem]{Marcus-1958}}] \label{thm-MM}
Let $A,B\in \mathcal{C}_{n\times n}$. Then
\begin{eqnarray}\label{thm1-MarcusZ}
\prod\limits_{t=1}^k|\lambda_{n-t+1}(I-A^*B)|^2\ge \prod\limits_{t=1}^k\big[ 1-\lambda_t(A^*A)\big]\big[1-\lambda_t(B^*B)\big].
\end{eqnarray}
\end{thm}
Since $|\det (I-A^*B)|=
\prod\limits_{t=1}^n|\lambda_{n-t+1}(I-A^*B)|=\prod\limits_{t=1}^n\sigma_{n-t+1}(I-A^*B)$,
by Weyl's log-majorization inequality (\cite{Weyl49} or \cite[p.\,317]{M-O-A-2011}), the
eigenvalues in absolute values are log-majorized by the singular values, we get
the stronger inequality than (\ref{thm1-MarcusZ}):
\begin{eqnarray}\label{thm1-Marcus}
\prod\limits_{t=1}^k\sigma^2_{n-t+1}(I-A^*B)\ge \prod\limits_{t=1}^k\big[ 1-\lambda_t(A^*A)\big]\big[1-\lambda_t(B^*B)\big].
\end{eqnarray}
Related inequalities of Hua-Marcus type are seen in
\cite{Ando-2008, Oppenheim-AMM-1954,
Paige-Styan-Wang-Zhang-2008,TF71,Xu-Xu-Zhang-LAA-2009,Xu-Xu-Zhang-LMA-2011}.
The following result is stronger and more general than
\ref{thm1-Marcus}.
\begin{thm}\label{thm4}
Let $A, B\in \mathcal{SC}_{n\times n}$. Then
\begin{eqnarray}\label{thm4-1Z}
\prod\limits_{t=1}^k\sigma^2_{i_t}\left(I-A^*B\right)
& \ge & \prod\limits_{t=1}^k \big [1-\lambda_{t}(A^* A)\big ] \big [1-\lambda_{n-i_t+1}(B^*B) \big ] \\
& & +\prod\limits_{t=1}^k
\frac{\big [1-\lambda_{t}(A^*A)\big ]\,\sigma^2_{n-t+1}(A-B)}{1-\lambda_{n-t+1}(A^*A)}\notag\\
& & + (2^k-2)\prod\limits_{t=1}^k \big [ 1-\lambda_{t}(A^*A)\big ] \big [ \lambda_{i_t}(F)\lambda_{n-t+1}(H)\big ]^{\frac{1}{2}}\!,\;
\end{eqnarray}
where $F=I-B^*B$ and $ H=(A-B)^*(I-AA^*)^{-1}(A-B).$
\end{thm}
\begin{proof} For $A, B\in \mathcal{SC}_{n\times n}$,
let
$$
F=I-B^*B\;\;\; \mbox{and}\;\;\; H=(A-B)^*(I-AA^*)^{-1}(A-B).$$
Then (see \cite[Theorem 1]{Hua-AMS-1955} or \cite[pp.\,230-231]{ZFZbook11})
\begin{equation}\label{EqZ:iden1}
F+H= (I-B^*A)(I-A^*A)^{-1}(I-A^*B).
\end{equation}
Applying the left inequality of ~~\eqref{lem2-LWZ-2} with $i_t=n-t+1$ to $H$ reveals
\begin{eqnarray}\label{thm4-4}
\prod\limits_{t=1}^k\lambda_{n-t+1}(H)
& = & \prod\limits_{t=1}^k \lambda_{n-t+1}\big [ (I-AA^*)^{-1} (A-B)(A-B)^*\big ] \notag \\
& \ge & \prod\limits_{t=1}^k\lambda_{n-t+1}\big [ (I-AA^*)^{-1} \big ] \sigma^2_{n-t+1}\big(A-B\big)\notag \\
& = & \prod\limits_{t=1}^k[1-\lambda_{n-t+1}(A^*A)]^{-1}\sigma^2_{n-t+1}\big(A-B\big).\label{Eq:4.6Nov20}
\end{eqnarray}
Applying the right inequality of
~~\eqref{lem2-LWZ-2} to $F+H$ in the product form in (\ref{EqZ:iden1}) yields
\begin{align}\label{thm4-4}
\prod\limits_{t=1}^k\lambda_{i_t}\left(F+H\right)\leq \prod\limits_{t=1}^k\left[1-\lambda_{t}(A^*A)\right]^{-1}\sigma^2_{i_t}\left(I-A^*B\right).
\end{align}
Thus
\begin{align}\label{thm4-4}
\prod\limits_{t=1}^k\sigma^2_{i_t}\left(I-A^*B\right)
\ge \prod\limits_{t=1}^k\left[1-\lambda_{t}(A^*A)\right]\lambda_{i_t}\left(F+H\right).
\end{align}
By inequalities (\ref{thm10-1}) and (\ref{Eq:4.6Nov20}), we obtain
\begin{eqnarray}
\lefteqn{\prod\limits_{t=1}^k\lambda_{i_t}\left(F+H\right)}\notag \\
& \geq & \prod\limits_{t=1}^k\lambda_{i_t}(F) + \prod\limits_{t=1}^k\lambda_{n-t+1}(H)
+(2^k-2)\prod\limits_{t=1}^k\left[\lambda_{i_t}(F)\lambda_{n-t+1}(H)\right]^{\frac{1}{2}} \notag \\
& \ge & \prod\limits_{t=1}^k\left[1-\lambda_{n-i_t+1}(B^*B)\right]
+ \prod\limits_{t=1}^k\left[1-\lambda_{n-t+1}(A^*A)\right]^{-1}\sigma^2_{n-t+1}(A-B)\notag \\
& & + (2^k-2)\prod\limits_{t=1}^k\left[\lambda_{i_t}(F)\lambda_{n-t+1}(H)\right]^{\frac{1}{2}}.\label{Eq4.9Nov20}
\end{eqnarray}
Combining (\ref{thm4-4}) and (\ref{Eq4.9Nov20}), we obtain the desired inequalities.
\end{proof}
Setting $k=n$ in Theorem~\ref{thm4} gives a stronger version of
the Hua's inequality.
\begin{cor}\label{cor2.1}
Let $A, B\in \mathcal{SC}_{n\times n}$. Then
\begin{align*}
&\left|\det\left(I-A^*B\right)\right|^2 \ge\det\left(I-A^*A\right)\det\left(I-B^*B\right)
+\left|\det\left(A-B\right)\right|^2\notag\\
&\qquad \qquad\qquad \qquad+(2^n-2)\big[\det\left(I-A^*A\right)\det\left(I-B^*B\right)\big]^{\frac{1}{2}}\left|\det\left(A-B\right)\right|.
\end{align*}
\end{cor}
Below is a reversal inequality of the previous theorem.
\begin{thm}\label{thm5}
Let $A,B\in \mathbb{C}^{n\times n}$. Then
\begin{eqnarray}
\prod\limits_{t=1}^k\sigma^2_{i_t}\big(I-A^*B\big) & \leq &
\prod\limits_{t=1}^k\big[1+\lambda_{i_t}(A^*A )\big]\big[1+\lambda_{t}(B^*B)\big]-\prod\limits_{t=1}^k\sigma^2_{n-t+1}\big(A+B\big) \notag \\
& & - (2^k-2)\prod\limits_{t=1}^k\sigma_{i_t}\big(I-A^*B\big)\sigma_{n-t+1}\big(A+B\big).
\label{ReversalLast}
\end{eqnarray}
\end{thm}
\begin{proof}
For $A, B\in \mathbb{C}^{n\times n}$, the following matrix identity holds (see, e.g., \cite[pp.\,228]{ZFZbook11})
$$
I+A^*A=P+Q$$
where
$$
P=(A+B)^*(I+BB^*)^{-1}(A+B),$$
$$Q=(I-A^*B)(I+B^*B)^{-1}(I-A^*B)^*.
$$
By Lemma ~\ref{lem2-LWZ}, we have
\begin{align}
\prod\limits_{t=1}^k\lambda_{n-t+1}(P)&\ge \prod\limits_{t=1}^k\big[1+\lambda_{t}(BB^*)\big]^{-1}\sigma^2_{n-t+1}\big(A+B\big), \notag\\
\prod\limits_{t=1}^k\lambda_{i_t}(Q)
& \ge \prod\limits_{t=1}^k\big[1+\lambda_{t}(B^*B)\big]^{-1}\sigma^2_{i_t}\big(I-A^*B\big).\label{Eq:thm4.6.1}
\end{align}
Using (\ref{thm10-1}) in Theorem \ref{thm10}, we derive
\begin{eqnarray*}
\lefteqn{\prod\limits_{t=1}^k\big[1+\lambda_{i_t}(A^*A )\big]=\prod\limits_{t=1}^k\lambda_{i_t}(P+Q))} \\
& \ge &\prod\limits_{t=1}^k\lambda_{n-t+1}(P)
+\prod\limits_{t=1}^k\lambda_{i_t}(Q)+(2^k-2)
\prod\limits_{t=1}^k[\lambda_{n-t+1}(P)\lambda_{i_t}(Q)]^{\frac{1}{2}}\\
& \ge & \prod\limits_{t=1}^k\big[1+\lambda_{t}(B^*B)\big]^{-1}
\bigg [\prod\limits_{t=1}^k\sigma^2_{i_t}\big(I-A^*B\big)+\prod\limits_{t=1}^k\sigma^2_{n-t+1}\big(A+B\big) \\
& & +(2^k-2)\prod\limits_{t=1}^k\sigma_{i_t}\big(I-A^*B\big)\sigma_{n-t+1}\big(A+B\big)\bigg ].
\end{eqnarray*}
Multiplying by $\prod\limits_{t=1}^k\big[1+\lambda_{t}(B^*B)\big]$,
we obtain the desired inequalities (\ref{ReversalLast}).
\end{proof}
As (\ref{thm-Zhang-2}) is a reversal of Hua's (\ref{thm-Hua-2}), the following result, as a special case of the Theorem \ref{thm5} by setting $k=n$,
may be viewed as a counterpart of Corollary \ref{cor2.1}.
\begin{cor}\label{cor3.2}
Let $A,B\in \mathbb{C}^{n\times n}$. Then
\begin{eqnarray*}
\big|\det\left(I-A^*B\right)\big|^2 & \le & \det\big(I+A^*A\big)\det\left(I+B^*B\right)-\big|\det\left(A+B\right)\big|^2 \\
& & -(2^n-2)\big|\det\left(I-A^*B\right)\big|\big|\det\left(A+B\right)\big|.
\end{eqnarray*}
Consequently,
\begin{align*}
\big|\det\left(I-A^*B\right)\big|^2&\le\det\left(I+A^*A\right)\det\left(I+B^*B\right)
-\big|\det\left(A+B\right)\big|^2.
\end{align*}
\end{cor}
|
\section*{Acknowledgments}
\section{Theoretical Analysis}
\label{sec:analysis}
\section{Corner Cases of Point Cloud Registration}
\label{sec:app:cornercases}
We show two examples of corner cases of point cloud registration where the configuration is not general and violates the $s_1>s_2>s_3>0$ assumption in Section~\ref{app:sec:proof-convergence}, they correspond to when there is no noise between ${\cal X}$ and $\mathcal{Y}$ and both of them have symmetry.
When $N=3$ (Fig.~\ref{fig:symmetry}(a)), consider both ${\cal X}$ (blue) and $\mathcal{Y}$ (red) are equilateral triangles with $l$ being the length from the vertex to the center. Assume the particles have equal masses such that the CM is also the geometric center $O$, and all virtual springs have equal coefficients. ${\cal X}$ is obtained from $\mathcal{Y}$ by first rotating counter-clockwise (CCW) around $O$ with angle $\theta$, and then flipped about the line that goes through point 1 and the middle point between point 2 and 3. We will show that this is an equilibrium point of the dynamical system for any $\theta$. When the CM of ${\cal X}$ and the CM of $\mathcal{Y}$ aligns, we know the forces $\boldsymbol{f}_i,i=1,2,3$ are already balanced. It remains to show that the torques $\boldsymbol{\tau}_i,i=1,2,3$ are also balanced for any $\theta$. $\boldsymbol{\tau}_1$ and $\boldsymbol{\tau}_3$ applies clockwise (CW, cyan) and the value of their sum is:
\begin{eqnarray}
\hspace{-10mm} \| \boldsymbol{\tau}_1 + \boldsymbol{\tau}_3 \| = \| \boldsymbol{\tau}_1 \| + \| \boldsymbol{\tau}_3 \| \\
= kl^2 \left( \sin \theta + \sin\beta \right) \\
= kl^2 \left( \sin\theta + \sin\left(\theta + \frac{2\pi}{3} \right) \right) \\
= kl^2 \sin\left( \theta + \frac{\pi}{3} \right),
\end{eqnarray}
and $\tau_2$ applies CCW (green) and its value is:
\begin{eqnarray}
\| \boldsymbol{\tau}_2 \| = kl^2 \sin\alpha = kl^2 \sin\left( \frac{2\pi}{3} - \theta \right) \\
= kl^2 \sin\left( \theta + \frac{\pi}{3} \right).
\end{eqnarray}
Therefore, the torques cancel with each other and the configuration in Fig.~\ref{fig:symmetry}(a) is an equilibrium state for all $\theta$. However, it is easy to observe that this type of equilibrium is unstable because any perturbation that drives point 2 out of the 2D plane will immediately drives the system out of this type of equilibrium. When $N=4$, one can verify that same torque cancellation happens:
\begin{eqnarray}
\| \boldsymbol{\tau}_1 \| = kl^2 \sin\beta = kl^2 \sin\left( \theta + \frac{\pi}{2} \right) \\
= kl^2 \sin\left( \frac{\pi}{2} - \theta \right) = kl^2 \sin\alpha = \| \boldsymbol{\tau}_3 \|,
\end{eqnarray}
and the system also has infinite locally unstable equilibria.
\input{fig-app-symmetry}
\section{Extra Experimental Results}
\label{sec:app:experiments}
\input{fig-supp-mesh-t-duality}
\input{fig-app-robot-primitive}
{\bf Mesh registration}. Fig.~\ref{fig:app-mesh-t-duality} shows the translation error of \scenario{DAMP} compared with \scenario{SDR}~\cite{Briales17cvpr-registration} on varying noise levels, as well as the relative duality gap of \scenario{SDR}. Because the relative duality gap of \scenario{SDR} is numerically zero, we can say that \scenario{SDR} finds the globally optimal solutions in all Monte Carlo runs. Then we look at the translation error boxplot and observe that \scenario{DAMP} always returns the same solution as \scenario{SDR}, which indicates that \scenario{DAMP} always converges to the optimal solution.
{\bf Robot primitive registration}. Fig.~\ref{fig:app-robot-primitive} plots the rotation error, translation error and runtime of \scenario{DAMP} on registering a noisy point cloud observation to the robot primitive including planes, spheres, cylinders and cones, under increasing noise levels, where 1000 Monte Carlo runs are performed at each noise level. We find that \scenario{DAMP} always returns an accurate pose estimation, even when the noise standard deviation is 2 (note that the scene radius is 10), strongly suggesting that \scenario{DAMP} always converges to the optimal solution. Moreover, \scenario{DAMP} has a runtime that is below 1 second (recall that our implementation is in Matlab with for loops, because \scenario{DAMP} is a general algorithm that checks the type of the primitive for each correspondence).
\section{Proof of Theorem~\ref{thm:globalconvergence}}
\label{app:sec:proof-convergence}
\begin{proof}
Let ${\cal X} = \{ P(\vxx_i) \}_{i=1}^N$ and $\mathcal{Y} = \{ P(\boldsymbol{y}_i) \}_{i=1}^N$ be two sets of 3D points, and with slight abuse of notation, we will use $\vxx_i \in \Real{3}$ and $\boldsymbol{y}_i \in \Real{3}$ to denote the 3D points and their coordinates interchangeably. Under this setup of Example~\ref{ex:pointcloudregistration}, problem~\eqref{eq:primitivealignment} becomes
\begin{eqnarray}
\min_{\M{R} \in \ensuremath{\mathrm{SO}(3)}\xspace, \boldsymbol{t} \in \Real{3}} \sum_{i=1}^N \norm{\boldsymbol{y}_i - \M{R} \vxx_i - \boldsymbol{t}}^2. \label{eq:pointcloudregistrationform}
\end{eqnarray}
Let
\begin{eqnarray}
\bar{\vxx} = \frac{1}{N} \sum_{i=1}^N \vxx_i, \xref{i} = \vxx_i - \bar{\vxx}, \M{J} = - m \sum_{i=1}^N \hatmap{\xref{i}}^2 \label{eq:xrefbarxJ}
\end{eqnarray}
be the (initial) center of mass of ${\cal X}$, relative positions of $\vxx_i$ w.r.t.\xspace~center of mass, and moment of inertia of ${\cal X}$. According to eq.~\eqref{eq:totalforce}, the total external force is
\begin{eqnarray}
\hspace{-4mm} \boldsymbol{f}_i' = k(\boldsymbol{y}_i - \M{R}_q \xref{i} - \vxx_{\mathrm{c}}) - \mu m (\vv_{\mathrm{c}} + \M{R}_q(\boldsymbol{\omega} \times \xref{i})) \nonumber \\
\hspace{-4mm} \boldsymbol{f} = \sum_{i=1}^N \boldsymbol{f}_i', \label{eq:totalforcepcr}
\end{eqnarray}
where $k>0$ is the constant spring coefficient. Similarly, according to eq.~\eqref{eq:totaltorque}, the total torque in the body frame is
\begin{eqnarray}
\boldsymbol{\tau} = \sum_{i=1}^N \xref{i} \times (\M{R}_q^{\mathsf{T}} \boldsymbol{f}_i'). \label{eq:totaltorquepcr}
\end{eqnarray}
Now we analyze how many equilibrium points eq.~\eqref{eq:Nprimitivedynamics} has. Towards this goal, setting the first two equations of~\eqref{eq:Nprimitivedynamics} to zero, we get
\begin{eqnarray}
\vv_{\mathrm{c}} = {\mathbf 0},\quad \boldsymbol{\omega} = {\mathbf 0}, \label{eq:zerolinearangularvel}
\end{eqnarray}
which implies that the system must have zero linear velocity and angular velocity at equilibrium. Substituting~\eqref{eq:zerolinearangularvel} to the force and torque expressions in~\eqref{eq:totalforcepcr} and~\eqref{eq:totaltorquepcr}, we have
\begin{eqnarray}
\boldsymbol{f}_i' = k(\boldsymbol{y}_i - \M{R}_q \xref{i} - \vxx_{\mathrm{c}}), \\
\boldsymbol{f} = k \sum_{i=1}^N \boldsymbol{y}_i - \M{R}_q \xref{i} - \vxx_{\mathrm{c}}, \label{eq:totalforceequilibrium} \\
\boldsymbol{\tau} = k \sum_{i=1}^N \xref{i} \times (\M{R}_q^{\mathsf{T}} (\boldsymbol{y}_i - \M{R}_q \xref{i} - \vxx_{\mathrm{c}})) \nonumber \\
= k \sum_{i=1}^N \xref{i} \times \M{R}_q^{\mathsf{T}} (\boldsymbol{y}_i - \vxx_{\mathrm{c}}), \label{eq:totaltorqueequilibrium}
\end{eqnarray}
where we have used the equality that $\xref{i} \times \xref{i} = {\mathbf 0}$. Now we set the last two equations of~\eqref{eq:Nprimitivedynamics} to zero (\emph{i.e.},,~the system has no linear or angular acceleration), we have that
\begin{eqnarray}
\boldsymbol{f} = {\mathbf 0}, \quad \boldsymbol{\tau} = {\mathbf 0},
\end{eqnarray}
which implies that external forces and torques must balance at an equilibrium point. From $\boldsymbol{f}={\mathbf 0}$ and the expression of $\boldsymbol{f}$ in~\eqref{eq:totalforceequilibrium}, we obtain
\begin{eqnarray}
\sum_{i=1}^N \boldsymbol{y}_i - \M{R}_q\xref{i} - \vxx_{\mathrm{c}} = {\mathbf 0} \Longrightarrow \\
\boxed{\vxx_{\mathrm{c}} = \frac{1}{N} \parentheses{\sum_{i=1}^N \boldsymbol{y}_i - \M{R}_q \xref{i}} = \frac{1}{N} \sum_{i=1}^N\boldsymbol{y}_i := \bar{\vy}}, \label{eq:xcmsolution}
\end{eqnarray}
where we have used
\begin{eqnarray}
\frac{1}{N}\sum_{i=1}^N \M{R}_q \xref{i} = \frac{1}{N} \M{R}_q \sum_{i=1}^N \xref{i} = {\mathbf 0}
\end{eqnarray}
from the definition of $\xref{i}$ in~\eqref{eq:xrefbarxJ}. Eq.~\eqref{eq:xcmsolution} states that ${\cal X}$ and $\mathcal{Y}$ must have their center of mass aligned at an equilibrium point. Now using a similar notation $\yref{i} \triangleq \boldsymbol{y}_i - \bar{\vy}$, $\boldsymbol{\tau}={\mathbf 0}$ from eq.~\eqref{eq:totaltorqueequilibrium} implies that
\begin{eqnarray}
\boxed{\sum_{i=1}^N \xref{i} \times \M{R}_q^{\mathsf{T}} \yref{i} = {\mathbf 0}}. \label{eq:equivalentequilibrium}
\end{eqnarray}
Eq.~\eqref{eq:xcmsolution} and~\eqref{eq:equivalentequilibrium} are the necessary and sufficient condition for an equilibrium point $\dot{\state} = {\mathbf 0}$. Now we are ready to prove the four claims in Theorem~\ref{thm:globalconvergence}. We first prove~\ref{item:optimalsolution}.
{\bf\ref{item:optimalsolution}: Optimal solution is an equilibrium point}. To show the optimal solution of problem~\eqref{eq:pointcloudregistrationform} is an equilibrium point, we will write down its closed-form solution and show that it satisfies~\eqref{eq:xcmsolution} and~\eqref{eq:equivalentequilibrium}.
\begin{lemma}[Closed-form Point Cloud Registration]
\label{lemma:pcrclosedform}
The global optimal solution to~\eqref{eq:pointcloudregistrationform} is
\begin{eqnarray}
\boldsymbol{t}^\star = \bar{\vy} - \M{R}^\star \bar{\vxx}, \\
\M{R}^\star = \MU_{+}\MV_{+}^{\mathsf{T}},
\end{eqnarray}
where $\MU_{+},\MV_{+} \in \ensuremath{\mathrm{SO}(3)}\xspace$ are obtained from the singular value decomposition:
\begin{eqnarray}
\M{M} = \sum_{i=1}^N \yref{i}\xref{i}^{\mathsf{T}} = \M{U} \M{S} \M{V}^{\mathsf{T}}, \quad \M{U}, \M{V} \in \ensuremath{\mathrm{O}(3)}\xspace, \\
\MU_{+} = \M{U} \diag{[1,1,\det{\M{U}}]} \in \ensuremath{\mathrm{SO}(3)}\xspace, \\
\MV_{+} = \M{V} \diag{[1,1,\det{\M{V}}]} \in \ensuremath{\mathrm{SO}(3)}\xspace.
\end{eqnarray}
Using $\MU_{+}, \MV_{+}$, we have $\M{M} = \MU_{+} \M{S}' \MV_{+}^{\mathsf{T}}$, with
\begin{eqnarray}
\M{S}' = \diag{[s_1,s_2,s_3 \det{\M{U}\M{V}}]}.
\end{eqnarray}
\end{lemma}
Lemma~\ref{lemma:pcrclosedform} is a standard result in point cloud registration~\cite{Horn87josa,markley1988jas-svdAttitudeDeter}. Using $(\vt^\star,\MR^\star)$, one immediately sees that the center of mass of ${\cal X}$ is transformed to
\begin{eqnarray}
\vxx_{\mathrm{c}} = \MR^\star \bar{\vxx} + \vt^\star = \MR^\star \bar{\vxx} + \bar{\vy} - \MR^\star \bar{\vxx} = \bar{\vy}
\end{eqnarray}
and coincide with $\bar{\vy}$, hence satisfies eq.~\eqref{eq:xcmsolution}. Now replace $\M{R}_q$ with $\MR^\star = \MU_{+} \MV_{+}^{\mathsf{T}}$ in eq.~\eqref{eq:equivalentequilibrium}, our goal is to show
\begin{eqnarray}
\boldsymbol{\tau}(\MR^\star) \triangleq \sum_{i=1}^N \xref{i} \times (\MV_{+} \MU_{+}^{\mathsf{T}} \yref{i})
\end{eqnarray}
equal to zero. Towards this goal, we will show each entry of $\boldsymbol{\tau}(\MR^\star)$ is zero,~\emph{i.e.},,~$\boldsymbol{e}_j^{\mathsf{T}} \boldsymbol{\tau}(\MR^\star) = 0$ for $j=1,2,3$. Note that
\begin{eqnarray}
\boldsymbol{e}_1^{\mathsf{T}} \boldsymbol{\tau}(\MR^\star) = \sum_{i=1}^N \boldsymbol{e}_1^{\mathsf{T}} \hatmap{\xref{i}} \MV_{+}\MU_{+}^{\mathsf{T}} \yref{i} \label{eq:ve1vtauRstart}\\
= \sum_{i=1}^N \xref{i}^{\mathsf{T}} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}}) \MV_{+}\MU_{+}^{\mathsf{T}} \yref{i} \\
= \sum_{i=1}^N \trace{\MU_{+}^{\mathsf{T}} \yref{i} \xref{i}^{\mathsf{T}} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}})\MV_{+}} \\
= \trace{\MU_{+}^{\mathsf{T}} \parentheses{\sum_{i=1}^N \yref{i}\xref{i}^{\mathsf{T}} } (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}}) \MV_{+}} \\
= \trace{\MU_{+}^{\mathsf{T}} \M{M} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}}) \MV_{+} } \\
= \trace{\MU_{+}^{\mathsf{T}} \MU_{+} \M{S}' \MV_{+}^{\mathsf{T}} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}}) \MV_{+} } \\
= \trace{\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}})} \\
= [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{32} - [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{23} = 0 \label{eq:ve1vtauRend}
\end{eqnarray}
where the last ``$=0$'' holds because $\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}$ is an symmetric matrix, and we have used the fact that
\begin{eqnarray}
\boldsymbol{e}_1^{\mathsf{T}} \hatmap{\vxx} \equiv \vxx^{\mathsf{T}} (\boldsymbol{e}_2\boldsymbol{e}_3^{\mathsf{T}} - \boldsymbol{e}_3\boldsymbol{e}_2^{\mathsf{T}}), \forall \vxx \in \Real{3}.
\end{eqnarray}
By the same token, one can verify that
\begin{eqnarray}
\boldsymbol{e}_2^{\mathsf{T}} \boldsymbol{\tau}(\MR^\star) = [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{13} - [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{31} = 0,\\
\boldsymbol{e}_3^{\mathsf{T}} \boldsymbol{\tau}(\MR^\star) = [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{21} - [\MV_{+} \M{S}' \MV_{+}^{\mathsf{T}}]_{12} = 0.
\end{eqnarray}
Therefore, the optimal solution $(\vt^\star,\MR^\star)$ is an equilibrium point of the system~\eqref{eq:Nprimitivedynamics}.
{\bf\ref{item:foursolution} and~\ref{item:threebypi}: Three spurious equilibrium points}. We now show that besides the optimal equilibrium point $(\vt^\star,\MR^\star)$, the equation~\eqref{eq:equivalentequilibrium} has three and only three different solutions if $s_1 > s_2 > s_3 > 0$, which we denote as \emph{generic configuration}. Towards this goal, let us assume there is a rotation matrix $\M{R}_q$ that satisfies~\eqref{eq:equivalentequilibrium}, and we write it as
\begin{eqnarray}
\M{R}_q = \MU_{+} \bar{\MR} \MV_{+}^{\mathsf{T}}.
\end{eqnarray}
Note that such a parametrization is always possible with
\begin{eqnarray}
\bar{\MR} = \MU_{+}^{\mathsf{T}} \M{R}_q \MV_{+} \in \ensuremath{\mathrm{SO}(3)}\xspace.
\end{eqnarray}
Using this parametrization, $\boldsymbol{\tau}(\M{R}_q) = {\mathbf 0}$ is equivalent to
\begin{eqnarray}
\M{Z} \triangleq \MV_{+}\bar{\MR} \M{S}' \MV_{+}^{\mathsf{T}}
\end{eqnarray}
being symmetric (using similar derivations as in~\eqref{eq:ve1vtauRstart}-\eqref{eq:ve1vtauRend}). Then it is easy to see that $\M{Z}$ being symmetric is equivalent to $\bar{\MR} \M{S}'$ being symmetric because $\bar{\MR}\M{S}' = \MV_{+}^{\mathsf{T}} \M{Z} \MV_{+}$. Explicitly, we require
\begin{eqnarray}
\bar{\MR} \M{S}' = (\bar{\MR}\M{S}')^{\mathsf{T}} = \M{S}' \bar{\MR}^{\mathsf{T}}.
\end{eqnarray}
Since $s_1>s_2>s_3 >0$, $\M{S}'$ is invertible and $(\M{S}')^{-1} = \diag{[1/s_1,1/s_2,1/s_3']}$ with $s_3' = s_3 \det{\M{U}\M{V}}$. Therefore, $\bar{\MR} \M{S}' = \M{S}' \bar{\MR}^{\mathsf{T}}$ is equivalent to
\begin{eqnarray}
\hspace{-4mm} \bar{\MR} = \M{S}' \bar{\MR}^{\mathsf{T}} (\M{S}')^{-1} \Leftrightarrow \\
\underbrace{\left[ \begin{array}{ccc}
r_{11} & r_{12} & r_{13} \\
r_{21} & r_{22} & r_{23} \\
r_{31} & r_{32} & r_{33}
\end{array}\right]}_{\bar{\MR} \in \ensuremath{\mathrm{SO}(3)}\xspace} =
\underbrace{\left[ \begin{array}{ccc}
r_{11} & \frac{s_1}{s_2} r_{21} & \frac{s_1}{s_3'} r_{31} \\
\frac{s_2}{s_1} r_{12} & r_{22} & \frac{s_2}{s_3'} r_{32} \\
\frac{s_3'}{s_1} r_{13} & \frac{s_3'}{s_2}r_{23} & r_{33}
\end{array}\right]}_{\M{S}' \bar{\MR}^{\mathsf{T}} (\M{S}')^{-1}}. \label{eq:barMRSO3}
\end{eqnarray}
Now we use $\abs{\frac{s_1}{s_2}}, \abs{\frac{s_1}{s_3'}}, \abs{\frac{s_2}{s_3'}}>1$, and the fact that both sides of~\eqref{eq:barMRSO3} are rotation matrices:
\begin{eqnarray}
\hspace{-4mm} r_{11}^2 + r_{21}^2 + r_{31}^2 = r_{11}^2 + \parentheses{\frac{s_1}{s_2}}^2 r_{21}^2 + \parentheses{\frac{s_1}{s_3'}}^2 r_{31}^2 = 1, \\
\hspace{-4mm} r_{33}^2 + r_{32}^2 + r_{31}^2 = r_{33}^2 + \parentheses{\frac{s_2}{s_3'}}^2 r_{32}^2 + \parentheses{\frac{s_1}{s_3'}}^2 r_{31}^2 = 1,
\end{eqnarray}
which implies that
\begin{eqnarray}
\parentheses{\parentheses{\frac{s_1}{s_2}}^2-1} r_{21}^2 + \parentheses{ \parentheses{\frac{s_1}{s_3'}}^2 - 1}r_{31}^2 = 0,\\
\parentheses{\parentheses{\frac{s_2}{s_3'}}^2-1} r_{32}^2 + \parentheses{\parentheses{\frac{s_1}{s_3'}}^2 - 1} r_{31}^2 = 0,
\end{eqnarray}
and hence $r_{21} = r_{31} = r_{32} = 0$. Substituting them back into~\eqref{eq:barMRSO3}, we have $r_{12}=r_{13}=r_{23} = 0$. Therefore, we conclude that $\bar{\MR}$ is a diagonal matrix. However, there are only four rotation matrices that are diagonal:
\begin{eqnarray}
\bar{\MR}_1 = \diag{[1,1,1]},\\
\bar{\MR}_2 = \diag{[1,-1,-1]},\\
\bar{\MR}_3 = \diag{[-1,1,-1]},\\
\bar{\MR}_4 = \diag{[-1,-1,1]}.
\end{eqnarray}
As a result, the equation~\eqref{eq:equivalentequilibrium} has four and only four solutions. Note that $\bar{\MR}_1 = {\mathbf I}_3$ corresponds to the optimal equilibrium point $\MR^\star$, and the angular distance between $\MR^\star$ and the other three spurious equilibrium points $\MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}}, j=2,3,4$ is:
\begin{eqnarray}
\abs{\arccos\parentheses{\frac{\trace{(\MR^\star)^{\mathsf{T}} \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}}}-1}{2}}} \nonumber \\
= \abs{\arccos\parentheses{ \frac{ \trace{\MV_{+}\MU_{+}^{\mathsf{T}} \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}}} -1}{2} } } \nonumber \\
= \abs{\arccos\parentheses{ \frac{\trace{\bar{\MR}_j} - 1}{2} } } = \pi.
\end{eqnarray}
{\bf\ref{item:localunstable}: Locally unstable spurious equilibrium points}. Lastly, we are ready to show that the three spurious equilibrium points are locally unstable. Let the system be at one of the three spurious equilibrium points $\boldsymbol{s} = (\bar{\vy},\MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}},{\mathbf 0},{\mathbf 0}),j=2,3,4$ with zero translational and angular velocities (such that the total energy of the system equals the total potential energy of the system due to zero kinetic energy), and consider a small perturbation to the equilibrium point:
\begin{eqnarray}
\boldsymbol{s}_{\Delta} = (\bar{\vy},\M{R}_{\Delta} \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}},{\mathbf 0},{\mathbf 0}),
\end{eqnarray}
with a perturbing rotation $\MR_{\Delta} \in \ensuremath{\mathrm{SO}(3)}\xspace$. The total (potential) energy of the system at $\boldsymbol{s}$ is
\begin{eqnarray}
V(\boldsymbol{s}) = \frac{k}{2} \sum_{i=1}^N \norm{\boldsymbol{y}_i - \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}} \xref{i} - \bar{\vy}}^2 \\
= \frac{k}{2} \sum_{i=1}^N \norm{\yref{i} - \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}} \xref{i}}^2 \\
= \overbrace{\frac{k}{2} \sum_{i=1}^N \norm{\yref{i}}^2 + \frac{k}{2}\sum_{i=1}^N \norm{\xref{i}}^2}^{:=E} - \nonumber \\
k \sum_{i=1}^N \trace{\xref{i}^{\mathsf{T}} \MV_{+}\bar{\MR}_j\MU_{+}^{\mathsf{T}}\yref{i}} \\
= E - k \trace{\parentheses{\sum_{i=1}^N\yref{i}\xref{i}^{\mathsf{T}}} \MV_{+} \bar{\MR}_j \MU_{+}^{\mathsf{T}}} \\
= E - k\trace{\MU_{+} \M{S}' \MV_{+}^{\mathsf{T}} \MV_{+} \bar{\MR}_j \MU_{+}^{\mathsf{T}}} \\
= E - k\trace{ \M{S}' \bar{\MR}_j}.
\end{eqnarray}
The total energy of the system at $\state_{\Delta}$ is
\begin{eqnarray}
V(\state_{\Delta}) = \frac{k}{2} \sum_{i=1}^N \norm{\yref{i} - \MR_{\Delta} \MU_{+} \bar{\MR}_j \MV_{+}^{\mathsf{T}} \xref{i}}^2 \\
= E - k \sum_{i=1}^N \trace{\xref{i}^{\mathsf{T}} \MV_{+} \bar{\MR}_j \MU_{+}^{\mathsf{T}} \MR_{\Delta}^{\mathsf{T}}\yref{i}} \\
= E - k \trace{\parentheses{\sum_{i=1}^N \yref{i} \xref{i}^{\mathsf{T}}} \MV_{+}\bar{\MR}_j \MU_{+}^{\mathsf{T}} \MR_{\Delta}^{\mathsf{T}}} \\
= E - k \trace{\MU_{+} \M{S}' \bar{\MR}_j \MU_{+}^{\mathsf{T}} \MR_{\Delta}^{\mathsf{T}}} \\
= E - k \trace{\M{S}'\bar{\MR}_j \MU_{+}^{\mathsf{T}} \MR_{\Delta}^{\mathsf{T}} \MU_{+}}.
\end{eqnarray}
Therefore, we have that the difference of energy from $V(\boldsymbol{s})$ to $V(\state_{\Delta})$ is
\begin{eqnarray}
V(\boldsymbol{s}) - V(\state_{\Delta}) = k \inner{\M{S}' \bar{\MR}_j}{\MU_{+}^{\mathsf{T}} \MR_{\Delta} \MU_{+} - {\mathbf I}_3}.
\end{eqnarray}
Using the Rodrigues’ rotation formula on $\MR_{\Delta}$:
\begin{eqnarray}
\MR_{\Delta} = \cos\theta {\mathbf I}_3 + \sin\theta \hatmap{\boldsymbol{u}} + (1-\cos\theta)\boldsymbol{u}\vu^{\mathsf{T}},
\end{eqnarray}
where $\theta$ is the rotation angle and $\boldsymbol{u} \in \usphere{2}$ is the rotation axis, we have
\begin{eqnarray}
\MU_{+}^{\mathsf{T}} \MR_{\Delta} \MU_{+} - {\mathbf I}_3 = \nonumber \\
(\cos\theta -1){\mathbf I}_3 + (1-\cos\theta)\MU_{+}^{\mathsf{T}}\boldsymbol{u}\vu^{\mathsf{T}}\MU_{+} + \nonumber \\
\sin\theta \MU_{+}^{\mathsf{T}}\hatmap{\boldsymbol{u}}\MU_{+},
\end{eqnarray}
and the last term $\sin\theta \MU_{+}^{\mathsf{T}}\hatmap{\boldsymbol{u}}\MU_{+}$ is skew-symmetric. Since $\M{S}'\bar{\MR}_j$ is diagonal (and its inner product with any skew-symmetric matrix is zero), we have
\begin{eqnarray}
\hspace{-4mm} V(\boldsymbol{s}) - V(\state_{\Delta}) = k(1-\cos\theta) \inner{\M{S}'\bar{\MR}_j}{\boldsymbol{z}\vz^{\mathsf{T}} - {\mathbf I}_3} \\
= k(1-\cos\theta) \parentheses{ \boldsymbol{z}^{\mathsf{T}} (\M{S}'\bar{\MR}_j)\boldsymbol{z} - \trace{\M{S}'\bar{\MR}_j} },
\end{eqnarray}
where we have denoted $\boldsymbol{z} \triangleq \MU_{+}^{\mathsf{T}}\boldsymbol{u} \in \usphere{2}$. Now using the expression for $\bar{\MR}_j, j=2,3,4$, we have:
\begin{eqnarray}
\M{S}'\bar{\MR}_2 = \diag{[s_1,-s_2,-s_3']},\\
\M{S}'\bar{\MR}_3 = \diag{[-s_1,s_2,-s_3']}, \\
\M{S}'\bar{\MR}_4 = \diag{[-s_1,-s_2,s_3']}.
\end{eqnarray}
Hence, when $j=2$, we choose $\boldsymbol{z} = [1,0,0]^{\mathsf{T}}$, so that
\begin{eqnarray}
V(\boldsymbol{s}) - V(\state_{\Delta}) = k(1-\cos\theta)(s_2 + s_3') > 0;
\end{eqnarray}
when $j=3$, we choose $\boldsymbol{z}=[0,1,0]^{\mathsf{T}}$, so that
\begin{eqnarray}
V(\boldsymbol{s}) - V(\state_{\Delta}) = k(1-\cos\theta)(s_1 + s_3') > 0;
\end{eqnarray}
when $j=4$, we choose $\boldsymbol{z} = [0,0,1]^{\mathsf{T}}$, so that
\begin{eqnarray}
V(\boldsymbol{s}) - V(\state_{\Delta}) = k(1-\cos\theta)(s_1 + s_2) > 0.
\end{eqnarray}
This implies that, in all three cases, there exist small rotational perturbations with angle $\theta$ along axis $\MU_{+}\boldsymbol{z}$ (recall that $\boldsymbol{z} = \MU_{+}^{\mathsf{T}} \boldsymbol{u}$), such that this small perturbation will cause a strict decrease in the total energy of the system. As a result, the system is locally unstable at the three spurious equilibrium points. Using Lyapunov's local stability theory~\cite{Slotine91book-nonlinearcontrol}, we know that, unless starting exactly at one of the spurious equilibrium points, the system will never converge to these locally unstable equilibrium points.
\end{proof}
\section{Proof of Lemma~\ref{lemma:potentialenergy}}
\label{sec:app:proof-potentialenergy}
\begin{proof}
Let $(\underline{\vxx}_i,\underline{\vy}_i) \in \ensuremath{\mathrm{pair}}{\M{T} \otimes X_i, Y_i}$ be the two endpoints of the shortest distance pair, we have that the cost function of~\eqref{eq:primitivealignment} is $\sum_{i=1}^N \| \underline{\vxx}_i - \underline{\vy}_i \| ^2$. On the other hand, the potential energy of the system is stored in the virtual springs as $\sum_{i=1}^N \frac{k}{2} \| \underline{\vxx}_i - \underline{\vy}_i\|^2$, which equates the cost if $k=2$.
\end{proof}
\section{Semantic Uncertainty Ellipsoid}
\label{app:sec:semantic-uncertainty-ellipsoid}
The idea of a semantic uncertainty ellipsoid (SUE) is borrowed from the \emph{error ellipsoid} that is commonly used in statistics, but we apply it to category-level pose estimation for the first time. Given a library of $K$ shapes of a category, ${\cal B}_k,k=1,\dots,K$, where each ${\cal B}_k \in \Real{3\times N}$ contains a list of $N$ semantic keypoints. For example, in the category of car, ${\cal B}_k$ can be different CAD models from different car manufacturers, with annotations of certain semantic keypoints that exist for all CAD models,~\emph{e.g.},,~wheels, mirrors. Then we build a SUE~for the $i$-th semantic keypoint as follows. We first compute the average position of the semantic keypoint as
\begin{eqnarray}
\boldsymbol{b}_i = \frac{1}{K} \sum_{k=1}^K {\cal B}_k (i),
\end{eqnarray}
where ${\cal B}_k (i)$ denotes the location of the $i$-th keypoint in the $k$-th shape. We then compute the covariance matrix for the $i$-th keypoint
\begin{eqnarray}
\M{C}_i = \frac{1}{K} \sum_{k=1}^K ({\cal B}_k(i) - \boldsymbol{b}_i) ({\cal B}_k(i) - \boldsymbol{b}_i)^{\mathsf{T}}.
\end{eqnarray}
Using $\boldsymbol{b}_i$ and $\M{C}_i$, we assume that the position of the $i$-th semantic keypoint, denoted as $\vxx_i$, satisfies the following multivariate Gaussian distribution:
\begin{eqnarray}
p(\vxx_i) = \frac{\exp\parentheses{-\frac{1}{2} (\vxx_i - \boldsymbol{b}_i)^{\mathsf{T}} \M{C}_i^{-1} (\vxx_i - \boldsymbol{b}_i) }}{\sqrt{(2\pi)^3 \abs{\M{C}_i}}},
\end{eqnarray}
where $\abs{\M{C}_i} \triangleq \det{\M{C}_i}$ denotes the determinant of $\M{C}_i$. Under this assumption, it is known that the square of the Mahalanobis distance,~\emph{i.e.},,~$(\vxx_i - \boldsymbol{b}_i)^{\mathsf{T}} \M{C}_i ^{-1} (\vxx_i - \boldsymbol{b}_i)$ satisfies a chi-square distribution with three degrees of freedom:
\begin{eqnarray}
(\vxx_i - \boldsymbol{b}_i)^{\mathsf{T}} \M{C}_i ^{-1} (\vxx_i - \boldsymbol{b}_i) \sim \chi^2_3.
\end{eqnarray}
Therefore, given a confidence $\eta \in (0,1)$, we have:
\begin{eqnarray}
\mathbb{P}\parentheses{(\vxx_i - \boldsymbol{b}_i)^{\mathsf{T}} \M{C}_i ^{-1} (\vxx_i - \boldsymbol{b}_i) \leq \chi^2_3 (\eta)} = \eta,
\end{eqnarray}
where $\chi^2_3(\eta)$ corresponds to the probabilistic quantile of confidence $\eta$. This states that, with probability $\eta$, the point $\vxx_i$ lies inside the 3D ellipsoid
\begin{eqnarray}
\frac{(\vxx_i - \boldsymbol{b}_i)^{\mathsf{T}} \M{C}_i ^{-1} (\vxx_i - \boldsymbol{b}_i)}{\chi^2_3(\eta)} \leq 1.
\end{eqnarray}
We call this ellipsoid the SUE~with confidence $\eta$, and in our experiments we choose $\eta = 0.5$. Fig.~\ref{fig:app-sue} shows two examples of category models with SUEs.
\input{fig-app-sue}
\section{Proof of Theorem~\ref{thm:shortestdistance}}
\label{app:sec:proof-shortest-distancepair}
\begin{proof}
Results~\ref{thm:point-point}-\ref{thm:point-cone} are basic results in 3D geometry~\cite{Briales17cvpr-registration,li19cvpr-primitiveFitting} that can be verified by inspection. We now prove~\ref{thm:point-ellipsoid} and~\ref{thm:ellipsoid-line}. The proof for~\ref{thm:point-ellipsoid} is based on~\cite{Kiseliov94LMJ-pointEllipsoid}, while the proof for~\ref{thm:ellipsoid-line} is new.
{\bf Point-Ellipsoid (\ensuremath{\mathrm{PE}})}. According to the definition of the shortest distance~\eqref{eq:mindist}, the point in the ellipsoid $E(\boldsymbol{y},\M{A})$ that attains the shortest distance to $\vxx$ is the minimizer of the following optimization:
\begin{eqnarray} \label{eq:min-point-ellipsoid}
\min_{\boldsymbol{z} \in \Real{3}} & \norm{\boldsymbol{z} - \vxx}^2\\
\text{ subject to } & (\vzz - \boldsymbol{y})^{\mathsf{T}} \M{A} (\vzz-\boldsymbol{y}) \leq 1.
\end{eqnarray}
Problem~\eqref{eq:min-point-ellipsoid} has a single inequality constraint and hence satisfies the \emph{linear independence constraint qualification} (LICQ)~\cite{Boyd04book}. Therefore, any solution of~\eqref{eq:min-point-ellipsoid} must satisfy the KKT conditions,~\emph{i.e.},~there exist $(\vzz,\lambda)$ such that:
\begin{eqnarray}
(\vzz-\boldsymbol{y})^{\mathsf{T}}\M{A}(\vzz-\boldsymbol{y}) - 1 \leq 0 \\
\lambda \geq 0 \\
\nabla_{\vzz} {\cal L} \triangleq 2 (\vzz - \vxx) + 2\lambda\M{A} (\vzz - \boldsymbol{y}) = {\mathbf 0} \\
\lambda ((\vzz-\boldsymbol{y})^{\mathsf{T}}\M{A}(\vzz-\boldsymbol{y}) - 1) = 0
\end{eqnarray}
where ${\cal L} \triangleq \norm{\vzz-\vxx}^2 + \lambda ((\vzz-\boldsymbol{y})^{\mathsf{T}}\M{A}(\vzz-\boldsymbol{y})-1)$ is the Lagrangian. Let $\vzz_y \triangleq \vzz - \boldsymbol{y}, \vxx_y \triangleq \vxx - \boldsymbol{y}$, the equations above can be written as:
\begin{eqnarray}
\vzz_y^{\mathsf{T}} \M{A} \vzz_y -1 \leq 0 \label{eq:zfeasible}\\
\lambda \geq 0 \\
(\lambda\M{A} + {\mathbf I})\vzz_y = \vxx_y \label{eq:nablaLvanish}\\
\lambda (\vzz_y^{\mathsf{T}}\M{A}\vzz_y - 1) = 0 \label{eq:complementarity}
\end{eqnarray}
Now we can discuss two cases: (i) if $\lambda=0$, then from~\eqref{eq:nablaLvanish}, we have $\vzz_y = \vxx_y$, thus $\vzz = \vxx$ attains the global minimum $\norm{\vzz - \vxx} = 0$ (the objective function is lower bounded by $0$). In order to satisfy feasibility~\eqref{eq:zfeasible}, $\vxx_y^{\mathsf{T}}\M{A}\vxx_y \leq 1$ must hold and $\vxx$ has to belong to the ellipsoid; (ii) if $\lambda > 0$, then from~\eqref{eq:complementarity} we have $\vzz_y^{\mathsf{T}}\M{A}\vzz_y = 1$ and the optimal $\vzz$ lies on the surface of the ellipsoid. Because $\lambda > 0$ and $\M{A} \succ 0$, $\lambda\M{A} + {\mathbf I}$ must be invertible and eq.~\eqref{eq:nablaLvanish} yields:
\begin{eqnarray}
\vzz_y(\lambda) = (\lambda\M{A}+{\mathbf I})^{-1} \vxx_y,
\end{eqnarray}
where we use $\vzz_y(\lambda)$ to indicate $\vzz_y$ as a function of $\lambda$. Substituting this expression into $\vzz_y^{\mathsf{T}}\M{A}\vzz_y = 1$, we have that:
\begin{eqnarray}
g(\lambda) \triangleq \vzz_y(\lambda)^{\mathsf{T}} \M{A} \vzz_y(\lambda) -1 = 0.
\end{eqnarray}
To see how many roots $g(\lambda)$ has in the range $\lambda > 0$, we note:
\begin{eqnarray}
g(\lambda=0) = \vxx_y^{\mathsf{T}} \M{A} \vxx_y - 1 \label{eq:valuezero}\\
g(\lambda\rightarrow +\infty) = -1 \label{eq:valueinfty}
\end{eqnarray}
and compute the derivative of $g(\lambda)$:
\begin{eqnarray}
g'(\lambda) = 2\vzz_y'(\lambda)^{\mathsf{T}} \M{A} \vzz_y(\lambda) \nonumber \\
= -2 \vzz_y(\lambda)^{\mathsf{T}} \parentheses{\M{A} (\lambda\M{A}+{\mathbf I})^{-1} \M{A}} \vzz_y(\lambda) < 0 \label{eq:negativederivative}
\end{eqnarray}
where $\vzz_y'(\lambda)$, the derivative of $\vzz_y(\lambda)$ w.r.t.\xspace $\lambda$, can be obtained by differentiating both sides of eq.~\eqref{eq:nablaLvanish} w.r.t.\xspace $\lambda$:
\begin{eqnarray}
\M{A} \vzz_y(\lambda) + (\lambda\M{A}+{\mathbf I})\vzz_y'(\lambda) = 0 \Rightarrow \nonumber \\
\vzz_y'(\lambda) = - (\lambda\M{A}+{\mathbf I})^{-1} \M{A} \vzz_y(\lambda).
\end{eqnarray}
The last inequality in~\eqref{eq:negativederivative} follows from the positive definiteness of the matrix $\M{A} (\lambda\M{A}+{\mathbf I})^{-1} \M{A}$. Eqs.~\eqref{eq:valuezero}-\eqref{eq:negativederivative} show that the function $g(\lambda)$ is monotonically decreasing for $\lambda>0$. Therefore, $g(\lambda)$ has a unique root in the range $\lambda > 0$ if and only if $g(0) > 0$,~\emph{i.e.},~$\vxx_y^{\mathsf{T}}\M{A}\vxx_y > 1$. Lastly, to see the solution is indeed a minimizer, observe that the Hessian of the Lagrangian~w.r.t.\xspace~$\vzz$ is:
\begin{eqnarray}
\nabla_{\vzz\vzz}{\cal L} = 2(\lambda\M{A}+{\mathbf I}) \succ 0,
\end{eqnarray}
which is positive definite, a sufficient condition for $\vzz$ to be a global minimizer (because there is a single local minimizer, it is also global), concluding the proof of~\ref{thm:point-ellipsoid}.
We note that the proof above also provides an efficient algorithm to numerically compute the root of $g(\lambda)=0$ and find the optimal $\vzz$, using Newton's root finding method~\cite{Nocedal99}. To do so, we initialize $\lambda_0 = 0$, and iteratively perform:
\begin{eqnarray}
\lambda_k = \lambda_{k-1} - \frac{g(\lambda_{k-1})}{g'(\lambda_{k-1})}, \quad k=1,\dots \label{eq:newtonrootfinding}
\end{eqnarray}
until $g(\lambda_k) = 0$ (up to numerical accuracy). This algorithm has local quadratic convergence and typically finds the root within 20 iterations (as we will show in Section~\ref{sec:experiments}).
{\bf Ellipsoid-Line (\ensuremath{\mathrm{EL}})}. First we decide if the line intersects with the ellipsoid. Since any point on the line $L(\boldsymbol{y},\boldsymbol{v})$ can be written as $\boldsymbol{y} + \alpha \boldsymbol{v}$ for some $\alpha \in \Real{}$, the line intersects with the ellipsoid if and only if:
\begin{eqnarray}
(\boldsymbol{y} + \alpha \boldsymbol{v} - \vxx)^{\mathsf{T}} \M{A} (\boldsymbol{y} + \alpha \boldsymbol{v} - \vxx) = 1 \label{eq:linecrossellipsoid}
\end{eqnarray}
has real solutions. Let $\boldsymbol{y}_x \triangleq \boldsymbol{y} - \vxx$, eq~\eqref{eq:linecrossellipsoid} simplifies as:
\begin{eqnarray}
(\boldsymbol{v}^{\mathsf{T}} \M{A} \boldsymbol{v}) \alpha^2 + (2\boldsymbol{y}_x^{\mathsf{T}}\M{A}\boldsymbol{v})\alpha + (\boldsymbol{y}_x^{\mathsf{T}}\M{A}\boldsymbol{y}_x -1) = 0, \label{eq:linecrossellipsoid1}
\end{eqnarray}
where $\boldsymbol{v}^{\mathsf{T}} \M{A} \boldsymbol{v} > 0$ due to $\M{A} \succ 0$. The discriminant of the quadratic polynomial is:
\begin{eqnarray}
\Delta = 2\sqrt{(\boldsymbol{y}_x^{\mathsf{T}}\M{A}\boldsymbol{v})^2 - (\boldsymbol{v}^{\mathsf{T}} \M{A} \boldsymbol{v})(\boldsymbol{y}_x^{\mathsf{T}}\M{A}\boldsymbol{y}_x -1)}.
\end{eqnarray}
Therefore, eq.~\eqref{eq:linecrossellipsoid1} has two roots (counting multiplicity):
\begin{eqnarray}
\alpha_{1,2} = \frac{-\boldsymbol{y}_x^{\mathsf{T}}\M{A}\boldsymbol{v} \pm \Delta }{\boldsymbol{v}^{\mathsf{T}}\M{A}\boldsymbol{v}}
\end{eqnarray}
if $\Delta \geq 0$, and zero roots otherwise. Accordingly, when $\Delta \geq 0$, the line intersects the ellipsoid and the entire line segment ${\boldsymbol{y} + \alpha \boldsymbol{v}: \alpha \in [\alpha_1,\alpha_2]}$ is inside the ellipsoid, hence the shortest distance is zero.
On the other hand, when $\Delta_\alpha < 0$, there is no intersection between the line and the ellipsoid, we seek to find the shortest distance pair by solving the following optimization:
\begin{eqnarray}
\min_{\vzz \in \Real{3},\alpha \in \Real{}} & \norm{\vzz - (\boldsymbol{y} + \alpha\boldsymbol{v})}^2 \label{eq:minellipsoidline}\\
\text{ subject to } & (\vzz - \vxx)^{\mathsf{T}} \M{A} (\vzz - \vxx) \leq 1
\end{eqnarray}
Similarly, problem~\eqref{eq:minellipsoidline} satisfies LICQ and we write down the KKT conditions:
\begin{eqnarray}
(\vzz - \vxx)^{\mathsf{T}} \M{A} (\vzz - \vxx) \leq 1 \\
\lambda \geq 0 \\
\nabla_{\vxx} {\cal L} \triangleq 2(\vzz - \boldsymbol{y} - \alpha\boldsymbol{v}) + 2\lambda\M{A}(\vzz - \vxx) = {\mathbf 0} \label{eq:calLxvanish1}\\
\nabla_{\alpha} {\cal L} \triangleq 2\boldsymbol{v}^{\mathsf{T}}(\alpha\boldsymbol{v} + \boldsymbol{y} - \vzz) = 0 \label{eq:calLalphavanish1}\\
\lambda((\vzz-\vxx)^{\mathsf{T}}\M{A}(\vzz - \vxx) - 1) = 0.
\end{eqnarray}
Let $\vzz_x \triangleq \vzz - \vxx$, we can simplify the equations above:
\begin{eqnarray}
\vzz_x^{\mathsf{T}} \M{A} \vzz_x - 1\leq 0 \label{eq:zfeasibleel}\\
\lambda \geq 0 \label{eq:lambdanngel} \\
\parentheses{\lambda\M{A} + ({\mathbf I} - \boldsymbol{v}\vv^{\mathsf{T}})}\vzz_x = ({\mathbf I} - \boldsymbol{v}\vv^{\mathsf{T}})\boldsymbol{y}_x \label{eq:gradientcalLvanishel}\\
\lambda(\vzz_x^{\mathsf{T}}\M{A}\vzz_x - 1) = 0, \label{eq:complementarityel}
\end{eqnarray}
where we have combined~\eqref{eq:calLxvanish1} and~\eqref{eq:calLalphavanish1} by first obtaining:
\begin{eqnarray}
\alpha = \boldsymbol{v}^{\mathsf{T}} (\vzz_x - \boldsymbol{y}_x),
\end{eqnarray}
from~\eqref{eq:calLalphavanish1} and then inserting it to~\eqref{eq:calLxvanish1}. Now we can discuss two cases for the KKT conditions~\eqref{eq:zfeasibleel}-\eqref{eq:complementarityel}. (i) If $\lambda = 0$, then eq.~\eqref{eq:gradientcalLvanishel} reads:
\begin{eqnarray}
({\mathbf I}-\boldsymbol{v}\vv^{\mathsf{T}})(\vzz - \boldsymbol{y}) = {\mathbf 0},
\end{eqnarray}
which indicates that either $\vzz = \boldsymbol{y}$ or $\vzz - \boldsymbol{y} = k \boldsymbol{v}$ for some $k \neq 0$ (note that $\boldsymbol{v}$ is the eigenvector of ${\mathbf I} - \boldsymbol{v}\vv^{\mathsf{T}}$ with associated eigenvalue $0$), which both mean that $\vzz$ lies on the line $L(\boldsymbol{y},\boldsymbol{v})$. This is in contradiction with the assumption that there is no intersection between the line and the ellipsoid. (ii) Therefore, $\lambda > 0$ and $\vzz_x^{\mathsf{T}}\M{A}\vzz_x = 1$. In this case, we write $\M{V} \triangleq {\mathbf I} - \boldsymbol{v}\vv^{\mathsf{T}} \succeq 0$. Since $\lambda > 0$, $\M{A} \succ 0$, we have $\lambda\M{A} +\M{V} \succ 0$ is invertible, and we get from~\eqref{eq:gradientcalLvanishel} that:
\begin{eqnarray}
\vzz_x(\lambda) = (\lambda\M{A} + \M{V})^{-1} \M{V}\boldsymbol{y}_x.
\end{eqnarray}
Substituting it back to $\vzz_x^{\mathsf{T}}\M{A}\vzz_x = 1$, we have that $\lambda$ must satisfy:
\begin{eqnarray}
g(\lambda) \triangleq \vzz_x(\lambda)^{\mathsf{T}} \M{A} \vzz_x(\lambda) -1 = 0.
\end{eqnarray}
To count the number of roots of $g(\lambda)$ within $\lambda > 0$, we note that:
\begin{eqnarray}
g(\lambda \rightarrow 0_{+}) = \boldsymbol{y}_x^{\mathsf{T}} \M{A} \boldsymbol{y}_x - 1> 0 \label{eq:glambdazeroel}\\
g(\lambda \rightarrow +\infty) = -1 < 0 \label{eq:glambdainftyel}
\end{eqnarray}
where $\boldsymbol{y}_x^{\mathsf{T}} \M{A} \boldsymbol{y}_x > 1$ because there is no intersection between the line and the ellipsoid and $\boldsymbol{y}$ must lie outside the ellipsoid. We then compute the derivative of $g(\lambda)$~w.r.t.\xspace~$\lambda$:
\begin{eqnarray}
g'(\lambda) = 2\vzz_x'(\lambda)^{\mathsf{T}} \M{A} \vzz_x(\lambda) \nonumber \\
= -2 \vzz_x(\lambda)^{\mathsf{T}} \M{A} (\lambda \M{A} + \M{V})^{-1} \M{A} \vzz_x(\lambda) < 0 \label{eq:gdotlambdael}
\end{eqnarray}
where $\vzz_x'(\lambda) = -(\lambda\M{A} + \M{V})^{-1} \M{A} \vzz_x(\lambda)$ can be obtained by differentiating both sides of eq.~\eqref{eq:gradientcalLvanishel}~w.r.t.\xspace~$\lambda$. Eqs.~\eqref{eq:glambdazeroel}-\eqref{eq:gdotlambdael} show that $g(\lambda)$ is a monotonically decreasing function in $\lambda > 0$, and a unique root exists in the range $\lambda > 0$. Finally, problem~\eqref{eq:minellipsoidline} admits a global minimizer due to positive definiteness of the Hessian of the Lagrangian.
The proof above suggests that we can also use Newton's root finding algorithm as in~\eqref{eq:newtonrootfinding} to compute the root of $g(\lambda)$. To make sure $g'(\lambda)$ (eq.~\eqref{eq:gdotlambdael}) is well defined at $\lambda_0$, we initialize $\lambda_0 = 10^{-6}$ instead of $\lambda_0 = 0$ in the $\ensuremath{\mathrm{PE}}$ case.
\end{proof}
\section{Conclusion}
\label{sec:conclusion}
We proposed \scenario{DAMP}, the first general meta-algorithm for solving five pose estimation problems by simulating rigid body dynamics. We demonstrated surprising global convergence of \scenario{DAMP}: it always converges given 3D-3D correspondences, and effectively escapes suboptimal solutions given 2D-3D correspondences. We proved a global convergence result in the case of point cloud registration.
Future work can be done to (i) extend the global convergence to general primitive registration; (ii) explore GPU parallelization~\cite{Ali20arxiv-fastgravitational} to enable a fast implementation; (iii) generalize \scenario{DAMP} to high-dimensional registration for applications such as unsupervised language translation \cite{Conneau18iclr-word,Artetxe18acl-robust}. Geometric algebra (GA)~\cite{Doran03book-GA} can describe rigid body dynamics in any dimension, but computational challenges remain in high-dimensional GA and deserve further investigation.
\section{Dynamical Pose Estimation}
\label{sec:DAMP}
\subsection{Overview of \scenario{DAMP}}
\label{sec:alg-overview}
The idea in \scenario{DAMP} is to treat ${\cal X}$ as the $N$-primitive rigid body in Fig.~\ref{fig:rigid-body-dynamics}, and treat $\mathcal{Y}$ as a set of primitives in the \emph{global frame} that stay fixed and generate external forces to ${\cal X}$,~\emph{i.e.},,~each primitive $Y_i$ applies an external force $\boldsymbol{f}_i$ on $X_i$ at location $\underline{\vxx}_i$ (red arrows in Fig.~\ref{fig:rigid-body-dynamics}). Although this idea is inspired by related works~\cite{Golyanik16CVPR-gravitationalRegistration,Golyanik19ICCV-acceleratedGravitational,Jauer18PAMI-physicsBasedRegistration}, our construction of the forces significantly differ from them in two aspects: (i) we place a \emph{virtual spring}, with coefficient $k$, between each pair of corresponding primitives $(X_i,Y_i)$;\footnote{Previous works~\cite{Golyanik16CVPR-gravitationalRegistration,Golyanik19ICCV-acceleratedGravitational,Jauer18PAMI-physicsBasedRegistration} use gravitational and electrostatic forces between two point clouds, under which the potential energy of the dynamical system is not equivalent to the objective function of~\eqref{eq:primitivealignment}.} (ii) the two endpoints of the virtual spring are found using Theorem~\ref{thm:shortestdistance} so that the virtual spring spans the \emph{shortest distance} between $X_i$ and $Y_i$. With this, we have the following lemma.
\begin{lemma}[Potential Energy]
\label{lemma:potentialenergy}
If the virtual spring has its two endpoints located at the shortest distance pair $\ensuremath{\mathrm{pair}}{\M{T} \otimes X_i, Y_i}$ for any $\M{T}$, and the spring has constant coefficient $k=2$, then the cost function of problem~\eqref{eq:primitivealignment} is equal to the potential energy of the dynamical system.
\end{lemma}
We now state the \scenario{DAMP} algorithm (Algorithm~\ref{alg:damp}). The input to \scenario{DAMP} is two sets of geometric primitives as in problem~\eqref{eq:primitivealignment}. In particular, we require the $(X_i,Y_i)$ pair to be one of the seven types listed in Theorem~\ref{thm:shortestdistance}, which encapsulate Examples~\ref{ex:pointcloudregistration}-\ref{ex:categoryabsolutepose}. \scenario{DAMP} starts by computing the center of mass $\bar{\vxx}$, the relative positions $\xref{i}$, and the moment of inertia $\M{J}$ (line~\ref{line:cmandJ}) using the location of the pointed mass $\vxx_i$ of each primitive in ${\cal X}$ (since $X_i$ is either a point or an ellipsoid among Examples~\ref{ex:pointcloudregistration}-\ref{ex:categoryabsolutepose}, $\vxx_i$ is well defined as in Fig.~\ref{fig:rigid-body-dynamics}). Then \scenario{DAMP} computes the Cholesky factorization of $\M{J}$ and stores the lower-triangular Cholesky factor $\M{L}$ (line~\ref{line:choleskyJ}), which will later be used to compute the angular acceleration $\valpha$ in eq.~\eqref{eq:Nprimitivedynamics}.\footnote{One can also invert $\M{J}$ directly since $\M{J}$ is a $3\times 3$ small matrix.} In line~\ref{line:initialization}, the simulation is initialized at $\boldsymbol{s}_0$ as in~\eqref{eq:initialState}, which basically states that ${\cal X}$ starts at rest without any initial speed. At each iteration of the main loop, \scenario{DAMP} first computes a shortest distance pair $(\underline{\vxx}_i,\underline{\vy}_i)$ between the fixed $Y_i$ and the $X_i$ at current state $\boldsymbol{s}$, denoted as $X_i(\boldsymbol{s})$ (line~\ref{line:shortestdistance}).
With the shortest distance pair $(\underline{\vxx}_i,\underline{\vy}_i)$, \scenario{DAMP} spawns an instantaneous virtual spring between $X_i$ and $Y_i$ with endpoints at $\underline{\vxx}_i$ and $\underline{\vy}_i$, leading to a virtual spring force $\boldsymbol{f}_i = k (\underline{\vy}_i - \underline{\vxx}_i)$ (line~\ref{line:springforce}). Then \scenario{DAMP} computes the time derivative of the state $\dot{\state}$ using eqs.~\eqref{eq:Nprimitivedynamics}-\eqref{eq:totaltorque} (line~\ref{line:computedstate}). If $\norm{\dot{\state}}$ is smaller than the predefined threshold $\varepsilon$, then the dynamical system has reached an equilibrium point and the simulation stops (line~\ref{line:breakequilibrium}). Otherwise, \scenario{DAMP} updates the state of the dynamical system, with proper \emph{renormalization} on $\boldsymbol{q}$ to ensure a valid 3D rotation (line~\ref{line:updatestate}). The initial pose of ${\cal X}$ is $(\bar{\vxx},{\mathbf I}_3)$, and the final pose of ${\cal X}$ is $(\vxx_{\mathrm{c}},\M{R}_q)$, therefore, \scenario{DAMP} returns the alignment $\M{T}$ that transforms ${\cal X}$ from the initial state to the final state (line~\ref{line:returnsolution}): $\M{R} = \M{R}_q,\ \boldsymbol{t} = \vxx_{\mathrm{c}} - \M{R}_q \bar{\vxx}$.
\input{alg-damp}
{\bf Escape local minima}. The \scenario{DAMP} framework allows a simple scheme for escaping suboptimal solutions. If the boolean flag \scenario{EscapeMinimum} is \scenario{True}, then each time the system reaches an equilibrium point, \scenario{DAMP} computes the potential energy of the system (which is the cost function of~\eqref{eq:primitivealignment} by Lemma~\ref{lemma:potentialenergy}), stores the energy and state in ${\cal C}$, ${\cal S}$, and \emph{randomly perturbs} the derivative of the state (imagine a virtual ``hammering'' on ${\cal X}$, line~\ref{line:perturb}). After executing the \scenario{EscapeMinimum} scheme for a number of $T_{\max}$ trials, \scenario{DAMP} uses the state with \emph{minimum} potential energy (line~\ref{line:minpotentialenergy}) to compute the final solution $\M{T}$.
\subsection{Global Convergence: Point Cloud Registration}
\label{sec:convergence}
Due to the external damping $\mu$, \scenario{DAMP} is guaranteed to converge to an equilibrium point with $\dot{\state} = {\mathbf 0}$, a result that is well-known from Lyapunov theory~\cite{Slotine91book-nonlinearcontrol}. However, the system~\eqref{eq:Nprimitivedynamics} may have many (even infinite) equilibrium points. Therefore, a natural question is: \emph{Does \scenario{DAMP} converge to an equilibrium point that minimizes the potential energy of the system?} If the answer is affirmative, then by Lemma~\ref{lemma:potentialenergy}, we can guarantee that \scenario{DAMP} finds the global minimizer of problem~\eqref{eq:primitivealignment}. The next theorem establishes the global convergence of \scenario{DAMP} for point cloud registration.
\begin{theorem}[Global Convergence]
\label{thm:globalconvergence}
In problem~\eqref{eq:primitivealignment}, let ${\cal X}$ and $\mathcal{Y}$ be two sets of 3D points under \emph{generic configuration}.
\begin{enumerate}[label=(\roman*)]\itemsep-0.2em
\item \label{item:foursolution} The system~\eqref{eq:Nprimitivedynamics} has four equilibrium points ($\dot{\state} = {\mathbf 0}$);
\item \label{item:optimalsolution} One of the (optimal) equilibrium point minimizes the potential energy;
\item \label{item:threebypi} Three other \emph{spurious} equilibrium points differ from the optimal equilibrium point by a rotation of $\pi$;
\item \label{item:localunstable} The spurious equilibrium points are \emph{locally unstable}.
\end{enumerate}
Therefore, \scenario{DAMP} (Algorithm~\ref{alg:damp} with \scenario{EscapeMinimum}= \scenario{False}) is guaranteed to converge to the optimal equilibrium point.
\end{theorem}
The proof of Theorem~\ref{thm:globalconvergence} is algebraically involved and is presented in the Supplementary Material. The condition ``generic configuration'' helps remove pathological cases such as when the 3D points are collinear and coplanar (examples given in Supplementary Material).
\section{Experiments}
\label{sec:experiments}
We first show that \scenario{DAMP} always converges to the optimal solution given 3D-3D correspondences (Section~\ref{sec:exp-3d-3d}), then we show the \scenario{EscapeMinimum}~scheme helps escape suboptimal solutions given 2D-3D correspondences (Section~\ref{sec:exp-2d-3d}).
\subsection{3D-3D: Empirical Global Convergence}
\label{sec:exp-3d-3d}
{\bf Point Cloud Registration}. We randomly sample $N=100$ 3D points from ${\cal N}({\mathbf 0},{\mathbf I}_3)$ to be ${\cal X}$, then generate $\mathcal{Y}$ by applying a random rigid transformation $(\M{R},\boldsymbol{t})$ to ${\cal X}$, followed by adding Gaussian noise ${\cal N}({\mathbf 0},0.01^2{\mathbf I}_3)$. We run \scenario{DAMP} without $\scenario{EscapeMinimum}$, and compare its estimated pose w.r.t.\xspace the groundtruth pose, as well as the \emph{optimal} pose returned by Horn's method~\cite{Horn87josa} (label: \scenario{SVD}). Table~\ref{table:pcrresult} shows the rotation ($e_{R}$) and translation $(e_{t})$ estimation errors of \scenario{DAMP} and \scenario{SVD} w.r.t.\xspace groundtruth, as well as the difference between \scenario{DAMP} and \scenario{SVD} estimates ($\bar{e}_{R}$ and $\bar{e}_t$), under $1000$ Monte Carlo runs. The statistics show that (i) \scenario{DAMP} always converges to the globally optimal solution ($\bar{e}_{R},\bar{e}_t$ are numerically zero), empirically proving the correctness of Theorem~\ref{thm:globalconvergence}; (ii) \scenario{DAMP} returns accurate pose estimations. On average, \scenario{DAMP} converges to the optimal equilibrium point in $27$ iterations ($\norm{\dot{\state}}<10^{-6}$), and runs in $6.3$ milliseconds. Although \scenario{DAMP} is slower than \scenario{SVD} in 3D, it opens up a new method to perform high-dimensional point cloud registration by using \emph{geometric algebra}~\cite{Doran03book-GA} to simulate rigid body dynamics~\cite{Bosch20TOG-nDrigidbody}, when \scenario{SVD} becomes expensive. We also use the \scenario{Bunny} dataset for point cloud registration and \scenario{DAMP} always returns the correct solution, shown in Fig.~\ref{fig:all-apps}(a).
\input{table-PCR}
{\bf Primitive Registration}. In order to test \scenario{DAMP}'s performance on primitive registration and verify its global convergence, we follow the test setup in~\cite{Briales17cvpr-registration} using random registration problems with point-to-point, point-to-line and point-to-plane correspondences, and compare \scenario{DAMP} with the state-of-the-art \emph{certifiably optimal} solver in~\cite{Briales17cvpr-registration} based on semidefinite relaxation (label: \scenario{SDR}). In particular, we randomly sample 50 points, 50 lines and 50 planes (150 primitives in total) within a scene with radius 10, randomly sample a point on each primitive, and transform the sampled points by a random $(\M{R},\boldsymbol{t})$, followed by adding Gaussian noise ${\cal N}({\mathbf 0},\sigma^2 {\mathbf I}_3)$. We increase the noise level $\sigma$ from $0.01$ to $2$, and perform 1000 Monte Carlo runs at each noise level. Fig.~\ref{fig:mesh-R-time} boxplots the rotation estimation error and runtime of \scenario{DAMP} and \scenario{SDR} (SDP solved by SeDuMi~\cite{Sturm99-sedumi} with CVX interface~\cite{CVXwebsite}). We observe that (i) \scenario{DAMP} always returns the same solution as \scenario{SDR}, which is certified to be the globally optimal solution (Supplementary Material~plots the relative duality gap of \scenario{SDR} is always zero); (ii) \scenario{DAMP} is about 10 times faster than \scenario{SDR}, despite being implemented in Matlab using for loops. The translation error looks similar as rotation error and is shown in Supplementary Material. This experiment shows that the same global convergence Theorem~\ref{thm:globalconvergence} is very likely to hold in the case of general primitive registration with line and plane correspondences. In fact, Supplementary Material~also performs the same set of experiments using the robot primitive model in Fig.~\ref{fig:all-apps}(b) with spheres, cylinders and cones, demonstrating that \scenario{DAMP} also \emph{always} converges to an accurate (most likely optimal) pose estimate (note that we cannot claim global optimality because there is no guaranteed globally optimal solver, such as \scenario{SDR}~\cite{Briales17cvpr-registration}, in that case to verify \scenario{DAMP}).
\input{fig-mesh-R-time}
{\bf Category Registration}. We use three categories, \emph{aeroplane}, \emph{car}, and \emph{chair}, from the \scenario{PASCAL3D+} dataset~\cite{Xiang2014WACV-PASCAL+} to test \scenario{DAMP} for category registration. In particular, given a list of $K$ instances in a category, where each instance has $N$ semantic keypoints ${\cal B}_k \in \Real{3 \times N},k=1,\dots,K$. We first build a category model of the $K$ instances into $N$ SUEs~(see Supplementary Material) and use it as $\mathcal{Y}$ in problem~\eqref{eq:primitivealignment}. Then we randomly generate an unknown instance of this category by following the active shape model~\cite{Zhou17pami-shapeEstimationConvex,Yang20cvpr-shapeStar},~\emph{i.e.},~${\cal S} = \sum_{k=1}^K c_k {\cal B}_k$ with $c_k \geq 0, \sum_{k=1}^K c_k = 1$. After this, we apply a random transformation $(\M{R},\boldsymbol{t})$ to ${\cal S}$ to obtain ${\cal X}$ in problem~\eqref{eq:primitivealignment}. We have $N=8,K=8$ for aeroplane, $N=12,K=9$ for car, and $N=10,K=8$ for chair. For each category, we perform 1000 Monte Carlo runs and Fig.~\ref{fig:cr-R-t} summarizes the rotation and translation estimation errors. We can see that \scenario{DAMP} returns accurate rotation and translation estimates for all 1000 Monte Carlo runs of each category. Because a globally optimal solver is not available for the case of registering a point cloud to a set of ellipsoids, we cannot claim the global convergence of \scenario{DAMP}, although the results highly suggest the global convergence. An example of registering the chair category is shown in Fig.~\ref{fig:all-apps}(c).
\input{fig-CR-R-t}
\subsection{2D-3D: Escape Local Minima}
\label{sec:exp-2d-3d}
{\bf Absolute Pose Estimation}. We follow the protocol in~\cite{Kneip2014ECCV-UPnP} for absolute pose estimation. We first generate $N$ groundtruth 3D points within the $[-2,2]\times[-2,2]\times[4,8]$ box inside the camera frame, then project the 3D points onto the image plane and add random Gaussian noise ${\cal N}({\mathbf 0},0.01^2 {\mathbf I}_2)$ to the 2D projections. $N$ bearing vectors are then formed from the 2D projections to be the set $\mathcal{Y}$ in problem~\eqref{eq:primitivealignment}. We apply a random $(\M{R},\boldsymbol{t})$ to the groundtruth 3D points to convert them into the world frame as the set ${\cal X}$ in problem~\eqref{eq:primitivealignment}. We apply \scenario{DAMP} to solve 1000 Monte Carlo runs of this problem for $N=50,100,200$, with both $\scenario{EscapeMinimum} = \scenario{False}$ and $\scenario{EscapeMinimum} = \scenario{True}$ ($T_{\max} = 5$). Table~\ref{table:apesuccess} shows the success rate of \scenario{DAMP}, where we say a pose estimation is successful if rotation error is below $5^\circ$ and translation error is below $0.5$. One can see that, (i) even without the \scenario{EscapeMinimum}~scheme, \scenario{DAMP} already has a very high success rate and it only failed twice when $N=100$; (ii) with the \scenario{EscapeMinimum}~scheme, \scenario{DAMP} achieves a $100\%$ success rate. This experiment indicates that the special configuration of the bearing vectors (\emph{i.e.},,~they form a ``cone'' pointed at the camera center) is more challenging for \scenario{DAMP} to converge.
We also apply \scenario{DAMP} to satellite pose estimation from 2D landmarks detected by a neural network~\cite{Chen19ICCVW-satellitePoseEstimation} using the \scenario{SPEED} dataset~\cite{Sharma19arXiv-SPEED} and a successful example is provided in Fig.~\ref{fig:all-apps}(d).
\input{table-ape-success}
\input{fig-fg3dcar-rot-err}
{\bf Category APE}.
We test \scenario{DAMP} on~\scenario{FG3DCar}~\cite{Lin14eccv-modelFitting} for category APE, which contains 300 images of cars each with $N=256$ 2D landmark detections. \scenario{DAMP} performs pose estimation by aligning the category model of SUEs~(\emph{cf.}\xspace~Fig.~\ref{fig:all-apps}(e)) to the set of bearing vectors. Fig.~\ref{fig:fg3dcar-rot-err} compares the rotation estimation error of \scenario{DAMP} with~\scenario{Shape$^\star$}~\cite{Yang20cvpr-shapeStar}, a state-of-the-art certifiably optimal solver for joint shape and pose estimation from 2D landmarks. We can see that \scenario{DAMP} without \scenario{EscapeMinimum}~fails on 6 out of the 300 images, but \scenario{DAMP} with \scenario{EscapeMinimum} succeeds on all 300 images, and return rotation estimates that are similar to \scenario{Shape$^\star$} (note that the difference is due to \scenario{Shape$^\star$} using a weak perspective camera model). We do notice that this is a challenging case for \scenario{DAMP} because it takes more than 1000 iterations to converge, and the average runtime is 20 seconds. However, \scenario{DAMP} is still faster than \scenario{Shape$^\star$} (about 1 minute runtime), and we believe there is significant room for speedup by using parallelization~\cite{Jauer18PAMI-physicsBasedRegistration,Ali20arxiv-fastgravitational}.
\section{Introduction}
Consider the problem of finding the best \emph{rigid} transformation (pose) to align two sets of \emph{corresponding} 3D geometric \emph{primitives} ${\cal X} = \cbrace{X_i}_{i=1}^N$ and $\mathcal{Y} = \cbrace{Y_i}_{i=1}^N$:
\begin{eqnarray}
\min_{\M{T} \in \ensuremath{\mathrm{SE}(3)}\xspace} \sum_{i=1}^N \mathbf{dist}\parentheses{\M{T} \otimes X_i, Y_i}^2, \label{eq:primitivealignment}
\end{eqnarray}
where $\ensuremath{\mathrm{SE}(3)}\xspace \triangleq \cbrace{(\M{R},\boldsymbol{t}): \M{R} \in \ensuremath{\mathrm{SO}(3)}\xspace, \boldsymbol{t} \in \Real{3}}$\footnote{$\ensuremath{\mathrm{SO}(3)}\xspace \triangleq \cbrace{\M{R} \in \Real{3 \times 3}: \M{R}\MR^{\mathsf{T}} = \M{R}^{\mathsf{T}}\M{R} = {\mathbf I}_3, \det{\M{R}} = +1}$ is the set of proper 3D rotations.} is the set of 3D rigid transformations (rotations and translations), $\M{T} \otimes X$ denotes the action of a rigid transformation $\M{T}$ on the primitive $X$, and $\mathbf{dist}\parentheses{X,Y}$ is the \emph{shortest} distance between two primitives $X$ and $Y$. In particular, we focus on the following primitives:
\begin{enumerate}
\itemsep-0.2em
\item \label{item:point} \emph{Point}: $P(\vxx) \triangleq \cbrace{\vxx}$, where $\vxx \in \Real{3}$ is a 3D point;
\item \label{item:line} \emph{Line}: $L(\vxx,\boldsymbol{v}) \triangleq \cbrace{\vxx + \alpha \boldsymbol{v}: \alpha \in \Real{}}$, where $\vxx \in \Real{3}$ is a point on the line, and $\boldsymbol{v} \in \usphere{2}$ is the unit direction;\footnote{$\usphere{n-1} \triangleq \cbrace{\boldsymbol{v} \in \Real{n}: \norm{\boldsymbol{v}} = 1}$ is the set of $n$-D unit vectors.}
\item \label{item:plane} \emph{Plane}: $H(\vxx,\boldsymbol{n})\triangleq \cbrace{\boldsymbol{y} \in \Real{3}: \boldsymbol{n}^{\mathsf{T}} (\boldsymbol{y} - \vxx) = 0}$, where $\vxx \in \Real{3}$ is a point on the plane, and $\boldsymbol{n} \in \usphere{2}$ is the unit normal that is perpendicular to the plane;
\item \label{item:sphere} \emph{Sphere}: $S(\vxx,r) \triangleq \{\boldsymbol{y} \in \Real{3}: \norm{\boldsymbol{y} - \vxx}^2 = r^2 \}$, where $\vxx \in \Real{3}$ is the center, and $r>0$ is the radius;
\item \label{item:cylinder} \emph{Cylinder}: $C(\vxx,\boldsymbol{v},r) \triangleq \{\boldsymbol{y} \in \Real{3}:\mathbf{dist}(\boldsymbol{y},L(\vxx,\boldsymbol{v})) = r\}$, where $L(\vxx,\boldsymbol{v})$ (defined in~\ref{item:line}) is the central axis of the cylinder, $r>0$ is the radius, and $\mathbf{dist}(\boldsymbol{y},L)$ is the orthogonal distance from point $\boldsymbol{y}$ to line $L$;
\item \label{item:cone} \emph{Cone}: $K(\vxx,\boldsymbol{v},\theta)\!\triangleq\!\{\boldsymbol{y}\!\in\!\Real{3}:\!\boldsymbol{v}^{\mathsf{T}} (\boldsymbol{y} - \vxx)\!=\!\cos\theta\!\norm{\boldsymbol{y}\!-\!\vxx}\}$, where $\vxx \in \Real{3}$ is the apex, $\boldsymbol{v} \in \usphere{2}$ is the unit direction of the central axis pointing inside the cone, and $\theta \in (0,\frac{\pi}{2})$ is the half angle;
\item \label{item:ellipsoid} \emph{Ellipsoid}: $E(\vxx,\!\M{A})\!\!\triangleq\!\!\cbrace{\boldsymbol{y}\!\in\!\Real{3}\!:\!\!(\boldsymbol{y}\!-\!\vxx)^{\mathsf{T}} \M{A} (\boldsymbol{y}\!-\!\vxx)\!\leq \!1}$, where $\vxx \in \Real{3}$ is the center, and $\M{A} \in \pd{3}$ is a positive definite matrix defining the principal axes.\footnote{${\cal S}^n, {\cal S}_{+}^n, {\cal S}_{++}^n$ denote the set of real $n \times n$ symmetric, positive semidefinite, and positive definite matrices, respectively.}
\end{enumerate}
Problem~\eqref{eq:primitivealignment}, when specialized to the primitives~\ref{item:point}-\ref{item:ellipsoid}, includes a broad class of fundamental perception problems concerning \emph{pose estimation} from visual measurements, and finds extensive applications to object detection and localization~\cite{Kneip2014ECCV-UPnP,Peng19CVPR-PVNet}, motion estimation and 3D reconstruction~\cite{Yang20tro-teaser,Yang20neurips-certifiablePerception}, and simultaneous localization and mapping~\cite{Cadena16tro-SLAMsurvey,Yang20ral-GNC,Rosinol20icra-Kimera}.
In this paper, we consider five examples of problem~\eqref{eq:primitivealignment}, with graphical illustrations given in Fig.~\ref{fig:all-apps}. Note that we restrict ourselves to the case when all correspondences $X_i \leftrightarrow Y_i,i=1,\dots,N$, are \emph{known and correct}, for two reasons: (i) there are general-purpose algorithmic frameworks, such as \scenario{RANSAC}~\cite{Fischler81} and \scenario{GNC}~\cite{Yang20ral-GNC,Antonante20arxiv-outlierRobustEstimation} that re-gain robustness to incorrect correspondences (\emph{i.e.},~\emph{outliers}) once we have efficient solvers for the outlier-free problem~\eqref{eq:primitivealignment}; (ii) even when all correspondences are correct, problem~\eqref{eq:primitivealignment} can be difficult to solve due to the non-convexity of the feasible set $\ensuremath{\mathrm{SE}(3)}\xspace$.
\begin{example}[Point Cloud Registration~\cite{Horn87josa,Yang19rss-teaser}]
\label{ex:pointcloudregistration}
Let $X_i = P(\vxx_i)$ and $Y_i = P(\boldsymbol{y}_i)$ in problem~\eqref{eq:primitivealignment}, with $\vxx_i,\boldsymbol{y}_i \in \Real{3}$, point cloud registration seeks the best rigid transformation to align two sets of 3D points.
\end{example}
Fig.~\ref{fig:all-apps}(a) shows an instance of point cloud registration using the \scenario{Bunny} dataset~\cite{Curless96siggraph}, with bold blue and red dots being the \emph{keypoints} $P(\vxx_i)$ and $P(\boldsymbol{y}_i)$, respectively. Point cloud registration commonly appears when one needs to align two or more Lidar or RGB-D scans acquired at different space and time~\cite{Yang20tro-teaser}, and in practice either hand-crafted~\cite{Rusu09icra-fast3Dkeypoints} or deep-learned~\cite{Choy19iccv-FCGF,Gojcic19cvpr-3Dsmoothnet,Yang21cvpr-SGP} feature descriptors are adopted to generate point-to-point correspondences.
However, in many cases it is challenging to obtain (in run time), or annotate (in training time), point-to-point correspondences (\emph{e.g.},,~it is much easier to tell a point lies on a plane than to precisely localize where it lies on the plane as in Fig.~\ref{fig:all-apps}(b)). Moreover, it is well known that correspondences such as point-to-line and point-to-plane ones can lead to better convergence in algorithms such as \scenario{ICP}~\cite{Besl92pami}. Recently, a growing body of research seeks to represent and approximate complicated 3D shapes using simple primitives such as cubes, cones, cylinders etc.~to gain efficiency in storage and capability in assigning semantic meanings to different parts of a 3D shape~\cite{Tulsiani17cvpr-shapeabstract,Genova19iccv-shapetemplate,li19cvpr-primitiveFitting}. These factors motivate the following primitive registration problem.
\begin{example}[Primitive Registration~\cite{Briales17cvpr-registration,li19cvpr-primitiveFitting}]
\label{ex:primitiveRegistration}
Let $X_i=P(\vxx_i), \vxx \in \Real{3}$, be a 3D point, and let $Y_i$ be any type of primitives among~\ref{item:point}-\ref{item:ellipsoid} in problem~\eqref{eq:primitivealignment}, primitive registration seeks the best rigid transformation to align a set of 3D points to a set of 3D primitives.
\end{example}
Fig.~\ref{fig:all-apps}(b) shows an example where a semantically meaningful robot model is compactly represented as a collection of planes, cylinders, spheres and cones, while a noisy point cloud observation is aligned to it by solving problem~\eqref{eq:primitivealignment}.
Both Examples~\ref{ex:pointcloudregistration} and~\ref{ex:primitiveRegistration} require a known 3D model, either in the form of a clean point cloud or a collection of fixed primitives, which can be quite restricted. For example, in Fig.~\ref{fig:all-apps}(c), imagine a robot has seen multiple \emph{instances} of a chair and only stored a \emph{deformable} model (shown in red) of the category ``\emph{chair}'' in the form of a collection of \emph{semantic uncertainty ellipsoids} (SUE), where the center of each ellipsoid keeps the \emph{average} location of a semantic keypoint (\emph{e.g.},,~legs of a chair) while the orientation and size of the ellipsoid represent \emph{intra-class variations} of that keypoint within the category (see Supplementary Material~for details about how SUEs~are computed from data). Now the robot sees an instance of a chair (shown in blue) that either it has never seen before, or it has seen but does not have access to a precise 3D model, and has to estimate the pose of the instance w.r.t.\xspace~itself. In this situation, we formulate a \emph{category-level 3D registration} using SUEs.
\begin{example}[Category Registration~\cite{Manuelli19isrr-kpam,Chabot17cvpr-deepManta,Shi21rss-pace}]
\label{ex:categoryregistration}
Let $X_i = P(\vxx_i), \vxx_i \in \Real{3}$, be a 3D point, and $Y_i = E(\boldsymbol{y}_i,\M{A}_i), \boldsymbol{y}_i \in \Real{3},\M{A}_i \in \pd{3}$, be a SUE~of a semantic keypoint, category registration seeks the best rigid transformation to align a point cloud to a set of category-level semantic keypoints.
\end{example}
The above three Examples~\ref{ex:pointcloudregistration}-\ref{ex:categoryregistration} demonstrate the flexibility of problem~\eqref{eq:primitivealignment} in modeling pose estimation problems given 3D-3D correspondences. The next two examples show that pose estimation given 2D-3D correspondences (\emph{i.e.},,~\emph{absolute pose estimation} (APE) or \emph{perspective-$n$-points} (PnP)) can also be formulated in the form of problem~\eqref{eq:primitivealignment}. The crux is the insight that a 2D image keypoint is uniquely determined (assume camera intrinsics are known) by a so-called \emph{bearing vector} that originates from the camera center and goes through the 2D keypoint on the imaging plane (\emph{cf.}\xspace~Fig.~\ref{fig:all-apps}(d))~\cite{Hartley04book-multiviewgeometry}.\footnote{Similarly, a 2D line on the imaging plane can be uniquely determined by a 3D plane containing two bearing vectors that intersects two 2D points on the imaging plane. Therefore, problem~\eqref{eq:primitivealignment} can also accommodate point-to-line correspondences commonly seen in the literature of perspective-$n$-points-and-lines (PnPL)~\cite{Agostinho2019arXiv-cvxpnpl,Liu20ral-BnBPnL}.} Consequently, APE can be formulated as aligning the 3D model to a set of 3D bearing vectors.
\begin{example}[Absolute Pose Estimation~\cite{Kneip2014ECCV-UPnP,Agostinho2019arXiv-cvxpnpl}]
\label{ex:absolutepose}
Let $X_i = P(\vxx_i), \vxx_i \in \Real{3}$, be a 3D point, and $Y_i = L({\mathbf 0},\boldsymbol{v}_i)$, $\boldsymbol{v}_i \in \usphere{2}$, be the bearing vector of a 2D keypoint (the camera center is ${\mathbf 0} \in \Real{3}$), APE seeks to find the best rigid transformation to align a 3D point cloud to a set of bearing vectors.
\end{example}
Fig.~\ref{fig:all-apps}(d) shows an example of aligning a satellite wireframe model to a set of 2D keypoint detections. Similarly, by allowing the 3D model to be a collection of SUEs, we can generalize Example~\ref{ex:absolutepose} to category-level APE.
\begin{example}[Category Absolute Pose Estimation~\cite{Yang20cvpr-shapeStar,Lin14eccv-modelFitting}]
\label{ex:categoryabsolutepose}
Let $X_i = E(\vxx_i,\M{A}_i)$, $\vxx_i \in \Real{3}, \M{A}_i \in \pd{3}$, be a SUE~of a category-level semantic keypoint, and $Y_i = L({\mathbf 0},\boldsymbol{v}_i)$, $\boldsymbol{v}_i \in \usphere{2}$, be the bearing vector of a 2D keypoint, category APE seeks to find the best rigid transformation to align a 3D category to the 2D keypoints of an instance.
\end{example}
Fig.~\ref{fig:all-apps}(e) shows an example of estimating the pose of a car using a category-level collection of SUEs. Strictly speaking, Example~\ref{ex:primitiveRegistration} contains Examples~\ref{ex:pointcloudregistration}, \ref{ex:categoryregistration} and~\ref{ex:absolutepose}, but we separate them because they have different applications.
{\bf Related Work}. To the best of our knowledge, this is the first time that the five seemingly different examples are formulated under the same framework. We shall briefly discuss existing methods for solving them. Point cloud registration (Example~\ref{ex:pointcloudregistration}) can be solved in closed form using singular value decomposition~\cite{Horn87josa,Arun87pami}. A comprehensive review of recent advances in point cloud registration, especially on dealing with outliers, can be found in~\cite{Yang20tro-teaser}. The other four examples, however, do not admit closed-form solutions. Primitive registration (Example~\ref{ex:primitiveRegistration}) in the case of point-to-point, point-to-line and point-to-plane correspondences (referred to as \emph{mesh registration}~\cite{Yang20neurips-certifiablePerception}) can be solved globally using branch-and-bound~\cite{Olsson09pami-bnbRegistration} and semidefinite relaxations~\cite{Briales17cvpr-registration}, hence, is relatively slow. Further, there are no solvers that can solve primitive registration including point-to-sphere, point-to-cylinder and point-to-cone correspondences with global optimality guarantees. The absolute pose estimation problem (Example~\ref{ex:absolutepose}) has been a major line of research in computer vision, and there are several global solvers based on Grobner bases~\cite{Kneip2014ECCV-UPnP} and convex relaxations~\cite{Agostinho2019arXiv-cvxpnpl,Schweighofer2008bmvc-SOSforPnP}. For category-level registration and APE (Example~\ref{ex:categoryregistration} and~\ref{ex:categoryabsolutepose}), most existing methods formulate them as simultaneously estimating the \emph{shape coefficients} and the camera pose,~\emph{i.e.},,~they treat the unknown instance model as a \emph{linear combination} of category templates (known as the \emph{active shape model}~\cite{Cootes95cviu}) and seek to estimate the linear coefficients as well as the camera pose. Works in~\cite{Gu06cvpr-faceAlignment,Ramakrishna12eccv-humanPose,Lin14eccv-modelFitting} solve the joint optimization by alternating the estimation of the shape coefficients and the estimation of the camera pose, thus requiring a good initial guess for convergence. Zhou~\emph{et~al.}\xspace~\cite{Zhou15cvpr,Zhou17pami-shapeEstimationConvex} developed a convex relaxation technique to solve category APE with a \emph{weak perspective} camera model and showed efficient and accurate results. Yang and Carlone~\cite{Yang20cvpr-shapeStar} later showed that the convex relaxation in~\cite{Zhou15cvpr,Zhou17pami-shapeEstimationConvex} is less tight than the one they developed based on sums-of-squares (SOS) relaxations. However, the SOS relaxation in~\cite{Yang20cvpr-shapeStar} leads to large semidefinite programs (SDP) that cannot be solved efficiently at present time. Very recently, with the advent of machine learning, many researchers resort to deep networks that regress the 3D shape and the camera pose directly from 2D images~\cite{Chabot17cvpr-deepManta,Kolotouros19iccv-humanlearnplusmodel,Tatarchenko19CVPR-singleViewReconLimitation}. We refer the interested reader to~\cite{Tatarchenko19CVPR-singleViewReconLimitation,Kolotouros19iccv-humanlearnplusmodel,Ke20eccv-gsnet,Kundu18cvpr-3dRCNN} and references therein for details of this line of research.
{\bf Contribution}. Our first contribution, as described in the previous paragraphs, is to \emph{unify} five pose estimation problems under the general framework of aligning two sets of geometric primitives. While such proposition has been presented in~\cite{Briales17cvpr-registration,Olsson09pami-bnbRegistration} for point-to-point, point-to-line and point-to-plane correspondences, generalizing it to a broader class of primitives such as cylinders, cones, spheres, and ellipsoids, and showing its modeling capability in category-level registration (using the idea of SUEs) and pose estimation given 2D-3D correspondences has never been done. Our second contribution is to develop a simple, general, intuitive, yet effective and efficient framework to solve all five examples by simulating \emph{rigid body dynamics}. As we will detail in Section~\ref{sec:DAMP}, the general formulation~\eqref{eq:primitivealignment} allows us to model $\mathcal{Y}$ as a \emph{fixed} rigid body and ${\cal X}$ as a \emph{moving} rigid body with $\M{T}$ representing the relative pose of ${\cal X}$ w.r.t.\xspace~$\mathcal{Y}$. We then place \emph{virtual} springs between points in $X_i$ and $Y_i$ that attain the shortest distance $\mathbf{dist}(\M{T}\otimes X_i, Y_i)$ given $\M{T}$. The virtual springs naturally exert forces under which ${\cal X}$ is pulled towards $\mathcal{Y}$ with motion governed by Newton-Euler rigid body dynamics, and moreover, the \emph{potential energy} of the dynamical system coincides with the objective function of problem~\eqref{eq:primitivealignment}. By assuming ${\cal X}$ moves in an environment with constant damping, the dynamical system will eventually arrive at an \emph{equilibrium} point, from which a solution to problem~\eqref{eq:primitivealignment} can be obtained. Our construction of such a dynamical system is inspired by recent work on physics-based registration~\cite{Golyanik16CVPR-gravitationalRegistration,Golyanik19ICCV-acceleratedGravitational,Jauer18PAMI-physicsBasedRegistration}, but goes much beyond them in showing that simulating dynamics can solve broader and more challenging pose estimation problems other than just point cloud registration. We name our approach \emph{DynAMical Pose estimation} (\scenario{DAMP}), which we hope to stimulate the connection between computer vision and dynamical systems. We evaluate \scenario{DAMP}~on both simulated and real datasets (Section~\ref{sec:experiments}) and demonstrate (i) \scenario{DAMP} always returns the \emph{globally optimal} solution to Examples~\ref{ex:pointcloudregistration}-\ref{ex:categoryregistration} with 3D-3D correspondences; (ii) although \scenario{DAMP} converges to suboptimal solutions given 2D-3D correspondences (Examples~\ref{ex:absolutepose}-\ref{ex:categoryabsolutepose}) with very low probability ($<1\%$), using a simple scheme for escaping local minima, \scenario{DAMP} almost always succeeds. Our last contribution (Section~\ref{sec:convergence}) is to (partially) demystify the surprisingly good empirical performance of \scenario{DAMP} and prove a nontrivial global convergence result in the case of point cloud registration, by charactering the local stability of equilibrium points. Extending the analysis to other examples remains open.
\section{Geometry and Dynamics}
\label{sec:preliminary}
In this section, we present two key results underpinning the \scenario{DAMP} algorithm. One is geometric and concerns computing the shortest distance between two geometric primitives, the other is dynamical and concerns simulating Newton-Euler dynamics of an $N$-primitive system.
\subsection{Geometry}
In view of Black-Box Optimization~\cite{Nesterov18book-convexOptimization}, the question that needs to be answered before solving problem~\eqref{eq:primitivealignment} is to \emph{evaluate} the cost function at a given $\M{T} \in \ensuremath{\mathrm{SE}(3)}\xspace$, because the $\mathbf{dist}(X,Y)$ function is itself a minimization. Although in the simplest case of point cloud registration, $\mathbf{dist}(X,Y) = \norm{\vxx-\boldsymbol{y}}$ can be written analytically, the following theorem states that in general $\mathbf{dist}(\cdot,\cdot)$ may require nontrivial computation.
\begin{theorem}[Shortest Distance Pair]
\label{thm:shortestdistance}
Let $X$ and $Y$ be two primitives of types~\ref{item:point}-\ref{item:ellipsoid}, define
$\ensuremath{\mathrm{pair}}{X,Y}$ as the set of points that attain the shortest distance between $X$ and $Y$,~\emph{i.e.},,
\begin{eqnarray}
\ensuremath{\mathrm{pair}}{X,Y}\triangleq\argmin_{(\vxx,\boldsymbol{y}) \in X \times Y} \norm{\vxx - \boldsymbol{y}}.\label{eq:mindist}
\end{eqnarray}
In the following cases, $\ensuremath{\mathrm{pair}}{X,Y}$ (and hence $\mathbf{dist}(X,Y)$) can be computed either analytically or numerically.
\begin{enumerate}\itemsep-0.2em
\item \label{thm:point-point} Point-Point (\ensuremath{\mathrm{PP}}), $X=P(\vxx)$, $Y=P(\boldsymbol{y})$:
\begin{eqnarray}
\ensuremath{\mathrm{pair}}{X,Y} = \{(\vxx,\boldsymbol{y})\}.
\end{eqnarray}
\item \label{thm:point-line} Point-Line (\ensuremath{\mathrm{PL}}), $X=P(\vxx)$, $Y=L(\boldsymbol{y},\boldsymbol{v})$:
\begin{eqnarray}
\ensuremath{\mathrm{pair}}{X,Y} = \{ (\vxx,\boldsymbol{y}+\alpha\boldsymbol{v}): \alpha = \boldsymbol{v}^{\mathsf{T}}(\vxx - \boldsymbol{y})\},
\end{eqnarray}
where $\boldsymbol{y} + \alpha\boldsymbol{v}$ is the projection of $\vxx$ onto the line.
\item \label{thm:point-plane} Point-Plane (\ensuremath{\mathrm{PH}}), $X=P(\vxx)$, $Y=H(\boldsymbol{y},\boldsymbol{n})$:
\begin{eqnarray}
\ensuremath{\mathrm{pair}}{X,Y} = \{ (\vxx,\vxx+\alpha\boldsymbol{n}): \alpha = \boldsymbol{n}^{\mathsf{T}}(\boldsymbol{y} - \vxx) \},
\end{eqnarray}
where $\vxx+\alpha\boldsymbol{n}$ is the projection of $\vxx$ onto the plane.
\item \label{thm:point-sphere} Point-Sphere (\ensuremath{\mathrm{PS}}), $X = P(\vxx)$, $Y=S(\boldsymbol{y},r)$:
\begin{eqnarray}
\hspace{-2mm} \ensuremath{\mathrm{pair}}{X,Y}\!=\!\begin{cases}
\{(\vxx,\boldsymbol{z}): \boldsymbol{z} \in S(\boldsymbol{y},r) \} &\!\!\!\! \text{if } \vxx = \boldsymbol{y} \\
\{(\vxx, \boldsymbol{y} + r \boldsymbol{v}): \boldsymbol{v} = \frac{\vxx - \boldsymbol{y}}{\norm{\vxx - \boldsymbol{y}}}\} &\!\!\!\! \text{otherwise}
\end{cases}\!,\!\!\!\!
\end{eqnarray}
where if $\vxx$ coincides with the center of the sphere, then the entire sphere achieves the shortest distance, while otherwise $\boldsymbol{y} + r\boldsymbol{v}$, the projection of $\vxx$ onto the sphere, achieves the shortest distance.
\item \label{thm:point-cylinder} Point-Cylinder (\ensuremath{\mathrm{PC}}), $X = P(\vxx)$, $Y=C(\boldsymbol{y},\boldsymbol{v},r)$:
\begin{eqnarray}
\ensuremath{\mathrm{pair}}{X,Y}\!=\!\begin{cases}
\{(\vxx,\hat{\vy}+r\boldsymbol{u}): \boldsymbol{u} \in \usphere{2},\boldsymbol{u} \perp \boldsymbol{v} \} & \!\!\!\!\text{if } \vxx = \hat{\vy} \\
\{(\vxx,\hat{\vy}+r \frac{\vxx - \hat{\vy}}{\norm{\vxx - \hat{\vy}}}) \} &\!\!\!\!\text{otherwise}
\end{cases}\!\!,\!\!\!\!
\end{eqnarray}
where $\hat{\vy}\triangleq \boldsymbol{y} + \alpha \boldsymbol{v},\alpha = \boldsymbol{v}^{\mathsf{T}}(\vxx-\boldsymbol{y})$, is the projection of $\vxx$ onto the central axis $L(\boldsymbol{y},\boldsymbol{v})$. If $\vxx$ lies on the central axis, then any point on the circle that passes through $\vxx$ and is orthogonal to $\boldsymbol{v}$ achieves the shortest distance, otherwise, the projection of $\vxx - \hat{\vy}$ onto the cylinder achieves the shortest distance.
\item \label{thm:point-cone} Point-Cone (\ensuremath{\mathrm{PK}}), $X = P(\vxx)$, $Y=K(\boldsymbol{y},\boldsymbol{v},\theta)$:
\begin{eqnarray}
\hspace{-8mm} \ensuremath{\mathrm{pair}}{X,Y}\!\!=\!\!\begin{cases}
\!\{ (\vxx,\boldsymbol{y}) \} &\!\!\!\hspace{-20mm}\text{if } \boldsymbol{v}^{\mathsf{T}}\vxx_y \leq - \norm{\vxx_y}\sin\theta\\
\!\{(\vxx,\boldsymbol{y} + \norm{\vxx_y}\cos\theta \boldsymbol{u}) :\substack{\boldsymbol{u} \in \usphere{2}, \\ \boldsymbol{u}^{\mathsf{T}}\boldsymbol{v} = \cos\theta} \} &\!\!\!\text{if } \frac{\vxx_y}{\norm{\vxx_y}} = \boldsymbol{v} \\
\!\{(\vxx,\boldsymbol{y}+\alpha\boldsymbol{w}): \alpha = \boldsymbol{w}^{\mathsf{T}}\vxx_y \} &\!\!\!\text{otherwise}
\end{cases}\!\!,\!\!\!\!
\end{eqnarray}
where $\vxx_y \triangleq \vxx - \boldsymbol{y}$, $\boldsymbol{w} \triangleq \M{R}_\theta \boldsymbol{v}$, with $\M{R}_\theta \in \ensuremath{\mathrm{SO}(3)}\xspace$ being the 3D rotation matrix of axis $\boldsymbol{v} \times \frac{\vxx_y}{\norm{\vxx_y}}$ and angle $\theta$.\footnote{$\va \times \boldsymbol{b}$ denotes the cross product of $\va,\boldsymbol{b} \in \Real{3}$. Given an axis-angle representation $(\boldsymbol{v},\theta)$ of a 3D rotation, the rotation matrix can be computed as $\M{R} = \cos\theta {\mathbf I}_3 + \sin\theta \hatmap{\boldsymbol{v}} + (1-\cos\theta)\boldsymbol{v}\vv^{\mathsf{T}}$, where $\hatmap{\boldsymbol{v}}$ is the skew-symmetric matrix associated with $\boldsymbol{v}$ such that $\boldsymbol{v} \times \va \equiv \hatmap{\boldsymbol{v}}\va$~\cite{Yang19iccv-QUASAR}.} The first condition $\boldsymbol{v}^{\mathsf{T}}\vxx_y \leq - \norm{\vxx_y}\sin\theta$ corresponds to $\vxx$ in the dual cone of $K$ and the apex $\boldsymbol{y}$ achieves the shortest distance. The second condition corresponds to $\vxx$ lies on the central axis and inside the cone, in which case an entire circle on the surface of the cone achieves the shortest distance. Under the last condition, a unique projection of $\vxx$ onto (an extreme ray of) the cone achieves the shortest distance.
\item \label{thm:point-ellipsoid} Point-Ellipsoid (\ensuremath{\mathrm{PE}}), $X = P(\vxx)$, $Y=E(\boldsymbol{y},\M{A})$:
\begin{eqnarray}
\hspace{-8mm} \ensuremath{\mathrm{pair}}{X,Y}\!=\!\begin{cases}
\!\{(\vxx,\vxx)\} & \!\!\!\!\text{if } \vxx \in E \\
\!\{(\vxx,(\lambda \M{A} + {\mathbf I})^{-1}\vxx_y + \boldsymbol{y}):\substack{g(\lambda)=0,\\\lambda>0}\} & \!\!\!\! \text{otherwise}
\end{cases}\!\!,\!\!
\end{eqnarray}
where $\vxx_y \triangleq \vxx - \boldsymbol{y}$, and $g(\lambda)$ is a univariate function whose expression is given in Supplementary Material.
If $\vxx$ belongs to the ellipsoid, then the shortest distance is zero. Otherwise, there is a unique point on the surface of the ellipsoid that achieves the shortest distance, obtained by finding the root of the function $g(\lambda)$.
\item \label{thm:ellipsoid-line} Ellipsoid-Line (\ensuremath{\mathrm{EL}}), $X = E(\vxx,\M{A})$, $Y=L(\boldsymbol{y},\boldsymbol{v})$:
\begin{eqnarray}
\hspace{-8mm} \ensuremath{\mathrm{pair}}{X,Y}\!=\!\begin{cases}
\!\{(\boldsymbol{y}+\alpha\boldsymbol{v},\boldsymbol{y}+\alpha\boldsymbol{v}): \alpha \in [\alpha_1,\alpha_2]\} &\!\!\!\! \text{if } \Delta \geq 0 \\
\!\{(\vzz(\lambda),\boldsymbol{y}+\alpha(\lambda)\boldsymbol{v}):\substack{g(\lambda) = 0,\\\lambda > 0}\}&\!\!\!\! \text{otherwise}
\end{cases}\!\!,\!\!
\end{eqnarray}
where $\boldsymbol{y}_x\triangleq \boldsymbol{y} - \vxx$,
and the expressions of $\Delta,\alpha_{1,2},\boldsymbol{z}(\lambda),\alpha(\lambda),g(\lambda)$ are given in Supplementary Material.
Intuitively, the discriminant $\Delta$ decides when the line intersects with the ellipsoid. If there is nonempty intersection, then an entire line segment (determined by $\alpha_{1,2}$) achieves shortest distance zero. Otherwise, the unique shortest distance pair can be obtained by first finding the root $\lambda$ of a univariate function $g(\lambda)$ and then substituting $\lambda$ into $\boldsymbol{z}(\lambda)$ and $\alpha(\lambda)$.
\end{enumerate}
\end{theorem}
A detailed proof of Theorem~\ref{thm:shortestdistance} is in Supplementary Material, with numerical methods for finding roots of $g(\lambda)$.
\begin{remark}[Distance] The $\mathbf{dist}(\cdot,\cdot)$ function defined in \eqref{eq:mindist} is inherited from convex analysis \cite{dax06LAA-distance} and is appropriate for problems in this paper. However, it can be ill-defined for, \emph{e.g.},, aligning a pyramid to a sphere. A potentially better distance function would be the \emph{Hausdorff distance} \cite{rockafellar09bookvariational}, but it is much more complicated to compute.
\end{remark}
\subsection{$N$-Primitive Rigid Body Dynamics}
\input{fig-rigid-body-dynamics}
In this paper we consider a rigid body consisting of $N$ primitives $\{X_i\}_{i=1}^N$ moving in an environment with constant damping coefficient $\mu > 0$, and each primitive $X_i$ has a \emph{pointed} mass located at $\vxx_i \in \Real{3}$ w.r.t.\xspace a \emph{global} coordinate frame (Fig.~\ref{fig:rigid-body-dynamics}). Assume there is an external force $\boldsymbol{f}_i \in \Real{3}$ acting on each primitive at location $\underline{\vxx}_i \in \Real{3}, i=1,\dots,N$. Note that we do not restrict $\vxx_i = \underline{\vxx}_i$,~\emph{i.e.},~the external force is not required to act at the location of the pointed mass. For example, when $X_i$ is an ellipsoid, $\vxx_i$ is the center of the ellipsoid, but $\underline{\vxx}_i$ can be any point on the surface of or inside the ellipsoid (\emph{cf.}\xspace~Fig.~\ref{fig:rigid-body-dynamics}). We assume each primitive has equal mass $m_i = m,i=1,\dots,N$, such that the \emph{center of mass} of the $N$-primitive system is at $\bar{\vxx} \triangleq \frac{1}{N} \sum_{i=1}^N \vxx_i$ (in the global frame). The next proposition states the system of equations governing the motion of the $N$-primitive system.
\begin{proposition}[$N$-Primitive Dynamics]
\label{prop:primitivedynamics}
Let $\boldsymbol{s}(t) \triangleq [\vxx_{\mathrm{c}}^{\mathsf{T}},\boldsymbol{q}^{\mathsf{T}},\vv_{\mathrm{c}}^{\mathsf{T}},\boldsymbol{\omega}^{\mathsf{T}}]^{\mathsf{T}} \in \Real{13}$ be the state space of the $N$-primitive rigid body in Fig.~\ref{fig:rigid-body-dynamics}, where $\vxx_{\mathrm{c}}\in \Real{3}$ denotes the position of the center of mass in the global coordinate frame, $\boldsymbol{q} \in \usphere{3}$ denotes the unit quaternion representing the rotation from the body frame to the global frame, $\vv_{\mathrm{c}} \in \Real{3}$ denotes the translational velocity of the center of mass, and $\boldsymbol{\omega} \in \Real{3}$ denotes the angular velocity of the rigid body w.r.t.\xspace the center of mass. At $t=0$, assume
\begin{eqnarray} \label{eq:initialState}
\vxx_{\mathrm{c}}(0) = \bar{\vxx}, \ \boldsymbol{q}(0) = [0,0,0,1]^{\mathsf{T}}, \ \vv_{\mathrm{c}}(0) = {\mathbf 0}, \ \boldsymbol{\omega}(0) = {\mathbf 0},
\end{eqnarray}
so that the body frame coincides with the global frame ($\boldsymbol{q}(0)$ is the identity rotation). Call
$\xref{i} \triangleq \vxx_i - \bar{\vxx}$
the relative position of $\vxx_i$ w.r.t.\xspace the center of mass expressed in the body frame (a constant value w.r.t.\xspace time),
then under the external forces $\boldsymbol{f}_i$ acted at locations $\underline{\vxx}_i$, expressed in global frame, the equations of motion of the dynamical system are
\begin{eqnarray}
\hspace{-4mm} \dot{\state}(t) = {\cal F}(\boldsymbol{s}; \boldsymbol{f}_i, \underline{\vxx}_i,\mu) =
\begin{cases}
\dot{\vxx}_{\mathrm{c}} = \vv_{\mathrm{c}} \\
\dot{\vq} = \frac{1}{2} \boldsymbol{q} \odot \tilde{\vomega} \\
\dot{\vv}_{\mathrm{c}} := \va_{\mathrm{c}} = \frac{1}{M} \boldsymbol{f} \\
\dot{\vomega} := \boldsymbol{\alpha} = \M{J}^{-1}(\boldsymbol{\tau} - \boldsymbol{\omega} \times \M{J} \boldsymbol{\omega})
\end{cases}\!\!\!\!\!\!\!,\!\! \label{eq:Nprimitivedynamics}
\end{eqnarray}
where $\tilde{\vomega} \triangleq [\boldsymbol{\omega}^{\mathsf{T}},0]^{\mathsf{T}} \in \Real{4}$ is the homogenization of $\boldsymbol{\omega}$, ``$\odot$'' denotes the quaternion product~\cite{Yang19iccv-QUASAR},
$M \triangleq N m$ is the total mass of the system, $\boldsymbol{f}$ is the total external force
\begin{eqnarray}
\boldsymbol{f} = \sum_{i=1}^N \overbrace{\boldsymbol{f}_i - \mu m (\vv_{\mathrm{c}} + \M{R}_q ( \boldsymbol{\omega} \times \xref{i} ) )}^{:=\boldsymbol{f}_i'}, \label{eq:totalforce}
\end{eqnarray}
with $\M{R}_q \in \ensuremath{\mathrm{SO}(3)}\xspace$ being the unique rotation matrix associated with the quaternion $\boldsymbol{q}$, $\M{J}$ is the moment of inertia $\M{J} \triangleq - m \sum_{i=1}^N \hatmap{\xref{i}}^2 \in \pd{3}$
expressed in the body frame, and $\boldsymbol{\tau}$ is the total torque
\begin{eqnarray}
\boldsymbol{\tau} = \sum_{i=1}^N \M{R}_q^{\mathsf{T}} (\underline{\vxx}_i - \vxx_{\mathrm{c}})\times (\M{R}_q^{\mathsf{T}} \boldsymbol{f}_i' ), \label{eq:totaltorque}
\end{eqnarray}
in the body frame ($\M{R}_q^{\mathsf{T}}$ rotates vectors to body frame).
\end{proposition}
The proof of Proposition~\ref{prop:primitivedynamics} follows directly from~\cite{baraff97siggraph-rigidbody}.
\begin{remark}[Unbounded Primitives] In this paper, it suffices to consider bounded primitives (ellipsoids, points) in the $N$-primitive system. For an unbounded primitive (\emph{e.g.},, lines, planes), it remains open how to distribute its mass. A simple idea is to place all its mass $m_i$ at the point of contact $\underline{\vxx}_i$.
\end{remark}
|
\section*{Introduction}
\label{Intro}
Information processing in today's computers is done almost exclusively by charges (electric currents). Photons, albeit they are ideal for information transmission, never became a mainstream technology for computing. Despite their numerous advantages, photonic devices have practical limitations: they are challenging to integrate on-chip and optical wavelengths (about a micrometer) are huge compared to nanoscale devices, limiting the scalability of any photonic interference-based device.
Spin waves (aka magnons) are wave-like excitations in ferromagnetic (and ferrimagnetic) materials that travel via coupling between precessing magnetic moments. Their wavelength can be adjusted in a wide range (from several micrometers down to potentially nanometer scale), and they have an electronics-friendly frequency range (1-100 GHz) \cite{ref:persp}. This makes spin waves attractive for on-chip applications, especially in wave-based microwave signal processing. They also interact with each other (scatter), and the resulting nonlinearity may enable general-purpose computation. Spin waves exist only in magnetic media and one needs high-quality materials to achieve ideal conditions for propagation and also carefully designed waveguide structures to launch (and pick up) the waves. It has only recently become possible to demonstrate short-wavelength, long-distance propagation \cite{ref:mingzhong, ref:grundler}, spin-wave equivalents of optical laws \cite{ref:snell} or larger-scale refractive devices using local heating \cite{ref:freymann}. Spin-wave variants of complex optical devices are within reach of experimental demonstrations \cite{ref:albisetti}.
A key element of such a spin-wave optics device is a source which launches coherent spin waves. In the simplest case, the source of spin waves can be a simple coplanar waveguide that is placed atop the magnetic film. For many device constructions, such a simple construction is insufficient. Microwave waveguides alone are fairly inefficient at short spin-wave wavelengths \cite{ref:giovanni} and they are limited to generation of plane wavefronts or curved wavefronts with relatively small curvature. For generation of short-wavelength spin waves or non-planar wavefronts, lithographically patterning the edge of the magnetic film is desirable. A periodically patterned edge can serve both as a wave source and a diffracting element.
The focus of the present paper is the experimental study of such a patterned edge as a spin-wave launcher. We use Focused Ion Beam (FIB) irradiation to write a high-resolution concave grating pattern in an yttrium iron garnet (YIG) thin film. The grating is used in the Rowland spectrometer arrangement, which is frequently used in optical and X-ray spectroscopy \cite{ref:james}. This arrangement does not require a separate lens component, and thus it is ideal for waves with limited propagation length. We experimentally demonstrate that the edge of a FIB-irradiated pattern in YIG generates a coherent spin-wave wavefront. Using time-resolved Magneto Optical Kerr Effect (trMOKE) imaging we found that the diffraction patterns closely match those expected from theory and micromagnetic simulations. An unexpected discovery was that in our experiments spin waves were not primarily excited directly by the field of the waveguide. Instead, spin waves were generated indirectly by the dipole fields of high-amplitude, nonlinear, and long-wavelength standing waves that developed behind the grating in the unirradiated area. This process has a significantly higher efficiency of spin-wave generation at a distance from the waveguide. However, this quasi-homogeneous oscillation behind the grating only forms at a sufficiently high amplitude and only if a single frequency component is applied.
\section*{Spectral Decomposition with a Concave Diffraction Grating}
\label{sec:SAoperation}
The main component of the proposed device is a concave diffraction grating that acts both as a wave source and as a diffractor. The fabrication of such a grating requires sub-wavelength patterning resolution as the pitch of the grating has to be comparable to the spin-wave wavelength. We use the so-called Rowland arrangement, a detailed description is given in \cite{ref:scirep}. The device generates a spectral decomposition of a time-domain signal by converting temporal frequency components to spatially separated spin-wave intensity peaks. The layout of the fabricated device is shown in Fig. \ref{fig:sketch}. The microwave signal is converted to spin waves by a waveguide antenna. Each frequency component of the signal generates spin waves with corresponding wavelengths. Along the edge of the grating (FIB-irradiated region) the time-varying magnetic field is almost homogeneous, but due to the abrupt parameter change in YIG, every point along the edge acts as a wave source (also described in \cite{ref:kruglyak}). The curved grating not only diffracts different wavelengths to different directions, but also focuses the wavefronts. The drawing of Fig. \ref{fig:sketch}\textbf{b} shows the geometry to determine the diffraction pattern. With a concave grating of radius $R$ and ridge pitch $d$, the diffraction peaks (i.e. wavelength-dependent focal points) will form on a circle with radius $R/2$ drawn tangentially to the grating (Rowland circle). The $n^{th}$-order diffraction angle can be calculated as $\alpha = \arcsin{\left(\frac{n\lambda}{d}\right)}$, where $\lambda$ is the wavelength of the spin wave.
\begin{figure}[ht]
\includegraphics[width=0.99\textwidth]{figures/Sketch3.png}
\caption{ \textbf{a}) Sketch of the experimental setup, indicating the coplanar waveguide, the FIB irradiated grating, the trMOKE probing laser, and the spin-wave interference pattern. \textbf{b}) Geometry of the curved diffraction grating in the Rowland arrangement. The angle under which the first-order diffraction peak is seen from center of the grating is denoted by $\alpha$.}
\label{fig:sketch}
\end{figure}
In traditional optical or X-ray Rowland spectrometers the wave source is placed opposing the curved grating, which reflects the waves, acting as a secondary source. Such arrangement would be rather impractical for spin waves: the relatively long path between the source and the diffraction grating will cause much higher attenuation of spin waves. Thus, it is desirable that the grating and the source are in the same structure, i.e. the coherent spin-wave source itself is shaped as a curved diffraction grating. In this geometry, diffraction is caused by the phase difference between waves that originate from the bottom and the top of the ridges. This phase difference will also depend on the ratio of the ridge depth and the wavelength, which does not influence the diffraction angle, but it changes the relative amplitude between diffraction orders. In the designed structure the ridge depth also introduces an amplitude difference between waves that are generated on the top and the bottom of the ridge. The device is thus a combination of an amplitude grating and a phase grating.
We fabricated the designed device and recorded spin-wave interference patterns with trMOKE. The trMOKE images at three different excitation frequencies are shown in Fig. \ref{fig:trmoke}. Diffraction peaks are clearly observed close to the expected diffraction angles, as indicated by black lines. In case of the smallest wavelength the second-order peaks can also be observed ($\frac{2\lambda}{d} < 1$). We found that the peaks are not perfectly focused along the Rowland circle, but an arc can be fitted to the peaks that works well for all three wavelengths. We attribute this to the fact that our grating is much wider than conventional concave gratings ($180^\circ$ instead of a few degrees), and thus the approximations used in the derivation of the Rowland circle do not hold perfectly. This is confirmed by micromagnetic simulations, which also show that focal points are located on an arc with a slightly smaller curvature (see Fig.~\ref{fig:nonlinfmr}\textbf{c}). Another possible cause of deviations is the slight anisotropy of spin waves introduced by a tilt in the external bias field, which can not be fully eliminated in our current experimental setup.
\begin{figure}[ht]
\centering
\includegraphics[width=0.99\textwidth]{figures/RowlandTriple2.png}
\caption{Spin-wave interference patterns recorded by trMOKE at multiple excitation frequencies. In \textbf{a}-\textbf{c}) the FIB irradiated region (grating) is indicated by a semi-transparent red overlay (radius R=30\,$\mu$m, pitch d=12\,$\mu$m), the gray stripe represents the ground line of the CPW. The green circles are the theoretical Rowland circles with a radius R/2, while the radius of red arcs are fitted to the data. Black lines indicate expected diffraction angles, and white arrows point to focal points in the measured data. \textbf{d}-\textbf{f}) Spin-wave intensities extracted along the red arcs in \textbf{a}-\textbf{c}).}
\label{fig:trmoke}
\end{figure}
\section*{Generation Mechanism of Spin Waves by Nonlinear Resonance}
\label{sec:SWgeneration}
In most spin-wave devices, the magnetic field of the waveguide is directly responsible for launching the spin waves, as described in \cite{ref:scirep}. The relatively delocalized magnetic field of the waveguide and the localized demagnetizing field of the film edge jointly create a high, periodically changing torque and launch the spin waves \cite{ref:kruglyak}.
We found that in our device an indirect, nonlinear mechanism is dominant for spin-wave excitation. In the design of \cite{ref:scirep} all material in the YIG film is assumed to be removed behind the grating. However, our FIB method is performed as the final fabrication step, after the CPW is already in place. We did not irradiate the total area between the grating and the CPW, only a narrow region, which is wide enough to block spin waves at the designed wavelength to significantly couple through via dipole fields. However, at sufficiently large excitation amplitudes nonlinear effects cause the spin-wave wavelength to increase. This is due to the lowered OOP demagnetization-field component \cite{ref:nonlinear}. The wavelength at sufficiently large amplitudes becomes much larger than the distance between the CPW and the grating. The spin waves that are generated under the CPW reflect back from the back side of the grating, creating a standing-wave pattern. Since the wavelength is much larger than the size of the region between the CPW and the grating, this resembles a homogeneous resonance in that region. The trMOKE images of Fig. \ref{fig:trmoke}\textbf{a}-\textbf{c} already show the high-amplitude region on the left of the grating: it is observable that in this region the colormap is saturated and without apparent pattern, indicating large-amplitude, uniform precession.
The dipole field of the quasi-homogeneous resonant excitation reaches significantly farther than that of the short-wavelength spin waves, thus it can excite coherent spin waves on the ridges of the grating. This field is in fact much stronger than the magnetic field of the CPW, becoming the dominant effect for spin-wave generation on the grating edge.
Figure \ref{fig:ampdep} shows the spin-wave-generation process in more detail. At sufficiently small excitation power ($P_\mathrm{rf} = 0$\,dBm), linear spin waves are excited under the CPW. These small-amplitude, short-wavelength spin waves cannot significantly couple through the FIB-irradiated region. However, the Oersted field of the CPW is not sufficient to create spin waves at the grating edge, that could be detected by our trMOKE apparatus. In Fig. \ref{fig:ampdep}\textbf{b} ($P_\mathrm{rf} = 5$\,dBm) nonlinear behavior is observable behind the grating, but the nonlinear wavelength is not yet long enough to create uniform precession. One can observe a partial interference pattern on the right possibly due to larger uniform standing waves on the top. At $P_\mathrm{rf} = 10$\,dBm excitation power (Fig. \ref{fig:ampdep}\textbf{c}) the resonance almost uniform (apart from the top region being out-of phase), and the interference pattern is complete.
\begin{figure}[ht]
\centering
\includegraphics[width=0.99\textwidth]{figures/Lin2Nonlin.png}
\caption{TrMOKE images of miscellaneous gratings expressing the difference in performance with respect to small \textbf{a)}, higher \textbf{b)} and high \textbf{c)} microwave current applied at the input waveguide. The right edge of the CPW ground line is 3 $\mu$m away from grating posterior in each case. The semi-transparent red overlay indicates the FIB-irradiated region, black lines show expected diffraction angles. The grating operation visibly enhances with the level of uniformity in the nonlinear spin wave excitation behind the FIB area.}
\label{fig:ampdep}
\end{figure}
To gain more insight into the excitation process, we performed both one-dimensional and two-dimensional micromagnetic simulations using mumax3 \cite{ref:mumax}. These simulations confirmed the behavior that we observed in the experiments (Fig.~\ref{fig:nonlinfmr}). At small excitation fields, spin waves beyond the grating are very small in amplitude (Fig.~\ref{fig:nonlinfmr}\textbf{a}). At a higher (nonlinear) excitation field, however, a uniform standing wave is observed between the grating and the CPW, and coupling through the FIB region is strong (Fig. \ref{fig:nonlinfmr}\textbf{b}). Left from the CPW the wavelength change of the spin waves can be observed as they decay due to magnetic damping. Beyond about 50\,µm propagation self-modulational instability is also causing spikes in the waveform \cite{ref:mod_instability}. 2D simulations also confirmed the operation of the device (Fig.~\ref{fig:nonlinfmr}\textbf{c}). Here the diffraction angles match perfectly the theory, but the position of the focal points are also somewhat behind the Rowland circle. This is the same effect we observe in the experiments. Gratings with larger radius and shorter width would probably not suffer from this deviation, especially at small diffraction angles. However, the position of the peaks is predictable, so this does not affect the usability of the device.
\def\h{4.7cm}
\begin{figure}[ht]
\centering
\includegraphics[width=0.99\textwidth]{figures/SimFIB2.png}
\caption{Micromagnetic simulations of nonlinear indirect excitation of spin waves. Yellow rectangles indicate the CPW position and width. The red stripe represents the FIB irradiated region, modelled by zero $\mathrm{M_s}$. \textbf{a)} is a 1D example of linear excitation, while \textbf{b} is a strongly nonlinear case. \textbf{c)} represents a 2D simulation of the experimental scenario in Fig. \ref{fig:trmoke}\textbf{b}.}
\label{fig:nonlinfmr}
\end{figure}
An additional, very unusual aspect of this nonlinear excitation can be observed in Fig. \ref{fig:trmoke}\textbf{c}. In case of the direct excitation mechanism one would expect that segments of the grating that are closest to the CPW will excite the highest amplitude waves, since the field of the CPW decays with the lateral distance. However, here we observe exactly the opposite: the strongest "beams" seem to form on the farthest parts of the grating, and amplitudes are less strong in the middle part, which is very close to the CPW (Fig. \ref{fig:ampdep}\textbf{c}). This is because the largest area where homogeneous oscillations can occur are on the sides, where there is enough distance between the CPW and the grating. The larger the area, the higher are the dipole fields, and the higher the excitation on the opposite side of the grating. Thus, the discovered indirect excitation mechanism is very efficient at exciting short-wavelength spin waves on a finely patterned edge at a distance from a CPW. This can be advantageous in applications where a complex wavefront has to be launched.
A significant limitation of the nonlinear excitation method is that it only works for single-frequency excitations. If multiple frequency components are excited, the uniform standing waves cannot form, moreover nonlinear mixing creates unwanted spectral pollution. If multiple frequencies are present in the excitation signal (as it is often desirable in a spectrum analyzer), the nonlinear method cannot be used, but, as we demonstrated, the proposed method is very effective at creating devices with complex interference patterns at a single frequency.
\section*{Methods}
\label{sec:methods}
\subsection{Sample Fabrication and Characterization}
YIG thin films were deposited on a GGG substrate using rf-magnetron sputtering (we used 100 nm thick films in the grating experiments). Their magnetic properties were evaluated by means of ferromagnetic resonance (FMR), revealing a saturation magnetization of $\mathrm{M_{s}}$=120\,kA/m and a damping constant of $\mathrm{\alpha_{YIG}}=4.4 \times 10^{-4}$. For the excitation of spin waves shorted aluminum CPW antennas were fabricated on top of the YIG film. The antennas were wire bonded to a PCB based CPW with connections to an RF signal generator (Stanford Research SG 386).
The gratings were fabricated in YIG next to the CPW via FIB irradiation. We used 50\,keV Ga$^+$ ions with a relatively low dose ($10^{15}$ ions/cm$^2$), which is high enough to almost completely destroy the magnetic properties of YIG, but no material is removed. Much higher doses (in case of ion milling) would likely deteriorate the YIG film around the patterned region due to ion scattering, which makes this method more suitable. Sub-micron resolution patterning can easily be achieved (possibly down to 100\,nm in our facility). A similar method was recently described in \cite{ref:fib}, where comparably lower doses were used to change magnetic properties of YIG on film level. Here, we deliberately used higher doses to drastically reduce the saturation magnetization of YIG locally, to create a region which inhibits spin-wave transmission. We found that this method is in effect very similar to actually removing material, as it was proposed in \cite{ref:scirep}.
The effect of FIB irradiation was also investigated using transmission electron microscopy (TEM). In Fig. \ref{TEM}\textbf{b},\textbf{c} TEM images indicate that the crystalline structure of YIG is completely destroyed down to a depth of approximately 25\,nm, and further significant damage is observable at even higher depths. These results are in good agreement with the previously performed SRIM simulations of our system in Fig. \ref{TEM}\textbf{a}, suggesting a peak implantation depth of 24\,nm.
\begin{figure}[ht]
\centering
\includegraphics[width=0.99\textwidth]{figures/TEM.png}
\caption{Crystal investigation of the FIB impact in YIG by means of TEM. \textbf{a)} Shows the simulated ion implantation depth for 50~keV Ga$^+$ ions in $Y_{3}Fe_{5}O_{12}$. A cross-sectional image of a 80 nm thick irradiated YIG film is depicted in \textbf{b)}. \textbf{c)} The magnification of the orange square in \textbf{b)} exposes an amorphous toplayer of the thickness expected from the SRIM simulations in \textbf{a)}.}
\label{TEM}
\end{figure}
Ga$^+$ ions are relatively large compared to other frequently used ions such as He$^+$, which explains their low penetration depth and the resulting bilayer formation in YIG. We only had access to Ga$^+$ FIB, but SRIM simulations suggest that higher implantation depths could be achieved with He$^+$ ions, and, with higher doses compared to Ga$^+$, similar modification of YIG properties could be achieved with better uniformity across the film thickness.
\subsection{Imaging of 2D Spin-Wave Patterns}
To image spin-wave interference patterns we built a time-resolved magneto-optical Kerr microscope (trMOKE). Since the Rowland spectrometer requires isotropic spin-wave propagation, we had to use out-of-plane bias. Thus our trMOKE measures the longitudinal Kerr effect, i.e. it is sensitive to changes in the in-plane magnetization component that lies in the incidence plane of the laser \cite{ref:trMOKE}. We used a ps-laser with 50\,ps pulse width and 405\,nm wavelength (PicoQuant Taiko PDL~M1 with LDH-IB-405 laser head). With this, we can measure spin waves up to approximately 5\,GHz frequency (with 10\,MHz steps) and down to 2\,µm wavelength. We scan through the sample with an XYZ stage with 0.4\,µm resolution. Larger area scans (such as the ones presented in this paper) take about a few hours of measurement time. We use a stroboscopic technique in which the excitation signal is phase locked to the lock-in amplifier and the ps-laser, thus we can extract phase information as well. The amplitude scale is not calibrated, but we estimate that the setup is sensitive to a few percent change in in-plane magnetization.
Currently our setup uses a permanent magnet under the sample for biasing. This makes calibration challenging due to the inhomogeneous field profile. The bias field values in the measurements are approximate values with a few mT uncertainty, and perfect out-of-plane biasing is difficult to achieve.
\subsection{Micromagnetic simulations}
Micromagnetic simulations were performed in mumax3\cite{ref:mumax}. We used experimental values for parameters where they were available ($\mathrm{M_{s}}$=120\,kA/m and $\mathrm{\alpha_{YIG}}=4.4 \times 10^{-4}$, 100\,nm thickness), and values from literature where we could not directly measure parameters ($\mathrm{A_{ex}}=3.65\times10^{-12}$\,J/m). For discretization we used 30\,nm$\times$30\,nm$\times$100\,nm cells, i.e. approximating the film by a single layer. The lateral cell size is somewhat larger than the exchange length $l_{ex} = \sqrt{2A_{ex}/(\mu_0M_s^2)}\approx{}20$\,nm, but it is still at least a hundred times smaller than the wavelength, and no discrepancies could be observed compared to smaller cell sizes, while the simulation can be completed in a reasonable time. To avoid reflections, in the left and right hand side of the simulation $\mathrm{3\,\mu{}m}$ wide artificial absorbing layers were created using a quadratically increasing damping constant. On the lateral boundaries periodic boundary conditions (single repetition) were used to simulate a long waveguide and avoid energy loss on the sides. The external field was chosen to be 221\,mT, using an analytical dispersion formula to match the measurement wavelength at the given frequency (the external field at the exact position of the sample cannot be measured with sufficient precision in our setup). The FIB irradiation was modeled as a region with ($\mathrm{M_{s}}$=0\,A/m. The field of the CPW was calculated by HFSS, assuming 1 mA current (peak) in the waveguide. The simulation was run for 180\,ns, which was long enough to form a steady interference pattern.
\section*{Conclusions}
Optically inspired magnonic devices represent a promising route to wave-based computing, which are themselves sought after for post von-Neumann computing. To our knowledge, the Rowland spectrometer we demonstrate here is the most complex spin-wave interference device on the micrometer scale. The spin-wave patterns we observe behave remarkably similar to expectations and to the behavior of ideal isotropic waves.
We used FIB irradiation to draw patterns in YIG with nanoscale precision but without removing material. This minimizes the damage to the adjacent YIG areas. The irradiated patterns can influence spin-wave propagation and may also act as wave sources nearby a waveguide. The manipulation of magnetic properties via FIB in other material systems is well-established, but we are not aware of fabricated spin-wave elements in YIG using a similar approach.
Besides demonstrating complex spin-wave patterns in YIG films, we also described a newfound way of creating spin waves via nonlinear resonance, a method that exploits high-amplitude standing-wave oscillations to indirectly excite short-wavelength spin waves with complex wavefronts.
|
\section{Dependent type theory}
\label{secTypesForTheWorkingMathematician}
The term \textit{dependent type theory} refers to any one of a number of logical systems derived from those proposed by Per Martin-L\"{o}f in the 1970s (see e.g.~\cite{MartinLof1975DTT} and \cite{MartinLof1984Intuitionistic}), which in turn are descendents of Alonzo Church's $\lambda$-calculus \cite{Church1932Lambda} and, by transitivity, of Bertrand Russell's theory of types \cite{Russell1908Types}.
This section is aimed at a mathematician with a classical mathematical training---that is, first-order logic and {\footnotesize ZFC}{} set theory (Zermelo--Fraenkel set theory with the axiom of choice). It intended to be a (very) informal exposition of what dependent type theory is, together with a brief survey of some existing accounts of the semantics of type theory. We will emphasise the similarities and differences between dependent type theory and classical foundations.
Useful references on the syntax and semantics of dependent type theory include \cite{Hofmann1997SyntaxSemantics} and \cite{Jacobs1999CategoricalLogic}.
\subsection*{Types and terms}
The basic objects of dependent type theory are \textit{types} and \textit{terms}. This is in contrast to classical foundations, where all objects are sets. We write $a : A$ to mean that the term $a$ has type $A$. We assume that each term has a unique type---although this assumption is not universally accepted by type theorists, we will need it in order for our notion of `model' (\Cref{defNaturalModel}) to be well-defined.
In some settings, it is helpful for the purpose of intuition to think about a type as being a set, with terms of the type being the elements of the set. In some other settings, it is helpful to think about a type as being a proposition, with the terms of the type being the proofs of the proposition. We will keep this apparent duality between types-as-sets and types-as-propositions, known as the \textit{Curry--Howard correspondence}, in mind.
To illustrate, let $A$ and $B$ be types. We can form their product $A \times B$, whose canonical terms are pairs $\langle a, b \rangle$, where $a : A$ and $b : B$. Under the \textit{types-as-sets} interpretation, we think of $A \times B$ as the cartesian product of $A$ and $B$, whose terms we think of as `ordered pairs of elements'. Under the \textit{types-as-propositions} interpretation, we would think of $A \times B$ as the conjunction of $A$ and $B$, whose terms we think of as `concatenations of proofs': indeed, what is a proof of `$A$ and $B$' if not a proof of $A$ followed by a proof of $B$?
This highlights a key difference between classical foundations and dependent type theory. In classical foundations, we build the theory of sets as a layer on top of first-order logic---the propositions we prove are not themselves the objects of the theory. In dependent type theory, there are just terms and types; we reason about types by constructing terms of new types, which we think about as proofs of propositions. This has the knock-on effect that when we change our theory (say, by adding an axiom), we are also changing the logical system we are working in.
\subsection*{Type dependency, contexts and substitutions}
What sets \textit{dependent} type theory apart from its predecessors is that a type may \textit{depend} on variable terms of other types. For instance, we might consider the type $\mathsf{Vec}_n(\mathbb{R})$ of $n$-dimensional vectors of real numbers, where $n$ is a variable of type $\mathbb{N}$. A list of typed variables that a type may depend on is called a \textit{context}, which is a (possibly empty) list of the form
$$x_1 : A_1, ~ x_2:A_2(x_1), ~ \dots, ~ x_n:A_n(x_1,\dots,x_{n-1})$$
where the parentheses denote the variables the type depends on. We will usually denote contexts by upper-case Greek letters $\Gamma, \Delta, \Theta, \dots$, and we will denote the assertion that $A$ is a type in a context $\Gamma$ by writing $\Gamma \vdash A$, or $\Gamma \vdash A(\vec x)$ if we want to make the variables explicit.
Under the types-as-sets interpretation, a type-in-context $x:A \vdash B(x)$ is interpreted as an $A$-indexed family of sets $(B(x) \mid x \in A)$, or equivalently as a map $B \to A$, where the `set' $B(x)$ corresponds with the preimage of $x \in A$. Under the types-as-propositions interpretation, a type-in-context $x : A \vdash B(x)$ is interpreted as a proposition $B(x)$ depending on a variable term $x : A$, which in turn might be thought of as a hypothesis (together with its proof), or as a variable element of a set.
If $A$ is a type in a context $\Gamma$, we can form the \textit{context extension} of $\Gamma$ by a variable $x$ of type $A$, denoted $\Gamma,~ x:A$; moreover, all contexts can be generated from the empty context by context extension. A type $\vdash A$ in the empty context is called a \textit{basic type}; for example, $\mathbb{N}$ is a basic type.
If $\Gamma \vdash A$ is a type-in-context, we denote by $\Gamma \vdash a : A$ the assertion that $a$ is a term of type $A$ in the presence of the variables $\Gamma$. For example, whenever $\Gamma \vdash A$, it is always the case that $\Gamma,~ x : A \vdash x : A$. We may also assert (definitional) equality of types or of terms, but again relative to a context. Thus $\Gamma \vdash A = B$ asserts that the types-in-context $\Gamma \vdash A$ and $\Gamma \vdash B$ are equal; and $\Gamma \vdash a = a' : A$ asserts that the typed terms-in-context $\Gamma \vdash a : A$ and $\Gamma \vdash a' : A$ are equal. Expressions to the right of the $\vdash$ symbol are called \textit{judgements}.
Given contexts $\Gamma = x_1 : A_1, \dots, x_n : A_n(x_1, \dots, x_{n-1})$ and $\Delta = y_1 : B_1, \dots, y_m : B_m(y_1, \dots, y_{m-1})$, a \textit{substitution} from $\Delta$ into $\Gamma$ is a list of terms
$$\Delta \vdash t_1 : A_1, ~~~ \Delta \vdash t_2 : A_2(t_1), ~~~ \Delta \vdash t_n : A_n(t_1, t_2, \dots, t_{n-1})$$
where $A_i(t_1,\dots,t_{i-1})$ denotes the type obtained by replacing the free variables $x_1,\dots,x_{i-1}$ in $A_i$ by the terms $t_1,\dots,t_{i-1}$, respectively.
The contexts and substitutions (quotiented by provable equality between types and terms) of dependent type theory form a category, called the \textit{category of contexts} of the type theory. Given a substitution $\sigma$ from $\Delta$ to $\Gamma$, write $\Delta \vdash A[\sigma]$ for the result of substituting the variables of $\Gamma$ in a type $\Gamma \vdash A$ according to $\sigma$, and write $\Delta \vdash a[\sigma] : A[\sigma]$ for the result of substituting the variables of $\Gamma$ in a term $\Gamma \vdash a : A$ according to $\sigma$.
\subsection*{Specifying a type}
In {\footnotesize ZFC}{} set theory, a set is determined by its elements---this is the content of the axiom of extensionality, which says that two sets with the same elements are equal. In dependent type theory, on the other hand, types are defined according to rules which describe how they interact with other types. In practice, these rules come in four kinds: formation rules, introduction rules, elimination rules and computation rules.
\begin{itemize}
\item \textit{Formation rules} tell us how to build the new type out of old types;
\item \textit{Introduction rules} tell us how to use terms of the old types to obtain terms of the new type;
\item \textit{Elimination rules} tell us how to use the terms of the new type to obtain terms of old types;
\item \textit{Computation rules} tell us how the terms constructed from the introduction and elimination rules interact.
\end{itemize}
These rules are typically specified relative to an arbitrary context $\Gamma$.
The computation rules are further broken down into \textit{$\beta$-reduction} rules, which tell us what happens when we apply an elimination rule after an introduction rule and \textit{$\eta$-expansion} rules, which tell us what happens when we apply an introduction rule after an elimination rule. The $\beta$-reduction and $\eta$-expansion rules can be thought of as the `existence' and `uniqueness' parts, respectively, of universal properties satisfied by the types.
To illustrate, we now proceed by specifying the rules defining the \textit{unit type}, \textit{dependent sum types} and \textit{dependent product types}; these will be of importance to us throughout the thesis.
\begin{definition}[Unit types]
Define the \textbf{unit type} to be the dependent type $\mathbbm{1}$ defined according to the following rules.
\begin{itemize}
\item[(\texttt{$\mathbbm{1}$-F})] $\Gamma \vdash \mathbbm{1}$;
\item[(\texttt{$\mathbbm{1}$-I})] $\Gamma \vdash \star : \mathbbm{1}$;
\item[(\texttt{$\mathbbm{1}$-$\eta$})] If $\Gamma \vdash x : \mathbbm{1}$, then $\Gamma \vdash x = \star : \mathbbm{1}$.
\end{itemize}
\end{definition}
Rule (\texttt{$\mathbbm{1}$-F}) says that $\mathbbm{1}$ is a type in any context; rule (\texttt{$\mathbbm{1}$-I}) says that there is a term $\star$ of type $\mathbbm{1}$ in any context; and rule (\texttt{$\mathbbm{1}$-$\eta$}) says that $\star$ is the unique term of type $\mathbbm{1}$ in any context. There are no elimination or $\beta$-reduction rules for the unit type.
Under the types-as-sets interpretation, we think of the unit type as being a singleton set, whose unique element is $\star$. The $\eta$-expansion rule is what gives us uniqueness of the `element' of $\mathbbm{1}$.
Under the types-as-propositions interpretation, we think of the unit type as being the `true' proposition $\top$. The $\eta$-expansion rule tells us that there is a unique proof of $\top$, which implies that that specifying a proof of a proposition $A$ is equivalent to specifying a proof of $\top \to A$.
\begin{definition}[Dependent sum types]
The \textbf{dependent sum type constructor} $\Sigma$ is defined according to the following rules.
\begin{itemize}
\item[($\Sigma$\texttt{-F})] If $\Gamma \vdash A$ and $\Gamma,\, x:A \vdash B(x)$, then $\Gamma \vdash \sum_{x:A} B(x)$;
\item[($\Sigma$\texttt{-I})] If $\Gamma \vdash a : A$ and $\Gamma \vdash b : B(a)$, then $\Gamma \vdash \langle a, b \rangle : \sum_{x:A} B(x)$;
\item[($\Sigma$\texttt{-E-l})] If $\Gamma \vdash p : \sum_{x:A} B(x)$, then $\Gamma \vdash \mathsf{fst}(p) : A$;
\item[($\Sigma$\texttt{-E-r})] If $\Gamma \vdash p : \sum_{x:A} B(x)$, then $\Gamma \vdash \mathsf{snd}(p) : B(\mathsf{fst}(p))$;
\item[($\Sigma$\texttt{-$\beta$-l})] If $\Gamma \vdash a : A$ and $\Gamma \vdash b : B(a)$, then $\Gamma \vdash \mathsf{fst}(\langle a, b \rangle) = a : A$;
\item[($\Sigma$\texttt{-$\beta$-r})] If $\Gamma \vdash a : A$ and $\Gamma \vdash b : B(a)$, then $\Gamma \vdash \mathsf{snd}(\langle a, b \rangle) = b : B(a)$;
\item[($\Sigma$\texttt{-$\eta$})] If $\Gamma \vdash p : \sum_{x:A} B(x)$, then $\Gamma \vdash p = \langle \mathsf{fst}(p), \mathsf{snd}(p) \rangle : \sum_{x:A} B(x)$.
\end{itemize}
\end{definition}
Under the types-as-sets interpretation, we think of the dependent sum type $\sum_{x:A} B(x)$ as the disjoint union of the $A$-indexed family of sets $(B(x) \mid x \in A)$, with the element $\langle a, b \rangle$ being thought of as the element $b$ in the component of the disjoint union given by the index $a$.
Under the types-as-propositions interpretation, we think of the dependent sum type $\sum_{x:A} B(x)$ as the existentially quantified formula $\exists x : A,~B(x)$, with the proof $\langle a, b \rangle$ being thought of as a specification of a witness $a : A$ together with the proof of $B(a)$.
\begin{definition}[Dependent product types]
The \textbf{dependent product type constructor} $\Pi$ is defined according to the following rules.
\begin{itemize}
\item[($\Pi$\texttt{-F})] If $\Gamma \vdash a : A$ and $\Gamma,\, x : A \vdash B(x)$, then $\Gamma \vdash \prod_{x:A} B(x)$;
\item[($\Pi$\texttt{-I})] If $\Gamma \vdash a : A$ and $\Gamma,\, x : A \vdash b(x) : B(x)$, then $\Gamma \vdash \lambda_{x:A} b(x) : \prod_{x:A} B(x)$;
\item[($\Pi$\texttt{-E})] If $\Gamma \vdash f : \prod_{x:A} B(x)$ and $\Gamma \vdash a : A$, then $\Gamma \vdash \mathsf{app}(f,a) : B(a)$;
\item[($\Pi$\texttt{-$\beta$})] If $\Gamma \vdash a : A$ and $\Gamma, x : A \vdash b(x) : B(x)$, then $\Gamma \vdash \mathsf{app}(\lambda_{x:A} b(x), a) = b(a) : B(a)$;
\item[($\Pi$\texttt{-$\eta$})] If $\Gamma \vdash f : \prod_{x:A} B(x)$, then $\Gamma \vdash f = \lambda_{x:A} \mathsf{app}(f,x) : \prod_{x:A} B(x)$.
\end{itemize}
\end{definition}
Under the types-as-sets interpretation, we think of the dependent product type $\prod_{x:A} B(x)$ as the set of choice functions for the $A$ indexed family of sets $(B(x) \mid x \in A)$; that is, we think of a term $f : \prod_{x : A} B(x)$ as a function $f : A \to \bigcup_{x \in A} B(x)$ such that $\mathsf{app}(f,a)$ ($= f(a)$) $\in B(a)$ for each $a \in A$.
Under the types-as-propositions interpretation, we think of the dependent product type $\prod_{x:A} B(x)$ as the universally quantified formula $\forall x : A,~ B(x)$. A proof $f : \prod_{x:A} B(x)$ is then a family $\mathsf{app}(f,x) : B(x)$ of proofs parametrised by $x : A$.
\subsection*{Proof relevance}
Under the types-as-propositions interpretation, the only way we can assert that a proposition is `true; is by exhibiting a term of the corresponding type. Whereas in first-order logic we can say something like `$\mathbb{N}$ is uncountable', in type theory we would need to first construct a type $A$ asserting (under the types-as-propositions interpretation) that $\mathbb{N}$ is uncountable, and then exhibit a \textit{proof term}, that is a term $\vdash a : A$. This aspect of dependent type theory is known as \textit{proof relevance}, meaning that there is that there is no way to assert the truth of a proposition without also providing a proof---in particular, any proof of an existential statement must provide a witness. This reflects the computational and constructive character of dependent type theory.
\subsection*{Categorical semantics}
We now briefly survey some of the existing notions of categorical model of dependent type theory.
The first notion is that of a \textit{contextual category}, introduced by John Cartmell in his doctoral thesis \cite{Cartmell1978Thesis} and later studied by Vladimir Voevodsky under the name \textit{C-systems} \cite{Voevodsky2016CSystems}.
\begin{definition}[Contextual categories \thmcite{Cartmell1978Thesis,Cartmell1986GAT}]
\index{contextual category}
A \textbf{contextual category} consists of:
\begin{itemize}
\item A small category $\mathbb{C}$ with a terminal object $\diamond$;
\item A tree structure on the objects of $\mathbb{C}$ with root $\diamond$---write $\Gamma \triangleleft A$ to denote the assertion that $\Gamma$ is the parent of $A$ in the tree;
\item For each $\Gamma, A \in \mathrm{ob}(\mathbb{C})$ such that $\Gamma \triangleleft A$, a morphism $\nmp{A} : A \to \Gamma$ in $\mathbb{C}$ and, for each $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$, an object $A[\sigma]$ with $\Delta \triangleleft A[\sigma]$ and a morphism $\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A : A[\sigma] \to A$ in $\mathbb{C}$;
\end{itemize}
such that
\begin{enumerate}[(i)]
\item The following square commutes and is a pullback;
\begin{diagram}
A[\sigma]
\arrow[d, "\nmp{A[\sigma]}"']
\arrow[r, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
&
A
\arrow[d, "\nmp{A}"]
\\
\Delta
\arrow[r, "\sigma"']
&
\Gamma
\end{diagram}
\item $A[\mathrm{id}_{\Gamma}] = A$;
\item $A[\sigma \circ \tau] = A[\sigma][\tau]$ for each $\Theta \xrightarrow{\tau} \Delta \xrightarrow{\sigma} \Gamma$; and
\item $(\sigma \circ \tau) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \circ (\tau \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])$ for each $\Theta \xrightarrow{\tau} \Delta \xrightarrow{\sigma} \Gamma$.
\end{enumerate}
\end{definition}
In Vladimir Voevodsky's \textit{C-systems} approach, the tree structure on $\mathrm{ob}(\mathbb{C})$ is replaced by a grading $(\mathrm{ob}(\mathbb{C})_n)_{n \in \mathbb{N}}$ of the objects of $\mathbb{C}$, together with functions $\mathrm{ob}(\mathbb{C})_{n+1} \to \mathrm{ob}(\mathbb{C})_n$ for each $n \in \mathbb{N}$.
\begin{numbered}
Contextual categories are very close to the syntax of dependent type theory, in the following sense. Viewing $\mathbb{C}$ as the category of contexts and substitutions of a dependent type theory $\mathbb{T}$, the tree structure on $\mathrm{ob}(\mathbb{C})$ gives, for each $\Gamma \in \mathrm{ob}(\mathbb{C})$, a unique factorisation:
$$\Gamma \xrightarrow{!_{\Gamma}} \diamond \qquad = \qquad A_n \xrightarrow{\nmp{A_n}} A_{n-1} \xrightarrow{\nmp{A_{n-1}}} \cdots \xrightarrow{\nmp{A_2}} A_1 \xrightarrow{\nmp{A_1}} \diamond$$
Viewing morphisms $A \to \Gamma$ as dependent types $\Gamma \vdash A$, this tells us that every object $\Gamma$ of $\mathbb{C}$ is built in a finite way from the empty context $\diamond$ by context extension. The terms $\Gamma \vdash a : A$ are then given by sections of $\nmp{A}$. Conditions (i)--(iv) then say that substitution respects typing and respects identity and composition strictly.
\end{numbered}
Another notion of categorical model introduced by John Cartmell in his thesis is that of \textit{categories with attributes}, although presentation we use is due to Andrew Pitts \cite{Pitts2001CategoricalLogic}.
\begin{definition}[Categories with attributes \thmcite{Cartmell1978Thesis,Pitts2001CategoricalLogic}]
\index{category with attributes}
A \textbf{category with attributes} consists of:
\begin{itemize}
\item A small category $\mathbb{C}$ with a terminal object $\diamond$;
\item For each object $\Gamma$ of $\mathbb{C}$, a set $\mathrm{Ty}(\Gamma)$;
\item For each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A \in \mathrm{Ty}(\Gamma)$, an object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ of $\mathbb{C}$ and a morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ in $\mathbb{C}$ and, for each $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$, a function $(-)[\sigma] : \mathrm{Ty}(\Gamma) \to \mathrm{Ty}(\Delta)$ and a morphism $\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma] \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$;
\end{itemize}
such that
\begin{enumerate}[(i)]
\item The following square commutes and is a pullback;
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]
\arrow[d, "\nmp{A[\sigma]}"']
\arrow[r, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[d, "\nmp{A}"]
\\
\Delta
\arrow[r, "\sigma"']
&
\Gamma
\end{diagram}
\item $A[\mathrm{id}_{\Gamma}] = A$;
\item $A[\sigma \circ \tau] = A[\sigma][\tau]$ for each $\Theta \xrightarrow{\tau} \Delta \xrightarrow{\sigma} \Gamma$; and
\item $(\sigma \circ \tau) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \circ (\tau \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])$ for each $\Theta \xrightarrow{\tau} \Delta \xrightarrow{\sigma} \Gamma$.
\end{enumerate}
\end{definition}
\begin{numbered}
We view the elements of $\mathrm{Ty}(\Gamma)$ as depedent types in context $\Gamma$; then the object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ represents the result of extending the context $\Gamma$ by the type $A$. Note that every contextual category has the structure of a category with attributes: given $\Gamma \in \mathrm{ob}(\mathbb{C})$, take $\mathrm{Ty}(\Gamma) = \{ A \in \mathrm{ob}(\mathbb{C}) \mid \Gamma \triangleleft A \}$, and then define $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = A$. The removal of the tree structure on the objects of $\mathbb{C}$ implies that there may be objects that are \textit{not} obtained from the terminal object $\diamond$ by context extension. As such, categories with attributes are further removed from the syntax of dependent type theory. As with contextual categories, terms are interpreted as sections of maps of the form $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$.
\end{numbered}
The notion of a \textit{category with families} was introduced by Peter Dybjer in \cite{Dybjer1995InternalTypeTheory}.
\begin{numbered}
Denote by $\mathbf{Fam}$ the category of families of (small) sets. An object of $\mathbf{Fam}$ is a pair $(I, (A_i)_{i \in I})$ consisting of a set $I$ and an $I$-indexed family of sets $(A_i)_{i \in I}$, and a morphism from $(I, (A_i)_{i \in I})$ to $(J, (B_j)_{j \in J})$ is a pair $(f, (g_i)_{i \in I})$ consisting of a function $f : I \to J$ and an $I$-indexed family of functions $(g_i : A_i \to B_{f(i)})_{i \in I}$.
\end{numbered}
\begin{definition}[Categories with families \thmcite{Dybjer1995InternalTypeTheory}]
\label{defCwF}
\index{category with families}
A \textbf{category with families} is a category $\mathbb{C}$ with a distinguished terminal object $\diamond$, together with the following data:
\begin{itemize}
\item A functor $T : \mathbb{C}\op \to \mathbf{Fam}$---we write $T(\Gamma) = (\mathrm{Ty}(\Gamma), \mathrm{Tm}(\Gamma, A)_{A \in \mathrm{Ty}(\Gamma)})$ and denote by $A[\sigma] \in \mathrm{Ty}(\Delta)$ and $a[\sigma] \in \mathrm{Tm}(\Delta, A[\sigma])$ the result of applying $T(\sigma : \Delta \to \Gamma)$ to an element $A \in \mathrm{Ty}(\Gamma)$ and $a \in \mathrm{Tm}(\Gamma, A)$, respectively;
\item For each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A \in \mathrm{Ty}(\Gamma)$, an object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ of $\mathbb{C}$, a morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ of $\mathbb{C}$ and an element $\nmq{A} \in \mathrm{Ty}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, A[\nmp{A}])$;
\end{itemize}
such that, given any object $\Delta$ of $\mathbb{C}$, morphism $\sigma : \Delta \to \Gamma$ and element $a \in \mathrm{Tm}(\Delta, A[\sigma])$, there is a unique morphism $\langle \sigma, a \rangle : \Delta \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ such that $\sigma = \nmp{A} \circ \langle \sigma, a \rangle$ and $a = \nmq{A}[\langle \sigma, a \rangle]$.
\end{definition}
\begin{numbered}
As the notation suggests, in a category with families we view the elements of $\mathrm{Ty}(\Gamma)$ as dependent types $\Gamma \vdash A$, and the elements of $\mathrm{Tm}(\Gamma, A)$ as terms $\Gamma \vdash a : A$.
\end{numbered}
The final notion of categorical model that we introduce is that of a \textit{universe category}, introduced by Vladimir Voevodsky \cite{Voevodsky2015UniverseCategory}.
\begin{definition}[Universe categories \thmcite{Voevodsky2015UniverseCategory}]
\index{universe category}
A \textbf{universe category} consists of:
\begin{itemize}
\item A small category $\mathbb{C}$ with a terminal object $\diamond$;
\item A morphism $p : \widetilde{U} \to U$ in $\mathbb{C}$; and
\item A \textbf{universe structure} on $p$---that is, an assignment to each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A : \Gamma \to U$ an object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ and morphisms $\nmp[\Gamma]{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ and $\nmq[\Gamma]{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \widetilde{U}$;
\end{itemize}
such that for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A : \Gamma \to U$, the following square is a pullback.
\begin{diagram}
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[d, "{\nmp[\Gamma]{A}}"']
\arrow[r, "{\nmq[\Gamma]{A}}"]
&
\widetilde{U}
\arrow[d, "p"]
\\
\Gamma
\arrow[r, "A"']
&
U
\end{diagram}
\end{definition}
\begin{numbered}
In \cite{Voevodsky2015UniverseCategory}, Vladimir Voevodsky describes how to obtain a C-system from a universe category. As suggested by the notation, we view morphisms $A : \Gamma \to U$ as dependent types $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$. The pullback condition tells us that morphisms $a : \Gamma \to \widetilde{U}$ such that $p \circ a = A$ correspond with sections of $\nmp[\Gamma]{A}$, which we can thus think about as terms $\Gamma \vdash a : A$, as we did for contextual categories and categories with attributes.
\end{numbered}
The approach we will use is that of \textit{natural models} \cite{Awodey2016NaturalModels}, which bear similarities with both categories with families and universe categories---they will be defined in \Cref{secNaturalModels} and explored in depth in this thesis.
\section{The landscape of categorical semantics}
\label{secLandscapeOfCategoricalSemantics}
In classical model theory, there is a single notion of `model' $\mathfrak{M}$ of a first-order theory $\mathbb{T}$, namely a set $M$ together with elements $c^{\mathfrak{M}} \in M$ for each constant symbol $c$ in $\mathbb{T}$, functions $f^{\mathfrak{M}} : M^n \to M$ for each function symbol $f$ in $\mathbb{T}$ of arity $n$, and subsets $R^{\mathfrak{M}} \subseteq M^n$ for each relation symbol $R$ in $\mathbb{T}$ of arity $n$, such that this data satisfies the formulae of $\mathbb{T}$.
For depenedent type theory, matters are complicated in several ways, not least that the propositions of the theory are themselves objects of the theory. As a result, many different notions of categorical model of dependent type theory have emerged, ranging from notions with strict structure that is very faithful to the syntax of dependent type theory, such as \textit{contextual categories} \cite{Cartmell1986GAT}, to notions with weaker structure that have a more homotopical flavour, such as \textit{clans} and \textit{tribes} \cite{Joyal2017ClansTribes}.
The notion explored in this thesis is that of a \textit{natural model} (\Cref{defNaturalModel}). Before exploring natural models, though, we will set the scene by describing some other approaches, which we will later connect with our own.
\subsection*{Grothendieck fibrations and comprehension categories}
As mentioned in \Cref{secTypesForTheWorkingMathematician}, the contexts and substitutions of a dependent type theory form the objects and morphisms, respectively, of a category $\mathbb{C}$. For each object $\Gamma$ of $\mathbb{C}$,
\subsection*{Clans and tribes}
\subsection*{Categories with families}
\section{Presheaves and representability}
\label{secPresheavesRepresentability}
This section lays out the basic definitions and results concerning presheaves and representability which we will use, normally without citation, in the rest of the thesis. Most of the results in this section can be found in the standard references for category theory, such as \cite{MacLane1971CWM}, \cite{Johnstone2002Elephant} and \cite{Awodey2010CategoryTheory}. They are recalled here because of their fundamental importance to the work to follow.
\begin{definition}[Presheaves]
A \textbf{presheaf}\index{presheaf} on a small category $\mathbb{C}$ is a functor $P : \mathbb{C}\op \to \mathbf{Set}$. The category of all presheaves on $\mathbb{C}$ and natural transformations between them is denoted by $\widehat{\mathbb{C}}$.
\end{definition}
Given an object $A \in \mathrm{ob}(\mathbb{C})$, an element $x \in P(A)$ and a morphism $f : B \to A$, we will write $x[f]$ rather than $P(f)(x)$ when $P$ is understood from context. Note that the rules for $P$ being a functor say precisely that $x[\mathrm{id}_A]=x$ and $x[f][g] = x[f \circ g]$ for all $C \xrightarrow{g} B \xrightarrow{f} A$ and all $x \in P(A)$, so that we might think of a presheaf $P$ as defining a right action of the morphisms of $\mathbb{C}$ on an $\mathrm{ob}(\mathbb{C})$-indexed family of sets.
\begin{definition}[Yoneda embedding]
The \textbf{Yoneda embedding}\index{Yoneda!embedding@{---} embedding} is the functor $\Yon : \mathbb{C} \to \widehat{\mathbb{C}}$ defined on objects by $\Yon(A) = \mathbb{C}({-}, A)$.
\end{definition}
\begin{definition}[Representable presheaves]
\label{defRepresentablePresheaf}
\index{representable!representable presheaf@{---} presheaf}
Let $\mathbb{C}$ be a small category. A presheaf $X : \mathbb{C}\op \to \mathbf{Set}$ is \textbf{representable} if $X \cong \Yon(A)$ for some $A \in \mathrm{ob}(\mathbb{C})$. The object $A$ is called a \textbf{representing object} for $X$.
\end{definition}
\begin{theorem}[Yoneda lemma]
Let $\mathbb{C}$ be a small category. For each presheaf $P$ over $\mathbb{C}$ and each object $A$ of $\mathbb{C}$, there is a bijection $\widehat{\mathbb{C}}(\Yon(A), P) \cong P(A)$. Moreover this bijection is natural in both $A$ and $P$.
\end{theorem}
In light of the Yoneda lemma, we will brazenly and unapologetically identify elements $x \in P(A)$ with natural transformations $x : \Yon(A) \to P$, and we may even use phrases such as `the element $x : \Yon(A) \to P$'. A consequence of the Yoneda lemma is that the Yoneda embedding is full and faithful.
\begin{definition}[Category of elements]
The \textbf{category of elements} of a presheaf $P$ is the category $\catel[\mathbb{C}]{P} = \catel{P}$, whose objects are pairs $(C,x)$ with $C \in \mathrm{ob}(\mathbb{C})$ and $x \in P(C)$, and whose morphisms $f : (C, x) \to (D, y)$ are morphisms $f : C \to D$ in $\mathbb{C}$ such that $y[f]=x$.
\end{definition}
Elementary computations reveal that $\catel[\mathbb{C}] \Yon(A) \cong \mathbb{C} \slice{A}$ for all $A \in \mathrm{ob}(\mathbb{C})$, and that $\widehat{\mathbb{C}} \slice{P} \cong \widehat{\catel[\mathbb{C}]{P}}$ for all $P : \mathbb{C}\op \to \mathbf{Set}$. Combining these results, we see that $\widehat{\mathbb{C} \slice{A}} \cong \widehat{\mathbb{C}} \slice{\Yon(A)}$ for each $A \in \mathrm{ob}(\mathbb{C})$.
Note that there is an evident forgetful functor $\pi : \catel[\mathbb{C}] P \to \mathbb{C}$.
\begin{theorem}[Every presheaf is the colimit of representables]
Let $\mathbb{C}$ be a small category and let $P$ be a presheaf over $\mathbb{C}$. Then $P$ is a colimit of the functor
$$\catel[\mathbb{C}]{P} \xrightarrow{\pi} \mathbb{C} \xrightarrow{\Yon} \widehat{\mathbb{C}}$$
In particular, it is a colimit in $\widehat{\mathbb{C}}$ of presheaves of the form $\Yon(\Gamma)$ for $\Gamma \in \mathrm{ob}(\mathbb{C})$.
\end{theorem}
\begin{theorem}
\label{thmKanExtensions}
Let $\mathbb{C}$ and $\mathbb{D}$ be small categories. Each functor $F : \mathbb{C} \to \mathbb{D}$ induces an adjoint triple
\begin{diagram}
\widehat{\mathbb{C}}
\arrow[r, shift left=1, bend left=20, "F_!", ""'{name=domadj1}]
\arrow[r, shift right=1, bend right=20, "F_*"', ""{name=codadj2}]
&[100pt]
\widehat{\mathbb{D}}
\arrow[l, "F^*" description, ""{name=domadj2}, ""'{name=codadj1}]
\arrow[from={domadj1}, to={codadj1}, draw=none, "\bot" description]
\arrow[from={domadj2}, to={codadj2}, draw=none, "\bot" description]
\end{diagram}
where $F^*$ is given by precomposition by $F$. The functors $F_!$ and $F_*$ are the \textbf{left Kan extension} and \textbf{right Kan extension} operations along $F$, respectively. Explicitly, the functors $F_*$ and $F_!$ can be computed as follows.
$$F_*(X)(D) \cong \widehat{\mathbb{D}}(\Yon(D), F_*(X)) \cong \widehat{\mathbb{C}}(F^*\Yon(D), X) \cong \widehat{\mathbb{C}}(\mathbb{D}(F({-}), \Yon(D)), X)$$
$$F_!(X) \cong \varinjlim\limits_{(A,x) \in \catel{X}} \Yon(FA)$$
In particular, we may choose the values of $F_!$ such that it commutes with the Yoneda embedding $F_! \circ \Yon = \Yon \circ F : \mathbb{C} \to \widehat{\mathbb{D}}$.
\end{theorem}
\begin{lemma}[Adjoint functors lift]
\label{lemAdjointFunctorKanExtension}
Given a pair of functors $R : \mathbb{C} \to \mathbb{D}$ and $L : \mathbb{D} \to \mathbb{C}$. If $L \dashv R$, then $L^* \dashv R^*$ and, therefore, $R_! \cong L^*$.
\begin{diagram}
\widehat{\mathbb{C}}
\arrow[r, bend left=10, shift left=1, "L^*", ""'{name=domadjtop}]
&
\widehat{\mathbb{D}}
\arrow[l, bend left=10, shift left=1, "R^*", ""'{name=codadjtop}]
\arrow[from={domadjtop}, to={codadjtop}, draw=none, "\bot" description]
\\
\mathbb{C}
\arrow[r, bend right=10, shift right=1, "R"', ""{name=codadjbase}]
\arrow[u, hook, dashed, "\Yon"]
&
\mathbb{D}
\arrow[l, bend right=10, shift right=1, "L"', ""{name=domadjbase}]
\arrow[from={domadjbase}, to={codadjbase}, draw=none, "\bot" description]
\arrow[u, hook, dashed, "\Yon"']
\end{diagram}
\end{lemma}
\begin{proof}[Sketch of proof]
Let $\eta : \mathrm{id}_{\mathbb{D}} \Rightarrow RL$ and $\varepsilon : LR \Rightarrow \mathrm{id}_{\mathbb{C}}$ be the unit and counit, respectively, of the adjunction $L \dashv R$. Define $\sigma : \mathrm{id}_{\widehat{\mathbb{C}}} \Rightarrow R^*L^* = (LR)^*$ by letting $(\sigma_P)_C = P(\varepsilon_C) : P(C) \to P(LR(C))$ for all $P : \mathbb{C}^{\mathrm{op}} \to \mathbf{Set}$ and all $C \in \mathrm{ob}(\mathbb{C})$, and define $\tau : L^*R^* = (RL)^* \Rightarrow \mathrm{id}_{\widehat{\mathbb{D}}}$ by letting $(\tau_Q)_D = Q(\eta_D) : Q(RL(D)) \to Q(D)$ for all $Q : \mathbb{D}^{\mathrm{op}} \to \mathbf{Set}$ and all $D \in \mathrm{ob}(\mathbb{D})$. Verifying that $\sigma, \tau$ are well-defined natural transformations forming the unit and counit, respectively, of the adjunction $L^* \dashv R^*$, is elementary. That $L^* \cong R_!$ follows from uniqueness of left adjoints up to natural isomorphism.
\end{proof}
We conclude this section with the definition of a \textit{representable natural transformation}, which is the fundamental component of a \textit{natural model} \Cref{defNaturalModel}, the main object of study in this thesis.
\begin{definition}[Representable natural transformation]
\label{defRepresentableNaturalTransformation}
\index{representable!natural transformation@{---} natural transformation}
Let $\mathbb{C}$ be a small category and let $X$ and $Y$ be presheaves over $\mathbb{C}$. A natural transformation $f : Y \to X$ is \textbf{representable} if all of its fibres are representable, in the sense that for each $A \in \mathrm{ob}(\mathbb{C})$ and each $x \in X(A)$, there exists $B \in \mathrm{ob}(\mathbb{C})$, $g : B \to A$ in $\mathbb{C}$ and $y \in Y(B)$ such that the following square is a pullback.
\begin{diagram}
\Yon(B)
\arrow[d, "\Yon(g)"']
\arrow[r, "y"]
&
Y
\arrow[d, "f"]
\\
\Yon(A)
\arrow[r, "x"']
&
X
\end{diagram}
\end{definition}
The definition of a representable natural transformation can be found in \cite[Tag 0023]{StacksProject} and has been attributed to Alexander Grothendieck \cite{Awodey2016NaturalModels}.
\section{Polynomials in locally cartesian closed categories}
\label{secLocallyCartesianClosedCategories}
\begin{definition}[Locally cartesian closed categories]
\label{defLCCC}
\index{category!locally cartesian closed {---}}
\index{cartesian closed!locally {---} category}
A \textbf{locally cartesian closed category} is a category $\mathcal{E}$ with a terminal object $1$ and with all slices $\mathcal{E} \slice{A}$ cartesian closed.
\end{definition}
\begin{numbered}
Locally cartesian closed categories $\mathcal{E}$ are characterised by the fact that every morphism $f : B \to A$ induces a triple of adjoint functors
\begin{diagram}
\mathcal{E} \slice{A}
\arrow[rr, "\Delta_f" description, ""{name=codtop}, ""'{name=dombot}]
&&
\mathcal{E} \slice{B}
\arrow[ll, bend right, "\Sigma_f"', ""{name=domtop}]
\arrow[ll, bend left, "\Pi_f", ""'{name=codbot}]
\arrow[draw=none, from=domtop, to=codtop, inner sep={1pt}, "\bot" description]
\arrow[draw=none, from=dombot, to=codbot, inner sep={1pt}, "\bot" description]
\end{diagram}
where $\Sigma_f$ is given by postcomposition with $f$ and $\Delta_f$ is given by pullback along $f$. Since we have adopted the convention that locally cartesian closed categories have a terminal object, it follows that they are cartesian closed and have all finite limits. We emphasise that locally cartesian closed categories are categories with additional \textit{structure}. In particular, given an object $(X,x)$ of $\mathcal{E} \slice{A}$, the functor $\Delta_f : \mathcal{E}\slice{A} \to \mathcal{E}\slice{B}$ gives a \textit{choice} of pullback $\Delta_f(x) : \Delta_f(X) \to B$ of $x : X \to A$ along $f$.
\end{numbered}
\begin{example}
\label{exLCCCs}
Examples of locally cartesian closed categories include the category $\mathbf{Set}$ of sets, the category $\widehat{\mathbb{C}}=\mathbf{Set}^{\mathbb{C}^{\mathrm{op}}}$ of presheaves on a small category $\mathbb{C}$, and more generally, any topos. The category $\mathbf{Cat}$ of categories is \textit{not} locally cartesian closed, even though it is cartesian closed.
\end{example}
\begin{numbered}
\label{parInternalLanguage}
\index{internal language}
Every locally cartesian closed category $\mathcal{E}$ has an \textbf{internal language} \cite{Seely1984LCCCs}, which provides a convenient \textit{syntactic} way of reasoning about the objects and morphisms of $\mathcal{E}$. When reasoning internally, we will view an object $(X, x : X \to A)$ of $\mathcal{E} \slice{A}$ as an $A$-indexed family of objects $\seqbn{X_a}{a \in A}$, and a morphism $(X,x) \to (Y,y)$ in $\mathcal{E} \slice{A}$ as an $A$-indexed family of morphisms $\seqbn{X_a \to Y_a}{a \in A}$. Given a morphism $f : B \to A$ of $\mathcal{E}$, the action on objects of the functors $\Sigma_f$, $\Delta_f$ and $\Pi_f$ can be described by
$$\Sigma_f \seqbn{Y_b}{b \in B} = \seqbn{\sum_{b \in B_a} X_b}{a \in A}$$
$$\Delta_f \seqbn{X_a}{a \in A} = \seqbn{X_{f(b)}}{b \in B}$$
$$\Pi_f \seqbn{Y_b}{b \in B} = \seqbn{\prod_{b \in B_a} Y_b}{a \in A}$$
Note that when $\mathcal{E} = \mathbf{Set}$ we really can identify an object $(X,x)$ of $\mathbf{Set} \slice{A}$ as an $A$-indexed family $\seqbn{X_a}{a \in A}$ by defining $X_a = x^{-1}[\{a\}]$ for each $a \in A$. The sum and product operations are realised in this case as the disjoint union and dependent product, respectively.
\end{numbered}
\begin{theorem}[Beck--Chevalley condition]
\label{thmBeckChevalley}
\index{Beck--Chevalley condition}
Let $f,g,u,v$ be morphisms in a locally cartesian closed category $\mathcal{E}$ fitting into the following pullback square.
\begin{ldiagram}
B
\arrow[r, "v"]
\arrow[d, "f"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
D
\arrow[d, "g"]
\\
A
\arrow[r, "u"']
&
C
\end{ldiagram}
There are natural isomorphisms $\Delta_g \Sigma_u \cong \Sigma_v \Delta_f$ and $\Delta_g \Pi_u \cong \Pi_v \Delta_f$. \qed
\end{theorem}
\begin{theorem}[Distributivity law \thmcite{Weber2015Polynomials}]
\label{thmDistributivity}
\index{distributivity law}
\index{axiom of choice!type theoretic {---}}
Let $C \xrightarrow{u} B \xrightarrow{f} A$ be morphisms in a locally cartesian closed category $\mathcal{E}$. Construct the following commutative diagram, in which $v = \Pi_f(u)$ is the dependent product of $u$ along $f$, $w = \Delta_f(v)$ is the pullback of $v$ along $f$, and $e$ is the component at $h$ of the counit of the adjunction $\Delta_f \dashv \Pi_f$.
\begin{diagram}
&
P
\arrow[r, "q"]
\arrow[d, "w" description]
\arrow[dl, "e"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
D
\arrow[d, "v"]
\\
C
\arrow[r, "u"']
&
B
\arrow[r, "f"']
&
A
\end{diagram}
There is a natural isomorphism $\Pi_f \Sigma_u \cong \Sigma_d \Pi_q \Delta_e$. \qed
\end{theorem}
\begin{numbered}
In the internal language of $\mathcal{E}$, the Beck--Chevalley conditions say, parametrically in $d \in D$, that
$$\sum_{a \in A_{g(d)}} X_a \cong \sum_{b \in B_d} X_{f(b)} \quad \text{and} \quad \prod_{a \in A_{g(d)}} X_a \cong \prod_{b \in B_d} X_{f(b)}$$
and the distributivity law says, parametrically in $a \in A$, that
$$\prod_{b \in B_a} \sum_{c \in C_b} X_c \cong \sum_{d \in D_a} \prod_{p \in P_d} X_{e(p)} \cong \sum_{m \in \prod_{b \in B_a} C_b}\ \prod_{b \in B_a} X_{m(b)}$$
For this reason, the distributivity law is sometimes referred to as the (\textit{type theoretic}) \textit{axiom of choice}. This is slightly misleading, since although it resembles the axiom of choice, it is a theorem rather than an axiom.
\end{numbered}
\subsection*{Polynomials and polynomial functors}
\begin{definition}[Polynomials \thmcite{GambinoKock2013PolynomialFunctors}]
\label{defPolynomial}
\index{polynomial}
A \textbf{polynomial} $F=(s,f,t)$ in a locally cartesian closed category $\mathcal{E}$ is a diagram of the form
$$\declpoly IBAJsft$$
We say that $F$ is a `polynomial from $I$ to $J$' and write $F : \declpoly IBAJsft$ or just $F : I \pto J$.
\end{definition}
\begin{numbered}
\label{parPolynomialsFromOneToOne}
Polynomials generalise morphisms (by taking $I=J=1$) and spans (by taking $B=A$ and $f=\mathrm{id}_A$). Since most of our attention will be focused on polynomials from $1$ to $1$, we will brazenly blur the distinction between morphisms $f : B \to A$ and polynomials $\declpoly 1BA1{!_{B}}f{!_{A}}$. Beware, though, that composition of polynomials (see \Cref{defCompositionOfPolynomials}) differs from composition of morphisms of $\mathcal{E}$.
\end{numbered}
\begin{definition}[Polynomial functors \thmcite{GambinoKock2013PolynomialFunctors}]
\label{defPolynomialFunctor}
\label{defExtension}
\index{polynomial!functor@{---} functor}
\index{polynomial!extension of a {---}}
The \textbf{extension} of a polynomial $F : \declpoly IBAJsft$ in a locally cartesian closed category $\mathcal{E}$ is the functor $\mathrm{P}_F = \Sigma_t \Pi_f \Delta_s : \mathcal{E} \slice{I} \to \mathcal{E} \slice{J}$. Internally, we can define $\mathrm{P}_F$ by
$$\mathrm{P}_F \seqbn{X_i}{i \in I} = \seqbn{\sum_{a \in A_j} \prod_{b \in B_a} X_{s(b)}}{j \in J}$$
A \textbf{polynomial functor} is a functor that is naturally isomorphic to the extension of a polynomial.
\end{definition}
When $f : B \to A$ is a morphism of $\mathcal{E}$, we obtain an endofunctor $\mathrm{P}_f = \mathrm{P}_{({!}_B,f,{!}_A)} : \mathcal{E} \cong \mathcal{E} \slice{1} \to \mathcal{E} \slice{1} \cong \mathcal{E}$, and this endofunctor is described in the internal language of $\mathcal{E}$ quite simply as
$$\mathrm{P}_f(X) = \sum_{a \in A} X^{B_a}$$
This explains the use of the term \textit{polynomial}.
We recall the following technical lemma from \cite{Awodey2016NaturalModels}; it will be useful for us later on.
\begin{lemma}[See \thmcitenote{Lemma 5}{Awodey2016NaturalModels}]
\label{lemLemmaFive}
Let $f : B \to A$ be a morphism in a locally cartesian closed category $\mathcal{E}$. There is a natural (in $X$ and in $Y$) correspondence between morphisms $g : Y \to \mathrm{P}_f(X) = \sum_{a \in A} X^{B_a}$ and pairs $(g_1,g_2)$ of morphisms with $g_1 : Y \to A$ and $g_2 : \Delta_{g_1}(B) \to X$.
\begin{diagram}
X
&
\Delta_{g_1}(B)
\arrow[l, "g_2"']
\arrow[r]
\arrow[d, "\Delta_{g_1}(f)"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
B
\arrow[d, "f"]
\\
&
Y
\arrow[r, "g_1"']
&
A
\end{diagram}
~\qed
\end{lemma}
The following lemma of a similar flavour will also be useful.
\begin{lemma}
\label{lemLemmaElevenPointFive}
Let $f : B \to A$ be a morphism in a locally cartesian closed category $\mathcal{E}$. There is a natural correspondence between morphisms
$$g : Y \to \sum_{a \in A} \sum_{m \in A^{B_a}} \sum_{b \in B_a} B_{m(b)}$$
and quadruples $(g_1,g_2,g_3,g_4)$ of morphisms, with
\begin{itemize}
\item $g_1 : Y \to A$ in $\mathcal{E}$;
\item $g_2 : \Delta_{g_1}(B) \to A$ in $\mathcal{E}$;
\item $g_3 : (Y, g_1) \to (B,f)$ in $\mathcal{E} \slice{A}$; and
\item $g_4 : (\Delta_{g_1}(B), g_2) \to (B, f)$ in $\mathcal{E} \slice{A}$.
\end{itemize}
\end{lemma}
\begin{proof}[Sketch of proof]
The is a direct translation of argument on \cite[pp.~18-19]{Awodey2016NaturalModels} into the more general setting of an arbitrary locally cartesian closed category.
\end{proof}
\begin{definition}[Composition of polynomials \thmcite{GambinoKock2013PolynomialFunctors}]
\label{defCompositionOfPolynomials}
\index{polynomial!composition of {---}s}
The \textbf{polynomial composite} of polynomials $F : \declpoly IBAJsft$ and $G : \declpoly JDCKugv$ in a locally cartesian closed category $\mathcal{E}$ is the polynomial $G \cdot F : \declpoly INMK{s \circ n}{q \circ p}{v \circ w}$ indicated in the following diagram, which is constructed as follows: first take the pullback {\color{blue} (1)}; then form {\color{blue} (2)} from $H \xrightarrow{h} D \xrightarrow{g} C$ as in \Cref{thmDistributivity}; and finally take the pullback {\color{blue} (3)} of $k \circ e$ along $f$.
\begin{ldiagram}
&&
N
\pullbackc{ddr}{0.04}
\arrow[ddl,"n"']
\arrow[r,"p"]
\arrow[ddr,blue,"\text{(3)}" description,draw=none,pos=0.3]
&
L
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r,"q"]
\arrow[d,"e" description]
&
M
\arrow[ddr,"w"]
\arrow[ddl,blue,"\text{(2)}" description,draw=none,pos=0.3]
&
\\
~&~&~&
H
\pullbackc[-45]{dd}{0.05}
\arrow[dr,"h" description]
\arrow[dl,"k" description]
\arrow[dd,blue,"\text{(1)}" description,draw=none]
&~&~&~
\\
&
B
\arrow[r,"f"']
\arrow[dl,"s"']
&
A
\arrow[dr,"t"']
&~&
D
\arrow[dl,"u"]
\arrow[r,"g"']
&
C
\arrow[dr,"v"]
&
\\
I
&~&~&
J
&~&~&
K
\\
\end{ldiagram}
\end{definition}
\begin{numbered}
We will make use of the following explicit descriptions of the objects $H,L,M,N$ in the internal language of $\mathcal{E}$.
\begin{itemize}
\item $H = \sum_{d \in D} A_{u(d)}$;
\item $M = \sum_{c \in C}~\prod_{d \in D_c} A_{u(d)}$;
\item $L = \sum_{(c,m) \in M} D_c$;
\item $N = \sum_{(c,m) \in M}~\sum_{d \in D_c} B_{m(d)}$.
\end{itemize}
The morphisms $e,h,k,n,p,q,w$ are then the appropriate projection morphisms.
\end{numbered}
\begin{theorem}[Extension preserves composition \thmcite{GambinoKock2013PolynomialFunctors}]
\label{thmExtensionPreservesPolynomialComposition}
Let $F : \declpoly IBAJsft$ and $G : \declpoly JDCKugv$ be polynomials in a locally cartesian closed category $\mathcal{E}$. Then $\mathrm{P}_{G \cdot F} \cong \mathrm{P}_G \circ \mathrm{P}_F$, where $\cdot$ represents polynomial composition and $\circ$ represents the usual composition of functors.
\end{theorem}
\begin{proof}
With notation as in \Cref{defCompositionOfPolynomials}, we proceed by calculation.
\begin{align*}
\mathrm{P}_G \circ \mathrm{P}_F
&= \Sigma_v \Pi_g \Delta_u \Sigma_t \Pi_f \Delta_s
&& \text{by \Cref{defExtension}} \\
&\cong \Sigma_v \Pi_g \Sigma_h \Delta_k \Pi_f \Delta_s && \text{by Beck--Chevalley (\Cref{thmBeckChevalley})} \\
&\cong \Sigma_v \Sigma_w \Pi_q \Delta_e \Delta_k \Pi_f \Delta_s && \text{by distributivity (\Cref{thmDistributivity})} \\
&\cong \Sigma_v \Sigma_w \Pi_q \Delta_{k \circ e} \Pi_f \Delta_s && \text{by functoriality} \\
&\cong \Sigma_v \Sigma_w \Pi_q \Pi_p \Delta_n \Delta_s && \text{by Beck--Chevalley} \\
&\cong \Sigma_{v \circ w} \Pi_{q \circ p} \Delta_{s \circ n} && \text{by functoriality} \\
&\cong \mathrm{P}_{G \cdot F} && \text{by \Cref{defExtension,defCompositionOfPolynomials}}
\end{align*}
Each of these isomorphisms is natural and strong.
\end{proof}
\begin{definition}
\label{defMorphismOfPolynomials}
\index{polynomial!morphism of {---}s}
\index{morphism!{---} of polynomials}
Let $F : \declpoly IBAJsft$ and $G : \declpoly IDCJugv$ be polynomials from $I$ to $J$ in $\mathcal{E}$. A \textbf{morphism of polynomials} $\varphi$ from $F$ to $G$ consists of an object $D_{\varphi}$ of $\mathcal{E}$ and a triple $(\varphi_0, \varphi_1, \varphi_2)$ of morphisms in $\mathcal{E}$ fitting into a commutative diagram of the following form, in which the lower square is a pullback:
\begin{diagram}
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
&
A
\arrow[d, equals]
\arrow[dr, bend left=20, "t"]
&
\\
I
&
D_{\varphi}
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r]
\arrow[d,"\varphi_1"']
\arrow[u,"\varphi_2"]
&
A
\arrow[d,"\varphi_0"]
&
J
\\
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
\end{diagram}
We write $\varphi : F \pRightarrow G$ to denote the assertion that $\varphi$ is a morphism of polynomials from $F$ to $G$.
\end{definition}
Each morphism $\varphi : F \pRightarrow G$ of polynomials induces a strong\footnote{Every polynomial functor has a natural \textit{strength}, and the natural candidate for morphisms between polynomial functors are those natural transformations which are comptable with the strength. See \cite{GambinoKock2013PolynomialFunctors} for more on this.} natural transformation $P_F \Rightarrow P_G$, which we shall by abuse of notation also call $\varphi$, whose component at $\vec X = (X_i \mid i \in I)$ can be expressed in the internal language of $\mathcal{E}$ by
$$(\varphi_{\vec X})_j : \sum_{a \in A_j} \prod_{b \in B_a} X_{s(b)} \to \sum_{c \in C_j} \prod_{d \in D_c} X_{u(b)}; \quad (\varphi_{\vec X})_j(a,t) = (\varphi_0(a), t \cdot (\varphi_2)_a \cdot (\varphi_1)_a^{-1})$$
\begin{definition}
\label{defCartesianMorphism}
A morphism $\varphi : F \pRightarrow G$ is \textbf{cartesian} if $\varphi_2$ is invertible.
\end{definition}
As the name suggests, if $\varphi : F \pRightarrow G$ is a cartesian morphism, then the induced strong natural transformation $P_F \Rightarrow P_G$ is cartesian.
\begin{numbered}
\label{rmkCartesianMorphismIsPullbackSquare}
Every cartesian morphism of polynomials has a unique representation as a commutative diagram of the following form.
\begin{equation} \label{diaCartesianMorphism}
\hspace{72pt}
\begin{tikzcd}[row sep=normal, column sep=huge]
&
B
\arrow[dl, bend right=15, "s"']
\arrow[r, "f"]
\arrow[dd, "\varphi_1"']
\pullbackc{ddr}{0.05}
&
A
\arrow[dd, "\varphi_0"]
\arrow[dr, bend left=15, "t"]
&
\\
I
&&&
J
\\
&
D
\arrow[ul, bend left=15, "u"]
\arrow[r, "g"']
&
C
\arrow[ur, bend right=15, "v"']
&
\end{tikzcd}
\end{equation}
Indeed, if $(\varphi_0,\varphi_1,\varphi_2)$ is cartesian, replacing $\varphi_1$ in the above diagram by $\varphi_1 \circ \varphi_2^{-1}$ yields the desired diagram. Conversely, if $(\varphi_0,\varphi_1)$ are as in the above diagram, then $(\varphi_0,\varphi'_1,\varphi'_2)$ is a cartesian morphism of polynomials, where $\varphi'_1 : \Delta_{\varphi_0}D \to D$ is the chosen pullback of $\varphi_0$ along $g$ and $\varphi'_2 : \Delta_{\varphi_0}D \to B$ is the canonical isomorphism induced by the universal property of pullbacks, as illustrated in the following:
\begin{equation} \label{diaCartesianMorphismFromPullbackSquare}
\begin{tikzcd}[row sep=normal, column sep=normal]
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
\arrow[dd, "\varphi_1"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
A
\arrow[dr, bend left=20, "t"]
\arrow[dd, "\varphi_0"]
&
&&
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
&
A
\arrow[d, equals]
\arrow[dr, bend left=20, "t"]
&
\\
I
&&~&
J
&=&
I
&
\Delta_{\varphi_0}D
\pullbackc{dr}{-0.05}
\arrow[r]
\arrow[d,"\varphi'_1"']
\arrow[u,"\varphi'_2", "\scriptsize\cong"']
&
A
\arrow[d,"\varphi_0"]
&
J
\\
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
&&
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
\end{tikzcd}
\end{equation}
Note that, in general, for each diagram of the form \eqref{diaCartesianMorphism}, there are possibly many cartesian morphisms inducing it. Conversely, there are many potential ways of turning a diagram of the form \eqref{diaCartesianMorphism} into a cartesian morphism. Another possibility would be to take the induced cartesian morphism to be $(\varphi_0,\varphi_1,\mathrm{id}_B)$. Theorem \ref{thmPolyECartTrivial} below implies that these are essentially equivalent.
In particular, when $I=J=1$, we can regard pullback squares as cartesian morphisms in a canonical way.
\end{numbered}
We are now ready to assemble polynomials into a bicategory (and polynomial functors into a $2$-category). In fact, as proved in \cite{GambinoKock2013PolynomialFunctors}, more is true:
\begin{theorem}
\label{thmPolyEBicategory}
Let $\mathcal{E}$ be a locally cartesian closed category.
\begin{enumerate}[(a)]
\item There is a bicategory $\mathbf{Poly}_{\mathcal{E}}$ whose 0-cells are the objects of $\mathcal{E}$, whose 1-cells are polynomials in $\mathcal{E}$, and whose 2-cells are morphisms of polynomials.
\item There is a $2$-category $\mathbf{PolyFun}_{\mathcal{E}}$ whose 0-cells are the slices $\mathcal{E} \slice{I}$ of $\mathcal{E}$, whose 1-cells are polynomial functors, and whose 2-cells are strong natural transformations.
\item Extension defines a biequivalence $\mathrm{Ext} : \mathbf{Poly}_{\mathcal{E}} \xrightarrow{\simeq} \mathbf{PolyFun}_{\mathcal{E}}$.
\item Parts (a)--(c) hold true if we restrict the 1-cells to \textit{cartesian} morphisms of polynomials in $\mathbf{Poly}_{\mathcal{E}}$ and \textit{cartesian} strong natural transformations in $\mathbf{PolyFun}_{\mathcal{E}}$; thus there is a bicategory $\mathbf{Poly}\cart_{\mathcal{E}}$ and a $2$-category $\mathbf{PolyFun}\cart_{\mathcal{E}}$, which are biequivalent.
\end{enumerate}
\end{theorem}
We finish this section with the following technical lemma, which will simplify matters for us greatly down the road as it allows us in most instances to prove results about polynomials in the case when $I=J=1$.
\begin{theorem}
\label{lemPolynomialsFromOneToOne}
For fixed objects $I$ and $J$ of a locally cartesian closed category $\mathcal{E}$, there are full and faithful functors
$$S : \mathbf{Poly}_{\mathcal{E}}(I,J) \to \mathbf{Poly}_{\mathcal{E}\slice{I \times J}}(1,1) \quad \text{and} \quad S\cart : \mathbf{Poly}\cart_{\mathcal{E}}(I,J) \to \mathbf{Poly}\cart_{\mathcal{E} \slice{I \times J}}(1,1)$$
\end{theorem}
\begin{proof}[Proof sketch]
Given a polynomial $F : \declpoly IBAJsft$, define $S(F) = \langle s , f \rangle : B \to I \times A$ over $I \times J$ (considered as a polynomial $1 \pto 1$ in $\mathcal{E} \slice{I \times J}$) as in
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
B
\arrow[rr, "{\langle s, f \rangle}"]
\arrow[dr, "{\langle s, t \circ f \rangle}"']
&&
I \times A
\arrow[dl, "{\mathrm{id}_I \times t}"]
\\
&
I \times J
&
\end{tikzcd}
\end{center}
Given a morphism of polynomials $\varphi : F \pRightarrow G$, as in
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
&
A
\arrow[d, equals]
\arrow[dr, bend left=20, "t"]
&
\\
I
&
D_{\varphi}
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r]
\arrow[d,"\varphi_1"']
\arrow[u,"\varphi_2"]
&
A
\arrow[d,"\varphi_0"]
&
J
\\
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
\end{tikzcd}
\end{center}
define $S(\varphi) = (\mathrm{id}_I \times \varphi_0, \varphi_1, \varphi_2) : S(F) \pRightarrow S(G)$, as in the following diagram, where we consider $E$ as an object over $I \times J$ via $\langle s \circ \varphi_2, t \circ f \circ \varphi_2 \rangle : E \to I \times J$.
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
B
\arrow[r,"{\langle s, f \rangle}"]
&
I \times A
\arrow[d, equals]
\\
D_{\varphi}
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r]
\arrow[d,"\varphi_1"']
\arrow[u,"\varphi_2"]
&
I \times A
\arrow[d,"{\mathrm{id}_I \times \varphi_0}"]
\\
D
\arrow[r,"{\langle u, g \rangle}"']
&
I \times C
\end{tikzcd}
\end{center}
It is easy to see that $\mathrm{id}_I \times \varphi_0$, $\varphi_1$ and $\varphi_2$ are morphisms over $I \times J$ and that the lower square of the above diagram truly is cartesian, so that $S(\varphi)$ is a morphism in $\mathbf{Poly}_{\mathcal{E} \slice{I \times J}}(1,1)$. Verifying functoriality, fullness and faithfulness of $S$ is elementary but tedious.
That $S$ restricts to a full and faithful functor $S\cart : \mathbf{Poly}\cart_{\mathcal{E}}(I,J) \to \mathbf{Poly}\cart_{\mathcal{E}\slice{I \times J}}(1,1)$ is immediate, since $S(\varphi)$ is cartesian if and only if $\varphi_2$ is invertible, which holds if and only if $\varphi$ is cartesian.
\end{proof}
\chapter*{Abstract}
\markboth{Abstract}{}
\addcontentsline{toc}{chapter}{Abstract}
\input{thesis/frontmatter/abstract.tex}
\chapter*{Acknowledgements}
\markboth{Acknowledgements}{}
\addcontentsline{toc}{chapter}{Acknowledgements}
\input{thesis/frontmatter/acknowledgements.tex}
\subsection*{Outline of the thesis}
In \Cref{chBackground} we provide the fundamental definitions and results underlying the rest of the thesis. We begin with an informal overview of dependent type theory in \Cref{secTypesForTheWorkingMathematician}, followed by a review of polynomials and locally cartesian closed categories in \Cref{secLocallyCartesianClosedCategories} and of presheaves and representability in \Cref{secPresheavesRepresentability}. I do not claim originality for any of the definitions or results in these sections.
\Cref{chCategoriesOfNaturalModels} focuses on natural models in their capacity as models of an essentially algebraic theory. In \Cref{secNaturalModels} we recall the basic definitions and results from \cite{Awodey2016NaturalModels}, before explicitly spelling out the essentially algebraic theories of natural models and of natural models admitting certain type theoretic structure in \Cref{secEssentiallyAlgebraicTheory}, and discussing morphisms of natural models in \Cref{secHomomorphisms}. The goal of this chapter is to provide an explicit demonstration that the convenient, functorial characterisation of natural models as representable natural transformations captures the essentially algebraic notion.
In \Cref{chPolynomialsRepresentability} we enter the realm of locally cartesian closed categories, now viewing natural models in their capacity as polynomials. In \Cref{secInternalCategories} we connect natural models with the theory of internal categories, in particular exploring the properties of their associated full internal subcategory. We build upon this in \Cref{secPolynomialPseudomonads} by using the perspective of internal categories to motivate the definition of a notion of 3-cell in a \textit{tricategory} of polynomials, which allows us to extract a sense in which a natural model admitting a unit type, dependent sum types and dependent product types gives rise to a polynomial pseudomonad and pseudoalgebra. In \Cref{secCharacterisationsOfRepresentability}, we explore the properties possessed by representable natural transformations which can be expressed internally to a locally cartesian closed category.
We sink our teeth into the semantics of dependent type theory in \Cref{chSemantics}, in which we discuss the matter of building the free natural model of a dependent type theory. After introducing the problem and building a free natural model on a very basic type theory in \Cref{secInterpretationsInitiality}, we proceed to discuss how to algebraically freely admit new type theoretic structure to a natural model in \Cref{secExtTerm,secExtType,secExtUnit,secExtSigma}.
A mathematician's work is never done, and this thesis is no exception---in \Cref{chReflection} we discuss some possible directions for future research that are suggested by the work in this thesis.
\subsection*{A remark on foundations}
The official metatheory of this thesis is Zermelo--Fraenkel set theory with the axiom of choice ({\scshape zfc}) together with a fixed \textbf{Grothendieck universe}\index{universe!Grothendieck ---}\label{parGrothendieckUniverses} $\mathfrak{U}$, which is a transitive set containing the von Neumann ordinal $\omega$ and closed under taking power sets and under unions indexed by sets in $\mathfrak{U}$. We will omit reference to $\mathfrak{U}$ by referring to those sets which are elements of $\mathfrak{U}$ as \textbf{small sets}\index{small!{---} set} and to those which are not as \textbf{large sets}. We remark that $\mathfrak{U}$ is itself a model of {\scshape zfc}, and its existence is equivalent (under {\scshape zfc}) to the existence of a strongly inaccessible cardinal. This is one of many solutions to the issues of size arising in category theory---a discussion in far more depth can be found in \cite{Shulman2008SetTheory}---though our results do not depend on which solution is chosen.
\subsection*{Conventions on notation and terminology}
Categories will typically be denoted using calligraphic font $\mathcal{C}, \mathcal{D}, \dots$, but \textit{small}\index{small!{---} category} categories---that is, those whose sets of objects and of morphisms are small---will typically be denoted using blackboard bold font $\mathbb{C}, \mathbb{D}, \dots$.
When working in an $n$-category (strict or otherwise) for $n>1$, the $n$-cells will be denoted by arrows with $n$ horizontal lines. Thus for example a natural transformation from a functor $F$ to a parallel functor $G$ will be denoted by $\varphi : F \Rightarrow G$, and its components by $\varphi_C : F(C) \to G(C)$.
\subsection*{Constructions and verifications}
On many occasions in the thesis, we will define a mathematical object and then prove that it behaves as we say it does. Rather than separating the definition from the theorem proving that the definition makes sense, we combine the two into a single `construction', which reads like a definition of an object, with a subsequent `verification', which reads like a proof that the object we defined behaves as required. See \Cref{cnsPresheafOfTypeTermTrees}, for instance.
\subsection*{Supporting references}
We will assume basic results from category theory and type theory. Useful references for category theory include \cite{MacLane1971CWM} and \cite{Awodey2010CategoryTheory}, references for type theory include \cite{MartinLof1984Intuitionistic} and \cite{HoTTBook2013}, and discussions of categorical models of type theory can be found in \cite{Jacobs1999CategoricalLogic} and \cite{Johnstone2002Elephant}. The results in \Cref{secPolynomialPseudomonads} appear in \cite{AwodeyNewstead2018PolynomialPseudomonads}.
\section{Representability revisited}
\label{secCharacterisationsOfRepresentability}
\index{representable!natural transformation@{---} natural transformation}
\subsection*{Representability and cocontinuity}
The first goal of this section is to identify a condition for a natural transformation $p : \nmtm{U} \to \nmty{U}$ between presheaves over a small category $\mathbb{C}$ to be representable in terms of cocontinuity of its polynomial extension $\mathrm{P}_p : \widehat{\mathbb{C}} \to \widehat{\mathbb{C}}$. We will prove that if $p$ is representable, then $\mathrm{P}_p$ is cocontinuous. For the converse, we will need to assume some conditions on the base category $\mathbb{C}$, namely that it is Cauchy complete and has finite products.
We begin with a discussion of Cauchy completeness and its relation to so-called \textit{tiny} objects in presheaf categories. This matter is confused somewhat by the fact that there are different notions of tininess and, even more confusingly, different words have been used by different authors to refer to the same notion of tininess, and different notions of tininess have been referred to by different authors by the same word! With this in mind, we will first fix our own terminology.
\begin{definition}[Tiny and atomic objects]
\index{tiny object}
\index{atomic object}
Let $\mathcal{E}$ be a locally small, cocomplete, locally cartesian closed category and let $X$ be an object of $\mathcal{E}$. Then:
\begin{enumerate}[(i)]
\item $X$ is \textbf{internally atomic} if $(-)^X : \mathcal{E} \to \mathcal{E}$ has a right adjoint;
\item $X$ is \textbf{internally tiny} if $(-)^X : \mathcal{E} \to \mathcal{E}$ is cocontinuous;
\item $X$ is \textbf{externally atomic} if $\mathcal{E}(X,{-}) : \mathcal{E} \to \mathbf{Set}$ has a right adjoint;
\item $X$ is \textbf{externally tiny} if $\mathcal{E}(X,{-}) : \mathcal{E} \to \mathbf{Set}$ is cocontinuous.
\end{enumerate}
\end{definition}
Condition (i) goes back to William Lawvere, who referred to the right adjoint to the functor $(-)^X$ as the \textit{amazing right adjoint}. An object satisfying (i) is called \textit{infinitesimal} by Lawvere \cite{Lawvere1980Dynamics}, \textit{atomic} by Anders Kock \cite{Kock1981SDG} and \textit{tiny} by David Yetter \cite{Yetter1987RightAdjoints}. An object satisfying condition (iv) is called an \textit{atom} by Marta Bunge \cite{Bunge1965Thesis} and is called \textit{small-projective} by Max Kelly \cite{Kelly1982BasicConcepts}.
\begin{numbered}
When $\mathcal{E} = \widehat{\mathbb{C}}$ for some small category $\mathbb{C}$, it follows from Freyd's adjoint functor theorem that each of the functors $(-)^X$ and $\widehat{\mathbb{C}}(X,{-})$ is cocontinuous if and only if it has a right adjoint. Thus a presheaf is internally atomic (in $\widehat{\mathbb{C}}$) if and only if it is internally tiny, and is externally atomic if and only if it is externally tiny. For this reason, since we will focus on presheaves from now on, we will simply use the term \textit{internally tiny} to refer to conditions (i) and (ii) together, and \textit{externally tiny} to refer to conditions (iii) and (iv) together.
\end{numbered}
\newpage
\begin{definition}[Cauchy complete category, \thmcite{Borceux1986CauchyCompletion}]
\index{Cauchy complete category}
\index{category!Cauchy complete {---}}
A category $\mathcal{C}$ is \textbf{Cauchy complete} if every idempotent in $\mathcal{C}$ splits---that is, if for each $e : A \to A$ in $\mathcal{C}$ such that $e \circ e = e$, there exists a factorisation of $e$ in $\mathcal{C}$ as $A \xrightarrow{r} B \xrightarrow{i} A$ such that $r \circ i = \mathrm{id}_B$.
\end{definition}
\begin{numbered}
\label{parTinyObjects}
We briefly recall some results from \cite[\S{}5.5]{Kelly1982BasicConcepts}, \cite{Borceux1986CauchyCompletion} and \cite{Yetter1987RightAdjoints} concerning tiny objects and Cauchy completions. A presheaf $X : \mathbb{C}\op \to \mathbf{Set}$ over a small category $\mathbb{C}$ is externally tiny in $\widehat{\mathbb{C}}$ if and only if it is a retract of a representable functor. Writing $\bar{\mathbb{C}}$ for the full subcategory of $\widehat{\mathbb{C}}$ whose objects are the retracts of representable functors, we have that $\bar{\mathbb{C}}$ is small and the Yoneda embedding $\Yon : \mathbb{C} \hookrightarrow \widehat{\mathbb{C}}$ factors through the embedding $\mathsf{k} : \mathbb{C} \hookrightarrow \bar{\mathbb{C}}$. The category $\bar{\mathbb{C}}$ is the Cauchy completion of $\mathbb{C}$; moreover, the functor $\mathsf{k}^* : \widehat{\bar{\mathbb{C}}} \to \widehat{\mathbb{C}}$ is an equivalence of categories, and if $\mathbb{C}$ has finite products then so does $\bar{\mathbb{C}}$. A category $\mathbb{C}$ is Cauchy complete if and only if $\mathsf{k}$ itself is an equivalence. In particular, a category $\mathbb{C}$ is Cauchy complete if and only if the externally tiny objects of $\widehat{\mathbb{C}}$ are exactly the representable functors. If $\mathbb{C}$ is Cauchy complete and has a terminal object, then externally tiny objects are internally tiny; the converse holds if $\mathbb{C}$ has finite products.
\end{numbered}
\begin{theorem}[Characterisation of representability by cocontinuity]
\label{thmRepresentabilityAndContinuityOfExtension}
Let $\mathbb{C}$ be a small category and let $p : \nmtm{U} \to \nmty{U}$ be a natural transformation between presheaves over $\mathbb{C}$.
\begin{enumerate}[(a)]
\item If $p$ is representable, then its extension $\mathrm{P}_p : \widehat{\mathbb{C}} \to \widehat{\mathbb{C}}$ is cocontinuous.
\item If the extension $\mathrm{P}_p : \widehat{\mathbb{C}} \to \widehat{\mathbb{C}}$ of $p$ is cocontinuous and $\mathbb{C}$ is Cauchy complete with finite products, then $p$ is representable.
\end{enumerate}
\end{theorem}
\begin{proof}
By \Cref{lemLemmaFive}, for each $\Gamma \in \mathrm{ob}(\mathbb{C})$, there is a natural (in $X$ and in $\Gamma$) bijection
$$\mathrm{P}_p(X)(\Gamma) = \left( \sum_{A \in \nmty{U}} X^{[A]} \right)(\Gamma) \cong \sum_{A \in \nmty{U}(\Gamma)} \widehat{\mathbb{C}}(\Delta_A(\nmtm{U}), X)$$
If $p$ is representable, then $\Delta_A(\nmtm{U}) \cong \Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ for some object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ of $\mathbb{C}$, so $\Delta_A(\nmtm{U})$ is externally tiny and we see that $\mathrm{P}_p$ preserves colimits. This proves (a).
Conversely, if $\mathrm{P}_p$ preserves colimits then so does $\Pi_p$, so that $\Delta_A(\nmtm{U})$ is internally tiny. If $\mathbb{C}$ is Cauchy complete and has finite products, then as discussed above we have that $\Delta_A(\nmtm{U}) \cong \Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ for some object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ of $\mathbb{C}$, so that $p$ is representable. This proves (b).
\end{proof}
\begin{corollary}
Let $\mathbb{C}$ be a small category with finite products and let $p : \nmtm{U} \to \nmty{U}$ be a natural transformation between presheaves over $\mathbb{C}$ such that $\mathrm{P}_p : \widehat{\mathbb{C}} \to \widehat{\mathbb{C}}$ is cocontinuous. By transporting $p$ along the equivalence $\widehat{\mathbb{C}} \simeq \widehat{\bar{\mathbb{C}}}$ discussed in \Cref{parTinyObjects}, we obtain a \textit{representable} natural transformation $\bar p$ between presheaves over $\bar{\mathbb{C}}$.
\end{corollary}
\begin{proof}
Note that $\mathrm{P}_{\bar p} : \widehat{\bar{\mathbb{C}}} \to \bar{\mathbb{C}}$ is cocontinuous since $\mathsf{k}^* : \widehat{\bar{\mathbb{C}}} \to \widehat{\mathbb{C}}$ is an equivalence. Since $\mathbb{C}$ has finite products, so does $\bar{\mathbb{C}}$, and since $\bar{\mathbb{C}}$ is Cauchy complete, it follows from \Cref{thmRepresentabilityAndContinuityOfExtension} that $\bar p$ is representable.
\end{proof}
\begin{numbered}
In \cite[Theorem 5.26]{Kelly1982BasicConcepts} it is proved that a category $\mathcal{E}$ is equivalent to the category $\widehat{\mathbb{C}}$ of presheaves on a small category $\mathbb{C}$ if and only if $\mathcal{E}$ is cocomplete and there is a small set of tiny objects constituting a strong generator of $\mathcal{E}$. The category $\mathbb{C}$ is obtained as the full subcategory of $\mathcal{E}$ determined by this set of tiny objects.
\end{numbered}
\subsection*{Representability and full internal categories}
\begin{numbered}
\label{parComprehensionCategoryFromFullInternalSubcategory}
We recall from \cite[\S{}4]{Jacobs1993ComprehensionCategories} and \cite[\S{}7]{Jacobs1999CategoricalLogic} some facts about full internal subcategries. Given any morphism $f : B \to A$ of a locally cartesian closed category $\mathcal{E}$, the full internal subcategory $\fisc{f}$ of $\mathcal{E}$ (\Cref{cnsFullInternalSubcategory}) gives rise to a fibration $\mathbb{E}(f) \to \mathcal{E}$ together with a full and faithful cartesian functor $\mathbb{E}(f) \to \mathcal{E}^{\to}$ over $\mathcal{E}$.
\begin{diagram}
\mathbb{E}(f)
\arrow[rr]
\arrow[dr, "\pi"']
&[-20pt]&[-20pt]
\mathcal{E}^{\to}
\arrow[dl, "\mathsf{cod}"]
\\
&
\mathcal{E}
&
\end{diagram}
The category $\mathbb{E}(f)$ is the \textit{externalisation} of $\mathbb{S}(f)$, which can be described as follows.
\begin{itemize}
\item The objects of $\mathbb{E}(f)$ are morphisms $x : X \to \fisc{f}_0 = A$ in $\mathcal{E}$;
\item Given $x : X \to A$ and $y : Y \to A$, a morphism from $x$ to $y$ in $\mathbb{E}(p)$ is a pair $(\sigma, h)$ consisting of a morphism $\sigma : X \to Y$ in $\mathcal{E}$ and a morphism $\Delta_x(f) \to \Delta_{y \circ \sigma}(f)$ in $\mathcal{E} \slice{X}$.
\end{itemize}
The fibration $\pi : \mathbb{E}(f) \to \mathcal{E}$ sends each object $x : X \to A$ to its domain $X$ and each morphism $(\sigma, h)$ to its first component $\sigma$; and the cartesian functor $\mathbb{E}(f) \to \mathcal{E}^{\to}$ sends an object $x : X \to A$ of $\mathbb{E}(f)$ to the morphism $\Delta_f(x) : \Delta_f(B) \to X$ and a morphism $(\sigma, h) : x \to y$ to the square described by $\sigma$ and $h$.
When $p : \nmtm{U} \to \nmty{U}$ is a natural transformation between presheaves over a small category $\mathbb{C}$, this construction gives rise to a full and faithful fibred functor $\mathbb{E}(p) \to \widehat{\mathbb{C}}^{\to}$ over $\widehat{\mathbb{C}}$. The fibre $\mathbb{E}(p)_{\Yon(\Gamma)}$ over a representable presheaf $\Yon(\Gamma)$ is then exactly the (external) category $\mathbb{S}(p)(\Gamma)$ obtained by applying the data defining $\mathbb{S}(p) \in \mathbf{Cat}(\widehat{\mathbb{C}})$ to the object $\Gamma$ of $\mathbb{C}$. By pulling back $\pi : \mathbb{E}(p) \to \widehat{\mathbb{C}}$ along the Yoneda embedding $\Yon : \mathbb{C} \to \widehat{\mathbb{C}}$, we obtain a fibration $\pi' : \mathbb{E}'(p) \to \mathbb{C}$, where $\mathbb{E}'(p)_{\Gamma} = \mathbb{E}(p)_{\Yon(\Gamma)}$. By abuse of notation, we will simply write $\pi : \mathbb{E}(p) \to \mathbb{C}$ for this fibration.
\end{numbered}
We prove in \Cref{thmRepresentabilityFromFISC} that representability of $p$ can be characterised by the existence of a full and faithful fibred functor (over $\mathbb{C}$) from $\mathbb{E}(p)$ to the full subcategory of $\mathbb{C}^{\to}$ determined by the morphisms in $\mathbb{C}$ classified by $p$ (\Cref{defMorphismClassifiedByNM}). First, we remark that the codomain fibration restricts to this subcategory.
\begin{definition}
\label{defMorphismClassifiedByNM}
\index{morphism!classified@{---} classified by a natural transformation}
Let $p : Y \to X$ be a natural transformation between presheaves over a small category $\mathbb{C}$. We say a morphism $\sigma : \Delta \to \Gamma$ of $\mathbb{C}$ is \textbf{classified by $p$} if $\Yon(\sigma) : \Yon(\Delta) \to \Yon(\Gamma)$ arises as a pullback of $p$ in $\widehat{\mathbb{C}}$. Write $\mathcal{F}_p$ to denote both the set of morphisms of $\mathbb{C}$ classified by $p$, and the corresponding full subcategory of $\mathbb{C}^{\to}$.
\end{definition}
\begin{lemma}
\label{lemClassificationOfMorphismsClassifiedByNM}
Let $(\mathbb{C}, p)$ be a natural model and let $\sigma : \Gamma' \to \Gamma$ in $\mathbb{C}$. Then $\sigma \in \mathcal{F}_p$ if and only if there is an isomorphism $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, \nmp{A}) \to (\Gamma',\sigma)$ in $\mathbb{C} \slice{\Gamma}$ for some $A \in \nmty{U}(\Gamma)$.
\end{lemma}
\begin{proof}
The morphism $\sigma$ is classified by $p$ if and only if there exist $A \in \nmty{U}(\Gamma)$ and $a \in \nmtm{U}(\Delta, A[\sigma])$ such that the following square is a pullback.
\begin{diagram}
\Yon(\Delta)
\arrow[r, "a"]
\arrow[d, "\Yon(\sigma)"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Gamma)
\arrow[r, "A"']
&
\nmty{U}
\end{diagram}
By representability of $p$, the natural transformation $\Yon(\nmp{A})$ is also a pullback of $p$, hence the result follows from the universal property of pullbacks together with the fact that the Yoneda embedding is full and faithful.
\end{proof}
\begin{lemma}[Classified morphisms yield a fibration]
Let $\mathbb{C}$ be a small category and $p : \nmtm{U} \to \nmty{U}$ be a natural transformation between presheaves over $\mathbb{C}$. The codomain functor $\mathcal{F}_p \to \mathbb{C}$ is a Grothendieck fibration.
\end{lemma}
\begin{proof}
It suffices to prove that pullbacks of morphisms in $\mathcal{F}_p$ along arbitrary morphisms of $\mathbb{C}$ exist and are in $\mathcal{F}_p$. To this end, let $\gamma : \Gamma' \to \Gamma \in \mathcal{F}_p$ and let $\sigma : \Delta \to \Gamma$ be a morphism in $\mathbb{C}$. By \Cref{lemClassificationOfMorphismsClassifiedByNM}, there is an isomorphism $\theta : (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, \nmp{A}) \cong (\Gamma', \sigma)$ in $\mathbb{C} \slice{\Gamma}$. Now consider the following diagram
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]
\arrow[r, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
\arrow[d, "\nmp{\sigma}"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[r, "\theta", "\cong"']
\arrow[d, "\nmp{A}" description]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\Gamma'
\arrow[d, "\gamma"]
\\
\Delta
\arrow[r, "\sigma"']
&
\Gamma
\arrow[r, equals]
&
\Gamma
\end{diagram}
The square on the left is a canonical pullback square (\Cref{cnsCanonicalPullbacks}) and the square on the right is a pullback since it commutes and $\theta$ is an isomorphism, so that the outer square is a pullback. But then $(\sigma, \theta \circ (\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A))$ is a cartesian lift of $\sigma$.
\end{proof}
\begin{theorem}[Characterisation of representability from full internal subcategories]
\label{thmRepresentabilityFromFISC}
Let $\mathbb{C}$ be a small category and let $p : \nmtm{U} \to \nmty{U}$ be a natural transformation between presheaves over $\mathbb{C}$. Then $p$ is representable if and only if there is a fibred equivalence $\chi : \mathbb{E}(p) \to \mathcal{F}_p$ over $\mathbb{C}$.
\begin{diagram}
\mathbb{E}(p)
\arrow[dr, "\pi"']
\arrow[rr, "\chi", "\simeq"']
&&
\mathcal{F}_p
\arrow[dl, "\mathsf{cod}"]
\\
&
\mathbb{C}
&
\end{diagram}
\end{theorem}
\begin{proof}
($\Leftarrow$) Suppose there is a fibred equivalence $\chi : \mathbb{E}(p) \to \mathcal{F}_p$, and let $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$. Then $A \in \mathrm{ob}(\mathbb{E}(p)_{\Gamma})$, so that $\chi_{\Gamma}(A) \in (\mathcal{F}_p)_{\Gamma}$. Define $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathrm{dom}(\chi_{\Gamma}(A))$ and $\nmp{A} = \chi_{\Gamma}(A)$. Since $\nmp{A} \in \mathcal{F}_p$, there is a morphism $\nmq{A} : \Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to \nmtm{U}$ making the following square a pullback
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "\nmq{A}"]
\arrow[d, "\nmp{A}"']
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Gamma)
\arrow[r, "A"']
&
\nmty{U}
\end{diagram}
This demonstrates that $p$ is representable, and that specifying $\chi$ gives rise to representability data for a natural model $(\mathbb{C}, p)$.
($\Rightarrow$) Suppose $p$ is representable. Representability of $p$ is equivalent to the existence, for each object $\Gamma$ of $\mathbb{C}$ and element $A \in \nmty{U}(\Gamma)$, of a morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ of $\mathbb{C}$ such that $\Yon(\nmp{A})$ is a pullback of $p$. Let the action of $\chi$ on objects choose such a morphism for each pair $(\Gamma, A)$. By \Cref{lemMorphismsOfAssociatedFISC} and by definition of $\mathbb{E}(p)$, morphisms from $A \in \nmty{U}(\Delta)$ to $B \in \nmty{U}(\Gamma)$ in $\mathbb{E}(p)$ correspond naturally with pairs $(\sigma, \tau)$, where $\sigma : \Delta \to \Gamma$ is a morphism of $\mathbb{C}$ and $\tau$ is a morphism from $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma], \nmp{A[\sigma]})$ to $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B, \nmp{A})$ in $\mathbb{C} \slice{\Gamma}$; but this correspondence precisely gives us the action of $\chi$ on morphisms and tells us that it is full and faithful (since the correspondence is bijective) and fibred over $\Gamma$ (since the codomain is respected). Moreover, $\chi$ is essentially surjective: given $\sigma : \Gamma' \to \Gamma \in \mathrm{ob}(\mathcal{F}_p)$, it follows from \Cref{lemClassificationOfMorphismsClassifiedByNM} that for some $A \in \nmty{U}(\Gamma)$ we have $\sigma \cong \chi(\Gamma, A)$ in $\mathcal{F}_p$.
\end{proof}
\begin{corollary}
Specifying a natural model $(\mathbb{C}, p)$ is equivalent to specifying a category $\mathbb{C}$ with a terminal object $\diamond$, a natural transformation $p : \nmtm{U} \to \nmty{U}$ between presheaves over $\mathbb{C}$, and a fibred equivalence $\mathbb{E}(p) \to \mathcal{F}_p$ over $\mathbb{C}$. \qed
\end{corollary}
\subsection*{Closure properties of representable natural transformations}
\begin{theorem}[Closure properties of representable natural transformations]
\label{thmClosurePropertiesOfRepresentability}
Let $\mathbb{C}$ be a small category. The class $\mathcal{R} \subseteq \mathbb{C}^{\to}$ of all representable natural transformations over $\mathbb{C}$ enjoys the following closure properties:
\begin{enumerate}[(a)]
\item $\mathcal{R}$ is closed under composition in $\widehat{\mathbb{C}}$;
\item $\mathcal{R}$ is closed under pullbacks (in $\widehat{\mathbb{C}}$) along arbitrary morphisms of $\widehat{\mathbb{C}}$;
\item $\mathcal{R}$ is closed under polynomial composition in $\widehat{\mathbb{C}}$;
\item $\mathcal{R}$ is closed under isomorphisms in $\widehat{\mathbb{C}}^{\to}$;
\item $\mathcal{R}$ is closed under (small) coproducts in $\widehat{\mathbb{C}}^{\to}$.
\end{enumerate}
\end{theorem}
\begin{proof} ~
\begin{enumerate}[(a)]
\item
Let $p : Y \to X$ and $q : Z \to Y$ be representable natural transformations and let $C \in \mathrm{ob}(\mathbb{C})$ and $x \in X(C)$. Using representability of $p$ and of $q$, construct the following diagram in which the top and bottom squares are pullbacks.
\begin{diagram}
\Yon(E)
\arrow[r, "z"]
\arrow[d, "g"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
Z
\arrow[d, "q"]
\\
\Yon(D)
\arrow[r, "y" description]
\arrow[d, "f"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
Y
\arrow[d, "p"]
\\
\Yon(C)
\arrow[r, "x"']
&
X
\end{diagram}
By the two pullbacks lemma, the outer square is a pullback, so that $p \circ q$ is representable.
\item
Let $p : Y \to X$ be a representable natural transformation and let $f,g,q$ be natural transformations fitting into the following pullback square.
\begin{diagram}
Y'
\arrow[r, "g"]
\arrow[d, "q"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
Y
\arrow[d, "p"]
\\
X'
\arrow[r, "f"']
&
X
\end{diagram}
Let $C \in \mathrm{ob}(\mathbb{C})$ and $x \in X'(C)$. Then $f_C(x) \in X(C)$, so there exist $D \in \mathrm{ob}(\mathbb{D})$, $y \in Y(D)$ and $f : D \to C$ in $\mathbb{C}$ making the outer square of the following diagram a pullback.
\begin{diagram}
\Yon(D)
\arrow[d, "\Yon(f)"']
\arrow[r, dashed, "y'" description]
\arrow[rr, bend left=15, "y"]
&
Y'
\arrow[r, "g" description]
\arrow[d, "q"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
Y
\arrow[d, "p"]
\\
\Yon(C)
\arrow[r, "x"']
&
X'
\arrow[r, "f"']
&
X
\end{diagram}
By the universal property of pullbacks, there is an element $y' \in Y'(D)$ fitting into the diagram as indicated with the dashed morphism, making the left square a pullback by the two pullbacks lemma. Hence $q$ is representable.
\item
Let $p : Y \to X$ and $q : V \to U$ be representable natural transformations. As described in \Cref{defCompositionOfPolynomials}, the polynomial composite $q \cdot p$ obtained by composing a pullback of $p$ with a pullback of $q$; by parts (a) and (b), it follows that $q \cdot p$ is representable.
\item
An isomorphism in $\widehat{\mathbb{C}}^{\to}$ is, in particular, a pullback square, so if $p : Y \to X$ is representable and $q : V \to U$ is isomorphic to $p$ in $\widehat{\mathbb{C}}^{\to}$, then $q$ is representable by part (b).
\item
Let $I$ be a set and let $\seqbn{p_i : Y_i \to X_i}{i \in I}$ be an $I$-indexed family of representable natural transformations. Let $p : Y \to X$ be their coproduct, i.e.
$$p = \sum_{i \in I} p_i : \sum_{i \in I} Y_i \to \sum_{i \in I} X_i$$
Let $C \in \mathrm{ob}(\mathbb{C})$ and let $x \in X(C)$. Then $x = (i,x')$ for some $i \in I$ and $x' \in X_i(C)$. By representability of $p_i$, there exist $D \in \mathrm{ob}(\mathbb{C})$, $y' \in Y_i(D)$ and $f : D \to C$ in $\mathbb{C}$ making the left square in the following diagram a pullback.
\begin{diagram}
\Yon(D)
\arrow[r, "y'"]
\arrow[d, "\Yon(f)"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
Y_i
\arrow[d, "p_i" description]
\arrow[r, "\iota_i"]
&
Y
\arrow[d, "p"]
\\
\Yon(C)
\arrow[r, "x'" description]
\arrow[rr, bend right=15, "x"']
&
X_i
\arrow[r, "\iota_i" description]
&
X
\end{diagram}
Checking that the outer square is a pullback is a straightforward verification of the universal property of pullbacks. Hence $p$ is representable.
\end{enumerate}
\end{proof}
We know by \Cref{thmClosurePropertiesOfRepresentability}(c) that the composite of two representable natural transformations is representable. By chasing the representability data through the respective proofs that pullbacks and composites of representable natural transformations are representable, we obtain the following construction of the \textit{polynomial composite} of natural models.
\begin{construction}[Polynomial composite of natural models]
\label{cnsPolynomialCompositeOfNaturalModels}
\index{polynomial!composite of natural models@{---} composite of natural models}
\index{natural model!polynomial composite of {---}s}
Fix a small category $\mathbb{C}$. The \textbf{polynomial composite} of natural models $(\mathbb{C}, p)$ and $(\mathbb{C}, q)$ is the natural model $(\mathbb{C}, q \cdot p)$ with representability data given by
\begin{itemize}
\item \textbf{Context extension.} The extension of $\Gamma \in \mathrm{ob}(\mathbb{C})$ by $(A,B) \in \sum_{A : \nmty{V}} \nmty{U}^{\langle A \rangle}$ is given by $(\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B$;
\item \textbf{Projection.} The projection $(\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B \to \Gamma$ is given by the composite
$$\nmu{A} \circ \nmp{B} : (\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B \xrightarrow{\nmp[\Gamma \cext A]{B}} \Gamma \cext A \xrightarrow{\nmu[\Gamma]{A}} \Gamma$$
\item \textbf{Variable.} The new variable term in context $(\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B$ is $(A, B, \nmv[\Gamma]{A}, \nmq[\Gamma \cext A]{B})$.
\end{itemize}
\end{construction}
\begin{verification}
Using \Cref{defCompositionOfPolynomials}, we can express the polynomial composite $q \cdot p$ as the regular composite $r \circ r'$ of morphisms in $\mathcal{E}$ indicated in the following commutative diagram, in which the unlabelled arrows are the appropriate projection morphisms.
\begin{ldiagram}
&
\sum_{A,B} \sum_{a \in \langle A \rangle} [B(a)]
\arrow[ddl]
\arrow[r, "r'"]
&
\sum_{A,B} \langle A \rangle
\arrow[r, "r"]
\arrow[d]
&
\sum_{A : \nmty{V}} \nmty{U}^{\langle A \rangle}
\arrow[ddr]
&
\\
&&
\nmty{U} \times \nmtmalt{V}
\arrow[dr]
\arrow[dl]
&&
\\
\nmtm{U}
\arrow[r,"p"']
&
\nmty{U}
&&
\nmtmalt{V}
\arrow[r,"q"']
&
\nmty{V}
\end{ldiagram}
Note that the left- and right-hand `squares' are cartesian, exhibiting $r$ as a pullback of $q$ and $r'$ as a pullback of $p$.
We now proceed chase the representability data of $p$ and of $q$ through the proofs that pullbacks and composites of representable natural transformations are representable. To this end, let $\Gamma \in \mathrm{ob}(\mathbb{C})$ and let $(A,B) \in \left( \sum_{A : \nmty{V}} \nmty{U}^{\langle A \rangle} \right)(\Gamma)$.
Since $q$ is representable and the right-hand square of the above diagram is cartesian, we may form the following pasting of pullback squares:
\begin{diagram}
\Yon(\Gamma \cext A)
\arrow[r, "{(A, B, \nmv{A})}" description]
\arrow[rr, blue, bend left=15, "\nmv{A}"]
\arrow[d, "\Yon(\nmu{A})" description]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\sum_{A,B} \langle A \rangle
\arrow[r]
\arrow[d, "r" description]
\pullbackc{dr}{0pt}
&
\nmtmalt{V}
\arrow[d, "q"]
\\
\Yon(\Gamma)
\arrow[r, "{(A,B)}" description]
\arrow[rr, blue, bend right=20, "A"']
&[20pt]
\sum_{A:\nmty{V}} \nmty{U}^{\langle A \rangle}
\arrow[r]
&
\nmty{V}
\end{diagram}
and since the left hand square is cartesian, we may form the following pasting diagram of pullback squares:
\begin{diagram}
\Yon((\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[r, "{(A,B,\nmv{A},\nmq{B})}" description]
\arrow[rr, blue, bend left=15, "\nmq{B}"]
\arrow[d, "\Yon(\nmp{B})"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&[20pt]
\sum_{A,B} \sum_{a \in \langle A \rangle} [B(a)]
\arrow[r]
\arrow[d, "r'" description]
\pullbackc{dr}{-0.1}
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Gamma \cext A)
\arrow[r, "{(A, B, \nmv{A})}" description]
\arrow[rr, blue, bend right=20, "A"']
&
\sum_{A,B} \langle A \rangle
\arrow[r]
&
\nmty{U}
\end{diagram}
Pasting the left-hand squares of the previous two diagrams vertically, we obtain the desired pullback square.
\begin{diagram}
\Yon((\Gamma \cext A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[r, "{(A, B, \nmv{A}, \nmq{B})}"]
\arrow[d, "\Yon(\nmu{A} \circ \nmq{B})"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\sum_{A,B} \sum_{a \in \langle A \rangle} [B(a)]
\arrow[d, "q \cdot p"]
\\
\Yon(\Gamma)
\arrow[r, "{(A,B)}"']
&
\sum_{A \in \nmty{V}} \nmtm{U}^{\langle A \rangle}
\end{diagram}
This proves that $q \cdot p$ is representable, with representability data as indicated in the statement of this construction, so that $(\mathbb{C}, q \cdot p)$ is a natural model.
\end{verification}
\section{Internal categories}
\label{secInternalCategories}
\index{category!internal {---}}
\index{internal!category@{---} category}
\begin{construction}[Full internal subcategories \thmcite{Jacobs1999CategoricalLogic}]
\label{cnsFullInternalSubcategory}
\index{full internal subcategory}
Let $f : B \to A$ be a morphism in a locally cartesian closed category $\mathcal{E}$. The \textbf{full internal subcategory} of $\mathcal{E}$ induced by $f$ is the internal category $\fisc{f}$ of $\mathcal{E}$ defined by
\begin{itemize}
\item The object of objects $\fisc{f}_0$ is simply $A$;
\item The object of morphisms $\fisc{f}_1$ together with the pair $\partial = \langle \partial_0, \partial_1 \rangle : \fisc{f}_1 \to A \times A$ is given as an object of $\mathcal{E} \slice{A \times A}$ by taking the exponential $f_2^{f_1}$, where $f_1=\Delta_{\pi_1}(f) : B_1 \to A \times A$ and $f_2 = \Delta_{\pi_2}(f) : B_2 \to A \times A$ are the pullbacks of $f$ along the projections $A \xleftarrow{\pi_1} A \times A \xrightarrow{\pi_2} A$.
\begin{diagram}
B
\arrow[d, "f"']
&
B_1
\arrow[l]
\arrow[dr, "f_1"']
\arrow[dl, draw=none, "\text{\Large$\llcorner$}" description, pos=0.1]
&[-50pt]
&[-50pt]
B_2
\arrow[r]
\arrow[dl, "f_2"]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
B
\arrow[d, "f"]
\\
A
&&
A \times A
\arrow[ll, "\pi_1"]
\arrow[rr, "\pi_2"']
&&
A
\end{diagram}
In the internal language of $\mathcal{E}$, we have $\fisc{f}_1 = \sum_{a,a' \in A} B_{a'}^{B_a}$;
\item The identities morphism $A \to \sum_{a,a' \in A} B_{a'}^{B_a}$ is given by $a \mapsto \langle a, a, \mathrm{id}_{B_a} \rangle$;
\item The composition morphism
$$\sum_{a,a',a'' \in A} B_{a''}^{B_{a'}} \times B_{a'}^{B_a} \to \sum_{a,a'' \in A} B_{a''}^{B_a}$$
is given by internal composition in $\mathcal{E}$ in the expected way.
\end{itemize}
\end{construction}
\begin{numbered}
More generally, a \textit{full internal subcategory} of a locally cartesian closed category $\mathcal{E}$ is an internal category $\mathbb{S}$ of $\mathcal{E}$ for which there is a full and faithful fibred functor over $\mathcal{E}$ from the externalisation of $\mathbb{C}$ to $\mathcal{E}^{\to}$. Every full internal subcategory is isomorphic to one of the form $\fisc{f}$. This matter is discussed in great detail in \cite{Jacobs1999CategoricalLogic}, and we will explore the externalisation of full internal subcategories of $\widehat{\mathbb{C}}$ in \Cref{secCharacterisationsOfRepresentability}.
\end{numbered}
\begin{definition}[Associated full internal subcategory of a natural model]
\index{full internal subcategory!{---} associated with a natural model}
Let $(\mathbb{C}, p)$ be a natural model. Its \textbf{associated full internal subcategory} is the full internal subcategory $\mathbb{U} = \fisc{p}$ of $\widehat{\mathbb{C}}$ induced by $p$. Explicitly, we have $\mathbb{U}_0 = \nmty{U}$ and $\mathbb{U}_1 = \sum_{A, B \in \nmty{U}} [B]^{[A]}$, so that we can think of $\mathbb{U}$ as a category whose objects are types and whose morphisms are functions between types.
\end{definition}
In the same vein as \Cref{lemLemmaFive} and \Cref{lemLemmaElevenPointFive}, the following lemma will allow us to work more concretely with full internal subcategories.
\begin{lemma}
\label{lemMorphismsOfAssociatedFISC}
Let $f : B \to A$ be a morphism in a locally cartesian closed category $\mathcal{E}$. Morphisms $x : X \to \sum_{a,a' \in A} B_{a'}^{B_a}$ in $\mathcal{E}$ correspond naturally with triples $(x_1,x_2,\widetilde{x})$, where $x_1, x_2 : X \to A$ in $\mathcal{E}$ and $\widetilde{x} : \Delta_{x_1}(f) \to \Delta_{x_2}(f)$ in $\mathcal{E} \slice{X}$.
\end{lemma}
\begin{proof}
First note that a morphism $x : X \to \sum_{a,a' \in A} B_{a'}^{B_a}$ gives rise to a morphism $(x_1,x_2) \to f_2^{f_1}$ in $\mathcal{E} \slice{A \times A}$, where $x_1$ and $x_2$ are the composites of $x$ with the respective projections $\sum_{a,a' \in A} B_{a'}^{B_a} \to A$.
\begin{diagram}
X
\arrow[rr, "x"]
\arrow[dr, "{(x_1,x_2)}"']
&&
\sum_{a,a' \in A} B_{a'}^{B_a}
\arrow[dl, "f_2^{f_1}"]
\\
&
A \times A
\end{diagram}
Now $f_2^{f_1} = \Pi_{f_1} \Delta_{f_1}(f_2)$, so under the adjunction $\Delta_{f_1} \dashv \Pi_{f_1}$, a morphism $x : (x_1,x_2) \to f_2^{f_1}$ corresponds with a morphism $x' : \Delta_{f_1}(x_1,x_2) \to \Delta_{f_1}(f_2)$ in $\mathcal{E} \slice{B_1}$. Hence it suffices to show that morphisms $x' : \Delta_{f_1}(x_1,x_2) \to \Delta_{f_1}(f_2)$ in $\mathcal{E} \slice{B_2}$ correspond with morphisms $\widetilde{x} : \Delta_{x_1}(f) \to \Delta_{x_2}(f)$ in $\mathcal{E} \slice{X}$.
Consider now following diagram, in which all three squares are pullbacks---the fact that the bottom and front squares are pullbacks follows from the fact that $\Delta_f(x_i) \cong \Delta_{f_i}(x_1,x_2)$ for $i=1,2$. Our goal is to prove that there is a correspondence between morphisms $x'$ and morphisms $\widetilde{x}$ fitting into the diagram as indicated with dashed arrows.
\begin{ldiagram}
&&&
B_3
\arrow[dr, "\Delta_{f_2}(f_1)"]
\arrow[dd, pos=0.7, "\Delta_{f_1}(f_2)" description]
&&
\\
&&
\Delta_{x_2}(B)
\arrow[rr, pos=0.3, crossing over, "\Delta_f(x_2)"]
&&
B_2
\arrow[dd, "f_2"]
&
\\
&
\Delta_{x_1}(B)
\arrow[dr, "\Delta_{x_1}(f)"']
\arrow[rr, pos=0.3, "\Delta_f(x_1)" description]
\arrow[ur, dashed, blue, bend left=15, "\widetilde{x}" description]
\arrow[uurr, dashed, red, bend left=30, "x'"]
&&
B_1
\arrow[dr, "f_1" description]
&&
\\
&&
X
\arrow[uu, leftarrow, crossing over, pos=0.7, "\Delta_{x_2}(f)" description]
\arrow[rr, "{(x_1,x_2)}"']
&~&
A \times A
&
\end{ldiagram}
Given $\widetilde{x}$, we obtain $x'$ from the universal property of the right pullback square as the pair $x' = (\Delta_f(x_2) \circ \widetilde{x}, \Delta_f(x_1))$. Conversely, given $x'$, we obtain $\widetilde{x}$ from the universal property of the front pullback as the pair $\widetilde{x} = (\Delta_{f_2}(f_1) \circ x', \Delta_{x_1}(f))$. That the assignments $\widetilde{x} \mapsto x'$ and $x' \mapsto \widetilde{x}$ are mutually inverse follows immediately from the `uniqueness' part of the universal property.
\end{proof}
\begin{numbered}
As a result of \Cref{lemMorphismsOfAssociatedFISC}, when reasoning internally about a full internal subcategory $\fisc{f : B \to A}$ of a locally cartesian closed category $\mathcal{E}$, we can view the object of objects $\fisc{f}_0$ as an $A$-indexed family $\seqbn{a}{a \in A}$ and the object of morphisms $\fisc{f}_1$ as an $A \times A$-indexed family $\seqbn{f : B_a \to B_{a'}}{a,a' \in A}$. This allows us to reason internally to $\mathcal{E}$ about full internal subcategories, as well as internal functors and internal natural transformations between them, much like we reason about categories, functors and natural transformations externally.
\end{numbered}
\begin{lemma}
\label{lemMorphismsOfAssociatedFISCNM}
Let $(\mathbb{C}, p)$ be a natural model with associated full internal subcategory $\mathbb{U}$. For each object $\Gamma$ of $\mathbb{C}$, there is a bijection
$$\mathbb{U}_1(\Gamma) \overset{\cong}{\longrightarrow} \sum_{A, B \in \nmty{U}(\Gamma)} \mathbb{C} \slice{\Gamma} \left( (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, \nmp{A}), (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B, \nmp{B}) \right)$$
which is natural in $\Gamma$.
Explicitly, given $g \in \mathbb{U}_1(\Gamma)$ and $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$, if $g$ corresponds with a triple $(A,B,h)$, where $A,B \in \nmty{U}(\Gamma)$ and $h : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B$ over $\Gamma$, then $g[\sigma]$ corresponds with $(A[\sigma], B[\sigma], h[\sigma])$, where $h[\sigma] : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma] \to \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B[\sigma]$ over $\Delta$, as indicated with a dashed arrow in the following diagram in which the front and back squares are canonical pullback squares (\Cref{cnsCanonicalPullbacks}).
\begin{cdiagram}{normal}{large}
&&[15pt]
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B[\sigma]
\arrow[dddl, pos=0.6, "\nmp{B[\sigma]}"]
\arrow[rrr, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B"]
&&&[15pt]
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B
\arrow[dddl, "\nmp{B}"]
\\
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]
\arrow[ddr, "\nmp{A[\sigma]}"']
\arrow[urr, dashed, "{h[\sigma]}"]
\arrow[rrr, crossing over, pos=0.7, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
&&&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[ddr, "\nmp{A}"']
\arrow[urr, "h"]
&&
\\
~&~&~&~&~&~
\\
&
\Delta
\arrow[rrr, "\sigma"']
&&&
\Gamma
&
\end{cdiagram}
\end{lemma}
\begin{proof}
Apply \Cref{lemMorphismsOfAssociatedFISC} with $f = p$ and $X = \Yon(\Gamma)$.
\end{proof}
\begin{numbered}
\Cref{lemMorphismsOfAssociatedFISCNM} proves that the associated full internal subcategory of a natural model is equivalent to \textit{context-indexed family of types} \cite[Proposition 1]{ClairambaultDybjer2014Biequivalence}, the latter regarded as a $\mathbb{C}$-indexed category rather than a category internal to $\widehat{\mathbb{C}}$, although these notions are equivalent.
\end{numbered}
\begin{construction}[Cartesian morphisms of polynomials induce full and faithful internal functors]
\label{cnsCartesianMorphismsInduceInternalFunctors}
Let $f : B \to A$ and $g : D \to C$ be morphisms in a locally cartesian closed category $\mathcal{E}$. Given a cartesian morphism of polynomials $\varphi : f \pRightarrow g$, let $\fisc{\varphi} : \fisc{f} \to \fisc{g}$ be the full and faithful internal functor defined in the internal language of $\mathcal{E}$ as follows.
\begin{itemize}
\item $\fisc{\varphi}_0(a) = \varphi_0(a)$ for $a \in A$; and
\item $\fisc{\varphi}_1(m : B_a \to B_{a'}) = \varphi_{a'} \mathbin{\dot{\circ}} k \mathbin{\dot{\circ}} \varphi_a^{-1})$ for $a,a' \in A$;
\end{itemize}
The assignment $\varphi \mapsto \fisc{\varphi}$ extends to a functor $\mathbb{S} : \mathbf{Poly}_{\mathcal{E}}\cart(1,1) \to \mathbf{Cat}(\mathcal{E})$.
\end{construction}
\begin{verification}
We work internally to $\mathcal{E}$. To see that $\mathbb{S}(\varphi)$ defines a functor, note that for $a,a',a'' \in A$ and $m : B_a \to B_{a'}$ and $n : B_{a'} \to B_{a''}$, we have
$$\fisc{\varphi}(n) \circ \fisc{\varphi}(m) = \varphi_{a''} \circ n \circ \varphi_{a'}^{-1} \circ \varphi_{a'} \circ m \circ \varphi_a = \varphi_{a''} \circ n \circ m \circ \varphi_a^{-1} = \fisc{\varphi}(n \circ m)$$
and evidently $\fisc{\varphi}(\mathrm{id}_{B_a}) = \mathrm{id}_{D_{\varphi_0(a)}}$.
To see that the assignment $\varphi \mapsto \fisc{\varphi}$ is functorial, note that evidently $\fisc{\mathrm{id}_f} = \mathrm{id}_{\fisc{f}}$ for each $f : B \to A$ in $\mathcal{E}$, and given $\varphi : f \pRightarrow g$ and $\psi : g \pRightarrow h$, we have
$$\fisc{\psi \circ \varphi}_0 = (\psi \circ \varphi)_0 = \psi_0 \circ \varphi_0 = \fisc{\psi}_0 \circ \fisc{\varphi}_0$$
and for $m : B_a \to B_{a'}$ we have
$$\fisc{\psi \circ \varphi}_1(m) = (\psi \circ \varphi)_{a'} \circ m \circ (\psi \circ \varphi)_a^{-1} = \psi_{\varphi_0(a')} \circ \varphi_{a'} \circ m \circ \varphi_a^{-1} \circ \psi_{\varphi_0(a)}^{-1} = \fisc{\psi}_1(\fisc{\varphi_1}(m))$$
as required.
\end{verification}
In the following, given an object $A$ of a locally cartesian closed category $\mathcal{E}$, we will write $|A|$ for the discrete internal category on $\mathcal{E}$, whose object of objects and of morphisms are both $A$ and with domain, codomain, identities and composition morphisms given by $\mathrm{id}_A$.
\begin{definition}[Internally cartesian closed categories \thmcite{Jacobs1999CategoricalLogic}]
\index{internal!cartesian closed@{---}ly cartesian closed category}
Let $\mathbb{A}$ be an internal category of a locally cartesian closed category $\mathcal{E}$.
\begin{itemize}
\item $\mathbb{A}$ has an \textbf{internal terminal object} if the terminal internal functor ${!} : \mathbb{A} \to |1|$ has an internal right adjoint $\mathsf{tobj} : |1| \to \mathbb{A}$.
\item $\mathbb{A}$ has \textbf{internal binary products} if the diagonal internal functor $\Delta : \mathbb{A} \to \mathbb{A} \times \mathbb{A}$ has an internal right adjoint.
\item $\mathbb{A}$ with internal binary products has \textbf{internal exponentials} if the internal functor
$$\mathsf{prod} : |\mathbb{A}_0| \times \mathbb{A} \to |\mathbb{A}_0| \times \mathbb{A}$$
has a right adjoint $\mathsf{exp}$, where $\mathsf{prod}$ is defined as follows and where $\mathbin{\dot{\times}} : \mathbb{A} \times \mathbb{A} \to \mathbb{A}$ is the internal binary product functor.
\begin{itemize}
\item $\mathsf{prod}_0 : \mathbb{A}_0 \times \mathbb{A}_0 \to \mathbb{A}_0 \times \mathbb{A}_0$ is defined by $\mathsf{prod}_0(A,B) = (A, A \mathbin{\dot{\times}} B)$; and
\item $\mathsf{prod}_1 : \mathbb{A}_0 \times \mathbb{A}_1 \to \mathbb{A}_0 \times \mathbb{A}_1$ is defined by $\mathsf{prod}_1(A,f) = (A, \mathrm{id}_A \mathbin{\dot{\times}} f)$;
\end{itemize}
\end{itemize}
We say $\mathbb{A}$ is \textbf{internally cartesian closed} if it has an internal terminal object, internal binary products and internal exponentials.
\end{definition}
\begin{theorem}[Cartesian closure of the associated full internal subcategory]
\label{thmCartesianClosedInternalCategory}
Let $(\mathbb{C}, p)$ be a natural model and let $\mathbb{U} = \fisc{p}$ be its associated full internal subcategory. If $(\mathbb{C}, p)$ admits a unit type, dependent sum types and dependent product types, then $\mathbb{U}$ is internally cartesian closed.
\end{theorem}
\begin{proof}
Let $\eta = (\widehat{\mathbbm{1}}, \widehat{\star}) : i_1 \pRightarrow p$, $\mu = (\widehat{\Sigma}, \widehat{\mathsf{pair}}) : p \cdot p \pRightarrow p$ and $\zeta = (\widehat{\Pi}, \widehat{\lambda}) : \mathrm{P}_p(p) \pRightarrow p$ be the cartesian morphisms of polynomials arising from the unit, dependent sum and dependent product type structure for $(\mathbb{C}, p)$, as in \Cref{thmUnitSigmaPiPoly}.
To see that $\mathbb{U}$ has an internal terminal object, let $\mathsf{tobj} = \fisc{\eta} : \fisc{\Yon(\diamond)} = |1| \to \fisc{p} = \mathbb{U}$. Now for $A \in \nmty{U}$ and $x \in 1$, there is a natural correspondence between morphisms
$$1_{!A} \to 1_{x} \qquad \text{and} \qquad [A] \to [\mathsf{tobj}(x)]$$
Indeed, the only morphism $1_{!A} \to 1_{x}$ in $|1|$ is $\mathrm{id}_1$, and the only morphism $[A] \to [\widehat{\mathbbm{1}}]$ is $\lambda a.~\widehat{\star}$. So ${!} \dashv \mathsf{tobj}$ as required.
To see that $\mathbb{U}$ has internal products, we will define an internal functor
$$\mathbin{\dot{\times}} : \mathbb{U} \times \mathbb{U} \to \mathbb{U}$$
on objects by $A \mathbin{\dot{\times}} B = \widehat{\Sigma}(A, \underline{B})$, where $\underline{B} = \lambda x.B \in \nmty{U}^{[A]}$, and on morphisms $(f,g) \in [C]^{[A]} \times [D]^{[B]}$ by letting $f \mathbin{\dot{\times}} g : [A \mathbin{\dot{\times}} B] \to [C \mathbin{\dot{\times}} D]$ be defined by
$$(f \mathbin{\dot{\times}} g)(\langle a, b \rangle) = \widehat{\mathsf{pair}}(f(a), g(b))$$
To see that $\Delta \dashv {\mathbin{\dot{\times}}}$, note that for $A,B,C \in \nmty{U}$ there is a map
$$[A]^{[C]} \times [B]^{[C]} \to [A \mathbin{\dot{\times}} B]^{[C]}$$
given by $(f, g) \mapsto \lambda c.~ \widehat{\mathsf{pair}}(f(c), g(c))$ and with an inverse given by
$$h \mapsto (\lambda c.\mathsf{fst}(h(c)), ~ \lambda c.\mathsf{snd}(h(c)))$$
Hence $\Delta \dashv {\mathbin{\dot{\times}}}$ as required.
To see that $\mathbb{U}$ has internal exponentials, define an internal functor
$$\mathsf{exp} : |\nmty{U}| \times \mathbb{U} \to |\nmty{U}| \times \mathbb{U}$$
on objects by $\mathsf{exp}_0(A,B) = (A, \widehat{\Pi}(A, \underline{B}))$ and on morphisms $(A, B) \xrightarrow{(\mathrm{id}_A, f)} (A, C)$ by letting
$$\mathsf{exp}(f) : \widehat{\Pi}(A,\underline B) \to \widehat{\Pi}(A, \underline C)$$
be defined by $\mathsf{exp}(f)(t) = \widehat{\lambda}(A, t \circ f)$. To see that $\mathsf{prod} \dashv \mathsf{exp}$, note that for $A,B,C \in \nmty{U}$ there is a map
$$|\nmty{U}|(A,C) \times [D]^{[A \mathbin{\dot{\times}} B]} \to |\nmty{U}|(A,C) \times [\widehat{\Pi}_C D]$$
which is trivial when $A \ne C$ and is defined by the usual currying and uncurrying correspondence when $A=C$. This proves that $\mathsf{prod} \dashv \mathsf{exp}$.
\end{proof}
We will use the following construction in \Cref{thmInternalRightAdjoint} in order to characterise when a natural model admits dependent sum types.
\begin{construction}
Given full internal subcategories $\mathbb{A} = \fisc{B \xrightarrow{f} A}$ and $\mathbb{I} = \fisc{J \xrightarrow{g} I}$ of a locally cartesian closed category $\mathcal{E}$, there is an internal category $\Fam[\mathbb{I}]{\mathbb{A}}$ of $\mathcal{E}$ defined as follows.
\begin{itemize}
\item $\Fam[\mathbb{I}]{\mathbb{A}}_0 = \sum_{i \in I} A^{J_i}$ ($= \mathrm{P}_{\alpha}(A)$);
\item $\Fam[\mathbb{I}]{\mathbb{A}}_1 = \sum_{(i,a),(i',a')} \sum_{\alpha \in J_{i'}^{J_i}} \prod_{j \in J_i} B_{a'(\alpha(j))}^{B_{a(j)}}$;
\item The domain and codomain morphisms $\mathsf{dom},\mathsf{cod} : \Fam[\mathbb{I}]{\mathbb{A}}_1 \to \Fam[\mathbb{I}]{\mathbb{A}}_0$ are given by the evident projections;
\item The identities morphism $\mathsf{ids} : \Fam[\mathbb{I}]{\mathbb{A}}_0 \to \Fam[\mathbb{I}]{\mathbb{A}}_1$ is defined in the internal language of $\mathcal{E}$ by
$$\mathsf{ids}(i,a) = \Big( (i,a), ~ (i,a), ~ \lambda j.j, ~ \lambda j.\lambda b.b \Big)$$
\item Composition is given by internal composition in $\mathcal{E}$; explicitly, the object of composable pairs of morphisms is given by
$$\Fam[\mathbb{I}]{\mathbb{A}}_2 = \sum_{(i,a),(i',a'),(i'',a'')} ~ \sum_{\beta : J_{i''}^{J_{i'}}} ~ \sum_{\alpha : J_{i'}^{J_i}} ~ \prod_{j \in J_i} ~ B_{a''(\beta(\alpha(j)))}^{B_{a'(\alpha(j))}} \times B_{a'(\alpha(j))}^{B_{a(j)}}$$
and the composition morphism $\mathsf{comp} : \Fam[\mathbb{I}]{\mathbb{A}}_2 \to \Fam[\mathbb{I}]{\mathbb{A}}_1$ is given by
$$\mathsf{comp} \bigg((i,a),(i',a'),(i'',a''), \beta, \alpha, \lambda j.(b'_j,b_j) \Big) = \Big((i,a), (i'',a''), \beta \mathbin{\dot{\circ}} \alpha, \lambda j.(b'_j \mathbin{\dot{\circ}} b_j) \Big)$$
\end{itemize}
\end{construction}
\begin{verification}
The fact that $\mathbb{A}$ and $\mathbb{I}$ allow us to check the required equations using the internal language of $\mathcal{E}$; but these equations are exactly the ones that demonstrate that the regular $\mathrm{Fam}$ construction defines a category (see e.g.\
\cite{Jacobs1999CategoricalLogic}).
\end{verification}
\begin{construction}
Let $\mathbb{A}$ be an full internal subcategory with an internal terminal object $\mathbf{1} \in A$. By anology with the diagonal functor $\Delta : \mathbb{A} \to \mathbb{A} \times \mathbb{A}$, define an internal functor $\widetilde{\Delta} : \mathbb{A} \to \Fam[\mathbb{A}]{\mathbb{A}}$ defined internally on objects by $\widetilde{\Delta}(a) = (a, \underline{\mathbf{1}})$ and on morphisms $f : B_{a} \to B_{a'}$ by $\widetilde{\Delta}(f) = (f : B_a \to B_{a'}, \mathrm{id}_{B_{\mathbf{1}}} : B_{\mathbf{1}} \to B_{\mathbf{1}})$. \qed
\end{construction}
\begin{theorem}
\label{thmInternalRightAdjoint}
Let $(\mathbb{C}, p)$ be a natural model admitting a unit type and let $\mathbb{U} = \fisc{p}$ be its associated full internal subcategory. Then $(\mathbb{C}, p)$ admits dependent sum types if and only if the internal functor $\widetilde{\Delta} : \mathbb{U} \to \Fam[\mathbb{U}]{\mathbb{U}}$ has an internal right adjoint.
\end{theorem}
\begin{proof}
First recall (\Cref{thmUnitSigmaPiPoly}) that a natural model $(\mathbb{C}, p)$ admits dependent sum types if and only if there exists a cartesian morphism $(\widehat{\mathsf{pair}}, \widehat{\Sigma}) : p \cdot p \pRightarrow p$ of polynomials in $\widehat{\mathbb{C}}$, as indicated in the following pullback square:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\sum_{A,B} \sum_{a:[A]} [B(a)]
\arrow[r, "\widehat{\mathsf{pair}}"]
\arrow[d, "p \cdot p"']
\pullbackc{dr}{-0.05}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{A:\nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Sigma}"']
&
\nmty{U}
\end{tikzcd}
\end{center}
Write $\widehat{\mathsf{pair}}(A,B,a,b) = \langle a,b \rangle$ and $\widehat{\Sigma}(A,B) = \Sigma_A B$.
First suppose that $(\mathbb{C}, p)$ admits dependent sum types, and define $\mathsf{sigma} : \Fam[\mathbb{U}]{\mathbb{U}} \to \mathbb{U}$ as follows:
\begin{itemize}
\item $\mathsf{sigma}_0 = \widehat{\Sigma} : \sum_{A : \nmty{U}} \nmty{U}^{[A]} \to \nmty{U}$, so that $\mathsf{sigma}_0(A,B) = \Sigma_A B$ for each $(A,B) \in (\Fam[\mathbb{U}]{\mathbb{U}})_0$.
\item For $(A,B),(C,D) \in \sum_{A:\nmty{U}} \nmty{U}^{[A]}$ and $(f,g) \in \Fam[\mathbb{U}]{\mathbb{U}}((A,B),(C,D))$, define
$$\mathsf{sigma}_1(f,g) = \lambda p. \langle f(p.0), g_{p.0}(p.1) \rangle : [\Sigma_A B] \to [\Sigma_C D]$$
\end{itemize}
First note that $\mathsf{sigma}$ is an internal functor. That it respects identities is evident; to see that it respects composition, note that
\begin{align*}
\mathsf{sigma}_1((f',g') \circ (f,g))
&= \mathsf{sigma_1}(f' \circ f, \lambda a.~ g'_{f(a)} \circ g_a) && \\
&= \lambda p.~ \langle f'(f(p.0)), g'_{f(p.0)}(g_{p.0}(p.1)) \rangle && \\
&= \lambda p.~ \mathsf{sigma}_1(f',g')(\langle f(p.0), g_{p.0}(p.1) \rangle) && \\
&= \lambda p.~ \mathsf{sigma}_1(f',g')(\mathsf{sigma}_1(f,g)(p)) && \\
&= \mathsf{sigma}_1(f',g') \circ \mathsf{sigma}_1(f,g)
\end{align*}
To see that $\widetilde{\Delta} \dashv \mathsf{sigma}$, let $C \in \nmty{U}$ and let $(A,B) \in \sum_{A \in \nmty{U}} \nmty{U}^{[A]}$. We obtain a map
$$\Fam[\mathbb{U}]{\mathbb{U}}((C,\underline{\mathbf{1}}), (A,B)) \to \mathbb{U}(\Sigma_C \underline{\mathbf{1}}, \Sigma_A B)$$
via $(f,g) \mapsto \lambda \langle c, \star \rangle.~ (f(c), g_c(\star))$; and we obtain a map
$$\mathbb{U}(\Sigma_C \underline{\mathbf{1}}, \Sigma_A B) \to \Fam[\mathbb{U}]{\mathbb{U}}((C,\underline{\mathbf{1}}), (A,B))$$
via $h \mapsto (\lambda c.~ h(c).0, ~ \lambda c.~ \lambda x : \mathbf{1}.~ h(c).1 \rangle)$.
These maps are mutually inverse, and so $\widetilde{\Delta} \dashv \mathsf{sigma}$ as required.
Conversely, suppose now that $\Delta$ has an internal right adjoint $\mathsf{sigma} : \Fam[\mathbb{U}]{\mathbb{U}} \to \mathbb{U}$. Define $\widehat{\Sigma} : \sum_{A : \nmty{U}} \nmty{U}^{[A]} \to \nmty{U}$. Then $\mathsf{sigma}_1$ gives for each $(A,B),(C,D) \in \sum_{A \in \nmty{U}} \nmty{U}^{[A]}$ a map
$$\mathsf{sigma}_1 : \sum_{f : [C]^{[A]}} \prod_{a \in [A]} [D(f(a))]^{[B(a)]} \to [\Sigma_C D]^{[\Sigma_A B]}$$
Given $a \in [A]$ and $b \in [B(a)]$, let $f_a : [\mathbf{1}] \to [A]$ be given by $f_a(\star) = a$ and let $g_b : [\underline{\mathbf{1}}(a)] = [\mathbf{1}] \to [B(a)]$ be given by $g_b(\star) = b$. Then
$$\mathsf{sigma}_1(f_a,g_b) : [\Sigma_{\mathbf{1}} \underline{\mathbf{1}}] \to [\Sigma_A B]$$
Define $\widehat{\mathsf{pair}}(A,B,a,b) = \mathsf{sigma}_1(f_a,g_b)(\langle \star, \star \rangle)$.
By construction, these are maps of the appropriate sorts, and $p \circ \widehat{\mathsf{pair}} = \widehat{\Sigma} \circ (p \cdot p)$. To see that the desired square is a pullback, note that the fibre of $p \cdot p$ over $(A,B)$ is mapped bijectively via $\widehat{\mathsf{pair}}$ to the fibre of $p$ over $\Sigma_A B$.
\end{proof}
In future work, we hope to find a result analogous to \Cref{thmInternalRightAdjoint} which characterises when a natural model admits dependent product types in terms of an internal adjunction.
\section{Polynomial pseudomonads}
\label{secPolynomialPseudomonads}
\index{pseudomonad}
\index{polynomial!pseudomonad@{---} pseudomonad}
\begin{definition}
\label{defPolynomialMonad}
\index{polynomial!monad@{---} monad}
A \textbf{polynomial monad} is a monad in the bicategory $\mathbf{Poly}\cart_{\mathcal{E}}$. Specifically, a polynomial monad is a quadruple $\mathbb{P} = (I,p,\eta,\mu)$ consisting of an object $I$ of $\mathcal{E}$, a polynomial $p : I \pto I$ in $\mathcal{E}$ and cartesian morphisms of polynomials $\eta : i_1 \pRightarrow p$ and $\mu : p \cdot p \pRightarrow p$, satisfying the usual monad axioms, namely
$$\mu \circ (\mu \cdot p) = \mu \circ (p \cdot \mu) \quad \text{and} \quad \mu \circ (\eta \cdot p) = \mathrm{id}_p = \mu \circ (p \cdot \eta)$$
\end{definition}
\begin{remark}
\label{rmkPolynomialMonads}
What is usually (e.g.\ \cite{GambinoKock2013PolynomialFunctors}) meant by a \textit{polynomial monad} is a monad $(P,\eta,\mu)$ on a slice $\mathcal{E}\slice{I}$ of $\mathcal{E}$, with $P : \mathcal{E}\slice{I} \to \mathcal{E}\slice{I}$ a polynomial functor and $\eta,\mu$ cartesian natural transformations; equivalently, this is a monad in the $2$-category $\mathbf{PolyFun}\cart_{\mathcal{E}}$. We recover this notion from \Cref{defPolynomialMonad} by applying the extension bifunctor $\mathbf{Poly}\cart_{\mathcal{E}} \to \mathbf{PolyFun}\cart_{\mathcal{E}}$. Furthermore, every polynomial monad in the usual sense is the extension of a polynomial monad in the sense of \Cref{defPolynomialMonad}.
\end{remark}
Recall \Cref{thmUnitSigmaPiPoly}, which says that a natural model $(\mathbb{C}, p)$ admits a unit type if and only if there is a morphism $\eta : i_1 \pRightarrow p$ in $\mathbf{Poly}\cart_{\widehat{\mathbb{C}}}$, admits dependent sum types if and only if there is a cartesian morphism $\mu : p \cdot p \pRightarrow p$ in $\mathbf{Poly}\cart_{\widehat{\mathbb{C}}}$, and admits $(\mathbb{C},p)$ admits dependent product types if and only if there is a cartesian morphism $\zeta : P_p(p) \pRightarrow p$ in $\mathbf{Poly}\cart_{\widehat{\mathbb{C}}}$. It is natural to ask whether $(\Yon(\diamond),p,\eta,\mu)$ is a polynomial monad in the sense of \Cref{defPolynomialMonad}, and that $(p,\zeta)$ is an algebra for this monad in a suitable sense, but unfortunately, this turns out to be false. For example, consider the monad unit laws $\mu \circ (\eta \cdot p) = \mathrm{id}_p = \mu \circ (p \cdot \eta)$---they state precisely that the following equations of pasting diagrams hold:
\begin{ndiagram}
\dot{\mathcal{U}}
\arrow[d, "p"']
\arrow[r, "(\eta \cdot p)_1"]
&
\sum_{A,B} \sum_{a:[A]} [B(a)]
\arrow[d, "p \cdot p" description]
\arrow[r, "\mu_1"]
&
\dot{\mathcal{U}}
\arrow[d, "p" name={domequalsone}]
&[-15pt]
\dot{\mathcal{U}}
\arrow[d,"p"' name={codequalsone}]
\arrow[r,equals]
\arrow[from={domequalsone},to={codequalsone},"=" description,draw=none]
&
\dot{\mathcal{U}}
\arrow[d,"p" name={domequalstwo}]
&[-15pt]
\dot{\mathcal{U}}
\arrow[d, "p"' name={codequalstwo}]
\arrow[r, "(p \cdot \eta)_1"]
\arrow[from={domequalstwo},to={codequalstwo},"=" description,draw=none]
&
\sum_{A,B} \sum_{a:[A]} [B(a)]
\arrow[d, "p \cdot p" description]
\arrow[r, "\mu_1"]
&
\dot{\mathcal{U}}
\arrow[d, "p"]
\\
\mathcal{U}
\arrow[r, "(\eta \cdot p)_0"']
&
\sum_{A:\mathcal{U}} \mathcal{U}^{[A]}
\arrow[r, "\mu_0"']
&
\mathcal{U}
&
\mathcal{U}
\arrow[r,equals]
&
\mathcal{U}
&
\mathcal{U}
\arrow[r, "(p \cdot \eta)_0"']
&
\sum_{A:\mathcal{U}} \mathcal{U}^{[A]}
\arrow[r, "\mu_0"']
&
\mathcal{U}
\end{ndiagram}
However, the monad laws do not hold strictly in general. Indeed, in the internal language of $\widehat{\mathbb{C}}$, we have
$$(\mu \circ (\eta \cdot p))_0(A) = \sum_{x : A} \mathbf{1} = A \times \mathbf{1} \quad \text{and} \quad (\mu \circ (p \cdot \eta))_0(A) = \sum_{x : \mathbf{1}} A = \mathbf{1} \times A$$
But in type theory, the types $A \times \mathbf{1}$, $A$ and $\mathbf{1} \times A$ are not generally \textit{equal}, although there are canonical isomorphisms between them. We therefore cannot, in general, expect the monad laws to hold strictly, for instance if the natural model is one arising from the syntax of dependent type theory (\Cref{schTermModel}). However, it is still reasonable to expect this structure to satisfy the laws of a \textit{pseudomonad}.
Much as monads naturally live in bicategories, pseudomonads naturally live in \textit{tricategories} \cite{Marmolejo1999Pseudomonads,Lack2000Pseudomonads}. To define the notion of a polynomial pseudomonad, we therefore need to endow the bicategory $\mathbf{Poly}\cart_{\mathcal{E}}$ with $3$-cells turning it into a tricategory.
\subsection*{A tricategory of polynomials}
In general, tricategories are fiddly, with lots of coherence data to worry about \cite{GordonPowerStreet1995Tricategories,Gurski2013CoherenceThreeCategories}---fortunately for us, our situation is simplified by the fact that composition of 2-cells of polynomials is strict, so that the $3$-cells turn the hom categories $\mathbf{Poly}\cart`_{\mathcal{E}}(I,J)$ into $2$-categories, rather than bicategories. The emerging structure is that of a \textit{$\mathbf{2Cat}$-enriched bicategory}.
\begin{definition}[$\mathbf{2Cat}$-enriched bicategories]
\label{def2CatEnrichedBicategory}
\index{2Cat-enriched bicategory@$\mathbf{2Cat}$-enriched bicategory}
A \textbf{$\mathbf{2Cat}$-enriched bicategory} $\mathfrak{B}$ consists of:
\begin{itemize}
\item A set $\mathfrak{B}_0$, whose elements we call the \textbf{0-cells} of $\mathfrak{B}$;
\item For all 0-cells $I,J$, a 2-category $\mathfrak{B}(I,J)$, whose 0-cells, 1-cells and 2-cells we call the \textbf{1-cells}, \textbf{2-cells} and \textbf{3-cells} of $\mathfrak{B}$, respectively;
\item For all 0-cells $I,J,K$, a 2-functor $\circ_{I,J,K} : \mathfrak{B}(J,K) \times \mathfrak{B}(I,J) \to \mathfrak{B}(I,K)$, which we call the \textbf{composition} 2-functor;
\item For all 0-cells $I$, a 2-functor $\iota_I : \mathbf{1} \to \mathfrak{B}(I,I)$, which we call the \textbf{identity} 2-functor, where $\mathbf{1}$ is the terminal 2-category;
\item For all 0-cells $I,J,K,L$, a 2-natural isomorphism
\begin{center}
\begin{tikzcd}[column sep=huge, row sep=huge]
\mathfrak{B}(K,L) \times \mathfrak{B}(J,K) \times \mathfrak{B}(I,J)
\arrow[r, "\circ_{J,K,L} \times \mathrm{id}"]
\arrow[d, "\mathrm{id} \times \circ_{I,J,K}"']
&
\mathfrak{B}(J,L) \times \mathfrak{B}(I,J)
\arrow[d, "\circ_{I,J,L}"]
\arrow[dl, draw=none, pos=0.5, "\phantom{\alpha_{I,J,K,L}}\ \twocell{225}\ \alpha_{I,J,K,L}" description]
\\
\mathfrak{B}(K,L) \times \mathfrak{B}(I,K)
\arrow[r, "\circ_{I,K,L}"']
&
\mathfrak{B}(I,L)
\end{tikzcd}
\end{center}
called the \textbf{associator};
\item For all 0-cells $I,J$, 2-natural isomorphisms
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={20pt}]
\mathfrak{B}(I,J) \times \mathbf{1}
\arrow[r, "\mathrm{id} \times \iota_I"]
\arrow[dr, "\cong"']
&
\mathfrak{B}(I,J) \times \mathfrak{B}(I,I)
\arrow[d, "\circ_{I,I,J}"]
\arrow[dl, draw=none, pos=0.2, "\lambda_{I,J} \twocell{225} \phantom{\lambda_{I,J}}" description]
\\
~
&
\mathfrak{B}(I,J)
&
\end{tikzcd}
\begin{tikzcd}[row sep=huge, column sep={20pt}]
\mathfrak{B}(J,J) \times \mathfrak{B}(I,J)
\arrow[d, "\circ_{I,J,J}"']
\arrow[dr, draw=none, pos=0.2, "\rho_{I,J} \twocell{315} \phantom{\rho_{I,J}}" description]
&
\mathbf{1} \times \mathfrak{B}(I,J)
\arrow[l, "\iota_J \times \mathrm{id}"']
\arrow[dl, "\cong"]
\\
\mathfrak{B}(I,J)
&
~
\end{tikzcd}
\end{center}
called the \textbf{left unitor} and \textbf{right unitor}, respectively.
\end{itemize}
such that for all compatible 1-cells $I \xrightarrow{f} J \xrightarrow{g} K \xrightarrow{h} L \xrightarrow{k} M$, the following diagrams commute:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={0pt}]
((k \circ h) \circ g) \circ f
\arrow[rr, Rightarrow, "\alpha_{I,J,K,M}"]
\arrow[dr, Rightarrow, "\alpha_{J,K,L,M} \circ f"']
&&
(k \circ h) \circ (g \circ f)
\arrow[rr, Rightarrow, "\alpha_{I,K,L,M}"]
&&
k \circ (h \circ (g \circ f))
\\
&
(k \circ (h \circ g)) \circ f
\arrow[rr, Rightarrow, "\alpha_{I,J,L,M}"']
&&
k \circ ((h \circ g) \circ f)
\arrow[ur, Rightarrow, "k \circ \alpha_{I,J,K,L}"']
&
\end{tikzcd}
\end{center}
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
(g \circ \iota_J) \circ f
\arrow[rr, Rightarrow, "\alpha_{I,J,J,K}"]
\arrow[dr, Rightarrow, "\lambda_{J,K} \circ f"']
&&
g \circ (\iota_J \circ f)
\arrow[dl, Rightarrow, "g \circ \rho_{I,J}"]
\\
&
g \circ f
&
\end{tikzcd}
\end{center}
\end{definition}
Every 3-category is trivially a $\mathbf{2Cat}$-enriched bicategory, and every $\mathbf{2Cat}$-enriched bicategory is a tricategory. Every $\mathbf{2Cat}$-enriched bicategory has an underlying bicategory, obtained by forgetting the 3-cells, and every bicategory can be equipped with the structure of a $\mathbf{2Cat}$-enriched bicategory by taking only identities as 3-cells. An equivalent viewpoint is that $\mathbf{2Cat}$-enriched bicategories are tricategories, whose hom-bicategories are $2$-categories and whose coherence isomorphisms in the top dimension are identities.
Connections between polynomials and $\mathbf{2Cat}$-enriched bicategories have been studied in different but related settings by Tamara von Glehn \cite{vonGlehn2015Thesis} and by Mark Weber \cite{Weber2015Polynomials} (the latter referring to them as `2-bicategories').
In order to motivate our definition of $3$-cells, recall that \Cref{cnsCartesianMorphismsInduceInternalFunctors} yields a functor
$$\mathbb{S} : \mathbf{Poly}\cart_{\mathcal{E}}(1,1) \to \mathbf{Cat}(\mathcal{E})$$
However, $\mathbf{Cat}(\mathcal{E})$ has the structure of a 2-category, so it is therefore reasonable to expect that when we equip $\mathbf{Poly}_{\mathcal{E}}$ with 3-cells, the functor $\mathbb{S}$ should extend to a 2-functor. In particular, any 3-cell between cartesian morphisms of polynomials should induce an internal natural transformation between the induced internal functors. However, since the association of internal functors to morphisms of polynomials works only for \textit{cartesian} morphisms of polynomials, we cannot simply take internal natural transformations as the 3-cells of $\mathbf{Poly}_{\mathcal{E}}$. \Cref{lemHalfInternalNT,lemCartesianAdjustmentsAreInternalNT} provide a correspondence between internal natural transformations $\fisc{\varphi} \Rightarrow \fisc{\psi}$ and particular morphisms of $\mathcal{E}$ in a way that generalises to the case when $\varphi$ and $\psi$ are not required to be cartesian.
\begin{lemma}
\label{lemHalfInternalNT}
Let $f : B \to A$ and $g : D \to C$ be polynomials in a locally cartesian closed category $\mathcal{E}$ and let $\varphi, \psi : f \pRightarrow g$ be cartesian morphisms of polynomials. There is a bijection between the set of morphisms $\alpha : \Delta_{\varphi_0} D \to \Delta_{\psi_0} D$ in $\mathcal{E} \slice{A}$ and the set of morphisms $\widehat{\alpha} : A \to \fisc{g}_1$ in $\mathcal{E} \slice{C \times C}$, as indicated by dashed arrows in the following diagrams, where $\varphi_2, \psi_2$ are canonical isomorphisms induced by the universal property of pullbacks.
\begin{center}
\begin{tikzcd}[row sep=small, column sep=small]
\Delta_{\varphi} D
\arrow[rr, dashed, blue, "\alpha"]
\arrow[d, "\varphi_2"', "{\scriptsize \cong}"]
&&
\Delta_{\psi_0} D
\arrow[d, "\psi_2", "{\scriptsize \cong}"']
\\
B
\arrow[dr, "f"', bend right]
&&
B
\arrow[dl, "f", bend left]
\\
&
A
&
\end{tikzcd}
\hspace{30pt}
\begin{tikzcd}[row sep=huge, column sep=huge]
&
\fisc{g}_1
\arrow[d, "\partial"]
\\
A
\arrow[ur, dashed, blue, "\widehat{\alpha}"]
\arrow[r, "{\langle \varphi_0, \psi_0 \rangle}"']
&
C \times C
\end{tikzcd}
\end{center}
\end{lemma}
\begin{proof}
Given $\alpha : \Delta_{\varphi_0} D \to \Delta_{\psi_0} D$ in $\mathcal{E} \slice{A}$, the exponential transpose of $\alpha$ in $\mathcal{E} \slice{A}$ is, as a morphism in $\mathcal{E}$, a section $\overline{\alpha} : A \to H$ of the projection $H \to A$, where $H = \sum_{a \in A} D_{\psi_0(a)}^{D_{\varphi_0(a)}}$. This projection is precisely the pullback of $\fisc{g}_1 \to C \times C$ along $\langle \varphi_0, \psi_0 \rangle$, as illustrated in the following diagram:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
H
\arrow[d]
\arrow[r]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\fisc{g}_1
\arrow[d, "\partial"]
\\
A
\arrow[r, "{\langle \varphi_0, \psi_0 \rangle}"']
\arrow[u, bend left, dashed, blue, "\overline{\alpha}"]
&
C \times C
\end{tikzcd}
\end{center}
But sections of the pullback correspond with diagonal fillers $\widehat{\alpha} : A \to \fisc{g}_1$ of the pullback square. This is as required, since such a filler making the lower triangle commute makes the upper triangle commute automatically. This concludes the proof of (a).
\end{proof}
\begin{lemma}
\label{lemCartesianAdjustmentsAreInternalNT}
Let $f : B \to A$ and $g : D \to C$ be polynomials in a locally cartesian closed category $\mathcal{E}$, let $\varphi,\psi : f \pRightarrow g$ be cartesian morphisms of polynomials, and let $\alpha,\widehat{\alpha}$ be as in \Cref{lemHalfInternalNT}. The following are equivalent:
\begin{enumerate}[(i)]
\item $\widehat{\alpha}$ is an internal natural transformation $\fisc{\varphi} \Rightarrow \fisc{\psi}$;
\item In the internal language of $\mathcal{E}$, we have $\fisc{\psi}(k) \circ \alpha_a = \alpha_{a'} \circ \fisc{\varphi}(k)$ for $a,a' \in A$ and $k \in B_{a'}^{B_a}$;
\item In the internal language of $\mathcal{E}$, we have $\gamma_{a'} \circ k = k \circ \gamma_a$ for $a,a' \in A$ and $k \in B_{a'}^{B_a}$, where $\gamma = \psi_2 \circ \alpha \circ \varphi_2^{-1} : B \to B$;
\item $\alpha$ is a morphism in $\mathcal{E} \slice{B}$, i.e.\ $\psi_2 \circ \alpha = \varphi_2$.
\end{enumerate}
\end{lemma}
\begin{proof}
We prove (i)$\Leftrightarrow$(ii)$\Leftrightarrow$(iii)$\Leftrightarrow$(iv).
\begin{itemize}
\item[(i)$\Leftrightarrow$(ii)] In light of \Cref{lemHalfInternalNT}, this is just a translation into the internal language of $\mathcal{E}$ of the definition of an internal natural transformation.
\item[(ii)$\Leftrightarrow$(iii)] Consider the following `internal' diagram, parametrised by $a,a' \in A$ and $k \in B_{a'}^{B_a}$.
\begin{diagram}
B_a
\arrow[d, "k"']
\arrow[r, "(\varphi_2)_a^{-1}"]
&
D_{\varphi(a)}
\arrow[d, "\fisc{\varphi}(k)" description]
\arrow[r, "\alpha_a"]
&
D_{\psi(a)}
\arrow[d, "\fisc{\psi}(k)" description]
\arrow[r, "(\psi_2)_a"]
&
B_a
\arrow[d, "k"]
\\
B_{a'}
\arrow[r, "(\varphi_2)_{a'}^{-1}"']
&
D_{\varphi(a')}
\arrow[r, "\alpha_{a'}"']
&
D_{\psi(a')}
\arrow[r, "(\psi_2)_{a'}"']
&
B_{a'}
\end{diagram}
The left- and right-hand squares commute by functoriality of $\fisc{\varphi}$ and $\fisc{\psi}$.
The centre square commutes if and only if (ii) holds, and the outer square commutes if and only if (iii) holds. But the centre square commutes if and only if the outer square commutes.
\item[(iii)$\Leftrightarrow$(iv)] Let $a \in A$ and $b \in B_a$, and let $k \in B_a^{B_a}$ be the constant (internal) function with value $b$. If (iii) holds, then
$$\gamma_a(b) = \gamma_a(k(b)) = k(\gamma_{a}(b)) = b$$
so that $\seqbn{\gamma_a = \mathrm{id}_{B_a}}{a \in A}$ holds. But this says precisely that $\gamma=\mathrm{id}_B$, and hence $\psi_2 \circ \alpha = \varphi_2$. The converse (iv)$\Rightarrow$(iii) is immediate.
\end{itemize}
\end{proof}
\begin{definition}
\label{defAdjustment}
\index{adjustment}
Let $F : \declpoly IBAJsft$ and $G : \declpoly IDCJugv$ be polynomials and let $\varphi,\psi : F \pRightarrow G$ be morphisms of polynomials, as in:
\begin{center}
\begin{tikzcd}[row sep=normal, column sep=normal]
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
&
A
\arrow[d, equals]
\arrow[dr, bend left=20, "t"]
&
&
&
B
\arrow[r,"f"]
\arrow[dl, bend right=20, "s"']
&
A
\arrow[d, equals]
\arrow[dr, bend left=20, "t"]
&
\\
I
&
D_{\varphi}
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r]
\arrow[d,"\varphi_1"']
\arrow[u,"\varphi_2"]
&
A
\arrow[d,"\varphi_0"]
&
J
&
I
&
D_{\psi}
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r]
\arrow[d,"\psi_1"']
\arrow[u,"\psi_2"]
&
A
\arrow[d,"\psi_0"]
&
J
\\
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
&
&
D
\arrow[r,"g"']
\arrow[ul, bend left=20, "u"]
&
C
\arrow[ur, bend right=20, "v"']
&
\end{tikzcd}
\end{center}
An \textbf{adjustment} $\alpha$ from $\varphi$ to $\psi$, denoted $\alpha : \varphi \pRrightarrow \psi$, is a morphism $\alpha : D_{\varphi} \to D_{\psi}$ over $B$:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
D_{\varphi}
\arrow[rr,"\alpha"]
\arrow[dr,"\varphi_2"']
&&
D_{\psi}
\arrow[dl,"\psi_2"]
\\
&
B
&
\end{tikzcd}
\end{center}
\end{definition}
\begin{numbered}
\Cref{lemCartesianAdjustmentsAreInternalNT} tells us that, when $\varphi$ and $\psi$ are cartesian, adjustments $\alpha : \varphi \pRrightarrow \psi$ can equivalently be described as internal natural transformations $\widehat{\alpha} : \varphi \Rightarrow \psi$.
\end{numbered}
We can now, at least, state the following conjecture.
\begin{conjecture}
\label{conjPolyETricategory}
There is a $\mathbf{2Cat}$-enriched bicategory $\mathfrak{Poly}_{\mathcal{E}}$, whose underlying bicategory is $\mathbf{Poly}_{\mathcal{E}}$ and whose 3-cells are adjustments.
\end{conjecture}
Unfortunately, the details required to fully prove \Cref{conjPolyETricategory} turned out to be somewhat laborious and, since its full force is not required for our main results, we have left the task of verifying these details for future work. Our progress so far is outlined in \Cref{lemPolyEHom2Categories} and \Cref{rmkCompleteProofOfConjecture}, and we prove the analogous result with attention restricted to \textit{cartesian} morphisms of polynomials in \Cref{thmPolyECartTrivial}.
\begin{lemma}
\label{lemPolyEHom2Categories}
Let $I$ and $J$ be objects in a locally cartesian closed category $\mathcal{E}$. There is a 2-category $\mathfrak{Poly}_{\mathcal{E}}(I,J)$ whose underlying category is $\mathbf{Poly}_{\mathcal{E}}(I,J)$ and whose 2-cells are adjustments.
\end{lemma}
\begin{proof}
Given polynomials $F,G : I \pto J$, the category $\mathfrak{Poly}_{\mathcal{E}}(I,J)(F,G)$ has morphisms of polynomials $F \pRightarrow G$ as its objects and adjustments as its morphisms, with identity and composition inherited from $\mathcal{E}\slice{B}$.
Given a polynomial $F : \declpoly IBAJsft$, we have an evident functor $\mathbf{1} \to \mathfrak{Poly}_{\mathcal{E}}(I,J)(F,F)$ picking out the identity morphism $F \pRightarrow F$ and the identity adjustment on this morphism.
Let $F,G,H : I \pto J$ be polynomials. The composition functor
$$c : \mathbf{Poly}_{\mathcal{E}}(I,J)(G,H) \times \mathbf{Poly}_{\mathcal{E}}(I,J)(F,G) \to \mathbf{Poly}_{\mathcal{E}}(I,J)(F,H)$$
is defined as follows. The composite $c(\psi,\varphi)$ of $\varphi : F \pRightarrow G$ and $\psi : G \pRightarrow H$ is defined using a pullback construction, as defined in \cite[3.9]{GambinoKock2013PolynomialFunctors}---in particular, the morphism $(\psi \circ \varphi)_2 : D_{\psi \circ \varphi} \to B$ is induced by the universal property of pullbacks. This yields, for each pair of adjustments $\alpha : \varphi \pRrightarrow \varphi'$ and $\beta : \psi \pRrightarrow \psi'$, a unique morphism $D_{\psi \circ \varphi} \to D_{\psi' \circ \varphi'}$ in $\mathcal{E}$ induced by the universal property of pullbacks, which is an adjustment since it makes the required triangle in $\mathcal{E}\slice{B}$ commute. We take this morphism to be $c(\beta,\alpha)$. Functoriality of $c$ is then immediate from the universal property of pullbacks.
It can be easily verified that this data satisfies the required identity and associativity axioms. Thus we have a 2-category.
\end{proof}
\begin{numbered}
\label{rmkCompleteProofOfConjecture}
In order to prove \Cref{conjPolyETricategory} in its entirety, it remains to define the coherence 2-natural isomorphisms $\alpha,\lambda,\rho$, as described in \Cref{def2CatEnrichedBicategory}, and verify that the required diagrams commute.
To give the reader an idea of the flavour of this task, we present some progress towards defining the associator 2-natural transformation $\alpha$. For each quadruple of objects $I,J,K,L$ of $\mathcal{E}$, this must assign to each triple of polynomials $I \overset{F}{\pto} J \overset{G}{\pto} K \overset{H}{\pto} L$ a morphism of polynomials $\alpha_{F,G,H} : (H \cdot G) \cdot F \pRightarrow H \cdot (G \cdot F)$ and, to each triple of morphisms of polynomials
$$\varphi : F \pRightarrow F', \quad \chi : G \pRightarrow G', \quad \psi : H \pRightarrow H'
$$
an adjustment
$$\alpha_{\varphi,\chi,\psi} : \psi \cdot (\chi \cdot \varphi) \circ \alpha_{F,G,H} \pRrightarrow \alpha_{F',G',H'} \circ (\psi \cdot \chi) \cdot \varphi : (F \cdot G) \cdot H \pRightarrow F' \cdot (G' \cdot H')
$$
which satisfy naturality laws and behave well with respect to composition and identity.
Restricting to the case $I=J=K=L=1$, let $f : B \to A$, $g : D \to C$ and $h : F \to E$ be morphisms of $\mathcal{E}$, considered as polynomials $1 \pto 1$ as usual. We will construct an invertible (and hence cartesian) morphism of polynomials $\alpha_{f,g,h} : (h \cdot g) \cdot f \pRightarrow h \cdot (g \cdot f)$. Such a morphism must fit into the following pullback square:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\sum_{e,n,q} \sum_{f \in F_e} \sum_{d \in D_{n(f)}} B_{q(f,d)}
\arrow[d, "(h \cdot g) \cdot f"']
\arrow[r, "{(\alpha_{f,g,h})_1}"]
\pullbackc{dr}{-0.1}
&
\sum_{e,p} \sum_{f \in F_e} \sum_{d \in D_{c_f}} B_{m_f(d)}
\arrow[d, "h \cdot (g \cdot f)"]
\\
\sum_{e \in E} \sum_{n \in C^{F_e}} \prod_{f \in F_e} \prod_{d \in D_{n(f)}} A
\arrow[r, "{(\alpha_{f,g,h})_0}"']
&
\sum_{e \in E} \prod_{f \in F_e} \sum_{c \in C} \prod_{d \in D_c} A
\end{tikzcd}
\end{center}
In the above, we have overloaded the letter $f$, which is ambiguous between the morphism $f : B \to A$ of $\mathcal{E}$ and an internal `element' $f \in F_e$; and we have written $p(f)=(c_f,m_f)$ for $p \in \prod_{f \in F_e} \sum_{c \in C} \prod_{d \in D_c} A$ and $f \in F_e$.
The isomorphism $(\alpha_{f,g,h})_0$ is given by applying the type theoretic axiom of choice to exchange the middle $\Sigma\Pi$. Specifically, we have
$$(\alpha_{f,g,h})_0(e,n,q) = (e, \lambda f. \langle n(f), q(f) \rangle)
$$
The isomorphism $(\alpha_{f,g,h})_1$ acts trivially; that is, we have
$$(\alpha_{f,g,h})_1(e,n,q,f,d,b) = ((\alpha_{f,g,h})_0(e,n,q),f,d,b)
$$
We suspect that the definition of $\alpha_{\varphi,\chi,\psi}$ will also be an instance of the type theoretic axiom of choice. From this, it will be an exercise in symbolic manipulations to check that the `Mac Lane pentagon' commutes.
\end{numbered}
The situation in which we restrict our attention to cartesian morphisms of polynomials is greatly simplified by the following lemma, allowing us to prove \Cref{conjPolyETricategory} for this case in \Cref{thmPolyECartTrivial}.
\begin{lemma}
\label{lemTriviality}
Let $\varphi$ and $\psi$ be morphisms of polynomials. If $\psi$ is cartesian then there is a unique adjustment from $\varphi$ to $\psi$.
\end{lemma}
\begin{proof}
When $\psi$ is cartesian, the morphism $\psi_2$ is invertible, so that $\alpha = \psi_2^{-1} \circ \varphi_2$ is the only morphism making the required triangle commute.
\end{proof}
From \Cref{thmPolyEBicategory}(d) and \Cref{lemTriviality}, we immediately obtain the following theorem.
\begin{theorem}
\label{thmPolyECartTrivial}
There is a $\mathbf{2Cat}$-enriched bicategory $\mathfrak{Poly}\cart_{\mathcal{E}}$ whose underlying bicategory is $\mathbf{Poly}\cart_{\mathcal{E}}$ and whose hom 2-categories $\mathfrak{Poly}\cart_{\mathcal{E}}(I,J)$ are locally codiscrete for all objects $I,J$ of $\mathcal{E}$.
\end{theorem}
\begin{proof}
The description of the $\mathbf{2Cat}$-enriched bicategory data is described in \Cref{rmkCompleteProofOfConjecture}. The coherence data is uniquely defined and satisfies the required equations by \Cref{lemTriviality}.
\end{proof}
Before moving on, we extend \Cref{lemPolynomialsFromOneToOne} to our tricategorical setting.
\begin{lemma}
\label{lemPolynomialsFromOneToOneTwoCategorical}
For fixed objects $I$ and $J$ of a locally cartesian closed category $\mathcal{E}$, there are full and faithful 2-functors
$$S : \mathfrak{Poly}_{\mathcal{E}}(I,J) \to \mathfrak{Poly}_{\mathcal{E}\slice{I \times J}}(1,1) \quad \text{and} \quad S\cart : \mathfrak{Poly}\cart_{\mathcal{E}}(I,J) \to \mathfrak{Poly}\cart_{\mathcal{E} \slice{I \times J}}(1,1)$$
\end{lemma}
\begin{proof}
Let $F : \declpoly IBAJsft$ and $G : \declpoly IDCJugv$ be polynomials $I \pto J$, and let $\varphi,\psi$ be morphisms of polynomials $F \pRightarrow G$. An adjustment $\alpha : \varphi \pRrightarrow \psi$ is simply a morphism $\alpha : \varphi_2 \to \psi_2$ in $\mathcal{E}\slice{B}$. Since $S(\varphi)_2 = \varphi_2$ and $S(\psi)_2 = \psi_2$, an adjustment $S(\varphi) \pRrightarrow S(\psi)$ is a morphism $\varphi_2 \to \psi_2$ in $(\mathcal{E} \slice{I \times J}) \slice{\langle s, t \circ f \rangle} \cong \mathcal{E} \slice{B}$. So we can take $S$ to be the identity on adjustments. This trivially extends the functors $S$ and $S\cart$ of \Cref{lemPolynomialsFromOneToOne} to full and faithful 2-functors.
\end{proof}
\begin{theorem}
\label{thmPolynomialsYieldInternalCategories2Functor}
Fix objects $I$ and $J$ in a locally cartesian closed category $\mathcal{E}$. There is a locally full and faithful 2-functor
$$\mathbb{A}_{(-)} : \mathfrak{Poly}\cart_{\mathcal{E}}(I,J) \to \mathbf{Cat}(\mathcal{E} \slice{I \times J})
$$
whose underlying 1-functor is as in \Cref{cnsCartesianMorphismsInduceInternalFunctors}.
\end{theorem}
\begin{proof}
Let $\varphi,\psi : F \pRightarrow G$ be cartesian morphisms of polynomials $I \pto J$. We proved in \Cref{lemCartesianAdjustmentsAreInternalNT} that adjustments $\alpha : \varphi \pRrightarrow \psi$ correspond bijectively with internal natural transformations $\widehat{\alpha} : \fisc{\varphi} \Rightarrow \fisc{\psi}$. Moreover, by \Cref{lemTriviality}, there is a unique internal natural transformation $\fisc{\varphi} \Rightarrow \fisc{\psi}$. As such, defining $\mathbb{A}_{\alpha} = \widehat{\alpha}$ for all adjustments $\alpha$, we automatically obtain a 2-functor, which is locally full and faithful since the hom-sets
$$\mathfrak{Poly}\cart_{\mathcal{E}}(I,J)(F,G)(\varphi,\psi) \quad \text{and} \quad \mathbf{Cat}(\mathcal{E}\slice{I \times J})(\fisc{f},\fisc{g})(\fisc{\varphi},\fisc{\psi})$$
are both singletons.
\end{proof}
\subsection*{Polynomial pseudomonads}
We are now ready to define the notion of a polynomial pseudomonad. First, we recall the definition of a pseudomonad in a $\mathbf{2Cat}$-enriched bicategory (in fact, the definition works just fine in an arbitrary tricategory).
\begin{definition}
\label{defPseudomonadIn2CatEnrichedBicategory}
\index{pseudomonad}
Let $\mathfrak{B}$ be a $\mathbf{2Cat}$-enriched bicategory. A \textbf{pseudomonad} $\mathbb{T}$ in $\mathfrak{B}$ consists of:
\begin{itemize}
\item A 0-cell $I$ of $\mathfrak{B}$;
\item A 1-cell $t : I \to I$;
\item 2-cells $\eta : \mathrm{id}_I \Rightarrow t$ and $\mu : t \cdot t \Rightarrow t$, called the \textbf{unit} and \textbf{multiplication} of the pseudomonad, respectively;
\item Invertible 3-cells $\alpha, \lambda, \rho$, called the \textbf{associator}, \textbf{left unitor} and \textbf{right unitor} of the pseudomonad, respectively, as in
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot \mu"]
\arrow[d, Rightarrow, "\mu \cdot t"']
&
t \cdot t
\arrow[d, Rightarrow, "\mu"]
\arrow[dl, draw=none, pos=0.5, "\alpha \threecell{225}" description]
&
t
\arrow[r, Rightarrow, "t \cdot \eta"]
\arrow[dr, Rightarrow, "\mathrm{id}_t"']
&
t \cdot t
\arrow[d, Rightarrow, "\mu" description]
\arrow[dl, draw=none, pos=0.25, "\lambda \threecell{225}" description]
\arrow[dr, draw=none, pos=0.25, "\rho \threecell{315}" description]
&
t
\arrow[l, Rightarrow, "\eta \cdot t"']
\arrow[dl, Rightarrow, "\mathrm{id}_t"]
\\
t \cdot t
\arrow[r, Rightarrow, "\mu"']
&
t
&
~
&
t
&
~
\end{tikzcd}
\end{center}
\end{itemize}
such that the following equations of pasting diagrams hold:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={40pt}]
t \cdot t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot t \cdot \mu"]
\arrow[d, Rightarrow, "\mu \cdot t \cdot t"']
\arrow[dr, Rightarrow, "t \cdot \mu \cdot t" description]
&
t \cdot t \cdot t
\arrow[dr, Rightarrow, "t \cdot \mu"]
\arrow[d, draw=none, pos=0.5, "t \cdot \alpha\ \threecell{270} \phantom{T\alpha}" description]
&
&
t \cdot t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot t \cdot \mu"]
\arrow[d, Rightarrow, "\mu \cdot t \cdot t"']
\arrow[dr, draw=none, pos=0.5, "\cong" description]
&
t \cdot t \cdot t
\arrow[dr, Rightarrow, "t \cdot \mu"]
\arrow[d, Rightarrow, "\mu \cdot t" description]
&
\\
t \cdot t \cdot t
\arrow[dr, Rightarrow, "\mu \cdot t"']
\arrow[r, draw=none, pos=0.5, "\threecell{0}"', "\alpha \cdot t"]
&
t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot \mu" description]
\arrow[d, Rightarrow, "\mu \cdot t" description]
\arrow[dr, draw=none, pos=0.5, "\alpha \threecell{315} \phantom{\alpha}" description]
&
t \cdot t
\arrow[d, Rightarrow, "\mu"]
\arrow[r, draw=none, "=" description]
&
t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot \mu" description]
\arrow[dr, Rightarrow, "\mu \cdot t"']
&
t \cdot t
\arrow[dr, Rightarrow, "\mu" description]
\arrow[r, draw=none, pos=0.5, "\alpha", "\threecell{0}"']
\arrow[d, draw=none, pos=0.5, "\alpha \threecell{270} \phantom{\alpha}" description]
&
t \cdot t
\arrow[d, Rightarrow, "\mu" description]
\\
&
t \cdot t
\arrow[r, Rightarrow, "\mu"']
&
t
&
&
t \cdot t
\arrow[r, Rightarrow, "\mu"']
&
t
\end{tikzcd}
\end{center}
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={40pt}]
t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot \mu"]
\arrow[dr, Rightarrow, "\mu \cdot t" description]
&
t \cdot t
\arrow[dr, Rightarrow, "\mu"{name=domequals}]
\arrow[d, draw=none, pos=0.5, "\alpha \threecell{270} \phantom{\alpha}" description]
&
&
t \cdot t \cdot t
\arrow[r, Rightarrow, "t \cdot \mu"]
\arrow[dr, draw=none, pos=0.2, "t \cdot \rho \threecell{315}" description]
&
t \cdot t
\arrow[dr, Rightarrow, "\mu"]
\arrow[d, draw=none, pos=0.5, "=" description]
&
\\
t \cdot t
\arrow[r, Rightarrow, "\mathrm{id}_{t \cdot t}"']
\arrow[u, Rightarrow, "t \cdot \eta \cdot t"]
\arrow[ur, draw=none, pos=0.2, "\lambda \cdot t \threecell{293}" description]
&
t \cdot t
\arrow[r, Rightarrow, "\mu"']
&
t
&
t \cdot t
\arrow[u, Rightarrow, "t \cdot \eta \cdot t"{name=codequals}]
\arrow[from=domequals, to=codequals, draw=none, pos=0.67, "=" description]
\arrow[rr, Rightarrow, "\mu"']
\arrow[ur, Rightarrow, "\mathrm{id}_{t \cdot t}" description]
&
~
&
t
\end{tikzcd}
\end{center}
\end{definition}
\begin{numbered}
\label{rmk2MonadPseumonadOn2Cat}
We reserve the following terminology for particular cases of pseudomonads in $\mathbf{2Cat}$-enriched bicategories:
\begin{itemize}
\item When the 3-cells $\alpha,\lambda,\rho$ are identities, we call $\mathbb{T}$ a \textbf{2-monad} in $\mathfrak{B}$. Note that a 2-monad in $\mathfrak{B}$ restricts to a monad in the underlying bicategory of $\mathfrak{B}$, and that every monad in the underlying bicategory of $\mathfrak{B}$ is automatically a 2-monad in $\mathfrak{B}$.
\item When $\mathfrak{B}=\mathbf{2Cat}$ is the 3-category of 2-categories, 2-functors, pseudo-natural transformations and modifications, and the underlying 0-cell of $\mathbb{T}$ is a 2-category $\mathcal{K}$, we say that $\mathbb{T}$ is a pseudomonad (or 2-monad) \textbf{on} $\mathcal{K}$.
\end{itemize}
\end{numbered}
\begin{definition}
\label{defPolynomialPseudomonad}
\index{polynomial!pseudomonad@{---} pseudomonad}
A \textbf{polynomial 2-monad} (resp.\ \textbf{polynomial pseudomonad}) is a 2-monad (resp.\ pseudomonad) in the $\mathbf{2Cat}$-enriched bicategory $\mathfrak{Poly}\cart_{\mathcal{E}}$. Specifically, a polynomial pseudomonad consists of the following data:
\begin{itemize}
\item An object $I$ of $\mathcal{E}$;
\item A polynomial $p : I \pto I$;
\item Cartesian morphisms of polynomials $\eta : i_I \pRightarrow p$ and $\mu : p \cdot p \pRightarrow p$;
\item Invertible adjustments $\alpha : \mu \circ (p \cdot \mu) \pRrightarrow \mu \circ (\mu \cdot p)$, $\lambda : \mu \circ (\eta \cdot p) \pRrightarrow \mathrm{id}_p$ and $\rho : \mu \circ (p \cdot \eta) \pRrightarrow \mathrm{id}_p$;
\end{itemize}
such that the adjustments $\alpha, \lambda, \rho$ satisfy the coherence axioms of \Cref{defPseudomonadIn2CatEnrichedBicategory}.
\end{definition}
A consequence of \Cref{thmPolyECartTrivial} is that all parallel pairs of cartesian morphisms of polynomials are uniquely isomorphic. It follows that, in this case, simply specifying the \textit{data} for a polynomial monad suffices for defining a polynomial pseudomonad---this is stated precisely in the following lemma, whose proof is immediate.
\begin{lemma}
\label{lemMonadDataIsPseudomonad}
Let $I$ be an object of $\mathcal{E}$, let $p : I \pto I$ be a polynomial and let $\eta : i_I \pRightarrow p$ and $\mu : p \cdot p \pRightarrow p$ be cartesian morphisms of polynomials. Then there are unique adjustments $\alpha,\lambda,\rho$ such that the septuple $\mathbb{P}=(I,p,\eta,\mu,\alpha,\lambda,\rho)$ is a polynomial pseudomonad in $\mathcal{E}$. \qed
\end{lemma}
The next result allows us to lift polynomial 2-monads and polynomial pseudomonads \textit{in} $\mathcal{E}$ to 2-monads and pseudomonads \textit{on} the hom 2-categories of $\mathfrak{Poly}\cart_{\mathcal{E}}$. This will play a key role in identifying the sense in which a natural model $p : \dot{\mathcal{U}} \to \mathcal{U}$ is a pseudoalgebra over the polynomial pseudomonad it induces.
\begin{theorem}
\label{thmPolynomialPseudomonadLifts}
Let $\mathbb{P} = (p,\eta,\mu,\alpha,\lambda,\rho)$ be a polynomial 2-monad (resp.\ pseudomonad) on an object $I$ of a locally cartesian closed category $\mathcal{E}$. Then $\mathbb{P}$ lifts to a 2-monad (resp.\ pseudomonad) $\mathbb{P}^+ = (P, h, m, \dots)$ on $\mathfrak{Poly}\cart_{\mathcal{E}}(I,I)$.
\end{theorem}
\begin{proof}
By \Cref{lemPolynomialsFromOneToOneTwoCategorical}, we may take $I=1$ without loss of generality, so thtat $p$ is just a morphism $p : Y \to X$ in $\mathcal{E}$ and $\eta,\mu$ are pullback squares in $\mathcal{E}$ (cf.\ \Cref{rmkCartesianMorphismIsPullbackSquare}).
For notational simplicity, write $\mathcal{K}$ to denote the 2-category $\mathfrak{Poly}\cart_{\mathcal{E}}(1,1)$. Note $\mathcal{K}$ has as its underlying category the wide subcategory $\mathcal{E}^{\to}_{\text{cart}}$ of $\mathcal{E}^{\to}$ whose morphisms are the pullback squares. Thus the 0-cells of $\mathcal{K}$ are the morphisms of $\mathcal{E}$, the 1-cells of $\mathcal{K}$ are pullback squares in $\mathcal{E}$, and between any two 1-cells there is a unique 2-cell by \Cref{thmPolyECartTrivial}.
First we must define a 2-functor $P : \mathcal{K} \to \mathcal{K}$. Define $P$ on the 0-cells of $\mathcal{K}$ by letting $P(f)=P_p(f)$ for all $f : B \to A$ in $\mathcal{E}$. Given a 1-cell $\varphi : f \pRightarrow g$ of $\mathcal{K}$---that is, a pullback square in $\mathcal{E}$---let $P(\varphi)$ be the result of applying the extension $P_p$ of $p$ to the pullback square defining $\varphi$, as in:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\sum_{x \in X} B^{Y_x}
\arrow[r, "P_p(\varphi_1)"]
\arrow[d, "P_p(f)"']
\pullbackc{dr}{-0.05}
&
\sum_{x \in X} D^{Y_x}
\arrow[d, "P_p(g)"]
\\
\sum_{x \in X} A^{Y_x}
\arrow[r, "P_p(\varphi_0)"']
&
\sum_{x \in X} C^{Y_x}
\end{tikzcd}
\end{center}
Note that $P(\varphi)$ is indeed a pullback square, since polynomial functors preserve all connected limits \cite{GambinoKock2013PolynomialFunctors}. Thus $P(\varphi)$ is a 1-cell from $P(f)$ to $P(g)$ in $\mathcal{K}$.
Now $P$ respects identity 1-cells in $\mathcal{K}$, since if $f : B \to A$ is a 0-cell then
$$P(\mathrm{id}_f)_0 = P_p(\mathrm{id}_B) = \mathrm{id}_{P_p(B)} = (\mathrm{id}_{P(f)})_0
$$
and likewise $P(\mathrm{id}_f)_1 = (\mathrm{id}_{P(f)})_1$; and $P$ respects composition of 2-cells in $\mathcal{K}$, since for $i \in \{0,1\}$ we have
$$P(\psi \circ \varphi)_i = P_p((\psi \circ \varphi)_i) = P_p(\psi_i \circ \varphi_i) = P_p(\psi_i) \circ P_p(\varphi_i) = P(\psi)_i \circ P(\varphi)_i = (P(\psi) \circ P(\varphi))_i
$$
Hence the action of $P$ defines a functor on the underlying category of $\mathcal{K}$.
The fact that $P$ extends to a $2$-functor is trivial: given an adjustment $\alpha : \varphi \pRrightarrow \psi$, there is a unique adjustment $P(\varphi) \pRrightarrow P(\psi)$. We take this to be $P(\alpha)$, and note that the axioms governing identity and composition of 2-cells hold trivially by uniqueness of adjustments.
The pseudo-natural transformations $h : \mathrm{id}_{\mathcal{K}} \Rightarrow P$ and $m : P \circ P \Rightarrow P$ giving the unit and multiplication of $\mathbb{P}^+$ are induced by the unit $\eta : i_1 \pRightarrow p$ and $\mu : p \cdot p \pRightarrow p$ of $\mathbb{P}$. Specifically, define the components $h_f : f \pRightarrow P(f)$ and $m_f : P(P(f)) \pRightarrow P(f)$ at a 0-cell $f : B \to A$ of $\mathcal{K}$ to be the following squares, respectively:
\begin{center}
\begin{tikzcd}[row sep=normal, column sep=huge]
B
\arrow[r, "(P_{\eta})_B"]
\arrow[d, "f"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\sum_{x \in X} B^{Y_x}
\arrow[d, "P(f)"]
&
\sum_{(x,t) \in \sum_{x \in X} X^{Y_x}} B^{\left(\sum_{y \in Y_x} Y_{t(y)}\right)}
\arrow[r, "(P_{\mu})_B"]
\arrow[d, "P(P(f))"']
\pullbackc{dr}{-0.2}
&
\sum_{x \in X} B^{Y_x}
\arrow[d, "P(f)"]
\\
A
\arrow[r, "(P_{\eta})_A"']
&
\sum_{x \in X} A^{Y_x}
&
\sum_{(x,t) \in \sum_{x \in X} X^{Y_x}} A^{\left(\sum_{y \in Y_x} Y_{t(y)}\right)}
\arrow[r, "(P_{\mu})_A"']
&
\sum_{x \in X} A^{Y_x}
\end{tikzcd}
\end{center}
Note that these squares commute and are cartesian by naturality and cartesianness of the extensions $P_{\eta},P_{\mu}$ of $\eta,\mu$. That $h$ and $m$ extend to pseudo-natural transformations is immediate from \Cref{thmPolyECartTrivial}: the pseudo-naturality 2-cells in $\mathcal{K}$ are adjustments, so they exist uniquely and satisfy the coherence axioms for pseudo-natural transformations automatically.
If $\mathbb{P}$ is a polynomial 2-monad, it is now easy to verify that the 2-monad laws hold for $\mathbb{P}^+$. If $\mathbb{P}$ is a polynomial pseudomonad, then the pseudomonad laws for $\mathbb{P}^+$ concern existence of and equations between adjustments, hence are trivially true by \Cref{thmPolyECartTrivial}.
\end{proof}
\begin{definition}
\label{defLiftOfPseudomonad}
Given a polynomial monad (resp.\ pseudomonad) $\mathbb{P}$, the \textbf{lift} of $\mathbb{P}$ is the 2-monad (resp.\ pseudomonad) $\mathbb{P}^+$ as in \Cref{thmPolynomialPseudomonadLifts}.
\end{definition}
\begin{definition}
\label{defPseudoalgebra}
\index{pseudoalgebra}
Let $\mathbb{T} = (T, h, m, \alpha, \lambda, \rho)$ be a pseudomonad on a 2-category $\mathcal{K}$. A \textbf{pseudoalgebra} over $\mathbb{T}$ consists of
\begin{itemize}
\item A 0-cell $A$ of $\mathcal{K}$;
\item A 1-cell $a : T(A) \to A$ in $\mathcal{K}$;
\item Invertible 2-cells $\sigma, \tau$ of $\mathcal{K}$, as in:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
T(T(A))
\arrow[r, "T(a)"]
\arrow[d, "m_T"']
&
T(A)
\arrow[d, "a"]
\arrow[dl, draw=none, pos=0.5, "\sigma \twocell{225}" description]
&
A
\arrow[r, "h_A"]
\arrow[dr, "\mathrm{id}_A"']
&
T(A)
\arrow[d, "a"]
\arrow[dl, draw=none, pos=0.25, "\tau \twocell{225}" description]
\\
T(A)
\arrow[r, "a"']
&
A
&
~
&
A
\end{tikzcd}
\end{center}
\end{itemize}
such that the following equations of pasting diagrams hold:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={40pt}]
T^3A
\arrow[r, "TTa"]
\arrow[d, "m_{TA}"']
\arrow[dr, "Tm_A" description]
&
T^2A
\arrow[dr, "Ta"]
\arrow[d, draw=none, pos=0.5, "T\sigma\ \twocell{270} \phantom{T\sigma}" description]
&
&
T^3A
\arrow[r, "T^2a"]
\arrow[d, "m_{TA}"']
\arrow[dr, draw=none, pos=0.5, "\cong" description]
&
T^2A
\arrow[dr, "Ta"]
\arrow[d, "m_A" description]
&
\\
T^2A
\arrow[dr, "m_A"']
\arrow[r, draw=none, pos=0.5, "\twocell{0}"', "\alpha_A"]
&
T^2A
\arrow[r, "Ta" description]
\arrow[d, "m_A" description]
\arrow[dr, draw=none, pos=0.5, "\sigma \twocell{315} \phantom{\sigma}" description]
&
TA
\arrow[d, "a"]
\arrow[r, draw=none, "=" description]
&
T^2A
\arrow[r, "Ta" description]
\arrow[dr, "m_A"']
&
TA
\arrow[dr, "a" description]
\arrow[r, draw=none, pos=0.5, "\sigma", "\twocell{0}"']
\arrow[d, draw=none, pos=0.5, "\sigma \twocell{270} \phantom{\sigma}" description]
&
TA
\arrow[d, "a" description]
\\
&
TA
\arrow[r, "a"']
&
A
&
&
T(A)
\arrow[r, "a"']
&
A
\end{tikzcd}
\end{center}
\begin{center}
\begin{tikzcd}[row sep=huge, column sep={40pt}]
T^2A
\arrow[r, "Ta"]
\arrow[dr, "m_A" description]
&
TA
\arrow[dr, "a"{name=domequals}]
\arrow[d, draw=none, pos=0.5, "\sigma \twocell{270} \phantom{\sigma}" description]
&
&
T^2A
\arrow[r, "Ta"]
\arrow[dr, draw=none, pos=0.2, "T\tau \twocell{315}" description]
&
TA
\arrow[dr, "a"]
\arrow[d, draw=none, pos=0.5, "=" description]
&
\\
TA
\arrow[r, "\mathrm{id}_{TA}"']
\arrow[u, "Th_A"]
\arrow[ur, draw=none, pos=0.2, "\lambda_A \twocell{293} \phantom{\lambda_A}" description]
&
TA
\arrow[r, "a"']
&
TA
&
TA
\arrow[u, "Th_A"{name=codequals}]
\arrow[from=domequals, to=codequals, draw=none, pos=0.67, "=" description]
\arrow[rr, "a"']
\arrow[ur, "\mathrm{id}_{TA}" description]
&
~
&
A
\end{tikzcd}
\end{center}
\end{definition}
\begin{definition}
\label{defPolynomialPseudoalgebra}
Let $\mathbb{P} = (1, p : Y \to X, \dots)$ be a polynomial pseudomonad in a locally cartesian closed category $\mathcal{E}$. A \textbf{polynomial pseudoalgebra} over $\mathbb{P}$ is a pseudoalgebra over the lift $\mathbb{P}^+$. Specifically, it consists of:
\begin{itemize}
\item A polynomial $f : B \to A$;
\item A cartesian morphism of polynomials $\zeta : P_p(f) \pRightarrow f$;
\item Invertible adjustments $\sigma,\tau$ whose types are as in \Cref{defPseudoalgebra};
\end{itemize}
such that the adjustments $\sigma,\tau$ satisfy the coherence conditions of \Cref{defPseudoalgebra}.
\end{definition}
Much like with polynomial pseudomonads (\Cref{lemMonadDataIsPseudomonad}), merely specifying the \textit{data} for a polynomial pseudoalgebra suffices for the conditions to hold---again, this follows immediately from \Cref{thmPolyECartTrivial}.
\begin{lemma}
\label{lemAlgebraDataIsPseudoalgebra}
Let $\mathbb{P} = (I, p : Y \to X, \dots)$ be a polynomial pseudomonad in a locally cartesian closed category $\mathcal{E}$, let $f : B \to A$ be a polynomial and let $\zeta : P_p(f) \pRightarrow f$ be a morphism of polynomials. Then there are unique adjustments $\sigma,\tau$ making $(f,\zeta,\sigma,\tau)$ into a polynomial pseudoalgebra over $\mathbb{P}$. \qed
\end{lemma}
We are now ready to precisely state the sense in which a natural model admitting a unit type and dependent sum types `almost' gives rise to a polynomial monad, and one admitting dependent product types `almost' gives rise to an algebra over this monad.
\begin{theorem}
\label{thmUnitSigmaIffPolynomialPseudomonad}
Let $(\mathbb{C}, p)$ be a natural model.
\begin{enumerate}[(a)]
\item $(\mathbb{C}, p)$ supports a unit type and dependent sum types if and only if $p$ can be equipped with the structure of a polynomial pseudomonad $\mathbb{P}$ in $\widehat{\mathbb{C}}$.
\item $(\mathbb{C}, p)$ additionally supports dependent product types if and only if $p$ can be equipped with the structure of a polynomial pseudoalgebra over $\mathbb{P}$.
\end{enumerate}
\end{theorem}
\begin{proof}
By \Cref{thmAdmittingUnitType,thmAdmittingSigmaTypes}, $(\mathbb{C}, p)$ supports a unit type and dependent sum types if and only if there exist cartesian morphisms of polynomials $\eta : i_1 \pRightarrow p$ and $\mu : p \cdot p \pRightarrow p$, and by \Cref{thmAdmittingPiTypes}, $(\mathbb{C}, p)$ additionally supports dependent product types if and only if there exists a cartesian morphism of polynomials $\zeta : P_p(p) \pRightarrow p$. By \Cref{lemMonadDataIsPseudomonad,lemAlgebraDataIsPseudoalgebra}, there are unique adjustments turning $(p,\eta,\mu)$ into a polynomial pseudomonad $\mathbb{P}$, and unique adjustments turning $(p,\zeta)$ into a polynomial pseudoalgebra over $\mathbb{P}$.
\end{proof}
\begin{numbered}
\Cref{thmUnitSigmaIffPolynomialPseudomonad} makes a connection between logic and algebra by exhibiting a correspondence between laws concerning dependent sums and dependent products in type theory with laws concerning monads in algebra. Specifically, for $\eta : \iota_1 \pRightarrow p$, $\mu : p \cdot p \pRightarrow p$ and $\zeta : P_p(p) \pRightarrow p$, the pseudomonad and pseudoalgebra isomorphisms in $\mathfrak{Poly}_{\widehat{\mathbb{C}}}\cart$ correspond to certain type isomorphisms as follows:
\begin{center}
\begin{tabular}{c||c|c}
\textbf{Name} & \textbf{Monads and algebras} & \textbf{Type theory} \\ \hline \hline
&& \\
Monad associativity & $\mu \circ (p \cdot \mu) \cong \mu \circ (\mu \cdot p)$ & $\sum_{x:A} \sum_{y:B(x)} C(x,y) \cong \sum_{\langle x,y \rangle : \sum_{x:A} B(x)} C(x,y)$ \\
&& \\ \hline
&& \\
Monad unit (left) & $\mu \circ (p \cdot \eta) \cong \mathrm{id}_p$ & $\sum_{x:A} \mathbf{1} \cong A$ \\
&& \\ \hline
&& \\
Monad unit (right) & $\mu \circ (\eta \cdot p) \cong \mathrm{id}_p$ & $\sum_{x:\mathbf{1}} A \cong A$ \\
&& \\ \hline
&& \\
Algebra multiplication & $\zeta \circ (p \cdot \zeta) \cong \zeta \circ (\mu \cdot p)$ & $\prod_{x:A} \prod_{y : B(x)} C(x,y) \cong \prod_{\langle x,y \rangle : \sum_{x:A} B(x)} C(x,y)$ \\
&& \\ \hline
&& \\
Algebra unit & $\zeta \circ (\eta \cdot p) \cong \mathrm{id}_p$ & $\prod_{x:\mathbf{1}} A \cong A$ \\
&&
\end{tabular}
\end{center}
\end{numbered}
\section{The essentially algebraic theory of natural models}
\label{secEssentiallyAlgebraicTheory}
\index{essentially algebraic theory}
A (single-sorted) \textit{algebraic theory} is one which is specified by \textit{operation symbols} $\sigma$ with \textit{arities}, which are natural numbers, subject to conditions which can be expressed as (universally quantified) \textit{equations}. For example, the theory of groups has an operation $\mathsf{unit}$ of arity $0$, an operation $\mathsf{inv}$ of arity $1$, and a binary operation $\mathsf{mult}$ of arity $2$, subject to equations describing associativity, inverse and unit laws. A model $\mathfrak{M}$ of an algebraic theory is then a set $M$ together with functions $\sigma^{\mathfrak{M}} : M^{\alpha(\sigma)} \to M$ for each symbol $\sigma$ whose arity is $\alpha(\sigma)$, such that the functions $\sigma^{\mathfrak{M}}$ satisfy the specified equations; thus a model of the theory of groups is a group.
More generally, given a set $S$ of \textit{sorts}, an $S$-sorted algebraic theory is again specified by operation symbols subject to equations, but now the arities of the operation symbols are sequences of elements of $S$. A symbol $\sigma$ whose arity is $(s_1,\dots,s_n, s)$ (which we suggestively write as $s_1 \times \dots \times s_n \to s$) can be thought of as an $n$-ary operation, whose $i^{\text{th}}$ input has sort $s_i$ and whose value has sort $s$. A model $\mathfrak{M}$ of an $S$-sorted algebraic theory is then given by an $S$-indexed family of sets $\seqbn{M_s}{s \in S}$ with functions $\sigma^{\mathfrak{M}} : M_{s_1} \times \dots \times M_{s_n} \to M_s$ for each operation symbol $\sigma$ of arity $s_1 \times \dots \times s_n \to s$, which satisfy the equations of the theory.
The notion of an ($S$-sorted) \textit{essentially algebraic theory} generalises that of an ($S$-sorted) algebraic theory even further by allowing operations to be \textit{partial}, meaning that operation symbols may be defined only on inputs which satisfy certain equational conditions stated in terms of already-specified operation symbols. An example of such a theory is that of categories, whose sorts are $\mathsf{Obj}$, the sort of objects, and $\mathsf{Mor}$, the sort of morphisms. The composition operation $\mathsf{comp}$ with arity $\mathsf{Mor} \times \mathsf{Mor} \to \mathsf{Mor}$ is partial, since the composite $g \circ f$ of two morphisms on a category is defined only when $\mathsf{cod}(f) = \mathsf{dom}(g)$. The interpretation $\mathsf{comp}^{\mathfrak{M}}$ is then a partial function from $M_{\mathsf{Mor}} \times M_{\mathsf{Mor}}$ to $M_{\mathsf{Mor}}$, whose domain of definition is given by $\{ (g,f) \in M_{\mathsf{Mor}} \mid \mathsf{cod}^{\mathfrak{M}}(f) = \mathsf{dom}^{\mathfrak{M}}(g) \}$.
A precise definition of an essentially algebraic theory, and a model thereof, can be found in \cite{AdamekRosicky1994}.
Our goal in this section is to exhibit the theory of natural models as an essentially algebraic theory $\mathbb{T}_{\mathrm{NM}}$. Once we have done so, natural models will automatically assemble into a category $\mathbf{NM}$, whose objects are the models of $\mathbb{T}_{\mathrm{NM}}$ and whose morphisms are \textit{homomorphisms} of models of $\mathbb{T}_{\mathrm{NM}}$---that is, families of functions between the sorts which commute in the appropriate sense with the operation symbols. The general theory of essentially algebraic categories will then apply to the category $\mathbf{NM}$.
The practical power of natural models comes from their functorial, rather than algebraic, description; as such, the main takeaway of this section is that the functorial description captures the algebraic one, and we will provide a functorial account of the algebraic notion of a homomorphism of models of $\mathbb{T}_{\mathrm{NM}}$ in \Cref{secHomomorphisms}.
\begin{definition}
\label{defEATheoryOfNaturalModels}
\index{natural model!essentially algebraic theory of {---}s}
\index{essentially algebraic theory!of natural models@{---} of natural models}
The \textbf{theory of natural models} is the essentially algebraic theory $\mathbb{T} = \mathbb{T}_{\mathrm{NM}}$ described as follows.
The set $S$ of sorts is $\{ \mathsf{Ctx}, \mathsf{Sub}, \mathsf{Type}, \mathsf{Term} \}$;
\textbf{Note:} In all of what follows, the sorts of the variables are
$$\Delta,\Gamma : \mathsf{Ctx} \qquad \sigma,\tau,\upsilon : \mathsf{Sub} \qquad A,B : \mathsf{Type} \qquad a,b,f,p : \mathsf{Term}$$
The set $\Sigma$ of symbols and their arities is defined in the following table.
\begin{center}
\vspace{-20pt}
\begin{tabular}{l|lclcl|lcl}
\textbf{Name} & \multicolumn{5}{l|}{\textbf{Symbol} (with arity \& sorts)} & \multicolumn{3}{l}{\textbf{Shorthand}} \\ \hline
domain$^{\dagger}$ & $\mathsf{dom}$ & $:$ & $\mathsf{Sub}$ & $\to$ & $\mathsf{Ctx}$ & && \\
codomain$^{\dagger}$ & $\mathsf{cod}$ & $:$ & $\mathsf{Sub}$ & $\to$ & $\mathsf{Ctx}$ & && \\
identity$^{\dagger}$ & $\mathsf{id}$ & $:$ & $\mathsf{Ctx}$ & $\to$ & $\mathsf{Sub}$ & $\mathsf{id}(\Gamma)$ & $=$ & $\mathsf{id}_{\Gamma}$ \\
composition & $\mathsf{comp}$ & $:$ & $\mathsf{Sub} \times \mathsf{Sub}$ & $\to$ & $\mathsf{Sub}$ & $\mathsf{comp}(\sigma,\tau)$ & $=$ & $\tau \circ \sigma$ \\
empty context$^{\dagger}$ & $\mathsf{empty}$ & $:$ & & & $\mathsf{Ctx}$ & $\mathsf{empty}$ & $=$ & $\diamond$ \\
sub$^{\text{n}}$ to empty$^{\dagger}$ & $\mathsf{esub}$ & $:$ & $\mathsf{Ctx}$ & $\to$ & $\mathsf{Sub}$ & $\mathsf{esub}(\Gamma)$ & $=$ & $\mathsf{t}_{\Gamma}$ \\
typing$^{\dagger}$ & $\mathsf{typeof}$ & $:$ & $\mathsf{Term}$ & $\to$ & $\mathsf{Type}$ & && \\
context of types$^{\dagger}$ & $\mathsf{ctxof}_{\mathsf{ty}}$ & $:$ & $\mathsf{Type}$ & $\to$ & $\mathsf{Ctx}$ & $\mathsf{ctxof}_{\mathsf{ty}}(A)$ & $=$ & $\mathsf{ctxof}(A)$ \\
context of terms$^{\dagger}$ & $\mathsf{ctxof}_{\mathsf{tm}}$ & $:$ & $\mathsf{Term}$ & $\to$ & $\mathsf{Ctx}$ & $\mathsf{ctxof}_{\mathsf{tm}}(a)$ & $=$ & $\mathsf{ctxof}(a)$ \\
sub$^{\text{n}}$ on types & $\mathsf{subst}_{\mathsf{ty}}$ & $:$ & $\mathsf{Sub} \times \mathsf{Type}$ & $\to$ & $\mathsf{Type}$ & $\mathsf{subst}_{\mathsf{ty}}(\sigma,A)$ & $=$ & $A[\sigma]$ \\
sub$^{\text{n}}$ on terms & $\mathsf{subst}_{\mathsf{tm}}$ & $:$ & $\mathsf{Sub} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ & $\mathsf{subst}_{\mathsf{tm}}(\sigma,a)$ & $=$ & $a[\sigma]$ \\
context extension$^{\dagger}$ & $\mathsf{cext}$ & $:$ & $\mathsf{Type}$ & $\to$ & $\mathsf{Ctx}$ & $\mathsf{cext}(A)$ & $=$ & $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ $^{\ddagger}$ \\
projection$^{\dagger}$ & $\mathsf{proj}$ & $:$ & $\mathsf{Type}$ & $\to$ & $\mathsf{Sub}$ & $\mathsf{proj}(A)$ & $=$ & $\nmp{A}$ \\
variable$^{\dagger}$ & $\mathsf{var}$ & $:$ & $\mathsf{Type}$ & $\to$ & $\mathsf{Term}$ & $\mathsf{var}(A)$ & $=$ & $\nmq{A}$ \\
induced sub$^{\text{n}}$ & $\mathsf{indsub}$ & $:$ & $\mathsf{Sub} \times \mathsf{Term} \times \mathsf{Type}$ & $\to$ & $\mathsf{Sub}$ & $\mathsf{indsub}(\sigma, a, A)$ & $=$ & $\langle \sigma, a \rangle_A$
\end{tabular}
{\footnotesize $\dagger$ denotes total symbols \\ $\ddagger$ When we write $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{cext}(A)$, we are implying that $\Gamma = \mathsf{ctxof}(A)$.}
\end{center}
\newpage
The set $E$ of equations is defined as follows:
\newcounter{axiomcount}
\begin{minipage}[t]{0.48\textwidth}
\begin{itemize}
\item \textbf{Category of contexts}
\begin{enumerate}[(i)]
\item $\mathsf{dom}(\mathsf{id}_{\Gamma}) = \Gamma$
\item $\mathsf{cod}(\mathsf{id}_{\Gamma}) = \Gamma$
\item $\mathsf{dom}(\tau \circ \sigma) = \mathsf{dom}(\sigma)$
\item $\mathsf{cod}(\tau \circ \sigma) = \mathsf{cod}(\tau)$
\item $\sigma \circ \mathsf{id}_{\Gamma} = \sigma$
\item $\mathrm{id}_{\Delta} \circ \tau = \tau$
\item $(\upsilon \circ \tau) \circ \sigma = \upsilon \circ (\tau \circ \sigma)$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Empty context is terminal}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{dom}(\mathsf{t}_{\Gamma}) = \Gamma$
\item $\mathsf{cod}(\mathsf{t}_{\Gamma}) = \diamond$
\item $\mathsf{t}_{\Gamma} \circ f = \mathsf{t}_{\Delta}$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Presheaf of types}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $A[\mathsf{id}_{\mathsf{ctxof}(A)}] = A$
\item $A[\tau \circ \sigma] = A[\tau][\sigma]$
\item $\mathsf{ctxof}(A[\sigma]) = \mathsf{dom}(\sigma)$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.48\textwidth}
\begin{itemize}
\item \textbf{Presheaf of terms}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $a[\mathsf{id}_{\mathsf{ctxof}(a)}] = a$
\item $a[\tau \circ \sigma] = a[\tau][\sigma]$
\item $\mathsf{ctxof}(a[\sigma]) = \mathsf{dom}(\sigma)$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Typing is natural}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{ctxof}(\mathsf{typeof}(a)) = \mathsf{ctxof}(a)$
\item $\mathsf{typeof}(a[\sigma]) = \mathsf{typeof}(a)[\sigma]$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Representability}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{dom}(\nmp{A}) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$
\item $\mathsf{cod}(\nmp{A}) = \Gamma$
\item $\mathsf{ctxof}(\nmq{A}) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$
\item $\mathsf{typeof}(\nmq{A}) = A[\nmp{A}]$
\item $\mathsf{dom}(\langle \sigma, a \rangle_A) = \mathsf{dom}(\sigma)$
\item $\mathsf{cod}(\langle \sigma, a \rangle_A) = \mathsf{cod}(\sigma) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$
\item $\nmp{A} \circ \langle \sigma, a \rangle_A = \sigma$
\item $\nmq{A}[\langle \sigma, a \rangle_A] = a$
\item $\langle \nmp{A} \circ \sigma, \nmq{A}[\sigma] \rangle_A = \sigma$
\end{enumerate}
\end{itemize}
\end{minipage}
The domains of definition of the partial symbols are given as follows:
\begin{center}
\begin{tabular}{lcl}
$\mathsf{Def}(\mathsf{comp}(f,g))$ & $=$ & $\{ \mathsf{cod}(f) = \mathsf{dom}(g) \}$ \\
$\mathsf{Def}(\mathsf{subst}_{\mathsf{ty}}(\sigma,A))$ & $=$ & $\{ \mathsf{ctxof}(A) = \mathsf{cod}(\sigma) \}$ \\
$\mathsf{Def}(\mathsf{subst}_{\mathsf{tm}}(\sigma,a))$ & $=$ & $\{ \mathsf{ctxof}(a) = \mathsf{cod}(\sigma) \}$ \\
$\mathsf{Def}(\mathsf{indsub}(\sigma,a,A))$ & $=$ & $\{ \mathsf{cod}(\sigma) = \mathsf{ctxof}(A),\ \mathsf{typeof}(a) = A[\sigma] \}$
\end{tabular}
\end{center}
\end{definition}
\begin{theorem}[Natural models are captured by $\mathbb{T}_{\mathrm{NM}}$]
\label{thmTheoryCapturesDefinition}
Specifying a model of the theory $\mathbb{T}_{\mathrm{NM}}$ (\Cref{defEATheoryOfNaturalModels}) is equivalent to specifying a natural model (\Cref{defNaturalModel}).
\end{theorem}
\begin{proof}
A model $\mathfrak{M}$ of $\mathbb{T}$ consists of four sets $M_{\mathsf{Ctx}}$, $M_{\mathsf{Sub}}$, $M_{\mathsf{Type}}$ and $M_{\mathsf{Term}}$, together with fifteen functions $\mathsf{dom}^{\mathfrak{M}}, \mathsf{cod}^{\mathfrak{M}}, \dots, \mathsf{ind}^{\mathfrak{M}}$ whose domains and codomains are determined by the sorts, arities and domains of definition described in \Cref{defEATheoryOfNaturalModels}.
Equations (i)--(vii) say precisely that the data $(M_{\mathsf{Ctx}}, M_{\mathsf{Sub}}, \mathsf{dom}^{\mathfrak{M}}, \mathsf{cod}^{\mathfrak{M}}, \mathsf{id}^{\mathfrak{M}}, \mathsf{comp}^{\mathfrak{M}})$ defines a (necessarily small) category $\mathbb{C}$. Equations (viii)--(x) say precisely that $\diamond^{\mathfrak{M}}$ is a terminal object of $\mathbb{C}$, with $\mathsf{esub}^{\mathfrak{M}}(\Gamma) : \Gamma \to \diamond^{\mathfrak{M}}$ being the unique morphism from an object $\Gamma$ of $\mathbb{C}$ to $\diamond^{\mathfrak{M}}$. We need not (and do not) specify $\mathsf{esub}^{\mathfrak{M}}$ when defining a natural model, since its unique existence follows from the assertion that $\diamond^{\mathfrak{M}}$ is terminal.
Equations (xi)--(xiii) say that $M_{\mathsf{Type}}$ and the functions $\mathsf{ctxof}_{\mathsf{ty}}^{\mathfrak{M}}$ and $\mathsf{subst}_{\mathsf{ty}}^{\mathfrak{M}}$ together define a presheaf $\nmty{U} : \mathbb{C}\op \to \mathbf{Set}$ in the following way: the set $\nmty{U}(\Gamma)$ is given by $(\mathsf{ctxof}_{\mathsf{ty}}^{\mathfrak{M}})^{-1}(\Gamma) \subseteq M_{\mathsf{Type}}$, and the action of $\nmty{U}$ on morphisms is defined by $\nmty{U}(\sigma) : A \mapsto \mathsf{subst}_{\mathsf{ty}}^{\mathfrak{M}}(\sigma, A)$, with the equations telling us that this action is contravariantly functorial with the correct domain and codomain. Conversely, given a presheaf $\mathcal{U} : \mathbb{C}\op \to \mathbf{Set}$, we can take $M_{\mathsf{Type}}$ to be the disjoint union of the sets $\mathcal{U}(\Gamma)$, with $\mathsf{ctxof}^{\mathfrak{M}}_{\mathsf{ty}}$ given by the projection map to $M_{\mathsf{Ctx}} = \mathrm{ob}(\mathbb{C})$ and the function $\mathsf{subst}^{\mathfrak{M}}_{\mathsf{ty}}$ given by $(\sigma, A) \mapsto \nmty{U}(\sigma)(A)$. Likewise, equations (xiv)--(xvi) say that specifying $M_{\mathsf{Term}}$ and the functions $\mathsf{ctxof}_{\mathsf{tm}}^{\mathfrak{M}}$ and $\mathsf{subst}_{\mathsf{tm}}^{\mathfrak{M}}$ is equivalent to defining a presheaf $\nmtm{U} : \mathbb{C}\op \to \mathbf{Set}$.
Equations (xvii)--(xviii) say that $\mathsf{typeof}^{\mathfrak{M}}$ defines a natural transformation $p : \nmtm{U} \to \nmty{U}$. Indeed, equation (xvii) says that the restriction of $\mathsf{typeof}^{\mathfrak{M}}$ to $\nmtm{U}(\Gamma) = (\mathsf{ctxof}_{\mathsf{tm}}^{\mathfrak{M}})^{-1}(\Gamma)$ has image contained in $\nmty{U}(\Gamma) = (\mathsf{ctxof}_{\mathsf{ty}}^{\mathfrak{M}})^{-1}(\Gamma)$, so that we obtain a function $p_{\Gamma} : \nmtm{U}(\Gamma) \to \nmty{U}(\Gamma)$; and equation (xvii) says that the naturality squares for $p$ commute for each morphism $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$.
Equations (xix)--(xxvii) say precisely that for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$, the data $\mathsf{cext}^{\mathfrak{M}}(\Gamma, A)$, $\mathsf{proj}^{\mathfrak{M}}$ and $\mathsf{var}^{\mathfrak{M}}$ exhibit $p$ as a representable natural transformation. Indeed, equations (xix)--(xxi) say that these data have the required types; equation (xxii) says that the following square commutes;
\begin{diagram}
\Yon(\mathsf{cext}^{\mathfrak{M}}(\Gamma, A))
\arrow[r, "\mathsf{var}^{\mathfrak{M}}(A)"]
\arrow[d, "\Yon(\mathsf{proj}^{\mathfrak{M}}(A))"']
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Gamma)
\arrow[r, "A"']
&
\nmty{U}
\end{diagram}
and equations (xxiii)--(xvii) exhibit the square as a pullback, with $\mathsf{indsub}^{\mathfrak{M}}$ giving the morphisms induced from the universal property of pullbacks. Note that we need not (and do not) specify $\mathsf{indsub}^{\mathfrak{M}}$ when defining a natural model, since its unique existence follows from the universal property.
\end{proof}
\begin{numbered}
Categories with families (\Cref{defCwF}) can also be described as models of $\mathbb{T}_{\mathrm{NM}}$---that is, natural models and categories with families are different (but equivalent) presentations of the same essentially algebraic theory.
\end{numbered}
\subsection*{Type theoretic structure as essentially algebraic structure}
\begin{definition}[Theory of natural models with a distinguished set of basic types]
\index{essentially algebraic theory!of natural models basic types@{---} of natural models admitting a set of basic types}
Given a set $I$, the \textbf{theory of natural models admitting an $I$-indexed set of basic types} is the theory $\mathbb{T}_{(\mathsf{ty}_i)_{i \in I}}$ extending $\mathbb{T}$ by adding a new total symbol $\mathsf{btype}_i : \mathsf{Type}$ for each $i \in I$, together with the equation $\mathsf{ctxof}(\mathsf{btype}_i) = \diamond$ for each $i \in I$.
\end{definition}
Evidently we have the following characterisation of natural models with a distinguished set of basic types.
\begin{theorem}
Specifying a model $\mathfrak{M}$ of the theory $\mathbb{T}_{(\mathsf{ty}_i)_{i \in I}}$ is equivalent to specifying a natural model $(\mathbb{C}, p)$ together with an $I$-indexed set $\{ O_i \mid i \in I \} \subseteq \nmty{U}(\diamond)$. \qed
\end{theorem}
\begin{definition}[Theory of natural models with a distinguished set of terms of basic types]\index{essentially algebraic theory!of natural models basic terms@{---} of natural models admitting a set of terms}
Given a set $J$, the \textbf{theory of natural models admitting a $J$-indexed set of terms of basic types} is the theory $\mathbb{T}_{(\mathsf{tm}_j)_{j \in I}}$ extending $\mathbb{T}$ by adding a new total symbol $\mathsf{bterm}_j : \mathsf{Term}$ for each $j \in J$, together with the equation $\mathsf{ctxof}(\mathsf{bterm}_j) = \diamond$ for each $j \in J$.
\end{definition}
\begin{theorem}
Specifying a model $\mathfrak{M}$ of the theory $\mathbb{T}_{(\mathsf{tm}_j)_{j \in J}}$ is equivalent to specifying a natural model $(\mathbb{C}, p)$ together with an $J$-indexed set $\{ o_j \mid j \in J \} \subseteq \nmtm{U}(\diamond)$. \qed
\end{theorem}
Note that a natural model admitting a $J$-indexed set of basic terms automatically has the structure of a natural model admitting a $J$-indexed set of basic types by taking $\{ p_{\diamond}(o_j) \mid j \in J \}$ to be the distinguished set of basic types. As a result, there is a forgetful functor from the category of natural models admitting a $J$-indexed set of basic types to the category of natural models admitting a $J$-indexed set of basic types.
\begin{definition}[Theory of natural models admitting a unit type]
\label{defEATAdjUnit}
\index{essentially algebraic theory!of natural models unit@{---} of natural models admitting a unit type}
The \textbf{theory of natural models admitting a unit type} is the essentially algebraic theory $\mathbb{T}_{\mathbbm{1}}$ extending $\mathbb{T}$ as follows.
\begin{itemize}
\item The new symbols and their arities are indicated in the following table.
\begin{center}
\begin{tabular}{l|lclcl|lcl}
\textbf{Name} & \multicolumn{5}{l|}{\textbf{Symbol} (with arity \& sorts)} & \multicolumn{3}{l}{\textbf{Shorthand}} \\ \hline
unit type$^{\dagger}$ & $\mathsf{unit}$ & $:$ & & & $\mathsf{Type}$ & && \\
term of unit type$^{\dagger}$ & $\mathsf{star}$ & $:$ & & & $\mathsf{Term}$ & &&
\end{tabular}
\end{center}
\item The new equations are as follows.
\begin{enumerate}[(i)]
\item $\mathsf{ctxof}(\mathsf{unit}) = \diamond$
\item $\mathsf{typeof}(\mathsf{star}) = \mathsf{unit}$
\item $\nmp{\mathsf{unit}} = \nmt{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathsf{unit}}$
\item $\nmq{\mathsf{unit}} = \mathsf{star}[\nmt{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathsf{unit}}]$
\end{enumerate}
\item There are no additional domains of definition to specify, since both new symbols are total.
\end{itemize}
\end{definition}
\begin{theorem}
\label{thmEATAdjUnit}
Specifying a model $\mathfrak{M}$ of $\mathbb{T}_{\mathbbm{1}}$ is equivalent to specifying a natural model $(\mathbb{C}, p)$ together with elements $\widehat{\mathbbm{1}} \in \nmty{U}(\diamond)$ and $\widehat{\star} \in \nmtm{U}(\diamond)$ such that the following square is a pullback.
\begin{diagram}
\Yon(\diamond)
\arrow[d, equals]
\arrow[r, "\widehat{\star}"]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\diamond)
\arrow[r, "\widehat{\mathbbm{1}}"']
&
\nmty{U}
\end{diagram}
\end{theorem}
\begin{proof}
Take $\widehat{\mathbbm{1}} = \mathsf{unit}^{\mathfrak{M}}$ and $\widehat{\star} = \mathsf{star}^{\mathfrak{M}}$. Equations (i) and (ii) say that these have the correct types and that the square in the statement of the theorem commutes. Equation (iii) is redundant since the codomain of $\nmp{\mathbbm{1}}$ is terminal.
Equation (iv) is equivalent to the assertion that the square is a pullback. Indeed, suppose (iv) holds, and let $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $a \in \nmtm{U}(\Gamma; \widehat{\mathbbm{1}}[\nmt{\Gamma}])$.
\begin{diagram}
\Yon(\Gamma)
\arrow[ddr, bend right=15, "\Yon(\nmt{\Gamma})"']
\arrow[drr, bend left=15, "a"]
\arrow[dr, dashed, "\Yon(\nmt{\Gamma})" description]
&[-20pt]&
\\[-20pt]
&
\Yon(\diamond)
\arrow[d, equals]
\arrow[r, "\widehat{\star}"]
&
\nmtm{U}
\arrow[d, "p"]
\\
&
\Yon(\diamond)
\arrow[r, "\widehat{\mathbbm{1}}"']
&
\nmty{U}
\end{diagram}
Then we have
\begin{align*}
a &= \nmq{\mathsf{unit}}[\langle \nmt{\Gamma}, a \rangle_{\mathsf{unit}}] && \text{by \Cref{defEATheoryOfNaturalModels}(xxvi)} \\
&= \mathsf{star}[\nmt{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathsf{unit}}][\langle \nmt{\Gamma}, a \rangle_{\mathsf{unit}}] && \text{by \Cref{defEATAdjUnit}(iv)} \\
&= \mathsf{star}[\nmp{\mathsf{unit}}][\langle \nmt{\Gamma}, a \rangle_{\mathsf{unit}}] && \text{by \Cref{defEATAdjUnit}(iii)} \\
&= \mathsf{star}[\nmp{\mathsf{unit}} \circ \langle \nmt{\Gamma}, a \rangle_{\mathsf{unit}}] && \text{by \Cref{defEATheoryOfNaturalModels}(xv)} \\
&= \mathsf{star}[\nmt{\Gamma}] && \text{by \Cref{defEATheoryOfNaturalModels}(xxv)}
\end{align*}
Uniqueness of $\nmt{\Gamma}$ is immediate from the fact that its codomain is terminal.
Conversely, if the square is a pullback, then take $\Gamma = \diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\mathbbm{1}}$ and $a = \nmq{\widehat{\mathbbm{1}}}$ in the above. Since $\nmt{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\mathbbm{1}}}$ is the morphism induced by the universal property of the pullback, we have $\widehat{\star}[\nmt{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\mathbbm{1}}}] = \nmq{\widehat{\mathbbm{1}}}$, so that (iv) holds.
\end{proof}
\begin{definition}[Theory of natural models admitting dependent sum types]
\index{essentially algebraic theory!of natural models dependent sum@{---} of natural models admitting dependent sum types}
The \textbf{theory of natural models admitting dependent sum types} is the essentially algebraic theory $\mathbb{T}_{\Sigma}$ extending $\mathbb{T}$ as follows.
\begin{itemize}
\item The new symbols and their arities are indicated in the following table.
\begin{center}
\begin{tabular}{l|lclcl|lcl}
\textbf{Name} & \multicolumn{5}{l|}{\textbf{Symbol} (with arity \& sorts)} & \multicolumn{3}{l}{\textbf{Shorthand}} \\ \hline
dependent sum type & $\mathsf{sigma}$ & $:$ & $\mathsf{Type} \times \mathsf{Type}$ & $\to$ & $\mathsf{Type}$ & && \\
pairing & $\mathsf{pair}$ & $:$ & $\mathsf{Type} \times \mathsf{Type} \times \mathsf{Term} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ & && \\
first projection & $\mathsf{fst}$ & $:$ & $\mathsf{Type} \times \mathsf{Type} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ & && \\
second projection & $\mathsf{snd}$ & $:$ & $\mathsf{Type} \times \mathsf{Type} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ & &&
\end{tabular}
\end{center}
\item The new equations are as follows:
\setcounter{axiomcount}{0}
\begin{itemize}
\item \textbf{Dependent sum type-former}
\begin{enumerate}[(i)]
\item $\mathsf{ctxof}(\mathsf{sigma}(A,B)) = \mathsf{ctxof}(A)$
\item $\mathsf{sigma}(A,B)[\sigma] = \mathsf{sigma}(A[\sigma], B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Pairing term-former}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{typeof}(\mathsf{pair}_{A,B}(a,b)) = \mathsf{sigma}(A,B)$
\item $\mathsf{pair}_{A,B}(a,b)[\sigma] = \mathsf{pair}_{A[\sigma],B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A]}(a[\sigma], b[\sigma])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{First and second projections}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{typeof}(\mathsf{fst}_{A,B}(p)) = A$
\item $\mathsf{fst}_{A,B}(p)[\sigma] = \mathsf{fst}_{A[\sigma], B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A]}(p[\sigma])$
\item $\mathsf{typeof}(\mathsf{snd}_{A,B}(p)) = B[\langle \mathsf{id}_{\mathsf{ctxof}(A)}, \mathsf{fst}_{A,B}(p) \rangle_A]$
\item $\mathsf{snd}_{A,B}(p)[\sigma] = \mathsf{snd}_{A[\sigma], B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A]}(p[\sigma])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Computation rules}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{fst}_{A,B}(\mathsf{pair}(a,b)) = a$
\item $\mathsf{snd}_{A,B}(\mathsf{pair}(a,b)) = b$
\item $\mathsf{pair}_{A,B}(\mathsf{fst}_{A,B}(p),\mathsf{snd}_{A,B}(p)) = p$
\end{enumerate}
\end{itemize}
\item The domains of definition of the partial symbols are given as follows.
\begin{center}
\begin{tabular}{lcl}
$\mathsf{Def}(\mathsf{sigma}(A,B))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B) \}$ \\
$\mathsf{Def}(\mathsf{pair}_{A,B}(a,b))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B),\ \mathsf{typeof}(a)=A,\ \mathsf{typeof}(b) = B[\langle \mathrm{id}_{\mathsf{ctxof}(A)}, a \rangle_A] \}$ \\
$\mathsf{Def}(\mathsf{fst}_{A,B}(p))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B),\ \mathsf{typeof}(p) = \mathsf{sigma}(A,B) \}$ \\
$\mathsf{Def}(\mathsf{snd}_{A,B}(p))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B),\ \mathsf{typeof}(p) = \mathsf{sigma}(A,B) \}$
\end{tabular}
\end{center}
\end{itemize}
\end{definition}
\begin{theorem}
\label{thmEATAdjSigma}
Specifying a model $\mathfrak{M}$ of $\mathbb{T}_{\Sigma}$ is equivalent to specifying a natural model $(\mathbb{C}, p)$ together with natural transformations $\widehat{\Sigma}$ and $\widehat{\mathsf{pair}}$ such that the following diagram is a pullback.
\begin{diagram}
\sum_{A : \nmty{U}} \sum_{B : \nmty{U}^{[A]}} \sum_{a:[A]} [B(a)]
\arrow[d, "\pi"']
\arrow[r, "\widehat{\mathsf{pair}}"]
\pullbackc{dr}{-0.05}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{A : \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Sigma}"']
&
\nmty{U}
\end{diagram}
\end{theorem}
\begin{proof}
Suppose $\mathfrak{M}$ is a model of $\mathbb{T} _{\Sigma}$ with underlying natural model $(\mathbb{C}, p)$. By \Cref{lemLemmaFive} there is a natural bijection
$$\xi_{\Gamma} : \left( \sum_{A \in \nmty{U}} \nmty{U}^{[A]} \right)(\Gamma) \cong \sum_{A \in \nmty{U}(\Gamma)} \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$$
so define $\widehat{\Sigma}_{\Gamma}$ to be the composite with $\xi_{\Gamma}$ of the restriction of $\mathsf{sigma}^{\mathfrak{M}}$ to $\sum_{A \in \nmty{U}(\Gamma)} \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$. Equation (i) ensures that the image of $\widehat{\Sigma}_{\Gamma}$ is contained in $\nmty{U}(\Gamma)$, so that the functions $\widehat{\Sigma}_{\Gamma}$ have the correct codomains, and equation (ii) tells us that $\widehat{\Sigma}$ is natural.
Likewise, by \Cref{lemLemmaElevenPointFive} there is a natural bijection
$$\zeta_{\Gamma} : \left( \sum_{A \in \nmty{U}} \sum_{B \in \nmty{U}^{[A]}} \sum_{a \in [A]} [B(a)] \right)(\Gamma) \cong \sum_{A \in \nmty{U}(\Gamma)} \sum_{B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)} \sum_{a \in \nmtm{U}(\Gamma; A)} \nmtm{U}(\Gamma; B[\nms{a}])$$
which allows us to translate between $\mathsf{pair}^{\mathfrak{M}}$ and $\widehat{\mathsf{pair}}$; equation (iii) tells us that the components of $\widehat{\mathsf{pair}}$ have the correct types and that the square commutes, and equation (iv) tells us that it is a natural transformation.
Equations (v)--(viii) then describe the morphisms induced by the universal property of the pullbacks, as indicated in the following diagram, in which we have $A \in \nmty{U}(\Gamma)$, $B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ and $p \in \nmtm{U}(\Gamma; \widehat{\Sigma}_{\Gamma}(A,B))$.
\begin{diagram}
\Yon(\Gamma)
\arrow[ddr, bend right=30, "{(A,B)}"']
\arrow[drr, bend left=20, "p"]
\arrow[dr, dashed, "{(A,B,\mathsf{fst}^{\mathfrak{M}}(A,B,p),\mathsf{snd}^{\mathfrak{M}}(A,B,p))}" description]
&[50pt]&
\\
&
\sum_{A : \nmty{U}} \sum_{B : \nmty{U}^{[A]}} \sum_{a:[A]} [B(a)]
\arrow[d, "\pi"']
\arrow[r, "\widehat{\mathsf{pair}}"]
&
\nmtm{U}
\arrow[d, "p"]
\\
&
\sum_{A : \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Sigma}"']
&
\nmty{U}
\end{diagram}
Equations (ix) and (x) then say that the dashed morphism makes the required triangles commute, and equation (xi) says that it is the unique such morphism.
\end{proof}
\begin{definition}[Theory of natural models admitting dependent product types]
\index{essentially algebraic theory!of natural models dependent product@{---} of natural models admitting dependent product types}
The \textbf{theory of natural models admitting dependent product types} is the essentially algebraic theory $\mathbb{T}_{\Pi}$ extending $\mathbb{T}$ as follows.
\begin{itemize}
\item The new symbols and their arities are indicated in the following table.
\begin{center}
\begin{tabular}{l|lclcl}
\textbf{Name} & \multicolumn{5}{l}{\textbf{Symbol} (with arity \& sorts)} \\ \hline
dependent product type & $\mathsf{pi}$ & $:$ & $\mathsf{Type} \times \mathsf{Type}$ & $\to$ & $\mathsf{Type}$ \\
$\lambda$-abstraction & $\mathsf{lambda}$ & $:$ & $\mathsf{Type} \times \mathsf{Type} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ \\
application & $\mathsf{app}$ & $:$ & $\mathsf{Type} \times \mathsf{Type} \times \mathsf{Term} \times \mathsf{Term}$ & $\to$ & $\mathsf{Term}$ \\
\end{tabular}
\end{center}
\item The new equations are as follows.
\setcounter{axiomcount}{0}
\begin{itemize}
\item \textbf{Dependent product type-former}
\begin{enumerate}[(i)]
\item $\mathsf{ctxof}(\mathsf{pi}(A,B)) = \mathsf{ctxof}(A)$
\item $\mathsf{pi}(A,B)[\sigma] = \mathsf{pi}(A[\sigma], B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{$\lambda$-abstraction term-former}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{typeof}(\mathsf{lambda}_{A,B}(b)) = \mathsf{pi}(A,B)$
\item $\mathsf{lambda}_{A,B}(b)[\sigma] = \mathsf{lambda}_{A[\sigma],B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A]}(b[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Application}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{typeof}(\mathsf{app}_{A,B}(f,a)) = B[\langle \mathsf{id}_{\mathsf{ctxof}(A)}, a \rangle_A]$
\item $\mathsf{app}_{A,B}(f,a)[\sigma] = \mathsf{app}_{A[\sigma], B[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A]}(f[\sigma], a[\sigma])$
\setcounter{axiomcount}{\value{enumi}}
\end{enumerate}
\item \textbf{Computation rules}
\begin{enumerate}[(i)]
\setcounter{enumi}{\value{axiomcount}}
\item $\mathsf{app}_{A,B}(\mathsf{lambda}_{A,B}(b),a) = b[\langle \mathsf{id}_{\mathsf{ctxof}(A)}, a \rangle_A]$
\item $\mathsf{lambda}_{A,B}(\mathsf{app}_{A,B}(f[\nmp{A}], \nmq{A})) = f$
\end{enumerate}
\end{itemize}
\item The domains of definition of the partial symbols are given as follows.
\begin{center}
\begin{tabular}{lcl}
$\mathsf{Def}(\mathsf{pi}(A,B))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B) \}$ \\
$\mathsf{Def}(\mathsf{lambda}_{A,B}(b))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B),\ \mathsf{typeof}(b) = B \}$ \\
$\mathsf{Def}(\mathsf{app}_{A,B}(f,a))$ & $=$ & $\{ \mathsf{ctxof}(A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = \mathsf{ctxof}(B),\ \mathsf{typeof}(f) = \mathsf{pi}(A,B),\ \mathsf{typeof}(a)=A \}$ \\
\end{tabular}
\end{center}
\end{itemize}
\end{definition}
\begin{theorem}
\label{thmEATAdjPi}
Specifying a model $\mathfrak{M}$ of $\mathbb{T}_{\Pi}$ is equivalent to specifying a natural model $(\mathbb{C}, p)$ together with natural transformations $\widehat{\Pi}$ and $\widehat{\lambda}$ such that the following square is a pullback.
\begin{diagram}
\sum_{A : \nmty{U}} \nmtm{U}^{[A]}
\arrow[r, "\widehat{\lambda}"]
\arrow[d, "\sum_{A : \nmty{U}} p^{[A]}"']
\pullbackc{dr}{0}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{A : \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Pi}"']
&
\nmty{U}
\end{diagram}
\end{theorem}
\begin{proof}
Suppose $\mathfrak{M}$ is a model of $\mathbb{T}_{\Pi}$ with underlying natural model $(\mathbb{C}, p)$. Again using \Cref{lemLemmaFive} there is a natural bijection
$$\xi_{\Gamma} : \left( \sum_{A \in \nmty{U}} \nmty{U}^{[A]} \right)(\Gamma) \cong \sum_{A \in \nmty{U}(\Gamma)} \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$$
so define $\widehat{\Pi}_{\Gamma}$ to be the composite with $\xi_{\Gamma}$ of the restriction of $\mathsf{pi}^{\mathfrak{M}}$ to $\sum_{A \in \nmty{U}(\Gamma)} \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$. Equation (i) ensures that the image of $\widehat{\Pi}_{\Gamma}$ is contained in $\nmty{U}(\Gamma)$, so that the functions $\widehat{\Pi}_{\Gamma}$ have the correct codomains, and equation (ii) tells us that $\widehat{\Pi}$ is natural.
Likewise, by \Cref{lemLemmaFive} again, there is a natural bijection
$$\zeta_{\Gamma} : \left(\sum_{A \in \nmty{U}} \nmtm{U}^{[A]} \right)(\Gamma) \cong \sum_{A \in \nmty{U}(\Gamma)} \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$$
which allows us to translate between $\mathsf{lambda}^{\mathfrak{M}}$ and $\widehat{\lambda}$; equation (iii) tells us that the components of $\widehat{\lambda}$ have the correct types and that the square commutes, and equation (iv) tells us that it is a natural transformation.
Equations (v)--(vi) then describe the morphisms induced by the universal property of the pullback indicated in the following diagram, in which we have $A \in \nmty{U}(\Gamma)$, $B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ and $f \in \nmtm{U}(\Gamma; \widehat{\Pi}_{\Gamma}(A,B))$.
\begin{diagram}
\Yon(\Gamma)
\arrow[drr, bend left=20, "f"]
\arrow[ddr, bend right=15, "{(A,B)}"']
\arrow[dr, dashed, "{(A, \lambda x:A.\mathsf{app}^{\mathfrak{M}}(f,x))}" description]
&[30pt]&
\\[-20pt]
&
\sum_{A \in \nmty{U}} \nmtm{U}^{[A]}
\arrow[d, "\sum_{A \in \nmty{U}} \nmty{U}^{[A]}" description]
\arrow[r, "\widehat{\lambda}"]
&
\nmtm{U}
\arrow[d, "p"]
\\
&
\sum_{A \in \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Pi}"']
&
\nmty{U}
\end{diagram}
Equation (vii) then say that the dashed morphism makes the required triangles commute, and equation (viii) says that it is the unique such morphism.
\end{proof}
\begin{numbered}
Although we have only discussed adding type theoretic structure to a `pure' natural model, we can combine the theories above in a modular way in order to add structure to an already structured natural model. For example, a natural model admitting a unit type \textit{and} dependent sum types is a natural model equipped with data making it both a model of $\mathbb{T}_{\mathbbm{1}}$ and of $\mathbb{T}_{\Sigma}$, or equivalently a natural model equipped with data satisfying the hypotheses of both \Cref{thmEATAdjUnit} and \Cref{thmEATAdjSigma}.
\end{numbered}
All of the theories discussed above are finitary essentially algebraic theories, except possibly for the theories of natural models admitting an $I$-indexed family of basic types or a $J$-indexed family of basic terms, which are $\mathrm{max}\{|I|,|J|\}$-ary (and finitary when $I$ and $J$ are finite).
\begin{definition}[Locally presentable categories \thmcite{AdamekRosicky1994}]
Let $\lambda$ be a regular cardinal and let $\mathcal{C}$ be a category. An object $A$ of $\mathcal{C}$ is \textbf{$\lambda$-presentable} if the functor $\mathcal{C}(A,{-}) : \mathcal{C} \to \mathbf{Set}$ preserves $\lambda$-directed colimits. The category $\mathcal{C}$ is \textbf{locally $\lambda$-presentable} if it is cocomplete and has a small set $\mathcal{A} \subseteq \mathrm{ob}(\mathcal{C})$ of $\lambda$-presentable objects such that every object of $\mathcal{C}$ is a $\lambda$-directed colimit of objects in $\mathcal{A}$.
\end{definition}
It is known \cite[Theorem 3.36]{AdamekRosicky1994} that for an regular cardinal $\lambda$, a category is a model of a $\lambda$-ary essentially algebraic theory if and only if it is locally $\lambda$-presentable. As such all of our categories of suitably structured natural models will satisfy the properties enjoyed by locally presentable categories more generally, such as cocompleteness.
In particular, given a dependent type theory $\mathbb{T}$, the category $\mathbf{NM}_{\mathbb{T}}$ of natural models admitting the type theoretic structure in $\mathbb{T}$ has an initial object $(\mathbb{C}_{\mathbb{T}}, p_{\mathbb{T}})$. A long term goal for future work is to prove that $(\mathbb{C}_{\mathbb{T}}, p_{\mathbb{T}})$ can be described as the \textit{term model} \Cref{cnsFreeNaturalModelKappaBasicTypes} of $\mathbb{T}$, for an arbitrary type theory $\mathbb{T}$.
Moreover, given a subtheory $\mathbb{T}' \subseteq \mathbb{T}$, we obtain from the essentially algebraic character of natural models a forgetful functor $U : \mathbf{NM}_{\mathbb{T}} \to \mathbf{NM}_{\mathbb{T}'}$, which has a left adjoint $F : \mathbf{NM}_{\mathbb{T}'} \to \mathbf{NM}_{\mathbb{T}}$. Given a natural model $(\mathbb{C}, p)$ admitting the type theoretic structure of $\mathbb{T}'$, the object $F(\mathbb{C}, p)$ of $\mathbf{NM}_{\mathbb{T}}$ is then the \textit{free} natural model on $\mathbb{C}$ which supports the type theoretic structure of $\mathbb{T}$. In \Cref{chSemantics}, we will describe some examples explicitly.
\section{Morphisms of natural models}
\label{secHomomorphisms}
Since a natural model is a model of an essentially algebraic theory, there is a canonical notion of \textit{homomorphism of natural models}, namely maps between the sorts commuting with the structure.
\begin{definition}[Morphisms of natural models]
\label{defMorphismOfNMAsEAT}
\index{morphism!of natural models@{---} of natural models}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. A \textbf{morphism of natural models} is a homomorphism from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$, with $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ considered as models of the essentially algebraic theory $\mathbb{T}_{\mathrm{NM}}$ (\Cref{defEATheoryOfNaturalModels}). The category of all natural models and morphisms between them is denoted by $\mathbf{NM}$.
\end{definition}
Explicitly, \Cref{defMorphismOfNMAsEAT} says that a morphism of natural models is a quadruple of functions $(F_{\mathsf{Ctx}}, F_{\mathsf{Sub}}, F_{\mathsf{Term}}, F_{\mathsf{Type}})$ such that:
\begin{itemize}
\item $(F_{\mathsf{Ctx}}, F_{\mathsf{Sub}})$ defines a functor $\mathbb{C} \to \mathbb{D}$ strictly preserving distinguished terminal objects;
\item $F_{\mathsf{Term}} : \sum_{\Gamma \in \mathrm{ob}(\mathbb{C})} \nmty{U}(\Gamma) \to \sum_{\Gamma \in \mathrm{ob}(\mathbb{D})} \nmty{V}(\Gamma)$ respecting contexts and substitutions;
\item $F_{\mathsf{Type}} : \sum_{\Gamma \in \mathrm{ob}(\mathbb{C})} \nmtm{U}(\Gamma) \to \sum_{\Gamma \in \mathrm{ob}(\mathbb{D})} \nmtmalt{V}(\Gamma)$ respecting contexts and substitutions;
\end{itemize}
and such that the representability data and typing are preserved, in the sense that for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A \in \nmty{U}(\Gamma)$, we have
$$F_{\mathsf{Ctx}}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = F_{\mathsf{Ctx}} \cext FA, \quad F_{\mathsf{Sub}}(\nmp{A}) = \nmu{F_{\mathsf{Type}}(A)} \quad \text{and} \quad F_{\mathsf{Term}}(\nmq{A}) = \nmv{F_{\mathsf{Type}}(A)}$$
and $F_{\mathsf{Term}}(a) \in \nmtmalt{V}(F_{\mathsf{Ctx}}(\Gamma), F_{\mathsf{Type}}(A))$ for all $a \in \nmtm{U}(\Gamma, A)$. Identity and composition of natural models are then given by the corresponding identity functions and composites of functions, respectively.
Note that the structure specified for models of $\mathbb{T}_{\mathrm{NM}}$ but not for natural models, that is the substitutions $\nmt{\Gamma} : \Gamma \to \diamond$ and $\langle \sigma, a \rangle_A : \Delta \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$, are preserved automatically provided the above conditions hold.
The goal of this section is to provide characterisations of morphisms of natural models which will be more convenient for our purposes.
\begin{theorem}[Morphisms of natural models via categories of elements]
\label{thmMorphismsOfNMFromCatEl}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. Specifying a morphism $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ is equivalent to specifying a functor $F_0 : \mathbb{C} \to \mathbb{D}$ preserving distinguished terminal objects, together with functors
$$F_1 : \catel[\mathbb{C}]{\nmty{U}} \to \catel[\mathbb{D}]{\nmty{V}} \quad \text{and} \quad F_2 : \catel[\mathbb{C}]{\nmtm{U}} \to \catel[\mathbb{D}]{\nmtmalt{V}}$$
such that
\begin{itemize}
\item The following diagram of categories and functors commutes;
\begin{diagram}
\catel[\mathbb{C}]{\nmtm{U}}
\arrow[rrr, "F_2"]
\arrow[dr, "\catel p" description]
\arrow[ddr, bend right, "\pi"']
&[-20pt]&&[-20pt]
\catel[\mathbb{D}]{\nmtmalt{V}}
\arrow[dl, "\catel q" description]
\arrow[ddl, bend left, "\pi"]
\\[-20pt]
&
\catel[\mathbb{C}]{\nmty{U}}
\arrow[r, "F_1" description]
\arrow[d, "\pi" description]
&
\catel[\mathbb{D}]{\nmty{V}}
\arrow[d, "\pi" description]
&
\\
&
\mathbb{C}
\arrow[r, "F_0"']
&
\mathbb{D}
&
\end{diagram}
\item $F_1$ and $F_2$ respect the adjunctions $\catel p \dashv p^*$ and $\catel q \dashv q^*$, in the sense that $F_2 \circ p^* = q^* \circ F_1$ and, letting $(\eta, \varepsilon)$ and $(\sigma, \tau)$ be the respective (unit, counit) pairs, the following pasting diagrams commute.
\begin{diagram}
\int_{\mathbb{C}} \nmty{U}
\arrow[r, bend left=20, "p \circ p^*", ""'{name=domeps, inner sep=1pt}]
\arrow[r, bend right=20, "\mathrm{id}"', ""{name=codeps, inner sep=1pt}]
\arrow[Rightarrow, "\varepsilon", from=domeps, to=codeps]
\arrow[d, "F_1"']
&
\int_{\mathbb{C}} \nmty{U}
\arrow[d, "F_1"]
&
\int_{\mathbb{C}} \nmtm{U}
\arrow[r, bend left=20, "\mathrm{id}", ""'{name=dometa, inner sep=1pt}]
\arrow[r, bend right=20, "q^* \circ q"', ""{name=codeta, inner sep=1pt}]
\arrow[Rightarrow, "\eta", from=dometa, to=codeta]
\arrow[d, "F_2"']
&
\int_{\mathbb{C}} \nmtm{U}
\arrow[d, "F_2"]
\\
\int_{\mathbb{D}} \nmty{V}
\arrow[r, bend left=20, "q \circ q^*", ""'{name=domtau, inner sep=1pt}]
\arrow[r, bend right=20, "\mathrm{id}"', ""{name=codtau, inner sep=1pt}]
\arrow[Rightarrow, "\tau", from=domtau, to=codtau]
&
\int_{\mathbb{D}} \nmty{V}
&
\int_{\mathbb{D}} \nmtmalt{V}
\arrow[r, bend left=20, "\mathrm{id}", ""'{name=domsig, inner sep=1pt}]
\arrow[r, bend right=20, "q^* \circ q"', ""{name=codsig, inner sep=1pt}]
\arrow[Rightarrow, "\sigma", from=domsig, to=codsig]
&
\int_{\mathbb{D}} \nmtmalt{V}
\end{diagram}
\end{itemize}
\end{theorem}
\begin{proof}
Evidently the functor $F_0$ is precisely the functor determined by $F_{\mathsf{Ctx}}$ and $F_{\mathsf{Sub}}$. The functor $F_1$ determines and is determined by $F_{\mathsf{Type}}$; explicitly, on objects $(\Gamma, A)$ we have $F_1(\Gamma, A) = (F_{\mathsf{Ctx}}(\Gamma), F_{\mathsf{Type}}(A))$ and on morphisms $\sigma : \Delta \to \Gamma$ by $F_1(\sigma) = F_{\mathsf{Sub}}(\sigma)$. The fact that $F_1$ is a functor is immediate from the facts that $F_0$ is a functor and that $F_{\mathsf{Type}}$ respects contexts and substitutions. The correspondence between $F_2$ and $F_{\mathsf{Term}}$ is obtained likewise.
Commutativity of the bottom and outer squares is equivalent to the assertion that $F_1$ and $F_2$ agree with $F_0$ on their first components, which is immediate from their construction. Commutativity of the top square is equivalent to the assertion that $F_{\mathsf{Type}}$ and $F_{\mathsf{Term}}$ respect typing.
That $F_1$ and $F_2$ respect the adjunctions $\catel{p} \dashv p^*$ and $\catel{q} \dashv q^*$ is equivalent to preservation of representability data. Indeed, the equation $F_2 \circ p^* = q^* \circ F_1$ says that $F_{\mathsf{Ctx}}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = F_{\mathsf{Ctx}}(\Gamma) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F_{\mathsf{Type}}(A)$ and $F_{\mathsf{Term}}(\nmq{A}) = \nmv{F_{\mathsf{Type}}(A)}$; preservation of counits says that $F_{\mathsf{Sub}}(\nmp{A}) = \nmu{F_{\mathsf{Type}}(A)}$. Preservation of units corresponds with preservation of induced substitutions $\langle \sigma, a \rangle_A$.
\end{proof}
The characterisation of morphisms of natural models as a triple of functors given by \Cref{thmMorphismsOfNMFromCatEl} is useful because it is easy to mediate between this description and the explicit description of homomorphisms of models of $\mathbb{T}_{\mathrm{NM}}$, and composition is simply given by composition of functors. A drawback of this description, however, is that when working with natural models directly, it becomes cumbersome to construct categories of elements and keep track of units and counits.
Our next characterisation of morphisms of natural models allows us to work more directly with the representable natural transformations themselves. Recall that every functor $F : \mathbb{C} \to \mathbb{D}$ between small categories induces an adjoint triple $F_! \dashv F^* \dashv F_*$ between the corresponding categories of presheaves, where $F^*$ is given by precomposition by $F$.
\begin{diagram}
\widehat{\mathbb{C}}
\arrow[r, bend left=15, shift left=1, "F_!", ""'{name=domadj1}]
\arrow[r, bend right=15, shift right=1, "F_*"', ""{name=codadj2}]
&[100pt]
\widehat{\mathbb{D}}
\arrow[l, "F^*" description, ""'{name=codadj1}, ""{name=domadj2}]
\arrow[from=domadj1, to=codadj1, draw=none, "\bot" description]
\arrow[from=domadj2, to=codadj2, draw=none, "\bot" description]
\end{diagram}
A morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ then induces functions $\nmty{U}(\Gamma) \to \nmty{V}(F\Gamma) = F^*\nmty{V}(\Gamma)$ and $\nmtm{U}(\Gamma) \to \nmtmalt{V}(F\Gamma) = F^*\nmtmalt{V}(\Gamma)$, given by the restrictions of $F_{\mathsf{Type}}$ and $F_{\mathsf{Term}}$, respectively. We will see (\Cref{thmMorphismsOfNMFunctorially}) that these functions are the components of natural transformations $\varphi : \nmty{U} \to F^*\nmty{V}$ and $\nmmk{\varphi} : \nmtm{U} \to F^*\nmtmalt{V}$, respectively, which correspond under the adjunction $F_! \dashv F^*$ with natural transformations $F_!\nmty{U} \to \nmty{V}$ and $F_!\nmtm{U} \to \nmtmalt{V}$.
The choice of whether to work with the left adjoint $F_!$ or the right adjoint $F^*$ is largely arbitrary, and we will translate between the two freely. The \textit{left adjoint convention} will be convenient in some settings because $F_!$ commutes with Yoneda embeddings; meanwhile, the \textit{right adjoint convention} will be convenient in other settings because $F^*$ can be described explicitly with ease.
\begin{definition}[Premorphisms of natural models]
\label{defPremorphism}
\index{premorphism of natural models}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. A \textbf{premorphism of natural models} from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$ is a triple $(F, \varphi, \nmmk{\varphi})$ consisting of a functor $F : \mathbb{C} \to \mathbb{D}$ preserving distinguished terminal objects, and natural transformations $\varphi : F_!\nmty{U} \to \nmty{V}$ and $\nmmk{\varphi} : F_!\nmtm{U} \to \nmtm{V}$ satisfying $q \circ \nmmk{\varphi} = \varphi \circ F_!p$.
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
F_!\nmtm{U}
\arrow[r, "\nmmk{\varphi}"]
\arrow[d, "F_!p"']
\sqlabel{dr}{(\star)}
&
\nmtm{V}
\arrow[d, "q"]
\\
F_!\nmty{U}
\arrow[r, "\varphi"']
&
\nmty{V}
\end{tikzcd}
\end{center}
\end{definition}
\begin{numbered}
\label{parMorphismShorthand}
We will write $F : (\mathbb{C}, p) \pmto (\mathbb{D}, q)$ to denote the assertion that $F = (F, \varphi, \nmmk{\varphi})$ is a premorphism from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$. Given $\Gamma \in \mathbb{C}$, $A \in \nmty{U}(\Gamma)$ and $a \in \nmtm{U}(\Gamma)$, write $FA$ for the element of $\nmty{V}(F\Gamma)$ given by composite
$$\mathsf{y}(F\Gamma) = F_!\mathsf{y}(\Gamma) \xrightarrow{F_!A} F_!\nmty{U} \xrightarrow{\varphi} \nmty{V}$$
and write $Fa$ for the element of $\nmtm{V}(F\Gamma)$ given by the composite
$$\mathsf{y}(F\Gamma) = F_!\mathsf{y}(\Gamma) \xrightarrow{F_!a} F_!\nmtm{U} \xrightarrow{\nmmk{\varphi}} \nmtm{V}$$
Note that commutativity of $(\star)$ implies that if $\Gamma \vdash a : A$ in $(\mathbb{C}, p)$, then $F\Gamma \vdash Fa : FA$ in $(\mathbb{D}, q)$, since
$$q_{F\Gamma}(Fa) = q_{F\Gamma} \circ \nmmk{\varphi} \circ F_!a = \varphi \circ F_!p_{\Gamma} \circ F_!a = \varphi \circ F_!(p_{\Gamma}(a)) = \varphi \circ F_!A = FA$$
\end{numbered}
\begin{numbered}
\label{numRightHandedConvention}
In \Cref{defPremorphism} we adopted the left adjoint convention. Under the right adjoint convention, a premorphism from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$ consists of a functor $F : \mathbb{C} \to \mathbb{D}$ preserving distinguished terminal objects and natural transformations $\varphi : \nmty{U} \to F^*\nmty{V}$ and $\nmmk{\varphi} : \nmtm{U} \to F^*\nmtmalt{V}$ satisfying $F^*q \circ \nmmk{\varphi} = \varphi \circ p$. Then given $\Gamma \in \mathrm{ob}(\mathbb{C})$, $A \in \nmty{U}(\Gamma)$ and $a \in \nmtm{U}(\Gamma; A)$, the elements $FA$ and $Fa$ described in \Cref{parMorphismShorthand} are given by $FA = \varphi_{\Gamma}(A)$ and $Fa = \nmmk{\varphi}_{\Gamma}(a)$.
\end{numbered}
\begin{lemma}[Lax preservation of context extension]
\label{lemMediationMorphism}
Let $F : (\mathbb{C}, p) \rightharpoondown (\mathbb{D}, q)$ be a premorphism of natural models. For each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$, there is a unique morphism $\tau_A : F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ in $\mathbb{D}$ such that $\nmu{FA} \circ \tau_A = F\nmp{A}$ and $\nmv{FA}[\tau_A] = F\nmq{A}$.
\end{lemma}
\begin{proof}
We obtain $\tau_A$ as the morphism $\langle F\nmp{A}, F\nmq{A} \rangle_{FA} : F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ in $\mathbb{D}$.
\begin{diagram}
\Yon(F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A))
\arrow[ddr, bend right=15, "\Yon(F\nmp{A})"']
\arrow[drr, bend left=15, "\Yon(F\nmq{A})"]
\arrow[dr, dashed, "\tau_A" description]
&[-20pt]&
\\[-20pt]
&
\Yon(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA)
\arrow[r, "\nmv{FA}"]
\arrow[d, "\Yon(\nmu{FA})"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtmalt{V}
\arrow[d, "q"]
\\
&
\Yon(F\Gamma)
\arrow[r, "FA"']
&
\nmty{V}
\end{diagram}
To see that the outer square truly does commute, note that it is obtained as the outer square of the following diagram.
\begin{diagram}
\Yon (F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A))
\arrow[r, equals]
\arrow[d, "\Yon(F\nmp{A})"']
&[-30pt]
F_! \Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "F_! \nmq{A}"]
\arrow[d, "F_! \Yon(\nmp{A})" description]
&
F_! \nmtm{U}
\arrow[r, "\nmmk{\varphi}"]
\arrow[d, "F_!p" description]
&
\nmtm{V}
\arrow[d, "q"]
\\
\Yon(F\Gamma)
\arrow[r, equals]
&
F_!\Yon(\Gamma)
\arrow[r, "F_!A"']
&
F_! \nmty{U}
\arrow[r, "\varphi"']
&
\nmty{V}
\end{diagram}
The left-hand square commutes since $F_!$ commutes with Yoneda embeddings; the middle square commutes since it is the result of applying $F_!$ to the pullback square exhibiting $\Yon(\nmp{A})$ as a pullback of $p$; and the right-hand square commutes since $(F, \varphi, \nmmk{\varphi})$ is a premorphism of natural models.
\end{proof}
\begin{theorem}[Functorial characterisation of morphisms of natural models]
\label{thmMorphismsOfNMFunctorially}
\index{morphism!of natural models@{---} of natural models}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. Specifying a morphism of natural models from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$ is equivalent to specifying a premorphism $(F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \rightharpoondown (\mathbb{D}, q)$ such that $F$ respects context extension (in the sense that $F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$), and such that the morphisms $\tau_A : F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ of $\mathbb{D}$ are all identity morphisms.
\end{theorem}
\begin{proof}
Specifying a premorphism $(F, \varphi, \nmmk{\varphi})$ is equivalent to specifying a homomorphism of the theory of a category with a terminal object and a natural transformation between presheaves (equations (i)--(xviii) of \Cref{defEATheoryOfNaturalModels}). To see this, note that specifying a functor $F : \mathbb{C} \to \mathbb{D}$ is equivalent to specifying the pair $(F_{\mathsf{Ctx}}, F_{\mathsf{Sub}})$.
We will use the right adjoint convention (see \Cref{numRightHandedConvention}) for the natural transformations $\varphi, \nmmk{\varphi}$. For each $\Gamma \in \mathrm{ob}(\mathbb{C})$, the component $\varphi_{\Gamma} : \nmty{U}(\Gamma) \to \nmty{V}(F\Gamma)$ corresponds with the appropriate restriction of $F_{\mathsf{Type}}$, and likewise the component $\nmmk{\varphi}_{\Gamma} : \nmtm{U}(\Gamma) \to \nmtmalt{V}(F\Gamma)$ corresponds with the appropriate restriction of $F_{\mathsf{Term}}$. That $\varphi$ and $\nmmk{\varphi}$ are natural corresponds with the fact that they respect substitutions, and that the square ($\star$) commutes corresponds with the fact that they respect typing.
Finally, given $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$, then note that $F\nmp{A} = \nmu{FA}$ and $F\nmq{A} = \nmq{FA}$ if and only if $\tau_A = \mathrm{id}_{F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)}$, since by the universal property of pullbacks, $\tau_A$ is the unique morphism satisfying $\nmu{FA} \circ \tau_A = F\nmp{A}$ and $\nmv{FA}[\tau_A] = F\nmq{A}$.
\end{proof}
We will use the characterisation of morphisms of natural models given in \Cref{thmMorphismsOfNMFunctorially} almost exclusively in our proofs, so from now on we will typically use the term `morphism of natural models' to mean a premorphism preserving representability data.
\begin{numbered}
Let $(F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{D}, q)$ and $(G, \psi, \nmmk{\psi}) : (\mathbb{D}, q) \to (\mathbb{E}, r)$ be morphisms of natural models.
\begin{enumerate}[(a)]
\item Under the left adjoint convention, the composite $(G, \psi, \nmmk{\psi}) \circ (F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{E}, r)$ is given by $(G \circ F, \psi \circ G_!\varphi \circ \mu, \nmmk{\psi} \circ G_!\nmmk{\varphi} \circ \nmmk{\mu})$, where $\mu : (GF)_!\nmty{U} \to G_!F_!\nmty{U}$ and $\nmmk{\mu} : (GF)_!\nmtm{U} \to G_!F_!\nmtm{U}$ are the canonical isomorphisms (\Cref{thmKanExtensions}).
\item Under the right adjoint convention, the composite $(G, \psi, \nmmk{\psi}) \circ (F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{E}, r)$ is given by $(G \circ F, F^*\psi \circ \varphi, F^*\nmmk{\psi} \circ \nmmk{\varphi})$.
\end{enumerate}
\end{numbered}
\subsection*{Weak morphisms of natural models}
\Cref{thmMorphismsOfNMFunctorially} suggests that we may obtain a weaker notion of morphism of natural models by weakening the requirement that the morphism $\tau_A : F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ be an identity morphism to the requirement that it be an isomorphism.
\begin{definition}[Weak morphisms of natural models]
\label{defWeakMorphismOfNM}
\index{morphism!of natural models weak@{---} of natural models (weak)}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. A \textbf{weak morphism of natural models} from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$ is a premorphism $(F, \varphi, \nmmk{\varphi})$ such that the morphisms $\tau_A : F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA$ are isomorphisms for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A \in \nmty{U}(\Gamma)$.
\end{definition}
\begin{numbered}
Write $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ to denote the assertion that $F = (F, \varphi, \nmmk{\varphi})$ is a (strict) morphism of natural models, and write $F : (\mathbb{C}, p) \wmto (\mathbb{D}, q)$ to denote the assertion that $F = (F, \varphi, \nmmk{\varphi}, \sigma, (\tau_A))$ is a weak morphism of natural models. We denote the category of natural models and weak morphisms by $\mathbf{NM}^{\mathrm{wk}}$. Note that there is an embedding $\mathbf{NM} \hookrightarrow \mathbf{NM}^{\mathrm{wk}}$ obtained by taking the coherence isomorphisms to be identities.
\end{numbered}
We will now explore some ways of characterising weak morphisms of natural models.
\begin{definition}[Preservation of canonical pullback squares]
A premorphism of natural models $F : (\mathbb{C}, p) \pmto (\mathbb{D}, q)$ (\textbf{weakly}) \textbf{preserves canonical pullback squares} (\Cref{cnsCanonicalPullbacks}) if, for each $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$ and each $A \in \nmty{U}(\Gamma)$, the following square is a pullback
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])
\arrow[r, "F(\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)"]
\arrow[d, "F\nmp{A\sigma}"']
&
F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "F\nmp{A}"{name=domeq}]
\\
F\Delta
\arrow[r, "F\sigma"']
&
F\Gamma
\end{tikzcd}
\end{center}
We say $F$ \textbf{strictly preserves canonical pullback squares} if, additionally, we have
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=large]
F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])
\arrow[r, "F(\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)"]
\arrow[d, "F\nmp{A\sigma}"']
&
F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "F\nmp{A}"{name=domeq}]
&
F\Delta \cext FA[F\sigma]
\arrow[r, "F\sigma \cext FA"]
\arrow[d, "\nmu{FA[F\sigma]}"'{name=codeq}]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[from=domeq, to=codeq, draw=none, "=" description]
&
F\Gamma \cext FA
\arrow[d, "\nmu{FA}"]
\\
F\Delta
\arrow[r, "F\sigma"']
&
F\Gamma
&
F\Delta
\arrow[r, "F\sigma"']
&
F\Gamma
\end{tikzcd}
\end{center}
\end{definition}
\begin{lemma}
\label{lemCoverOfNaturalModel}
Let $(\mathbb{C}, p)$ be a natural model. The map $p : \nmtm{U} \to \nmty{U}$ is covered by
$$\sum_{(\Gamma,A) \in \int \nmty{U}} \nmp[\Gamma]{A} : \sum_{(\Gamma,A) \in \int \nmty{U}} \Yon (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \longrightarrow \sum_{(\Gamma,A) \in \int \nmty{U}} \Yon(\Gamma)$$
\end{lemma}
\begin{proof}
Since $\nmty{U}$ is a colimit of representable presheaves, indexed by $\int_{\mathbb{C}} \nmty{U}$, we have a cover
$$\rho = \sqseqbn{A}{(\Gamma, A) \in \textstyle \int_{\mathbb{C}} \nmty{U}} : \sum_{(\Gamma,A) \in \int \nmty{U}} \Yon(\Gamma) \twoheadrightarrow \nmty{U}$$
Representability of $p$ yields the following pullback square
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\sum_{(\Gamma,A) \in \int \nmty{U}} \Yon (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "\nmmk{\rho}"]
\arrow[d, "{\sum \Yon \nmp[\Gamma]{A}}"']
\pullbackc{dr}{-0.1}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{(\Gamma,A) \in \int \nmty{U}} \Yon(\Gamma)
\arrow[r, two heads, "\rho"']
&
\nmty{U}
\end{tikzcd}
\end{center}
where $\nmmk{\rho} = \sqseqbn{\nmq[\Gamma]{A}}{(\Gamma,A) \in \textstyle \int_{\mathbb{C}} \nmty{U}}$. Since $\rho$ is a regular epimorphism, so is $\nmmk{\rho}$.
\end{proof}
\begin{lemma}
\label{lemWeakMorphismIffPreservesCanonicalPullbacks}
Let $F = (F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \pmto (\mathbb{D}, q)$ be a premorphism of natural models. Then $F$ is a weak morphism of natural models if and only if $F$ weakly preserves canonical pullback squares.
\end{lemma}
\begin{proof}
Given $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$ and $A \in \nmty{U}(\Gamma)$, consider the following diagram:
\begin{center}
\begin{tikzcd}[row sep=large, column sep=large]
F\Delta \cext FA[F\sigma]
\arrow[rrr, "F\sigma \cext FA"]
\arrow[dddr, bend right=15, "\nmp{FA[F\sigma]}"']
&&&
F\Gamma \cext FA
\arrow[dddl, bend left=15, "\nmp{FA}"]
\\
&
F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])
\arrow[r, "F(\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)"]
\arrow[dd, "F\nmp{A[\sigma]}" description]
\arrow[ul, "\tau_{A[\sigma]}" description]
&
F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[dd, "F\nmp{A}" description]
\arrow[ur, "\tau_A" description]
&
\\
~&~&~&~
\\
&
F\Delta
\arrow[r, "F\sigma"']
&
F\Gamma
&
\end{tikzcd}
\end{center}
The outer square is a pullback by representability of $q$, and the fact that $(F,\varphi,\nmmk{\varphi})$ is a premorphism of natural models yields the morphisms $\tau_A$ and $\tau_{A[\sigma]}$ as indicated and making the diagram commute.
Now $F$ is a weak morphism of natural models if and only if $\tau_A$ and $\tau_{A[\sigma]}$ are coherent isomorphisms. If they are coherent isomorphisms, then the inner square is a pullback, so that $F$ preserves display pullbacks.
Conversely, if $F$ preserves display pullbacks, then the inner and outer squares are both pullbacks. This implies that $\tau_A$ and $\tau_{A[\sigma]}$ are the canonical isomorphisms induced by the universal property of pullbacks, and hence that they satisfy the coherence laws necessary for $F$ to be a weak morphism of natural models.
\end{proof}
\begin{lemma}
\label{lemWeakMorphismImpliesPullbackSquare}
Let $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ be a weak morphism of natural models. Then the following square is a pullback.
\begin{diagram}
F_!\nmtm{U}
\arrow[r, "\nmmk{\varphi}"]
\arrow[d, "F_!p"']
\sqlabel{dr}{(\star)}
&
\nmtm{V}
\arrow[d, "q"]
\\
F_!\nmty{U}
\arrow[r, "\varphi"']
&
\nmty{V}
\end{diagram}
\end{lemma}
\begin{proof}
By \Cref{lemWeakMorphismIffPreservesCanonicalPullbacks} it suffices to assume that $F$ preserves canonical pullback squares. Since $F_!$ is a left adjoint, it preserves coproducts and regular epimorphisms, and furthermore $F_!$ commutes with the Yoneda embedding. Thus by applying $F_!$ to the pullback square in the proof of \Cref{lemCoverOfNaturalModel} and pasting $(\star)$ on the right, we obtain the following diagram:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\sum_{(\Gamma,A) \in \int \nmty{U}} \Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, two heads, "F_!\nmmk{\rho}"]
\arrow[d, "{\sum \Yon F\nmp[\Gamma]{A}}"']
&
F_!\nmtm{U}
\arrow[r, "\nmmk{\varphi}"]
\arrow[d, "F_!p" description]
\sqlabel{dr}{(\star)}
&
\nmtm{V}
\arrow[d, "q"]
\\
\sum_{(\Gamma,A) \in \int \nmty{U}} \Yon(F\Gamma)
\arrow[r, two heads, "F_!\rho"']
&
F_!\nmty{U}
\arrow[r, "\varphi"']
&
\nmty{V}
\end{tikzcd}
\end{center}
The outer square is a pullback since $F$ preserves canonical pullback squares. Since $F_!\rho$ and $F_!\nmmk{\rho}$ are regular epimorphisms, it suffices to prove that the left-hand square is a pullback, for which, in turn, it suffices to check this on the individual components $(\Gamma,A)$ of the left-hand vertical coproduct.
To this end, fix $\Gamma \in \mathbb{C}$ and $A \in \nmty{U}(\Gamma)$. It suffices to check the universal property of pullbacks on representables, so let $D \in \mathbb{D}$ and let $d \in (F_! \nmtm{U})(D)$ and $\delta : D \to F\Gamma$ such that $F_!A \circ \Yon \delta = F_!p \circ d$.
\begin{center}
\begin{tikzcd}[row sep=normal, column sep=huge]
\Yon D
\arrow[drr, bend left=15, "d"]
\arrow[dddr, bend right=15, "\Yon \delta"']
&&
\\
&
\Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r]
\arrow[dd, "\Yon F\nmp{A}" description]
&
F_! \nmtm{U}
\arrow[dd, "F_!p"]
\\
~&~&~
\\
&
\Yon F\Gamma
\arrow[r]
&
F_! \nmty{U}
\end{tikzcd}
\end{center}
Since $F_! \nmtm{U}$ is covered by representables indexed by $\int_{\mathbb{C}} \nmty{U}$ (\Cref{lemCoverOfNaturalModel}), there is some $\Delta \in \mathbb{C}$, $B \in \nmty{U}(\Delta)$ and $d' : D \to F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)$ such that $d$ factors through $\Yon d'$. Writing $\delta' = F \nmp{B} \circ d' : D \to F\Delta$, we obtain the following commutative diagram.
\begin{center}
\begin{tikzcd}[row sep=small, column sep=large]
\Yon D
\arrow[ddddrr, lightpurple, "\Yon \delta'"']
\arrow[ddddddr, lightpurple, bend right=10, "\Yon \delta"']
\arrow[drr, crossing over, "\Yon d'" description]
\arrow[ddrrrr, bend left, "d"]
&&&&
\\
&&
\Yon F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[drr]
\arrow[ddd, pos=0.3, "\Yon F\nmp{B}" description]
&&
\\
&&&&
F_! \nmtm{U}
\arrow[ddd, "F_!p"]
\\
&
\Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[urrr, crossing over]
\arrow[ddd, "\Yon F\nmp{A}" description]
&&&
\\
&&
\Yon F\Delta
\arrow[drr, "F_!B"]
&&
\\
&&&&
F_! \nmty{U}
\\
&
\Yon F\Gamma
\arrow[urrr, "F_!A"']
&&&
\end{tikzcd}
\end{center}
Now note that, in the category $\mathbf{Set}$, we have
$$(F_! \nmty{U})(D) \cong \left( \sum_{(\Gamma,A) \in \int \nmty{U}} \mathbb{D}(D, F\Gamma) \middle) \right/ {\sim}$$
where $\sim$ is the equivalence relation determined by the characterisation of colimits as coequalisers, and the component at $(\Gamma,A)$ of the quotient map $\nsum_{(\Gamma,A) \in \int \nmty{U}} \mathbb{D} (D, F\Gamma) \to (F_! \nmty{U})(D)$ is given by $(F_!A)_D : \mathbb{D}(D, F\Gamma) \to (F_! \nmty{U})(D)$.
Now identifying maps $\Yon D \to F_! \nmty{U}$ with elements of $(F_! \nmty{U})(D)$ (as usual, by the Yoneda lemma), we have
$$(F_!A)_D(\delta) = F_!A \circ \Yon \delta = F_!p \circ d = F_!B \circ \Yon F\nmp{B} \circ \Yon d' = F_!B \circ \Yon \delta' = (F_!B)_D(\delta')$$
and so $\delta$ and $\delta'$ are in the same $\sim$-equivalence class. It follows that there exists a zigzag of morphisms in $\int_{\mathbb{C}} \nmty{U}$ connecting $\delta$ with $\delta'$, in the sense that there exist:
\begin{itemize}
\item A natural number $n \ge 1$;
\item Objects $(\Theta_i, C_i) \in \int_{\mathbb{C}} \nmty{U}$ for all $0 \le i \le 2n$, with $(\Theta_0,C_0)=(\Gamma,A)$ and $(\Theta_{2n},C_{2n}) = (\Delta,B)$;
\item Morphisms $\Theta_{2i} \xleftarrow{\theta_{2i}} \Theta_{2i+1} \xrightarrow{\theta_{2i+1}} \Theta_{2i+2}$ for all $0 \le i < n$, such that $C_{2i+1}[\theta_{2i}] = C_{2i}$ and $C_{2i+1} [\theta_{2i+1}] = C_{2i+2}$ for all $i$; and
\item Morphisms $\delta_i : D \to F\Theta_i$ for all $0 \le i \le 2n$, with $\delta_0=\delta$ and $\delta_{2n} = \delta'$, such that $F\theta_{2i} \circ \delta_{2i+1} = \delta_{2i}$ and $F\theta_{2i+1} \circ \delta_{2i+1} = \delta_{2i+2}$ for all $0 \le i < n$;
\end{itemize}
By the assumption that $F$ preserves canonical pullback squares, and since the Yoneda embedding preserves limits, there is a zigzag of pullbacks connecting $\Yon F \nmp{A}$ with $\Yon F \nmp{B}$ as indicated by squiggly arrows in the following diagram.
\begin{center}
\begin{tikzcd}[row sep=small, column sep=large]
\Yon D
\arrow[ddddrr, lightpurple, "\Yon \delta'"']
\arrow[ddddddr, lightpurple, bend right=10, "\Yon \delta"']
\arrow[drr, crossing over, "\Yon d'" description]
\arrow[ddrrrr, bend left, "d"]
&&&&
\\
&&
\Yon F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[drr]
\arrow[ddd, pos=0.3, "\Yon F\nmp{B}" description]
\arrow[ddl, crossing over, leftrightsquigarrow]
&&
\\
&&&&
F_! \nmtm{U}
\arrow[ddd, "F_!p"]
\\
&
\Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[urrr, crossing over]
\arrow[ddd, "\Yon F\nmp{A}" description]
&&&
\\
&&
\Yon F\Delta
\arrow[drr, "F_!B"]
\arrow[ddl, leftrightsquigarrow]
&&
\\
&&&&
F_! \nmty{U}
\\
&
\Yon F\Gamma
\arrow[urrr, "F_!A"']
&&&
\end{tikzcd}
\end{center}
The detail of this zigzag of pullbacks is illustrated in the following commutative diagram.
\resizebox{\textwidth}{!}{%
\begin{tikzcd}[row sep={60pt}, column sep={10pt}, ampersand replacement=\&]
\&\&\&
\Yon D
\arrow[ddrrr, lightpurple, bend right=15, pos=0.65, "\Yon \delta_{2n}" description]
\arrow[ddrr, lightpurple, bend right=15, pos=0.8, "\Yon \delta_{2n-1}" description]
\arrow[ddr, lightpurple, bend right=15, pos=0.85, "\Yon \delta_{2n-2}" description]
\arrow[ddl, lightpurple, bend left=15, pos=0.85, "\Yon \delta_{2}" description]
\arrow[ddll, lightpurple, bend left=15, pos=0.8, "\Yon \delta_{1}" description]
\arrow[ddlll, lightpurple, bend left=15, pos=0.65, "\Yon \delta_{0}" description]
\arrow[drrr, crossing over, "\Yon d'", bend left=15]
\&\&\&
\\
\Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, crossing over, "\Yon F\nmp{A}"']
\&
\Yon F(\Theta_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_1)
\arrow[d, crossing over, "\Yon F\nmp{C_1}" description]
\arrow[l, crossing over]
\arrow[r, crossing over]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[dl, draw=none, "\text{\Large$\llcorner$}" description, pos=0.1]
\&
\Yon F(\Theta_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_2)
\arrow[d, crossing over, "\Yon F\nmp{C_2}" description]
\arrow[rr, crossing over, leftrightarrow, "\ \cdots\ " description]
\&
\&
\Yon F(\Theta_{2n-2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-2})
\arrow[d, crossing over, "\Yon F\nmp{C_{2n-2}}" description]
\&
\Yon F(\Theta_{2n-1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-1})
\arrow[d, crossing over, "\Yon F\nmp{C_{2n-1}}" description]
\arrow[l, crossing over]
\arrow[r, crossing over]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[dl, draw=none, "\text{\Large$\llcorner$}" description, pos=0.1]
\&
\Yon F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[d, crossing over, "\Yon F\nmp{B}"]
\\[50pt]
\Yon F\Gamma
\&
\Yon F\Theta_1
\arrow[l]
\arrow[r]
\&
\Yon F\Theta_2
\arrow[rr, leftrightarrow, "\ \cdots\ " description]
\&\&
\Yon F\Theta_{2n-2}
\&
\Yon F\Theta_{2n-1}
\arrow[l]
\arrow[r]
\&
\Yon F\Delta
\\
\&\&\&
F_! \nmty{U}
\arrow[ulll, leftarrow, bend left=15, "F_!A"]
\arrow[ull, leftarrow, bend left=15, "F_!C_1" description]
\arrow[ul, leftarrow, bend left=15, "F_!C_2" description]
\arrow[ur, leftarrow, bend right=15, "F_!C_{2n-2}" description]
\arrow[urr, leftarrow, bend right=15, "F_!C_{2n-1}" description]
\arrow[urrr, leftarrow, bend right=15, "F_!B"']
\&\&\&
\end{tikzcd}
}
We proceed by induction. Let $d_{2n} = d' : D \to F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)$. The universal property of the rightmost pullback square yields a unique morphism $d_{2n-1} : D \to \Theta_{2n-1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-1}$ making the appropriate triangles commute, and composing with $F(\theta_{2n-1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-1})$, we obtain a morphism $d_{2n-2} : D \to F(\Theta_{2n-2} \to C_{2n-2})$ which satisfies $F \nmp{C_{2n-2}} \circ d_{2n-2} = \delta_{2n-2} : D \to F\Theta_{2n-2}$.
Repeating this process $n-1$ more times yields sequence of morphisms $d_i : D \to F(\Theta_i \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_i)$ making the required triangles commute; in particular, we obtain a morphism $d_0 : D \to F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ satisfying $F \nmp{A} = \delta_0$ and $F_! \nmq{A} \circ \Yon d_0 = d$, as illustrated in the following diagram.
\resizebox{\textwidth}{!}{%
\begin{tikzcd}[row sep={60pt}, column sep={10pt}, ampersand replacement=\&]
\&\&\&
\Yon D
\arrow[ddrrr, lightpurple, bend right=15, pos=0.65, "\Yon \delta_{2n}" description]
\arrow[ddrr, lightpurple, bend right=15, pos=0.8, "\Yon \delta_{2n-1}" description]
\arrow[ddr, lightpurple, bend right=15, pos=0.85, "\Yon \delta_{2n-2}" description]
\arrow[ddl, lightpurple, bend left=15, pos=0.85, "\Yon \delta_{2}" description]
\arrow[ddll, lightpurple, bend left=15, pos=0.8, "\Yon \delta_{1}" description]
\arrow[ddlll, lightpurple, bend left=15, pos=0.65, "\Yon \delta_{0}" description]
\arrow[drrr, crossing over, "\Yon d_{2n}", bend left=15]
\arrow[drr, crossing over, "\Yon d_{2n-1}" description, bend left=15]
\arrow[dr, crossing over, "\Yon d_{2n-2}" description, bend left=15]
\arrow[dl, crossing over, "\Yon d_2" description, bend right=15]
\arrow[dll, crossing over, "\Yon d_1" description, bend right=15]
\arrow[dlll, crossing over, dashed, blue, "\Yon d_0"', bend right=15]
\&\&\&
\\
\Yon F(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, crossing over, "\Yon F\nmp{A}"']
\&
\Yon F(\Theta_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_1)
\arrow[d, crossing over, "\Yon F\nmp{C_1}" description]
\arrow[l, crossing over]
\arrow[r, crossing over]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[dl, draw=none, "\text{\Large$\llcorner$}" description, pos=0.1]
\&
\Yon F(\Theta_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_2)
\arrow[d, crossing over, "\Yon F\nmp{C_2}" description]
\arrow[rr, crossing over, leftrightarrow, "\ \cdots\ " description]
\&
\&
\Yon F(\Theta_{2n-2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-2})
\arrow[d, crossing over, "\Yon F\nmp{C_{2n-2}}" description]
\&
\Yon F(\Theta_{2n-1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_{2n-1})
\arrow[d, crossing over, "\Yon F\nmp{C_{2n-1}}" description]
\arrow[l, crossing over]
\arrow[r, crossing over]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[dl, draw=none, "\text{\Large$\llcorner$}" description, pos=0.1]
\&
\Yon F(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B)
\arrow[d, crossing over, "\Yon F\nmp{B}"]
\\[50pt]
\Yon F\Gamma
\&
\Yon F\Theta_1
\arrow[l]
\arrow[r]
\&
\Yon F\Theta_2
\arrow[rr, leftrightarrow, "\ \cdots\ " description]
\&\&
\Yon F\Theta_{2n-2}
\&
\Yon F\Theta_{2n-1}
\arrow[l]
\arrow[r]
\&
\Yon F\Delta
\\
\&\&\&
F_! \nmty{U}
\arrow[ulll, leftarrow, bend left=15, "F_!A"]
\arrow[ull, leftarrow, bend left=15, "F_!C_1" description]
\arrow[ul, leftarrow, bend left=15, "F_!C_2" description]
\arrow[ur, leftarrow, bend right=15, "F_!C_{2n-2}" description]
\arrow[urr, leftarrow, bend right=15, "F_!C_{2n-1}" description]
\arrow[urrr, leftarrow, bend right=15, "F_!B"']
\&\&\&
\end{tikzcd}
}
To see that $d_0$ is the unique such morphism, suppose $\widehat{d}_0$ were another. Repeating the above process from left to right (rather than from right to left) yields a sequence of morphisms $\widehat{d}_i : D \to F(\Theta_i \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} C_i)$ induced from the fundamental property of pullbacks. It follows that $\widehat{d}_{2n} = d_{2n}$, and hence working again from right to left, we obtain $\widehat{d}_i = d_i$ for all $0 \le i \le 2n$. In particular, $\widehat{d}_0=d_0$, so that $(\star)$ is a pullback square.
\end{proof}
Proving or refuting the converse to \Cref{lemWeakMorphismImpliesPullbackSquare} is a topic for future work. It would be convenient if it were true---for example, it would imply that weak morphisms of natural models $(\mathbb{C}, p) \to (\mathbb{C}, q)$ over a common base category $\mathbb{C}$ correspond with cartesian morphisms of polynomials $p \pRightarrow q$ (\Cref{defCartesianMorphism}).
\subsection*{Preservation of type theoretic structure}
Having found a convenient way to describe morphisms of natural models, we now extend that description to natural models admitting extra structure. Again, we start with the essentially algebraic notion.
\begin{definition}[Morphisms of natural models preserving type theoretic structure]
\label{defMorphismOfNMPreservingStructure}
Let $S \subseteq \{ \seqbn{\mathsf{ty}_i}{i \in I}, \seqbn{\mathsf{tm}_j}{j \in J}, \mathbf{0}, \mathbbm{1}, \Sigma, \Pi, \dots \}$ be a set describing additional type theoretic structure that a natural model may possess (\Cref{secEssentiallyAlgebraicTheory}) and let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models admitting the type theoretic structure in $S$. A \textbf{morphism of natural models preserving $S$} from $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ is a homomorphism from $(\mathbb{C}, p)$ to $(\mathbb{D}, q)$ considered as models of the essentially algebraic theory $\mathbb{T}_S$. Write $\mathbf{NM}_S$ for the category of natural models admitting structure from $S$.
\end{definition}
If $S' \subseteq S$ then there is a forgetful functor $\mathbf{NM}_S \to \mathbf{NM}_{S'}$. In particular, there is a forgetful functor $\mathbf{NM}_S \to \mathbf{NM}$ for any set $S$ of additional type theoretic structure that a natural model may possess. With this in mind, a morphism on $\mathbf{NM}_S$ has an underlying morphism of natural models $(F, \varphi, \nmmk{\varphi})$ in the sense of \Cref{thmMorphismsOfNMFunctorially}, so may be described as a triple $(F, \varphi, \nmmk{\varphi})$ satisfying some properties.
If the additional structure consists only of basic types, terms, an empty type or a unit type, then it is immediately clear that a morphism of natural models admitting this structure is simply one which maps the distinguished types and terms of its domain to the corresponding distinguished types and terms of its codomain.
It remains to describe preservation of dependent sum types and dependent product types. For this, we note the following two technical lemmas concerning polynomials and presheaves.
\begin{lemma}[Precomposition by a functor preserves polynomial composition and application]
Let $F : \mathbb{C} \to \mathbb{D}$ be a functor between small categories, and let $f : B \to A$ and $g : D \to C$ be morphisms in $\widehat{\mathbb{D}}$. Then there are isomorphisms in $\widehat{\mathbb{C}}^{\to}$
$$F^*(g \cdot f) \cong F^*(g) \cdot F^*(f) \quad \text{and} \quad F^*(\mathrm{P}_g(f)) \cong \mathrm{P}_{F^*(g)}(F^*(f))$$
\end{lemma}
\begin{proof}[Sketch of proof]
To see that $F^*(g \cdot f) \cong F^*(g) \cdot F^*(f)$, note that the functor $F^*$ preserves limits as it is a right adjoint, and the polynomial composite $g \cdot f$ is obtained by composing a particular pullback of $f$ with a particular pullback of $g$ (\Cref{secPolynomialPseudomonads}). To see that $F^*(\mathrm{P}_g(f)) \cong \mathrm{P}_{F^*(g)}(F^*(f))$, note that the following diagram commutes up to isomorphism.
\begin{diagram}
1
\arrow[r, "f"]
\arrow[dr, "F^*(f)"']
&
\widehat{\mathbb{D}}
\arrow[r, "\Delta_D"]
\arrow[d, "F^*" description]
&
\widehat{\mathbb{D}} \slice{D}
\arrow[r, "\Pi_g"]
\arrow[d, "F^*" description]
&
\widehat{\mathbb{D}} \slice{C}
\arrow[r, "\Sigma_C"]
\arrow[d, "F^*" description]
&
\widehat{\mathbb{D}}
\arrow[d, "F^*" description]
\\
&
\widehat{\mathbb{C}}
\arrow[r, "\Delta_{F^*(D)}"']
&
\widehat{\mathbb{C}} \slice{F^*(D)}
\arrow[r, "\Pi_{F^*(g)}"']
&
\widehat{\mathbb{C}} \slice{F^*(C)}
\arrow[r, "\Sigma_{F^*(C)}"']
&
\widehat{\mathbb{C}}
\end{diagram}
The composite from the top left to bottom right along the top gives $F^*(\mathrm{P}_g(f))$, and the composite along the bottom gives $\mathrm{P}_{F^*(g)}(F^*(f))$.
\end{proof}
\begin{lemma}[Polynomial composition preserves commutative squares]
Let $\mathcal{E}$ be a locally cartesian closed category. Polynomial composition extends to a functor
$$(-) \cdot (-) : \mathcal{E}^{\to} \times \mathcal{E}^{\to} \to \mathcal{E}^{\to}$$
\end{lemma}
\begin{proof}[Sketch of proof]
Given morphisms $f,f',g,g'$ in $\mathcal{E}$, chase commutative squares $f \to f'$ and $g \to g'$ through the construction of the polynomial composites $g \cdot f$ and $g' \cdot f'$ \Cref{defCompositionOfPolynomials} using the universal properties of pullbacks and of dependent products. Functoriality follows from uniqueness in the universal property.
\end{proof}
\begin{theorem}[Functorial description of preservation of dependent sum types]
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models admitting dependent sum types. A morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ preserves dependent sum types if and only if the following diagram in $\widehat{\mathbb{C}}^{\to}$ commutes.
\begin{diagram}
p \cdot p
\arrow[rr, "{(\widehat{\Sigma}, \widehat{\mathsf{pair}})}"]
\arrow[d, "{(\varphi, \nmmk{\varphi})} \cdot {(\varphi, \nmmk{\varphi})}"']
&&
p
\arrow[d, "{(\varphi, \nmmk{\varphi})}"]
\\
F^*q \cdot F^*q
\arrow[r, "\cong"']
&
F^*(q \cdot q)
\arrow[r, "{F^*(\widehat{\Sigma}, \widehat{\mathsf{pair}})}"']
&
F^*q
\end{diagram}
\end{theorem}
\begin{proof}
The morphism $(\varphi, \nmmk{\varphi}) \cdot (\varphi, \nmmk{\varphi})$ can be expressed in the internal language of $\widehat{\mathbb{C}}$ via the following commutative square
\begin{diagram}
\sum_{A \in \nmty{U}} \sum_{B \in \nmty{U}^{[A]}} \sum_{a \in [A]} [B(a)]
\arrow[d, "p \cdot p"']
\arrow[r, "{((\varphi, \nmmk{\varphi}) \cdot (\varphi, \nmmk{\varphi}))_1}"]
&
\sum_{A' \in F^*\nmty{V}} \sum_{B' \in (F^*\nmty{V})^{\langle A'}} \sum_{a' \in \langle A' \rangle} \langle B(a) \rangle
\arrow[d, "F^*q \cdot F^*q"]
\\
\sum_{A \in \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "{((\varphi, \nmmk{\varphi}) \cdot (\varphi, \nmmk{\varphi}))_0}"']
&
\sum_{A' \in \nmty{V}(F\Gamma)} \nmty{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A')
\end{diagram}
The component at $\Gamma$ of this diagram, after application of \Cref{lemLemmaFive,lemLemmaElevenPointFive}, is given by the following commutative square of sets and functions.
\begin{diagram}
\sum_{A \in \nmty{U}(\Gamma)} \sum_{B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)} \sum_{a \in \nmtm{U}(\Gamma; A)} \nmtm{U}(\Gamma; B(a))
\arrow[d, "\pi"']
\arrow[r]
&
\sum_{A' \in \nmty{V}(F\Gamma)} \sum_{B' \in \nmty{V}(F\Gamma \cext A')} \sum_{a' \in \nmtmalt{V}(F\Gamma; A')} \nmtmalt{V}(F\Gamma; B'(a'))
\arrow[d, "\pi"]
\\
\sum_{A \in \nmty{U}(\Gamma)} \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r]
&
\sum_{A' \in F^*\nmty{V}} (F^*\nmty{V})^{\langle A \rangle}
\end{diagram}
The morphisms at the top and bottom apply $F$ to each component.
As such, the original square commutes if and only if for all $\Gamma \in \mathrm{ob}(\mathbb{C})$, $A \in \nmty{U}(\Gamma)$, $B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$, $a \in \nmtm{U}(\Gamma; A)$ and $b \in \nmtm{U}(\Gamma; B(a))$, we have
$$F\widehat{\Sigma}(A,B) = \widehat{\Sigma}(FA,FB) \quad \text{and} \quad F\widehat{\mathsf{pair}}(A,B,a,b) = \widehat{\mathsf{pair}}(FA,FB,Fa,Fb)$$
This says that the square in the statement of the theorem commutes if and only if $F$ preserves dependent sum types, as required.
\end{proof}
\section{Situation amongst other notions of model}
\label{secOtherNotionsOfModel}
\todo{}
\subsection*{Categories with families}
\todo{}
\begin{theorem}[Natural models are categories with families are natural models]
\label{thmNMisoCWF}
The category $\mathbf{NM}$ of natural models is isomorphic to the category $\mathbf{CwF}$ of categories with families.
\end{theorem}
\begin{proof}
Natural models and categories with families are different presentations of models of the same essentially algebraic theory. \todo{Elaborate? Justify?}
\end{proof}
\todo{}
\begin{corollary}
The category $\mathbf{NM}$ is equivalent to the categories $\mathbf{CwA}$ of categories with attributes and $\mathbf{DiscCompCat}$ of discrete comprehension categories.
\end{corollary}
\begin{proof}
\todo{Cite relevant papers}
\end{proof}
\subsection*{Tribes}
\begin{definition}[Clans and tribes \thmcite{Joyal2017ClansTribes}]
\label{defClanTribe}
\index{clan}
\index{tribe}
\index{fibration!{---} in a clan/tribe}
\index{anodyne map!{---} in a clan/tribe}
A \textbf{clan} is a category $\mathcal{E}$ with a terminal object $1$ and a class $\mathcal{F} \subseteq \mathcal{E}$ of morphisms in $\mathcal{E}$ called \textbf{fibrations}, which satisfy the following closure properties:
\begin{enumerate}[(i)]
\item Every isomorphism in $\mathcal{E}$ is in $\mathcal{F}$;
\item $\mathcal{F}$ is closed under composition;
\item $\mathcal{F}$ is closed under pullbacks along arbitrary morphisms of $\mathcal{E}$; and
\item For each object $X$ of $\mathcal{E}$, the (unique) morphism $X \to 1$ to the terminal object is in $\mathcal{F}$.
\end{enumerate}
We write $\mathcal{A}$ for the class of morphisms in $\mathcal{E}$ with the left lifting property with respect to $\mathcal{F}$ and call the elements of $\mathcal{A}$ \textbf{anodyne maps}.
A clan $(\mathcal{E}, \mathcal{F})$ is a \textbf{tribe} if every morphism $f$ in $\mathcal{E}$ factors as $p \circ u$ for some fibration $p \in \mathcal{F}$ and anodyne map $u \in \mathcal{A}$, and if the class of anodyne maps is closed under pullbacks along arbitrary morphisms of $\mathcal{E}$.
\end{definition}
\todo{}
\begin{theorem}[Natural models are tribes]
Let $(\mathbb{C}, p)$ be a democratic natural model admitting a unit type and dependent sum types. The pair $(\mathbb{C}, \mathcal{F}_p)$ is a tribe, where $\mathcal{F}_p$ is the class of morphisms of $\mathbb{C}$ classified by $p$ (\Cref{defMorphismClassifiedByNM}). Moreover, the assignment $(\mathbb{C}, p) \mapsto (\mathbb{C}, \mathcal{F}_p)$ extends to a functor $\mathbf{NM}_{1,\Sigma,\mathrm{dem}} \to \mathbf{Trb}$.
\end{theorem}
\begin{proof}
First observe that $(\mathbb{C}, \mathcal{F}_p)$ is a clan. Indeed, $\mathcal{F}_p$ contains all isomorphisms and is closed under composition by \Cref{lemUnitsClassifyIsomorphisms,lemDependentSumsClassifyComposites}, since $(\mathbb{C}, p)$ admits a unit type and dependent sum types. Moreover $\mathcal{F}_p$ is closed under pullbacks along arbitrary morphisms of $\mathbb{C}$; this is an immediate consequence of the two pullbacks lemma. Finally, each morphism $\mathsf{t}_{\Gamma} : \Gamma \to \diamond$ is classified by $p$ since $(\mathbb{C}, p)$ is democratic---to see this, note that $(\Gamma, \mathsf{t}_{\Gamma}) \cong (\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \bar{\Gamma}, \nmp{\bar{\Gamma}})$ in $\mathbb{C} \slice{\Gamma}$ and apply \Cref{lemClassificationOfMorphismsClassifiedByNM}.
\todo{Tribe?}
\todo{Extension to functor}
\end{proof}
\todo{}
\subsection*{Dominance}
\todo{}
\begin{definition}[Dominances \thmcite{Rosolini1986Continuity}]
\label{defDominance}
\index{dominance}
Let $\mathcal{E}$ be a category with a terminal object $1$. A \textbf{dominance} in $\mathcal{E}$ is a pair $(\Sigma, \top)$ consisting of an object $\Sigma$ and a subobject $\top : 1 \monoto \Sigma$, such that
\begin{enumerate}[(i)]
\item Pullbacks of $\top$ along arbitrary morphisms of $\mathcal{E}$ exist---such pullbacks are called \textbf{$\top$-subobjects};
\item Every $\top$-subobject arises uniquely as a pullback of $\top$, in the sense that for every $\top$-subobject $m : D \monoto A$, there is a unique morphism $\chi_m^{\top} : A \to \Sigma$, called the \textbf{characteristic morphism} of $m$, such that the following square is a pullback;
\begin{diagram}
D
\arrow[r]
\arrow[d, tail, "m"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
1
\arrow[d, tail, "\top"]
\\
A
\arrow[r, "\chi_m^{\top}"']
&
\Sigma
\end{diagram}
\item The pullback functor $\top^* : \mathcal{E} \slice{\Sigma} \to \mathcal{E}$ has a right adjoint; and
\item The class of $\top$-subobjects is closed under composition.
\end{enumerate}
\end{definition}
\todo{}
\begin{theorem}[Natural models are dominances]
Let $(\mathbb{C}, p)$ be a natural model with underlying natural transformation $p : \Yon(\diamond) \to \nmty{U}$. If $(\mathbb{C}, p)$ admits dependent sum types, then $(\nmty{U}, p)$ is a dominance in $\widehat{\mathbb{C}}$.
\end{theorem}
\begin{proof}
Conditions (i) and (iii) of \Cref{defDominance} are satisfied immediately from the fact that $\widehat{\mathbb{C}}$ is a locally cartesian closed category. Condition (iv) is satisfied by the hypothesis that $(\mathbb{C}, p)$ admit dependent sum types \todo{State relevant result somewhere, refer to it.}
\end{proof}
\section{Natural models}
\label{secNaturalModels}
It was observed independently by Steve Awodey \cite{Awodey2012NotesOnModelsOfTypeTheory,Awodey2016NaturalModels} and Marcelo Fiore \cite{Fiore2012DiscreteGeneralisedPolynomialFunctors} that the notion of a representable natural transformation (\Cref{defRepresentableNaturalTransformation}) captures the type theoretic rules for context extension. We might, therefore, be tempted to take representable natural transformations as our notion of model of dependent type theory and leave it at that. However, we would like to provide an \textit{essentially algebraic} account of the semantics of type theory (\Cref{secEssentiallyAlgebraicTheory})---\Cref{defRepresentableNaturalTransformation} does not quite do this because it posits mere existence, rather than a choice, of data witnessing representability of the natural transformation.
\begin{definition}[Natural models \thmcite{Awodey2016NaturalModels}]
\label{defNaturalModel}
\index{natural model}
A \textbf{natural model} is a small category $\mathbb{C}$ with a distinguished terminal object $\diamond$, presheaves $\nmty{U}$ and $\nmtm{U}$ over $\mathbb{C}$, a natural transformation $p : \nmtm{U} \to \nmty{U}$ and, for each $\Gamma \in \mathrm{ob}(\mathcal{C})$ and $A \in \nmty{U}(\Gamma)$, the following \textbf{representability data}: an object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ of $\mathcal{C}$, a morphism $\nmp{A} = \nmp[\Gamma]{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ in $\mathcal{C}$, and an element $\nmq{A} = \nmq[\Gamma]{A} \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$, such that the following square is a pullback for all such $\Gamma$ and $A$:
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "\nmq{A}"]
\arrow[d, "\Yon(\nmp{A})"']
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Gamma)
\arrow[r, "A"']
&
\nmty{U}
\end{diagram}
\end{definition}
\begin{numbered}
As explained in detail in \cite{Awodey2016NaturalModels}, we can informally view a natural model as a model of dependent type theory in the following way. The category $\mathbb{C}$ represents the category of contexts and substitutions, with the terminal object $\diamond$ representing the empty context. For each object $\Gamma$, the set $\nmty{U}(\Gamma)$ represents the set of types in context $\Gamma$, and the set $\nmtm{U}(\Gamma)$ represents the set of terms in context $\Gamma$, with the function $p_{\Gamma} : \nmtm{U}(\Gamma) \to \nmty{U}(\Gamma)$ sending a term to its unique type. (This is where we used the uniqueness of typing, as discussed in \Cref{secTypesForTheWorkingMathematician}.) The action of $\nmty{U}$ and $\nmtm{U}$ on morphisms is that of substitution. Naturality of $p$ says that substitution represents typing, in the sense that if $\Gamma \vdash a : A$ and $\sigma : \Delta \to \Gamma$ is a substitution, then $\Delta \vdash a[\sigma] : A[\sigma]$. The object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ represents the extension of a context $\Gamma$ by a new variable $x : A$; then $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to A$ represents the \textit{weakening} substitution and $\nmq{A} \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ represents the new variable $x$. Finally, the universal property of the pullback says that $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ truly does satisfy the syntactic rules for context extension.
\end{numbered}
\begin{numbered}
Under the axiom of choice, every representable natural transformation gives rise to a natural model. Moreover, since representability is defined by a pullback condition, given any $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$, the representability data $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, \nmp{A}, \nmq{A})$ are unique up to canonical isomorphism, in the sense that for any other choice $(\widetilde{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A}, \widetilde{\nmp{A}}, \widetilde{\nmq{A}})$ of representability data, there is a unique isomorphism $\theta : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \widetilde{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A}$ such that $\widetilde{\nmp{A}} \circ \theta = \nmp{A}$ and $\widetilde{\nmq{A}}[\theta] = \nmq{A}$.
\end{numbered}
\begin{numbered}
We will adopt the following notation conventions:
\begin{itemize}
\item $\mathsf{t}_{\Gamma}$ is the unique morphism $\Gamma \to \diamond$ in $\mathbb{C}$;
\item In the internal language of $\widehat{\mathbb{C}}$, write $[A] = \nmtm{U}_A$ for the fibre of $p$ over $A \in \nmty{U}$;
\item Given an object $\Gamma$ of $\mathbb{C}$ and an element $A \in \nmty{U}(\Gamma)$, write $\nmtm{U}(\Gamma; A)$ for the preimage of $p_{\Gamma} : \nmtm{U}(\Gamma) \to \nmty{U}(\Gamma)$ over $A$---we may, further, say `$\Gamma \vdash A$ in $(\mathbb{C}, p)$' to mean that $A \in \nmty{U}(\Gamma)$, and `$\Gamma \vdash a : A$ in $(\mathbb{C}, p)$' to mean that $a \in \nmtm{U}(\Gamma; A)$;
\item Given a morphism $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$, an element $A \in \nmty{U}(\Gamma)$ and an element $a \in \nmtm{U}(\Delta, A[\sigma])$, write $\langle \sigma, a \rangle_A$ for the unique morphism $\Delta \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ induced by the universal property of pullbacks;
\item For each $a \in \nmtm{U}(\Gamma; A)$, write $\nms{a} = \langle \mathrm{id}_{\Gamma}, a \rangle : \Gamma \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$---note that $\nmp{A} \circ \nms{a} = \mathrm{id}_{\Gamma}$, so that $\nms{a}$ is a section of $\nmp{A}$.
\end{itemize}
\end{numbered}
\begin{numbered}
In order to avoid writing a long list of symbols each time we refer to a natural model, we will typically write just $(\mathbb{C}, p)$, leaving the naming of the remaining data implicit. We will adopt the convention that when we write $(\mathbb{C}, p)$, the additional data is named as in \Cref{defNaturalModel} and, when we write $(\mathbb{D}, q)$, the chosen terminal object of $\mathbb{D}$ is denoted by $\star$, that $q : \nmtmalt{V} \to \nmty{V}$ in $\widehat{\mathbb{D}}$, and that the representability data for a given $\Gamma \in \mathrm{ob}(\mathbb{D})$ and $A \in \nmty{V}(\Gamma)$ is denoted by $\Gamma \cext A$, $\nmu{A} : \Gamma \cext A \to \Gamma$ and $\nmv{A} \in \nmtmalt{V}(\Gamma)$. Furthermore, internally to $\widehat{\mathbb{D}}$, write $\langle A \rangle = \nmtm{V}_A$ rather than $[A]$ for the fibre of $q$ over $A \in \nmty{V}$.
\end{numbered}
\begin{construction}[Canonical pullback squares]
\label{cnsCanonicalPullbacks}
Let $(\mathbb{C}, p)$ be a natural model. For all $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$ and all $A \in \nmty{U}(\Gamma)$, there is a pullback square
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]
\arrow[r, "\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
\arrow[d, "\nmp{A[\sigma]}"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[d, "\nmp{A}"]
\\
\Delta
\arrow[r, "\sigma"']
&
\Gamma
\end{diagram}
Pullback squares of this form are called \textbf{canonical pullback squares}.
\end{construction}
\begin{verification}
Construct the following diagram using representability data for $(\mathbb{C}, p)$.
\begin{diagram}
\Yon(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma])
\arrow[r, dashed]
\arrow[d, "\Yon(\nmp{A[\sigma]})"']
\arrow[rr, bend left=15, "\nmq{A[\sigma]}"]
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "\Yon(\nmp{A})" description]
\arrow[r, "\nmq{A}" description]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtm{U}
\arrow[d, "p"]
\\
\Yon(\Delta)
\arrow[r, "\Yon(\sigma)" description]
\arrow[rr, bend right=15, "{A[\sigma]}"']
&
\Yon(\Gamma)
\arrow[r, "A" description]
&
\nmty{U}
\end{diagram}
The right and outer squares are pullbacks by representability of $p$. The universal property of the right-hand pullback yields a morphism $\Yon(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]) \to \Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ as indicated, which is of the form $\Yon(\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ for some $\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma] \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ in $\mathbb{C}$ since the Yoneda embedding is full and faithful. The left-hand square is a pullback by the two pullbacks lemma, and hence the square in the statement of this construction is a pullback since the Yoneda embedding reflects limits.
\end{verification}
\begin{lemma}
\label{lemPastingCanonicalPullbacks}
Let $(\mathbb{C}, p)$ be a natural model, let $\Theta \xrightarrow{\tau} \Delta \xrightarrow{\sigma} \Gamma$ in $\mathbb{C}$ and let $A \in \nmty{U}(\Gamma)$. With notation as in \Cref{cnsCanonicalPullbacks}, we have
$$(\sigma \circ \tau) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \circ (\tau \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma]) : \Theta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\sigma \circ \tau] \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$$
\end{lemma}
\begin{proof}
This is an immediate consequence of the two pullbacks lemma.
\end{proof}
\Cref{lemPastingCanonicalPullbacks} demonstrates that, in a way that mirrors that of Vladimir Voevodsky's `universes' \cite{Voevodsky2009TypeSystems}, natural models overcome the \textit{coherence problem} for interpreting type theory in a locally cartesian closed category.
\subsection*{Admitting type theoretic structure}
The proofs of \Cref{thmAdmittingUnitType,thmAdmittingSigmaTypes,thmAdmittingPiTypes} can be found in \cite{Awodey2016NaturalModels}.
\begin{theorem}[Admitting a unit type \thmcite{Awodey2016NaturalModels}]
\label{thmAdmittingUnitType}
A natural model $(\mathbb{C}, p)$ admits a unit type if and only if there are morphisms
$$\widehat{\mathbbm{1}} : 1 \to \nmty{U} \qquad \text{and} \qquad \widehat{\star} : 1 \to \nmtm{U}$$
in $\widehat{\mathbb{C}}$ exhibiting $\mathrm{id}_1 : 1 \to 1$ as a pullback of $p$.
\begin{diagram}
1
\arrow[d, equals]
\arrow[r, "\widehat{\star}"]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtm{U}
\arrow[d, "p"]
\\
1
\arrow[r, "\widehat{\mathbbm{1}}"']
&
\nmty{U}
\end{diagram}
\end{theorem}
\begin{theorem}[Admitting dependent sum types \thmcite{Awodey2016NaturalModels}]
\label{thmAdmittingSigmaTypes}
A natural model $(\mathbb{C}, p)$ admits dependent sum types if and only if there are morphisms
$$\widehat{\Sigma} : \sum_{A : \nmty{U}} \nmty{U}^{[A]} \to \nmty{U} \qquad \text{and} \qquad \widehat{\mathsf{pair}} : \sum_{A : \nmty{U}} \sum_{B : \nmty{U}^{[A]}} \sum_{a:[A]} [B(a)] \to \nmtm{U}$$
in $\widehat{\mathbb{C}}$ exhibiting the projection $\pi : \sum_{A : \nmty{U}} \sum_{B : \nmty{U}^{[A]}} \sum_{a:[A]} [B(a)] \to \sum_{A : \nmty{U}} \nmty{U}^{[A]}$ as a pullback of $p$.
\begin{diagram}
\sum_{A : \nmty{U}} \sum_{B : \nmty{U}^{[A]}} \sum_{a:[A]} [B(a)]
\arrow[d, "\pi"']
\arrow[r, "\widehat{\mathsf{pair}}"]
\pullbackc{dr}{-0.05}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{A : \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Sigma}"']
&
\nmty{U}
\end{diagram}
Moreover the map $\pi$ is precisely the polynomial composite $p \cdot p$.
\end{theorem}
\begin{theorem}[Admitting dependent product types \thmcite{Awodey2016NaturalModels}]
\label{thmAdmittingPiTypes}
A natural model $(\mathbb{C}, p)$ admits dependent product types if and only if there are morphisms
$$\widehat{\Pi} : \sum_{A : \nmty{U}} \nmty{U}^{[A]} \to \nmty{U} \qquad \text{and} \qquad \widehat{\lambda} : \sum_{A : \nmty{U}} \nmtm{U}^{[A]} \to \nmtm{U}$$
in $\widehat{\mathbb{C}}$ exhibiting $\sum_{A : \nmty{U}} p^{[A]}$ as a pullback of $p$.
\begin{diagram}
\sum_{A : \nmty{U}} \nmtm{U}^{[A]}
\arrow[r, "\widehat{\lambda}"]
\arrow[d, "\sum_{A : \nmty{U}} p^{[A]}"']
\pullbackc{dr}{0}
&
\nmtm{U}
\arrow[d, "p"]
\\
\sum_{A : \nmty{U}} \nmty{U}^{[A]}
\arrow[r, "\widehat{\Pi}"']
&
\nmty{U}
\end{diagram}
Moreover the map $\sum_{A \in \nmty{U}} \nmty{U}^{[A]}$ is precisely the morphism $\mathrm{P}_p(p)$ obtained by applying the extension $\mathrm{P}_p$ of $p$ to $p$ itself.
\end{theorem}
Recall (\Cref{rmkCartesianMorphismIsPullbackSquare}) that in a locally cartesian closed category (such as $\widehat{\mathbb{C}}$), pullback squares correspond with cartesian morphisms of polynomials. Therefore we can succinctly rephrase \Cref{thmAdmittingUnitType,thmAdmittingSigmaTypes,thmAdmittingPiTypes} in terms of cartesian morphisms of polynomials.
\begin{corollary}
\label{thmUnitSigmaPiPoly}
Let $(\mathbb{C},p)$ be a natural model.
\begin{enumerate}[(a)]
\item $(\mathbb{C},p)$ admits a unit type if and only if there is a cartesian morphism $\eta : i_1 \pRightarrow p$ in $\mathbf{Poly}_{\widehat{\mathbb{C}}}$;
\item $(\mathbb{C},p)$ admits dependent sum types if and only if there is a cartesian morphism $\mu : p \cdot p \pRightarrow p$ in $\mathbf{Poly}_{\widehat{\mathbb{C}}}$;
\item $(\mathbb{C},p)$ admits dependent product types if and only if there is a cartesian morphism $\zeta : P_p(p) \pRightarrow p$ in $\mathbf{Poly}_{\widehat{\mathbb{C}}}$;
\end{enumerate}
\end{corollary}
Our notation is deliberately suggestive of a \textit{monad} and an \textit{algebra}; exploring this topic further is the subject of \Cref{secPolynomialPseudomonads}.
\section{Free natural models}
\label{secInterpretationsInitiality}
In \Cref{secEssentiallyAlgebraicTheory}, we saw that the various theories of natural models equipped with type theoretic structure are essentially algebraic. As we discussed at the end of that section, we can use this fact to apply the machinery of essentially algebraic categories and locally presentable categories to categories of the form $\mathbf{NM}_{\mathbb{T}}$ for a given dependent type theory $\mathbb{T}$---for example, such categories have initial objects (since they are cocomplete), and there are free--forgetful adjunctions between such categories.
The goal of this chapter is to explicitly describe the initial object of $\mathbf{NM}_{\mathbb{T}}$ for a couple of basic dependent type theories $\mathbb{T}$, and to provide an explicit description of some of these left adjoints to forgetful functors.
In this section, we construct the free natural model on a set of basic types---or, more precisely, on an indexed family of elements of $\nmty{U}(\diamond)$. In the subsequent sections, we describe how to freely add type theoretic structure to a natural model without additional type theoretic structure.
\subsection*{A basic free model}
We construct the free model on the theory $\mathbb{T}_{(\mathsf{ty}_i)_{i \in I}}$ of an $I$-indexed family of basic types, where $I$ is a fixed set.
\begin{construction}[Free model of the theory of a family of basic types]
\label{cnsFreeNaturalModelKappaBasicTypes}
The \textbf{free natural model on the theory $\mathbb{T}_{(\mathsf{ty}_i)_{i \in I}}$} is the natural model $(\mathbb{C}_I, p_I)$ given by the following data:
\begin{itemize}
\item The underlying category $\mathbb{C}_{I}$ is $(\mathbf{Fin}\slice{I})^{\mathrm{op}}$.
\item The (only, and hence) chosen terminal object of $\mathbb{C}_{I}$ is $(\varnothing, {!}_I : \varnothing \to I)$.
\item The presheaf of types $\nmty{U}_{I} : \mathbb{C}_{I}^{\mathrm{op}} \to \mathbf{Set}$ is the codomain functor $\mathbf{Fin} \slice{I} \to \mathbf{Set}$, or equivalently the constant functor $\Delta(I)$ with value $I$. Thus $\nmty{U}_{I}(A, u) = I$ for all $(A, u)$ and $\nmty{U}_{I}(f) = \mathrm{id}_{I}$ for all $f$.
\item The presheaf of terms $\nmtm{U}_I$ is the domain functor $\mathsf{dom} : \mathbf{Fin} \slice{I} \to \mathbf{Set}$. Thus $\nmtm{U}_I(A,u) = A$ for all $(A,u)$ and $\nmtm{U}_I(f) = f$ for all $f$.
\item The natural transformation $p_{I} : \nmtm{U}_{I} \to \nmty{U}_{I}$ is given simply by $(p_I)_{(A,u)} = u : A \to I$.
\item The representability data is defined as follows. Given $(A, u)$ and $j \in I$, we define
\begin{itemize}
\item $(A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j = (A + 1, [u,j])$---thus $(A+1)_i = A_i$ if $i \ne j$ and $(A+1)_i = A_j+1$ if $i=j$;
\item $\nmp{j} : (A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j \to (A, u)$ in $\mathbb{C}_I$ is given by the left inclusion function $A \to A+1$ in $\mathbf{Fin}\slice{I}$.
\item $\nmq{j} \in \nmtm{U}_{I}((A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j) = A+1$ is the added element $\star \in A+1$.
\end{itemize}
\end{itemize}
\end{construction}
\begin{verification}
The only part of the verification that is not immediate is representability of $p_{I}$ as witnessed by the given representability data.
The set-up is as follows. Take $(A, u) \in \mathbb{C}_I$ and $j \in I$. We need to prove that the following square is a pullback
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\Yon((A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j)
\arrow[d, "\nmp{j}"']
\arrow[r, "\nmq{j}"]
&
\nmtm{U}_{I}
\arrow[d, "p_{I}"]
\\
\Yon(A, u)
\arrow[r, "j"']
&
\nmty{U}_{I}
\end{tikzcd}
\end{center}
It evidently commutes, so it suffices to check the universal property on representables.
To this end, let $(B, v) \in \mathbb{C}_I$, let $f : (B, v) \to (A, u)$ in $\mathbb{C}_{I}$ (so that $f$ is a function $A \to B$ over $I$) and let $b : \Yon(B, v) \to \nmtm{U}_{I}$, and suppose that $p_{I} \circ b = j \circ \Yon(f)$.
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\Yon(B, v)
\arrow[ddr, "\Yon(f)"', bend right=20]
\arrow[drr, "b", bend left=20]
\arrow[dr, dashed, blue]
&[-20pt]&
\\[-20pt]
&
\Yon((A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j)
\arrow[d, "\Yon(\nmp{j})"']
\arrow[r, "\nmq{j}"]
&
\nmtm{U}_{I}
\arrow[d, "p_{I}"]
\\
&\Yon(A, u)
\arrow[r, "j"']
&
\nmty{U}_{I}
\end{tikzcd}
\end{center}
By the Yoneda lemma, $b$ is an element of $B$, and commutativity of the outer square says that
$$v(b) = (p_I)_{(B,v)}(b) = \nmty{U}_I(f)(j) = j$$
We need to prove that there is a unique $g : (B, v) \to (A, u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j$ in $\mathbb{C}_I$ such that $\nmq{j} \circ \Yon(g) = b$ and $\nmp{j} \circ g = f$. Now:
\begin{itemize}
\item As a morphism in $\mathbb{C}_I$, the map $g$ must be a function $A+1 \to B$ over $I$, which is equivalent to saying that $g = [g', b']$ for some function $g' : A \to B$ over $I$ and some element $b' \in B_j$;
\item The requirement that $\nmp{j} \circ g = f$ in $\mathbb{C}_i$ is equivalent to the requirement that $g'=f$;
\item The requirement that $\nmq{j} \circ \Yon(g) = b$ is equivalent to the requirement $b'=b$.
\end{itemize}
So $g = [f,b] : (B,v) \to (A,u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j$ is the unique morphism satisfying the required conditions. Hence the square is a pullback, and so the representability data of \Cref{cnsFreeNaturalModelKappaBasicTypes} truly does witness representability of $p_{I}$.
\end{verification}
\begin{example}
Take $I=0$. The category $\mathbb{C}_0$ is the terminal category $\mathbf{1}$; the presheaves $\nmty{U}_0, \nmtm{U}_0$ are empty and the natural transformation $p_0 : \nmtm{U}_0 \to \nmty{U}_0$ is the empty natural transformation.
\end{example}
\begin{example}
Take $I=1$. Then $\mathbb{C}_1 \simeq \mathbf{Fin}^{\mathrm{op}}$, which is the free category with finite limits on one object. The presheaf $\nmty{U}_1$ is the constant presheaf $\Delta(1)$ and the presheaf $\nmtm{U}_1$ is the inclusion $\mathbf{Fin} \hookrightarrow \mathbf{Set}$. The natural transformation $p_1 : \nmtm{U}_1 \to \nmty{U}_1$ is then uniquely determined since $\nmty{U}_1$ is terminal.
\end{example}
We now prove that the term model $(\mathbb{C}_{I}, p_I)$ satisfies the appropriate universal property.
\begin{lemma}[Context extension by a basic type is a product]
\label{lemExtensionByBasicTypeIsProduct}
Let $(\mathbb{C}, p)$ be a natural model. If $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\diamond)$. The span
$$\Gamma \xleftarrow{\nmp{A}} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nmt{\Gamma}] \xrightarrow{\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A} \diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$$
is a product diagram in $\mathbb{C}$.
\end{lemma}
\begin{proof}
Note that the following square is a canonical pullback square (\Cref{cnsCanonicalPullbacks}).
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nmt{\Gamma}]
\arrow[r, "\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"]
\arrow[d, "\nmp{A[\nmt{\Gamma}]}"']
&
\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[d, "\nmp{A}"]
\\
\Gamma
\arrow[r, "\nmt{\Gamma}"']
&
\diamond
\end{tikzcd}
\end{center}
But $\diamond$ is terminal in $\mathbb{C}$, so this says precisely that $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nmt{\Gamma}]$ is a product of $\Gamma$ and $\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$, with the required projection morphisms.
\end{proof}
\begin{theorem}[Universal property of the model $(\mathbb{C}_I, p_I)$]
\label{thmFreeNaturalModelBasicTypesInitial}
Let $(\mathbb{C}, p)$ be a natural model and let $\{ O_i \mid i \in I \} \subseteq \nmty{U}(\diamond)$. There is a unique morphism of natural models $F : (\mathbb{C}_I, p_I) \to (\mathbb{C}, p)$ such that $F(i) = O_i$ for all $i \in I$. Hence $(\mathbb{C}_I, p_I)$ is initial in the category $\mathbf{NM}_{(\mathsf{ty}_i)_{i \in I}}$.
\end{theorem}
\begin{proof}
Define the underlying functor $F : \mathbb{C}_{I} \to \mathbb{C}$ on objects by
$$F(A, u) = O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})}$$
Let $f : (A, u) \to (B, v)$ in $\mathbb{C}_{I}$, so that $f$ is a function $B \to A$ over $I$. By Lemma \ref{lemExtensionByBasicTypeIsProduct} (and an easy induction), the objects $O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})}$ and $O_{v(b_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{v(b_{n-1})}$ are the products of their respective component basic types. With this in mind, let
$$F(f) = \langle \pi_{f(b_0)}, \pi_{f(b_1)}, \dots, \pi_{f(b_{n-1})} \rangle : O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})} \to O_{v(b_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{v(b_{n-1})}$$
where $\pi_{a_k} : O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})} \to O_{u(a_k)}$ is the product projection onto the $k^{\text{th}}$ component.
In order to see that $F(f)$ is well-defined, we need the codomain of $\pi_{f(b_{\ell})}$ to be $O_{v(b_{\ell})}$ for each $\ell < n$. To see this, note that for given $\ell < n$ we have $f(b_{\ell}) = a_k$ for some $k<m$, so that the codomain of $\pi_{f(b_{\ell})}$ is $O_{u(a_k)}$. Now $u(a_k) = u(f(b_{\ell})) = v(b_{\ell})$ since $f$ is a morphism over $I$, and hence $O_{u(a_k)} = O_{v(b_{\ell})}$, as required.
That the assignment $f \mapsto F(f)$ is functorial follows from elementary computations using product projections.
The natural transformation $\varphi : \nmty{U}_I \to F^*\nmty{U}$ is defined by
$$\varphi_{(A,u)} : I \to \nmty{U}(O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})}), \quad i \mapsto O_i$$
and the natural transformation $\nmmk{\varphi} : \nmtm{U}_I \to F^*\nmtm{U}$ is defined by
$$\nmmk{\varphi}_{(A,u)} : A \to \nmtm{U}(O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})}), \quad a_k \mapsto \nmq{O_{u(a_k)}}$$
Note that, in particular, we have $F(i) = \varphi_{(0,!_I)}( i ) = O_i$, as required.
To see that $\varphi$ and $\nmmk{\varphi}$ are natural, let $f : (A, u) \to (B, v)$ in $\mathbb{C}_I$, so that $f$ is a function $B \to A$ over $I$.
\begin{itemize}
\item The naturality square for $\varphi$ is as follows:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
I
\arrow[r, "\varphi_{(A,u)}"]
&
\nmty{U}(O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})})
\
\\
I
\arrow[r, "\varphi_{(B,v)}"']
\arrow[u, "\mathrm{id}_I"]
&
\nmty{U}(O_{v(b_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_{v(b_{n-1})})
\arrow[u, "{\nmty{U}(\langle \pi_{f(0)}, \dots, \pi_{f(n-1)} \rangle)}"']
\end{tikzcd}
\end{center}
Both composites $\varphi_{(A,u)} \circ \mathrm{id}_I$ and $\nmty{U}(\langle \pi_{f(0)}, \dots, \pi_{f(n-1)} \rangle) \circ \varphi_{(B,v)}$ send $i \in I$ to $O_i \in \nmty{U}(O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})})$, and so $\varphi$ is indeed natural.
\item The naturality square for $\nmmk{\varphi}$ is as follows:
\begin{center}
\begin{tikzcd}[row sep=huge, column sep=huge]
A
\arrow[r, "\nmmk{\varphi}_{(A,u)}"]
&
\nmtm{U}(O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})})
\\
B
\arrow[r, "\nmmk{\varphi}_{(B,v)}"']
\arrow[u, "f"]
&
\nmtm{U}(O_{v(b_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{v(b_{n-1})})
\arrow[u, "{\nmtm{U}(\langle \pi_{f(0)}, \dots, \pi_{f(n-1)} \rangle}"']
\end{tikzcd}
\end{center}
To see that this commutes, let $b \in B$. Then $b=b_{\ell}$ for some $\ell<n$. Let $k<m$ be such that $f(b_{\ell}) = a_k$. It is then evident that both composites send $b$ to $\nmq{O_{u(a_k)}}$, so that $\nmmk{\varphi}$ is natural.
\end{itemize}
It is immediate from its definition that $F_0$ preserves chosen terminal objects.
To see that $F^*(p) \circ \nmmk{\varphi} = \varphi \circ p_I$, note that for all $(A, u) \in \mathbb{C}_I$ we have
\begin{align*}
F^*(p)_{(A,u)} \circ \nmmk{\varphi}_{(A,u)} ( a_k )
&= p_{F(A,u)} ( \nmq{O_{u(a_k)}} ) && \text{definition of $\nmmk{\varphi}$ and $F^*$} \\
&= O_{u(a_k)} && \text{definition of $p$ and $\nmq{O_{u(a_k)}}$} \\
&= \varphi_{(A,u)}( u(a_k) ) && \text{definition of $\varphi$} \\
&= \varphi_{(A,u)} \circ (p_I)_{(A,u)} ( a_k ) && \text{definition of $p_I$} \\
\end{align*}
To see that $F$ preserves the representability data, fix $(A,u) \in \mathbb{C}_I$ and $j \in I$. Then:
\begin{itemize}
\item $F((A,u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j) = O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_j = F(A,u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F(j)$;
\item $\nmp{F(j)} = \nmp{O_j} : O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_j \to O_{u(a_0)} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O_{u(a_{m-1})}$ is given by projection onto the first $m$ components, which is precisely $F(\nmp{j})$;
\item $F(\nmq{j}) = \nmmk{\varphi}_{(A,u) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} j}(\star) = \nmq{O_j} = \nmq{F_{\mathrm{ty}}(j)}$.
\end{itemize}
Hence $F$ is a morphism of natural models.
It remains to prove that $F$ is unique. Suppose that $G = (G, \gamma, \nmmk{\gamma}) : (\mathbb{C}_I, p_I) \to (\mathbb{C}, p)$ is another morphism of natural models such that $G(i)=O_i$ for all $i \in I$. It follows by induction on $|A|$ that $G(A,u)=F(A,u)$ for all $(A,u) \in \mathbb{C}_I$. That $G=F$ then follows from the fact that $G$ preserves context extension and all morphisms in $\mathbb{C}_I$ are given by projections.
\end{proof}
\subsection*{A word of warning}
In the next four sections, we describe left adjoints to forgetful functors of the form $\mathbf{NM}_{\mathbb{T}} \to \mathbf{NM}$ when $\mathbb{T}$ is, respectively, the theory of a term of a basic type (\Cref{secExtTerm}), the theory of an (externally) indexed family of basic types (\Cref{secExtType}), the theory of a unit type (\Cref{secExtUnit}), and the theory of dependent sum types (\Cref{secExtSigma}). Before we do so, it is worth pointing out what we do \textit{not} do.
\begin{itemize}
\item We do not prove the initiality of the \textit{term model} of a dependent type theory $\mathbb{T}$ in the category $\mathbf{NM}_{\mathbb{T}}$, which is the natural model built out of the syntax of the theory $\mathbb{T}$. We could do so either by proving that a given term model is isomorphic to the constructed \textit{free} model, or by proving that the term model satisfies the universal property of the free model. For more on this, see the discussion around \Cref{schTermModel}.
\item We do not compose our free constructions. For instance, suppose we are given an arbitrary natural model $(\mathbb{C}, p)$. We could use the work in \Cref{secExtType} to freely adjoin a basic type, and the work in \Cref{secExtSigma} to freely adjoin dependent sum types to the resulting model; or we could first freely adjoin dependent sum types, and then freely adjoin a basic type. The two resulting natural models would, in general, not be isomorphic, since we have implicitly composed with the forgetful functor $\mathbf{NM}_{\mathsf{ty}} \to \mathbf{NM}$ in the first case, and with the forgetful functor $\mathbf{NM}_{\Sigma} \to \mathbf{NM}$ in the second case. In order to resolve this issue, we would need to describe the left adjoint to at least one (preferably both) of the forgetful functors
$$\mathbf{NM}_{\mathsf{ty},\Sigma} \to \mathbf{NM}_{\mathsf{ty}} \quad \text{and} \quad \mathbf{NM}_{\mathsf{ty},\Sigma} \to \mathbf{NM}_{\Sigma}$$
With such adjoint functors described, we would expect the free constructions to commute in the desired way---that is, the composites of free functors
$$\mathbf{NM} \to \mathbf{NM}_{\mathsf{ty}} \to \mathbf{NM}_{\mathsf{ty},\Sigma} \quad \text{and} \quad \mathbf{NM} \to \mathbf{NM}_{\Sigma} \to \mathbf{NM}_{\mathsf{ty},\Sigma}$$
will be naturally isomorphic.
\end{itemize}
We leave the task of overcoming these limitations to future work.
\section{Extending a natural model by dependent sum types}
\label{secExtSigma}
The idea behind freely adjoining dependent sum type structure to a natural model $(\mathbb{C}, p)$ is similar to that of freely adjoining unit type structure. First we modify the representable natural transformation $p$ to obtain a new representable natural transformation which additionally admits dependent sum types, and then we replace the base category $\mathbb{C}$ by an equivalent one that allows formal extensions of objects by dependent sum types.
Given a type $A$ and a dependent type $B$ over $A$, their dependent sum type $\nsum_{x : A} B(x)$ has as terms pairs $\langle a, b \rangle$, where $a : A$ and $b : B(a)$. Given a further dependent type $C$ over $B$, we obtain a type $\nsum_{x : A} \nsum_{y : B(x)} C(x,y)$, whose terms take the form $\langle a, \langle b, c \rangle \rangle$, and a type $\nsum_{\langle x, y \rangle : \nsum_{x:A} B(x)} C(x,y)$, whose terms take the form $\langle \langle a, b \rangle, c \rangle$. More generally, given $n$ types $A_1, A_2, \dots, A_n$, with $A_{i+1}$ depending on $A_i$ for all $i<n$, there is one iterated dependent sum type for each way of parenthesising a list with $n$ elements. As discussed in \Cref{parTrees}, these correspond with particular kinds of \textit{trees}. In order to freely admit dependent sum types, then, we take these trees of types to be our new types, whose terms are trees of terms (\Cref{defTypeTermTree}, \Cref{cnsPresheafOfTypeTermTrees}).
\begin{numbered}
\label{parTrees}
\index{tree}
Given a set $S$, the polynomial functor $\mathbf{Set} \to \mathbf{Set}$ defined on objects by $X \mapsto S + X^2$ has an initial algebra, which we can denote by $\mathrm{Tree}(S)$. The elements of $\mathrm{Tree}(S)$ are \textit{leaf-labelled finite rooted binary trees} with labels from $S$. We can generate the set $\mathrm{Tree}(S)$ inductively by declaring that $a \in \mathrm{Tree}(S)$ for each $a \in S$ and $[T_1,T_2] \in \mathrm{Tree}(S)$ for each $T_1,T_2 \in \mathrm{Tree}(S)$, so that specifying an element $T \in \mathrm{Tree}(S)$ is equivalent to specifying an inhabited list $a_1,a_2,\dots,a_n$ of elements of $S$ together with a parenthesisation of the list. To illustrate, the following leaf-labelled finite rooted binary tree is represented by the parenthesised list $[[[a,b],c],[d,e]]$.
\begin{sdiagram}
&&&&
\bullet
\arrow[dll, dash]
\arrow[drr, dash]
\\
&&
\bullet
\arrow[dl, dash]
\arrow[dr, dash]
&&&&
\bullet
\arrow[dl, dash]
\arrow[dr, dash]
\\
&
\bullet
\arrow[dl, dash]
\arrow[dr, dash]
&&
c
&&
d
&&
e
\\
a
&&
b
\end{sdiagram}
We say two leaf-labelled finite rooted binary trees \textit{have the same shape} if their underlying (unlabelled) trees are isomorphic---in practice, this means that the parenthesised lists have the same parenthesisation but may have different labels.
Write $L(T) = (a_1, a_2, \dots, a_n)$ for the ordered list of the leaves of a tree $T$---more precisely, $L$ is defined inductively by $L(a) = (a)$ and $L([T_1, T_2]) = L(T_1) \mathbin{^\frown} L(T_2)$, where $\mathbin{^\frown}$ is concatenation of sequences. For instance, $L([[[a,b],c],[d,e]])=(a,b,c,d,e)$.
\end{numbered}
\begin{definition}[Type trees and term trees]
\label{defTypeTermTree}
\index{tree!type {---}}
\index{tree!term {---}}
Let $(\mathbb{C}, p)$ be a natural model and let $\Gamma \in \mathrm{ob}(\mathcal{C})$.
\begin{enumerate}[(i)]
\item The set $\nmtytree{U}(\Gamma)$ of (\textbf{dependent}) \textbf{type trees} over $\Gamma$, and the set $\{ \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T \mid T \in \nmtytree{U}(\Gamma) \}$ of extensions of $\Gamma$ by type trees, are defined simultaneously inductively by the following rules.
\begin{itemize}
\item $A \in \nmtytree{U}(\Gamma)$ for each $A \in \nmty{U}(\Gamma)$, and $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ coincides with the regular notion;
\item If $T_1 \in \nmtytree{U}(\Gamma)$, $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1$ is defined, $T_2 = \nmtytree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)$ and $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2$ is defined, then $[T_1, T_2] \in \nmtytree{U}(\Gamma)$ and $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} [T_1, T_2] = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2$.
\end{itemize}
\item The set $\nmtmtree{U}(\Gamma)$ of (\textbf{dependent}) \textbf{term trees} over $\Gamma$ and the function $(p_{\mathsf{tree}})_{\Gamma} : \nmtmtree{U}(\Gamma) \to \nmtytree{U}(\Gamma)$ are defined simultaneously inductively by the following rules.
\begin{itemize}
\item $a \in \nmtmtree{U}(\Gamma)$ for each $a \in \nmtm{U}(\Gamma)$ and $(p_{\mathsf{tree}})_{\Gamma}(a) = p_{\Gamma}(a)$;
\item If $t_1 \in \nmtmtree{U}(\Gamma)$, $T_1 = (p_{\mathsf{tree}})_{\Gamma}(t_1)$ is defined, $t_2 \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)$ and $(p_{\mathsf{tree}})_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1}(t_2)$ is defined, then $[t_1,t_2] \in \nmtmtree{U}(\Gamma)$ and $(p_{\mathsf{tree}})_{\Gamma}([t_1,t_2]) = [T_1,T_2]$.
\end{itemize}
Write $\nmtmtree{U}(\Gamma; T)$ for the set of term trees $t$ over $\Gamma$ with $(p_{\mathsf{tree}})_{\Gamma}(t)=T$.
\end{enumerate}
\end{definition}
The following lemma is useful for working with the definitions of type trees and term trees given in \Cref{defTypeTermTree}.
\begin{lemma}
\label{lemLeavesOfTrees}
Let $(\mathbb{C}, p)$ be a natural model and let $\Gamma \in \mathrm{ob}(\mathbb{C})$.
\begin{enumerate}[(i)]
\item Given a type tree $T$ over $\Gamma$ with $L(T) = (A_1,A_2,\dots,A_n)$, we have $A_{i+1} \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_i)$ for each $i < n$; and
\item Given a term tree $t$ over $\Gamma$ with $(p_{\mathsf{tree}})_{\Gamma}(t)=T$ and $L(t) = (a_1, a_2, \dots, a_n)$, the trees $t$ and $T$ have the same shape and $a_{i+1} \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_i; A_{i+1})$ for each $i<n$.
\end{enumerate}
\end{lemma}
\begin{proof}
Both proofs are straightforward inductions using the inductive definitions of type trees and term trees.
\end{proof}
In light of \Cref{lemLeavesOfTrees}, given a morphism $\sigma : \Delta \to \Gamma$ in a natural model $(\mathbb{C}, p)$ and a type tree $T$ over $\Gamma$ with $L(T) = (A_1,A_2,\dots,A_n)$, we will write $\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T$ for the iterated extension $\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ of $\sigma$ by the leaves of $T$.
\begin{construction}[Presheaves of type trees and term trees]
\label{cnsPresheafOfTypeTermTrees}
\index{tree!presheaf of type/term {---}s}
\index{presheaf!presheaf of type/term trees@{---} of type/term trees}
Let $(\mathbb{C}, p)$ be a natural model.
\begin{enumerate}[(i)]
\item The \textbf{presheaf of type trees} in $(\mathbb{C}, p)$ is the presheaf $\nmtytree{U} : \mathbb{C}^{\mathrm{op}} \to \mathbf{Set}$ defined on objects as in \Cref{defTypeTermTree}(i) and defined on morphisms $\sigma : \Delta \to \Gamma$ inductively as follows: if $T = A \in \nmty{U}(\Gamma)$, then define $T[\sigma] = A[\sigma]$; and if $T = [T_1, T_2]$, then define $T[\sigma] = [T_1[\sigma], T_2[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1]]$.
\item The \textbf{presheaf of term trees} in $(\mathbb{C}, p)$ is the presheaf $\nmtmtree{U} : \mathbb{C}\op \to \mathbf{Set}$ defined on objects as in \Cref{defTypeTermTree}(ii) and defined on morphisms $\sigma : \Delta \to \Gamma$ inductively as follows: if $t = a \in \nmtmtree{U}(\Gamma)$, then define $t[\sigma] = a[\sigma]$; and if $t = [t_1, t_2]$, then define $t[\sigma] = [t_1[\sigma], t_2[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1]]$, where $T_1 = (p_{\mathsf{tree}})_{\Gamma}(t_1)$.
\item The natural transformation $p_{\mathsf{tree}} : \nmtmtree{U}(\Gamma) \to \nmtytree{U}(\Gamma)$ is defined componentwise as in \Cref{defTypeTermTree}(ii).
\end{enumerate}
\end{construction}
\begin{verification}
Most of what needs to be verified is immediate by induction on the trees. To see that $\nmtytree{U}$ is functorial, note that by iterating \Cref{lemPastingCanonicalPullbacks} we have
$$T[\sigma][\tau] = [T_1[\sigma][\tau], (T_2[\sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1])[\tau \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\sigma]]] = [T_1[\sigma \circ \tau], T_2[(\sigma \circ \tau) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1]]$$
and likewise for funtoriality of $\nmtm{U}$.
\end{verification}
\begin{theorem}[Representability of $p_{\mathsf{tree}}$]
\label{thmTreeMapIsRepresentable}
Let $(\mathbb{C}, p)$ be a natural model. For each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $T \in \nmtytree{U}(\Gamma)$, the following square is a pullback,
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)
\arrow[d, "\nmp{T}"']
\arrow[r, "\nmq{T}"]
&
\nmtmtree{U}
\arrow[d, "p_{\mathsf{tree}}"]
\\
\Yon(\Gamma)
\arrow[r, "T"']
&
\nmtytree{U}
\end{diagram}
where $\nmp{T}$ and $\nmq{T}$ are defined inductively by the following two rules.
\begin{itemize}
\item If $T=A \in \nmty{U}(\Gamma)$, then $\nmp{T} = \nmp{A}$ and $\nmq{T} = \nmq{A}$;
\item If $T = [T_1,T_2]$ and $\nmp{T_1}, \nmq{T_1}, \nmp{T_2}, \nmq{T_2}$ are defined, then let $\nmp{T} = \nmp{T_1} \circ \nmp{T_2}$ and $\nmq{T} = [\nmq{T_1}[\nmp{T_2}], \nmq{T_2}[\nmp{T_1[\nmp{T}]}]]$.
\end{itemize}
In particular, $p_{\mathsf{tree}}$ is representable.
\end{theorem}
\begin{proof}
We prove that the square commutes and is a pullback by induction on $T$. When $T=A \in \nmty{U}$, this is immediate, so suppose $T = [T_1,T_2]$ and that we have the following two pullback squares.
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)
\arrow[r, "\nmq{T_1}"]
\arrow[d, "\nmp{T_1}"']
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtmtree{U}
\arrow[d, "p_{\mathsf{tree}}"]
&[-25pt]
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2)
\arrow[d, "\nmp{T_2}"']
\arrow[r, "\nmq{T_2}"]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtytree{U}
\arrow[d, "p_{\mathsf{tree}}"]
\\
\Yon(\Gamma)
\arrow[r, "T_1"']
&
\nmtytree{U}
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)
\arrow[r, "T_2"']
&
\nmtytree{U}
\end{diagram}
First we must prove that the square in the statement of the theorem commutes, which amounts to showing that $\nmq{T} \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T, T[\nmp{T}])$. Now $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2$ and
\begin{align*}
T[\nmp{T}] &= [T_1,T_2][\nmp{T_1}][\nmp{T_2}] && \\
&= [T_1[\nmp{T_1}],\ T_2[\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1]][\nmp{T_2}] && \\
&= [\underbrace{T_1[\nmp{T_1}][\nmp{T_2}}_{= T_1[\nmp{T}]}],\ \underbrace{T_2[\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1][\nmp{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}]]}_{= T_2[\nmp{T} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T}]]}]
\end{align*}
and so what we must prove is that
$$\nmq{T_1}[\nmp{T_2}] \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2; T_1[\nmp{T_1}][\nmp{T_2}])$$
and that
$$\nmq{T_2}[\nmp{T_1[\nmp{T_1}]}] \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T}]; T_2[\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1][\nmp{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}]])$$
The fact that $\nmq{T_1}[\nmp{T_2}] \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2; T_1[\nmp{T_1}][\nmp{T_2}])$ is immediate from naturality of $p_{\mathsf{tree}}$; note also that the following diagram commutes by definition of $\nmp{T}$.
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2)
\arrow[r, "\Yon(\nmp{T_2})"]
\arrow[dr, dashed, "\Yon(\nmp{T})"']
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)
\arrow[r, "\nmq{T_1}"]
\arrow[d, "\Yon(\nmp{T_1})" description]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
&
\nmtmtree{U}
\arrow[d, "p_{\mathsf{tree}}"]
\\
&
\Yon(\Gamma)
\arrow[r, "T_1"']
&
\nmtytree{U}
\end{diagram}
To see that $\nmq{T_2}[\nmp{T_1[\nmp{T_1}]}] \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T}]; T_2[\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1][\nmp{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}]])$, consider the following diagram.
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}][\nmp{T_2}])
\arrow[r, "\Yon(\nmp{T_1[\nmp{T}]})"]
\arrow[d, "{\Yon(\nmp{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}])}"']
\arrow[dr, dashed, "{\Yon(\nmp{T} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T}])}" description]
&[50pt]
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2)
\arrow[r, "\nmq{T_2}"]
\arrow[d, "\Yon(\nmp{T_2})" description]
&[30pt]
\nmtmtree{U}
\arrow[d, "p_{\mathsf{tree}}"]
\\
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}])
\arrow[r, "\Yon(\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1) = \Yon(\nmp{T_1[\nmp{T_1}]})" description]
\arrow[d, "\Yon(\nmp{T_1[\nmp{T_1}]})"']
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)
\arrow[d, "\Yon(\nmp{T_1})"]
\arrow[r, "T_2"']
&
\nmtytree{U}
\\
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1)
\arrow[r, "\Yon(\nmp{T_1})"']
&
\Yon(\Gamma)
&
\end{diagram}
The top right square commutes by the induction hypothesis, and the top left and bottom left squares commute since they are the results of applying the Yoneda embedding to canonical pullback squares (\Cref{cnsCanonicalPullbacks}). The composite of the top two morphisms represents $\nmq{T_2}[\nmp{T_1[\nmp{T}]}]$, and the fact that this is an element of $\nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}][\nmp{T_2}]; T_2[\nmp{T_1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1][\nmp{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1[\nmp{T_1}]])$ is exactly the assertion that the pasting of the top two squares commutes.
Hence $\nmq{T} \in \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T; T[\nmp{T}])$ as required.
To see that the square in the statement of the theorem is a pullback, let $\sigma : \Delta \to \Gamma$ in $\mathbb{C}$ and let $t \in \nmtmtree{U}(\Delta; T[\sigma])$, as indicated in the outer square of the following diagram.
\begin{diagram}
\Yon(\Delta)
\arrow[drr, bend left=20, "t"]
\arrow[ddr, bend right=20, "\sigma"']
\arrow[dr, dashed, blue, "{\langle \sigma, t \rangle_T}" description]
&[-10pt]&
\\[-15pt]
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)
\arrow[d, "\nmp{T}" description]
\arrow[r, "\nmq{T}" description]
&
\nmtmtree{U}
\arrow[d, "p_{\mathsf{tree}}"]
\\
&
\Yon(\Gamma)
\arrow[r, "T"']
&
\nmtytree{U}
\end{diagram}
Define $\langle \sigma, t \rangle_T = \langle \langle \sigma, t_1 \rangle_{T_1}, t_2 \rangle_{T_2}$. Then
$$\nmp{T} \circ \langle \sigma, t \rangle_T = \nmp{T_1} \circ \nmp{T_2} \circ \langle \langle \sigma, t_1 \rangle_{T_1}, t_2 \rangle_{T_2} = \nmp{T_1} \circ \langle \sigma, t_1 \rangle_{T_1} = \sigma$$
and
\begin{align*}
&\nmq{T}[\langle \sigma, t \rangle_T] && \\
&= [\nmq{T_1}[\nmp{T_2}], \nmq{T_2}[\nmp{T_1[\nmp{T}]}]][\langle \langle \sigma, t_1 \rangle_{T_1}, t_2 \rangle_{T_2}] && \text{unpacking definitions} \\
&= [\nmq{T_1}[\nmp{T_2} \circ \langle \langle \sigma, t_1 \rangle_{T_1}, t_2 \rangle_{T_2}], \nmq{T_2}[\nmp{T_1[\nmp{T}]} \circ \langle \langle \sigma, t_1 \rangle_{T_1}, t_2 \rangle_{T_2} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1] && \text{by \Cref{cnsPresheafOfTypeTermTrees}(ii)} \\
&= [\nmq{T_1}[\langle \sigma, t_1 \rangle_{T_1}, \nmq{T_2}[\langle \sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1, t_2 \rangle_{T_2}]] && \text{reducing} \\
&= [t_1,t_2] && \text{induction hypothesis} \\
&= t && \text{definition of $t$}
\end{align*}
Uniqueness of $\langle \sigma, t \rangle_T$ then follows from its having been defined by a universal property.
\end{proof}
\begin{construction}[Category of contexts of trees]
\label{cnsCategoryOfContextsOfTrees}
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{category of contexts of trees} of $(\mathbb{C}, p)$ is the category $\mathbb{C}_{\mathsf{tree}}$ defined by
\begin{itemize}
\item \textbf{Objects} are lists $(\Gamma, T_1, \dots, T_k)$, where $k \ge 0$, $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $T_{i+1} \in \nmtytree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_i)$ for all $i<n$, where we identify $(\Gamma, A, T_1, \dots, T_k)$ with $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, T_1, \dots, T_k)$ for all $\Gamma \in \mathrm{ob}(\mathbb{C})$, $A \in \nmty{U}(\Gamma)$ and type trees $T_1,\dots,T_k$;
\item \textbf{Morphisms.} A morphism $(\Delta, U_1, \dots, U_{\ell}) \to (\Gamma, T_1, \dots, T_k)$ in $\mathbb{C}_{\mathsf{tree}}$ is a morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} U_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} U_{\ell} \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$, with identity and composition inherited from $\mathbb{C}$.
\end{itemize}
\end{construction}
\begin{verification}
Note that the hom sets of $\mathbb{C}_{\mathsf{tree}}$ are well-defined under the identification
$$(\Gamma, A, T_1, \dots, T_k) \sim (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, T_1, \dots, T_k)$$
and that the associativity and unit laws hold because composition and identity are inherited from $\mathbb{C}$.
\end{verification}
\begin{lemma}
\label{lemEquivalenceWithCategoryOfTrees}
Let $(\mathbb{C}, p)$ be a natural model. The assignment $\Gamma \mapsto (\Gamma)$ extends to a full embedding $I : \mathbb{C} \hookrightarrow \mathbb{C}_{\mathsf{tree}}$, and the assignment $(\Gamma, T_1, \dots, T_k) \mapsto \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$ extends to a full and faithful functor $E : \mathbb{C}_{\mathsf{tree}} \to \mathbb{C}$. Moreover, the pair $(I,E)$ is an equivalence of categories.
\end{lemma}
\begin{proof}
Functoriality of $I$ and $E$ is immediate from the definitions. Furthermore, we have $E \circ I = \mathrm{id}_{\mathbb{C}}$. The natural isomorphism $\varepsilon : I \circ E \to \mathrm{id}_{\mathbb{C}_{\mathsf{tree}}}$ is defined componentwise by letting
$$\varepsilon_{(\Gamma, T_1, \dots, T_k)} : (\Gamma, T_1, \dots, T_k) \to (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k)$$
in $\mathbb{C}_{\mathsf{tree}}$ be the identity morphism $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$ in $\mathbb{C}$. Naturality and invertibility of $\varepsilon$ are then trivial since all its components are identity morphisms.
\end{proof}
\begin{construction}[Free admission of dependent sum types]
\label{cnsFreeNMAdmittingSigmaTypes}
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{free natural model admitting dependent sum types} on $(\mathbb{C}, p)$ is defined by the following data. The underlying category is $\mathbb{C}_{\Sigma} = \mathbb{C}_{\mathsf{tree}}$ (\Cref{cnsCategoryOfContextsOfTrees}) with distinguished terminal object $(\diamond)$. The presheaves $\nmtysigma{U}, \nmtmsigma{U} : \mathbb{C}_{\Sigma}\op \to \mathbf{Set}$ and the natural transformation $p_{\Sigma} : \nmtmsigma{U} \to \nmtysigma{U}$ are obtained from $p_{\mathsf{tree}} : \nmtmtree{U} \to \nmtytree{U}$ by precomposing with the functor $E : \mathbb{C}_{\Sigma} \to \mathbb{C}$ (\Cref{lemEquivalenceWithCategoryOfTrees}).
The representability data is defined for $\vec \Gamma = (\Gamma, T_1, \dots, T_k) \in \mathbb{C}_{\Sigma}$ and $T \in \nmtysigma{U}(\vec \Gamma)$ as follows.
\begin{itemize}
\item Let $(\Gamma, T_1, \dots, T_k) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T = (\Gamma, T_1, \dots, T_k, T)$;
\item Let $\nmp{T} : (\vec \Gamma; T) \to \vec \Gamma$ be the morphism $\nmp{T} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$ in $\mathbb{C}$ defined in the proof of \Cref{thmTreeMapIsRepresentable}.
\item Let $\nmq{T} \in \nmtmsigma{U}(\vec \Gamma, T) = \nmtmtree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)$ be the element $\nmq{T}$ defined in the proof of \Cref{thmTreeMapIsRepresentable}.
\end{itemize}
The dependent sum type structure is defined as follows.
\begin{itemize}
\item The natural transformation $\widehat{\Sigma} : \sum_{T \in \nmtysigma{U}} \nmtysigma{U}^{(\nmtmsigma{U})_{T}} \to \nmtysigma{U}$ is defined by letting $\widehat{\Sigma}_{\vec \Gamma}$ be the function
$$\sum_{T \in \nmtytree{U}(\vec \Gamma)} \nmtytree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T) \xrightarrow{(T,T') \mapsto [T,T']} \nmtysigma{U}(\vec \Gamma)$$
where we have implicitly composed with the natural isomorphism given by \Cref{lemLemmaFive};
\item The natural transformation $\widehat{\mathsf{pair}} : \sum_{T,T'} \sum_{t \in (\nmtmsigma{U})_T} (\nmtmsigma{U})_{T'(t)} \to \nmtm{U}_{\Sigma}$ is defined by letting $\widehat{\mathsf{pair}}_{\vec \Gamma}$ be the function
$$\sum_{T \in \nmtytree{U}(\vec \Gamma)} \sum_{T' \in \nmtytree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)} \sum_{t \in \nmtmtree{U}(\vec \Gamma; T)} \nmtmtree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T; T') \xrightarrow{(T,T',t,t') \mapsto [t,t']} \nmtmsigma{U}(\vec \Gamma)$$
where we have implicitly composed with the natural isomorphism given by \Cref{lemLemmaElevenPointFive}.
\end{itemize}
\end{construction}
\begin{verification}
That $(\diamond)$ is terminal in $\mathbb{C}_{\Sigma}$ is immediate from the fact that $\diamond$ is terminal in $\mathbb{C}$. We have
$$\nmtysigma{U} = E^*\nmty{U}_{\mathsf{tree}}, \quad \nmtmsigma{U} = E^*\nmtmtree{U} \quad \text{and} \quad p_{\Sigma} = E^*(p_{\mathsf{tree}})$$
so that $\nmtysigma{U}$ and $\nmtmsigma{U}$ are presheaves and $p_{\Sigma}$ is a natural transformation. Representability of $p_{\Sigma}$ with representability data as defined follows immediately from \Cref{thmTreeMapIsRepresentable} and the fact that $E$ is an equivalence $\mathbb{C} \simeq \mathbb{C}_{\Sigma}$ which sends the representability data for $p_{\mathsf{tree}}$ to that of $p_{\Sigma}$ (\Cref{lemEquivalenceWithCategoryOfTrees}).
The functions $\widehat{\Sigma}_{\vec \Gamma}$ and $\widehat{\mathsf{pair}}_{\vec \Gamma}$ respect substitution since $\nmtytree{U}$ and $\nmtmtree{U}$ are natural, so that $\widehat{\Sigma}$ and $\widehat{\mathsf{pair}}$ are natural transformations. Given an object $\vec \Gamma$ of $\mathbb{C}_{\Sigma}$, consider the following square
\begin{diagram}
\sum_{T \in \nmtytree{U}(\vec \Gamma)} \sum_{T' \in \nmtytree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)} \sum_{t \in \nmtmtree{U}(\vec \Gamma; T)} \nmtmtree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T; T')
\arrow[r, "\widehat{\mathsf{pair}}_{\vec \Gamma}"]
\arrow[d, "\pi"']
&
\nmtmsigma{U}(\vec \Gamma)
\arrow[d, "(p_{\Sigma})_{\vec \Gamma}"]
\\
\sum_{T \in \nmtytree{U}(\vec \Gamma)} \nmtytree{U}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T)
\arrow[r, "\widehat{\Sigma}_{\vec \Gamma}"']
&
\nmtysigma{U}(\vec \Gamma)
\end{diagram}
The square commutes since given $(T,T',t,t')$ we have
$$(p_{\Sigma})_{\vec \Gamma} (\widehat{\mathsf{pair}}_{\vec \Gamma}(T,T',t,t')) = (p_{\mathsf{tree}})_{E(\vec \Gamma)}([t,t']) = [T,T'] = \widehat{\Sigma}_{\vec \Gamma}(T,T') = \widehat{\Sigma}_{\vec \Gamma}(\pi(T,T',t,t'))$$
It is a pullback since the function $\widehat{\mathsf{pair}}_{\vec \Gamma}$ evidently restricts to bijections between the respective fibres of $\pi$ and of $(p_{\Sigma})_{\vec \Gamma}$.
Hence the corresponding square in $\widehat{\mathbb{C}_{\Sigma}}$ is a pullback, so that $(\mathbb{C}_{\Sigma}, p_{\Sigma})$ admits dependent sum types.
\end{verification}
\begin{lemma}[Inclusion morphism]
\label{lemInclusionMorphismSigma}
Let $(\mathbb{C}, p)$ be a natural model. The embedding $I : \mathbb{C} \hookrightarrow \mathbb{C}_{\Sigma}$ extends to a morphism of natural models $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}_{\Sigma}, p_{\Sigma})$.
\end{lemma}
\begin{proof}
Note first that since $E \circ I = \mathrm{id}_{\mathbb{C}}$ we have $I^*p_{\Sigma} = I^*E^*p_{\mathsf{tree}} = p_{\mathsf{tree}}$. Let $\iota : \nmty{U} \hookrightarrow I^*\nmtysigma{U} = \nmtytree{U}$ and $\nmmk{\iota} : \nmtm{U} \hookrightarrow I^*\nmtmsigma{U} = \nmtmtree{U}$ be the respective inclusions, noting that for each $\Gamma$ we have $\nmty{U}(\Gamma) \subseteq \nmtytree{U}(\Gamma)$ and $\nmtm{U}(\Gamma) \subseteq \nmtmtree{U}(\Gamma)$. That these are natural and satisfy $I^*(p_{\Sigma}) \circ \nmmk{\iota} = \iota \circ p$ is immediate. We must prove that $I$ preserves distinguished terminal objects---which it does by definition---and that $(I, \iota, \nmmk{\iota})$ preserves the representability data. So let $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$.
\begin{itemize}
\item We have $I(\Gamma) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} I(A) = (\Gamma, A) = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = I(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$, using the identification of lists described in \Cref{cnsFreeNMAdmittingSigmaTypes};
\item The projection $\nmp{IA} : (\Gamma, A) \to (\Gamma)$ in $\mathbb{C}_{\Sigma}$ is precisely the morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma$ in $\mathbb{C}$, so that $I\nmp{A} = \nmp{IA}$;
\item The element $\nmq{IA} \in \nmtmsigma{U}(\Gamma, A)$ is exactly the element $\nmq{A} \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$, so that $I\nmq{A} = \nmq{IA}$.
\end{itemize}
Hence $(I, \iota, \nmmk{\iota})$ is a morphism of natural models.
\end{proof}
\begin{lemma}[Extension of a morphism of natural models]
\label{lemAdjSumIsFunctorial}
For each morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, there is a morphism of natural models $F_{\Sigma} : (\mathbb{C}_{\Sigma}, p_{\Sigma}) \to (\mathbb{D}_{\Sigma}, q_{\Sigma})$ which preserves dependent sum types and for which $F_{\Sigma} \circ I = I \circ F$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\arrow[d, hook, "I"]
\\
(\mathbb{C}_{\Sigma}, p_{\Sigma})
\arrow[r, dashed, "F_{\Sigma}"']
&
(\mathbb{D}_{\Sigma}, q_{\Sigma})
\end{diagram}
\end{lemma}
\begin{proof}
Let $(F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{D}, q)$ be a morphism of natural models, and define $(F_{\Sigma}, \varphi_{\Sigma}, \nmmk{\varphi}_{\Sigma})$ as follows.
\begin{itemize}
\item The functor $F_{\Sigma} : \mathbb{C}_{\Sigma} \to \mathbb{D}_{\Sigma}$ is defined on objects by $F_{\Sigma}(\Gamma, T_1, \dots, T_k) = (F\Gamma, FT_1, \dots, FT_k)$ and on morphisms by $F_{\Sigma}(\sigma) = F(\sigma)$. Note that $F_{\Sigma}$ respects the identification of lists since $F$ preserves context extension, so this specification is well-defined.
\item The natural transformation $\varphi_{\Sigma} : \nmtysigma{U} \to F_{\Sigma}^*\nmtysigma{V}$ is given by defining
$$(\varphi_{\Sigma})_{(\Gamma, T_1, \dots, T_k)} : \nmtytree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_n) \to \nmtytree{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FT_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FT_k)$$
inductively by
$$(\varphi_{\Sigma})_{\vec \Gamma}(A) = \varphi_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k}(A) \quad \text{and} \quad (\varphi_{\Sigma})_{\vec \Gamma}([T,T']) = [(\varphi_{\Sigma})_{\vec \Gamma}(T), (\varphi_{\Sigma})_{\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T}(T')]$$
\item The natural transformation $\nmmk{\varphi}_{\Sigma} : \nmtmsigma{U} \to F_{\Sigma}^*\nmtmsigma{V}$ is defined likewise.
\end{itemize}
Naturality of $\varphi_{\Sigma}$ and $\nmmk{\varphi}_{\Sigma}$ then follows from naturality of $\varphi$ and $\nmmk{\varphi}$, as does the fact that $F_{\Sigma}^*q \circ \nmmk{\varphi} = \varphi \circ p$. This construction further ensures that $F_{\Sigma}$ preserves dependent sum types.
Note that $F_{\Sigma}$ preserves context extension, since
\begin{align*}
& F_{\Sigma}((\Gamma, T_1, \dots, T_k) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T) && \\
&= F_{\Sigma}(\Gamma, T_1, \dots, T_k, T) && \\
&= (F\Gamma, FT_1, \dots, FT_k, FT) && \\
&= (F\Gamma, FT_1, \dots, FT_k) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FT && \\
&= F(\Gamma, T_1, \dots, T_k) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FT
\end{align*}
and similarly we see that $F_{\Sigma} \nmp{T} = \nmp{F_{\Sigma} T}$ and $F_{\Sigma} \nmq{T} = \nmq{F_{\Sigma} T}$.
\end{proof}
\begin{numbered}
\label{parTreeSummationIsomorphism}
By \Cref{cnsPolynomialCompositeOfNaturalModels}, in any natural model $(\mathbb{C}, p)$ admitting dependent sum types, there is for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and each $A \in \nmty{U}(\Gamma)$ and $B \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ an isomorphism $\theta : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(A,B) \cong \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B$ over $\Gamma$.
\begin{diagram}
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(A, B)
\arrow[dr, "{\nmp{\widehat{\Sigma}(A,B)}}"']
\arrow[rr, "\theta", "\cong"']
&&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B
\arrow[dl, "\nmp{A} \circ \nmp{B}"]
\\
&
\Gamma
&
\end{diagram}
in $\mathbb{C} \slice{\Gamma}$. Recalling that $\widehat{\Sigma}(T)$ is defined inductively for $T \in \nmtytree{U}(\Gamma)$ by $\widehat{\Sigma}(A)=A$ and $\widehat{\Sigma}([T,T']) = \widehat{\Sigma}(\widehat{\Sigma}(T), \widehat{\Sigma}(T'))$ (\Cref{thmTreeMapIsRepresentable}), we see by induction that there are isomorphisms $\theta : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T) \cong \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T$ over $\Gamma$ for each $T \in \nmtytree{U}(\Gamma)$.
\begin{diagram}
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T)
\arrow[rr, "\theta", "\cong"']
\arrow[dr, "{\nmp{\widehat{\Sigma}(T)}}"']
&&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T
\arrow[dl, "\nmp{T}"]
\\
&
\Gamma
&
\end{diagram}
Suppressing substitutions, for each $(\Gamma, T_1, \dots, T_k) \in \mathrm{ob}(\mathbb{C}_{\Sigma})$, we obtain an isomorphism
$$\theta : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_1) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_k) \xrightarrow{\cong} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$$
over $\Gamma$, defined by taking canonical pullbacks.
\end{numbered}
\begin{construction}[Tree summation morphism]
\label{cnsSumMorphism}
Let $(\mathbb{C}, p)$ be a natural model admitting dependent sum types. The \textbf{tree summation morphism} is the dependent sum type preserving morphism of natural models $S=(S,\sigma,\nmmk{\sigma}) : (\mathbb{C}_{\Sigma}, p_{\Sigma}) \to (\mathbb{C}, p)$ satisfying $S \circ I = \mathrm{id}_{(\mathbb{C}, p)}$, which is defined as follows.
The functor $S : \mathbb{C}_{\Sigma} \to \mathbb{C}$ is defined on objects by
$$S(\Gamma, T_1, \dots, T_k) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_1) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_k)$$
Given a morphism $\tau : (\Delta, U_1, \dots, U_{\ell}) \to (\Gamma, T_1, \dots, T_{\ell})$ in $\mathbb{C}_{\Sigma}$, define
$$S(\tau) = \theta^{-1} \circ \tau \circ \theta : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(U_1) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(U_k) \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_1) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_{\ell})$$
where the symbol $\theta$ refers in each case to the relevant isomorphism as described in \Cref{parTreeSummationIsomorphism}.
The natural transformation $\sigma : \nmtysigma{U} \to S^*\nmty{U}$ is defined by letting the component of $\sigma$ at an object $(\Gamma, T_1, \dots, T_k)$ of $\mathbb{C}_{\Sigma}$ be the function
$$\sigma_{\vec \Gamma} = \widehat{\Sigma} \circ \nmtytree{U}(\theta) : \nmtytree{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k) \to \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_1) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \widehat{\Sigma}(T_k))$$
and likewise $\nmmk{\sigma} : \nmtmsigma{U} \to S^*\nmtm{U}$ is defined by $\nmmk{\sigma}_{\vec \Gamma} = \widehat{\mathsf{pair}} \circ \nmtmtree{U}(\theta)$.
\end{construction}
\begin{verification}
First note that $S$ defines a functor: it respects identity and composition since it is defined on morphisms by conjugating by isomorphisms. Moreover $S(\diamond) = \diamond$, so that $S$ preserves distinguished terminal objects. To see that $\sigma$ is natural, let $\tau : (\Delta, \vec U) \to (\Gamma, \vec T)$ in $\mathbb{C}_{\Sigma}$ and note that
\begin{align*}
S^*\nmty{U}(\tau) \circ \sigma_{\vec \Gamma}
&= \nmty{U}(S\tau) \circ \sigma_{\vec \Gamma} \\
&= \nmty{U}(\theta \circ \tau \circ \theta^{-1}) \circ \nmty{U}(\theta) \circ \widehat{\Sigma} \\
&= \nmty{U}(\theta) \circ \nmty{U}(\tau) \circ \widehat{\Sigma} \\
&= \nmty{U}(\theta) \circ \widehat{\Sigma} \circ \nmtysigma{U}(\tau) && \text{since $\widehat{\Sigma}$ is natural} \\
&= \sigma_{\vec \Delta} \circ \nmtysigma{U}(\tau)
\end{align*}
as required; likewise for $\nmmk{\sigma}$.
That $S^*(p) \circ \nmmk{\sigma} = \sigma \circ p_{\Sigma}$ and that $S$ preserves representability data and dependent sum types follow immediately from their definitions.
\end{verification}
\begin{theorem}[Universal property of the free natural model admitting dependent sum types]
\label{thmAdjSigmaTypes}
Let $(\mathbb{C}, p)$ be a natural model, let $(\mathbb{D}, q)$ be a natural model admitting dependent sum types, and let $F : (\mathbb{C}, p) \to \mathbb{D}, q)$ be a morphism of natural models. There is a unique dependent sum preserving morphism of natural models $F^{\sharp} : (\mathbb{C}_{\Sigma}, p_{\Sigma}) \to (\mathbb{D}, q)$ such that $F^{\sharp} \circ I = F$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\\
(\mathbb{C}_{\Sigma}, p_{\Sigma})
\arrow[ur, dashed, "F^{\sharp}"']
&
\end{diagram}
\end{theorem}
\begin{proof}
Define $F^{\sharp} = S \circ F_{\Sigma}$, as indicated in the following diagram.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\arrow[d, hook, "I"]
\arrow[dr, equals]
&
\\
(\mathbb{C}_{\Sigma}, p_{\Sigma})
\arrow[r, "F_{\Sigma}" description]
\arrow[rr, dashed, bend right=15, "F^{\sharp}"']
&
(\mathbb{D}_{\Sigma}, q_{\Sigma})
\arrow[r, "S" description]
&
(\mathbb{D}, q)
\end{diagram}
Since $S$ and $F_{\Sigma}$ preserve dependent sum types (\Cref{lemAdjSumIsFunctorial} and \Cref{cnsSumMorphism}), so does $F^{\sharp}$. Moreover we have
$$F^{\sharp} \circ I = S \circ F_{\Sigma} \circ I = S \circ I \circ F = F$$
as required.
To see that $F^{\sharp}$ is unique, we prove that its action on contexts, substitutions, types and terms is determined entirely by $(F, \varphi, \nmmk{\varphi})$.
We proceed by induction. First note that, since $F^{\sharp} \circ I = F$, we have $F^{\sharp}(\Gamma) = F\Gamma$ for each $\Gamma \in \mathrm{ob}(\mathbb{C})$, and $F^{\sharp}A = FA$ and $F^{\sharp}a = Fa$ for each $A \in \nmty{U}(\Gamma) \subseteq \nmtysigma{U}((\Gamma))$ and $a \in \nmtm{U}(\Gamma; A) \subseteq \nmtm{U}((\Gamma); A)$. Now suppose $T=[T_1,T_2] \in \nmtysigma{U}((\Gamma))$ and $t = [t_1,t_2] \in \nmtysigma{U}((\Gamma); T)$, and that the values $F^{\sharp}T_1$, $F^{\sharp}T_2$, $F^{\sharp}t_1$ and $F^{\sharp}t_2$ are uniquely determined by $F$. Since $F^{\sharp}$ preserves the dependent sum type structure of $\mathbb{C}_{\Sigma}$, we have
$$F^{\sharp}T = \widehat{\Sigma}(F^{\sharp}T_1, F^{\sharp}T_2) \quad \text{and} \quad F^{\sharp}t = \widehat{\mathsf{pair}}(F^{\sharp}t_1, F^{\sharp}t_2)$$
so that the values $F^{\sharp}T$ and $F^{\sharp}t$ are uniquely determined by $F$.
Now let $\vec \Gamma = (\Gamma, T_1, \dots, T_k) \in \mathrm{ob}(\mathbb{C}_{\Sigma})$ and suppose that the action of $F^{\sharp}$ on type trees and term trees over $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T_k$ is determined by that of $F$. Let $T \in \nmtysigma{U}(\vec \Gamma)$. Since $F^{\sharp}$ preserves context extension, we have $F^{\sharp}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T) = F^{\sharp} \vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}T$, which is uniquely determined by $F$ by our induction hypotheses; and then repeating the argument from the previous paragraph demonstrates that the action of $F^{\sharp}$ on type trees and term trees over $\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} T$ is uniquely determined by that of $F$.
Hence the entire morphism $F^{\sharp}$ is uniquely determined by $F$, as required.
\end{proof}
\begin{corollary}[Freely extending by dependent sum types is functorial]
The assignments $(\mathbb{C}, p) \mapsto (\mathbb{C}_{\Sigma}, p_{\Sigma})$ and $F \mapsto F_{\Sigma}$ determine a functor $(-)_{\Sigma} : \mathbf{NM} \to \mathbf{NM}_{\Sigma}$, which is left adjoint to the forgetful functor $U : \mathbf{NM}_{\Sigma} \to \mathbf{NM}$. Moreover, the component at $(\mathbb{C}, p)$ of the unit of this adjunction is $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}_{\Sigma}, p_{\Sigma})$.
\end{corollary}
\begin{proof}
We can recover $F_{\Sigma}$ as $(I \circ F)^{\sharp}$, where $I : (\mathbb{D}, q) \to (\mathbb{D}_{\Sigma}, q_{\Sigma})$ is the inclusion morphism. As such, functoriality of $(-)_{\Sigma}$ follows from the `uniqueness' part of \Cref{thmAdjSigmaTypes}. That this functor is left adjoint to the forgetful functor $\mathbf{NM}_{\Sigma} \to \mathbf{NM}$ with unit as described is then precisely the content of \Cref{thmAdjSigmaTypes}.
\end{proof}
\begin{numbered}
Since $(\mathbb{C}_{\Sigma}, p_{\Sigma})$ admits dependent sum types, we might hope---in presence of a unit type---that the corresponding polynomial pseudomonad (as in \Cref{thmUnitSigmaIffPolynomialPseudomonad}) resembles the \textit{algebraically-free monad} \cite{Kelly1980Monads} on the polynomial endofunctor $\mathrm{P}_p : \widehat{\mathbb{C}} \to \widehat{\mathbb{C}}$. However, the free dependent sum type structure as described in \Cref{thmUnitSigmaIffPolynomialPseudomonad} does not yield a strict monad in general: if it did, then the type trees $[[A,B],C]$ and $[A,[B,C]]$ would be identified as a result of the associativity axiom.
\end{numbered}
\section{Extending a natural model by a unit type}
\label{secExtUnit}
\begin{numbered}
To simplify notation in this section, given a natural model $(\mathbb{C}, p)$, we will write $1 = \mathrm{id}_1 : 1 \to 1$ for the identity morphism $\mathrm{id}_{\Yon(\diamond)}$ on the terminal object $\Yon(\diamond)$ of $\widehat{\mathbb{C}}$ and write $\bullet_{\Gamma}$ for the unique element of $1(\Gamma)$ for each $\Gamma \in \mathrm{ob}(\mathbb{C})$; we may just write $\bullet$ if $\Gamma$ can be inferred from context.
\end{numbered}
\begin{theorem}[Representability of $1+p$]
\label{thmOnePlusPIsRepresentable}
Let $(\mathbb{C}, p)$ be a natural model. For each $\Gamma \in \mathrm{ob}(\mathbb{C})$, the following square is a pullback;
\begin{diagram}
\Yon(\Gamma)
\arrow[r, "\bullet_{\Gamma}"]
\arrow[d, equals]
&
1+\nmtm{U}
\arrow[d, "1+p"]
\\
\Yon(\Gamma)
\arrow[r, "\bullet_{\Gamma}"']
&
1+\nmty{U}
\end{diagram}
and for each $A \in \nmty{U}(\Gamma)$, the following square is a pullback.
\begin{diagram}
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "\nmq{A}"]
\arrow[d, "\Yon(\nmp{A})"']
&
1+\nmtm{U}
\arrow[d, "1+p"]
\\
\Yon(\Gamma)
\arrow[r, "\nmp{A}"']
&
1+\nmty{U}
\end{diagram}
In particular, $1+p$ is representable.
\end{theorem}
\begin{proof}
The terminal natural transformation $1 : 1 \to 1$ is easily seen to be representable---indeed, its pullback along $\Yon(\Gamma) \to 1$ can be taken to be $\mathrm{id}_{\Yon(\Gamma)} : \Yon(\Gamma) \to \Yon(\Gamma)$---so the result follows from \Cref{thmClosurePropertiesOfRepresentability}(e).
\end{proof}
\begin{construction}[Category of contexts with formal unit types]
\label{cnsCategoryOfContextsWithGaps}
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{category of contexts with formal unit types} of $(\mathbb{C}, p)$ is the category $\mathbb{C}_{\mathbbm{1}}$ defined as follows.
\begin{itemize}
\item As with \Cref{cnsCategoryContextsExtendedByType}, the objects of $\mathbb{C}_{\mathbbm{1}}$ are $2(n+1)$-tuples $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$, where $\Gamma \in \mathrm{ob}(\mathbb{C})$, for each $i < n$ we have $A_i \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$ and $k_i \in \mathbb{N}$, and where we identify the lists $(\Gamma, 0, A_1, k_1, \dots, A_n, k_n)$ and $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1, k_1, \dots, A_n, k_n)$.
The idea is that the list $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ should represent the context
$$\Gamma ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{\mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1}}_{k_0 \text{ copies}}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ A_1 ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{\mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1}}_{k_1 \text{ copies}}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \dots ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ A_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{\mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1}}_{k_n \text{ copies}}}$$
\item A morphism from $(\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m)$ to $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ in $\mathbb{C}_{\mathbbm{1}}$ is a morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$, with identity and composition inherited from $\mathbb{C}$.
\end{itemize}
Define functors $I : \mathbb{C} \to \mathbb{C}_{\mathbbm{1}}$ and $E : \mathbb{C}_{\mathbbm{1}} \to \mathbb{C}$ by
\begin{itemize}
\item $I(\Gamma) = (\Gamma, 0)$ and $I(\sigma) = \sigma$;
\item $E(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ and $E(\sigma) = \sigma$.
\end{itemize}
These functors establish an equivalence of categories $\mathbb{C} \simeq \mathbb{C}_{\mathbbm{1}}$.
\end{construction}
\begin{verification}
Note that the hom sets of $\mathbb{C}_{\mathbbm{1}}$ are well-defined under the identification
$$(\Gamma, 0, A_1, k_1, \dots, A_n, k_n) \sim (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1, k_1, \dots, A_n, k_n)$$
and that the associativity and unit laws hold because composition and identity are inherited from $\mathbb{C}$. Well-definedness of $I$ and $E$ is immediate from the fact that they act trivially on morphisms. Furthermore we have $E \circ I = \mathrm{id}_{\mathbb{C}}$. To see that $I \circ E \cong \mathrm{id}_{\mathbb{C}_{\mathbbm{1}}}$, note that for each object $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of $\mathbb{C}_{\mathbbm{1}}$ we have
$$(I \circ E)(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n, 0)$$
The component at $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of the natural isomorphism $I \circ E \cong \mathrm{id}_{\mathbb{C}_{\mathbbm{1}}}$ can thus be taken to be the idenitity morphism $\mathrm{id}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}$, which evidently defines a natural isomorphism. Hence $I$ and $E$ yield an equivalence of categories $\mathbb{C} \simeq \mathbb{C}_{\mathbbm{1}}$.
\end{verification}
\begin{construction}[Free natural model admitting a unit type]
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{free natural model admitting a unit type} on $(\mathbb{C}, p)$ is the natural model $(\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})$, where $\mathbb{C}_{\mathbbm{1}}$ is as in \Cref{cnsCategoryOfContextsWithGaps} with distinguished terminal object $(\diamond, 0)$, and where the presheaves $\nmtyunit{U}, \nmtmunit{U} : \mathbb{C}_{\mathbbm{1}}\op \to \mathbf{Set}$ and the natural transformation $p_{\mathbbm{1}} : \nmtmunit{U} \to \nmtyunit{U}$ are obtained from $1+p : 1+\nmtm{U} \to 1+\nmty{U}$ by precopmosing with the functor $E : \mathbb{C}_{\mathbbm{1}} \to \mathbb{C}$ (\Cref{cnsCategoryOfContextsWithGaps}).
The representability data is defined for $\vec{\Gamma} = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_{\mathbbm{1}})$ as follows.
\begin{itemize}
\item Let $\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \bullet = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n+1)$ and, for each $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$, let $\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n, A, 0)$.
\item Let $\nmp{\bullet} : (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n+1) \to (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ be the identity morphism on $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$, and let $\nmp{A} : (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n, A, 0) \to (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ in $\mathbb{C}_{\mathbbm{1}}$ be the morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$.
\item Let $\nmq{\bullet} = \bullet_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}$ and let the element $\nmq{A}$ be as in $(\mathbb{C}, p)$.
\end{itemize}
The unit type structure is defined by $\widehat{\mathbbm{1}} = I(\bullet_{\diamond})$ and $\widehat{\star} = I(\bullet_{\diamond})$.
\end{construction}
\begin{verification}
Note that $(\diamond, 0)$ is indeed terminal in $\mathbb{C}_{\mathbbm{1}}$, since morphisms $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \to (\diamond, 0)$ in $\mathbb{C}_{\mathbbm{1}}$ are exactly morphisms $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \to \diamond$ in $\mathbb{C}$, of which there is exactly one.
Next, note that $p_{\mathbbm{1}} = E^*(1+p) : E^*(1+\nmtm{U}) \to E^*(1+\nmty{U})$, so that $\nmty{U}_{\mathbbm{1}}$ and $\nmtm{U}_{\mathbbm{1}}$ are presheaves over $\mathbb{C}_{\mathbbm{1}}$ and $p_{\mathbbm{1}}$ is a natural transformation. Since $1+p$ is representable (\Cref{thmOnePlusPIsRepresentable}), and since $E$ is an equivalence of categories (\Cref{cnsCategoryOfContextsWithGaps}) sending the described representability data to the maps in the pullback squares witnessing representability of $1+p$, it follows that $p_{\mathbbm{1}}$ is representable and the representability data for $p_{\mathbbm{1}}$ exhibits $(\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})$ as a natural model.
Finally, consider the following square in $\widehat{\mathbb{C}_{\mathbbm{1}}}$.
\begin{diagram}
\Yon(\diamond, 0)
\arrow[r, "\widehat{\star} = I(\bullet)"]
\arrow[d, equals]
&
\nmtmunit{U}
\arrow[d, "p_{\mathbbm{1}}"]
\\
\Yon(\diamond, 0)
\arrow[r, "\widehat{\mathbbm{1}} = I(\bullet)"']
&
\nmtyunit{U}
\end{diagram}
It is a pullback, since the corresponding square in $\widehat{\mathbb{C}}$, namely the top square in the statement of \Cref{thmOnePlusPIsRepresentable} with $\Gamma = \diamond$, is a pullback, and $I$ is an equivalence of categories.
\end{verification}
\begin{lemma}[Inclusion morphism]
Let $(\mathbb{C}, p)$ be a natural model. The embedding $I : \mathbb{C} \hookrightarrow \mathbb{C}_{\mathbbm{1}}$ extends to a morphism of natural models $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})$.
\end{lemma}
\begin{proof}
First note that $I^*\nmtyunit{U} = \nmty{U}$ and $I^*\nmtmunit{U} = \nmtm{U}$, so we can let $\iota$ and $\nmmk{\iota}$ be the respective identity natural transformations. Next note that
$$I(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, 0) \overset{\star}{=} (\Gamma, 0, A, 0) = (\Gamma, 0) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = I\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} IA$$
where the equation marked $\star$ follows by our identification of presentations of objects of $\mathbb{C}_{\mathbbm{1}}$, as described in \Cref{cnsCategoryOfContextsWithGaps}. Hence $I$ preserves context extension. Furthermore, $I\nmp{A}$ is equal as a morphism of $\mathbb{C}$ to $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to A$, and $I\nmq{A}$ and $\nmq{A}$ are equal elements of $\nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \subseteq \nmtmunit{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, 0)$, so that $(I, \iota, \nmmk{\iota})$ is indeed a morphism of natural models.
\end{proof}
\begin{lemma}[Extension of a morphism of natural models]
\label{lemAdjUnitFunctor}
For each morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, there is a morphism of natural models $F_{\mathbbm{1}} : (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}}) \to (\mathbb{D}_{\mathbbm{1}}, q_{\mathbbm{1}})$ which preserves unit type structure and for which $F_{\mathbbm{1}} \circ I = I \circ F$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\arrow[d, hook, "I"]
\\
(\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})
\arrow[r, dashed, "F_{\mathbbm{1}}"']
&
(\mathbb{D}_{\mathbbm{1}}, q_{\mathbbm{1}})
\end{diagram}
\end{lemma}
\begin{proof}
Given a morphism of natural models $F = (F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{D}, q)$, define $F_{\mathbbm{1}} = (F_{\mathbbm{1}}, \varphi_{\mathbbm{1}}, \nmmk{\varphi}_{\mathbbm{1}}) : (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}}) \to (\mathbb{D}_{\mathbbm{1}}, q_{\mathbbm{1}})$ as follows.
\begin{itemize}
\item Define $F_{\mathbbm{1}} : \mathbb{C}_{\mathbbm{1}} \to \mathbb{D}_{\mathbbm{1}}$ on objects by
$$F_{\mathbbm{1}}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = (F\Gamma, k_0, FA_1, k_1, \dots, FA_n, k_n)$$
and on morphisms by $F_{\mathbbm{1}}(\sigma) = F(\sigma)$.
\item Define $\varphi_{\mathbbm{1}} = \varphi_E$ and $\nmmk{\varphi}_{\mathbbm{1}} = \nmmk{\varphi}_E$; explicitly, given $\vec{\Gamma} = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_{\mathbbm{1}})$, we have
$$(\varphi_{\mathbbm{1}})_{\vec{\Gamma}} = 1 + \varphi_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n} : \underbrace{1 + \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)}_{= \nmty{U}_{\mathbbm{1}}(\vec{\Gamma})} \to \underbrace{1 + \nmty{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n)}_{= (F_{\mathbbm{1}}^*\nmty{V}_{\mathbbm{1}})(\vec{\Gamma})}$$
and likewise $(\nmmk{\varphi}_{\mathbbm{1}})_{\vec{\Gamma}} = 1 + \nmmk{\varphi}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}$.
\end{itemize}
To see that $F$ is well-defined, note that a morphism
$$\sigma : (\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m) \to (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$$
in $\widehat{\mathbb{C}}_{\mathbbm{1}}$ is a morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$. Since $F$ preserves context extension, we have
$$F(\sigma) : F\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_m \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n$$
in $\mathbb{C}$, so that $F_{\mathbbm{1}}(\sigma) = F(\sigma)$ is a morphism of the appropriate type in $\mathbb{C}_{\mathbbm{1}}$. That $F_{\mathbbm{1}}$ preserves identity and composition is then immediate from functoriality of $F$, and so $F_{\mathbbm{1}}$ is a functor.
To see that $F_{\mathbbm{1}}$ preserves distinguished terminal objects, note that
$$F_{\mathbbm{1}}(\diamond, 0) = (F\diamond, 0) = (\star, 0)$$
since $F$ preserves distinguished terminal objects.
That $\varphi_{\mathbbm{1}}$ and $\nmmk{\varphi}_{\mathbbm{1}}$ are natural transformations of the appropriate types and that $F_{\mathbbm{1}}^*q_{\mathbbm{1}} \circ \varphi_{\mathbbm{1}} = \nmmk{\varphi}_{\mathbbm{1}} \circ p_{\mathbbm{1}}$ is immediate from their definitions.
To see that $F_{\mathbbm{1}}$ preserves context extension, take $\vec{\Gamma} = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_{\mathbbm{1}})$ and $A \in \nmtyunit{U}(\vec{\Gamma}) = 1 + \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$. If $A = \bullet$, then
\begin{align*}
F_{\mathbbm{1}}(\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \bullet) &= F_{\mathbbm{1}}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n + 1) && \text{definition of context extension in $\mathbb{C}_{\mathbbm{1}}$} \\
&= (F\Gamma, k_0, FA_1, k_1, \dots, FA_n, k_n + 1) && \text{definition of $F_{\mathbbm{1}}$} \\
&= (F\Gamma, k_0, FA_1, k_1, \dots, F_n, k_n) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \bullet && \text{definition of context extension in $\mathbb{D}_{\mathbbm{1}}$} \\
&= F_{\mathbbm{1}} \vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F_{\mathbbm{1}} \bullet && \text{since $F\bullet = (\varphi_{\mathbbm{1}})_{\vec{\Gamma}}(\bullet) = \bullet$}
\end{align*}
and if $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$, then $FA \in \nmty{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n)$, and so
\begin{align*}
F_{\mathbbm{1}}(\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) &= F_{\mathbbm{1}}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n, A, 0) && \text{definition of context extension in $\mathbb{C}_{\mathbbm{1}}$} \\
&= (F\Gamma, k_0, FA_1, k_1, \dots, FA_n, k_n, FA, 0) && \text{definition of $F_{\mathbbm{1}}$} \\
&= (F\Gamma, k_0, FA_1, k_1, \dots, F_n, k_n) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA && \text{definition of context extension in $\mathbb{D}_{\mathbbm{1}}$} \\
&= F_{\mathbbm{1}} \vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F_{\mathbbm{1}} A && \text{since $F_{\mathbbm{1}} A = (\varphi_{\mathbbm{1}})_{\vec{\Gamma}}(A) = FA$}
\end{align*}
so $F_{\mathbbm{1}}$ preserves context extension.
Now $F_{\mathbbm{1}} \nmp{\bullet}$ and $\nmp{F_{\mathbbm{1}} \bullet}$ are equal since they are both equal to the identity morphism on $F_{\mathbbm{1}} \vec{\Gamma}$; and $F_{\mathbbm{1}} \nmp{A}$ and $\nmp{F_{\mathbbm{1}} A}$ are equal since, as morphisms of $\mathbb{C}$, the former is equal to $F\nmp{A}$ and the latter is equal to $\nmp{FA}$, which are equal to each other since $F$ is a morphism of natural models. Likewise $F_{\mathbbm{1}} \nmq{\bullet}$ and $\nmq{F_{\mathbbm{1}} \bullet}$ are equal to the unique element of $1 \subseteq 1 + \nmty{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n) = \nmty{V}_{\mathbbm{1}}(F\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F\bullet)$, and $F_{\mathbbm{1}} \nmq{A} = F\nmq{A}$ and $\nmq{F_{\mathbbm{1}} A} = \nmq{FA}$ as elements of $\nmty{V}(F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA) \subseteq \nmtyunit{V}(F\vec{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA)$, so that $F_{\mathbbm{1}} \nmq{A} = \nmq{F_{\mathbbm{1}} A}$ since $F$ is a morphism of natural models.
So $F_{\mathbbm{1}}$ is a morphism of natural models; moreover, we have already established that $F_{\mathbbm{1}}$ preserves the unit type structure.
\end{proof}
\begin{numbered}
\label{parUnitTypeContextExtensionIsomorphisms}
In a natural model $(\mathbb{C}, p)$ admitting a unit type $\mathbbm{1} \in \nmtm{U}(\diamond)$, the morphism $\nmp{1} : \diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \to \diamond$ is an isomorphism. By induction (and suppressing substitutions), each composite of the form
$$\nmp{\vec{\mathbbm{1}}} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \xrightarrow{\nmp{1}} ~ \cdots ~ \xrightarrow{\nmp{1}} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \xrightarrow{\nmp{1}} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \mathbbm{1} \xrightarrow{\nmp{1}} \Gamma$$
is an isomorphism for each $\Gamma \in \mathrm{ob}(\mathbb{C})$. It then follows that the substitution
$$\nmp{\vec{\mathbbm{1}}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nmp{\mathbbm{1}}] \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$$
is an isomorphism for all $A \in \nmty{U}(\Gamma)$, since it is obtained by pulling back the isomorphism $\nmp{\vec{\mathbbm{1}}}$ along $\nmp{A}$. To simplify notation, we will write the domain of $\nmp{\vec{\mathbbm{1}}} \vec A$ as $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$. But now replacing $\Gamma$ by $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}}$, we see by iterating this process inductively that for each object $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of $\mathbb{C}_{\mathbbm{1}}$, there is an isomorphism
$$\theta = \theta_{(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \longrightarrow \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$$
in $\mathbb{C}$. Hence for each pair of objects $(\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m)$ and $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of $\mathbb{C}_{\mathbbm{1}}$ and each morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$, we obtain a morphism
$$\sigma' : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}}$$
defined by $\sigma' = \theta^{-1} \circ \sigma \circ \theta$, and moreover $\sigma'$ is the unique morphism satisfying $\theta \circ \sigma' = \sigma \circ \theta$.
\end{numbered}
\begin{construction}[Unit insertion morphism]
\label{cnsUnitInsertionMorphism}
Let $(\mathbb{C}, p)$ be a natural model admitting a unit type. The \textbf{unit insertion morphism} is the unit type preserving morphism of natural models $N = (N, \nu, \nmmk{\nu}) : (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}}) \to (\mathbb{C}, p)$ satisfying $N \circ I = \mathrm{id}_{(\mathbb{C}, p)}$, which is defined as follows.
The functor $N : \mathbb{C} _{\mathbbm{1}} \to \mathbb{C}$ is defined on objects by
$$N(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}}$$
where the $i^{\text{th}}$ instance of $\vec{\mathbbm{1}}$ has length $k_i$. Given a morphism $\sigma : (\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m) \to (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ in $\mathbb{C}_{\mathbbm{1}}$, which is a morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$, define
$$N(\sigma) = \theta^{-1} \circ \sigma \circ \theta : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}}$$
where the symbol $\theta$ refers in each case to the relevant isomorphism as described in \Cref{parUnitTypeContextExtensionIsomorphisms}.
The natural transformation $\nu : \nmtyunit{U} \to N^*\nmty{U}$ is defined by letting the component of $\nu$ at an object $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of $\mathbb{C}_{\mathbbm{1}}$ be the function
$$\nu_{(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)} = [\mathbbm{1}, \nmty{U}(\theta)] : 1 + \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n) \to \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}})$$
where $\theta : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \longrightarrow \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ is the isomorphism described in \Cref{parUnitTypeContextExtensionIsomorphisms}. The natural transformation $\nmmk{\nu} : \nmtmunit{U} \to N^*\nmtm{U}$ is defined likewise.
\end{construction}
\begin{verification}
First note that $N$ defines a functor: it respects identity and composition since it is defined on morphisms by conjugating by isomorphisms. Moreover $N(\diamond, 0) = \diamond$, so that $N$ preserves distinguished terminal objects.
The naturality squares for $\nu$ and $\nmmk{\nu}$ are obtained by applying $1+\nmty{U}$ and $1+\nmtm{U}$, respectively, to squares in $\mathbb{C}$ of the form
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}}
\arrow[r, "\theta"]
\arrow[d, "\theta^{-1} \circ \sigma \circ \theta"']
&
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m
\arrow[d, "\sigma"]
\\
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec{\mathbbm{1}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n
\arrow[r, "\theta"']
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n
\end{diagram}
These evidently commute in $\mathbb{C}$, and so $\nu, \nmmk{\nu}$ are natural.
That $p \circ \nmmk{\nu} = \nu \circ p_{\mathbbm{1}}$ follows from naturality of $p$ and the fact that $p_{\mathbbm{1}} = E^*(1+p)$. That $N$ preserves the representability data and unit type structure is evident from the explicit definition given above.
\end{verification}
\begin{theorem}[Universal property of the free natural model admitting a unit type]
\label{thmAdjUnitType}
Let $(\mathbb{C}, p)$ be a natural model, let $(\mathbb{D}, q)$ be a natural model admitting a unit type, and let $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ be a morphism of natural models. There is a unique unit type structure preserving morphism of natural models $F^{\sharp} : (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}}) \to (\mathbb{D}, q)$ such that $F^{\sharp} \circ I = F$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\\
(\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})
\arrow[ur, dashed, "F^{\sharp}"']
&
\end{diagram}
\end{theorem}
\begin{proof}
Define $F^{\sharp} = N \circ F_{\mathbbm{1}}$, as indicated in the following diagram.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, hook, "I"']
&
(\mathbb{D}, q)
\arrow[d, hook, "I"]
\arrow[dr, equals]
&
\\
(\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})
\arrow[r, "F_{\mathbbm{1}}" description]
\arrow[rr, bend right=15, dashed, "F^{\sharp}"']
&
(\mathbb{D}_{\mathbbm{1}}, q_{\mathbbm{1}})
\arrow[r, "N" description]
&
(\mathbb{D}, q)
\end{diagram}
Since $N$ and $F_{\mathbbm{1}}$ preserve unit type structure (\Cref{lemAdjUnitFunctor} and \Cref{cnsUnitInsertionMorphism}), so does $F^{\sharp}$. Moreover we have
$$F^{\sharp} \circ I = N \circ F_{\mathbbm{1}} \circ I = N \circ I \circ F = F$$
as required.
To see that $F^{\sharp}$ is the unique such morphism, we prove that its actions on contexts, substitutions, types and terms are determined entirely by $(F, \varphi, \nmmk{\varphi})$.
To this end, note that for each $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_{\mathbbm{1}})$, we have
$$F^{\sharp} \vec \Gamma = F\Gamma \cext \vec{\mathbbm{1}} \cext FA_1 \cext \vec{\mathbbm{1}} \cext \dots \cext FA_n \cext \vec{\mathbbm{1}}$$
so that the action of $F^{\sharp}$ on objects is determined by that of $F$. Furthemore $F^{\sharp}$ is determined by $F$ on morphisms, since we have
$$F^{\sharp}(\sigma) = N(F_{\mathbbm{1}}(\sigma)) = N(F(\sigma)) = \theta \circ F(\sigma) \circ \theta^{-1}$$
with the symbol $\theta$ representing the isomorphisms in $\mathbb{D}$ as discussed in \Cref{parUnitTypeContextExtensionIsomorphisms}.
Now given $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$ and $a \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n; A)$, we have $F^{\sharp}A = FA$ and $F^{\sharp}a = Fa$; and $F^{\sharp}$ is uniquely determined on the unit type structure since it must preserve it.
Hence $F^{\sharp}$ is the unique unit type preserving morphism satisfying $F^{\sharp} \circ I = I \circ F$.
\end{proof}
\begin{corollary}[Freely extending by a unit type is functorial]
The assignments $(\mathbb{C}, p) \mapsto (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})$ and $F \mapsto F_{\mathbbm{1}}$ determine a functor $(-)_{\mathbbm{1}} : \mathbf{NM} \to \mathbf{NM}_{\mathbbm{1}}$, which is left adjoint to the forgetful functor $U : \mathbf{NM}_{\mathbbm{1}} \to \mathbf{NM}$. Moreover, the component at $(\mathbb{C}, p)$ of the unit of this adjunction is $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}_{\mathbbm{1}}, p_{\mathbbm{1}})$.
\end{corollary}
\begin{proof}
We can recover $F_{\mathbbm{1}}$ as $(I \circ F)^{\sharp}$, where $I : (\mathbb{D}, q) \to (\mathbb{D}_{\mathbbm{1}}, q_{\mathbbm{1}})$ is the inclusion morphism. As such, functoriality of $(-)_{\mathbbm{1}}$ follows from the `uniqueness' part of \Cref{thmAdjUnitType}. That this functor is left adjoint to the forgetful functor $\mathbf{NM}_{\mathbbm{1}} \to \mathbf{NM}$ with unit as described is then precisely the content of \Cref{thmAdjUnitType}.
\end{proof}
\section{Extending a natural model by a term of a basic type}
\label{secExtTerm}
In a given dependent type theory $\mathbb{T}$, the contexts $\Gamma = x_1 : A_1, x_2: A_2, \dots, x_n:A_n$ satisfy the property that each $A_i$ is a type in context $x_1 : A_1, \dots, x_{i-1} : A_{i-1}$. In particular, $A_1$ is a basic type. If we introduce a new term $o : O$ of a basic type $O$, the contexts $x_1 : A_1, \dots, x_n : A_n$ in the resulting type theory $\mathbb{T}'$ satisfy the property that each $A_i$ may additionally depend on the new term $o:O$. Thus the contexts of $\mathbb{T}'$ are precisely those obtained by taking a context $x:O, x_1 : A_1, \dots, x_n : A_n$ in $\mathbb{T}$ and then (semantically) substituting $o : O$ for $x : O$.
Intuitively speaking, then, given a model $\mathfrak{M}$ of type theory $\mathbb{T}$ such that $\mathfrak{M}$ satisfies the judgement $\vdash o : O$, we can interpret a context of $\mathbb{T}'$ by first interpreting the corresponding context $x : O, x_1 : A_1, \dots, x_n : A_n$ of $\mathbb{T}$ in $\mathfrak{M}$, and then substituting $o$ for $x$ in $\mathfrak{M}$.
Transferring this intuition to a natural model $(\mathbb{C}, p)$, when we freely adjoin a term of a basic type $O \in \nmty{U}(\diamond)$, the contexts of the new natural model `should' look like $O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \Gamma$, where $\Gamma$ is an old context. Unfortunately it is not always possible to make sense of the expression $O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \Gamma$, unless $\Gamma$ is itself of the form $\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$. In order to overcome this obstacle, we instead take our new contexts to be those of the form $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$. A technicality we must take care of is that the inclusion from $(\mathbb{C}, p)$ to the new natural model, which sends a context $\Gamma$ to the weakened context $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$, must preserve context extension---in order to do this, we only \textit{formally} extend the contexts, and we reduce the contexts to a normal form by pushing the variable $x : O$ as far to the right as possible, so that the formally extended contexts $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ and $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$ become identified whenever $A \in \nmty{U}(\Gamma)$.
\begin{definition}[Swap isomorphisms]
\label{defSwapIsomorphism}
Let $(\mathbb{C}, p)$ be a natural model. For each $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A,O \in \nmty{U}(\Gamma)$, the \textbf{swap isomorphism}
$$\nmsw_{O,A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nmp{O}] \xrightarrow{\cong} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A}]$$
is the isomorphism given by the respective canonical pullback squares for $\nmp{A}$ and $\nmp{O}$; we will write $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ and $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$ to simplify notation.
\begin{diagram}
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[ddr, bend right=15, "\nmp{O} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A"']
\arrow[drr, bend left=15, "\nmp{A}"]
\arrow[dr, dashed, "\nmsw_{O,A}" description]
&[-20pt]&
\\[-20pt]
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O
\arrow[r, "\nmp{A} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O" description]
\arrow[d, "\nmp{O}"']
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O
\arrow[d, "\nmp{O}"]
\\
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A
\arrow[r, "\nmp{A}"']
&
\Gamma
\end{diagram}
Furthermore, given a list $(A_1, \dots, A_n)$ with $A_{i+1} \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_i)$ for each $i<n$, we obtain isomorphisms
$$\nmsw : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \xrightarrow{\cong} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_2 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$$
where again we have suppressed the substitutions. We will also refer to these as swap isomorphisms.
\end{definition}
Note that swap isomorphisms cohere with representability data since they are the isomorphisms induced from the universal property of canonical pullback squares.
\begin{construction}[Category of contexts extended by a term]
\label{cnsCategoryOfContextsExtendedByTerm}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. The \textbf{category of contexts extended by a term $x$ of type $O$} is the category $\mathbb{C}\adjt{x:O}$ defined as follows.
\begin{itemize}
\item The objects of $\mathbb{C}\adjt{x:O}$ are $(n+1)$-tuples $(\Gamma; A_1, \dots, A_n)$, where $n \ge 0$, $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A_i \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_i)$ for each $i < n$, and we additionally identify the list $(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A; A_1, \dots, A_n)$ with the list $(\Gamma; A[\nmp{O}], A_1, \dots, A_n)$, where we have suppressed the swap isomorphisms.
The object $(\Gamma; \vec A)$ of $\mathbb{C}\adjt{x:O}$ represents the result of extending a context $\Gamma$ first by a variable $x:O$ and then by variables of types which may depend on $x$. Each object $\vec \Gamma$ of $\mathbb{C}\adjt{x:O}$ has a unique expression as an $(n+1)$-tuple $(\Gamma; A_1, \dots, A_n)$ with $n$ minimal, which we call the \textbf{normal form} of $\vec \Gamma$, representing the result of pushing the new variable $x:O$ as far to the right as possible by swap isomorphisms.
Unless otherwise specified, all expressions of objects of $\mathbb{C} \adjt{x:O}$ as lists $(\Gamma; A_1, \dots, A_n)$ will be assumed to be in normal form. Note that if $(\Gamma; A_1, \dots, A_n)$ is in normal form and $n>0$, then $(\Gamma; A_1, \dots, A_n, B)$ is in normal form.
\item A morphism $\sigma : (\Delta; B_1, \dots, B_m) \to (\Gamma; A_1, \dots, A_n)$ in $\mathbb{C}\adjt{x:O}$ is a morphism
$$\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Delta}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$$
commuting with the canonical morphisms to $\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$, as indicated in the following diagram.
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Delta}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m
\arrow[rr, "\sigma"]
\arrow[d, "\nmp{\vec B}"']
&&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n
\arrow[d, "\nmp{\vec A}"]
\\
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Delta}]
\arrow[dr, "\nmt{\Delta} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O"']
\arrow[dd, midgray, "\nmp{O[\nmt{\Delta}]}"']
\pullbackc{dddr, midgray}{0.05}
&&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}]
\arrow[dl, "\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O"]
\arrow[dd, midgray, "\nmp{O[\nmt{\Gamma}]}"]
\pullbackc[-90]{dddl, midgray}{0.05}
\\[-10pt]
&
\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O
\arrow[dd, midgray, "\nmp{O}" description]
&
\\[-30pt]
{\color{midgray} \Delta}
\arrow[dr, midgray, , "\nmt{\Delta}"']
&&
{\color{midgray} \Gamma}
\arrow[dl, midgray, "\nmt{\Gamma}"]
\\[-10pt]
&
{\color{midgray} \diamond}
&
\end{diagram}
\end{itemize}
There is a full and faithful functor $E : \mathbb{C}\adjt{x:O} \to \mathbb{C} \slice{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}$ defined on objects by letting $E(\Gamma; \vec A)$ be the composite
$$\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A \xrightarrow{\nmp{\vec A}} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O[\nmt{\Gamma}] \xrightarrow{\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O} \diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$$
in $\mathbb{C} \slice{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}$, and on morphisms by $E(\sigma)=\sigma$, so that $\mathbb{C}\adjt{x:O}$ is equivalent to a full subcategory of $\mathbb{C} \slice{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}$.
\end{construction}
\begin{verification}
That $\mathbb{C}\adjt{x:O}$ is a category follows immediately from the fact that composition and identity are inherited from $\mathbb{C} \slice{\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}$. The functor $E$ evidently respects domains and codomains, and is full and faithful since it acts as the identity on morphisms. Furthermore, every full and faithful functor corestricts to an equivalence between its domain and its image.
\end{verification}
When clear from context, we will abuse notation by writing `$O$' to refer simultaneously to the element $O \in \nmty{U}(\diamond)$, the object $\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \in \mathbb{C}$ and the elements $O[\nmt{\Gamma}] \in \nmty{U}(\Gamma)$ for all $\Gamma \in \mathrm{ob}(\mathbb{C})$.
\begin{numbered}
We will denote by $\mathbb{C}(O)$ the full subcategory of $\mathbb{C} \slice{O}$ which is the image of $\mathbb{C} \adjt{x:O}$ under $E$. Thus the objects of $\mathbb{C}(O)$ are morphisms of $\mathbb{C}$ of the form $(\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec A}$ for $(\Gamma; \vec A) \in \mathrm{ob}(\mathbb{C} \adjt{x:O})$. Since $E$ is full and faithful, the corestriction $E : \mathbb{C}\adjt{x:O} \to \mathbb{C}(O)$ is an equivalence of categories. The `product with $O$' functor $\Delta_O : \mathbb{C} \to \mathbb{C} \slice{O}$ given by $\Gamma \mapsto (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O, \nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \to O)$ (see \Cref{lemExtensionByBasicTypeIsProduct}) factors through the inclusion $\mathbb{C}(O) \hookrightarrow \mathbb{C} \slice{O}$, and so we obtain an adjunction $\Sigma_O \dashv \Delta_O : \mathbb{C} \leftrightarrows \mathbb{C}(O)$.
\end{numbered}
\begin{lemma}
\label{lemFactorisationOfProductFunctor}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. The functor $\Delta_O : \mathbb{C} \to \mathbb{C}(O)$ factors through the functor $E : \mathbb{C}\adjt{x:O} \to \mathbb{C}(O)$.
\begin{diagram}
\mathbb{C}
\arrow[d, "I"']
\arrow[dr, "\Delta_O"]
&
\\
\mathbb{C} \adjt{x:O}
\arrow[r, "E"']
&
\mathbb{C}(O)
\end{diagram}
Moreover, the functor $I : \mathbb{C} \to \mathbb{C}\adjt{x:O}$ is right adjoint to the composite $\mathbb{C}\adjt{x:O} \xrightarrow{E} \mathbb{C}(O) \xrightarrow{\Sigma_O} \mathbb{C}$.
\end{lemma}
\begin{proof}
Since $\Gamma \xleftarrow{\nmp{O}} \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \xrightarrow{\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O} O$ is a product diagram in $\mathbb{C}$, we can take $\Delta_O\Gamma = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O, \nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \to O)$ for each $\Gamma \in \mathbb{C}$. But then $\Delta_O\Gamma = E(\Gamma)$; so define $I\Gamma = (\Gamma)$ and $I(\sigma : \Delta \to \Gamma) = \sigma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O : (\Delta) \to (\Gamma)$, and observe that this defines a functor $\mathbb{C} \to \mathbb{C}\adjt{x:O}$ with $\Delta_O = E \circ I$, which is well-defined since $(\Delta)$ and $(\Gamma)$ are in normal form.
To see that $\Sigma_O \circ E \dashv I$, observe that we have the following chain of equalities and natural isomorphisms.
\begin{align*}
& \mathbb{C}(\Sigma_O(E(\Delta; \vec B), \Gamma) && \\
&\cong \mathbb{C}(O)(E(\Delta; \vec B), \Delta\Gamma) && \text{since $\Sigma_O \dashv \Delta_O$} \\
&= \mathbb{C}(O)(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m, \nmt{\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O} \circ \nmp{\vec B}), (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O, \nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) && \text{definitions of $\Delta_O$ and of $E$} \\
&= \mathbb{C}\adjt{x:O}((\Delta; \vec B), (\Gamma)) && \text{definition of morphisms in $\mathbb{C}\adjt{x:O}$} \\
&= \mathbb{C}\adjt{x:O}((\Delta; \vec B), I\Gamma) && \text{definition of $I$}
\end{align*}
\end{proof}
\begin{construction}[Free natural model extended by a term]
\label{cnsFreeNaturalModelExtTerm}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. The \textbf{free natural model extended by a term $x$ of type $O$} is the natural model $(\mathbb{C}\adjt{x:O}, p\adjt{x:O} : \nmtmadjt{x:O}{U} \to \nmtyadjt{x:O}{U})$ defined by the following data. The underlying category is $\mathbb{C}\adjt{x:O}$ (\Cref{cnsCategoryOfContextsExtendedByTerm}) with distinguished terminal object $(\diamond)$. The presheaves $\nmtyadjt{x:O}{U}, \nmtmadjt{x:O}{U} : \mathbb{C}\adjt{x:O}\op \to \mathbf{Set}$ and the natural transformation $p\adjt{x:O} : \nmtmadjt{x:O}{U} \to \nmtyadjt{x:O}{U}$ are obtained from $p : \nmtm{U} \to \nmty{U}$ by precomposing with the composite $\mathbb{C}\adjt{x:O} \xrightarrow{E} \mathbb{C}(O) \xrightarrow{\Sigma_0} \mathbb{C}$. Explicitly, we have
$$\nmtyadjt{x:O}{U}(\Gamma; A_1, \dots, A_n) = \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$$
and likewise for $\nmtmadjt{x:O}{U}$, and then
$$(p\adjt{x:O})_{(\Gamma; A_1, \dots, A_n)}(a) = p_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}(a)$$
for all $(\Gamma; A_1, \dots, A_n) \in \mathrm{ob}(\mathbb{C}\adjt{x:O})$ and all $a \in \nmtmadjt{x:O}{U}(\Gamma; A_1, \dots, A_n)$.
The representability data is defined for $(\Gamma; \vec A) = (\Gamma; A_1, \dots, A_n)$ as follows.
\begin{itemize}
\item Let $(\Gamma; A_1, \dots, A_n) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\Gamma; A_1, \dots, A_n, A)$---note that if $n \ge 1$ then this is automatically in normal form, and if $n=0$ and $A = A'[\nmp{O}]$ for some $A' \in \nmty{U}(\Gamma)$, then the normal form is given by $(\Gamma) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A')$;
\item Let $\nmp{A} : (\Gamma; \vec A, A) \to (\Gamma; \vec A)$ be the usual morphism $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$ (or $\nmp{A} \circ \nmsw^{-1} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A' \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$ in the case discussed above); and
\item Let $\nmq{A} \in \nmtyadjt{x:O}{U}(\Gamma; A_1, \dots, A_n, A) = \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ be the usual element $\nmq{A}$ (or the element $\nmq{A}[\nmsw^{-1}] \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A'\mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O)$ in the case discussed above).
\end{itemize}
The distinguished term $x \in \nmtmadjt{x:O}{U}(\diamond\adjt{x:O}; O)$ is given by the element $\nmq{O} \in \nmtm{U}(\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O)$.
\end{construction}
\begin{verification}
That $\nmtyadjt{x:O}{U}$ and $\nmtmadjt{x:O}{U}$ are presheaves and that $p\adjt{x:O}$ is a natural transformation are immediate from the fact that they are obtained from $p$ by applying the functor $(\Sigma_O \circ E)^* : \widehat{\mathbb{C}} \to \widehat{\mathbb{C} \adjt{x:O}}$.
To see that $p\adjt{x:O}$ is representable, let $\vec \Gamma = (\Gamma; A_1, \dots, A_n) \in \mathrm{ob}(\mathbb{C} \adjt{x:O})$ and $A \in \nmtyadjt{x:O}{U}(\vec \Gamma)$ and consider the following square in $\widehat{\mathbb{C}\adjt{x:O}}$.
\begin{diagram}
\Yon(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "\nmp{A}"']
\arrow[r, "\nmq{A}"]
&
\nmtmadjt{x:O}{U}
\arrow[d, "p\adjt{x:O}"]
\\
\Yon(\vec \Gamma)
\arrow[r, "A"']
&
\nmtyadjt{x:O}{U}
\end{diagram}
Composing with swap isomorphisms if necessary, we can take $\nmp{A}$ and $\nmq{A}$ to be the respective morphism and element of $\mathbb{C}$. To see that the square is a pullback, let $\vec \Delta = (\Delta; B_1, \dots, B_m) \in \mathrm{ob}(\mathbb{C} \adjt{x:O})$ and let $\sigma : \vec \Delta \to \vec \Gamma$ and $a \in \nmtmadjt{x:O}{U}(\vec \Delta; A[\sigma])$.
\begin{diagram}
\Yon(\vec \Delta)
\arrow[ddr, bend right=15, "\sigma"']
\arrow[drr, bend left=15, "a"]
\arrow[dr, dashed]
&[-20pt]
&
\\[-20pt]
&
\Yon(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "\nmp{A}"']
\arrow[r, "\nmq{A}"]
&
\nmtmadjt{x:O}{U}
\arrow[d, "p\adjt{x:O}"]
\\
&
\Yon(\vec \Gamma)
\arrow[r, "A"']
&
\nmtyadjt{x:O}{U}
\end{diagram}
Again composing with swap isomorphisms if necessary, we can take $\sigma$ to be a morphism from $\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m$ to $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}(O)$ and $a \in \nmtm{U}(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m; A[\sigma])$. But then by representability of $p$ there is a unique morphism
$$\langle \sigma, a \rangle_A : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$$
in $\mathbb{C}$ such that $\nmp{A} \circ \langle \sigma, a \rangle_A = \sigma$ and $\nmq{A}[\langle \sigma, a \rangle_A] = a$. Moreover, this is a morphism in $\mathbb{C}(O)$ since
\begin{align*}
(\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec A, A} \circ \langle \sigma, a \rangle_A
&= (\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec A} \circ \nmp{A} \circ \langle \sigma, a \rangle_A
&& \text{by definition of $\nmp{\vec A, A}$} \\
&= (\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec A} \circ \sigma && \text{by the universal property of pullbacks} \\
&= (\nmt{\Delta} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec B} && \text{since $\sigma$ is a morphism in $\mathbb{C}(O)$}
\end{align*}
So we see that $\langle \sigma, a \rangle_A$, perhaps composed with the relevant swap isomorphisms, is the desired morphism of $\mathbb{C} \adjt{x:O}$. So $p\adjt{x:O}$ is representable.
\end{verification}
\begin{numbered}
Under the equivalence $E : \mathbb{C}\adjt{x:O} \simeq \mathbb{C}(O) \subseteq \mathbb{C}\slice{O}$, the new terminal object $\diamond\adjt{x:O}$ corresponds with the identity morphism $\mathrm{id}_O : O \to O$. The canonical section $\nms{x} : (\diamond) \to (\diamond; O)$ of the new term $x \in \nmtyadjt{x:O}{U}(\diamond\adjt{x:O}; O)$ is then given by the diagonal morphism $\delta_O : (O, \mathrm{id}_O) \to (O \cdot O, \nmp{O})$.
\end{numbered}
\begin{lemma}[Inclusion morphism]
Let $(\mathbb{C}, p)$ be a natural model. The functor $I : \mathbb{C} \to \mathbb{C}\adjt{x:O}$ of \Cref{lemFactorisationOfProductFunctor} extends to a morphism of natural models $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}\adjt{x:O}, p\adjt{x:O})$.
\end{lemma}
\begin{proof}
In \Cref{cnsFreeNaturalModelExtTerm} we have $p \adjt{x:O} = (\Sigma_O \circ E)^*(p)$. Since $\Sigma_O \circ E \dashv I$, it follows from \Cref{lemAdjointFunctorKanExtension} that $(\Sigma_O \circ E)^* \cong I_!$, so that we can take $I_!(p) = p \adjt{x:O}$. But then we can take
$$\iota = \mathrm{id}_{I_!\nmty{U}} : I_! \nmty{U} \to I_! \nmty{U} = \nmtyadjt{x:O}{U} \quad \text{and} \quad \nmmk{\iota} = \mathrm{id}_{I_! \nmtm{U}} : I_! \nmtm{U} \to I_! \nmtm{U} = \nmtmadjt{x:O}{U}$$
Now note that $(I, \iota, \nmmk{\iota})$ preserves context extension, since for all $\Gamma \in \mathrm{ob}(\mathbb{C})$ and $A \in \nmty{U}(\Gamma)$ we have
$$I\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} IA = (\Gamma; A[\nmp{O}]) = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = I(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$$
by the identification of lists described in \Cref{cnsCategoryOfContextsExtendedByTerm}. The fact that $(I, \iota, \nmmk{\iota})$ is a morphism of natural models now follows trivially from the fact that $\iota$ and $\nmmk{\iota}$ are identity morphisms.
\end{proof}
\begin{theorem}[Extension of a morphism of natural models]
\label{thmFreelyAdjoiningTermFunctorial}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. For each morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, there is a morphism of natural models $F_{\adjt{x:O}} : (\mathbb{C} \adjt{x:O}, p \adjt{x:O}) \to (\mathbb{D} \adjt{y : FO}, q \adjt{y : FO})$ such that $F \adjt{x:O} \circ I = I \circ F$ and $F(x)=y \in \nmtmalt{V}(\star; FO)$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
\arrow[d, "I"]
\\
(\mathbb{C} \adjt{x:O}, p \adjt{x:O})
\arrow[r, dashed, "F \adjt{x:O}"']
&
(\mathbb{D}\adjt{y:FO}, q \adjt{y:FO})
\\[-45pt]
\overset{\text{\rotatebox{90}{$\in$}}}{\underset{x:O}{~}}
\arrow[r, mapsto, shift right=2.83]
&
\overset{\text{\rotatebox{90}{$\in$}}}{\underset{y:FO}{~}}
\end{diagram}
\end{theorem}
We will see in \Cref{corFreelyAdjoiningTermFunctorial} that the assignment $F \mapsto F_{\mathsf{tm}}$ in fact extends to a functor.
\begin{proof}
Let $F = (F, \varphi, \nmmk{\varphi}) : (\mathbb{C}, p) \to (\mathbb{D}, q)$ be a morphism of natural models.
Define the functor $F_{\mathsf{tm}} : \mathbb{C} \adjt{x:O} \to \mathbb{D} \adjt{y:FO}$ on objects by letting
$$F_{\mathsf{tm}}(\Gamma; A_1, \dots, A_n) = (F\Gamma; FA_1, \dots, FA_n)$$
and given a morphism $\sigma : (\Delta; B_1, \dots, B_m) \to (\Gamma; A_1, \dots, A_n)$ in $\mathbb{C} \adjt{x:O}$, let $F_{\mathsf{tm}}(\sigma)$ be the same morphism from $F\Delta \cext FO \cext FB_1 \cext \dots \cext FB_m$ to $F\Gamma \cext FO \cext FA_1 \cext \dots \cext FA_n$ in $\mathbb{D}$ as is given by $F(\sigma)$ (with $\sigma$ considered as a morphism $\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$). Then for each $\Gamma \in \mathrm{ob}(\mathbb{C})$ we have
$$F \adjt{x:O} I\Gamma = F \adjt{x:O}(\Gamma) = (F\Gamma) = I(F\Gamma)$$
so that $F \adjt{x:O} \circ I = I \circ F$.
Define $\varphi \adjt{x:O} = I_!(\varphi) : I_!\nmty{U} \Rightarrow I_!\nmty{V}$ and $\nmmk{\varphi} \adjt{x:O} = I_!(\nmmk{\varphi}) : I_!F_! \nmtm{U} \Rightarrow I_!\nmtmalt{V}$. Note that we have
$$I_!F_!p = (I \circ F)_!p = (F \adjt{x:O} \circ I)_!p = (F \adjt{x:O})_! I_!p = F_{\mathsf{tm}} p \adjt{x:O}$$
and $I_!q = q \adjt{y:FO}$, so that $\varphi \adjt{x:O}$ and $\nmmk{\varphi} \adjt{x:O}$ have the correct type. To see that $F_{\mathsf{tm}}$ preserves context extension, note that
\begin{align*}
F_{\mathsf{tm}}\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F_{\mathsf{tm}} A &= (F\Gamma) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA[\nmu{FO}] && \text{definition of $F_{\mathsf{tm}}$ and $\varphi\adjt{x:O}$} \\
&= (F\Gamma; FA[\nmu{FO}]) && \text{context extension in $(\mathbb{C}\adjt{x:O}, p\adjt{x:O})$} \\
&= (F\Gamma; FA[F\nmp{O}]) && \text{$F$ is a morphism of natural models} && \\
&= (F\Gamma \cext FA) && \text{normal form} && \\
&= (F(\Gamma \cext A)) && \text{$F$ is a morphism of natural models} && \\
&= F_{\mathsf{tm}}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) && \text{definition of $F_{\mathsf{tm}}$}
\end{align*}
Finally note that $F_{\mathsf{tm}}$ preserves the remaining representability data, so that we have a morphism of natural models as required.
\end{proof}
\begin{numbered}
\label{parCanonicalSections}
We are nearly ready to prove the universal property of $(\mathbb{C} \adjt{x:O}, p \adjt{x:O})$. First we must do some acrobatics involving terms of basic types. Given a natural model $(\mathbb{C}, p)$ with a basic type $O \in \nmty{U}(\diamond)$ and a term $o \in \nmtm{U}(\diamond; O)$, we obtain a section $\nms{o} : \diamond \to O$ of the projection $\nmp{O} : O \to \diamond$ from representability of $p$---specifically, we have $\nms{o} = \langle \mathrm{id}_{\diamond}, o \rangle_O$.
Given any object $\Gamma$ of $\mathbb{C}$, this gives rise to a section $\nms{o[\nmt{\Gamma}]} : \Gamma \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O$ of $\nmp{O} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \to \Gamma$; we will just write $\nms{o}$ for $\nms{o}[\nmt{\Gamma}]$. Hence for any object $(\Gamma; \vec A)$ of $\mathbb{C} \adjt{x:O}$, we obtain a section $\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}] \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A$ of $\nmp{O} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nms{O}]$. This is illustrated in the following diagram, in which all four squares are canonical pullbacks and all horizontal composites are identity morphisms.
\begin{diagram}
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}]
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r, "\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A"]
\arrow[d, "\nmp{\vec A[\nms{o}]}"']
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r, "\nmp{O} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A"]
\arrow[d, "\nmp{\vec A}" description]
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}]
\arrow[d, "\nmp{\vec A[\nms{o}]}"]
\\
\Gamma
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r, "\nms{o}" description]
\arrow[d, "\nmt{\Gamma}"']
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O
\arrow[dr, draw=none, "\text{\Large$\lrcorner$}" description, pos=0.1]
\arrow[r, "\nmp{O}" description]
\arrow[d, "\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O" description]
&
\Gamma
\arrow[d, "\nmt{\Gamma}"]
\\
\diamond
\arrow[r, "\nms{o}"']
&
O
\arrow[r, "\nmp{O}"']
&
\diamond
\end{diagram}
In particular, the object of $\mathbb{C}$ obtained by pulling back the morphism $E(\Gamma; \vec A) = (\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O) \circ \nmp{\vec A}$ along $\nms{o}$ exists and can be taken to be equal to $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}]$. This yields a functor $\Delta_{\nms{o}} : \mathbb{C}(O) \to \mathbb{C}$.
\end{numbered}
\begin{construction}[Term substitution morphism]
\label{cnsTermSubstitutionMorphism}
Let $(\mathbb{C}, p)$ be a natural model, let $O \in \nmty{U}(\diamond)$ and let $o \in \nmtm{U}(\diamond; O)$. The \textbf{substitution morphism} of $o$ for $x$ is the morphism of natural models $S_o = (S_o, \sigma_o, \nmmk{\sigma}_o) : (\mathbb{C} \adjt{x:O}, p \adjt{x:O}) \to (\mathbb{C}, p)$ satisfying $S_o(x)=o \in \nmtm{U}(\diamond; O)$ and $S_o \circ I = \mathrm{id}_{(\mathbb{C}, p)}$; it is defined as follows.
\begin{itemize}
\item The functor $S_o : \mathbb{C}\adjt{x:O} \to \mathbb{C}$ is the composite
$$\mathbb{C} \adjt{x:O} \xrightarrow{E} \mathbb{C}(O) \xrightarrow{\Delta_{\nms{o}}} \mathbb{C} \slice{\diamond} \cong \mathbb{C}$$
where $\nms{o} : \diamond \to O$ is as discussed in \Cref{parCanonicalSections}.
\item The natural transformation $\sigma_o : \nmtyadjt{x:O}{U} \to \nmty{U}$ is given by letting $(\sigma_o)_{(\Gamma; \vec A)} : \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A) \to \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}])$ be the function $\nmty{U}(\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A)$.
\item Likewise, $\nmmk{\sigma}_o : \nmtmadjt{x:O}{U} \to \nmtm{U}$ is defined by $(\nmmk{\sigma}_o)_{(\Gamma; \vec A)} = \nmtm{U}(\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A)$.
\end{itemize}
\end{construction}
\begin{verification}
Note first that
$$S_o(\diamond) = \Delta_{\nms{o}}(\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \xrightarrow{\nmp{O}} \diamond) = \diamond$$
so that $S_o$ preserves distinguished terminal objects. Given a morphism $\tau : (\Delta; \vec B) \to (\Gamma; \vec A)$ in $\mathbb{C} \adjt{x:O}$, the corresponding naturality squares for $\sigma_o$ and $\nmmk{\sigma}_o$ are obtained by applying $\nmty{U}$ and $\nmtm{U}$, respectively, to the following diagram $\mathbb{C}$.
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec B
\arrow[r, "\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec B"]
\arrow[d, "\tau"']
&
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec B[\nms{o}]
\arrow[d, "\Delta_{\nms{o}}(\tau)"]
\\
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A
\arrow[r, "\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A"']
&
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}]
\end{diagram}
These diagrams commute in $\mathbb{C}$, and so the naturality squares commute too.
To see that $S_o$ preserves context extension, let $(\Gamma; \vec A) \in \mathrm{ob}(\mathbb{C} \adjt{x:O})$ and let $A \in \nmtyadjt{x:O}{U}(\Gamma; \vec A) = \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$, and note that
\begin{align*}
S_o(\Gamma; \vec A) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} S_o(A)
&= \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A[\nms{o}] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A]
&& \text{by definition of $S_o$} \\
&= \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} (\vec A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)[\nms{o}] && \text{by our notation convention} \\
&= S_o(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) && \text{by definition of $S_o$}
\end{align*}
And note that we have
$$S_o(\nmp{A}) = \Delta_{\nms{o}}(E(\nmp{A})) = \nmp{A[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A]} = \nmp{S_o(A)}$$
and
$$S_o(\nmq{A}) = \nmq{A}[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A] = \nmq{A}[\langle \mathrm{id}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A}, \nmq{A}[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A] \rangle_A] = \nmq{A[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A]} = \nmq{S_o(A)}$$
so $S_o$ is a morphism of natural models.
To see that $S_o(x) = o$, note that $x = \nmq{O} \in \nmtm{U}(\diamond \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O)$, so we have
$$S_o(x) = \nmq{O}[\nms{o}] = \nmq{O}[\langle \mathrm{id}_{\diamond}, o \rangle_O] = o$$
as required.
Finally note that for $\Gamma \in \mathrm{ob}(\mathbb{C})$ we have
$$S_o(I(\Gamma)) = S_o(\Gamma) = \Delta_{\nms{o}}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \xrightarrow{\nmt{\Gamma} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O} O) = \Gamma$$
Likewise it is easy to see that $S_o \circ I$ acts as the identity on substitutions, types and terms. So $S_o \circ I = \mathrm{id}_{(\mathbb{C}, p)}$, as required.
\end{verification}
We now have the components needed to prove the universal property of the natural model $(\mathbb{C}\adjt{x:O}, p\adjt{x:O})$.
\begin{theorem}[Universal property of freely extending by a term]
\label{thmAdjoiningTermOfBasicType}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. Given any natural model $(\mathbb{D}, q)$, morphism $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ and element $o \in \nmtmalt{V}(\star; FO)$, there is a unique morphism of natural models $F^{\sharp} : (\mathbb{C} \adjt{x:O}, p\adjt{x:O}) \to (\mathbb{D}, q)$ such that $F^{\sharp} \circ I = F$ and $F^{\sharp}(x) = o \in \nmtmalt{V}(\star; FO)$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
&
o \in \nmtmalt{V}(\star; FO)
\\
(\mathbb{C} \adjt{x:O}, p\adjt{x:O})
\arrow[ur, dashed, "F^{\sharp}"']
&
x \in \nmtmadjt{x:O}{U}(\diamond\adjt{x:O}; O)
\arrow[ur, mapsto, dashed]
&
\end{diagram}
\end{theorem}
\begin{proof}
Define $F^{\sharp} = S_o \circ F_{\mathsf{tm}}$, as indicated in the following diagram.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
\arrow[d, "I"]
\arrow[dr, equals]
\\
(\mathbb{C}\adjt{x:O}, p\adjt{x:O})
\arrow[r, "F_{\mathsf{tm}}" description]
\arrow[rr, bend right=15, dashed, "F^{\sharp}"']
&
(\mathbb{D}\adjt{y:FO}, q\adjt{y:FO})
\arrow[r, "S_o" description]
&
(\mathbb{D}, q)
\end{diagram}
Note that $F^{\sharp}$ is a morphism of natural models since it is a composite of morphisms of natural models; it satisfies $F^{\sharp} \circ I = F$, since by \Cref{thmFreelyAdjoiningTermFunctorial,cnsTermSubstitutionMorphism} we have
$$F^{\sharp} \circ I = S_o \circ F_{\mathsf{tm}} \circ I = S_o \circ I \circ F = \mathrm{id}_{(\mathbb{D}, q)} \circ F = F$$
Moreover we have $F^{\sharp}(x) = S_o(F_{\mathsf{tm}}(x)) = S_o(y) = o$, as required.
It remains to prove that $F^{\sharp}$ is unique. To do so, we prove that actions of $F^{\sharp}$ on contexts, substitutions, types and terms are uniquely determined by $(F, \varphi, \nmmk{\varphi})$ and the element $o \in \nmty{V}(\star; FO)$.
For each $(\Gamma; \vec A) \in \mathrm{ob}(\mathbb{C}\adjt{x:O})$, we have
$F^{\sharp}(\Gamma; A_1, \dots, A_n) = F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F\vec A[\nms{o}]$, so that the action of $F^{\sharp}$ on objects is determined by $F$, $\varphi$ and $o$; likewise on morphisms.
Given $A \in \nmtyadjt{x:O}{U}((\Gamma; \vec A)) = \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A)$, we have $F^{\sharp}(A) = FA[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F \vec A]$, so that the action of $F^{\sharp}$ on types is determined by $F$, $\varphi$ and $o$.
Finally, given $a \in \nmtmadjt{x:O}{U}((\Gamma; \vec A); A) = \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A; A)$, we have $F^{\sharp}a = Fa[\nms{o} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F \vec A]$, so that the action of $F^{\sharp}$ on terms is determined by $F$, $\nmmk{\varphi}$ and $o$.
\end{proof}
\begin{numbered}
Although we defined $F^{\sharp}$ in terms of $F_{\mathsf{tm}}$ and $S_o$, we could instead have defined $F^{\sharp}$ directly and recovered $F_{\mathsf{tm}}$ and $S_o$ as instances of morphisms of the form $G^{\sharp}$ for appropriate choices of $G$. Specifically, we can take $F_{\mathsf{tm}} = (I \circ F)^{\sharp}$ and $S_o = (\mathrm{id}_{(\mathbb{D},q)})^{\sharp}$, with the evident choices of distinguished term in each case.
\end{numbered}
\begin{corollary}[Freely extending by a term is functorial]
\label{corFreelyAdjoiningTermFunctorial}
The assignments $(\mathbb{C}, p) \mapsto (\mathbb{C}\adjt{x:O}, p\adjt{x:O})$ and $F \mapsto F_{\mathsf{tm}}$ extend to a functor $(-)_{\mathsf{tm}} : \mathbf{NM}_{\mathsf{ty}} \to \mathbf{NM}_{\mathsf{tm}}$, which is left adjoint to the forgetful functor $\mathbf{NM}_{\mathsf{tm}} \to \mathbf{NM}_{\mathsf{ty}}$. Furthermore, the component at $(\mathbb{C}, p)$ of the unit of this adjunction is $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}\adjt{x:O}, p\adjt{x:O})$.
\end{corollary}
\begin{proof}
Given natural models $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$, an element $O \in \nmty{U}(\diamond)$, a morphism $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, note that $F_{\mathsf{tm}} = (I \circ F)^{\sharp}$, where $I : (\mathbb{D}, q) \to (\mathbb{D}\adjt{y:FO}, q\adjt{y:FO})$ and the distinguished term of $(\mathbb{D}\adjt{y:FO}, q\adjt{y:FO})$ is $y = \nmq{FO}$. That $(-)_{\mathsf{tm}}$ is functorial is then immediate from the `uniqueness' part of \Cref{thmAdjoiningTermOfBasicType}, and that it is left adjoint to the forgetful functor with unit as stated is exactly the content of \Cref{thmAdjoiningTermOfBasicType}.
\end{proof}
\begin{corollary}[Free model on a family of basic types and a family of terms]
Let $I$ be an arbitrary set and let $J = \{ j_0, j_1, \dots, j_{n-1} \}$ be a finite set. The free model of the theory of an $I$-indexed family of basic types and a $J$-indexed family of terms of basic types is the natural model $(\mathbb{C}_{I;J}, p_{I;J})$ defined by
$$(\mathbb{C}_{I;J}, p_{I;J}) = (\cdots((\mathbb{C}_{I+J}, p_{I+J})_{x_0:j_0})_{x_1:j_1})\cdots)_{x_{n-1}:j_{n-1}}$$
where $(\mathbb{C}_{I+J}, p_{I+J})$ is the term model on the theory of an $(I+J)$-indexed family of basic types (\Cref{cnsFreeNaturalModelKappaBasicTypes}). In particular, $(\mathbb{C}_{I;J}, p_{I;J})$ is initial in the category $\mathbf{NM}_{(\mathsf{ty}_i)_{i \in I}, (\mathsf{tm}_j)_{j \in J}}$ with an $I$-indexed family of basic types and a $J$-indexed family of terms of basic types.
\end{corollary}
\begin{proof}
As proved in \Cref{thmFreeNaturalModelBasicTypesInitial}, the natural model $(\mathbb{C}_{I+J}, p_{I+J})$ is initial in $\mathbf{NM}_{(\mathsf{ty}_k)_{k \in I+J}}$. The natural model $(\mathbb{C}_{I;J}, p_{I;J})$ is obtained by applying functors of the form $({-})_{\mathsf{tm}}$ finitely many times. Since these functors are left adjoints, they preserve initial objects.
\end{proof}
\section{Extending a natural model by a basic type}
\label{secExtType}
\begin{construction}[Category of contexts extended by a basic type]
\label{cnsCategoryContextsExtendedByType}
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{category of contexts extended by a basic type $X$} is the category $\mathbb{C}_X$ defined as follows.
\begin{itemize}
\item The objects of $\mathbb{C}_X$ are $2(n+1)$-tuples $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$, where $\Gamma \in \mathrm{ob}(\mathbb{C})$, for each $i<n$ we have $A_i \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$ and $k_i \in \mathbb{N}$, and where we identify the lists
$$(\Gamma, 0, A_1, k_1, \dots, A_n, k_n) \quad \text{and} \quad (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1, k_1, \dots, A_n, k_n)$$
Note that every object of $\mathbb{C}_X$ is either of the form $(\Gamma, 0)$ or has a unique representative of the form $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ with $k_0>0$.
The idea is that the list $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ should represent the context
$$\Gamma ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X}_{k_0 \text{ copies}}} \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ A_1 ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X}_{k_1 \text{ copies}}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \dots ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ A_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ {\underbrace{X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X}_{k_n \text{ copies}}}$$
\item A morphism from $(\Delta, \ell_1, B_1, \ell_1, \dots, B_m, \ell_m)$ to $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ in $\mathbb{C}_X$ is a pair $(\sigma, h)$, where $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ in $\mathbb{C}$ and $h$ is a function from $k_0 + k_1 + \cdots + k_n$ to $\ell_0 + \ell_1 + \cdots + \ell_m$, with identity and composition inherited from $\mathbb{C} \times \mathbf{Fin}\op$.
\end{itemize}
Define functors $I : \mathbb{C} \to \mathbb{C}_X$, $E : \mathbb{C}_X \to \mathbb{C}$ and $G : \mathbb{C}_X \to \mathbf{Fin}\op$ by
\begin{itemize}
\item $I(\Gamma) = (\Gamma, 0)$ and $I(\sigma) = (\sigma, \mathrm{id}_0)$;
\item $E(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ and $E(\sigma, h) = \sigma$;
\item $G(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = k_0 + k_1 + \cdots + k_n$ and $G(\sigma, h) = h$.
\end{itemize}
Then $E \circ I = \mathrm{id}_{\mathbb{C}}$, $G \circ I = 0 = \Delta(\varnothing)$ (the constant functor whose value is the empty set), and $\langle E, G \rangle : \mathbb{C}_X \to \mathbb{C} \times \mathbf{Fin}\op$ is an equivalence of categories.
\end{construction}
\begin{verification}
Note that the hom sets of $\mathbb{C}_X$ are well-defined under the identification
$$(\Gamma, 0, A_1, k_1, \dots, A_n, k_n) \sim (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1, k_1, \dots, A_n, k_n)$$
and that the associativity and unit laws hold because identity and composition are inherited from $\mathbb{C} \times \mathbf{Fin}\op$. Well-definedness of $I$ is clear, and well-definedness of $E$ and $G$ are immediate from the fact that their action on morphisms is the same as that of the projection functors from $\mathbb{C} \times \mathbf{Fin}\op$ to its components. Evidently $E \circ I = \mathrm{id}_{\mathbb{C}}$ and $G \circ I = 0$.
To see that $\langle E, G \rangle : \mathbb{C}_X \to \mathbb{C} \times \mathbf{Fin}\op$ is an equivalence, note that it is full and faithful since it acts as the identity on morphisms, and it is essentially surjective, since a pair $(\Gamma, k) \in \mathrm{ob}(\mathbb{C} \times \mathbf{Fin}\op)$ is already an object of $\mathbb{C}_X$, and
$$\langle E, G \rangle (\Gamma, k) = (E(\Gamma, k), G(\Gamma, k)) = (\Gamma, k)$$
Hence $\langle E, G \rangle : \mathbb{C}_X \simeq \mathbb{C} \times \mathbf{Fin}\op$, as required.
\end{verification}
\begin{construction}[Free natural model extended by a basic type]
\label{cnsFreeNMExtendedByType}
Let $(\mathbb{C}, p)$ be a natural model. The \textbf{free natural model on $(\mathbb{C}, p)$ extended by a basic type $X$} is the natural model $(\mathbb{C}_X, p_X : \nmtm{U}_X \to \nmty{U}_X)$ defined by the following data. The underlying category is $\mathbb{C}_X$ (\Cref{cnsCategoryContextsExtendedByType}) with distinguished terminal object $\diamond_X = (\diamond, 0)$. The presheaves $\nmty{U}_X, \nmtm{U}_X$ and $p_X : \nmtm{U}_X \to \nmty{U}_X$ are given by
$$p_X = {!} + E^*p : G^*U + E^*\nmtm{U} \to 1 + E^*\nmty{U}$$
where $U$ is the inclusion $\mathbf{Fin} \to \mathbf{Set}$, regarded as an object of $\widehat{\mathbf{Fin}\op}$. Explicitly, we have
\begin{itemize}
\item $\nmty{U}_X(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = \{ X \} + \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$; and
\item $\nmtm{U}_X(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = (k_0 + \cdots + k_n) + \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$;
\end{itemize}
for all $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_X)$, and where we have suggestively written $X$ for the unique element of $1(\vec \Gamma)$.
The representability data is defined as follows. Given $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_X)$, an element of $\nmty{U}_X(\vec \Gamma)$ is either $X$ or is some $A \in \nmty{U}_X(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$.
\begin{itemize}
\item Define $\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n+1)$;
\item The projection $\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X \to \vec \Gamma$ in $\mathbb{C}_X$ is given by the pair $(\mathrm{id}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}, i)$, where $i : k_0 + \cdots + k_n \hookrightarrow k_0 + \cdots + k_n + 1$ is the inclusion function; and
\item The new variable $\nmtm{U}_X(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X) = (k_0 + \cdots + k_n + 1) + \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$ is element given by the `$+1$' term---identifying natural numbers with the corresponding von Neumann ordinals, we can take this new element to be the natural number $k_0+\dots+k_n$.
\end{itemize}
Given $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n) \subseteq \nmty{U}_X(\vec \Gamma)$:
\begin{itemize}
\item Define $\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n, A, 0)$;
\item The projection $\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \vec \Gamma$ in $\mathbb{C}_X$ is given by the pair $(\nmp{A}, \mathrm{id}_{k_0 + \cdots + k_n})$, where $\nmp{A} : \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ is as in $(\mathbb{C}, p)$;
\item The new variable $\nmtm{U}_X(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) = k_0 + \cdots + k_n + \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$ is given by the usual element $\nmq{A} \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n)$.
\end{itemize}
The distinguished basic type of $(\mathbb{C}_X, p_X)$ is $X \in \{X\} + \nmty{U}(\diamond) = \nmty{U}_X(\diamond, 0)$.
\end{construction}
\begin{verification}
To see that $(\diamond, 0)$ is terminal, let $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_X)$; there is exactly one morphism $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \to \diamond$ in $\mathbb{C}$, namely $\nmt{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}$, and exactly one function $0 \to k_0 + k_1 + \cdots + k_n$, namely the empty function $\varnothing$, and hence $(\nmt{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n}, \varnothing)$ is the unique morphism $\vec \Gamma \to (\diamond, 0)$ in $\mathbb{C}_X$. That $\nmty{U}_X$ and $\nmtm{U}_X$ are presheaves and that $p_X$ is natural are immediate from their definitions, so it remains to prove that $p_X$ is representable.
So let $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$. To simplify notation, let $k = G(\vec \Gamma) = k_0 + \cdots + k_n$ and write $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A$ for $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$. We check representability data separately for $X \in 1(\vec \Gamma)$ and for $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$.
First consider the following diagram in $\widehat{\mathbb{C}_X}$.
\begin{ldiagram}
\Yon(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X)
\arrow[r, "k"]
\arrow[d, "{(\mathrm{id}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A}, i)}"']
&
G^*U
\arrow[r, hook]
\arrow[d, "!" description]
&
\nmtm{U}_X
\arrow[d, "p_X"]
\\
\Yon(\vec \Gamma)
\arrow[r, "X"']
&
1
\arrow[r, hook]
&
\nmty{U}_X
\end{ldiagram}
Recall that $i$ denotes the inclusion $k \hookrightarrow k+1$, and $X$ is name we are giving to the unique element of $1(\vec \Gamma)$, and so the diagram evidently commutes. We need to verify that it is a pullback. So take an object $\vec \Delta = (\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m)$ of $\mathrm{ob}(\mathbb{C}_X)$, a morphism $(\sigma, h) : \vec \Delta \to \vec \Gamma$ and an element $j \in \nmtm{U}_X(\vec \Delta)$, and assume that $(p_X)_{\vec \Delta}(j) = X[(\sigma, h)]$. Since $X : \Yon(\vec \Gamma) \to \nmty{U}_X$ factors through the inclusion $1 \hookrightarrow \nmty{U}_X$, it follows that $j : \Yon(\vec \Delta) \to \nmtm{U}_X$ factors through the inclusion $G^*U \hookrightarrow \nmtm{U}_X$. So it suffices to verify the universal property for the left-hand square. But then this amounts to verifying that there is a unique morphism $\langle \sigma, j \rangle_X$ as indicated with a dashed arrow in the following diagram in $\widehat{\mathbf{Fin}\op}$.
\begin{diagram}
\Yon(\ell)
\arrow[drr, bend left=15, "j"]
\arrow[ddr, bend right=15, "h"']
\arrow[dr, dashed]
&[-20pt]&
\\[-20pt]
&
\Yon(k+1)
\arrow[d, "i" description]
\arrow[r, "k" description]
&
U
\arrow[d, "!"]
\\
&
\Yon(k)
\arrow[r, "X"']
&
1
\end{diagram}
The existence and uniqueness of this morphism follows from representability of $U \to 1$, which is precisely the natural transformation $p_1$ of \Cref{cnsFreeNaturalModelKappaBasicTypes}; in particular, the morphism from $\ell$ to $k+1$ in $\mathbf{Fin}\op$ is the function $[h,j] : k+1 \to \ell$. The morphism $\vec \Delta \to \vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ in $\widehat{\mathbb{C}_X}$ is then given by $(\sigma, [h,j])$.
Given $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A) \subseteq \nmty{U}_X(\vec \Gamma)$, consider the following diagram in $\widehat{\mathbb{C}_X}$.
\begin{diagram}
\Yon(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[d, "{\Yon((\nmp{A}, \mathrm{id}_k))}"']
\arrow[r, "\nmq{A}"]
&
E^*\nmtm{U}
\arrow[d, "E^*p" description]
\arrow[r, hook]
&
\nmtm{U}_X
\arrow[d, "p_X"]
\\
\Yon(\vec \Gamma)
\arrow[r, "A"']
&
E^*\nmty{U}
\arrow[r, hook]
&
\nmty{U}_X
\end{diagram}
The diagram evidently commutes, so we need to verify that it is a pullback. So take an object $\vec \Delta = (\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m)$ of $\mathrm{ob}(\mathbb{C}_X)$, a morphism $(\sigma, h) : \vec \Delta \to \vec \Gamma$ and an element $a \in \nmtm{U}_X(\vec \Delta)$, and assume that $(p_X)_{\vec \Delta}(a) = A[(\sigma, h)]$. Since $A : \Yon(\vec \Gamma) \to E^*\nmty{U}$ factors through the inclusion $E^*\nmty{U} \hookrightarrow \nmty{U}_X$, we have that $a : \Yon(\vec \Delta) \to \nmtm{U}_X$ factors through the inclusion $a : E^*\nmtm{U} \to \nmtm{U}_X$. So it suffices to verify the universal property for the left-hand square. But then this amounts to verifying that there is a unique morphism $\langle \sigma, a \rangle_A$ as indicated with a dashed arrow in the following diagram in $\widehat{\mathbb{C}}$.
\begin{diagram}
\Yon(\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec B)
\arrow[drr, bend left=15, "a"]
\arrow[ddr, bend right=15, "\sigma"']
\arrow[dr, dashed]
&[-20pt]&
\\[-20pt]
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)
\arrow[r, "\nmq{A}" description]
\arrow[d, "\nmp{A}" description]
&
\nmtm{U}
\arrow[d, "p"]
\\
&
\Yon(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A)
\arrow[r, "A"']
&
\nmty{U}
\end{diagram}
The existence and uniqueness of this morphism follows from representability of $p$; the morphism $\vec \Delta \to \vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A$ in $\widehat{\mathbb{C}_X}$ is then given by $(\langle \sigma, a \rangle_A, h)$.
Hence the representability data exhibits $p_X$ as a representable natural transformation, and so $(\mathbb{C}_X, p_X)$ is a natural model, with $X \in \{ X \} \subseteq \nmty{U}_X(\diamond, 0)$ as its distinguished basic type.
\end{verification}
We now work towards verifying that $(\mathbb{C}_X, p_X)$ satisfies the desired universal property.
\begin{lemma}[Inclusion morphism]
\label{lemInclusionNaturalModelType}
Let $(\mathbb{C}, p)$ be a natural model. The functor $I : \mathbb{C} \to \mathbb{C}_X$ of \Cref{cnsCategoryContextsExtendedByType} extends to a morphism of natural models $(I, \iota, \nmmk{\iota}) : (\mathbb{C}, p) \to (\mathbb{C}_X, p_X)$.
\end{lemma}
\begin{proof}
Recall that $\nmty{U}_X = 1 + E^*\nmty{U}$ and $\nmtm{U}_X = G^*U + E^*\nmtm{U}$; since $E \circ I = \mathrm{id}_{\mathbb{C}}$ and $G \circ I = 0$, we have
$$I^*\nmty{U}_X = I^*1 + I^*E^*\nmty{U} = 1 + \nmty{U} \quad \text{and} \quad \nmtm{U}_X = I^*G^*U + I^*E^*\nmtm{U} = 0 + \nmtm{U} {\color{darkgray} (= \nmtm{U})}$$
so that $I^*p_X = {!} + p : \nmtm{U} \to \nmty{U}$. Let $\iota : \nmty{U} \to I^*\nmty{U}_X = 1 + \nmty{U}$ and $\nmtm{\iota} : \nmtm{U} \to I^*\nmtm{U}_X = 0 + \nmtm{U}$ be the respective inclusions. By the identification of objects in \Cref{cnsCategoryContextsExtendedByType}, we have
$$I\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} IA = (\Gamma, 0) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A = (\Gamma, 0, A, 0) = (\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A, 0) = I(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A)$$
so that $I$ respects context extension. Moreover we have
$$I(\nmp{A}) = (\nmp{A}, \mathrm{id}_0) \qquad \text{and} \quad I(\nmq{A}) = \nmq{A}$$
so that $I$ respects representability data. Hence $I$ is a morphism of natural models.
\end{proof}
\begin{numbered}
\label{numExtraSwapIsomorphisms}
Let $(\mathbb{C}, p)$ be a natural model admitting a basic type $O \in \nmty{U}(\diamond)$. By iterating swap isomorphisms (\Cref{defSwapIsomorphism}), we obtain isomorphisms
$$\theta : \Gamma ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_0 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_1 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \dots ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_n \text{ times}} ~~ \cong ~~ \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k \text{ times}}$$
for each object $(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$ of $\mathbb{C}_X$, where $k = k_0 + k_1 + \cdots + k_n$ and, as usual, we have suppressed projection substitutions. We can choose these isomorphisms such that, for each $j \in k$, the $j^{\text{th}}$ copy of $O$ on the left corresponds with the $j^{\text{th}}$ copy of $O$ on the right, in the sense we can express $\theta$ as a composite of swap isomorphisms containing no swap isomorphisms of the form $\nmsw_{O,O}$. By \Cref{lemExtensionByBasicTypeIsProduct}, then, the object $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O$ is a product in $\mathbb{C}$ of $\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ and $k$ copies of $O$. Furthermore, given another object $(\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m)$ of $\mathbb{C}_X$, each pair $(\sigma, h)$ consisting of a morphism $\sigma : \Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n$ and a function $h : k \to \ell$ gives rise to a morphism
$$\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \to \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O$$
Explicitly, this morphism is indicated by the dashed arrow in the following diagram.
\begin{diagram}
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O
\arrow[r, dashed]
\arrow[d, "\theta"', "\cong"]
&[50pt]
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O
\\
\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} B_m \times \underbrace{O \times \cdots \times O}_{\ell \text{ times}}
\arrow[r, "{\sigma \times \langle \pi_{h(1)}, \pi_{h(2)}, \dots, \pi_{h(n)} \rangle}"']
&
\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n \times \underbrace{O \times \cdots \times O}_{k \text{ times}}
\arrow[u, "\theta^{-1}"', "\cong"]
\end{diagram}
where $\pi_{j}$ is the projection $O \times \cdots \times O \to O$ onto the $j^{\text{th}}$ coordinate.
\end{numbered}
\begin{theorem}[Universal property of freely extending by a basic type]
\label{thmAdjoinTypeUniversalProperty}
Let $(\mathbb{C}, p)$ be a natural model and let $(\mathbb{D}, q)$ be natural models with distinguished basic type $O \in \nmty{V}(\star)$. For each morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, there is a unique morphism of natural models $F^{\sharp} : (\mathbb{C}_X, p_X) \to (\mathbb{D}, q)$ such that $F^{\sharp} \circ I = F$ and $F^{\sharp}X = O$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
\\
(\mathbb{C}_X, p_X)
\arrow[ur, dashed, "F^{\sharp}"']
&
\end{diagram}
\end{theorem}
\begin{proof}
Let $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$ be a morphism of natural models, and define $F^{\sharp} : (\mathbb{C}_X, p) \to (\mathbb{D}_X, q)$ as follows. The underlying functor $F^{\sharp} : \mathbb{C}_X \to \mathbb{D}$ is defined on objects by
$$F^{\sharp}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = F\Gamma ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_0 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_1 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \dots ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O}_{k_n \text{ times}}$$
and on morphisms $(\sigma, h) : (\Delta, \ell_0, B_1, \ell_1, \dots, B_m, \ell_m) \to (\Gamma, k_0, A_1, k_1, \dots, A_m, k_m)$ by letting $F^{\sharp}(\sigma, h)$ be the morphism
$$F\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_m \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O$$
induced by $F\sigma : F\Delta \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FB_m \to F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n$ and $h : n \to m$ as described in \Cref{numExtraSwapIsomorphisms}. Functoriality of $F^{\sharp}$ then follows from functoriality of $F$ and the fact that $F^{\sharp}$ acts by conjugating by isomorphisms.
Given an object $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n)$, define
$$(\varphi^{\sharp})_{\vec \Gamma} = [O, \varphi_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A}] : \{ X \} + \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A) \to \nmty{V}(F^{\sharp}\vec \Gamma)$$
Thus we have $F^{\sharp}X = O$ and $F^{\sharp}A = FA$ for each $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A)$. Likewise, define
$$(\nmmk{\varphi}^{\sharp})_{\vec \Gamma} = q + \nmmk{\varphi}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A} : k + \nmty{V}(F^{\sharp} \vec \Gamma)$$
where $q : k \to \nmty{V}(F^{\sharp} \vec \Gamma)$ is defined for $j \in k$ by letting $q(j)$ be the (suitably weakened) element $\nmv{O}$ of $\nmtm{V}(F\vec\Gamma)$ corresponding with the $j^{\text{th}}$ copy of $O$ in $F\vec\Gamma$. Thus we have $F^{\sharp}j = \nmv{O}$ (corresponding with the appropriate copy of $O$), and $F^{\sharp}a = Fa$ for each $a \in \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A; A)$.
To see that $(F^{\sharp}, \varphi^{\sharp}, \nmmk{\varphi}^{\sharp})$ preserves representability data, let $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_X)$ and let $A \in \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A) \subseteq \nmty{U}_X(\vec \Gamma)$. Then
\begin{align*}
& F^{\sharp}\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}A && \\
&= (F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA && \text{by definition of $F^{\sharp}$ and $\varphi^{\sharp}$} \\
&= F^{\sharp}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n, A, 0) && \text{by definition of $F^{\sharp}$} \\
&= F^{\sharp}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A) && \text{by definition of context extension in $(\mathbb{C}_X, p_X)$}
\end{align*}
and likewise we have
\begin{align*}
& F^{\sharp}\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}X && \\
&= (F\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} FA_n \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec O) \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} O \\
&= F^{\sharp}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n + 1) && \\
&= F^{\sharp}(\vec \Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} X)
\end{align*}
so $F^{\sharp}$ preserves context extension.
Finally, by the construction of the action of $F^{\sharp}$ on morphisms, we immediately have that $F^{\sharp}(\nmp{A}, \mathrm{id}_k) = \nmu{FA} = \nmu{F^{\sharp}(A)}$, $F^{\sharp}(\mathrm{id}_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \vec A}, h) = \nmu{O}$, $F^{\sharp}(\nmq{A}) = \nmv{FA} = \nmv{F^{\sharp}A}$, and $F^{\sharp}(k) = \nmv{O}$. So $F^{\sharp}$ is a morphism of natural models.
We have already remarked that $F^{\sharp}(X) = O$, as required.
To see that $F^{\sharp}$ is unique, we prove that it is determined entirely by $F : (\mathbb{C}_X, p_X) \to (\mathbb{D}, q)$ and the value $F^{\sharp}X$.
For each $\vec \Gamma = (\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) \in \mathrm{ob}(\mathbb{C}_X)$, we have by preservation of context extension that
$$F^{\sharp}(\Gamma, k_0, A_1, k_1, \dots, A_n, k_n) = F^{\sharp}(\Gamma,0) ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{F^{\sharp}X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}X}_{k_0 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ F^{\sharp}A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{F^{\sharp}X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}X}_{k_1 \text{ times}} ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \dots ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}A_n ~ \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} ~ \underbrace{F^{\sharp}X \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} F^{\sharp}X}_{k_n \text{ times}}$$
But $F^{\sharp}(\Gamma,0) = F\Gamma$ and $F^{\sharp}A_i = FA_i$ for each $i$, and so the action of $F^{\sharp}$ on the objects of $\mathbb{C}_X$ is determined by $F$ and $F^{\sharp}X$. The action of $F^{\sharp}$ on morphisms is similarly determined, and hence so is the entire functor $F^{\sharp} : \mathbb{C}_X \to \mathbb{D}$.
Moreover, we have
$$\varphi^{\sharp}_{\vec \Gamma} = F^{\sharp}X + \varphi_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n} : \{ X \} + \nmty{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n) \to \nmty{V}(F^{\sharp}\vec \Gamma)$$
so that $\varphi^{\sharp}$ is determined by $F^{\sharp}X$ and $F$; and
$$\nmmk{\varphi}^{\sharp}_{\vec \Gamma} = q + \varphi_{\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n} : k + \nmtm{U}(\Gamma \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_1 \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} \dots \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} A_n) \to \nmtm{V}(F^{\sharp}\vec \Gamma)$$
where $k = k_0 + k_1 + \cdots + k_n$, and $q : k \to \nmtm{V}(F^{\sharp}\vec \Gamma)$ is defined by letting $q(j)$ be the (appropriately weakened) element $\nmv{F^{\sharp}X}$ of $\nmtm{V}(F^{\sharp}\vec\Gamma)$ corresponding with the $j^{\text{th}}$ copy of $F^{\sharp}X$ in $F^{\sharp}\vec \Gamma$.
Hence the entire morphism $(F^{\sharp}, \varphi^{\sharp}, \nmmk{\varphi}^{\sharp})$ is determined by $F$ and $F^{\sharp}X$, as required.
\end{proof}
As a consequence of \Cref{thmAdjoinTypeUniversalProperty}, if $(\mathbb{D}, q)$ is a natural model with distinguished basic type $O \in \nmty{U}(\diamond)$, then specifying a morphism of natural models $(\mathbb{C}_X, p_X) \to (\mathbb{D}, q)$ preserving distinguished basic types is equivalent to specifying a morphism $(\mathbb{C}, p) \to (\mathbb{D}, q)$.
\begin{corollary}[Functoriality of freely extending by a basic type]
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models. For every morphism $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, there is a unique morphism of natural models $F_{\mathsf{ty}} : (\mathbb{C}_X, p_X) \to (\mathbb{D}_Y, q_Y)$ such that $F_{\mathsf{ty}} \circ I = I \circ F$ and $FX=Y \in \nmty{V}_Y(\star_Y)$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
\arrow[d, "I"]
\\
(\mathbb{C}_X, p_X)
\arrow[r, "F_X"']
&
(\mathbb{D}_Y, q_Y)
\end{diagram}
Moreover, the assignments $(\mathbb{C}, p) \mapsto (\mathbb{C}_X, p_X)$ and $F \mapsto F_{\mathsf{ty}}$ define a functor $(-)_{\mathsf{ty}} : \mathbf{NM} \to \mathbf{NM}_{\mathsf{ty}}$ which is left adjoint to the forgetful functor $\mathbf{NM}_{\mathsf{ty}} \to \mathbf{NM}$, and the component at $(\mathbb{C}, p)$ of the unit of this adjunction is $I : (\mathbb{C}, p) \to (\mathbb{C}_X, p_X)$.
\end{corollary}
\begin{proof}
Define $F_{\mathsf{ty}} = (I \circ F)^{\sharp}$. Then by \Cref{thmAdjoinTypeUniversalProperty} we have that $F_{\mathsf{ty}}$ is the unique morphism of natural models preserving the distinguished basic type and satsifying $F_{\mathsf{ty}} \circ I = (I \circ F)^{\sharp} \circ I = I \circ F$. Functoriality of $(-)_{\mathsf{ty}}$ follows from uniqueness, and the fact that it is left adjoint to the forgetful functor with the unit as described is exactly the content of \Cref{thmAdjoinTypeUniversalProperty}.
\end{proof}
\begin{construction}[Type insertion morphism]
\index{type insertion morphism}
Let $(\mathbb{C}, p)$ be a natural model and let $O \in \nmty{U}(\diamond)$. The \textbf{type insertion morphism} for $O$ is the unique morphism of natural models $S : (\mathbb{C}_X, p_X) \to (\mathbb{C}, p)$ such that $SX=O$ and $S \circ I = \mathrm{id}_{(\mathbb{C}, p)}$.
\end{construction}
\begin{verification}
Take $S = (\mathrm{id}_{(\mathbb{C}, p)})^{\sharp}$, where the distinguished element of $\nmty{U}(\diamond)$ is $O$.
\end{verification}
\begin{corollary}
Let $(\mathbb{C}, p)$ and $(\mathbb{D}, q)$ be natural models and let $O \in \nmty{V}(\star)$. For each morphism of natural models $F : (\mathbb{C}, p) \to (\mathbb{D}, q)$, the morphism $F^{\sharp} : (\mathbb{C}_X, p_X) \to (\mathbb{D}, q)$ of \Cref{thmAdjoinTypeUniversalProperty} factors as $F^{\sharp} = S \circ F_{\mathsf{ty}}$, where $S : (\mathbb{D}_Y, q_Y) \to (\mathbb{D}, q)$ is the type insertion morphism for $O$.
\begin{diagram}
(\mathbb{C}, p)
\arrow[r, "F"]
\arrow[d, "I"']
&
(\mathbb{D}, q)
\arrow[d, "I"]
\arrow[dr, equals]
\\
(\mathbb{C}_X, p_X)
\arrow[r, "F_{\mathsf{ty}}" description]
\arrow[rr, bend right=15, dashed, "F^{\sharp}"']
&
(\mathbb{D}_Y, q_Y)
\arrow[r, "S" description]
&
(\mathbb{D}, q)
\end{diagram}
\end{corollary}
\begin{proof}
Evidently $S \circ F_{\mathsf{ty}}$ is a morphism of natural models which preserves distinguished basic types and extends $F$, so this follows by uniqueness of $F^{\sharp}$.
\end{proof}
\begin{numbered}
The results in this section can be generalised to freely extend a natural model $(\mathbb{C}, p)$ by an $I$-indexed family of basic types $\vec X = \seqbn{X_i}{i \in I}$ for a given index set $I$. If $I$ is finite, we can simply iterate \Cref{cnsCategoryContextsExtendedByType}, but it is in fact possible for index sets of arbitrary cardinality. The new category of contexts $\mathbb{C}_{\vec X}$ is equivalent to $\mathbb{C} \times (\mathbf{Fin} \slice{I})\op$, and the representability data is similarly transported from that of $(\mathbb{C}, p)$ and of $(\mathbb{F}_I, p_I)$ (see \Cref{cnsFreeNaturalModelKappaBasicTypes}). The details of this construction are omitted in this thesis, as they are even more cumbersome.
\end{numbered}
\subsection*{Adjusting adjustments}
The definition of an \textit{adjustment} $\alpha : \varphi \pRrightarrow \psi$ between morphisms of polynomials (\Cref{defAdjustment}) is motivated by the observation that adjustments between cartesian morphisms of polynomials correspond with natural transformations between the full and faithful internal functors induced by those cartesian morphisms. A consequence is that there is at most one adjustment between any parallel pair of cartesian morphisms of polynomials. Unfortunately, we were not able to prove that adjustments between \textit{arbitrary} morphisms of polynomials correspond with anything meaningful, or indeed that they form the 3-cells of a tricategory $\mathfrak{Poly}_{\mathcal{E}}$. So although the definition we provided captures \textit{some} notion of 3-cell, which works for our purposes, a worthwhile goal in future work is to find a more suitable (and likely more general) notion of 3-cell, or to demonstrate that adjustments do in fact form a meaningful notion of 3-cell.
\subsection*{Generalised natural models}
Our work relating natural models with polynomials in \Cref{chPolynomialsRepresentability} was done for the most part without relying on any aspects of $\widehat{\mathbb{C}}$ other than its locally cartesian closed structure. It may therefore be possible to extend the definition of natural model to a more general class of categories, so that a natural model is a morphism $p : \nmtm{U} \to \nmty{U}$ in (say) a cocomplete, locally cartesian closed category $\mathcal{E}$, subject to certain conditions that are equivalent to representability in the case when $\mathcal{E} = \widehat{\mathbb{C}}$ for some small category $\mathbb{C}$. In order to make this definition meaningful, it would need to be established how to interpret the rules governing dependent type theory in such an object.
Along similar lines, recall that the main challenge of \Cref{secPolynomialPseudomonads} was to find a notion of \textit{equivalence} with respect to which a natural model admitting certain type theoretic structure gave rise to a \textit{pseudo}monad, since we discovered that it does not give rise to a strict monad. If we were to define the notion of a natural model within homotopy type theory, say, then it may be the case that the conditions for a natural model to admit a unit type and dependent sum types can now be expressed in terms of (homotopy) pullbacks yielding a monad (up to propositional equality). If this is the case, then the results of \Cref{chPolynomialsRepresentability} could be recast in terms of locally cartesian closed \textit{quasi}categories, with the rules for polynomial monads and algebras holding up to propositional equality.
\subsection*{Free natural models}
In \Cref{secExtSigma} we remarked that the set $\mathrm{Tree}(S)$ of finite rooted binary trees with leaves labelled by elements of a set $S$ is obtained as an initial algebra for the endofunctor $X \mapsto S + X \times X$. Given a natural model $(\mathbb{C}, p)$, it appears that the natural model $(\mathbb{C}_{\Sigma}, p_{\Sigma})$ of \Cref{cnsFreeNMAdmittingSigmaTypes} is an initial algebra for the `endofunctor' $f \mapsto p + f \cdot f$, where $\cdot$ refers to polynomial composition. Indeed, there is a morphism of natural models $(\mathbb{C}, p) \to (\mathbb{C}_{\Sigma}, p_{\Sigma})$ (this is \Cref{lemInclusionMorphismSigma}) and there is a cartesian morphism of polynomials $p_{\Sigma} \cdot p_{\Sigma} \pto p_{\Sigma}$ since $p_{\Sigma}$ admits dependent sum types (\Cref{cnsFreeNMAdmittingSigmaTypes}, \Cref{thmAdmittingSigmaTypes}), and these morphisms satisfy nice universal properties. The problem is to find the category in which $f \mapsto p + f \cdot f$ defines an endofunctor with respect to which $(\mathbb{C}_{\Sigma}, p_{\Sigma})$ is an initial algebra.
This train of thought could be explored even further. Just as polynomial endofunctors on $\mathbf{Set}$ generalise those of the form $X \mapsto A_0 + A_1 \times X + {\cdots} + A_n \times X^n$, it would be worthwhile to explore whether there is a similar generalisation of endofunctors of the form
$$f \mapsto a_0 + a_1 \cdot f + a_2 \cdot f \cdot f + {~\cdots~} + a_n \cdot f \cdot {\dots} \cdot f$$
where $a_0,\dots,a_n,f$ denote (suitable) morphisms in a (suitable) locally cartesian closed category, and where $\cdot$ is polynomial composition. With such a notion established, it could be applied to dependent type theory to see if a natural model can be freely extended by other kinds of type theoretic structure by taking an initial algebra for such an endofunctor.
Much work remains to be done on the construction of free natural models. For example, it remains an open problem to construct a left adjoint to the forgetful functor $\mathbf{NM}_{\Pi} \to \mathbf{NM}$, thus obtaining the free natural model admitting dependent product types on a given natural model $(\mathbb{C}, p)$. Furthermore, as discussed at the end of \Cref{secInterpretationsInitiality}, it remains open to find a general way to compose these free functors.
\subsection*{Term models and interpretations}
The free natural models studied in \Cref{chSemantics} were \textit{algebraic}, rather than \textit{logical}, constructions. An important task for the future is to define a logical notion of \textit{interpretation} of a theory $\mathbb{T}$ in a natural model $(\mathbb{C}, p)$, and to construct the \textit{term model} on a given dependent type theory $\mathbb{T}$, according to the following schema.
\begin{schema}[Term model of a type theory $\mathbb{T}$]
\label{schTermModel}
Let $\mathbb{T}$ be a dependent type theory. The \textbf{term model} of $\mathbb{T}$ is the natural model $(\mathbb{C}_{\mathbb{T}}, p_{\mathbb{T}} : \nmtm{U}_{\mathbb{T}} \to \nmty{U}_{\mathbb{T}})$ defined as follows.
\begin{itemize}
\item The underlying \textbf{category} $\mathbb{C}_{\mathbb{T}}$ has as its set of objects the quotient $\mathsf{Ctx}_{\mathbb{T}} / {\equiv_{\mathsf{Ctx}}}$, where $\mathsf{Ctx}_{\mathbb{T}}$ is the set of all well-formed contexts in $\mathbb{T}$ and $\equiv_{\mathsf{Ctx}}$ identifies $\Gamma = {x_1:A_1,x_2:A_2, \dots, x_m:A_m}$ and $\Delta = {y_1:a_1,y_2:A_2,\dots,y_n:A_n}$ if and only if $m=n$ and $x_1:A_1, \dots x_{i-1}:A_{i-1} \vdash A_i=B_i$ is provable in $\mathbb{T}$ for each $i$. Given contexts $\Gamma = {x_1:A_1,x_2:A_2, \dots, x_m:A_m}$ and $\Delta = {y_1:a_1,y_2:A_2,\dots,y_n:A_n}$, the hom set $\mathbb{C}_{\mathbb{T}}([\Delta], [\Gamma])$ is the quotient $\mathsf{Sub}_{\mathbb{T}}(\Delta,\Gamma)/{\equiv_{\mathsf{Sub}}}$, where $\mathsf{Sub}_{\mathbb{T}}(\Delta, \Gamma)$ is the set of all well-formed substitutions $(t_1,t_2,\dots,t_m)$ from $\Delta$ to $\Gamma$ (see \Cref{secTypesForTheWorkingMathematician}), and $\equiv_{\mathsf{Sub}}$ identifies $(t_1,t_2,\dots,t_m)$ with $(t'_1,t'_2,\dots,t'_m)$ whenever $\Delta \vdash t_i=t'_i : A_i(t_1,\dots,t_{i-1})$ is provable in $\mathbb{T}$ for each $i$.
\item The distinguished \textbf{terminal object} of $\mathbb{C}_{\mathbb{T}}$ is the ($\equiv_{\mathsf{Ctx}}$-equivalence class of the) empty context.
\item The \textbf{presheaf of types} $\nmty{U}_{\mathbb{T}}$ is defined on objects by letting $\nmty{U}_{\mathbb{T}}([\Gamma])$ be the quotient $\mathsf{Type}_{\mathbb{T}}(\Gamma) / {\equiv_{\mathsf{Type}}}$, where $\mathsf{Type}_{\mathbb{T}}(\Gamma)$ is the set of well-formed types in context $\Gamma$ and $\equiv_{\mathsf{Type}}$ identifies $A$ with $A'$ whenever $\Gamma \vdash A=A'$ is provable in $\mathbb{T}$; and $\nmty{U}_{\mathbb{T}}$ is defined on morphisms by letting $\nmty{U}_{\mathbb{T}}([\sigma])([A]) = [A[\sigma]]$.
\item Likewise, the \textbf{presheaf of terms} $\nmtm{U}_{\mathbb{T}}$ is defined on objects by letting $\nmtm{U}_{\mathbb{T}}([\Gamma])$ be the quotient $\mathsf{Term}_{\mathbb{T}}(\Gamma) / {{\equiv}_{\mathsf{Term}}}$, where $\mathsf{Term}_{\mathbb{T}}(\Gamma)$ is the set of well-formed terms in context $\Gamma$ and $\equiv_{\mathsf{Term}}$ identifies $a$ with $a'$ whenever the types of $a$ and $a'$ are identified by $\equiv_{\mathsf{Type}}$ and $\Gamma \vdash a = a' : A$ is provable in $\mathbb{T}$.
\item The \textbf{typing natural transformation} $p_{\mathbb{T}} : \nmtm{U}_{\mathbb{T}} \to \nmty{U}_{\mathbb{T}}$ is defined componentwise by letting $(p_{\mathbb{T}})_{[\Gamma]}([a])$ be $[A]$ for the unique $[A] \in \nmty{U}_{\mathbb{T}}([\Gamma])$ such that $\Gamma \vdash a : A$ is provable in $\mathbb{T}$.
\item The \textbf{representability data} for $(\mathbb{C}_{\mathbb{T}}, p_{\mathbb{T}})$ is defined for $[\Gamma] = [x_1:A_1, \dots, x_n:A_n] \in \mathrm{ob}(\mathbb{C}_{\mathbb{T}})$ and $[A] \in \nmty{U}_{\mathbb{T}}([\Gamma])$ as follows.
\begin{itemize}
\item Let $[\Gamma] \mathbin{\resizebox{2.5pt}{2.5pt}{$\bullet$}} [A] = [\Gamma, x:A]$, where $x$ is a fresh variable;
\item Let $\nmp{A} = [(x_1,\dots,x_n)] : [\Gamma, x:A] \to [\Gamma]$;
\item Let $\nmq{A} = [x] \in \nmtm{U}_{\mathbb{T}}([\Gamma, x:A], [A])$.
\end{itemize}
\item If the theory $\mathbb{T}$ admits a unit type, dependent sum types, dependent product types, or some combination thereof, define the corresponding structure on $\mathbb{C}_{\mathbb{T}}$ in the evident way. \qed
\end{itemize}
\end{schema}
With this done, it should be the case that the term model is initial in $\mathbf{NM}_{\mathbb{T}}$, and from this it would follow that interpretations of $\mathbb{T}$ in a (suitably structured) natural model $(\mathbb{C}, p)$ correspond with (structure preserving) morphisms of natural models $(\mathbb{C}_{\mathbb{T}}, p_{\mathbb{T}}) \to (\mathbb{C}, p)$. The parenthetical remarks about structure depend the \textit{doctrine} in which the theory $\mathbb{T}$ lives---for example, if $\mathbb{T}$ is a theory in the doctrine of dependent type theories with a unit type and dependent sum types, then the setting for interpretations of $\mathbb{T}$ is the category of natural models admitting a unit type and dependent sum types.
\chapter*{Introduction}
\markboth{Introduction}{}
\addcontentsline{toc}{chapter}{Introduction}
\input{thesis/frontmatter/introduction.tex}
\chapter{Background}
\label{chBackground}
\input{thesis/ch1-background/_background.tex}
\chapter{Categories of natural models}
\label{chCategoriesOfNaturalModels}
\input{thesis/ch2-categories-of-natural-models/_categories-of-natural-models.tex}
\chapter{Polynomials and representability}
\label{chPolynomialsRepresentability}
\input{thesis/ch3-polynomials-representability/_polynomials-representability.tex}
\chapter{Natural model semantics}
\label{chSemantics}
\input{thesis/ch4-semantics/_semantics.tex}
\frontbackchapterstyle
\chapter{Future work}
\label{chReflection}
\input{thesis/ch5-reflection/_reflection.tex}
\backmatter
\newpage
\clearpage
\addcontentsline{toc}{chapter}{Index}
\printindex
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{alpha}
|
\section{Introduction and main results}
In this paper, we assume that the reader is familiar with the basic notations of Nevanlinna's value distribution theory, see \cite{h3,y1,y2}. In the following, a meromorphic function $f(z)$ means meromorphic on $\mathbb{C}^{n}, n\in \mathbb{N}^{+}$. By $S(r,f)$, we denote any quantity satisfying $S(r,f)=o(T(r,f))$ as $r\rightarrow\infty$, outside of an exceptional set of finite linear measure.
Let $f(z)$ be a meromorphic function on $\mathbb{C}^{n}$, we define the total derivative of $f(z)$ by $D(f(z))=\sum_{i=1}^{n}z_{i}f_{z_{i}}(z)$, where $z=(z_{1}, z_{2},\ldots, z_{n})\in\mathbb{C}^{n}$. And $f_{z_{i}}$ is the partial derivative of $f$ concerning $z_{i} (i=1,2\ldots,n)$. For any positive integer $k$, the $k$-th-order total derivative $D^{k}f$ of $f(z)$ is defined by $D^{k+1}=D(D^{k}f)$.
A meromorphic function $a$ on $\mathbb{C}^{n}$ satisfying $T(r,a)=S(r,f)$ is called a small function of $f$. We say that two nonconstant meromorphic functions on $\mathbb{C}^{n}$ $f$ and $g$ share small function $a$ CM(IM) if $f-a$ and $g-a$ have the same zeros counting multiplicities (ignoring multiplicities).
Suppose $|z|=(|z_{1}|^{2}+|z_{2}|^{2}+\cdots|z_{n}|^{2})^{\frac{1}{2}}$ for $z=(z_{1},z_{1},\ldots,z_{n})\in \mathbb{C}^{n}$. For $r>0$, denote
$$B_{n}(r):=\{z\in \mathbb{C}^{n}||z|<r\}, \quad S_{n}(r):=\{z\in \mathbb{C}^{n}||z|<r\}.$$
Let $d=\partial+\overline{\partial}$, $d^{c}=(4\pi\sqrt{-1})^{-1}(\partial-\overline{\partial})$. Then $dd^{c}=\frac{\sqrt{-1}}{2\pi}\partial\overline{\partial}$. We write
$$\omega_{n}(z):=(dd^{c}\log|z|^{2}),\quad \sigma_{n}(z):=d^{c}\log|z|^{2}\wedge\omega_{n}^{n-1}(z),$$
for $z\in \mathbb{C}^{n}$ a nonzero complex number.
$$\upsilon_{n}(z)=dd^{c}|z|^{2}, \quad \rho_{n}(z)=\upsilon_{n}^{n}(z),$$
for $z\in\mathbb{C}$.
Thus $\sigma_{n}(z)$ defines a positive measure on $S_{n}(r)$ with total measure one and $\rho_{n}(z)$ is Lebesgue measure on $\mathbb{C}^{n}$ normalized such that $B_{n}(r)$ has measure $r^{2n}$. Moreover, when we restrict $\upsilon_{n}(z)$ to $S_{n}(r)$, we obtain that
$$\upsilon_{n}(z)=r^{2}\omega_{n}(z)\quad and \quad \int_{B_{n}(r)}\omega_{n}^{n}=1.$$
Let $f$ be a meromorphic function on $\mathbb{C}^{n}$, i.e., $f$ can be written as a quotient of two holomorphic functions which are relatively prime. Thus $f$ can be regarded as a meromorphic map $f: \mathbb{C}^{n}\rightarrow\mathbb{P}^{1}$ such that $f^{-1}(\infty)\neq\mathbb{C}^{n}$; i.i. $f(z)=[f_{0}(z),f_{1}(z)]$ and $f_{0}$ is not identity equal to zero. Clearly the meromorphic map $f$ is not defined on the set $I_{f}\{z\in\mathbb{C}^{n}; f_{0}(z)=f_{1}(z)=0\}$, which is called the set of indeterminacy of $f$, and $I_{f}$ is an analytic subvariety of $\mathbb{C}^{n}$ with codimension not less than $2$. Thus we can define, for $z \in \mathbb{C}^{n}\backslash I_{f}$,
$$f^{*}\omega=dd^{c}\log(|f_{0}|^{2}+|f_{1}|^{2}),$$
where $\omega$ is the Fubini-Study form. Therefore, for any measurable set $X\subset \mathbb{C}^{n}$, integrations of $f$ over $X$ may be defined as integrations over $X\backslash I_{f}$.
For all $0<s<r$, the characteristic function of $f$ is defined by
$$T_{f}(r,s)=\int_{s}^{r}\frac{1}{t^{2n-1}}\int_{B_{n}(t)}f^{*}(\omega)\wedge\omega_{n}^{n-1}dt.$$
Let $a\in \mathbb{P}^{1}$ with $f^{-1}(a)\neq\mathbb{C}^{n}$ and $Z_{a}^{f}$ be an $a-divisor$ of $f$. We write $Z_{a}^{f}(t)=\overline{\mathbb{B}}_{n}(t)\bigcap Z_{a}^{f}$. Then the pre-counting function and counting function with respect to $a$ are defined, respectively, as (if $0\not\in Z_{a}^{f}$)
$$n_{f}(t,a)=\int_{Z_{a}^{f}(t)\omega^{n-1}} \quad and \quad N_{f}(r,a)=\int_{0}^{r}n_{f}(t,a)\frac{dt}{t}.$$
Therefore Jensen's formula is, if $f(0)\neq0$, for all $r\in \mathbb{R}^{+}$,
$$N_{f}(r,0)-N_{f}(r,\infty)=\int_{S_{n}(r)}\log|f(z)|\sigma_{n}(z)-\log\log|f(0)|.$$
Let $a\in \mathbb{P}^{1}$ with $f^{-1}(a)\neq\mathbb{C}^{n}$, then we define the proximity function as
\begin{eqnarray*}
\begin{aligned}
m_{f}(r,a)&=\int_{S_{n}(r)}\log^{+}\frac{1}{|f(z)-a|}\sigma_{n}(z), if \quad a\neq\infty;\\
&=\int_{S_{n}(r)}\log^{+}|f(z)|\sigma_{n}(z), if \quad a=\infty.
\end{aligned}
\end{eqnarray*}
The first main theorem states that, if $f(0)\neq a,\infty$,
$$T_{f}(r,s)=N_{f}(r,s)+m_{f}(r,s)-\log\frac{1}{|f(z)-a|}$$
where $0<s<r$.
In this paper, we write $N(r,f):=N_{f}(r,\infty)$, $N(r,\frac{1}{f}):=N_{f}(r,0)$, $m_{f}(r,0):=m(r,\frac{1}{f})$, $m_{f}(r,\infty):=m(r,f)$ and $T_{f}(r,s)=T(r,f)$. Hence $T(r,f)=m(r,f)+N(r,f)$. And we can deduce the First Fundamental Theorem of Nevanlinna on $\mathbb{C}^{n}$
\begin{align}
T(r,f)=T(r,\frac{1}{f-a})+O(1).
\end{align}
More details can be seen in \cite{r,y3}.
In the following, we define the differential polynomials of a meromorphic function. Let $f(z)$ be a non-constant entire function on $\mathbb{C}^{n}$ and
\begin{align}
g(z)=b_{-1}+\sum_{i=0}^{n}b_{i}D^{k_{i}}f(z),
\end{align}
where $b_{-1}$ and $b_{i} (i=0\ldots,n)$ are small meromorphic functions of $f$, $k_{i}\geq0 (i=0\ldots,n)$ are integers.
In 1929, Nevanlinna \cite{y1} proved the following celebrated five-value theorem, which stated that two nonconstant meromorphic functions must be identity equal if they share five distinct values in the extended complex plane.
Next, Rubel and Yang \cite{ruy} considered the uniqueness of an entire function and its derivative. They proved.
\
{\bf Theorem A} \ Let $f(z)$ be a non-constant entire function, and let $a_{1}, a_{2}$ be two finite distinct complex values. If $f(z)$ and $f'(z)$
share $a_{1}, a_{2}$ CM, then $f(z)\equiv f'(z)$.
Li Ping and Yang Chung-Chun \cite {ly2} improved Theorem A and proved
\
{\bf Theorem B} \ Let $f(z)$ be a non-constant entire function, let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}\not\equiv\infty, a_{2}\not\equiv\infty$ be two distinct small meromorphic functions of $f$. If $f$ and $g$ share $a_{1}$ CM, and $a_{2}$ IM. Then either $f\equiv g$ or
$$f\equiv a_{2}+(a_{1}-a_{2})(1-e^{\alpha})^{2},$$
and
$$g\equiv 2a_{2}-a_{1}+(a_{1}-a_{2})e^{\alpha},$$
where $\alpha$ is a non-constant entire function.
With the establishment of logarithmic derivative lemma in several variables by A.Vitter \cite{v} in 1977, a number of papers about Nevanlinna Theory in several variables were published \cite{hy2,hy3,y3}. In 1996, Hu-Yang \cite{hy2} generalized Theorem 1 in the case of higher dimension. They proved.
\
{\bf Theorem C} \ Let $f(z)$ be a transcendental entire function on $\mathbb{C}^{n}$, and let $a, b$$\in \mathbb{C}^{n}$ be two finite distinct complex values. If $f(z)$ and $D_{u}f(z)$ share $a, b$ CM, then $f(z)\equiv D_{u}f(z)$, where $D_{u}f(z)$ is a directional derivative of $f(z)$ along a direction $u\in S^{2n-1}$.
In this paper, all the meromorphic functions are defined on $\mathbb{C}^{n}$. We improve Theorem C and generalize Theorem B to higher dimensional space $\mathbb{C}^{n}$.
\
{\bf Theorem 1}
Let $f(z)$ be a non-constant entire function , let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}, a_{2}$ be two distinct finite complex numbers. If $f(z)$ and $g(z)$ share $a_{1}$ CM, and $a_{2}$ IM. Then either $f(z)\equiv g(z)$ or
$$f(z)\equiv a_{2}+(a_{1}-a_{2})(e^{p(z)}-1)^{2},$$
and
$$g(z)\equiv a_{1}+(a_{1}-a_{2})(e^{p(z)}-2),$$
where $p(z)$ is a non-constant entire function.
\
{\bf Example} When $n=1$, let $f(z)=e^{2z}-2e^{z}+2$ and $g(z)=2-f(z)+\frac{1}{2}f'(z)=e^{z}$. Then it is an easy work to check that $f(z)$ and $g(z)$ share $2$ CM, and share $1$ IM.
We can see from above example that the second case in Theorem exists.
\section{Some Lemmas}
\begin{lemma}\label{211}\cite{v} Let $f(z)$ is a non-constant meromorphic function. Then for any $\varepsilon>0$ and any positive integer $k$
$$m(r,\frac{D^{k}f}{f})=O(rlogT(r,f)),$$
for all r outside of a possible exceptional set E with $\int_{E}dlogr<\infty$.
\end{lemma}
\begin{lemma}\label{221}\cite{hy3} Let $f(z)$ is a non-constant meromorphic function, and let $a_{1},\ldots,a_{q})\in Z_{+}^{n}$ be different points in $\mathbb{P}^{1}$. Then
$$(q-2)T(r,f)\leq\sum_{i=1}^{q}\overline{N}(r,\frac{1}{f-a_{i}})+S(r,f).$$
\end{lemma}
\begin{lemma}\label{24l}\cite{hly}
Suppose $f_{1}(z),f_{2}(z)$ are two noconstant meromorphic functions on $\mathbb{C}^{n}$, then
$$N(r,f_{1}f_{2})-N(r,\frac{1}{f_{1}f_{2}})=N(r,f_{1})+N(r,f_{2})-N(r,\frac{1}{f_{1}})-N(r,\frac{1}{f_{2}}).$$
\end{lemma}
\begin{lemma}\label{27l} Let $f(z)$ be a non-constant entire function, let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}, a_{2}$ be two distinct finite complex numbers. If
$$H=\frac{Df}{(f-a_{1})(f-a_{2})}-\frac{Dg}{(g-a_{1})(g-a_{2})}\equiv0,$$
And $f$ and $g$ share $a_{1}$ CM, and $a_{2}$ IM, then either $2T(r,f)\leq\overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f)$, or $f=g$.
\end{lemma}
\begin{proof}
Integrating $H$ which leads to
$$\frac{g-a_{2}}{g-a_{1}}=C\frac{f-a_{2}}{f-a_{1}},$$
where $C$ is a nonzero constant.\\
If $C=1$, then $f=g$. If $C\neq1$, then from above, we have
$$\frac{a_{1}-a_{2}}{g-a_{1}}\equiv \frac{(C-1)f-Ca_{2}+a_{1}}{f-a_{1}},$$
and
$$T(r,f)=T(r,g)+S(r,f)+S(r,g).$$
It follows that $N(r,\frac{1}{f-\frac{Ca_{2}-a_{1}}{C-1}})=N(r,\frac{1}{a_{1}-a_{2}})=S(r,f)$. Then by Lemma 2.4,
\begin{eqnarray*}
\begin{aligned}
2T(r,f)&\leq \overline{N}(r,f)+\overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+\overline{N}(r,\frac{1}{f-\frac{Ca_{2}-a_{1}}{C-1}})+S(r,f)\\
&\leq \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f),
\end{aligned}
\end{eqnarray*}
that is $2T(r,f)\leq \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f)$.
\end{proof}
\begin{lemma}\label{28l} Let $f(z)$ be a non-constant entire function, let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}, a_{2}$ be two distinct finite complex numbers. If $f(z)$ and $g(z)$ share $a_{1}$ CM, and $N(r,\frac{1}{g(z)-(b_{-1}+b_{0}a_{1})})=S(r,f)$, then Then there are two meromorphic functions $h$ and $H$ on $\mathbb{C}^{n}$ such that either $g=Hh+G$, where $H\not\equiv0$ and $G=b_{-1}+b_{0}a_{1}$ are two small functions of $h$, or $T(r,h)=S(r,f)$.
\end{lemma}
\begin{proof}
Since $f(z)$ is a non-constant entire function, and $f(z)$ and $g(z)$ share $a_{1}$ CM, then there is a meromorphic function $h$ such that
\begin{align}
f-a_{1}=h(g-G)+h(G-a_{1}),
\end{align}
where $G(z)=b_{-1}+b_{0}a_{1}$, and the zeros and poles of $h$ come from the zeros and poles of $b_{-1}$ and $b_{i}(i=0,1,\ldots,n)$
Suppose on the contrary that $T(r,h)\neq S(r,f)$. Set $Q=g-G$. Do induction from (2.2) that
\begin{align}
Q=\sum_{i=0}^{n}b_{i}D^{k_{i}}(hQ)+\sum_{i=0}^{n}b_{i}D^{k_{i}}(h(G-a_{1})).
\end{align}
Easy to see that $Q\not\equiv0$. Then we rewrite (2.3) as
\begin{eqnarray}
1-\frac{\sum_{i=0}^{n}b_{i}D^{k_{i}}(h(G-a_{1}))}{Q}=Fh,
\end{eqnarray}
where
\begin{align}
F&=\frac{\sum_{i=0}^{n}b_{i}D^{k_{i}}(hQ)}{hQ}
\end{align}
Note that $N(r,\frac{1}{g-G})=N(r,\frac{1}{Q})=S(r,f)$, then
\begin{align}
T(r,F)&\leq\sum_{i=0}^{n}(T(r,\frac{D^{k_{i}}(hQ)}{Qh})+S(r,f)\notag\\
&\leq m(r,\frac{D^{k_{i}}(hQ)}{hQ})+N(r,\frac{D^{k_{i}}(hQ)}{hQ})+S(r,h)+S(r,f)\notag\\
&=S(r,h)+S(r,f).
\end{align}
By (2.1) and Lemma 2.1, we get
\begin{align}
T(r,h)&\leq T(r,f)+T(r,g)+S(r,f)\notag\\
&\leq 2T(r,f)+S(r,f).
\end{align}
Then it follows from (2.5) that $T(r,F)=S(r,f)$. Next we discuss two cases.
{\bf Case1.} \quad $e^{-p}-F\not\equiv0$. Rewrite (2.4) as
\begin{align}
h(h^{-1}-F)=\sum_{i=0}^{n}b_{i}D^{k_{i}}(h(G-a_{1})).
\end{align}
We claim that $F\equiv0$. Otherwise, it follows from (2.9) that $N(r,\frac{1}{h^{-1}-F})=S(r,f)$. Then use Lemma 2.4 to $h$ we can obtain
\begin{align}
T(r,h)&=T(r,h^{-1})+O(1)\notag\\
&\leq \overline{N}(r,h^{-1})+\overline{N}(r,\frac{1}{h^{-1}})+\overline{N}(r,\frac{1}{h^{-1}-F})\notag\\
&+O(1)=S(r,f),
\end{align}
which contradicts with assumption. Thus $F\equiv0$. Then by (2.9) we get
\begin{align}
g=\sum_{i=0}^{n}b_{i}D^{k_{i}}(h(G-a_{1}))+G=Hh+G,
\end{align}
where $H\not\equiv0$ is a small function of $h$.
{\bf Case2.} \quad $h^{-1}-F\equiv0$. Immediately, we get $T(r,h)=S(r,f)$.
\end{proof}
\begin{lemma}\label{291}\cite{hly}
Let $f$ be a non-constant meromorphic function, and $R(f)=\frac{P(f)}{Q(f)}$, where
$$P(f)=\sum_{k=0}^{p}a_{k}f^{k} \quad and \quad Q(f)=\sum_{j=0}^{q}a_{j}f^{q}$$
are two mutually prime polynomials in $f$. If the coefficients ${a_{k}}$ and ${b_{j}}$ are small functions of $f$ and $a_{p}\not\equiv0$, $b_{q}\not\equiv0$, then
$$T(r,R(f))=max\{p,q\}T(r,f)+S(r,f).$$
\end{lemma}
\begin{lemma}\label{22l}\cite{y1} Let $f$ be a non-constant meromorphic function, and let $P(f)=a_{0}f^{p}+a_{1}f^{p-1}+\cdots+a_{p}(a_{0}\neq0)$ be a polynomial of degree $p$ with constant coefficients $a_{j}(j=0,1,\ldots,p)$. Suppose that $b_{j}(j=0,1,\ldots,q)(q>p)$. Then
$$m(r,\frac{P(f)f'}{(f-b_{1})(f-b_{2})\cdots(f-b_{q})})=S(r,f).$$
\end{lemma}
\begin{lemma}\label{2110}\cite{hly}
Let $f$ be a non-constant meromorphic function, and let $P(f)=a_{0}+a_{1}f+a_{2}f^{2}+\cdots+a_{n}f^{n}$, where $a_{i}$ are small functions of $f$ for $i=0,1,\ldots,n$. Then
$$T(r,P(f))=nT(r,f)+S(r,f).$$
\end{lemma}
\section{The proof of Theorem 1 }
If $f\equiv g$, there is nothing to prove. Suppose $f\not\equiv g$. Since $f$ is a nonzero entire function, $f$ and $g$ share $a_{1}$ CM, then we get
\begin{align}
\frac{g-a_{1}}{f-a_{1}}=q,
\end{align}
where $q$ is a meromorphic function, and (2.2) implies $h=\frac{1}{q}$.\\
Since $f$ and $g$ share $a_{1}$ CM and share $a_{2}$ IM, then Lemma 2.1 and Lemma 2.2 we have
\begin{eqnarray*}
\begin{aligned}
T(r,f)&\leq \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f)= \overline{N}(r,\frac{1}{g-a_{1}})\\
&+\overline{N}(r,\frac{1}{g-b})\leq N(r,\frac{1}{f-g})+S(r,f)\\
&\leq T(r,f-g)+S(r,f)\leq m(r,f-g)+S(r,f)\\
&\leq m(r,f-\sum_{i=0}^{n}b_{i}D^{k_{i}}f)+S(r,f)\\
&\leq m(r,f)+m(r,1-\frac{\sum_{i=0}^{n}b_{i}D^{k_{i}}f}{f})+S(r,f)\\
&\leq T(r,f)+S(r,f).
\end{aligned}
\end{eqnarray*}
That is
\begin{eqnarray}
T(r,f)=\overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f).
\end{eqnarray}
According to (3.1) and (3.2) we have
\begin{eqnarray}
T(r,f)=T(r,f-g)+S(r,f)=N(r,\frac{1}{f-g})+S(r,f).
\end{eqnarray}
and
\begin{align}
T(r,q)&=m(r,q)+S(r,f)\notag\\
&=m(r,\frac{g-a_{1}}{f-a_{1}})+S(r,f)\notag\\
&\leq m(r,\frac{1}{f-a_{1}})+S(r,f).
\end{align}
Then it follows from (3.1) and (3.3) that
\begin{align}
m(r,\frac{1}{f-a_{1}})&=m(r,\frac{q-1}{f-g})\notag\\
&\leq m(r,\frac{1}{f-g})+m(r,q-1)\notag\\
&\leq T(r,q)+S(r,f).
\end{align}
Then by (3.4) and (3.5)
\begin{align}
T(r,q)= m(r,\frac{1}{f-a_{1}})+S(r,f).
\end{align}
On the other hand, (3.1) can be rewritten as
\begin{align}
\frac{g-f}{f-a_{1}}=q-1,
\end{align}
which implies
\begin{align}
\overline{N}(r,\frac{1}{f-a_{2}})\leq \overline{N}(r,\frac{1}{q-1})=T(r,q)+S(r,f).
\end{align}
Thus, by (3.2), (3.6) and (3.8)
\begin{eqnarray*}
\begin{aligned}
m(r,\frac{1}{f-a_{1}})+N(r,\frac{1}{f-a_{1}})&= \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f)\\
&\leq \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{q-1})+S(r,f)\\
&\leq\overline{N}(r,\frac{1}{f-a_{1}})+m(r,\frac{1}{f-a_{1}})+S(r,f),
\end{aligned}
\end{eqnarray*}
that is
\begin{align}
N(r,\frac{1}{f-a_{1}})=\overline{N}(r,\frac{1}{f-a_{1}})+S(r,f).
\end{align}
And then
\begin{align}
\overline{N}(r,\frac{1}{f-a_{2}})=T(r,q)+S(r,f).
\end{align}
Set
\begin{eqnarray}
\varphi=\frac{Df(f-g)}{(f-a_{1})(f-a_{2})},
\end{eqnarray}
and
\begin{eqnarray}
\psi=\frac{Dg(f-g)}{(g-a_{1})(g-a_{2})}.
\end{eqnarray}
Easy to know that $\varphi\not\equiv0$ because of $f\not\equiv g $, and $N(r,\varphi)=S(r,f)$. By Lemma 2.1 and Lemma 2.7 we have
\begin{eqnarray*}
\begin{aligned}
&T(r,\varphi)=m(r,\varphi)=m(r,\frac{Df(f-g)}{(f-a_{1})(f-a_{2})})+S(r,f)\notag\\
&=m(r,\frac{fDf}{(f-a_{1})(f-a_{2})}\frac{f-\sum_{i=0}^{n}b_{i}D^{k_{i}}f}{f})+m(r,\frac{fbDf_{-1}}{(f-a_{1})(f-a_{2})})+S(r,f)\\
&\leq m(r,\frac{fDf}{(f-a_{1})(f-a_{2})})+m(r,1-\frac{\sum_{i=0}^{n}b_{i}D^{k_{i}}f)}{f})+S(r,f)=S(r,f),
\end{aligned}
\end{eqnarray*}
that is
\begin{align}
T(r,\varphi)=S(r,f).
\end{align}
Let $d=a_{1}-j(a_{1}-b_{1})(j\neq0,1)$. Obviously, by Lemma 2.1 and the First Fundamental Theorem of Nevanlinna, we obtain
\begin{eqnarray*}
\begin{aligned}
2T(r,f)&\leq \overline{N}(r,\frac{1}{f-a_{1}})+ \overline{N}(r,\frac{1}{f-a_{2}})+\overline{N}(r,\frac{1}{f}) +S(r,f)\\
&\leq T(r,f)+T(r,f)-m(r,\frac{1}{f})+S(r,f),
\end{aligned}
\end{eqnarray*}
which implies
\begin{align}
m(r,\frac{1}{f})=S(r,f).
\end{align}
And by (3.14)
\begin{align}
m(r,\frac{1}{f-d})&=m(r,\frac{Df(f-g)}{\varphi (f-a_{1})(f-a_{2})(f-d)})\leq m(r,1-\frac{g}{f})\notag\\
&+m(r,\frac{fDf}{(f-a_{1})(f-a_{2})(f-d)})+S(r,f)=S(r,f).
\end{align}
Set
\begin{align}
\phi=\frac{Dg}{(g-a_{1})(g-a_{2})}-\frac{Df}{(f-a_{1})(f-a_{2})}.
\end{align}
We discuss two cases.\\
{\bf Case 1}\quad $\phi\equiv0$. Integrating the both side of (3.16) which leads to
\begin{align}
\frac{f-a_{2}}{f-a_{1}}=C\frac{g-a_{2}}{g-a_{1}},
\end{align}
where $C$ is a nonzero constant.
Then by Lemma 2.4 we get
\begin{eqnarray}
2T(r,f)\leq\overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f),
\end{eqnarray}
which contradicts with (3.2).
{\bf Case 2} \quad $\phi \not\equiv0$. By (3.3), (3.13) and (3.16), we can obtain
\begin{align}
m(r,f)&=m(r,f-g)+S(r,f)\notag\\
&=m(r,\frac{\phi(f-g)}{\phi})+S(r,f)=m(r,\frac{\psi-\varphi}{\phi})+S(r,f)\notag\\
&\leq T(r,\frac{\phi}{\psi-\varphi})+S(r,f)\leq T(r,\psi-\varphi)+T(r,\phi)+S(r,f)\notag\\
&\leq T(r,\psi)+T(r,\phi)+S(r,f)\notag\\
&\leq T(r,\psi)+\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f),
\end{align}
on the other hand,
\begin{align}
T(r,\psi)&=T(r,\frac{Dg(f-g)}{(g-a_{1})(g-a_{2})})\notag\\
&=m(r,\frac{Dg(f-g)}{(g-a_{1})(g-a_{2})})+S(r,f)\notag\\
&\leq m(r,\frac{Dg}{g-a_{2}})+m(r,\frac{f-g}{g-a_{1}})\notag\\
&\leq m(r,\frac{1}{f-a_{1}})+S(r,f)=\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f).
\end{align}
Hence combining (3.19) and (3.20), we obtain
\begin{align}
T(r,f)\leq 2\overline{N}(r,\frac{1}{f-a_{2}})+S(r,f).
\end{align}
Next, Case 2 is divided into two subcases.
{\bf Subcase 2.1}\quad $a_{1}=G$, where $G$ is defined as (2.2) in Lemma 2.5. Then by (3.1) and Lemma 2.1 we can get
\begin{align}
m(r,q)=m(r,\frac{g-G}{f-a_{1}})=S(r,f).
\end{align}
Then by (3.10), (3.21) and (3.22) we can have $T(r,f)=S(r,f)$, a contradiction.\\
{\bf Subcase 2.2} \quad $a_{2}=G$. Then by (3.6), (3.10) and (3.21), we get
\begin{align}
T(r,f)&\leq m(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{g-G})+S(r,f)\notag\\
&\leq m(r,\frac{1}{g-G})+\overline{N}(r,\frac{1}{g-G})+S(r,f)\notag\\
&\leq T(r,g)+S(r,f).
\end{align}
From the fact that
\begin{align}
T(r,g)\leq T(r,f)+S(r,f),
\end{align}
which follows from (3.23) that
\begin{align}
T(r,f)=T(r,g)+S(r,f).
\end{align}
By Lemma 2.2, (3.2) and (3.25), we have
\begin{eqnarray*}
\begin{aligned}
2T(r,f)&\leq 2T(r,g)+S(r,f)\\
&\leq\overline{N}(r,g)+\overline{N}(r,\frac{1}{g-a_{1}})+\overline{N}(r,\frac{1}{g-G})+\overline{N}(r,\frac{1}{g-d})+S(r,f)\\
&\leq \overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})+T(r,\frac{1}{g-d})-m(r,\frac{1}{g-d})+S(r,f)\\
&\leq T(r,f)+T(r,g)-m(r,\frac{1}{g-d})+S(r,f)\\
&\leq 2T(r,f)-m(r,\frac{1}{g-d})+S(r,f).
\end{aligned}
\end{eqnarray*}
Thus
\begin{eqnarray}
m(r,\frac{1}{g-d})=S(r,f).
\end{eqnarray}
From the First Fundamental Theorem, Lemma 2.1, (3.14)-(3.15), (3.25)-(3.26) and $f$ is an entire function on $\mathbb{C}^{n}$, we obtain
\begin{eqnarray*}
\begin{aligned}
m(r,\frac{f-d}{g-d})&\leq m(r,\frac{f}{g-d})+m(r,\frac{d}{g-d})+S(r,f)\\
&\leq T(r,\frac{f}{g-d})-N(r,\frac{f}{g-d})+S(r,f)\\
&=m(r,\frac{g-d}{f})+N(r,\frac{g-d}{f})-N(r,\frac{f}{g-d})\\
&+S(r,f)\leq N(r,\frac{1}{f})-N(r,\frac{1}{g-d})+S(r,f)\\
&=T(r,\frac{1}{f})-T(r,\frac{1}{g-d})+S(r,f)\\
&=T(r,f)-T(r,g)+S(r,f)=S(r,f).
\end{aligned}
\end{eqnarray*}
Thus we get
\begin{eqnarray}
m(r,\frac{f-d}{g-d})=S(r,f).
\end{eqnarray}
It's easy to see that $N(r,\psi)=S(r,f)$ and (3.12) can be rewritten as
\begin{eqnarray}
\psi=[\frac{a_{1}-d}{a_{1}-a_{2}}\frac{Dg}{g-a_{1}}-\frac{a_{2}-d}{a_{1}-a_{2}}\frac{Dg}{g-a_{2}}][\frac{f-d}{g-d}-1].
\end{eqnarray}
Then by (3.27) and (3.28) we can get
\begin{eqnarray}
T(r,\psi)=m(r,\psi)+N(r,\psi)=S(r,f).
\end{eqnarray}
By (3.2), (3.19), and (3.29) we get
\begin{eqnarray}
\overline{N}(r,\frac{1}{f-a_{1}})=S(r,f).
\end{eqnarray}
Moreover, by (3.2), (3.25) and (3.30), we have
\begin{eqnarray}
m(r,\frac{1}{g-G})=S(r,f),
\end{eqnarray}
which implies
\begin{eqnarray}
\overline{N}(r,\frac{1}{f-a_{2}})=m(r,\frac{1}{f-a_{2}})\leq m(r,\frac{1}{g-G})=S(r,f).
\end{eqnarray}
Then by (3.2) we obtain $T(r,f)=S(r,f)$, a contradiction.\\
{\bf Subcase 2.3} $a_{1}\not\equiv G, a_{2}\not\equiv G$. So by (3.6), (3.10), (3.21) and Lemma 2.1, we can get
\begin{eqnarray*}
\begin{aligned}
T(r,f)&\leq 2m(r,\frac{1}{f-a_{1}})+S(r,f)\leq2m(r,\frac{1}{g-G})\\
&+S(r,f)=2T(r,g)-2N(r,\frac{1}{g-G})+S(r,f)\\
&\leq\overline{N}(r,g)+\overline{N}(r,\frac{1}{g-a_{1}})+\overline{N}(r,\frac{1}{g-a_{2}})+\overline{N}(r,\frac{1}{g-G})\\
&-2N(r,\frac{1}{g-G})+S(r,f)\leq T(r,f)-N(r,\frac{1}{g-G})+S(r,f),
\end{aligned}
\end{eqnarray*}
which deduces that
\begin{align}
N(r,\frac{1}{g-G})=S(r,f).
\end{align}
It follows from (3.33) and Lemma 2.2 that
\begin{eqnarray*}
\begin{aligned}
T(r,g)&\leq \overline{N}(r,g)+\overline{N}(r,\frac{1}{g-G})+\overline{N}(r,\frac{1}{g-a_{1}})+S(r,f)\\
&\leq \overline{N}(r,\frac{1}{g-a_{1}})+S(r,f)\leq T(r,g)+S(r,f),
\end{aligned}
\end{eqnarray*}
which implies that
\begin{align}
T(r,g)=\overline{N}(r,\frac{1}{g-a_{1}})+S(r,f).
\end{align}
Similarly
\begin{align}
T(r,g)=\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f).
\end{align}
Then by (3.21) we get
\begin{align}
T(r,f)=2T(r,g)+S(r,f).
\end{align}
Easy to see from (3.16) that
\begin{align}
T(r,\phi)=N(r,\phi)+S(r,f)\leq\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f).
\end{align}
We claim that
\begin{align}
T(r,\phi)=\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f).
\end{align}
Otherwise,
\begin{align}
T(r,\phi)<\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f).
\end{align}
We can deduce from (3.2), (3.12), Lemma 2.1 and Lemma 2.3 that
\begin{eqnarray*}
\begin{aligned}
T(r,\psi)&=T(r,\frac{Dg(f-g)}{(g-a_{1})(g-a_{2})})=m(r,\frac{Dg(f-g)}{(g-a_{1})(g-a_{2})})+S(r,f)\notag\\
&\leq m(r,\frac{Dg}{g-a_{1}})+m(r,\frac{f-a_{2}}{g-a_{2}}-1)\notag\\
&\leq m(r,\frac{g-a_{2}}{f-a_{2}})+N(r,\frac{g-a_{2}}{f-a_{2}})-N(r,\frac{f-a_{2}}{g-a_{2}})+S(r,f)\\
&\leq m(r,\frac{1}{f-a_{2}})+N(r,\frac{1}{f-a_{2}})-N(r,\frac{1}{g-a_{2}})+S(r,f)\\
&\leq T(r,f)-\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f)\leq \overline{N}(r,\frac{1}{f-a_{1}})+S(r,f),
\end{aligned}
\end{eqnarray*}
which is
\begin{align}
T(r,\psi)\leq \overline{N}(r,\frac{1}{f-a_{1}})+S(r,f).
\end{align}
Then combining (3.2), (3.39)-(3.40) and the proof of (3.19), we obtain
\begin{eqnarray*}
\begin{aligned}
&\overline{N}(r,\frac{1}{f-a_{1}})+\overline{N}(r,\frac{1}{f-a_{2}})=T(r,f)+S(r,f)\notag\\
&\leq \overline{N}(r,\frac{1}{f-a_{1}})+T(r,\phi)+S(r,f),
\end{aligned}
\end{eqnarray*}
that is
\begin{align}
\overline{N}(r,\frac{1}{g-a_{2}})\leq T(r,\phi)+S(r,f),
\end{align}
a contradiction. Similarly, we can also obtain
\begin{align}
T(r,\psi)=\overline{N}(r,\frac{1}{g-a_{1}})+S(r,f).
\end{align}
By Lemma 2.5, if
\begin{align}
g=Hh+G,
\end{align}
where $H\not\equiv0$ is a small function of $h$.\\
Rewrite (3.16) as
\begin{align}
\phi\equiv\frac{Dg(f-a)(f-b)-Df(g-a_{1})(g-a_{2})}{(f-a_{1})(f-a_{2})(g-a_{1})(g-a_{2})}.
\end{align}
Set $a=\frac{Dh}{h}$. Since $N(r,h)+N(r,\frac{1}{h})=S(r,f)$, we obtain from Lemma 2.1 that
$$T(r,a)=m(r,\frac{Dh}{h})+N(r,\frac{Dh}{h})=S(r,f),$$
which implies that $a$ is a small function of $f$.
Combing (2.1) with (3.44), we can set
\begin{align}
P&=Dg(f-a)(f-b)-Df(g-a_{1})(g-a_{2})\notag\\
&=\sum_{i=0}^{5}\alpha_{i}h^{i},
\end{align}
and
\begin{align}
Q&=(f-a_{1})(f-a_{2})(g-a_{1})(g-a_{2})\notag\\
&=\sum_{j=0}^{6}\beta_{j}h^{j},
\end{align}
where $\alpha_{i}$ and $\beta_{j}$ are small functions of $h$, and $\alpha_{5}\not\equiv0$, $\beta_{6}\not\equiv0$.
If $P$ and $Q$ are two mutually prime polynomials in $e^{p}$, then by Lemma 2.9 we can get $T(r,\phi)=6T(r,h)+S(r,f)$. It follows from (3.10), (3.45)-(3.46) that $T(r,f)=S(r,f)$, a contradiction.\\
If $P$ and $Q$ are not two mutually prime polynomials in $h$, it's easy to see that the degree of $Q$ is large than $P$.\\
According to (3.38), (3.45), (3.46) and by simple calculation, we must have
\begin{align}
\phi=\frac{C}{g-a_{2}},
\end{align}
where $C\not\equiv0$ is a small function of $f$.\\
Put (3.47) into (3.16) we have
\begin{align}
\frac{C(g-a_{1})-Dg}{(g-a_{1})(g-a_{2})}\equiv\frac{-Df}{(f-a_{1})(f-a_{2})}.
\end{align}
By (3.43) and (3.48), we claim that $CH\equiv DH+aH$. Otherwise, combining (3.16), (3.38),(3.43) and Lemma 2.8, we can get $T(r,h)=S(r,f)$. It follows from (3.10) and (3.21) that $T(r,f)=S(r,f)$, a contradiction. Then by (3.1), (3.48) and $CH\equiv H'+aH$, we have
\begin{align}
\frac{DG-C(G-a_{1})}{Hh+G-a_{2}}\equiv\frac{(2aH+DH)h+a(G-a_{1})+DG}{h(Hh+G-a_{1})+a_{1}-a_{2}}.
\end{align}
From above equality and $CH\equiv DH+aH$, we obtain the followings equalities.
\begin{align}
A\equiv(a+C)H,
\end{align}
\begin{align}
[a(G-a_{1})+DG](G-a_{2})\equiv A(a_{1}-a_{2}),
\end{align}
and
\begin{align}
a(G-a_{1})+DG+(a+C)(G-a_{2})\equiv (a+C)(G-a_{1}),
\end{align}
where $A\equiv DG-C(G-a_{1})$. By (3.50)-(3.52) we have
\begin{align}
a_{2}\equiv G+H.
\end{align}
Differential above we get
\begin{align}
D(H+G) \equiv 0,
\end{align}
which implies
\begin{align}
(C-a)H+(a+C)H+C(G-a_{1})\equiv C(a_{2}+H-a_{1})\equiv0.
\end{align}
Therefore, we can see from (3.53) and (3.55) that
\begin{align}
G=2a_{2}-a_{1},
\end{align}
it follows from (3.53) that
\begin{align}
H=a_{1}-a_{2}.
\end{align}
Combining (3.43), (3.56) and (3.57), we have
\begin{align}
g=(a_{1}-a_{2})h+2a_{2}-a_{1}.
\end{align}
And then by (2.1) we have
\begin{align}
f=a_{2}+(a_{1}-a_{2})(h-1)^{2}.
\end{align}
Since $f$ is an entire function, and $N(r,h)+N(r,\frac{1}{h})=S(r,f)$, we can obtain that $h$ is a non-constant entire function, so $g$ is also a non-constant entire function. Then by (3.1) we get $h=e^{p}$, where $p$ is a non-constant entire function.
If $m(r,h)=S(r,f)$, then by (3.10) and (3.21), we deduce $T(r,f)=S(r,f)$, a contradiction.\\
This completes the proof of Theorem 1.
\section{Sharing small functions}
It is natural to raise a question that whether $a_{1}$ and $a_{2}$ can be replaced by two distinct small functions of $f(z)$.
We introduce the definitions of "CM almost" and "IM almost". Let $a$ be a complex numbers. We say that two non-constant meromorphic functions $f(z)$ and $g(z)$ share value $a$ CM almost (or IM almost) if
$$N(r,\frac{1}{f-a})+2N(r,\frac{1}{g-a})-N(r,f=a=g)=S(r,f),$$
where $N(r,f=a=g)$ means the common zeros of $f-a$ and $g-a$. Or
$$\overline{N}(r,\frac{1}{f-a})+2\overline{N}(r,\frac{1}{g-a})-\overline{N}(r,f=a=g)=S(r,f),$$
where $\overline{N}(r,f=a=g)$ means the common zeros of $f-a$ and $g-a$.
\
{\bf Remark} It is easy to see that Theorem 1, Lemma 2.4 and Lemma 2.5 are still true under the assumption $N(r,f)=S(r,f)$. So we can know that Theorem 1 is still true when $f$ is a non-constant meromorphic function, and $f$ and $g$ share $a_{1}$ CM almost and $a_{2}$ IM almost.
Hence, we obtain the following result.
\
{\bf Theorem 2}
Let $f(z)$ be a non-constant entire function, let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}\not\equiv\infty, a_{2}\not\equiv\infty$ be two distinct small functions of $f(z)$. If $f(z)$ and $g(z)$ share $a_{1}$ CM, and $a_{2}$ IM. Then either $f(z)\equiv g(z)$ or
$$f(z)\equiv a_{2}+(a_{1}-a_{2})(e^{p(z)}-1)^{2},$$
and
$$g(z)\equiv a_{1}+(a_{1}-a_{2})(e^{p(z)}-2),$$
where $p(z)$ is a non-constant entire function.
\begin{proof}
Suppose that $f\not\equiv g$. Let
$$F=\frac{f-a_{1}}{a_{2}-a_{1}},\quad G=\frac{g-a_{1}}{a_{2}-a_{1}}.$$
We can see from above that $F$ and $G$ share $0$ CM almost and $1$ IM almost. We also know that $G$ is still a differential polynomial of $F$. Therefore, by Theorem 1, we obtain either $F\equiv G$, tor
$$F=1-(e^{p}-1)^{2},$$
and
$$G=2-e^{p}.$$
That is $f\equiv g$, or
$$f=a_{2}+(a_{1}-a_{2})(e^{p}-1)^{2},$$
$$g=2a_{2}-a_{1}+(a_{1}-a_{2})e^{p}.$$
\end{proof}
We will obtain following Corollary from the proof of Theorem 2.
\
{\bf Corollary 1}
Let $f(z)$ be a non-constant entire function on $\mathbb{C}^{n}$ and let $a_{1}(z)\not\equiv\infty, a_{2}(z)\not\equiv\infty$ be two distinct small meromorphic functions of $f(z)$. If $f(z)$ and $D^{k}f(z)$ share $a_{1}(z)$ CM, and $a_{2}(z)$ IM. Then either $f(z)\equiv D^{k}f(z)$.
\begin{proof}
Suppose that $f\not\equiv D^{k}f$. Since $f$ and $D^{k}f$ share $0$ CM almost, and $1$ IM almost, so by Theorem 2, we get $f\equiv D^{k}f$ or
\begin{align}
f=f=a_{2}+(a_{1}-a_{2})(e^{p}-1)^{2}.
\end{align}
It follows from above that $T(r,f)=T(r,D^{k}f)+S(r,f)$. Similarly to the proof of {\bf Subcases 2.2} in Theorem 1, we can obtain a contradiction.
\end{proof}
\
{\bf Corollary 2}Let $f(z)$ be a non-constant entire function, let $g(z)$ be a differential polynomials of $f$ as define in (1.2), and let $a_{1}\not\equiv\infty, a_{2}\not\equiv\infty$ be two distinct small functions of $f(z)$. If $f(z)$ and $g(z)$ share $a_{1}$ CM, and $a_{2}$ IM. Then $f(z)\equiv g(z)$.
\begin{proof}
Suppose that $f\not\equiv g$. Let
$$F=\frac{f-a_{1}}{a_{2}-a_{1}},\quad G=\frac{g-a_{1}}{a_{2}-a_{1}}.$$
We can see from above that $F$ and $G$ share $0$ CM almost and $1$ IM almost. We also know that $G$ is still a differential polynomial of $F$. Therefore, we obtain $T(r,\phi)=S(r,f)$ in {\bf Case 2} in Theorem 1. Then by (3.19) and (3.20), we know
\begin{align}
T(r,F)\leq \overline{N}(r,\frac{1}{f-a_{2}})+S(r,f),
\end{align}
and hence
\begin{align}
T(r,F)&\leq \overline{N}(r,\frac{1}{f-a_{2}})+S(r,f)=\overline{N}(r,\frac{1}{g-a_{2}})+S(r,f)\leq T(r,G)+S(r,f).
\end{align}
Then by (3.24), we have (3.25). According to a similar method of {\bf Subcases 2.2}, we can obtain a contradiction.
\end{proof}
\
{\bf Acknowledgements} The author would like to thank to anonymous referees for their helpful comments.
|
\section{Observed and predicted SXR radiances in the quiet Sun}
\begin{figure*}[!htbp]
\centerline{\includegraphics[width=16cm, angle=0]{mansonb.eps}}
\centerline{\includegraphics[width=16cm, angle=0]{mh73b.eps}}
\caption{Predicted SXR quiet Sun radiances, obtained from the
irradiance spectra of
\cite{manson:72}, \cite{malinovsky_heroux:73}, and prototype EVE \citep{woods_etal:09},
with over-plotted a simulated quiet Sun
CHIANTI spectrum (black).
The locations of the high-$T$ lines are shown in red.
The main ions contributing to the CHIANTI lines are
labelled, while all those
contributing to the CHIANTI spectrum are shown in green.
A few observed lines are missing in CHIANTI. Conversely,
a few CHIANTI lines are not at the correct wavelengths.
Those unidentified are labelled with an asterisk.
}
\label{fig:qs}
\end{figure*}
The SXR lines are clearly visible
in irradiance spectra only for larger flares, due to the background radiation
of the solar disk. To assess the visibility of the hot lines
in active region cores, one would need SXR
radiance measurements, which are not available yet.
We therefore need to rely on simulated spectra.
As we have mentioned,
the atomic data and line identifications in the whole SXR spectral region
are not complete, so we do have a problem.
We therefore show in this Section a benchmark of the latest CHIANTI v.10
atomic data against two of the best
soft X-ray medium-resolution full-Sun spectra, obtained
with rocket flights in the 1960s:
the quiet Sun spectrum from \cite{manson:72}, available up to 115~\AA,
and the lower-resolution \cite{malinovsky_heroux:73}
irradiance spectrum. Both spectra were obtained from the
published plots, and
radiometrically recalibrated by \cite{delzanna:12_sxr1} using as a reference the
2008 April 14 irradiances from the prototype EVE instrument \citep{woods_etal:09},
when the Sun was at solar minimum.
We have converted the spectra to radiances assuming a limb-brightening increase of
the average center-Sun radiances of a factor of 1.3 \citep{andretta_delzanna:2014}.
The spectral resolution of the \cite{manson:72} spectra was about 0.2~\AA\ (FWHM).
The Sun probably had some flare
emission during the flight of the \cite{malinovsky_heroux:73} spectrum, as significant emission in
\ion{Fe}{xviii} (94, 104~\AA) was recorded. However, the bulk of the spectrum originated from
the quiet Sun, as in the \cite{manson:72} case.
Fig.~\ref{fig:qs} shows a visual summary, with the observed spectra and
the main lines in the two key SXR regions discussed here.
There are some discrepancies between the \cite{manson:72} and
\cite{malinovsky_heroux:73} spectra, with the latter generally agreeing
better with the lower-resolution PEVE.
Fig.~\ref{fig:qs} also shows a completely independent quiet Sun (QS)
simulated spectrum, obtained from CHIANTI v.10, a $DEM$ obtained by
\cite{andretta_etal:03} from SoHO CDS observations, and photospheric abundances.
An instrumental FWHM of 0.25~\AA\ was adopted for the 90--115~\AA\
spectral range, while a FWHM of 0.5~\AA\ was chosen for the
comparison at longer wavelengths.
In some spectral regions, surprisingly good agreement between
predicted and observed radiances is found.
Further improvements will be achieved when the positions of the
many unidentified lines is adjusted.
The unidentified lines are noted with an asterisk in the Figure.
For the line identifications we have considered the \cite{behring_etal:72}
line list, the literature from EBIT plasma
\citep[see, e.g.][]{lepson_etal:2002,traebert_etal:2014_131},
the \cite{delzanna:12_sxr1} identifications, B. Fawcett's plates for the iron ions,
and other sources such as various
compilations of laboratory measurements.
We have also considered stellar spectra such as those discussed in
\cite{beiersdorfer_etal:2014_procyon}, but note that
the \cite{manson:72} solar spectra are far superior.
Clearly, the atomic data are still not complete, as discussed in detail in
\cite{delzanna:12_sxr1}. A few notable ions such as
\ion{Ni}{x}, still missing in CHIANTI, are noted.
The key ions present in CHIANTI are marked in Fig.~\ref{fig:qs}, although we note that
many transitions (indicated with vertical green lines) generally contribute to
the spectrum, at such medium resolution.
Fig.~\ref{fig:qs} also shows in red the locations of the main hot lines,
which mostly fall in regions relatively free of 'background' QS lines.
\section{Predicted SXR radiances in an active region}
\begin{figure*}[!htbp]
\centerline{\includegraphics[width=16cm, angle=0]{ar_core_sxr1.eps}}
\centerline{\includegraphics[width=16cm, angle=0]{ar_core_sxr2.eps}}
\caption{Simulated CHIANTI v.10 SXR spectra (90--110~\AA) of the core of an
active region, with over-plotted the spectrum of an A-class 8 MK microflare,
reduced by a factor of 30. The lines
contributing to the spectrum are shown in green, while the main ions
are labelled. The unidentified lines are noted with an
asterisk. The pixel size is 0.01~\AA\ and the instrumental width is
0.025~\AA.
}
\label{fig:ar_core1}
\end{figure*}
\begin{figure*}[!htbp]
\centerline{\includegraphics[width=16cm, angle=0]{ar_core_sxr3.eps}}
\centerline{\includegraphics[width=16cm, angle=0]{ar_core_sxr4.eps}}
\centerline{\includegraphics[width=16cm, angle=0]{ar_core_sxr5.eps}}
\caption{Same as Fig.~\ref{fig:ar_core1} for the 110--147~\AA\ spectral region.
}
\label{fig:ar_core2}
\end{figure*}
The comparison in Fig.~\ref{fig:qs} gives us some
confidence in presenting simulations of active region core spectra, in
Figures~\ref{fig:ar_core1},\ref{fig:ar_core2}. We have used the $DEM$ and coronal abundances
of an active region quiescent 3 MK loop,
described in \cite{delzanna:2013_multithermal} and
shown in Figure~9 in that paper.
We adopted, following our straw-man design, a pixel size
of 0.01~\AA\ and an instrumental width of 0.025~\AA.
With the increased iron abundances by a factor of 3.2,
there is an increased signal in most lines, compared to the quiet Sun case,
which had photospheric abundances.
Also, there is increased emission in 2--3 MK spectral lines, especially in
the \ion{Fe}{xviii} 104~\AA\ line
and several \ion{Fe}{xvi}, \ion{Cr}{xvi}, \ion{Si}{xii},
\ion{Ca}{xii}, \ion{Ca}{xiv}, and \ion{Ca}{xv} lines.
The DEM was not constrained at 5-10 MK temperatures, and predicts a
weak emission in the \ion{Fe}{xix} lines, which may or may not be present
in actual AR spectra. On the other hand, we expect some emission
from the \ion{Fe}{xviii} lines to always be present in AR observations.
A significant number of the weaker transitions are still not identified,
hence their wavelengths could be off by 1~\AA\ or more. They are noted with an
asterisk in Figures~\ref{fig:ar_core1},\ref{fig:ar_core2}.
There are dozens of cool lines in the SXR, from ions
such as \ion{Mg}{v}, \ion{Mg}{vi}, \ion{Mg}{vii}, \ion{Mg}{viii},
\ion{O}{vi}, \ion{O}{vii}, \ion{O}{viii},
\ion{Si}{v}, \ion{Si}{vi}, \ion{Si}{vii}, \ion{Ne}{v}, \ion{Ne}{vi}, \ion{Ne}{vii}, \ion{Ne}{viii},
plus all ionisation stages of iron, from \ion{Fe}{viii}.
The Figures also over-plot in red the simulated
A-class 8 MK microflare spectrum, reduced by a factor of 30.
It is clear that most of the hot lines fall in region that are expected to be
relatively free of blends. The \ion{Fe}{xviii} and \ion{Fe}{xix}
microflare emission would be superimposed on the weak AR emission in the
lines from these ions.
A few hot lines are instead falling in regions where significant coronal
`background' emission is predicted to be present.
However, we know from our previous Hinode EIS studies
\citep[see, e.g.][]{delzanna_etal:2011_flare,mitra-kraev_delzanna:2019}
that the lower-temperature coronal lines have little variations
during the peak of a flare, so we expect that even the weakest
hot lines will be easily detectable against the background.
\input{def_journals.tex}
\bibliographystyle{frontiersinSCNS_ENG_HUMS}
\section{}
We discuss the diagnostics available to study the 5--10 MK plasma in the solar corona,
which is key to understanding the heating in the cores of
solar active regions.
We present several simulated spectra, and show that
excellent diagnostics are available in the soft X-rays, around 100~\AA,
as six ionisation stages of Fe can simultaneously be observed, and electron densities
derived, within a narrow spectral region.
As this spectral range is almost unexplored,
we present an analysis of available and simulated spectra,
to compare the hot emission with the cooler component.
We adopt recently designed multilayers to present estimates
of count rates in the hot lines, with a baseline spectrometer design.
Excellent count rates are found, opening up the exciting opportunity
to obtain high-resolution spectroscopy of hot plasma.
\tiny
\fontsize{8}{11}\helveticabold { \section{Keywords:} Techniques: spectroscopy \and Sun: corona \and Sun: X-rays}
\end{abstract}
\section{Introduction}
The main aim of the present paper is to present the scientific case
for a soft X-ray (SXR, 90--150~\AA)
spectrometer with high resolving power
(capability to measure 5 km s$^{-1}$ Doppler shifts), high sensitivity and moderate (1\hbox{$^{\prime\prime}$}) resolution.
We believe that such an instrument would provide breakthroughs
in understanding various magnetic energy
conversion processes in the solar corona, in particular within:
A) non-flaring active region (AR) cores; B) flares of all sizes.
As discussed below, the SXR wavelengths contain many
spectral lines formed over temperatures from 0.1 to 12 MK, and
are particularly suited to measure the physical state of
`hot' 5--10 MK plasma, in particular mass and turbulent flows,
electron densities, departures from ionization equilibrium,
and chemical abundances.
Such SXR spectroscopic observations of this hot plasma are needed
because:
A) for non-flaring ARs, impulsive heating probably associated with small-scale reconnection
was predicted in the early 1990s to produce hot emission (see, e.g. \citealt{cargill:94}).
There is some observational
evidence for this (see below), but a systematic study is badly needed.
The intensity and temporal behaviour
of the hot emission can be used to constrain the cadence and energy released in the heating
events, their duration and the background plasma conditions. Such observations will go a long
way to finally resolving the `coronal heating problem'.
B) For microflares and flares, the compelling scientific question is how a large number of
particles can be accelerated. The acceleration is likely to arise as a consequence of magnetic
reconnection in a hot plasma. Various models exist involving strong or weak turbulence,
shocks, collapsing traps, and all are associated with different types of mass motions.
Observations of line shifts and broadenings at high temperatures are required to resolve which
of these are important. Also, the energy transfer and the physical processes
causing chromospheric evaporation during the impulsive phase are not well understood.
High-sensitivity, time-dependent measurements with high spectral
resolution in a range of hot lines are needed.
Despite significant observational and
theoretical advances in the past few decades, the solution
to these and similar long standing problems related to plasma heating
in the solar corona
remains elusive \citep[see, e.g.][]{klimchuk:06,klimchuk:2015,reale:2014_lr}.
This is partly because we have been missing key spectroscopic observations
of the 5--10 MK emission:
the vast majority of the solar coronal observations
have been in the EUV and UV of low $T$ (0.1-3 MK) plasma that is
in the process of cooling, so essential information about
the energy release process has been lost.
The 5-10 MK temperature regime is largely unexplored in solar physics.
This point was made in two white papers
(written by GDZ and JAK in 2016) in response to an international call
to provide suggestions for a Next Generation JAXA/NASA/ESA Solar Physics Mission.
There have been many imaging observations in the X-rays, such as
the interesting and puzzling
\ion{Mg}{xii} images, produced by the CORONAS-I \citep{sobelman_etal:1996},
CORONAS-F \citep[see, e.g.][]{zhitnik_etal:03}, and CORONAS-PHOTON missions \citep{kuzin_etal:2009}.
There have also been many spectral observations of Bremsstrahlung emission,
but with either no spatial
resolution or with limited imaging capability and sensitivity.
Also, the spectral resolution has been typically low, so only the He-like Fe complex
becomes visible during large flares.
For example, many full-Sun X-ray spectra of large flares were produced by the
Solar X-ray Spectrometer (SOXS) Mission, see e.g. \cite{jain_etal:2006}.
RHESSI \citep{lin_etal:2002} produced many observations but only of larger flares
and with indirect imaging capability.
Smaller flares were observed by SphinX \citep{sylwester_etal:08} on board the CORONAS-PHOTON mission.
High-resolution full-disk spectra of large flares have been produced by
RESIK \citep{sylwester_etal:2005} on board the the CORONAS-F mission.
\cite{caspi_etal:2015ApJ...802L...2C} presented
full-Sun X-ray spectra obtained during two sounding rocket flights.
The spectra had a higher resolution than e.g. RHESSI and SphinX,
but much less than RESIK, so only a few of the H- and He-like complexes
are visible in the spectra.
Similar full-Sun spectra have been produced since 2019 by the
XSM on board Chandrayaan-2 \citep{xsm_paper}.
The Focusing Optics X-ray Solar Imager
(FOXSI) sounding rocket flights \citep[cf][]{krucker_etal:2014},
provided some active region observations with improved sensitivity and direct
imaging, although with low spatial and spectral resolution.
The Nuclear Spectroscopic Telescope ARray (NuSTAR) \citep{harrison_etal:2013}
has provided excellent observations of weak Bremsstrahlung emission
from some active regions, but the instrument is not designed
to make regular solar observations as flares could damage it.
As the above list of observations
demonstrate, to carry out detailed studies of magnetic energy conversion,
high-resolution observations of directly heated 5--10 MK spectral lines are needed.
Mass motions (measured via line profile bulk flows and broadenings) of hot plasma
are a very important diagnostic of impulsive heating.
Also, absolute density measurements are required. This provides information on
plasma fine structure that either influences, or is a consequence of, the reconnection process,
as well as accurate column depths through which accelerated particles must move.
Spectroscopy provides extra spatial information hidden in the line profiles.
For example, as shown by \cite{delzanna_etal:2011_flare},
in the kernels of chromospheric evaporation during the impulsive phase
of a flare, coronal line profiles were a superposition of a stationary
foreground active region component and a blue-shifted component
originating from a thin layer. This enabled the measurement of not only velocities,
but also electron densities and the thickness of the evaporating layer.
In general, measurements of hot plasma have been
very difficult, at its emission is very weak, for a variety of reasons:
1) densities are low if the energy release is in the
corona -- values around 10$^{8}$--10$^{9}$ cm$^{-3}$ could be expected;
2) hot plasma cools rapidly;
3) non-equilibrium ionisation could reduce the ion populations
\citep[see, e.g.][]{golub_etal:1989SoPh..122..245G,bradshaw_cargill:2006, reale_orlando:2008,dudik_etal:2017_review}.
Measuring non-equilibrium ionisation requires observations
of several successive stages of ionisation of the same element and
simultaneous measurements of the electron densities in high-$T$ lines,
to estimate ionisation/recombination timescales.
{ Such measurements have never been obtained, although some information from
a few ions or different elements has been available.
As an example, the ionization or recombination timescales for
\ion{Fe}{xix} at a coronal density of 10$^{8}$ cm$^{-3}$ and 10 MK are
over 300 seconds, a very long time for most of the short-lived events
seen in active regions. Therefore, departures from ionization equilibrium
should be common. At a higher density of 10$^{11}$ cm$^{-3}$, the
timescales are instead about 0.3 seconds.
}
Finally, measurements of absolute chemical abundances (relative to hydrogen)
are important as their variability
could be directly related to the heating processes, as discussed by
\cite{laming:2015}.
As we discuss in this paper, the best diagnostics of 5--10 MK lines are to be found in the
soft X-rays, although some are also available in the X-rays (1--50~\AA),
EUV (150--900~\AA), and UV (900--2000~\AA).
Clearly, to make progress, such
detailed spectral diagnostics need to be combined
with detailed simulations (with forward modelling) of the
plasma heating/cooling processes.
The paper is organised as follows.
Section~2 gives a short review on the requirements and science background,
pointing out some of the limitations of previous, current, and upcoming observations.
Section~3 presents a 10 MK spectrum and radiances of the main lines,
from the X-rays to the UV. It then discusses some of the pros and cons of the
various spectral ranges, with emphasis on the SXR. Also, it summarises
available density diagnostics of hot lines in the XUV.
Section~4 presents a straw-man design and estimates of achievable count rates in the soft X-rays
adopting newly developed multilayers, for several simulations of hot plasma.
Section~5 draws the conclusions.
Details of various observations and simulations used to
assess the completeness of the atomic data, line blending and
identifications are given in an extended Supplement.
\section{A short review on the requirements and science background}
As active region cores have a strong emission around 3 MK,
ions such as \ion{Fe}{xvii}, \ion{Ca}{xvii}, \ion{Fe}{xviii} are mostly formed
around these temperatures, rather than the temperature of peak
ion abundance in equilibrium. Therefore, they are not necessarily useful by
themselves for probing the presence
of hotter plasma within AR cores \citep[see,e.g.][]{delzanna:2013_multithermal,parenti_etal:2017}.
Lines from higher-$T$ ions need to also be observed.
Also, as shown e.g. by
\cite{parenti_etal:2006} with a multi-stranded loop simulation,
such hot lines from e.g. \ion{Fe}{xix} or higher ionization stages need to
be observed, to study the heating.
Lower-$T$ ions such as \ion{Fe}{xv} are in fact formed during the cooling phase,
and the signatures of the input heating function are completely lost.
Furthermore, the emission comes mostly from evaporated plasma,
not the plasma that was heated directly in the corona.
\subsection{Non-flaring ARs}
The quiescent 3 MK emission in non-flaring ARs
could be due to a range of processes, involving for example
magnetic reconnection, turbulence, nanoflare storms
\citep[see, e.g.][and references therein]{cargill:2014},
or Alfven waves \citep[see, e.g.][]{van_ballegooijen_etal:2011}.
Most theoretical models predict the presence of some
hot plasma above 3 MK (the `smoking gun'),
see e.g. \cite{cargill:94,cargill_klimchuk:2004}.
The presence of such
hot plasma has been a matter of much debate in the literature, as its emission is
very weak and difficult to observe. For a recent list of relevant
references, see e.g. Sect.6.2.5 in \cite{hinode_review:2019}.
The EUV has excellent diagnostics for lower-temperature
plasma, up to about 4~MK, but only a few `hot' lines.
For example, the Hinode EIS instrument \citep{culhane_etal:2007} provided excellent
EUV observations of 1--4 MK plasma with e.g.
\ion{Fe}{xvii}, \ion{Ca}{xvii} lines, but is
`blind' in the 5--10 MK range. Only
the very hot (about 15 MK) flare lines from \ion{Fe}{xxiii} and \ion{Fe}{xxiv} are
observed \citep[see, e.g.][]{winebarger_etal:2012}.
There are some studies of the hot emission based on full-disk spectra
\citep[see, e.g.][]{2010A&A...514A..82S,miceli_etal:2012}
or imaging \citep[in e.g. Mg XII][]{reva_etal:2018}, but few spatially-resolved
spectroscopic observations of the 5--10 MK plasma in AR cores exist. They were at the limits
of the instruments and provided an unclear picture.
For example, EUNIS-13 observed significant signal in the \ion{Fe}{xix} 592.2~\AA\ line
\citep{brosius_etal:2014}, in the core of AR11726.
However, unpublished analysis
of EUNIS-13 observations of AR11724 and AR11723 (by A.Daw) indicated a
much weaker or no signal in the same \ion{Fe}{xix} line.
The Solar Maximum Mission (SMM) X-ray polychromator \citep{acton_etal:1980}
Flat Crystal Spectrometers (FCS), had a collimator of about 15\hbox{$^{\prime\prime}$}\ $\times$14\hbox{$^{\prime\prime}$}\
and provided some observations of quiescent ARs, which were analysed by
\cite{delzanna_mason:2014}. It was only possible to
put an upper limit to the emission measure at 7--10~MK of
about three orders of magnitude lower than the peak value at 3~MK.
\cite{parenti_etal:2017} found
a few places where faint \ion{Fe}{xix} emission was observed by SoHO SUMER, but
it was necessary to integrate for two hours and average spatially to achieve enough signal.
The \ion{Fe}{xix} intensity implied in some places
an emission measure around 2.5--3 orders of magnitude below the peak.
As SUMER only observed one hot line from \ion{Fe}{xix}, it was not possible to
establish the temperature (or the distribution of temperatures)
producing the weak signal in the line, which in principle is formed
between 6 and 12 MK in ionization equilibrium.
Observations of Bremsstrahlung emission in quiescent ARs with
FOXSI and NuSTAR have confirmed the FCS and SUMER results, indicating
little emission at high temperatures, although also in these cases
the actual temperature distribution of the hot plasma could not be established.
For example, \cite{ishikawa_etal:2014} used FOXSI to place
an upper limit in the 4--15 MK range, while the peak emission around 3 MK was constrained by
Hinode XRT and EIS observations.
\cite{hannah_etal:2016} used NuSTAR observations to also
find upper limits to the temperature distribution between 3 and 12 MK.
The upper limit of the emission measure at 10 MK is about three orders of magnitude
lower than the peak at 3 MK.
\cite{reva_etal:2018} used CORONAS-F/SPIRIT \ion{Mg}{xii} images to estimate
an upper limit of the emission measure around 10 MK about four orders
of magnitude lower than the peak value around 3 MK,
which was constrained by SoHO EIT imaging. However,
the information from \ion{Mg}{xii} is somewhat limited as
this ion in equilibrium is formed over a very broad temperature range, from 4 to well over 15 MK.
On the other hand, some evidence of hot emission
was found by \cite{marsh_etal:2018ApJ...864....5M}, also using FOXSI and
NuSTAR observations. The lower temperatures were constrained using SDO AIA and
Hinode XRT images. Nanoflare modelling was able to reproduce in
some cases the FOXSI and NuSTAR observations.
{
To make progress, we need new observations to be combined with the
predictions of nanoflare modelling, see e.g.
\cite{2015ApJ...799..128L,barnes_etal:2016ApJ...829...31B,barnes_etal:2016ApJ...833..217B,athiray_etal:2019}.
Regarding such nanoflare models, it is important to point out that they often
tend to over-estimate the strength of the hot emission, although
they can also predict no emission, depending on what assumptions are made
\citep{barnes_etal:2016ApJ...829...31B}.}
Given these uncertainties (observational and theoretical) on the
strength of the hot emission, we provide below two simulations,
one based on the FCS and SUMER observations, one on the
\cite{2015ApJ...799..128L} simulations, just to show
what signal we might expect to observe.
{ In summary, to constrain the cadence and energy release in the heating events,
we require measurements of
strong unblended hot lines with a high sensitivity
(to measure the weak emission) and high spectral resolution (a few km s$^{-1}$).
Measurements of the electron density in the hot lines in the
10$^{8}$-10$^{11}$ cm$^{-3}$ regime would also be needed.
High spatial resolution (1\hbox{$^{\prime\prime}$}\ or higher) is not required
to characterize the hot emission, as we expect it to be well below
such resolutions, and as there would
always be several individual loop structures (strands) along the line of sight.
}
\subsection{From flares to microflares}
{
There is ample literature on observations and models of flares
of GOES C class and above \citep[see, e.g. the reviews by][]{shibata:2011LRSP,fletcher_etal:2011,benz:2017}.
}
Most observations, however, have been of the flare loops
formed as a by-product of chromospheric evaporation.
It is generally thought that magnetic
reconnection occurs in the corona, but the mechanisms by which
energy is transferred and deposited into the chromosphere are not clear.
Thermal conduction by electrons and non-thermal electrons have been
considered for a long time, but other processes could be at play,
as e.g. large-scale Alfv{\'e}n waves \citep{fletcher_hudson:2008}
or high-energy protons.
A significant amount of particles need to be accelerated in the corona,
but how is not clear. The most interesting but poorly observed
aspects are those related to the reconnection region.
Significant progress has been made on chromospheric evaporation.
{
Very few spectral observations showing strong
Doppler flows in hot lines possibly associated with the magnetic reconnection
region exist, see e.g.
\cite{imada_etal:2013,tian_etal:2014ApJ...797L..14T,warren_etal:2018,polito_etal:2018ApJ...865..161P}.
}
The likely reason is that the emission is weak, because reconnection
is occurring in low-density plasma and on spatial scales well below
current resolutions. Also, as we have mentioned, if the plasma is out of
ionization equilibrium, very different line intensities can be expected.
This was shown e.g. by \cite{imada_etal:2011ApJ...742...70I}.
The effects can easily be of one order of magnitude, and depend critically on the local
electron density and the timescale of the heating.
Early X-ray observations (e.g. from Skylab, SMM/UVSP, SMM/BCS)
indicated strong upflows and non-thermal
broadenings during the impulsive phase, but did not provide stigmatic
images.
The upflows were usually a weak component, compared to a strong
stationary component, contrary to the predictions from
hydrodynamic modelling.
Only few spatially-resolved observations from SoHO SUMER
in hot lines (mostly \ion{Fe}{xix} and \ion{Fe}{xxi}) exist,
showing interesting behaviour in the line profiles
\cite[see e.g.][]{kliem_etal:2002} during the peak phase.
Spatially-resolved observations in \ion{Fe}{xix} from
SoHO CDS during the impulsive phase of two M-class
flares showed that line profiles
were symmetric and blue-shifted by about 150 km s$^{-1}$, decreasing with time
\citep[][]{brosius:2003,delzanna_etal:06_m1_flare}.
CDS also observed some lines formed around 1-3 MK, which showed
weaker upflows. Non-thermal broadenings in \ion{Fe}{xix} of about 50 km s$^{-1}$
were also decreasing with time, following the upflows.
The pattern of upflows appeared to follow the predictions from
hydrodynamic modelling \citep{delzanna_etal:06_m1_flare}.
A few other CDS observations followed.
Such features are hard to observe as they are short-lived (of the order of
minutes) and the \ion{Fe}{xix} intensities are weak, typically a few times up to
one order of magnitude weaker than the intensities in the post-flare
loops.
Several Hinode EIS observations of chromospheric evaporation have been
published, see e.g.
\cite{2009ApJ...699..968M,delzanna_etal:2011_flare,brosius:2013ApJ...762..133B,young_etal:2013_flare}.
We also have many IRIS \citep{depontieu_etal:2014b} observations of chromospheric evaporation,
but they only included \ion{Fe}{xxi} for large (C-class) flares, and
low-temperature lines.
EIS observed 1-3 MK lines and
hot lines from only \ion{Fe}{xxiii} and \ion{Fe}{xxiv}, formed above 10 MK.
Asymmetric profiles were often observed, which was puzzling.
On the other hand, IRIS observations
of \ion{Fe}{xxi} \citep[see e.g.][]{young_etal:2015,polito_etal:2015,brosius_daw:2015}
have normally shown symmetric profiles, with
temporal evolutions following the CDS results of \cite{delzanna_etal:06_m1_flare},
i.e. decreasing upflows and non-thermal widths with time.
Simultaneous observations from EIS ($\simeq$ 3--4\hbox{$^{\prime\prime}$}) and IRIS ($\simeq$ 0.33\hbox{$^{\prime\prime}$})
clarified that some of these asymmetries could be due to
a superposition of different components along the line of sight
\citep{polito_etal:2016a}.
The kernels of chromospheric evaporation appear in fact to
be small in size, about 1--2\hbox{$^{\prime\prime}$}\ as seen with IRIS and AIA
\citep[see e.g.][]{young_etal:2015}.
A superposition of different flows during long exposure times
could also explain asymmetric line profiles, see e.g. \cite{mandage_bradshaw:2020}.
For larger flares, high-cadence IRIS observations provide an
indication that a cadence of tens of seconds would be sufficient to
observe the fastest flows at the start of the evaporation
\citep[see, e.g.][]{graham_cauzzi:2015}.
M-class and X-class flares often show upflows of a few hundreds of km s$^{-1}$ in
hot lines.
Smaller flares, however, have shown weaker upflows.
For example, upflows in \ion{Fe}{xxiii} of only 50 km s$^{-1}$
were observed during the impulsive phase of a B-class flare
\citep{delzanna_etal:2011_flare}. Interestingly, stronger
upflows of about 170 km s$^{-1}$ were seen in \ion{Fe}{xvi} (formed around 3 MK),
before any signal could be seen in \ion{Fe}{xxiii}.
It could well be that stronger upflows were present in the
hot lines but the sensitivity was not sufficient to observe them.
Generally, plasma diagnostics of flares, from the smallest to the bigger events
have been limited by the lack of observations of lines
formed in the 5--10 MK range
and of measurements of electron densities at such temperatures.
Measurements of time-dependent ionization have also been lacking, although some
evidence that non-equilibrium ionization is present durgin flares
has been found \citep[see, e.g.][]{kawate_etal:2016}.
Measurements of hot line profiles in the kernels of chromospheric evaporation
are needed, as well as their temporal evolution during the formation of the
flare loops. We have hydrodynamic models such as
HYDRAD \citep[see, e.g.][and following updates]{bradshaw_mason:03} where we can predict
flows with time-dependent ionization, following energy
deposition in the chromosphere by thermal and non-thermal particles,
but are missing the key observations to constrain the models.
A statistical study of flares within AR cores using RHESSI Bremsstrahlung emission
in the 6--12 keV energy range
showed peak temperatures of 10-15 MK
and total estimated energies of 10$^{28}$--10$^{30}$ erg
\citep[][]{hannah_etal:2008ApJ...677..704H}.
They were called microflares but were actually mostly B- and C-class.
These measurements typically assume an isothermal plasma,
because the observations are not generally adequate to distinguish between
this and a distribution of temperatures, which is more likely.
That would easily be assessed with
measurements of spectral lines formed at different temperatures.
Within AR cores, weaker `microflares', e.g. flares of A-class or below are
a lot more frequent than larger ones. They also have lower temperatures.
This has been clearly shown with recent X-ray
irradiance spectrometers such as SphinX on board the CORONAS-PHOTON mission
\citep[see, e.g.][]{mrozek_etal:2018}
and in 2019/2020 by
XSM on board Chandrayaan-2. Further, XSM has shown that
microflares occur frequently also outside ARs, and their energies were found to be
in the range 4 $\times$ 10$^{26}$--10$^{28}$ erg \citep{xsm_paper}.
\cite{kirichenko_bogahev:2017} performed a statistical study of
microflares of GOES class A0.01 to B
using the SphinX full-Sun X-ray spectra and the
Mg XII images from CORONAS-PHOTON, showing that they have a different relationship
between X-ray flux and temperatures, compared to larger flares.
An understanding of the physics of microflares remains elusive, as key
spatially-resolved spectroscopic observations have been lacking, and given
that they have peak temperatures in the
4--8~MK range
{
\citep[see, e.g.][]{feldman_etal:1996,mitra-kraev_delzanna:2019,hannah_etal:2019,cooper_etal:2020ApJ...893L..40C,xsm_paper},
which have largely been unexplored by previous and current imaging
spectrometers.
Consequently, only a few models of microflare loops and associated events
have been developed \citep[see e.g.][]{testa_reale:2020,joshi_etal:2021}.
}
Some information has been provided
with imaging spectroscopy of Bremsstrahlung emission with e.g.
NuSTAR and FOXSI-2.
A recent NuSTAR observation of a microflare
was published by \cite{cooper_etal:2020ApJ...893L..40C}.
The microflare was estimated to be approximately
equivalent to a GOES 0.005 A-class flare, i.e. much weaker than the
0.1 A class microflares recently observed by FOXSI-2 \citep{athiray_etal:2020}.
This very weak NuSTAR event had an energy content of about 10$^{26}$ erg, i.e. close to those
thought to occur in nanoflares, often quoted to be in the range
10$^{23}$--10$^{25}$ erg (although its definition is a bit artificial,
as what really matters is energy per unit cross sectional area).
We note that microflares often are composed of a few
loop structures which appear resolved at 1\hbox{$^{\prime\prime}$}\ resolution in
Fe XVIII emission within the AIA 94~\AA\ band
\citep{delzanna:2013_multithermal,delzanna:12_sxr1, mitra-kraev_delzanna:2019}.
Therefore, although higher spatial resolution
could show unresolved structures (if present), 1\hbox{$^{\prime\prime}$}\ resolution would be sufficient
to follow the evolution of the main structures.
To summarize, we need observations in hot 5--10 MK lines with:
1) high spectral resolution (to resolve the hot lines from the
background signal and measure Doppler shifts of the order of 10 km s$^{-1}$ );
2) high sensitivity (to capture the faint emission during the impulsive phase
and allow temporal resolutions of tens of seconds);
3) moderate/high spatial resolution (1\hbox{$^{\prime\prime}$}\ or better);
4) several ionization stages of the same element;
5) measurements of electron densities in the 10$^{8}$-10$^{13}$ cm$^{-3}$ range.
Plus of course a spatial coverage large enough to observe events.
As microflares are normally composed of single loops
with typical lengths of 50~\hbox{$^{\prime\prime}$}, they are easier to observe than
bigger flares, which can be ten times (or more) larger.
\subsection{Additional considerations}
A related important science problem is the cycle of
evaporation and condensation of mass in the corona,
and in particular in quiescent AR loops.
Chromospheric evaporation signatures are expected to be in high-temperature
lines, short-lived and very weak \citep[see, e.g.][]{patsourakos_klimchuk:09}.
{ Such signatures (enhanced emission in the blue wing) have not been unambiguously observed yet.
Therefore, also
in this case high-sensitivity spectral observations of hot lines are needed.
An important point to make regards the 'background' cooler emission.
In the case of non-flaring emission, the intensity and temporal behaviour
of the hot and 'background' emission will need to be combined with
forward models.
For the flaring emission, there is ample evidence
that the cooler lines, e.g. those formed below 3 MK, are mostly not affected
during the heating and initial cooling phase of an event. The post-flare loops
are seen to be progressively filled in by the hot plasma, and it is only
during the following cooling of the plasma that lower-temperature
lines are observed, as e.g. shown in the case of a microflare by
\cite{mitra-kraev_delzanna:2019}.
Therefore, with spatially-resolved
spectroscopy, we do not expect the background emission to interfere
with the emission of the 5--10 MK lines.
The situation is more complex and unclear in the kernels of chromospheric evaporation, during the
impulsive phase of a flare.
Strongly enhanced emission in transition-region lines
\citep[see e.g.][]{testa_etal:2014} or coronal lines \citep[see, e.g.][]{delzanna_etal:2011_flare}
has been observed alongside hot emission. As we have mentioned,
Doppler flows and non-thermal broadenings are also present, so careful
analyses will be required to disentangle any foreground emission for the
cooler lines, and remove any cooler component from the few hot lines
which may become blended.
}
\section{Where are the hot lines and their density diagnostics? }
In order to illustrate where the hot lines fall in the XUV spectrum,
and discuss the pros and cons of the different wavelength ranges,
we present in this Section estimated radiances of a 10 MK plasma.
We used CHIANTI version 10 \citep{dere_etal:97,chianti_v10}
and assumed ionisation equilibrium.
We assumed an isothermal emission at $T=$ 10 MK,
a low density of 1$\times 10^9$ (cm$^{-3}$), typical
of an active region core, a column emission measure $EM = 10^{25.5}$ (cm$^{-5}$),
and the active region core `coronal' abundances
of \cite{delzanna:2013_multithermal,delzanna_mason:2014}.
Such emission measure is nearly three orders of magnitude below
the usual peak emission (around 3 MK) $EM \simeq 10^{28}$ (cm$^{-5}$)
of an active region core, and is representing possible weak
emission caused by nanoflares,
consistent with the SUMER results of \cite{parenti_etal:2017}.
The resulting XUV spectrum
is shown in Figure~\ref{fig:phot_spectrum}, and a list of the strongest
lines with their radiances is given in Table~\ref{tab:list}.
One might think at first sight that there are plenty of strong emission lines.
However, it turns out that most of them
have even stronger contributions from much lower temperatures.
An 8~MK spectrum looks similar, with stronger lower-$T$ lines
such as \ion{Fe}{xvi},\ion{Fe}{xvii}, \ion{Fe}{xviii}, \ion{Si}{xii},
and weaker `flare' lines such as \ion{Fe}{xxiv}.
We highlight in the Table which lines are relatively strong and `hot'
and which ones are weak in terms of number of photons emitted.
It is clear from the Table that the strongest hot lines are in the SXR and in the UV.
These lines have peak formation temperatures around 10 MK, but they still have significant
emission at lower and higher temperatures.
We stress that the radiances of the hot lines are only indicative of what might be
observed. We recall that a temperature or a distribution
of temperatures could not be established. Higher or lower
temperature emission could produce the same
SUMER \ion{Fe}{xix} intensity, but different radiances
for the lines from the other ionization stages.
Below we briefly discuss pros and cons of each spectral range.
{
One issue that has often been overlooked is the absorption of
the radiation due to photoionization of neutral H, He and ionised He,
with thresholds at 912, 504, and 228~\AA, plus inner-shell
photoionization of metals. This absorption is very common in active region
cores as cool material such as filaments is ubiquitous.
As filament activation and heating to 10 MK is a common feature of
larger flares \citep[see, e.g.][]{dudik_etal:2014}, it would be useful to
have diagnostics not affected by absorption.
Such absorption can be substantial
in the EUV/UV below 912~\AA, is negligible in the X-rays and is much attenuated in the SXR.
The absorption can affect measurement in at least two ways:
attenuating the total intensity, hence reducing the chance of observing already faint
hot emission and by changing the ratios of lines at different
wavelengths, hence affecting e.g. density-sensitive line ratios.
Obviously, the attenuation could be modeled or measured in some circumstances,
depending on the plasma dstribution along the line of sight.
}
\subsection{X-rays}
The X-rays (5--20~\AA) are rich in spectral lines emitted by hot plasma,
from 3 to 15 MK, although most hot lines are blended,
hence extremely high resolution spectroscopy is needed.
That might not be enough to resolve the main lines whenever large
non-thermal widths are present, as we have seen from early flare observations.
{
The X-rays are
excellent for measuring the chemical abundances of hot plasma.
They also allow estimates of non-thermal electrons via line
ratio techniques \citep{dudik_etal:2019}, although better diagnostics
are available at shorter wavelengths, involving satellite lines
\citep[see e.g. the review by][]{delzanna_mason:2018}.
The X-rays also provide
electron density diagnostics but for the hot (10 MK) lines
they are limited to high values (above 10$^{12}$ cm$^{-3}$).
Lines formed below 3 MK are not present in this wavelength range.
}
Previous high-resolution spectroscopy in the X-rays has provided many
important observations of flares and chromospheric evaporation, but has been limited by the lack
of stigmatic imaging and relatively low sensitivity.
The last solar spectra in this wavelength range were obtained
by the SMM X-ray polychromator \citep{acton_etal:1980}
Flat Crystal Spectrometers (FCS), which had a collimator of about 15\hbox{$^{\prime\prime}$}\ $\times$14\hbox{$^{\prime\prime}$}.
The sounding rocket MaGIXS (led by A. Winebarger, MSFC, USA;
see \cite{kobayashi_etal:2011}), will provide for the first time
stigmatic imaging spectroscopy in the same spectral region, though
at the expense of a small geometrical area.
The design employs a Wolter-type grazing incidence telescope with mirrors developed
at MSFC, the same as those used by the successful FOXSI flights.
One of the limitations of these
focusing mirrors is the moderate spatial resolution, in the range 5--10\hbox{$^{\prime\prime}$}.
\subsection{Soft X-rays}
Many hot lines from six ionisation stages of iron, from \ion{Fe}{xviii} to \ion{Fe}{xxiii},
are available in the soft X-rays (SXR) within a narrow (30~\AA) spectral range.
Most readers would be familiar with the \ion{Fe}{xviii} observed with the
AIA 94~\AA\ band, and the \ion{Fe}{xxi} in the AIA 131~\AA\ band.
The Table highlights
those that we consider our `primary' SXR lines, the strongest
resonance lines from six ionisation stages of iron, plus some density diagnostics.
The SXR spectral region has been used extensively in studies of laboratory
plasma. It also showed its diagnostic power to perform time-resolved
spectroscopy of stellar flares \citep[see, e.g.][]{delzanna_tesi,monsignori_etal:96}.
However, the SXR have been largely unexplored in solar physics.
The hot soft X-ray lines were observed on the Sun for the first time
in 1969 by the grazing incidence instrument on board
OSO-5 \citep{kastner_etal:74}. A portion of their flare B is shown in Figure~\ref{fig:sxr}.
After OSO-5, the same lines were observed during 2010--2014 by the SDO EVE
MEGS-A spectrometer \citep{woods_etal:12}. Both instruments observed the full Sun.
As significant low-$T$ background emission from the quiet Sun and active regions
is present, these high-$T$ lines are clearly observed only in EVE spectra of larger flares.
As an example, Figure~\ref{fig:sxr} shows a portion of the
SXR spectra during the peak phase of an M5-class flare (red) on 2010 Nov 6, with the
pre-flare background spectrum in black.
The SXR also provide excellent electron density diagnostics
around 10$^{11}$ cm$^{-3}$ of high-$T$ plasma,
as discussed by e.g. \cite{mason_etal:84}.
{The EVE medium (1~\AA) resolution made electron density measurements
achievable although difficult,
as discussed e.g. by \cite{milligan_etal:12_dens,delzanna_woods:2013,keenan_etal:2017}.
}
OSO-5 and EVE measurements indicate
densities of solar flares
in the range 10$^{11.5}$--10$^{12}$ cm$^{-3}$, as reviewed in \cite{delzanna_mason:2018}.
However, spatially resolved measurements of
such a fundamental parameter obtained from high-$T$ spectral lines have been lacking.
As with the X-rays, the SXR allow line to continuum measurements, i.e.
diagnostics of absolute chemical abundances (relative to hydrogen) of hot plasma during flares, as shown
e.g. by \cite{warren:2014} using EVE spectra of large flares.
Such measurements are in principle also available in the UV
\citep{feldman_etal:2003}.
The SXR contain lines from dozens of ions formed from 0.1 to 12 MK,
plus all Iron ionisation stages from \ion{Fe}{viii} to \ion{Fe}{xxiii}.
There are many
diagnostics for the lower temperatures that are not discussed here,
since this is not the focus of the paper.
Covering temperatures from 0.1 to 12 MK in such a narrow region
is a significant advantage over the other spectral ranges.
We made a significant effort to review all the SXR lines taking into account a revision of
available observations, to indicate which hot lines are likely to be blended
with cooler lines. The main results are summarised in the Supplementary material.
The identifications and atomic data for the cooler ions
in the SXR still require a significant effort. We note that the
strongest solar iron lines in the SXR were only identified recently
by \cite{delzanna:12_sxr1} when benchmarking against laboratory and
solar data a series of
large-scale scattering calculations for the SXR. The new
atomic data and identifications were introduced in
CHIANTI version 8 by \cite{delzanna_chianti_v8},
but a large fraction of weaker lines still await firm identifications.
Renewed efforts on measurements of laboratory plasma such as those
of \cite{traebert_etal:2014_131} and on further atomic calculations
should enable us to improve the completeness of the atomic data.
Doppler shifts of about 5 km s$^{-1}$ can easily be measured in the
SXR, and large broadenings are relatively easy to measure in the
against the background of cooler lines (which typically retain their
small widths).
The first solar observations of the SXR range with an imaging spectrograph
will be the upcoming flight of the Extreme Ultraviolet Normal Incidence
Spectrograph (EUNIS).
EUNIS will cover the wavelength range
92-112~\AA\ employing a dual multilayer PdB$_4$C stack with
two reflectivity peaks (of about 0.1) centred on
the \ion{Fe}{xviii} 94~\AA\ and \ion{Fe}{xix} 108~\AA\ lines, and
a few \AA\ wide.
Note
that multilayer coatings designed specifically to target a few hot lines
can provide higher reflectivities, such as proposed for the Multi-slit
Solar Explorer (MUSE) and in this paper.
MUSE, described in \cite{depontieu_etal:2020}, is designed to observe the SXR
\ion{Fe}{xix} 108.36~\AA\ and \ion{Fe}{xxi} 108.12\AA\ lines
(in addition to the strong coronal lines from \ion{Fe}{ix} 171 and \ion{Fe}{xv}
284~\AA)
with a large FOV (170\hbox{$^{\prime\prime}$} $\times$ 170\hbox{$^{\prime\prime}$}) and
a high resolution (0.4\hbox{$^{\prime\prime}$}).
The innovative and multiplexing design of this instrument will allow high
cadence (12s) spectral observations in these four lines through the use of 37 slits
(each spaced about 4.5\hbox{$^{\prime\prime}$}\ apart) covering a region of 170\hbox{$^{\prime\prime}$}\ $\times$170\hbox{$^{\prime\prime}$}.
It is important to note that high spatial resolution can be achieved in the SXR
with normal incidence. This has been shown by the
two SXR channels of the
SDO AIA \citep{lemen_etal:2012} telescopes, at 94 and 131~\AA.
Their sensitivity is high, due to good peak reflectances of the SXR multilayers
(0.4 and 0.7 respectively, see \citealt{soufli_etal:2005}), although obtained at the expense of
narrow spectral bands.
An additional advantage of the SXR is that the Zr front filters,
employed for AIA for the first time in space,
have shown minimal in-flight degradation \citep[see, e.g.][]{boerner_etal:2014},
unlike nearly every filter adopted for EUV/UV instruments flown in space
\citep[see, e.g.][]{benmoussa_etal:2013,delzanna_mason:2018}.
%
The main limitation of the SXR for a spectrometer has been the lack of multilayers
with sufficiently high reflectances and wide spectral bands.
A significant improvement has recently been obtained
by \cite{corso_etal:2020} with multilayers of
higher reflectances (0.25--0.4) at the specific wavelengths of the primary lines selected here.
\subsection{EUV}
The EUV has excellent diagnostics for lower-temperature
plasma, up to about 4~MK, but there are only few `hot' lines.
For example, the Hinode EIS instrument has provided excellent
EUV observations of 1--4 MK plasma, but is
`blind' until
the very hot (about 15 MK) flare lines from \ion{Fe}{xxiii} and \ion{Fe}{xxiv} are
observed \citep[see, e.g.][]{winebarger_etal:2012}.
These lines, as well as the low-temperature \ion{Fe}{xvii} and \ion{Ca}{xvii} lines
require careful deblending from cooler lines, when their intensity is weak
\citep[see, e.g.][]{young_etal:07a,delzanna:08_bflare,warren_etal:08,delzanna_ishikawa:09,delzanna_etal:2011_flare}.
Within the EUV, there is also
the strong \ion{Ca}{xviii} 302.2~\AA\ line, observed by e.g.
Skylab NRL-SO82A \citep[see, e.g.][]{dere:78} and
the SPIRIT slitless spectroheliograph on board CORONAS-F \citep{shestov_etal:2014}.
Another important hot line in the EUV is
the \ion{Fe}{xix} 592.2~\AA\ line,
which was first observed by the Skylab Harvard SO55 instrument,
then by SoHO CDS, and more recently
by the EUNIS-13 rocket flight \citep{brosius_etal:2014}.
Currently, one advantage of the EUV over the X-rays is that high spatial resolution can be
achieved with normal incidence, as shown e.g. with the
Hi-C sounding rocket, which obtained a spatial resolution of about
0.25\hbox{$^{\prime\prime}$}\ \citep{kobayashi_etal:2014}.
Even higher resolutions are achievable in the UV, as e.g. shown by IRIS.
\subsection{UV}
The main UV hot lines are \ion{Fe}{xix} 1118.1~\AA, \ion{Fe}{xx} 721.5~\AA,
and \ion{Fe}{xxi} 1354.1~\AA.
Several flare observations have been obtained
with high-resolution imaging spectroscopy from e.g. SoHO SUMER
(mostly of \ion{Fe}{xix} and \ion{Fe}{xxi})
and IRIS (\ion{Fe}{xxi}), see e.g.
\cite{kliem_etal:2002,polito_etal:2015}. \ion{Fe}{xxi} was
also observed earlier by SMM/UVSP.
The \ion{Fe}{xviii} 974~\AA\ is another strong line, which was
observed by SUMER \citep[see, e.g.][]{teriaca_etal:2012},
and is available to Solar Orbiter SPICE \citep{anderson_etal:2020}.
However, as we have mentioned, \ion{Fe}{xviii}
has a significant contribution from 3--4 MK emission and so its use
for measuring high temperatures by itself is limited.
A significant improvement in terms of sensitivity and resolution over SUMER is the
EUV Spectroscopic Telescope (EUVST, see \citealt{shimizu_etal:2019}), an M-class mission
recently selected by the Japanese Space Agency (JAXA).
The EUVST has a high throughput and a high spatial resolution of 0.4\hbox{$^{\prime\prime}$},
with a design based on the LEMUR instrument
\citep{teriaca_etal:2012_lemur}: the optical components have a
standard Mo/Si ML for the EUV: 170-–215~\AA, and a B$_4$C top layer
providing good reflectances in three UV bands: 690–-850,
925–-1085, and 1115–-1275~\AA.
The strongest lines in the wavelength regions
463--542 and 557--637~\AA\ would be observed in second order.
{ EUVST has been designed to address a broad range of science
questions.
The key requirement for EUVST is to obtain high-cadence, high-resolution
observations in spectral lines formed from photospheric to flare temperatures.
It will also be able to provide observations of iron lines formed
in the 5--10 MK range, hence will be able to provide important
contributions to the science topics mentioned here.
However, with the exception of \ion{Fe}{xix}, the lines from the
other iron ions are intrinsically weaker than the resonance SXR lines,
are observed in regions with lower sensitivities, and could be
affected by photoabsorption in active regions. The planned
EUVST spectral range is
also limited in electron density diagnostics (see below).
On the other hand, EUVST is excellent for measuring non-thermal widths and Doppler flows of a
few km s$^{-1}$ (as it also has photospheric lines to measure
rest wavelengths).
}
\subsection{Density diagnostics for hot (10 MK) plasma}
Finally, a few comments about the important issue of measuring electron densities
from line ratios. There are plenty of diagnostics and measurements across
different temperatures, as summarised in the review by \cite{delzanna_mason:2018}, but very few
for hot (10 MK) plasma.
We provide here a summary and further details on the hot plasma
diagnostics, which were not all included in the review.
There are measurements with SMM FCS from \ion{Fe}{xxi},
\ion{Fe}{xxii} lines in the X-rays around 9~\AA\ \citep{phillips_etal:1996}, which
indicated densities of 10$^{13}$ cm$^{-3}$ during a flare. These lines are
very weak and are difficult to measure though.
Still within the X-rays, there are potentially a few density diagnostic
ratios from \ion{Fe}{xix}, \ion{Fe}{xxi}, and \ion{Fe}{xxii},
but these involve weak and often blended lines in a spectral
region that is over-crowded even for the best crystal spectrometers such as
SMM FCS or the P78-1 SOLEX \citep{mckenzie_etal:80}.
Other density diagnostics involving satellite lines are
available, but at wavelengths shorter than 2~\AA.
The He-like hot ions in the X-rays do provide density diagnostics, but only for
densities above 10$^{13}$ cm$^{-3}$. At lower temperatures around 4 MK,
Ne He-like lines have indicated densities of 10$^{12}$ cm$^{-3}$ at the start of a flare
\citep{wolfson_etal:1983ApJ...269..319W}.
Aside from the X-rays, the only other measurements of densities of hot plasma are those
in the SXR, from OSO-5 \citep{mason_etal:1979,mason_etal:84}
and EVE. These density diagnostics are well-known and well-studied
in laboratory plasma, see e.g. \cite{stratton_etal:1984}.
The atomic data and identifications
for these $n$=2$\to$ $n$=2 transitions are well established.
The best diagnostic
ratios are those with the \ion{Fe}{xxi} 102.2, 121.2, 142.2, 145.7~\AA\
lines vs. the resonance line at 128.75~\AA, as shown in Figure~\ref{fig:ratios}
(see also Table~1). They provide excellent measurements
at relatively low densities, above 10$^{10}$ cm$^{-3}$.
Other ratios involve \ion{Fe}{xix}, \ion{Fe}{xx}, and \ion{Fe}{xxii} lines.
There are also interesting ratios involving \ion{Fe}{xix} lines,
as shown in Figure~\ref{fig:ratios}: they are sensitive to very low densities,
between 10$^{8}$ and 10$^{10}$ cm$^{-3}$, which would be particularly
important to investigate further. The variation in the \ion{Fe}{xix} ratios is only 25\% but measurable,
especially if the multi-layers are fine-tuned to increase the signal in the
weaker density-sensitive lines.
It would therefore be possible to measure any densities from 10$^{8}$ to
10$^{13}$ cm$^{-3}$ and above,
observing both the \ion{Fe}{xix} and \ion{Fe}{xxi} line ratios.
That would be quite an achievement.
{
There are in principle other density diagnostics at longer wavelengths.
Within the EUV, a good density diagnostic above 10$^{12}$ cm$^{-3}$ available
at the EUVST wavelengths is the \ion{Fe}{xx}
567.8/721.5~\AA\ ratio, although it
could be affected by neutral hydrogen
absorption in active region observations.
The 567.8~\AA\ is intrinsically a relatively strong line,
but will be observed in second order, where the sensitivity is low.
Also, as the thermal width at 10 MK of the
567.8 line is 0.17~\AA, the line will be
blended with the strong \ion{Si}{vii} 1135.4~\AA\ transition.
}
There are also two other options outside the EUVST spectral range.
One is the \ion{Fe}{xxi} 786/1354~\AA\
ratio, useful for densities higher than 10$^{11}$ cm$^{-3}$.
The other one, \ion{Fe}{xix}
1328/1118~\AA, is an excellent diagnostic for
densities of 10$^{11}$ cm$^{-3}$ or lower
\citep[see, e.g.][]{feldman_etal:2000}, although
the 1328~\AA\ line is intrinsically very weak: at
10$^{10}$ cm$^{-3}$, its intensity is only 2\% that of the
1118~\AA\ line, and decreases with density.
\section{Observed and predicted count rates in the SXR}
\subsection{Straw-man design}
To illustrate the current capability for an imaging SXR spectrograph, an example
(straw-man) instrument is presented.
For high collecting area and resolution, the
telescope mirror is a 20 cm diameter off-axis paraboloid with a focal length of
2 m that feeds a spectrograph with a magnification of 1.4,
along the lines of the successful Hinode EIS. A back-illuminated
CCD (or CMOS array) with 13.5 $\mu$m pixels at a distance of 1.4 m from the grating
provides an image scale of 1\hbox{$^{\prime\prime}$}/pixel.
Reducing the spatial resolution from e.g. the 0.3\hbox{$^{\prime\prime}$}\ of
the original LEMUR design not only increases the throughput but also significantly
simplifies the thermal requirements for a more compact instrument.
Clearly, a higher spatial resolution would be desirable, but would have
to be evaluated in a trade-off study, to ensure that, depending on the
size of the primary, sufficient signal can be obtained to
achieve the science goals of a specific mission.
In a recent study, \cite{corso_etal:2020} produced
a few new multilayers (ML), tuned to
have peak reflectances in our primary SXR lines.
We adopt two MLs: a three-fold Mo/Si standard ML for the
126--150~\AA\ range, and a new aperiodic B$_4$C/Y/B$_4$C/Pd for the
100--126~\AA\ range.
As the SXR hot primary lines cannot be observed with a
single multilayer, we envisage that both the mirror and the grating would be
segmented in two halves, each with a separate ML, as in the EIS instrument.
The spectral dispersion can be chosen to
use one or two 2048$\times$2048 pixel detectors to cover the wavelength region of
interest.
Holographic gratings with excellent micro-roughness on the scales relevant to
obtaining high SXR reflectivity (0.3 nm on spatial scales of 0.01-1 um) have
been demonstrated with line densities of 4000/mm and a blaze to maximize
throughput (the EUNIS flight grating has a density of 3800 l/mm, the EIS
one 4200 l/mm).
If used in first or second order, this would provide a dispersion
of 12 or 24 m\AA/pixel and a wavelength range of 24 or 49~\AA\ per detector,
respectively.
At the Nyquist limit, that provides a resolving power of R=2500
in first order (comparable to previous EUV spectrographs), or R=5000 in second
order. We select the second option here, and use the grating efficiencies in second order
calculated by \cite{corso_etal:2020}, which are close to 40\%.
The second order with two 2048 pixel detectors (as the Hinode EIS) provides
a pixel size of 0.01~\AA, corresponding to about 20 km s$^{-1}$.
This means that Dopplershifts of 2-5 km s$^{-1}$ are measurable.
We note that reconnection and associated flows are expected to be very fast
(on short time scales) so even a
resolution of a few tens of km s$^{-1}$ for the hot lines could be sufficient.
With a 0.01\AA\ slit, a 0.03\AA\ (or better) spectral resolution is achievable.
The thermal FWHM of the Fe ions in the ranges
6-10 MK and 108-135~\AA\ is 0.025-0.04~\AA, so with such resolution
the thermal width would be resolved.
{ However, considering that
significant non-thermal widths in the hot lines are likely present, a
lower spectral resolution could be sufficient.
In the plots that follow, we have adopted a 0.01~\AA\ pixel resolution,
included a thermal width of the lines (using their peak formation temperature),
and added an instrumental FWHM of 0.025~\AA.}
An alternative option would be a
4000/mm grating in first order, which would have higher efficiency (better than 50\%)
and would reduce the spectrograph size by 80\%, at the expense of a 0.02~\AA\ pixel
resolution, which would still be acceptable.
For the detector, we have assumed an
efficiency of 0.8, achievable with standard CCDs, such as the 4kx4k thinned
back-illuminated CCDs used by AIA. We note that these CCDs have been
proven very stable and higher efficiencies (0.85) have been achieved (Hi-C).
We have included a front filter, the same one used
for the AIA 94 and 131~\AA\ channels: a Zr filter, which has
a transmission across the soft X-rays of about 0.4.
We note that such filter includes a reduction of 15\% due to the supporting mesh,
although a mesh with a 95\% transmission has been flown aboard
Hi-C \citep[see, e.g.][]{kobayashi_etal:2014}, so better transmission is achievable.
We also note that the inclusion of a safety redundant filter
in front of the detector would reduce by about 50\%
the signal we predict here. An alternative, adopted for the
EUNIS-13 flight, would be not to use a front filter and use a KBr coated
micro-channel plate (MCP) detector (not affected by visible light)
instead of a CCD detector. In this case, the detected signal would be much higher than the
values presented here.
Fig.~\ref{fig:effa} shows the resulting effective area, which is the product
of the filter transmission, the reflectivity of the primary,
that of the grating, the grating efficiency, the geometrical area and
the quantum efficiency of the detector.
For comparison purposes, the same figure also shows the
LEMUR \citep{teriaca_etal:2012_lemur} effective area in the EUV and UV,
scaled to the same geometrical area of each SXR channel.
The figure clearly indicates that similar effective areas are
achievable in the SXR and UV, for an equivalent aperture. As we have seen that
the photons emitted by the hot lines in the SXR and UV are comparable,
this indicates that similar numbers of detected photons are achievable either in
the SXR or the UV.
We note however that the EUVST baseline design assumes a large primary mirror
with a 28 cm diameter, so its effective area is
actually about a factor of four higher than what is shown in the EUV and UV
panels in Fig.~\ref{fig:effa}.
We also note that MUSE has a comparable effective area of 2 cm$^2$,
while MaGIXS has a peak
effective area of 0.03 cm$^2$ \citep{athiray_etal:2019}.
To estimate the signal $S$ detected (data numbers per second, DN/s)
in a pixel we use:
\begin{equation}
S = I_{\rm r} \, A_{\rm eff} \, {12398.5 \over 3.65 \, \lambda \, G } \, \Omega
\end{equation}
\noindent
where the terms convert the number
of electrons produced in the CCD by a photon of wavelength $\lambda$ (\AA)
into data numbers DN. $I_{\rm r}$ is the incident radiance,
$A_{\rm eff}$ is the effective area,
$G$ is the gain of the camera, and $\Omega$ is the solid angle subtended by a
pixel.
We have assumed a gain of 6.3, the same as the EIS CCD.
\subsection{Count rates for the 10 MK emission}
We now return to the 10 MK simulation. The first radiance column
in Table~1 shows that the \ion{Fe}{xix} 1118.0~\AA\ radiance is 0.23 erg cm$^{-2}$ s$^{-1}$ sr$^{-1}$,
which is very close to the minimum values (0.22--0.5) recorded
(with a total exposure of two hours and only in some locations)
by SUMER \citep{parenti_etal:2017}.
The \ion{Fe}{xix} 592.2~\AA\ radiance is
0.24 erg cm$^{-2}$ s$^{-1}$ sr$^{-1}$, a value over 20 times lower than
that measured with EUNIS-13 by \cite{brosius_etal:2014}, but not
inconsistent with other EUNIS-13 observations, as we have mentioned.
Fig.~\ref{fig:sp_10mk} shows the expected SXR count rates for the
very weak 10 MK emission of Figure~\ref{fig:phot_spectrum}.
The 10 MK spectrum has been added to that of an active region core,
discussed in the Supplement. Note that the units in the spectra are
per pixel (0.01~\AA) resolution, while Table~1 provides the total
count rates in the lines.
As we have discussed, a good proxy for the 5--10 MK emission are
\ion{Fe}{xix} and higher ionisation stages.
The count rates in the
\ion{Fe}{xix}-- \ion{Fe}{xxiii} strongest lines are in the range 1.4--6.5.
Such signals are easily measurable with a cadence of a few seconds
and spatial averaging over $\simeq$ 4\hbox{$^{\prime\prime}$}.
This is a major improvement over the two hours exposures and
spatial averaging obtained with SUMER in \ion{Fe}{xix}
\citep{parenti_etal:2017}.
As we have mentioned, none of the previous observations of hot emission
in AR quiescent cores were able to provide an indication of the distribution
of temperatures above 5 MK. Upper limits in the 4--15 MK range
have been provided by continuum emission or the \ion{Mg}{xii} images.
The few \ion{Fe}{xix} observations from SUMER and CDS provide a similarly unclear picture.
So it is possible that the count rates we estimate at 10 MK are either
an over- or an under-estimate by a large margin. If say they were over-estimated
by two orders of magnitude, a measureable signal of $\simeq$ 100 DN/s
could be obtained by an acceptable
spatial averaging over $\simeq$ 20\hbox{$^{\prime\prime}$}\ and a two-minute exposure.
The \ion{Fe}{xix} 108.36~\AA, \ion{Fe}{xx} 121.85~\AA,
\ion{Fe}{xxi} 128.75~\AA, and \ion{Fe}{xxii} 135.81~\AA\
resonance lines are all excellent candidates.
The \ion{Fe}{xix} 108.36~\AA\ has a small contribution from the
quiescent AR core, which is questionable.
The \ion{Fe}{xx} 121.85~\AA\ is super-imposed on an
unidentified weak \ion{Fe}{xi} transition which
is currently expected at the same wavelength,
although the quiet Sun spectra suggest that this is not the case
(see the Supplementary material).
As there are many \ion{Fe}{xi} transitions
within the two SXR channels, it would be easy to deblend the \ion{Fe}{xi}
contribution, if the line was at that wavelength.
The \ion{Fe}{xxi} 128.75~\AA\ is unblended, while the \ion{Fe}{xxii} 135.81~\AA\
is blended on its red wing with a \ion{O}{vii} 135.83~\AA\ line. The \ion{O}{vii}
can accurately be estimated measuring other \ion{O}{vii}
transitions, such as the strong \ion{O}{vii} 120.33~\AA\ self-blend.
Finally, the \ion{Fe}{xxiii} could be deblended from the
\ion{O}{vii} and other lines.
\subsection{Count rates from a nanoflare simulation}
To provide an estimate based on a numerical
nanoflare simulation, we took the
DEM distribution from the L = 120 Mm case as described by
\cite{2015ApJ...799..128L}.
This simulation is realistic in that it includes a
variety of magnitudes and frequencies.
The DEM distribution has large values at low temperatures, hence the
simulation also naturally includes all the transition-region lines,
as well as the coronal and the hot lines.
As we would expect low densities around 10$^{8}$ cm$^{-3}$
for the hotter plasma and higher ones (10$^{9}$ cm$^{-3}$) for the coronal lines,
we have adopted a constant pressure of
10$^{15.5}$ cm$^{-3}$ K for the simulated spectra.
Fig.~\ref{fig:sp_nano} and Table~1 show the expected SXR count rates.
There is clearly a very strong signal in all the hot primary lines
(i.e. from \ion{Fe}{xviii}--\ion{Fe}{xxiii}).
\subsection{Count rates for a sub-A class microflare, additional broadening and densities}
To estimate the signal for a very weak microflare, we consider the
0.005 A-class NuSTAR observations discussed by \cite{cooper_etal:2020ApJ...893L..40C}.
The NuSTAR X-ray Bremsstrahlung emission was well fitted with an
isothermal emission of 6.7 MK. The signal in the AIA 94~\AA\ band, due to \ion{Fe}{xviii},
was at the limit of detection.
We converted the volume EM
to a column emission measure $EM = 1.18 \times $10$^{27}$ (cm$^{-5}$).
Using our 'coronal' abundances we expect about 3 DN/s/pixel
due to \ion{Fe}{xviii} in the AIA 94~\AA\ band, close to what was observed.
Fig.~\ref{fig:sp_submflare} shows sections of our predicted
SXR count rates for a density of 10$^{11}$ cm$^{-3}$,
added to those of the active region core
discussed in the Supplement. The total count rates are given in
Table~1.
There is plenty of signal in all the resonance lines.
They are not affected by the 'background' emission, with the
exception of \ion{Fe}{xxii}, which is very weak given such a low
temperature, and \ion{Fe}{xviii}, as significant quiescent
emission is expected to be present.
Time-dependent ionisation on a 1\hbox{$^{\prime\prime}$} spatial scale could be studied
with exposure times of 1--10s.
The Figure also shows the effect of an additional
broadening of 200 km s$^{-1}$ FWHM, which would be easily measurable for the main
\ion{Fe}{xviii}, \ion{Fe}{xix}, \ion{Fe}{xx}, and \ion{Fe}{xxi} lines,
as no significant background emission from cooler lines is present.
Much stronger broadenings would become difficult to observe, for
this very weak hot emission.
Regarding density measurements, the comparisons with irradiance
spectra shown in the Supplement indicate that the
\ion{Fe}{xix} 119.98~\AA\ and \ion{Fe}{xxi} 121.21, 142.2~\AA\ density-sensitive
lines fall in regions relatively free of background emission.
The \ion{Fe}{xxi} 145.73~\AA, on the other hand, is close to a \ion{Ni}{x}
line and would require background subtraction.
The expected count rates indicate that even for this
extremely weak microflare, densities could be measured with
exposure times of about 100 seconds at 1\hbox{$^{\prime\prime}$}\ resolution.
\subsection{Count rates for an A class microflare}
As representative of a weak A class microflare, we have considered
an isothermal plasma emission at 8 MK, an
electron density of $N_{\rm e}$=10$^{11}$ cm$^{-3}$,
the \cite{delzanna:2013_multithermal} coronal abundances and
an emission measure $EM = 10^{29}$ cm$^{-5}$.
The microflare radiances are listed in Table~\ref{tab:list}.
These parameters were chosen so as to reproduce
the \ion{Fe}{xvii} and \ion{Ca}{xvii} radiances during
the peak emission of a microflare recorded by EIS \citep{mitra-kraev_delzanna:2019}.
We note that the actual peak temperature of the post-flare loops was about 5 MK,
although short-lived higher temperatures were probably present during
the impulsive phase in one of the footpoints
\citep[see also][]{testa_reale:2020}.
Using the effective areas of the instruments, we found out that
such a weak 8~MK microflare would be invisible to EIS in
\ion{Fe}{xxiii} and at the limit of detection for
IRIS in the \ion{Fe}{xxi} 1354.1~\AA\ line
(we estimate 3 IRIS DN/s in the line). On the other hand, it
would have been well observed by the SDO AIA SXR bands, with
about 200 DN/s in the
\ion{Fe}{xviii} 94~\AA\ channel and 126 DN/s in \ion{Fe}{xxi}
within the 131~\AA\ band.
Fig.~\ref{fig:sp_mflare} shows the simulated SXR count rates (1\hbox{$^{\prime\prime}$}\ pixel)
for the microflare case study, added to those of the active region core
discussed in the Supplement.
The SXR channel provides very large count rates in all the primary lines,
as listed in Table~1.
For example, the \ion{Fe}{xxi} 128.75~\AA\ resonance line
would produce 3.0$\times$10$^{3}$ DN/s.
The \ion{Fe}{xix} and \ion{Fe}{xxi} density-sensitive lines are also strong,
providing excellent density measurements
with very short timescales of a second or so at 1\hbox{$^{\prime\prime}$}\ resolution.
Larger (e.g. B-class) flares would require sub-second exposure times to avoid saturation.
The significant differences with the spectra of the
sub-A class microflare are due not just to the increased emission measure,
but also to the increased temperature, from 6.7 to 8 MK.
\section{Conclusions}
Understanding a range of heating/cooling events in active regions and probing
for the presence of time-dependent ionisation requires high-resolution line
spectroscopy of 5--10 MK plasma, with observations of multiple ionisation
stages of an element and simultaneous observations of the electron densities.
This has never been achieved in solar physics. There are plenty of detailed
observations of cooler or hotter plasma, but very few around these
temperatures.
{%
In this paper, we have demonstrated that the soft X-ray around 100~\AA\ is
the best range to carry out such investigations, since it provides, in a
relatively narrow wavelength range of $\sim$50 \AA, six ionisation stages of
iron to probe 5--10 MK plasma, together with excellent density diagnostics
above 10$^{10}$ cm$^{-3}$, plus some above 10$^{8}$ cm$^{-3}$.
%
As this spectral region is practically unexplored, } we
have provided here and in the Supplementary material an overview of the main
spectral features for different solar conditions, from the quiet Sun to active
regions, nanoflares and microflares. The primary SXR hot lines are very
strong, close in wavelength and very sensitive to temperatures in the 5--12 MK
range.
We have presented estimated count rates with a straw-man imaging spectrometer,
similar in size to the successful Hinode EIS instrument. The technology for a
soft X-ray instrument is mature. With the exception of the new multilayers,
which would have to be fabricated and tested, all the components are standard,
have flown on previous missions, and have proven to be long-lived.
However, as discussed in \cite{corso_etal:2020}, multilayers of the type
adopted here have already been fabricated and have shown good stability to thermal
effects and over time, see e.g. \cite{windt_gullikson:2015}.
We have shown that effective areas comparable to those in the UV (for
equivalent telescope aperture) can be achieved with high spatial resolutions
of 1\hbox{$^{\prime\prime}$}\ or better. Time-dependent ionisation, heating and cooling cycles
can be studied at such resolutions with a cadence of seconds for a wide range
of sub A-class microflares. Flows can be studied with a few km s$^{-1}$
resolutions. The unresolved hot emission expected to result from nanoflares
can be studied with a cadence of a few seconds with spatial averaging.
{%
The present concept for a SXR spectrometer is designed to demonstrate the
potential for discovery in that largely unexplored wavelength range, with the
primary science goal of understanding the physics of
the hot (5-10 MK) plasma in active
regions. As such, this straw-man instrument is complementary to other
future or proposed missions designed to address, for instance, the top-level
science objective of the formation mechanisms of the hot and dynamic outer
solar atmosphere, as described in the report of the Next Generation Solar
Physics Mission Science Objectives Team, NGSPM-SOT.
}
{%
Once the first SXR observations from EUNIS and further laboratory
observations become available, it will be possible to confirm the
present predictions, thus allowing to perform trade-off studies for specific
science goals. In particular, the
%
}
multi-layers
adopted here were designed to maximize the signal in the primary resonance
lines in the six ionisation stages of iron, but could be adjusted to
increase the signal in the much weaker density-sensitive lines.
{%
Also, a scaled-down version of the proposed straw-man design would
result in a very compact and cost-effective instrument,
producing novel observations in this unexplored region.
}
In summary, the 5-10 MK temperature regime is a largely unexplored discovery
space, precisely where magnetic energy conversion is occurring.
High-resolution spectroscopy in this regime can be expected to provide
breakthroughs. Although in this paper we have focused on the almost
unexplored 5--10 MK plasma emission, the SXR instrument is also sensitive to a
broad range of temperatures, from 0.1 to 5 MK, with many diagnostics not
discussed here. Also, the proposed SXR instrument is sensitive to larger
(B-class and over) flares and higher temperatures, up to around 15--20 MK with
\ion{Fe}{xxiii} and even higher with the continuum emission, with timescales
much shorter than a second.
\section*{Conflict of Interest Statement}
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
\section*{Author Contributions}
GDZ wrote the article and produced the figures
but received contributions to the text from all the co-authors.
AJC also provided the reflectivities of the multilayers and the grating.
AND (PI of EUNIS-13) also contributed to the figures for the
straw-man design. JAK also provided the results of the nanoflare simulations.
\section*{Funding}
GDZ and HEM acknowledge support from STFC (UK) via the consolidated grants
to the atomic astrophysics group (AAG) at DAMTP,
University of Cambridge (ST/P000665/1. and ST/T000481/1).
The work of JAK was supported by the GSFC Internal Scientist Funding Model (competitive work package) program.
AND acknowledges support through NASA Heliophysics awards 13-HTIDS13 2-0074
and 16-HTIDS16\_2-0064.
\section*{Acknowledgments}
We would like to thank Bart De Pontieu (USA), Vanessa Polito (USA), and Luca Teriaca (Germany)
for providing useful comments on the manuscript, as well as the reviewers.
\section*{Supplemental Data}
The supplementary material presents an analysis of
quiet Sun SXR spectra, and predicted spectra for the
quiet Sun and quiescent active region cores, to show
the expected `background' emission.
\input{def_journals.tex}
\bibliographystyle{frontiersinSCNS_ENG_HUMS}
|
\section{Introduction}
\vspace{-0.3cm}
Studying fundamental structural and dynamic properties of neuronal networks critically depends on advanced optical microscopy imaging systems.
In contrast to conventional optical microscopy that records only lateral information as a 2D projection of light rays, light-field microscopy (LFM)~\cite{levoy2006light,broxton2013wave,cohen2014enhancing} has has emerged as a promising 3D optical imaging technique. LFM is able to simultaneously gather both position and angular information of the incident light rays arriving at the sensor with a single snapshot~\cite{levoy1996light}. This is achieved by inserting a microlens array (MLA) at the native imaging plane and by moving the imaging sensor to the back focal plane of the microlenses~\cite{levoy2006light}.
With benefits of high light efficiency and fast imaging speed, LFM demonstrates great potential of observing structures and dynamics at the cellular resolution across whole brain volumes~\cite{nobauer2017video,pegard2016compressive,quicke2020subcellular}.
\begin{figure}[t]
\centering
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 8cm,
trim=7cm 0cm 0cm 0cm,clip
]{./Figures/FigureFlowChart/LFM_EPI_system.png}
\end{minipage}
\vspace{-0.3cm}
\caption{Schematic for microlens-based LFM system and typical imaging situations, e.g. source in-focus and out-of-focus.
Different depths (i.e. axial positions) cause different patterns in LFM images and constructed EPIs.
}
\label{Fig:microlens-basedLF}
\end{figure}
However, imaging with LFM also has limitations, such as reduced spatial resolution, slow reconstruction, image degradation due to light scattering in deep layers.
To address these issues, some work focuses on improving spatial resolution via, e.g. 3D deconvolution~\cite{broxton2013wave,cohen2014enhancing,nobauer2017video}, while some work detects the 3D positions of sources directly by performing sparse decomposition in phase-space~\cite{liu20153d,pegard2016compressive}, or by performing convolutional sparse coding with respect to a synthetic dictionary~\cite{song20203D,song19location}. Different from existing methods, we propose a model-inspired deep learning approach for fast and robust 3D localization of sources from a single light-field image.
In the past decade, learning-based methods, in particular deep learning~\cite{goodfellow2016deep}, have demonstrated enhanced performance in terms of speed and accuracy over conventional model-based methods. However, deep neural networks are usually designed empirically and their structures lack interpretability, which is a prominent shortcoming. In the past few years, algorithm unrolling/unfolding~\cite{gregor2010learning,chen2018theoretical,li2020efficient,deng2020deep} has emerged as a promising technique to design deep networks in a more principled way by unrolling iterative methods. It bridges model-based methods with learning-based methods, and this leads to enhanced interpretability and better generalization ability of deep networks.
In this work, we develop a network using algorithm unrolling to localize neurons in tissues from LFM images. The network performs convolutional sparse coding on input epipolar plane images (EPI)~\cite{bolles1987epipolar,gortler1996lumigraph,vagharshakyan2018light}, a type of spatio-angular feature constructed from light-field images, and output sparse codes which indicates depth positions.
\begin{figure*}[t]
\centering
\includegraphics[width = 16cm,
]{./Figures/CISTA-net/CISTA_net.png}
\vspace{-0.3cm}
\caption{Proposed CISTA-net. An input EPI $\mathbf{X}$ containing two sources is mapped to sparse codes $\mathbf{Z}$ whose support indicates depths. Cross-entropy loss between the estimation $\mathbf{Z}$ and the label $\mathbf{Z}^\star$ is computed and back-propagated to update parameters.
}
\label{Fig:CISTA_net}
\end{figure*}
\vspace{-0.2cm}
\section{Model-inspired Network Design}
\label{sec:Problems}
\vspace{-0.2cm}
To design the network in a principled and systematic way, we first present the convolutional sparse coding (CSC) model~\cite{song20203D} and a convolutional version of Iterative Shrinkage and Thresholding Algorithm (ISTA)~\cite{beck2009fast}. Then, we unroll the Convolutional ISTA method to design the network architecture, so that the network, referred to as CISTA-net, imitates the processing flow that maps EPIs into sparse codes. Finally, the parameters of the network are learned from a well-designed training dataset.
\vspace{-0.2cm}
\mypar{Convolutional Sparse Coding model}
The method developed in~\cite{song20203D} leverages the fact that neurons localized in space are relatively similar to point-like sources. Given raw light-field microscopy images, we use the method proposed in~\cite{song20203D} to perform calibration, conversion, and purification to get an array of clean sub-aperture images. Then, the horizontal and vertical positions, i.e. the x and y coordinates of sources can be detected from the central sub-aperture image by finding those pixels brighter than a specified threshold.
Depth detection along the axial coordinate is not trivial as it requires the proper leverage of the angular information. To this end, EPIs are often used to simultaneously reveal the spatial and angular information captured in 4D light-field data, as shown in Figure~\ref{Fig:microlens-basedLF}.
To infer depths from EPIs, one may construct an EPI dictionary that consists of basic EPIs related to sources which are associated to different depths.
Such an EPI dictionary can be used to decompose an input EPI into a sparse linear combination of basic EPIs.
Finding this sparse decomposition can be modelled as a convolutional sparse coding problem~\eqref{Eq:CSC_model}(See also~\cite{song20203D}).
Specifically, given an observed EPI $\mathbf{X} \in \mathbb{R}^{\Theta \times N}$ where $\Theta$ denotes angular dimension, i.e. number of pixels in a single microlens, and $N$ denotes spatial dimension, i.e. number of microlens, we aim to obtain a series of sparse codes $\{ \mathbf{z}_m \in \mathbb{R}^{\Theta \times N} \}_{m=1}^M$ via decomposition with respect to a predefined EPI dictionary $\{ \mathbf{d}_m \in \mathbb{R}^{\theta \times n} \}_{m=1}^M$ ($M$ denotes number depths to be covered and $\theta \leq \Theta$, $n \leq N$). For simplicity, all the variables have been vectorized into column vectors and then such decomposition can be formulated as:
\begin{equation}
\label{Eq:CSC_model}
\begin{array}{cl}
\underset{ \{\mathbf{z}_m \}}{\min}
&
\frac{1}{2} \left\|\mathbf{X} - \sum\limits_{m=1}^{M} \mathbf{d}_m * \mathbf{z}_m \right\|_2^2
+ \lambda \, \sum\limits_{m=1}^{M} \|\mathbf{z}_m \|_1
\end{array}
\end{equation}
where, $\mathbf{d}_m$ is the $m$-th element of the EPI dictionary and $\| \cdot \|_1$ is the $\ell_1$ norm that summarizes the absolute value of non-zero elements.
\mypar{Convolutional ISTA algorithm.}
Problem~\eqref{Eq:CSC_model} can be solved using the Convolutional ISTA algorithm which consists of the following computationally-efficient projected gradient descent iterations:
\begin{equation} \label{Eq:conv_ISTA_SingleUnit}
\small
\begin{split}
\mathbf{z}_k^{(i+1)}
& = \mathcal{T}_{\lambda} \left( \mathbf{z}_k^{(i)} - \gamma \mathbf{d}_k^\top * \sum\limits_{m=1}^{M} \mathbf{d}_m * \mathbf{z}_m^{(i)} + \mathbf{d}_k^\top * \mathbf{X} \right)
\end{split}
\end{equation}
where $k = 1, \cdots, M$, the superscript $^{(i)}$ denotes the iteration index, and $\gamma$ is the step size.
$\mathcal{T}_{\lambda} (\cdot)$ is the element-wise soft-thresholding function, defined as $\mathcal{T}_\lambda(x) = \text{sign}(x) \cdot (| x | - \lambda)_+$ with an appropriate $\lambda \geq 0$, which is used to enforce sparsity on sparse codes.
Equation~\eqref{Eq:conv_ISTA_SingleUnit} can also be rewritten as:
\begin{equation} \label{Eq:conv_ISTA_Unit}
\small
\begin{split}
\mathbf{Z}^{(i+1)}
& = \mathcal{T}_{\lambda} \left( \mathbf{Z}^{(i)} - \gamma \mathbf{D}^\top \circledast
\sum \mathbf{D} \circledast \mathbf{Z}^{(i)}
+ \mathbf{D}^\top \circledast \mathbf{X} \right)
\end{split}
\end{equation}
where dictionary $\mathbf{D} \in \mathbb{R}^{\theta \times n \times M}$ consists of an array of $M$ $\theta \times n$ basic EPIs, $\mathbf{D}^\top \in \mathbb{R}^{n \times \theta \times M}$ is the transposed version of $\mathbf{D}$. Symbol $\circledast$ denotes convolution along the first and second dimension, i.e. spatio-angular dimension, and the symbol $\sum$ denotes summation of convolution results along the third dimension.
Once the sparse codes are obtained, the largest values of each sparse code $\mathbf{z}_m$ are selected and combined into a new vector, similar to the GlobalMaxPooling operation commonly used in deep learning. Then the non-zero support of the new sparse vector leads to the depth.
\mypar{CISTA-net design.}
Our CISTA-net aims to mimic above processing flow. So \eqref{Eq:conv_ISTA_Unit} is adapted to \eqref{Eq:CISTA_net_block} which serves as the unit module to build the network. Then, the entire network architecture can be obtained by concatenating the unit module multiple times, which accounts for algorithm unrolling. So we have:
\begin{equation} \label{Eq:CISTA_net_block}
\small
\begin{split}
\mathbf{Z}^{(i+1)}
& = ReLU \left( \mathbf{Z}^{(i)} - \mathbf{S}^{(i)} \circledast \mathbf{Z}^{(i)} + \mathbf{W}^{(i)} \circledast \mathbf{X} + \lambda \right)
\end{split}
\end{equation}
where trainable filters $\mathbf{S}^{(i)}$ and $\mathbf{W}^{(i)}$ replace the variable $\gamma \mathbf{D}^\top \circledast \sum \mathbf{D} $ and $\gamma \mathbf{D}^\top$, respectively. $ReLU$ (i.e. Rectified Linear Unit) with trainable non-negative bias $\lambda$ play the role of the soft-thresholding. The overall architecture of the CISTA-net is shown in Figure~\ref{Fig:CISTA_net}.
Even though the unrolling/unfolding idea has been investigated in the literature, the proposed unrolling network has some particular characteristics and appealing attributes. In particular, operation $ \mathbf{d}_m * \mathbf{z}_m^{(i)}$ in \eqref{Eq:conv_ISTA_SingleUnit} or $ \mathbf{D} \circledast \mathbf{Z}^{(i)} $ in~\eqref{Eq:conv_ISTA_Unit} actually performs convolution between each pair of EPI $\mathbf{d}_m$ and sparse codes $\mathbf{z}_m$. Such pair-wise convolution inspires us to exploit, instead of plain convolution, depth-wise separable convolution~\cite{howard2017mobilenets} which reduces the number of network parameters.
Besides, the subtraction operation $\mathbf{Z}^{(i)} - \mathbf{S}^{(i)} \circledast \mathbf{Z}^{(i)}$ leads to a local skip connection which evokes the residual module used in the ResNet~\cite{he2016deep}. Finally, transformed $\mathbf{X}$ added in each layer facilitates information propagation from the first layer directly to each hidden layer, thereby alleviating information loss. This structure reveals certain resemblance to dense connectivity module used in DenseNet~\cite{huang2017densely}, even though not each layer is receiving a connection from all preceding layers.
Even though some of these architecture modules have been used in modern neural networks, we here provide a new and interesting perspective to elaborate how they can naturally derive from a well-designed model and corresponding iterative method, rather than pure intuition commonly used in general network design.
Rather than sticking to Model~\eqref{Eq:conv_ISTA_Unit} rigidly, we also employ some customized modifications to further enhance the capability of the network. For example, the size of filters $\mathbf{S}^{(i)}$ and $\mathbf{W}^{(i)}$ increases across different layers so that the receptive field increases gradually to facilitate capture of both local details and global structure.
In addition, a fully-connected layer followed by sigmoid activation is added after the GlobalMaxPooling layer to perform non-linear transformation. Such slight departures from the original convolutional ISTA algorithm enable extended representation capability of the network.
\vspace{-0.2cm}
\section{Experiment}
\label{sec:Experiments}
\vspace{-0.2cm}
In this section, we evaluate the performance of CISTA-net on the 3D localization task. We also compare our approach with the phase-space based method (Phase-Space for short)~\cite{liu20153d,pegard2016compressive} and convolutional sparse coding based method (CSC for short)~\cite{song20203D} on light-field microscopy data obtained from scattering specimens -- genetically encoded fluorophore in mouse brain tissues, as shown in Fig.~\ref{Fig:SparseCodes} (a).
The raw light-field microscopy images were captured by systematically changing the axial distance between the specimens and the objective lens of LFM as in~\cite{song20203D}. Therefore, each light-field microscopy image captures a 3D volume at a specified depth.
All the experiments were conducted in a computer equipped with an Intel hexa-core i7-8700U [email protected] with 28GB of memory and a NVIDIA GTX 1080 Ti GPU.
\begin{figure}[t]
\centering
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 9cm,
]{./Figures/CISTA-net/Soft-label_Design.png}
\end{minipage}
\vspace{-0.4cm}
\caption{
Illustration to the construction of soft-labels.
}
\label{Fig:Soft-label}
\end{figure}
\begin{figure}[t]
\centering
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 6cm, height = 3.5cm,
]{./Figures/NetworkTraining/Train_Val_Curve.png}
\end{minipage}
\vspace{-0.3cm}
\caption{
Convergence curve of training and validation loss.
}
\label{Fig:Training}
\end{figure}
\begin{figure}[t]
\begin{minipage}[b]{0.33\linewidth}
\raggedleft
\includegraphics[width = 2.4cm,
]{./Figures/CISTA-net/Cell_SZ257/LFM_s1/ScaleBar/frame4_size257_rotate.png}
\end{minipage}
\begin{minipage}[b]{0.325\linewidth}
\raggedleft
\includegraphics[width = 2.4cm,
]{./Figures/CISTA-net/Cell_SZ257/LFM_s1/ScaleBar/frame19_size257_rotate.png}
\end{minipage}
\begin{minipage}[b]{0.325\linewidth}
\raggedleft
\includegraphics[width = 2.4cm,
]{./Figures/CISTA-net/Cell_SZ257/LFM_s1/ScaleBar/frame34_size257_rotate.png}
\end{minipage}
\\
\begin{minipage}[b]{1\linewidth}
\raggedleft
\includegraphics[width = 2.8cm,
trim=0cm 0cm 9cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_3.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 9cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_18.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 9cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_33.png}
\\
\scriptsize (a) LFM images (above) and corresponding EPIs (bottom) for depth of -15, 0, 15 \si{um}.
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame4.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame19.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame34.png}
\\
\scriptsize (b) Estimation of sparse codes and depth using phase-space method~\cite{liu20153d,pegard2016compressive}.
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame4.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame19.png}
\includegraphics[width = 2.8cm,
trim=0cm 0cm 0.8cm 0cm,clip
]{./Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/CSC_coeff_ik_frame34.png}
\\
\scriptsize (c) Estimation of sparse codes and depth using CSC method~\cite{song20203D}.
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{1\linewidth}
\centering
\includegraphics[width = 2.8cm,
trim=8.5cm 0cm 0cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_3.png}
\includegraphics[width = 2.8cm,
trim=8.5cm 0cm 0cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_18.png}
\includegraphics[width = 2.8cm,
trim=8.5cm 0cm 0cm 0.5cm,clip
]{./Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/EPI_Supp_Val_33.png}
\\
\scriptsize (d) Estimation of sparse codes and depth using CISTA-net.
\end{minipage}
\vspace{-0.5cm}
\caption{
Visual comparison of estimated sparse codes and depth detection using different methods. In each subfigure, the red dashed line indicates estimated sparse codes and the red crosses indicate estimated depths. The blue line indicates the soft-labels, and the blue circle indicates the groundtruth depths.
}
\label{Fig:SparseCodes}
\end{figure}
\begin{figure}[thb]
\centering
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
]{Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_x.png}
\end{minipage}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
]{Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_y.png}
\end{minipage}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
trim=0.6cm 0cm 8.4cm 0cm,clip
]{Figures/PhaseSpace_Method/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_z.png}
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{0.99\linewidth}
\centering
\small (a) Localization performance of phase-space method~\cite{liu20153d,pegard2016compressive}. RMSE for x, y, z position detection is 4.05, 5.48, 3.41 \si{\um}, respectively.
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
]{Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_x.png}
\end{minipage}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
]{Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_y.png}
\end{minipage}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 3cm, height = 2.8cm,
trim=0.6cm 0cm 8.3cm 0cm,clip
]{Figures/Figure_EPI_CSC/Cell_SZ257/noBG_55Frames_s1/RealEPI_CSC_recon_z.png}
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{0.99\linewidth}
\centering
\small (b) Localization performance of CSC approach~\cite{song20203D}. RMSE for x, y, z position detection is 1.78, 2.94, 1.14 \si{\um}, respectively.
\end{minipage}
\\
\vspace{+0.3cm}
\begin{minipage}[b]{0.66\linewidth}
\centering
\includegraphics[width = 5.6cm, height = 2.6cm,
]{Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/xy_estimation.png}
\end{minipage}
\begin{minipage}[b]{0.32\linewidth}
\centering
\includegraphics[width = 2.7cm, height = 2.6cm,
trim=0cm 0cm 7.9cm 0cm,clip
]{Figures/CISTA-net/Cell_SZ257/noBG_55Frames_s1/Z_Detect_Error_Val_Ave.png}
\end{minipage}
\\
\vspace{+0.2cm}
\begin{minipage}[b]{0.99\linewidth}
\centering
\small (c) Localization performance of the proposed CISTA-net. RMSE for x, y, z position detection is 1.60, 1.98, 0.82 \si{\um}, respectively.
\end{minipage}
\\
\vspace{-0.2cm}
\caption{
Performance of localizing neurons using three different methods, including phase-space method~\cite{liu20153d,pegard2016compressive}, CSC method~\cite{song20203D}, and the proposed method. The depth of neurons varies from -18 \si{\um} to 36 \si{\um}.
}
\label{Fig:Compare3Methods_Cell}
\end{figure}
\vspace{-0.2cm}
\mypar{Training settings.}
Figure~\ref{Fig:Soft-label} shows how we construct the labelled training datasets. Since the designed CISTA-net is expected to output sparse codes where the positions of non-zero elements (i.e. support) indicate the depths corresponding to input EPIs, it needs to be trained on labelled data in order to learn the mapping from an input EPI to the corresponding sparse codes. However, coefficient values in sparse codes are unknown.
To handle this issue, we treat the task as a multi-class, multi-label classification task where the support of the sparse codes indicates target classes/categories while the coefficient values indicate probability or confidence of the input signal falling into each class.%
\footnote{
Note, if the task is treated as a regression task, the output of the network will be a number that denotes the continuous depth, thus it can not handle the case with multiple neurons in the region of interest as this gives multiple lines in an EPI.
}
In this way, we only need weakly annotated sparse codes with roughly estimated coefficient values.
In addition, we found that EPIs corresponding to adjacent depths tend to have similar patterns, and thus exhibit high coherence and lead to group sparsity in CSC.
Based on this observation, we modified the sparse codes by convolving them with a Gaussian kernel so that the groundtruth non-zero support is extended to neighbouring areas that cover adjacent depths.
We call the support-extended sparse codes "soft-labels" in comparison with the sparse codes with exact support, namely "hard-labels". Soft-labels give some training benefits by incorporating data correlation as guidance information and enforce group sparsity for the output of network. Since our task is regarded as a multi-class, multi-label classification task, the loss function is set to be binary cross-entropy between output sparse codes and the soft-labels.
\vspace{-0.2cm}
\mypar{Training and testing results.}
We trained the network on 100,000 EPI samples with a maximum of 100 epochs using the adaptive moment estimation (ADAM) optimizer. Figure~\ref{Fig:Training} shows that the training and validation errors converge almost within 40 epochs.
Figure~\ref{Fig:SparseCodes} and \ref{Fig:Compare3Methods_Cell} compares the proposed CISTA-net with Phase-Space~\cite{liu20153d,pegard2016compressive} and CSC~\cite{song20203D} on 55 neuron specimens covering a depth range from -18 to 36 \si{um}.
It shows that our approach outputs more structured sparse codes than competing methods owing to supervised learning with the soft-labels. Sparse codes of high quality facilitate depth detection via finding non-zero support centers more accurately. In contrast, Phase-Space~\cite{liu20153d,pegard2016compressive} and CSC~\cite{song20203D} tend to find more small non-zero elements, which may interfere with subsequent depth detection, as shown in Figure~\ref{Fig:SparseCodes}. Further results in Figure~\ref{Fig:Compare3Methods_Cell} confirms that our approach outperforms the competing methods and gives the best performance with least errors on x, y, z position detection. Furthermore, CISTA-net is more than 10000$\times$ faster than the competing methods in terms of average time for processing a single EPI with the same CPU, as shown in Table~\ref{Tab:TimeCost}.
CISTA-net computational efficiency can enable fast source localization during LFM imaging of living brain tissues, providing information to guide and modify the experimental protocol.
\begin{table}[t]
\centering
\small
\caption{Average time cost of different methods.}
\begin{tabular}{c|c|c|c}
\hline \hline
& phase-space~\cite{liu20153d,pegard2016compressive} & CSC~\cite{song20203D} & CISTA-net \\
\hline
time cost & 3.59 s & 3.61 s & 0.216 $\times 10^{-3}$ s \\
\hline \hline
\end{tabular}
\label{Tab:TimeCost}
\end{table}
\vspace{-0.2cm}
\section{Conclusion}
\label{sec:Conclusion}
\vspace{-0.2cm}
We proposed a model-inspired deep network to perform 3D localization using light-field microscopy images. The network architecture is designed systematically by unrolling the convolutional ISTA method used to solve convolutional sparse coding problems. The network parameters are learned from the training dataset. In this way, the designed network naturally inherits domain knowledge and also learns new features from the data, demonstrating better interpretability and higher speed.
The proposed methodology may provide inspiration on how to take better advantage of the unrolling idea to design deep networks with advanced attributes.
\clearpage
\bibliographystyle{IEEEtran}
|
\section{Introduction}
In recent years, cavity (or circuit) electromechanics has been established as a powerful implementation of cavity optomechanics.~\cite{Marquardt2014} Rather than relying on a light field circulating inside an optical cavity, an electromagnetic circuit is employed to realize a cavity mode in the microwave regime which parametrically couples to a mechanical resonator.~\cite{Regal2008,Teufel2008,Teufel2011,Pernpeintner2014a}
This seemingly simple modification has enabled a series of breakthroughs, including
quantum ground state cooling,~\cite{Teufel2011a}
entanglement generation,~\cite{Palomaki2013a,Barzanjeh2019}
long-lived quantum storage,~\cite{Palomaki2013,Zhou2013,Pechal2018}
microwave-to-optical conversion,~\cite{Andrews2014,Forsch2019} non-reciprocal signal transduction,~\cite{Barzanjeh2017}
and ultrastrong coupling~\cite{Peterson2019}, just to name a few. Following recent developments in the field of superconducing qubits~\cite{Paik2011,Reagor2013} where three-dimensional microwave cavities have replaced coplanar waveguide architectures for their large mode volumes and remarkably high quality factors, three-dimensional superconducting microwave cavities have been adapted for cavity electromechanics by capacitive coupling to a mechanical resonator.~\cite{Yuan2015,Noguchi2016,Carvalho2019}
However, to date, the field of cavity electromechanics is limited to millikelvin temperatures, since it relies on superconducting circuits. Room temperature cavity electromechanics is impeded by the non-zero resistance of normal conducting circuits which gives rise to dissipation. Non-superconducting microwave cavities such as copper microstrip resonators have been successfully employed for cavity-assisted displacement sensing of nanomechanical resonators at room temperature.~\cite{Faust2012,Rieger2012} Their use for cavity electromechanics~\cite{Faust2012} is limited by a cavity quality factor of about $100$ due to dielectric and conductor losses, which not only constrains the displacement sensitivity but also keeps the system deeply in the unresolved sideband, so-called bad cavity regime where the linewidth of the cavity $\kappa/2\pi$ exceeds the frequency of the mechanical mode $\Omega_m/2\pi$.
Here we present a room temperature cavity electromechanical system capable of sideband-resolved operation ($\kappa < \Omega_m$). Inspired by the developments in the field of superconducing qubits~\cite{Paik2011,Reagor2013} and cavity electromechanics~\cite{Yuan2015,Noguchi2016,Carvalho2019} we employ a three-dimensional, cylindrically shaped cavity rather than a microstrip to dielectrically probe the displacement of a strongly pre-stressed silicon nitride nanostring resonator.
\section{Results and discussion}
Figure~\ref{fig:setup}(a) depicts a photograph of the cylindrical cavity. It consists of two parts which have been machined from bulk copper (Cu > 99.90 \%) and which can be closed using screws. The cavity has a radius of $35$ mm and a height of $70$ mm, it supports both transverse electric (TE) and transverse magnetic (TM) modes.~\cite{Pozar2011} As the modes reside in the hollow cylinder, they are only weakly affected by dielectric and conductor losses, enabling high quality factor even at room temperature.~\cite{Reagor2013} The coupling to the cavity is realized by injecting the microwave signal from a coaxial line through a loop coupler via a $3.6$ \,mm sized hole in the cavity top. In all our measurements, we use a circulator to physically separate the input and output signals of the single port reflection cavity.
Figure \ref{fig:setup}(b) (left) displays the reflection coefficient $\left|S_{11}\right|$ of the $\textrm{TM}_{110}$ mode which is found at $\omega_c/(2\pi) \approx 5.147$\,GHz with a linewidth of $\kappa/(2\pi) = 2.824$\,MHz for the empty cavity, in good agreement with finite element simulations. This corresponds to a cavity quality factor of $1,800$, exceeding the state of the art in microwave-cavity-assisted nanomechanical displacement sensing at room temperature by more than an order of magnitude.~\cite{Faust2012}
The nanomechanical resonator under investigation is a strongly pre-stressed nanostring fabricated from LPCVD silicon nitride on a fused silica wafer, which is flanked by two gold electrodes for dielectric transduction.~\cite{Faust2012,Rieger2012} The reflection coefficient of the cavity including the resonator chip is shown in Figure \ref{fig:setup}(b) (right). Upon insertion of the resonator, the eigenfrequency of the $\textrm{TM}_{110}$ mode shifts to $\omega_c/(2\pi) = 5.226$\,GHz. The linewidth increases by a factor of $2$ to $\kappa/(2\pi) = 5.572$\,MHz.
\begin{figure*}[hbt!]
\includegraphics{Fig_1_Setup
\caption{\label{fig:setup}\textbf{Experimental setup of the cavity electromechanical system at room temperature.} \textbf{(a)}, Photograph of the (open) cylindrical microwave 3D cavity machined from bulk copper. The microwave signal is inductively injected into the cavity via a loop coupler. The sample holder including the antenna is visible on the cavity floor. \textbf{(b)}, Reflection coefficient $\left|S_{11}\right|$ of the $\textrm{TM}_{110}$ mode (black) along with fit to the data (red), showing the response of both the empty cavity (left) and the cavity including the sample (right). Upon insertion of the sample the frequency of the $\textrm{TM}_{110}$ mode shifts by $\sim 80$\,MHz. Furthermore, an increase of the linewidth by a factor of $2$ is observed. \textbf{(c)}, Schematic visualizing the physical implementation of the cavity electromechanical system. The doubly clamped silicon nitride string resonator (blue) is situated between two elevated gold electrodes (yellow). The resonator chip (light green) is glued to a printed circuit board (green) and placed inside the cavity (beige). The circuit board also hosts a looped dipole antenna which is bonded to one of the electrodes to inductively couple to the $\textrm{TM}_{110}$ mode. The other electrode is connected to a single layer capacitor (brown) which serves as a capacitive ground for frequencies in the microwave frequency range, and to a wire which is fed through a hole in the cavity wall. This allows to apply DC voltages and RF signals to dielectrically drive the resonator inside the cavity. \textbf{(d)}, Scanning electron micrograph of a doubly clamped pre-stressed nanomechanical resonator between two gold electrodes for dielectric actuation as well as coupling to the three-dimensional microwave cavity.
}
\end{figure*}
In addition, the fit of the amplitude and phase of the cavity's reflection coefficient reveals an external dissipation rate of $\kappa_{ex}/(2\pi)= 1.361$\,MHz. This gives rise to a coupling efficiency $\eta = \kappa_{ex}/\kappa=0.244\ $, indicating that the cavity is undercoupled. Figure~\ref{fig:setup}(c) shows the physical realization of the cavity electromechanical system. The sample holder with the resonator chip is placed inside the cavity. One of the electrodes is connected to an antenna to inductively couple to the $\textrm{TM}_{110}$ of the cavity. It consists of a looped silver wire on top of a coaxial cable which places the loop into the electromagnetic field near the center of the hollow cylinder. The other electrode is bonded across a single layer capacitor acting as capacitive ground~\cite{Rieger2012} and connected to an RF signal generator through a $1.5$\,mm wide hole in the cavity wall for dielectric actuation of the resonator.~\cite{Chen2011,Graaf2014,Hao2014a,Kong2015,Cohen2017,Stammeier2018}
The nanostring under investigation is $w=250$\,nm wide, $t=100$\,nm thick and $L=57\,\mu$m long, similar to the one depicted in Fig.~\ref{fig:setup}(d).
While the cavity characterization is done under ambient conditions, the experiments discussed in the following involve the vibrational excitation of the nanostring and air damping needs to be excluded. Hence, the entire cavity electromechanical system consisting of the string resonator as well as the microwave cavity is placed inside a vacuum chamber below $5\times 10^{-4}$\,mbar. As indicated above, all measurements are performed at room temperature.
The nanomechanical resonator is characterized by dielectrically driving its fundamental out-of-plane mode with a vector network analyzer (VNA). The response of the nanomechanical resonator is characterized using heterodyne cavity-assisted displacement detection~\cite{Faust2012} using the three-dimensional microwave cavity. The microwave cavity is driven on resonance $\omega_d = \omega_c$, such that the periodic modulation of the capacitance induced by the dielectric nanostring vibrating between the two electrodes induces sidebands at $\omega_c\pm\Omega_m $ on the cavity response. The reflected signal of the cavity is demodulated by an in-phase quadrature (IQ) mixer, filtered and amplified as previously described.~\cite{Faust2012} The resulting signal is fed back into the VNA. The response of the fundamental out-of-plane mode of the resonator is displayed in Fig.~\ref{fig:Fig_2}. Figure~\ref{fig:Fig_2}(a) shows the Lorentzian resonance curve observed in the linear response regime for a drive power $P_m=-36$\,dBm. Fitting allows to extract the resonance frequency $\Omega_m/(2\pi)= 6.4948$\,MHz, as well as a linewidth $\Gamma/(2\pi) = 42$\,Hz which gives rise to a quality factor of $Q\approx 150.000$. Given the cavity linewidth $\kappa/(2\pi) = 5.572$\,MHz the condition for sideband resolution, $\Omega_m > \kappa$, is fulfilled for the $\textrm{TM}_{110}$ mode. The response of the resonator for increasing drive power between $-36$\,dBm to $-14$\,dBm is depicted in Fig.~\ref{fig:Fig_2}(b). Clearly, the transition from the linear, Lorentzian response to an asymmetric response curve, which is well described by the cubic nonlinearity $\alpha x^3$ of the Duffing model with a stiffening $\alpha>0$, is observed.~\cite{Nayfeh1995} This demonstrates that the cavity-assisted displacement detection is not impeded even under strong driving of the nanomechanical resonator inside the 3D cavity.
\begin{figure}[hbt!]
\includegraphics{Fig_2
\caption{\label{fig:Fig_2} \textbf{Characterization of the nanostring resonator.} \textbf{(a)}, Linear response of the fundamental out-of-plane mode of the nanostring (black) and Lorentzian fit (red) for a drive power of $P_{m}=-36$\,dBm. \textbf{(b)}, Response of the nanostring by increasing drive power from $P_{m}=-36$\,dBm to $-14$\,dBm showing the transition to the nonlinear Duffing regime.
}
\end{figure}
Following the characterization of the microwave cavity and the resonator, we discuss the electromechanical coupling between the two systems. First, we explore how the cavity detuning affects the mechanical eigenfrequency of the resonator. The radiation pressure of the power circulating in the microwave cavity acts back on the mechanical resonator, causing a mechanical eigenfrequency shift which depends on the microwave drive power $P_d $ and detuning $\Delta = \omega_d - \omega_c $. This so-called optical spring effect leads to a detuning-dependent softening or hardening of the resonator. In case of a high-Q mechanical oscillator with small linewidth, where $ \Gamma\ll\kappa$, the frequency shift of the mechanical oscillator can be defined as~\cite{Marquardt2014}
\begin{eqnarray}\label{eq:1}
\delta\Omega_{m,\textrm{opt}} = g^2\left(\frac{\Delta-\Omega_m}{\frac{\kappa^2}{4}+\left(\Delta-\Omega_m\right)^2}+\frac{\Delta+\Omega_m}{\frac{\kappa^2}{4}+\left(\Delta+\Omega_m\right)^2} \right) .
\end{eqnarray}
The electromechanical coupling strength $g = g_0\cdot\sqrt{n_d}$ depends on the single photon coupling rate $g_0$ and the number of photons circulating in the cavity $n_d$. Note that this quantity strongly depends on the detuning of the cavity. Hence, for a given power $P_d$ the intra-cavity photon number
$n_d=P_d \kappa_{ex}/\left[\hbar\omega_d \left( \frac{\kappa^2}{4}+\Delta^2\right)\right]$
of the single-sided cavity can be significantly reduced for a finite cavity detuning.
As the static mechanical displacement of the resonator arising from the radiation pressure force~\cite{Marquardt2014} is negligibly small, the detuning $\Delta$ rather than the effective detuning $\bar\Delta$ is employed in eq.~(\ref{eq:1}) \\
In addition to the optomechanical backacktion we also expect a quasi-static dielectric force acting on the mechanical resonator. This force results from the root-mean-square (RMS) electrical field which builds up inside the microwave cavity and contributes to the dielectric frequency tuning of the nanostring~\cite{Rieger2012}. As the RMS cavity field exhibits the same detuning-dependence as the intracavity photon number $n_d$, this translates into a change in eigenfrequency of the mechanical oscillator as the cavity is detuned from its resonance
\begin{eqnarray}\label{eq:2}
\delta\Omega_{m,\textrm{dielectric}} = c_{\mu w}\cdot\left(U_{\mu w}^{rms}\left(\Delta\right)\right)^2 = c_{\mu w}R\frac{\kappa\kappa_{ex}}{\frac{\kappa^2}{4}+\Delta^2}P_d .
\end{eqnarray}
The calibration factor $c_{\mu w}$ converts the change of the effective RMS voltage $U_{\mu w}^{rms}$ inside the cavity into a frequency change, and $R$ is the impedance of the circuit allowing to express the RMS voltage in terms of the power circulating in the cavity. In total, the detuning dependence of the mechanical resonance is
\begin{eqnarray}\label{eq:3}
\Omega'_m = \Omega_m+\delta\Omega_{m,\textrm{dielectric}}+\delta\Omega_{m,\textrm{opt}}
\end{eqnarray}
where $\Omega_m$ is the unperturbed mechanical eigenfrequency.
\begin{figure}[t!]
\includegraphics{Fig_3_revision
\caption{\label{fig:Fig_3} \textbf{Cavity-induced eigenfrequency shift of the resonator for a cavity drive power of $P_d = 15$\,dBm. (a)}, Experimental data is shown as black circles, the fit of Eq.~(\ref{eq:3}) is indicated as a red solid line. The observed detuning dependence of the mechanical eigenfrequency is dominated by the dielectric shift, which overwhelms the contribution of the optomechanical backaction. Inset: Theoretical prediction of the eigenfrequency shift according to eq. (3) for $g_0=0$\,Hz (grey), $200\,\mu$Hz (light green) and $20$\,mHz (dark green). \textbf{(b)} Residual of the data shown in (a).}
\end{figure}
In Fig.~\ref{fig:Fig_3}(a) the nanomechanical resonator's eigenfrequency is plotted as a function of the detuning (black circles) for a cavity drive power of $P_d = 15$\,dBm. The data is well described by eq.~(\ref{eq:3}), which is apparent from a fit to the data (red line). However, the fit yields an overwhelming contribution of the dielectric frequency shift and only negligible optomechanical backaction such that the optomechanical coupling strength $g$ can not be determined.
The inset of Fig.~\ref{fig:Fig_3}(a) shows the theoretical prediction of the eigenfrequency according to eq.~(\ref{eq:3}) using the parameters of the experiment for three different values of $g_0$: The grey solid line illustrates the eigenfrequency shift for zero optomechanical coupling $g_0 = 0$\,Hz. As eq.~(\ref{eq:2}) does not depend on the sign of $\Delta$, it is mirror symmetric with respect to the $y$-axis. The light green dashed line corresponds to $g_0=200\,\mu$Hz, which is the value of the single photon coupling rate estimated from the data in Fig.~\ref{fig:Fig_4}. The line completely coincides with the grey line, confirming that the optomechanical coupling has no measurable effect on the eigenfrequency shift. Minute deviations start becoming apparent from $g_0=2$\,mHz which we thus estimate as an upper bound of the single photon coupling rate. The dark green dashed line for $g_0=20$\,mHz already shows a sizable deviation of the eigenfrequency shift resulting from optomechanical coupling.
Our observation of a negligible optomechanical eigenfrequency shift is supported by the nearly mirror-symmetric shape of the measured eigenfrequency shift of the resonator around zero detuning in Fig.~\ref{fig:Fig_3}(a). The slight deviation shifting the maximum to a small positive detuning is likely caused by a slight drift of the mechanical eigenfrequency from slow polarization effects within the nanostring during the cavity frequency sweep, the opposite effect would be expected from radiation pressure effects.
Figure Fig.~\ref{fig:Fig_3}(b) shows the residual of the data vs. the fit. We attribute the observed pattern to the same slow polarization effects.
The small value of $g_0$ is consistent with our observation that the mechanical linewidth does not yield any measurable detuning dependence in our experiment (not shown).
In order to obtain a better estimation of the electromechanical coupling strength, we apply a second technique to characterize the parametric coupling between the nanostring and the three-dimensional cavity. It is based on the optomechanically induced transparency (OMIT),~\cite{Agarwal2010,Weis2010,Teufel2011} which arises from the coherent interaction of two microwave tones with the mechanical resonator in the resolved sideband regime.~\cite{Singh2014} In an OMIT experiment, the cavity is strongly pumped by a drive tone $\omega_d=\omega_c-\Omega_m$ which is red detuned from the cavity resonance by the frequency of the mechanical resonator. The cavity response is measured by a second, weak probe tone $\omega_p$ that is scanned across the cavity resonance. The beating between the two microwave tones induces a radiation pressure force coherently driving the mechanical resonator. In turn, the resonator imprints sidebands on the drive which interfere constructively with the probe. This opens a transparency window in the cavity transmission (or, as in our case, the cavity reflection which strictly speaking leads to optomechanically induced reflection (OMIR)~\cite{Singh2014}). According to the standard theory of OMIT, the height of the transparency peak allows to directly extract the cooperativity $C=4g^2/(\kappa \Gamma_m)$, rendering OMIT an important tool in cavity opto- and electromechanics.
In Fig.~\ref{fig:Fig_4}(a) we plot the response of the microwave cavity as a function of the probe frequency $\omega_p$ for a drive applied at optimal detuning $\Delta = \omega_d - \omega_c = -\Omega_m$. The drive and probe power are $15$\,dBm and $-25$\,dBm, respectively. A transparency feature at $\omega_c$ is clearly apparent in the center of the cavity resonance. Note that the peak is not symmetric. Its asymmetry reflects the nonlinear response of the mechanical resonator to the radiation pressure drive exerted by the two microwave tones.~\cite{Zhou2013,Shevchuk2015,Singh2016} In agreement with the standard model for OMIR for the case of an undercoupled cavity driven on the red sideband, the shape of the nonlinear transparency peak directly follows the response of the Duffing resonator.~\cite{Zhou2013,Shevchuk2015}
This is also reflected in the hysteretic behavior of the OMIR feature displayed in Fig.~\ref{fig:Fig_4}(b) for a forward (black) as well as a reverse (red) sweep of the cavity probe at a somewhat lower probe power to maximize the magnitude of the OMIR feature.
Figure~\ref{fig:Fig_4}(c) illustrates the dependence of OMIR peak on the probe power. The curves (from left to right) correspond to an increasing probe power from $-46$\,dBm to $-39$\,dBm. As expected, the width of the nonlinear feature broadens with increasing probe power while its amplitude slightly decreases.\cite{Shevchuk2015} Finally, the effect of a detuning $\delta$ of the cavity drive from the red sideband condition, $\Delta = -\Omega_m + \delta$, is explored in Fig.~\ref{fig:Fig_4}(d) for a constant probe
power of $-25$\,dBm.
For a drive tone red- or blue-shifted from the red-sideband condition ($\delta = \pm 180$\,kHz, red and blue trace, respectively), the OMIR peak moves away from the minimum of the cavity response at $\omega_c$.~\cite{Shevchuk2015} The data for the drive matched to the red sideband is also included ($\delta=0$\,Hz, black trace). For clarity, the red and blue trace are vertically offset from the black trace.
\begin{figure}[hbt!]
\includegraphics{Fig_4
\caption{\label{fig:Fig_4} \textbf{Optomechanically induced reflection. (a)}, Cavity reflection coefficient $\left|S_{11}\right|$ showing an OMIR peak of the undercoupled cavity in response to a weak probe tone $\omega_p\approx\omega_c$ in the presence of an additional strong, red-detuned drive $\omega_d = \omega_c-\Omega_{m}$. The asymmetric shape of the OMIR feature reveals the nonlinearity of the mechanical resonator. The inset displays the full cavity resonance (red box illustrates area shown in main panel). \textbf{(b)}, Forward (blue) and reverse (red) sweeps of the probe tone reveal a hysteresis of the OMIR feature reflecting the bistability of the nonlinear mechanical system. \textbf{(c)} OMIR feature as a function of the probe power. For increasing probe power, the OMIR feature broadens, while its amplitude slightly decreases. \textbf{(d)} OMIR feature as a function of the drive detuning. For a drive tone red- or blue-shifted from the red sideband condition (red and blue trace, respectively) the OMIR feature shifts to the left or right of the cavity resonance. The situation for a drive on the red sideband is also included (black trace). Red and blue trace are vertically offset for clarity.
}
\end{figure}
According to the standard theory of OMIR, the height of the transparency peak $S_{11}^0$ allows to quantify the cooperativity. For the case of an undercoupled cavity driven on the red sideband, $C = (2\eta)/(1-S_{11}^0)-1$. Neither the nonlinear regime nor a poor sideband resolution greatly affect the magnitude of the OMIR feature.~\cite{Shevchuk2015,Bodiya2019} Using the yellow trace in Fig.~\ref{fig:Fig_4}(c), extract an approximate value of $C\approx 0.025$. This translates into an optomechanical coupling strength of $g/(2\pi)=1.2$\,kHz, and, given a cavity photon number of $4.0\cdot 10^{13}$ at a drive power of $15$\,dBm on the red sideband, to a single photon coupling rate of $g_0/(2\pi) = 200\,\mu$Hz.
It is noteworthy to mention that such a feeble single photon coupling can produce observable features in the OMIT experiment at all. This is enabled by the large number of photons supported by the three-dimensional microwave cavity, which exceeds photon numbers achieved in planar microwave resonators at low temperatures~\cite{Singh2014,Teufel2011} by at least four orders of magnitude and is at present only limited by the maximum output power of our microwave generator.
The observed weak single photon coupling strength is attributed to our cavity design, as the loop antenna could not be precisely positioned in the cavity in our experiment and presumably only weakly couples to the $\textrm{TM}_{110}$ cavity mode. At the same time, the electromechanical coupling of the nanostring to the electrodes is limited by a relatively large electrode-electrode separation of approx. $600$\,nm for the sample under investigation. For future work on the room temperature cavity electromechanics platform, an improved control of the antenna position as well as a smaller electrode gap will enable to significantly increase $g_0$.
\section{Conclusion}
In conclusion, we have demonstrated a cavity electromechanical system operating in the sideband resolved regime at room temperature. This was accomplished by introducing a three-dimensional, non-superconducting microwave cavity made of copper which replaces the previously employed copper microstrip cavity, the quality factor of which is outperformed by more than an order of magnitude. In our experiment a non-metallized silicon nitride nanostring resonator was dielectrically coupled to the $\textrm{TM}_{110}$ mode of the cavity which offers almost perfect sideband resolution $\kappa \leq \Omega_m$. Electromechanical coupling was observed and characterized in one- and two-microwave tone experiments. While the mechanical eigenfrequency shift is dominated by dielectric frequency tuning, the optomechanically induced transparency (in reflection geometry) establishes a clear proof of dynamical backaction. Despite the minute single photon coupling rate of our first implementation of the room temperature cavity electromechanical plattform in the sub-mHz regime, a measureable coupling is enabled by the large number of photons circulating in the three-dimensional microwave cavity. As a result of the required strong red-detuned cavity drive, the response of the mechanical resonator is nonlinear in our proof-of-principle experiment.
Our results translate the thriving field of cavity electromechanics from the millikelvin realm to room temperature. For future exploitation, the electromechanical vacuum coupling rate $g_0/(2\pi)$ will need to be increased. This can be accomplished by an improved positioning of the loop antenna providing the coupling between the cavity mode and the control electrodes. Furthermore, the coupling can be enhanced by increasing the dielectric transduction efficiency, i.e. by reducing the lateral gap between the electrodes. Following these technical improvements, we expect to reveal the electromechanical cooling or pumping of the mechanical mode. Finally, the quality factor or the $\textrm{TE}_{011}$ mode exceeds that of the $\textrm{TM}_{110}$ mode by another order of magnitude, which offers the prospect of entering the deep-sideband-resolved regime of cavity electromechanics at room temperature.
\begin{acknowledgments}
Financial support from the Deutsche Forschungsgemeinschaft
(DFG, German Research Foundation) via Project-ID 425217212 (Collaborative Research Center SFB 1432)); the European Unions Horizon 2020 programme for Research
and Innovation under grant agreement No. 732894 (FET Proactive HOT), as well as the German Federal Ministry of Education and Research through contract no. 13N14777 funded within the European QuantERA cofund project QuaSeRT is gratefully acknowledged.
\end{acknowledgments}
\section*{Data Availability}
The data that support the findings of this study are available from the corresponding author upon reasonable request.
\section*{References}
|
\section*{References}
|
\section{Introduction}
Albeit the rapid advance of neural network architectures, convolution remains the building mainstay of deep neural networks. Drawn inspiration from the classical image filtering methodology, convolution kernels enjoy two remarkable properties that contribute to its magnetism and popularity, namely, spatial-agnostic and channel-specific. In the spatial extent, the former property guarantees the efficiency of convolution kernels by reusing them among different locations and pursues translation equivalence~\cite{pmlr-v97-zhang19a}. In the channel domain, a spectrum of convolution kernels is responsible for collecting diverse information encoded in different channels, satisfying the latter property. Furthermore, modern neural networks appreciate the compactness of convolution kernels via restricting their spatial span to no more than $3 \times 3$, since the advent of the seminal VGGNet~\cite{Sumonyan2015Very}.
On the one hand, although the nature of spatial-agnostic along with spatial-compact makes sense in enhancing the efficiency and interpreting the translation equivalence, it deprives convolution kernels of the ability to adapt to diverse visual patterns with respect to different spatial positions. Besides, locality constrains the receptive field of convolution, posing challenges for capturing long-range spatial interactions in a single shot. On the other hand, as is known to us all, inter-channel redundancy inside convolution filters stands out in many successful deep neural networks~\cite{BMVC.28.88}, casting the large flexibility of convolution kernels with respect to different channels into doubt
To conquer the aforementioned limitations, we present the operation coined as \emph{involution} that has symmetrically \emph{inverse inherent} characteristics compared to convolution, namely, spatial-specific and channel-agnostic. Concretely speaking, involution kernels are distinct in the spatial extent but shared across channels. Being subject to its spatial-specific peculiarity, if involution kernels are parameterized as fixed-sized matrices like convolution kernels and updated using the back-propagation algorithm, the learned involution kernels would be impeded from transferring between input images with variable resolutions. To the end of handling variable feature resolutions, an involution kernel belonging to a specific spatial location is possible to be generated solely conditioned on the incoming feature vector at the corresponding location itself, as an intuitive yet effective instantiation. Besides, we alleviate the redundancy of kernels by sharing the involution kernel along the channel dimension. Taken the above two factors together, the computational complexity of an involution operation scales up linearly with the number of feature channels, based on which an extensive coverage in the spatial dimension is allowed for the dynamically parameterized involution kernels. By virtue of an inverted designing scheme, our proposed involution has two-fold privileges over convolution: ($\romannumeral1$) involution could summarize the context in a wider spatial arrangement, thus overcome the difficulty of modeling long-range interactions well; ($\romannumeral2$) involution could adaptively allocate the weights over different positions, so as to prioritize the most informative visual elements in the spatial domain.
Analogously, recent approaches have spoken for going beyond convolution with the preference of self-attention for the purpose of capturing long-range dependencies~\cite{NIPS2019_8302,Zhao_2020_CVPR}. Among these works, pure self-attention could be utilized to construct stand-alone models with promising performance. Intriguingly, we reveal that self-attention particularizes our generally defined involution through a sophisticated formulation concerning kernel construction. By comparison, the involution kernel adopted in this work is generated conditioned on a single pixel, rather than its relationship with the neighboring pixels. To take one step further, we prove in our experiments that even with our embarrassingly simple version, involution could achieve competitive accuracy-cost trade-offs to self-attention. Being fully aware that the affinity matrix acquired by comparing query with each key in self-attention is also an instantiation of the involution kernel, we question the necessity of composing query and key features to produce such a kernel, since our simplified involution kernel could also attain decent performance while avoiding the superfluous attendance of key content, let alone the dedicated positional encoding in self-attention.
The presented involution operation readily facilitates visual recognition by embedding extendable and switchable spatial modeling into the representation learning paradigm, in a fairly lightweight manner. Built upon this redesigned visual primitive, we establish a backbone architecture family, dubbed as RedNet, which could achieve superior performance over convolution-based ResNet and self-attention based models for image classification. On the downstream tasks including detection and segmentation, we comprehensively perform a step-by-step study to inspect the effectiveness of involution on different components of detectors and segmentors, such as their backbone and neck. Involution is proven to be helpful for each of the considered components, and the combination of them leads to the greatest efficiency.
Summarily, our primary contributions are as follows:
\begin{enumerate}[itemsep=-2pt,topsep=0pt]
\item We rethink the inherent properties of convolution, associated with the spatial and channel scope. This motivates our advocate of other potential operators embodied with discrimination capability and expressiveness for visual recognition as an alternative, breaking through existing inductive biases of convolution.
\item We bridge the emerging philosophy of incorporating self-attention into the learning procedure of visual representation. In this context, the desiderata of composing pixel pairs for relation modeling is challenged. Furthermore, we unify the view of self-attention and convolution through the lens of our involution.
\item The involution-powered architectures work universally well across a wide array of vision tasks, including image classification, object detection, instance and semantic segmentation, offering significantly better performance than the convolution-based counterparts.
\end{enumerate}
\section{Sketch of Convolution}
We initiate from introducing the standard convolution operation to make the definition of our proposed involution self-contained. Let $\mathbf{X} \in \mathbb{R}^{H \times W \times C_i}$ denote the input feature map, where $H$, $W$ represent its height, width and $C_i$ enumerates the input channels. Inside the cube of a feature tensor $\mathbf{X}$, each feature vector $\mathbf{X}_{i,j} \in \mathbb{R}^{C_i}$ located in a cell of the image lattice can be considered as a \emph{pixel} representing certain high-level semantic patterns, with a little abuse of notation.
A cohort of $C_o$ \textbf{convolution filters} with the fixed kernel size of $K \times K$ is denoted as $\boldsymbol{\mathcal{F}} \in \mathbb{R}^{C_o \times C_i \times K \times K}$, where each filter $\boldsymbol{\mathcal{F}}_k \in \mathbb{R}^{C_i \times K \times K}, k=1,2,\cdots,C_o$, contains $C_i$ \textbf{convolution kernels} $\boldsymbol{\mathcal{F}}_{k,c} \in \mathbb{R}^{K \times K}, c=1,2,\cdots,C_i$ and executes Multiply-Add operations on the input feature map in a sliding-window manner to yield the output feature map $\mathbf{Y} \in \mathbb{R}^{H \times W \times C_o}$, defined as
\begin{equation}
\mathbf{Y}_{i,j,k} = \sum_{c=1}^{C_i} \sum_{(u,v) \in \boldsymbol{\Delta}_K} \boldsymbol{\mathcal{F}}_{k,c,u+\lfloor K/2 \rfloor,v+\lfloor K/2 \rfloor} \mathbf{X}_{i+u,j+v,c},
\end{equation}
where $\boldsymbol{\Delta}_K \in \mathbb{Z}^2$ refers to the set of offsets in the neighborhood considering convolution conducted on the center pixel, written as ($\times$ indicates Cartesian product here)
\begin{equation}
\boldsymbol{\Delta}_K = \left[-\left\lfloor K/2 \right\rfloor, \cdots, \left\lfloor K/2 \right\rfloor\right] \times \left[-\left\lfloor K/2 \right\rfloor, \cdots, \left\lfloor K/2 \right\rfloor\right].
\end{equation}
Moreover, depth-wise convolution~\cite{Chollet_2017_CVPR} pushes the formulation of group convolution~\cite{NIPS2012_4824,Xie_2017_CVPR} to the extreme, where each filter (virtually degenerated into a single kernel) $\boldsymbol{\mathcal{G}}_k \in \mathbb{R}^{K \times K},k=1,2,\cdots,C_o$, strictly performs convolution on an individual feature channel indexed by $k$, so the first dimension is eliminated from $\boldsymbol{\mathcal{F}}_k$ to form $\boldsymbol{\mathcal{G}}_k$, under the assumption that the number of output channels equals the input ones. As it stands, the convolution operation becomes
\begin{equation}
\mathbf{Y}_{i,j,k} = \sum_{(u,v) \in \boldsymbol{\Delta}_K} \boldsymbol{\mathcal{G}}_{k,u+\lfloor K/2 \rfloor,v+\lfloor K/2 \rfloor} \mathbf{X}_{i+u,j+v,k}.
\end{equation}
Note that the kernel $\boldsymbol{\mathcal{G}}_k$ is specific to the $k$\textsuperscript{th} feature slice $\mathbf{X}_{\cdot,\cdot,k}$ from the view of channel and shared among all the spatial locations within this slice.
\section{Design of Involution}
Compared to either standard or depth-wise convolution described above, \textbf{involution kernels} $\boldsymbol{\mathcal{H}}\in \mathbb{R}^{H \times W \times K \times K \times G}$ are devised to embrace transforms with \textit{inverse} characteristics in the spatial and channel domain, hence its name. Specifically, \textbf{an involution kernel} $\boldsymbol{\mathcal{H}}_{i,j,\cdot,\cdot,g} \in \mathbb{R}^{K \times K}, g=1,2,\cdots,G$, is specially tailored for the pixel $\mathbf{X}_{i,j} \in \mathbb{R}^C$ (the subscript of $C$ is omitted for notation brevity) located at the corresponding coordinate $(i, j)$, but shared over the channels. $G$ counts the number of groups where each group shares the same involution kernel. The output feature map of involution is derived by performing Multiply-Add operations on the input with such involution kernels, defined as
\begin{equation}
\label{eqn:madd}
\mathbf{Y}_{i,j,k} = \sum_{(u, v) \in \Delta_K} \boldsymbol{\mathcal{H}}_{i,j,u+\lfloor K/2 \rfloor,v+\lfloor K/2 \rfloor,\lceil kG/C \rceil} \mathbf{X}_{i+u,j+v,k}.
\end{equation}
\begin{algorithm}[t]
\caption{\small{Pseudo code of involution in a PyTorch-like style.}}
\label{alg:code}
\definecolor{codeblue}{rgb}{0.25,0.5,0.5}
\lstset{
backgroundcolor=\color{white},
basicstyle=\fontsize{7.2pt}{7.2pt}\ttfamily\selectfont,
columns=fullflexible,
breaklines=true,
captionpos=b,
commentstyle=\fontsize{7.2pt}{7.2pt}\color{codeblue},
keywordstyle=\fontsize{7.2pt}{7.2pt},
}
\vskip -0.075in
\begin{lstlisting}[language=python]
# B: batch size, H: height, W: width
# C: channel number, G: group number
# K: kernel size, s: stride, r: reduction ratio
################### initialization ###################
o = nn.AvgPool2d(s, s) if s > 1 else nn.Identity()
reduce = nn.Conv2d(C, C//r, 1)
span = nn.Conv2d(C//r, K*K*G, 1)
unfold = nn.Unfold(K, dilation, padding, s)
#################### forward pass ####################
x_unfolded = unfold(x) # B,CxKxK,HxW
x_unfolded = x_unfolded.view(B, G, C//G, K*K, H, W)
# kernel generation, Eqn.(6)
kernel = span(reduce(o(x))) # B,KxKxG,H,W
kernel = kernel.view(B, G, K*K, H, W).unsqueeze(2)
# Multiply-Add operation, Eqn.(4)
out = mul(kernel, x_unfolded).sum(dim=3) # B,G,C/G,H,W
out = out.view(B, C, H, W)
return out
\end{lstlisting}
\vskip -0.075in
\end{algorithm}
Different from convolution kernels, the shape of involution kernels $\boldsymbol{\mathcal{H}}$ depends on that of the input feature map $\mathbf{X}$. A natural thought is to generate the involution kernels conditioned on (part of) the original input tensor, so that the output kernels would be comfortably aligned to the input. We symbolize the kernel generation function as $\boldsymbol{\phi}$ and abstract the functional mapping at each location $(i,j)$ as
\begin{equation}
\label{eqn:kernel-gen}
\boldsymbol{\mathcal{H}}_{i,j} = \boldsymbol{\phi}(\mathbf{X}_{\boldsymbol{\Psi}_{i,j}}),
\end{equation}
where $\boldsymbol{\Psi}_{i,j}$ indexes the set of pixels $\boldsymbol{\mathcal{H}}_{i,j}$ is conditioned on.
\vspace{-1.0em}
\paragraph{Implementation Details} Respectful of the conciseness of convolution, we make involution conceptually as simple as possible. Note that our target is to firstly provide a design space for the kernel generation function $\boldsymbol{\phi}$ and then fast prototype some effective designing instances for practical usage. In this work, we choose to span each involution kernel $\boldsymbol{\mathcal{H}}_{i,j}$ from a single pixel $\mathbf{X}_{i,j}$ for incarnation. More exquisite designs under exploration may have the potential of further pushing the performance boundary, but are left as future work. Besides, we are conscious that self-attention falls into this design space while being a more complicated materialization than our default choice, which is to be discussed in more detail in Section~\ref{sec:attention}. Formally, we have the kernel generation function $\boldsymbol{\phi} \colon \mathbb{R}^{C} \mapsto \mathbb{R}^{K \times K \times G}$ with $\boldsymbol{\Psi}_{i,j} = \{(i,j)\}$ taking the following form:
\begin{equation}
\label{eqn:pixel-wise-gen}
\boldsymbol{\mathcal{H}}_{i,j} = \boldsymbol{\phi}(\mathbf{X}_{i,j}) = \mathbf{W}_1 \sigma(\mathbf{W}_0 \mathbf{X}_{i,j}).
\end{equation}
In this formula, $\mathbf{W}_0 \in \mathbb{R}^{\frac{C}{r} \times C}$ and $\mathbf{W}_1 \in \mathbb{R}^{(K \times K \times G) \times \frac{C}{r}}$ represent two linear transformations that collectively constitute a bottleneck structure, where the intermediate channel dimension is under the control of a reduction ratio $r$ for efficient processing, and $\sigma$ implies Batch Normalization and non-linear activation functions that interleave two linear projections. We refer to Eqn.~\ref{eqn:madd} with the materialized kernel generation function of Eqn.~\ref{eqn:pixel-wise-gen} as involution hereinafter. The pseudo code shown in Alg.~\ref{alg:code} delineates the computation flow of involution, which is visualized in Figure~\ref{fig:involution}.
\begin{figure}[t]
\vskip -0.325in
\begin{center}
\includegraphics[width=\linewidth,trim=5 5 5 5,clip]{fig/involution}
\end{center}
\vskip -0.275in
\caption{Schematic illustration of our proposed involution. The involution kernel $\boldsymbol{\mathcal{H}}_{i,j} \in \mathbb{R}^{K \times K \times 1}$ ($G=1$ in this example for ease of demonstration) is yielded from the function $\boldsymbol{\phi}$ conditioned on a single pixel at $(i,j)$, followed by a channel-to-space rearrangement. The Multiply-Add operation of involution is decomposed into two steps, with $\bigotimes$ indicating multiplication broadcast across $C$ channels and $\bigoplus$ indicating summation aggregated within the $K \times K$ spatial neighborhood. Best viewed in color.}
\label{fig:involution}
\vskip -0.2in
\end{figure}
For building the entire network with involution, we mirror the design of ResNet~\cite{He_2016_CVPR} by stacking residual blocks, since the elegant architecture of ResNet makes it apt for incubating new ideas and making comparisons. We replace involution for $3 \times 3$ convolution at all bottleneck positions in the stem (using $3 \times 3$ or $7 \times 7$ involution for classification or dense prediction) and trunk (using $7 \times 7$ involution for all tasks) of ResNet, but retain all the $1 \times 1$ convolution for channel projection and fusion. These delicately redesigned entities unite to shape a new species of highly efficient backbone networks, termed as RedNet.
Once spatial and channel information interweaves, heavy redundancy tends to occur inside the neural networks. However, the information interactions are tactfully decoupled in our RedNet towards a favorable accuracy-efficiency trade-off, as empirically evidenced in Figure~\ref{fig:efficiency}. To be specific, the information encoded in the channel dimension of one pixel is implicitly scattered to its spatial vicinity in the kernel generation step, after which the information in an enriched receptive field is gathered thanks to the vast and dynamic involution kernels. Indispensably, linear transformations (realized by $1 \times 1$ convolutions) are interspersed for channel information exchange. In a word, channel-spatial, spatial-alone, and channel-alone interactions alternately and independently act on the stream of information propagation, collaboratively facilitating the miniaturization of network architectures while ensuring the representation capability.
\section{In Context of Prior Literature}
This section relates to several important aspects revolving around neural architecture in prior literature. We clarify their similarities and differences compared to our method.
\subsection{Convolution and Variants}
As the \textit{de facto} standard operator of modern vision systems, convolution~\cite{726791} possesses two principal characteristics, spatial-agnostic and channel-specific. Convolution kernels are location-independent in the spatial extent for translation equivalence but privatized at different channels for information discrimination. Along another research line, depth-wise convolution demonstrates wide applicability in efficient neural network architecture design~\cite{Chollet_2017_CVPR,Sandler_2018_CVPR,Ma_2018_ECCV,pmlr-v97-tan19a}. The depth-wise convolution is a pioneering attempt towards factorizing the spatial and channel entanglement of standard convolution, which is symmetric to our proposed involution operation in that depth-wise convolution contains a set of kernels specific to each channel and spatially-shared while our invented involution kernels are shared over channels and dedicated to each planar location in the image lattice.
Until most recently, dynamic convolutions emerge as powerful variants of the stationary ones. These approaches either straightforwardly generate the entire convolution filters~\cite{Ha2017Hypernetworks,NIPS2016_6578,NIPS2019_8412}, or parameterize the sampling grid associated with each convolution kernel~\cite{Dai_2017_ICCV,Jeon_2017_CVPR,Zhu_2019_CVPR}. Regarding the former category~\cite{Ha2017Hypernetworks,NIPS2016_6578,NIPS2019_8412}, unlike us, their dynamically generated convolution filters still conform to the two properties of standard convolution, thus incurring significant memory or computation consumption for filter generation. Regarding the latter category~\cite{Dai_2017_ICCV,Jeon_2017_CVPR,Zhu_2019_CVPR}, only certain attributes, \eg, the footprint of convolution kernels, are determined in an adaptive fashion.
Actually, early in the field of face recognition, DeepFace~\cite{Taigman_2014_CVPR} and DeepID~\cite{Sun_2014_CVPR} have explored locally connected layers without weight sharing in the spatial domain, enlightened by apparently different regional distributions of statistics in the face imagery. Nevertheless, such excessive relaxation of convolution parameters can be problematic in knowledge transfer from one position to others. Resembling dynamic convolutions, our involution tackles this dilemma through sharing \emph{meta-weights} of the kernel generation function across different positions, though not directly the \emph{weights} of kernel instances. There also exist previous works that adopt pixel-wise dynamic kernels for feature aggregation, but they mainly capitalize on the context information for feature up-sampling~\cite{Su_2019_CVPR,Wang_2019_ICCV} and still rely on convolution for basic feature extraction. The most relevant work towards substituting convolution rather than up-sampling might be~\cite{Esquivel_2019_ICCV}, but the pixel-wise generated filters still inherit one original property of convolution, to perform feature aggregation in a distinct manner over each channel.
\subsection{Attention Mechanism}
\label{sec:attention}
The attention mechanism originates from the field of machine translation~\cite{NIPS2017_7181} and exhibits blossoming development in the arena of natural language processing~\cite{dai-etal-2019-transformer,NIPS2019_8812}. Its success has also been translated to a plethora of vision tasks, including image recognition~\cite{Bello_2019_ICCV,Hu_2019_ICCV,NIPS2019_8302,Zhao_2020_CVPR}, image generation~\cite{pmlr-v80-parmar18a,pmlr-v97-zhang19d}, video understanding~\cite{Sun_2019_ICCV,Wang_2018_CVPR}, object detection~\cite{Carion_2020_ECCV,Hu_2018_CVPR,Zhu_2019_ICCV}, and semantic segmentation~\cite{Fu_2019_CVPR,Huang_2019_ICCV,Wang_2020_ECCV}. Some works sparingly insert self-attention as plugin modules into the backbone neural network~\cite{NIPS2018_7318,NIPS2018_7886} or attach them on the top of the backbone to extract high-level semantic relationships~\cite{Carion_2020_ECCV,Sun_2019_ICCV}, retaining the substratum of convolutional features. More aggressively, other works adopt the off-the-shell self-attention layer as the fundamental backbone component for vision~\cite{Bello_2019_ICCV,Hu_2019_ICCV,NIPS2019_8302,Wang_2020_ECCV,Zhao_2020_CVPR}. Still, limited emphasis has been laid on delving deep into the learning dynamics of this functional form compared to convolution~\cite{Cordonnier2020On}.
Our proposed involution in Eqn.~\ref{eqn:madd} is reminiscent of self-attention and essentially could become a generalized version of it. The self-attention pools \emph{values} $\mathbf{V}$ depending on the affinities obtained by computing correspondences between the \emph{query} and \emph{key} content, $\mathbf{Q}$ and $\mathbf{K}$, formulized as
\begin{equation}
\label{eqn:self-attn}
\mathbf{Y}_{i,j,k} = \sum_{(p, q) \in \boldsymbol{\Omega}} (\mathbf{Q} \mathbf{K}^\top)_{i,j,p,q,\lceil kH/C \rceil} \mathbf{V}_{p,q,k},
\end{equation}
where $\mathbf{Q}$, $\mathbf{K}$ and $\mathbf{V}$ are linearly transformed from the input $\mathbf{X}$, and $H$ is the number of heads in multi-head self-attention~\cite{NIPS2017_7181}. The similarity lies in that both operators collect pixels in the neighborhood $\boldsymbol{\Delta}$ or a less bounded scope $\boldsymbol{\Omega}$ through a weighted sum. On the one hand, the computing regime of involution can be considered as an attentive aggregation over the spatial domain. On the other hand, the attention map, or say affinity matrix $\mathbf{Q}\mathbf{K}^\top$ in the self-attention, can be viewed as a kind of involution kernel $\boldsymbol{\mathcal{H}}$.
However, with the particulars of kernel generation comes the differences between self-attention and our materialized involution form with Eqn.~\ref{eqn:pixel-wise-gen}. Regrading previous endeavor on replacing convolution with local self-attention~\cite{Hu_2019_ICCV,NIPS2019_8302,Zhao_2020_CVPR} to establish backbone models, they have to derive the affinity matrix (equivalent to involution kernel in our context) based on the relationship between the \emph{query} and \emph{key content}, optionally with hand-crafted \emph{relative positional encoding} for permutation-variance. From this point of view, for self-attention, the input to the kernel generation function in Eqn.~\ref{eqn:kernel-gen} would become a set of pixels indexed by $\boldsymbol{\Psi}_{i,j} = (i,j) + \boldsymbol{\Delta}_K$\footnote{$+$ indicates adding a variable vector to each element in a set here.}, including both the pixel of interest and its surrounding ones. Subsequently, the function could compose all these attended pixels, in an either ordered~\cite{Zhao_2020_CVPR} or unordered~\cite{Hu_2019_ICCV,NIPS2019_8302,Zhao_2020_CVPR} manner, and exploit complex relationships between them. In stark contrast to above, we constitute the involution kernel via operating solely on the original input pixel itself with $\boldsymbol{\Psi}_{i,j} = \{(i,j)\}$, as expressed by Eqn.~\ref{eqn:pixel-wise-gen}. From the perspective of self-attention, our involution kernels only explicitly rely on the \emph{query content}, while the \emph{relative positional information} is implicitly encoded in the organized output form of our kernel generation function. We sacrifice the pixel-paired relationship modeling, but the final performance of our RedNet is on par with those heavily relation-based models. Therefore, we may reach a conclusion that it is the macro design principles of involution instead of its micro setup nuances that are instrumental in the representation learning for visual understanding, corroborated by our empirical results in the experimental part. Another strong evidence supporting our hypothesis is that only using position encoding (by replacing $\mathbf{Q}\mathbf{K}^\top$ in Eqn.~\ref{eqn:self-attn} with $\mathbf{Q}\mathbf{R}^\top$, where $\mathbf{R}$ is the position embedding matrix) retains descent performance of self-attention based models~\cite{NIPS2019_8302,bello2021lambdanetworks}. Previously, the above observation is interpreted as the crucial role of position encoding in self-attention, but now a reinterpretation of the root cause behind might be $\mathbf{Q}\mathbf{R}^\top$ is still a form of dynamically parameterized involution kernel.
More importantly, precedent self-attention based works seldom show their versatility in multifarious vision tasks, but our involution paves a viable pathway for a great variety of tasks, as we shall find soon in Section~\ref{sec:main-exp}.
\section{Experiments}
\subsection{Main Results}
\label{sec:main-exp}
We conduct comprehensive experiments from conceptual prediction to (semi-)dense prediction. All the network models are implemented with the PyTorch library~\cite{NIPS2019_9015}.
\subsubsection{Image Classification}
We perform the backbone training from scratch on the ImageNet~\cite{imagenet_cvpr09} training set that is one of the most challenging benchmarks for object recognition up to date. For a fair comparison, we adhere to the training protocol of Stand-Alone Self-Attention~\cite{NIPS2019_8302} and Axial Attention~\cite{Wang_2020_ECCV}, except that we \emph{do not} use exponential moving average (EMA) over the trainable parameters during training. Following the identical recipe, we re-implement both pairwise and patchwise SAN~\cite{Zhao_2020_CVPR} with their open-source code\footnote{\url{https://github.com/hszhao/SAN}} as a stronger baseline, and show our reproduced results in the corresponding tables and figures respectively.
The detailed training setup is provided in the Appendix. We apply the Inception-style preprocessing for data augmentation~\cite{Szegedy_2015_CVPR}, \ie, random resized cropping and horizontal flipping. For evaluation, we use the single-crop testing method on the validation set following the common practice.
\begin{table}[t]
\centering
\tablestyle{5pt}{1.0}
\resizebox{.9\linewidth}{!}{
\begin{tabular}{c|c|c|c}
\fontsize{7pt}{1em}\selectfont Architecture
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont Top-1 Acc. (\%) \\
\shline
ResNet-26~\cite{He_2016_CVPR} & 13.7 & 2.4 & 73.6 \\
LR-Net-26~\cite{Hu_2019_ICCV} & 14.7 & 2.6 & 75.7 \\
Stand-Alone ResNet-26~\cite{NIPS2019_8302} & 10.3 & 2.4 & 74.8 \\
SAN10$^\dagger$~\cite{Zhao_2020_CVPR} & 10.5 & 2.2 & 75.5 \\
\rowcolor{cyan!20}
RedNet-26 & \textbf{9.2} & \textbf{1.7} & \textbf{75.9} \\
\hline\hline
ResNet-38~\cite{He_2016_CVPR} & 19.6 & 3.2 & 76.0 \\
Stand-Alone ResNet-38~\cite{NIPS2019_8302} & 14.1 & 3.0 & 76.9 \\
SAN15$^\dagger$~\cite{Zhao_2020_CVPR} & 14.1 & 3.0 & 77.1 \\
\rowcolor{cyan!20}
RedNet-38 & \textbf{12.4} & \textbf{2.2} & \textbf{77.6} \\
\hline\hline
ResNet-50~\cite{He_2016_CVPR} & 25.6 & 4.1 & 76.8 \\
LR-Net-50~\cite{Hu_2019_ICCV} & 23.3 & 4.3 & 77.3 \\
AA-ResNet-50~\cite{Bello_2019_ICCV} & 25.8 & 4.2 & 77.7 \\
Stand-Alone ResNet-50~\cite{NIPS2019_8302} & 18.0 & 3.6 & 77.6 \\
SAN19$^\dagger$~\cite{Zhao_2020_CVPR} & 17.6 & 3.8 & 77.4 \\
Axial ResNet-S$^\ddagger$~\cite{Wang_2020_ECCV} & \textbf{12.5} & 3.3 & 78.1 \\
\rowcolor{cyan!20}
RedNet-50 & 15.5 & \textbf{2.7} & \textbf{78.4} \\
\hline\hline
ResNet-101~\cite{He_2016_CVPR} & 44.6 & 7.9 & 78.5 \\
LR-Net-101~\cite{Hu_2019_ICCV} & 42.0 & 8.0 & 78.5 \\
AA-ResNet-101~\cite{Bello_2019_ICCV} & 45.4 & 8.1 & 78.7 \\
\rowcolor{cyan!20}
RedNet-101 & \textbf{25.6} & \textbf{4.7} & \textbf{79.1} \\
\hline\hline
ResNet-152~\cite{He_2016_CVPR} & 60.2 & 11.6 & \textbf{79.3} \\
AA-ResNet-152~\cite{Bello_2019_ICCV} & 61.6 & 11.9 & 79.1 \\
Axial ResNet-M$^\ddagger$~\cite{Wang_2020_ECCV} & \textbf{26.5} & \textbf{6.8} & 79.2 \\
Axial ResNet-L$^\ddagger$~\cite{Wang_2020_ECCV} & 45.8 & 11.6 & \textbf{79.3} \\
\rowcolor{cyan!20}
RedNet-152 & 34.0 & \textbf{6.8} & \textbf{79.3} \
\end{tabular}
}
\vskip -0.1in
\caption{The architecture profiles on ImageNet val set. Single-crop testing with $224 \times 224$ crop size is adopted. We compare with improved re-implementations if available and extract the other results from their original publications.
\newline
{\fontsize{7.2pt}{0pt}\selectfont{
$^\dagger$ \emph{The improved re-implementation results of pairwise SAN models are listed here.
}}}
\newline
{\fontsize{7.2pt}{0pt}\selectfont{
$^\ddagger$ \emph{Axial ResNet modifies the architecture setup of ResNet by changing the reduction ratio in each bottleneck block from 4 to 2.
}}}
}
\label{tab:cls}
\vskip -0.15in
\end{table}
\begin{table}[t]
\centering
\tablestyle{5pt}{1.0}
\resizebox{.9\linewidth}{!}{
\begin{tabular}{c|c|c|c}
\fontsize{7pt}{1em}\selectfont Architecture
& \fontsize{7pt}{1em}\selectfont GPU time (ms)
& \fontsize{7pt}{1em}\selectfont CPU time (ms)
& \fontsize{7pt}{1em}\selectfont Top-1 Acc. (\%) \\
\shline
ResNet-50~\cite{He_2016_CVPR} & 11.4 & 895.4 & 76.8 \\
ResNet-101~\cite{He_2016_CVPR} & 18.9 & 967.4 & 78.5 \\
SAN19~\cite{Zhao_2020_CVPR} & 33.2 & N/A & 77.4 \\
Axial ResNet-S~\cite{Wang_2020_ECCV} & 35.9 & 377.0 & 78.1 \\
\hline
RedNet-38 & 11.4 & 156.3 & 77.6 \\
RedNet-50 & 14.3 & 211.2 & 78.4 \\
\end{tabular}
}
\vskip -0.1in
\caption{Runtime analysis for representative networks. The speed benchmark is on a single NVIDIA TITAN Xp GPU and Intel\textsuperscript{\textregistered} Xeon\textsuperscript{\textregistered} CPU E5-2660 [email protected].
}
\label{tab:runtime}
\vskip -0.2in
\end{table}
\begin{figure*}[t]
\vskip -0.1in
\begin{center}
\subfloat[The accuracy-complexity envelope on ImageNet.]{
\begin{minipage}{.45\linewidth}
\centering
\vskip -0.1in
\includegraphics[width=\linewidth]{fig/complexity}
\vskip -0.01in
\label{fig:complexity}
\end{minipage}}
\quad\quad\quad
\subfloat[The accuracy-parameter envelope on ImageNet.]{
\begin{minipage}{.45\linewidth}
\centering
\vskip -0.1in
\includegraphics[width=\linewidth]{fig/parameter}
\vskip -0.01in
\label{fig:parameter}
\end{minipage}}
\end{center}
\vskip -0.2in
\caption{The accuracy-efficiency envelopes on ImageNet val set. This figure visualizes Table~\ref{tab:cls}. In general, RedNet achieves the optimal trade-off in comparison with all the other convolution and self-attention based architectures.}
\label{fig:efficiency}
\vskip -0.2in
\end{figure*}
In the same spirit of ResNet, we scale the network depth to establish our RedNet family. The comparison to convolution and self-attention based vision models are summarized in Table~\ref{tab:cls}. Almost within each group of the table, RedNet achieves the highest recognition accuracy whilst with the most parsimonious parameter storage and computational budget. RedNet could substantially outperform ResNet across all depths. For example, RedNet-50 achieves a margin of 1.6\% higher accuracy over ResNet-50, using 39.5\% fewer parameters and 34.1\% lower computational consumption. Moreover, RedNet-50 is on par with ResNet-101 regrading to the top-1 recognition accuracy, while saving 65.2\% and 65.8\% storage and computation resources respectively. For an intuitive demonstration, the corresponding accuracy-complexity envelope is illustrated in Figure~\ref{fig:complexity}, where our RedNet shows the top-performing Pareto frontier, in abreast with other state-of-the-art self-attention models, while being free from more complex relation modeling. Likewise, we could observe a similar trend in the accuracy-parameter envelope shown in Figure~\ref{fig:parameter}. It is noteworthy that RedNet strikes a better balance between parameters and complexities, compared to the top competitors like SAN and Axial ResNet, as they are enveloped by the curve of RedNet series either in Figure~\ref{fig:complexity} or~\ref{fig:parameter}.
To reflect the practical runtime, we measure the inference time of different architectures with the comparable performance for a single image with the shape of $224 \times 224$. We report the running time on GPU/CPU in Table~\ref{tab:runtime}, where RedNet demonstrates its merits in terms of wall-clock time under the same level of accuracy. A customized CUDA kernel implementation with optimized memory scheduling for involution is highly anticipated for further acceleration on GPU. Depending on the extent to which optimizing hardware accelerators is contributed to this new involution operator, on-device speedup might approach the theoretical speedup compared to convolution in the future.
\begin{table*}[t]
\centering
\tablestyle{4pt}{1.0}
\resizebox{.9\linewidth}{!}{
\begin{tabular}{c|c|c|c|c|l|l|l|l|l|l}
\fontsize{7pt}{1em}\selectfont Detector & \fontsize{7pt}{1em}\selectfont Backbone & \fontsize{7pt}{1em}\selectfont Neck
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{~}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{50}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{75}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{S}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{M}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{L} \\
\shline
\multirow{3}{*}{RetinaNet~\cite{Lin_2017_ICCV}} & ResNet-50 & convolution & 37.7 & 239.3 & 36.6 & 55.8 & 39.2 & 20.9 & 40.6 & 47.5 \\
& RedNet-50 & convolution & 27.8 & 210.1 & 38.3\cgap{+}{1.7} & 58.2\cgaphl{+}{2.4} & 40.5\cgap{+}{1.3} & 21.1\cgap{+}{0.2} & 41.8\cgap{+}{1.2} & 50.9\cgaphl{+}{3.4} \\
& RedNet-50 & involution & 26.3 & 199.9 & 38.2\cgap{+}{1.6} & 58.2\cgaphl{+}{2.4} & 40.4\cgap{+}{1.2} & 21.8\cgap{+}{0.9} & 41.6\cgap{+}{1.0} & 50.7\cgaphl{+}{3.2} \\
\end{tabular}
}
\vskip 0.05in
\resizebox{\linewidth}{!}{
\begin{tabular}{c|c|c|c|c|c|l|l|l|l|l|l}
\fontsize{7pt}{1em}\selectfont Detector & \fontsize{7pt}{1em}\selectfont Backbone & \fontsize{7pt}{1em}\selectfont Neck & \fontsize{7pt}{1em}\selectfont Head
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{~}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{50}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{75}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{S}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{M}
& \fontsize{7pt}{1em}\selectfont \quad\apbbox{L} \\
\shline
\multirow{4}{*}{Faster R-CNN~\cite{NIPS2015_5638}} & ResNet-50 & convolution & convolution & 41.5 & 207.1 & 37.7 & 58.7 & 40.8 & 21.7 & 41.6 & 48.4 \\
& RedNet-50 & convolution & convolution & 31.6 & 177.9 & 39.5\cgap{+}{1.8} & 60.9\cgaphl{+}{2.2} & 42.8\cgaphl{+}{2.0} & 23.3\cgap{+}{1.6} & 42.9\cgap{+}{1.3} & 52.2\cgaphl{+}{3.8} \\
& RedNet-50 & involution & convolution & 29.5 & 135.0 & 40.2\cgaphl{+}{2.5} & 62.1\cgaphl{+}{3.4} & 43.4\cgaphl{+}{2.6} & 24.2\cgaphl{+}{2.5} & 43.3\cgap{+}{1.7} & 52.7\cgaphl{+}{4.3} \\
& RedNet-50 & involution & involution & 29.0 & 91.5 & 39.2\cgap{+}{1.5} & 61.0\cgaphl{+}{2.3} & 42.4\cgap{+}{1.6} & 23.1\cgap{+}{1.4} & 43.0\cgap{+}{1.4} & 50.7\cgaphl{+}{2.3} \\
\end{tabular}
}
\vskip 0.05in
\resizebox{\linewidth}{!}{
\begin{tabular}{c|c|c|c|c|c|l|l|l|l|l|l}
\fontsize{7pt}{1em}\selectfont Detector & \fontsize{7pt}{1em}\selectfont Backbone & \fontsize{7pt}{1em}\selectfont Neck & \fontsize{7pt}{1em}\selectfont Head
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{~}
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{50}
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{75}
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{S}
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{M}
& \fontsize{7pt}{1em}\selectfont ~\quad\ap{L} \\
\shline
\multirow{8}{*}{~Mask R-CNN~\cite{He_2017_ICCV}} & \multirow{2}{*}{ResNet-50} & \multirow{2}{*}{convolution} & \multirow{2}{*}{convolution} & \multirow{2}{*}{44.2} & \multirow{2}{*}{253.4} & 38.4 & 59.2 & 41.9 & 21.9 & 42.3 & 49.7 \\
& & & & & & 35.1 & 56.3 & 37.3 & 18.5 & 38.6 & 46.9 \\
\cline{2-12}
& \multirow{2}{*}{RedNet-50} & \multirow{2}{*}{convolution} & \multirow{2}{*}{convolution} & \multirow{2}{*}{34.2} & \multirow{2}{*}{224.2} & 40.2\cgap{+}{1.8} & 61.4\cgaphl{+}{2.2} & 43.7\cgap{+}{1.8} & 24.2\cgaphl{+}{2.3} & 43.4\cgap{+}{1.1} & 52.5\cgaphl{+}{2.8} \\
& & & & & & 36.1\cgap{+}{1.0} & 58.1\cgap{+}{1.8} & 38.2\cgap{+}{0.9} & 19.9\cgap{+}{1.4} & 39.3\cgap{+}{0.7} & 48.9\cgaphl{+}{2.0} \\
\cline{2-12}
& \multirow{2}{*}{RedNet-50} & \multirow{2}{*}{involution} & \multirow{2}{*}{convolution} & \multirow{2}{*}{32.2} & \multirow{2}{*}{181.3} & 40.8\cgaphl{+}{2.4} & 62.3\cgaphl{+}{3.1} & 44.3\cgaphl{+}{2.4} & 24.2\cgaphl{+}{2.3} & 44.0\cgap{+}{1.7} & 53.0\cgaphl{+}{3.3} \\
& & & & & & 36.4\cgap{+}{1.3} & 59.0\cgaphl{+}{2.7} & 38.5\cgap{+}{1.2} & 19.9\cgap{+}{1.4} & 39.4\cgap{+}{0.8} & 49.1\cgaphl{+}{2.2} \\
\cline{2-12}
& \multirow{2}{*}{RedNet-50} & \multirow{2}{*}{involution} & \multirow{2}{*}{involution} & \multirow{2}{*}{29.5} & \multirow{2}{*}{104.6} & 39.6\cgap{+}{1.2} & 60.7\cgap{+}{1.5} & 42.7\cgap{+}{0.8} & 23.5\cgap{+}{1.6} & 43.1\cgap{+}{0.8} & 51.1\cgap{+}{1.4} \\
& & & & & & 35.1\cgap{+}{0.0} & 57.1\cgap{+}{0.8} & 37.3\cgap{+}{0.0} & 19.2\cgap{+}{0.7} & 38.5\cgap{-}{0.1} & 47.3\cgap{+}{0.4} \\
\end{tabular}
}
\vskip -0.1in
\caption{Performance comparison on COCO detection and segmentation. The bounding box AP is reported for the object detection track in the upper table. The bounding box and mask AP are simultaneously reported for the instance segmentation track in the lower table, listed in the two separate lines following a single detector. In the parentheses are the gaps to the fully convolution-based counterparts. Highlighted in green are the gaps of at least {\fontsize{8pt}{1em}\selectfont \hl{${+}$\textbf{2.0}}} points, the same in Table~\ref{tab:seg-fpn} and~\ref{tab:seg-upernet}.
}
\label{tab:det}
\vskip -0.1in
\end{table*}
\vspace{-0.5em}
\subsubsection{Object Detection and Instance Segmentation}
Beyond fundamental image classification, we demonstrate the generalization ability of our proposed involution on downstream vision tasks, such as object detection and instance segmentation. For object detection, we employ the representative one- and two-stage detectors, RetinaNet~\cite{Lin_2017_ICCV} and Faster R-CNN~\cite{NIPS2015_5638}, both equipped with the FPN~\cite{Lin_2017_CVPR} neck. For instance segmentation, we adopt the main-stream detection system, Mask R-CNN~\cite{He_2017_ICCV}, also in companion with FPN. These three detectors with the underlying backbones, ResNet-50 or RedNet-50, are fine-tuned on the Microsoft COCO~\cite{10.1007/978-3-319-10602-1_48} \texttt{train2017} set for transferring the learned representations of images. More training details are reported in the appendix. During quantitative evaluation, we test on the \texttt{val2017} set and report the COCO-style mean Average Precision (mAP) under different IoU thresholds ranging from 0.5 to 0.95 with an increment of 0.05.
Table~\ref{tab:det} compares our models against the baseline of ResNet backbone with the convolution-based neck and head. First, with the RedNet backbone, all the three detectors excel their ResNet-based counterparts with considerable performance gains, \ie, 1.7\%, 1.8\%, and 1.8\% higher in bounding box AP, while being more parameter- and computation-conserving. Second, additionally swapping involution for convolution in the FPN neck brings about healthy margins for Faster/Mask R-CNN, while further reducing their parameters and computational cost to 71\%/73\% and 65\%/72\%. In particular, the margins with respect to bounding box AP are enlarged to 2.5\% and 2.4\% respectively. Third, to build fully involution-based detectors, we further replace convolution in the task-specific heads of Faster/Mask R-CNN with involution, which could cut down more than half of the computational complexity while retaining the superior or on-par performance. This kind of fully involution-based detectors may stand out especially in cases where computational resource is the major bottleneck. Forth, we pay special attention to the scores of small/medium/large objects and notice that the most compelling performance improvement appears in the measurement of \ap{L}. Our best detection models could surpass the baselines by more than 3\% bounding box AP in this regard, specifically 3.4\%, 4.3\%, and 3.3\% for RetinaNet, Faster R-CNN, and Mask R-CNN. We hypothesize that the success of detecting large-scale objects arises from the design of spread-out and position-aware involution kernels. Besides \ap{L}, the performance gains are consistent under the fine-grained taxonomy of AP evaluation metrics, demonstrated in different columns of Table~\ref{tab:det}.
\vspace{-0.5em}
\subsubsection{Semantic Segmentation}
\begin{table*}[t]
\centering
\tablestyle{5pt}{1.0}
\resizebox{.9\linewidth}{!}{
\begin{tabular}{c|c|c|c|c|l|l|l|l}
\fontsize{7pt}{1em}\selectfont Segmentor & \fontsize{7pt}{1em}\selectfont Backbone & \fontsize{7pt}{1em}\selectfont Neck
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont mean IoU (\%)
& \fontsize{7pt}{1em}\selectfont ~~~~~~wall
& \fontsize{7pt}{1em}\selectfont ~~~~~~truck
& \fontsize{7pt}{1em}\selectfont ~~~~~~bus \\
\shline
\multirow{3}{*}{Semantic FPN~\cite{Kirillov_2019_CVPR}} & ResNet-50 & convolution
& 28.5 & 362.8
& 74.5 & 39.4 & 58.6 & 72.2 \\
& RedNet-50 & convolution
& 18.5 & 293.9
& 78.3\cgaphl{+}{3.8} & 52.7\cgaphl{+}{13.3} & 77.3\cgaphl{+}{18.7} & 87.6\cgaphl{+}{15.4}\\
& RedNet-50 & involution
& 16.4 & 205.2
& 79.2\cgaphl{+}{4.7} & 56.9\cgaphl{+}{17.5} & 82.1\cgaphl{+}{23.5} & 88.5\cgaphl{+}{16.3} \\
\end{tabular}
}
\vskip -0.1in
\caption{Performance comparison on Cityscapes segmentation based on Semantic FPN. We showcase the mean IoU averaged over all classes, as well as IoUs of the top three classes with the most evident performance amelioration.
}
\label{tab:seg-fpn}
\vskip -0.2in
\end{table*}
\begin{table}[t]
\centering
\tablestyle{5pt}{1.0}
\resizebox{1.0\linewidth}{!}{
\begin{tabular}{c|c|c|c|l}
\fontsize{7pt}{1em}\selectfont Segmentor & \fontsize{7pt}{1em}\selectfont Backbone
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont mIoU (\%) \\
\shline
\multirow{2}{*}{UPerNet~\cite{Xiao_2018_ECCV}} & ResNet-50
& 66.4 & 1894.5
& 78.2 \\
& RedNet-50
& 56.4 & 1825.6
& 80.6\cgaphl{+}{2.4} \\
\hline
\multirow{3}{*}{Panoptic-DeepLab~\cite{Cheng_2020_CVPR}}
& Axial-DeepLab-S~~~ & 12.1 & 220.8 & 80.5 \\
& Axial-DeepLab-M~~ & 25.9 & 419.6 & 80.3 \\
& Axial-DeepLab-XL & 173.0 & 2446.8 & 80.6 \\
\end{tabular}
}
\vskip -0.1in
\caption{Performance comparison on Cityscapes segmentation based on UPerNet. The efficiency of UPerNet is greatly boosted by the RedNet backbone, showing competitive performance to Axial-DeepLab-XL with only 32.6\% parameter counts and 75.7\% computational cost.
}
\label{tab:seg-upernet}
\vskip -0.2in
\end{table}
To further exploit the versatility of involution, we also conduct experiments on the task of semantic image segmentation. We choose the segmentation frameworks of Semantic FPN~\cite{Kirillov_2019_CVPR} and UPerNet~\cite{Xiao_2018_ECCV}, loaded with ImageNet pre-trained backbone weights. We fine-tune these segmentors on the finely-annotated part of the Cityscapes dataset~\cite{Cordts_2016_CVPR}, which contains a split of 2975 and 500 images for training and validation respectively, divided into 19 classes. More training details can be found in the appendix. After training, we perform the evaluation on the validation set under the single-scale mode and adopt the Intersection-over-Union (IoU) as the evaluation metric.
Based on the Semantic FPN framework, we are able to achieve 3.8\% higher mean IoU over all classes, taking advantage of RedNet over ResNet as the backbone. Consequent to further infusing involution into the FPN neck to replace convolution, the gain in mean IoU is elevated to 4.7\% but the parameters and FLOPs are cut down to 57.5\% and 56.6\% of the baseline model accordingly. The detailed comparison results are shown in Table~\ref{tab:seg-fpn}. To take one step further, we investigate the effectiveness of our method on different object classes. Aligned with the discovery in object detection, we notice that the segmentation effects of those objects with a large spatial arrangement are improved by more than 10\%, \eg, wall, truck, and bus, while slight improvements are observed in classes of relatively small objects, \eg, traffic light, traffic sign, person, and bicycle. Once again, the involution operation effectively aids the large object perception by endowing the representation process with dynamic and distant interactions. In addition, we replace the ResNet backbone of UPerNet with RedNet and evaluate the final performance, as displayed in Table~\ref{tab:seg-upernet}. Though not an apple-to-apple comparison using the same segmentor and training strategy, RedNet-based UPerNet appears more efficient than Axial-DeepLab, which is dedicatedly designed for segmentation tasks by converting the original Axial ResNet backbone network.
\subsection{Ablation Analysis}
\label{sec:ablation}
We present several ablation studies designed to understand the contributions of individual components, taking RedNet-50 as an example.
\begin{table*}[t]
\vspace{-1.em}
\centering
\resizebox{\linewidth}{!}{~~~~
\subfloat[\scriptsize{Accuracy saturates with \textbf{kernel size} increasing.}]{
\tablestyle{.8pt}{1.05}
\begin{tabular}{c|c|c|c}
\fontsize{7pt}{1em}\selectfont Kernel Size
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont Top-1 Acc. (\%) \\
\shline
$3 \times 3$ & 14.7 & 2.4 & 76.9 \\
$5 \times 5$ & 15.1 & 2.5 & 77.4 \\
\demph{$7 \times 7$} & \demph{15.5} & \demph{2.6} & \demph{77.7} \\
$9 \times 9$ & 16.2 & 2.7 & 77.8 \\
\end{tabular}
\label{tab:kernel-size}
}~~~~
\subfloat[\scriptsize{Appropriate \textbf{grouping channels} improves efficiency.}]{
\tablestyle{.8pt}{1.05}
\begin{tabular}{c|c|c|c}
\fontsize{7pt}{1em}\selectfont \#Group Channel
& \fontsize{7pt}{1em}\selectfont \#Params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont Top-1 Acc. (\%) \\
\shline
1 & 30.2 & 5.0 & 77.9 \\
4 & 18.5 & 3.0 & 77.7 \\
\demph{16} & \demph{15.5} & \demph{2.6} & \demph{77.7} \\
$C$ & 14.6 & 2.4 & 76.5 \\
\end{tabular}
\label{tab:group-channel}
}~~~~
\subfloat[\scriptsize{Introducing the \textbf{bottleneck structure} reduces complexity.}]{
\tablestyle{.8pt}{1.05}
\begin{tabular}{c|c|c|c}
\fontsize{7pt}{1em}\selectfont Function Form
& \fontsize{7pt}{1em}\selectfont \#params (M)
& \fontsize{7pt}{1em}\selectfont FLOPs (G)
& \fontsize{7pt}{1em}\selectfont Top-1 Acc. (\%) \\
\shline
$\mathbf{W}$ & 18.1 & 3.0 & 77.8 \\
$\mathbf{W}_1 \sigma \mathbf{W}_0, r=1$~~ & 19.4 & 3.2 & 77.8 \\
\demph{$\mathbf{W}_1 \sigma \mathbf{W}_0, r=4$}~~ & \demph{15.5} & \demph{2.6} & \demph{77.7} \\
$\mathbf{W}_1 \sigma \mathbf{W}_0, r=16$ & 14.6 & 2.4 & 77.4 \\
\end{tabular}
\label{tab:function-type}
}~~~~
}
\vskip -0.1in
\caption{We examine the role of different components in the design of involution, including kernel size, group channels, and the form of kernel generation function. In gray are entries with the {\color{Gray}{default setting}} as our main experiments. When we adjust one hyper-parameter for ablation, we leave the others as the default setting. The final performance is not sensitive to each hyper-parameter configuration.
}
\label{tab:ablation}
\vskip -0.2in
\end{table*}
\vspace{-1.5em}
\paragraph{Stem}
First of all, we isolate the impact of involution on the network stem. Following the practice of recent self-attention based architectures~\cite{Zhao_2020_CVPR,Wang_2020_ECCV}, the network stem is decomposed into three consecutive operations to save memory cost. In accordance with our practice of integrating involution into the trunk, we place $3\times 3$ involution at the bottleneck position of the stem. This act improves the accuracy from 77.7\% to 78.4\% with marginal cost, leading to our default setting of RedNet in the main experiments.
Otherwise explicitly mentioned, we use RedNet-50 with \emph{$7 \times 7$ convolution stem} for the following ablation analysis.
\vspace{-1.5em}
\paragraph{Kernel Size}
In the spatial dimension, we probe the effect of kernel size. Steady improvement is observed in Table~\ref{tab:kernel-size} when increasing the spatial extent up to $7 \times 7$ with negligible computational overheads. The improvement somewhat plateaus when further expanding the spatial extent, which is possibly relevant to the feature resolution in the network. This set of controlled experiments shows the superiority of harnessing large involution kernels over compact and static convolution, while avoiding to introduce prohibitive memory and computational cost.
\vspace{-1.5em}
\paragraph{Group Channel}
In the channel dimension, we assess the feasibility of sharing an involution kernel. As can be seen in Table~\ref{tab:group-channel}, sharing a kernel per 16 channels halves the parameters and computational cost compared to the non-shared one, only sacrificing 0.2\% accuracy. However, sharing a single kernel across all the $C$ channels obviously underperforms in accuracy. Considering the channel redundancy of involution kernels, as long as setting the channels shared in a group to an acceptable range, the channel-agnostic behavior will not only reserve the performance, but also reduce the parameter count and computational cost. This will also permit a larger kernel size under the same budget.
\begin{figure}[t]
\begin{center}
\begin{minipage}{.937\linewidth}
\includegraphics[width=.19\linewidth]{fig/viz/cowboy_hat/ori}~
\includegraphics[width=.19\linewidth]{fig/viz/cowboy_hat/layer2.3_g0}
\includegraphics[width=.19\linewidth]{fig/viz/cowboy_hat/layer2.3_g4}
\includegraphics[width=.19\linewidth]{fig/viz/cowboy_hat/layer2.3_g5}
\includegraphics[width=.19\linewidth]{fig/viz/cowboy_hat/layer2.3_g7}
\includegraphics[width=.19\linewidth]{fig/viz/lesser_panda/ori}~
\includegraphics[width=.19\linewidth]{fig/viz/lesser_panda/layer2.3_g0}
\includegraphics[width=.19\linewidth]{fig/viz/lesser_panda/layer2.3_g4}
\includegraphics[width=.19\linewidth]{fig/viz/lesser_panda/layer2.3_g5}
\includegraphics[width=.19\linewidth]{fig/viz/lesser_panda/layer2.3_g7}
\includegraphics[width=.19\linewidth]{fig/viz/warplane/ori}~
\includegraphics[width=.19\linewidth]{fig/viz/warplane/layer2.3_g0}
\includegraphics[width=.19\linewidth]{fig/viz/warplane/layer2.3_g4}
\includegraphics[width=.19\linewidth]{fig/viz/warplane/layer2.3_g5}
\includegraphics[width=.19\linewidth]{fig/viz/warplane/layer2.3_g7}
\includegraphics[width=.19\linewidth]{fig/viz/cliff/ori}~
\includegraphics[width=.19\linewidth]{fig/viz/cliff/layer2.3_g0}
\includegraphics[width=.19\linewidth]{fig/viz/cliff/layer2.3_g4}
\includegraphics[width=.19\linewidth]{fig/viz/cliff/layer2.3_g5}
\includegraphics[width=.19\linewidth]{fig/viz/cliff/layer2.3_g7}
\end{minipage}
\begin{minipage}{.053\linewidth}
\includegraphics[width=\linewidth]{fig/colorbar}
\end{minipage}
\end{center}
\vskip -0.25in
\caption{The heat maps in each row interpret the generated kernels for an image instance from the ImageNet validation set, drawn from four different classes, including cowboy hat, lesser panda, warplane, and cliff (from top to bottom).}
\label{fig:visualization}
\vskip -0.2in
\end{figure}
\vspace{-1.5em}
\paragraph{Kernel Generation Function}
Next, we validate the utility of bottleneck architecture for the kernel generation process in Table~\ref{tab:function-type}. Adopting a single linear transform $\mathbf{W}$ or two transforms without bottleneck ($r=1$) as the kernel generation function incurs more parameters and FLOPs but only performs marginally better, compared to the default setting ($r=4$). Moreover, inferior performance could be ascribed to aggressive channel reduction ($r=16$).
Further attaching activation functions such as softmax, sigmoid to the kernel generation function, would constrain the kernel values, thus restrict its expressive capability, and ends up hindering the performance by over 1\%. So we opt not to insert any additional functions at the output end of the kernel generation function, allowing the generated kernel to span the entire subspace of $K \times K$ matrices.
\subsection{Visualization}
For dissecting the learned involution kernels, we take the sum of $K \times K$ values from each involution kernel as its representative value. All the representatives at different spatial locations frame the corresponding heat map. Some selected heat maps are plotted in Figure~\ref{fig:visualization}, where the columns following the original image indicate different involution kernels in the last block of the third stage (conv3\_4 following the naming convention of~\cite{He_2016_CVPR}), separated by groups. On the one hand, involution kernels automatically attend to crucial parts of objects in the spatial range for correct image recognition. On the other hand, in a single involution layer, different kernels from different groups focus on varying semantic concepts of the original image, by highlighting peripheral parts, sharp edges or corners, smoother regions, outline of the foreground and background objects, respectively (from left to right in each row).
\section{Conclusion and Prospect}
In this work, we present involution, an effective and efficient operator for visual representation learning, reversing the design principles of convolution and generalizing the formulation of self-attention. Thanks to the medium of involution, we are able to disclose the underlying relationship between self-attention and convolution and empirically ascertain the essential driving force of self-attention for its recent progress in vision. Our proposed involution is benchmarked on several standard vision benchmarks, consistently delivering enhanced performance at reduced cost compared to convolution-based counterparts and self-attention based models. Furthermore, careful ablation analysis helps us better understand that such performance enhancement is rooted in the core contributions of involution, from the efficacy of spatial modeling to the efficiency of architecture design.
We believe that this work could foster future research enthusiasm on simple yet effective visual primitives beyond convolution, which is expected to make inroads into fields of neural architecture engineering where uniform and local spatial modeling has prestigiously dominated.
|
\section{Introduction}
The Kauffman bracket of an unoriented link projection $D$ is the element of $\mathbb{Z}[A^{-1},A]$ determined by
$$\langle D \rangle = A \langle D_{cc}\rangle +A^{-1}\langle D_c\rangle, \quad \langle K\sqcup U\rangle = -A^2-A^{-2}, \quad \langle U\rangle =1$$
where $K_{cc}$, respectively $K_c$, is the counter-clockwise respectively clockwise smoothing at an unoriented crossing, and $U$ is the crossing-less projection of an unknot. The notions of counter-clockwise and clockwise refer to opening the region swept by moving the overcrossing arc into the undercrossing arc at the crossing.
\setlength{\unitlength}{0.6cm}
\begin{picture}(5,5)
\put(2,0){\line(1,1){3}}
\put(5,0){\line(-1,1){1.4}}
\put(3.4,1.6){\line(-1,1){1.4}}
\put(3.5,-1){$K$}
\qbezier(8,0)(9.5,1.5)(8,3)
\qbezier(11,0)(9.5,1.5)(11,3)
\put(9,-1){$K_{cc}$}
\qbezier(14,0)(15.5,1.5)(17,0)
\qbezier(14,3)(15.5,1.5)(17,3)
\put(15,-1){$K_c$}
\end{picture}
\vskip 0.5in
The Jones polynomial of an oriented link is the element in $\mathbb{Z}[t^{-1/2},t^{1/2}]$ determined by the skein relations
$$t^{-1}V(K_+)-tV(K_-)=(t^{1/2}-t^{-1/2})V(K_0), \quad V(K\sqcup U)=1$$
where $K_{\pm}$ and $K_0$ are defined by
\setlength{\unitlength}{0.6cm}
\begin{picture}(5,5)
\put(2,0){\vector(1,1){3}}
\put(5,0){\line(-1,1){1.4}}
\put(3.4,1.6){\vector(-1,1){1.4}}
\put(3,-1){$K_+$}
\put(8,0){\line(1,1){1.4}}
\put(9.6,1.6){\vector(1,1){1.4}}
\put(11,0){\vector(-1,1){3}}
\put(9,-1){$K_-$}
\qbezier(14,0)(15.5,1.5)(14,3)
\qbezier(17,0)(15.5,1.5)(17,3)
\put(14.1,2.9){\vector(-1,1){0.1}}
\put(16.9,2.9){\vector(1,1){0.1}}
\put(15,-1){$K_0$}
\end{picture}
\vskip 0.5in
and $U$ here denotes the oriented unknot.
It is the classical result by Kauffman \cite{Ka} (see also \cite{L}, Definition 3.6) that if $D$ is an oriented link projection corresponding to the oriented link $K$ then
$$V(K)=\left((-A)^{-3w(D)}\langle \overline{D}\rangle\right)_{t^{1/2}=A^{-2}}\in \mathbb{Z}[t^{-1/2},t^{1/2}],$$
where $\overline{D}$ is the underlying unoriented diagram and $w(D)$ is the writhe of the oriented diagram.
In this note we will generalize Kauffman's result to skein modules of tangles in oriented $3$-manifolds. In Definition 2.5 we define a new skein module, the relative Jones-bracket skein module. We will also discuss the compatibility with gluing.
\section{Statement of the main results}
Let $M$ be a compact connected oriented $3$-manifold, possibly with nonempty boundary $\partial M$. A \textit{marking} of $M$ is a $0$-dimensional submanifold $P$ of $\partial M$ consisting of an even number of points equipped with a non-zero vector tangent to $\partial M$ at each $x\in P$. The marking is \textit{oriented} if half of the points are positively oriented and half of the points are negatively oriented. Let $\mathcal{M}$, respectively $\mathcal{M}'$, denote the set of oriented markings, respectively unoriented markings, of $M$. We should in fact use notation $\mathcal{M}(M)$ but the manifold is usually clear. Note that as zero-dimensional abstract manifold, $P$ is oriented null-bordant in the oriented setting, and null-bordant in the unoriented one. We will use the notation $P$ indicating the marking, so including the framing vectors.
Sometimes we write $\mathcal{M}^*$ to indicate that a statement applies to $P\in \mathcal{M}$ or $P\in \mathcal{M}'$. For $P\in \mathcal{M}$ we let $P'$ denote its image in $\mathcal{M}'$, which is defined by forgetting the orientation. Note that each unoriented marking $Q$ can be oriented such that there is $P$ with $P'=Q$, i.\ e.\ $\mathcal{M}\rightarrow \mathcal{M}'$ is onto. In the following we usually abbreviate $(M,\emptyset )=M$.
For $P\in \mathcal{M}^*$ let $\mathcal{L}(M,P)$ denote the set isotopy classes of framed (oriented for oriented markings) tangles $K$ in $M$ bounding $P$ (in an oriented way for oriented markings). This means that $K$ is a union of annuli and bands. We have annuli embedded in the interior $\textit{Int}(M)$. If $b\cong I\times I$ is a band then $b\cap \partial M=(\partial I \times I)\cap \partial M$ consist of two arcs, which are perpendicular to the framing vectors at the two points $x,y$ in the boundary of the core $c$ of the band $I\times \{1/2\}$ and the framing of the normal bundle of $b$ in $M$ along $\partial c$ extends smoothly over $c$. Isotopy is ambient isotopy in $M$ fixing $\partial M$. Note that a diffeomorphism
$(M_1,P_1)\rightarrow (M_2,P_2)$ will induce a bijective map $\mathcal{L}(M_1,P_1)\rightarrow \mathcal{L}(P_2,M_2)$.
For $P\in \mathcal{M}$ there is the natural surjective forget map $\mathcal{L}(M,P)\rightarrow \mathcal{L}(M,P')$.
If $P=\emptyset $ we also include the \textit{empty link} $K=\emptyset $, and apply skein relations to the empty link.
In the following let $R=\mathbb{Z}$ for $\mathcal{M}$, and $R=\mathbb{Z}_2$ for $\mathcal{M}'$. If no coefficients are used then we refer to $\mathbb{Z}$.
Let $\partial: H_1(M,P;R)\rightarrow H_0(P;R)$ be the boundary homomorphism and \\ $h_1(M,P;R):=\partial^{-1}[P]$, where $[P]$ is the $R$-fundamental class of the $0$-manifold $P\in \mathcal{M}^*$. There is the natural surjective map
$$\mathcal{L}(M,P)\rightarrow h_1(M,P;R).$$
assigning to each tangle its underlying homology class. The homology class of the empty link will be $0$.
For $\alpha \in h_1(M,P;R)$ let $\mathcal{L}^{\alpha }(M,P)$ denote the set of isotopy classes of tangles with underlying homology class $a$. Then
$$\mathcal{L}(M,P)=\bigsqcup_{\alpha \in h_1(M;R)} \mathcal{L}^{\alpha }(M,P).$$
Note that the sets $h_1(M,P;R)$ in general are not subgroups or $\mathbb{Z}/2\mathbb{Z}$-subspaces.
\remark It follows from the exact sequence of the pair $(M,P)$,
$$0\cong H_1(P;R)\rightarrow H_1(M;R)\rightarrow H_1(M,P;R)\rightarrow H_0(P;R)\rightarrow H_0(M;R)\cong R,$$
that $H_1(M)$ acts transitively and faithfully on $h_1(M;P)$, with $[P]$ mapping to $0$ under $H_0(P;R)\rightarrow H_0(M;R)$. In particular $|h_1(M,P)|=|H_1(M)|$ for every $P$. (Here, $|S|$ is the cardinality of a set $S$). In general, if we pick $\alpha \in h_1(M,P)$ then any $\beta \in h_1(M,P)$ has the form $\beta =\alpha + \gamma $ for a unique $\gamma \in H_1(M)$. Thus, if we are representing elements of $h_1(M,P)$ by tangles, we can choose a fixed tangle (e.g. without any closed components) and then represent each homology class just by adding closed components.
\example Let $P\in \mathcal{M}^*$ be a marking of the compact $3$-ball $D^3$. Then $|h_1(M,P)|=1$. But if $H_1(M;R)$ is infinite then $|h_1(M,P)|$ is infinite. Exceptions for example are Lens-spaces or other rational homology $3$-spheres, possibly with $3$-balls or tubular neighborhoods of links removed but arbitrary markings allowed. On the other hand $|h_1(M,P)|$ is finite if $P\in \mathcal{M}'$.
\vskip 0.1in
\definition Let $P\in \mathcal{M}$. A (homological) \textit{writhe invariant} is, for each $\alpha \in h_1(M,P;\mathbb{Z})$, a nonnegative integer $\omega (\alpha )\in \mathbb{Z}$ and a function
$$w=w_{\alpha }: \mathcal{L}^{\alpha }(M,P)\rightarrow \mathbb{Z}/2\omega (a)\mathbb{Z}$$
such that
$$w(K_{\pm })=w(K_0)\pm 1,\quad w(K\amalg U)=w(K)$$
where $K_{\pm},K_0$ are defined locally in oriented $3$-balls in $M$ just like above with blackboard framings, and $U$ is a trivially framed unknot in a $3$-ball separated from $K$.
\vskip 0.1in
\definition We say that the writhe function $w$ for $(M,P)$ has no writhe-indeterminacy if $\omega (\alpha )=0$ for all $\alpha \in h_1(M,P)$. We also say that $(M,P)$ has no writhe-indeterminacy if there exists a writhe function without indeterminacy.
\vskip 0.1in
\remark In considering skein related tangles some care is necessary. In fact, if we consider a \textit{skein ball} containing the framed tangle $K$ or $K_{\pm }$ then the normal vectors to the two disjoint bands in the $3$-ball both have to point upwards or both downwards. Otherwise a smoothing could obviously give rise to M\"obius bands instead of annuli.
\vskip 0.1in
The inclusion $(M,P)\subset (M,\partial M)$ and the intersection pairing in $M$ define the bilinear pairing:
$$\iota : h_1(M,P)\otimes H_2(M)\rightarrow H_1(M,\partial M)\otimes H_2(M)\rightarrow \mathbb{Z}$$
\theorem For each $3$-manifold $M$ and $P\in \mathcal{M}$ choose a representative tangle $K^{\alpha }$ with homology class $\alpha \in h_1(M,P)$. Then there is defined the writhe map
$$\mathcal{L}(M,P)\rightarrow \mathbb{Z}/\omega (\alpha ),$$
where $\omega (\alpha )$ is the non-negative generator of the subgroup of $\mathbb{Z}$ defined by
$$\iota (\alpha \otimes H_2(M))\subset \mathbb{Z}.$$
\vskip 0.1in
Theorem 2.1 is a generalization to tangles of Theorem 2.3 in \cite{P2}. We will give an independent proof in section 3 based on Chapter 2 of \cite{K2}.
\remark If $P=\emptyset $ then $M$ has no writhe-indeterminacy $\Longleftrightarrow M$ is a submanifold of a rational homology $3$-sphere $\Longleftrightarrow b_1(\partial M)=2b_1(M)$ for the first Betti-numbers $b_1$, see \cite{K1}, A.4.
In general, if $H_2(M)=0$ then there is no writhe-indeterminacy for all $P$.
Recall that the intersection pairing $\mathfrak{i}: \mathcal{F}H_1(M,\partial M)\otimes H_2(M)\rightarrow \mathbb{Z}$ is non-singular, where $\mathcal{F}H_1(M,\partial M)$ is the quotient by the torsion subgroup, and $H_2(M)$ is free abelian for each $3$-manifold (by Poincare duality and universal coefficient theorem for cohomology).
Therefore, if $0\neq \gamma \in H_2(M)$ let $\beta \in H_1(M,\partial M)$ such that $\mathfrak{i}(\beta \otimes \gamma)\neq 0$. Because
$$H_1(M,\partial M)\cong H^2(M)\cong [M,\mathbb{C}P^N]$$
for $N$ large and by Pontryagin-Thom construction we can realize $\beta $ as a $1$-dimensional oriented proper submanifold $C$ of $(M,\partial M)$. Define $P=\partial C$. Then $\beta $ is the image of an element $\alpha \in h_1(M,P)$ with $\iota (\alpha \otimes \gamma )\neq 0$. This shows $\omega (\alpha )\neq 0$. This shows that in fact for $H_2(M)\neq 0$ there exists $P$ such that $(M,P)$ has non-=trivial indeterminacy for some $\alpha $. In fact, we can find for each basis element of $H_2(M)$ a marking $P$ such that for some $\alpha \in h_1(M,P)$ we have $\omega (\alpha )=1$.
On the other hand, if $\alpha $ is torsion then $\omega (\alpha )=0$ and the writhe on tangles in homology class $\alpha $ is defined in $\mathbb{Z}$.
\example Let $M=\Sigma \times I$ for $\Sigma $ a closed oriented surface. Then $H_2(M)\cong \mathbb{Z}$ generated by the surface $\Sigma \times \{1/2\}$. If $P=\{(x,0),(x,1)\}$ for some $x\in \Sigma $ then with $\alpha $ the homology class of $\{x\}\times I$ we get $\omega (\alpha )=1$ and the writhe function is trivial on links in this homology class. On the other hand, if $P=\{(x,0),(y,0)\}$ for $x\neq y$ in $\Sigma $ then $\iota $ is trivial on $h_1(\Sigma \times I,P)\otimes H_2(M)$. It follows that the writhe function has no indeterminacy in this case.
\vskip 0.1in
Next we define two skein modules.
\definition For $P\in \mathcal{M}$ let the \textit{Jones module} $\mathcal{J}(M,P)$ be the quotient of the free $\mathbb{Z}[A^{-1},A]$-module with basis $\mathcal{L}(M,P)$ by the submodule generated by framed Jones skein elements
$$A^4K_+-A^{-4}K_--(A^{-2}-A^2)K_0,$$
and
$$K\sqcup U+(A^{-2}+A^2)K$$
and
$$K^{(+)}-K,$$
where $U$ is a trivially framed unknot in a $3$-ball in $\textrm{Int}M$ separated from the tangle $K$, and $K^{(\pm )}$ will denote the tangle $K$ with the framing changed by one positive twist in any of the components. Note that this abuse of notation is justified by the framing relation.
\vskip 0.1in
For $P\in \mathcal{M}$ let $P^o$ be the result of forgetting the framing of the marking. Let $\mathcal{L}^o(M,Q)$ denote the set of isotopy classes of oriented tangles bounding the oriented unframed marking $Q$. Then, for each framed marking $P$ such that $P^o=Q$, the obvious forget map $\mathcal{L}(M,P)\rightarrow \mathcal{L}^o(M,Q)$ is surjective. Now let $\mathcal{J}^o(M,Q)$ denote the quotient of the free $\mathbb{Z}[A^{-1},A]$-module by the submodule generated by the skein relations above for oriented tangles without the framing relation.
\proposition The forget map $\mathcal{L}(M,P)\rightarrow \mathcal{L}^o(M,Q)$ defines an isomorphism of skein modules
$$\mathcal{J}(M,P)\rightarrow \mathcal{J}^o(M,Q)$$
for each $P\in \mathcal{M}$ with $P^o=Q$.
\proof This is immediate from the definitions and $K^{(+)}=K$ for the images of framed tangles in $\mathcal{L}(M,P)$. To define the inverse homomorphism, choose for each oriented link in $\mathcal{L}(M,P)$ an inverse in $\mathcal{L}(M,Q)$ and note that as an element of $\mathcal{J}$ the choice does not depend on the framing. $\blacksquare$
\vskip 0.1in
\remark (a) Note that we cannot add an empty object in a skein module of tangles if $P\neq \emptyset $ in a similar way as it is often done for skein modules of links. This is because in general there is not an obvious trivial tangle.
\noindent (b) In the following we will not distinguish between the isomorphic modules $\mathcal{J}(M,P)$ and $\mathcal{J}^o(M,Q)$ and assume that we have a fixed choice of $P$ with $P^o=Q$.
\vskip 0.1in
Similarly to the Jones module of tangles above we now define the \textit{(Kauffman) bracket module} $\mathcal{K}(M,Q)$ for $Q\in \mathcal{M}'$. This will be the quotient of the free $\mathbb{Z}[A^{-1},A]$-module with basis the set $\mathcal{L}(M,Q)$ of framed unoriented links in $M$ bounding $Q$ by the submodule generated by bracket skein relations for all tangles $K$ bounding $Q$:
$$K-AK_{cc}-A^{-1}K_c, \quad K\sqcup U+(A^{-2}+A^2)K$$
\definition For each $\mathbb{Z}[A^{-1},A]$-module $M$ and non-negative integer $n$ define:
$$M_n:=M/((A^{-n}-A^n)M)$$
be the $n$-\textit{reduced module}.
\vskip 0.1in
Note that if $m\vert n$ then there is the projection epimorphism $M_n\rightarrow M_m$.
\vskip 0.1in
\theorem Let $w$ be a writhe function for $(M,P)$. Then the associated Kauffman map, for $\alpha \in h_1(M,P)$:
$$\mathcal{L}^{\alpha }(M,P)\ni K\mapsto (-A)^{-3w(K)}K'\in \mathcal{L}(M,P')$$
defines an epimorphism of $\mathbb{Z}[A^{-1},A]$-modules:
$$\kappa : \mathcal{J}^{\alpha }(M,Q)\cong \mathcal{J}^{\alpha }(M,P)\rightarrow \mathcal{K}^{[\alpha ]_2}_{3\omega (\alpha )}(M,P')$$
where $P^o=Q$ and $P'\in \mathcal{M}'$ is the framed unoriented marking underlying $P$, $[\alpha ]_2\in h_1(M,P';\mathbb{Z}_2)$ is the $\mathbb{Z}_2$-reduction, and $\mathcal{J}^{\alpha }$ respectively $\mathcal{K}^{[\alpha ]_2}$ denote the submodules generated by tangles with the corresponding homology class.
\remark (a) Note that the reduction of the Kauffman bracket module on the right hand side depends on $\alpha \in h_1(M,P)$ and not only on its $\mathbb{Z}_2$-reduction. So, in general, the reduction on the right hand side depends on the choice of lift of $[\alpha ]_2$ to $\alpha $.
\noindent (b) Note that the skein modules of the compact $3$-ball $\mathcal{J}(D^3)$ and $\mathcal{K}(D^3)$ are each free $\mathbb{Z}[A^{-1},A]$-modules generated by the trivially framed unknot (respectively oriented unknot for $J^o(D^3,\emptyset )$. If we let $V$ denote the Jones polynomial of an oriented link and let $\langle \quad \rangle $ denote the bracket polynomial of a diagram (defining a framed link in $D^3$ using the blackboard framing) then we have the commutative diagram corresponding to Kauffman's formula:
\begin{center}
\begin{tikzcd}
\mathcal{J}^o(D^3)\cong \mathcal{J}(D^3) \arrow[r,"\kappa"] \arrow[rd,"V"] & \mathcal{K}(D^3) \arrow[d,"\langle \quad \rangle "]\\
&\mathbb{Z}[A^{-1},A]
\end{tikzcd}
\end{center}
\noindent (c) There is the action of the skein algebras of the $3$-ball, which in this case are identified with $\mathbb{Z}[A^{-1},A]$. In order to have consistency we include the empty link in the set of links and correspondingly adjust the skein relations, in particular having $\emptyset \sqcup U=-A^{-2}-A^2$ with the empty link corresponding to $1$.
In this way the Kauffman map $\kappa $ can also be interpreted as a homomorphism of modules over the module of the $3$-ball. Note that $\kappa (1)=1$ using the corresponding identifications.
\noindent (d) We can reduce from the formal case $\mathbb{Z}[A^{-1},A]$ by specifying $A$ to roots of unities, corresponding the values of the writhe indeterminacies, and we define epimomorphisms of complex vector spaces.
\noindent (e) For $\alpha \in h_1(M,P)$ let $\mathfrak{k}^{\alpha }(M,P)$ denote the kernel of the corresponding Kauffman epimomorphism $\kappa ^{\alpha }$ as defined above. The study of this submodule of $\mathcal{J}^{\alpha }(M,P)$ seems to be of interest, in particular for $M=\Sigma \times I$ and $\Sigma $ an oriented surface, $P=\emptyset $, in which case there is no writhe indeterminancy, and the module is in fact an ideal of the skein algebra.
\definition Let $\mathfrak{k}(M,P):=\bigoplus_{\alpha \in h_1(M,P)}\mathfrak{k}^{\alpha }(M,P)\subset \mathcal{J}(M,P)$ be the \textit{relative Jones-bracket module}.
\vskip 0.1in
\remark In the cases $(D^3,\emptyset )$ or $M=S^3$ the Kauffman epimorphism is an isomorphism. In general this is not the case: If $H_1(M)$ is infinite then $\mathfrak{k}(M,P)\neq 0$ just by grading reasons. Note that $\mathcal{J}^{\alpha }(M,P)$ and $\mathcal{K}^{\alpha }(M,P)$ are non-zero modules for each $\alpha \in h_1(M;R)$.
\example Consider $M=A\times I$ and $P=\emptyset $. In this case the skein modules are well-known and free by results of Turaev \cite{T} and Przytycki \cite{P4}. Note that $H_1(M)\cong \mathbb{Z}$ and $H_1(M,\mathbb{Z}_2)\cong \mathbb{Z}/2\mathbb{Z}$. Consider $a=0\in H_1(M)$. Then a basis of this part of the skein module is determined by sequences $(a_1,\ldots ,a_n)$ with $\sum_{i=1}^na_i=0$ and $a_1\geq a_2\geq \cdots \geq a_n$ corresponding to the components of a link with descending components and separated by the radius function of the annulus. The bracket module is isomorphic to $\mathbb{Z}[A^{-1},A][z]$ with $z$ being represented by the core circle of the annulus. Now consider basis elements of the Jones module corresponding to $(1,-1)$ and $(1,1)$. Both of these map to the same basis element of bracket module corresponding to $z^2$.
\vskip 0.1in
\corollary Suppose that $\omega (\alpha )=0$ for all $\alpha \in h_1(M,P)$. Then the above epimorphisms combine to the epimorphism:
$$\kappa: \mathcal{J}(M,Q)\rightarrow \mathcal{K}(M,P')$$
and kernel $\mathfrak{k}(M,P)$.
\remark The assumption of the corollary is true for example when $P=\emptyset $ and $M$ is a submanifold of a rational homology $3$-sphere, or if $M=\Sigma \times I$ for an oriented surface $\Sigma $
with $P\subset \partial \Sigma \times I$.
\vskip 0.1in
\section{Proof of Theorem 2.1}
Even though not necessary it is helpful to restate Theorem 2.1 in the language of skein modules.
We will give a different proof though using ideas from Chapter 3 of \cite{K1}. Just like in \cite{K1}, oriented bordism of tangles in $M\times I$ corresponds to homology in the group $h_1(M,P)$.
\definition (see Definition 2.1 in \cite{P3}) Given $(M,P)$ as above the \textit{Przytycki skein module} $\mathcal{P}(M,P)$ is the quotient of the free
$\mathbb{Z}[q^{-1},q]$-module with basis $\mathcal{L}(M,P)$ by the submodule generated by the relations
$$K_+-qK_0,\quad K^{(+)}-qK$$
\remark (a) For $P=\emptyset $, the skein module $\mathcal{P}(M)$ is denoted $\mathcal{S}_2(M;\mathbb{Z}[q^{\pm 1}],q)$ in \cite{P3}.
\noindent (b) We say that the writhe invariant is universally defined for $(M,P)$ if $\omega (\alpha )=0$ for all $\alpha \in h_1(M,P)$.
\noindent (c) The Przytycki skein module has been called the $q$-analogue of the first homology group by Przytycki in \cite{P3} and computed by him in the link case. In \cite{Ka2} the $q$-analogue of the fundamental group of an oriented $3$-manifold has been computed.
\vskip 0.1in
The following equivalent of Theorem 2.1 generalizes Przytycki's Theorem 2.6 \cite{P3}.
\theorem The choice of framed links $K_{\alpha }$ for each $\alpha \in h_1(M,P)$ defines the isomorphism
$$\mathcal{P}(M,P)\rightarrow \bigoplus_{\alpha \in h_1(M,P)}\mathbb{Z}/(2\omega (\alpha )\mathbb{Z})$$
\proof By applying the first relation to the positive crossing in $K^{(+)}$
we get in $\mathcal{P}(M,P)$, $K^{(+)}=qK\sqcup U=qK$, which implies that $K\sqcup U=K$ holds in the skein module.
\vskip -0.1in
\setlength{\unitlength}{0.6cm}
\begin{picture}(5,5)
\put(8,0){\line(1,1){2.0}}
\put(10,1){\line(-1,1){0.4}}
\put(9.4,1.6){\vector(-1,1){1.4}}
\qbezier(10,2.0)(11.5,4.1)(13,2.0)
\qbezier(10,1.0)(11.5,-0.5)(13,1.2)
\qbezier(13,2.0)(13.22,1.6)(13,1.2)
\put(9,-1.5){$K^{(+)}$}
\end{picture}
\vskip 0.5in
We also see from the two relations that $K_+=K_0^{(+)}$, similarly $K_-=K_0^{(-)}$. (This is exactly the spin-statistics observation made by Kauffman in \cite{Ka2}, p.\ 12). It follows that we can arbitrarily change a framed tangle in its oriented bordism class as long as we keep track of framing changes corresponding to band attachments. Thus fixing a framed link $K_{\alpha }$ for given $\alpha \in h_1(M,P)$, a tangle $K$ in $\mathcal{P}(M,P)$
with homology class $\alpha $ is determined by comparing the resulting framing after an oriented bordism of $K$ in $M\times I$ with the framing of $K_{\alpha }$. In fact, just like observed in Lemma 2.2.4 of \cite{K1} the bordism group of the framed $3$-ball acts transitively on framed bordism in $M\times I$. Note that we can add a trivially framed circle in a separated $3$-ball to $K_{\alpha }$, which will not change the image in the skein module, and then change framings of this unknot to change the framings of $K_{\alpha }$. The indeterminancy of the power of $q$ resulting from this is determined by the normal Euler class of the surface in $M\times S^1$ resulting from a self-bordism of $K_{\alpha }$ into $K_{\alpha }\sqcup U$, with $U$ capped off by a disk, see Lemma 2.4.5 in \cite{K1}. This normal Euler class is the self-intersction number of the bordism surface with itself. Now note that the self-bordism represents an element in the inverse image under the boundary operator
$H_2(M\times S^1,P\times S^1)\rightarrow H_1(P\times S^1)$ of $[P]\times [S^1]$, where as before $[\quad ]$ denotes the fundamental class. Note that the K\"unneth formula applied to the pair $(M,P)\times (S^1,\emptyset )$ gives:
$$H_2(M\times S^1,P\times S^1)\cong H_2(M,P)\oplus H_1(M,P).$$
From the long exact homology sequence of $(M,P)$ we get $H_2(M,P)\cong H_2(M)$ and the condition about the inverse image above implies that the surface represents an element in
$$H_2(M)\oplus h_1(M,P).$$
The self-intersection number of this surface, therefore the possible change in framing, is given by twice the intersection pairing applied to the element of $H_2(M)$ and $h_1(M,P)$ representing the self-bordism. Note that surjectivity follows from
transitivity of the action of the framed skein module of the $3$-ball. $\blacksquare$
\vskip 0.1in
Of course if $\alpha \in h_1(M,P)$ is torsion then $\omega (\alpha )=0$. Therefore, if $P=\emptyset $ and $M$ is a submanifold of a rational homology $3$-sphere then $\omega (\alpha )=0$ for all $\alpha $, in this case $H_1(M)=h_1(M)$ is torsion. See \cite{K1} for more details about this class of manifolds called Betti-trivial in \cite{K1}.
\vskip 0.1in
\example Let $M=\Sigma \times I$ for $\Sigma $ an oriented compact surface. This is a submanifold of a rational homology $3$-sphere so the writhe invariant is universally defined for $P=\emptyset $. Note that intersections of $1$-cycles with $2$-cycles in the submanifold cannot be non-trivial because we would get the same result in a rational homology sphere, into which it embeds. The situation is more subtle when $P\neq \emptyset $. If $\Sigma $ is a closed surface and for example
$P=\{(x,0),(x,1)\}$ for some $x\in \Sigma $ then $\omega (\alpha )=1$ because the surface $\Sigma \times \{1/2\}$ will have intersection number $\pm 1$ with e.g. the class in $h_1(\Sigma \times I,P)$ defined by $\{x\}\times I$.
But if $P\subset \Sigma \times \{i\}$ for $i=0$ or $i=0$ then intersection numbers will be $0$ and the writhe is universally defined. If $\partial \Sigma \neq \emptyset $ then $P$ can be isotoped into $\partial \Sigma \times I$, and at the same time $H_2(\Sigma \times I)=0$ so our intersection pairing is trivial. Note that for $\Sigma =S^2$ we get the familiar consequence of the light bulb theorem. In this case for a closed framed loop in $S^2\times S^1$ or equivalently a tangle in $S^2\times I$ intersecting $S^2\times \{1/2\}$ in a single point the framing can be changed by sign through isotopy across the $2$-sphere, see \cite{C1}. Our case generalizes this observation to an oriented surface, which represents an oriented bordism changing the framing correspondingly.
\vskip 0.1in
\section{Proof of Theorem 2.2}
First not that it is well-known that the bracket relations imply that $[L^{(+)}]=-A^3[L]=(-A)^3[L]$ for any unoriented tangle in $(M,P)$ and $[\quad ]$ denotes the class in the bracket module. Therefore
$$\kappa (K^{(+)})=\kappa (K)\in \mathcal{K}(P,M).$$
This follows using $w(K^{(+)})=w(K)+1$:
$$\kappa (K^{(+)})=(-A)^{-3w(K^{(+)})} [{K^{(+)}}']=(-A)^{-3w(K)-3}(-A)^3[K']=\kappa (K),$$
where in general $L'$ is the unoriented framed tangle determined by the oriented framed tangle $L$.
The writhe invariant suffices to pick from the orientation, in combination with the framing, a framing of the unoriented link, which is independent of the framing of the original tangle. Framings can be understood as \textit{local} projections, so not surprisingly there are obstructions to be able to combine the local information to a global map like $\kappa $.
\vskip 0.1in
To finish the proof of well-definedness of $\kappa $ we calculate $\kappa $ on $A^4K_+-A^{-4}K_-$ and compare with
the mapping applied to $(A^{-2}-A^2)K_0$. We find first using the property of the writhe and the bracket relations, and
noting that if $K_+'=:K$ and $K_-'=:L$ then $K_{cc}=L_c=K_0'$ and $K_c=L_{cc}$, the following holds:
\begin{align*}
\kappa (A^4K_+-A^{-4}K_-)&=A^4(-A)^{-3w(K_+)}[K_+']-A^{-4}(-A)^{-3w(K_-)}[K_-']\\
&=A^4(-A)^{-3w(K_0)-3}[K_+']-A^{-4}(-A)^{-3w(K_0)+3}[K_-']\\
&=(-A)^{-3w(K_0)}\left(-A[K_+']+A^{-1}[K_-']\right)\\
&=(-A)^{-3w(K_0)}\left(-A\left(AK_{cc}-A^{-1}K_c\right)+A^{-1}\left(AK_c+A^{-1}K_{cc}\right)\right)\\
&=(-A)^{-3w(K_0)}(-A^2+A^{-2})K_{cc}\\
&=(A^{-2}-A^2)\kappa (K_0)
\end{align*}
In the above calculation we did not indicate that $w$ is not necessarily taking values in $\mathbb{Z}$. The calculations though are valid in the quotients of the Kauffman bracket depending on the integral homology class of $K_{\pm},K_0$, as defined above.
The surjectivity of $\kappa $ follows immediately from the definitions and the surjectivity of the marking map $\mathcal{M}\rightarrow \mathcal{M}'$. $\blacksquare$
Note that by the application of bracket relations to a tangle will keep the mod $2$ homology class, but in terms of picking preimages in the Jones skein module the integral homology class of a preimage is not naturally defined.
\section{Compatibility with gluing}
We decided to prove Theorem 2.1 for tangles because our homomorphisms are compatible with gluings, even though the behavior of writhe indeterminacy under gluing adds technical difficulties.
Let $(M_1,P_1)$ and $M_2,P_2)$ be two marked oriented $3$-manifolds. Let $\partial_0(M_i)$ be compact submanifolds of $\partial M_i$ for $i=1,2$. Let $h: \partial_0M_1\rightarrow \partial_0M_2$ be an orientation reversing diffeomorphism. Let
$P_i^0:=P_i\cap \partial_0M_i\subset \textrm{int}\partial_0M_i$ for $i=1,2$. Let $h(P_1^0)=\overline{P_2^0}$, where $\overline{\ }$ denotes the opposite orientation. We also assume that the derivative of $P$ at each point $x\in P_1^0$ maps the marking vector at that point to the corresponding marking vector at $h(p)$. Let $P:=(P_1\setminus P_1^0)\sqcup (P_2\setminus P_2^0)\subset \partial M_1\cup_h \partial M_2=\partial M$ where $M$ is the boundary connected sum
$M_1\cup_h M_2$. Note that there are well-defined maps of sets of framed tangles defined by gluing the tangles using $h$:
$$\mathcal{L}(M_1,P_1)\sqcup \mathcal{L}(M_2,P_2)\rightarrow \mathcal{L}(M,P).$$
Note that gluing using $h$ also defines the map
$$\mathfrak{h}: h_1(M_1,P_1)\times h_1(M_2,P_2)\rightarrow h_1(M,P).$$
Note that the $h_1(M_i,P_i)$ in general are only subsets of $H_1(M_i,P_i)$, $i=1,2$. The above map is the restriction of the corresponding homomorphism
$$H_1(M_1,P_1)\oplus H_1(M_1,P_2)\rightarrow H_1(M,P_1\cup P_2)$$
in the relative Mayer-Vietoris sequence (see e.\ g.\ \cite{S}, p.\ 187), where we have identified $M_i\subset M$, and the image is in the subgroup $H_1(M,P)$ because the boundaries are glued. Note that $P=(P_1\cup P_2)\setminus (P_1\cap P_2)$ and there is the exact sequence of the triple $P\subset P_1\cup P_2\subset M$ (see \cite{S}, p.\ 201):
$$0=H_1(P_1\cup P_2,P) \rightarrow H_1(M,P)\rightarrow H_1(M,P_1\cup P_2)\rightarrow H_0(P_1\cup P_2,P).$$
Note that the same homological discussion as above works for coefficients in $\mathbb{Z}_2$.
\lemma Let $\alpha_i \in h_1(M_i,P_i)$ for $i=1,2$. Then $\omega (\mathfrak{h}(\alpha_1,\alpha_2))$ divides the gcd of $\omega (\alpha_1)$ and $\omega (\alpha_2))$.
\proof Note that
$$\iota (\mathfrak{h}(\alpha_1,\alpha_2)\otimes H_2(M_i))=\iota (\alpha_i \otimes H_2(M_i)),$$
where we have identified $H_2(M_i)$ with its image in $H_2(M)$ under the inclusions $M_i\subset M$.
Therefore there are more intersections to be considered for $\mathfrak{h}(\alpha_1,\alpha_2)$ than coming from intersections with surfaces in homology classes in $H_2(M_i)$ for $i=1,2$. $\blacksquare$
\theorem Let $(M_i,P_i)$ for $i=1,2$ and $h$ be as above. Let $\alpha_i\in h_1(M_i,P_i)$ for $i=1,2$. Then, for given writhe functions for $(M_1,P_1), (M_2,P_2)$, we can choose a writhe function for $(M,P)$ such that there is the commutative diagram of skein modules with the natural gluing maps for skein modules horizontally:
\begin{center}
\begin{tikzcd}
\mathcal{J}^{\alpha_1}(M_1,P_1)\otimes \mathcal{J}^{\alpha_2}(M_2,P_2)\arrow[r,"\mathfrak{g}_{\mathcal{J}}"] \arrow[d,"\kappa^{\alpha_1}\otimes \kappa^{\alpha_2}"] & \mathcal{J}^{\mathfrak{h}(\alpha_1,\alpha_2)}(M,P)\arrow[d,"\kappa^{\mathfrak{h}(\alpha_1,\alpha_2)}"]\\
\mathcal{K}^{[\alpha_1]_2}_{3\omega (\alpha_1)}(M_1,P_1')\otimes \mathcal{K}^{[\alpha_2]_2}_{3\omega (\alpha_2)}(M_2,P_2') \arrow[r,"\mathfrak{g}_{\mathcal{K}}"] \arrow[d] & \mathcal{K}^{[\mathfrak{h}(\alpha_1,\alpha_2)]_2}_{3\omega (\mathfrak{h}(\alpha_1,\alpha_2))}(M,P')\\
\mathcal{K}^{[\mathfrak{h}(\alpha_1,\alpha_2)]_2}_{3\textrm{gcd}(\omega (\alpha_1),\omega (\alpha_2))}(M,P')\arrow[ru]
\end{tikzcd}
\end{center}
\proof The vertical left bottom arrow is defined by gluing and the fact that the $\textrm{gcd}$ divides $\omega (\alpha_i)$ for $i=1,2$, the arrow in the second row is defined by commutativity of the triangle. The subtle point is to choose the writhe function used to define $\kappa^{\mathfrak{h}(\alpha_1,\alpha_2)}$ from the representing framed tangle by gluing the representative tangles, which have been used to define the writhe maps $\kappa^{\alpha_i}$ for $(M_i,P_i)$. The result then follows from a gluing bordisms argument, which will imply $w(K_1\cup_hK_2)=w(K_1)+w(K_2)$, where $K_1\cup_hK_2$ is the result of gluing two framed oriented angles $K_1,K_2$ using $h$. Note that
\begin{align*}
\mathfrak{g}_{\mathcal{K}}(\kappa^{\alpha_1}\otimes \kappa^{\alpha_2})(K_1\otimes K_2)&=\mathfrak{g}_{\mathcal{K}}((-A)^{-3w(K_1)}[K_1']\otimes (-A)^{-3w(K_2)}[K_2'])\\
\quad &=(-A)^{-3(w(K_1)+w(K_2))}[K_1'\cup_hK_2']
\end{align*}
and correspondingly
\begin{align*}
\kappa^{\mathfrak{h}(\alpha_1,\alpha_2)}\mathfrak{g}_{\mathcal{J}}(K_1\otimes K_2)&=(-A)^{-3w(K_1\cup_hK_2)}
[(K_1\cup_hK_2)']\\
\quad &=(-A)^{-3w(K_1\cup_hK_2)}[(K_1'\cup_hK_2)']
\end{align*}
because gluing and forgetting orientations commute. In the above formulas $w$ denotes three different writhe functions depending on the choices of framed tangles representing $\alpha_i$ for $i=1,2$ and $\mathfrak{h}(\alpha_1,\alpha_2)$, which is really the gluing of homology classes.
$\blacksquare$
\vskip 0.1in
\remark The connection between the Jones and bracket module is Przytycki's module with
$$\mathcal{P}^{\alpha }(M,P)\cong \mathbb{Z}/(2\omega (\alpha )\mathbb{Z}),$$
with the isomorphism defined by a choice of framed link in the homology class $\alpha \in h_1(M,P)$.
Gluing of framed tangles as defined above induces the homomorphism
$$\mathcal{P}^{\alpha_1}(M_1,P_1)\otimes \mathcal{P}^{\alpha_2}(M_2,P_2)\rightarrow \mathcal{P}^{\mathfrak{h}(\alpha_1,\alpha_2)}(M,P)$$ and induces with corresponding choices of representing framed tangles:
\begin{align*}
\mathbb{Z}/(2\omega (\alpha_1)\mathbb{Z})\otimes \mathbb{Z}/(2\omega (\alpha_2)\mathbb{Z}) & \rightarrow
\mathbb{Z}/(2\textrm{gcd}(\omega (\alpha_1),\omega (\alpha_2)\mathbb{Z})\\
\quad & \rightarrow \mathbb{Z}/(2\omega (\mathfrak{h}(\alpha_1,\alpha_2))\mathbb{Z})
\end{align*}
(choosing the representative framed tangle for $\mathfrak{h}(\alpha_1,\alpha_2)$ by gluing the representative tangles for $\alpha_1$ and $\alpha_2$). Note that we do not claim that we can choose the writhe function for the glued homology class (equivalently the framed links in homology classes) for all choices of $\alpha_1,\alpha_2$ uniformly.
Recall that $M_1\cap M_2=\partial_0M$ after identifying $M_i\subset M$ for $i=1,2$.
\theorem Suppose that the boundary homomorphism $\partial: H_2(M)\rightarrow H_1(\partial_0M)$ in the exact sequence of $(M,\partial_0M)$ is trivial. Then, for given writhe functions for $(M_i,P_i)$ defining $\kappa^{\alpha_i}$ for $i=1,2$, there is defined a writhe function for $(M,P)$, $P\in \mathcal{M}$, defining $\kappa^{\alpha }$, such that the conclusion of Theorem 5.1 holds for all $\alpha_1, \alpha_2$ uniformly.
\proof It follows from the assumption that the homomorphism $j$ in the Mayer-Vietoris sequence
\begin{center}
\begin{tikzcd}
H_2(M)\arrow[r,"\partial"] & H_1(\partial_0M)\arrow[r,"j"] & H_1(M_1)\oplus H_1(M_2)\arrow[r] & H_1(M)
\end{tikzcd}
\end{center}
is injective. Now $H_1(M_i)$ ($i=1,2$) and $H_1(M)$ act transitively and faithfully on the corresponding sets
$h_1(M_i,P_i)$ ($i=1,2)$) and $h_1(M)$. Therefore the injectivity above implies that
$$\mathfrak{h}: h_1(M_1,P_1)\times h_1(M_2,P_2)\rightarrow h_1(M,P)$$
is injective. So for each $\alpha \in h_1(M,P)$ in the image of $\mathfrak{h}$ we can find unique $\alpha_i\in h_1(M_i,P_i)$ for $i=1,2$ such that $\mathfrak{h}(\alpha_1,\alpha_2)=\alpha $. Now for given framed tangles with homology classes $\alpha_i$ for $i=1,2$ we can construct the tangle in $(M,P)$ by gluing to represent the homology class $\alpha $.
For all $\alpha $ not in the image of $\mathfrak{h}$ we choose the representing framed tangle arbitrarily. This defines a writhe function with the property claimed above. $\blacksquare$
\example A natural gluing example is the gluing of two handlebodies $\mathcal{H}_{g,i}$, $i=1,2$ along their boundaries. We think of $\mathcal{H}_g=D_g \times I$, where $D_g$ is the $g$-holed disk and $\Sigma_g=\partial \mathcal{H}_g$. Note that for each $P$ in this case $h_1(\mathcal{H}_g),P)$ is bijective with $H_1(D_g)=\mathbb{Z}^g$. But $(\mathcal{H}_g,P)$ has no writhe-indeterminacy because $H_2(\mathcal{H}_g)=0$. Note that Mayver-Vietoris sequence extended to the left gives the following:
\begin{center}
\begin{tikzcd}
H_2(\mathcal{H}_{g,1})\oplus H_2(\mathcal{H}_{g,2})\arrow[r] & H_2(M)\arrow[r,"\partial"] & H_1(\Sigma_g),
\end{tikzcd}
\end{center}
which shows that $\partial $ is injective and therefore $\partial \neq 0$ for $H_2(M)\neq 0$. Thus if $H_2(M)=0$, Theorem 5.2 applies to a Heegaard splitting.
\section{Final remarks}
Skein modules were introduced by Przytycki \cite{P1}, \cite{P2} for oriented $3$-manifolds and Turaev for links in surfaces \cite{T}. There has been much recent progress in the field, see e.\ g.\ the introduction of \cite{GJS}. Gilmer and Masbaum studied the bracket module of $\Sigma \times S^1$ for $\Sigma $ a closed oriented surface \cite{GM}. Frohman, Kania-Bartoszynska and Le developed the representation theory of the bracket module of $\Sigma \times I$ for $\Sigma $ an oriented surface. Gunningham, Jordan and Safranov proved a conjecture by Witten about finite-dimensionality of the bracket module of a closed oriented $3$-manifold over $\mathbb{C}(A)$ using the theory of factorization algebras. The skein relations of a skein module are usually deduced from the $R$-matrix of a quantum group, and in the case of the quantum group of $\textrm{sl}(2)$ define the Jones relations, while approaches to the bracket using matrices can be found e.\ g.\ in \cite{Ka2}. In this article we defined a \textit{natural} homomorphism between the two modules, generalizing Kauffman's famous formula \cite{Ka}. In this way many results about the bracket module naturally give rise to results about Jones skein modules. The study of the kernels seems to be an interesting future project.
|
\section{Introduction}
Several methods exist for solving supervised learning problems of regression
and classification~\citep{HTF09,Bis06}. The main goal is to estimate a model of
the
data generation process to \emph{predict} at best the target value
corresponding to a combination of
features not seen before. However, not all methods are suitable to
\emph{optimize} on top of the estimated
model, i.e., to solve a mathematical programming problem that contains the
estimated model as part of the
constraints and/or the objective function. For example, to find the best
combination of features providing a
desired target, possibly under constraints on the features one can choose. In
this case, the model is used as a
surrogate of the underlying (and unknown) features-to-target mapping to
formulate the decision problem.
Applications range from derivative-free black-box
optimization~\citep{Kus64,Jon01,BCD10,Bem20,BP21},
to engineering design~\citep{QHSGVT05}, and control engineering, in
particular model predictive
control~\citep{CB99,MRD18,BBM17}, where actuation commands are decided in
real-time
by a
numerical optimization
algorithm based on a dynamical model of the controlled process that is learned
from
data~\citep{Lju99,SL19}, see for instance the approach proposed recently
in~\citep{MB21}.
When optimizing over a learned model is a goal, a clear tradeoff exists between
the accuracy
of the model on test data and the complexity of the model, which ultimately
determines the
complexity of the mathematical programming problem resulting from using the
model. On one extreme,
we have
linear regression models, which are very simple to represent as linear
relations among
optimization variables but have limited expressiveness. On the other extreme,
random forests
and other ensemble methods, k-nearest neighbors, kernel support vector machines,
and other methods, can capture
the underlying model very accurately but are difficult to encode in an
optimization problem.
Neural networks and Gaussian processes can be a good compromise between the
compactness of the model and the
representation of the feature-to-target relation, but are nonlinear models
leading to nonconvex optimization problems that are possibly
difficult to solve to global optimality.
In this paper, we advocate the use of \emph{piecewise linear} (PWL) models as a
good
tradeoff between their simplicity, due to the linearity of the model on
polyhedral regions
of the feature-vector space, and expressiveness, due to the good approximation
properties of piecewise linear functions~\citep{Bre93,LU92,CD88,JDD00,BOPS11}.
We
refer to such models with the more appropriate, although less common, term
\emph{piecewise affine} (PWA), to highlight the presence of an intercept in
each submodel. PWA models can be easily encoded into optimization problems by
using mixed-integer linear inequalities~\citep{BM99}, and hence optimize over
them to reach a global minimum
by using mixed-integer programming~\citep{Lod10}, for which excellent public
domain and
commercial packages exist.
Many classical machine learning methods have an underlying PWA structure: ridge
classification,
logistic (and more generally softmax) regression, hinging
hyperplanes~\citep{Bre93}, and neural networks with ReLU
activation functions, they all require evaluating the maximum of linear
functions to predict
target values; the predictor associated with a decision tree is a piecewise
constant (PWC) function
over a partition of the feature-vector space in boxes; $k$-nearest neighbor
classifiers can be
also expressed as PWC functions over polyhedral partitions (the comparison of
squared Euclidean norms
$\|x-x_i\|_2^2\leq \|x-x_j\|_2^2$ used to determine the nearest neighbors of
$x$
is equivalent to the linear relation $2(x_j-x_i)'x\leq
\|x_j\|_2^2-\|x_i\|_2^2$), although the number of
polyhedra largely grows with the number of training samples.
Different piecewise affine regression methods have been proposed in the
system identification literature for getting switching linear dynamical models
from data~\citep{FMLM03a,RBL04a,BGPV05,NTK05,HLCXV15}.
See also the survey paper~\citep{PKFV07} and the recursive PWA regression
algorithms proposed
in~\citep{BBD11,BPB16a}. Most of such methods
identify a prescribed number of linear models and associate one of them to each
training
datapoint,
therefore determining a clustering of the data. As a last step,
a multicategory discrimination problem is solved to determine a function
that piecewise-linearly separates the clusters~\citep{BM94}. For instance, the
approach
of~\cite{NTK05} consists of first clustering the feature+target vectors by
using a Gaussian mixture model, then use support vector classification
to separate the feature-vector space. In~\citep{FMLM03a}, the authors propose
instead to cluster the vectors whose entries are the
coefficients of local linear models, one model per datapoint, then
piecewise-linearly separate the clusters. In~\citep{BPB16a}, $K$ recursive
least-squares
problems for regression are run in parallel to cluster data in on-line fashion,
based on both quality of fit obtained by each linear model and proximity
to the current centroids of the clusters, and finally the obtained clusters are
separated by a PWL function.
\subsection{Contribution}
This paper proposes a general supervised learning method for regression and/or
classification of
multiple targets that results in a PWA predictor over a single PWA partition of
the feature space
in $K$ polyhedral cells. In each polyhedron, the predictor is either affine
(for numeric targets) or given by the
max of affine functions, i.e., convex piecewise
affine (for categorical targets). Our
goal is to obtain an overall predictor
that admits a simple encoding with binary and real variables, to be able
to solve optimization problems involving the prediction function via
mixed-integer linear or quadratic
programming. The number $K$ of
linear predictors
is therefore limited by the tolerated complexity of the resulting
mixed-integer encoding
of the PWA predictor.
Rather than first clustering the training data
and fitting $K$ different linear predictors, and then finding a PWL separation
function to get the PWA
partition, we simultaneously cluster, PWL-separate, and fit
by solving
a block-coordinate descent problem, similarly to the K-means
algorithm~\citep{Llo57},
where we alternate between fitting models/separating clusters and reassigning
training data
to clusters. We call the algorithm PARC (Piecewise Affine Regression and
Classification) and show
that it converges in a finite number of iterations by showing that the sum of
the loss functions
associated with regression, classification, piecewise linear
separation errors
decreases at each iteration. PWL separation is obtained by solving softmax
regression problems or,
as a simpler alternative, by taking the Voronoi partition induced by the
cluster centroids.
We test the PARC algorithm on different synthetic and real-world datasets.
After showing that PARC can reconstruct an underlying PWA function from its
samples,
we investigate the effect of $K$ in reconstructing a nonlinear function, also
showing how
to optimize with respect to the feature vector so that the corresponding
target is as close
as possible to a given reference value. Then we test PARC on many real-world
datasets proposed
for regression and classification, comparing its performance to alternative
regression and classification
techniques that admit a mixed-integer encoding of the predictor
of similar complexity, such as simple
neural networks based on ReLU activation functions and small decision trees.
A Python implementation of the PARC algorithm is available at
\url{http://cse.lab.imtlucca.it/~bemporad/parc}.
\subsection{Outline}
After formulating the multivariate PWL regression and
classification problem in
Section~\ref{sec:statement}, we describe the proposed PARC algorithm and prove
its convergence properties in Section~\ref{sec:PARC}. In
Section~\ref{sec:predictor} we
define the PWA prediction function for regression and classification, showing
how to encode it
using mixed-integer linear inequalities using big-M techniques.
Section~\ref{sec:examples}
presents numerical tests on synthetic and real-world datasets. Some
conclusions are
finally drawn in Section~\ref{sec:conclusions}.
\subsection{Notation and definitions}
Given a finite set $\CC$, $\card \CC$ denotes its number of elements
(cardinality). Given a vector $a\in\rr^n$, $\|a\|_2$ is the Euclidean norm of
$a$,
$[a]_i$ denotes the $i$th component of $a$.
Given two vectors $a,b\in\rr^n$, we denote by
$[a=b]$ the binary quantity that is $1$ if $a=b$ or $0$ otherwise.
Given a matrix $A\in\rr^{m\times n}$,
$\|A\|_F$ denotes the Frobenius norm of $A$.
Given a polyhedron $P\subseteq\rr^n$, $\mathring{P}$ denotes
its interior. Given a finite set $S$ of real numbers $\{s_1,\ldots,s_K\}$
we denote by
\begin{equation}
\arg\min_{s\in S}=\min_{h}\{h\in\{1,\ldots,K\}: s_h\leq s_j,\ \forall j\in\{1,\ldots,K\}\}
\label{eq:argmin}
\end{equation}
Taking the smallest index $h$ in~\eqref{eq:argmin} breaks ties in case of
multiple minimizers.
The $\arg\max$ function of a set $S$ is defined similarly by replacing
$ s_h\leq s_j$ with $s_h\geq s_j$ in~\eqref{eq:argmin}.
\begin{definition}
A collection $\PP$ of sets $\{P_1,\ldots,P_K\}$ is said a \emph{polyhedral partition} of $\rr^n$ if $P_i$ is a polyhedron, $P_i\subseteq\rr^n$,
$\forall i=1,\ldots,K$, $\cup_{i=1}^K P_i=\rr^n$, and $\mathring{P}_i\cap\mathring{P}_j=\emptyset$, $\forall i,j=1,\ldots,K$, $i\neq j$.
\end{definition}
\begin{definition}
\label{def:PWA}
A function $j:\rr^n\rightarrow\{1,\ldots,K\}$ is said \emph{integer
piecewise constant} (IPWC)~\citep{CB17} if there exist a polyhedral
partition
$\PP=\{P_1,\ldots,P_K\}$ of $\rr^n$ such that
\begin{equation}
j(x) = \arg\min_{h} \{h\in\{1,\ldots,K\}:\ x\in P_h\}
\label{eq:ipwc-fun}
\end{equation}
for all $x\in\rr^n$.
\end{definition}
The ``$\arg\min$'' in~\eqref{eq:ipwc-fun} prevents possible
multiple definitions of $j(x)$ on overlapping boundaries $P_i\cap P_j\neq
\emptyset$.
\begin{definition}
\label{def:PWA2}
A function $f:\rr^n\to\rr^m$ is said \emph{piecewise affine} (PWA) if there exists an IPWC function $j:\rr^n\to\{1,\ldots,K\}$ defined over a polyhedral partition $\PP$ and $K$ pairs $(a^i,b^i)$, $a^i\in\rr^{m\times n}$,
$b^i\in\rr^m$, such that
\begin{equation}
f(x) = a^{j(x)}x+b^{j(x)}
\label{eq:pwa-fun}
\end{equation}
for all $x\in\rr^n$.
It is said \emph{piecewise constant} if $a^i=0$, $\forall i\in\{1,\ldots,K\}$.
\end{definition}
\begin{definition}
A \emph{piecewise linear (PWL) separation} function
$\Phi:\rr^n\to\rr$~\citep{BM94}
is defined by
\begin{subequations}
\beqar
\Phi(x)&=&\omega^{j(x)}x+\gamma^{j(x)}\label{eq:PWL-sep-a}\\
j(x)&=&\displaystyle{\min\left\{\arg\max_{j=1,\ldots,K}\{\omega^jx+\gamma^j\}\right\}}
\label{eq:PWL-sep-b}
\eeqar
\label{eq:PWL-sep
\end{subequations}
where $\omega^j\in\rr^n$, $\gamma^j\in\rr$, $\forall j=1,\ldots,K$.
\end{definition}
A PWL separation function is convex~\citep{Sch87} and PWA
over the polyhedral partition $\PP=\{P_1,\ldots,P_K\}$ where
\begin{equation}
P_j=\{x\in\rr^n:\ (\omega^h-\omega^j)x\leq \gamma^j-\gamma^h,\ \forall
h=1,\ldots,K,\ h\neq j\},\ j=1,\ldots,K
\label{eq:PWL-partition}
\end{equation}
\section{Problem statement}
\label{sec:statement}
We have a training dataset $(x_k,y_k)$, $k=1,\ldots,N$,
where $x_k$ contains $n_c$ numerical and $n_d$ categorical
features, each one of the latter containing $n_i$ possible values
$\{v^i_1,\ldots,v^i_{n_i}\}$,
$i=1,\ldots,n_d$, and $y_k$ contains $m_c$ numerical targets and $m_d$ categorical targets,
each one containing $m_i$ possible values $\{w^i_1,\ldots,w^i_{m_i}\}$,
$i=1,\ldots,m_d$. We assume that categorical features
have been one-hot encoded into $n_i-1$ binary values,
so that $x_k\in\XX$, $\XX=\rr^{n_c}\times\{0,1\}^{s_x}$,
$s_x=\sum_{i=1}^{n_d}(n_i-1)$.
By letting $n=n_c+s_x$ we have $x_k\in\rr^n$. Moreover, let
$y_k=\smallmat{y_{ck}\\y_{dk}}$,
$y_{ck}\in\rr^{m_c}$, $[y_{dk}]_i\in\{w^i_1,\ldots,w^i_{m_i}\}$,
$\forall i=1,\ldots,m_d$, and define
$\YY=\rr^{m_c}\times
\{w^1_1,\ldots,w^1_{m_1}\}\times\ldots\times\{w^{m_d}_1,\ldots,w^{m_d}_{m_{m_d}}\}$,
so that we have $y_k\in\YY$.
Several approaches exist to solve regression problems to predict the numerical
components $y_c$ and classification problems for the categorical target vector $y_d$.
In this paper, we are interested in generalizing linear predictors for
regression and classification to \emph{piecewise linear} predictors $\hat
y:\rr^n\to\YY$ over a single \emph{polyhedral partition}
$\PP=\{P_1,\ldots,P_{K}\}$ of
$\rr^n$.
More precisely, we want to solve the posed multivariate regression and
classification problem by finding the following predictors
\begin{subequations}
\beqar
[\hat y_c(x)]_i&=&a^{j(x)}_ix+b^{j(x)}_i,\ i=1,\ldots,m_c\label{eq:PWA-regression}\\\null
[\hat y_d(x)]_i&=&w^i_{h},\ h=\arg\max_{t\in I(i)}\{a^{j(x)}_tx+b^{j(x)}_t\},\ i=1,\ldots,m_d
\label{eq:PWA-classifier
\eeqa
\label{eq:PWA-predictors
\end{subequations}
where $j(x)$ is defined as in~\eqref{eq:ipwc-fun} and
the coefficient/intercept values $a^j\in\rr^n$, $b^j\in\rr$
define a PWA function $f:\rr^n\to\rr^m$ as in~\eqref{eq:pwa-fun},
in which $m=m_c+\sum_{i=1}^{m_d}m_i$. In~\eqref{eq:PWA-predictors}, $I(i)$
denotes
the set of
indices
corresponding to the $i$th categorical target $[y_d]_i$,
$I(i)=\{t(i)+1,\ldots,t(i)+m_i\}$, $t(i)=m_c+\sum_{h=1}^{i-1}m_h$.
Note that subtracting the same quantity $\bar ax+\bar b$
from all the affine terms in~\eqref{eq:PWA-classifier} does not change the maximizer,
for any arbitrary $\bar a\in\rr^n$, $\bar b\in\rr$.
To well-pose $\hat y_d$, according to~\eqref{eq:argmin} we also assume that
the smallest index is taken in case ties occur when taking the maximum
in~\eqref{eq:PWA-classifier}.
We emphasize that all the components of $\hat y(x)$ in~\eqref{eq:PWA-predictors}
share the \emph{same polyhedral partition} $\PP$.
A motivation for this requirement is to be able
to efficiently solve optimization problems involving the resulting predictor $\hat y$
using mixed-integer programming, as we will detail in Section~\ref{sec:MIP}.
Clearly, if this is not a requirement, by treating each
target independently the problem can be decomposed in $m_c$
PWA regression problems and $m_d$ PWA classification problems.
Our goal is to jointly separate the training dataset in
$K$ clusters $\CC_1,\ldots,\CC_K$, $\CC_1=\{x_k: k\in J_j\}$,
where $\cup_{i=1}^KJ_i=\{1,\ldots,N\}$, $J_i\cap J_j=\emptyset$, $\forall i,j\in\{1,\ldots,N\}$, $i\neq j$, and to find optimal coefficients/intercepts
$a^j$, $b^j$ for~\eqref{eq:PWA-predictors}. In particular, if the clusters
were given, for each numerical target $[y_c]_i$, $i=1,\ldots,m_c$, we solve the
ridge regression problem
\begin{equation}
\min_{a^j_i,b^j_i} \alpha_j(\|a^j_i\|_2^2+(b^j_i)^2)+\sum_{k\in J_j} (y_{ki}-a^j_ix_k-b^j_i)^2
\label{eq:ridge}
\end{equation}
with respect to the vector $a^j_i\in\rr^n$ of coefficients and intercept $b^j_i\in\rr$,
where $\alpha_j=\frac{\card{J_j}}{N}\alpha$ and $\alpha>0$
is an $\ell_2$-regularization parameter. For each binary target $[y_d]_i$,
$i=1,\ldots,m_d$,
we solve the regularized softmax regression problem, a.k.a. Multinomial
Logistic Regression (MLR) problems~\citep{Cox66,Thi69},
\begin{eqnarray}
\min_{\scriptsize\ba{c}\{a^j_h,b^j_h\}\\h\in I(i)\ea}&&
\sum_{h\in I(i)}\alpha_j(\|a^j_h\|_2^2+(b^j_h)^2)-\sum_{h=1}^{m_i}
\sum_{\scriptsize \ba{c}
k\in J_j:\\\null
[y_{dk}]_i=w^i_h\ea}
\log\frac{e^{a^j_{h+t(i)} x_k+b^j_{h+t(i)}}}
{\sum_{t\in I(i)} e^{a^j_tx_k+b^j_t}}
\label{eq:softmax-regression}
\end{eqnarray}
Note that, by setting $\alpha>0$, both~\eqref{eq:ridge} and~\eqref{eq:softmax-regression}
are strictly convex problems, and therefore their optimizers are unique.
It is well known that in the case of binary targets $[y_d]_i\in\{0,1\}$,
problem~\eqref{eq:softmax-regression} is equivalent to
the regularized logistic regression problem
\begin{equation}
\min_{a^j_h,b^j_h} \alpha_j(\|a^j_h\|_2^2+(b^j_h)^2)+\sum_{k\in J_j} \log\left(1+e^{(1-2[y_{dk}]_i)(a^j_ix_k+b^j_i)}\right)
\label{eq:logistic}
\end{equation}
where $h=t(i)+1$. Similarly, for preparing the
background for what will follow in the
next sections, we can rewrite~\eqref{eq:softmax-regression} as
\begin{eqnarray}
\min_{\scriptsize\ba{c}\{a^j_h,b^j_h\}\\h\in I(i)\ea}&&\hspace{-.2cm}
\sum_{h\in I(i)}\alpha_j(\|a^j_h\|_2^2+(b^j_h)^2)+\sum_{h=1}^{m_i}
\sum_{\scriptsize \ba{c}
k\in J_j:\\\null
[y_{dk}]_i=w^i_h\ea}
\log\left(\sum_{t\in I(i)} e^{a^j_tx_k+b^j_t}\right)
\nonumber\\
&&\hspace*{-1.5cm}-a^j_{h+t(i)}x_k-b^j_{h+t(i)}=\hspace*{-.2cm}\min_{\scriptsize\ba{c}\{a^j_h,b^j_h\}\\h\in
I(i)\ea}\hspace{-.2cm}
\sum_{h\in I(i)}\alpha_j(\|a^j_h\|_2^2+(b^j_h)^2)+\sum_{k\in J_j}
\log\left(\sum_{t\in I(i)} e^{a^j_tx_k+b^j_t}\right)\nonumber\\
&&\hspace*{-1.5cm}-\sum_{h=1}^{m_i}[[y_{dk}]_i=w^i_h](a^j_{h+t(i)}x_k+b^j_{h+t(i)})
\label{eq:softmax-regression-2}
\end{eqnarray}
\subsection{Piecewise linear separation}
\label{sec:PWL-separation}
Clustering the feature vectors $\{x_k\}$ in $\CC_1,\ldots,\CC_K$ should be
based on two goals. On the one hand, we wish to have all the data values
$(x_k,y_k)$ that can be best predicted
by $(a^j,b^j)$ in the same
cluster $\CC_j$. On the other hand, we would like the clusters $\CC_1,\ldots,\CC_K$
to be piecewise linearly separable, i.e., that there exist a PWL separation
function
$\Phi:\rr^n\to\rr$ as in~\eqref{eq:PWL-sep} such that $\CC_i\subseteq P_i$.
The above goals are usually conflicting (unless $y_k$ is a piecewise
linear function of $x_k$), and we will have to trade them off.
Several approaches exist to find a PWL separation function $\Phi$ of given clusters
$\CC_1,\ldots,\CC_K$, usually attempting at minimizing the number of misclassified feature vectors $x_k$ (i.e., $x_k\in\CC_i$ and $x_k\not\in P_i$) in case the clusters are not piecewise-linearly separable.
Linear programming was proposed in~\citep{BM94} to solve the following problem
\[
\min_{\omega,\gamma} \sum_{j=1}^K\sum_{\scriptsize\ba{c}h=1\\h\neq j\ea}^K
\sum_{k:\ x_k\in\CC_j}^N \frac{1}{\card \CC_j}\max\{(\omega^h-\omega^j)x_k+\gamma^j-\gamma^j+1,0\}
\]
Other approaches based on the piecewise smooth optimization
algorithm of~\citep{BBP15} and averaged stochastic gradient descent
\citep{Bot12} were described in \citep{BPB16a}. In this paper, we
use instead $\ell_2$-regularized softmax regression
\begin{subequations}
\begin{equation}
\ba{rl}
\min_{\omega,\gamma} &
\beta(\|\omega\|_F^2+\|\gamma\|_2^2)+\displaystyle{\sum_{j=1}^K\sum_{k:\
x_k\in\CC_j}
-\log\frac{e^{\omega^jx_k+\gamma^j}}{\sum_{i=1}^K
e^{\omega^ix_k+\gamma^i}}}
\ea
\label{eq:softmax-cost}
\end{equation}
with $\beta\geq 0$, whose solution $\omega,\gamma$ provides the PWL separation
function~\eqref{eq:PWL-sep}
as
\begin{equation}
j(x)=\arg\max_{j=1,\ldots,K}
\frac{e^{\omega^jx+\gamma^j}}{\sum_{i=1}^K
e^{\omega^ix+\gamma^i}}=
\arg\max_{j=1,\ldots,L} \omega^jx+\gamma^j
\label{eq:PWL-softmax}
\end{equation
\label{eq:softmax
\end{subequations}
and hence a polyhedral partition $\PP$ of the
feature vector space as in~\eqref{eq:PWL-partition}. Note that,
as observed earlier, there are infinitely many PWL functions $\Phi(x)$
as in~\eqref{eq:PWL-sep-a} providing the same piecewise-constant function
$j(x)$.
Hence, as it is customary, one can set one pair $(\omega^i,\gamma^i)=(0,0)$,
for instance $\omega^K=0$, $\gamma^K=0$
(this is equivalent to dividing both the numerator and denominator in the first
maximization in~\eqref{eq:PWL-softmax} by $e^{\omega^Kx+\gamma^K}$), and
solve the reduced problem
\begin{equation}
\ba{rl}
\min_{\{\omega^j,\gamma^j\}_{j=1}^{K-1}}
&\beta(\|\omega\|_F^2+\|\gamma\|_2^2)+ \displaystyle{\sum_{j=1}^K\sum_{k:\
x_k\in\CC_j}
-\log\frac{e^{\omega^jx_k+\gamma^j}}{1+\sum_{i=1}^{K-1}
e^{\omega^ix_k+\gamma^i}}}
\ea
\label{eq:softmax-2}
\end{equation}
An alternative approach to softmax regression is to obtain $\PP$ from the
Voronoi diagram of the centroids
\begin{equation}
\bar x_j=
\arg\min_{x}\sum_{k\in J_j}\|x_k-x\|_2^2
=\frac{1}{\card{\CC_j}}\sum_{k\in J_j}x_k
\label{eq:centroids}
\end{equation}
of the clusters, inducing the PWL separation function as in~\eqref{eq:PWL-sep}
with
\begin{subequations}
\begin{eqnarray}
j(x)&=&\arg\min_{j=1,\ldots,K}\|x-\bar x_j\|_2^2=
\arg\max_{j=1,\ldots,K}\omega^j x+\gamma^j\\
\omega^j&=&\bar x_j',\ \gamma^j=-\frac{1}{2}\|\bar x_j\|_2^2
\end{eqnarray}
\label{eq:Voronoi-partition
\end{subequations}
Note that the Voronoi partitioning~\eqref{eq:Voronoi-partition} has $Kn$ degrees of freedom (the centroids $\bar x_j$), while softmax regression~\eqref{eq:PWL-softmax} has $Kn+(K-n-1)$ degrees of freedom.
\section{Algorithm}
\label{sec:PARC}
In the previous section, we have seen how to get the coefficients $a^j,b^j$
by ridge~\eqref{eq:ridge} or softmax~\eqref{eq:softmax-regression} regression
when the clusters $\CC$ are given, and how to get a PWL partition of $\CC$.
The question remains on how to determine the clusters $\CC_1,\ldots,\CC_K$.
Let us assume that the coefficients $a^j,b^j$ have been fixed.
Following~\eqref{eq:ridge} and~\eqref{eq:softmax-regression-2}
we could assign each training vector $x_k$ to the corresponding cluster $\CC_{j}$ such that
the following weighted sum of losses
\begin{eqnarray}
V^y(a^j,b^j,x_k,y_k)&=&\sum_{i=1}^{m_c}\mu_{ci}(y_{ki}-a^j_ix_k-b^j_i)^2\\
&&\hspace{-3cm}+\sum_{i=1}^{m_d}\mu_{di}\log\left(\sum_{t\in I(i)}
e^{a^j_tx_k+b^j_t}\right)
-\sum_{h=1}^{m_i}[[y_{dk}]_i=w^i_h](a^j_{h+t(i)}x_k+b^j_{h+t(i)})
\label{eq:cost_k-y}
\end{eqnarray}
is minimized, where $\mu_c\in\rr^{m_c}$, $\mu_d\in\rr^{m_d}$ are
vectors of relative weights on fit losses.
Besides the average quality of prediction~\eqref{eq:cost_k-y}, we also want to
consider the location of the feature vectors $x_k$
to promote PWL separability of the resulting clusters
using the two approaches (softmax regression and Voronoi diagrams)
proposed in Section~\ref{sec:PWL-separation}. Softmax regression induces the
criterion
\begin{subequations}
\begin{equation}
V^x_s(\omega^j,\gamma^j,x_k)=-
\log\frac{e^{\omega^jx_k+\gamma^j}}{1+\sum_{i=1}^{K-1}
e^{\omega^ix_k+\gamma^i}}=
\log\left(1+\sum_{i=1}^{K-1}
e^{\omega^ix_k+\gamma^i}\right)-\omega^jx_k-\gamma^j
\label{eq:cost_k-x-2}
\end{equation}
for $j=1,\ldots,K$,
where $\omega^K=0$, $\gamma^K=0$.
Note that the last logarithmic term in~\eqref{eq:cost_k-x-2} does not
depend on $j$, so that it might be neglected in case $V^x_s$ gets minimized
with respect to $j$.
Alternatively, because of~\eqref{eq:Voronoi-partition},
Voronoi diagrams suggest penalizing the distance between $x_k$ and the
centroid $\bar x_j$ of the cluster
\begin{equation}
V^x_v(\bar x_j,x_k)=\|x_k-\bar x_j\|_2^2
\label{eq:cost_k-x-1}
\end{equation}
Criteria~\eqref{eq:cost_k-x-2} and~\eqref{eq:cost_k-x-1} can be
combined as follows:
\begin{equation}
V^x(\omega^j,\gamma^j,x_k)=
\left\{\ba{ll}
V^x_s(\omega^j,\gamma^j,x_k) & \mbox{if PWL
partitioning~\eqref{eq:PWL-partition} is used}\\
V^x_v((\omega^j)',x_k)+0\cdot\gamma_j & \mbox{if Voronoi
partitions~\eqref{eq:Voronoi-partition} are used}
\ea\right.
\end{equation}
\label{eq:cost_k
\end{subequations}
Then, each training vector $x_k$ is assigned to the cluster $\CC_{j_k}$ such that
\begin{equation}
j_k=\arg\min_{j=1,\ldots,K} V^y(a^j,b^j,x_k,y_k)+\sigma V^x(\omega^j,\gamma^j,x_k)
\label{eq:assignment}
\end{equation}
where $\sigma\geq 0$ is a relative weight that allows trading off between target fitting and
PWL separability of the clusters. Note that, according to the definition
in~\eqref{eq:argmin}, in the case of multiple minima the optimizer $j_k$
in~\eqref{eq:assignment} is always selected as the smallest index among optimal
indices.
The idea described in this paper is to alternate between fitting linear
predictors as in~\eqref{eq:ridge}--\eqref{eq:softmax-regression} and
reassigning vectors
to clusters as in~\eqref{eq:assignment}, as described in
Algorithm~\ref{algo:PARC}
that we call PARC (Piecewise Affine Regression and Classification).
The following theorem proves that indeed PARC is an algorithm, as it terminates in a finite number of steps to a local minimum of the problem of finding the $K$ best linear predictors.
\begin{theorem}
\label{th:convergence}
Algorithm~\ref{algo:PARC} converges in a finite number of steps
to a local minimum of the following mixed-integer optimization problem
\begin{subequations}
\beqar
\min_{a,b,\omega,\gamma,z} && V(a,b,\omega,\gamma,z)\nonumber\\
\st&& \displaystyle{\sum_{j=1}^Kz_{kj}=1},\ \forall k=1,\ldots,N
\label{eq:PARC-optim}\\
\hspace*{-1cm}V(a,b,\omega,\gamma,z)&=&\sigma\beta(\|\omega\|_F^2+\|\gamma\|_2^2)+
\sum_{j=1}^K\sum_{k=1}^Nz_{kj}\left(
\frac{\alpha}{N}(\|a^j\|_F^2+\|b^j\|_2^2)+\right.\nonumber\\
&& \left.
V^y(a^j,b^j,x_k,y_k)+\sigma V^x(\omega^j,\gamma^j,x_k)\right)
\label{eq:PARC-problem-cost}
\eeqar
\label{eq:PARC-problem
\end{subequations}
where $a^j\in\rr^{m\times n}$, $b^j\in\rr^{m}$,
$\omega^j\in\rr^{K\times n}$,$\gamma^j\in\rr^{K}$,
$\forall j=1,\ldots,K$, $z\in\{0,1\}^{N\times K}$, and
with either $\omega^K=0$, $\gamma^K=0$, and $\beta\geq 0$ if PWL
partioning~\eqref{eq:PWL-partition} is used, or
$\gamma^j=-\frac{1}{2}\|\omega^j\|_2^2$, $\forall j=1,\ldots,K$, and
$\beta=0$
if Voronoi
partions~\eqref{eq:Voronoi-partition} are used.
\end{theorem}
\proof
We prove the theorem by showing that Algorithm~\ref{algo:PARC}
is a block-coordinate descent algorithm for problem~\eqref{eq:PARC-problem},
alternating between the minimization with respect to $(a,b,\omega,\gamma)$ and
with respect to $z$. The proof follows arguments similar to those used to prove
convergence of unsupervised learning approaches like K-means.
The binary variables $z_{kj}$ are hidden variables such that $z_{kj}=1$ if and
only if
the target vector $y_k$ is predicted by $j(x_k)=j$ as in~\eqref{eq:PWA-predictors}.
The initial clustering $\CC_1,\ldots,\CC_K$ of $\{x_k\}$
determines the initialization of the latent variables, i.e., $z_{kj}=1$ if and only if $x_k\in\CC_j$, or equivalently $k\in J_j$. Let us consider $z$ fixed.
Since
\begin{eqnarray*}
\sum_{j=1}^K\sum_{k=1}^Nz_{kj}\left(\frac{\alpha}{N}(\|a^j\|_F^2+\|b^j\|_2^2)\right)&
=&\sum_{j=1}^K\frac{\card{J_j}}{N}\alpha(\|a^j\|_F^2+\|b^j\|_2^2)\\
&=&\sum_{j=1}^K\sum_{i=1}^{m_c+m_d}\alpha_j(\|a^j_i\|_2^2+(b^j_i)^2)
\end{eqnarray*}
problem~\eqref{eq:PARC-problem} becomes separable into ($i$) $Km_c$
independent optimization problems
of the form~\eqref{eq:ridge}, ($ii$) $Km_d$ softmax regression problems as in~\eqref{eq:softmax-regression},
and ($iii$) either a softmax regression problem as in~\eqref{eq:softmax-cost}
or $K$ optimization problems as in~\eqref{eq:centroids}.
Let $a^j$, $b^j$, $\omega^j$, $\gamma^j$ be the solution to such problems and consider now them fixed. In this case, problem~\eqref{eq:PARC-problem} becomes
\begin{equation}
\ba{rl}
\min_{z\in\{0,1\}^{N\times K}} & \displaystyle{\sum_{k=1}^N\sum_{j=1}^Kz_{kj}\left(V^y(a^j,b^j,x_k,y_k)+\sigma V^x(a^j,b^j,\omega^j,\gamma^j,x_k)\right)}\\
\st& \displaystyle{\sum_{j=1}^Kz_{kj}=1},\ \forall k=1,\ldots,N
\ea
\label{eq:all-assignments}
\end{equation}
which is separable with respect to $k$ into $N$ independent binary optimization problems.
The solution of~\eqref{eq:all-assignments} is given by computing $j_k$ as in~\eqref{eq:assignment} and by setting $z_{j_k}=1$ and $z_j=0$ for all $j=1,\ldots,K$,
$j\neq j_k$.
Having shown that PARC is a coordinate-descent
algorithm, the cost $V(a,b,\omega$, $\gamma$, $z)$ in~\eqref{eq:PARC-problem}
is monotonically non-increasing at each iteration of Algorithm~\ref{algo:PARC}.
Moreover,
since all the terms in the function are nonnegative, the sequence of optimal cost values is lower-bounded by zero, so it converges asymptotically.
Moreover, as the number of possible
combinations $\{z_{kj}\}$ are finite, Algorithm~\ref{algo:PARC} always terminates
after a finite number of steps, since we have assumed that
the smallest index $j_k$ is always taken in~\eqref{eq:assignment}
in case of multiple optimizers. The latter implies that no
chattering between different
combinations $z_{kj}$ having the same cost $V$ is possible.
\qed
\begin{algorithm}[t]
\caption{PARC (Piecewise Affine Regression and Classification)}
\label{algo:PARC}
~~\textbf{Input}: Training dataset $(x_k,y_k)$, $k=1,\ldots,N$; number
$K$ of desired linear predictors; $\ell_2$-regularization parameters
$\alpha>0$, $\beta\geq 0$; fitting/separation tradeoff parameter
$\sigma\geq 0$;
output weight vector $\mu\in\rr^m$, $\mu\geq 0$;
initial clustering $\CC_1,\ldots,\CC_K$ of $\{x_k\}$.
\vspace*{.1cm}\hrule\vspace*{.1cm}
\begin{enumerate}[label*=\arabic*., ref=\theenumi{}]
\item $i\leftarrow 1$;
\item \textbf{Repeat}
\begin{enumerate}[label=\theenumi{}.\arabic*., ref=\theenumi{}.\arabic*]
\item \textbf{For all} $j=1,\ldots,K$ \textbf{do}
\label{algo:PARC-for}
\begin{enumerate}[label=\theenumii{}.\arabic*.,
ref=\theenumii{}.\arabic*]
\item Solve the ridge regression problem~\eqref{eq:ridge},
$\forall i=1,\ldots, m_c$;
\label{algo:PARC-ridge}
\item Solve the softmax regression
problem~\eqref{eq:softmax-regression}, $\forall i=m_c+1,\ldots,
m$;
\label{algo:PARC-classification}
\end{enumerate}
\item PWL separation: either compute the cluster centroids
$\omega^j=\bar x_j'$~\eqref{eq:centroids} and set $\gamma_j=0$,
$j=1,\ldots,K$ (Voronoi partitioning), or
$\omega^j,\gamma^j$ as in~\eqref{eq:softmax-cost} (general PWL
separation); \label{algo:PARC-separation}
\item \textbf{For all} $k=1,\ldots,N$ \textbf{do}
\label{algo:PARC-assign}
\begin{enumerate}[label=\theenumii{}.\arabic*.,
ref=\theenumii{}.\arabic*]
\item Evaluate $j_k$ as in~\eqref{eq:assignment};
\item Reassign $x_k$ to cluster $\CC_{j_k}$;
\label{algo:PARC-assignment}
\end{enumerate}
\end{enumerate}
\item \textbf{Until} convergence; \label{algo:PARC-until}
\item \textbf{End}.
\end{enumerate}
\vspace*{.1cm}\hrule\vspace*{.1cm}
~~\textbf{Output}: Final number $K_f$ of clusters; coefficients $a_j$ and
intercepts $b_j$ of linear functions, and $\omega^j,\gamma^j$ of PWL
separation function, $j=1,\ldots,K_f$, final clusters
$\CC_1,\ldots,\CC_{K_f}$.
\end{algorithm}
Theorem~\ref{th:convergence} proved that PARC converges
in a finite number of steps. Hence, a termination criterion
for Step~\ref{algo:PARC-until} of Algorithm~\ref{algo:PARC}
is that $z$ does not change from the previous iteration.
An additional termination criterion is to introduce a tolerance $\epsilon>0$
and stop when the optimal cost $V(a,b,\omega,\gamma,z)$ has not decreased more than $\epsilon$
with respect to the previous iteration. In this case, as the reassignment
in Step~\ref{algo:PARC-assignment} may have changed the $z$ matrix,
Steps~\ref{algo:PARC-ridge}--\ref{algo:PARC-classification} must be executed
before stopping, in order to update the coefficients/intercepts $(a,b)$
accordingly.
Note that PARC is only guaranteed to converge to a local
minimum; whether this is also a global one depends on the provided initial
clustering $\CC_1,\ldots,\CC_K$, i.e., on the initial guess on $z$.
In this paper, we initialize $z$ by running the K-means++
algorithm~\citep{AV07}
on the set of feature vectors $x_1,\ldots,x_N$. For solving single-target
regression problems, an alternative approach to get the initial clustering
could be to associate to each datapoint $x_k$ the coefficients $c_k$ of the
linear
hyperplane fitting
the $K_n$ nearest neighbors of $x_k$ (cf.~\cite{FMLM03a}),
for example, by setting $K_n=2(n+1)$, and then run K-means on the set
$c_1,\ldots,c_n$ to get an
assignment $\delta_k$. This latter approach, however, can be sensitive
to noise on measured targets and is not used in the numerical experiments
reported in Section~\ref{sec:examples}.
As in the K-means algorithm, some clusters may become empty
during the iterations, i.e., some indices $j$ are such that $z_{kj}=0$ for all $k=1,\ldots,N$. In this case, Step~\ref{algo:PARC-for} of
Algorithm~\ref{algo:PARC} only loops on the indices $j$ for which $z_{kj}=1$
for some $k$. Note that the values of $a^j$, $b^j$, $\omega^j$, and $\gamma^j$,
where
$j$ is the index of an empty cluster, do not affect the value of the overall function $V$
as their contribution is multiplied by 0 for all $k=1,\ldots,N$.
Note also that some categories may disappear from the subset of samples in the
cluster in the case of multi-category targets. In this case,
still~\eqref{eq:softmax-regression} provides
a solution for the coefficients $a_j^h,b^j_h$ corresponding to missing categories $h$, so
that $V^y$ in~\eqref{eq:cost_k-y} remains well posed.
After the algorithm stops, clusters $\CC_j$ containing less than
$c_{\rm min}$ elements can be also eliminated, interpreting the corresponding
samples as outliers (alternatively, their elements could be reassigned to the
remaining clusters).
We mention that after the PARC algorithm terminates, for each numeric
target $[y_c]_i$ and cluster $\CC_j$ one can further fine-tune the
corresponding
coefficients/intercepts $a_i^j$, $b_i^j$ by choosing the
$\ell_2$-regularization parameter
$\alpha^j$ in each region via leave-one-out cross-validation on the subset of
datapoints contained in the cluster. In case some features or targets have very
different ranges, the numeric components in $x_k$, $y_k$ should be scaled.
Note that purely solving $m_c$ ridge and $m_d$ softmax regression on the entire dataset
corresponds to the special case of running PARC with $K=1$. Note also that, when $\sigma\rightarrow +\infty$, PARC will determine a PWL separation of the feature vectors,
then solve $m_c$ ridge and $m_d$ softmax regression on each cluster. In this
case, if the initial clustering $\CC$ is determined by K-means,
PARC stops after one iteration.
We remark that evaluating~\eqref{eq:cost_k-y} and \eqref{eq:cost_k-x-2} (as
well as solving softmax regression problems) requires computing the logarithm
of the sum of exponential, see, e.g., the recent paper
\citep{BHH19} for numerically accurate implementations.
When the PWL separation~\eqref{eq:softmax-cost} is used, or in case of
classification problems, most of the computation effort spent
by PARC is due to solving softmax regression problems. In our implementation,
we have used the general L-BFGS-B
algorithm~\citep{BLBZ95},
with warm-start equal to the value obtained from the previous PARC iteration
for the same set of optimization variables.
Other efficient methods for solving MLR problems have been proposed in the
literature, such
as iteratively reweighted least squares (IRLS), that is a Newton-Raphson
method~\citep{Lea90},
stochastic average gradient (SAG) descent~\citep{SLB17}, the alternating
direction method of multipliers
(ADMM)~\citep{BPCPE11}, and methods based on majorization-minimization
(MM) methods~\citep{KCFH90,FSS15,JB20}.
We remark that PARC converges even if the softmax regression
problem~\eqref{eq:softmax-cost} is not solved to optimality. Indeed, the proof
of Theorem~\ref{th:convergence} still holds as long as the optimal cost
in~\eqref{eq:softmax-cost} decreases with respect to the last computed
value of $\omega,\gamma$. This suggests that during intermediate PARC
iterations, in case general PWL separation is used, to save computations
one can avoid using tight optimization tolerances in
Step~\ref{algo:PARC-separation}. Clearly, loosening
the solution of problem~\eqref{eq:softmax-cost} can impact
the total number of PARC iterations; hence, there is a tradeoff to take into
account.
We finally remark that Steps~\ref{algo:PARC-for} and~\ref{algo:PARC-assign} can
be parallelized for speeding computations up.
\section{Predictor}
\label{sec:predictor}
After determining the coefficients $a^j$, $b^j$ by running PARC,
we can define the prediction functions $\hat y_c$, $\hat y_d$,
and hence the overall predictor $\hat y$ as in~\eqref{eq:PWA-predictors}.
This clearly requires defining $j(x)$,
i.e., a function that associates to any vector $x\in\rr^n$ the
corresponding predictor out of the $K$ available. Note that the obtained
clusters $\CC_j$ may not be piecewise-linearly separable.
In principle any classification method on the dataset $\{x_k,\delta_k\}$,
where $\delta_k=j$ if and only if $x_k\in\CC_j$, can be used
to define $j(x)$. For example, nearest neighbors
($j(x)=\arg\min_{k=1,\ldots,N}\|x-x_k\|_2^2$), decision trees, na\"ive Bayes,
or one-to-all neural or support vector classifiers to mention a few.
In this paper, we are interested in defining $j(x)$ using
a polyhedral partition $\PP=\{P_1,\ldots,P_K\}$ as stated in Section~\ref{sec:statement},
that is to select $j(x)$ such that it is IPWC as defined in~\eqref{eq:ipwc-fun}.
Therefore, the natural choice is to use the values of $(\omega^j,\gamma^j)$
returned by PARC to define a PWL separation function
by setting $j(x)$ as in~\eqref{eq:PWL-softmax}, which defines $P_j$ as
in~\eqref{eq:PWL-partition}, or, if Voronoi partitioning is used in PARC,
set $j(x)=\arg\min_{j=1,\ldots,K_f}\|x-\bar x_j\|_2^2$, which leads to
polyhedral cells $P_j$ as in~\eqref{eq:Voronoi-partition}.
As the clusters $\CC_1,\ldots,\CC_{K_f}$ may not be piecewise-linearly
separable, after defining the partition $\PP=\{P_1,\ldots,P_{K_f}\}$, one can
cluster the datapoints again by redefining $\CC_j=\{x_k:\ x_k\in P_j,\
k=1,\ldots,N\}$ and then execute one last time
Steps~\ref{algo:PARC-ridge}--\ref{algo:PARC-classification} of the PARC
algorithm to get the final coefficients $a,b$ defining the predictors $\hat
y_c$, $\hat y_d$.
Note that these may not be continuous functions of the feature vector $x$.
Finally, we remark that the number of floating point operations
(flops) required to evaluate the predictor $\hat y(x)$ at a given $x$
is roughly $K$ times that of a linear predictor, as it involves $K$
scalar products $[\omega^j\ \gamma^j]\smallmat{x\\ 1}$ as
in~\eqref{eq:PWL-softmax} or~\eqref{eq:Voronoi-partition} ($2K(n_x+1)$ flops),
taking their maximum, and then evaluate a
linear predictor (another $2(n_x+1)$ flops per target in case of
regression~\eqref{eq:PWA-regression} and $2m_i(n_x+1)$ flops and a maximum for
multi-category targets~\eqref{eq:PWA-classifier}).
\subsection{Mixed-integer encoding}
\label{sec:MIP}
To optimize over the estimated model $\hat y$ we need to suitably encode
its numeric components $\hat y_c$ and categorical components $\hat y_d$ by introducing
binary variables. First, let us introduce a binary vector $\delta\in\{0,1\}^K$ to encode the PWL partition induced by~\eqref{eq:PWL-sep}
\begin{subequations}
\begin{eqnarray}
\hspace*{-.5cm}(\omega^i-\omega^j)x&\leq&
\gamma^j-\gamma^i+M_{ji}(1-\delta_j),\
\forall i=1,\ldots,K,\ i\neq j,\ \forall j=1,\ldots,K
\label{eq:mip-pwa-bigM}\\
\sum_{j=1}^K\delta_j&=&1\label{eq:mip-pwa-xor}
\end{eqnarray}
\label{eq:mip-partition
\end{subequations}
where $\omega^j,\gamma^j$ are the coefficients optimized by the PARC
algorithm when PWL separation~\eqref{eq:PWL-sep} is used (with
$\omega^K=0$, $\gamma^K=0$), or $\omega^j=\bar x_j'$ and
$\gamma=-\|\bar x_j\|_2^2$ if Voronoi partitioning~\eqref{eq:Voronoi-partition} is used instead.
The constraint~\eqref{eq:mip-pwa-bigM} is the ``big-M'' reformulation
of the logical constraint $[\delta_{j}=1]\rightarrow[x\in P_i]$,
that, together with the exclusive-or (SOS-1) constraint~\eqref{eq:mip-pwa-xor}
models the constraint $[\delta_{j}=1]\leftrightarrow[x\in P_i]$.
The values of $M_{ji}$ are upper-bounds that need to satisfy
\begin{equation}
M_{ji}\geq \max_{x\in\BB} (\omega^i-\omega^j)x-\gamma^j+\gamma^i,\
\forall i,j=1,\ldots,K,\ i\neq j
\label{eq:Mij}
\end{equation}
where $\BB\subset\rr^n$ is a compact subset of features of interest.
For example, given the dataset $\{x_k\}_{k=1}^N$ of features, we can
set $\BB$ as a box containing all the sample feature vectors
so that the values $M_{ij}$ in~\eqref{eq:Mij} can be easily
computed by solving $K(K-1)$ linear programs.
A simpler way to estimate the values $M_{ji}$ is given by the following
lemma \citep[Lemma 1]{LK00}:
\begin{lemma}
\label{lemma:bigM}
Let $\BB=\{x\in\rr^n:\ x_{\rm min}\leq x\leq x_{\rm max}$
and $v\in\rr^n$. Let $v^+=\max\{v,0\}$, $v^-=\max\{v,0\}$. Then
\begin{equation}
\sum_{i=1}^n v_i^+x_{\rm min,i}-v_i^-x_{\rm max,i}\leq
v'x\leq \sum_{i=1}^n v_i^+x_{\rm max,i}-v_i^-x_{\rm min,i}
\label{eq:big-M-lemma}
\end{equation}
\end{lemma}
\proof Since $x_{\rm min,i}\leq x_i\leq x_{\rm max,i}$ and $v=v^+-v^-$, we
get
\[
v'x=\sum_{i=1}^nv_ix_i=\sum_{i=1}^n (v_i^+-v_i^-)x_i\leq
\sum_{i=1}^n v_i^+x_{\rm max,i}-v_i^-x_{\rm min,i}
\]
and similarly $v'x\geq
\sum_{i=1}^n v_i^+x_{\rm min,i}-v_i^-x_{\rm max,i}$.
\qed
By applying Lemma~\ref{lemma:bigM} for $v=\omega^i-\omega^j$,~\eqref{eq:Mij} is
satisfied by setting
\begin{equation}
M_{ji}=\gamma^i-\gamma^j+\sum_{h=1}^n \max\{\omega^i_h-\omega^j_h,0\}
x_{\rm max,h}-\max\{\omega^j_h-\omega^i_h,0\}x_{\rm min,h}
\label{eq:big-Mij-lemma}
\end{equation}
for all $i,j=1,\ldots,K,\ i\neq j$.
Having encoded the PWL partition, the $i$th predictor is given by
\begin{subequations}
\begin{equation}
[\hat y_c(x)]_i=\sum_{j=1}^K p_{ij}
\label{eq:ychat-1}
\end{equation}
where $p_{ij}\in\rr$ are optimization variables representing
the product $p_{ji}=\delta_j(a^j_ix+b_i^j)$. This is modeled by
the following mixed-integer linear inequalities
\begin{equation}
\ba{rcl}
p_{ji}&\leq&a^j_ix+b_i^j-M^{c-}_{ji}(1-\delta_j)\\
p_{ji}&\geq&a^j_ix+b_i^j-M^{c+}_{ji}(1-\delta_j)\\
p_{ji}&\leq&M^{c+}_{ji}\delta_j\\
p_{ji}&\geq&M^{c-}_{ji}\delta_j
\ea
\label{eq:ychat-2}
\end{equation}
The coefficients $M^{c-}_{ji}$, $M^{c+}_{ji}$ need to satisfy
$M^{c-}_{ji}\leq \min_{x\in\BB}a^j_ix+b_i^j\leq
\max_{x\in\BB}a^j_ix+b_i^j\leq M^{c+}_{ji}$
and can be obtained by linear programming or, more simply, by
applying Lemma~\ref{lemma:bigM}.
Regarding the $m_d$ classifiers $\hat y_{di}$, to model the ``$\arg\max$''
in~\eqref{eq:PWA-classifier} we further introduce
$s_y$ binary variables $\nu_{ih}\in\{0,1\}$, $h=1,\ldots,m_i$,
$i=1,\ldots,m_d$, satisfying the following big-M constraints
\begin{eqnarray}
&&\hspace*{-1.5cm}(a^j_h-a^j_t)x\geq
b^j_t-b^j_h-M^d_{ht}(2-\nu_{ih}-\delta_j),\
\forall h,t\in I(i),\ h\neq t,\ \forall j=1,\ldots,K\label{eq:bigM-max}\\
&&\hspace*{-1.5cm}\sum_{h=1}^{m_i}\nu_{ih}=1,\ \forall i=1,\ldots,m_d
\label{eq:ydhat}
\end{eqnarray}
where the coefficients $M^d_{ht}$ must satisfy $\displaystyle{
M^{d}_{ht}\geq
\max_{j=1,\ldots,K}\{\max_{x\in\BB}(a^j_t-a^j_h)x+b^j_t-b^j_h\}}
$.
Note that the constraints in~\eqref{eq:bigM-max} become redundant when
$\delta_j=0$ or $\nu_{ih}=0$
and lead to $a^j_hx+b^j_h\geq a^j_t+b^j_t$ for all $t\in I(i)$, $t\neq h$, when
$\nu_{ih}=1$ and $\delta_j=1$, which is the binary equivalent of $[\hat
y_d(x)]_i=w^i_h$ for $x\in P_j$.
Then, the $i$th classifier is given by
\begin{equation}
[\hat y_d(x)]_i=\sum_{h=1}^{m_i}w^i_{h}\nu_{ih}
\label{eq:ydhat-3}
\end{equation}
\label{eq:yhat-bigM
\end{subequations}
In conclusion,~\eqref{eq:mip-partition} and~\eqref{eq:yhat-bigM} provide
a mixed-integer linear reformulation of the predictors $\hat y_c,\hat y_d$
as in~\eqref{eq:PWA-predictors} returned by the PARC algorithm. This enables
solving optimization problems involving the estimated model, possibly under
linear and logical constraints on features and targets. For example,
given a target vector $y_{\rm ref}$, the problem of
finding the feature vector $x^*$ such that $\hat y_c(x^*)\approx y_{\rm ref}$
can be solved by minimizing $\|\hat y_c(x)-y_{\rm ref}\|_\infty$
as in the following mixed-integer linear program (MILP)
\begin{eqnarray}
\min_{x,p,\delta,\epsilon}&&\epsilon\nonumber\\
\st && \epsilon\geq \pm \left(\sum_{j=1}^K p_{ij}-y_{{\rm ref},i}\right)
\label{eq:MILP-tracking}\\
&&\mbox{Constraints~\eqref{eq:mip-partition},~\eqref{eq:ychat-1},~\eqref{eq:ychat-2}}
\nonumber
\end{eqnarray}
The benefit of the MILP formulation~\eqref{eq:MILP-tracking} is that it
can be solved to global optimality by very efficient solvers.
Note that if a more refined nonlinear
predictor $\hat y_{NL}$ is available, for example, a feedforward neural network
trained on the same dataset, the solution $x^*$ can be used to
warm-start a nonlinear programming solver based on $\hat y_{NL}$,
which would give better chances to find a global minimizer.
\section{Examples}
\label{sec:examples}
We test the PARC algorithm on different examples. First, we consider
synthetic data generated from sampling a piecewise affine function and see
whether PARC can recover the function. Second, we consider synthetic
data from a toy example in which a nonlinear function generates the data, so to
test the effect of the main hyper-parameters of PARC, namely $K$ and $\sigma$,
also optimizing over the model using mixed-integer linear programming. In
Section~\ref{sec:real-datasets} we will instead test PARC on several regression
and classification examples on real datasets from the PMLB
repository~\citep{Olson2017PMLB}.
All the results have been obtained in Python 3.8.3 on an Intel Core i9-10885H
CPU @2.40GHz machine.
The \textsf{scikit-learn} package~\citep{scikit-learn} is used to solve
ridge and softmax regression problems, the latter using L-BFGS to solve the
nonlinear programming problem~\eqref{eq:softmax-regression}.
\subsection{Synthetic datasets}
\label{sec:toy-datasets}
\subsubsection{Piecewise affine function}
We first test whether PARC can reconstruct targets generated from
the following randomly-generated PWA function
\begin{eqnarray}
f(x)&=&\max\left\{
\smallmat{0.8031\\0.0219\\-0.3227}'\smallmat{x_1\\x_2\\1}
,
\smallmat{0.2458\\-0.5823\\-0.1997}'\smallmat{x_1\\x_2\\1}
,
\smallmat{0.0942\\-0.5617\\-0.1622}'\smallmat{x_1\\x_2\\1}
,
\smallmat{0.9462\\-0.7299\\-0.7141}'\smallmat{x_1\\x_2\\1}
,
\right.\nonumber\\&&\left.
\smallmat{-0.4799\\0.1084\\-0.1210}'\smallmat{x_1\\x_2\\1}
,
\smallmat{0.5770\\0.1574\\-0.1788}'\smallmat{x_1\\x_2\\1}
\right\}
\label{eq:PWA-example-fun}
\end{eqnarray}
We generate a dataset of 1000 random samples uniformly distributed
in the box $[-1,1]\times[-1,1]$, plotted in Figures~\ref{fig:PWA_function_3}
and~\ref{fig:PWA_function_1},
from which we extract $N=800$ training
samples and leave the remaining $N=200$ samples for testing.
Figure~\ref{fig:PWA_function_2} shows the partition generated
by the PWL function~\eqref{eq:PWA-example-fun} as in~\eqref{eq:PWL-partition}.
We run PARC with $K=6$, $\sigma=0$, PWL partitioning~\eqref{eq:softmax}
and $\beta=10^{-3}$, stopping tolerance $\epsilon=10^{-4}$ on
$V(a,b,\omega,\gamma,z)$, which
converges in $2.2$~s after 8 iterations. The sequence of function values $V$
is
reported
in Figure~\ref{fig:PWA_function_4}. The final polyhedral partition obtained by PARC
is shown in Figure~\ref{fig:PWA_function_2}. In this ideal case, PARC can
recover the underlying function generating the data quite well.
\begin{figure}[th!]
\centerline{
\begin{tabular}[t]{c}
\subfigure[True PWA function~\eqref{eq:PWA-example-fun} and
dataset]{\parbox{.45\hsize}{\includegraphics[width=\hsize]{PWA_function_3}\\~}
\label{fig:PWA_function_3}}
\hspace{.1\hsize}
\subfigure[Cost function during PARC iterations]
{\parbox{.45\hsize}{\includegraphics[width=\hsize]{PWA_function_4}\\~}
\label{fig:PWA_function_4}}\\
\subfigure[True PWA partition induced
by~\eqref{eq:PWA-example-fun}]{\parbox{.45\hsize}{\includegraphics[width=\hsize]{PWA_function_1}\\~}
\label{fig:PWA_function_1}}
\hspace{.1\hsize}
\subfigure[PWA partition generated by PARC]
{\parbox{.45\hsize}{\includegraphics[width=\hsize]{PWA_function_2}\\~}
\label{fig:PWA_function_2}}\\
\end{tabular}
}
\label{fig:PWA_example}
\caption{PARC algorithm for regression on training data generated by the PWA function~\eqref{eq:PWA-example-fun}.}
\end{figure}
\subsubsection{Nonlinear function}
We solve another simple regression example on a dataset of $N=1000$ randomly-generated
samples of the nonlinear function
\begin{equation}
y(x_1,x_2) = \sin\left(4x_1-5\left(x_2 - \frac{1}{2}\right)^2\right) + 2x_2
\label{eq:NL-example-function}
\end{equation}
Again we use 80\% of the samples as training data and the remaining 20\% for
testing. The function and the training dataset are shown in
Figures~\ref{fig:NL_function},~\ref{fig:NL_function_3d}.
We run PARC with $\sigma=1$, $\epsilon=10^{-4}$, PWL
partitioning~\eqref{eq:softmax} with $\beta=10^{-3}$, and different values of
$K$. The level sets and training data are reported in
Figure~\ref{fig:NL_example-1}.
The resulting piecewise linear regression functions are shown in Figure~\ref{fig:NL_example-2},
which also shows the solution obtained by solving the MILP~\eqref{eq:MILP-tracking}
for $y_{\rm ref}=3$.
The results obtained by running PARC for different values of $K$, $\sigma$ and the
two alternative separation criteria (Voronoi partitioning and softmax
regression with $\beta=10^{-3}$)
are reported in Table~\ref{tab:NL_R2train} (R$^2$-score on training data),
Table~\ref{tab:NL_R2test} (R$^2$-score on test data),
Table~\ref{tab:NL_CPUtrain} (CPU time [s] to execute PARC),
Table~\ref{tab:NL_Iters} (number of PARC iterations). The best results are
usually obtained for $\sigma=1$ using softmax regression (S) for PWL partitioning
as in~\eqref{eq:softmax-cost}.
The CPU time spent to solve the MILP~\eqref{eq:MILP-tracking} using the CBC
solver\footnote{\url{https://github.com/coin-or/Cbc}}
through the Python MIP
package~\footnote{\url{https://github.com/coin-or/python-mip}}
for $K$ = 3, 5, 8, 12, and 30 is, respectively, 8, 29, 85, 251, and
1420~ms.
Note that the case $K=1$ corresponds to ridge regression on the entire dataset,
while $\sigma=10000$ approximates the case $\sigma\rightarrow +\infty$, corresponding
to pure PWL separation + ridge regression on each cluster.
\begin{figure}[t]
\centerline{
\begin{tabular}[t]{c}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_function}\\~}
\label{fig:NL_function}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_3_sigma_1.0000_Softmax_1}\\~}
\label{fig:NL_function_3}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_5_sigma_1.0000_Softmax_1}\\~}
\label{fig:NL_function_5}}
\\
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_8_sigma_1.0000_Softmax_1}\\~}
\label{fig:NL_function_8}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_12_sigma_1.0000_Softmax_1}\\~}
\label{fig:NL_function_12}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_30_sigma_1.0000_Softmax_1}\\~}
\label{fig:NL_function_30}}
\end{tabular}
}
\caption{Training data and results of PARC for regression: nonlinear
function~\eqref{eq:NL-example-function}.}
\label{fig:NL_example-1}
\end{figure}
\begin{figure}[th!]
\centerline{
\begin{tabular}[t]{c}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_function_3D}\\~}
\label{fig:NL_function_3d}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_3_sigma_1.0000_Softmax_3}\\~}
\label{fig:NL_function_3_3d}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_5_sigma_1.0000_Softmax_3}\\~}
\label{fig:NL_function_5_3d}}
\\
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_8_sigma_1.0000_Softmax_3}\\~}
\label{fig:NL_function_8_3d}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_12_sigma_1.0000_Softmax_3}\\~}
\label{fig:NL_function_12_3d}}
\hspace{.05\hsize}
\subfigure[
{\parbox{.3\hsize}{\includegraphics[width=\hsize]{NL_K_30_sigma_1.0000_Softmax_3}\\~}
\label{fig:NL_function_30_3d}}
\end{tabular}
}
\caption{Training data and results of PARC for regression: nonlinear
function~\eqref{eq:NL-example-function}. The result of the MILP
optimization~\eqref{eq:MILP-tracking} is represented by the red dot.}
\label{fig:NL_example-2}
\end{figure}
\begin{table}[t]\begin{center}
\scalebox{.8}[0.8]{
\begin{tabular}{r|r|r|r|r|r|r}
$\sigma$ & $K=1$~~~~ & $K=3$~~~~ & $K=5$~~~~ & $K=8$~~~~ &
$K=12$~~~~ & $K=30$~~~~ \\[.5em]\hline
(S)
\hfill 0
& 0.565 (1.4\%)& 0.899 (2.0\%)& 0.979 (0.2\%)& 0.991 (0.2\%)& 0.995
(0.2\%)& 0.998 (0.1\%) \\
(V)
\hfill 0
& 0.565 (1.4\%)& 0.886 (3.1\%)& 0.974 (0.3\%)& 0.986 (0.2\%)& 0.993
(0.2\%)& 0.998 (0.0\%) \\
(S)
\hfill 0.01
& 0.565 (1.4\%)& 0.899 (2.2\%)& 0.979 (0.2\%)& 0.991 (0.2\%)& 0.995
(0.1\%)& 0.999 (0.1\%) \\
(V)
\hfill 0.01
& 0.565 (1.4\%)& 0.887 (3.1\%)& 0.973 (0.3\%)& 0.986 (0.2\%)& 0.993
(0.1\%)& 0.998 (0.0\%) \\
(S)
\hfill 1
& 0.565 (1.4\%)& 0.895 (2.3\%)& 0.982 (0.2\%)& 0.994 (0.2\%)& 0.998
(0.0\%)& 0.999 (0.0\%) \\
(V)
\hfill 1
& 0.565 (1.4\%)& 0.881 (3.0\%)& 0.974 (0.3\%)& 0.986 (0.2\%)& 0.994
(0.1\%)& 0.999 (0.0\%) \\
(S)
\hfill 100
& 0.565 (1.4\%)& 0.908 (0.9\%)& 0.977 (0.5\%)& 0.986 (0.2\%)& 0.994
(0.1\%)& 0.999 (0.0\%) \\
(V)
\hfill 100
& 0.565 (1.4\%)& 0.887 (3.6\%)& 0.972 (0.4\%)& 0.989 (0.3\%)& 0.995
(0.0\%)& 0.999 (0.0\%) \\
(S)
\hfill 10000
& 0.565 (1.4\%)& 0.834 (2.1\%)& 0.969 (0.3\%)& 0.985 (0.2\%)& 0.994
(0.1\%)& 0.999 (0.0\%) \\
(V)
\hfill 10000
& 0.565 (1.4\%)& 0.865 (3.6\%)& 0.971 (0.3\%)& 0.985 (0.2\%)& 0.994
(0.1\%)& 0.999 (0.0\%) \\
\hline
\end{tabular}}
\caption{PARC regression on targets from nonlinear
function~\eqref{eq:NL-example-function}: R$^2$ score on training
data, mean (std).
PWL separation: (S) = softmax regression, (V) for Voronoi
partitioning.}
\label{tab:NL_R2train}
\end{center}
\end{table}
\begin{table}[t]\begin{center}
\scalebox{.8}[0.8]{
\begin{tabular}{r|r|r|r|r|r|r}
$\sigma$ & $K=1$~~~~ & $K=3$~~~~ & $K=5$~~~~ & $K=8$~~~~ &
$K=12$~~~~ & $K=30$~~~~ \\[.5em]\hline
(S)
\hfill 0
& 0.548 (6.5\%)& 0.889 (2.6\%)& 0.976 (0.5\%)& 0.989 (0.3\%)& 0.994
(0.2\%)& 0.997 (0.1\%) \\
(V)
\hfill 0
& 0.548 (6.5\%)& 0.872 (3.6\%)& 0.970 (0.7\%)& 0.985 (0.4\%)& 0.993
(0.2\%)& 0.998 (0.1\%) \\
(S)
\hfill 0.01
& 0.548 (6.5\%)& 0.894 (2.5\%)& 0.976 (0.5\%)& 0.989 (0.4\%)& 0.994
(0.1\%)& 0.998 (0.1\%) \\
(V)
\hfill 0.01
& 0.548 (6.5\%)& 0.877 (3.3\%)& 0.969 (0.6\%)& 0.985 (0.3\%)& 0.992
(0.3\%)& 0.997 (0.1\%) \\
(S)
\hfill 1
& 0.548 (6.5\%)& 0.883 (2.8\%)& 0.981 (0.3\%)& 0.993 (0.2\%)& 0.997
(0.1\%)& 0.999 (0.0\%) \\
(V)
\hfill 1
& 0.548 (6.5\%)& 0.868 (3.5\%)& 0.970 (0.7\%)& 0.985 (0.3\%)& 0.993
(0.2\%)& 0.998 (0.1\%) \\
(S)
\hfill 100
& 0.548 (6.5\%)& 0.898 (1.6\%)& 0.970 (1.0\%)& 0.982 (0.2\%)& 0.992
(0.2\%)& 0.998 (0.0\%) \\
(V)
\hfill 100
& 0.548 (6.5\%)& 0.874 (4.1\%)& 0.967 (0.8\%)& 0.987 (0.4\%)& 0.993
(0.2\%)& 0.998 (0.1\%) \\
(S)
\hfill 10000
& 0.548 (6.5\%)& 0.816 (3.2\%)& 0.963 (0.8\%)& 0.980 (0.3\%)& 0.992
(0.1\%)& 0.998 (0.0\%) \\
(V)
\hfill 10000
& 0.548 (6.5\%)& 0.846 (4.4\%)& 0.965 (0.8\%)& 0.982 (0.3\%)& 0.993
(0.2\%)& 0.998 (0.0\%) \\
\hline
\end{tabular}}
\caption{PARC regression on targets from nonlinear
function~\eqref{eq:NL-example-function}: R$^2$ score on test data,
mean (std).
PWL separation: (S) = softmax regression, (V) for Voronoi
partitioning.}
\label{tab:NL_R2test}
\end{center}
\end{table}
\begin{table}[t]\begin{center}
\scalebox{.8}[0.8]{
\begin{tabular}{r|r|r|r|r|r|r}
$\sigma$ & $K=1$~~~~ & $K=3$~~~~ & $K=5$~~~~ & $K=8$~~~~ &
$K=12$~~~~ & $K=30$~~~~ \\[.5em]\hline
(S)
\hfill 0
& 1.0 (0.0\%)& 18.9 (44.6\%)& 13.1 (27.3\%)& 16.9 (28.4\%)&
18.9 (22.8\%)& 13.0 (17.9\%) \\
(V)
\hfill 0
& 1.0 (0.0\%)& 20.2 (39.7\%)& 12.8 (26.3\%)& 17.1 (30.4\%)&
20.1 (27.4\%)& 13.9 (20.5\%) \\
(S)
\hfill 0.01
& 1.0 (0.0\%)& 17.7 (42.4\%)& 13.3 (37.0\%)& 17.4 (28.3\%)&
20.5 (39.6\%)& 12.3 (19.6\%) \\
(V)
\hfill 0.01
& 1.0 (0.0\%)& 17.8 (43.0\%)& 13.8 (32.7\%)& 14.3 (26.3\%)&
19.7 (31.5\%)& 14.5 (33.8\%) \\
(S)
\hfill 1
& 1.0 (0.0\%)& 19.2 (46.0\%)& 11.2 (27.2\%)& 15.5 (27.3\%)&
14.2 (17.8\%)& 7.9 (14.9\%) \\
(V)
\hfill 1
& 1.0 (0.0\%)& 19.4 (41.4\%)& 13.0 (39.1\%)& 15.1 (23.1\%)&
18.9 (36.4\%)& 12.5 (33.2\%) \\
(S)
\hfill 100
& 1.0 (0.0\%)& 19.4 (24.1\%)& 8.2 (36.3\%)& 5.8 (32.5\%)&
4.0 (37.8\%)& 5.2 (24.0\%) \\
(V)
\hfill 100
& 1.0 (0.0\%)& 17.4 (49.1\%)& 11.4 (41.7\%)& 17.2 (42.6\%)&
12.8 (23.5\%)& 8.9 (22.7\%) \\
(S)
\hfill 10000
& 1.0 (0.0\%)& 3.0 (31.2\%)& 3.1 (26.8\%)& 3.4 (30.0\%)&
4.6 (27.0\%)& 5.5 (29.9\%) \\
(V)
\hfill 10000
& 1.0 (0.0\%)& 11.7 (53.7\%)& 5.9 (45.8\%)& 4.5 (29.7\%)&
4.2 (37.1\%)& 3.5 (64.5\%) \\
\hline
\end{tabular}}
\caption{PARC regression on targets from nonlinear
function~\eqref{eq:NL-example-function}: number of PARC iterations,
mean (std).
PWL separation: (S) = softmax regression, (V) for Voronoi
partitioning.}
\label{tab:NL_Iters}
\end{center}
\end{table}
\begin{table}[t]\begin{center}
\scalebox{.8}[0.8]{
\begin{tabular}{r|r|r|r|r|r|r}
$\sigma$ & $K=1$~~~~ & $K=3$~~~~ & $K=5$~~~~ & $K=8$~~~~ &
$K=12$~~~~ & $K=30$~~~~ \\[.5em]\hline
(S)
\hfill 0
& 0.12 (9.8\%)& 1.33 (43.6\%)& 1.46 (24.6\%)& 2.90 (28.0\%)&
5.18 (21.1\%)& 7.14 (17.3\%) \\
(V)
\hfill 0
& 0.04 (11.4\%)& 0.78 (36.1\%)& 0.77 (24.9\%)& 1.58 (30.7\%)&
2.64 (26.3\%)& 4.44 (19.5\%) \\
(S)
\hfill 0.01
& 0.12 (7.7\%)& 1.25 (40.3\%)& 1.48 (36.4\%)& 2.95 (30.1\%)&
5.47 (40.9\%)& 7.22 (18.7\%) \\
(V)
\hfill 0.01
& 0.04 (13.2\%)& 0.65 (41.2\%)& 0.82 (31.4\%)& 1.31 (25.1\%)&
2.58 (30.8\%)& 4.61 (32.8\%) \\
(S)
\hfill 1
& 0.12 (10.4\%)& 1.36 (43.8\%)& 1.42 (24.7\%)& 3.36 (26.0\%)&
4.14 (15.9\%)& 4.26 (14.9\%) \\
(V)
\hfill 1
& 0.04 (13.5\%)& 0.71 (38.6\%)& 0.78 (35.7\%)& 1.36 (22.7\%)&
2.48 (36.0\%)& 3.98 (31.1\%) \\
(S)
\hfill 100
& 0.12 (8.9\%)& 1.45 (24.2\%)& 1.11 (34.5\%)& 1.10 (30.4\%)&
1.04 (35.6\%)& 2.68 (22.1\%) \\
(V)
\hfill 100
& 0.04 (10.6\%)& 0.64 (44.9\%)& 0.69 (38.0\%)& 1.56 (43.5\%)&
1.70 (21.9\%)& 2.90 (21.0\%) \\
(S)
\hfill 10000
& 0.12 (9.2\%)& 0.24 (27.1\%)& 0.41 (22.6\%)& 0.66 (26.9\%)&
1.14 (24.2\%)& 2.80 (27.2\%) \\
(V)
\hfill 10000
& 0.04 (11.5\%)& 0.45 (49.7\%)& 0.38 (39.7\%)& 0.45 (24.8\%)&
0.62 (31.4\%)& 1.21 (61.8\%) \\
\hline
\end{tabular}}
\caption{PARC regression on targets from nonlinear
function~\eqref{eq:NL-example-function}: training time [s], mean
(std).
PWL separation: (S) = softmax regression, (V) for Voronoi
partitioning.}
\label{tab:NL_CPUtrain}
\end{center}
\end{table}
\subsection{Real-world datasets}
\label{sec:real-datasets}
We test the PARC algorithm on real-world datasets for regression
and classification from the PMLB repository~\citep{Olson2017PMLB}.
The features containing four or less distinct values are treated
as categorical and one-hot encoded, all the remaining features as numerical.
In all tests, $N_{\rm tot}$ denotes the total number of samples in the
dataset, whose 80\% is used for training and the rest 20\% for testing.
PARC is run with $\sigma=1$, softmax regression for PWL partitioning~\eqref{eq:softmax-cost},
$\epsilon=10^{-4}$, $\alpha=0.1$, $\beta=10^{-3}$. The minimum size of a
cluster not
to be discarded is 1\% of the number $N$ of training samples. Prediction quality
is measured in terms of $R^2$ score (in case of regression
problems), or accuracy score $a$ (for classification), respectively defined
as
\[
R^2=1-\frac{\sum_{k=1}^N(y_k-\hat y(x_k))^2}{\sum_{k=1}^N(y_k-\frac{1}{N}\sum_{k=1}^Ny_k)^2},\quad
a=\frac{1}{N}\sum_{k=1}^N [\hat y(x_k)=y_k]
\]
The neural networks and decision trees used for comparison are trained using
scikit-learn~\citep{scikit-learn} functions. The stochastic optimizer
Adam~\citep{KB15} is used for training the coefficient and bias terms of the
neural
network.
\subsubsection{Regression problems}
We extracted all the datasets from the PMLB repository with numeric targets
containing between $N_{\rm
tot}=500$ and $5000$ samples and between $n_x=2$ and $20$ features (before
one-hot
encoding categorical features). Five-fold cross-validation is run on
the training dataset for all values of $K$ between $2$ and $15$ to determine
the value $K^*$ that is optimal in terms of average $R^2$ score. For
comparison, we run PARC with fixed values of $K$ and compare against other
methods providing
piecewise linear partitions, particularly a neural network with ReLU
activation function with a single layer of $K^*$ neurons and a decision tree
with ten non-leaf nodes. Note that the neural network requires $K^*$
binary variables to encode the ReLU activation functions in a MIP, the same
number as the PWL
regressor determined by PARC,
as described in Section~\ref{sec:MIP}. In contrast, the decision tree
requires ten binary variables.
The $R^2$ scores obtained on the datasets are shown in
Table~\ref{tab:dataset-regression-training}
(training data) and in Table~\ref{tab:dataset-regression-test} (test data).
The CPU time spent on solving the training problems is reported in
Table~\ref{tab:dataset-CPUTIME-regression}.
The results show that PARC often provides better fit on training data,
especially for large values of $K$. On test data, PARC and neural networks
with $K^*$ ReLU neurons provide the best results. Some poor results of PARC on
test data for large values of $K$ are usually associated with overfitting
the training dataset, see for example \textsf{522\_pm10}, \textsf{547\_no2},
\textsf{627\_fri\_C1\_1000\_5}.
\subsubsection{Classification problems}
We extracted all datasets from the PMLB repository with categorical targets
with at most $m_1=10$
classes, containing between $N_{\rm tot}=1000$ and 5000 samples, and between
$n_x=2$ and 20 features (before one-hot encoding categorical features).
We compare PARC with $K=2$, $3$, $5$ to softmax regression (corresponding to
setting $K=1$ in PARC), a neural network (NN) with ReLU activation function and
a single layer of $K=5$ neurons, and a decision tree (DT) with $5$ non-leaf
nodes. Encoding the PARC classifier as an MIP requires $K+m_1$ binary variables
as described in Section~\ref{sec:MIP}, the NN requires $5+m_1$ binary variables
for MIP encoding, the DT requires $5+m_1$ binary variables ($m_1$
variables are required to encode the $\arg\max$ selecting the class
with highest score). In this test campaign, computing $K^*$ by cross-validation
has not shown to bring significant benefits and is not reported.
The accuracy scores obtained on the datasets are shown in
Table~\ref{tab:dataset-classification-training}
(training data) and in Table~\ref{tab:dataset-classification-test} (test data).
The CPU time spent on solving the training problems is reported in
Table~\ref{tab:dataset-CPUTIME-classification}. On training data, PARC with
$K=5$ provides the best accuracy in about 75\%
of the datasets, with neural networks based on $5$ ReLU neurons better
performing in the remaining cases. On test data, most methods perform
similarly, with neural networks providing slightly superior accuracy.
\section{Conclusions}
\label{sec:conclusions}
The regression and classification algorithm proposed in this paper generalizes
linear regression and classification approaches, in particular, ridge
regression and softmax
regression, to a piecewise linear form. Such a form is amenable for
mixed-integer encoding, particularly beneficial when the obtained
predictor becomes part of an optimization model.
Results on synthetic and real-world datasets show that the accuracy of the
method is comparable to that of alternative approaches that admit a
piecewise linear form of similar complexity. A possible drawback of PARC is
its computation time, mainly due to solving a sequence of softmax regression
problems. This makes PARC applicable to datasets whose size, in terms of number
of samples and features, is such that standard softmax regression is a feasible
approach.
Other regression and classification methods, such as deep neural networks,
more complex decision trees, and even random forests may achieve better
scores on test data and reduced training time. However, they would return
predictors that are more complicated to optimize over the predictor than the
proposed piecewise linear models.
The proposed algorithm can be extended in several ways. For example,
$\ell_1$-penalties can be introduced in~\eqref{eq:cost_k-y} to promote sparsity
of $a,b$. The proof of Theorem~\ref{th:convergence} can be easily extended
to cover such a modification. Moreover, basis functions $\phi_i(x)$ can be used
instead of $x$ directly, such as canonical piecewise linear
functions~\citep{LU92,CD88,JDD00} to maintain the PWL nature of the
predictor, with possibly different basis functions chosen for partitioning the
feature space and for fitting targets.
The proposed algorithm is also extendable to other regression, classification,
and separation methods than linear ones, as long as we can associate a suitable
cost function $V^y$/$V^x$. As an example, neural networks with ReLU activation
functions might be used instead of ridge
regression for extended flexibility, for which we can define
$V_y(a^j,b^j,x_k,y_k)$ as the loss computed on the training data of cluster
\#$j$.
Ongoing research is devoted to alternative methods to obtain the initial
assignment of datapoints to clusters, as this is a crucial step that affects
the quality of the minimum PARC converges to, and to applying the proposed
method to data-driven model predictive control of hybrid dynamical systems.
\include{datasets_regression_training}
\include{datasets_regression_test}
\include{datasets_regression_CPUTIME}
\include{datasets_classification_training}
\include{datasets_classification_test}
\include{datasets_classification_CPUTIME}
|
\section{Introduction}
\label{sec:intro}
Long-wavelength (infrared and longer) transient sources have been predicted to be a powerful source of information on a wide class of high-energy astrophysical objects, including gamma-ray burst afterglows, the jet launch area of active galactic nuclei (AGN), tidal-disruption events, stellar flares, and more \citep[e.g.][]{metzger15}.
Ongoing efforts to deploy dedicated transient surveys at longer-than-optical wavelengths have already yielded detections of galactic and extragalactic transients in the near infrared \citep{de20} and at radio frequencies \citep{mooley16,law18,lacy20}.
The transient millimeter-wavelength (mm-wave) sky is currently largely unexplored except in follow-up observations of sources detected first at other wavelengths \citep{metzger15}.
Telescopes designed for observations of the cosmic microwave background (CMB) are optimized for wide-field surveys, operate at millimeter wavelengths, and have a typical observing strategy in which a patch of sky up to thousands of square degrees is re-observed regularly, making them powerful instruments for transient surveys \citep{holder19}.
\citet{whitehorn2016} performed the first transient survey with a CMB experiment using SPTpol, the second-generation camera on the South Pole Telescope (SPT),
and found one transient candidate with no apparent counterpart.
Recently, the Atacama Cosmology Telescope (ACT) serendipitously discovered three flares associated with stars \citep{naess2021} similar to those previously observed by \cite{brown&brown06,beasley&bastian98,massi06,salter10,bower03}.
In this paper we report the first results from a transient-detection program using SPT-3G, the third-generation camera on the SPT, during the austral winter of 2020.
This analysis improves on the sensitivity of the earlier SPTpol study through substantial improvements in observing cadence, survey area, wavelength coverage, and point-source sensitivity.
In this study, we found 15 unique transient events: 13 short-duration events associated with an eclectic mix of 8 nearby stars (with 3 stars having multiple events) and 2 longer-duration events of likely extragalactic origin. The transient events associated with stars have very large ($>100\times$) increases in mm-wave luminosity over the source's quiescent state, with peak flux densities exceeding \SI{1}{Jy} in some cases, placing them among the brightest mm-wave objects in the SPT-3G footprint when they are flaring.
\section{The SPT Instrument and Survey}
\label{sec:survey}
The SPT is a 10-meter telescope located at Amundsen-Scott South Pole Station, Antarctica, and is optimized to survey the CMB at mm wavelengths \citep{carlstrom11}.
The SPT-3G camera consists of \num{\sim 16000} multichroic, polarization-sensitive bolometric detectors which operate in three bands across the atmospheric transmission windows at \SIlist{95;150;220}{GHz}, with angular resolution of $\sim$1 arcminute.
The SPT-3G survey covers a \SI{1500}{\deg^2} footprint spanning \SIrange{-42}{-70}{\degree} in declination (Dec) and \SIrange{-50}{50}{\degree} in right ascension (RA), and has been observed in the current configuration since 2018 \citep{dutcher18}.
We observe this footprint on a cadence set by the 16-hour observing day (limited by the cryogenic refrigeration cycle).
Due to detector responsivity and linearity constraints from atmospheric loading, the SPT-3G footprint is broken up into 4 subfields centered at declinations of $-\ang{44.75}, -\ang{52.25}, -\ang{59.75}$, and $-\ang{67.25}$.
Each subfield is observed by rastering the telescope in scans at constant elevation, taking an \ang{;11.25;} step in elevation and repeating until the full elevation range of the subfield has been observed.
This process takes approximately {2} {hours}.
During an observing day, two subfields are observed three times each, with the remaining time in the observing day used for calibration observations and detector re-tuning.
As a result, the re-observation cadence of a given point in the field ranges from {2} {hours} to {20} {hours}.
Our cadence is chosen to reach a uniform survey depth between each of the subfields over the course of an observing season. While the cadence is not optimally designed for transient searches, it still allows us to have rapid (${\sim} 2$-hour) near-daily observations over a 36-week observing season and to effectively probe flaring sources at a variety of timescales. For more detailed information on the SPT-3G experiment, see \cite{bender18}.
\section{Methods}
\label{sec:methods}
\subsection{Transient Detection}
\label{sec:detection}
To detect transient sources, we construct maps of each subfield observation using a pipeline similar to the one used for analysis of the CMB power spectrum \citep{dutcher21}.
This pipeline applies a number of filtering steps to reduce low-frequency noise (primarily from atmospheric emission) in the detectors' time-ordered data (TOD), then weights and bins the TOD into an intensity map of the field.
After the map binning step, we make difference maps by subtracting a year-long average map of the survey field, constructed using 2019 SPT-3G data.
This effectively removes all static backgrounds including, but not limited to, the CMB, galaxy clusters, and non-time-varying point sources.
Many of the AGN in the footprint are variable. To prevent detections of variability in bright AGN, we mask all point sources that had an average flux above \SI{5}{mJy} in 2019 SPT-3G data, using a mask radius of up to \ang{;5;}, depending on brightness.
We apply an additional noise filter using a weighted convolution in map space. The filter uses an annulus with an outer radius of \ang{;5;} and an inner radius of \ang{;2;}, and acts as a high-pass filter to remove noise on scales larger than \ang{;5;} without subtracting signal power contained within \ang{;2;} of each map location.
Finally, we apply another real-space convolution filter using a beam template to maximize sensitivity to point sources.
The beam template is constructed from measurements of in-field bright point sources and dedicated Saturn observations in a manner similar to \citet{dutcher21}.
For a given location (map pixel) on the sky, we consider its multi-band flux density as a function of time $\phi^b_t$ ($b \in \{ \SI{95}{GHz}, \SI{150}{GHz} \}$). We then use a multi-band extension of the maximum-likelihood transient finding method used in our previous study \citep{whitehorn2016} and derived from that used in \cite{braun10}. The \SI{220}{GHz} maps have median noise levels that are on average five times higher than the other bands, and for reasonable flare spectra make negligible contributions to the total sensitivity. To save on processing time they are excluded from the likelihood, which is especially important for any live search for which local computing resources at the South Pole are limited. We inspect the \SI{220}{GHz} data for a given flare post-detection only.
The multi-band likelihood takes the form
\begin{equation}
-2\,\mathrm{ln}\mathcal{L}(f) = \sum_t \sum_b \left[ \frac{\phi_t^b - f_t^b}{\sigma_t^b} \right ]^2,
\label{eq:llh}
\end{equation}
where $f$ is the time-domain flare model and $\sigma^b_t$ is the map noise estimate for the given band, pixel, and time. We use a Gaussian ansatz for the flare model $f$ with independent amplitudes for each band \citep{whitehorn2016} to provide a smoothly optimizable function for the detection---but not parameter estimation---of flaring sources:
\begin{equation}
f^b_t \equiv f(t; S_b, t_0, w) = S_b \exp \left[-\frac{(t-t_0)^2}{2w^2}\right],
\label{eq:llhgauss}
\end{equation}
where $S_b$ is a flux density (in mJy) for each band $b$, $t_0$ is the event time and $w$ the flare width. The test statistic that is used to infer significance is the ratio of the likelihood function at the extremal (best-fit) parameter values to the null hypothesis likelihood at zero amplitude, with an additional term to account for the statistical preference
for short duration events:
\begin{equation}
\mathrm{TS} \equiv 2\,\mathrm{ln}\mathcal{L}(f) - 2\,\mathrm{ln}\mathcal{L}(0) + 2\,\mathrm{ln}\Bigl(\frac{w}{\Delta T}\Bigr )
\label{eq:teststat}
\end{equation}
where $\Delta T$ is the total duration of the data set and $\mathcal{L}(0)$ is the likelihood at zero amplitude for both bands, which does not depend on either $t_0$ or $w$. The third term (the width penalty) is necessary because, as the flare width $w$ gets smaller, there are many more uncorrelated starting times $t_0$, leading to a maximization bias in the likelihood for short flare widths.
To remove the bias, we apply a likelihood penalty term $P(w) \sim \mathrm{ln}(w)$ which is approximately equivalent to marginalizing over a uniform prior in $w$ \citep{braun10}.
We maximize Equation \eqref{eq:teststat} to find the best-fit parameters $(\hat{S}_b,\hat{t}_0,\hat{w})$ for a candidate event.
Following Wilks' theorem, the TS value is approximately $\chi^2$-distributed, with a number of degrees of freedom obtained by fitting to the distribution of negative fluctuations in the maps, which are signal-free and match the distribution of positive fluctuations in the noise-dominated low-TS region.
We then place a cut on TS and report here all events with $\mathrm{TS} > 100$, corresponding to a $9.7 \sigma$ detection (see Section \ref{sec:backgrounds} for more discussion).
Using computing resources at the South Pole, \ang{;0.25;}-resolution maps are automatically created and filtered following every two-hour subfield observation.
We then construct lightcurves stretching back \SI{14}{days} for each pixel in the subfield. Due to the observing cadence outlined in Section~\ref{sec:survey}, lightcurves tend to have 2-3 clustered data points followed by a gap in time, giving rise to the characteristic time coverage seen in Figure~\ref{fig:allflares}.
We run the flare fitting algorithm on each lightcurve and flag significant events for further analysis.
This analysis pipeline allows for flare detection within no more than twelve hours from the flare time, giving us the ability to send out online alerts to recommend follow-up in other bands.
The majority of sources described in this article were observed before this online detection system was activated, but were analyzed using the same pipeline after the fact.
When a transient event is detected, we generate polarized flux density lightcurves in order to determine the peak event amplitude, spectral index, and polarization fraction.
To estimate the spectral index $\alpha$, we fit a frequency-dependent flux model $\phi^b = \phi^{\SI{150}{GHz}} (\frac{b}{\SI{150}{GHz}})^\alpha$ to the three bands using a $\chi^2$ metric.
We marginalize over the \SI{150}{GHz} flux density by using the best-fit $\phi^{\SI{150}{GHz}}$ for each $\alpha$, and estimate $1\sigma$ confidence intervals using a $\Delta \chi^2 = 1$ criterion.
Polarization fractions are estimated from the Stokes-$Q$ and Stokes-$U$ lightcurves using the maximum-likelihood approach of \citet{vaillancourt06} to reduce noise bias on the polarized flux density $P = \sqrt{Q^2 + U^2}$.
\subsection{Backgrounds}
\label{sec:backgrounds}
The sources presented in this paper belong to a small category of emitters that show highly significant events ($\mathrm{TS} > 100$, corresponding to $>9.7 \sigma$) and are, with two exceptions, detected in multiple observations, ruling out an origin in an instrumental glitch, satellite pass, or other noise source.
At this level of significance, the expected rate of events from Gaussian fluctuations sourced by instrumental and atmospheric noise is below 1 event per million years of observing.
False detections may also be caused by non-astrophysical in-band emitters; these are expected to be the dominant noise source at short timescales.
The only such contamination we unambiguously detected at this high significance level was thermal emission from weather balloons launched from the South Pole station by the Antarctic Meteorological Research Center (AMRC)\footnote{\url{https://amrc.ssec.wisc.edu}} and the National Oceanic and Atmospheric Administration (NOAA).\footnote{\url{https://www.esrl.noaa.gov/gmd/ozwv/ozsondes/spo.html}} A small fraction of these balloons drifted through the telescope's field of view shortly after launch.
Based on the typical launch cadence and our observing strategy we expect to detect $\mathcal{O}(10)$ such balloons over the course of an observing season.
Weather balloons can show up in maps at brightnesses exceeding \SI{1}{Jy}.
Typically, their proximity and fast movement creates recognizable extended structure over scales of many arcminutes.
Rather than implement a cut on this signal within an observation, we placed a requirement as part of our detection pipeline that sources appear at a signal-to-noise ratio $> 3$ and a fixed location in more than one independent observation. This makes the search presented here insensitive to contamination by man-made sources which are not fixed in RA/Dec and rapidly move out of the field, at the cost of reducing sensitivity to rapid events.
Two of the 15 detected flares (source 7 and 8) were originally detected by other means, as part of debugging the analysis pipeline, and are included here despite being detected in only one observation.
In the case of these two sources, a number of other checks were performed (looking at sub-observation-scale data to ensure the source was stationary for a significant amount of time and cross-checking with balloon launch schedules) to ensure the astrophysical origin of the flare.
In the future, we expect to be able to automate both weather balloon detection and sub-observation timescale analysis, and relax the multiple-observation requirement across the board.
\section{Results}
\label{sec:results}
\begin{figure*}
\plotone{fig_allflares_cutouts.pdf}
\caption{
Lightcurves of the 13 stellar flares observed in this study at \SI{95}{GHz} (\textit{red}), \SI{150}{GHz} (\textit{blue}), and \SI{220}{GHz} (\textit{gold}).
Two of the flares for Z~Ind were close in time and are shown together in one panel.
In all cases, the rise and fall times are short (hours or less) and the spectra approximately flat.}
\label{fig:allflares}
\end{figure*}
\begin{table*}
\sisetup{table-align-uncertainty, minimum-integer-digits = 2}
\centering
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} cclSSSr}
\toprule
\multicolumn{4}{c}{} & \multicolumn{3}{c}{Peak Flux Density (mJy)} & \multicolumn{1}{c}{}\\
\cmidrule{5-7}
ID & RA & Dec & Time (UTC)
& \SI{95}{GHz}& \SI{150}{GHz} & \SI{220}{GHz}
& {$\mathrm{TS}$} \\
\midrule
1 & \ra{23;20;47.6} & \ang{-67;23;23} & 2020-03-26 02:25
& 81 \pm 4 & 83\pm5 & 93\pm19
& 709 \\ \addlinespace
2 & \ra{23;13;53.1} & \ang{-68;17;34} & 2020-04-01 18:12
& 46\pm4 & 40\pm5 & 61\pm20
& 213 \\ \addlinespace
3 & \ra{21;01;21.2} & \ang{-49;33;15} & 2020-04-02 14:50
& 70\pm6 & 91\pm9 & 103\pm36
& 541 \\ \addlinespace
4 (a) & \ra{21;20;44.5} & \ang{-54;37;56} & 2020-06-03 02:35
& 61\pm6 & 108\pm17 & 230\pm69
& \\ \addlinespace[-2pt]
\hfill (b) & & & 2020-09-04 09:15
& 80\pm6 & 80\pm6 & 44\pm25
& 134\\ \addlinespace
5 (a) & \ra{21;54;23.8} & \ang{-49;56;36} & 2020-06-17 09:20
& 370 \pm 6 & 408 \pm 7 & 501 \pm 28
& \\ \addlinespace[-2pt]
\hfill (b) & & & 2020-06-24 06:09
& 459\pm6 & 543\pm8 & 558\pm30
& \num{16416} \\ \addlinespace
6 (a) & \ra{02;34;22.4} & \ang{-43;47;53} & 2020-06-21 10:42
& 29 \pm 6 & 21 \pm 7 & 54 \pm 30
& \\ \addlinespace[-2pt]
\hfill (b) & & & 2020-07-10 08:24
& 48 \pm 6 & 62 \pm 7 & 68 \pm 27
& \\ \addlinespace[-2pt]
\hfill (c) & & & 2020-09-17 04:51
& 111\pm6 & 243\pm8 & 352\pm32
& \\ \addlinespace[-2pt]
\hfill (d) & & & 2020-11-05 15:34
& 189\pm6 & 310\pm8 & 422\pm33
& 2715 \\ \addlinespace
7 & \ra{02;55;31.6} & \ang{-57;02;54} & 2020-09-18 06:34
& 109\pm5 & 154\pm7 & 157\pm25
& 1119 \\ \addlinespace
8 & \ra{00;21;28.7} & \ang{-63;51;10} & 2020-11-14 01:47
& 104\pm5 & 167\pm7 & 221\pm25
& 1184 \\ \addlinespace
\midrule
9 & \ra{22;41;16.7} & \ang{-54;01;07} & 2020-07-08
& 13 \pm 2 & 13 \pm 2 &14 \pm 7
& 221 \\ \addlinespace
10 & \ra{03;01;16.1} & \ang{-57;19;21} & 2020-07-08
& 24\pm2 & 36\pm3 & 40\pm10
& 1090 \\
\bottomrule
\end{tabular*}
\caption{
\sisetup{minimum-integer-digits = 1}
Transient events detected by SPT-3G between March 23, 2020 and November 15, 2020.
Each unique source was given a numbered ID, and each flare was labeled by a letter in the case of multiple flares.
Source RA and Dec are the best-fit locations measured by SPT-3G.
The horizontal line differentiates the stellar flares (above) from the long-duration, likely extragalactic transients (below).
All sources listed have average flux densities below \SI{5}{mJy} at \SI{150}{GHz} in 2019 SPT-3G data.
Peak flux densities are averaged over subfield observations and quoted relative to the 2019 average.
Peak flare times correspond to the beginning of the subfield observation in the case of stellar flares, and to the center of a week-long integration in the case of the long-duration transients.
The test statistic ($\mathrm{TS}$) value is computed on the full 2020 lightcurve for each source and is shown only for the flare that maximizes the $\mathrm{TS}$ (generally the brightest one); the cut value used in this search is $TS > 100$.
Several stars showed other flares that had a signal-to-noise $>5$ in at least one observing band and are also shown in this table.
}
\label{tab:events}
\end{table*}
During 3500 hours of observations taken over an 8-month period from 23~March to 15~November, 2020, we observed 10 unique sources with at least one $\mathrm{TS} > 100$ event at locations not associated with point sources previously detected by any SPT survey. This was enforced for SPT-3G by masking point sources with an average \SI{150}{GHz} flux density greater than \SI{5}{mJy} in 2019.
After detecting a source with at least one flare above the $\mathrm{TS}$ threshold, we inspect the lightcurve and tag other flares with signal-to-noise $>5$ in at least one of the observing bands, bringing the total up to the 15 events shown in Table~\ref{tab:events}. The detected flares have emission timescales ranging from tens of minutes to three weeks, with peak brightnesses (averaged over the $\sim$20 minutes of on-source time during the subfield observation) at \SI{150}{GHz} from \SIrange{15}{540}{mJy}, nearing the brightest mm-wave sources in the SPT-3G footprint.
Given the upper limit on quiescent flux density in 2019 SPT-3G data of \SI{<5}{mJy} for these objects, this represents factors of at least \numrange{4}{100} increase in luminosity above the sources' quiescent states.
The detected objects are split into two classes.
The majority (13 flares from 8 objects) are associated with stars of a wide variety of types (Section~\ref{sec:stars}) and reminiscent of a small number of reports in the literature by e.g. \cite{naess2021,massi06,brown&brown06} of serendipitously detected mm-wave stellar flares.
Stellar flare associations in WISE with SPT-3G flux density contours are shown in Figure~\ref{fig:wise_panel_stars}.
The fast timescale of emission (from tens of minutes to hours) and approximately flat spectra are suggestive of synchrotron emission, but the lack of detectable linear polarization and sometimes-rising spectra (Table~\ref{tab:specind_polfrac}) imply the emission region is likely inhomogeneous or optically thick for at least part of the observing period.
The remaining two events are not spatially coincident with any cataloged galactic sources, suggesting an extragalactic origin.
These two sources (Section~\ref{sec:extragalactic}) had triangular light curves lasting \SIrange{2}{3}{weeks}, with flat spectra and peak flux densities between \SIrange{15}{40}{mJy}.
Due to the high instantaneous signal-to-noise on the short-duration flares, the typical positional uncertainties for these events are $\lesssim$\SI{10}{arcsec}, leading to unambiguous associations with known variable stars. Position determination for the two long-duration sources is discussed in more detail in Section~\ref{sec:extragalactic}.
\begin{figure}
\includegraphics[clip, trim = 0 -0.6cm 0 -0.6cm, width=\linewidth]{fig_wise_panel_stars.pdf}
\caption{Grayscale images of associated stars from unWISE \SI{3.4}{\mu m} W1 \citep{Lang_2014} in log stretch. Blue contours show the SPT-3G \SI{150}{GHz} flux density contours in steps of 5$\sigma$ from the peak signal. The extended cross-like features are diffraction spikes. }
\label{fig:wise_panel_stars}
\vspace*{2cm}
\end{figure}
\begin{table}
\centering
\begin{tabular*}{\columnwidth}{l @{\extracolsep{\fill}} S[table-format=1.2(3)]SS}
\toprule
\multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{2}{c}{Pol. Frac. (95\% UL)} \\
\cmidrule{3-4}
ID & {Spectral Index} & \SI{95}{GHz} & \SI{150}{GHz} \\
\midrule
1 & 0.10 \pm 0.16 & < 0.24 & <0.20 \\ \addlinespace
2 & -0.1 \pm 0.3 & < 0.44 & <0.37 \\ \addlinespace
3 & 0.6 \pm 0.2 & < 0.33 & <0.30 \\ \addlinespace
4 (a) & 1.0\pm 0.4 & < 0.34 & <0.55 \\ \addlinespace[-2pt]
\hfill (b) & -0.2 \pm 0.2 & < 0.33 & <0.25 \\ \addlinespace
5 (a) & 0.25 \pm 0.05 & < 0.06 & <0.06 \\ \addlinespace[-2pt]
\hfill (b) & 0.30 \pm 0.04 & < 0.04 & <0.06 \\ \addlinespace
6 (a) & -0.4 \pm 0.9 & < 0.79 & <1 \\ \addlinespace[-2pt]
\hfill (b) & 0.6 \pm 0.3 & < 0.47 & <0.33 \\ \addlinespace[-2pt]
\hfill (c) & 1.52 \pm 0.10 & < 0.16 & <0.11 \\ \addlinespace[-2pt]
\hfill (d) & 1.04 \pm 0.07 & < 0.12 & <0.09 \\ \addlinespace
7 & 0.71 \pm 0.11 & < 0.16 & <0.14 \\ \addlinespace
8 & 1.07 \pm 0.10 & < 0.31 & <0.14 \\ \addlinespace
\midrule
9 & {Figure~\ref{fig:ldt_specinds}} & <0.46 & <0.59 \\ \addlinespace
10 & {Figure~\ref{fig:ldt_specinds}} & <0.31 & <0.27 \\
\bottomrule
\end{tabular*}
\caption{
Spectral indices and \SI{95}{\percent} upper-limit polarization fractions for the transient events listed in Table~\ref{tab:events}.
No sources had statistically significant detections of polarization.
Polarization fractions shown are calculated only at flare peaks.
\SI{220}{GHz} polarization fractions are omitted from this table due to low signal-to-noise.
}
\label{tab:specind_polfrac}
\end{table}
\begin{figure}
\centering
\includegraphics[clip, trim = 0 3mm 0 2mm, width=\linewidth]{gaia_spt_hr.pdf}
\caption{Color-magnitude diagram for Gaia stars brighter than apparent magnitude $G=15$ in the SPT-3G footprint.
\textit{Red} symbols show the stars associated with stellar flares detected in CMB surveys; UCAC4 114-133248 (associated with Flare 1) is a double star with both stars measured by Gaia.
\textit{Blue} circles show the previously reported mm-wave stellar flares referenced in Section~\ref{sec:results} that have Gaia counterparts.
\label{fig:hr}}
\end{figure}
A large fraction of the flares were in locations covered by the All-Sky Automated Survey for SuperNovae \citep[ASAS-SN,][]{shappee14,kochanek17}, which provides optical lightcurves with a daily or near-daily cadence.
For two of the stellar flares, we found evidence for optical activity in the ASAS-SN data. Additionally, one of those two was under observation by the Transiting Exoplanet Survey Satellite \citep[TESS,][]{ricker15} at the time of the flare, providing simultaneous mm-wave and optical coverage of an energetic stellar flare with high time resolution.
The remaining flares were not associated with optical excesses, and none of the events reported here were coincident with reports to alert systems (GCN\footnote{\url{https://gcn.gsfc.nasa.gov/}} or ATel\footnote{\url{http://www.astronomerstelegram.org}}).
\subsection{Stellar flares}
\label{sec:stars}
The observed flares arise in a wide variety of stars.
The Hertzsprung-Russell (HR) diagram for these stars is shown in Figure~\ref{fig:hr}, using data from the {\em Gaia} mission \citep{gaia_16, gaiadr2_18}.
Most of the associated stars are known to be X-ray emitters, with counterparts in the ROSAT All-Sky Survey 2RXS catalog \citep{2rxs2016}.
Only the two M dwarfs, UCAC3~53-724 and WISE~J025531.87-570252.3, are not known X-ray emitters.
By selecting on mm-wave flaring in stars, we appear to be highly biased toward stars that are X-ray sources.
Coronal activity is related to both flaring and X-ray emission so the correspondence is not unexpected.
We randomly selected stars in the SPT-3G footprint with {\em Gaia} apparent magnitude G$<$15 and found that less than $1\%$ had a 2RXS source within \ang{;1;}.
We also found that the probability of a random point being within \ang{;;15} (the furthest SPT-3G flare position association is \ang{;;13}) of a {\em Gaia} source of G$<$15 within the SPT-3G \SI{1500}{\deg^2} footprint is $2\times10^{-3}$, lending further confidence to the associations.
\begin{table*}
\centering
\sisetup{table-format=1.1e2, table-align-exponent=true}
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} lS[table-format=3.3(3)] SSSr}
\toprule
ID & Association & {Distance (pc)} & {$\nu L_\nu^{95}$(\si{\erg \per \s})} & {$\nu L_\nu^{150}$(\si{\erg \per \s})} & {$\nu L_\nu^{220}$(\si{\erg \per \s})} & Type \\
\midrule
1 & UCAC4 114-133248 & 41.0 \pm 0.1
& 1.6e28 & 2.5e28 & 4.1e28
& Double M Dwarfs$^*$ \\ \addlinespace
2 & BI Ind & 312 \pm 3
& 5.1e29 & 7.0e29 & 1.6e30
& RS CVn$^*$ \\ \addlinespace
3 & CX Ind & 235 \pm 3
& 4.4e29 & 9.0e29 & 1.5e30
& BY Dra Variable$^*$ \\ \addlinespace
4 (a) & CD-55 8799 & 201 \pm 2
& 2.8e29 & 7.9e29 & 2.5e30
& Rotational Variable$^*$ \\ \addlinespace[-2pt]
\hfill (b) & &
& 3.7e29 & 5.8e29 & 4.7e29
& ~ \\ \addlinespace
5 (a) & Z Ind & 199 \pm 1
& 1.7e30 & 2.9e30 & 5.2e30
& Rotational Variable$^*$ \\ \addlinespace[-2pt]
\hfill (b) & &
& 2.1e30 & 3.9e30 & 5.8e30
& ~ \\ \addlinespace
6 (a) & CC Eri & 11.537\pm 0.005
& 4.4e26 & 5.0e26 & 1.9e27
& BY Dra Variable$^*$\\ \addlinespace[-2pt]
\hfill (b) & &
& 7.3e26 & 1.5e27 & 2.4e27
& \\ \addlinespace[-2pt]
\hfill (c) & &
& 1.7e27 & 5.8e27 & 1.2e28
& \\ \addlinespace[-2pt]
\hfill (d) & &
& 2.9e27 & 7.4e27 & 1.5e28
& \\ \addlinespace
7 & WISE J025531.87-570252.3 & 45.6 \pm 0.1
& 2.6e28 & 5.8e28 & 8.6e28
& M Dwarf \\ \addlinespace
8 & UCAC3 53-724 & 43.9 \pm 0.2
& 2.3e28 & 5.8e28 & 1.1e29
& M Dwarf \\
\bottomrule
\end{tabular*}
\caption{Assumed associations of stellar flares and physical properties of events: parallax-based distance, isotropic mm-wave luminosity $\nu L_\nu$, and type of star.
All sources with types showing an asterisk have 2RXS X-ray sources within \ang{;1;}. Distances were pulled from the Gaia DR2 \citep{gaiadr2_18}.}
\label{table:properties}
\end{table*}
\begin{figure*}
\centering
\includegraphics[width=\linewidth]{fig_Lnu_comparison.pdf}
\caption{
Luminosities per unit frequency $L_\nu$ of SPT stellar flares (\textit{blue}) and mm-wave stellar flares from the literature (\textit{remaining colors}) as a function of observing frequency.
Events are organized by instrument. SPT flares: from this work. ACT flares: \citet{naess2021}. ALMA: \citet{macgregor18,macgregor20,macgregor21}. PDBI: \citet{massi06}. Effelsberg: \citet{umemoto09}. BIMA: \citet{bower03}. OVMA: \citet{brown&brown06}. VLA: \citet{beasley&bastian98}. SCUBA-2: \citet{mairs19}.
\label{fig:Lnu}}
\end{figure*}
The isotropic mm-wave luminosities $\nu L_\nu$ of the flaring events are shown in Table~\ref{table:properties} and range from roughly \SIrange{2e27}{6e30}{\erg \per \s} in the SPT-3G bands.
At the bright end, this is comparable to previous mm-wave flares seen in RS CVn stars \citep{brown&brown06,beasley&bastian98} or T Tauri stars \citep{massi06,salter10,bower03}, although not as luminous as the sub-mm flare event in JW 566 \citep{mairs19}.
The faint flares are brighter than those previously seen at similar wavelengths in M dwarfs \citep{macgregor20}.
jhe isotropic luminosities per unit frequency $L_\nu$ of SPT stellar flares and selected mm-wave flares from the literature are compared in Figure~\ref{fig:Lnu}.
While the stars have a wide range in properties, there are some themes that emerge.
BI Ind (Source 2) is known to be of the type RS CVn and it has been suggested that both CX Ind (Source 3) and CD-55 8799 (Source 4) are RS CVn stars \citep{berdnikov2008}; this classification would be consistent with the similar energetics observed in the flares.
BI Ind and the two historical RS CVn flare stars mentioned above are all in the giant branch of the HR diagram; however the possible RS CVn stars CX Ind and CD-55 8799 are redder and lower-luminosity than the typical giant.
The flare energy for BI Ind is comparable to the two historical flare stars.
Two stars associated with mm-wave flares detected by ACT are also in that part of the HR diagram, with similar flare energy, although these stars have not previously been identified as RS CVn.
Two sources (CX Ind, Source 3 and CC Eri, Source 6) are classified as BY Draconis-type variables in the SIMBAD\footnote{\url{http://simbad.u-strasbg.fr/simbad}} database, as is the previously known flare star AU Mic, which lies very close in the HR diagram to CC Eri.
Two other sources are classified as ``Rotationally Variable,'' but are almost indistinguishable in the HR diagram from CX Ind.
In terms of flare energy, CC Eri has substantially lower energy flux than the RS CVn stars, although more than ten times the flux of AU Mic, while CX Ind is energetically comparable to BI Ind.
The remaining three stellar flares (Sources 1, 7, and 8) detected in this work are late M dwarfs, with one of them (UCAC4 114-133248, Source 1) actually a pair of M dwarfs.
The flare energy flux is comparable in these three cases (few $\times$ \SI[parse-numbers=false]{10^{28}}{\erg \per \second}), but in all cases at least a thousand times more luminous than the well-known Proxima Centauri mm-wave flare seen by \citet{macgregor18}.
\begin{figure}
\includegraphics[width=\linewidth]{fig_zind_a_single_scan_lc.pdf}
\includegraphics[width=\linewidth]{fig_cceri_d_single_scan_lc.pdf}
\caption{Light curves for flare 5(a), associated with Z Ind, (top) and flare 6(d), associated with CC Eri, (bottom) showing flux densities derived from individual rasters over the source in 3 consecutive observations.
The x-axis has been cut between observations, and shows the time in minutes since the flare peak at \SI{150}{GHz}, corresponding to MJD 59017.4011 for 5(a) and MJD 59158.6748 for 6(d).
\label{fig:singlescan_lightcurves}}
\end{figure}
As described in Section~\ref{sec:survey}, the SPT-3G raster scan observing strategy allows a limited ability to observe timescales shorter than {2} {hours} by examining the individual detector scans over a source position within an observation.
There are typically 10 raster scans covering any given point in the subfield, which occur over $\sim$20 minutes of the 2-hour observation window.
Depending on the right ascension of the source, these rasters are spaced a maximum of {3} {minutes} apart.
A preliminary examination of these data for flare 5(a), associated with Z~Ind, and flare 6(d), associated with CC~Eri, shows a true peak brightness exceeding \SI{1}{Jy} at \SI{150}{GHz}, with emission falling rapidly on 10-minute scales (see Figure~\ref{fig:singlescan_lightcurves}).
Due to the sub-observation timescales of some of these flares, the measured per-observation peak flux density, as reported in Table~\ref{tab:events}, is below the true peak amplitude.
Future analyses may be able to trigger on such sub-observation data and provide a more detailed view of the sky at these minute scales than we present in this publication.
\begin{figure*}
\includegraphics[width=.5\linewidth]{WISE_SPT_TESS_ASASSN_lightcurve_fig.pdf}
\includegraphics[width=.5\linewidth]{UCAC3_SPT_ASASSN_lightcurve_fig.pdf}
\caption{Lightcurves for SPT-3G detected flares associated with WISE J025531.87-570252.3 (flare 7, left), and UCAC3 53-724 (flare 8, right). SPT-3G \SI{95}{GHz} (\textit{blue circles}) and \SI{150}{GHz} (\textit{red triangles}) data is plotted alongside ASAS-SN V-band data (\textit{black squares}) and, in the case of the WISE J025531.87-570252.3 associated flare, TESS V-band data (\textit{light blue circles}). In all cases, the flux density is mean-subtracted and plotted such that the maximum within \SI{\pm 2}{weeks} of the SPT-3G flare peak is normalized to 1. The x-axis shows time in days since the recorded flare peak at \SI{150}{GHz} (MJD 59110.2854 for flare 7, MJD 59167.0840 for flare 8), and the inset plot shows a zoomed-in region around the flare with single-scan SPT-3G flux density overplotted with the optical data.
\label{fig:opticalcounterpartslc}}
\end{figure*}
We searched the ASAS-SN variable stars database for optical flux data near the peak times of the stellar flares. Six of the eight stars had some simultaneous ASAS-SN coverage. Of these, two show strong evidence for optical activity related to the millimeter-wave flares detected by SPT-3G: WISE J025531.87-5702523 (Source 7) and UCAC3 53-724 (Source 8), both M Dwarfs. Source 8 has a single ASAS-SN observation consisting of three successive 15-second exposures in V-band, showing a $5 \sigma$ increase in flux roughly 4 hours after the observed SPT-3G peak. There are large gaps in both the SPT-3G and ASAS-SN data, and no obvious conclusions can be drawn about the relation between the two detections. Source 7 has one ASAS-SN data point significantly above mean nearly 15 hours after the SPT-3G flare. Serendipitously, TESS had near-continuous coverage of Source 7 in the \SIrange{600}{1000}{nm} band for the entire duration of the SPT-3G observation, providing high-time-resolution data that shows a bright optical flare beginning some minutes before the first SPT-3G detection and decaying slowly over the next several hours \citep{brasseur19}. We show lightcurves for both of the flares with significant optical counterparts in Figure~\ref{fig:opticalcounterpartslc}. The data from different instruments are rescaled to allow comparison of the time behavior of both sources without making any inference about relative or absolute luminosities. As seen in the TESS data, the optical counterpart to the millimeter-wave flare of Source 7 starts rising an hour before the beginning of SPT-3G coverage. Starting at the first SPT-3G data point, both optical and mm rise rapidly until peaking 10 minutes later. The mm-wave lightcurve quickly falls back to half the observed peak flux before losing coverage, while the optical slowly decays and does not fall back to quiescence until some 24 hours after the peak.
\subsection{Extragalactic transients}
\label{sec:extragalactic}
The two remaining sources are not obviously associated with any galactic source but, at low confidence, may be associated with WISE galaxies.
For these two longer-duration sources, the Fermi All-sky Variability Analysis \citep{abdollahi17} shows no significant associated gamma ray flare within several degrees of either source. In addition, no significant optical activity was seen in ASAS-SN for either source.
Source positions are determined from the peak of the likelihood surface ($\mathrm{TS}$ surface) created by applying the transient-finding algorithm to every pixel in a \ang{;3;}$\times$\ang{;3;} box around the source. Statistical positional uncertainties are expected to scale as the ratio of the beam width to signal-to-noise, and are estimated from the width of the $\mathrm{TS}$ surface using $\Delta \mathrm{TS}=2.3$ for a $\chi^2$ distribution with $2$ degrees of freedom.
To the extent that the flaring lightcurves approximate the Gaussian ansatz for the flare model, the $\mathrm{TS}$ map represents the optimally weighted combination of the different observing bands and periods in order to maximize localization precision.
When we apply this method to the stars, where the association is unambiguous, there is an additional variance in position that is consistent with residual pointing uncertainty of \ang{;;4.4} in addition to the statistical uncertainties in localization.
We add this additional uncertainty in quadrature to estimate the position uncertainties, finding sources 9 and 10 to have position uncertainties of \ang{;;7.6} and \ang{;;5.2}, respectively, as shown in Figure~\ref{fig:wise_panel_ldts}.
Source 9 (SPT-SV J224116.7-540107) is \ang{;;38} from a weak ROSAT X-ray emitter 2RXS J224112.8-540103, which has a positional uncertainty of \ang{;;\sim 21} \citep{2rxs2016}.
This X-ray source has been associated with WISEA J224115.38-540102.3 \citep{salvato2018}, a galaxy that is \ang{;;12} from the SPT-3G position.
There is another WISE galaxy that is closer, WISEA J224117.10-540105.2, at a separation of only \ang{;;4}, but 2 magnitudes fainter in WISE W1 (Band 1, \SI{3.4}{\mu m}).
The larger sky density of such faint galaxies greatly increases the probability of chance alignment, even at this much closer distance.
Using the local density of AllWISE sources \citep{cutri14} within a \ang{1} radius, the probability of a random AllWISE source being brighter and closer than either the dim or bright potential counterpart are \SI{6}{\percent} and \SI{8}{\percent}, respectively.
Thus, it is not possible to make a definitive association of source~9 with a cataloged object.
Further study will be required to determine the counterpart for this source, for example with ALMA follow-up or detailed SED modeling using multiwavelength data.
\begin{figure}
\includegraphics[clip, trim = 2.5cm 0.35cm 2.5cm 1.1cm, width=\linewidth]{fig_wise_panel_ldt.pdf}
\caption{
Localization of the long-duration events for sources 9 (left) and 10 (right) using grayscale images from unWISE \SI{3.4}{\mu m} W1 \citep{Lang_2014} in log stretch. The \textit{purple cross and contours} show the SPT-3G best-fit position and uncertainties in steps of $1\sigma$.
Positional uncertainties are derived from the test statistic map with an additional \ang{;;4.4} pointing uncertainty added in quadrature.
For source 9 we overplot the positions of galaxies WISEA J224117.10-540105.2 (\textit{red diamond}) and WISEA J224115.38-540102.3 (\textit{blue square}), as well as the ROSAT X-ray source 2RXS J224112.8-540103 (\textit{blue triangle}) which has a positional uncertainty of \ang{;;\sim 21} and has been associated with the latter WISE galaxy.
Source 10 is likely associated with the galaxy WISEA J030116.15-571917.7 (\textit{blue x}).
}
\label{fig:wise_panel_ldts}
\end{figure}
Source 10 (SPT-SV J030116.1-57192) is within \ang{;;3} of the galaxy WISEA J030116.15-571917.7, with the next-closest source being \ang{;;17} away and substantially fainter (1.4 magnitudes in W1), making this association more secure.
The localizations of source 9 and 10 are shown in Figure~\ref{fig:wise_panel_ldts}.
The physical mechanism of the transient emission is unknown.
It is possible that the events are flares from AGN, which often have flaring behavior on this timescale.
A post-detection analysis revealed an average \SI{150}{GHz} flux density in 2019 of \SI{4.1 \pm 0.6}{mJy} and \SI{2.5 \pm 0.6}{mJy} for source 9 and 10 respectively.
The luminosity increase of source 9 from the 2019 average to the peak of the detected flare---a factor of 4---is at the upper limit of what is observed in brighter (\SI{> 10}{mJy}) sources monitored by SPT-3G.
Source 10 increased by a factor of 15, which is much larger than what is typical for bright AGN observed by the SPT or by \cite{trippe2011} in this band (even at the 95\% CL lower limit, which is still a factor of 7.4 increase) and may represent an origin different from ordinary AGN flaring or the potential for greater variability in faint AGN at millimeter wavelengths.
There is no cataloged radio source associated with either position, so both would require AGN with flat or rising spectra at radio wavelengths.
Radio observations made with the 887~MHz Australian Square Kilometer Array Pathfinder (ASKAP) at points in time before and after the main mm flare of both sources (ASKAP observations on 28/29 March 2020 and 29/30 August 2020) do not show any evidence of either source at a depth of \SI{0.20}{mJy} \citep{hotan20}.
No overlapping ASKAP observations were made during the peak period of June--July 2020.
Follow-up observations of these galaxies with deep radio and mm-wave observations may be able to identify possible AGN activity in these sources and shed light on whether the events observed here are part of some continuing flaring behavior from these objects.
The timescales and energies (assuming these sources are at an unremarkable redshift $z \lesssim 1$) are also consistent with expectations for tidal disruption events or an object like AT2018cow \citep{ho19}, but there were no transient alerts from observations at other wavelengths issued that match these objects.
\begin{figure}
\includegraphics[width=\linewidth]{fig_ldt_both.pdf}
\caption{Lightcurves of the SPT-3G transient events SPT-SV J224116.7-540107 (source 9, top) and SPT-SV J030016.1-571921 (source 10, bottom).
\SI{95}{GHz} data are shown with \textit{red triangles}, \SI{150}{GHz} with \textit{blue circles}, and \SI{220}{GHz} with \textit{gold diamonds}.
Each data point is a weighted average of all 2-hour field observations taken in a 7 day window centered at that time (x-axis) coordinate.}
\label{fig:source9n10}
\end{figure}
It is perhaps notable that both long-duration transient events, though \ang{35} apart on the sky, rise and fall with similar looking lightcurves and peak in the same week of 2020 (see Figure~\ref{fig:source9n10}). Given the 36-week observing period this is not an unlikely coincidence.
Additionally, most possible sources of systematic contamination can be eliminated by the fact that the two sources sit in different subfields.
The center line of the SPT-3G footprint is at \ang{-56} declination, and the top and bottom half of the field use independent bolometer tunings, different HII calibration sources, and are observed on
different observing days. The individual maps that contain the brightest transient observations show no signs of miscalibration, excess noise or excess pointing jitter, and other in-field sources have fluxes consistent with previous and subsequent observations.
It is possible that some of the same physics is at play in these two sources to explain the similarity in flare shape and duration; further observations of similar events will provide more information.
\begin{figure}
\includegraphics[width=\linewidth]{fig_ldt_spectral_indices.pdf}
\caption{
Spectral index evolution of the two extragalactic transients.
For each observation we plot the best-fit spectral index $\alpha$ (defined such that $\phi^b \propto b^\alpha$) in \textit{black} and the profile of the \SI{150}{GHz} flux density $\phi^{150}$ in \textit{grey} with error bars as described in Section~\ref{sec:methods}.
}
\label{fig:ldt_specinds}
\end{figure}
The emission spectrum of Source 10 shows a rising spectrum before the peak of the emission and a flat spectrum thereafter (Figure~\ref{fig:ldt_specinds}), while the dimmer Source 9 has large spectral uncertainties.
This is consistent, though not uniquely so, with a self-absorbed synchrotron spectrum from a young cooling jet, with the initial brightening arising from falling self-absorption more than counteracting the cooling source and the peak of the spectrum moving through SPT-3G's observing bands at the peak emission time.
No linear polarization was detected from the two sources at either the flare peak (Table~\ref{tab:specind_polfrac}) or when integrating over the flare, the latter approach giving $2 \sigma$ polarization fraction upper limits of 0.14, 0.12, and 0.49 at \SIlist{95;150;220}{GHz} respectively for Source 10, and 0.22 and 0.32 at \SIlist{95;150}{GHz} for Source 9.
These limits are weak enough that polarization information does not provide strong constraints on the emission mechanism or local magnetic field coherence in the emission region.
\section{Discussion and Conclusions}
\label{sec:conclusions}
The detection of 15 bright millimeter-wavelength flares in this work, many far above threshold for SPT-3G, suggests that these kinds of flares are common, and that a large number of sources remain to be detected.
For example, a naive extrapolation of the rate of stellar flares seen in this paper---the rate of extragalactic transients is too small to draw a robust conclusion---would imply a rate of around a thousand flares of similar brightness per year over the whole sky.
Further, the stellar flares seen here are short enough in time (minutes to hours) that many are missed by SPT-3G as a result of our observing cadence and analysis choices for this search.
In addition to those missed because we are less sensitive to flares on timescales shorter than a few hours, our observing strategy has day-long gaps between re-observations of each subfield pair (Section~\ref{sec:survey}).
This reduces the observing efficiency for hour-scale sources to approximately \SI{23}{\percent} over our \SI{1500}{\deg^2} survey, which implies that the true rate of bright stellar flares of the type seen here is at least 4000 per year on the full sky.
The extragalactic transients seen here are more of a puzzle.
The emission seen from both sources has a spectrum that evolves from rising to flat or falling, consistent with a newly emitted jet, and both sources show a second, smaller flare days to weeks afterwards.
Both sources were convincingly detected (though at low flux density) in the 2019 average map, but it is unclear what emission mechanism(s) caused the extreme flares seen here.
One possibility is that these flares were the result of regular AGN activity, but such large ratios of outburst to mean luminosity ($\sim 4$ and $\sim 15$ for sources 9 and 10, respectively) are rare:
Typical SPT-3G AGN fluxes vary by much smaller factors of $\lesssim 50\%$, with excursions to above 3 observed only in extreme cases (seen in $< 1\%$ of SPT-3G sources), and no sources seen with luminosity ratios above 4 when comparing 2020 peak to 2019 average flux data.
That sample, however, consists of brighter AGN and might not be representative of the unexplored population of faint AGN.
Such large luminosity variations are not unprecedented, especially over long timescales.
The transient source ACT-T J061647-402140\footnote{\url{https://www.astronomerstelegram.org/?read=12738}}, a possible mm-wave counterpart to the transient gamma-ray blazar Fermi 0617-4026, increased in brightness by a similar factor of $\num{\sim13}$ between June 2016 and January 2018.
Comparing the ACT flux densities with the 2010-2011 flux densities of the spatially coincident source SPT-S J061647-402147\footnote{\url{https://www.astronomerstelegram.org/?read=12837}} indicates an increase in flux by a factor of 15-20 over ${\sim}7$ years.
The emission seen is also too long in duration to be a GRB afterglow, which typically last for a few days \citep{ghirlanda13}.
Other possibilities, like a tidal disruption event, cannot be tested with the limited amount of data available.
The SPT-3G camera will continue to observe this \SI{1500}{\deg^2} footprint until the completion of the survey at the end of 2023.
This should at least quadruple the number of detected mm-wave transients with similar brightness, potentially probe new classes of variable mm-wave sources, and discover many more fainter sources as improvements in the analysis increase the sensitivity and time resolution of the search.
An already operating online alert system, using the methods described in this article, will soon provide public notice of these detections with latencies of \num{< 24} {hours}, enabling multi-wavelength follow-up to determine the nature of the emission seen in this work, as well as characterization of new sources while they are exhibiting variability.
\section*{Acknowledgments}
The authors thank Anna Ho for helpful comments on a draft version of this paper. We are also grateful to Jeff DeRosa and Johan Booth for providing guidance for South Pole weather balloons. Thanks to Charles Gammie, Leslie Looney, Paul Ricker, Bob Rutledge, and Laura Chomiuk for invaluable early discussions.
The South Pole Telescope program is supported by the National Science Foundation (NSF) through grants PLR-1248097 and OPP-1852617, with this analysis and the online transient program supported by grant AST-1716965.
Partial support is also provided by the NSF Physics Frontier Center grant PHY-1125897 to the Kavli Institute of Cosmological Physics at the University of Chicago, the Kavli Foundation, and the Gordon and Betty Moore Foundation through grant GBMF\#947 to the University of Chicago.
Argonne National Laboratory's work was supported by the U.S. Department of Energy, Office of High Energy Physics, under contract DE-AC02-06CH11357.
Work at Fermi National Accelerator Laboratory, a DOE-OS, HEP User Facility managed by the Fermi Research Alliance, LLC, was supported under Contract No. DE-AC02-07CH11359.
The Cardiff authors acknowledge support from the UK Science and Technologies Facilities Council (STFC).
The IAP authors acknowledge support from the Centre National d'\'{E}tudes Spatiales (CNES).
JV acknowledges support from the Sloan Foundation.
The Melbourne authors acknowledge support from the Australian Research Council's Discovery Project scheme (DP200101068).
The McGill authors acknowledge funding from the Natural Sciences and Engineering Research Council of Canada, Canadian Institute for Advanced Research, and the Fonds de recherche du Qu\'ebec Nature et technologies.
The UCLA and MSU authors acknowledge support from NSF AST-1716965 and CSSI-1835865.
This research was done using resources provided by the Open Science Grid \citep{pordes07, sfiligoi09}, which is supported by the NSF award 1148698, and the U.S. Department of Energy's Office of Science.
The data analysis pipeline also uses the scientific python stack \citep{hunter07, jones01, vanDerWalt11}.
This work has made use of data from the European Space Agency (ESA) mission
{\it Gaia} (\url{https://www.cosmos.esa.int/gaia}), processed by the {\it Gaia}
Data Processing and Analysis Consortium (DPAC,
\url{https://www.cosmos.esa.int/web/gaia/dpac/consortium}).
Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the {\it Gaia} Multilateral Agreement.
This publication makes use of data products from the Wide-field Infrared Survey Explorer, which is a joint project of the University of California, Los Angeles, and the Jet Propulsion Laboratory/California Institute of Technology, and NEOWISE, which is a project of the Jet Propulsion Laboratory/California Institute of Technology.
WISE and NEOWISE are funded by the National Aeronautics and Space Administration.
This research has made use of the NASA/IPAC Infrared Science Archive, which is operated by the Jet Propulsion Laboratory, California Institute of Technology, under contract with the National Aeronautics and Space Administration.
This paper includes data collected by the TESS mission. Funding for the TESS mission is provided by the NASA's Science Mission Directorate.
\facilities{ASAS, ASKAP, Fermi, Gaia, NEOWISE, ROSAT, SPT (SPT-3G), TESS, WISE}
|
\section{Introduction}
The encryption functions of the AES are the composition of a sequence of round transformations made by a confusion and a diffusion layer followed by a key addition with the so-called round key, derived by
the user master key by means of the public key-scheduling algorithm.
While the confusion-diffusion step has been designed to provide long-term resistance against known and possibly future attack, the key-schedule has
been chosen also without neglecting the application of the cipher in resource-constrained devices. The necessary efforts to keep the encryption lighter~\cite{aes}
made \emph{de facto} the confusion-diffusion step almost completely in charge of the security.
Although some recent improvements in the AES cryptanalysis are based on structural properties of the SPN design~(e.g.\ \cite{ronjom2017yoyo,bardeh2019exchange,dunkelman2020retracing}),
unsurprisingly, also the key-schedule has been targeted in various attacks in recent years~\cite{biryukov2009related,mala2010improved,boura2018making}.
In general, key-scheduling algorithms seem the component on which there is the least consensus on general
design criteria and arguably the components for which attacks are less standardised.
Despite two decades of cryptanalysis, only recently Leurent and
Pernot have shown the existence of an invariant subspace for four rounds of the AES-128 key-schedule~\cite{leurentnew}.
Such a finding allowed the authors to provide an alternative representation of the key-schedule as four independent
actions on each of the 4-byte-word components of the round key.
Although related only to the key-schedule, the result is then used to obtain global improvements in already known differential attacks, showing how the subspace analysis of the key-schedule may highlight some subspace structures that interact with similar structures in the main round function inducing security flaws.
Initially, the more general idea of finding subspaces which are invariant under the encryption functions, for some or possibly all the keys,
has been notably exploited by Leander et al.\ to cryptanalyse PRINTcipher~\cite{leander2011cryptanalysis}.
The above-mentioned strategy make use of the fact that an entire subspace
of the message space (or of the key space) is not moved by the encryption functions. Subspace trail cryptanalysis~\cite{grassi2016subspace}, a generalization of invariant
subspace cryptanalysis, has been also used to attack reduced-round AES~\cite{grassi2017new}.
The imprimitivity attack, introduced
by Paterson against an intentionally flawed but apparently secure DES-like block cipher~\cite{paterson1999imprimitive}, is conceptually similar to invariant subspaces attacks,
except it exploits the existence of a full \emph{partition} of the message space that is preserved by the encryption.
In particular, in this attack scenario, the cryptanalyst usually takes advantage of an entire \emph{linear partition} of the message space, i.e.\ a partition made by the cosets of a proper and non-trivial subspace, which is invariant.
While it is hard in general to prove the non-existence of invariant subspaces (see~\cite{beierle2017proving} for an analysis of the security impact provided by the choice of the round constants), the non-existence of invariant linear partitions after one round can be more easily established using group-theoretical arguments, i.e.\ proving that a given group containing the encryption functions acts primitively on the message space.
Non-existence results for invariant partitions in standardized constructions have been proved in the last years~\cite{wendes,sparwenrij,wenkas,aragona2017group}, and more general results determining conditions which imply the non-existence of invariant linear partitions obtained by primitivity arguments can be found in the
literature~\cite{carantiprimitive,aragona2018primitivity}.\\
In this work we prove a \emph{primitivity} result on the AES-128 key-schedule (see Theorem~\ref{thm:main} and Corollary~\ref{main:coro}), i.e.\ we show that no linear partition can be invariant after one round, when each possible
vector is considered as round counter.
The strategy used here is the following: the action of the key-schedule is
modeled by means of a formal operator defining a group which is proved to be primitive using Goursat's Lemma (cf. Theorem~\ref{gours}). In particular, we
prove that the group generated by the action of the AES-128 key-schedule is primitive provided that a suitable considerably smaller group
generated by some AES-128 components is primitive, a result which can be established using known facts~\cite{carantiprimitive,aragona2018primitivity}.
As a consequence, our result can be generalized to each substitution-permutation network whose round components
are suitable for generating a primitive group~\cite{carantiprimitive} and whose 4-branch AES-like key-schedule is built accordingly.
To our knowledge, with respect to invariant partitions, the study carried out in this paper is the first example of group-theoretical investigation of the sole key-schedule, which is
in general excluded from primitivity arguments, except for some recent partial results~\cite{arafeistel,calderinikey}.
\subsubsection*{Related works}
In this paper we use the strategy of a \emph{primitivity reduction} via Goursat's Lemma. We show indeed that the primitivity of a complex structure, such as the 4-branch key-schedule transformations of AES, is inherited from the primitivity of the group generated by simpler SPN-like functions, i.e.\ those acting on the last group of bytes. Similar arguments have been used to prove that the primitivity of more complex structures (e.g.\ Feistel networks, Lai-Massey constructions) reduces to the primitivity of their inner SPN-like components~\cite{aragonawave,aragona2020primitivity}.
\subsubsection*{Organization of the paper}
In Section~\ref{sec:pre} we introduce the notation and the preliminary results, and present an algebraic representation
of the AES-128 key-schedule and the related permutation group. In Section~\ref{sec:pri} we present our primitivity reduction in Theorem~\ref{thm:main} and show its application to AES in Corollary~\ref{main:coro}. The technical proof of Theorem~\ref{thm:main} with the use of Goursat's Lemma is shown in Sec.~\ref{sec:proof}.
Finally, in Section~\ref{sec:concl} we draw our conclusions.
\section{Preliminaries and model}\label{sec:pre}
In this section we introduce some notation and preliminary results, starting by briefly recalling the definition of the
AES-128 key-schedule. The reader is invited to refer to Daemen and Rijmen for a detailed description including comments on
design choices~\cite{aes}.\\
The AES-128 key-schedule is an invertible function of $\Sym(\F_2^{128})$ which, using the cipher's components, transforms the previous
round key into the next one, starting from the master key, proceeding as shown in Fig.~\ref{fig:AESks}, where
\begin{itemize}
\item[-] $\lambda: \F_2^{32} \rightarrow \F_2^{32}$ denotes the linear operation \texttt{RotWord},
\item[-] $\gamma : \F_2^{8} \rightarrow \F_2^{8}$ represents the AES S-Box \texttt{SubBytes},
\item[-] $rc_i \in \F_2^8$ is a round constant different in each round.
\end{itemize}
In particular, round-key bits are gathered into four groups, each made by 4 bytes. The bytes of the last group are first shifted left by one position and then
transformed by the cipher's S-Box. Finally, a round-dependent counter is xor-ed to the first byte of the last block. The output of this transformation is then xor-ed to
the remaining three blocks of bytes as shown in Fig.~\ref{fig:AESks}.
\begin{figure}
\centering
\includegraphics[scale= 0.47]{AESks-pics.pdf}
\caption{The $i$-th transformation of the AES-128 key-schedule}\label{fig:AESks}
\end{figure}
\subsection*{Notation}
In the following, $n$ is a non-negative integer and $V \deq \F_2^{n}$ is the $n$-dimensional vector space over $\F_2$. If $H$ is a subspace of $V$ we write $H \leq V$, and the same notation is used to denote subgroups. We denote by $\mbb 0 : V \rightarrow V$ the null function on $V$. Moreover, $\Sym(V)$ denotes the symmetric group acting on $V$ and $\mbb1$ its identity. If $f \in \Sym(V)$ and $x \in V$ we write $xf$ to denote the functional evaluation $f(x)$. The group of the translations on V, i.e.\ the group of the maps $\sigma_v: V \rightarrow V$, such that $x\mapsto x+v$, is denoted by $T_{n}$. We also denote by $\AGL(V)$ the group of all affine permutations of $V$ and by $\GL(V)$ the group of the linear ones.
In particular, in the case under investigation, we mean by $n$ the size of each group of $4$ bytes, i.e.\ $n=32$ bits. In this assumption, the key-scheduling transformation will be acting on $V^4$ as an element of the symmetric group $\Sym(V^4)$, whose corresponding
group of translations is denoted by $T_{4n}$, where the translation $\sigma_{(v_1,v_2,v_3,v_4)}$ acts on $(x_1,x_2,x_3,x_4) \in V^4$ as
\[
(x_1,x_2,x_3,x_4)\mapsto (v_1+x_1,v_2+x_2,v_3+x_3,v_4+x_4).
\]
It is worth noting here that the addition with the round counter in the AES-128 key-schedule acts exactly as a particular translation of $T_{4n}$.
For sake of clarity, we will use different notations for elements of $V$, $V^2$ and $V^4$. In particular, we will denote an element of $V^4$ by superscripting an arrow on the symbol, i.e.\ $\vec v \in V^4$, an element of $V^2$ using symbols in bold, i.e.\ $\vec v=(\bm{v_1},\bm{v_2})$, in such a way \[\vec v=(\bm{v_1},\bm{v_2})=(v_1,v_2,v_3,v_4)\in V^4,\] where $\bm{v_i}\in V^2$ and $v_j\in V$ for $1 \leq i \leq 2$ and $1 \leq j\leq 4$. \\
Let us now introduce the elements of group theory used throughout this article.
\subsection*{Groups}
Let $G$ be a group acting on a set $M$. For each $g \in G$ and $v \in M$ we denote the action of $g$ on $v$ as $vg$.
The group $G$ is said to be \emph{transitive} on $M$ if for each $v,w \in M$ there exists $g \in G$ such that $vg=w$.
A partition $\mathcal{B}$ of $M$ is \emph{trivial} if $\mathcal{B}=\{M\}$ or $\mathcal{B}=\{\{v\} \mid v \in M\}$, and \emph{$G$-invariant} if for any $B \in \mathcal{B}$ and $g \in G$ it holds $Bg \in \mathcal{B}$. Any non-trivial and $G$-invariant partition $\mathcal{B}$ of $M$ is called a \emph{block system} for $G$. In particular any $B \in \mathcal{B}$ is called an \emph{imprimitivity block}. The group $G$ is \emph{primitive} in its action on $M$ (or $G$ \emph{acts primitively} on $M$) if {$G$ is transitive and} there exists no block system.
Otherwise, the group $G$ is \emph{imprimitive} in its action on $M$ (or $G$ \emph{acts imprimitively} on $M$). We recall here some well-known results that will be useful in the remainder of this paper~\cite{cameronpermutation}.
\begin{lemma}\label{lemma:trans}
If $T \leq G$ is transitive, then a block system
for $G$ is also a block system for $T$.
\end{lemma}
In the case under consideration in this paper, the block system will be a \emph{linear partition}:
\begin{lemma}\label{translatioBlocks}
Let $M$ be a finite vector space over $\mathbb F_2$ and $T$ its translation group.
Then $T$ is transitive and imprimitive on $M$. A block system $\mathcal U$ for $T$ is composed by
the cosets of a non-trivial and proper subgroup $ U < (M,+)$, i.e.\
\begin{equation*}
\mathcal U = \{
U + v
\mid
v \in M
\}.
\end{equation*}
\end{lemma}
\subsection*{The key-schedule representation}
Let us now introduce the representation of the AES-128 key-schedule that allows us to provide an easy description of the subgroup of $\Sym(V^4)$ which is
the subject of this work. Let us start by defining the transformation acting on the last group of four bytes, as in Fig~\ref{fig:AESks}.
\begin{definition}\label{def:opaes}
Let $\rho_{\mathrm{AES}} \in \Sym(V)$ be the composition of $\lambda$ and the parallel application of $4$ copies of $\gamma$, i.e.\
\[
\rho_{\mathrm{AES}} \deq \lambda\gamma' \in \Sym(V),
\]
where $\gamma': \F_2^{32} \mapsto \F_2^{32}$, $(v_1,v_2,v_3,v_4) \mapsto (v_1\gamma,v_2\gamma,v_3\gamma,v_4\gamma)$, with $v_i \in \F_2^8$.
\end{definition}
The function previously defined, up to the xor with the round counter in the first byte, represents the transformation acting on the last group of bytes in the
AES-128 key-schedule. The following definition is instead a more general description of the full transformation.
\begin{definition}\label{def:op}
Given $\rho \in \Sym(V)$, let us define the \emph{AES-like key-schedule operator induced by $\rho$} as the formal matrix
\[
\overline{\rho} \deq \begin{pmatrix}
\mbb1 & \mbb1 & \mbb1 & \mbb1\\
\mbb0 & \mbb1& \mbb1 & \mbb1\\
\mbb0 & \mbb0& \mbb1 & \mbb1\\
\rho & \rho & \rho & \mbb1+\rho
\end{pmatrix},
\]
acting on $V^4$ as
\[(v_1,v_2,v_3,v_4)\mapsto (v_1+v_4\rho,v_1+v_2+v_4\rho,v_1+v_2+v_3+v_4\rho, v_1+v_2+v_3+v_4+v_4\rho),\]
as also displayed in Fig.~\ref{fig.rounds}.
The operator $\overline{\rho}$ has the following inverse acting as
\[
(v_1,v_2,v_3,v_4)\overline{\rho}^{-1}=(v_1 + (v_3+v_4)\rho,v_1+v_2,v_2+v_3,v_3+v_4).
\]
\end{definition}
\begin{figure}
\centering
\includegraphics[scale= 0.55]{AESks-pics2.pdf}
\caption{The key-schedule operator induced by $\rho$}\label{fig.rounds}
\end{figure}
It is not hard to notice, when considering $\rho_{\mathrm{AES}}$, that the map \[\overline{\rho_{\mathrm{AES}}}\sigma_{(\overline{rc_i},\overline{rc_i},\overline{rc_i},\overline{rc_i})}\]
correspond to the $i$-th round-key transformation in the AES-128 key-schedule, where $\overline{rc_i} = (rc_i, 0,0,0) \in \F_2^{32}$. Keeping in mind that our focus is to study group-theoretical
properties of the subgroup $\Gamma <\Sym(V^4)$ generated by the elements of the type of $\overline{\rho_{\mathrm{AES}}}\sigma_{(\overline{rc_i},\overline{rc_i},\overline{rc_i},\overline{rc_i})}$,
for each admissible value of $rc_i \in \F_2^8$, and establish its primitivity by using Lemma~\ref{translatioBlocks}, it is important to notice that $\Gamma$ does not contain
the whole translation group $T_{128}$. For this reason, $\Gamma$ needs to be extended by assuming a more general action of the round counter.
\begin{definition}\label{def:gr}
Let us define the group
\[
\Gamma_{\mathrm{AES}} \deq \Span{\overline{\rho_{\mathrm{AES}}}\sigma_{(x,y,z,t)} \mid (x,y,z,t) \in V^4}.
\]
It is easily noticed that
\begin{itemize}
\item[-] $\Gamma_{\mathrm{AES}}$, which contains $\Gamma$, is the smallest subgroup of the symmetric group containing both $T_{128}$ and the transformation of the AES-128 key-schedule, when the correct round counter is chosen;
\item[-] $\Gamma_{\mathrm{AES}} = \Span{\overline{\rho_{\mathrm{AES}}}, T_{128}}$.
\end{itemize}
\end{definition}
In the remainder we prove that $\Gamma_{\mathrm{AES}}$ is primitive. This guarantees that no non-trivial and proper subgroup
$U < V^4$ can generate a partition, as in Lemma~\ref{translatioBlocks}, which is invariant under the transformations of $\Gamma_{\mathrm{AES}}$.
\section{The primitivity of $\Gamma_\mathrm{AES}$}\label{sec:pri}
In this section we prove our main result, i.e.\ the primitivity of $\Gamma_{\mathrm{AES}}$ (cf.\ Corollary~\ref{main:coro}), as a consequence of
a more general result (cf.\ Theorem~\ref{thm:main}) in which we show that the primitivity of $\Span{\overline{\rho}, T_{4n}}$ \emph{reduces} to the primitivity of $\Span{{\rho}, T_n}$,
when $\overline{\rho}$ is the key-schedule operator induced by $\rho$ (cf.\ Definition~\ref{def:op}) and provided that $\rho$ is bijective and not affine.
The proof of the primitivity reduction is rather technical and makes use of repeated applications of Goursat's Lemma (see Sec.~\ref{sec:proof}) so, for the sake of readability, is shown in a separate section.
We can anticipate our main contribution which is stated as follows:
\begin{theorem}[Primitivity reduction]\label{thm:main}
Let $\rho \in \Sym(V) \setminus \AGL(V)$.
If $\Span{\rho, T_n}$ is primitive on $V$, then $\Span{\overline{\rho},T_{4n}}$ is primitive on $V^4$.
\end{theorem}
\begin{proof}
See Sec.~\ref{sec:proof}.
\end{proof}
According to the previous fact, the primitivity of the AES-128 key-schedule can be deduced by the primitivity of the group generated by $\rho_{\mathrm{AES}}$ and $T_{32}$,
i.e.\ by the composition of the linear transformation \texttt{RotWord} and the parallel application of 4 copies of the S-Box \texttt{SubBytes} and by the translations on the space of $4$-byte words. As already mentioned, the primitivity of the latter can be obtained, as shown below, from already established results. \\
Let us prove that $\rho = \rho_{\mathrm{AES}}$ satisfies the hypothesis of Theorem~\ref{thm:main}, i.e.\ that $\Span{\rho_{\mathrm{AES}}, T_{32}}$ generates a primitive group. To do so, we need the following definitions
and a general result of primitivity for substitution-permutation networks~\cite{aragona2018primitivity}.
Let us write $n = s \cdot b$, for some $s,b > 1$, and let us decompose $V$ as a direct sum of subspaces accordingly, i.e.\ $V = \bigoplus_{i=1}^b V_i$, where $\dim(V_i) = s$. Each $V_i$, spanned by the canonical vectors $e_{s(i-1)+1}, \ldots, e_{s(i-1)+s}$, is called a \emph{brick}. Recall that, in the case of $\rho_{\mathrm{AES}}$, we have $n=32$, $s = 8$ and $b=4$.
Given $f: \F_2^s \rightarrow \F_2^s$, for each $a \in \F_2^s$, $a \ne 0$, we denote by
\[\partial_a(f): \F_2^s \rightarrow \F_2^s, \quad x \mapsto xf+(x+a)f\]
the \emph{derivative of $f$ in the direction $a$}.
Recall that when $f \in \Sym(\F_2^s)$ is \emph{$\delta$-differentially uniform}, for some $2 \leq \delta \leq 2^s$, then $\Size{\mathrm{Im}(\partial_a(f))}\geq 2^{s}/\delta$ for each $a \ne 0$.
Moreover, if $0 f = 0$, we say that $f$ is \emph{$\delta$-anti-invariant} if
for any two subspaces $W_1, W_2 \leq \F_2^s$ such that $W_1 f = W_2$, then either $\dim(W_1) = \dim(W_2) < s - \delta$ or
$W_1 = W_2 = \F_2^s$.
The next theorem is stated using the notation introduced above in this section.
\begin{theorem}[\cite{aragona2018primitivity}]\label{thm:present}
Let $f \in \Sym(\F_2^s)$ such that 0f=0, let $F \in \Sym(V)$ be the function acting as $f$ on each $s$-dimensional brick $V_i$ of $V$ and let $\Lambda \in \GL(V)$. If no non-trivial and proper direct sum of bricks of $V$ is invariant under $\Lambda$ and for some $2 \leq \delta \leq s-1$ the function $f$ is
\begin{itemize}
\item[-] $2^\delta$-differentially uniform,
\item[-] $(\delta-1)$-anti-invariant,
\end{itemize}
then $\Span{F\Lambda, T_n}$
is primitive.
\end{theorem}
We are now ready to prove the primitivity of $\Span{\rho_{\mathrm{AES}}, T_{32}}$ as a consequence of Theorem~\ref{thm:present}.
\begin{theorem}\label{thm:main2}
The group $\Span{\rho_{\mathrm{AES}}, T_{32}} < \Sym(\F_2^{32})$ is primitive.
\end{theorem}
\begin{proof}
Let $\lambda \in \GL(V)$ and $\gamma' \in \Sym(V)$, as in Definition~\ref{def:opaes}, be respectively the \texttt{RotWord} transformation and the parallel application of 4 copies of $\gamma$, the
S-Box \texttt{SubBytes}. It is well know that $\gamma$ is, up to affine transformations, the function which sends $0$ into $0$ and each non-zero element into its multiplicative inverse in $\F_{2^s}$. Such a function is $4$-differentially uniform and $1$-anti invariant, i.e.\ satisfies the hypotheses of Theorem~\ref{thm:present} for $\delta=2$~\cite{nyberg1993differentially,carantiprimitive}. Notice that anti-invariance and differential uniformity are invariant under inversion~\cite{carlet1998codes} and under affine transformations, i.e.\ also $\gamma^{-1}$ satisfies the
hypotheses of Theorem~\ref{thm:present}. Moreover, it easily checked that no non-trivial and proper direct sum of bricks of $V$ is invariant under $\lambda$, and the same trivially holds also for $\lambda^{-1}$. Therefore, from Theorem~\ref{thm:present}, $\Span{(\gamma')^{-1}\lambda^{-1}, T_{32}}$ is primitive, and consequently so is $\Span{\lambda\gamma', T_{32}} = \Span{\rho_{\mathrm{AES}}, T_{{32}}}$.
\end{proof}
The following final conclusion is derived.
\begin{corollary}\label{main:coro}
The group $\Span{\overline{\rho_{\mathrm{AES}}},T_{128}}< \Sym(\F_2^{128})$ generated by the transformations of the AES-128 key-schedule is primitive.
\end{corollary}
\section{The primitivity reduction - Proof of Theorem~\ref{thm:main}}\label{sec:proof}
This section is entirely devoted to the proof of Theorem~\ref{thm:main}, which may be skipped entirely from the reader who is not interested in the technical details.
Despite its apparent complexity, the (repeated) use of Goursat's Lemma, which is introduced below, represents a reasonable way to describe any generic subspace $U$ which is candidate to be a linear block (and which, \emph{a fortiori}, is necessarily trivial).\\
In order to prove our result, we need to determine a block system for $V^4 = V^2 \times V^2$, i.e.\ the set the cosets
of a suitable subgroup of $V^2\times V^2$.
This can be accomplished by using the following
characterization of subgroups of the direct product of two groups in terms of
suitable sections of the direct factors~\cite{goursat}.
\begin{theorem}[Goursat's Lemma]\label{gours}
Let $G_1$ and $G_2$ be two groups. There
exists a bijection between
\begin{enumerate}
\item
the set of all subgroups of the
direct product $G_1\times G_2$, and
\item
the set of all triples
$(A/B,C/D,\psi )$ where
\begin{itemize}
\item $A$ is a subgroup of $G_{1}$,
\item $C$ is a subgroup of $G_{2}$,
\item $B$ is a normal subgroup of $A$,
\item $D$ is a normal subgroup of $C$,
\item $\psi: A/B\to C/D$ is a group isomorphism.
\end{itemize}
\end{enumerate}
\noindent Then, each subgroup of $ U \leq G_1\times G_2$ can be uniquely
written as
\begin{equation}\label{defU}
U = U_{\psi}= \{
(a,c) \in A \times C
\mid
(a + B) \psi =c + D
\}.
\end{equation}
\end{theorem}
Note that the isomorphism $\psi$ induces a homomorphism $\varphi: A \to C$ where $a\mapsto a\phi$ is such that $(a+B)\psi=a\varphi + D$ for any $a\in A$, and such that $B\varphi\leq D$. Such a homomorphism is not necessarily unique.
\begin{corollary}
\label{lemma:psiforphi}
Using notation of Theorem~\ref{gours}, given any homomorphism $\phi$ induced by $\psi$, we have
\begin{equation*}
U_{\psi}
=
\{
(a, a \varphi + d)
\mid
a \in A, d \in D
\}.
\end{equation*}
\end{corollary}
\begin{proof}
Let $(a,c) \in U_{\psi}.$ By definition of $\phi$, $(a+B)\psi = c+D = a\phi+D$, so $c \in a\phi+D$, and therefore there exists $d \in D$ such that $c = a \phi+d$.
Conversely, if $a \in A$ and $d \in D$, then $(a+B)\psi = a\phi +D = a\phi+d+D$.
\end{proof}
\subsection{Use of Goursat's Lemma}\label{rmkGoursat}
Let $U$ be a subspace of $V^4 = V^2 \times V^2$.
From Theorem~\ref{gours} and Corollary~\ref{lemma:psiforphi} we have that there exist $A,B,C,D \leq V^2$ and $\psi: A/B \rightarrow C/D$ isomorphism inducing an homomorphism $\phi: A \to C$ such that
\[U = \{ (\bm{a}, \bm{a} \varphi + \bm{d}) \mid \bm{a} \in A, \bm{d} \in D\}.\]
Without loss of generality, a basis of $A$ can be completed to a basis of $\F_2^{2n}$ and $\varphi$ can be arbitrarily defined from the basis of the complement $A^c$ of $A$ to a basis of $(\mathrm{Im}(\phi))^c$. Finally, $\varphi$ can be extended by linearity on the whole space $\F_2^{2n}$, providing us with a matrix representation of $\phi$ as
\[
\begin{pmatrix} \phi_{11} & \phi_{12}\\ \phi_{21} & \phi_{22}\end{pmatrix}
\]
such that for each $(a_1,a_2)\in A\leq\F_2^{2n}$
\[
\bm{a}\phi=(a_1,a_2)\phi = (a_1 \phi_{11} + a_2 \phi_{21}, a_1 \phi_{12}+a_2\phi_{22})\deq (\bm{a}\phi_{1},\bm{a}\phi_{2}),
\]
where, for $1 \leq i \leq 2$,
\[
\phi_{i}=\begin{pmatrix} \phi_{1i} \\ \phi_{2i} \end{pmatrix}.
\]
\noindent Applying again Goursat's Lemma on $A, D \leq V^2$, we obtain that
\begin{enumerate}[(i)]
\item\label{des_A} there exist $A',B',C',D' \leq V$ and $\phi_A: A' \to C'$ an homomorphism such that
\[A = \{ (a', a' \varphi_A + d') \mid a' \in A', d' \in D'\},\]
\item\label{des_D} there exist $A'',B'',C'',D'' \leq V$ and $\phi_D: A'' \to C''$ an homomorphism such that
\[D = \{ (a'', a'' \varphi_D + d'') \mid a'' \in A'', d'' \in D''\}.\]
\end{enumerate}
The previous construction and notation will be used in the remainder of the paper every time a subspace $U$ is considered as a candidate for the linear component of an invariant linear partition. More precisely:
\begin{definition}
A subgroup $ U \leq V^4$ is a \emph{linear block} for $f \in \Sym(V^4)$ if for each $\vec{v}\in V^4$ there exists $\vec{w} \in V^4$ such
that
\begin{equation*}
(U +\vec{v})f = U+\vec{w},
\end{equation*} where we can always choose $\vec{w} = \vec{v}f.$
\end{definition}
When a linear block for ${f}$ is found, by Lemma~\ref{translatioBlocks} $\Span{f, T_{4n}}$ is imprimitive and have the cosets of the linear block as a block system.
By virtue of Lemma~\ref{translatioBlocks}, cosets of linear blocks are indeed the only kind of partitions that can be invariant for the groups under considerations, despite the generality of the definition of partition.
Notice also that if $f \in \Sym(V^4)$ is such that $\vec 0f=\vec 0$ and $U < V^4$ is a linear block for $f$, then $U$ is an invariant subspace for $f$, i.e.\
for each $\vec u \in U$ there exists $\vec w \in U$ such that $\vec uf=\vec w$. The relation $Uf= U$ can be also expressed, in the notation of this section, as
\begin{equation}\label{lin_block}
\forall \bm{a} \in A \forall \bm{d} \in D \, \exists \bm{x} \in A \exists \bm{d} \in D: (\bm{a},\bm{a}\phi+\bm{d})f=(\bm{x},\bm{x}\phi+\bm{y}).
\end{equation}
We will use Eq.~\eqref{lin_block} extensively in the next results when considering functions with linear blocks, sometimes without explicit mention.
\subsection{The proof}
We are now ready to show the steps to prove Theorem~\ref{thm:main}. In the remainder of the paper we will make use of the notation introduced in Sec.~\ref{rmkGoursat} and we assume, without loss of generality and only for the sake of simplicity, that $0\rho = 0$.
This is possible since each possible translation is considered in the group under investigation (cf. Definition~\ref{def:gr}).
The next result is the starting point for the proof of Theorem~\ref{thm:main}: we will show that assuming the existence of a linear block for $\overline{\rho}$, i.e.\ exploiting an invariant subspace for $\overline{\rho}$, leads to the discovery of a (possibly trivial) invariant subspace for $\rho$. Notice that our main claim follows straightforwardly from Lemma~\ref{lem_new} when such a subspace is non-trivial. In the reminder of the paper we will discuss the remaining cases.
\begin{lemma}\label{lem_new}
Let $\rho \in \Sym(V)$ and let $U \leq V^4$ be a linear block for $\overline{\rho}$. In the notation of Sec.~\ref{rmkGoursat} we have $ D''\rho=D''$.
\end{lemma}
\begin{proof}
\noindent Since $U$ is a linear block for $\overline{\rho}$, taking $\bm{a}=\bm{0}$ in Eq.~\eqref{lin_block} and considering the description of $D$ as a subgroup of $\F_2^{2n}$ (cf.\ \ref{des_D} in Sec.~\ref{rmkGoursat}), for each $a'' \in A''$ and $d'' \in D''$, we have $(0,0,a'',a''\phi_D+d'')\in U$.
Moreover, assuming $a''=0$ and noticing that $U$ is a linear block for each element of $\Span{\overline{\rho}} \leq \Sym(V^4)$, we have
$
(0,0,0,d'')\overline{\rho}=(d''\rho,d''\rho,d''\rho,d''+d''\rho)\in U
$
and
$
(0,0,0,d'')\overline{\rho}^{-3}=(d''\rho,d''\rho,d''\rho,d'')\in U.
$
Therefore
\begin{equation}\label{eq_new}
(d''\rho,d''\rho,d''\rho,d''+d''\rho)+(d''\rho,d''\rho,d''\rho,d'')=(0,0,0,d''\rho)\in U.
\end{equation} Hence, there exist
$\bm{x} \in A$ and $\bm{y} \in D$ such that $(0,0,0,d''\rho)=(\bm{x},\bm{x}\phi+\bm{y})$, and so $\bm{x}=\bm{0}$ and $(0,d''\rho)=\bm{y}\in D$.
From $(0,d''\rho)\in D$ we have that there exist $x''\in A''$ and $y''\in D''$ such that $x''=0$ and $d''\rho =y''\in D''$, which leads, since $\rho$ is a permutation, to
$
D''\rho=D'',
$
as claimed.
\end{proof}
We will use Lemma~\ref{lem_new} to prove that if $\Span{\overline{\rho},T_{4n}}$ is imprimitive, then an imprimitivity block for $\Span{\rho, T_n}$ can be found.
From Lemma~\ref{lem_new}, $D''$ is a natural first candidate for an imprimitivity block for $\Span{\rho, T_n}$. The proof of Theorem~\ref{thm:main} is organized as follows: assuming that $U$ is an imprimitivity block for $\Span{\overline{\rho},T_{4n}}$, from Lemma~\ref{lem_new} we have that $D''$ is a block for $\rho$. When $D''$ is non-trivial and proper there is nothing left to prove. In the case $D'' = \F_2^n$
we derive a contradiction and in the case $D'' = \{0\}$ we prove that, instead, $C''$ is a block for $\rho$. As before, the proof is completed when $C''$ is non-trivial and proper
and a contradiction is derived when $C'' = \F_2^n$. In the remaining case $C'' = \{0\}$, $A'$ is proved to be a block for $\rho$, and the extremal possibilities for $A'$ are excluded by
way of contradictions. In order to prove what anticipated, the following technical lemma is needed in some of the sub-cases.
\begin{lemma}\label{cond}
Let $\rho \in \Sym(V)$ and let $U \leq V^4$ be a linear block for $\overline{\rho}$. In the notation of Sec.~\ref{rmkGoursat}, if $D=\{\bm{0}\}$ we have
\begin{enumerate}[(1)]
\item \label{item_Aphi=A} $A=A\phi$;
\item \label{item_a2inA'} if $(a_1,a_2)\in A$, then $a_1, a_2 \in A'$.
\end{enumerate}
\end{lemma}
\begin{proof}
Let us address each claim separately.
Since $U$ is a linear block for $\overline{\rho}$ such that $D=\{\bm{0}\}$, it means that
$U = \{ (\bm{a}, \bm{a} \varphi ) \mid \bm{a} \in A\}$
is a linear block also for $\overline{\rho}^{-1}$ (cf.\ Definition~\ref{def:op} for the inverse of $\overline{\rho}$) and, as in Eq.~\eqref{lin_block}, assuming $\bm{d}=(0,0)$ and $\bm{y}=(0,0)$, we have
that for each $\bm{a}=(a_1,a_2) \in A$ there exists $\bm{x} \in A$ such that
$
(\bm{a},\bm{a}\phi)\overline{\rho}^{-1}=(\bm{x},\bm{x}\phi).
$
This means that
\begin{equation*}
\begin{split}
(a_1,a_2,\bm{a}\phi_1,\bm{a}\phi_2)\overline{\rho}^{-1} &=(a_1 + (\bm{a}\phi_1+\bm{a}\phi_2)\rho, a_1+a_2,a_2+\bm{a}\phi_1,\bm{a}\phi_1+\bm{a}\phi_2)\\
& = (\bm{x},\bm{x}\phi).
\end{split}
\end{equation*}
Hence $\bm{x}\phi=(a_2+\bm{a}\phi_1,\bm{a}\phi_1+\bm{a}\phi_2) = (a_2,\bm{a}\phi_1)+(\bm{a}\phi_1,\bm{a}\phi_2) \in A\phi$.
Since $\bm{x}\phi$ and $\bm{a}\phi$ belong to $A\phi$, we have $(a_2,\bm{a}\phi_1)\in A\phi$.
Similarly, for each $\bm{a}=(a_1,a_2) \in A$, there exists $\bm{x} \in A$ such that
\begin{equation*}
\begin{split}
(\bm{a},\bm{a}\phi)\overline{\rho}^{-2} &=(a_1 + \xi +(a_2+\bm{a}\phi_2)\rho , a_2+ \xi,a_1+\bm{a}\phi_1,a_2+\bm{a}\phi_2)\\
& = (\bm{x},\bm{x}\phi),
\end{split}
\end{equation*}
where $\xi$ denotes $(\bm{a}\phi_1+\bm{a}\phi_2)\rho$.
Hence $(a_1+\bm{a}\phi_1,a_2+\bm{a}\phi_2)=(a_1,a_2)+(\bm{a}\phi_1,\bm{a}\phi_2)\in A\phi$ and so $(a_1,a_2)\in A\phi$, which proves $A\leq A\phi$ and, from $\Size{A}\geq\Size{A\phi}$, we obtain claim~\ref{item_Aphi=A}.
Moreover, since we have already proved that $(a_2,\bm{a}\phi_1)\in A\phi=A$, by the description of $A$ as subgroup of $\F_2^{2n}$ (cf.\ \ref{des_A} in Sec.~\ref{rmkGoursat}), there exist $x'\in A'$ and $y'\in D'$ such that $(a_2,\bm{a}\phi_1)=(x',x'\phi_A+y')$, and so $a_2=x'\in A'$. Similarly, for each $(a_1,a_2)\in A$ we have $a_1\in A'$, i.e.\ claim~\ref{item_a2inA'} is obtained. \qedhere
\end{proof}
We now use the previous lemma to show our main result, in which we prove that, in general, the AES-like key-schedule construction generates a primitive permutation group,
provided that the key-schedule operator $\overline{\rho}$ is induced by a permutation $\rho$ such that $\Span{\rho, T_n}$ is primitive. As already anticipated, the proof is organized in several steps. We will proceed as described in the paragraph after Lemma~\ref{cond}.
\begin{proof}[Proof of Theorem~\ref{thm:main}]
Let us assume that $\Span{\overline{\rho},T_{4n}}$ is imprimitive, i.e.\ that there exists
a block system $\mathcal U$ for $\Span{\overline{\rho}, T_{4n}}$. Then, from Lemma~\ref{translatioBlocks}, the block system
is of the type
\[
\mathcal U = \{U + \vec{v} \mid \vec{v}\in V^4\}
\]
for a non-trivial and proper subspace $U$ of $V^4$. From Lemma~\ref{lem_new} we have $ D''\rho=D''$ and
the previous equation means that the subgroup $D'' \leq V$, when non-trivial and proper, is an imprimitivity block for $\Span{\rho,T_n}$.
If that is the case, there is nothing left to prove.
Let us conclude the proof addressing the extremal cases $D'' = \F_2^n$ and $D'' = \{0\}$ separately.
\medskip
\begin{description}
\item[\mybox{$\mathbf{D'' = \F_2^n}$}] \input{files/Dsec_tutto.tex}
\smallbreak
\item[\mybox{$\mathbf{D'' = \{0\}}$}] \input{files/Dsec_zero.tex}
\medskip
\begin{description}
\item[\mybox{$\mathbf{C'' = \F_2^n}$}] \input{files/Csec_tutto.tex}
\smallbreak
\item[\mybox{$\mathbf{C'' = \{0\}}$}] \input{files/Csec_zero.tex}
\medskip
\begin{description}
\item[\mybox{$\mathbf{A' = \F_2^n}$}] \input{files/Apri_tutto.tex}
\smallbreak
\item[\mybox{$\mathbf{A' = \{0\}}$}] \input{files/Apri_zero.tex}
\end{description}
\end{description}
\end{description}
\end{proof}
\begin{remark}
Notice that in Theorem~\ref{thm:main} we have obtained our claim by reaching the contradiction that $D''$ (or $C''$ or $A'')$ is an invariant subspace for $\rho$. We should actually prove that $D''$ generates an invariant partition. However, computations are nearly identical and identically tedious and therefore are not included in this presentation. The intrigued reader may find the same results rewriting the proof of Theorem~\ref{thm:main} obtaining that $(D''+v) \mapsto D''+w$ for some $w \in \mathbb F_2^n$.
\end{remark}
\section{Conclusions}\label{sec:concl}
In this work we have considered the group $\Gamma_{\mathrm{AES}} = \Span{\overline{\rho_{\mathrm{AES}}}, T_{128}}$ generated by the AES-128 key-schedule transformations and we have proved that no partition of $V^4 = \F_2^{128}$ can be invariant under its action. However, the slow global diffusion of the operator does not suffice to make the key-schedule transformation free from invariant linear partitions when the composition of more rounds is considered.
In particular, since $\lambda^2$ and $\lambda^4$ admit proper and non-trivial invariant subspaces which are a direct sum of bricks of $V$, we can conclude that group generated by $i$ consecutive key-schedule transformations $\Span{\overline{\rho_{\mathrm{AES}}}^{\,i}, T_{128}}$
is
\begin{itemize}
\item[-] primitive if $i = 1$ (this work) and
\item[-] imprimitive if $i \in \{0,2 \textrm{ mod } 4\}$ (see e.g.~\cite[Proposition 5.1]{carantiprimitive} or~\cite{caldenote} and~\cite{leurentnew}).
\end{itemize}
It comes then with no surprise that $\overline{\rho_{\mathrm{AES}}}^4$ admits invariant subspaces, like those found by
Leurent and Pernot~\cite{leurentnew}, using an
algorithm of Leander et al.~\cite{leander2015generic}. One example is $U < V^4$,
where
\[
U \deq \{(a,b,c,d,0,b,0,d,a,0,0,d,0,0,0,d) \mid a,b,c,d \in \F_2^8 \}.
\]
Although the results of this work are not straightforwardly generalized using the same methods to the case $i =3$, we find it easy to believe that
also $\Span{\overline{\rho_{\mathrm{AES}}}^{\,3}, T_{128}}$ act primitively on $V^4$. Moreover, there
is no reason to believe that the same result is not valid for the 192-bit and 256-bit versions of AES key-schedule. However, the increasing complexity
of the strategy used here does not seem to be suitable for addressing the problem, which might require a different methodology.
\section*{Acknowledgment}
The authors are gratefully thankful to the referees for their valuable and constructive corrections and suggestions that have
improved the quality of the manuscript.
\bibliographystyle{alpha}
|
\section{Semi-classical Fourier transform}\label{appendix:qft}
We here discuss the semi-classical Fourier transform presented in~\cite{NiuPRL1996SemiclassicalFourierTransform} and show that its cost is negligible.
The standard way to perform the Fourier transform on $n_e$~qubits is shown in
\autoref{subfig:fourier_transform:quantique}: it requires a sequence of one Hadamard and controlled phase gates for each qubit.
In Shor's algorithm as well as in Ekerå and Håstad's version of Shor's algorithm, the qubits are measured right after the Fourier transform, hence explaining the measurements of each qubit at the end of gate sequences in \autoref{subfig:fourier_transform:quantique}.
The simple rearrangement presented in \autoref{subfig:fourier_transform:quantique2} shows that the measurement can be performed right after the Hadamard provided that the following phase gates are classically controlled by the result of this measurement, see \autoref{subfig:fourier_transform:semi_classique}.
In this case, the successive classically controlled phase gates operating on the same qubit can be merged together, leading to a circuit with one phase gate, one Hadamard gate and one measurement per qubit.
When this semi-classical Fourier transform operates on a register made with $n_e$~qubits (the number of bits of the exponent), its cost is linear in $n_e$ and is thus negligible compared to the cubic complexity of the exponentiation.
\section{Decomposition of the exponentiation into elementary gates}\label{appendix:exponentiation}
In this appendix, we aim to give a clear view of how to decompose the modular exponentiation into elementary gates.
The presented method is intended to be simple to understand, but not optimal.
A more efficient one is presented in \autoref{appendix:windowed_arithmetic}.
\subsection{Decomposition of a modular exponentiation into additions}
The modular exponentiation needed in Ekerå and Håstad's algorithm, \latin{i.e.\@}, the operation $\ket{e}\ket{1} \mapsto \ket{e}\ket{g^e \mod N}$, with the input $e$ and the output $g^e \mod N$ encoded on $n_e$ and $n$~bits respectively, can be implemented from controlled modular additions as we show now.
For simplicity, we omit the modulo in this paragraph.
Let $e_{n_e-1} \ldots e_{i} \ldots e_{0}$ be the binary form of $e$.
The exponentiation can first be seen as a sequence of multiplications
\begin{equation}\label{eq:decompose_exponent}
g^e
= \prod\limits_{i=1}^{n_e-1} g^{2^{i} e_{i}}
= \prod\limits_{i=1}^{n_e-1} {\left[g^{2^{i}}\right]}^{e_{i}}
\end{equation}
where each multiplication is controlled by the bit value $e_i$.
\autoref{fig:multiplication} shows an implementation of such a multiplication in which a quantum register encoding the integer $x$ ends up into an encoding of $x \times g^{2^{i} e_i}$.
\begin{figure}[h]
\mbox{\small \providecommand{\controlgate}[1]{\measure{#1}}
\Qcircuit @R=0.4em @C=0.7em {
\lstick{\ket{e_i}}&\qw &\qw &\qw &\ctrl{1} &\qw &\rstick{\ket{e_i}}\qw \\
\lstick{\ket{x}} &\qw {/} &\qw &\qw &\gate{\times g^{2^i}} &\qw &\rstick{\ket{x g^{2^i e_i}}}\qw\\
& & & &\push{=} & & \\
\lstick{\ket{e_i}}&\qw &\qw &\ctrl{1} &\ctrl{1} &\ctrl{2}&\rstick{\ket{e_i}}\qw \\
\lstick{\ket{x}} &\qw{/} &\qw &\controlgate{\text{Input }x}&\gate{+\bar{x}(-g^{-2^i})} &\qswap &\rstick{\ket{x g^{2^i e_i}}}\qw\\
&\push{\ket{0}}&\qw{/}&\gate{+x g^{2^i}}\qwx &\controlgate{\text{Input }\bar{x}}\qwx&\qswap &\push{\ket{0}}\qw \\
}
}
\caption{
Principle of a modular multiplication circuit transforming a quantum register encoding the integer $x$ into a state encoding $x \times g^{2^{i} e_i}$.
A first product-addition operation transforms auxiliary qubits in $\ket{0}$ into $\ket{x \times g^{2^{i}}}$ if $\ket{e_i} = \ket{1}$.
Then, a product-addition applies $+\bar{x} (-g^{-2^{i}})$ with $\bar{x} = x \times g^{2^{i}}$ into the register encoding $x$ if $\ket{e_i} = \ket{1}$.
A final swapping is applied if $\ket{e_i} = \ket{1}$ to put the quantum register into $\ket{x \times g^{2^{i} e_i}}$ and resets the auxiliary qubits to $\ket{0}$.
Note that all the operations are performed modulo $N$.}\label{fig:multiplication}
\end{figure}
It uses two controlled product-additions, \latin{i.e.\@}, the operation letting $\ket{y}\ket{z}$ unchanged if $\ket{e_i} = \ket{0}$ and mapping $\ket{y}\ket{z}$ into $\ket{y}\ket{z + y \times \gamma}$ ($(y, z, \gamma) \rightarrow (x,0,g^{2^i})$ for the first product-addition appearing in \autoref{fig:multiplication} and $(y, z, \gamma) \rightarrow (\bar{x}, x, - g^{-2^i})$ for the second one, where the negative power stands for multiplicative inverse modulo $N$) when $\ket{e_i} = \ket{1}$.
In case $\ket{e_i} = \ket{1}$, the mapping is performed by considering the binary representation $y_{n-1} \hdots y_0$ of $y$
and by rewriting the product as
\begin{equation}
y \times \gamma
= \sum\limits_{j=0}^{n-1} \gamma 2^j y_j
= \sum\limits_{j=0}^{n-1} \left[\gamma 2^j\right] y_j.
\end{equation}
As $y_j$ is either $0$ or $1$, the controlled product-addition can be implemented by a sequence of additions, each of them controlled both by the values of bits $\ket{y_j}$ and $\ket{e_i}$.
\autoref{fig:product_add_simple} shows explicitly the decomposition of the first product-addition appearing into each multiplication of the exponentiation.
\begin{figure}[h]
\mbox{\small \providecommand{\multicontrolgate}[2]{\multimeasure{#1}{#2}}
\providecommand{\controlgate}[1]{\measure{#1}}
\newcommand{\multipush}[2]{*+<1em,.9em>{\hphantom{#2}} \POS [0,0]="i",[0,0].[#1,0]="e",!C *{#2},"e"+UR;"e"+UL;"e"+DL; "e"+DR;"e"+UR,"i"}
\Qcircuit @R=0.2em @C=0.5em {
\lstick{\ket{e_i}} &\qw &\ctrl{2} &\qw & &&&&&\lstick{\ket{e_i}} &\qw &\ctrl{2} &\push{\cdots}\qw&\ctrl{4} &\push{\cdots}\qw &\\
& & & & &&&&& & & & & & &\\
&\qw &\multicontrolgate{3}{\text{Input }x}\qwx&\qw & &&&&&\lstick{\ket{x_0}} &\qw &\ctrl{5} &\push{\cdots}\qw&\qw &\push{\cdots}\qw &\\
&\qw & \ghost{\text{Input }x} &\qw &\multipush{1}{=}&&&&&\lstick{\raisebox{0.5em}{\vdots\hspace{0.8em}}}&\qw &\qw &\push{\cdots}\qw&\qw &\push{\cdots}\qw &\\
&\qw & \ghost{\text{Input }x} &\qw & \nghost{=}&&&&&\lstick{\ket{x_j}} &\qw &\qw &\push{\cdots}\qw&\ctrl{3} &\push{\cdots}\qw &\\
&\qw & \ghost{\text{Input }x} &\qw & &&&&&\lstick{\vdots\hspace{0.8em}} &\qw &\qw &\push{\cdots}\qw&\qw &\push{\cdots}\qw \inputgroupv{3}{6}{0.75em}{1.7em}{\ket{x}}&\\
& &\qwx & & &&&&& & & & & & &\\
&{/}\qw&\gate{+ x g^{2^i}}\qwx &\qw & &&&&& &{/}\qw&\gate{+ 2^{0} g^{2^i}}&\push{\cdots}\qw&\gate{+ 2^{j} g^{2^i}}&\push{\cdots}\qw &\\
}
}
\caption{Decomposition of the first product-addition appearing in each element of the decomposition of the exponentiation into multiplications, see \autoref{fig:multiplication}.}\label{fig:product_add_simple}
\end{figure}
We deduce that the modular exponentiation requires $n_e$~multiplications, each being decomposed into $2 n$~controlled additions and $1$~controlled swap between two registers, giving to a total number of $2 n_e n$ ($n_e$) controlled additions (swaps between registers respectively).
Each addition needs to be modular, which can be obtained with a specific representation and a standard adder circuit.
\subsection{Coset representation}
The basic idea of the coset representation for adding $2^j \gamma$ to a quantum register encoding the integer $z$ is to extend the register for $z$ with $m$~additional qubits and to encode it into the state $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{z + k N}$.
Except at the bounds, this state is invariant under the addition of $N$.
This implies:
\begin{multline*}
\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{\left(z + 2^j \gamma + k N\right) \mod 2^{n+m}} \\
\approx \frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{\left(z + 2^j \gamma \mod N\right) + k N}
\end{multline*}
\latin{i.e.\@} the modular addition of $2^j \gamma$ in the register of $z$ can be performed with a standard adder, at the cost of a small error which is exponentially suppressed when increasing $m$~\cite{Gidney2019Approximateencodedpermutations}.
Note that the resource needed to initialize the register is negligible with respect to the resource taken to implement the adder, see \autoref{appendix:coset_representation}.
Taking into account the increase in register size, this means that $2 n_e (n+m)$~controlled additions and $n_e$~controlled register swaps are needed for realizing Ekerå and Håstad's algorithm.
\subsection{Controlled operations}
A controlled swap operation between two qubits (Fredkin gate) can be performed using two CNOTs and one Toffoli gates, see \autoref{subfig:adder_semiclassical_controlled:fredkin}.
Hence the total cost for controlled swaps operating on two registers prepared in the coset representation of integers (encoded each with $n+m$~qubits) is of $2(n+m)$~CNOTs and $n+m$~Toffoli gates.
For the controlled addition, note first that since we use the coset representation of integers, a circuit for controlled addition modulo a power of two is sufficient to implement a controlled modular addition.
Such an addition can be implemented with the semi-classical adder presented in \autoref{subfig:adder_semiclassical_controlled:adder_semiclassical_controlled}, which is inspired by Refs.\,\cite{Moulton2004newquantumripple, GidneyQ2018Halvingcostquantum, Babbush2020CompilationFaultTolerant}.
It shows the basic circuit taking a classical value $2^j \gamma$ and a register encoding $z'$ and returning $2^j \gamma$ and $z' + 2^j \gamma$ if the two controlled qubits $\ket{e_i}$ and $\ket{x_j}$ are both in state $\ket{1}$.
When such an addition is applied on a quantum register encoding $z'$ using $n+m$~qubits, the block in the dashed box of \autoref{subfig:adder_semiclassical_controlled:adder_semiclassical_controlled} is repeated $n+m-2$ times, giving a mean cost of $5.5(n+m)-9$~CNOTs and $2(n+m)-1$~Toffoli gates.
\begin{figure}[h]
\subfloat[Doubly controlled semi-classical addition]{\label{subfig:adder_semiclassical_controlled:adder_semiclassical_controlled}
\mbox{\small \Qcircuit @R=0.6em @C=.1em {
\lstick{\ket{e_i}} &\ctrl{1} &\qw &\qw&\qw&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw&\qw&\qw &\qw &\ctrl{1}&\qw \\
\lstick{\ket{x_j}} &\ctrl{1} &\qw &\qw&\qw&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw&\qw&\qw &\qw &\ctrl{1}&\qw \\
\push{\ket{0}}&\targ &\ctrl{2} &\qw&\qw&\qw &\ctrl{3} &\qw &\ctrl{3} &\qw &\qw &\qw &\ctrl{9} &\qw &\qw &\ctrl{3} &\qw &\ctrl{3} &\ctrl{5} &\qw&\qw&\ctrl{2} &\ctrl{2} &\targ &\push{\ket{0}}\qw \\
\lstick{{(2^j \gamma)}_0} &\cw &\cctrl{0}&\cw&\cw&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw&\cw&\cctrl{0}&\cctrl{0} &\cw &\cw \\
\lstick{\ket{z'_0}} &\qw &\ctrl{1} &\qw&\qw&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw&\qw&\ctrl{1} &\targ &\qw &\rstick{\ket{s_0}}\qw\\
&\push{\ket{0}}&\targ &\qw&\qw&\ctrl{2}&\targ &\ctrl{2}&\targ &\ctrl{3}&\qw &\qw &\qw &\qw &\ctrl{3}&\targ &\ctrl{2}&\targ &\qw &\qw&\qw&\targ &\push{\ket{0}}\qw& & \\
\lstick{{(2^j \gamma)}_1} &\cw &\cw &\cw&\cw&\cw &\cctrl{-1} &\cw &\cctrl{-1}&\cw &\cw &\cw &\cw &\cw &\cw &\cctrl{-1}&\cw &\cctrl{-1} &\cctrl{0}&\cw&\cw&\cw &\cw &\cw &\cw \\
\lstick{\ket{z'_1}} &\qw &\qw &\qw&\qw&\targ &\qw &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\qw &\targ &\qw&\qw&\qw &\qw &\qw &\rstick{\ket{s_1}}\qw\\
& & & & & &\push{\ket{0}}&\targ &\qw &\targ &\qw & & & &\targ &\qw &\targ &\push{\ket{0}}\qw& & & & & & & \\
& & & & & & & & & &\qwx&\ctrl{2}&\qw &\qwx\qw& & & & & & & & & & & \\
\lstick{{(2^j \gamma)}_2} &\cw &\cw &\cw&\cw&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cctrl{0}&\cw &\cw &\cw &\cw &\cw &\cw &\cw&\cw&\cw &\cw &\cw &\cw \\
\lstick{\ket{z'_2}} &\qw &\qw &\qw&\qw&\qw &\qw &\qw &\qw &\qw &\qw &\targ &\targ &\qw &\qw &\qw &\qw &\qw &\qw &\qw&\qw&\qw &\qw &\qw &\rstick{\ket{s_2}}\qw
\gategroup{6}{6}{9}{19}{1.1em}{--}
}
}
}
\subfloat[Controlled swap]{\label{subfig:adder_semiclassical_controlled:fredkin}
\mbox{\small \Qcircuit @R=0.4em @C=0.7em {
& \ctrl{1} & \qw && &&& \qw & \ctrl{1} & \qw & \qw \\
& \qswap & \qw && = &&& \targ & \ctrl{1} & \targ & \qw \\
& \qswap \qwx & \qw && &&& \ctrl{-1} & \targ & \ctrl{-1} & \qw \\
}
}
}
\caption{
Controlled operations.
\protect\subref{subfig:adder_semiclassical_controlled:adder_semiclassical_controlled}:
semi-classical adder taking each bit of the classical value $2^j \gamma = \sum_{k=0}^2 2^k {(2^j \gamma)}_k$ and the three qubits register encoding $z'$ as inputs and returning ${(2^j \gamma)}_k$ and $\ket{s_k}=\ket{{(z' + 2^j \gamma \cdot e_i \cdot x_j)}_k}$.
The block in the dashed box uses in average $5.5$~CNOTs and $2$~Toffoli gates.
\protect\subref{subfig:adder_semiclassical_controlled:fredkin}:
Fredkin gate implemented with a Toffoli and two CNOT gates.
The controlled swap between registers (as required in \autoref{fig:multiplication}) is obtained by applying it to each pair of qubits.
}\label{fig:adder_semiclassical_controlled}
\end{figure}
\subsection{Number of gates}
Given the number of gates in the controlled addition and swap operations, the number of additions and swaps in the multiplication and the number of multiplications in the modular exponentiation, we estimate that factorization takes at leading order $11 n_e {(n+m)}^{2}$~CNOTs and $4 n_e {(n+m)}^2$~Toffoli gates.
\section{Coset representation}\label{appendix:coset_representation}
\begin{figure*}
\mbox{\small \Qcircuit @R=1em @C=0.3em {
& &\lstick{\ket{0}}&\gate{H}&\ctrl{1} &\gate{H}&\meter &\lstick{\ket{0}}&\gate{H}&\ctrl{1} &\gate{H}&\meter & & && &\lstick{\ket{0}}&\gate{H}&\ctrl{1} &\gate{H}&\meter & \\
\lstick{\ket{z}}&\qw {/}&\ustick{n}\qw &\qw &\multigate{1}{+N}& \qw&\multigate{1}{-\identite \text{ if } x \geq N}\cwx&\qw &\qw &\multigate{1}{+2N}& \qw&\multigate{1}{-\identite \text{ if } x \geq 2N}\cwx&\qw&\push{\dots}&&\qw&\qw &\qw &\multigate{1}{+2^{m-1} N}& \qw&\multigate{1}{-\identite \text{ if } x \geq 2^{m-1}N}\cwx&\qw\\
\lstick{\ket{0}}&\qw {/}&\ustick{m}\qw &\qw & \ghost{+N}& \qw& \ghost{-\identite \text{ if } x \geq N} &\qw &\qw & \ghost{+2N}& \qw& \ghost{-\identite \text{ if } x \geq 2N} &\qw&\push{\dots}&&\qw&\qw &\qw & \ghost{+2^{m-1} N}& \qw& \ghost{-\identite \text{ if } x \geq 2^{m-1}N} &\qw\\
}
}
\caption{Preparation proposed in~\cite[Fig.\,1]{Gidney2019Approximateencodedpermutations} of a quantum register with $n+m$~qubits in the state $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{z + k N}$ as requested in the initialization of the coset representation.
The first controlled operation adds the integer $N$ to the register made with $n+m$~qubits provided that the ancillary qubit is in state $\ket{1}$.
The first classically controlled operation aims to change the phase of the input state encoded in $n+m$~qubits if and only if the result of the measurement is $1$ and the number encoded in the $n+m$~qubits is larger or equal than $N$.
In case one of the two conditions is not met, the input state is unchanged.}\label{fig:coset_init}
\end{figure*}
Modular addition is typically implemented with variants of the addition: an addition, a comparison, a controlled correction and the clean-up of ancillary qubits~\cite{EkertPRA1996Quantumnetworkselementary}.
As exposed in main text, coset representation of integers, introduced by Zalka~\cite{Zalka2006Shorsalgorithmfewer} and formalized by Gidney~\cite{Gidney2019Approximateencodedpermutations}, can be used to approximate the modular addition with a single standard adder circuit.
The basic idea of the coset representation for adding $2^j \gamma$ modulo $N$ to a quantum register encoding the integer $z$ is to extend the register for $z$ with $m$~additional qubits and to encode it into the state $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{z + k N}$.
Except at the bounds, this state is invariant under the addition of $N$.
This implies
\begin{multline}\label{eq:coset}
\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{\left(z + 2^j \gamma + k N\right) \mod 2^{n+m}} \\
\approx \frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{\left(z + 2^j \gamma \mod N\right) + k N}
\end{multline}
\latin{i.e.\@} the modular addition of $2^j \gamma$ in the register of $z$ can be performed with a standard adder (modulo $2^{n+m}$), at the cost of a small error which is exponentially suppressed when increasing $m$~\cite{Gidney2019Approximateencodedpermutations}.
Note also that the precision is improved if instead of adding $2^j \gamma$, one adds $2^j \gamma \mod N$ (which does not change the result of the sum since we consider the sum modulo $N$).
This is possible each time the quantity to add is known classically.
The goal of the first subsection is to show that the resource needed to extend the register encoding $\ket{z}$ into the state $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{z + k N}$, as requested in this representation, is negligible with respect to the resource taken to implement the modular exponentiation.
In the second subsection, we show that the coset representation is compatible with the modular multiplication circuit presented in the main text.
In the two next subsections, the coset representation is considered for additions modulo $N$; $n$ is the number of bits encoding $N$, and $m$ the number of qubits added to the register for the coset representation.
\subsection{Initialization}
Starting from a register with $n$~qubits in state $\ket{z}$, the initialization of the coset representation consists in preparing the state $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{z + k N}$ in an extended register of size $n+m$.
This is done by performing successive additions, each controlled by an ancillary qubit prepared in the state $\frac{\ket{0}+\ket{1}}{\sqrt{2}}$ ($m$~ancillary qubits in total) which is then uncomputed, see \autoref{fig:coset_init}.
The controlled addition is performed using the circuit presented in \autoref{subfig:adder_semiclassical_controlled:adder_semiclassical_controlled} with only one control qubit.
The uncomputation of the ancillary qubit is based on a measurement and depending on the result, a conditioned correction is realized, see \autoref{fig:coset_init}.
Let us detail the uncomputation of the first ancillary qubit presented in \autoref{fig:coset_init}.
When the result of the measurement is $0$, the register made with $n+m$~qubits is projected into $\frac{1}{\sqrt{2}}\left(\ket{z} + \ket{z+N}\right)$.
When the result is $1$, the register state is $\frac{1}{\sqrt{2}}\left(\ket{z} - \ket{z+N}\right)$ and the operation $-\identite$ needs to be applied to the component $\ket{z+N}$, \latin{i.e.\@}, when the state of the register encodes an integer larger than $N$.
In order to implement the conditioned operations for decomputing the $m$~ancillary qubits, we need to compare the value $x$ encoded in the quantum register of size $n+m$ and an integer $y$ known classically satisfying $0 < y \leq 2^{m-1}N < 2^{n+m}$ (see the last umcomputation in \autoref{fig:coset_init}) \latin{i.e.\@} that can be written with $n+m$~bits.
This comparison is implemented using the circuit presented in \autoref{subfig:comparison:comparison}.
First, the value $2^{n+m}-y = y'$ is computed classically.
Then the last carry of the sum of $x$ and $y'$ is computed with a circuit derived from the addition.
If the value of this carry is $1$, we conclude that $x \geq y$, otherwise $x < y$.
A $Z$ gate is thus applied on the qubit encoding the last carry, before uncomputing the carries.
The register ends up in state $\pm\ket{x}$ depending on the relative value between $x$ and $y$, as desired.
Each controlled addition and correction costs $\bigO{n+m}$ gates.
This operation is repeated $m$~times, giving a total cost of the coset representation initialization of the order $\bigO{m(n+m)}$.
\begin{figure}[h]
\subfloat[Semi-classical comparison and correction]{\label{subfig:comparison:comparison}
\mbox{\small \Qcircuit @R=0.7em @C=0.2em {
\lstick{x_0} &\ctrl{2} &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{2} &\rstick{x_0} \qw\\
\lstick{y'_0}&\cctrl{0}&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cctrl{0}&\rstick{y'_0}\cw\\
& &\ctrl{1}&\targ &\ctrl{1}&\targ &\ctrl{3}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{3}&\targ &\ctrl{1}&\targ &\ctrl{1}&\qw & \\
\lstick{x_1} &\qw &\targ &\qw &\ctrl{2}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{2}&\qw &\targ &\qw &\rstick{x_1} \qw\\
\lstick{y'_1}&\cw &\cw &\cctrl{-2}&\cw &\cctrl{-2}&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cctrl{-2}&\cw &\cctrl{-2}&\cw &\cw &\rstick{y'_1}\cw \gategroup{3}{3}{6}{25}{1em}{--}\\
& & & & &\qw &\targ &\qw & & & & & & & & & & & & &\targ &\qw &\qw & & & & \\
& & & & & & &\qwx&\ctrl{1}&\targ &\ctrl{1}&\targ &\ctrl{3}&\qw &\ctrl{3}&\targ &\ctrl{1}&\targ &\ctrl{1}&\qw\qwx& & & & & & & \\
\lstick{x_2} &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\targ &\qw &\ctrl{2}&\qw &\qw &\qw &\qw &\qw &\ctrl{2}&\qw &\targ &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\rstick{x_2} \qw\\
\lstick{y'_2}&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cctrl{-2}&\cw &\cctrl{-2}&\cw &\cw &\cw &\cctrl{-2}&\cw &\cctrl{-2}&\cw &\cw &\cw &\cw &\cw &\cw &\cw &\cw &\rstick{y'_2}\cw \\
& & & & & & & & & & &\qw &\targ &\gate{Z}&\targ &\qw &\qw & & & & & & & & & & \\
} }
}
\subfloat[AND computation]{\label{subfig:comparison:and}
\hspace{0.2em}
\mbox{\small \Qcircuit @R=0.5em @C=0.5em {
&&\ctrl{1}&\qw && &&&\qw &\ctrl{1}&\qw\\
&&\ctrl{1}&\qw &&=&&&\qw &\ctrl{1}&\qw\\
&& &\qw && &&&\push{\ket{0}}&\targ &\qw\\
}
}
\hspace{0.2em}
}
\hfil
\subfloat[AND uncomputation]{\label{subfig:comparison:deand}
\hspace{0.4em}
\mbox{\small \Qcircuit @R=0.5em @C=0.5em {
&&\ctrl{1}&\qw && &&&\qw &\ctrl{1}&\qw &\qw\\
&&\ctrl{1}&\qw &&=&&&\qw &\ctrl{1}&\qw &\qw\\
&&\qw & && &&&\qw &\targ &\push{\ket{0}} \qw& \\
}
}
\hspace{0.4em}
}
\caption{
\protect\subref{subfig:comparison:comparison}:
Circuit inspired from~\cite[Fig.\,17]{Babbush2020CompilationFaultTolerant} which compares the integer $x$ encoded in $n+m$~qubits and the integer $y<2^{n+m}$ known classically, and returns $-\ket{x}$ if and only if $x \geq y$.
This is done in three steps: i) compute the carries of $y'+x$ with $y' = 2^{n+m} - y$, ii) apply a $Z$ operation on the last carry and iii) uncompute the carries.\\
\protect\subref{subfig:comparison:and} and \protect\subref{subfig:comparison:deand}: circuits defining the notations used to compute and uncompute an AND operation, as introduced in~\cite{GidneyQ2018Halvingcostquantum,NevenPRX2018EncodingElectronicSpectra} where the authors give efficient implementations in terms of $T$ (or $\frac{\pi}{4}$) gates.
When only one quantum control appear, it uses a CNOT instead of a Toffoli gate, and it can be removed by directly using the control bit instead of the ancillary.
}\label{fig:comparison}
\end{figure}
In the modular exponentiation algorithm, the two registers at the bottom of \autoref{fig:multiplication} need to be prepared initially in $x=1$ and $0$ respectively.
Initializing them in the coset representation $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{1 + k N}$ and $\frac{1}{\sqrt{2^{m}}} \sum\limits_{k=0}^{2^{m}-1} \ket{k N}$ takes $\bigO{m(n+m)}$~gates which is negligible compared to the cubic cost of the full exponentiation.
Note however, that the cost of this initialization is taken into account in our script for the evaluation of the whole algorithm cost.
\begin{figure*}
\subfloat[Multiplication for the exponentiation, with $i=2$ and $w_e=2$, decomposed into product-additions.]{\label{subfig:exponentiation:multiplication}
\mbox{\small \providecommand{\multicontrolgate}[2]{\multimeasure{#1}{#2}}
\providecommand{\controlgate}[1]{\measure{#1}}
\Qcircuit @R=0.5em @C=0.5em {
&\qw &\qw &\qw &&& && &\qw &\qw &\qw &\qw &\qw&\qw &\qw \\
&\qw &\qw &\qw &&& && &\qw &\qw &\qw &\qw &\qw&\qw &\qw \\
&\qw &\multicontrolgate{1}{\text{Input }e_{i:i+w_e}}&\qw &&& && &\qw &\qw &\multicontrolgate{1}{\text{Input }e_{i:i+w_e}}&\multicontrolgate{1}{\text{Input }e_{i:i+w_e}} &\qw&\qw &\qw \\
&\qw & \ghost{\text{Input }e_{i:i+w_e}}&\qw &&&=&& &\qw &\qw & \ghost{\text{Input }e_{i:i+w_e}}& \ghost{\text{Input }e_{i:i+w_e}} &\qw&\qw &\qw \\
&\qw &\qw\qwx &\qw &&& && &\qw &\qw &\qw\qwx &\qw\qwx &\qw&\qw &\qw \\
&\qw &\qw\qwx &\qw &&& && &\qw &\qw &\qw\qwx &\qw\qwx &\qw&\qw &\qw \inputgroupv{1}{6}{0.75em}{2.2em}{\ket{e}}\\
& &\qwx & &&& && & & &\qwx &\qwx & & & \\
& &\qwx & &&& && & & &\qwx &\qwx & & & \\
\lstick{\ket{x}}&{/}\qw&\gate{\times g^{2^i e_{i:i+w_e}} \mod{N}}\qwx &\qw &&& && &\lstick{\ket{x}}&{/}\qw&\controlgate{\text{Input }x}\qwx &\gate{+ \bar{x} \left(-g^{-2^i e_{i:i+w_e}}\right) \mod{N}}\qwx&\qw&\link{1}{-1} &\qw \\
& & & &&& && &\lstick{\ket{0}}&{/}\qw&\gate{+ x g^{2^i e_{i:i+w_e}} \mod{N}}\qwx &\controlgate{\text{Input }\bar{x}}\qwx &\qw&\link{-1}{-1}&\push{\bra{0}}\qw \\
}
}
}
\medskip
\subfloat[Windowed product-addition, as needed in \protect\subref{subfig:exponentiation:multiplication}, with the windows size $w_m = 3$.]{\label{subfig:exponentiation:product_add}
\mbox{\small \providecommand{\multicontrolgate}[2]{\multimeasure{#1}{#2}}
\providecommand{\controlgate}[1]{\measure{#1}}
\Qcircuit @R=0.5em @C=0.5em {
&{/}\qw&\ustick{w_e}\qw&\controlgate{\text{Input }e_{i:i+w_e}} &\qw &&& && &{/}\qw&\ustick{w_e}\qw&\controlgate{\text{Input }e_{i:i+w_e}} &\controlgate{\text{Input }e_{i:i+w_e}} &\qw&\\
&\qw &\qw &\multicontrolgate{5}{\text{Input }x}\qwx &\qw &&& && &\qw &\qw &\multicontrolgate{2}{\text{Input }x_{0:3}}\qwx &\qw\qwx &\qw&\\
&\qw &\qw & \ghost{\text{Input }x} &\qw &&& && &\qw &\qw & \ghost{\text{Input }x_{0:3}} &\qw\qwx &\qw&\\
&\qw &\qw & \ghost{\text{Input }x} &\qw &&& && &\qw &\qw & \ghost{\text{Input }x_{0:3}} &\qw\qwx &\qw&\\
&\qw &\qw & \ghost{\text{Input }x} &\qw &&&=&& &\qw &\qw &\qw\qwx &\multicontrolgate{2}{\text{Input }x_{3:6}}\qwx &\qw&\\
&\qw &\qw & \ghost{\text{Input }x} &\qw &&& && &\qw &\qw &\qw\qwx & \ghost{\text{Input }x_{3:6}} &\qw&\\
&\qw &\qw & \ghost{\text{Input }x} &\qw &&& && &\qw &\qw &\qw\qwx & \ghost{\text{Input }x_{3:6}} &\qw&\\
&{/}\qw&\qw &\gate{+ x g^{2^i e_{i:i+w_e}} \mod{N}}\qwx&\qw &&& && &{/}\qw&\qw &\gate{+ 2^{0} x_{0:3} g^{2^i e_{i:i+w_e}} \mod{N}}\qwx& \gate{+ 2^{3} x_{3:6} g^{2^i e_{i:i+w_e}} \mod{N}}\qwx&\qw&\\
}
}
}
\medskip
\subfloat[Modular addition of a number read with a table lookup, as needed in \protect\subref{subfig:exponentiation:product_add}.]{\label{subfig:exponentiation:lookup_add}
\mbox{\small \providecommand{\controlgate}[1]{\measure{#1}}
\Qcircuit @R=1em @C=0.75em {
&{/}\qw&\ustick{\hspace{-0.5em}w_e+w_m}\qw&\controlgate{\text{Input }k}&\qw && && &{/}\qw &\ustick{\hspace{-0.5em}w_e+w_m}\qw&\qw &\controlgate{\text{Input }k}&\qw&\qw &\qw &\controlgate{\text{Input }k}&\qw &\\
& & & \qwx & &&=&& &\lstick{\ket{0}}&{/}\qw &\ustick{n}\qw&\gate{\text{Load }T_k}\qwx &\qw&\ustick{\ket{T_k}}\qw&\controlgate{\text{Input } T_k}&\gate{\text{Unload }T_k}\qwx&\rstick{\ket{0}}\qw&\\
&{/}\qw&\qw &\gate{+ T_k \mod{N}}\qwx &\qw && && &{/}\qw &\qw &\qw &\qw &\qw&\qw &\gate{+T_k \mod N}\qwx &\qw &\qw &\\
}
}
}
\caption{Windowed arithmetic subcircuits for the modular exponentiation.
When not specified, the register size is $n+m$~qubits (register encoded into the coset representation of integers).}\label{fig:exponentiation}
\end{figure*}
\subsection{Compatibility with the multiplication}
When computing the multiplications from sequences of two product-additions (see \autoref{fig:multiplication} of main text), the input register encoding $x$ and the ancillary register are used both as control and target of the product-additions.
We here check that having the control register encoded in the coset representation is not a problem for performing the multiplication.
Let us consider the first product-addition used to implement the multiplication shown in the bottom part of \autoref{fig:multiplication}.
In the coset representation, the input $x$ and ancillary registers are in the state $\frac{1}{2^{m}} \sum\limits_{k=0}^{2^m-1} \ket{x + k N} \sum\limits_{k'=0}^{2^m-1} \ket{0 + k' N}$ meaning that after the product-addiction, their state ends up in $\frac{1}{2^{m}} \sum\limits_{k=0}^{2^m-1} \sum\limits_{k'=0}^{2^m-1} \ket{x + k N} \ket{(x + k N)g^{2^i} + k' N \mod{2^{n+m}}}$.
As $kN g^{2^i} + k'N$ is a multiple of $N$, the obtained state is very close to $\frac{1}{2^{m}} \sum\limits_{k=0}^{2^m-1} \ket{x + k N} \sum\limits_{k'=0}^{2^m-1} \ket{x g^{2^i} + k' N}$ thanks to the coset representation itself, \latin{cf.\@} \autoref{eq:coset}.
The latter corresponds to the desired state.
\section{Windowed arithmetic}\label{appendix:windowed_arithmetic}
In order to reduce the number of multiplications and additions in the exponentiation algorithm, we use windowed arithmetic circuits~\cite{Gidney2019Windowedquantumarithmetic}.
They consist in grouping the bits of $e$ for controlling each multiplication, hence reducing the number of multiplications.
Similarly, for each multiplication, the input bits are grouped to reduce the number of additions composing each multiplication.
The next subsection shows the details of the decomposition of the exponentiation into elementary additions of the form $+T_k \mod N$ where the quantity $T_k$ depends on the value of an integer $k$.
These specific additions are implemented in three steps, that are presented in separated subsequent subsections.
\subsection{Windowed exponentiation and multiplication}
Let us start by specifying the notations.
We label the binary form of $e$ as
\begin{equation}
e_{n_e-1} \ldots e_{i+w_e} \overbrace{e_{i+w_e-1} \ldots e_{i}}^{e_{i:i+w_e}} \ldots e_{2} e_{1} e_{0}
\end{equation}
\latin{i.e.\@} $e_j$ is the $j$th bit of $e$.
Let also $e_{i:i+w_e}$ be defined as
\begin{equation}
e_{i:i+w_e} = \sum\limits_{j=i}^{i+w_e-1} 2^{j-i} e_j
\end{equation}
\latin{i.e.\@} $e_{i:i+w_e}$ is the number whose bit decomposition is given by the bits of $e$ starting at index $i$ and taking $w_e$~bits.
The strategy for computing the exponentiation using windowed arithmetic consists in decomposing exponent $e$ in terms of numbers $e_{i:i+w_e}$
\begin{equation}
e = \sum\limits_{\mathclap{\substack{0 \leq i < n_e \\ i \equiv 0 \mod w_e}}} 2^{i} e_{i:i+w_e},
\end{equation}
such that
\begin{equation}\label{eq:decompose_exponent_windowarithmetic}
g^e
= \prod\limits_{\mathclap{\substack{0 \leq i < n_e \\ i \equiv 0 \mod w_e}}} g^{2^{i} e_{i:i+w_e}}.
\end{equation}
The comparison with the decomposition of $g^e$ presented in \autoref{eq:decompose_exponent} clearly shows that windowed exponentiation divides the number of multiplications by $w_e$.
As for the standard algorithm, the multiplications of the product~\eqref{eq:decompose_exponent_windowarithmetic} are implemented successively and each multiplication is decomposed into a sequence of two product-additions, as shown in \autoref{subfig:exponentiation:multiplication}.
The difference is that the added number now depends on the number $e_{i:i+w_e}$.
The product-addition is also performed in a windowed way~\cite{Gidney2019Windowedquantumarithmetic}.
\autoref{subfig:exponentiation:product_add} shows in particular how the first product-addition needed for each multiplication is performed using windows for input $x$ of size $w_m=3$.
\autoref{subfig:exponentiation:lookup_add} finally shows the implementation of an addition $+T_k \mod N$ of a quantity $T_k$ that depends on the value $k$.
It requires three steps.
First, the number $T_k$ is loaded into an ancillary register.
Second, this number is unconditionally added to the desired register and finally the ancillary register is cleaned up.
Note that the value of $T_k$ (given by $T_{k_1, k_2} = 2^{i} k_1 g^{2^i k_2}$, with $k_1 = e_{i:i+w_e}$ and $k_2 = x_{i:i+w_m}$, $k$ being the concatenation of $k_1$ and $k_2$) to be added is known classically.
Its addition being realized modulo $N$, its value can be computed modulo $N$ before being loaded.
$n$~bits are thus sufficient to encode $T_k$.
Loading a value $T_k$ into a quantum register is done using a quantum table lookup circuit which we discuss right after.
The subsequent subsection is dedicated to the task aiming to unload the value $T_k$ and reset the register in state $\ket{0}$.
The last subsection is dedicated to the requested addition.
\subsection{Table lookup}
The quantum table lookup proposed in~\cite{NevenPRX2018EncodingElectronicSpectra}, produces the following operation on basis states: $\ket{k}\ket{x} \mapsto \ket{k}\ket{x \oplus T_k}$ with $\oplus$ the bitwise XOR operator.
For state preparation, as required in the first step of the operation presented in \autoref{subfig:exponentiation:lookup_add}, the target register starts in the state $\ket{0}$ such that control and target registers end in $\ket{k}\ket{T_k}$.
The circuit presented in \autoref{fig:qrom} shows the principle of this operation with registers for $k$ and $T_k$ composed respectively of 3 and 5~qubits.
\begin{figure}[h]
\mbox{\small \hspace{1em}
\Qcircuit @C=0.25em @R=0.5em {
\lstick{k_2} &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\ctrl{2}&\qw &\qw &\qw &\qw &\qw &\ctrl{1} &\targ&\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\ctrl{2}&\qw &\qw &\qw &\qw &\qw &\ctrl{1} &\targ&\qw \\
\lstick{k_1} &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrlo{1}&\qw &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrlo{1}&\qw &\qw \\
& &\ctrl{1}&\qw &\ctrl{2}&\qw &\ctrl{1} &\targ &\ctrl{1}&\qw &\ctrl{2}&\qw &\ctrl{1} &\qw & & &\ctrl{1}&\qw &\ctrl{2}&\qw &\ctrl{1} &\targ &\ctrl{1}&\qw &\ctrl{2}&\qw &\ctrl{1} &\qw & & \\
\lstick{k_0} &\qw &\ctrl{1}&\qw &\qw &\qw &\ctrlo{1}&\qw &\ctrl{1}&\qw &\qw &\qw &\ctrlo{1}&\qw &\qw &\qw &\ctrl{1}&\qw &\qw &\qw &\ctrlo{1}&\qw &\ctrl{1}&\qw &\qw &\qw &\ctrlo{1}&\qw &\qw &\qw \\
& & &\ctrl{3} &\targ &\ctrl{3} &\qw & & &\ctrl{3} &\targ &\ctrl{3} &\qw & & & & &\ctrl{3} &\targ &\ctrl{3} &\qw & & &\ctrl{3} &\targ &\ctrl{3} &\qw & & & \\
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\
\lstick{\ket{0}}&\qw &\qw &\targ_? &\qw &\targ_? &\qw &\qw &\qw &\targ_? &\qw &\targ_? &\qw &\qw &\qw &\qw &\qw &\targ_? &\qw &\targ_? &\qw &\qw &\qw &\targ_? & \qw &\targ_? &\qw &\qw &\qw &\qw \\
\lstick{\ket{0}}&\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx& \qw &\targ_? \qwx&\qw &\qw &\qw &\qw \\
\lstick{\ket{0}}&\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx& \qw &\targ_? \qwx&\qw &\qw &\qw &\qw \\
\lstick{\ket{0}}&\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx& \qw &\targ_? \qwx&\qw &\qw &\qw &\qw \\
\lstick{\ket{0}}&\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\qw &\qw &\targ_? \qwx&\qw &\targ_? \qwx&\qw &\qw &\qw &\targ_? \qwx& \qw &\targ_? \qwx&\qw &\qw &\qw &\qw \gategroup{3}{3}{6}{7}{0.5em}{--} \\
& & & T_7 & & T_6 & & & & T_5 & & T_4 & & & & & & T_3 & & T_2 & & & & T_1 & & T_0 & & & & \\
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\
} }
\caption{
Example of a quantum table lookup.
For a basis state $\ket{k}$ specifying the address of the number $T_k$ from a classical table, the quantum table lookup maps basis states $\ket{k}\ket{0}$ into $\ket{k}\ket{T_k}$.
Here $k$ and the output are composed respectively of 3 and 5~qubits.
The notations for the AND computation and uncomputation is presented in \autoref{fig:comparison}.
Black and white circles are controls on the $\ket{1}$ and $\ket{0}$ states respectively.
The question mark on the controlled NOT means that a controlled NOT is applied on qubit $i$ only when the $i$th bit of $T_k$ takes the value $1$.
}\label{fig:qrom}
\end{figure}
Concretely, the numbers $T_k$ specify the set of controlled NOT to be used (the question mark on the controlled NOT means that a controlled NOT is applied on qubit $i$ only when the $i$th bit of $T_k$ takes the value $1$).
The circuit operating on the bits $k_i$ of $k$ prepares the last ancillary qubit (line 5 from the top) in the state $\ket{1}$ at the time (specified by $k$) where the gates corresponding to $T_k$ are applied, and $\ket{0}$ otherwise.
The building block of the circuit is boxed in \autoref{fig:qrom}.
It uses 1 CNOT, 1 AND computation and uncomputation.
Given that $k$ is encoded into the number of bits $w_e+w_n$ and can thus take $2^{w_e+w_n}$~different values, the number of blocks in the upper part of \autoref{fig:qrom} is given by $\sum\limits_{j=1}^{w_e+w_m-1} 2^j = 2^{w_e-w_n}-2$.
This means that $2^{w_e + w_m} - 2$~CNOT gates, $2^{w_e + w_m} - 2$~AND computations and uncomputations are needed to implement these blocks.
Moreover, the number of controlled multi-NOT gates to load the value $T_k$ is given by $2^{w_e+w_m}$, each gate being decomposed into $n/2$~CNOT in average since $T_k$ takes $n$~bits.
When including the (two) NOT gates operating on the highest bit of $k$, we conclude that the table lookup uses $2$~NOT gates, $2^{w_e + w_m} - 2 + 2^{w_e+w_m-1}n$~CNOT gates, $2^{w_e + w_m} - 2$~AND computations and uncomputations (corresponding to $2 \times \left(2^{w_e + w_m} - 2\right)$~Toffoli gates).
\subsection{Table unlookup}
The purpose of the table unlookup operation (last step in \autoref{subfig:exponentiation:lookup_add}) is to map the state $\sum\limits_{k} \alpha_k \ket{k} \ket{T_k}$ into $\sum\limits_k \alpha_k \ket{k}$, where $\alpha_k$ are some complex coefficients.
A natural way to do this mapping is to apply again the lookup operation described in the previous subsection.
Since the lookup operates on the computational basis following $\ket{k}\ket{x} \mapsto \ket{k}\ket{x \oplus T_k}$ where $\oplus$ stands for the bitwise XOR operator, by linearity it maps $\sum\limits_{k} \alpha_k \ket{k} \ket{T_k} \mapsto \sum\limits_k \alpha_k \ket{k} \ket{0}$, the latter corresponding to the desired state when simply discarding the qubits previously encoding the numbers $T_k$.
However, a more efficient measurement-based technique is possible, as shown in Ref.\,\cite[Appendix~C]{BabbushQ2019QubitizationArbitraryBasis} and improved in Ref.\,\cite{Gidney2019Windowedquantumarithmetic}.
The principle consists in starting by measuring the register encoding $T_k$ in the $X$ basis before applying a phase shift conditioned on the result of measurements.
For a more detailed explanation, let us start to expand the qubits encoding the numbers $T_k$ in bits indexed by $j$ (${(T_k)}_j$ being the $j$th bit of $T_k$).
The state before the uncomputation can be written as
\begin{equation}
\sum\limits_k \alpha_k \ket{k} \bigotimes\limits_j \ket{{(T_k)}_j}_j.
\end{equation}
Let us now focus on a specific qubit indexed by $j^*$.
We label $\mathcal{K}_0 = \lbrace k \mid {(T_k)}_{j^*} = 0 \rbrace$ and $\mathcal{K}_1 = \lbrace k \mid {(T_k)}_{j^*} = 1 \rbrace$.
The state before the uncomputation can be rewritten as
\begin{multline}
\left[\sum\limits_{k \in \mathcal{K}_0} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j \right] \ket{0}_{j^*} \\
+ \left[\sum\limits_{k \in \mathcal{K}_1} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j \right] \ket{1}_{j^*}.
\end{multline}
By applying a Hadamard gate on the $j^*$th qubit, we obtain
\begin{multline}
\frac{1}{\sqrt{2}}\left[
\begin{multlined}
\sum\limits_{k \in \mathcal{K}_0} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j \\
+ \sum\limits_{k \in \mathcal{K}_1} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j
\end{multlined}
\right] \ket{0}_{j^*}\\
+ \frac{1}{\sqrt{2}}\left[
\begin{multlined}
\sum\limits_{k \in \mathcal{K}_0} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j \\
- \sum\limits_{k \in \mathcal{K}_1} \alpha_k \ket{k} \bigotimes\limits_{j \neq j^*} \ket{{(T_k)}_j}_j
\end{multlined}
\right] \ket{1}_{j^*}.
\end{multline}
Hence, if the measurement of the $j^*$th qubit yields $0$, the qubit is properly uncomputed.
If the result is $1$, a phase shift needs to be applied on states corresponding to the indexes $k \in \mathcal{K}_1$.
This uncomputation is successively applied to all the qubits encoding the numbers $T_k$.
Let $t_j$ be the measurement result of the $j$th qubit.
The state after all the measurements is given by
\begin{equation}\label{eq:statekTk}
\sum\limits_k \alpha_k \sigma_k \ket{k},
\end{equation}
with $\sigma_k = \prod\limits_{j} {(-1)}^{t_j {(T_k)}_j}$.
We now label
\begin{equation}\label{eq:mathacalK}
\mathcal{K} = \lbrace k \mid \sigma_k = -1 \rbrace.
\end{equation}
In order to recover the desired state, we need to correct selectively the phase of terms $\ket{k}$ for which $k \in \mathcal{K}$.
\begin{figure}[h]
\mbox{\small \providecommand{\multicontrolgate}[2]{\multimeasure{#1}{#2}}
\providecommand{\controlgate}[1]{\measure{#1}}
\providecommand{\nmultigate}[2]{*+<1em,.9em>{\hphantom{#2}} \POS [0,0]="i",[0,0].[#1,0]="e",!C *{#2},"e"+UR;"e"+UL **\dir{-};"e"+DL **\dir{-};"e"+DR **\dir{-};"e"+UR **\dir{-},"i"}
\providecommand{\ngate}[1]{*+<.6em>{#1} \POS ="i","i"+UR;"i"+UL **\dir{-};"i"+DL **\dir{-};"i"+DR **\dir{-};"i"+UR **\dir{-},"i"}
\Qcircuit @R=0.6em @C=0.3em {
\lstick{\ket{k_{:s}}}&\qw&\qw&\qw&\qw&\qw&{/}\qw&\ustick{s} \qw&\controlgate{\text{Input }k_{:s}}& \qw&\qw &\qw &\qw &\qw &\controlgate{\text{Input }k_{:s}}&\qw \\
\lstick{\ket{k_{s:}}}&\qw&\qw&\qw&\qw&\qw&{/}\qw&\ustick{w_e+w_m-s}\qw&\qw\qwx & \qw&\qw &\qw &\controlgate{\text{Input }k_{s:}}&\qw &\qw\qwx &\qw \\
& & & & & & & &\ngate{\text{Init unary}}\qwx &{/}\qw&\ustick{2^s}\qw&\gate{H}&\gate{\oplus F_{k_{s:}}} \qwx&\gate{H}&\gate{\text{Deinit unary}}\qwx & \\
} }
\caption{
Representation of the four steps proposed in Ref.\,\cite{Gidney2019Windowedquantumarithmetic} to selectively change the phase of components $\ket{k}$ in the state given in~\eqref{eq:statekTk} when the index $k$ belongs to $\mathcal{K}$~\eqref{eq:mathacalK}.
The central operation is a table lookup with the values $F_{k_{s:}} = \sum\limits_{j=0}^{2^s-1} 2^j \delta(j + 2^s k_{s:})$ where $\delta()$ is the indicator function of $\mathcal{K}$.
}\label{fig:selective_correct}
\end{figure}
\begin{figure}[h]
\subfloat[Binary to unary conversion]{\label{subfig:unary:init}
\mbox{\small \Qcircuit @R=0.6em @C=0.1em {
&\qw&\qw &\qw &\ctrl{4}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw \\
&\qw&\qw &\qw &\qw &\qw &\ctrl{3}&\qw &\ctrl{4}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw \\
&\qw&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{2}&\qw &\ctrl{3}&\qw &\ctrl{4}&\qw &\ctrl{5}&\qw &\qw\inputgroupv{1}{3}{0.7em}{1em}{\ket{x}} \\
& & & & & & & & & & & & & & & & & & \\
& &\lstick{\ket{0}}&\targ&\ctrl{1}&\targ &\ctrl{2}&\targ &\qw &\qw &\ctrl{4}&\targ &\qw &\qw &\qw &\qw &\qw &\qw &\qw \\
& & & & &\ctrl{-1}&\qw &\qw &\ctrl{2}&\targ &\qw &\qw &\ctrl{4}&\targ &\qw &\qw &\qw &\qw &\qw \\
& & & & & & &\ctrl{-2}&\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{4}&\targ &\qw &\qw &\qw \\
& & & & & & & & &\ctrl{-2}&\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{4}&\targ &\qw \\
& & & & & & & & & & &\ctrl{-4}&\qw &\qw &\qw &\qw &\qw &\qw &\qw \\
& & & & & & & & & & & & &\ctrl{-4}&\qw &\qw &\qw &\qw &\qw \\
& & & & & & & & & & & &\ &\ & &\ctrl{-4}&\qw &\qw &\qw \\
& & & & & & & & & & & &\ &\ & & & &\ctrl{-4}&\qw \\
} }
}
\hfil
\subfloat[Unary to binary conversion]{\label{subfig:unary:deinit}
\mbox{\small \Qcircuit @R=0.6em @C=0.1em {
&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{4} &\qw &\qw &\qw \\
&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{4}&\qw &\ctrl{3}&\qw &\qw &\qw &\qw &\qw \\
&\qw &\ctrl{5}&\qw &\ctrl{4}&\qw &\ctrl{3}&\qw &\ctrl{2}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw\inputgroupv{1}{3}{0.7em}{1em}{\ket{x}} \\
& & & & & & & & & & & & & & & & & \\
&\qw &\qw &\qw &\qw &\qw &\qw &\targ &\ctrl{4}&\qw &\qw &\targ &\ctrl{2}&\targ &\ctrl{1} &\targ&\rstick{\ket{0}}\qw& \\
&\qw &\qw &\qw &\qw &\targ &\ctrl{4}&\qw &\qw &\targ &\ctrl{2}&\qw &\qw &\ctrl{-1} &\qw & & & \\
&\qw &\qw &\targ &\ctrl{4}&\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{-2}&\qw & & & & & \\
&\targ &\ctrl{4}&\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{-2}&\qw & & & & & & & \\
&\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{-4}&\qw & & & & & & & & & \\
&\qw &\qw &\qw &\qw &\ctrl{-4}&\qw & & & & & & & & & & & \\
&\qw &\qw &\ctrl{-4}&\qw & & & & & & & & & & & & & \\
&\ctrl{-4}&\qw & & & & & & & & & & & & & & & \\
} }
}
\caption{
\protect\subref{subfig:unary:init}: representation of the circuit proposed in Ref.\,\cite{Gidney2019Windowedquantumarithmetic} for preparing a copy in a ancillary register of an integer $x$ in a unary representation starting from an encoding of $x$ in a control register in the binary representation.
The first not operation prepares the first qubit in the ancillary register in state $\ket{1}$.
The first AND computation writes the result of an AND operation between the first bit of $x$ and the bit $1$ encoded in the first qubit of the ancillary register into the second qubit of the ancillary register.
In case the state of the latter is $\ket{1}$, the state of the first qubit of the ancillary register is changed to $\ket{0}$.
The combination of AND and CNOT operations is successively repeated until the desired qubit of the ancillary register is in state $\ket{1}$.
\protect\subref{subfig:unary:deinit}: representation of the circuit proposed in Ref.\,\cite{Gidney2019Windowedquantumarithmetic} to erase the value in the ancillary register while keeping the integer $x$ into the control register.
The circuits \protect\subref{subfig:unary:init} and \protect\subref{subfig:unary:deinit} corresponds to the first and third operations needed for the selective phase correction operation presented in \autoref{fig:selective_correct}.
}\label{fig:unary}
\end{figure}
The selective phase correction is done in four steps~\cite{Gidney2019Windowedquantumarithmetic}, as shown in~\autoref{fig:selective_correct}.
First, the control register which uses $w_e+w_m$~qubits in state $\ket{k}$ is split in two groups.
The first group is made with $s$~qubits in state $\ket{k_{:s}}$.
The second group takes the remaining $w_e+w_m-s$~qubits in state $\ket{k_{s:}}$, such that $\ket{k}=\ket{k_{s:}} \otimes \ket{k_{:s}}$ and $k = k_{:s} + 2^s k_{s:}$.
The second step consists in writing the integer $k_{:s}$ in an ancillary register in the unary representation: a register with $2^s$~qubits representing a number $k_{:s}$ with the state of the qubit number $k_{:s}$ being $\ket{1}$ and all the other qubits in the state $\ket{0}$.
The qubits in state $\ket{k_{s:}}$ and the ancillary qubits are then used as control and target qubits for a lookup circuit where the controlled multi-NOT gates are replaced by controlled multi-$Z$ gates.
Finally, the ancillary register is uncomputed.
The circuit used to initialize the ancillary register in shown in~\autoref{subfig:unary:init}.
The one used to put it back in its initial state is given in~\autoref{subfig:unary:deinit}.
Starting from $x$ encoded in $s$~qubits, the conversion to the unary representation takes $1$~NOT gate, $2^s - 1$~CNOT gates and $2^s - 1$~AND computation.
The conversion back to the binary representation takes $1$~NOT gate, $2^s - 1$~CNOT gates and $2^s - 1$~AND uncomputation.
Given that $k$ is encoded in $w_e+w_m$~bits, and that a choice $s = \floor{\frac{w_e + w_m}{2}}$ is judicious to minimize the number of gates, the change of phase of components $\ket{k}$ takes
$2^{\floor{\frac{w_e + w_m}{2}}+1} + 4$~1-qubit gates, $2^{w_e + w_m - 1} + 2^{\floor{\frac{w_e + w_m}{2}}+1} + 2^{\ceil{\frac{w_e + w_m}{2}}} - 4$~CNOTs and $2^{\floor{\frac{w_e + w_m}{2}}} + 2^{\ceil{\frac{w_e + w_m}{2}}} - 3$~ANDs
($1$~NOT gate, $2^{\floor{\frac{w_e + w_m}{2}}} - 1$~CNOT gates and $2^{\floor{\frac{w_e + w_m}{2}}} - 1$~AND computation for the unary conversion,
$2 \times 2^{\floor{\frac{w_e + w_m}{2}}}$~Hadamard gates around the table lookup,
$2$~NOT gates, $2^{\ceil{\frac{w_e + w_m}{2}}} - 2 + 2^{w_e + w_m-1}$~CNOT gates, $2^{\ceil{\frac{w_e + w_m}{2}}} - 2$~AND computations and uncomputations for the lookup circuit and $1$~NOT gate, $2^{\floor{\frac{w_e + w_m}{2}}} - 1$~CNOT gates and $2^{\floor{\frac{w_e + w_m}{2}}} - 1$~AND uncomputation for the binary conversion).
Including the additional $n$~Hadamard gates and $n$~measurements on $T_k$, we conclude that the table unlookup takes $2^{\floor{\frac{w_e + w_m}{2}}+1} + n + 4$~1-qubit gates, $2^{w_e + w_m - 1} + 2^{\floor{\frac{w_e + w_m}{2}}+1} + 2^{\ceil{\frac{w_e + w_m}{2}}} - 4$~CNOTs and $2^{\floor{\frac{w_e + w_m}{2}}} + 2^{\ceil{\frac{w_e + w_m}{2}}} - 3$~ANDs.
\subsection{Standard adder}
As we use the coset representation of integers with windowed arithmetic operations, a circuit for unconditional addition modulo a power of two is sufficient to implement a modular addition.
The adder we use, which is described in~\cite{GidneyQ2018Halvingcostquantum} and optimized from~\cite{Moulton2004newquantumripple} for use with $T$ gates, is presented in \autoref{fig:adder}.
It is thrifty in gate number and ancillary qubits, at the cost of being deeper than other circuits~\cite{Draper2000AdditionQuantumComputer,SvoreQIaC2006logarithmicdepthquantum}, which is not a disadvantage for our architecture.
\begin{figure}[h]
\hspace*{-2.5em}\mbox{\small \Qcircuit @R=0.6em @C=0.5em {
&\lstick{x_0}&\ctrl{1} &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\ctrl{1}&\rstick{x_0}\qw \\
&\lstick{y_0}&\ctrl{1} &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\targ &\rstick{{(y+x)}_0}\qw \\
& & &\ctrl{2}&\qw &\ctrl{3}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{3}&\qw &\ctrl{1}&\qw & & \\
&\lstick{x_1}&\qw &\targ &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\targ &\qw &\ctrl{1}&\rstick{x_1}\qw \\
&\lstick{y_1}&\qw &\targ &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\qw &\qw &\targ &\rstick{{(y+x)}_1}\qw \\
& & & & &\targ &\qw & & & & & & & & &\targ &\qw & & & & \\
& & & & & &\qwx&\ctrl{2}&\qw &\ctrl{3}&\qw &\ctrl{3}&\qw &\ctrl{1}&\qw\qwx& & & & & & \\
&\lstick{x_2}&\qw &\qw &\qw &\qw &\qw &\targ &\ctrl{1}&\qw &\qw &\qw &\ctrl{1}&\targ &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\rstick{x_2}\qw \\
&\lstick{y_2}&\qw &\qw &\qw &\qw &\qw &\targ &\ctrl{1}&\qw &\qw &\qw &\ctrl{1}&\qw &\qw &\qw &\qw &\qw &\qw &\targ &\rstick{{(y+x)}_2}\qw \\
& & & & & & & & &\targ &\ctrl{2}&\targ &\qw & & & & & & & & \\
&\lstick{x_3}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\ctrl{1}&\rstick{x_3}\qw \\
&\lstick{y_3}&\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\targ &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\qw &\targ &\rstick{{(y+x)}_3}\qw
\gategroup{3}{4}{6}{20}{1em}{--}
}
}
\caption{
Adder modulo $2^4$ from~\cite{GidneyQ2018Halvingcostquantum}, using the same notations as in \autoref{fig:comparison}.
The building block (boxed) is repeated two times, for the qubits numbers $1$ and $2$, while the first and last use a simplified subcircuit.
}\label{fig:adder}
\end{figure}
As presented in \autoref{subfig:exponentiation:lookup_add}, the adder needs to add a number $T_k$ taking $n$~qubits into a register with $n+m$~qubits.
To achieve this, either the first register for $T_k$ is extended with qubits in the $\ket{0}$ state, either we use carry propagation blocs for the last qubits.
Such blocs are identical to the ones of semi-classical adder with classical input $0$; see~\cite[Fig.\,17]{Babbush2020CompilationFaultTolerant} for an example of such a circuit.
For gate counting, the first solution is taken into account.
The cost of the addition circuit (\autoref{fig:adder}) is $6 (n + m) - 9$~CNOT gates and $n + m -1$~AND computations and uncomputations.
\subsection{Cost estimation}
In summary, the parameters of the logical circuit for computing the modular exponentiation are
\begin{enumerate}
\item[$n$] number of bits of the exponentiated number $g$
\item[$n_e$] number of bits of the exponent $e$
\item[$w_e$] window size for the exponentiation
\item[$w_m$] window size for the multiplication
\item[$m$] number of qubits added by the coset representation
\end{enumerate}
The aim of this subsection is to give an estimate of the number of gates needed to implement this circuit.
In order to keep the evaluation independent of the error correction choice, we express the cost in terms of the number of 1-qubit, 2-qubit gates and AND computation and uncomputation~\footnote{Due to the measurement-based uncomputation, it is often more efficient to implement the non-Clifford operations through AND computation.
In case of direct implementation of Toffoli gates, the circuit cost could be slightly reduced.}.
The modular exponentiation consists in $n_e/w_e$~multiplications, each multiplication using $2$~product addition and a swap and each product addition is implemented with $(n+m)/w_m$~lookups, additions and unlookups.
Note that the swap operation is realized by simply relabeling the register, hence is for free.
According to the counts obtained from previous subsections, the cost of the exponentiation is dominated --- in the limit $n \to \infty$, $n_e = \bigO{n}$, $w_e$ and $w_m$ constant --- by: $2 \frac{n_e (n+m) n}{w_e w_m}$~1-qubit gates, $\left(2^{w_e + w_m}n + 12(n+m)\right) \frac{n_e (n+m)}{w_e w_m}$~CNOTs, and $2 \frac{n_e {(n+m)}^2}{w_e w_m}$~AND computations and uncomputations (translatable into $4 \frac{n_e {(n+m)}^2}{w_e w_m}$~Toffoli gates).
Note that when considering the universal gate set $T$, $S$, $H$, $X$, $Y$, $Z$, CNOT, controlled-Z and their conjugate, according to Fig.\,4 of Ref.\,\cite{NevenPRX2018EncodingElectronicSpectra} the AND computation and uncomputation costs in average $8$~1-qubit gates and $3.5$~2-qubit gates.
The total cost of the exponentiation is hence given at the leading order by $2 \frac{n_e (n+m) n}{w_e w_m} \left(9n + 8m\right)$~1-qubit gates and $\left(2^{w_e + w_m}n + 19(n+m)\right) \frac{n_e (n+m)}{w_e w_m}$~2-qubit gates.
In the code used to compute the required resources and find the optimal parameters, the complete formula have been used~\cite{Note1}.
\section{Error correction}\label{appendix:err_correction}
This appendix is dedicated to 3D gauge color codes.
The first subsection is dedicated to the principle of subsystem codes.
The second subsection describes the geometrical structure of 3D gauge color codes.
The last subsection provides a detailed description of the cut of the code structure that is used to process and correct the logical qubits.
\subsection{Subsystem codes}
Subsystem stabilizer codes~\cite{PoulinPRL2005StabilizerFormalismOperator} are defined by three subgroups of the Pauli group: the stabilizer, gauge and logical (also designated as \emph{bare logical} in~\cite{BombinNJoP2015Gaugecolorcodes}) operator groups, such that the stabilizer group is the center of the gauge group up to phases, $i\identite$ is included in the gauge group, the operators from the gauge and logical groups commutes, and the normalizer of the stabilizer group is the product of gauge and logical groups.
We invite the reader to look at Refs.\,\cite{PoulinPRL2005StabilizerFormalismOperator,BombinNJoP2015Gaugecolorcodes} for an explicit construction of those groups from canonical generators of the Pauli group.
The stabilizer group plays the standard role of stabilizers, \latin{i.e.\@} divides the total Hilbert space $\mathcal{H}$ into a direct sum of orthogonal subspaces $C \oplus C^\perp$ where $C$ --- the stabilized subspace --- corresponds to the eigenspace $+1$ of all stabilizers.
The gauge and logical groups decompose the stabilized subspace $C$ into a tensor product of the logical qubits space $A$ and the gauge qubits space $B$~\cite{LloydPRL2004QuantumTensorProduct}, that is, the Hilbert space is decomposed as
\begin{equation*}
\mathcal{H} = \underbrace{(A \otimes B)}_{C} \oplus C^\perp.
\end{equation*}
The gauge group acts trivially on the logical qubits and is the Pauli group of the gauge qubits while the logical group acts trivially on the gauge qubits and is the Pauli group of the logical qubits (up to phases).
This ensures that gauge operator measurements don't modify the logical qubits.
A gauge fixing operation consists in switching from a code to another one such that the new stabilizer group includes the original one while being included into the original gauge group, while keeping unmodified the logical group.
The decomposition associated to the original code
\begin{equation*}
\mathcal{H} = \underbrace{(A \otimes B)}_{C} \oplus C^\perp
\end{equation*}
then becomes of the form
\begin{equation*}
\mathcal{H} = (A \otimes B') \oplus \underbrace{(A \otimes B'') \oplus C^\perp}_{C'^\perp}
\end{equation*}
where $B'$ is the new gauge qubit space.
As a consequence, a valid code-word for this new code is also valid for the initial one.
The passage of the latter to the new code is done by measuring the generators of the gauge group, the results of these measurements giving the correction to apply on $B' \oplus B''$ to remove the components on $B''$.
For 3D gauge color codes, code switching allows a transversal error-corrected implementation of a universal set of gates~\cite{BombinNJoP2015Gaugecolorcodes}.
\subsection{Code geometrical structure}
The geometrical structure of the 3D gauge color codes is described in detail in Section\,3.1 of~\cite{BombinNJoP2015Gaugecolorcodes}.
It takes a large tetrahedron, itself decomposed into elementary tetrahedrons, see \autoref{fig:slice} for an example.
Four extra points ($v_i, i\in \{1,2,3,4\}$) are then added outside the large tetrahedron, one point in front of each facet of the large tetrahedron.
Elementary tetrahedrons are finally added between those extra points and the vertices at the surface of the large tetrahedron, see Fig.\,4b of~\cite{Svore2021costuniversalitycomparative} for an illustration.
The vertices of elementary tetrahedrons are colored with 4 different colors such that adjacent vertices get a different color.
Each elementary tetrahedron represents a physical qubit.
The measured operators are the gauge generators for the code used to implement the $H$ and CNOT gates --- the $(1,1)$ code (see~\cite{BombinNJoP2015Gaugecolorcodes}).
These generators are described by the edges: each operator is the product of $X$ or $Z$ operators of the elementary tetrahedrons adjacent to a given edge (each operator implies up to 6 physical qubits).
The stabilizer generators of the $(1,1)$ and $(1,2)$ codes (the $(1,2)$ code refers to the code used to implement the $T$ gate~\cite{BombinNJoP2015Gaugecolorcodes}) which are described by the vertices and edges, are deduced from the values of measured operators.
More precisely, the operator corresponding to a vertex can be written as the product of the operators corresponding to edges starting at the given vertex and ending on vertices of a common color.
Three choices of color are possible, allowing one to recover in three different ways an operator corresponding to a vertex.
This redundancy can be used for achieving fault-tolerant error correction in only one measurement of the (gauge) operators related to the edges~\cite{BombinNJoP2015Gaugecolorcodes}.
Let $n_\text{code}$ be the index of the code which is the number of vertices of the same color on one edge of the large tetrahedron (denoted as $n$ in~\cite{BombinNJoP2015Gaugecolorcodes}).
The code distance is given by $d = 2 n_{\text{code}} + 1$, and the number of physical qubits is $ 1 + 4n_{\text{code}} + 6n_{\text{code}}^2 + 4 n_{\text{code}}^3 = \frac{d^3 + d}{2}$~\cite{BombinNJoP2015Gaugecolorcodes,Svore2021costuniversalitycomparative}.
\subsection{Slicing of the code structure}
To process the information, the code structure is decomposed into slices, each slice being map successively into the 2D processor.
While several cuts in slices are possible, we choose slices orthogonal to two faces (see \autoref{fig:slice}).
The processor need to be sized to fit in the larger slice, that join the edge not included into any of the two faces to the middle of the opposing edge --- the magenta slice in \autoref{fig:slice}.
With the lattice described in Ref.\,\cite{BombinNJoP2015Gaugecolorcodes}, the central slice corresponds to the elementary tetrahedrons
for which all vertices coordinates satisfy $x+z = n_{\text{code}}-2$ or $x+z = n_{\text{code}}-1$
(the elementary tetrahedrons between the two plans defined by the previous equations).
Note that the number of slices is given by $d-2$.
The number of elementary tetrahedrons included in this slice is counted by considering three tetrahedron sets, see \autoref{fig:slice} and \autoref{fig:tranche}.
Two sets correspond to the elementary tetrahedrons having a facet at the interplay between two slices (\autoref{subfig:tranche:petit} (\autoref{subfig:tranche:grand}) is associated to the elementary tetrahedrons with one facet are the interplay between the magenta slice and the green (cyan) slice).
The last set is associated to the elementary tetrahedrons having no facet at the interplay between two slices (\autoref{subfig:tranche:milieu}).
One can check that the two first sets include
$\sum\limits_{k=1}^{2n_{\text{code}-2}} k = 2n_{\text{code}}^2 - 3 n_{\text{code}} + 1$~elementary tetrahedrons while the last set has $(2n_{\text{code}}-1) + \sum\limits_{k=0}^{n_{\text{code}}-2} 2 (2k+1) = 2n_{\text{code}}^2 - 2 n_{\text{code}} + 1$~elementary tetrahedrons.
They are $16 n_{\text{code}} - 2$~additional elementary tetrahedrons resulting from the $4$~added points in the construction of the code.
In total, the maximum number of elementary tetrahedron for one slice of the code structure is $6n_{\text{code}}^2 + 8n_{\text{code}} + 1$.
Since we consider a processor that can process up to two slices (associated to two different logical qubits) and accounting for the ancillary subsystems needed to measure the gauge generators by a simple factor of two, we obtain the number of physical qubits in the processor specified in the main text.
For more details, see the ancillary file \verb|tetrahedron_3_bis.scad|~\cite{Note1}, where each tetrahedron color corresponds to a given slice, the larger being the magenta one.
\begin{figure}[h]
\includegraphics[width=0.5\linewidth]{debitage2.png}
\caption{
Code geometrical structure for $n_\text{code} = 3$ (without the extra points ($v_i, i\in \{1,2,3,4\}$).
Each slice has been represented with a specific color.
The larger slice is with the magenta elementary tetrahedrons.
The figure shows that the maximum number of slices involved in an operator corresponding to an edge is $2$.
}\label{fig:slice}
\end{figure}
\begin{figure}[h]
\subfloat[First set]{\label{subfig:tranche:petit}
\includegraphics{tranche_centrale_petite_face.pdf}
}
\hfil
\subfloat[Second set]{\label{subfig:tranche:grand}
\includegraphics{tranche_centrale_grande_face.pdf}
}
\hfil
\subfloat[Third set]{\label{subfig:tranche:milieu}
\includegraphics{tranche_centrale_autres.pdf}
}
\caption{
Decomposition of the central slice for $n_\text{code} = 3$ (magenta slice in the tetrahedron presented in \autoref{fig:slice}).
Each subfigure corresponds to a set of elementary tetrahedrons of the central slice, seen from different point of views.
On \protect\subref{subfig:tranche:petit} and \protect\subref{subfig:tranche:grand}, each triangle corresponds to an elementary tetrahedron.
On \protect\subref{subfig:tranche:milieu} each small rectangle correspond to an elementary tetrahedron.
}\label{fig:tranche}
\end{figure}
\subsection{Threshold of 3D gauge color codes}\label{appendix:code:threshold}
The value of the threshold for 3D gauge color codes has been evaluated in a few references that we now discuss.
In order to clarify on the context, let us first remind that there are three main definitions of error-rate threshold used for stabilizer codes in the literature: code-capacity, phenomenological and circuit-level.
Code-capacity thresholds assume perfect measurements of stabilizers.
Phenomenological thresholds model faulty-measurements as bit-flip errors on stabilizer measurement outcomes.
Circuit-level thresholds model errors occurring at any stage of stabilizer measurement circuits.
In Ref.~\cite{BrowneNC2016Faulttoleranterror} a clustering decoding scheme is presented and
by including a phenomenological noise to the measurement outputs, the authors estimate a code-capacity threshold of \SI{0.46}{\percent} and phenomenological threshold to about \SI{0.31}{\percent}, suggesting an upper bound on the circuit-level threshold.
Note however that the underlying lattice considered in Ref.~\cite{BrowneNC2016Faulttoleranterror} (cubic lattice) is different from the one we have considered (body centered cubic lattice (bcc)).
A more recent decoding algorithm is presented in~\cite{Kubica2018ABCsColorCode,Delfosse2019Efficientcolorcode} using the bcc lattice, but the authors give an estimate of the code capacity threshold of \SI{0.77}{\percent} only.
By the way, a slightly better code capacity threshold of \SI{0.80}{\percent} has been estimated in Ref.~\cite{Svore2021costuniversalitycomparative} under the same assumptions.
Finally, statistical arguments have be used in Ref.~\cite{SvorePRL2018ThreeDimensionalColor} to estimate code-capacity threshold of 3D gauge color codes with ideal decoding to around \SI{1.9}{\percent}.
This suggests that an appropriate decoder could significantly improve the value of the code-capacity threshold and hence of the phenomenological and circuit-level thresholds.
Since we believe that the determination of the circuit-level threshold goes beyond the scope of this work, the run-time and resource needed to factor a \num{2048}-bit RSA integer are given in the main text under the assumption of a threshold of \SI{0.75}{\percent}.
Since this choice is somehow arbitrary, we give the evolution of run-time and resource as a function of the threshold in \autoref{fig:ressources_noise_ratio}.
More precisely, they are given as a function of the ratio $p/p_{\text{th}}$ between the physical error probability per cycle $p$ and the fault-tolerant threshold $p_{\text{th}}$ which is the only relevant quantity at first order.
For $p_{\text{th}}=\SI{0.75}{\percent}$ and an error probability per cycle and per physical qubit of $10^{-3}$, this ratio $p/p_{\text{th}}$ is given by $\approx 0.13$.
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{factor_memory_qubit_time_err.pdf}
\caption{Number of qubits in the processor and run-time to factor of \num{2048}-bit RSA integers in function of the ration between the physical qubit error and the fault-tolerant code threshold.}\label{fig:ressources_noise_ratio}
\end{figure}
We emphasize that the value of the threshold for 3D gauge color codes does not change the take home message of the whole paper, namely that the use of a quantum memory in quantum computing strongly reduces the number of qubits in the processing unit.
Even when considering for example a circuit-level threshold of \SI{0.2}{\percent} and a error probability per operation of $10^{-3}$, the use of a quantum memory reduces the number of qubits by two orders of magnitude in the processor compared to an architecture without memory for factoring \num{2048}-bit RSA integers (the same conclusion holds when considering the standard approach using surface code, see \autoref{appendix:subsec:decouplage}).
\section{Results and possible improvements}\label{appendix:results}
We presented in the main text the resources needed to factor \num{2048}-bit RSA integers corresponding to the most common RSA key size.
In the first subsection of this appendix, we discuss the factorization of RSA integers of various sizes.
The second subsection is dedicated to a discussion on ways to reduce the run-time to factor RSA integers and in particular, on the trade-off between the number of physical qubits in the processor and the run-time.
\subsection{Optimal parameters to factor $n$-bit RSA integers}
The resources and parameters needed to factor RSA integers encoded in $n$~bits are specified in \autoref{table:parametres}.
In particular, we consider the factorization of RSA integers with $n=6$~bits, the number of bits needed to factor $35$.
We also consider $n=829$ which corresponds to the largest RSA integer factorized so far~\cite{Zimmermann2020FactorizationRSA250}.
\begin{table*}
\begin{tabular}{S[table-figures-integer=4]S[table-figures-integer=4]|S[table-figures-integer=2]S[table-figures-integer=1]S[table-figures-integer=1]S[table-figures-integer=2]|S[table-figures-integer=5]c|S[table-figures-integer=4]S[table-figures-integer=9]S[table-figures-integer=8]S[table-figures-integer=2]c}
{$n$} &{$n_e$} &{$m$} &{$w_e$} &{$w_m$} &{$d$} &{$n_{\text{qubits}}$} &{$t_{\text{exp}}$} &{logical qubits} &{total modes} &{spatial modes} &{temporal modes} &{all memory correction} \\ \hline
6 &6 &4 &3 &2 &7 &316 &\SI{1}{\minute} &38 &6650 &3002 &5 &\SI{95}{\micro\second} \\
8 &9 &8 &3 &2 &13 &1060 &\SI{2}{\second} &58 &64090 &15370 &11 &\SI{319}{\micro\second} \\
16 &21 &11 &3 &2 &17 &1796 &\SI{10}{\second} &99 &244035 &44451 &15 &\SI{742}{\micro\second} \\
128 &189 &19 &3 &3 &29 &5156 &\SI{50}{\minute} &571 &6971339 &736019 &27 &\SI{8}{\milli\second} \\
256 &381 &21 &3 &3 &33 &6660 &\SI{7}{hours} &1089 &19585665 &1813185 &31 &\SI{17}{\milli\second} \\
512 &765 &24 &3 &3 &37 &8356 &\SI{2}{days} &2122 &53782090 &4432858 &35 &\SI{37}{\milli\second} \\
829 &1242 &26 &3 &3 &41 &10244 &\SI{11}{days} &3396 &117097476 &8697156 &39 &\SI{66}{\milli\second} \\
2048 &3029 &30 &3 &3 &47 &13436 &\SI{177}{days} &8284 &430229540 &27825956 &45 &\SI{186}{\milli\second} \\
\end{tabular}
\caption{For different integer sizes $n$ and corresponding exponent size $n_e$ ($\sim 1.5 n$), the table presents the optimal set of parameters, processor size and computation run-time, and the memory requirements.}\label{table:parametres}
\end{table*}
\subsection{Trade-off between qubits and run-time}
We have estimated that an average run-time of \SI{177}{days} is needed to factor a \num{2048}-bit RSA number.
There are several ways to reduce this number, most of them coming at the cost of using more qubits in the processor.
The items below present several ways separately.
\begin{itemize}
\item Due to the tetrahedral geometry of the code structure, only one third of the processor qubits are used during the error-correction steps in average.
A factor 3 in time could thus be saved by making use of them.
\item The logical circuit can be parallelized in several ways, giving a speed-up roughly proportional to the increase in qubit numbers in the processor.
More precisely:
\begin{itemize}
\item Some operations in the adder can be parallelized (see \autoref{fig:adder}).
The controlled NOT operations aligned vertically can be applied at the same time.
\item The run-time is dominated by the time spent to implement the CNOT gates of the quantum lookup circuit (see \autoref{fig:qrom}) and they are easily parallelizable.
A full parallelization, would reduce the factorization of \num{2048}-bit RSA integers to about \num{27}~days, at the cost of using about \num{12}~million qubits in the processor.
\item Oblivious carry runways allows parallelization of the adders~\cite{Gidney2019Approximateencodedpermutations}.
\item Other type of adders could exploit further parallelizations, for instance lookahead adders~\cite{SvoreQIaC2006logarithmicdepthquantum}.
\item During a product-addition operation, the different additions can be parallelized by computing separately partial sums.
\item During the exponentiation, the different multiplications can be parallelized by computing separately partial products.
\end{itemize}
\item The qubit number can be reduced using another slicing of the code structure, at the cost of a longer computation time.
For example, if one chooses to cut the tetrahedron by slices parallel to a facet of this tetrahedron, we estimate that a \num{2048}-bit RSA integer could be factorized with \num{6628}~qubits in the processor and \num{354}~days.
\end{itemize}
\subsection{Decoupling the gain from 3D gauge color code and multimode memory}\label{appendix:subsec:decouplage}
Two new design elements have been proposed in this manuscript, the use of 3D Gauge color codes and an architecture using a multi-mode memory.
We here separate them out and get insight into the improvements from each.
The main motivation to use 3D gauge color codes is to get rid of the magical state factory needed for implementing non-Clifford gates in surface code.
However, the transversality of T gate on 3D gauge color codes is strongly linked with the dimensionality, and 2D color codes can't directly achieve it~\cite{KoenigPRL2013ClassificationTopologicallyProtected,BombinNJoP2015Gaugecolorcodes}.
There is no direct way to make use of a 3D color code on a 2D grid.
The main advantage brought by the memory is to unload qubits from the processing unit to the memory.
Using a memory in the standard approach for example (2D grid and surface code), we estimate that a RSA-\num{2048} integer can be factorized with a 2D surface code in about 68~days using a memory that can store up to 5~million modes and a processor with \num{184}~thousand qubits, \num{180}~thousand being dedicated to the magical state factory and \num{4}~thousand to the logical qubits on the processor.
The additional reduction in the processor size in our approach comes from the fact that there is no need for magic state distillation in the use 3D gauge color codes.
The number of qubits in the processor is kept small because the qubits are released from the memory and process slice by slice.
\section{Memory requirements to factor RSA-2\,048 integers}\label{appendix:memoire}
We would like to first emphasize that the main objective of our project was to evaluate accurately the performance of an architecture in which unprocessed qubits are stored in a quantum memory.
The standard approach suffers from the need of millions of individually controlled qubits and several research entities are dedicating large teams of engineers to tackle this challenge.
We have shown through Shor's algorithm that the use of a quantum memory reduces significantly the number of qubits in the processor though a significant change in the way the information is processed and protected against errors.
Our results hence provide a solution to an engineering problem and turns it into a physics problem: the implementation of a faithful and multimode memory.
Before discussing the requirements on the memory in detail, let us clearly define the notion of multimode memory~\cite{GisinPRL2007QuantumRepeatersPhoton}.
From an algorithm point of view, ``spatial modes'' are stored modes that can be accessed in constant time, while ``temporal modes'' can only be sequentially recoverable (first stored, first release).
In the proposed implementation based on spin-echo, temporal modes correspond to different time slots, photons arriving in different time bins being remitted sequentially after spin refocusing.
Spatial modes correspond to either different spatial (transverse) modes of a cavity or to different cavities (with possibility to combine both).
As discussed in the main text, it is possible to use temporal multiplexing only, at the cost of increasing the run-time.
We now estimate that the factorization of RSA-\num{2048} integers with the proposed architecture would take a memory with the following characteristics:
\begin{itemize}
\item A large multimode capacity to store 28~million spatial modes, each spatial mode being used to store 45~temporal modes.
We stress that the number of modes in the memory has not been optimized (only the number of qubits in the processor and the run-time are optimized).
Note also that different choices of processing and error-correction protocols may lead to compromises between the numbers of processing qubits and multimode capacity, if needed.
For example, we estimate that RSA-\num{2048} integers can be factorized in \SI{68}{days} with a 2D surface code using a memory that can store up to 5~million modes and a processor with \num{184}~thousand qubits in the processor.
\item Storage time greater than \SI{186}{\milli\second}.
More precisely, we estimate that the maximum storage time between two readouts of the same qubits is less than 2~hours.
A memory with a storage time of at least two hours is however not necessary as error-correction steps can be implemented periodically at the cost of increasing the run-time.
Error correction of all the qubits stored in the memory is estimated to take \SI{186}{\milli\second} with a processor having \num{13436}~qubits, meaning that the storage time simply needs to be longer than \SI{186}{\milli\second}.
Applying a correction every second for example would increase the run-time by about \SI{23}{\percent}.
\item Error probability for a transfer to memory, storage, and retrieval less than \SI{0.1}{\percent}.
Note that this requirement for a complete cycle of write/read from memory is likely very conservative.
Indeed, the threshold value of error correction is mainly determined by the errors happening during the stabilizer measurements.
We thus conjecture that the error correction could handle higher error rate for those specific operations.
The effect of this strongly dissymmetric noise between the memory/processor operations is still under investigation, and we choose to stick to the conservative hypothesis for this article.
\item The information stored in a given memory mode can be mapped to 3~qubits of the processor: two for the 2-qubit gates (depending on whether the physical qubit is the logical control or target qubits) and one for the error correction and 1-qubit gates.
No need for an all to all connectivity.
\end{itemize}
\section{Realization combining a rare-earth doped solid and a superconducting resonator}\label{appendix:realization}
For implementing a multimode memory with a spin-echo technique, materials doped with rare-earth, such as Erbium \ch{Er^{3+}} provide an appealing example since these ions have doubly-degenerate Zeeman states which split when an external magnetic field is applied.
Several manuscripts have reported on the successful coupling between the crystal \ch{Er^{3+}: Y2 Si O5} and a superconducting microwave resonator~\cite{UstinovPRB2011Ultralowpowerspectroscopy, WilsonJoPBAMaOP2012Couplingerbiumspin, BushevPRL2013AnisotropicRareEarth}.
Ref.\,\cite{BushevPRL2013AnisotropicRareEarth} in particular reported on the strong coupling with a collective coupling rate $g\sqrt{\bar{N}}=\SI[parse-numbers=false]{2\pi \times 34}{\mega\hertz}$ and an inhomogeneous linewidth $\Gamma=\SI[parse-numbers=false]{2 \pi \times 12}{\mega\hertz}$.
This results in a very high absorption coefficient $\alpha= \SI{4.0}{\per\meter}$.
If we assume a $L = \lambda/2$ cavity, unit absorption and re-emission efficiencies are obtained if the quality factor is $Q= F = 2\pi/(\alpha \lambda) \approx 26$ for a \SI{5}{\giga\hertz} cavity.
In this low-Q regime, $\kappa \gg \Gamma$ and a coherence time of a few hundreds of microseconds would translate into a multimode capacity of a few tens of modes.
By working with crystals having lower doping concentrations, the coherence time can be significantly increased~\cite{Liu2021Twentymillisecondelectron}, while still reaching the impedance matching point with low-Q resonators.
In this case, a few thousand modes might realistically be stored very efficiently.
Rare-earth doped materials is not the only option and other candidates such as negatively charged nitrogen vacancy color centers in diamond~\cite{BertetPRL2011HybridQuantumCircuit} or bismuth donors in silicon~\cite{BertetPRL2020MultimodeStorageQuantum} may be even more promising.
|
\section{INTRODUCTION} \label{sec:introduction}
As an observable black hole (BH) over a wide redshift range, quasars, the most powerful active galactic nuclei (AGNs), have been playing a pivotal role in understanding the formation and the growth of BH along the cosmic time.
The quasar demography at a given redshift, represented by quasar luminosity function (QLF), is the result of intertwining evolution of several physical properties of BHs and their host galaxies: the gas fueling mechanism, the obscuration of quasars by dust, the growth of quasar host galaxies/halos, to name a few.
Therefore, by studying the cosmic evolution of QLF, one can comprehend a general picture of how halos, galaxies, and BHs evolved together.
\begin{figure*}
\centering
\epsscale{1.2}
\plotone{qlfs.pdf}
\caption{
(a)-(d): Observed QLFs at $2\lesssim z\lesssim6$. The redshift range and the central redshift are marked in each panel.
The filled (open) circles denote the QLFs from the large (small) area surveys.
The numbers in the parentheses in the legend represent the number of spectroscopically identified quasars at $M_{1450}>-24$ mag ($N_{\rm spec,-24}$) and the survey area in deg$^{2}$ of each study, i.e., ($N_{\rm spec,-24}$/Area).
The QLFs selected for this study are highlighted by the black circles \citep{Ross13,Akiyama18,Matsuoka18,Kim20} with their parametric QLFs (thick translucent line).
The green open crosses are from the X-ray-selected quasar sample \citep{Giallongo19}.
The black solid, dashed, and dotted lines denote the best-fit QLF in cases 1, 2, and 3, respectively.
The empirical models of \cite{Kulkarni19} and \cite{Shen20} are shown as the gray dot-dashed and dashed lines, respectively.
(e)-(f): Shifted QLFs by scaling $\Phi^{*}$ or $M_{1450}^{*}$ to fit to the faint-end and bright-end of the $z\sim5$ QLF, respectively. The solid line represents the best-fit $z\sim5$ result in case 1.
\label{fig:qlf}}
\end{figure*}
The observed QLFs have been examined in various ways.
\cite{Hopkins07} and \cite{Shen20} assembled a large number of observed QLFs and determined the bolometric QLF as a function of redshift.
Similarly, \cite{Kulkarni19} also parameterized the ultraviolet (UV) QLF, using available data at that time.
Other studies focused on the determination of QLF from the empirically/observationally constrained relations among quasars, galaxies, and dark matter halos, by using conditional luminosity function \citep{Conroy13,Ren20} or continuity equation \citep{Tucci17}.
\cite{Veale14} also presented simple models with the growth-based evolution of BHs and galaxies.
These studies show that the QLF evolution at $z\lesssim3$ is complicated, favoring an interwoven evolution of the number density, the luminosity, and the bright/faint-end slopes.
At $z>3$, however, the QLF studies had been fundamentally hampered by the lack of faint quasars that can define the QLF faint-end slope.
For example, the Sloan Digital Sky Survey (SDSS) discovered quasars up to $z\sim6$, but the SDSS high-redshift quasar sample is limited to the brightest ones with the absolute magnitude at $1450$ \AA~of $M_{1450}<-25$ mag \citep{Jiang16}.
With bright quasars alone, the previous studies were limited to constraining the bright-end slope of QLFs \citep{Hopkins07,Conroy13,Veale14}.
Very recently, subsequent large-area imaging surveys expanded the luminosity range of $z\gtrsim4$ quasar sample down to $M_{1450}=-23$ mag or fainter \citep{Akiyama18,Matsuoka18,McGreer18,Kim19,Kim20,Niida20}.
Using a sample of dozens or more of faint quasars, one can now obtain a meaningful constraint on the faint-end of UV QLF.
In this letter, we investigate the evolution of QLF at $2\lesssim z\lesssim6$ using the most up-to-date observed QLFs.
We show that the UV QLF evolution is dominated by a pure density evolution (PDE) and provide possible interpretations for this rather unexpected result.
The cosmological parameters we adopted are $\Omega_{m}=0.3$, $\Omega_{\Lambda}=0.7$, and $H_{0}=70$ km s$^{-1}$ Mpc$^{-1}$.
\section{Observed UV QLF\label{sec:obsqlf}}
The step towards figuring out the evolutionary trend of quasar demography is to select the QLFs that are least biased at their faint ends.
Among dozens of UV QLFs at $2\lesssim z\lesssim6$ in the literature, we first collect the QLFs based on the quasars selected by their unique rest-UV colors, rather than by X-ray detection (e.g., \citealt{Giallongo19}) or photometric variability (e.g., \citealt{Palanque16}).
Then, we excluded the QLFs derived from the quasar sample from a small survey area ($<10$ deg$^{2}$) or consisting of only bright ones ($M_{1450}<-24$ mag).
If there are several results at a given redshift, we chose the one that used the largest number of spectroscopically identified quasars at $M_{1450}>-24$ mag ($N_{\rm spec,-24}$).
For example, at $z\sim5$, there are three comparable studies: \citeauthor{McGreer18} (\citeyear{McGreer18}; 105 deg$^{2}$), \citeauthor{Kim20} (\citeyear{Kim20}; 85 deg$^{2}$), and \citeauthor{Niida20} (\citeyear{Niida20}; 82 deg$^{2}$).
But their $N_{\rm spec,-24}$ are 8, 13, and 2, respectively, so we took the result of \cite{Kim20}.
Figure \ref{fig:qlf} shows the selected QLFs (marked with black circles) at four different redshift bins \citep{Ross13,Akiyama18,Matsuoka18,Kim20} of which central redshifts are $z\sim2.4$, 3.9, 5.0, and 6.1.
These QLFs are shifted in absolute magnitudes and number densities to our chosen cosmological parameters.
For the \cite{Ross13} QLF at $z\sim2.4$, their $M_i(z=2)$ magnitudes are converted to $M_{1450}$ following the prescription in Appendix B of their work.
\cite{Akiyama18} used the photometric redshift sample with only $N_{\rm spec,-24}=6$.
However, their photometric redshift accuracy is small enough ($\Delta z/(1+z)\sim 0.03$) to accurately trace the LF shape.
We note that the bright ends ($M_{1450}\lesssim-27$) of the three selected QLFs \citep{Akiyama18,Matsuoka18,Kim20} are determined by the bright quasar sample from other studies (e.g., SDSS).
As a result, the selected QLFs cover wide ranges in luminosity ($-30<M_{1450}<-23$) and survey area ($> 80$ deg$^{2}$), and can be considered the best-determined QLF to date.
In Figure \ref{fig:qlf}, we compare QLFs from different literature. After homogenizing the cosmological parameters to our chosen values, QLFs are shifted in number density to the central redshift of the selected QLFs within each redshift panel, with a number density scaling factor we present in this work (case 1 in Section \ref{sec:shape}).
The selected QLFs are in good agreement with the other QLFs based on large-area survey data (filled circles; \citealt{Willott10,Jiang16,Palanque16,Yang16,McGreer18,Schindler19,Niida20}), although some QLFs from small area surveys ($<10$ deg$^{2}$) tend to deviate from the selected ones (open circles and crosses; \citealt{Glikman11,Giallongo19}).
The thick translucent lines in Figure \ref{fig:qlf} denote the parametric QLF ($\Phi_{\rm par}$), canonically described by a double power-law (DPL) function:
\begin{equation}
\begin{aligned}
&\Phi_{\rm par}(M_{1450},z)=\\
&\frac{\Phi^{*}}{10^{0.4(\alpha+1)(M_{1450}-M_{1450}^{*})}+10^{0.4(\beta+1)(M_{1450}-M_{1450}^{*})}},\label{eq:Phipar}
\end{aligned}
\end{equation}
\noindent where $\Phi^{*}$ is the normalization factor, $M_{1450}^{*}$ is the break magnitude, and $\alpha$ and $\beta$ are the faint- and bright-end slopes, respectively.
The best-fit parameters are taken from the corresponding references \citep{Ross13,Akiyama18,Matsuoka18,Kim20}.
The striking feature in Figure \ref{fig:qlf} is the similarity of the shape of QLFs at different redshifts.
In the panels (e) and (f), we show QLFs shifted only in density and only in luminosity, respectively.
We note that the density-shift alone makes the QLFs overlap almost perfectly with each other.
\section{Redshift Evolution of QLF\label{sec:shape}}
To describe the redshift evolution, we assume polynomial functions for the four parameters of $\Phi_{\rm par}$:
\begin{equation}
X(z) = \sum_{i=0}^{n_{X}} C_{X,i}~(z-z_p)^{i}\label{equ:poly},
\end{equation}
\noindent where $X\in\{\log_{10}\Phi^{*},~M_{1450},~\alpha,~\beta\}$, $C_{X,i}$ is the $i$-th order coefficient for the parameter $X$, $n_X$ is the maximum order, and $z_p=2.2$ (pivot redshift).
Here we consider three cases:
\begin{itemize}
\item Case 1: A PDE model where only $\Phi^{*}$ evolves, and to the 2nd order, i.e., $n_X\in\{2,0,0,0\}$ for $X$.
\item Case 2: In addition to the number density evolution of Case 1, we allow the bright-end slope $\beta$ to evolve but to the 1st order (see Figure \ref{fig:qlf}), i.e., $n_X\in\{2,0,0,1\}$ for $X$.
\item Case 3: In addition to the number density evolution of Case 1, we allow all the other parameters to evolve but to the 1st order, i.e., $n_X\in\{2,1,1,1\}$ for $X$.
\end{itemize}
We fit these functions to the observed QLF data points ($\Phi_{\rm obs}$), with the maximum likelihood estimation.
For this, we used the \texttt{emcee} Python package\footnote{\url{https://emcee.readthedocs.io/en/stable/}} \citep{Foreman13} for the Markov chain Monte Carlo sampling of the DPL parameters.
We used a likelihood function of $\mathcal{L}=-\frac{1}{2}\sum\left[(\Phi_{\rm obs}-\Phi_{\rm par})/\sigma_{\Phi_{\rm obs}}\right]^{2}$, where $\sigma_{\Phi_{\rm obs}}$ is the $1\sigma$ uncertainty of $\Phi_{\rm obs}$ from the literature.
We used uninformative priors on the parameters within the reasonable ranges: $-10<\log_{10}\Phi^{*}<0$, $-30<M_{1450}^{*}<-23$, $-5<\alpha,\beta<0$, and $-1<C_{X,i}<1$.
The best-fit results with 1$\sigma$ errors are taken to be the median values with standard deviations of their posterior distributions with 10,000 chains, listed in Table \ref{tbl:params}.
The resultant QLFs are shown in Figure \ref{fig:qlf} with the solid, dashed, and dotted lines.
They are consistent with each other, supported by the fact that the residuals ($\Delta\Phi=\log_{10}\Phi_{\rm obs}-\log_{10}\Phi_{\rm par}$) for the selected QLFs have the normal-like distributions with a standard deviation of only 0.15 to 0.12 dex from cases 1 to 3.
We note that the reduced chi-square ($\chi^{2}_{\nu}$) value between the best-fit result and observation naturally decreases as the model becomes complicated with the increasing number of free parameters, but only mildly; $\chi^{2}_{\nu}=3.14$, 2.93, 2.22 from cases 1 to 3.
In Figure \ref{fig:params}, we show the changes in parameters of our models along the redshift with the best-fit parameters of $\Phi_{\rm par}$ in literature.
Note that we only plot the results determined from the maximum-likelihood method to individual quasars (not to the binned QLFs).
Our results are broadly consistent with the parameters of the observed QLFs selected for the study.
Unlike cases 1 and 2, there are large discrepancies between the case 3 fit and the local best-fit values at $z\sim6$, although the largest number of free parameters were used in case 3.
This is due to the high dependence of our MCMC run on the lower-redshift QLFs \citep{Ross13,Akiyama18} that have a larger number of data points with smaller uncertainties than the high-redshift QLFs.
The case 3 result is the best mathematically, but we point out that it is only slightly more accurate than others in terms of $\Delta \Phi$ and $\chi^{2}_{\nu}$.
\begin{deluxetable}{lccc}
\tabletypesize{\scriptsize}
\tablecaption{Best-fit DPL Parameters\label{tbl:params}}
\tablewidth{0pt}
\tablehead{
\colhead{$X$} & \colhead{$C_{X,0}$} & \colhead{$C_{X,1}$} & \colhead{$C_{X,2}$}
}
\startdata
\multicolumn{4}{c}{Case 1}\\
$\log_{10}\Phi^{*}$ & $-5.77\pm0.03$ & $-0.12\pm0.02$ & $-0.11\pm0.01$ \\
$M^{*}_{1450}$ & $-24.64\pm0.07$ & ... & ... \\
$\alpha$ & $-1.09\pm0.04$ & ... & ... \\
$\beta$ & $-2.86\pm0.03$ & ... & ... \\
\hline
\multicolumn{4}{c}{Case 2}\\
$\log_{10}\Phi^{*}$ & $-5.83\pm0.03$ & $-0.13\pm0.02$ & $-0.11\pm0.01$ \\
$M^{*}_{1450}$ & $-24.82\pm0.08$ & ... & ... \\
$\alpha$ & $-1.17\pm0.04$ & ... & ... \\
$\beta$ & $-3.01\pm0.05$ & $0.07\pm0.02$ & ... \\
\hline
\multicolumn{4}{c}{Case 3}\\
$\log_{10}\Phi^{*}$ & $-5.68\pm0.04$ & $-0.32\pm0.03$ & $-0.13\pm0.01$ \\
$M^{*}_{1450}$ & $-24.40\pm0.11$ & $-0.59\pm0.09$ & ... \\
$\alpha$ & $-0.98\pm0.07$ & $-0.19\pm0.04$ & ... \\
$\beta$ & $-2.78\pm0.06$ & $-0.22\pm0.05$ & ... \\
\enddata
\tablecomments{$\Phi^{*}$ is in units of Mpc$^{-3}$ mag$^{-1}$. }
\end{deluxetable}
\begin{figure*}
\centering
\epsscale{1.2}
\plotone{params.pdf}
\caption{
QLF parameters along the redshift.
The blue, orange and green lines represent the best-fit results of cases 1, 2, and 3, respectively, with their 1$\sigma$ uncertainties (shaded regions).
The best-fit parameters from the literature, which are determined without any fixed parameters, are shown as the same symbols in Figure \ref{fig:qlf}, while the data points from the QLFs selected for our model fitting are highlighted by black circles.
For \cite{Niida20}, we plot both their results with fixed $\beta=-2.9$ (navy triangles) and without any fixed parameters (navy circles).
\label{fig:params}}
\end{figure*}
There are several QLF parameters in disagreement \citep{Yang16,Kulkarni19,Schindler19,Niida20}.
In the case of \cite{Niida20}, their main result with a fixed slope of $\beta=-2.9$ (navy triangles) always shows higher values in all the parameters than those without any fixed parameters (navy circles).
This implies that the correlation between QLF parameters may show up as mathematical difference (e.g., see \citealt{Matsuoka18,Kim20}).
Also, the results biased toward lower values than our models \citep{Yang16,Kulkarni19,Schindler19} can be attributed to the use of QLFs that are not sufficiently constrained due to small-number statistics and/or faint-end incompleteness.
Overall, we conclude that, under the current number of datasets, the QLF at $z>2$ can be well described with a PDE model (case 1) and the addition of the evolution in the other QLF parameters does not improve the fitting result significantly.
The QLF evolution has been studied previously, and several authors deduced the evolution models that are more complicated than the PDE scenario as presented here \citep{Hopkins07,Kulkarni19}.
But the high-redshift QLFs in \cite{Hopkins07} do not extend deep enough to reliably constrain the faint-end QLF shape.
Meanwhile, \cite{Kulkarni19} use QLFs down to $M_{1450}\sim-22$ mag at $z\gtrsim3$, but their analysis included datasets that we reject in this work due to small survey area \citep{Glikman11} or a small number of faint quasars \citep{Willott10,Kashikawa15}.
We suggest that these are the reason for the discrepancy between the previous results and our result for the QLF evolution.
In fact, the most recent work by \cite{Shen20}, including quasars over a wide magnitude range, shows a result in line with our simple PDE models at various redshifts (the gray dashed line in Figure \ref{fig:qlf}).
\cite{Niida20} also suggest little evolution in $\alpha$ and $M_{1450}$ at $4\lesssim z\lesssim6$.
\section{SIMPLE MODEL FOR QLF\label{sec:empqlf}}
The PDE trend of the QLF at $z\gtrsim2$ is intriguing since, previously, QLFs have been depicted to evolve in a much more complicated way.
To explain the universal QLF shape and the PDE behavior, we constructed a theoretically motivated and empirically calibrated QLF model.
Recent observations for individual quasars suggest that there are only small or negligible changes in their intrinsic properties at $2<z<6$: the Eddington ratio ($\lambda_{\rm Edd}$) distribution \citep{Mazzucchelli17,Kim19,Onoue19,Shen19}, the obscured fractions \citep{Vito18}, the BH-to-galaxy mass ratios \citep{Izumi19}, and the metal enrichments \citep{Shin19,Schindler20}.
This implies that the QLF is not determined by the difference in the characteristics of quasars at $z>2$, but rather by the characteristics of galaxies/halos in which quasars are embedded.
Here, we construct a simple model that is built on a halo mass ($M_{h}$) function and several scaling relations to see how such a model can reproduce the observed QLF shape and the PDE behavior.
Starting with the $M_{h}$ function of \cite{Jenkins01}, we converted this to the stellar mass ($M_{\rm gal}$) function, using the $M_{h}$-$M_{\rm gal}$ relation of \cite{Behroozi19} with a scatter of $0.3-0.025\times\log(M_{h}/10^{10}~M_{\odot})$ dex, inferred from their Figure 12.
We used the $z=2$ relation of all galaxies as a reference, considering the broadly constant shape of their $M_{h}$-$M_{\rm gal}$ relation at a redshift range of $2\leq z\leq6$.
Second, the $M_{\rm gal}$ function was converted to the BH mass ($M_{\rm BH}$) function, following the \cite{Kormendy13} relation with a scatter of 0.4 dex.
Since their relation is given for bulge mass, we used the $M_{\rm gal}$-dependent bulge-to-total mass ratio, $B/T(M_{\rm gal})=\min[1,~10^{-3.35}M_{\rm gal}^{0.29}]$, derived from a sample of \cite{Mendel14}, giving $M_{\rm BH}\proptoM_{\rm gal}^{1.5}$.
Third, the $M_{\rm BH}$ function was converted to the bolometric QLF by convolving it with a log-normal\footnote{We also tested the function in the form of Schechter function, but there is no significant difference in the resultant QLF shape as in \cite{Veale14}. While the physical interpretation could be different, we only considered the light-bulb scenario of quasars for simplicity.} Eddington ratio distribution,
\begin{equation}
P(\lambda_{\rm Edd})=\frac{P^*}{\sigma\sqrt{2\pi}}\exp\left(\frac{-(\log\lambda_{\rm Edd}-\log\lambda_{\rm Edd}^{*})^2}{2\sigma^{2}}\right)\label{equ:ln},
\end{equation}
\noindent where $P^*$ is the normalization factor related to the \emph{observable} duty cycle related to quasar lifetime and UV obscuration.
We set $\log\lambda_{\rm Edd}^{*} = -0.5$ and $\sigma=0.3$ dex \citep{Shen19}.
We converted the bolometric luminosity to $M_{1450}$ using the correction factor from \cite{Shen20}.
Lastly, we consider the outshining of AGN in quasar hosts.
Previous high-redshift quasar surveys introduced the point-source selection, so it can be assumed that a BH needs to outshine its host galaxy to be selected as a quasar \citep{Ni19}.
We classified an AGN as a quasar only when its $M_{1450}$ is twice brighter than the UV magnitude of its galaxy at $1500$ \AA~($M_{\rm1500,gal}$) inferred from its $M_{\rm gal}$ at a given redshift \citep{Behroozi19}.
Our QLF model has a number of adjustable parameters, but we allowed only one parameter, $P^{*}$ in equation (\ref{equ:ln}), to change its value as a function of redshifts.
We scaled $P^*$ to maximize the likelihood function between the model QLF and the selected QLFs at each redshift, and the results are discussed in the following section.
\begin{figure}
\centering
\epsscale{1.2}
\plotone{logP.pdf}
\caption{
The duty cycle parameter $P^{*}$ along the redshift.
The red circles represent our fiducial model, with $P^{*}$ changing roughly as $(1+z)^{3}$ (dotted line) or $(1+z)^{4}$ (dashed line).
The orange diamonds, blue triangles, and purple squares denote the results when including the redshift evolution of $M_{\rm BH}/M_{\rm gal}$, increasing the scatter in the $M_{\rm BH}$-$M_{\rm gal}$ relation to 0.6 dex, or adopting a different cut for outshining effect, respectively.
\label{fig:logP}}
\end{figure}
\section{Results \& Discussion\label{sec:discussion}}
\begin{figure*}
\centering
\epsscale{1.2}
\plotone{model.pdf}
\caption{
Comparison of the observed QLFs (points), the case 1 QLFs (black lines), and the model QLFs (red lines) at various redshifts.
The red solid (dashed) lines represent the model QLF with (without) the outshining effect.
The observed QLFs are given in the same symbol as in Figure \ref{fig:qlf}.
The orange, blue, and purple dotted lines denote the results with the changes in assumptions, similar to Figure \ref{fig:logP}.
The red translucent line in the panel (d) is the expected QLF boosted by the lensing effect assuming the intrinsic QLF slope of $\beta=-3.7$ \citep{Pacucci20}.
\label{fig:model}}
\end{figure*}
The resultant $P^*$ values are shown as the red circles in Figure \ref{fig:logP}.
Their 1$\sigma$ errors (68\%) were calculated from 100 mock QLFs generated by adding random errors to the $\Phi_{\rm obs}$ points.
The change in $P^{*}$ is roughly proportional to $(1+z)^{3}$ or $(1+z)^{4}$, shown as the red dotted and dashed lines, respectively.
This could be related to the cubic evolution of gas density along the redshift, but we caution that $P^{*}$ can evolve in a very different way, when some of the model assumptions are modified (see below).
Figure \ref{fig:model} shows that the model QLFs (red solid lines) agree well with the observed ones.
Like in the reproduction of galaxy luminosity function from a halo mass function, modeling a QLF from a halo mass function has a tendency of overproducing the number density at low and high luminosity ends.
In our model, the faint end of the QLF is suppressed mainly by the outshining effect.
If there is no outshining effect, as represented by the red dotted lines in Figure \ref{fig:model}, the model would overproduce the faint QSO population.
At the bright end, we succeeded in matching the observed QLF by introducing scatters in the scaling relations and the Eddington ratio distribution.
The successful suppression of the QLF faint-end via the outshining effect suggests that there may be a large number of faint AGNs ($M_{1450}\gtrsim-24$ mag) that are not identified as quasars due simply to their faintness with respect to host galaxies (the dotted lines in Figure \ref{fig:model}).
This is also in line with the recent claim on the rapid decrease of AGN fraction among UV sources at that magnitude range \citep{Bowler21}.
Some of the QLFs based on the X-ray detection suggests a large number of faint AGNs, which has been a subject of controversy \citep{Giallongo19}.
The faint AGNs, outshone by their host galaxies in UV (the red dashed lines in Figure \ref{fig:model}), may explain such a large number of X-ray faint AGNs by some studies (the green crosses in Figure \ref{fig:model}).
We also note that the X-ray QLF, converted from our model without outshining effect using the correction factor from \cite{Shen20}, is roughly consistent with those from the recent X-ray observations at $z\sim4$ \citep{Aird15,Vito18}.
Furthermore, our outshining model suggests that the X-ray QLF does not need to follow the PDE behavior of UV QLF.
If this is true and the UV photon escape fraction of the faint AGNs is as high as luminous quasars, the faint AGN population may be responsible for a large fraction of the UV photons required for ionizing the intergalactic medium \citep{Madau15,Giallongo19}.
For example, our model without outshining effect gives an ionizing emissivity at $912$ \AA~of $\epsilon_{912}\sim10^{24}$ erg s$^{-1}$ Hz$^{-1}$ Mpc$^{-3}$ at $z=6$, using the equations (5) and (6) of \cite{Kim20}, which is an order of magnitude higher than the value we would get from the observed QLF \citep{Matsuoka18}.
Our fiducial model does not include the evolution in the $M_{\rm BH}$-$M_{\rm gal}$ scaling relation, although several studies support the scaling relation evolution.
The scaling relation evolution states that $M_{\rm BH}$ for a given $M_{\rm gal}$ increases as a function of redshift (i.e., the BH grows first, followed by the galaxy growth).
Therefore, the quasar luminosity increases for a given $M_{\rm gal}$, resulting in an overall shift of the model QLF toward higher luminosity, and this is more so at higher redshifts.
Additionally, the faint end of QLF increases since the $M_{\rm BH}$-$M_{\rm gal}$ scaling relation is not linear in our model.
If the scaling relation evolves as $\log(M_{\rm BH}/M_{\rm gal})=0.28z-2.91$ \citep{Decarli10}, however, the mismatch in the faint end is pronounced (the orange dotted lines in Figure \ref{fig:model}).
Moreover, to match the observed QLF, we need to decrease $P^{*}$ as a function of redshift (the orange diamonds in Figure \ref{fig:logP}), which seems contradictory to the expectation that $P^{*}$ stays constant or increase with redshifts.
The model QLF under-predicts the bright end of the $z=6$ QLF.
One way to cure this problem is to increase the $M_{\rm BH}$-$M_{\rm gal}$ relation scatter to 0.6 dex (the blue dotted lines in Figure \ref{fig:model}), which can happen in reality since massive halos are not mandatory for extremely bright/massive quasars (e.g., \citealt{DiMatteo17,Yoon19}) and outliers from low mass halos can contaminate the bright end easily.
However, adopting this assumption overproduces the bright end of lower redshift QLFs.
If the $M_{\rm BH}$-$M_{\rm gal}$ relation scatter increases with redshift, such an overproduction can be solved.
Another way to solve the bright-end problem of the $z=6$ model QLF is to introduce the gravitational lensing effect.
Our model $z=6$ QLF has an intrinsic bright-end slope of $\beta\sim-3.7$, and introducing gravitational lensing effect boosts the QLF shape at the bright end to the observed numbers (the red translucent line in Figure \ref{fig:model}, taken from \citealt{Pacucci20}).
For this to be true, a significant fraction of known $z\sim6$ bright quasars must be lensed, but such lensed bright quasars are still rare \citep{Fan19,Fujimoto20}.
We also explored how the model QLF changes if we adjust the outshining effect criterion.
If we loosen the criterion to $M_{1450}<M_{\rm 1500,gal}$, to include galaxies with a bit less luminous AGN than our base assumption, the number of quasars increases slightly and mildly at the faint end (the purple line in Figure \ref{fig:model}).
\section{Conclusion\label{sec:conclusion}}
We investigated the evolution of the UV QLFs at $2\lesssim z\lesssim6$ that are complied from recent large-area surveys.
We find that the QLF evolution can be described well with PDE.
This result is somewhat unexpected in comparison to the QLF evolution at lower redshifts for which more complicated evolutionary behaviors have been found.
Furthermore, we find that the UV QLF at $z>2$ has a universal DPL function form with a faint-end slope of $\alpha\simeq-1.1$, a break absolute magnitude of $M_{1450}^{*}\simeq-24.6$ mag, and a bright-end slope of $\beta\simeq-2.9$.
To understand the universal shape of the UV QLF and its PDE, we constructed a model QLF, starting from the $M_{h}$ function and applying several scaling relations that connect $M_{h}$ to $M_{\rm gal}$ and $M_{\rm BH}$, and then to quasar luminosity.
Additionally, we added the outshining effect of AGN over its host galaxy.
With these ingredients, we find that our model QLF can reproduce the observed QLFs at $z>2$.
Although there may be other ways to reproduce the observed QLF behavior, we suggest that the outshining can be an important factor in shaping the UV QLF at high redshift, especially at $z\gtrsim5$.
The importance of the outshining effect implies the existence of many faint AGNs that are buried under the galaxy light, and such faint AGNs could provide a large portion of the UV photons required for ionizing the intergalactic background.
Deep and wide NIR spectroscopic surveys with future facilities could reveal such hidden populations of faint AGN, and allow us to investigate the QLF evolution in a broader context than the simple PDE scenario presented in this work.
\acknowledgments
We thank Linhua Jiang for insightful comments, and Woncheol Jang, Byungwon Kim, and Sungkyu Jung for useful discussion about statistical tests of the QLF evolution.
We thank Fabio Pacucci for providing the expected QLF by gravitational lensing effect in \cite{Pacucci20}.
This work was supported by
the National Research Foundation of Korea (NRF) grant (2020R1A2C3011091) funded by the Korean government (MSIP).
Y. K. acknowledges the support from the China Postdoc Science General (2020M670022) and Special (2020T130018) Grants funded by the China Postdoctoral Science Foundation.
|
\section{Notation Table}
\mbox{}
\nomenclature[A,01]{$\tau_i$}{The ad type of Player i}
\nomenclature[A,02]{$v_i$}{Valuation of Player i }
\nomenclature[A,04]{$b_i$}{Bid of Player i}
\nomenclature[A,03]{$b_i(v_i)$}{Bid mapping of player $i$}
\nomenclature[B,01]{$\mathcal{A}$}{An allocation algorithm}
\nomenclature[B,02]{$\P_{\mathcal{A}}$}{A pricing algorithm that uses $\mathcal{A}$ as its allocation subroutine}
\nomenclature[B,03]{$\mathbf{b}$}{A bid vector}
\nomenclature[B,04]{$\mathbf{b}_i$}{The ith component of the bid vector $\mathbf{b}$}
\nomenclature[C,01]{$\text{opt}$}{The optimal welfare achievable given valuations}
\nomenclature[C,02]{$\text{SW}$}{Social Welfare}
\nomenclature[C,03]{$W$}{(True) Welfare as function, or specific welfare value in context }
\nomenclature[C,04]{$\widehat{W}$}{(Public) Welfare, i.e. welfare if bids were valuations, or public welfare value in context}
\nomenclature[C,05]{${W}^{-i}$}{(True) Welfare excluding $i$. , or true welfare excluding $i$ in context}
\nomenclature[C,06]{$\widehat{W}^{-i}$}{(Public) Welfare excluding $i$, or public welfare excluding $i$value in context}
\nomenclature[D,01]{$\delta_A$, $\delta_B$}{Player A's, Player B's discount rate for the second slot}
\nomenclature[D,02]{$v_A$, $v_B$}{Player A's,Player B's valuation for a click}
\nomenclature[D,03]{$b_A$, $b_B$}{Player A's, Player B's bid}
\nomenclature[D,04]{$\mathcal{R}(\mathbf{v})$}{Revenue. Given equilibrium/mechanism, $\mathcal{R}$ is function of valuations (i.e. $v_A$,$v_B$ in Section \ref{s:eq}).}
\nomenclature[E,01]{$\pi_{\mathcal{A}}(s,\mathbf{b})$}{The player in slot $s$ when the bid vector is $\mathbf{b}$. When clear, we may omit $\mathbf{b}$ and $\mathcal{A}$. }
\nomenclature[E,02]{$\tau(i)$}{The type of Player i}
\nomenclature[E,03]{$\tau(\pi(s))$}{The type of the player in slot $s$}
\nomenclature[E,04]{$\sigma_{\mathcal{A}}(i,\mathbf{b})$}{The slot that player $i$ receives under allocation algorithm $\mathcal{A}$ when the bid vector is $\mathbf{b}$. When clear, we may omit $\mathbf{b}$ and $\mathcal{A}$. }
\nomenclature[E,05]{$\boldsymbol{\nu}$}{Optimal allocation assignment vector as measured by (true) welfare given valutations}
\nomenclature[E,06]{$\nu(i)$}{$i$'s slot under the optimal assignment}
\printnomenclature
\section{Experimental Framework and Parameters} \label{sec:appexperiments}
The exact theoretical results we provide are interesting, but are limited to simple settings.
In order to evaluate the equilibrium revenue and welfare of the mechanisms studied in a more general and realistic setting, we need to devise a computational approach we can take to data.
It is computationally hard (\cite{chen2009settling}) in general to directly compute a Nash equilibrium, but at the cost of considering a more general equilibrium concept, we can make progress via no-regret learning (NRL) algorithms. In particular, we apply the well-known fact that the empirical distribution of action profiles taken by players using NRL algorithms forms a \emph{coarse correlated equilibrium}.
We describe the theory behind this approach in further detail below, but first we summarize our simulation framework at a high level. We explore two settings. We call the first (presented second in the main body of the text) the \emph{fixed valuation setting}, because bidders are assumed to have fixed valuations given which they learn to bid. We call the second the \emph{random valuation setting}, because bidders are modeled as randomly drawing a valuation each round. These two settings capture different but potentially equally reasonable models of repeated auctions. The fixed valuation setting is a good model for repeated auctions in which bidders are stable and have a sense of their opponents' valuations; the random valuation setting better captures bidders who may compete in auctions against entirely different opponents, and be competing for users with different valuations. Despite this apparent difference, however, the approach we use to learn their equilibria is largely similar, as will become apparent.
\subsection{Theoretical Underpinnings}
A \emph{coarse correlated equilibrium} is a more general equilibrium concept than a Nash equilibrium:
\begin{definition}[Coarse Correlated Equilibrium]
We say a distribution $\mathcal{D}$ over actions is a \emph{coarse correlated equilibrium} (CCE) if for every player $i$, and every action $a'$:
\begin{align*}
\E_{\mathbf {a} \sim \mathcal{D}}[u_i(\mathbf {a})] \geq \E_{\mathbf{a} \sim \mathcal{D}} [u_i(a',\mathbf {a}_{-i})]
\end{align*}
In other words, if a strategy profile is drawn from a distribution $\mathcal{D}$, it is in each player's interest to follow their own part of the prescribed strategy under the assumption that others also will.
We say that $\mathcal{D}$ is an $\epsilon$-approximate CCE if
\begin{align*}
\E_{\mathbf {a} \sim \mathcal{D}}[u_i(\mathbf {a})] \geq \E_{\mathbf{a} \sim \mathcal{D}} [u_i(a',\mathbf {a}_{-i})] -\epsilon
\end{align*}
\end{definition}
Next, we describe the simplest version of NRL that is useful for our purposes:
\paragraph{No-Regret Learning Framework.}
In the No-Regret Learning (NRL) Framework, a decision-maker faces an online sequence of decision problems with a fixed action set $\mathscr{A}$ over a finite time horizon. For each round $t=1...T$, the player selects $a^t$ from a probability distribution over $\mathscr{A}$, which we denote by $\alpha^t(a)$; the \emph{losses} (equivalently, payoffs) for each action $a$ are realized as $u^t(a)$, and the player receives the loss of whatever action he selected, i.e. $u^t(a^t)$\footnote{To be consistent with the literature, we will assume without loss of generality that payoffs are bounded between $0$ and $1$. This is also consistent with our normalization.}. (In the learning context, $u^t(a)$ is an arbitrary sequence of loss vectors, but in the game setting we can think of $u^t(a)$ as instead being a fixed utility function that depends on the decision-maker's choice but also on the choice of all other agents. In other words, $u^t(a) = u(a, \mathbf{a}_{-i}^{t})$.)
The (external) \emph{regret} of an action sequence is the difference between the payoff of the best fixed action $a^*$ and the player's payoff over the sequence. That is:
\begin{align*}
R_T = \sum_{t=1}^{T} u^t(a^*) - \sum_{t=1}^{T} u^t(a^t) \qquad a^* \in \argmax_{\mathscr{A}} \sum_{t=1}^{T} u^t(a^*)
\end{align*}
If an online learning algorithm promises that for every $\epsilon >0$, there exists a $T$ such that whatever the sequence of losses:
\begin{align*}
\E\left[\frac{R_T}{T} \right]\leq \epsilon
\end{align*}
where the expectation is over the randomness of the algorithm, we say it is a \emph{NRL} algorithm. Of course, there is a huge literature on variants and generalizations of the simple framework presented here, but all we really need is the following result\footnote{A similar result can be obtained with high probability over the \emph{realized} sequence. (\cite{roughgarden2016twenty}), but its guarantees require extra time steps to allow for concentration of realized regret around expected regret.}:
\begin{clm}[No-Regret Implies CCE]\label{clm:cce}
Suppose that players each use a NRL strategy that guarantees average regret $\epsilon(T)$. Fix a horizon $T$ and let $\boldsymbol{\alpha}^1,...,\boldsymbol{\alpha}^T$ be the probability vectors for the \emph{joint} distribution of action profiles induced by each players' play. Then
the following compound distribution, which we call the \emph{average empirical action distribution}, is an $\epsilon(T)$-approximate CCE:
\begin{align*}
\bar{\mathcal{D}} \coloneqq \boldsymbol{\alpha}^{\tilde{t}}, \ \ \tilde{t} \sim \text{Uniformly}\{1,2,...,T\}
\end{align*}
\end{clm}
Note that if $\mathbf{a} \sim \bar{\mathcal{D}}$, then $\mathbf{a}$ is drawn from the joint distribution over actions profiles at a uniformly selected time period. The proof this claim is well-known and almost immediate; see e.g. \cite{roughgarden2016twenty}.
We can thus use Claim \ref{clm:cce} to obtain a measure of the performance of our mechanisms under a CCE. Our high-level approach will be to simulate a repeated game corresponding to that induced by each of the mechanisms we study, allow agents to learn to bid using NLR algorithms, and estimate each mechanism's equilibrium welfare, revenue, and empirical price of anarchy by sampling from the average empirical joint distribution. The particular NLR algorithm we choose is the Exponential Weights (EW), one of the most well-studied algorithms with well-developed guarantees. Algorithm \ref{alg:ew} provides pseudocode for the basic (EW) algorithm applied to our setting:
\begin{algorithm}[H]
\caption{Exponential Weights
\label{alg:ew}}
\KwIn{Learning Rate $\eta$, Bid Space $\mathcal{B} = \{0,\frac{1}{d},\frac{2}{d},...1\}$, Number of Steps $T$, Mechanism $M$}
$\mathcal{W}(b)^0 \gets \frac{1}{d+1}$ for each $b$ in $\mathcal{B}$.\\
\For{$t \in 1...T$}{
Draw $b^{t} \sim \mathcal{W}^t$.\\
Submit $b^t$ to $M$. \\Experience utility $u_i(b^t)$ from mechanism.\\
Query $M$ to obtain counterfactual utility $u(b')^t$ for all alternative bids $b'$ in $\mathcal{B}$. \\
Update weights using $\mathcal{W}^{t+1}(b) = \exp(\eta u(b)^t) \cdot\mathcal{W}^{t}(b)$ for all $b$\\
Renormalize weights.
}
\end{algorithm}
The choice of the learning rate parameter $\eta$ will affect the performance of the algorithm. A basic analysis of EW is available in many books and lecture notes (e.g. \cite{roughgarden2016twenty}), so we state the following claim without proof:
\begin{proposition}[EW Optimal $\eta$] \label{clm:eweta} Under the EW algorithm, the optimal choice of $\eta$ for a known-horizon setting with $K$ actions is $\eta= \sqrt{\frac{\ln K}{T}}$, resulting in worst-case expected regret $2 \sqrt{\frac{\ln K}{T}}$. Thus to guarantee $\epsilon$ expected regret (and so achieve an $\epsilon$-CCE), we need $T=\frac{4\ln K}{\epsilon^2}$ rounds of learning.
\end{proposition}
\paragraph{Protocol for Experiment 2 and 3.} Algorithm \ref{exp:twothree} gives pseudocode for the protocol as a whole. At a high level, the component steps are simply: sampling a valuation for the bidders; running EW for the desired number of learning rounds; after completing learning, re-sample a strategy profile from the bidder strategy distributions from a randomly sampled round and measure the revenue, welfare, and price of anarchy. We run $N_l$ rounds of learning, re-sample $N_t$ times, and repeat this for $N_s$ valuation samples. Using the guarantees of Claim \ref{clm:eweta}, we can decide how stringent we want our CCE to be (i.e. how much ``approximation'' we allow in the ``approximate'' CCE) and then set $N_l$ and $\eta$ accordingly; we then select $N_t$ based on how exact we would like an estimate. We highlight, though, that there is a significant cost to increasing the various parameters of the experiment. For instance, each additional learning step actually requires $d*M+1$ auctions (i.e. the original and all counterfactual bids for all bidders); put together with the $N_t$ samples from the time-averaged distribution, this implies that each additional valuation sample requires running $N_l(dM+1)+N_t$ full auctions for each mechanism. We are thus constrained in the length of experiments we could run. We provide detailed descriptions and chosen values for these and other parameters in Section \ref{s:app-expdetails}.
\begin{algorithm}
\caption{Protocol for Experiments 2 and 3
\label{exp:twothree}}
\SetKwInOut{Input}{input}\SetKwInOut{Output}{output}
\Input{Bid dataset $\mathscr{D}$; Bid discretization number $d$; Number of learning steps $N_{l}$, Number of Test steps $N_{t}$, Number of sampling steps $N_s$, Number of slots $S$, Bidder set $\mathcal{I}$, Number of Bidders $M$, EW Learning Rate $\eta$}
\For{$(\mathcal{A}, \P_{\mathcal{A}}) \in \{\text{[Greedy,Opt]} \times \text{[GSP,VCG]} \}$}{
\For{$t \in 1,2...,N_s$}{
Draw $M$ valuations randomly from $\mathscr{D}$.\\
Initialize bidders with values and fresh Exp. Weights($\eta$). Store each in $\mathcal{W}_{is}^t$.\\
\For{$t \in 1,2,...,N_l$}{
Initialize and run an $S$-slot auction using $(\mathcal{A}, \P_{\mathcal{A}})$\\
Draw bids and fix them.\\
\For{$i \in \mathcal{I}$}{
\For{$b' \in \{\frac{1}{d}, \frac{2}{d}, ...,1\}$}{
Re-run auction with all other players' bids fixed, but player $i$ using $b'$\\
Save payoff \\
}
Update ExpWeights. \\
}
}
\For{$t' \in 1,2,...N_t$}{
Draw round number $r_t$ uniformly at random from $\{1,...N_L\}$ \\
Draw bid for each bidder from bidder distributions at that round\\
Run auction with these bids\\
Calculate and save round info \\
}
Store sample results\\
}
}
\end{algorithm}
\paragraph{Random Valuation Setting.} To study an empirical version of the Bayes-Nash equilibria we analyzed, we use the \emph{population interpretation} of Bayesian games. In this interpretation, we view each valuation as a separate player from a population (which corresponds to the original player); so for instance, rather than having two players valuations distributed uniformly, we would have two populations of player with valuations distributed with equal probability over the discrete uniform distribution. The game then consists of nature first selecting a player from each population and then each player acting as a standard agent (i.e. playing a normal form game rather than a Bayesian game). This interpretation has a long history, but \cite{hartline2015no} show that the utility of NRL algorithms extends to this interpretation. In particular, they show that that if each individual type uses a NRL algorithm, then any convergent subsequence of the sequence of strategy distributions converges almost surely to a (Bayesian) CCE. They also prove that the social welfare of play enjoys the welfare guarantees of stage game if it is smooth via an extension argument.
We use a similar approach to learn a BCCE in our setting. There are multiple definitions of BCCEs \cite{forges1993five}, but the one used by \cite{hartline2015no} is a natural one and corresponds to a standard CCE over the population of the game. (It is thus quite intuitive that NRL would produce a correlated equilibrium in this setting.) One addition we make is that of a \emph{uniform exploration period}. This period is inspired by \cite{feng2021}, which shows that adding a period of uniformly random exploration (and updating weights based on the exploration) before following the recommendations of the NRL algorithm results in provable convergence to specific, natural equilibria\footnote{For instance, in a first price auction, they recover the classic symmetric profile of each bidder bidding a $1/(N)$ fraction of the value, where $N$ is the number of bidders. Convergence to \emph{specific} equilibria is not generally guaranteed or easy to prove, so this exploration period does add value. }.
\paragraph{Protocol for Experiment 1.} We imagine the two-bidder, two-auction uniform distribution case from Section \ref{s:eq}, but now view the bidders as \emph{populations}. We discretize the uniform distribution over $[0,1]$ into $[0, \frac{1}{V},\frac{2}{V},...1]$; every \emph{population representative} for both populations has one of those valuations. When a round occurs, we randomly select a population representative from each population, and each representative has an equal probability of selection. (Hence, as the discretization becomes increasingly fine, we approach the continuous uniform distribution.)
If the round $t$ is less than the number of exploration steps $N_e$, selected population representatives choose a random action; otherwise, they sample a bid from their EW distribution. In either case the representatives playing update their EW distributions.
We run this for a large number of rounds, each round recording the valuations of the selected population representatives and how they bid. We then compute the average bid for each population representative over the non-exploration period and use this as their average bid.
\begin{algorithm}
\caption{Protocol for Experiment 1
\label{exp:bayes}}
\SetKwInOut{Input}{input}\SetKwInOut{Output}{output}
\Input{Value discretization $V$, Bid discretization number $d$; Number of learning steps $N_{l}$, Number of slots $S$, Bidder Populations $\mathcal{I}$, Number of Bidders $M$, EW Learning Rate $\eta$}
\For{$(\mathcal{A}, \P_{\mathcal{A}}) \in \{\text{[Greedy,Opt]} \times \text{[GSP,VCG]} \}$}{
Initialize set of population representatives $\mathcal{V}_i:= \{0, \frac{1}{V}, \frac{2}{V}...,1\}$ for each player $i$ \\
For each valuation, initialize a separate instance of EW with weight $\eta$ \\
\For{$t \in 1,2,...,N_l$}{
For each population $i$, draw index $j$ uniformly from $\{0,1...,V\}$ \\
Initialize and run an $S$-slot auction using $(\mathcal{A}, \P_{\mathcal{A}})$
with bidder with valuation $\frac{1}{j_i}$ from each population $i$
\\
Draw bids from each bidder's EW distributions as of time $t$ \\
\For{each drawn bidder}{
\For{$b' \in \{\frac{1}{d}, \frac{2}{d}, ...,1\}$}{
Re-run auction with other bidders' bids fixed, but player $i$ using $b'$\\
Save payoff \\
}
Update ExpWeights for bidder\\
}
}
}
Return dataset of drawn bidder and bids
\end{algorithm}
\subsection{Experiment Details}\label{s:app-expdetails}
Table \ref{table:exp} provides more details on the experimental parameters we chose. Since each sample runs many auctions, each of which is expensive to run, the parameter choices must balance the experiment complexity (i.e. how many bidders, slots, how many bid choices) with the the computational constraints. Before turning to random value setting, we briefly describe each parameter:
\begin{itemize}
\item {\textbf {Equilibrium Concept.}} Whether we are searcing for CCE or BCCE.
\item {\textbf {Bid Data.}} Whether we draw data form the Random Advertisers vs. Random Auction datasets, or simply use the discretized uniform distribution (Synthetic).
\item {\textbf {Bid Discretization.}} The number (excluding $0$) of evenly-spaced bids into which we divide the bidspace.
\item{\textbf {Value-dependent Discretization.}} Whether bid options are evenly spaced between $0$ and a bidder's valuation rather than just evenly spaced between $0$ and $1$.
\item{\textbf {Number of Bidders.}} How many bidders in the experiment. For the case of the Bayesian Setting (Experiment 1), we count each valuation separately.
\item{\textbf {Number of Slots.}} How many slots are available.
\item{\textbf {Number of Learning Steps.}} How many rounds are used for learning. (In the Experiment 1, this is total, not per bidder-valuation pair.)
\item{\textbf {Number of Exploration Steps.}} How many rounds pre-EW are used for pure random exploration.
\item{\textbf {Number of Test Steps.}} After the learning phase, how many observations from the average empirical distribution we use to estimate relevant quantities.
\item{\textbf {Allow Overbidding.}} Whether we allow bidders to bid more than their value. (If we do, bid choices are evenly spaced between $0$ and $2$ if bids are not value-dependent and $0$ and twice the valuation if they are.)
\item{\textbf {Geometric Discount Constant.}} The discount constant, i.e. discount for the first slot for each bidder.
\item{\textbf {Geometric Discount Constants.}} Constant factors in the bidders' discount curves.
\end{itemize}
\footnotesize
\begin{table}[h!]
\centering
\begin{tabular}{||c c c c c||}
\hline
Variable & Description & Experiment 1& Experiment 2 & Experiment 3 \\ [0.5ex]
\hline\hline
Eq? &Equilibrium Concept & BCCE & CCE & CCE \\
$\mathcal{D}$ & Bid Datasets & Synthetic & Random Advertisers & Random Auction \\
$d$ &Bid Discretization & 20 & 20 & 20 \\
$\mathscr{D}(v)$? & Discretization depends on value? & \greencheck & \greencheck & \greencheck \\
$M$& Number of Bidders &2 &9 &9 \\
$|\{v_b\}|$ & Number of valuations per bidder & 11 & 1 &1 \\
$S$ &Number of Slots & 2& 4&4 \\
$N_s$ &Number of Sampled valuations & NA& 200 &200\\
$N_l$ &Number of Learning Steps & 500000 & 100&100 \\
$N_t$& Number of Testing Steps& NA & 200& 200 \\
$N_e$&Number Exploration Steps &10367 &0 &0 \\
OB? &Allow Overbidding? & \greencheck & \redx & \redx \\
$\mathbf{\delta}_0$ & Geometric Discount Constant & 1 & 1 & 1 \\
$\mathbf{\delta}$ & Geometric Discount Factors & \tiny$[.37,.85]$ & \tiny $[0.9, 0.9,0.8,0.8,0.7,0.7,0.6,0.6,0.5]$ & \tiny $\leftarrow \leftarrow \leftarrow $\\ [1ex]
\hline
\end{tabular}
\caption{Experimental Parameters}
\label{table:exp}
\end{table}
\normalsize
\section{Detailed Proofs}
\subsection{Proofs from Section \ref{s:poa}}\label{s:app-smoothproofs}
\begin{proof}[Proof of \Cref{lem:partialmon}]
First consider player $i$. Since $i$ increased his bid between $b$ to $b'$, he achieves some slot $\sigma'$ at least as high as $\sigma$.
Now, consider slots above $\sigma'$. By definition, $i$ has not placed an effective bid higher than bidders occupying those slots (or else he would have been placed in that slot or above). So $i$'s deviation leaves unchanged the bidder allocation and so valuations for those slots. Now, at $\sigma'$, by construction, we must have that
\begin{align*}
\delta_{\tau(i)}^{\sigma'} b_{i}' \geq \delta_{\tau(\pi(\sigma', b))}^{\sigma'} b_{\pi(\sigma', b)}
\end{align*}
or else $i$ would not have been assigned to $\sigma'$. So the desired inequality holds for this slot.
Finally, consider each slot $s'$ between $\sigma'$ and $\sigma$. Notice that the set of bidders unallocated when $s'$ is considered under $b'$ has only changed by \emph{losing} $i$ and possibly \emph{gaining} either $\pi(\sigma', b)$ or a displaced previous winners from slots between $\sigma'$ and $\sigma$ due to $\pi(\sigma', b)$ being displaced by $i$ and any cascading effects. But this means that in particular $\pi(s',b)$ remains unallocated when $s'$ is considered. Hence, if $\pi(s',b') \neq \pi(s',b)$, it can only be because the assigned bidder under $b'$ had higher discounted value than the bidder assigned there under $b$. Since this holds for any $s'$ in the range, the claim holds.
\end{proof}
\begin{proof}[Proof of \Cref{thm:lbgreedyvcg}]
Let $v_A=1+\epsilon$, $v_B = 1$, $v_C = 1-\epsilon$. Let ${\boldsymbol {\delta}_A} = (1, 1,1-2\epsilon)$, ${\boldsymbol{\delta}}_B=(1,1,0)$, $\boldsymbol{\Delta}_C=1, \epsilon, \epsilon^2$.
The welfare of $(C,B,A)$ is $3-2\epsilon -2\epsilon^2$, while the welfare of $(A,B,C)$ is $2+\epsilon+\epsilon^2 -\epsilon^3$.
Suppose that each player bids their value, ie:
\begin{align*}
b^* = (b_A,b_B,b_C) = (v_A,v_B,v_C) = (1+\epsilon, 1, 1-\epsilon).
\end{align*}
We claim this is an equilibrium and results in $(A,B,C)$. The allocation follows since the allocation algorithm is greedy in bids. To see that this is an equilibrium, first consider what values each player is getting: A gets $1+\epsilon $, B gets $1$, C gets $(1-\epsilon) \epsilon^2 = \epsilon^2 - \epsilon^3$. With these, we can calculate what prices each player is paying: Player C pays nothing, since he is imposing no externality on A or B. B is imposing an externality on C - without B, C would get the second slot for a valuation of $\epsilon-\epsilon^2$ and B imposes no externality on A. So B will be charged $\epsilon-\epsilon^2$. Finally, A imposes the same externality on C (because without A, B would get the first slot, so C would get the second slot) and imposes no externality on $B$.
So the payoffs are:
\begin{align*}
\pi_A(b^*) &= 1+\epsilon - \epsilon +\epsilon^2 = 1+\epsilon^2 \\
\pi_B(b^*) &= 1 -\epsilon+\epsilon^2\\
\pi_C(b^*) &= \epsilon^2
\end{align*}
Notice that these are always positive. (The only one that could possibly be negative would be $\pi_B$, but if $\epsilon <1$, then $1-\epsilon >0 \implies \pi_B>0$; if $\epsilon>1$, then $\epsilon^2-\epsilon >0 \implies \pi_B>0$.)
Now we consider possible deviations. Start with A. While there are an uncountable number of deviations in bid space, they are all equivalent but for their effects on A's position and price. So notice that if $A$ were to move to second position by bidding $b_A'$ less than $b_B$ but more than $b_C$, it would receive the same payoff, because its discount rate is $1$ and it imposes the same externality as before, so no such bid could improve A's payoff. If A were to bid $b_A'$ less than $b_C$, it could get the third slot at a price of 0, but it would only get $1-2\epsilon < 1+\epsilon^2 = \pi_A(b^*)$. So A has no profitable deviations. For B, improving his position cannot improve his payoff or change his externality, and moving to slot 3 would result in $0$ payoff, while he currently makes positive profit. For Player C, notice that first of all, if we rule out overbidding, Player C cannot improve his position; but suppose we do not rule this out. By moving to Slot 2 (by bidding, say, $b_C= 1+\epsilon/2$) C would exert an externality of $1$ on Player $B$ and so get negative payoff ($1-\epsilon -1 = -\epsilon$). By moving to Slot 1 (by bidding $b_C \geq 1+\epsilon$) C would exert the same externality on $B$ and so again receive negative payoff.
Hence, $b^*$ is an equilbrium. But then we have that:
\begin{align*}
\frac{EQ}{OPT} = \frac{2+\epsilon+\epsilon^2 -\epsilon^3}{3-2\epsilon - 2\epsilon^2}
\end{align*}
which comes arbitrarily close to $2/3$ for small enough $\epsilon$.
\end{proof}
We now turn to proving \Cref{thm:optgspexample}. We will proceed in several steps:first we characterize what must hold in equilibrium. Then we provide examples that meet this. Finally, we optimize this bound. We will break this up into several propositions before the main proof.
\begin{proposition} \label{prop:optgsp-poa-eq}
Let A have discount curve $(1,\delta_A)$, and B have discount curve $(1,\delta_B)$, with $\delta_A< \delta_B$ (so $\Delta : = \frac{1-\delta_B}{1-\delta_A} <1$). Now suppose that $\Delta^2 v_B \leq v_A \leq \Delta v_B \leq \frac{v_A}{\Delta} \leq v_B$\footnote{As is always nice to check, we are not reasoning about an empty set. Consider $v_B=1$, $v_A=\frac{1}{2}$, $\delta_A = \frac{1}{2}$, $\delta_B= \frac{2}{3}$.}. Then the following strategy profile is an equilibrium:
\begin{align*}
\mathbf{b}^* = \left(\Delta(1-\delta_B)v_B + \epsilon, \Delta(1-\delta_B) v_B \right)
\end{align*}
for any $\epsilon>0$, and for small enough $\epsilon$ neither bidder is overbidding. The auctioneer then selects $(A,B)$, but $(B,A)$ would be optimal.
\end{proposition}
\longversion{
Before we prove that this claim, we first show that we are not reasoning about an empty set. Consider $v_B=1$, $v_A=\frac{1}{2}$, $\Delta = \frac{2}{3}$ (which, for example, can be obtained by $\delta_A = \frac{1}{2} < \frac{2}{3} = \delta_B$). Then $\Delta^2 v_B$ = $\frac{4}{9} < \frac{1}{2}=v_A$, so the first inequality holds. $v_A = \frac{1}{2} \leq \frac{2}{3} = \Delta v_B$, so the second inequality holds. $\Delta v_B = \frac{2}{3} \leq \frac{3}{4}=\frac{1/2}{2/3}= \frac{v_A}{\Delta}$, so the third inequality holds, and $\frac{v_A}{\Delta} =\frac{3}{4} < 1=v_B$ so the final inequality holds.
Notice that under this particular example, if the auctioneer selects $(A,B)$ as claimed (and the bids truly form an equilibrium), we get a competitive ratio of:
\begin{align*}
\frac{EQ}{OPT} = \frac{v_A + \delta_B v_B }{v_B + \delta_A v_A} = \frac{1/2 + 2/3}{1+1/2*1/2} = \frac{7/6}{5/4} = \frac{28}{30}.
\end{align*}
So we will proceed to prove the claim, and then optimize the ratio.
}
\begin{proof}[Proof of \Cref{prop:optgsp-poa-eq}]
The auctioneer selects $(A,B)$ whenever
\begin{align*}
b_A + \delta_B b_B \geq b_B + \delta_A b_A \iff b_A \geq \Delta b_B.
\end{align*} But
\begin{align*}
b_a = \Delta (1-\delta_B) v_B + \epsilon \geq \Delta^2 (1-\delta_B) v_B =\Delta b_B
\end{align*}
where the inequality follows from the fact that $\delta_A < \delta_B \implies \Delta <1$. So the outcome is that A gets the top slot; since A will win as long as $b_A \geq \Delta b_B$, A will be charged $\Delta b_B$. B will receive the second slot, and be charged nothing. On the other hand, we note that (B,A) is optimal iff:
\begin{align*}
v_A + \delta_B v_B \leq v_B + \delta_A v_A \iff v_A \geq \Delta v_B.
\end{align*}
This holds by assumption, so (B,A) is in fact the optimal allocation.
Now we consider possible deviations from the bid profile. For $A$, bidding higher does not change the allocation nor the payment, and bidding lower than its bid but more than $b_B$ also does not affect the allocation or the payment, so the only deviation to consider is bidding less than $b_B$. If it does this, it will change the allocation to $(B,A)$ and get $\delta_A v_A$ while paying nothing, but:
\begin{align*}
v_A - \Delta b_B& = v_A - \Delta^2(1-\delta_B) v_B \geq v_A - v_A (1-\delta_B) \\&= v_A (1- (1-\delta_B)) = \delta_B v_A > \delta_A v_A
\end{align*}
where the first equality follows by the pricing rule and strategy profile, the first inequality follows from the fact that $v_A \geq \delta^2 v_B \implies -\Delta^2 v_B \geq -v_A$), and the final inequality by assumption. So deviating to be assigned the second slot would not be profitable for A.
Now consider B. Again, the only deviations that we must consider are those which change the allocation to $(B,A)$. But if B were to deviate to such a bid, he would be charged $b_A/ \Delta$. But we have that:
\begin{align*}
\frac{b_A}{\Delta} &= \frac{\Delta(1-\delta_B) v_B +\epsilon}{\Delta} = (1-\delta_B) v_B + \frac{\epsilon}{\Delta} \\&\implies v_B - \frac{b_A}{\Delta} = v_B - (1-\delta_B) v_B - \frac{\epsilon}{\Delta} = \delta_B v_B -\frac{\epsilon}{\Delta} < \delta_B v_B
\end{align*}
so this deviation would not be profitable for B.
Now, note that B is trivially not overbidding since $\Delta, 1-\delta_B <1$. To show that there exists a small enough $\epsilon$ so that $A$ is not overbidding, note that we need:
\begin{align*}
v_A - \Delta(1-\delta_B) v_B - \epsilon \geq 0
\end{align*}
so it is enough that $v_A -\Delta(1-\delta_B) >0$. But:
\begin{align*}
\Delta = \frac{1-\delta_B}{1-\delta_A} > 1- \delta_B &\implies -\Delta \leq -(1-\delta_B) \\&\implies - \Delta^2 < - \Delta(1-\delta_B)\\&\implies -v_B \Delta^2 < -v_B \Delta(1-\delta_B)
\end{align*}
But then
\begin{align*}
v_A - v_B \Delta (1-\delta_B) > v_A - \Delta^2 v_B \geq 0
\end{align*}
as desired, where the last inequality follows by assumption.
Thus, we have shown that this bid profile is an equilibrium that achieves suboptimal welfare.
\end{proof}
Now we turn to optimizing this bound.
\begin{proposition}\label{prop:optimizing}
There exists a choice $v_A, v_B$, $\delta_A < \delta_B$, such that the bid profile above is an equilibrium and obtains welfare arbitrarily close\footnote{We leave it here to avoid tie-breaking issues.} to 3/4 of the optimal welfare. This implies that the Price of Anarchy is at least $4/3$.
\end{proposition}
{
\begin{proof}
Let $v_B = 1$, and let $\delta_B=\frac{1}{2}$. We won't fix $\delta_A$, but rather we will assume that $\delta_A< \delta_B =\frac{1}{2}$ let it approach $0$. We also set $v_A$ as a function of $\delta_A$: $v_A = \frac{1}{4(1-\delta_A)^2}$.
Now notice that $r = \frac{v_A}{v_B} = \frac{1}{4(1-\delta_A)^2} = \frac{(1/2)^2}{(1-\delta_A)^2} = \frac{(1-\delta_B)^2}{(1-\delta_A)^2}=\Delta^2$. Then
\begin{align*}
\Delta^2 \leq r \leq \Delta \leq r/\Delta \leq 1\text{ and } \Delta^2 v_B \leq v_A \leq \Delta v_B \leq \frac{v_A}{\Delta} \leq v_B.
\end{align*}
Hence, the hypotheses of \Cref{prop:optgsp-poa-eq} are satisfied, so the equilibrium described is an equilibrium. Then the competitive ratio is given by:
\begin{align*}
\frac{EQ}{OPT} = \frac{\frac{1}{2} + \frac{1}{4(1-\delta_A)^2}}{1 + \frac{\delta_A}{4(1-\delta_A)^2}} = \frac {2(1-\delta_A)^2 + 1}{\delta_A + 4(1-\delta_A)^2}
\end{align*}
Notice that at $\delta_A =0$, this quantity is $\frac{3}{4}$, and is $1$ at $\frac{1}{2}$. But notice also that the denominator, viewed independently, is a quadratic function with only complex roots. Thus, the fraction is continuous. Since it varies continuously from $1$ to $3/4$, it must pass through every point arbitrarily close to $3/4$ from the right.
Hence, we can achieve competitive ratio arbitrarily close 3/4, so the Price of Anarchy is at least 4/3.
\end{proof}
\begin{proof}[Proof of \Cref{thm:optgspexample}]
Combining \Cref{prop:optgsp-poa-eq} and \Cref{prop:optimizing} yields the claim.
\end{proof}
\subsection{Proofs from Section \ref{s:eq}}
\begin{proof} [Proof of \Cref{thm:eqoptgsp}]
We follow the same structure as the proof of Theorem \ref{thm:eqggsp}. Consider the problem from A's perspective, and suppose that B is using a linear strategy $\beta v_B$. (In the theorem statement, $\beta = 1-\delta_B$, but as in Theorem \ref{thm:eqggsp}, A's best-response will not depend on $\beta$ being $(1-\delta_B)$, so we leave it free.) Now, note that the winning condition is that:
\begin{align*}
(A,B) \succeq (B,A) \iff b_A \geq \Delta b_B = \Delta \beta v_B
\end{align*}
Suppose that $A$ wins the top slot with a bid $b_A$. For now, suppose that $b_A$ is less than $\beta \Delta$. Then the expected payment is:
\begin{align*}
\E[\Delta b_B| \Delta b_B \leq b_A] &= \E[ \Delta \beta v_B| v_B \leq \frac{b_A}{\Delta \beta}] \\
&= \beta \Delta \E[v_B|v_B \leq \frac{b_A}{\Delta \beta}] = \beta \Delta \frac{b_A}{2 \Delta \beta} = \frac{b_A}{2}
\end{align*}
where the second inequality follows from the properties of the uniform distribution.
Then by choosing any $b_A$, A gets the expected payoff:
\begin{align*}
\E[u_A(b_A|v_A)] &=\left (v_A- \frac{b_A}{2}\right)\Pr[b_B \leq b_A] + \delta_A v_A (1-\Pr[b_B \leq b_A])
\\ &= \left(v_A- \frac{b_A}{2}\right) \frac{b_A}{\beta \Delta } + \delta_A v_A\left(1- \frac{b_A}{\beta\Delta}\right) \\&= \frac{v_A b_A}{\beta \Delta} - \frac{b_A^2}{2 \beta \Delta} + \delta_A v_A - \frac{b_A\delta_A v_A}{\beta \Delta}
\end{align*}
Taking the derivative, the first order conditions requires that
\begin{align*}
\frac{v_A}{\beta\Delta} - \frac{b_A}{\beta \Delta} - \frac{b_A \delta_A v_A}{\beta \Delta} = 0 \iff b_A = (1-\delta_A)v_A.
\end{align*}
As the second derivative is negative, this is a maximum.
On the other hand, if $b_A > \beta \Delta$, $A$ wins with probability $1$ and pays $\E[\Delta \beta v_B] = \frac{\beta \Delta }{2}$, getting total payoff $v_A - \frac{\beta \Delta}{2}$. Again, notice that this is the same as the value taken on by the other expression above if $b_A = \beta \Delta$, and bidding any $b_A > \beta \Delta$ results in the same payoff as bidding $\beta \Delta$. So as before, $A$ need only consider maximizing his utility over $b_A \in [0, \beta \Delta]$; the maximum can be either at $0$, $\beta \Delta$, or the critical point (which is a maximum), or the endpoints. But the payoff is increasing for all point left of the critical point and decreasing for all points right of it; hence, as before, if the critical point is left of $\beta \Delta$, it is an interior maximum, and if it after $\beta \Delta$, then it is just as good as bidding $\beta \Delta$.
Hence, $b_A=(1-\delta_A) v_A$ is a best response, and the linear portion is unique whenever $b_A = (1-\delta_A) v_A \leq \beta \Delta \implies v_A \leq \frac{\beta \Delta}{1-\delta_A}$. That is, the linear coefficient of $(1-\delta_A)$ is unique for all $v_A \in [0, \frac{\beta \Delta}{1-\delta_A}]$, but any bid of at least $\beta \Delta$ is a best-response for $v_A > \frac{\beta \Delta }{1-\delta_A}$. And notice that nothing about this depended on $\beta$; but if $\beta = (1-\delta_B)$, then the kink in bidding occurs at $v_A=\Delta^2$.
Again, viewing this from B's perspective will give the same set of computations, mutatis mutandum, so we conclude that $\left((1-\delta_A)v_A, (1-\delta_B)v_B\right)$ is an equilibrium. A similar uniqueness argument holds for B's strategy as well. Thus, this equilibrium is the unique linear equilibrium.
\end{proof}
\begin{proof}[Proof of \Cref{prop:optgsprev}]
Note that A wins iff $b_A > \Delta b_B $. Since $b_B = (1-\delta_B) v_B$ and $b_A = (1-\delta_A) v_A$, A wins whenever
\begin{align*}
v_A \geq v_B\Delta^2 .
\end{align*}
Now, if A wins, she pays the minimum price $p$ such that $p \geq \Delta b_B$, which is just $\Delta b_B = v_B \frac{(1-\delta_B)^2}{1-\delta_A}$. Similarly, if B wins, he pays the minimum price $p$ such that $p \geq \frac{b_A}{\Delta}= \frac{(1-\delta_A)^2}{1-\delta_B} v_A$. So, we can write $R(v_A,v_B)$ as:
\begin{align*}
R(v_A,v_B)
= \begin{cases} (1-\delta_B)\Delta v_B & v_A \geq \Delta^2 v_B \\ \frac{(1-\delta_A)}{ \Delta} v_A & v_A \leq \Delta^2 v_B
\end{cases}
\end{align*}
Now we can calculate the expected revenue by again writing it as a piecewise integral:
\begin{align}
\begin{split}\label{eq:revoptgs}
\E[R(v_A,v_B)] &=
\int_0^1 \int_0^{\Delta^2 v_B} \frac{1-\delta_A}{\Delta} v_A dv_A dv_B + \int_0^1 \int_{\Delta^2 v_B} ^1 (1-\delta_B) \Delta v_B dv_A dv_B
\end{split}\\ \nonumber
&= \frac{1-\delta_A}{\Delta} \int_0^1 \frac{v_A^2}{2} \biggr|_{0}^{\Delta^2v_B} dv_B + (1-\delta_B)\Delta \int_0^1 v_B v_A \biggr|_{\Delta^2 v_B}^1 dv_B \\ \nonumber
& = \frac{1-\delta_A}{\Delta} \int_0^1 \frac{\Delta^4 v_B^2}{2} dv_B + (1-\delta_B) \Delta \int_0^1 v_B - \Delta^2 v_B^2 dv_B\\ \nonumber
& = \frac{1-\delta_A}{\Delta} \frac{\Delta^4}{2} \frac{v_B^3}{3} \biggr|_{0}^{1} + (1-\delta_B) \Delta \left[\frac{v_B^2}{2} -\frac{\Delta^2 v_B^3}{3}\right]\biggr|_0^1\\ \nonumber
& = \frac{\Delta^3(1-\delta_A)}{6} + (1-\delta_B) \Delta \left[\frac{1}{2} - \frac{\Delta^2}{3}\right] \\ \nonumber
&= \frac{\Delta^3(1-\delta_A)}{6} + \frac{\Delta(1-\delta_B) }{6}\left(3 - 2 \Delta^2\right)
\end{align}
as claimed.
\end{proof}
\begin{proof}[Proof of Theorem \ref{thm:eqgreedygsp}]
Suppose B bids with $b_B = \Delta v_B$. Then since $b_B \leq \Delta$, any bid A makes above $\Delta$ will be equivalent in that she will certainly win and pay the same price. Thus we can write A's win probability and expected payment given winning as:
\begin{align*}
\Pr[b_B \leq b_A] = \begin{cases}
\frac{b_A}{\Delta} & b_A \leq \Delta \\
1 & b_A > \Delta
\end{cases} \text{ and } \E[v_B| b_B \leq b_A] = \begin{cases}
\frac{b_A}{2\Delta} & b_A \leq \Delta \\ 1 & b_A > \Delta
\end{cases}
\end{align*}
Hence A's payoff is:
\begin{align*}
u_i(b_A) &= \begin{cases}
\left(v_A - (1-\delta_B) \Delta\frac{b_A}{2\Delta}\right) \frac{b_A}{\Delta} + \delta_A v_A(1-\frac{b_A}{\Delta}) & b_A \leq \Delta \\
v_A - \frac{(1-\delta_B) \Delta}{2}\end{cases}\\
&= \begin{cases}
\left(v_A - \frac{1-\delta_B}{2} b_A\right) \frac{b_A}\Delta + \delta_A v_A (1-\frac{b_A}{\Delta}) & b_A \leq \Delta \\
v_A - \frac{\Delta(1-\delta_B)}{2} & b_A > \Delta
\end{cases}
\end{align*}
Notice that at $b_A = \Delta$, these values coincide; beyond $\Delta$, any value that A bids results in the same payoff. So, this payoff function is a sort of capped quadratic in $b_A$ with the kink at $\Delta$. Thus, to find the optimal bid, A need only compare any inner critical point with the end point (which it would even in the absence of such a kink given it were maximizing over a closed set).
On the interior section, A's first order condition is:
\begin{align*}
\frac{v_A}{\Delta} - \frac{(1-\delta_B)b_A}{\Delta} -\frac{\delta_A v_A}{ \Delta} = 0& \implies
(1-\delta_B) b_A = v_A(1-\delta_A) \\ &\implies b_A = v_A \frac{1-\delta_A}{1-\delta_B} = \frac{v_A}{\Delta}.
\end{align*}
As usual, concavity gives that this is a local maximum.
But now notice that $u_i(b_A)$ is continuous up until $b_A = \Delta$, where it coincides with the next piece. Moreover, it is concave (strictly, on $[0, \Delta]$); hence, if a local maximum is reached, it must be a maximum over the interval $[0,\Delta]$, \emph{including} the point at $\Delta$.
So, whenever $\frac{v_A}{\Delta} \leq \Delta \iff v_A \leq \Delta^2$, it is immediate that A can do no better than bidding $b_A = v_A/\Delta$. On the other hand, if $v_A \geq \Delta^2$, then $\frac{v_A}{\Delta} \geq \Delta$. But above $\Delta$, increasing the bid does not improve A's payoff, and so the choice of $v_A/\Delta$ prescribes a bid higher than necessary - bidding $\Delta$ would suffice. However, it also does not hurt A's payoff.
Thus, bidding $b_A = \frac{v_A}{\Delta}$ is always a best-response to B bidding $b_B = \Delta v_B$ (though it is not a unique best-response).
Now we do a similar calculation from B's perspective, supposing that $b_A = \frac{v_A}{\Delta}$. B wins if $b_A \leq b_B$ and pays $(1-\delta_A) b_A$. Again, we shall consider for the possibility of overbidding, and write the win probability and expected payoff that B will receive for any bid as:
\begin{align*}
\Pr[b_A \leq b_B]=\begin{cases} \Delta b_B & b_B \leq \frac{1}{\Delta} \\1 & b_B \geq \frac{1}{\Delta} \end{cases} \text{ and } \E[v_A |b_A \leq b_B] = \begin{cases} \frac{b_B \Delta}{2} & b_B \leq \frac{1}{\Delta} \\ \frac{1}{2} & b_B \geq \frac{1}{\Delta}\end{cases}
\end{align*}
Then we have that
\begin{align*}
u_B(b_B) &= \begin{cases}
\left(v_B - (1-\delta_A) \frac{1}{\Delta} \frac{b_B \Delta}{2}\right) \Delta b_B + \delta_B v_B(1-\Delta b_B) & b_B \leq \frac{1}{\Delta}\\
v_B - \frac{1-\delta_A}{2\Delta}
\end{cases}\\&= \begin{cases}
\left(v_B - (1-\delta_A)\frac{b_B}{2}\right) \Delta b_B + \delta_B v_B - \Delta \delta_B v_B b_B& b_B \leq \frac{1}{\Delta}\\
v_B - \frac{1-\delta_A}{2\Delta} & b_B \geq \frac{1}{\Delta}
\end{cases}
\end{align*}
Again, notice that they coincide at $b_B = \frac{1}{\Delta}$, and increasing $b_B$ beyond $\frac{1}{\Delta}$ does not improve B's payoff. The first order condition on the interior part of the curve is:
\begin{align*}
\Delta v_B - (1-\delta_A \Delta) b_B - \Delta\delta_B v_B = 0 &\implies \Delta b_B (1-\delta_A)= \Delta v_B - \Delta \delta_B v_B\\& \implies b_B = \Delta v_B.
\end{align*}
Again, $u_B(b_B)$ is strictly concave over $[0, \frac{1}{\Delta}]$, so this is a maximizer, and like $u_A$, $u_B$ is continuous with two pieces, and the strict concavity and cap guarantees that bidding $\Delta v_B$ gives at least as high payoff of bidding $\frac{1}{\Delta}$ or more. (Notice also that since $\Delta \leq 1$, the bidding strategy $b_B = \Delta v_B$ will never prescribe overbidding because $\Delta v_B \leq \frac{1}{\Delta}$.)
Thus, $b_B = \Delta v_B$ is a best response to $b_A = v_A/\Delta$, and hence the pair is a Bayes-Nash equilibrium.
\end{proof}
\begin{proof}[Proof of \Cref{thm:revgreedyvcg}]
In the equilibrium described, we have that
\begin{align*}
\text{A wins} \iff b_A \geq b_B \iff v_A \frac{1-\delta_A}{1-\delta_B} \geq v_B\frac{1-\delta_B}{1-\delta_A} \iff v_A \geq v_B \Delta^2.
\end{align*}
If $A$ wins, she pays $(1-\delta_B) b_B=(1-\delta_B) \Delta v_B$. If $B$ wins, he pays $(1-\delta_A)b_A={(1-\delta_A) \over \Delta} v_A$.
So revenue is given by:
\begin{align*}
\E[R(v_A,v_B)] = &\int_0^1 \int_0^{v_B\Delta^2} \frac{(1-\delta_A)}{\Delta} v_A dv_A dv_B + \int_0^1 \int_{\Delta^2 v_B}^1 (1-\delta_B) \Delta v_B dv_A dv_B \\
\end{align*}
But notice that this is exactly the same equilibrium described in \Cref{eq:revoptgs} in \Cref{prop:optgsprev}, and thus the calculation follows exactly the same way.
\end{proof}
\begin{proof}[Proof of \Cref{thm:optvcgrev}] In this equilibrium and mechanism, A wins iff $v_A \geq \Delta v_B$, and pays $(1-\delta_B) v_B$. Otherwise, B wins and pays $(1-\delta_A) v_A$. Hence revenue is:
\begin{align*}
\E[R(v_A,v_B)]&= \int_{0}^{1} \int_{0}^{\Delta v_B} (1-\delta_A) v_A dv_A dv_B + \int_0^1 \int_{\Delta v_B}^{1} (1-\delta_B) v_B dv_A dv_B
\end{align*}
But again, we notice that this is exactly the same equation as \Cref{eq:revoptgs} in \Cref{prop:gspgreedyrev}, so again, the calculation follows in exactly the same way.
\end{proof}
\begin{proof}[Proof of Theorem \ref{thm:eqrev}]
The two equalities follow by inspection, so we only need to prove the inequality.
\begin{align*}
R_{\text{greedy}}^{*\text{gsp}} - R_{\text{greedy}}^{*\text{vcg}} =& \frac{1-\delta_A}{6}\Delta^2 + \frac{1-\delta_B}{6} (3-2\Delta) \\&-\frac{1-\delta_A}{6} \Delta^3 - \frac{1-\delta_B}{6} \Delta(3-2\Delta^2)\\=&
\frac{1-\delta_A}{6} (\Delta^2-\Delta^3) + \frac{1-\delta_B}{6} \left(3-2\Delta - 3\Delta + 2\Delta^3\right)
\end{align*}
Expanding :
\begin{align*}
&=\frac{1-\delta_A}{6} \Delta^2 - \Delta^3\frac{1-\delta_A}{6} + 2 \Delta^3\frac{1-\delta_B}{6} -5\Delta \frac{1-\delta_B}{6}+\frac{3(1-\delta_B)}{6} \\&= \frac{1-\delta_A}{6} \Delta^2 + \Delta^3\left(\frac{1-\delta_A}{6} + \frac{2(1-\delta_B)}{6}\right) -\frac{5\Delta(1-\delta_B)}{6} + \frac{3(1-\delta_B)}{6}\\
&= \frac{ \Delta^2(1-\delta_A)}{6} +\Delta^3\left(\frac{3 - \delta_A - 2\delta_B}{6}\right) - \frac{5\Delta(1-\delta_B)}{6} + \frac{3(1-\delta_B)}{6}\\
&= \frac{\Delta^2(1-\delta_A) + \Delta^3(3-\delta_A-2\delta_B) - 5\Delta(1-\delta_B)+3(1-\delta_B)}{6}
\end{align*}
Using $\delta_A \leq \delta_B\implies -\delta_A \geq -\delta_B$, we have:
\begin{align*}
&\frac{\Delta^2(1-\delta_A) + \Delta^3(3-\delta_A-2\delta_B) - 5\Delta(1-\delta_B) +3(1-\delta_B)}{6} \\&\geq \frac{\Delta^2(1-\delta_B) + \Delta^3(3-3\delta_B) -5\Delta(1-\delta_B)+3(1-\delta_B)}{6}\\
&= \frac{1-\delta_B}{6} \left[\Delta^2 + 3\Delta^3 -5\Delta +3 \right]
\end{align*}
On the range $\Delta \in [0,1]$, the inner function is positive. To see this, one can either graph the function using a computer algebra system, or prove this analytically. For completeness: Note that $3+ \Delta^2 + 3\Delta^3 -5\Delta$ is bounded below by $3+ \Delta^2 + \Delta^3-5\Delta$. So it suffices to show that the latter is positive on $\Delta \in [0,1]$. So let $f(\Delta) = \Delta^2 + \Delta^3 - 5\Delta$. Then notice that $f(0) = 0$, $f(1) = -3$, and $f'(\Delta)$ is given by $3\Delta^2 + 2\Delta -5$. Since $\Delta <1$, $f'$ is always negative on $[0,1]$. But that means that, given that $f(0)=0$ and $f(1)=-3$, $f$ cannot go below $-3$ on the interval (otherwise it would have to have a positive derivative at some point to come back up to $-3$).
Hence, we conclude that $f(\Delta) \geq - 3 \ \forall \Delta \in [0,1]$, and so $3+ f(\Delta) \geq 0$. Tracing back through the inequalities, this gives $R_{\text{greedy}}^{*\text{gsp}} \geq R_{\text{greedy}}^{*\text{vcg}}$, and the claim follows.
\end{proof}
\subsection{Greedy GSP}
In this setting, the higher bidder gets the top slot at a price of the lower bid, and the lower bidder gets the bottom slot at a price of 0. We obtain the following theorem:
\begin{theorem}\label{thm:eqggsp} Suppose that $(\mathcal{A}, \P_{\mathcal{A}})$ are (Greedy, GSP). Then in the two slot, two bidder, uniform case, the strategy profile
\begin{align*}
\left(b_A(v_A),b_B(v_B) \right) \coloneqq ((1-\delta_A)v_A, (1-\delta_B)v_B)
\end{align*}
is a Bayes-Nash equilibrium. Among conservative linear equilibria, it is unique.
\end{theorem}
To prove this theorem, and all our other equilibrium claims, we must show that the strategies are a best response to each other under the distribution of bidder valuations. The easiest way to do so is to take an ex-interim perspective for each bidder, assume the opposing bidder uses the claimed strategy, and allow the original bidder to optimize freely. Then, one shows that maximum is achieved at exactly the value prescribed by strategy. Since said strategy prescribes an ex-interim best-response at every possible valuation, it is a best-response.
To show that prescribed strategy is in fact a best-response, we decompose each bidder's expected payoff into the sum of their expected profit if they win (which can be further decomposed into the probability of winning times the expected profit given they win) and their expected profit if they obtain the worse slot. Viewing this payoff as a function of the players' bid, we maximize that function, and show the optimal bid is exactly the prescribed strategy for each player.
We will prove the case of $(Greedy, GSP)$ in detail; for the other cases, we provide a proof sketch and defer the more involved proofs to the appendix.
\begin{proof}
Consider Bidder A's perspective after she learns her valuation $v_A$. If A wins, she pays $b_B$ and gets value $v_A$; if she loses, she gets $\delta_A v_A$ and pays nothing. Then:
\begin{multline}\label{eqn:g-gsp-exinterim}
\E_{v_B \sim U[0,1]}\left[u_A|b_A\right] = (v_A-\E[b_B|b_B <b_A]) \Pr[b_B< b_A] + \delta_A v_A (1-\Pr[b_B < b_A])
\end{multline}
Since we wish to show that $(1-\delta_A)v_A$ is a best-response to $(1-\delta_B)v_B$, we can assume that $b_B= (1-\delta_B)v_B$. Hence, A wins if and only if $v_B < b_A/(1-\delta_B)$. Under the uniform distribution, $\Pr[x<c]=\min\{c,1\}$ and $\E[x|x<c] = \frac{\min\{c,1\}}{2}$ for $c>0$. Thus we can apply these to Equation \ref{eqn:g-gsp-exinterim} to write:
\begin{align}
\begin{split}\label{eq:ut}
\E_{v_B \sim U[0,1]}\left[u_A|b_A\right] &= \left(v_A - (1-\delta_B)\frac{b_A}{2(1-\delta_B)}\right)\frac{b_A}{1-\delta_B} + \delta_A v_A(1-\frac{b_A}{1-\delta_B}) \\
&= \frac{v_A b_A}{1-\delta_B} - \frac{b_A^2}{2(1-\delta_B)} - \frac{\delta_A b_A v_A}{1-\delta_B} + \delta_Av_A
\end{split}
\end{align}
whenever $b_A \leq (1-\delta_B)$, and $u_A = v_A - \frac{1-\delta_B}{2}$ otherwise. In other words, $A$'s payoff will be either the left-hand side of \Cref{eq:ut}, which we denote as $u_A(b_A)$ for brevity, or the ``cap'' of $v_A -\frac{1-\delta_B}{2}$, depending on whether $b_A$ is less or more than $(1-\delta_B)$. So in principle, we need to find the bid that maximizes $u_A$ on $[0, 1-\delta_B]$, and then check whether or not it gives a better payoff than the cap. But notice that $u_A(1-\delta_B)=v_A - \frac{1-\delta_B}{2}$, and increasing $b_A$ beyond $1-\delta_B$ cannot improve payoff, so it suffices to simply find the maximum of $u_A$ over $[0,1-\delta_B]$.
Notice that $u_A(b_A$) is continuous and differentiable in $b_A$ on $[0,1-\delta_B]$. The first and second derivatives of $u_A$ are:
\begin{align*}
u_A'(b_A) = \frac{v_A(1-\delta_A)}{1-\delta_B} - \frac{b_A}{1-\delta_A} \qquad u_A''(b_A) = -\frac{1}{1-\delta_A}
\end{align*}
Hence $u_A$ is strictly concave. Suppose that $b_A^* \coloneqq (1-\delta_A)v_A < 1-\delta_B$. Then $b_A^*$ satifies the first order condition and so is a global maximum. On the other hand, if $b_A^* \geq (1-\delta_B)$, then because $u_A$ is increasing right up until $(1-\delta_B)$, $u_A$ takes it maximum at $b_A = (1-\delta_B)$. But, bidding $(1-\delta_A)v_A$ results in the same payoff as bidding $1-\delta_B$ (because of the ``cap''). Thus, regardless of what $v_A$ is, the strategy $b_A^*= (1-\delta_A) v_A$ is a best-response if B is bidding $(1-\delta_B) v_B$.
Reversing roles and considering B's perspective gives exactly the same logic. Hence, the pair of strategies form an equilibrium. To see uniqueness among linear equilibria, notice that as long as $b_B$ is linear, i.e. $b_B(v_B) =\beta v_B$ for some fixed $0 \leq \beta \leq 1 $, the form of Equation \ref{eq:ut} holds, and the particular choice of $\beta$ cancels out just as it did for $(1-\delta_B)$; again, then, the optimal bid will be $(1-\delta_A)v_A$. A similar argument holds for B.
\end{proof}
\begin{proposition}\label{prop:gspgreedyrev}Under the linear equilibrium described above, with $\delta_A <\delta_B$, we have that the expected revenue is given by:
\begin{align*}
\E[\mathcal{R}] = \frac{(1-\delta_A)\Delta^2}{6} + \frac{1-\delta_B}{6}\left(3-2 \Delta\right)
\end{align*}\end{proposition}
Before we sketch the proof, note that if we let $\delta_A=\delta_B=0$, we immediately recover $\frac{1}{3}$, which is the revenue of the standard second price auction with two bidders drawn from $U[0,1]$. Second, if we let $\delta_A=\delta_B=\delta$, then $\Delta =1$, and we see that $\E[\mathcal{R}] ={{(1-\delta)}\over{3}}$. That is, revenue decays \textit{linearly} to that of the standard second price auction as $\delta \to 1$.
\longversion{:
\begin{align*}
\E[R] &= \frac{\left((1-\delta)(1)^2\right)}{6} + \frac{1-\delta}{6} (3-2)= \frac{1}{3} (1-\delta).
\end{align*}
}
\shortversion{\begin{proofsketch}
Once one identifies the revenue curve over the joint distribution of valuations, this is a straightforward calculation. To identify the revenue curve, consider the case when A wins the top slot. Then it must be that $b_A \geq b_B$, which, under the equilibrium strategies, holds if and only if $b_A \geq \Delta b_B$. If A wins, then she pays $b_B$, which is $(1-\delta_B)v_B$. Similarly, B wins when $b_A \leq b_B$ and pays $(1-\delta_A) v_A$. Then, we set up a double integral over the uniform distribution for $v_A$ and $v_B$, but split the inner integral up, as it will have a different integrand from $0$ to $\Delta v_B$ (where B wins) and $\Delta v_B$ to $1$ (where A wins). Evaluating the double integral, the result follows.
\end{proofsketch}}
\longversion{
\begin{proof}
A wins if $b_A\geq b_B$, which happens when:
\begin{align*}
b_A \geq b_B \iff (1-\delta_A) v_A \geq (1-\delta_B)v_B \iff v_A \geq \Delta v_B
\end{align*}
If A wins, she pays $b_B$, and so the revenue is $b_B = (1-\delta_B)v_B$; otherwise, it is $b_A = (1-\delta_A) v_A$. Thus we can write the expected revenue as:
\begin{align*}
\E[R] &= \int_0^1 \int_0^1 R(v_A,v_B) dP(v_A)dP(v_B)\\
&=\int_0^1 \int_0^{\Delta v_B} (1-\delta_A) v_A dv_A dv_B + \int_0^1 \int_{\Delta v_B}^1 (1-\delta_B) v_B dv_A dv_B\\
& = (1-\delta_A) \int_0^1 \frac{v_A^2}{2} \biggr|_0^{\Delta v_B} + (1-\delta_B) \int_0^1 v_B v_A\biggr|_{\Delta v_B}^1 dv_B\\
&=(1-\delta_A) \int_0^1 \Delta^2 \frac{v_B^2}{2} dv_B + (1-\delta_B) \int_0^1 v_B - \Delta v_B^2 dv_B\\
& = (1-\delta_A) \Delta^2\frac{v_B^3}{6} \biggr|_0^1 + (1-\delta_B) \left[\frac{v_B^2}{2} - \Delta \frac{v_B^3}{3}\right]\biggr|_0^1\\
& = \frac{(1-\delta_A)\Delta^2}{6} + \frac{1-\delta_B}{6}\left(3-2 \Delta\right)
\end{align*}
\end{proof}
}
\subsection{Optimal Allocation and GSP Pricing}
In this setting, the auctioneer chooses between the allocation $(A,B)$ and $(B,A)$. Note that:
\begin{align*}
(A,B) \succeq (B,A) \iff b_A + (1-\delta_B)b_B \geq b_B +(1-\delta_A) v_A \iff b_A \geq \Delta b_B
\end{align*}
Suppose bidder A is the winner. Then A is charged the smallest bid $b$ such that
$b \geq \Delta b_{B}$, which is just $\Delta b_{B}$. Similarly, if B wins, he will be charged $b_A/\Delta$.
\begin{theorem} \label{thm:eqoptgsp} Suppose that $(\mathcal{A}, \P_{\mathcal{A}})$ are (Opt, GSP). Then in the two slot, two bidder, uniform case, the strategy profile
\begin{align*}
\left(b_A(v_A), b_B(v_B)\right) \coloneqq ((1-\delta_A)v_A, (1-\delta_B)v_B)
\end{align*}
is a Bayes-Nash equilibrium.
\end{theorem}
\begin{proofsketch}
As in Theorem \ref{thm:eqggsp}, we show that each strategy is a best-response to the other, and take particular care with the piecewise-nature of the payoff.
\end{proofsketch}
\begin{proposition}[(Opt,GSP) Revenue]\label{prop:optgsprev}
Under the linear equilibrium described above, with $\delta_A <\delta_B$, we have that the expected revenue is given by:
\begin{align*}
\E[\mathcal{R}] =\frac{\Delta^3(1-\delta_A)}{6} + (1-\delta_B) \Delta \left[\frac{1}{2} - \frac{\Delta^2}{3}\right]
\end{align*}
\end{proposition}
\begin{proofsketch}
The proof follows the same structure as that of Theorem \ref{thm:eqrev}. Again, once one identifies the relevant events and payoffs, the calculation is a straightforward double integral. A wins whenever $b_A \geq \Delta b_B$; thus given the equilibrium strategies, A wins whenever $v_A \geq \Delta^2 v_B$. The payment A makes if she wins is the smallest payment $p$ such that $p \geq \Delta b_B$, which is exactly $\Delta b_B$; under the equilibrium, then A will pay $\Delta (1-\delta_B) v_B$. Similarly, $B$ wins whenever $v_A \leq \Delta^2 v_B$, and pays $v_A \cdot (1-\delta_A)/\Delta$. Setting up the integral in pieces as before and evaluating yields the claim.
\end{proofsketch}
\subsection{Greedy VCG}
Now we turn to $(Greedy,VCG)$. Here, $A$ wins whenever $b_A \geq b_B$, but the pricing is VCG; that is, if $A$ wins, she pays $(1-\delta_B) b_B$. In this case, we again find a simple linear equilibrium; however, in this setting, the equilibrium given is not unique.
\begin{theorem} \label{thm:eqgreedygsp}Suppose that $(\mathcal{A}, \P_{\mathcal{A}})$ are $(Greedy,GSP)$. Then in the two slot, two bidder, uniform valuation case, the strategy profile:
\begin{align*}
(b_A(v_A), b_B(v_B)) \coloneqq \left({(1-\delta_A)\over (1-\delta_B)} v_A, {(1-\delta_B)\over(1-\delta_A)} v_B\right)= \left(\frac{v_A}{\Delta}, \Delta v_B \right)
\end{align*}
is a Bayes-Nash equilibrium.
\end{theorem}
Notice that since $\Delta < 1$, Bidder A overbids while Bidder B shades down. The intuition for this structure is that A has a higher expected (marginal) effective valuation for the first slot than B; thus greedy allocation encourages overbidding on A's parts to increase win probability without a strong enough countervailing check via B's bid. For B, by contrast, the fact that A is overbidding and has a higher marginal valuation anyway makes the it possible to achieve negative payoff even if bidding only his valuation.
\begin{proofsketch}
Once again, we show that each strategy is a best-response to the other, and take particular care with the piecewise-nature of the payoff.
\end{proofsketch}
\begin{proposition}\label{thm:revgreedyvcg}
In this equilibrium above, revenue is given by:
\begin{align*}
\E[\mathcal{R}(v_A,v_B)] =\frac{\Delta^3(1-\delta_A)}{6} + (1-\delta_B) \Delta \left[\frac{1}{2} - \frac{\Delta^2}{3}\right]
\end{align*}
\end{proposition}
Notice that this is the \emph{same} revenue as under (Opt,GSP). Why should this be? It turns out that the structure of the (Greedy, GSP) equilibrium implies the same win conditions, in terms of realized bidder valuations, and the same payments conditional on winning. Informally, the equilibrium strategies ``adjust'' for the differing pricing and allocations rules.
\begin{proofsketch}Notice that A wins if her value is $b_A \geq b_B$, which under the strategy profile is true iff $v_A \geq \Delta^2 v_B$. If she wins, she pays $(1-\delta_B) \Delta v_B$. Similarly, B wins if $v_A \leq \Delta^2v_B$, and pays $v_A (1-\delta_A)/\Delta$ if he wins. Recall that in OPT + GSP, A won if $b_A \geq \Delta b_B$, but given the strategy profile, this is true whenever $(1-\delta_A) v_A \geq (1-\delta_B) \Delta v_B$. So A wins whenever $v_A \geq \Delta^2 v_B$. Similarly, under OPT + GSP, A paid $\Delta b_B$, which under the profile is $ \Delta (1-\delta_B)v_B$. A similar argument works for B. And thus, the calculation works out to be exactly the same.
\end{proofsketch}
\subsection{Optimal Allocation and VCG Pricing} Recall that (Opt, VCG) is just the standard VCG mechanism, which is well-known to have a natural dominant strategy equilibrium in truthful bidding. Thus we need only calculate the revenue:
\begin{proposition}\label{thm:optvcgrev} In the truthful equilibrium of (Opt, VCG), revenue is given by $\frac{\Delta^2 (1-\delta_A)}{6} + \frac{1-\delta_B}{6}\left(3 - 2\Delta\right)$.
\end{proposition}
Notice that this is, perhaps surprisingly, the same revenue as the Greedy + GSP auction. As before, this is because the winning events and conditional payments are exactly the same in this format (in this setting) as under the linear equilibrium under Greedy + GSP.
\begin{proofsketch}
Again, rather than recalculating this expected revenue, notice that A wins whenever $b_A \geq \Delta b_B$; since we are considering the dominant strategy truthful equilibrium, this is true if and only if $v_A \geq \Delta v_B$, which was the same win condition for A under Greedy + GSP when A's bid was $(1-\delta_A) v_A$ and B's was $(1-\delta_B) v_B$. As for payment, if A wins, she pays her externality, which , since bidders bid truthfully, is just $(1-\delta_B)v_B$. This again is the same payment as under Greedy+GSP when B bid $(1-\delta_B) v_B$. So again, the calculation follows in the same way.
\end{proofsketch}
\subsection{Revenue Comparison}
Now we compare the revenue of the different auction forms.
Again, this is using the revenues calculated above and provided in table 2; that is, the simple linear equilibria and assuming that $\delta_A <\delta_B$. We stated the revenue hierarchy before as Theorem \ref{thm:eqrev}:
\eqrev*
\begin{proofsketch}The two inequalities follow by inspection of Table \ref{tab:revs}, so only the inequality needs proof. To do this, we simply expand out the difference between $R_{\text{greedy}}^{*\text{gsp}}$ and $R_{\text{greedy}}^{*vcg}$. At this point, we just need to show that this difference is always positive; this can be easily seen by graphing the function, but we also analytically show that this holds in the appendix.\end{proofsketch}
\longversion{
\subsection{More complicated settings}\label{sec:nonlinear}
Unfortunately, though the two bidder case admits elegant linear equilibria, expanding the setup as simply as to two slots, two bidders of one type and one bidder of another immediately eliminates hope of finding a simple linear equilibrium in general.
To see this, one can posit a linear equilibrium again symmetric up to discount types. Then beginning with the rare player, one can attempt to solve for this linear equilibrium, and one way to attack this is to view the game as a two-stage game for that player: first, there is a preliminary game in which the players bids determine who partcipiates in a second price auction and who sits unallocated entirely; then, the there is a continuation game for the selected players in which their (original) bid determines their result in the auction. By calculating the payoff of a given bid in this continuation game, one can easily write the payoff of a bid, and then it is easy to see that if the opposing type is playing a linear strategy, a linear strategy will not be optimal.
}
\subsection{Greedy Allocation Proof Recipe}
A common proof structure applies to both (Greedy, GSP) and (Greedy, VCG), because of their shared allocation algorithm and the fact that both pricing algorithms, when coupled with greedy allocation, guarantee that bidders are never overcharged. It is similar to the proof found in \cite{caragiannis2015bounding}, but with additional subtlety due to the differing discount factors.
To handle this subtlety, we will use the following Lemma:
\begin{lemma}[Partial Monotonicity] \label{lem:partialmon}
Suppose that $\bf b, \bf b'$ are two bid profiles that only differ in element $i$, and $b_i'>b_i$. Let $\sigma$,$\sigma'$ be the slots which $i$ was assigned under $\bf b$, $\bf b'$ respectively. Then under greedy allocation, we have that for each slot $s$ strictly above $\sigma$:
\begin{align*}
\delta_{\tau(\pi(s, \mathbf{b'}))}^{s} \mathbf{b}_{\pi(s,\mathbf{ b'})} \geq \delta_{\tau(\pi(s,\mathbf{b}))}^{s} \mathbf{b}_{\pi(s, \mathbf{b})}^{s}
\end{align*}
\end{lemma}
Informally, this lemma merely states that if bidder $i$ deviates upwards from his bid under $\mathbf{b}$, the value obtained by players in the slots above his placement under $\mathbf{b}$ can only increase. To see why this is true, recall that the greedy algorithm allocates from top to bottom. So for every slot $s$ between $\sigma'$ and $\sigma$ (not including $\sigma$), the bidders considered when $s$ was assigned under $\mathbf{b}$ remain unallocated when considering $s$ under $\mathbf{b}'$; hence $\pi(s, \mathbf{b'})$ (i.e. whoever is assigned to $s$ under $\mathbf{b}$ must have at least as high of an effective value as $\pi(s, \mathbf{b}')$. See Appendix \ref{s:app-smoothproofs} for a more formal proof.
Now we are ready to state and prove our theorem.
\begin{theorem}[Semi-Smoothness for Greedy Algorithms]\label{thm:receip}
Let $(\mathcal{A}, \P_\mathcal{A})$ be an auction mechanism. Suppose that
\begin{enumerate}
\item $\mathcal{A}$ is the greedy algorithm, and
\item For any bid profile $\mathbf{b}$, for every bidder we have:
\begin{align*}
\P_{\mathcal{A}}(\mathbf{b})_i \leq \mathbf{b}_i
\end{align*}
\end{enumerate}
Then $(\mathcal{A},\P_{\mathcal{A}})$ is (1/2,1)-Semi Smooth.
\end{theorem}
\begin{proof}
Recall that if we can show that for any bid profile:
\begin{align*}
u_i(b_i', \mathbf{b}_{-i}) \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} - \delta_{\tau(\pi(\nu(i),\mathbf{b}))}^{\nu(i)} v_{\pi(\nu(i),\mathbf{b})}
\end{align*}
then we will be done.
So suppose $\mathbf{b}$ is a bid profile, and consider a deviation strategy of bidding half one's value. (Notice first off that such a deviation guarantees a deviating bidder non-negative utility by Property 2.) Fix bidder $i$. Under this unilateral deviation, $i$ receives $\sigma' := \mathcal{A}(b_i',\mathbf{b}_{-i})_i$. There are two casese to consider: either $\sigma' \succeq \nu(i)$ (i.e. $\sigma'$ is $\nu(i)$ or better) or $\sigma' \prec \nu(i)$ ($\sigma'$ is strictly worse than $\nu(i)$.) If the first case holds, we achieve the desired inequality since:
\begin{align*}
u_i(b_i', \mathbf{b}_{-i}) &= \delta_{\tau(i)}^{\sigma'} v_i - \delta_{\tau(i)}^{\sigma'} \mathcal{P}_i(b_{i}',\mathbf{b}_{-i'}, \mathcal{A})
\\
&\geq \delta_{\tau(i)}^{\sigma'} v_i -\delta_{\tau(i)}^{\sigma'} \frac{v_i}{2} = \delta_{\tau(i)}^{\sigma'} \frac{v_i}{2}\\
&\geq \delta_{\tau(i)}^{\nu(i)}\frac{v_i}{2}\\
&\geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} - \delta_{\tau(\pi(\nu(i), \mathbf{b}))}^{\nu(i)} v_{\pi(\nu(i), \mathbf{b})},
\end{align*}
where the first inequality follows by no-overcharging and the others by assumption or trivially.
Now suppose that instead, $\mathcal{A}(b_i', \mathbf{b}_{-i})_i = \sigma' \prec \nu(i)$. We split this into two subcases.
In the first subcase, $\frac{v_i}{2} \geq b_i$, i.e. $b_i'$ is an upward deviation that results in $i$ receiving $\sigma'$ below $\nu(i)$.
Combining $(b_i',\mathbf{b}_{-i})$ into $\mathbf{b}'$, we can write:
\begin{align*}
\delta_{\tau(\pi(\nu(i), \mathbf{b}'))}^{\nu(i)} \mathbf{b}_{\pi(\nu(i),\mathbf{b}')}' \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2}.
\end{align*}
This follows because $i$ was unallocated when $\nu(i)$ was considered, so if this did not hold, the greedy allocation would have allocated $i$ to $\nu(i)$ instead of $\pi(\nu(i),\mathbf{b}')$.
Now, notice that we can view $b_i$ as a downward deviation from $b_i'$, and a downward deviation cannot affect the allocation choices of any of the slots above its place before the deviation, including $\nu(i)$. But that means that the allocated bidder to $\nu(i)$ is the same under $\mathbf{b}$, so the inequality above also implies that:
\begin{align*}
\delta_{\tau(\pi(\nu(i),\mathbf{b}))}^{\nu(i)} \mathbf{b}_{\pi(\nu(i),\mathbf{b})} \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2}.
\end{align*}
Then using no-overcharging, we again have that
\begin{align*}
\delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} - \delta_{\tau(\pi(\nu(i),\mathbf{b}))}^{\nu(i)} \mathbf{b}_{\pi(\nu(i),\mathbf{b})}\leq 0 \leq u_i(b_i', \mathbf{b}_{-i})
\end{align*}
Finally, suppose $\frac{v_i}{2} < b_i$. As before, we must have that $\pi(\nu(i) \mathbf{b}')$ must have at least as high effective value as $i$. To see that $\pi(\nu(i), \mathbf{b})$ \emph{also} has at least as high effective valuation as $i$,
notice that we can view $b_i$ as an upward deviation from $b_i'$. By assumption, $\sigma'\prec \nu(i)$, so Lemma \ref{lem:partialmon} implies that in moving to $\mathbf{b}$, the values of bidders in slots above $\sigma'$, which include $\nu(i)$, must increase. But then we have again that:
\begin{align*}
\delta_{\tau(\pi(\nu(i),\mathbf{b}))}^{\nu(i)} \mathbf{b}_{\pi(\nu(i),\mathbf{b})} \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2}.
\end{align*}
and the desired inequality follows as before.
\end{proof}
\subsection{Greedy Allocation and GSP Pricing}
\begin{theorem}
Let $(\mathcal{A}, \P_{\mathcal{A}})=$ (Greedy, GSP). Then the Price of Anarchy is at most 4.
\end{theorem}
\begin{proof}
First, by assumption, $\mathcal{A}$ is Greedy. Second, generalized second price will not charge a bidder more than their bid since under the greedy algorithm, the winner of a slot has a higher effective bid than the second bidder's bid, which is what they are charged. Hence, the conditions of Theorem \ref{thm:receip} are satisfied, so the induced game is $(\frac{1}{2}, 1)$-semismooth and the bound follows.
\end{proof}
On the other hand, we can show that the Price of Anarchy is \emph{at least} 2.
\begin{theorem}
Let $(\mathcal{A}, \P_{\mathcal{A}})=$(Greedy, GSP). Then the Price of Anarchy is at least 2.
\end{theorem}
\begin{proof}
Consider the following example: there are 2 slots and 2 bidders, one of type A and one of Type B. Let $\boldsymbol{\delta_A}=(1,0)$, $\boldsymbol{\delta_B}=(1,1)$, and let $v_A = (1-\epsilon)v_B$, $\epsilon>0$. Then the allocation $(A,B)$ gets payoff $v_A+v_B=(2-\epsilon) v_B$, while the allocation $(B,A)$ gets welfare $v_B$.
We claim that the following is an equilibrium: A bids $0$ and B bids $v_B$, giving the allocation $(B,A)$. To see that this is an equilibrium, notice that if these are the bids, $b_B>b_A$, so B will be given the first slot at a price of $b_A=0$ for a total payoff of $v_B$. Since price is bounded below by $0$, B could not gain by deviating any lower. On the other hand, in the second slot, $A$ gets no value, but also is not charged, for a payoff of $0$. To change anything, A would have to change the allocation, and so bid above $b_B = v_A$ - but then she would get a payoff of $v_A-v_B = (1-\epsilon)v_B- v_B \leq 0$; hence she also would not like to switch. And note that since $0 \leq b_A$ and $v_B \leq v_A$, neither bidder is overbidding. But thus we see that
\begin{align*}
\frac{OPT}{EQ} = \frac{v_A+v_B}{v_B} = \frac{(2-\epsilon)v_B}{v_B} = 2-\epsilon
\end{align*}
and so the Price of Anarchy can be made arbitrarily close to 2.
\end{proof}
Note the equilibrium described is not unique - for instance, $b_A= (1-\epsilon)v_B$, $b_B=v_B$ would also be an equilibrium that achieves the same allocation.
\longversion{
For some intuition as why such a simple example can get a bad price of anarchy, notice that two slot case can be mapped to a standard second price auction for the first slot, where one bidder has a good outside option and the other doesn't. By including the outside options, a socially-minded auctioneer could do significantly better than just considering the bid and valuations of the item in question.
}
\subsection{Greedy Allocation and VCG Pricing}
In this section, we consider the Price of Anarchy when $(\mathcal{A}, \P_{\mathcal{A}})$ is (Greedy, VCG). Again, using greedy allocation guarantees the first condition of Theorem \ref{thm:receip}. It is not obvious that bidders will not be overcharged. It is, however, true, as we show in the following Lemma:
\begin{lemma}\label{lem:greedyvcgnooc}
Let $(\mathcal{A}, \P_{\mathcal{A}})$ be the greedy algorithm with VCG pricing. We claim that for every bidder, their charge will not exceed their effective bid.
\end{lemma}
\longversion{
\begin{proof}
We will prove this by strong induction. First, we relabel the bidders so that Bidder $i$ is in Slot $i$ post-allocation. Now, consider the removal of bidder $i$. First notice that this will not affect the assignment to any $i'$ \emph{above} $i$. So any price that $i$ must pay will come from the externalities he imposes on $i'>i$.
Now, we claim that the following is true:
\begin{align}\label{eq:payment}
p_i = p_{j^*} + \left(\delta_{\tau(j^*)}^{i} - \delta_{\tau(j^*)}^{j^*}\right) b_{j^*}
\end{align}
where $j^*$ is the bidder that is assigned to Slot $i$ in the absence of Bidder $i$. (In keeping with our formal notation, $j^*\coloneqq \pi(i,(\mathbf{b}_{-i}))$.)
To see that this is true, imagine re-running the auction without $i$ included. Slots $1...i-1$ will be allocated the same way, and then at Slot $i$ some bidder $j^*$ will be allocated that would have been allocated further down had $i$ been included. Now, as $j^*$ moves up to $i$, he has not affected the winning bid calculations of all slots \emph{between} $i$ and $j^*$ relative to what they were when $i$ was included.
But that means that the only externalities that $i$ imposes are those on $j^*$ and below. Note that when we consider $j^*$ taking the slot of $i$, the arrangement of the bidders below $j^*$ will be exactly the same as if $j^*$ were the initially removed bidder instead of $i$ - but this is exactly the re-arrangement that generates the price $j^*$ pays. Hence, $i$'s total payment is the payment of $j^*$ plus the externality he imposes on $j^*$, which is $b_{j^*}(\delta_{\tau(j^*)}^{i} - \delta_{\tau(j^*)}^{j^*})$. But this is exactly what is claimed in Equality \ref{eq:payment}. Then we can write:
\begin{align*}
p_i = &p_{j^*} + b_{j^*} (\delta_{j^*}^i-\delta_{j^*}^{j^*})\\&=
p_{j^*} - \delta_{j^*}^{j*} b_{j^*} + \delta_{j^*}^i b_{j^*}
\end{align*}
Now we invoke strong induction. Suppose that all bidders below $i$ are not overcharged, i.e. $\forall j$ assigned to a slot below $i$'s, $p_j \leq \delta_{j}^{j} b_j$. Then in particular, $p_j^* - \delta_{j^*}^{j^*} b_{j^*} \leq 0$, so that we conclude:
\begin{align*}
p_i = p_{j^*} - \delta_{j^*}^{j*} b_{j^*} + \delta_{j^*}^i b_{j^*} \leq \delta_{j^*}^ib_{j^*} \leq \delta_i^i b_i
\end{align*}
where the last inequality follows by the fact that $i$ was chosen over $j$ for Slot $i$. Finally, note that Bidder $n$ pays 0, since there are no bidders below him to exert an externality on; thus, applying strong induction starting from the bottom yields the claim.
\end{proof}
}
\shortversion{
\begin{proofsketch}
To prove this claim, we characterize the price paid by every bidder. In particular, it turns out to have a simple form: the price $i$ pays is exactly sum of the externality exerted (measured in terms of effective bid, not value, since again that is all the algorithm has access to) on the bidder, say $j$, who would have taken $i$'s spot in his absence \emph{plus} the price that $j$ is charged. This turns out to be equivalent to $j$'s value for $i$'s slot minus $j$'s surplus for being in his own slot. Then, we can use strong induction: we suppose that all bidders below $i$ (including j) are not overcharged (which is trivially true for the last bidder), which means that their surplus is positive, and hence, the price $i$ pays must be less than $j$'s value for the slot. And since $i$ won the slot, $i$ has higher value for the slot than $j$, so $i$ is not being overcharged.
\end{proofsketch}
}
Lemma \ref{lem:greedyvcgnooc} allows us to conclude that (Greedy, VCG) satisfies the conditions of Theorem \ref{thm:receip}, yielding the following Theorem:
\begin{theorem} \label{thm:ubgreedyvcg}
Let $(\mathcal{A}, \P_{\mathcal{A}})=$ (Greedy, VCG). Then the Price of Anarchy is at most 2.
\end{theorem}
For lower bounds, we again find a suboptimal equilibrium:
\begin{theorem} \label{thm:lbgreedyvcg} Let $(\mathcal{A}, \P_{\mathcal{A}}) =$ (Greedy, VCG). The Price of Anarchy is at least $3/2$.
\end{theorem}
\begin{proofsketch}
Let $v_A=1+\epsilon$, $v_B = 1$, $v_C = 1-\epsilon$. Let $\mathbf{\delta_A} = (1, 1,1-2\epsilon)$, $\mathbf{\delta_B}=(1,1,0)$, $\mathbf{\delta_C}=1, \epsilon, \epsilon^2$.
The welfare of $(C,B,A)$ is $3-2\epsilon -2\epsilon^2$, while the welfare of $(A,B,C)$ is $2+\epsilon+\epsilon^2 -\epsilon^3$. Suppose that each player bids their value, ie:
\begin{align*}
\mathbf{b}^* = (b_A,b_B,b_C) = (v_A,v_B,v_C) = (1+\epsilon, 1, 1-\epsilon).
\end{align*}
Then the allocation $(A,B,C)$ will be chosen, despite being suboptimal. The rest of the proof consists in showing that no player has an incentive to unilaterally deviate. Note that we need only consider deviations that change the selected ordering; the values and bids are chosen in such a way that any bidder that could improve their ordering would suffer too high a high price, and any bidder that could lower their ordering prefers where they are at the price they are paying. Together, this means that we have exhibited an equilibrium where $OPT/EQ$ can be made arbitrarily close to $3/2$ by taking $\epsilon$ small.
\end{proofsketch}
\subsection{Optimal Allocation and GSP Pricing}
In the case of Optimal Allocation and GSP pricing, we will obtain a smoothness result that depends on the largest and smallest discounts and the number of bidders, but not on the valuation profile. The result is as follows:
\begin{theorem}\label{thm:smooth-optgsp}
Suppose $(\mathcal{A}, \P_{\mathcal{A}})$ is optimal allocation and GSP pricing. Then the game between bidders is $(\frac{1}{2}, \frac{\delta^{\max}}{\delta^{\min}}(n-1))$-semismooth.
\end{theorem}
To prove this result, we begin by observing that GSP pricing will never charge a bidder more than his effective bid\shortversion{, which is easy to see}. Formally:
\begin{lemma}\label{lem:opt-gsp-upperboundprice}
In (Opt, GSP), bid upper bounds price. \end{lemma}
\longversion{
\begin{proof}
By definition, the GSP price is the minimum the bidder could have bid and still earned the slot given the allocation algorithm and the other bids. But in particular, they could have bid exactly their bid and received their slot (because they did). Hence, the minimum they could have bid to receive the slot can never be more than whatever they actually bid.
\end{proof}
}
\begin{proof}[Proof of Theorem \ref{thm:smooth-optgsp}]
Again, assume that the deviation is to $b_i' = v_i/2$, and show that:
\begin{align*}
\sum_{i} u_i(b_i',\mathbf{b}_{-i}) \geq \frac{1}{2} \text{OPT} - \text{SW} (\mathbf{b})
\end{align*}
Now, let $\nu(i)$ be the slot of $i$ under the optimal allocation. Then if $i$ receives some slot $\sigma(i, b_i', \mathbf{b}_{-i}) \succ \nu(i)$ then by Lemma \ref{lem:opt-gsp-upperboundprice}, we have that:
\begin{align*}
u_i(b_i', \mathbf{b}_{-i}) &= \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} v_i - p_i \geq \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} v_i- \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} \frac{v_i}{2} = \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} \frac{v_i}{2} \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2}
\end{align*}
Otherwise, suppose deviating to $b_i'$ gets $i$ a slot $\sigma(i, b_i', \mathbf{b}_{-i}) \prec \nu(i)$.
Then since the allocation algorithm maximizes (apparent) welfare and allocating $i$ to $\nu(i)$ was feasible, it must be that:
\begin{align*}
\delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})}\frac{v_i}{2} + \sum_{j\neq i} \delta_{\tau(j)}^{\sigma(j,b_i', \mathbf{b}_{-i})} \mathbf{b}_j \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} + \sum_{j\neq i} \delta_{\tau(j)}^{\nu(j)}\mathbf{b}_j
\end{align*}
Here, the summation on the left-hand side is the apparent welfare (excluding $i$) given the allocation selected under deviation ($b_i', \mathbf{b}_{-i}$); we will write this quantity as as $\widehat{W}^{-i}(b_i', \mathbf{b}_{-i})$. The summation on the right-hand side is what the apparent welfare (excluding $i$) would be if the (truly optimal) assignment $\mathbf{\nu}$ had been chosen instead; we will write this as $\widehat{W}_{\boldsymbol{\nu}}^{-i}$. Then we write:
\begin{align*}
\delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} \frac{v_i}{2} \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} + \widehat{W}_{\mathbf{\nu}}^{-i} - \widehat{W}^{-i}(b_i', \mathbf{b}_{-i}).
\end{align*}
As Lemma 4 guarantees that the undiscounted price cannot be more than the bid, we have:
\begin{align*}
u_i(b_i',\mathbf{b}_{-i})= \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} v_i - p_i \geq \ \delta_{\tau(i)}^{\sigma(i,b_i', \mathbf{b}_{-i})} \frac{v_i}{2} \geq \delta_{\tau(i)}^{\nu(i)} \frac{v_i}{2} + \widehat{W}_{\mathbf{\nu}}^{-i} - \widehat{W}^{-i}( b_i', \mathbf{b}_{-i}).
\end{align*}
We can drop $\widehat{W}_{\mathbf{\nu}}^{-i}$ and still have a true inequality, so we focus on how different $\widehat{W}^{-i}(b_i', \mathbf{b}_{-i})$ can be from ${W}^{-i}(\mathbf{b})$. And since we assume conservative bids, we must have $\widehat{W}^{-i}( b_i', \mathbf{b}_{-i}) \leq W^{-i}( b_i',\mathbf{b}_{-i})$. Hence, we can rewrite the inequality we have as:
\begin{align*}
u_i(b_i', \mathbf{b}_{-i}) \geq \delta_{\tau(i)}^{\nu(i)}\frac{v_i}{2} - W^{-i}( b_i', \mathbf{b}_{-i})
\end{align*}
Now, we need to bound $W^{-i}(b_i', \mathbf{b}_{-i})$ in terms of $W(\mathbf{b})$. We will do this very coarsely. Notice that in any allocation, the algorithm will always fill all the slots. Let $\delta^{\max}$ be the maximum discount rate in the first slot - that is, $\max_{j} \delta_j^{1}$ - and let $\delta_{\min}$ be the minimum discount rate for the \emph{last} slot (i.e. $\min_{j} \delta_j^{n}$). By monotonicity and full allocation, we know then that at the very most, we have:
\begin{align*}
W^{-i}(b_i', \mathbf{b}_{-i}) \leq \sum_{j\neq i} \delta^{\max}v_j = \delta^{\max} \sum_{j \neq i} v_j
\end{align*}
and at the very least, we have:
\begin{align*}
W( \mathbf{b}) \geq \sum_{j} \delta^{\min} v_j = \delta^{\min} \sum_{j} v_j.
\end{align*}
But that means that whatever $W( \mathbf{b})$ is, we must have that:
\begin{align*}
W^{-i}(b_i', \mathbf{b}_{-i}) \leq \frac{\delta^{\max}}{\delta^{\min}} \cdot \frac{\sum_{j\neq i} v_j}{\sum_{j}v_j} W(\mathbf{b}).
\end{align*}
(To see this, just note that $ 1\leq W(\mathbf{b})/ (\delta^{\min} \sum_j v_j)$ and multiply the inequality with $W^{-i}$ by 1 and apply this inequality to $\delta^{\max} \sum_{j\neq i} v_j \cdot 1$.)
But now, using this upper bound for $W^{-i}$ to upper bound the negative term in the inequality above, we can write that
\begin{align}\label{ineq:opt-gsp-smooth}
u_i(b_i',\mathbf{b}_{-i}) \geq {\delta^{\nu(i)}}\frac{v_i}{2} - \frac{\delta^{\max}}{\delta^{\min}} \frac{\sum_{j \neq i} v_j}{\sum_{j} v_j} W(\mathbf{b}).
\end{align}
Inequality \ref{ineq:opt-gsp-smooth} thus holds in the case that $i$ gets a worse slot than $\nu(i)$ under the deviation, but of course it also holds true in the case that $i$ gets a better slot. Thus, it always holds, so we can sum over bidders to write:
\begin{align*}
\sum_{i} u_i(b_i', \mathbf{b}_{-i}) &\geq \sum_{i} \delta^{\nu(i)} \frac{v_i}{2} - \frac{\delta^{\max}}{\delta^{\min}} \sum_i \frac{\sum_{j\neq i} v_j}{\sum_j v_j} W(\mathbf{b}) = \frac{\text{OPT}}{2} - \frac{\delta^{\max}}{\delta^{\min}} W(\mathbf{b}) \frac{1}{\sum_{j} v_j} \sum_i \sum_{j\neq i} v_j \\
&= \frac{\text{OPT}}{2} - \frac{\delta^{\max}}{\delta^{\min}} W(\mathbf{b}) \frac{1}{\sum_j v_j} \cdot (n-1) \sum_{j} v_j
\end{align*}
where the last inequality follows since each agent's valuation appears exactly $n-1$ times over the double sum.
But then we have that
\begin{align*}
\sum_i u_i(b_i', \mathbf{b}_{-i}) \geq \frac{\text{OPT}}{2} - \frac{\delta^{\max}}{\delta^{\min}} (n-1) W(\mathbf{b}).
\end{align*}
Thus, this game is $(\frac{1}{2}, \frac{\delta^{\max}}{\delta^{\min}}(n-1))$-semismooth.
\end{proof}
\begin{cor}
The (Opt,GSP) mechanism has an instance-specific upper bound on Price of Anarchy of:
\begin{align*}
\text{PoA} \leq 2 + 2 (n-1) \frac{\delta^{\max}}{\delta^{\min}}.
\end{align*} If we assume that there are $m$ slots and all discount curves are geometric and strictly ordered (e.g. $c_\tau = c_{\tau'}$ and $\delta_{\tau_1} \geq \delta_{\tau_2} \geq...\geq \delta_{\tau_k}$ for some $k$), then an upper bound is given by:
\begin{align*}
2+ 2\cdot(n-1) \frac{\delta_{\tau_1}}{\delta_{\tau_k}^m}
\end{align*}
\end{cor}
We remark that this bound is potentially exponential in the number of bidders in the case of \emph{geometric} discount curves, but linear in the case of \emph{linear} discount curves (assuming a fixed set of discount curves). And while this bound is likely too pessimistic, we can give a lower bound as well:
\begin{theorem}\label{thm:optgspexample}
Let $(\mathcal{A},\P_{\mathcal{A}}) = $ (Opt,GSP). Then there exists a conservative 3-bidder 3-slot example that gets a competitive ratio arbitrarily close to 3/4.
\end{theorem}
\begin{proofsketch}
Again, we construct a counterexample, prove it is an equilibrium, and optimize the welfare subject to equilibrium conditions. Here, a two-player two-slot example cannot suffer a high PoA, because the inefficient assignment of bidders would allow for a profitable deviation of the bidder in the worse slot (or the better slot if the price were too high). But with three bidders and three slots, we can find an example where two of the bidders effectively exert a ``joint" externality, and no single bidder has any incentive to deviate despite the allocation being suboptimal overall.
\end{proofsketch}
Of the results we have derived, this mechanism has the least-tight upper bound on the price of anarchy, and the weakest lower bound. On the other hand, the following intuition suggests that the mechanism should perform relatively well: by construction, whenever the mechanism has access to the true valuations, its allocation is optimal. It does not have access to true valuations because it is not incentive-compatible, but GSP, like VCG, does somewhat ``protect'' a bidder from the risk of overpaying. Thus bidders may have less incentive to greatly shade their bid. We leave formalizing and exploring this intuition and improving these PoA bounds to future work.
\subsection{Solution Concepts and Learning}
Each mechanism induces a game between agents that act strategically, so the \emph{equilibrium concept} is an important modeling choice. In this paper we present equilibrium results for both full-information and Bayes-Nash equilibria:
\begin{definition}[Nash Equilibrium]\label{def:eq-nash}
A bid profile $\mathbf{b}$ is pure strategy \emph{Nash equilibrium} if for each player $i$:
$
u_i(\mathbf{b}) \geq u_i(b', \mathbf{b}_{-i})
$
for all pure strategies $b'$.
\end{definition}
\begin{definition}[Bayes-Nash Equilibrium]\label{def:eq-bayes}
For a known value distribution $\mathcal{V}$, the vector of mappings $\mathbf{b}(\mathbf{v})$ is a Bayes-Nash equilibrium if for every player $i$:
\begin{align*}
\E_{\mathbf{v}\sim \mathcal{V}}[u_i(\mathbf{b}(\mathbf{v}))] \geq \E_{\mathbf{v}\sim \mathcal{V}}[u_i(b_i'(v_i), \mathbf{b}_{-i}(\mathbf{v}_{-i}))]
\end{align*}
for any other mapping ${b'_i}(v_i)$.
\end{definition}
For each of these equilibrium notions, an $\epsilon$-\emph{approximate} version is obtained by allowing the definitional inequality to be violated by no more than $\epsilon$. A bid profile where no bidder can improve their payoff by more than $\epsilon$ is an $\epsilon$-approximate Nash equilibrium.
A Bayes-Nash equilibrium is $\emph{linear}$ if $b_i(v_i) = \beta_i v_i$ for some $\beta\geq 0$. We say a bidder is \emph{conservative} if he does not bid above his value, and an equilibrium is conservative if it does not prescribe bidding above one's value. For some results in Section \ref{s:poa}, we will assume that bidders are conservative.
In general, it may be difficult or impossible to analytically characterize equilibria in more complicated settings. Thus, in Section \ref{s:exp}, we turn to \emph{learning} equilibria using no-regret learning algorithms on data drawn from realistic valuation distributions. This approach, while powerful, is not guaranteed to recover either Nash or Bayes-Nash equilibria, but instead the more general notions of \textit{Coarse Correlated Equilibrium} (CCE) and \textit{Bayesian Coarse Correlated Equilibrium} (BCCE). As we do not rely on these notions for our analytical results, we defer the definitions of these concept to Section \ref{sec:appexperiments}.
For each equilibrium concept, there may be multiple equilibria with different welfare. The Price of Anarchy (PoA) captures the worst-case\footnote{We also use the term ``empirical PoA'' to describe the ratio of average realized welfare to optimal welfare when speaking about specific or empirical cases. Strictly speaking the PoA is only the worst-case value, but the meaning should be clear.} welfare compared to the optimal welfare knowing the valuations. Here, we write its definition adapted to our setting:
\begin{definition}[Price of Anarchy] \label{def:poa}
The Price of Anarchy is
$$ \text{PoA(Nash)} \coloneqq \max_{{\bf b} \in E} \frac{\sum_i \delta^{\nu(i)}_{\tau(i)}\cdot \mathbf{v}_i}{\E[\sum_i \delta^{\mathcal{A}({\bf b})_i}_{\tau(i)} \cdot \mathbf{v}_i]}
$$
where $E$ is the set of Nash equilibria for $(\mathcal{A}, \P_\mathcal{A})$ and the randomness is over the strategy distributions. A similar definition can be made for a Bayesian PoA with randomness over the valuations.
\end{definition}
\subsection{Contributions}
This paper makes three main contributions:
\begin{itemize}
\item {\bf Price of Anarchy Bounds.} In Section~\ref{s:poa}, we provide Price of Anarchy upper and lower bounds in the Ad Types setting for all combinations of greedy or optimal allocation paired with GSP and VCG pricing. In particular, greedy allocation has an upper bound for Price of Anarchy of 4, regardless of the choice of pricing; for optimal allocation and GSP pricing, we give an upper bound that depends on the bidder types and number of bidders, but not valuations. We give lower bounds on the Price of Anarchy of 2 for greedy allocation with GSP pricing, 3/2 for greedy allocation with VCG pricing, and 4/3 for optimal allocation with GSP pricing.
\item {\bf Small Equilibrium Characterization.} In Section~\ref{s:eq}, we analytically characterize the existence of Bayes-Nash equilibrium in the simple case of two bidders, two slots, and valuations distributed uniformly over the unit interval.\footnote{While this may appear a very special case, explicit equilibrium characterization in auctions is notoriously complex. Most famously, in Vickrey's original paper \cite{vickrey1961counterspeculation} he posed an open problem to characterize the equilibrium of a two-player first-price auction with uniform valuations in $[a_1, b_1]$ and $[a_2, b_2]$. The problem remained unsolved until nearly 50 years later \cite{kaplan2012asymmetric}!} In equilibrium, the greedy allocation with GSP pricing produces and equivalent amount of revenue to the optimal allocation with VCG pricing, and that this revenue is larger than the revenue produced by either of the other possible mechanism (which are also equivalent to each other).
\item {\bf Evaluation on Realistic Data.} The small-equilibrium characterizations are interesting, but in order to understand if the results are representative of larger instances, we learn equilibria for bidding data from a large online advertiser in Section~\ref{s:exp}. We draw (normalized and anonymized) advertiser bids in various settings and equip advertisers with no-regret learning algorithms; when players use such algorithms, the empirical average of play is known to converge to \emph{coarse correlated equilibria}. We find that for the most part equilibria on real data do not behave identically to the two bidder two slot uniform valuations case, but rather show a steeper hierarchy of revenue and welfare that conforms with intuition.
\end{itemize}
\subsection{Related Literature}
\paragraph{Position Auctions.} Position auctions have long been the workhorse in online advertising. The seminal works of Edelman et al. \cite{edelman2007internet} and Varian \cite{varian2007position} first proposed the separable model of the position auction---and described the generalized second-price (GSP) auction in this model---and showed that for GSP there exists an ex-post Nash equilibrium that is equivalent to the VCG outcome. Gomes and Sweeney \cite{gomes2014bayes} showed that GSP does not always admit a Bayes-Nash equilibrium. There is also a history of exploring alternative pricing rules for position auctions; for example Chawla and Hartline \cite{chawla2013auctions} study generalized first-price (GFP) semantics for position auction and show that for independent and identically distributed (IID) valuations the equilibrium is unique and symmetric.
\paragraph{Price of Anarchy and Smoothness.} Since explicit equilibrium computation in auction is challenging, people have focused on Price of Anarchy bounds, i.e. using the equilibrium conditions to give bounds on the welfare in \emph{any} equilibrium. Paes Leme and Tardos \cite{leme2010pure} were the first to give Price of Anarchy bounds for GSP. A common approach to proving Price of Anarchy bounds is to use the smoothness framework proposed by Roughgarden \cite{roughgarden2015intrinsic,roughgarden2017price}, though GSP is not smooth in this sense. Lucier and Paes Leme \cite{lucier2011gsp} and Caragiannis et al. \cite{caragiannis2015bounding} instead show that one can use a \emph{semi-smoothness} condition and they give almost tight Price of Anarchy bounds for GSP. Smoothness has also been applied to other payment rules, such as GFP by Syrgkanis and Tardos \cite{syrgkanis2013composable}.
\paragraph{Complex Ad Auctions.} There is a body of work that explores relaxing the separability assumption in position auctions. Our work is based on the Ad Types setting formalized by Colini-Baldeschi et al. \cite{adtypes}. When each ad is its own type, this model is identical to the one with arbitrary action rates that are still independent between ads, which has been studied before by Abrams et al. \cite{AGV07}, Carvallo and Wilkens \cite{CW14} and Wilkens et al. \cite{cavallo2018matching}. To our knowledge, no equilibrium characterizations or Price of Anarchy bounds are known in these settings. The closest is a paper by Colini-Baldeschi et al. \cite{colini2020envy} that studies the relationship between envy, regret and social welfare loss in the Ad Types setting for an alternative version of GSP called ``extended GSP'' using the same semi-smoothness framework as proposed by Caragiannis et al. \cite{caragiannis2015bounding}.
\section{Introduction}
\input{content/intro-ec}
\section{Model and Preliminaries}
\input{content/model-ec}
\section{Price of Anarchy}\label{s:poa}
\input{content/poa-ec}
\section{Equilibrium Characterization}\label{s:eq}
\input{content/eq-ec}
\section{Empirical Study}\label{s:exp}
\input{content/exp-ec}
\section{Discussion and Open Questions}\label{s:conc}
\input{content/conc-ec}
\bibliographystyle{acm}
|
\section{Introduction}
Speckle patterns are granular intensity patterns that are the result of the interference of coherent light reflecting off a rough surface. Despite their random nature, they are rich in information and can be sensitive to various effects, which make them an interesting tool for metrology. Among many applications, we find the measurement of displacement \cite{archbold70,wang2006core,wang2006vortex,wang2005phase}, vibrations \cite{bianchi14}, polarisation \cite{facchin2020pol}, blood flow in tissues \cite{Briers13}, speech and heartbeat \cite{zalevsky09}, and drying processes in paint \cite{van2016paint}.
The applications of speckle metrology that we focus upon here particularly are recently identified topics, namely spectrometry \cite{Wan15,redding2013all,Redding12,Redding14,Liew16,Redding13,wan2020high} and measurements of wavelength \cite{wan2020high,chakrabarti2015speckle,bruce19,Bruce20,Mazilu14,odonnellhigh,Gupta19,Metzger17,davila2020single}. Both rely on the sensitivity of speckle patterns to a change in incident laser wavelength. For the remainder of this work, we define sensitivity as the HWHM (half width at half maximum) of some measure of change in the speckle pattern as a function of wavelength change, which is also the commonly used definition for the resolution of speckle spectrometers \cite{Cao17}. This sensitivity naturally depends on the way the speckles are produced. The most common methods for producing speckles are reflection on a rough surface \cite{chakrabarti2015speckle}, propagation through a multimode fibre \cite{Wan15,redding2013all,Redding12,Redding14,Liew16,bruce19,Bruce20}, or through a disordered medium \cite{Redding13,Gupta19,Mazilu14}.
In this work we focus on an alternative way of producing speckle patterns, which is due to multiple reflections of light inside an integrating sphere \cite{odonnellhigh,Gupta19,Metzger17,davila2020single,Boreman90}. This has proven to produce sensitive speckles with an intensity distribution close to a gamma distribution. To the best of our knowledge, in such a geometry, a rigorous theoretical understanding of the sensitivity in terms of key experimental parameters is lacking. This would allow a comparison to be made between media generating speckle patterns, to determine any trade offs and to make an informed choice between these various schemes. To this end we derive a general model predicting the change occurring in a speckle pattern, first for a generic transformation, then specifically for a wavelength change. We find that the key parameters are the sphere's radius and its surface reflectivity. We then compare this to the sensitivity obtained for the case of a speckle pattern produced by a multimode fibre, and discuss an interesting analogy with Fabry-Pérot interferometers.
\section{Derivation of the speckle similarity profile}
The problem is as follows: a beam of monochromatic light enters a spherical cavity of radius $R$ and uniform reflectivity $\rho$, as shown in Fig. \ref{fig:geometry}. We consider that the inner surface presents a Lambertian reflectance, which implies that the surface is rough, and therefore the light exiting the sphere forms a speckle pattern. Now we apply an arbitrary transformation to the system (which could be a change in wavelength, refractive index of the medium, or a deformation of the sphere) and we ask how the speckle changes as a consequence.
Denoting $I$ and $I'$ as the intensity patterns before and after the transformation respectively, we quantify the change in the speckle by the following quantity:
\begin{equation} \label{eq:correl}
\begin{split}
S&= \Big\langle \Big( \frac{I_{j}-\langle I_{j}\rangle_j}{\sigma} \Big)\Big( \frac{I_{j}'-\langle I_{j}'\rangle_j}{\sigma'} \Big) \Big\rangle _j, \\
\end{split}
\end{equation}
\noindent where $I_{j}$ is the intensity observed at point $j$ of the observation plane, $\sigma$ is the standard deviation of the intensity pattern, and $\langle \rangle_j$ denotes averaging over the observation plane.
The quantity $S$ is called similarity (or Pearson correlation coefficient), and quantifies the morphological change between the two images. It leads to a value of 1 for identical speckle patterns and decreases towards 0 as they diverge from one another. Here we seek an expression for the similarity as a function of relevant parameters of the sphere and the applied transformation, and apply it to the case of wavelength change.
\begin{figure}[h!]
\centering\includegraphics[width=8cm]{geometry3.pdf}
\caption{Geometry of the problem. The input beam is incident upon the inner surface of a spherical cavity and undergoes multiple diffusive reflections. The light that escapes the sphere forms a speckle pattern which is collected at the observation plane. $n$ is an element of the inner surface, $j$ is a point of the observation plane, and $p$ and $p'$ are two possible paths from $n$ to $j$. }
\label{fig:geometry}
\end{figure}
We assume that the coherence length of the light is large compared to the spread of the path length distribution in the sphere (equal to $4R/(3 \ln{\rho})$ \cite{hodgkinson2009using}), so that the light can be considered fully coherent on the observation plane. The intensity at point $j$ then verifies
\begin{equation} \label{eq:intensity}
I_{j}\propto\left | E_j \right |^2=E_{j}^\dagger E_{j},
\end{equation}
\noindent with $E_{j}$ the $3\times1$ complex field at $j$, and $\dagger$ denoting the conjugate transpose. We work in the monochromatic approximation, where the time dependence disappears after multiplication by the conjugate. Therefore we omit the time dependence as well as the time averaging.
It can be shown \cite[p.~41]{Goodman} that the similarity of the absolute square of the field is equal to the absolute square of the field's correlation:
\begin{equation} \label{mu}
S=\left |
\frac{\big\langle E_j^\dagger E_j'\big\rangle_j}
{\big\langle \left | E_j \right |^2 \big\rangle_j}
\right |^2,
\end{equation}
\noindent where we assume that the statistics of the speckle pattern are the same before and after transformation, namely $\langle \left | E_j' \right |^2 \rangle_j=\langle \left | E_j \right |^2 \rangle_j=\langle I_j \rangle_j$.
Now we can develop $E_j$ by modelling the journey of the light between the illuminated region and the observation plane. The inner surface is modelled by an assembly of $M$ discrete surface elements, with $M$ large enough for each element to be considered flat. The field at $j$ can then be written as the sum of the contributions from each surface element illuminated by the input beam, reading ${E}_{j}=\sum_{n}{E}_{nj}$,
with ${E}_{nj}$ the contribution of surface element $n$ to the field at $j$. Furthermore, the field diffuses everywhere in space from $n$ to $j$, and ${E}_{nj}$ implicitly contains the contributions of all the possible paths starting from $n$ and ending at $j$. As a transformation affects each path differently (in the general case), let us decompose ${E}_{nj}$ into the contributions of all paths, reading ${E}_{nj}=\sum_{p}\alpha_{njp}{E}_{n}$,
where we label each path by an index $p$. ${E}_{n}$ is the field coming from the incident beam at $n$, and $\alpha_{njp}$ is a $3\times3$ complex matrix describing the change in the field from $n$ to $j$ following path $p$. The number of paths between any $n$ and $j$ is of course infinite (one can think for example of an arbitrary long alternation between the two same elements). These two decompositions follow from the superposition principle and the assumption that the diffusion is linear, and together give us an expression for ${E}_{j}$:
\begin{equation}
E_j=\sum_{np}\alpha_{njp}{E}_{n}.
\end{equation}
Inserting this in (\ref{mu}), and using the distribution property of the conjugate transpose, we have
\begin{equation} \label{mudev}
\begin{split}
S&=\left |
\frac{\Big\langle {E}_{n}^\dagger\alpha_{njp}^\dagger \alpha_{njp}'{E}_{n}\Big\rangle_{njp} }
{\Big\langle {E}_{n}^\dagger\alpha_{njp}^\dagger \alpha_{njp}{E}_{n} \Big\rangle_{njp}}
\right |^2,
\end{split}
\end{equation}
\noindent where we assumed that the fields coming from different paths or different elements of the illuminated region are uncorrelated.
The matrix $\alpha_{njp}$ can be decomposed into the product of an amplitude, phase, and polarisation term, reading $\alpha_{njp}=\sqrt{T_{njp}} e^{i\varphi_{njp}}U_{njp}$, where $T_{njp}$ is the intensity transmission of path $p$ from $n$ to $j$, $\varphi_{njp}$ is the phase acquired by the field along the path, and $U_{njp}$ is a $3\times3$ unitary matrix changing the polarisation.
Furthermore, we are interested here in transformations that leave the incident beam profile unchanged, therefore $E_n$ is constant and the effect of a transformation appears in $\alpha_{njp}$ only. This effect typically appears in the phase term, so that we can write $\alpha_{njp}'=\alpha_{njp} e^{i\phi_{njp}}$, with $\phi_{njp}=\varphi_{njp}'-\varphi_{njp}$ the phase shift induced by the transformation. We use the symbol $\phi_{njp}$ instead of $\Delta\varphi_{njp}$ to avoid heavy notations, as only $\phi_{njp}$ appears in the following.
Inserting these expressions for $\alpha_{njp}$ and $\alpha_{njp}'$ in (\ref{mudev}), and using the orthogonality property of unitary matrices ($U^\dagger U=I$ with $I$ the identity matrix), we find
\begin{equation}
S=\left |
\frac{\Big\langle T_{njp} \left | {E}_{n} \right |^2 e^{i\phi_{njp}} \Big\rangle_{njp} }
{\Big\langle T_{njp} \left | {E}_{n} \right |^2 \Big\rangle_{njp}}
\right |^2.
\end{equation}
This can be simplified if we choose the size of our surface elements to be large compared to the small scale asperities of the inner surface, in which case $T_{njp}$ earns the macroscopic properties of the Lambertian reflectance, and loses its $n$ dependence. Its $j$ dependence can be neglected in any case, as all paths impinge on $j$ from almost identical angles and distances. We also neglect the $n$ and $j$ dependence of $\phi_{njp}$, as they only account for small contributions at the endpoints of the path. These simplifications lead to
\begin{equation} \label{Tp}
\begin{split}
S = \left | \frac{ \sum_{p} T_{p} e^{i \phi_p} }
{\sum_{p} T_{p} } \right |^2.
\end{split}
\end{equation}
We can recognise in (\ref{Tp}) a weighted average of the phase factors, where the weights are given by the transmission of the paths. This lends itself to a nice visual interpretation in the complex plane (see Fig. \ref{fig:cluster}). Plotting each phase factor as a point in the complex plane (each corresponding to a path) forms an infinite cluster lying on the unit circle. The similarity is the square of the distance between the barycentre of this cluster and the origin. When no transformation is applied ($\phi_p=0$ for all paths), all the points are at 1 and the similarity is therefore 1 (no speckle change). As the effect of a transformation increases, the points spread out on the unit circle and the barycentre approaches the origin (hence a decreasing value of the similarity) until the points are uniformly spread, where the similarity is close to zero.
\begin{figure}[h!]
\centering\includegraphics[width=\linewidth]{cluster4.png}
\caption{Visual representation of equation (\ref{Tp}). Each path is represented by a black dot, which together form an infinite cluster on the unit circle of the complex plane. The size and azimuthal position represent respectively the transmission of the path ($T_p$) and the phase shift induced by the transformation on that path ($\phi_p$). The similarity (S) is equal to the square of the distance between the origin (O) and the barycentre of the cluster (B). We show three stages where the effect of the transformation increases from none to high. }
\label{fig:cluster}
\end{figure}
Now $T_p$ can be shown to be a simple function of the number of single passes that make up path $p$ (we define single pass as a straight line linking two surface elements of the sphere, a path is a succession of single passes). Indeed, the Lambertian reflectance, combined with the spherical geometry, conspire to make the transmission a constant for each single pass. This can be shown in the following way. Consider one surface element emitting a power $P$ in the volume of the sphere, and another element receiving some part of this power. The Lambertian reflectance implies that the received power is $P'= P \rho \, \delta S \cos{\theta_1}\cos{\theta_2}/(\pi d^2)$ \cite{carr1997integrating}, with $d$ the distance between the elements, $\theta_1$ and $\theta_2$ the angles between their normal and the line joining them, and $\delta S$ their area. Now the spherical geometry imposes a relation between these quantities, namely $d=2R\cos{\theta}$, with $\theta=\theta_1=\theta_2$. If we insert this in the expression of the received power (and recall that $\delta S=4\pi R^2/M$) we find that it simplifies to $P\rho/M$. Therefore, the transmission is $\rho/M$ for each single pass, and the transmission of a full path made of $N$ single passes is $T_p=(\rho/M)^{N(p)}$, which is a great simplification of the problem.
With this in mind, we can split the sums in (\ref{Tp}) into groups of paths that are made of the same number $N$ of single passes
\begin{equation} \label{integral}
\begin{split}
S &= \left | \sum_{N} \sum_{p'} \frac{\rho^N}{\sum_{N}\rho^N} \frac{e^{i \phi_{p'}}}{M^N} \right |^2 \\
&\approx \left | \int_0^{\infty} \frac{\rho^N}{-\ln{\rho}} \: e^{iN\mu -N\sigma^2/2} \; dN\right |^2,
\end{split}
\end{equation}
\noindent where $p'$ designates the paths that are made of $N$ single passes. The first line makes appear the average value of $e^{i \phi_{p'}}$ in the population $p'$ (as $M^N$ also happens to be the total number of paths made of $N$ single passes), which can be expressed in more explicit terms. Indeed, the phase $\phi_{p'}$ acquired on a full path is the sum of the phases acquired on each successive single path, so that we can approximate $\phi_{p'}$ by a Gaussian random variable, as a consequence of the central limit theorem. Besides, statistics tell us that the complex exponential of a Gaussian random variable $G(\mu,\sigma)$ has average $\langle e^{iG(\mu,\sigma)} \rangle=e^{i\mu -\sigma^2/2}$. Therefore, we have $\sum _{p'} e^{i \phi_{p'}}/M^N =e^{iN\mu -N\sigma^2/2}$, with $\mu$ the average phase induced by the transformation on a single pass, and $\sigma$ the standard deviation of this phase. In the second line we approximate the sum by an integral, which has the advantage of giving a simpler form and impacts little the accuracy of the result.
We set the lower limit to $N=0$, again for simplicity of the final form. This choice is not critical as, when $\rho$ approaches unity (typically a sphere will have $\rho>0.9$), more power goes to higher values of $N$ and the choice of the starting point does not influence the outcome to any appreciable degree.
Performing the integral finally gives
\begin{equation} \label{Sgeneral}
S = \frac{ 1 }
{\big (1-\frac{\sigma^2}{2\ln{\rho}} \big)^2+\big (\frac{\mu}{\ln{\rho}} \big)^2 }.
\end{equation}
This expression is valid for any transformation that applies a phase shift of average $\mu$ and standard deviation $\sigma$ to the field along one single pass. It is interesting to note in passing that any effect for which the $\mu$ term dominates leads to a Lorentzian profile, while any effect where the $\sigma$ term dominates leads to the square of a Lorentzian (if we recall that $\ln{\rho}$ is negative).
We collect here the assumptions made in our model: the incident light is monochromatic, with a coherence length large compared to the spread of the path length distribution, the inner surface has a Lambertian reflectance with uniform reflectivity, and the diffusion is linear. The last steps between (\ref{integral}) and (\ref{Sgeneral}) also assume a high reflectivity ($\rho > 0.9$).
\section{Sensitivity to wavelength variations}
Let us now apply (\ref{Sgeneral}) to the case of a wavelength variation. When light propagates along a path of length $z$, it acquires a spatial phase $kz$, with $k$ the wavenumber. When the wavelength changes, it induces a phase change on the path equal to $\Delta k \,z$. Here we see that the effect of the transformation indeed takes the form of a phase factor which is different for each path, with $\phi_p=\Delta k \, z_p$. It follows that the average phase change on a single pass is $\mu= \Delta k z_0$, with $z_0$ the average distance between two points in a sphere, that is, the average chord length. This is given by geometry to be $4R/3$ \cite{Fry:06,berengut1972random,sidiropoulos2014n}. Likewise, the standard deviation of chord length is $\sqrt{2}R/3$ \cite{berengut1972random,sidiropoulos2014n}. This gives
\begin{equation} \label{stat}
\mu=\frac{4}{3}R\Delta k \quad \quad \quad \sigma=\frac{\sqrt{2}}{3}R\Delta k.
\end{equation}
Inserting these expressions in (\ref{Sgeneral}), it can be shown that we are in a case where the $\mu$ term dominates, and therefore the similarity shows a Lorentzian profile:
\begin{equation} \label{eq:lorentzian_wav}
S= \frac{1}{1+\left(\frac{ \Delta \lambda}{ \Delta \lambda_0}\right)^2 },
\end{equation}
with $\Delta \lambda_0=3\lambda^2\left|\ln\rho\right|/(8\pi R)$, which also corresponds to the HWHM of the Lorentzian. For modest parameters such as $R=1$ cm, $\rho=$ 0.9, and $\lambda=$ 780 nm, this gives already a fairly high sensitivity with an HWHM of about 0.8 pm.
We note that, for a wavemeter, the smallest change in wavelength that can be measured is much smaller than this HWHM, and will rather correspond to the smallest change in $S$ which is detectable over sources of experimental noise. For example, attometre-resolved measurements were realised with an MMF where the HWHM was 620 pm \cite{bruce19}.
\section{Experimental verification}
In order to verify (\ref{eq:lorentzian_wav}), we implement the experimental setup shown in Fig. \ref{fig:setup}. A laser beam (of 780 nm wavelength, 10 mW power, and having a coherence length of a few km (Toptica DLPro)) is injected in an integrating sphere, and the resulting speckle pattern is recorded on a CMOS camera (Mikrotron MotionBLITZ EoSens mini2). We place the camera so that the individual speckle grains cover hundreds of pixels, in order to minimise spatial averaging effects. Larger images minimise the variance of the similarity across different realisations, we use $200\! \times \! 200$-pixels images (about a few hundred speckle grains) which offers a good compromise between variance and computation speed. We use a 1.25 cm radius integrating sphere, carved into a 3 cm edge aluminium cube and manually coated with Spectraflect. The light enters and escapes the sphere via two 3 mm diameter holes.
We then apply a linear wavelength variation by applying a triangular modulation to tune the cavity length of the laser. The amplitude of the wavelength variation is $3.1 \pm 0.05$ pm and is measured using a Fizeau-based wavemeter (HighFinesse WS7).
One similarity profile can be extracted by computing the similarity between one reference image and the rest of the data set. By using several reference images across the data set, we extract several similarity profiles. We show the average and standard deviation in Fig. \ref{fig:simil_wav}. We fit the resulting profile using (\ref{eq:lorentzian_wav}) with $\rho$ as a free parameter, as it is the most uncertain quantity. We find a good agreement for $\rho=0.917 \pm 0.002$. The uncertainty comes in equal amount from that of the wavelength modulation amplitude and the fitting.
\begin{figure}[h!]
\centering\includegraphics[width=\linewidth]{setup3.pdf}
\caption{Experimental setup. Laser light enters an integrating sphere (IS) and produces a speckle pattern collected on a camera. The wavelength of the laser is then changed in a linear manner, while the resulting speckle change is recorded. The wavelength change is monitored by a reference wavemeter. An example of a $200\! \times \! 200$-pixel speckle pattern image is shown. }
\label{fig:setup}
\end{figure}
\begin{figure}[h!]
\centering\includegraphics[width=\linewidth]{similerr2.pdf}
\caption{Similarity as a function of wavelength change, experimental (black) and Lorentzian profile predicted by model (red), fitted for a reflectivity $\rho=0.917$. The centre and span of the error bars respectively give the mean and standard deviation of the set of curves extracted from the data set. The HWHM is 0.5 pm.}
\label{fig:simil_wav}
\end{figure}
The fit in Fig. \ref{fig:simil_wav} confirms the predicted functional form, though we recognise that we have $\rho$ as a free parameter. In order to perform an independent measurement of $\rho$, we use a method based on the measurement of the output power \cite{carr1997integrating}. The power measured at a certain distance from the output port can be expressed as a function of the input power, port size, port-detector distance, detector diameter, integrating sphere diameter, and reflectivity. We measure the output power at different distances from the output port using a photodiode power sensor (Thorlabs S121C) and extract an estimation of the reflectivity $\rho=0.908 \pm 0.009$. Here the main sources of uncertainty are the machine precision limit on the output port diameter (3\%) and the uncertainty of the power meter measurement (7\%). The two values of $\rho$ agree within one $\sigma$ of uncertainty. Other sources of systematic error that are difficult to assess were not taken into account, such as the alignment of the detector with the port and orientation of the detector (which both lead to an underestimation of $\rho$). Another source of systematic error could be possible non-uniformity of the reflectivity across the inner surface.
We note in passing that the fit of the similarity curve can serve as a means of measuring the reflectivity, with an accuracy only limited by the knowledge of the applied wavelength variation and the sphere's radius.
\section{Comparison with speckle patterns generated by multimode fibres}
In this section we compare the sensitivity of an integrating sphere to that of a multimode fibre. The similarity profile of a multimode fibre is not Lorentzian, but we know the dependence of its HWHM on the relevant fibre parameters, namely $\Delta \lambda_0 \propto \lambda^2/(L\, N\!A^2)$, with $\lambda$ the wavelength, $L$ the fibre's length, and $N\!A$ its numerical aperture \cite{Rawson80,redding2013all}. It is independent of the core size above a critical diameter of about 100 $\mu$m \cite{redding2013all}. For a step-index fibre, the relationship was empirically found to be $\Delta \lambda_0 \approx 2.4 \, \lambda^2/(L\, N\!A^2)$ \cite{redding2012using}. Equating this HWHM to that found above for the integrating sphere, we find a direct proportionality between the fibre's length and the radius of the equivalent integrating sphere. With a standard value $N\!A=0.22$, and our previously found reflectivity $\rho=0.917$, we have
\begin{equation}
L \approx 7000\,R,
\end{equation}
\noindent which means that a sphere of radius $R$ shows the same sensitivity as a $7000R$-long fibre. For example, our sphere of radius 1.25 cm is equivalent to a fibre of length 90 m.
This demonstrates that an integrating sphere can offer a very compact alternative to an optical fibre, as the effective space occupied by a fibre is much larger than that of the equivalent integrating sphere (even though its intrinsic volume is smaller) for similar performance.
Another advantage of the sphere is that the sensitivity to wavelength change is independent of the way in which light is coupled into the sphere. In contrast, it was shown that the sensitivity of multimode fibres depends strongly on the number of spatial modes excited in the fibre and therefore on the coupling of light at the fibre input \cite{velsink2021comparison,redding2013all}. Moreover, an integrating sphere offers the additional advantage of being more robust to mechanical perturbations, as they are monolithic and have no moving parts, which can be a serious difficulty when using fibres.
\section{Comparison with the spectral linewidth of a Fabry-Pérot interferometer} \label{perot}
Interestingly, the similarity profile (\ref{eq:lorentzian_wav}) has the same functional form as the transmission line of a Fabry-Pérot interferometer. In fact, this is not so surprising as one could tackle this problem using an approach similar to our model, which would give the same expressions (\ref{Tp}) and (\ref{Sgeneral}), where instead $S$ would be the output intensity normalised to maximum.
For a Fabry-Pérot, the HWHM is $\lambda^2\ln{\rho}/(4 \pi L)$ \cite{Ismail:16}, with $L$ the distance between the two mirrors, and $\rho$ their reflectivity.
For sake of comparison, let us consider a sphere and a Fabry-Pérot of the same reflectivity, with the sphere's diameter equal to the length of the Fabry-Pérot ($L=2R$). In these conditions we have that the HWHM of the Fabry-Pérot line is exactly 3 times smaller than that of the sphere's similarity.
This can be understood qualitatively, as the length of a Fabry-Pérot (L) is larger than the average length in the sphere ($4R/3$), the latter being exactly 3/2 smaller. From this simple observation, however, we would expect the HWHM of the Fabry-Pérot to be 3/2 times smaller than that of the sphere, not 3. The additional factor 2 comes from the one-dimensional flavour of the Fabry-Pérot. Indeed, any increase in length in the Fabry-Pérot must come in multiples of 2L, not L. Therefore the average length of a single pass (which is actually a round trip) is $2L$, and the substitution $2L \Leftrightarrow 4R/3$ is what allows the correct translation between the two cases. Interestingly, the lower dimensionality of the Fabry-Pérot system is in fact beneficial for sensitivity.
Of course, the HWHM is not the only parameter of interest for a wavemeter or spectrometer, but also the bandwidth or range over which the wavelength measurement can be performed. For a Fabry-Perot cavity, the wavelength is retrieved modulo $\Delta \lambda_{FSR}$ (with $\Delta \lambda_{FSR} = \lambda^2 / L$ in air). However, the higher-dimensional nature of speckle removes this degeneracy: any two wavelengths separated by more than a few HWHMs are essentially orthogonal, and the range over which the wavemeter operates is in principle only limited by the size of the calibration set. In practice, this is usually limited by the spectral window of the camera \cite{Metzger17}, although the limit may be further reduced by finite sampling of the speckle \cite{Redding13}.
\section{Summary and conclusion}
We have derived a general expression for the change occurring in the speckle pattern produced by an integrating sphere resulting from a generic transformation. The amount of change is quantified by the similarity (\ref{eq:correl}), for which we give an explicit expression (\ref{Sgeneral}). This expression depends only on the average and standard deviation of the phase shift induced by the transformation on a single pass through the sphere.
In the case of wavelength variation, the similarity becomes a simple Lorentzian profile (\ref{eq:lorentzian_wav}), whose HWHM depends mainly on the surface reflectivity and the radius of the sphere. We tested this result experimentally and found good agreement. The measurement of this Lorentzian profile can be used as an accurate, easy-to-implement means of measuring integrating spheres' reflectivity that is free from systematic error. By comparing this to the speckle pattern produced by transmission through a multimode fibre, we showed that an integrating sphere of radius $R$ gives the same sensitivity to wavelength change as a fibre of length $\approx 7000R$, with standard parameters.
The sphere's similarity profile has the same functional form as the transmission line of a Fabry-Pérot interferometer. For a sphere and a Fabry-Pérot of the same reflectivity, with the sphere's diameter equal to the length of the Fabry-Pérot ($L=2R$), we found that the HWHM of the Fabry-Pérot line is exactly 3 times smaller than that of the sphere's similarity.
This work suggests that the importance of the integrating sphere in the context of wavelength measurement has been overlooked, offering significant advantages when compared to the alternative methods discussed here. The model developed here can be adapted to consider other effects which transform the speckle, and will enable the optimised design of integrating spheres for speckle metrology.
\section{Acknowledgements}
This work was supported by funding from the Leverhulme Trust (RPG‐2017‐197) and the UK Engineering and Physical Sciences Research Council (EP/P030017/1).
|
\section*{Introduction}
Ground-state electronic properties of metallic solids have traditionally been
computed using density functional theory~(DFT)~\cite{Kohn1965,Kresse1996,Burke2012,Jones2015},
which is partially justified by the fact that many popular functionals are parameterized by
numerically exact results on the uniform electron gas (UEG)~\cite{Ceperley1980,Huang2008,Giuliani2008,Loos2016}.
In recent years,
interest has grown around the application of \textit{ab initio},
wavefunction-based electronic structure techniques for condensed-phase
systems~\cite{Pisani2008,Gruneis2010,Shepherd2012a,Booth2013,Yang2014,McClain2017,Gruber2018,Brandenburg2019},
since they do not suffer
from uncontrolled errors inherent to the DFT exchange-correlation
functional~\cite{Huang2008,Tsatsoulis2017,Usvyat2018}.
Promising methods in this direction include the random-phase approximation (RPA)~\cite{Harl2009,Gruneis2009,Brandenburg2019}
and coupled-cluster theory~\cite{Shavitt2009,Bartlett2012,Zhang2019,Gruneis2020,Stoll2009,Hummel2018}.
Importantly,
both of these methods
preclude the well-known divergences of finite-order perturbation theories,
such as second-order M\o{}llet-Plesset perturbation theory (MP2),
via an infinite-order resummation~\cite{Gell-Mann1957,Bohm1957,Freeman1977,Bartlett2007,Shepherd2013}.
Although coupled-cluster theory has been successfully applied to an increasing number of
atomistic semiconductors and insulators~\cite{Liao2016,McClain2017,Gruber2018,Gruber2018a,Dittmer2019,Gao2020,Wang2020,Pulkin2020},
its applicability for metals has been primarily focused around the UEG,
also known as jellium~\cite{Freeman1977,Freeman1978,Freeman1983,Shepherd2016,McClain2016,Spencer2016,Neufeld2017,Lewis2019,White2020}.
Despite their reasonable accuracy,
these calculations have demonstrated the typical
slow convergence of the correlation energy as a function of the number of virtual (unoccupied) orbitals
included~\cite{Shepherd2012a,Shepherd2012b,Hattig2012,Shepherd2016}.
This slow convergence is especially problematic because of the high cost of
coupled-cluster calculations with large basis sets.
For example,
coupled-cluster theory with single and double
excitations (CCSD) has a computational cost
that scales as $O(N^2M^4)$,
where $N$ and $M$ are the number of electrons and basis functions respectively.
To date,
results near the complete basis set (CBS) limit have been primarily computed via
the extrapolation of results obtained with a finite,
increasing number of basis functions~\cite{Shepherd2016,White2020,Gruneis2020},
although explicitly correlated~\cite{Gruneis2013} and
transcorrelated~\cite{Luo2018,Liao2021arxiv} methods provide promising alternative approaches.
Composite methods
(sometimes called focal point methods)
are a simple,
alternative class of approaches for
recovering dynamical correlation within large basis sets~\cite{Fiedler2017,Kumar2017,Warden2020}.
A common composite scheme combines the results of high-level and low-level theories using three calculations.
For example,
using CCSD as the high-level theory and MP2 as a low-level theory,
the CCSD correlation energy in a large basis is approximated as
\begin{equation}
\label{eq:comp}
E_\mathrm{CCSD}(M) \approx E_\mathrm{CCSD}(M_{\mathrm{act}})
+ E_\mathrm{MP2}(M) - E_\mathrm{MP2}(M_{\mathrm{act}})
\end{equation}
where $M_{\mathrm{act}} < M$ is the number of ``active'' basis functions.
Refs.~\onlinecite{Irmler2019,Irmler2019a} provide a similar but more sophisticated CCSD/MP2 composite method,
based on an analysis of the basis set convergence of various diagrammatic contributions
to the correlation energy.
While such CCSD/MP2 composite approaches have been applied successfully to a number of semiconductors
and insulators~\cite{Irmler2019,Lange2020,Wang2020,Lau2021},
their applicability to metals is questionable because of the failures of MP2 theory.
One goal of this work is to test the composite CCSD/MP2 approach for metals.
A more theoretically satisfying approach would be to perform a single
calculation where low-energy excitations near the Fermi surface are treated with CCSD
and are coupled to high-energy excitations treated with MP2.
This particular approach, which is similar to tailored CC~\cite{Kinoshita2005}
and the broader class of active-space CC
methods~\cite{Piecuch1999,Kowalski2001,Piecuch2010,Shen2012,Dutta2017},
has variously been called CC/PT~\cite{Nooijen1999},
CCSD-MP2~\cite{Bochevarov2005},
and multilevel CC~\cite{Myhre2013,Myhre2014}.
Two of us (M.F.L.~and T.C.B.)
recently tested this method for a few simple atomistic semiconductors and insulators~\cite{Lange2020},
and here we aim to assess its performance for metals,
where the differences between CCSD and MP2 are more striking.
Since the effects of the frozen high-energy MP2 amplitudes are folded down onto the low-energy
CCSD amplitudes (see below),
we refer to this method as a
``downfolding'' approach.
In principle,
this downfolding CCSD/MP2 method
should provide a distinct advantage over the conceptually simpler
composite approach,
as downfolding does not include the MP2 treatment of low-energy excitations
that are responsible for divergence in the thermodynamic limit (TDL).
After providing theoretical details of these two methods, we compare their
performance for the UEG at a fixed number of electrons and in the TDL.
Before concluding, we also examine the straightforward use of the RPA in place of
MP2.
\section*{Theory}
Here we briefly review the theory underlying the downfolding and composite approaches.
The $N$ occupied spin-orbitals are indexed by $i,j,k,l$;
the $\left(M-N\right)$ virtual orbitals by $a,b,c,d$;
and the $M$ general orbitals by $p,q,r,s$.
The MP2 and coupled-cluster with double excitations (CCD) correlation energies are given by
\begin{equation}
E_\mathrm{c} = \frac{1}{4} \sum_{ijab} t_{ij}^{ab} \langle ij \vert \vert ab \rangle
\label{eq:ecorr}
\end{equation}
where $t_{ij}^{ab}$ are amplitudes of the double excitation operator
$T_2 = \frac{1}{4} \sum_{ijab} t_{ij}^{ab} a_a^{\dagger} a_b^{\dagger} a_j^{} a_i^{}$
and $\langle pq||rs\rangle$ are antisymmetrized two-electron repulsion integrals;
contributions from single excitations vanish because the UEG has no capacity for orbital
relaxation by symmetry.
At lowest order in perturbation theory,
\begin{equation}
t_{ij}^{ab}
= \frac{\langle ab \vert \vert ij \rangle}{\varepsilon_i + \varepsilon_j - \varepsilon_a - \varepsilon_b},
\label{eq:MP2}
\end{equation}
and Eq.~(\ref{eq:ecorr}) gives the MP2 correlation energy.
The high density of states at the Fermi surface and the long-ranged nature of the Coulomb potential
are together responsible for the divergence of MP2 in the TDL.
By contrast, the CCD amplitudes solve a system of nonlinear equations
\begin{equation}
0 = \langle \Phi_{ij}^{ab} \vert e^{-T_2} H e^{T_2} \vert \Phi \rangle,
\label{eq:CCD}
\end{equation}
where $H$ is the electronic Hamiltonian.
A standard approach for reaching the CBS limit is to
perform a series of calculations with increasing $M$ and use a $M^{-1}$ extrapolation.
In both the composite and downfolding approaches,
we partition the orbitals into a set of $M_{\mathrm{act}}$ active orbitals, composed of
all occupied orbitals and the low-energy virtual orbitals, and a set of
$\left(M-M_{\mathrm{act}}\right)$ frozen (inactive) orbitals, composed of the high-energy virtual orbitals.
In principle, occupied orbitals can also be partitioned,
but typically they do not significantly contribute
to the computational cost.
In the composite CCD/MP2 approach, the correlation energy is calculated according
to Eq.~(\ref{eq:comp}).
Importantly for metals, the low-energy active space double excitations are
treated by CCD and not by MP2, so we expect the method to be well-behaved in the
thermodynamic limit.
In the downfolding CCD/MP2 approach, the double excitation operator $T_2$ is
partitioned into internal excitations fully contained within the active space
and external excitations that involve at least one frozen orbital,
$T_2 = T_2^{\mathrm{(int)}} + T_2^{\mathrm{(ext)}}$.
Fixing the $T_2^{\mathrm{(ext)}}$ amplitudes to their MP2 values via Eq.~(\ref{eq:MP2}),
the downfolding method involves first solving Eqs.~(\ref{eq:CCD}) for
\textit{only} the internal amplitudes and then evaluating the correlation energy
expression Eq.~(\ref{eq:ecorr}) using \textit{both} the internal and external
amplitudes.
Compared to the $O(N^2 M^4)$ cost of full CCD,
the composite approach has $O(N^2 M_{\mathrm{act}}^4)+O(N^2 M^2)$ cost and
the downfolding approach has $O(N^2 M_{\mathrm{act}}^2 M^2)$ cost,
which can provide significant savings,
depending on the practical value of the ratio $M_{\mathrm{act}}/M$.
Let us now provide more insight into the ``downfolding'' perspective.
Note that,
because the internal and external excitation operators commute,
the defining energy and amplitude equations of the downfolding
approach can also be written
\begin{subequations}
\label{eq:downfolding}
\begin{align}
\begin{split}
E_\mathrm{c} &= \langle \Phi | e^{-T_2^{\mathrm{(int)}}} (\bar{H}-E_\mathrm{HF}) e^{T_2^{\mathrm{(int)}}} | \Phi \rangle \\
&= E_\mathrm{MP2}^\mathrm{(ext)}
+ \frac{1}{4}\sum_{ijab}^{\mathrm{active}} t_{ij}^{ab} \langle ij||ab\rangle
\end{split} \\
0 &= \langle \Phi_{ij}^{ab} \vert e^{-T_2^{\mathrm{(int)}}} \bar{H} e^{T_2^{\mathrm{(int)}}} \vert \Phi \rangle
\quad (i,j,a,b)\ \mathrm{active}
\label{eq:downfolding_amp}
\end{align}
\end{subequations}
where $\bar{H} = e^{-T_2^{\mathrm{(ext)}}} H e^{T_2^{\mathrm{(ext)}}}$
(with fixed $T_2^{\mathrm{(ext)}}$ as detailed above) and
$E_\mathrm{MP2}^\mathrm{(ext)} = \frac{1}{4} \sum_{ijab}^{\mathrm{(ext)}} t_{ij}^{ab} \langle ij||ab\rangle$
is the MP2 correlation energy due to external excitations.
These resemble ordinary CCD energy and amplitude equations
\textit{within the active space only},
except that the bare Hamiltonian $H$ is replaced by an
\textit{effective} Hamiltonian $\bar{H}$ that is similarity-transformed by the
external excitation amplitudes.
The effective Hamiltonian within the active space can be expressed as
\begin{equation}
\label{eq:heff}
\begin{split}
\bar{H} - E_\mathrm{HF} &= E_\mathrm{MP2}^\mathrm{(ext)}
+ \sum_{pq}^{\textrm{active}} F_{pq} \lbrace a_p^\dagger a_q \rbrace \\
&\hspace{1em} + \frac{1}{4} \sum_{pqrs}^{\textrm{active}} W_{pqrs}
\lbrace a_p^\dagger a_q^\dagger a_s a_r \rbrace + \dots,
\end{split}
\end{equation}
where $\lbrace\dots\rbrace$ indicates normal ordering of the operators.
This effective Hamiltonian can be seen to contain effective one- and two-body
interactions that are frequency independent~\cite{Shavitt2009},
in contrast to other downfolding approaches like the constrained random-phase
approximation~\cite{Aryasetiawan2004,Miyake2008}.
For example, the all-occupied two-body interaction becomes
\begin{equation}
W_{ijkl} = \langle ij||kl\rangle
+ \frac{1}{2} \sum_{ab}{\vphantom{\sum}}^\prime
\frac{\langle ij||ab\rangle \langle ab||kl\rangle}
{\varepsilon_k + \varepsilon_l - \varepsilon_a - \varepsilon_b},
\end{equation}
where the primed summation indicates that one or both of $a,b$ are inactive virtual orbitals.
The frequency independence can be understood because our observable is the total energy
rather than a spectral function.
To summarize, an approach that solves the internal CCD amplitude equations in
the presence of frozen external amplitudes is equivalent to a
CCD calculation in an active space of orbitals using an effective (downfolded)
Hamiltonian that is similarity-transformed by the external excitation operator.
It is straightforward to show that the composite approach,
normally understood
as a three-step procedure as shown in Eq.~(\ref{eq:comp}),
is equivalent to Eqs.~(\ref{eq:downfolding})
but where the effective Hamiltonian
$\bar{H}$ is replaced by the bare Hamiltonian $H$ in the amplitude
equations~(\ref{eq:downfolding_amp}).
From this perspective,
the performance differences between the downfolding and composite approaches
are attributable to the screening of the integrals in the effective
Hamiltonian when determining the internal amplitudes.
Nevertheless, we reiterate that the composite CCD/MP2 approach is expected to perform well because it
replaces the problematic MP2 treatment of low-energy, internal double excitations with a
well-behaved CCD treatment.
\begin{figure}
\centering
\includegraphics{figA_210308.eps}
\caption{Basis set convergence of the correlation energy of the $r_s=4$ UEG with $N=332$~electrons
for MP2 (squares), CCD (circles), composite CCD/MP2 (crosses), and downfolding CCD/MP2 (diamonds).
The top axis shows the percentage of virtual orbitals that are active for the composite and downfolding methods,
compared to the ``target'' calculation with $M=1502$.
Both the composite and downfolding methods interpolate between the ``target'' MP2 calculation (leftmost square)
and the ``target'' CCD calculation (leftmost circle).
}
\label{fig:A}
\end{figure}
\section*{Results and discussion}
We study the UEG as the simplest model of metals.
A brief review of the UEG model in finite cells with finite plane-wave basis sets is given in the Appendix
and we refer the reader to the literature for more
details~\cite{Shepherd2013,Shepherd2014,Shepherd2016}.
To illustrate the performance of the composite and downfolding methods,
we focus on the Wigner-Seitz radius $r_s = 4$
(corresponding to the approximate valence electron density of metallic sodium),
where CCD has been found to recover about 85\% of the correlation energy~\cite{Shepherd2016,Neufeld2017}.
We use a twisted boundary condition by performing calculations at the Baldereschi point~\cite{Baldereschi1973},
which has been shown to provide smoother convergence to the TDL~\cite{Drummond2008,Mihm2019}.
In Fig.~\ref{fig:A}, we show basis set convergence of the correlation energy
for a finite UEG with $N = 332$~electrons.
The uncorrected MP2 and CCD correlation energies exhibit their typical slow
convergence with increasing basis set size
and show asymptotic behavior where the basis set error decays as $M^{-1}$.
Extrapolation to the CBS limit yields $E_\mathrm{c}/N = -0.0401~E_\mathrm{h}$ for MP2
and $E_\mathrm{c}/N = -0.0262~E_\mathrm{h}$ for CCD.
At the largest finite basis shown, $M = 1502$,
the results exhibit a significant basis set error of about $0.01~E_\mathrm{h}$ for both methods,
highlighting the challenge of recovering dynamical correlation in metals with large basis sets.
Importantly, we emphasize that the MP2 correlation energy
does not diverge \textit{for any finite system} but only upon extrapolation to the TDL (see below).
Recall that the CCD/MP2 composite and downfolding approaches involve both a ``target''
number of orbitals $M$
and an active number of orbitals $M_{\mathrm{act}}$.
In Fig.~\ref{fig:A},
we show results obtained for $M = 1502$ as $M_{\mathrm{act}}$ is varied.
By construction,
both methods yield the target MP2 correlation energy when there are no active
virtual orbitals ($M_{\mathrm{act}} = N$)
and the target CCD correlation energy when all orbitals are active ($M_{\mathrm{act}}=M$).
We observe that both methods converge
smoothly to the target CCD result
and that the downfolding approach exhibits a faster convergence,
due to its coupling between the internal and external excitation spaces.
We also see similar behavior for other numbers of electrons and densities (not shown),
indicating that neither finite-size effects nor the specific metallic
density changes the overall picture.
\begin{figure}
\centering
\includegraphics{figB_210308.eps}
\caption{Absolute error in the correlation energy for the data in Figure~\ref{fig:A},
shown on a logarithmic scale,
relative to the ``target'' CCD result with $M = 1502$.
The top axis and symbols have the same meaning as Figure~\ref{fig:A}.
Dotted black lines are shown as a guide for various power law exponents $\alpha$ as discussed in the text.
}
\label{fig:B}
\end{figure}
To better quantify the rate of convergence,
in Fig.~\ref{fig:B} we plot the
absolute deviation of the correlation energy from the ``target'' CCD result obtained with $M = 1502$.
The error is plotted as a function of the difference between the inverse number of active
orbitals and the inverse number of total orbitals
and analyzed in terms of the
power law $|\Delta E_\mathrm{c}| \propto \left[M_{\mathrm{act}}^{-1}-M^{-1}\right]^\alpha$.
We compare the convergence of traditional CCD,
the composite approach,
and the downfolding approach.
For plain CCD, we see linear convergence of the correlation energy,
with $\alpha \approx 1$,
over a large range of basis set sizes.
The composite method exhibits an early,
rapid convergence reaching a maximum scaling of around $\alpha \approx 2$
before slowing to the same $\alpha \approx 1$ convergence
as $M_{\mathrm{act}}$ approaches $M$.
The rapid convergence for small $M_{\mathrm{act}}$ is responsible for
absolute errors that are about one order of magnitude better than those obtained by simple
truncation.
In fact,
the plain CCD result does not obtain m$E_\mathrm{h}$ accuracy until essentially
all orbitals are correlated,
whereas the composite result achieves this accuracy when only
50\% of the virtual orbitals are correlated in the expensive CCD calculation;
this results in
a speedup of a factor of 16 compared to the full CCD calculation.
Finally, the downfolding result exhibits rapid but non-monotonic convergence,
making it difficult to extract a power law.
Before slightly overshooting the ``target'',
the power law exponent reaches $\alpha \approx 3$ or better,
a significant improvement over the composite CCD/MP2 and standard CCD approaches.
This fast rate of convergence
provides m$E_\mathrm{h}$ accuracy when about one third of the virtual orbitals are correlated,
giving a speedup of a factor of 9.
\begin{figure}[t]
\centering
\includegraphics{figD_210310.eps}
\caption{Thermodynamic limit convergence of the correlation energy of the $r_s=4$ UEG for
systems with $N=90$--2392~electrons.
(a) MP2 results for basis set sizes indicated (squares) and in the extrapolated CBS limit (stars).
Thin diamonds show the CBS MP2 correction, $\delta^{(2)}\left(M/N \approx 4.0 \right)$,
indicated by the double-headed arrow at $N=210$.
(b) CCD (circles) and composite CCD/MP2 (crosses) results at the same (active) basis set sizes.
For composite CCD/MP2, we applied the CBS MP2 correction $\delta^{(2)}\left(M\right)$.
The grey line shows our TDL extrapolation using the largest five systems for $M/N \approx 4.0$.
}
\label{fig:D}
\end{figure}
The good performance of the composite approach indicates that MP2,
while an inapplicable theory for three-dimensional metals,
is safe to use for basis set corrections.
As discussed above, the reason for this applicability can be understood
by considering the MP2 correction that is applied
in Eq.~(\ref{eq:comp}).
This correction is a difference between two MP2 correlation energies,
\textit{both} of which correlate orbitals near the Fermi surface.
These two MP2 energies are separately divergent in the TDL,
but their difference is not;
moreover, this difference is precisely $E_\mathrm{MP2}^{(\mathrm{ext})}$
defined previously.
The reliable scaling of the MP2 basis set error at large $M$
suggests that the MP2 CBS limit can be obtained by extrapolation
for any given number of electrons.
In contrast,
the asymptotic scaling regime for the CCD correlation energy
cannot always be reached.
Thus,
for any calculation performed with a given $M$,
we propose to add the MP2 correlation energy difference
$\delta^{(2)}\left(M\right) = E_\mathrm{MP2}\left(\infty\right) - E_{\mathrm{MP2}}\left(M\right)$,
where $E_\mathrm{MP2}\left(\infty\right)$
is obtained by $M^{-1}$ extrapolation.
Having obtained an estimate of the CBS limit for a given number of electrons,
the finite-size extrapolation to the TDL can be done separately.
We expect this scheme to be not only more reliable than extrapolating CCD on its own
but also less costly since it involves more MP2 and fewer CCD calculations.
In Fig.~\ref{fig:D}(a),
we plot the MP2 correlation energy
as a function of the inverse number of electrons
for finite UEG systems containing $N = 90$--2392 electrons.
For each system size, we performed MP2 calculations at different basis set sizes (grey squares),
and the top four grey curves connect systems with a similar ratio of $M/N$.
We then performed $M^{-1}$ extrapolations at each particle number using data
from
$M/N \approx 3.0, 3.5, 4.0, 4.5$
to obtain the CBS limit at each system size (black stars).
On approach to the TDL,
the MP2 correlation energy diverges, as seen most easily in our largest calculations for the smaller
values of $M/N$.
Despite the divergence of its components,
the MP2 CBS correction $\delta^{(2)}$,
plotted explicitly in Fig.~\ref{fig:D}(a) for $M/N \approx 4$ (pink thin diamonds),
does \textit{not} diverge and is thus safe for use in metallic systems.
To confirm that the success of the composite CCD/MP2 method holds on approach to the TDL,
in Fig.~\ref{fig:D}(b) we plot results for CCD (green circles) and composite CCD/MP2 (orange crosses).
For the composite CCD/MP2 result, we applied the MP2 CBS correction $\delta^{(2)}\left(M\right)$,
although we note that a similar CBS correction could also be combined with the downfolding CCD/MP2 approach.
In contrast to MP2, CCD is well-defined in the TDL;
however, at each system size, convergence to the CBS limit is slow,
as shown by the green data sets.
In contrast, we observe that composite CCD/MP2 has much faster convergence to the TDL,
as shown by the orange data sets.
Performing a $N^{-1}$ extrapolation of the CBS-corrected $M/N \approx 4.0$ results
gives us a CBS and TDL extrapolated correlation energy of $E_\mathrm{c} = -0.0293~E_\mathrm{h}$,
in general agreement with past CCD results\cite{Shepherd2016}. For comparison,
the exact value~\cite{Vosko1980} is $E_\mathrm{c} = -0.0318~E_\mathrm{h}$, indicating that CCD
recovers over 90\% of the correlation energy.
The same finite-size extrapolation of the CBS-corrected $M/N \approx 3.0$ data gives a correlation energy
that differs by only $0.7~\mathrm{m}E_\mathrm{h}$,
indicating the excellent convergence of the
composite method.
\begin{figure}
\centering
\includegraphics{figE_210308.eps}
\caption{The same as in Fig.~\ref{fig:A}, except for $r_s=1$.
In addition to the methods shown in Fig.~\ref{fig:A},
we also include RPA (pentagons), composite CCD/RPA (thin crosses), and downfolding CCD/RPA (pluses).
}
\label{fig:E}
\end{figure}
Before concluding,
we recognize that a variety of other low-level theories can be combined with CCD,
in both the composite and downfolding manner.
Of particular interest is the RPA,
which is more appropriate for
metals than MP2 but also more expensive.
The so-called direct RPA is most promising computationally due
to its low cost when two-electron integrals are handled by density fitting.
Here we instead test the full particle-hole RPA,
where the $T_2$ amplitudes maintain proper anti-symmetry
so that the theory is free of self-interaction error.
The RPA amplitudes are the solution of the CCD equations where only
selected terms are retained~\cite{Scuseria2008,Shepherd2014}.
In Fig.~\ref{fig:E},
we show the same results as in Fig.~\ref{fig:A}, except for the electron density corresponding to $r_s=1$
(due to RPA convergence problems at larger values of $r_s$~\cite{Shepherd2014}).
We observe the same overall trends as we did at $r_s=4$ for the MP2 and CCD calculations with
finite basis sets.
However, the RPA results follow the CCD results much more closely,
which also makes composite and downfolding CCD/RPA significantly outperform
the corresponding MP2 methods.
Unsurprisingly, the improved performance of the downfolding approach compared to the composite approach
is even more marginal than for CCD/MP2.
\section*{Conclusions and outlook}
We have described and analyzed two approaches for eliminating basis set error in the CCD correlation energy
of metals, using the simple UEG model.
Our results indicate that these methods allow for aggressive freezing of virtual orbitals or approximation
of external amplitudes,
leading to significant reductions in computational cost.
Although the downfolding CCD/MP2 approach is slightly more accurate,
we find that the simpler composite CCD/MP2 approach is surprisingly effective
because divergent contributions near the Fermi surface do not
contribute to the basis set correction.
In this work, we have addressed post-Hartree-Fock basis set errors in the canonical orbital basis,
but the methods we presented could also be straightforwardly applied in a basis of localized orbitals.
For example, Refs.~\onlinecite{Schafer2021,Lau2021}
used CCSD/MP2 and CCSD/RPA composite approaches to mitigate basis set errors in quantum embedding
calculations.
Localized orbital basis sets mix orbitals near and far from the Fermi surface,
so it will be interesting to test how the composite and downfolding approaches perform
when using these localized orbitals for metals.
Future work will focus on applying these techniques to atomistic metals using
natural orbitals~\cite{Gruneis2011}, to the excited-state properties
of metals~\cite{McClain2016,Lewis2019}, and to higher-level theories
of correlation~\cite{Neufeld2017}.
For example, we imagine that
a composite CCSDT/CCSD or CCSDT/CCSD(T) approach would provide quantitative accuracy for metals while
precluding the failure~\cite{Shepherd2013} of the otherwise successful treatment of
perturbative triple excitations.
\begin{acknowledgments}
We thank Verena Neufeld and Sandeep Sharma for comments on
the manuscript.
This work was supported in part by the National Science Foundation Graduate
Research Fellowship under Grant No.~DGE-1644869 (M.F.L.), by the Department of Defense
through the National Defense Science \& Engineering Graduate (NDESG) Fellowship Program (J.M.C.), and
by the National Science Foundation under Grant No.~CHE-1848369 (T.C.B.).
We acknowledge computing resources from Columbia
University’s Shared Research Computing Facility project, which is supported by
NIH Research Facility Improvement Grant 1G20RR030893-01, and associated funds
from the New York State Empire State Development, Division of Science Technology
and Innovation (NYSTAR) Contract C090171, both awarded April 15, 2010.
The Flatiron Institute is a division of the Simons Foundation.
\end{acknowledgments}
\section*{Appendix: Uniform electron gas} \label{app:ueg}
Working in a single-particle basis of plane waves with momenta ${\bm{k}}=(2\pi/L)(n_x, n_y, n_z)$
and cell of volume $L^3$ with periodic boundary conditions,
the UEG Hamiltonian is given by
\begin{equation}
\begin{split}
H &= \sum_{{\bm{k}}\sigma} \frac{k^2}{2} a_{{\bm{k}}\sigma}^\dagger a_{{\bm{k}}\sigma} \\
&+ \frac{1}{2} \sum_{{\bm{k}}_1{\bm{k}}_2{\bm{k}}_3{\bm{k}}_4}^\prime \sum_{\sigma\sigma^\prime}
\langle {\bm{k}}_1\sigma,{\bm{k}}_2\sigma^\prime|{\bm{k}}_3\sigma,{\bm{k}}_4\sigma^\prime\rangle
a^\dagger_{{\bm{k}}_1\sigma} a^\dagger_{{\bm{k}}_2\sigma^\prime} a_{{\bm{k}}_4\sigma^\prime} a_{{\bm{k}}_3\sigma}
\end{split}
\end{equation}
where the primed summation requires ${\bm{k}}_1 +{\bm{k}}_2 = {\bm{k}}_3 + {\bm{k}}_4$.
The two-electron repulsion
integrals are given by
\begin{equation}
\langle {\bm{k}}_1\sigma,{\bm{k}}_2\sigma^\prime|{\bm{k}}_3\sigma,{\bm{k}}_4\sigma^\prime\rangle
= v({\bm{k}}_1-{\bm{k}}_3) \delta_{{\bm{k}}_1+{\bm{k}}_2, {\bm{k}}_3+{\bm{k}}_4}
\end{equation}
where the Ewald potential is
\begin{equation}
\begin{aligned}
v({\bm{k}}) &=
\begin{cases}
\dfrac{4 \pi}{L^3 k^2} & k \neq 0
\\ \\
v_\mathrm{M} & k = 0,
\end{cases}
\end{aligned}
\label{eq:madelung}
\end{equation}
and $v_\mathrm{M} = 2.837297479/L$ is the Madelung constant of the cell~\cite{Sholl1967}.
The $N$-electron reference determinant has
the lowest-energy $N/2$ plane wave orbitals doubly occupied
and the HF orbital energies are given by
$\varepsilon({\bm{k}}) = k^2/2 - v_\mathrm{M}\theta(k_\mathrm{F}-k)$,
where $k_\mathrm{F}$ is the Fermi momentum.
We restrict our calculations to closed-shell configurations,
which allows only certain ``magic numbers'' of electrons and orbitals.
At the Baldereschi point,
the first few magic numbers are $2,8,14,22,34,40,52$.
\section*{Data availability statement}
The data that support the findings of this study are available
from the corresponding author upon reasonable request.
|
\section{\label{sec:Introduction}Introduction}
Recent advances in machine learning (ML), particularly deep learning (DL), have been successfully applied to computer vision \cite{simonyan2014very, Szegedy2014GoingConvolutions, Voulodimos2018DeepReview}, natural language processing \cite{Sutskever2014SequenceNetworks}, and even toward playing the game of \textit{Go} \cite{Silver2016MasteringSearch}. Notably, DL has been able to perform certain tasks with superhuman performance.
Concurrently, quantum computing machines have been introduced to the market by several tech companies. These machines are noisy and do not run in a fault-tolerant manner. Hence, they are referred to as \textit{noisy intermediate-scale quantum} (NISQ) devices \cite{Preskill_2018}. However, it has been shown that even these near-term machines can perform several calculations better than their classical counterparts \cite{arute2019quantum}. Various quantum algorithms have been developed to harness the power of these near-term quantum devices, including the \emph{variational algorithm}, which has been successful in calculating chemical ground states \cite{peruzzo2014variational}, optimization problems \cite{cerezo2020variational, bharti2021noisy} and certain ML tasks \cite{mitarai2018quantum, schuld2018circuit, Farhi2018ClassificationProcessors, benedetti2019parameterized, mari2019transfer, abohashima2020classification, easom2020towards, sarma2019quantum, chen2020hybrid, stein2020hybrid,chen2020quantum,kyriienko2020solving,dallaire2018quantum, stein2020qugan, zoufal2019quantum, situ2018quantum,nakaji2020quantum,lloyd2020quantum, nghiem2020unified,chen19, lockwood2020reinforcement, jerbi2019quantum,bausch2020recurrent,yang2020decentralizing}.
With advances in quantum computing capabilities, a growing number of ML tasks are expected to be implemented on quantum computers. Current successful ML models rely on massive datasets, and quantum machine learning (QML) is no exception.
Most data used for building state-of-the-art ML models are collected from users. However, sensitive data, for example, personal video and voice recordings, medical records, and financial data, should never be accessible by unauthorized third-party users. Even if malicious adversaries cannot directly access the training data, they still may deduce a given data entry by attacking the trained model. One of the simplest privacy attacks is \emph{membership inference}, where the adversary attempts to predict if a given example was in the training set. In \cite{choquettechoo2021labelonly}, the authors demonstrate that membership inference attacks are robust against defense measures, such as confidence masking. Only differentially private training and high-level $\ell_{2}$ regularization can properly screen for (or safeguard against) such attacks.
Revealing private information is a significant problem for language models, such as GPT-2, as many are trained with either private text or sensitive public text \cite{carlini2019secret}. In \cite{carlini2020extracting}, it showed that training data can be extracted by carefully analyzing and sampling outputs, even for models exponentially smaller than the training set. This kind of \emph{data extraction attack} is not the only type that can result from ``black box'' access. \emph{A model-inversion attack} successfully recovered images from a facial recognition algorithm in \cite{fredriksonModelInversion} with only access to a person's name and the confidence levels outputted from the ``black box'' model. Furthermore, in many applications, a hostile adversary also may have access to the model parameters. In mobile applications, the model usually is stored on the device to reduce communication with a central server \cite{deepLearningDP}. \emph{Differential privacy} (DP) is an optimization framework to address these issues.
DP involves a trade-off of accuracy and power to protect the identity of data. Differentially private QML will allow private and efficient processing of big data. We hypothesize that the benefits of QML will offset the decrease in accuracy arising from DP.
This research aims to create a hybrid quantum-classical model based on a variational quantum circuit (VQC) and train it using a differentially private classical optimizer.
The classification of two-dimensional (2D) data to two classes is used to test the efficiency of the DP-VQC. As controls in the experiment, we will compare its accuracy to classical neural networks (with and without DP) and a non-private quantum circuit. Two classification tasks are used as benchmarks to compare the efficiencies of private and non-private VQCs to their classical analogs.
The novel work detailed in Section~\ref{sec:DifferentialPrivacyQuantum} represents the main contribution of this research, exploring how we develop a novel framework that ensures privacy-preserving QML and employ it in two benchmark examples (as follows):
\begin{itemize}
\item Demonstrate differentially private training on VQC-based ML models.
\item Demonstrate that a ($\varepsilon$,$10^{-5}$)-DP VQC trains to accuracies exceeding 90\% for an MNIST task with $\varepsilon$ between 0.5 and 1.0.
\end{itemize}
Section~\ref{sec:Background} introduces the concept of differentially private ML and the required QML background. Section~\ref{sec:DifferentialPrivacyQuantum} illustrates the proposed differentially private QML. Section~\ref{sec:ExpAndResults} describes the experimental settings and performance of the proposed differentially private quantum learning and is followed by additional discussions in Section~\ref{sec:Discussion}. Section~\ref{sec:Conclusion} is the conclusion.
\section{\label{sec:Background}Background}
\subsection{\label{sec:MachineLearning}Supervised Learning}
\emph{Supervised learning} is an ML paradigm that learns or trains a function that maps the input to output given the input-output pairs~\cite{russell2002artificial}. That is, given the training dataset $\{(\bm{x_i},\bm{y_i})\}$, it is expected that after successful training, the learned function $f_{\theta}$ is able to output the correct or approximate value $\bm{y_j}$ provided the testing case $\bm{x_j}$.
To make the training possible, we must specify the \emph{loss function} or \emph{cost function} $L(\hat{\bm{y}}, \bm{y})$, which defines how close the output of the ML model $\hat{\bm{y}} = f_{\theta}(\bm{x})$ is to the ground truth $\bm{y}$.
The \emph{learning} or \emph{training} of an ML model generally aims to minimize the loss function.
In classification tasks, the model is trained to output discrete labels or the targets $\bm{y}$ given the input data $\bm{x}$.
For example, in computer vision applications, it is common to train ML models to classify images. The most famous example is the MNIST dataset~\cite{lecun1998mnist}. In MNIST, there are around $5000$ images of handwritten digits of the numbers $0$-$9$. In this case, the ML model is trained to output the probability distribution $P(y_i \vert \bm{x})$. Here, $P(y_i \vert \bm{x})$ represents the probability of label $y_i$ of each number $i \in \{0 \cdots 9 \}$ given the input data, which is a image in this scenario.
In classification, the \emph{cross-entropy loss} is the common choice for the loss function. It can be written in the following formulation:
\begin{equation}
L(\hat{\bm{y}}, \bm{y}) = -\sum_{c=1}^{M} y_{o, c} \log \left(\hat{y}_{o, c}\right),
\end{equation}
where
\begin{itemize}
\item $M$ = the number of classes.
\item $log$ = the natural log.
\item $y_{o, c}$ = the binary indicator ($0$ or $1$) if class label $c$ is the correct classification for observation $o$.
\item $\hat{y}_{o, c}$ = the predicted probability observation $o$ is of class $c$.
\end{itemize}
The loss function then is used to optimize the model parameters $\theta$. In the current DL practice, the model parameters are updated via various gradient descent methods \cite{ruder2016overview}. The ``vanilla'' form of gradient descent is:
\begin{equation}
\theta \leftarrow \theta - \eta \nabla_{\theta} L(f_{\theta}(\bm{x}),\bm{y}),
\end{equation}
where $\theta$ is the model parameter, $L$ is the loss function, and $\eta$ is the learning rate or the step-size of each updating step.
Mini-batch stochastic gradient descent (SGD) simplifies ML by approximating the loss gradient when the dataset is large or when it is impractical to calculate the loss for the whole dataset at once. Suppose the training data include $N$ points, then define a randomly sampled subset of points $B$. This is the mini-batch. Equation \ref{eq:BatchGrad} approximates the gradient from the whole training set $\frac{1}{N} \sum_i \nabla_{\theta} L(f_{\theta}(\bm{x}_i),\bm{y}_i)$ with a loss gradient calculated for a subset of the training set, the mini-batch.
\begin{equation} \label{eq:BatchGrad}
\mathbf{g}_B = \sum_{i \in B} \frac{1}{|B|} \nabla_{\theta} L(f_{\theta}(\bm{x}_i),\bm{y}_i),
\end{equation}
where $B$ is the mini-batch set randomly sampled from the complete set of inputs and associated ground truth labels. This batch gradient is used in the step update rule instead of the total loss gradient $\theta \leftarrow \theta - \eta\mathbf{g}_B$. The batch gradient is recalculated $N/|B|$ times per epoch, and the model parameters are updated for each gradient batch.
However, this vanilla form does not always work. For example, it may be easily stuck in local optima \cite{ruder2016overview}, or it can make the model difficult to train or converge. There are several gradient-descent variants that are successfully applied in DL \cite{ruder2016overview, Tieleman2012, kingma2014adam}. Based on previous works \cite{chen2020quantum, chen19}, we use the RMSProp optimizer to optimize our hybrid quantum-classical model.
RMSProp \cite{Tieleman2012} is a special kind of gradient-descent method with an adaptive learning rate that updates the parameters $\theta$ as:
\begin{subequations}
\begin{align}
E\left[g^{2}\right]_{t} &= \alpha E\left[g^{2}\right]_{t-1}+ (1 - \alpha) g_{t}^{2}, \\
\theta_{t+1} &= \theta_{t}-\frac{\eta}{\sqrt{E\left[g^{2}\right]_{t}}+\epsilon} g_{t},
\end{align}
\end{subequations}
where $g_t$ is the gradient at step $t$ and $E\left[g^{2}\right]_{t}$ is the weighted moving average of the squared gradient with $E[g^2]_{t=0} = g_0^2$. In this paper, the hyperparameters are set for all experiments as follows: learning rate $\eta =0.05$, smoothing constant $\alpha = 0.9$, and $\epsilon = 10^{-8}$.
\subsection{\label{sec:QuantumComputingBasics}Quantum Computing Basics}
Because of the power of superposition and entanglement generated by quantum gates, quantum computing can create a huge speedup in certain difficult computational tasks and afford quantum advantages to ML \cite{nielsen2002quantum,Schuld_2019}.
A \emph{qubit} is the basic unit of quantum information processing that can consist of any two state system, i.e., the spin of an electron or polarization of a photon. Such a state will be written as $\ket{\psi}=\alpha\ket{1}+\beta\ket{0}$, where the probability of measuring $\ket{1}$ and $\ket{0}$ is $|\alpha|^2$ and $|\beta|^2$, respectively.
Because all classical operations can be considered a set of reversible logical operations, analogous quantum operations can be formalized. These operators are unitary and can be thought of as successive rotations, such that the logic operators are equivalent to quantum rotations.
The basic components of quantum rotations are the Pauli matrix,
\begin{equation}
\mathbb{I} =
\begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix},
\sigma_x =
\begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix},
\sigma_y =
\begin{bmatrix}
0 & -i \\
i & 0
\end{bmatrix},
\sigma_z =
\begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}.
\end{equation}
With the Pauli matrix, we can define the single-qubit rotation along each of the $X$, $Y$, and $Y$-axis as follows:
\begin{equation}
\begin{split}
R_x(\phi) &= e^{-i\phi\sigma_x/2} = \begin{bmatrix}
\cos(\phi/2) & -i\sin(\phi/2) \\
-i\sin(\phi/2) & \cos(\phi/2)
\end{bmatrix} \\
R_y(\phi) &= e^{-i\phi\sigma_y/2} = \begin{bmatrix}
\cos(\phi/2) & -\sin(\phi/2) \\
\sin(\phi/2) & \cos(\phi/2)
\end{bmatrix} \\
R_z(\phi) &= e^{-i\phi\sigma_z/2} = \begin{bmatrix}
e^{-i\phi/2} & 0 \\
0 & e^{i\phi/2}
\end{bmatrix}.
\end{split}
\end{equation}
The general single-qubit rotation can be constructed with two of the single-qubit rotations $R_{x}$, $R_{y}$, and $R_{z}$.
\begin{equation}
\label{eqn:generalRotOperation}
R(\phi,\theta,\omega) = R_{z}(\omega)R_{y}(\theta)R_{z}(\phi)= \begin{bmatrix}
e^{-i(\phi+\omega)/2}\cos(\theta/2) & -e^{i(\phi-\omega)/2}\sin(\theta/2) \\
e^{-i(\phi-\omega)/2}\sin(\theta/2) & e^{i(\phi+\omega)/2}\cos(\theta/2)
\end{bmatrix}.
\end{equation}
For example, the quantum NOT gate also is known as the ``Pauli-$X$ gate,'' which corresponds to a $\pi$ rotation about the $X$-axis \cite{Steane_1998}.
\begin{subequations}
\begin{equation}
U_{NOT}\ket{1} = \ket{0}; U_{NOT}\ket{0} = \ket{1}
\end{equation}
\begin{equation}
U_{NOT}= e^{-i\pi\sigma_x} =
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}.
\end{equation}
\end{subequations}
The true power of quantum computing stems from quantum entanglement, which can be achieved by using two-qubit quantum gates. The controlled-NOT (CNOT) gate, shown in Eq. \ref{eqn:CNOTgate}, is a gate commonly used to entangle qubits. It reverses the state of second qubit if the first qubit (\emph{control qubit}) is in the $\ket{1}$ state.
\begin{equation}
\label{eqn:CNOTgate}
U_{CNOT} = \begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 0 & 1 \\
0 & 0 & 1 & 0
\end{bmatrix}.
\end{equation}
Its operation on the quantum state can be described in the following circuit diagram: \\
\[
\Qcircuit @C=1em @R=1em {
\lstick{\ket{\Psi}} & \ctrl{1} & \qw \\
\lstick{\ket{0}} & \targ & \qw
}
\]
where $\ket{\Psi}$ is a single-qubit state.
Concretely, if the $\ket{\Psi}$ is in the state $\alpha \ket{0}+\beta \ket{1}$, which means the system is in $\ket{\Psi} \otimes \ket{0}$, then under the CNOT operation, the state will
\begin{equation}
\label{eqn:CNOTentanglement}
\begin{split}
U_{CNOT} \ket{\Psi}\otimes \ket{0}
&= U_{CNOT}\left[\left( \alpha \ket{0} + \beta \ket{1}\right) \otimes \ket{0}\right] \\
&= U_{CNOT} \left[ \alpha \ket{0} \otimes \ket{0} + \beta \ket{1} \otimes \ket{0}\right] \\
&= \alpha U_{CNOT} \ket{0} \otimes \ket{0} + \beta U_{CNOT} \ket{1} \otimes \ket{0} \\
&= \alpha \ket{0} \otimes \ket{0} + \beta \ket{1} \otimes \ket{1}
\end{split}.
\end{equation}
The set of CNOT and single-qubit rotation operators allows for a rich group of quantum algorithms that already have been shown to be faster than their classical counterparts, for example, in factorization problems \cite{Shor_1997} and database searching \cite{grover_1996}.
The quantum algorithm output is the observation of the final quantum state. On a real quantum computing device, the expectation values can be retrieved through repeated measurements (\emph{shots}). In simulation, the expectation values $\bra{0} U_0^{\dagger}U_1^{\dagger} \cdots U_n^{\dagger}U_n \cdots U_0U_1 \ket{0}$ can be calculated analytically.
For a more detailed review of quantum computing, measurements, and algorithms, refer to \cite{Steane_1998, hey_1999, Ladd_2010}.
\subsection{\label{sec:VQCs}Variational Quantum Circuits}
In recent years, quantum computing has become feasible due to many breakthroughs in condensed matter physics and engineering. Companies, such as IBM \cite{cross2018ibm}, Google \cite{arute2019quantum}, and D-wave \cite{grzesiak2020efficient}, are creating NISQ devices \cite{Preskill_2018}. However, noise limits the reliability and scalability in which quantum circuits can be used. For example, quantum algorithms requiring large numbers of qubits or circuit depth cannot be faithfully implemented on these NISQ devices. Because current cloud-based quantum devices are not suitable for the training described in this research, quantum circuit simulators are used \cite{schuld2019evaluating}.
VQCs are a special kind of quantum circuit, equipped with \emph{tunable} or \emph{learnable} parameters that are subject to iterative optimization \cite{mitarai2018quantum, schuld2018circuit}. \figureautorefname{\ref{Fig:Basic_VQC}} presents the basic components of a VQC.
VQCs potentially can be robust against device noise as they can absorb the noise effects into their parameters in the optimization process \cite{cerezo2020variational, bharti2021noisy}. Numerous efforts have been made to design quantum algorithms based on VQCs \cite{cerezo2020variational, bharti2021noisy}, including the calculation of chemical ground states \cite{peruzzo2014variational} and optimization problems \cite{farhi2014quantum}.
Several theoretical studies have shown that VQCs are more capable than conventional deep neural networks~\cite{sim2019expressibility,lanting2014entanglement,du2018expressive, abbas2020power} in terms of the number of parameters or convergence speed. Recent results have numerically demonstrated that certain quantum architectures can perform better than their classical counterparts under specific conditions. For example, quantum convolutional neural networks (QCNNs) can learn faster (with fewer training epochs) than classical CNNs and reach higher accuracies, even when the number of parameters are similar \cite{chen2020qcnn, chen2021qgcnn}. In \cite{chen2020quantum}, a demonstration shows that a quantum long short-term memory (LSTM) can learn much faster (i.e., reach comparable accuracies with fewer training epochs) than a classical LSTM in function approximation tasks when the number of parameters are similar.
VQCs have been applied in several classic ML tasks, such as classification \cite{mitarai2018quantum, schuld2018circuit, Farhi2018ClassificationProcessors, benedetti2019parameterized, mari2019transfer, abohashima2020classification, easom2020towards, sarma2019quantum, liu2019hybrid, stein2020hybrid,chen2020hybrid, chen2020qcnn, chen2021qgcnn}, function approximation \cite{chen2020quantum, mitarai2018quantum}, solving differential equations \cite{kyriienko2020solving}, sequential learning \cite{chen2020quantum, bausch2020recurrent, takaki2020learning}, and generative modeling \cite{dallaire2018quantum, stein2020qugan, zoufal2019quantum, situ2018quantum}. Recent results have demonstrated the successful application of VQCs in the forefront of ML, for example, in metric learning \cite{lloyd2020quantum, nghiem2020unified}, deep reinforcement learning \cite{chen19, lockwood2020reinforcement, jerbi2019quantum, wu2020quantum}, and speech recognition \cite{yang2020decentralizing}.
\begin{figure}[htbp]
\begin{center}
\begin{minipage}{10cm}
\Qcircuit @C=1em @R=1em {
\lstick{\ket{0}} & \gate{R_y(\arctan(x_1))} & \gate{R_z(\arctan(x_1^2))} & \ctrl{1} & \qw & \targ & \gate{R(\alpha_1, \beta_1, \gamma_1)} & \meter \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x_2))} & \gate{R_z(\arctan(x_2^2))} & \targ & \ctrl{1} & \qw & \gate{R(\alpha_2, \beta_2, \gamma_2)} & \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x_3))} & \gate{R_z(\arctan(x_3^2))} & \qw & \targ & \ctrl{-2} & \gate{R(\alpha_3, \beta_3, \gamma_3)} & \qw
\gategroup{1}{4}{3}{7}{.7em}{--}\qw
}
\end{minipage}
\end{center}
\caption[Variational quantum circuit component.]{{\bfseries Variational quantum circuit component.}
The single-qubit gates $R_y(\arctan(x_i))$ and $R_z(\arctan(x_i^2))$ represent rotations along the $y$- and $z$-axis by the given angle $\arctan(x_i)$ and $\arctan(x_i^2)$, respectively. Arctan is used because the input values are not in the interval of $[-1, 1]$. The CNOT gates are used to entangle quantum states from each qubit and $R(\alpha,\beta,\gamma)$ represents the general single qubit unitary gate with three parameters.
The parameters labeled $R_y(\arctan(x_i))$ and $R_y(\arctan(x_i^2))$ are for state preparation and are not subject to iterative optimization. Parameters labeled $\alpha_i$, $\beta_i$ and $\gamma_i$ are optimized iteratively. The dashed box denotes one layer of a quantum subcircuit. The dial to the far right represents that the circuit has one output that is the $\sigma_z$ measurement of the first qubit.}
\label{Fig:Basic_VQC}
\end{figure}
\subsection{\label{sec:DifferentialPrivacy}Differential Privacy}
\begin{figure}[htbp]
\includegraphics[width=0.5\linewidth]{diagrams/private_and_general_info.pdf}
\caption{{\bfseries Information in data under the view of differential privacy.} In a DP context, general information is that of the entire population in the data. On the other hand, private information is specific to a particular data entry.}
\label{fig:private_vs_general_info}
\end{figure}
\begin{figure}[htbp]
\includegraphics[width=0.8\linewidth]{diagrams/dp_concept.pdf}
\caption{{\bfseries Differential Privacy.} }
\label{fig:dp_concept}
\end{figure}
Many technology companies collect data about the online presence of their users, and these data are shared, sometimes publicly, to use in focused marketing. This can create a breach in privacy because anonymizing data requires more than just erasing the name from each data entry \cite{foundationDP}. Privacy also can be breached by ML models that use crowd-sourced information and data scraped from the Internet. Previous studies have shown that models memorize their training samples, and even models with millions of parameters can be attacked to output memorized data \cite{carlini2020extracting}.
Section~\ref{sec:Introduction} detailed the necessity of protecting information through privacy-preserving training algorithms. In other words, anonymizing data requires more than just censoring personally identifiable information (PII) from each data entry \cite{foundationDP}. The solution requires using DP to curtail privacy leaks.
DP is a powerful framework to restrict the information that adversaries can obtain from attacking a trained ML model, but it is not an all-powerful technique.
There are two kinds of information under the perspective of DP: \emph{general information} and \emph{private information}. General information refers to the information that does not specify any particular data entry and can be seen as the general property of the underlying population. On the other hand, private information refers to the information that is specific to any individual data entry (\figureautorefname{\ref{fig:private_vs_general_info}}).
For a concrete example \cite{foundationDP}, consider a study about smokers. An adversary may still learn information from the trained model, e.g., a differentially private query could show that smoking correlates to lung cancer, yet it is impossible to deduce whether or not a specific person is involved in the study.
This is known as \emph{general information}. It remains possible to deduce that an individual smoker is likely to have lung cancer, but this deduction is not due to her/his presence in the study. DP does protect an individual's \emph{private information}.
The power of DP is that deductions about an individual cannot be influenced by the fact that the person did or did not participate in the study \cite{foundationDP}.
DP seeks to create a randomized machine, characterized by the hyperparamemers $\varepsilon$ and $\delta$, which gives roughly the same output for two similar datasets. In the context of ML, the output here is the \emph{trained model}. This means an adversary cannot deduce the dataset from the output even with auxiliary information or infinite computing resources. \figureautorefname{\ref{fig:dp_concept}} illustrates the concept of DP by comparing the output between two datasets, where one $X$ opts out of the dataset. Changing the input means the output could be very different, but DP ensures that the outputs only differ by, at most, $\varepsilon$. In other words, DP combats extraction attacks by having the output be just as likely produced from a model with or without a given training point \cite{DPReview}.
In DP, we are interested in mechanisms $\mathcal{M}$, which are randomized algorithms. Suppose $\mathcal{M}$ has a domain $A$ and a discrete range $B$. A randomized algorithm maps its domain $A$ to the probability space of $B$. Given an input $a \in A$, the algorithm $\mathcal{M}$ outputs $M(a) = b$ with probability $(M(a))_b$ for each $b \in B$. In general, a point in the domain may be a database (i.e., collection of records). A collection of records can be represented by a histogram, so the domain is the set of all possible histograms $\mathbb{N^{|\mathcal{X}|}}$. A $x \in \mathbb{N^{|\mathcal{X}|}}$ has $|\mathcal{X}|$ elements, where $x_i$ is the number of elements of type $i \in \mathcal{X}$. Additionally, there is a $\ell_{1}$-norm defined, such that $\|x-y\|_1 \leq 1$ represents the fact that $x$ and $y$ are neighboring databases, i.e., they differ by up to one record \cite{foundationDP}.
Rigorously, the definition of DP is \cite{foundationDP} a randomized algorithm $\mathcal{M}$ with a domain $\mathbb{N}^{|\mathcal{X}|}$ is $(\varepsilon, \delta)$-differentially private for all $S \subseteq \mathrm{range}(\mathcal{M})$ and for all $x, y \in \mathbb{N}^{|\mathcal{X}|}$, such that $\|x-y\|_1 \leq 1$:
\begin{equation}
Pr[\mathcal{M}(x) \in S] \leq \mathrm{exp}(\varepsilon) Pr[\mathcal{M}(y) \in S] + \delta,
\end{equation}
where
\begin{itemize}
\item $\mathcal{M}$ = the randomized algorithm.
\item $\mathbb{N^{|\mathcal{X}|}}$ = the set of records and the union of the input and label sets in ML context.
\item $S$ = output randomized algorithm; some subset of all possible model configurations or parameters in ML context.
\item $x$ = set of records used for model training.
\item $y$ = another set of records for model training, neighboring $x$.
\item $\varepsilon$ = privacy loss for the randomized algorithm.
\item $\delta$ = cutoff on DP, the percentage chance that the model does not preserve privacy.
\end{itemize}
$(\varepsilon, \delta)$-DP is a relaxation of $\varepsilon$-DP because there is a chance $\delta$ that the privacy is broken. DP gives the worse-case scenario privacy loss, so a smaller epsilon does not necessarily mean the privacy is better. However, the additional noise typically means that accuracy is worse.
An important characteristic in determining the effectiveness of a differentially private algorithm is the \emph{privacy loss}. Privacy loss is defined for a given observation $\xi \in \mathrm{range}(\mathcal{M})$, which quantifies the likeness of observing $\xi$ from $\mathcal{M}(x)$ versus $\mathcal{M}(y)$ \cite{DPReview}.
\begin{equation}
\mathcal{L}^{(\xi)}_{\mathcal{M}(x) || \mathcal{M}(y)} = \ln\left(\frac{Pr[\mathcal{M}(x)=\xi]}{Pr[\mathcal{M}(y)=\xi]}\right).
\end{equation}
Combining these two equations shows that a ($\varepsilon, \delta)$-differentially private algorithm has a privacy budget of $\varepsilon$.
\subsection{\label{sec:DifferentialPrivacyMachineLearning}Differential Privacy in Machine Learning}
For ML, we can interpret the randomized algorithm $\mathcal{M}: A \to B$ as a training algorithm with a training set $x \in A$, which produces a model $b \in B$ \cite{deepLearningDP, disparateImpact}. The definition of DP implies that two training sets, which only differ by the omission of a record, should be equally likely to output a given model, i.e., the set of parameters completely describing the model.
The most basic technique to ensure DP is the \emph{Gaussian Mechanism} as defined in \cite{deepLearningDP, foundationDP, mcmahanGeneralApproachDPTraining}. Every deterministic function $f(d)$ has a defined sensitivity $S_f = \mathrm{max}(|f(d)-f(d')|)$ given that $d, d'$ are adjacent databases. Then, the Gaussian algorithm is $(\varepsilon, \delta)$-differentially private for some noise multiplier $\sigma$, such that:
\begin{equation} \label{eq:GaussMech}
\begin{aligned}
\mathcal{M}(d) = f(d) + \mathcal{N}(0, S_f^2 \sigma^2 \mathbb{I}), \\
\delta \geq \frac{4}{5}e^{-{(\sigma \varepsilon)}^2/2.}
\end{aligned}
\end{equation}
There is an infinite number of pairs $(\varepsilon, \delta)$, which can be defined for a given noise multiplier $\sigma$, although usually, as in \cite{disparateImpact}, $\delta$ will be defined as a constant.
Likewise, for ML, the most important techniques for creating DP are to add Gaussian noise, as well as to clip the loss gradients \cite{deepLearningDP}. The gradient clip reduces the effect any single data entry can have on the model training, making membership inference difficult. The hyperparameters associated with these operations are the noise multiplier, $\sigma$, and a cutoff for the $\ell_{2}$ norm, $S$ \cite{disparateImpact, deepLearningDP}. After calculating the gradients, if the batch gradient has an $\ell_{2}$ norm greater than the cutoff, it is scaled down to have a norm equal to the cutoff. After clipping the gradient, the gradient for the mini-batch has Gaussian noise added with a standard deviation equal to the $\ell_{2}$ norm cutoff multiplied by the noise factor, $\sigma$.
\begin{equation}
\mathbf{g}_B \leftarrow \left[ \mathbf{g}_B*\mathrm{min}\left(1, \frac{S}{||\mathbf{g}_B||}\right) + \mathcal{N}(0,\sigma^2 S^2 \mathbb{I} ) \right].
\end{equation}
As in Equation \ref{eq:GaussMech}, a relationship between $\varepsilon, \delta, \sigma, and S$ exists, but its calculation is beyond the scope of this review. More information about the privacy loss calculator can be found in \ref{app:PyvacyLossCalc}. This modification to the optimizer algorithm can be applied to any ML algorithm (SGD, Adam, RMSprop, etc.). The DP-SGD algorithm is based on the techniques from \cite{mcmahanGeneralApproachDPTraining, deepLearningDP}. Details specific to the software package used in this study to implement DP, \texttt{PyVacy}, are available in \ref{app:PyvacyML}.
\begin{figure}[t]
\includegraphics[width=0.5\linewidth]{images/nn.pdf}
\caption{Architecture for the classical neural network used as a control. The left layer is the 2D input, while the right layer is the output. The output is a vector of the probability of being in each class given the input.}
\label{fig:nn_arch}
\end{figure}
\section{\label{sec:DifferentialPrivacyQuantum}Differential Privacy in Quantum Classification}
In this work, we propose a hybrid quantum-classical framework interfacing the differentially private classical optimization algorithms with VQC-based QML algorithms. In a hybrid quantum-classical model architecture, the quantum circuits are used to generate the output, mostly in the form of quantum measurement. The measured expectation values then can be used to evaluate the \emph{loss function} on a classical computer, which then will be used to evaluate the model's performance and adjust the circuit parameters. The updated circuit parameters are then fed back to the quantum computer. This iterative process gradually \emph{trains} the quantum circuit to achieve the desired results. The DP training in such a hybrid quantum architecture exists in the gradient calculation process, which is on the classical computer. \figureautorefname{\ref{fig:dp_qml_concept}} presents the proposed scheme.
\begin{figure}[htbp]
\includegraphics[width=0.8\linewidth]{diagrams/hybrid_dp_scheme.pdf}
\caption{{\bfseries Differential Privacy in Quantum Machine Learning.} In the proposed framework, the outputs from the quantum circuit are processed on a classical computer. The gradients of the quantum function $\nabla_{\theta}f(x;\theta)$ and the differentially private gradients $\nabla_{\theta}^{DP}f(x;\theta)$ are calculated. The quantum circuit parameters are updated according to the differentially private gradients and fed back to the quantum computer.}
\label{fig:dp_qml_concept}
\end{figure}
\subsection{Quantum Encoding}
A quantum circuit operates on the quantum state. To make QML useful, the first step is to encode the classical data into a quantum state.
\subsubsection{\label{sec:AmplitudeEncoding}Amplitude Encoding}
\emph{Amplitude encoding} is a technique to encode the classical vector $(\alpha_{0} \cdots \alpha_{2^n-1})$ into an $n$-qubit quantum state $\ket{\Psi} = \alpha_{0}\ket{00\cdots 0} + \cdots + \alpha_{2^n-1}\ket{11\cdots 1}$. The advantage of using this encoding method is that it is possible to significantly reduce the number of qubits and potentially the number of parameters of the quantum circuit. An $N$-dimensional input vector would require only $\log_{2}N$ qubits to encode. Refer to \cite{Schuld2018InformationEncoding, mottonen2005transformation} for details regarding this encoding procedure.
\subsubsection{\label{sec:VariationalEncoding}Variational Encoding}
In \emph{variational encoding}, the input values are used as the quantum rotation angles. A single-qubit gate with rotation along the $j$-axis by angle $\alpha$ is given by:
\begin{equation}
\label{eq:SingleQubitRotation}
R_j(\alpha)=e^{-i\alpha\sigma_j/2}=\cos\frac{\alpha}{2} I-i\sin\frac{\alpha}{2}\sigma_j,
\end{equation}
where $I$ is the identity matrix and $\sigma_{j}$ is the Pauli matrix with $j = x, y, z$. In this work, given a vector input $x_N$ with $N$ dimensions, we rotate each qubit by $R_i(x), i \in [0,N)$:
\begin{equation}
\label{eq:StudyQubitRotation}
\begin{aligned}
R_i(x)=e^{-i\beta_i\sigma_z/2}e^{-i\alpha_i\sigma_y/2}, \\
\alpha_i = \arctan(x_i); \beta_i = \arctan(x_i^2).
\end{aligned}
\end{equation}
Each single-qubit state is initialized by rotations in the $y$-axis then in the $z$-axis. This allows our inputs, $x \in X$, to be encoded into a quantum state of $N$ qubits. \figureautorefname{\ref{Fig:Basic_VQC}} depicts this particular encoding scheme. For a detailed review of different quantum encoding schemes, refer to \cite{Schuld2018InformationEncoding}.
\subsection{Quantum Gradients}
Modern DL practices heavily depend on gradient-based optimization methods. Classically, the gradients of DL models are calculated using \emph{backpropagation} methods \cite{lecun1989backpropagation}. In QML, the corresponding method is the \emph{parameter-shift rule}, which can calculate the analytical gradients of quantum models \cite{schuld2019evaluating, mitarai2018quantum}.
For parameter-shift rule, knowledge of certain observables are given. A VQC's output can be modeled as a function of its parameters $f(x; \theta)$ with parameters $\theta$. Then, in most cases, the partial derivative of the VQC, $\nabla_{\theta} f(x; \theta)$, can be evaluated with the same quantum circuit only with the parameters shifted \cite{mitarai2018quantum}. We illustrate the procedure as follows: consider a quantum circuit with a parameter $\theta$, and the output can be modeled as the expectation of some observable, e.g., $B$ for some prepared state $\ket{\psi}=U(\theta)U_0(x)\ket{0}$ or $f(x; \theta) = \bra{0}U^{\dagger}_0(x)U^{\dagger}(\theta)\hat{B}U(\theta)U_0(x)\ket{0}$. This is simplified by considering the first unitary operation as preparing the state $\ket{x}$ and the other unitary operators as a linear transformation of the observable, $U^{\dagger}(\theta)\hat{B}U(\theta) = \mathcal{M}_{\theta} (\hat{B})$.
\begin{subequations}
\begin{equation}
\label{eqn:quantumFunc}
\begin{aligned}
f(x; \theta) = \bra{x}\mathcal{M}_{\theta} (\hat{B})\ket{x}, \\
\nabla_\theta f(x; \theta) = \bra{x} \nabla_\theta \mathcal{M}_{\theta} (\hat{B})\ket{x},
\end{aligned}
\end{equation}
\begin{equation}
\label{eqn:paramShift}
\nabla_\theta \mathcal{M}_{\theta} (\hat{B}) = c[\mathcal{M}_{\theta+s} (\hat{B}) - \mathcal{M}_{\theta-s} (\hat{B})].
\end{equation}
\end{subequations}
It can be shown that a finite parameter, $s$, exists, such that the Equation \ref{eqn:paramShift} stands \cite{mitarai2018quantum}. This implies that the quantum circuit can be shifted to allow for a calculation of the quantum gradient with the same circuit.
Now that DP and our VQC architecture are introduced, we unveil our differentially private optimization algorithm---the first of its kind to ensure privacy-preserving QML. Our differentially private optimization framework starts by calculating the quantum gradient using the parameter shift rule. Next, we apply Gaussian noise and clipping mechanisms to this gradient, $\nabla_{\theta} f(x; \theta)$. The differentially private gradient, $\nabla_{\theta}^{DP} f(x; \theta)$, now is used in the parameter update step instead of the non-private gradient. This parameter update rule can be SGD, adaptive momentum, or RMSprop. In this study, we solely use RMSprop to update parameters.
\begin{equation}
\label{eqn:quantumGradDP}
\nabla_{\theta}^{DP} f(x; \theta) = \left[ \bra{x} \nabla_{\theta} \mathcal{M}_{\theta} (\hat{B})\ket{x}*\mathrm{min}\left(1, \frac{S}{|\bra{x} \nabla_{\theta} \mathcal{M}_{\theta} (\hat{B})\ket{x}|}\right) + \mathcal{N}(0,\sigma^2 S^2 \mathbb{I} ) \right],
\end{equation}
where $\mathcal{M}_{\theta} (\hat{B})$ is defined in Equation \ref{eqn:quantumFunc} and $S, \sigma$ are the hyperparameters implicitly defining the level of privacy $(\varepsilon, \delta)$. This novel framework seamlessly incorporates privacy-preserving algorithms into the training of a VQC, ensuring $(\varepsilon, \delta)$-differential privacy. In this work, we choose the standard classification task to demonstrate the proof-of-concept result. However, the proposed framework is rather generic and can be applied to any hybrid quantum-classical ML scenarios.
\section{\label{sec:ExpAndResults}Experiments and Results}
To demonstrate the hypothesized quantum advantage, this study compares differentially private VQCs (DP-VQCs) to non-private VQCs, as well as private and non-private neural networks. We also illustrate the efficacy of our differentially private QML framework.
Two different types of classifications will be investigated as benchmarks: 1) labeling points in a 2D plane and 2) a binary classification from an MNIST dataset, differentiating between the `0' and `1' digits. The 2D datasets are standard benchmarks from \texttt{scikit-learn} \cite{scikit-learn} that are useful in QML because the inputs are low dimensional, thus easy to simulate on classical computers \cite{Schuld_2019}. Meanwhile, the MNIST dataset is used to study the performance of the proposed model with larger dimensional inputs.
We implement the model with several open-source software packages. The high-level quantum algorithms are implemented with \texttt{PennyLane}~\cite{bergholm2018pennylane}. The quantum simulation backend is \texttt{Qualacs} \cite{suzuki2020qulacs}, which is a high-performance choice when the number of qubits is large. The hybrid quantum-classical model is built with the \texttt{PyTorch} interface \cite{NEURIPS2019_9015}. For differentially private optimization, we employ the \texttt{PyVacy} package \cite{pyvacy}.
The experiments are characterized by the hyperparameters of the neural network training process: the optimizer, number of epochs, number of training samples, learning rate, batch size, momentum, and weight penalty. When differentially private optimizers are used, the additional hyperparameters needed are the $\ell_{2}$ norm clip, noise multiplier, number of iterations, and $\varepsilon$. After preliminary experiments, the RMSprop optimizer was selected for use in all of the experiments presented in this paper. Most of the model's hyperparameters are the same for both the MNIST and scikit 2D set classification tasks. The learning rate is set to $0.05$, while the portion of training and testing is 60\% and 40\%, respectively. In addition, the batch size used is $32$ with a momentum value of $0.5$, but no weight regularization is used.
An $\varepsilon$ is calculated from the DP hyperparameters, $S, \sigma$. Because all tasks are classifications, cross-entropy is used as the loss function for all training. According to \cite{DPReview, foundationDP}, the probability of breaking $\varepsilon$-DP should be $\delta \sim \mathcal{O}(1/n)$ for $n$ samples. A $\delta$ larger than $1/n$ always will be able to satisfy DP simply by releasing $n\delta$ complete records. Therefore, $\varepsilon$ is determined by hyperparameter choice, and $\delta$ is set to be $10^{-5}$ for the entire study.
\begin{table}[ht]
\begin{center}
\begin{tabular}{||c || c | c | c || c | c | c | c | c | c ||}
\hline
Exp & LR & Mom. & Batch & $\ell_{2}$ Clip & Noise Mult. & \# of Iter. & $\delta$ \\ [0.5ex]
\hline\hline
non-private & 0.05 & 0.5 & 32 & n/a & n/a & n/a & n/a \\
\hline
DP & 0.05 & 0.5 & 32 & 1.0 & varies & 5 & $10^{-5}$ \\
\hline
\end{tabular}
\end{center}
\caption{Hyperparameters chosen for non-private and differentially private classifiers. The neural networks and VQCs use the same hyperparameters for both classification tasks. The learning rate (LR) is the same across all experiments. Different noise multipliers are used to compare differentially private networks. The ``varies'' noise parameter means that multiple values of noise have been used in the DP-neural network and DP-VQC experiments. $\varepsilon$ also varies among DP experiments as it directly depends on the noise multiplier. The last four hyperparameters are applicable only with differentially private optimizers.}
\label{table:hyperparameters}
\end{table}
As part of the investigation into differentially private QML, classical and quantum classifiers are compared. For both the MNIST and 2D classifiers, the quantum circuit has two modules that contain the parameters for the unitary transforms comprising the two quantum subcircuits.
\subsection{Two-dimensional Mini-benchmark Datasets}
\begin{figure}[htbp]
\begin{center}
\begin{minipage}{10cm}
\Qcircuit @C=1em @R=1em {
\lstick{\ket{0}} & \gate{R_y(\arctan(x_1))} & \gate{R_z(\arctan(x_1^2))} & \ctrl{1} & \targ & \qw & \gate{R(\alpha_{i1}, \beta_{i1}, \gamma_{i1})} & \meter \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x_2))} & \gate{R_z(\arctan(x_2^2))} & \targ & \ctrl{-1} & \qw & \gate{R(\alpha_{i2}, \beta_{i2}, \gamma_{i2})} & \meter \qw
\gategroup{1}{4}{2}{7}{.7em}{--}\qw
}
\end{minipage}
\end{center}
\caption[First VQC block for scikit 2D data classification]{{\bfseries First quantum circuit block for 2D classification.}
The single-qubit gates $R_y(\arctan(x_i))$ and $R_z(\arctan(x_i^2))$ represent rotations along the $y$-axis and $z$-axis by the given angle $\arctan(x_i)$ and $\arctan(x_i^2)$, respectively.
The state is prepared with \emph{variational encoding}. The dashed box denotes one layer of a quantum subcircuit that is repeated twice. At the end of this circuit, two qubits are measured, and the $Z$ expectation values are calculated. The output from this circuit is a 2D vector.
}
\label{Fig:2D_VQC1}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\begin{minipage}{10cm}
\Qcircuit @C=1em @R=1em {
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_1))} & \gate{R_z(\arctan(x_1^{'2}))} & \ctrl{1} & \targ & \qw & \gate{R(\alpha'_{i1}, \beta'_{i1}, \gamma'_{i1})} & \meter \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_2))} & \gate{R_z(\arctan(x_2^{'2}))} & \targ & \ctrl{-1} & \qw & \gate{R(\alpha'_{i2}, \beta'_{i2}, \gamma'_{i2})} & \meter \qw
\gategroup{1}{4}{2}{7}{.7em}{--}\qw
}
\end{minipage}
\end{center}
\caption[Second VQC block for scikit 2D data classification]{{\bfseries Second quantum circuit block for 2D classification.}
The parameters labeled $R_y(\arctan(x'_i))$ and $R_y(\arctan(x_i^{'2}))$ are for state preparation. $x'_1$ and $x'_2$ are the outputs of the first circuit block. The dashed box denotes one block of a quantum circuit that is repeated twice.
At the end of this circuit, two qubits are measured, and the $Z$ expectation values are calculated. The output from this circuit is a 2D vector.
In the context of cross-entropy loss, the outputs will be interpreted as the probability that the 2D point belongs to class one or two, respectively.}
\label{Fig:2D_VQC2}
\end{figure}
Three datasets of 2D classification from \texttt{scikit-learn} are considered. The generated datasets are divided into training, validating, and testing sets with 60\%, 20\%, and 20\% proportions, respectively. Different datasets are used because the decision boundary between the two classes is increasingly nonlinear and more difficult to classify. Thus, they make good benchmarks for DP training. The leftmost plots of \figureautorefname{\ref{fig:spatial}} display the input sets, which are named ``blobs,'' ``moons,'' and ``circles'' based on the shapes they form. The more transparent points are those not part of the training, but instead used for testing the model's accuracy.
As a baseline for the study, \figureautorefname{\ref{fig:nn_arch}} illustrates the classical neural network written with two classical layers. The classical classifier uses $\tanh$ as the activation function after each layer and softmax at the end of the calculation. The neural network has Xavier weight initialization. The linear layers sizes are such that the number of total trainable parameters in the quantum classifier is 66\%, while the number of trainable parameters in the classical classifier is $24$ for the VQC and $36$ for the neural network.
The VQC to classify the 2D test set consists of two successive quantum subcircuits (Figures \ref{Fig:2D_VQC1} and \ref{Fig:2D_VQC2}). Each quantum subcircuit has two wires, while each unitary transform can be thought of as rotations on each qubit. Thus, each subcircuit is parameterized by $12$ Euler angles or parameters because there are two layers of transforms per subcircuit. The angles are initialized on a normal distribution with mean 0, standard deviation 1.0, and then scaled by 0.01.
Table \ref{table:spatial_eps} summarizes the key results from the 2D classification experiments. Three different levels of privacy have been investigated non-private, $(1.628, 10^{-5})$-DP, and $(0.681, 10^{-5}))$-DP on three different input sets blobs, moons, and circles. For most pairs of model architecture and input set, the differentially private result has a lower accuracy than the non-private one. The one exception is that the VQC classifies the moons more accurately with $(1.628, 10^{-5})$-DP than without privacy.
As detailed in Table \ref{table:spatial_eps}, the classical and quantum classifiers are almost equally successful for the blobs and moons sets. On the other hand, Figures \ref{fig:analysis_comparison_circles_vqc} and \ref{fig:analysis_comparison_circles_c} demonstrate that DP-VQC affords superior performance for the circles set as the quantum classifier's accuracy is between 13\% and 17\% higher than the DP-neural network. The last two columns of \figureautorefname{\ref{fig:spatial}} depict the decision boundary and accuracy of privacy-preserving $(0.681, 10^{-5})$-differentially private classical neural networks and VQCs.
\begin{figure}[htbp]
\includegraphics[width=1\linewidth]{images/analysis_comparison_c_moons.pdf}
\caption{Results for ``moons'' classical classifier with 200 samples, a learning rate of 0.05, and RMSprop optimizer with and without DP.}
\label{fig:analysis_comparison_moons_c}
\end{figure}
\begin{figure}[htbp]
\includegraphics[width=1\linewidth]{images/analysis_comparison_c_circles.pdf}
\caption{Results for ``circles'' classical classifier with 200 samples, a learning rate of 0.05, and RMSprop optimizer with and without DP.}
\label{fig:analysis_comparison_circles_c}
\end{figure}
\begin{figure}[htbp]
\includegraphics[width=1\linewidth]{images/analysis_comparison_vqc_circles.pdf}
\caption{Results for ``circles'' variational quantum classifier with 200 samples, a learning rate of 0.05, and RMSprop optimizer with and without DP.}
\label{fig:analysis_comparison_circles_vqc}
\end{figure}
The comparison of \figureautorefname{\ref{fig:analysis_comparison_moons_c}} and \figureautorefname{\ref{fig:analysis_comparison_circles_c}} demonstrates that the neural network's efficiency under DP training differs for different datasets. For the moons input set, the accuracy degradation from DP is somewhat significant at 10\%. Yet with the circles set, the accuracy decreases by ~40\%, and the final loss is double that of the non-private loss. Figures \ref{fig:analysis_comparison_circles_c} and \ref{fig:analysis_comparison_circles_vqc} illustrate that the VQC converges faster than the classical classifier, implying a potential quantum advantage over a classical neural network.
\begin{table}[ht]
\begin{center}
\begin{tabular}{||c | c || c | c || c | c || c | c||}
\hline
$\varepsilon$ & $\delta$ & NN-blobs & VQC-blobs & NN-moons & VQC-moons & NN-circles & VQC-circles \\ [0.5ex]
\hline\hline
non-DP & n/a & 1.00 & 0.96 & 0.99 & 0.87 & 1.00 & 0.98 \\
\hline
1.628 & $10^{-5}$ & 0.98 & 0.92 & 0.91 & 0.88 & 0.47 & 0.60 \\
\hline
0.681 & $10^{-5}$ & 0.98 & 0.92 & 0.87 & 0.85 & 0.43 & 0.60 \\ [1ex]
\hline
\end{tabular}
\end{center}
\caption{Accuracies of differentially private neural networks and variational quantum classifiers after 30 epochs for 2D input sets: ``blobs,'' ``moons,'' and ``circles.'' The quantum classifier can achieve DP with more accuracy for the circles set. For the blobs and moons, the quantum and classical classifier has nearly the same accuracy under a given level of DP.}
\label{table:spatial_eps}
\end{table}
\begin{figure}[t]
\includegraphics[width=1\linewidth]{images/classifier_spatial.pdf}
\caption{Results from the 2D ML experiments. The first column shows three input sets. The subsequent columns show different models tasked with classifying and learning the decision boundary. The array of plots illustrates the decision boundaries formed by the different models. The solid points are those used in training, and the transparent ones are part of the testing set. Total accuracy after 30 epochs is displayed on the lower right of each plot.}
\label{fig:spatial}
\end{figure}%
\subsection{MNIST Binary Classification}
\begin{figure}[htbp]
\begin{center}
\begin{minipage}{10cm}
\Qcircuit @C=1em @R=1em {
\lstick{\ket{0}} & \multigate{9}{U(\mathbf{x})} & \ctrl{1} & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \targ &\gate{R(\alpha_1, \beta_1, \gamma_1)} & \meter \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \targ & \ctrl{1} & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw &\gate{R(\alpha_2, \beta_2, \gamma_2)} & \meter \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \targ & \ctrl{1} & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw &\gate{R(\alpha_3, \beta_3, \gamma_3)} & \meter \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \targ & \ctrl{1} & \qw & \qw & \qw & \qw & \qw & \qw & \qw &\gate{R(\alpha_4, \beta_4, \gamma_4)} & \meter \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \targ & \ctrl{1} & \qw & \qw & \qw & \qw & \qw & \qw &\gate{R(\alpha_5, \beta_5, \gamma_5)} & \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \qw & \targ & \ctrl{1} & \qw & \qw & \qw & \qw & \qw &\gate{R(\alpha_6, \beta_6, \gamma_6)} & \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \qw & \qw & \targ & \ctrl{1} & \qw & \qw & \qw & \qw &\gate{R(\alpha_7, \beta_7, \gamma_7)} & \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \qw & \qw & \qw & \targ & \ctrl{1} & \qw & \qw & \qw &\gate{R(\alpha_8, \beta_8, \gamma_8)} & \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \targ & \ctrl{1} & \qw & \qw &\gate{R(\alpha_9, \beta_9, \gamma_9)} & \qw \\
\lstick{\ket{0}} & \ghost{U(\mathbf{x})} & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \targ & \qw & \ctrl{-9}&\gate{R(\alpha_{10}, \beta_{10}, \gamma_{10})} & \qw \gategroup{1}{3}{10}{14}{.7em}{--}
}
\end{minipage}
\end{center}
\caption[First VQC block for MNIST classification]{{\bfseries First quantum circuit block for MNIST classification.}
The first VQC block encodes the MNIST image. The $1024$-dimensional vector is encoded via amplitude encoding into a $\log(1024)$, i.e., $10$-qubit state. $U(\mathbf{x})$ denotes the quantum algorithm for amplitude encoding as explained in \cite{mottonen2005transformation, Schuld2018InformationEncoding}. $\alpha_{i}$, $\beta_{i}$, and $\gamma_{i}$ are the parameters to optimize. The dashed box denotes one block of a quantum circuit that is repeated eight times. Thus, there are $30 \times 8 = 240$ parameters to the circuit block. The dial to the far right represents that the circuit has four outputs. The expectation of $\sigma_z$ is measured on four qubits. The output becomes the input for the next circuit block.
}
\label{Fig:MNIST_VQC1}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\begin{minipage}{10cm}
\Qcircuit @C=1em @R=1em {
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_1))} &\gate{R_z(\arctan(x_1^{'2}))} & \ctrl{1} & \qw & \qw & \targ & \gate{R(\alpha_1, \beta_1, \gamma_1)} & \meter \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_2))} & \gate{R_z(\arctan(x_2{'2}))} & \targ & \ctrl{1} & \qw & \qw & \gate{R(\alpha_2, \beta_2, \gamma_2)} & \meter \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_3))} & \gate{R_z(\arctan(x_3{'2}))} & \qw & \targ & \ctrl{1} & \qw & \gate{R(\alpha_3, \beta_3, \gamma_3)} & \qw \\
\lstick{\ket{0}} & \gate{R_y(\arctan(x'_4))} & \gate{R_z(\arctan(x_4{'2}))} & \qw & \qw & \targ & \ctrl{-3} & \gate{R(\alpha_4, \beta_4, \gamma_4)} & \qw
\gategroup{1}{4}{4}{8}{.7em}{--}\qw
}
\end{minipage}
\end{center}
\caption[Second VQC block for MNIST classification]{{\bfseries Second quantum circuit block for MNIST classification.}
The second subcircuit uses \emph{variational encoding} to encode the output from the first block to be the input for this subcircuit. $\alpha'_{i}$, $\beta'_{i}$, and $\gamma'_{i}$ are the parameters to optimize. The dashed box denotes one block of a quantum circuit that is repeated four times. There are $12 \times 4 = 48$ parameters to the circuit block. The dial to the far right represents that the circuit has four outputs, and the expectation of $\sigma_z$ is measured on two qubits. In the context of cross-entropy, the outputs will be interpreted as the probability that the image is of a `0' or a `1,' respectively.
}
\label{Fig:MNIST_VQC2}
\end{figure}
The MNIST classification task is prepared similarly to the 2D classification problem. Because of the computational complexity of simulating large quantum systems, the problem is reduced to a binary classification of distinguishing the handwritten digits of `0' and `1.' The digits are grayscale images with a total of 784 pixels. The variational quantum classifier uses \emph{amplitude loading} (described in \sectionautorefname{\ref{sec:AmplitudeEncoding}}) to compress the number of inputs to fit within 10 qubits. Therefore, the 784 inputs are padded with additional zeros to make the inputs 1024 dimensional. Next, \emph{amplitude loading} transforms the 1024 pixels into a $10$-qubit quantum state for operating the variational quantum classifier.
The neural network uses the same padded 1024 pixels as an input. The hidden layer has only one node, and the output layer is two nodes. Hence, the classical model has 1029 parameters divided between the two weight matrices and biases. The design for this classical benchmark aims to limit the number of parameters for fair comparison to the quantum model.
The quantum classifier has two quantum subcircuits. The first has 10 inputs, eight layers of unitary transforms, and four outputs (Figure \ref{Fig:MNIST_VQC1}). Each qubit has a tunable unitary transform per layer, so there are $8 \times 10 \times 3 = 240$ parameters in the first subcircuit. The second subcircuit has four inputs, two outputs, and four layers (Figure \ref{Fig:MNIST_VQC2}), so it has $4 \times 4 \times 3 = 48$ tunable parameters associated with the rotations of quantum bits. Consequently, the VQC has $288$ parameters. Importantly, this represents roughly only a quarter (27.99\% exactly) of the number of parameters associated with the analogous classical neural network used for the same classification task.
The MNIST results are summarized in Table \ref{table:eps}. Multiple levels of privacy are created by iterating the noise multiplier from $1.0$ to $5.0$. The privacy budget for such noise is between $1.73$ to $0.07$, respectively. \figureautorefname{\ref{fig:eps_plot}} and Table \ref{table:eps} exemplify that the accuracies of both neural networks and VQCs decrease as $\varepsilon$ decreases. This emphasizes the trade-off between utility and privacy in differentially private algorithms.
\begin{table}[htbp]
\begin{tabular}{||c | c | c | c||}
\hline
$\epsilon$ & $\delta$ & Classical NN & VQC \\ [0.5ex]
\hline\hline
1.73071508 & $10^{-5}$ & 0.984 & 0.97666667 \\
\hline
1.3448161 & $10^{-5}$ & 0.974 & 0.97666667 \\
\hline
1.07469683 & $10^{-5}$ & 0.97 & 0.98266667 \\
\hline
0.73250501 & $10^{-5}$ & 0.92466667 & 0.94466667 \\
\hline
0.40585425 & $10^{-5}$ & 0.92933333 & 0.96466667 \\
\hline
0.25998742 & $10^{-5}$ & 0.946 & 0.91266667 \\
\hline
0.18230998 & $10^{-5}$ & 0.86 & 0.808 \\
\hline
0.13604452 & $10^{-5}$ & 0.94733333 & 0.79466667 \\
\hline
0.10626109 & $10^{-5}$ & 0.916 & 0.736 \\
\hline
\hline
0.07149769 & $10^{-5}$ & 0.83266667 & 0.73533333 \\ [1ex]
\hline
\end{tabular}
\caption{Results from binary MNIST classification. Accuracies of differentially private neural networks and variational quantum classifiers after 30 epochs.
The private quantum classifier is more accurate and successful for $\varepsilon$s between 0.41 and 1.34.}
\label{table:eps}
\end{table}
\begin{figure}[htbp]
\includegraphics[width=1\linewidth]{images/analysis_compare_vqc_c_eps.pdf}
\caption{Accuracy of DP classifiers after 30 epochs plotted against their $\varepsilon$ for a MNIST binary classification of the handwritten digits `0' and `1.' With only 28\% the number of parameters, the quantum classifier is at least as accurate as the classical classifier for all investigated DP levels.}
\label{fig:eps_plot}
\end{figure}
\begin{table}[htbp]
\begin{tabular}{||c || c | c ||}
\hline
model & DP-NN & DP-VQC \\ [0.5ex]
\hline\hline
\# of parameters & 1029 & 288 \\
\hline
Final accuracy & 0.929 & 0.965 \\
\hline
\end{tabular}
\caption{Results from binary MNIST classification for a $(0.406, 10^{-5})$-differentially private neural network (DP-NN) and VQC (DP-VQC).}
\label{table:mnistFinalAccs}
\end{table}
\section{\label{sec:Discussion}Discussion}
\subsection{Potential Applications of Private QML}
Differentially private data are becoming more critical because larger models have been shown to memorize more data, e.g., language models \cite{carlini2020extracting}. One of the latest state-of-the-art language models, GPT-2, has 1.5 billion parameters and was found to memorize 18 times more information when compared to a 124 million parameters language model. The aforementioned study demonstrates that training data extraction attacks are practical. This necessitates an implementation of a privacy-preserving algorithm, i.e., DP, to curtail memorization and data extraction attacks.
This study has presented the implementation and successful roof-of-concept application of DP to QML models. The application can be extended to a myriad of applications that require privacy-preserving learning and the power advantage stemming from QML. One potential application is facial recognition. These models must train on thousands faces, whose identities are not protected. Therefore, this area would intrinsically benefit from DP, and QML could create even more accurate predictions \cite{easom2020towards}. QCNN would be another logical application of a private QML algorithm as QCNNs already are being investigated with the MNIST and other benchmarks \cite{liu2019hybrid, chen2021qgcnn, kerenidis2019quantum}. Our results show that the private VQC distinguishes between the `0' and `1' digits with an accuracy exceeding 90\%. As such, it is expected that a privacy-preserving framework would benefit these application scenarios, including QCNN.
With recent QML developments impacting a spectrum of applications, such as speech recognition \cite{yang2020decentralizing}, quantum recurrent neural network (QRNN) and quantum LSTM for sequential learning \cite{chen2020quantum, bausch2020recurrent, takaki2020learning}, and even certain emerging applications in medical imaging \cite{houssein2021hybrid}, we expect the framework described by this work would be of benefit to these new scenarios as well.
An important point to consider is the limitation of extending these results to real-world quantum devices. High-dimensional input, such as MNIST, takes an extremely long time to run on a cloud-based quantum computer. However, it is possible to run. One limitation of this study is that the VQCs are simulated with noise-free quantum computers. A future study could investigate the results of running privacy-preserving quantum optimization on a noisy simulator or cloud-based quantum computer.
\subsection{Success of Differentially Private QML}
This research is seeking to show that a differentially private variational quantum classifier can be trained to identify the decision boundary between two classes. \figureautorefname{\ref{fig:spatial}} shows that the given hyperparameters achieve nearly perfect classification. After 30 epochs, both the quantum and classical classifiers achieve accuracies greater than 95\% for data organized into blobs and concentric circles. On the other hand, the classical network achieves 99\% accuracy for the moons classification, while the moons dataset proved to be the most difficult input for the quantum classifier to classify, achieving merely 86\% accuracy. It may be conjectured that the VQC had difficulties in learning the highly convex decision boundary necessary for the moons input set. In spite of that, the VQC generally trains just as well as a classical neural network with only 66\% of the total parameters.
While DP training usually causes models to fail to capture the long tail of a data distribution, the DP-QML training is just as successful as the non-private algorithm for the blobs and moons datasets, where only a modest accuracy penalty occurs. While the accuracy of the private training for the circles classification is much lower than its non-private counterpart, the DP-VQC still is much more successful at the task than the classical differentially private neural network. Our study demonstrates that a quantum advantage can offset the usual compromise between privacy and accuracy as seen in other DP applications \cite{deepLearningDP, disparateImpact}.
The MNIST binary classification problem creates an even more compelling case for the QML algorithm being advantageous compared to a classical ML algorithm. \figureautorefname{\ref{table:mnistFinalAccs}} demonstrates that a privacy-preserving variational quantum classifier can learn to distinguish between the handwritten digits `0' and `1' from the MNIST dataset to an accuracy of nearly 100\%. The same figure shows that a classical neural network also can accomplish the task. The quantum advantage arises because the quantum network has only 288 parameters compared to the 1029 parameters characterizing the classical neural network. Furthermore, the differentially private VQC attains better accuracy than the classical neural network for $\varepsilon$s between 0.4 and 1.4 (shown in Table \ref{table:eps}). This range of $\varepsilon$ is sufficient, where differentially private techniques attain good privacy as defined in \cite{deepLearningDP}.
This work mainly focuses on the numerical demonstration of potential quantum advantages, leaving the theoretical investigation for future work.
\section{\label{sec:Conclusion}Conclusion}
Overall, the QML algorithm attains the same accuracy in the MNIST classification task as the classical ML algorithm with only 28\% of the number of parameters, making it more efficient than an ML algorithm. In this work, a QML algorithm in a differentially private framework is developed, and the quantum advantage is maintained when the ML algorithm is improved to preserve privacy. This research also shows that VQCs maintain their quantum advantage under DP in the classification of the handwritten digits `0' and `1' and 2D nonlinear classifications with careful selection of hyperparameters.
This novel framework combines differentially private optimization with QML. Including DP in the algorithm ensures privacy-preserving learning. We also demonstrate a capacity for high-fidelity privacy and high accuracy in variational quantum classifiers with two different benchmarks. Notably, we show the superior performance in terms of convergence of differentially private QML over classical DP-ML. These results indicate the potential benefits quantum computing will bring to privacy-preserving data analytics.
\begin{acknowledgments}
This work was supported by the U.S.\ Department of Energy (DOE), Office of Science (SC), Advanced Scientific Computing Research program under award DE-SC-0012704 and Brookhaven National Laboratory's Laboratory Directed Research and Development Program (\#20-024).
This project also was supported in part by the DOE-SC's Office of Workforce Development for Teachers and Scientists (WDTS) under the Science Undergraduate Laboratory Internships Program (SULI).
\end{acknowledgments}
|
\section{Electronic Submission}
\label{submission}
Submission to ICML 2022 will be entirely electronic, via a web site
(not email). Information about the submission process and \LaTeX\ templates
are available on the conference web site at:
\begin{center}
\textbf{\texttt{http://icml.cc/}}
\end{center}
The guidelines below will be enforced for initial submissions and
camera-ready copies. Here is a brief summary:
\begin{itemize}
\item Submissions must be in PDF\@.
\item \textbf{New to this year}: If your paper has appendices, submit the appendix together with the main body and the references \textbf{as a single file}. Reviewers will not look for appendices as a separate PDF file. So if you submit such an extra file, reviewers will very likely miss it.
\item Page limit: The main body of the paper has to be fitted to 8 pages, excluding references and appendices; the space for the latter two is not limited. For the final version of the paper, authors can add one extra page to the main body.
\item \textbf{Do not include author information or acknowledgements} in your
initial submission.
\item Your paper should be in \textbf{10 point Times font}.
\item Make sure your PDF file only uses Type-1 fonts.
\item Place figure captions \emph{under} the figure (and omit titles from inside
the graphic file itself). Place table captions \emph{over} the table.
\item References must include page numbers whenever possible and be as complete
as possible. Place multiple citations in chronological order.
\item Do not alter the style template; in particular, do not compress the paper
format by reducing the vertical spaces.
\item Keep your abstract brief and self-contained, one paragraph and roughly
4--6 sentences. Gross violations will require correction at the
camera-ready phase. The title should have content words capitalized.
\end{itemize}
\subsection{Submitting Papers}
\textbf{Paper Deadline:} The deadline for paper submission that is
advertised on the conference website is strict. If your full,
anonymized, submission does not reach us on time, it will not be
considered for publication.
\textbf{Anonymous Submission:} ICML uses double-blind review: no identifying
author information may appear on the title page or in the paper
itself. \cref{author info} gives further details.
\textbf{Simultaneous Submission:} ICML will not accept any paper which,
at the time of submission, is under review for another conference or
has already been published. This policy also applies to papers that
overlap substantially in technical content with conference papers
under review or previously published. ICML submissions must not be
submitted to other conferences and journals during ICML's review
period.
Informal publications, such as technical
reports or papers in workshop proceedings which do not appear in
print, do not fall under these restrictions.
\medskip
Authors must provide their manuscripts in \textbf{PDF} format.
Furthermore, please make sure that files contain only embedded Type-1 fonts
(e.g.,~using the program \texttt{pdffonts} in linux or using
File/DocumentProperties/Fonts in Acrobat). Other fonts (like Type-3)
might come from graphics files imported into the document.
Authors using \textbf{Word} must convert their document to PDF\@. Most
of the latest versions of Word have the facility to do this
automatically. Submissions will not be accepted in Word format or any
format other than PDF\@. Really. We're not joking. Don't send Word.
Those who use \textbf{\LaTeX} should avoid including Type-3 fonts.
Those using \texttt{latex} and \texttt{dvips} may need the following
two commands:
{\footnotesize
\begin{verbatim}
dvips -Ppdf -tletter -G0 -o paper.ps paper.dvi
ps2pdf paper.ps
\end{verbatim}}
It is a zero following the ``-G'', which tells dvips to use
the config.pdf file. Newer \TeX\ distributions don't always need this
option.
Using \texttt{pdflatex} rather than \texttt{latex}, often gives better
results. This program avoids the Type-3 font problem, and supports more
advanced features in the \texttt{microtype} package.
\textbf{Graphics files} should be a reasonable size, and included from
an appropriate format. Use vector formats (.eps/.pdf) for plots,
lossless bitmap formats (.png) for raster graphics with sharp lines, and
jpeg for photo-like images.
The style file uses the \texttt{hyperref} package to make clickable
links in documents. If this causes problems for you, add
\texttt{nohyperref} as one of the options to the \texttt{icml2022}
usepackage statement.
\subsection{Submitting Final Camera-Ready Copy}
The final versions of papers accepted for publication should follow the
same format and naming convention as initial submissions, except that
author information (names and affiliations) should be given. See
\cref{final author} for formatting instructions.
The footnote, ``Preliminary work. Under review by the International
Conference on Machine Learning (ICML). Do not distribute.'' must be
modified to ``\textit{Proceedings of the
$\mathit{39}^{th}$ International Conference on Machine Learning},
Baltimore, Maryland, USA, PMLR 162, 2022.
Copyright 2022 by the author(s).''
For those using the \textbf{\LaTeX} style file, this change (and others) is
handled automatically by simply changing
$\mathtt{\backslash usepackage\{icml2022\}}$ to
$$\mathtt{\backslash usepackage[accepted]\{icml2022\}}$$
Authors using \textbf{Word} must edit the
footnote on the first page of the document themselves.
Camera-ready copies should have the title of the paper as running head
on each page except the first one. The running title consists of a
single line centered above a horizontal rule which is $1$~point thick.
The running head should be centered, bold and in $9$~point type. The
rule should be $10$~points above the main text. For those using the
\textbf{\LaTeX} style file, the original title is automatically set as running
head using the \texttt{fancyhdr} package which is included in the ICML
2022 style file package. In case that the original title exceeds the
size restrictions, a shorter form can be supplied by using
\verb|\icmltitlerunning{...}|
just before $\mathtt{\backslash begin\{document\}}$.
Authors using \textbf{Word} must edit the header of the document themselves.
\section{Format of the Paper}
All submissions must follow the specified format.
\subsection{Dimensions}
The text of the paper should be formatted in two columns, with an
overall width of 6.75~inches, height of 9.0~inches, and 0.25~inches
between the columns. The left margin should be 0.75~inches and the top
margin 1.0~inch (2.54~cm). The right and bottom margins will depend on
whether you print on US letter or A4 paper, but all final versions
must be produced for US letter size.
Do not write anything on the margins.
The paper body should be set in 10~point type with a vertical spacing
of 11~points. Please use Times typeface throughout the text.
\subsection{Title}
The paper title should be set in 14~point bold type and centered
between two horizontal rules that are 1~point thick, with 1.0~inch
between the top rule and the top edge of the page. Capitalize the
first letter of content words and put the rest of the title in lower
case.
\subsection{Author Information for Submission}
\label{author info}
ICML uses double-blind review, so author information must not appear. If
you are using \LaTeX\/ and the \texttt{icml2022.sty} file, use
\verb+\icmlauthor{...}+ to specify authors and \verb+\icmlaffiliation{...}+ to specify affiliations. (Read the TeX code used to produce this document for an example usage.) The author information
will not be printed unless \texttt{accepted} is passed as an argument to the
style file.
Submissions that include the author information will not
be reviewed.
\subsubsection{Self-Citations}
If you are citing published papers for which you are an author, refer
to yourself in the third person. In particular, do not use phrases
that reveal your identity (e.g., ``in previous work \cite{langley00}, we
have shown \ldots'').
Do not anonymize citations in the reference section. The only exception are manuscripts that are
not yet published (e.g., under submission). If you choose to refer to
such unpublished manuscripts \cite{anonymous}, anonymized copies have
to be submitted
as Supplementary Material via CMT\@. However, keep in mind that an ICML
paper should be self contained and should contain sufficient detail
for the reviewers to evaluate the work. In particular, reviewers are
not required to look at the Supplementary Material when writing their
review (they are not required to look at more than the first $8$ pages of the submitted document).
\subsubsection{Camera-Ready Author Information}
\label{final author}
If a paper is accepted, a final camera-ready copy must be prepared.
For camera-ready papers, author information should start 0.3~inches below the
bottom rule surrounding the title. The authors' names should appear in 10~point
bold type, in a row, separated by white space, and centered. Author names should
not be broken across lines. Unbolded superscripted numbers, starting 1, should
be used to refer to affiliations.
Affiliations should be numbered in the order of appearance. A single footnote
block of text should be used to list all the affiliations. (Academic
affiliations should list Department, University, City, State/Region, Country.
Similarly for industrial affiliations.)
Each distinct affiliations should be listed once. If an author has multiple
affiliations, multiple superscripts should be placed after the name, separated
by thin spaces. If the authors would like to highlight equal contribution by
multiple first authors, those authors should have an asterisk placed after their
name in superscript, and the term ``\textsuperscript{*}Equal contribution"
should be placed in the footnote block ahead of the list of affiliations. A
list of corresponding authors and their emails (in the format Full Name
\textless{}[email protected]\textgreater{}) can follow the list of affiliations.
Ideally only one or two names should be listed.
A sample file with author names is included in the ICML2022 style file
package. Turn on the \texttt{[accepted]} option to the stylefile to
see the names rendered. All of the guidelines above are implemented
by the \LaTeX\ style file.
\subsection{Abstract}
The paper abstract should begin in the left column, 0.4~inches below the final
address. The heading `Abstract' should be centered, bold, and in 11~point type.
The abstract body should use 10~point type, with a vertical spacing of
11~points, and should be indented 0.25~inches more than normal on left-hand and
right-hand margins. Insert 0.4~inches of blank space after the body. Keep your
abstract brief and self-contained, limiting it to one paragraph and roughly 4--6
sentences. Gross violations will require correction at the camera-ready phase.
\subsection{Partitioning the Text}
You should organize your paper into sections and paragraphs to help
readers place a structure on the material and understand its
contributions.
\subsubsection{Sections and Subsections}
Section headings should be numbered, flush left, and set in 11~pt bold
type with the content words capitalized. Leave 0.25~inches of space
before the heading and 0.15~inches after the heading.
Similarly, subsection headings should be numbered, flush left, and set
in 10~pt bold type with the content words capitalized. Leave
0.2~inches of space before the heading and 0.13~inches afterward.
Finally, subsubsection headings should be numbered, flush left, and
set in 10~pt small caps with the content words capitalized. Leave
0.18~inches of space before the heading and 0.1~inches after the
heading.
Please use no more than three levels of headings.
\subsubsection{Paragraphs and Footnotes}
Within each section or subsection, you should further partition the
paper into paragraphs. Do not indent the first line of a given
paragraph, but insert a blank line between succeeding ones.
You can use footnotes\footnote{Footnotes
should be complete sentences.} to provide readers with additional
information about a topic without interrupting the flow of the paper.
Indicate footnotes with a number in the text where the point is most
relevant. Place the footnote in 9~point type at the bottom of the
column in which it appears. Precede the first footnote in a column
with a horizontal rule of 0.8~inches.\footnote{Multiple footnotes can
appear in each column, in the same order as they appear in the text,
but spread them across columns and pages if possible.}
\begin{figure}[ht]
\vskip 0.2in
\begin{center}
\centerline{\includegraphics[width=\columnwidth]{icml_numpapers}}
\caption{Historical locations and number of accepted papers for International
Machine Learning Conferences (ICML 1993 -- ICML 2008) and International
Workshops on Machine Learning (ML 1988 -- ML 1992). At the time this figure was
produced, the number of accepted papers for ICML 2008 was unknown and instead
estimated.}
\label{icml-historical}
\end{center}
\vskip -0.2in
\end{figure}
\subsection{Figures}
You may want to include figures in the paper to illustrate
your approach and results. Such artwork should be centered,
legible, and separated from the text. Lines should be dark and at
least 0.5~points thick for purposes of reproduction, and text should
not appear on a gray background.
Label all distinct components of each figure. If the figure takes the
form of a graph, then give a name for each axis and include a legend
that briefly describes each curve. Do not include a title inside the
figure; instead, the caption should serve this function.
Number figures sequentially, placing the figure number and caption
\emph{after} the graphics, with at least 0.1~inches of space before
the caption and 0.1~inches after it, as in
\cref{icml-historical}. The figure caption should be set in
9~point type and centered unless it runs two or more lines, in which
case it should be flush left. You may float figures to the top or
bottom of a column, and you may set wide figures across both columns
(use the environment \texttt{figure*} in \LaTeX). Always place
two-column figures at the top or bottom of the page.
\subsection{Algorithms}
If you are using \LaTeX, please use the ``algorithm'' and ``algorithmic''
environments to format pseudocode. These require
the corresponding stylefiles, algorithm.sty and
algorithmic.sty, which are supplied with this package.
\cref{alg:example} shows an example.
\begin{algorithm}[tb]
\caption{Bubble Sort}
\label{alg:example}
\begin{algorithmic}
\STATE {\bfseries Input:} data $x_i$, size $m$
\REPEAT
\STATE Initialize $noChange = true$.
\FOR{$i=1$ {\bfseries to} $m-1$}
\IF{$x_i > x_{i+1}$}
\STATE Swap $x_i$ and $x_{i+1}$
\STATE $noChange = false$
\ENDIF
\ENDFOR
\UNTIL{$noChange$ is $true$}
\end{algorithmic}
\end{algorithm}
\subsection{Tables}
You may also want to include tables that summarize material. Like
figures, these should be centered, legible, and numbered consecutively.
However, place the title \emph{above} the table with at least
0.1~inches of space before the title and the same after it, as in
\cref{sample-table}. The table title should be set in 9~point
type and centered unless it runs two or more lines, in which case it
should be flush left.
\begin{table}[t]
\caption{Classification accuracies for naive Bayes and flexible
Bayes on various data sets.}
\label{sample-table}
\vskip 0.15in
\begin{center}
\begin{small}
\begin{sc}
\begin{tabular}{lcccr}
\toprule
Data set & Naive & Flexible & Better? \\
\midrule
Breast & 95.9$\pm$ 0.2& 96.7$\pm$ 0.2& $\surd$ \\
Cleveland & 83.3$\pm$ 0.6& 80.0$\pm$ 0.6& $\times$\\
Glass2 & 61.9$\pm$ 1.4& 83.8$\pm$ 0.7& $\surd$ \\
Credit & 74.8$\pm$ 0.5& 78.3$\pm$ 0.6& \\
Horse & 73.3$\pm$ 0.9& 69.7$\pm$ 1.0& $\times$\\
Meta & 67.1$\pm$ 0.6& 76.5$\pm$ 0.5& $\surd$ \\
Pima & 75.1$\pm$ 0.6& 73.9$\pm$ 0.5& \\
Vehicle & 44.9$\pm$ 0.6& 61.5$\pm$ 0.4& $\surd$ \\
\bottomrule
\end{tabular}
\end{sc}
\end{small}
\end{center}
\vskip -0.1in
\end{table}
Tables contain textual material, whereas figures contain graphical material.
Specify the contents of each row and column in the table's topmost
row. Again, you may float tables to a column's top or bottom, and set
wide tables across both columns. Place two-column tables at the
top or bottom of the page.
\subsection{Theorems and such}
The preferred way is to number definitions, propositions, lemmas, etc. consecutively, within sections, as shown below.
\begin{definition}
\label{def:inj}
A function $f:X \to Y$ is injective if for any $x,y\in X$ different, $f(x)\ne f(y)$.
\end{definition}
Using \cref{def:inj} we immediate get the following result:
\begin{proposition}
If $f$ is injective mapping a set $X$ to another set $Y$,
the cardinality of $Y$ is at least as large as that of $X$
\end{proposition}
\begin{proof}
Left as an exercise to the reader.
\end{proof}
\cref{lem:usefullemma} stated next will prove to be useful.
\begin{lemma}
\label{lem:usefullemma}
For any $f:X \to Y$ and $g:Y\to Z$ injective functions, $f \circ g$ is injective.
\end{lemma}
\begin{theorem}
\label{thm:bigtheorem}
If $f:X\to Y$ is bijective, the cardinality of $X$ and $Y$ are the same.
\end{theorem}
An easy corollary of \cref{thm:bigtheorem} is the following:
\begin{corollary}
If $f:X\to Y$ is bijective,
the cardinality of $X$ is at least as large as that of $Y$.
\end{corollary}
\begin{assumption}
The set $X$ is finite.
\label{ass:xfinite}
\end{assumption}
\begin{remark}
According to some, it is only the finite case (cf. \cref{ass:xfinite}) that is interesting.
\end{remark}
\subsection{Citations and References}
Please use APA reference format regardless of your formatter
or word processor. If you rely on the \LaTeX\/ bibliographic
facility, use \texttt{natbib.sty} and \texttt{icml2022.bst}
included in the style-file package to obtain this format.
Citations within the text should include the authors' last names and
year. If the authors' names are included in the sentence, place only
the year in parentheses, for example when referencing Arthur Samuel's
pioneering work \yrcite{Samuel59}. Otherwise place the entire
reference in parentheses with the authors and year separated by a
comma \cite{Samuel59}. List multiple references separated by
semicolons \cite{kearns89,Samuel59,mitchell80}. Use the `et~al.'
construct only for citations with three or more authors or after
listing all authors to a publication in an earlier reference \cite{MachineLearningI}.
Authors should cite their own work in the third person
in the initial version of their paper submitted for blind review.
Please refer to \cref{author info} for detailed instructions on how to
cite your own papers.
Use an unnumbered first-level section heading for the references, and use a
hanging indent style, with the first line of the reference flush against the
left margin and subsequent lines indented by 10 points. The references at the
end of this document give examples for journal articles \cite{Samuel59},
conference publications \cite{langley00}, book chapters \cite{Newell81}, books
\cite{DudaHart2nd}, edited volumes \cite{MachineLearningI}, technical reports
\cite{mitchell80}, and dissertations \cite{kearns89}.
Alphabetize references by the surnames of the first authors, with
single author entries preceding multiple author entries. Order
references for the same authors by year of publication, with the
earliest first. Make sure that each reference includes all relevant
information (e.g., page numbers).
Please put some effort into making references complete, presentable, and
consistent, e.g. use the actual current name of authors.
If using bibtex, please protect capital letters of names and
abbreviations in titles, for example, use \{B\}ayesian or \{L\}ipschitz
in your .bib file.
\section*{Accessibility}
Authors are kindly asked to make their submissions as accessible as possible for everyone including people with disabilities and sensory or neurological differences.
Tips of how to achieve this and what to pay attention to will be provided on the conference website \url{http://icml.cc/}.
\section*{Software and Data}
If a paper is accepted, we strongly encourage the publication of software and data with the
camera-ready version of the paper whenever appropriate. This can be
done by including a URL in the camera-ready copy. However, \textbf{do not}
include URLs that reveal your institution or identity in your
submission for review. Instead, provide an anonymous URL or upload
the material as ``Supplementary Material'' into the CMT reviewing
system. Note that reviewers are not required to look at this material
when writing their review.
\section*{Acknowledgements}
\textbf{Do not} include acknowledgements in the initial version of
the paper submitted for blind review.
If a paper is accepted, the final camera-ready version can (and
probably should) include acknowledgements. In this case, please
place such acknowledgements in an unnumbered section at the
end of the paper. Typically, this will include thanks to reviewers
who gave useful comments, to colleagues who contributed to the ideas,
and to funding agencies and corporate sponsors that provided financial
support.
\nocite{langley00}
\section{Introduction} \label{sec:introduction}
Estimating individualized treatment effects has been a hot topic because of its wide applications, ranging from personalized medicine, policy research, to customized marketing advertisement. Treatment effects of certain subgroups within the population are often of interest. Recently, there has been an explosion of research devoted to improving estimation and inference of covariate-specific treatment effects, or conditional average treatment effects (CATE) at a target research site \citep{athey2016recursive,wager2018estimation,hahn2020bayesian,kunzel2019metalearners,nie2020quasioracle}.
However, due to the limited sample size in a single study, improving the accuracy of the estimation of treatment effects remains challenging.
Leveraging data and models from various research sites to conduct statistical analyses is becoming increasingly popular \citep{reynolds2020leveraging, cohen2020leveraging, berger2015optimizing}.
Distributed research networks have been established in many large scale studies \citep{fleurence2014launching,hripcsak2015observational,platt2018fda,donohue2021use}. %
A question often being asked is whether additional data or models from other research sites could bring improvement to a local estimation task, especially when a single site does not have enough data to achieve a desired statistical precision.
This concern is mostly noticeable in estimating treatment effects where sample size requirement is high yet observations are typically limited.
Furthermore, information exchange between data sites is often highly restricted due to privacy, feasibility, or other concerns, prohibiting centralized analyses that pool data from multiple sources \citep{maro2009design,brown2010distributed,toh2011comparative,raghupathi2014big,deshazo2015comparison,donahue2018veterans,dayan2021federated}.
One way to tackle this challenge is through model averaging \citep{raftery1997bayesian}, where multiple research sites collectively contribute to the tasks of statistical modeling without sharing sensitive subject-level data.
Although this idea has existed in supervised learning problems \citep{dai2011greedy,mcmahan2017communication},
to our best knowledge, there are no established model averaging approach and theoretical results on estimating CATE in a distributed environment. The extension is non-trivial because CATE is unobserved in nature, as opposed to prediction problems where labels are given.
This paper focuses on improving the prediction accuracy of CATE concerning a target site by leveraging models derived from other sites
where
\textit{transportability} \citep[to be formally defined in Section~\ref{sec:assumption},][]{pearl2011transportability,stuart2011use,pearl2014external,bareinboim2016causal,buchanan2018generalizing,dahabreh2019generalizing} may not hold.
Specifically, there may exist heterogeneity in treatment effects. In the context of our multi-hospital example, these are:
1) \textbf{local heterogeneity}: within a hospital, patients with different characteristics may have different treatment effects.
This is the traditional notion of CATE;
and 2) \textbf{global heterogeneity}: where the same patient may experience different treatment effects at different hospitals. The second type of heterogeneity is driven by site-level confounding, and hampers the transportability of models across hospital sites.
We also note that these two types of heterogeneity may interact with each other in the sense that transportability is dependent on patient characteristics, which we will address.
We propose a model averaging framework that uses a flexible tree-based weighting scheme to combine learned models from sites that takes into account heterogeneity. The contribution of each learned model to the target site depends on subject characteristics. This is achieved by applying tree splittings \citep{breiman1984classification} at both the site and the subject levels.
For example, effects of a treatment in two hospitals may be similar for female patients but not for male, suggesting us to consider borrowing information across sites only on selective subgroups.
Our approach extends the classic model averaging framework \citep{raftery1997bayesian,wasserman2000bayesian,hansen2007least,yang2001adaptive} by allowing data-adaptive weights, which are interpretable in a sense that they can be used to lend credibility to transportability.
For example, in the case of extreme heterogeneity where other sites merely contribute to the target, the weights can be used as a diagnostic tool to inform the decision against borrowing information.
\textbf{Main contributions.}
{{1)}} We propose a model averaging scheme with interpretable weights that are adaptive to both local and global heterogeneity via tree-splitting dedicated to improving CATE estimation under distributed data networks.
{{2)}} We generalize model averaging techniques to study the transportability of causal inference. Causal assumptions with practical implications are explored to warrant the use of our approach.
{{3)}} We provide an extensive empirical evaluation of the proposed approach with a concrete real-data example on how to apply the method in practice.
{{4)}} Compared to other distributed learning methods, the proposed framework enables causal analysis without sharing subject-level data, is easy to implement, offers ease of operations, and minimizes infrastructure, which facilitates practical collaboration within research networks.
\section{Related Work} \label{sec:related}
There are two types of construct of a distributed database \citep{breitbart1986database}: \emph{homogeneous} versus \emph{heterogeneous}.
For homogeneous data sources, data across sites are random samples of the global population.
Recent modeling approaches \citep{lin2010relative, lee2017communication, mcmahan2017communication, battey2018distributed, jordan2018communication, tang2020distributed,wang2021tributarypca} all assume samples are randomly partitioned, which guarantees
identical data distribution across sites.
The goal of these works is to improve overall prediction by averaging results from homogeneous sample divisions.
The classic random effects meta-analysis (see, e.g., \citet{whitehead2002meta,sutton2000methods,borenstein2011introduction} describes heterogeneity using modeling assumptions, but its focus mostly is still on global patterns.
\textbf{Heterogeneous models.} In practice, however, there is often too much global heterogeneity
in a distributed data network
to warrant direct aggregation of models obtained from local sites. The focus shifts to improving the estimation of a target site by selectively leveraging information from other data sources.
There are two main classes of approaches.
The first class is based on comparison of the learned model parameters $\{\widehat\bm{\theta}_1,\dots,\widehat\bm{\theta}_K\}$ from $K$ different sites where for site $k$ we adopt model $f_k(\bm{x}) = f(\bm{x}; \bm{\theta}_k)$ with subject features $\bm{x}$ to approximate the outcome of interest $Y$.
Clustering and shrinkage approaches are then used
by merging data or models that are similar \citep{ke2015homogeneity,tang2016fused,smith2017federated,ma2017concave,wang2020sylvester,tang2020individualized,tang2021poststratification}.
Most of these require the pooling of subject-level data.
The second class of approaches falls in the \textit{model averaging} framework \citep{raftery1997bayesian} with weights directly associated with the local prediction.
Let site 1 be our target site, and the goal is to improve $f_{1}$ using a weighted estimator $f^*(\bm{x}) = \sum_{k=1}^K {\omega}_{k} f_k(\bm{x})$ with weights $\omega_k$ to balance the contribution of each model and $\sum_k \omega_{k} = 1$.
It provides an immediate interpretation of usefulness of each data source.
When the weights are proportional to the prediction performance of $f_k$ on site 1, for example,
$${\omega}_{k} =\frac{\exp\{- \sum_{i \in \mathcal{I}_1}(f_k(\bm{x}_i) - y_i)^2\}}{ \sum_{\ell=1}^{K} \exp\{- \sum_{i \in \mathcal{I}_1}(f_\ell(\bm{x}_i) - y_i)^2\} },$$
with $y_i$ being the observed outcome of subject $i$ in site 1, indexed by $\mathcal{I}_1$, the method is termed as the exponential weighted model averaging (EWMA).
Several variations of ${\omega}_{k}$ can be found in
\citet{yang2001adaptive, dai2011greedy,yao2018using,dai2018bayesian}.
In general, separate samples are used to obtain the estimates of $\omega_k$'s and $f_k$'s, respectively.
Here we focus on the literature review of model averaging.
We note that our framework is also related to federated learning \citep{mcmahan2017communication}. But the latter often
involves iterative updating rather than a one-shot procedure, and could be hard to apply to nonautomated distributed
research networks. Besides, it has been developed mainly to estimate a global prediction model by leveraging distributed data, and is not designed to target any specific site. We further discuss these approaches and other related research topics and their distinctions with model averaging in Appendix~\ref{suppl-related}.
\textbf{Transportability.}
In causal inference, there is a lot of interest in identifying subgroups with enhanced treatment effects, targeting at the feasibility of customizing estimates for individuals \citep{athey2016recursive,wager2018estimation,hahn2020bayesian,kunzel2019metalearners,nie2020quasioracle}. These methods aim to estimate the CATE function $\tau(\bm{x})$, denoting the difference in potential outcomes between treatment and control, conditional on subject characteristics $\bm{x}$.
To reduce uncertainty in estimation of personalized treatment effects, incorporating additional data or models are sought after.
\citet{pearl2011transportability,pearl2014external,bareinboim2016causal} introduced the notion of transportability to warrant causal inference models be generalized to a new population.
The issue of generalizability is common in practice due to the non-representative sampling of participants in randomized controlled trials \citep{cook2002experimental,druckman2011cambridge,allcott2015site,stuart2015assessing,egami2020elements}.
Progress on bridging the findings from an experimental study with observational data can be found in, e.g., \citet{stuart2015assessing,kern2016assessing,stuart2018generalizability,ackerman2019implementing,yang2020elastic,harton2021combining}.
See \citet{tipton2018review,colnet2020causal,degtiar2021review} and references therein for a comprehensive review.
However, most methods require fully centralized data. In contrast, we leverage the distributed nature of model averaging to derive an integrative CATE estimator.
\section{A Tree-based Model Averaging Framework} \label{sec:method}
We first formally define the {conditional average treatment effect} (CATE).
Let $Y$ denote the outcome of interest, $Z \in \{0,1\}$ denote a binary treatment indicator, and $\bm{X}$ denote subject features. Correspondingly, let $y$, $z$ and $\bm{x}$ denote their realizations.
Using the potential outcome framework \citep{neyman1923applications,rubin1974estimating}, we define
CATE as $\tau(\bm{x})=E[Y^{(Z=1)}-Y^{(Z=0)} |\bm{X}=\bm{x}],$
where $Y^{(Z=1)}$ and $Y^{(Z=0)}$ are the potential outcomes under treatment arms $Z=1$ and $Z=0$, respectively.
The expected difference of the potential outcomes is dependent on subject features $\bm{X}$. By the causal consistency assumption, the observed outcome is $Y = ZY^{(Z=1)} + (1 - Z)Y^{(Z=0)}$.
Now suppose the distributed data network
consists of $K$ sites, each with sample size of $n_k$.
Site $k$ contains data $\mathcal{D}_k = \{y_i, z_i, \bm{x}_i\}_{i \in \mathcal{I}_k}$, where $\mathcal{I}_k$ denotes its index set.
Its CATE function is given by $\tau_k (\bm{x}) = E_k[Y^{(Z=1)}-Y^{(Z=0)} |\bm{X}=\bm{x}],$ where the expectation is taken over the data distribution in site $k$.
Without loss of generality, we assume the goal is to estimate the CATE function in site 1, $\tau_1$.
\subsection{Causal Assumptions} \label{sec:assumption}
To ensure information can be properly borrowed across sites, we first impose the following idealistic assumptions, and then present relaxed version of Assumption 2.
Let $S$ be the site indicator taking values in $\mathcal{S} = \{1, \dots, K\}$ such that $S_i = k$ if $i \in \mathcal{I}_k$.
\textit{Assumption 1:} $\{Y^{(Z=0)}, Y^{(Z=1)}\} \perp Z | \bm{X}, S$;
\textit{Assumption 2 (Transportability):} $$
\{Y^{(Z=0)}, Y^{(Z=1)}\} \perp S | \bm{X};$$
\textit{Assumption 3:} $ 0< P(S = 1| \bm{X}) < 1 \mbox{ and } 0< P(Z = 1| \bm{X}, S) < 1 \quad \mbox{for all } \bm{X} \mbox{ and } S$.
Assumption 1
ensures treatment effects are unconfounded within sites so that $\tau_k(\bm{x})$ can be consistently identified.
It holds by design when data are randomized controlled trials or when treatment assignment depends on $\bm{X}$.
By this assumption, we have $\tau_{k}(\bm{x}) =
E[Y |\bm{X}=\bm{x}, S = k, Z = 1] - E[Y |\bm{X}=\bm{x}, S = k, Z = 0]$.
The equality directly results from the assumption.
Assumption 2
essentially states that the CATE functions are transportable, i.e., $\tau_k(\bm{x}) = \tau_{k'}(\bm{x})$ for $k, k'\in \{1,\dots, K\}$. See also \citet{stuart2011use}, \citet{buchanan2018generalizing} and \citet{yang2020elastic} for similar consideration.
This assumption may not be satisfied due to heterogeneity across sites. In other words, site can be a confounder which prevents transporting of CATE functions across sites.
Our method allows Assumption 2
to be violated and use model averaging weights to determine transportability. Explicitly, we consider a relaxed Assumption 2a to hold for a subset of sites that contains site 1.
\textit{Assumption 2a (Partial Transportability):} $$
\{Y^{(Z=0)}, Y^{(Z=1)}\} \perp S_1 | \bm{X}.$$
Here, $S_1$ takes values in $\mathcal{S}_1 = \{k: \tau_k(\bm{x}) = \tau_1(\bm{x})\}$ and $\{1\} \subset \mathcal{S}_1 \subset \mathcal{S}$.
We denote $\mathcal{S}_1$ as the set of transportable sites with regard to site 1.
Hence, transportability holds across some sites and specific subjects.
In a special case in Section~\ref{sec:simulation} where $\mathcal{S}_1 = \{1\}$, bias may be introduced to by model averaging. However, our approach is still able to exploits the bias and variance trade off to improve estimation.
Assumption 3
ensures that all subjects are possible to be observed in site 1 and all subjects in all sites are possible to receive either arm of treatment.
The former ensures a balance of covariates between site 1 population and the population of other sites.
Violation of either one may result in extrapolation and introduce unwanted bias to the ensemble estimates for site 1. This assumption is also used, e.g., in \citet{stuart2011use}.
\subsection{Model Ensemble} \label{sec:adaptiveMA}
We consider an adaptive weighting of $\{\tau_1, \dots, \tau_K\}$ by
\begin{equation} \label{eq:agg}
{\tau}^*(\bm{x}) = \sum_{k=1}^K \omega_{k}(\bm{x}) \tau_k(\bm{x})
\end{equation}
where ${\tau}^*$ is the weighted model averaging estimator. The weight functions $\omega_{k}(\bm{x})$'s are not only site-specific, but also depend on $\bm{x}$, and follow $\sum_{k=1}^{K} \omega_{k}(\bm{x}) = 1$.
It measures the importance of $\tau_k$ in assisting site 1 when subjects with characteristics $\bm{x}$ are of interest.
We rely on each of the sites to derive their respective $\widehat\tau_k$ from $\mathcal{D}_k$ so that $\mathcal{D}_1, \dots, \mathcal{D}_K$ do not need to be pooled. Only the estimated functions $\{\widehat \tau_2, \dots, \widehat \tau_K\}$ are passed to site 1.
We will describe the approaches to estimate $\widehat{\tau}_k$ in Section \ref{sec:local}.
A two-stage model averaging approach is proposed.
We first split $\mathcal{D}_1$, the data in the target site, into a training set and an estimation set indexed by $\{i \in \mathcal{I}_1^{(1)}\}$ and $\{i \in \mathcal{I}_1^{(2)}\}$, respectively.
\emph{1) Local stage:}
Obtain $\widehat{\tau}_1$ from subjects in $\mathcal{I}_1^{(1)}$.
Obtain $\widehat{\tau}_k$ from local subjects in $\mathcal{I}_k$, $k = 2, \dots, K$. These $\{\widehat{\tau}_k\}_{k=1}^K$ are then passed to site 1 to get $K$ predicted treatment effects for each subject in $\mathcal{I}_1^{(2)}$, resulting in an augmented data set as shown in Figure~\ref{fig:framework}(b).
\emph{2) Ensemble stage:} A tree-based ensemble model is trained on the augmented data by either an ensemble tree (ET) or an ensemble random forest (EF), with the predicted treatment effects from the previous stage, i.e., $\widehat{\tau}_k(\bm{x}_i)$ as the \emph{outcome}. The site indicator $S$ of which local model is used as well as the subject features $\bm{x}_i$ are fed into the ensemble model as \emph{predictors}. The resulting model will be used to compute our proposed model averaging estimator.
Figure~\ref{fig:framework}(a) illustrates a conceptual diagram of the proposed model averaging framework and structure of the augmented data.
Note the idea of data augmentation has been used in, e.g., computer vision \citep{wang2017effectiveness}, statistical computing \citep{van2001art}, and imbalanced classification \citep{chawla2002smote}.
Here the technique is being used to construct weights for model averaging, which will be discussed in the following paragraph.
Algorithm~\ref{algo:code} provides an algorithmic overview.
Our method has been implemented as an R package \texttt{ifedtree} available on GitHub (\url{https://github.com/ellenxtan/ifedtree}).
\begin{figure}[tb
\centering
\begin{subfigure}{0.5\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/diagram_final_crop.pdf}}
\vspace{-0.3cm}
\caption{}
\vspace{0.2pc}
\end{subfigure}
\begin{subfigure}{.25\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/aug_df.pdf}}
\caption{}
\end{subfigure}
\vspace{-0.3cm}
\caption{(a) Schema of the proposed algorithm. (b) Illustration of the augmented data constructed from the estimation set of site 1.}
\label{fig:framework}
\end{figure}
\setlength{\textfloatsep}{0.4cm}
\begin{algorithm}[tb]
\smal
\caption{Tree-based model averaging for heterogeneous data sources}
\label{algo:code}
\begin{algorithmic
\FOR{$k=1$ {\bfseries to} $K$}
\STATE \hfill\COMMENT{Loop through $K$ sites. Can be run in parallel.}
\STATE Build a local model using site $k$ data. Site 1 model uses its training set only.
\ENDFOR
\FOR{$i \in \mathcal{I}_1^{(2)}$}
\STATE \hfill\COMMENT{Loop through subjects in site 1 estimation set.}
\FOR{$k=1$ {\bfseries to} $K$}
\STATE \hfill\COMMENT{Loop through $K$ local models.}
\STATE Predict $\widehat{\tau}_k(\bm{x}_i)$ using local model $k$.
\STATE $D_{i, k} = [\bm{x}_i, k, \widehat{\tau}_k(\bm{x}_i)]$.
\ENDFOR
\ENDFOR
\STATE Create augmented site 1 data $\mathfrak{D}_{aug, 1}$ by concatenating $D_{i, k}$ vectors.
\STATE $\widehat{\mathcal{T}}_{\text{EF}} (\bm{x}, s) =$ {\sc EnsembleForest}($\mathfrak{D}_{aug, 1}$)
\STATE \hfill\COMMENT{Or {\sc EnsembleTree} when $B = 1$.}
\end{algorithmic}
\end{algorithm}
\setlength{\floatsep}{0.4cm}
\textbf{Construction of weights.} A tree-based ensemble is constructed to estimate the weighting functions $\{\omega_{k}\}_{k=1}^K$.
Heterogeneity across sites is explained by including the site index into an augmented training set when building trees.
An intuition of our approach is that sites that are split away from site 1 (by tree nodes) are ignored and the sites that fall into the same leaf node are considered homogeneous to site 1 hence contribute to the estimation of $\tau_1(\bm{x})$. A splitting by site may occur in any branches of a tree, resulting in an information sharing scheme across sites that is dependent on $\bm{x}$.
We construct the ensemble by first creating an augmented data
$\mathfrak{D}_{aug, 1} = \{\bm{x}_i, k, \widehat{\tau}_k(\bm{x}_i)\}_{i \in \mathcal{I}_1^{(2)}, k \in \mathcal{S}}$,
for subjects in $\mathcal{I}_1^{(2)}$.
The illustration of this augmented site 1 data is given in Figure~\ref{fig:framework}(b). An ensemble is then trained on this data by either a tree or a random forest,
with the estimated treatment effects $\widehat{\tau}_k(\bm{x}_i)$ as the outcome, and a categorical site indicator of which local model is used along with all subject-level features as predictors, i.e., $(\bm{x}_i, k)$.
We denote the resulting function as $\mathcal{T}(\bm{x}, s)$ which depends on both $\bm{x}$ and site $s$, specifically,
$\mathcal{T}_{\text{ET}} (\bm{x}, s)$ and $ \mathcal{T}_{\text{EF}} (\bm{x}, s)$ for ensemble tree (ET) and ensemble forest (EF), respectively. Let $\mathcal{L}(\bm{x},s)$ denote the final partition of the feature space by the tree to which the pair $(\bm{x}, s)$ belongs. The ET estimate based on the augmented site 1 data can be derived by
\begin{align}\label{eq:ET}
\widehat \mathcal{T}_{\text{ET}} (\bm{x}, s)
&= \{|\{(i, k): (\bm{x}_i, k) \in \mathcal{L}(\bm{x}, s)\}_{i \in \mathcal{I}_1^{(2)}, k \in \mathcal{S}}|\}^{-1} \nonumber\\
&\sum_{\{(i, k): (\bm{x}_i, k) \in \mathcal{L}(\bm{x}, s)\}_{i \in \mathcal{I}_1^{(2)}, k \in \mathcal{S}}} \widehat{\tau}_k(\bm{x}_i) \nonumber\\
&= \sum_{i\in\mathcal{I}_1^{(2)}} \sum_{k=1}^{K} \frac{\mathbbm{1}\{(\bm{x}_i, k)\in \mathcal{L}(\bm{x}, s)\}}{|\mathcal{L}(\bm{x}, s)|} \widehat{\tau}_k(\bm{x}_i).
\end{align}
Intuitively, observations with similar characteristics ($\bm{x}$ and $\bm{x}'$) and from similar sites ($s$ and $s'$) are more likely to fall in the same partition region in the ensemble tree, i.e., $(\bm{x}, s) \in \mathcal{L}(\bm{x}', s')$ or $(\bm{x}', s') \in \mathcal{L}(\bm{x}, s)$. This resembles a \emph{non-smooth kernel} where weights are $1/|\mathcal{L}(\bm{x}, s)|$ for observations that are within the neighborhood of $(\bm{x}, s)$, and 0 otherwise.
The estimator borrows information from neighbors in the space of $\bm{X}$ and $S$.
The splits of the tree are based on minimizing in-sample MSE of $\widehat\tau$ within each leaf
and pruned by cross-validation over choices of the complexity parameter.
Since a single tree is prone to be unstable,
in practice, we use random forest to reduce variance and smooth the partitioning boundaries.
By aggregating $B$ ET estimates each based on a subsample of the augmented data, $\{\widehat{\mathcal{T}}^{(b)}\}_{b=1}^B$, an EF estimate can be constructed by
\begin{align}
\widehat \mathcal{T}_{\text{EF}} (\bm{x}, s)
& = \frac{1}{B} \sum_{b=1}^{B} \widehat \mathcal{T}^{(b)} (\bm{x}, s) \nonumber \\
& = \sum_{i\in \mathcal{I}_1^{(2)}} \sum_{k=1}^{K} \lambda_{i,k}(\bm{x}, s) \widehat{\tau}_k(\bm{x}_i), \label{eq:EF}\\
\text{where~} & \lambda_{i,k}(\bm{x}, s) = \frac{1}{B} \sum_{b=1}^{B} \frac{\mathbbm{1}\{(\bm{x}_i, k)\in \mathcal{L}_b(\bm{x}, s)\}}{|\mathcal{L}_b(\bm{x}, s)|}.\nonumber
\end{align}
The form of $\widehat \mathcal{T}^{(b)} (\bm{x}, s)$ closely follows \eqref{eq:ET} but is based on a subsample of $\mathfrak{D}_{aug, 1}$. The weights, $\lambda_{i,k}(\bm{x}, s)$, are similar to that in \eqref{eq:ET}, and can be viewed as kernel weighting that defines an adaptive neighborhood of $\bm{x}$ and $s$.
We then obtain the model averaging estimates defined in \eqref{eq:agg} by fixing $s = 1$ such that $\widehat \tau_{\text{ET}}^*(\bm{x}) = \widehat\mathcal{T}_{\text{ET}} (\bm{x}, s=1)$ or $\widehat \tau_{\text{EF}}^*(\bm{x}) = \widehat\mathcal{T}_{\text{EF}} (\bm{x}, s=1)$.
The weight functions $\{\omega_{k}(\bm{x})\}_{k=1}^K$ for $\widehat\tau^*(\bm{x})$ can be immediately obtained from the ET or EF by
\begin{align*}
\widehat\tau_{\text{ET}}^*(\bm{x}) = \ & \widehat \mathcal{T}_{\text{ET}} (\bm{x}, 1) = \sum_{k=1}^K \widehat \omega_{k}(\bm{x}) \widehat \tau_k(\bm{x}), \\
\text{where~~} & \widehat \omega_{k}(\bm{x}) = \sum_{i\in\mathcal{I}_1^{(2)}} \frac{\mathbbm{1}\{(\bm{x}_i, k)\in \mathcal{L}(\bm{x}, 1)\}}{|\mathcal{L}(\bm{x}, 1)|}; \nonumber \\
\widehat\tau_{\text{EF}}^*(\bm{x}) = \ & \widehat \mathcal{T}_{\text{EF}} (\bm{x}, 1) = \sum_{k=1}^K \widehat \omega_{k}(\bm{x}) \widehat \tau_k(\bm{x}), \\
\text{where~~} & \widehat \omega_{k}(\bm{x}) = \sum_{i\in\mathcal{I}_1^{(2)}} \lambda_{i,k}(\bm{x}, 1).
\end{align*}
It can be verified that $\sum_{k=1}^{K} \widehat \omega_k(\bm{x}) = 1$ for all $\bm{x}$.
As our simulations in Section \ref{sec:simulation} show, $\widehat \tau^*$ improves the local functional estimate $\widehat\tau_1$.
We set $B=2,000$ throughout the paper.
Tree and forest estimates are obtained by R packages \verb|rpart| and \verb|grf|, respectively.
\textbf{Interpretability of weights.}
The choice of tree-based models naturally results in such kernel weighting $w_k(\bm{x})$ \citep{athey2019generalized}, which are not accessible by other ensemble techniques.
Such explicit and interpretable weight functions could deliver meaningful rationales for data integration.
For example, under scenarios where there exists extreme global heterogeneity (as shown in Section~\ref{sec:simulation} when $c$ is large), $w_k(\bm{x})$ can be used as a diagnostic tool to decide which external data sources should be co-used.
Weights close to $0$ inform against model transportability, and they are adaptive to subject-level features $\bm{x}$ so that decisions can be made based on the subpopulations of interest.
\subsection{Local Models: Obtaining $\widehat\tau_k$} \label{sec:local}
Estimate of $\tau_k(\bm{x})$ at each local site must be obtained separately before the ensemble.
Our proposed ensemble framework can be applied to a general estimator of $\tau_k(\bm{x})$. For each site, the local estimate could be obtained using different methods.
Recently, there has been many work dedicated to the estimation of individualized treatment effects \citep{athey2016recursive,wager2018estimation,hahn2020bayesian,kunzel2019metalearners,nie2020quasioracle}.
As an example, we consider using the causal tree (CT) \citep{athey2016recursive} to estimate the local model at each site. CT is a non-linear learner that \textit{(i)} allows different types of outcome such as discrete and continuous, and can be applied to a broad range of real data scenarios; \textit{(ii)} can manage hundreds of features and high order interactions by construction; \textit{(iii)} can be applied to both experimental studies and observational studies by propensity score weighting or doubly robust methods.
CT is implemented in the R package \verb|causalTree|. We also explore another estimating option for local models in Appendix~\ref{suppl-sec:sim}.
\subsection{Asymptotic Properties} \label{sec:consist}
We provide consistency guarantee of the proposed estimator $\widehat \mathcal{T}_{\text{EF}}$ for the true target $\tau_1$.
Assuming point-wise consistent local estimators are used for $\{\tau_k\}_{k=1}^{K}$, EF with subsampling procedure described in Appendix~\ref{suppl-sec:consist} is consistent.
\begin{theorem}\label{Theorem}
Suppose the subsample used to build each tree in an ensemble forest is drawn from different subjects of the augmented data and the following conditions hold:
(i) Bounded covariates: Features $\bm{X}_i$ and the site indicator $S_i$ are independent and have a density that is bounded away from 0 and infinity.
(ii) Lipschitz response: the conditional mean function $\mathbb{E}[ \mathcal{T}|\bm{X}=\bm{x},S=1]$ is Lipschitz-continuous.
(iii) Honest trees: trees in the random forest use different data for placing splits and estimating leaf-wise responses.
Then $\widehat \mathcal{T}_{\text{EF}}(\bm{x},1) \overset{p}{\to} \tau_{1}(\bm{x})$, for all $\bm{x}$, as $\min_k n_k \to \infty$. Hence, $\widehat \tau_{\text{EF}}^*(\bm{x}) \overset{p}{\to} \tau_1(\bm{x}).$
\end{theorem}
The conditions and a proof of Theorem \ref{Theorem} is given in Appendix~\ref{suppl-sec:consist}.
To demonstrate the consistency properties of our methods, we add in Appendix~\ref{suppl-sec:sim} oracle versions of ET and EF estimators, denoted as ET-oracle and EF-oracle, which use the ground truth of local models $\{\tau_k\}_{k=1}^K$ in estimating $\{\widehat \omega_k\}_{k=1}^K$.
This removes the uncertainty in local models.
The remaining uncertainty only results from the estimation of the ensemble weights, and we see both oracle estimators achieve minimal MSE.
Section~\ref{sec:simulation} gives a detailed evaluation of the finite sample performance.
\begin{figure*}[tb
\centering
\begin{subfigure}{0.49\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/plt_ct500_tau_2grp_fair_mseRatio.pdf}}
\caption{}
\end{subfigure}
\begin{subfigure}{0.49\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/plt_ct500_tau_cont_fair_mseRatio.pdf}}
\caption{}
\end{subfigure}
\vspace{-0.3cm}
\caption{
Box plots of MSE ratios of CATE estimators, respectively, over LOC, for \textbf{(a) discrete grouping} and \textbf{(b) continuous grouping} across site.
Different colors imply different estimators, and x-axis, i.e., the value of $c$, differentiates the scale of global heterogeneity. The red dotted line denotes an MSE ratio of 1.
MA performance is truncated due to large MSE ratios.
The proposed ET and EF achieve smaller MSE ratios compared to standard model averaging or ensemble methods and are robust to heterogeneity across settings.
}
\vspace{-0.3cm}
\label{fig:sim_box}
\end{figure*}
\section{Simulation Study}
\label{sec:simulation}
Monte Carlo simulations are conducted to assess the proposed methods. We specify $m(\bm{x}, k)$ as the conditional outcome surface and $\tau(\bm{x}, k)$ as the conditional treatment effect for individuals with features $\bm{x}$ in site $k$. The treatment propensity is specified as $e(\bm{x}) = \Pr(Z=1|\bm{X}=\bm{x})$.
The potential outcomes can be written as $Y_i = m(\bm{X}_i, S_i) + \{ Z_i - e(\bm{X}_i) \} \tau(\bm{X}_i, S_i) + \epsilon_i$, following notations in \citet{robinson1988root,athey2016recursive,wager2018estimation,nie2020quasioracle}.
The mean function is $m(\bm{x}, k) = \frac{1}{2} x_1 + \sum_{d=2}^4 x_d +(x_1 - 3) \cdot c \cdot U_k$, and the treatment effect function is specified as
$$ \tau(\bm{x}, k) = \mathbbm{1}\{x_1 > 0\} \cdot x_1 +(x_1 - 3) \cdot c \cdot U_k,$$
where $z=0,1$, $U_k$ denotes the global heterogeneity due to site-level confounding, controlled by a scaling factor $c$, and $\epsilon_i \sim N(0, 1)$.
Features follow $\bm{X}_i \sim {N}(\bm{0},\bm{I}_D)$, where $D=5$, and are independent of $\epsilon_i$.
The simulation setting within each site (with $k$ fixed) is motivated by designs in \citet{athey2016recursive}. Features in $\tau$ are determinants of treatment effect while those in $m$ but not in $\tau$ are prognostic only.
The data are generated under a distributed data networks.
We assume there are $K=20$ sites in total, each with a sample size $n=500$.
In our main exposition, we consider an experimental study design where treatment propensity is $e(\bm{x}) = 0.5$, i.e., individuals are randomly assigned to treatment and control.
Variations of the settings above are discussed, with results presented in Appendix~\ref{suppl-sec:sim}.
\textbf{Global heterogeneity: discrete and continuous.}
Two types for global heterogeneity are considered by the choice of $U_k$.
For \textbf{\emph{discrete grouping}}, we assume there are two underlying groups among the $K$ sites $U_k \sim Bernoulli(0.5)$. Specifically, we assume odd-index sites and even-index sites form two distinct groups $\mathcal{G}_1 =
\{1, 3, \dots, K-1\}$; $\mathcal{G}_2 =
\{2, 4\dots, K\}$ such that $U_{k\in\mathcal{G}_1} = 0$ and $U_{k\in\mathcal{G}_2} = 1$.
Sites from similar underlying groupings have similar treatment effects and mean effects, while sites from different underlying groupings have different treatment effects and mean effects.
For \textbf{\emph{continuous grouping}}, we consider $U_k \sim Unif[0,1]$.
We vary the scales of the global heterogeneity under the discrete and continuous cases, respectively, with $c$ taking values $c \in \{0,0.6,1,2\}$. A $c=0$ implies all data sources are homogeneous.
In other words, Assumption~2 is satisfied when $c = 0$ but not when $c > 0$.
\textbf{Compared estimators and evaluation.} The proposed approaches ET and EF are compared with several competing methods.
\textbf{LOC:} A local CT estimator
that does not utilize external information.
It is trained on $\mathcal{I}_1$ only, combining training and estimation sets.
\textbf{MA:} A naive model averaging method
with weights ${\omega}_{k}^{\text{MA}} = 1/k$. This approach assumes models are homogeneous.
\textbf{EWMA:}
We consider a modified version of EWMA that can be used for CATE.
We obtain an approximation of $\tau_1(\bm{x})$ by fitting another local model using the estimation set of site 1, denoted by $\widetilde\tau_1(\bm{x})$.
Its weights are given by $${\omega}_{k}^{\text{EWMA}} = \frac{\exp\{- \sum_{i \in \mathcal{I}_1^{(2)}}(\widehat\tau_k(\bm{x}_i) - \widetilde\tau_1(\bm{x}_i))^2\} }{ \sum_{\ell=1}^{K} \exp\{- \sum_{i \in \mathcal{I}_1^{(2)}}(\widehat\tau_\ell(\bm{x}_i) - \widetilde\tau_1(\bm{x}_i))^2\} }.$$
\textbf{STACK:} A stacking ensemble, which is a linear ensemble of predictions of several models \citep{breiman1996stacked}.
To our end, we regress $\widetilde\tau_1(\bm{x})$ on the predictions of the estimation set in site 1 from each local model, $\{\widehat\tau_1(\bm{x}), \dots, \widehat\tau_k(\bm{x}) \}$. The stacking weights are not probabilistic hence not directly interpretable.
We report the empirical mean squared error (MSE) of these methods over an independent testing set of sample size $n_{te}=2000$ from site 1.
$\mbox{MSE}(\widehat{\tau}) = n_{te}^{-1}\sum_{i=1}^{n_{te}} \{ \widehat{\tau}(\bm{x}_i) - \tau_1(\bm{x}_i) \}^2. $
Each simulation scenario is repeated for 1000 times.
Experiments are performed on a 6-core Intel Xeon CPU E5-2620 v3 2.40GHz equipped with 64GB RAM.
\begin{table}[tb]
\centering
\caption{MSE ratios of EF over LOC. As $n$ increases, model averaging becomes more powerful due to better estimation of $\tau_k$, and is more pronounced when $c$ is small.}
\label{fig:ratio}
\resizebox{0.9\columnwidth}{!}{
\begin{tabular}{@{}cccccc@{}}
\toprule
\multicolumn{1}{l}{} & & $c=0$ & $c=0.6$ & $c=1$ & $c=2$ \\ \midrule
\multirow{3}{*}{\shortstack{Discrete\\ grouping}} & $n=100$ & 0.57 & 0.59 & 0.61 & 0.59 \\
& $n=500$ & 0.12 & 0.17 & 0.17 & 0.16 \\
& $n=1000$ & 0.07 & 0.12 & 0.12 & 0.13 \\
\multirow{3}{*}{\shortstack{Continuous\\ grouping}} & $n=100$ & 0.54 & 0.59 & 0.63 & 0.69 \\
& $n=500$ & 0.11 & 0.24 & 0.31 & 0.34 \\
& $n=1000$ & 0.08 & 0.17 & 0.21 & 0.26 \\ \bottomrule
\end{tabular}
}
\vspace{-0.1cm}
\end{table}
\begin{figure*}[tb]
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_cf_ni500_et_2grp.pdf}
\caption{}
\end{subfigure}
\begin{subfigure}{0.325\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_cf_ni500_ef_2grp_pred.pdf}
\caption{}
\end{subfigure}
\begin{subfigure}{0.37\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_wts_sim_2grp_updateLegend.pdf}
\caption{}
\end{subfigure}
\medskip
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_cf_ni500_et_cont.pdf}
\caption{}
\end{subfigure}
\begin{subfigure}{0.325\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_cf_ni500_ef_cont_pred.pdf}
\caption{}
\end{subfigure}
\begin{subfigure}{0.37\textwidth}
\centering
\includegraphics[width=\linewidth]{figures/plt_sim_wts_sim_cont_updateLegend.pdf}
\caption{}
\end{subfigure}
\vspace{-0.3cm}
\caption{
Visualization of simulation
results under \textbf{discrete grouping (a,b,c)} and \textbf{continuous grouping (d,e,f)} when $c=1$. (a) and (d) visualize the proposed ETs where the site indicator and $X_1$ are selected as splitting variables, which is consistent with the underlying data generation process.
(b) and (e) show the predicted treatment effects of the proposed EFs varying $X_1$ in each site, marginalized over all other features. (b) is arranged according to the true grouping, odd sites versus even sites.
The plot recovers the pattern of local and global heterogeneity.
(c) and (f) plot the interpretable model averaging weights in EFs over $X_1$.
The weights of site 1 have a relatively large contribution to the weighted estimator while models from other sites have different contributions for different $X_1$ depending on their similarity in $\tau(\bm{x},k)$ to that in site 1.
Corresponding ET and EF show consistent patterns and recover the true grouping.
}
\label{fig:sim_visual}
\vspace{-0.3cm}
\end{figure*}
\textbf{Estimation performance}.
Figure~\ref{fig:sim_box} shows the performance of the proposed estimators and the competing estimators, using LOC as the benchmark.
The proposed ET and EF show the best performance in terms of the mean and variation of MSE among other estimators when $c > 0$, and comparable to equal weighting MA when $c = 0$.
Although, a forest is more stable than a tree in practice,
both ET and EF give similar results because the true model is relatively simple and can be accurately estimated by a single ensemble tree under the given sample size.
Although asymptotically consistency, under finite sample, bias exists in local models and leads to biased model averaging estimates.
While explicit quantification of bias and variance remains challenging due to extra uncertainty carried forward from the local estimates, we demonstrated that the proposed estimators can improve upon the local models under small sample size via Table~\ref{fig:ratio}.
It shows the MSE ratio of EF over LOC as a measure of gain resulting from model averaging by varying $n =100, 500, 1000$.
The decrease in MSE ratio as $n$ increases, regardless of the choice of $c$, is consistent with our asymptotic results in Theorem~\ref{Theorem}.
This is due to a bias-and-variance trade-off in the ensemble that ensures a small MSE, which remains smaller than that in LOC despite varying $n$.
It also shows our method is robust to the existence of local uncertainty.
\textbf{Visualization of information borrowing.} Figure~\ref{fig:sim_visual} visualizes the proposed ET and EF.
In (a) and (d), the site indicator and $X_1$ appear as splitting variables in the ETs, which is consistent with the data generation process.
The estimated treatment effect (b) and (e) reveals the pattern of transportability across sites and with respect to $X_1$.
Panels (c) and (f) plot the model averaging weights in EFs over $X_1$. Site 1 has a relatively large contribution to the weighted estimator while models from other sites have different contributions at different values of $X_1$ depending on their similarity in $\tau(\bm{x},k)$ to that in site 1.
Corresponding ET and EF show consistent patterns.
\begin{figure*}[htp
\centering
\begin{subfigure}{0.2\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/plt_real_reward.pdf}}
\caption{}
\end{subfigure}
\begin{subfigure}{0.39\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/plt_real_pdp_ef_obs.pdf}}
\caption{}
\end{subfigure}
\begin{subfigure}{0.39\textwidth}
\centerline{\includegraphics[width=\linewidth]{figures/plt_real_bmi_wt_updatedLegend.pdf}}
\caption{}
\end{subfigure}
\vspace{-0.3cm}
\caption{
Application to estimating treatment effects of oxygen therapy on survival.
(a) Expected survival of treatment decision following different estimators.
The proposed EF shows the largest gain in improving survival rate, more promising than LOC and baseline.
(b) Estimated treatment effects varying duration and BMI, two important features in the fitted EF.
Patients with a BMI around 35, and a duration above 400 benefited the most.
(c) Visualization of data-adaptive weights in the estimated EF varying BMI.
Hospitals with a larger bed capacity tend to contribute more, the data of which might be more similar to hospital 1.
}
\vspace{-0.2cm}
\label{fig:real}
\end{figure*}
\textbf{Additional simulations.}
The detailed results of these additional simulations are included in Appendix~\ref{suppl-sec:sim}.
\emph{\textbf{1) Connection to supervised learning.}} The uniqueness of averaging $\tau_k(\bm{x})$ as opposed to supervised learning that averages prediction models $f_k(\bm{x})$ is that the outcome of $f_k(\bm{x})$ is immediately available.
In our case, an additional estimation step is needed to construct the model averaging weights.
We provide a comparison among estimators that utilize the ground truth $\{\tau_k(\bm{x})\}_{k=1}^K$ (denoted as ``-oracle'') when computing ensemble weights.
This mimics the case of supervised learning where weights are based on observed outcomes.
Oracle methods achieve smaller MSE ratios; the pattern is consistent with Table~\ref{fig:ratio}.
\emph{\textbf{2) Simulation under observational studies.}}
We also consider the treatment generation mechanism under an observational design.
Specifically, the propensity is given as $e(\bm{x}) = \text{expit}(0.6x_1)$. We consider both a correctly specified propensity model using a logistic regression of $Z$ on $X_1$ and a misspecified propensity model with a logistic regression of $Z$ on all $\bm{X}$. In general, the proposed estimators obtain the best performance with similar results as in Figure~\ref{fig:sim_box}. With the correctly specified propensity score model, the local estimator is consistent in estimating $\tau_k(\bm{x})$, the proposed framework is valid. When the propensity model is misspecified, extra uncertainty is carried forward from the local estimates, but the proposed estimators can still improve upon LOC. This is due to a bias-and-variance trade-off that leads to small MSE, which remains smaller than the local models.
\emph{\textbf{3) Covariate dimensions.}}
Besides $D=5$, we consider other choices of covariate dimension including $D=20, 50$. With a higher dimension, the MSE ratio between the proposed estimates and LOC estimates increases but the same pattern across methods persists.
\emph{\textbf{4) Unequal sample size at each site.}}
In the distributed date network, different sites may have a different sample size $n_k$. Those with a smaller sample size may not be representative of their population, leading to an uneven level of precision for local causal estimates. We consider a simulation setting where site 1 has a sample size of $n_1=500$ while other site $n_2,\ldots,n_K$ has a sample size of 200. Results show that the MSE ratio between the proposed estimates and LOC estimates increases compared to the scenario where the sample size in all sites are 500. However, the proposed estimators still enjoy the most robust performance.
This also shows our method is robust to the existence of local uncertainty.
\emph{\textbf{5) Different local estimators.}} We stress that other consistent estimators could be used as the local model. Options such as causal forest \citep{wager2018estimation} are explored varying the sample size at local sites. Similar performance is observed as in Figure~\ref{fig:sim_box}.
\emph{\textbf{6) Further comparisons to non-adaptive ensemble.}} Here we provide a brief discussion of the implications of the proposed method and how it differs from non-adaptive methods such as stacking.
Although unrealistic, when the true weights are non-adaptive, the performance may be similar. Plus, our learned weights can be used to examine adaptivity, as shown in Figure~\ref{fig:sim_visual}(c,f) and Figure~\ref{fig:real}(c).
Stacking is shown to be more robust than non-adaptive model averaging in case of model misspecification. See discussion in \citet{clarke2003comparing}.
Our additional simulation results show that in case of a large global heterogeneity, as $c$ increases, the heterogeneity across sites gets larger, reducing the influence of important covariates on heterogeneity, hence the weights become more non-adaptive. However, the proposed methods still enjoy a comparable performance to STACK, which further indicates the robustness of the proposed methods.
\section{Example: a Multi-Hospital Data Network}
\label{sec:application}
Application with contextual insights is provided based on an analysis of the eICU Collaborative Research Database, a multi-hospital database published by Philips Healthcare \citep{pollard2018eicu}.
The analysis is motivated by a recent retrospective study that there is a higher survival rate when SpO$_2$ is maintained at 94-98\% among patients requiring oxygen therapy \citep{van2020search}, not ``the higher the better''.
We use the same data extraction code to create our data.
We consider SpO$_2$ within this range as treatment ($Z=1$) and outside of this range as control ($Z=0$).
A total of 7,022 patients from 20 hospitals, each with at least 50 patients in each treatment arm, are included with a randomly selected target (hospital 1).
Hospital-level summary information is provided in Appendix~\ref{suppl-sec:real}.
Patient-level features include age, BMI, sex, Sequential Organ Failure Assessment (SOFA) score, and duration of oxygen therapy.
The outcome is hospital survival ($Y=1$) or death ($Y=0$).
Figure~\ref{fig:real} visualizes the performance of EF-based estimated effect of oxygen therapy setting on in-hospital survival.
CT is used as the local model with propensity score modeled by a logistic regression.
Figure~\ref{fig:real}(a) shows the propensity score-weighted \textbf{average survival} for those whose received treatment is consistent with the estimated decision.
Specifically, the expected reward is given by $$\frac{\sum_i Y_i 1(Z_i = Z^{est}_i) / \pi(Z_i,\bm{X}_i)}{\sum_i 1(Z_i = Z^{est}_i) / \pi(Z_i,\bm{X}_i)},$$ where $Z^{est}_i = 1(\widehat\tau>0)$ denotes the estimated treatment rule and $\pi(Z_i,\bm{X}_i)$ is the probability of receiving the actual treatment.
We provide expected reward for the 1) observed treatment assignment (baseline), 2) LOC-based rule, and 3) EF-based rule.
The treatment rule based on our method can increase mean survival by 3\% points compared to baseline, and is more promising than LOC.
In the fitted EF,
the hospital indicator is the most important, explaining about 50\% of the decrease in training error.
Figure~\ref{fig:real}(b) shows the estimated CATE varying two important features, BMI and oxygen therapy duration.
Patients with BMI around 36 and duration above 400 show the most benefit from oxygen therapy in the target SpO$_2$ range.
Patients with BMI between 20 and 30 and duration around 200 may not benefit from such alteration.
Figure~\ref{fig:real}(c) visualizes
the
data-adaptive weights $\omega_{k}(\bm{x})$ in the fitted EF with respect to BMI for different models, while holding other variables constant. The weights of hospital 1 are quite stable while models from other sites may have different contribution to the weighted estimator for different values of BMI.
Judging from hospital information
in Appendix~\ref{suppl-sec:real}, hospitals with a larger bed capacity tend to be similar to hospital 1, and are shown to provide larger contributions.
In this distributed research network, different hospitals have a different sample size.
For sensitivity analysis, we consider a weighting strategy to adjust for the sample size of site $k$.
Results show similar patterns as in Figure \ref{fig:real}. Detailed results
are provided in Appendix~\ref{suppl-sec:real}.
The real-data access is provided in Appendix~\ref{suppl-sec:code}.
\section{Discussion}
\label{sec:disc}
We have proposed an efficient and interpretable tree-based model averaging framework for enhancing treatment effect estimation at a target site by borrowing information from potentially heterogeneous data sources. We generalize standard model averaging scheme in a data-adaptive way such that the generated weights depend on subject-level features.
This work makes multi-site collaborations and especially treatment effect estimation more practical by avoiding the need to share subject-level data.
Our approach extends beyond causal inference to estimating a general $f(\bm{x})$ from heterogeneous data.
Unlike in classic model averaging where prediction performance can be assessed against observed outcomes or labels, treatment effects are not directly observed.
While our approach is guaranteed to be consistent under randomized studies,
the weights are estimated based on expected treatment effects, hence relying on Assumption 1 (unconfoundedness) to hold. It may be a strong assumption in observational studies with unmeasured confounding.
\section*{Acknowledgments}
This research was supported in part by the Competitive Medical Research Fund of the UPMC Health System and the University of Pittsburgh Center for Research Computing through the resources provided.
The authors thank Gong Tang and Yu Wang for insightful discussion.
|
\section{Introduction}
Deep neural networks (DNNs) have been at the core of many application breakthroughs \cite{alexnet_2012, nature_dl_2015, nature_alphago_2017, bert_2019}. They are transitioning from the cloud to the edge because of privacy issues, the need for real-time responses, and lack of network connectivity. One of the main challenges to enable efficient DNN inference is the ever-increasing number of parameters. Over the past decade, the number of DNN parameters has gone from millions to billions and is projected to reach 1 trillion parameters within the next decade.
To bring these applications (computer vision, natural language processing, and anomaly detection) to the edge and closer to the data source, we need to reduce the compute and memory footprints of DNN inference. Through quantization, parameters for DNN can be transformed into a lower bit-precision to support a smaller memory footprint and lower power consumption. For example, quantization algorithms can convert DNN parameters from 32-bit floating-point (FP32) to 8 or lower bit-precisions with minimal loss of accuracy.
This paper presents the \emph{Quantization Guided Training (QGT)} method to tackle the problem of producing compact models while maximizing accuracy for a given model size. The term ``guided'' here refers to the training ability to adaptively nudge the model weights towards a more compression-tolerant optimum in the solution space of model parameters. Our philosophy is based on the notion that low-bit precision training represents training with additional dimensions presented by the bit-precision of the model parameters. Therefore, the DNN solution space can be significantly more complex, and, consequently, methods are needed to guide the search during training to arrive at a more near-optimal low-bit precision solution.
Fig.~\ref{fig_1} shows a high-level diagram of our proposed QGT method compared to a traditional QAT method. Using regularizers attached to the model graphs, QGT helps nudge weight values closer to quantized bins to reduce quantization errors. Such a result in DNN solution space epitomizes QGT's ability to guide low-bit-precision training. Our approach is fundamentally different from current Quantization Aware Training (QAT) methods in that we directly influence DNN training through regularizer terms added to the loss terms. Rather than perturbing the training by weight approximation \cite{krishna2018} or quantization noise \cite{fb_quant_noise}, QGT influences the loss function by penalizing solutions that do not quantize well.
\begin{figure}[t]
\centering
\includegraphics[width=0.9\linewidth]{Fig1.pdf}
\caption{Comparison of DNN training methods and optimized histogram of weight values. (a) standard quantization-aware training (QAT), (b) proposed quantization-guided training (QGT).}
\label{fig_1}
\end{figure}
Fig.~\ref{fig_1} also shows example histograms of weight values for a DNN layer. It is evident that the shape and distribution of the weight values are different between QAT and QGT approaches. QGT trained parameters are clustered around the bins defined by the respective regularizers. In this paper, we describe the QGT method to guide the DNN parameter values to these desired distributions.
Regularizers have been used in DNN training ~\cite{goodfellow_2016, alizadeh_2020}, even to target DNNs with binary-value weights~\cite{tang_2017, georges_2019}. The main novelties of our QGT approach are that, unlike these previous approaches that target the quantized weights~\cite{elthakeb_2019}, we focus on the dequantized weights, which circumvents the need to learn scale and intercept separately. Further, our approach can accommodate custom non-linear quantizations appropriate for custom hardware.
From a more practical perspective, QGT confers two main advantages over QAT approaches that are based on straight-through estimators (e.g., \cite{googlq_quantization_2017, qoogle_quant_whitepaper_2018}) and are becoming more prevalent: First, QGT enables the identification of quantization bottlenecks. When it comes to training compact models for deployment on resource-constrained devices it is critical to be able to identify any layers or blocks that are not amenable to quantization. QGT, by construction, transparently exposes such layers through the quantization error. Second, in practice, approaches that are less invasive to one's training pipeline are often more desired. Most QAT approaches often require substantial changes being made to the model. QGT, in contrast, is quite friendly to various training pipelines based on various deep-learning frameworks.
The rest of this paper is organized as follows: In Section 2 we discuss similar approaches and the motivation for our approach. In Section 3 we provide the details of the QGT method. Section 4 presents some results based on image classification tasks, including a visual wakeup case study using a person detection model. We describe the research impact of QGT, and finally, in Section 5, we present conclusions to our current work.
\section{Related Work}
Many model compression methods deal with efficient parameterization, wherein model architectures are configured with a smaller number of parameters \cite{Sandler2018, efficientnet2019, shufflenet2017}. Similar methods to lower parameter count include fine-tuning steps such as pruning \cite{HaoLi2016, SongHan2016}, sparsity training \cite{Louizos2017} and weight sharing \cite{Turc2019} that remove individual weights and reduce both memory footprint and inference time of the model. Other approaches include knowledge distillation \cite{Hinton2015} that trains a compressed model using a teacher-student pair. Other hybrid approaches include the \emph{Lottery Ticket} method \cite{Frankle2018} that combines architecture search, sparsity training, and pruning to arrive at a compressed model.
Quantization, on the other hand, is a different compression method to lower the bit-precision for DNN parameters. Most quantization approaches are post-training quantization (PTQ) \cite{nayak2019,krishna2018,dinh2020}, where the DNN parameter values are assigned to quantized bins without re-training. Compared to quantization-aware training (QAT), PTQ is not as optimal because optimizations through training allow for a more comprehensive search of parameter values to achieve the best DNN accuracy. With QAT, the weights are quantized during training and the gradients are approximated with the straight-through estimator (STE). However, QAT approaches \cite{krishna2018,fb_quant_noise,ibm_resnet_quant_2018} requires explicit use of \emph{fake-nodes} to the model graph. Such approaches significantly constraint the model parameter space at low bit representations, which could impede training.
Some studies have sought to improve model performance with binary weights by introducing a regularizer term on the quantized weight variables~\cite{tang_2017, georges_2019}. Such an approach, however, does not lend itself well to non-binary representations and also non-linear quantization schemes. Elthakeb et al.~\cite{elthakeb_2019} alleviate the former issue by using a sinusoidal regularizer on the quantized weights.
Our proposed QGT method uses regularizers applied to the loss function to train weight values with the desired distribution and with low quantization errors. There is no dependence on the use of STEs, which greatly improves ease of implementation. Also, compared to previous similar regularizer-based approaches~\cite{tang_2017, georges_2019, elthakeb_2019}, since in QGT the regularizer is applied on the weight values directly rather than the quantized values, there is no need to learn the scale of the quantized weights separately. Using regularizers, QGT can enforce properties such as clustering of weight values into quantized bins, which can accommodate non-linear, hardware-specific quantizers.
QGT extends our earlier efforts \cite{bitnet_2018, gtc_2018} with simplified refinements in training hyperparameters and regularizers in order to explicitly enforces weight values toward the desired sparsity and clustering targets. A similar approach are also studied elsewhere by Choi et al.~\cite{Choi_2020}, who also uses a regularizer-based approach to train DNNs. Such a recent momentum in this research approach reinforces the benefits of a regularizer-based quantization-aware training.
\section{Quantization Guided Training}
\label{Section3}
This section presents the detailed formulation of QGT. QGT, like other QAT approaches, is a tensor-level algorithm. It can be applied to all or any subset of the model parameters and can accommodate both fixed- and mixed-precision computational graphs. While we describe QGT in the context of symmetric and asymmetric quantization schemes for their prevalence and presentation clarity in this paper, we stress that QGT can accommodate other more specialized quantizers, including the powers-of-two quantizer~\cite{bitnet_2018, gtc_2018}.
QGT is based on the premise that suitable model-parameter-based loss terms can be used as proxies for the quantized model performance. This is quite advantageous as it allows for retrofitting nearly any model-training pipeline into a QGT one with minimal overhead by adding these terms as regularizers. We refer to the proxy parameter-based losses used in QGT as \textit{quantization-error losses}. Note that the term ``error'' here refers to the deviation of the model parameter from its dequantized version and should not be confused with the loss of the quantized model.
Since quantization-error terms are purely parameter-based, they can be regarded as regularizers. This is not just a semantic distinction and has an important implication. Regularizer-based approaches are computationally more economical for the reason that regularizers are computed only once for each batch, irrespective of the size of the batch. Another main advantage of QGT being a regularizer-based approach from the perspective of model training is that parameter-based loss functions have much more stable gradients. Therefore, even though quantization-error terms do not precisely capture the quantized model performance, by the virtue of producing more steady back-propagated gradients, they result in a more stable training than approaches that rely on the direct back-propagation of the quantized-model loss gradients. Standard QAT approaches using gradients approximated with straight-through estimators (STE) \cite{krishna2018,fb_quant_noise,ibm_resnet_quant_2018} are examples of training with quantized model loss. Given this, model convergence when training under such QAT approaches may be susceptible to the variability of the model losses due to quantization, and potentially slower.
\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.32\columnwidth}
\centering
\includegraphics[width=1.0\linewidth]{ptq.png}
\caption{PTQ}
\label{fig2:ptq}
\end{subfigure}
~
\begin{subfigure}[t]{0.32\columnwidth}
\centering
\includegraphics[width=1.0\linewidth]{qat.png}
\caption{QAT}
\label{fig2:qat}
\end{subfigure}
~
\begin{subfigure}[t]{0.32\columnwidth}
\centering
\includegraphics[width=1.0\linewidth]{qgt.png}
\caption{QGT}
\label{fig2:qgt}
\end{subfigure}
\caption{Illustrations of (a) PTQ, (b) standard QAT and (c) QGT in model parameter space. Since the QGT loss is a combination of both task and quantization-error losses, the optimization trajectory can be guided towards an optimal solution without hard constraints.}
\label{fig_2}
\end{figure}
Having discussed the main idea behind QGT at a high level, we next present the mathematical formulation of QGT. We start by showing why quantization-error terms are reasonable proxies for the quantized model loss. We use the symbol $\mathbf{w}$ to denote model parameters and $\mathbf{w}_q$ for their dequantized counterparts. Mathematically, the quantizer, $\mathcal{Q}$, is an operator that acts on $\mathbf{w}$, and has the pseudo-inverse $\mathcal{D}$. This pseudo-inverse is, in fact, the dequantizer in the case of familiar quantizers. From this perspective, performance drop due to quantization can ultimately be attributed to the fact that $\mathcal{Q}$ fails to be an invertible transform, i.e., $\mathcal{D} \mathcal{Q} \neq \mathbb{I}$. The composite operator $\mathcal{D} \mathcal{Q}$ maps $\mathbf{w}$ to its dequantized counterpart, $\mathbf{w}_q$. As illustrated in Fig.~\ref{fig_2}, the set of tensors that coincide with their corresponding dequantized tensors form a subspace in the space of model parameter $\mathbf{w}$. Within this subspace, the operator $\mathcal{D}\mathcal{Q}$ becomes an identity operator, making the subspace a quantization-invariant subspace. The degree to which model parameters deviate from the quantization-invariant subspace correlates with the quantized model performance. QGT leverages this operator to obtain a distance from the quantization-invariant subspace.
Mathematically, it is most convenient to quantify this distance from the quantization-invariant subspace using the $L_2$ norm:
\begin{equation}
\mathcal{L}_{\mathcal{Q}, \mathbf{w}} = || \mathbf{w}_q - \mathbf{w} ||^2\,,
\end{equation}
where $\mathbf{w}_{q} = \mathcal{D}(\mathbf{q})$ with $\mathbf{q} = \mathcal{Q}(\mathbf{w})$ being the quantized weight. Note that $\mathbf{w}_q$ is of the same type as $\mathbf{w}$ (i.e., FP32), whereas, the quantized tensor, $\mathbf{q}$ is the one in the desired representation such as 4-bit fixed-point. To directly relate this $L_2$ loss term to the quantizer, one can write:
\begin{equation}
\mathcal{L}_{\mathcal{Q}, \mathbf{w}} \,=\,
||(\mathcal{D} \mathcal{Q} - \mathbb{I})\mathbf{w}||^2\,.
\end{equation}
QGT co-optimizes the loss terms $\mathcal{L}_{\mathcal{Q}, \mathbf{w}}$ (one for each model parameter tensor) alongside the original model loss, $\mathcal{L}$, in the course of training. The full training loss under QGT is:
\begin{equation}
\mathcal{L}_{\text{QGT}} = \mathcal{L} + \sum_{i} \lambda_i\mathcal{L}_{\mathcal{Q}_i, \mathbf{w}_i}\,.
\end{equation}
At the first glance, it may seem that QGT is just a Lagrange multipliers formulation of the same constrained optimization central to standard QAT approaches. The reason that this is not the case is that $\lambda_i$ parameters are not optimized and are treated as hyperparameters. Intuitively, they control how far the model can deviate from the quantization-invariant subspace when searching for a QGT-optimal solution. It is for this reason that we used the term co-optimization, and, as shown in Fig.~\ref{fig2:qgt}, why QGT is not a constrained optimization.
This formulation of QGT offers an important advantage: Since $\lambda_i$ parameters control the distance from the quantization-invariant subspace, it is possible to interpolate between an unconstrained training, which is effectively the same as PTQ as one always has to quantize at the end, and one akin to the forward pass of a standard QAT approach during training. This is illustrated in Fig.~\ref{fig_3}. When QGT's $\lambda$ parameters are small, QGT essentially reduced to PTQ. On the other hand, when $\lambda$ parameters are large, one effectively ends up with a hard QAT approach with constrained model space search. It is when $\lambda$ parameters are neither too small to be able to nudge model parameters, nor too large to overwhelm the task performance QGT becomes distinct from PTQ and QAT approaches. This flexibility is particularly useful when starting with a pre-trained model in cases where training is computationally too expensive or in situations where the model tends to get stuck when trained under a hard QAT approach. This also implies that QGT can be used as a fine-tuning augmented PTQ approach.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.8\linewidth]{ptq_qat_qgt_training.png}
\caption{QGT, depending on the $\lambda$ parameters, can serve as either PTQ ($\lambda = 0$ -- the red curve) or a standard QAT ($\lambda \gg 1$ -- the blue curve).}
\label{fig_3}
\end{figure}
Let us see how QGT can alleviate some of the main shortcomings of PTQ and standard QAT approaches: The main issue with PTQ is that, as conveyed in Fig.~\ref{fig2:ptq} by the shading, there is no guarantee that the projection of the most task-optimal point onto the quantization-invariant subspace is also the most task-loss optimal point within the subspace. Thus, one may see significant improvement in performance with even a little fine tuning, which QGT offers. As for standard QAT approaches, constraining the optimization to the quantization-invariant subspace (the forward pass in standard QAT approaches is the same as that of hard QAT) may take considerably longer to converge or, worse, get stuck. This issue becomes more pronounced at lower-bit representations where the quantization-invariant subspace shrinks significantly. Clearly, a less constrained optimization such as the one that QGT involves may find an off-subspace shortcut to the optimal point and evade getting stuck.
Any QAT approach without adequate training convergence produces a quantized model with sub-optimal performance, and QGT is no exception. The aspect that is specific to QGT, however, is that the quantized model performance is similar but not exactly the same as the model under training. The reason for this is that, as can be seen in Fig.~\ref{fig2:qgt}, it is only at convergence that the training trajectory in the model parameter space lands on the quantization-invariant subspace. This aspect allows for utilizing QGT not only as a versatile and flexible QAT approach, but also as an efficient fine-tuning-augmented PTQ technique by training for a few epochs.
\section{Results and Analysis}
In this section, we present experimental results to evaluate the effectiveness of QGT on image detection tasks. We benchmark our results by comparing accuracy versus model size, with the goal to minimize overall accuracy loss. We first examine QGT from the perspective of its ability to train models for standard benchmarks such as ImageNet and its variants. Then, we examine QGT from an application development perspective for a visual wakeup system. Our design goal is to reach below 100KB in model size.
For evaluation, we used a workflow \cite{LEIP} that builds upon a TensorFlow-based framework to implement all of our training and quantization approaches. Once trained, we can then compile and generate either a native binary that can run independently or with a TFLite runtime. This workflow allows quick evaluation on embedded processor because the compiler targets optimal code for target hardware.
\subsection{Benchmark Experiments}
Table~\ref{tbl_1} presents the results of a number of QGT experiments for various architectures. Note that the main purpose of these experiments is to evaluate QGT's utility on small and large architectures in the context of a range of tasks. We used the asymmetric quantizer in all of the experiments. We have specifically focused on four- and two-bit results as the performance of higher-bit post-train-quantized models (i.e., 8 and 16) are often close to that of their original floating-point models. In the experiments, the quantizer was applied, both, in per-tensor and per-channel (for convolutional and depth-wise convolutional layers) fashions. We do not apply QGT to biases and the trainable parameters ($\beta$ and $\gamma$ -- see~\cite{bn_paper_2015}) of the batch normalization layers. The reported top-1 accuracies were computed based on the dequantized weights with activations kept at four-byte floating point. Since the asymmetric quantization requires retaining slope and intercept, the sizes of per-channel-quantized models are slightly larger than their per-tensor counterparts quantized at the same bit-widths.
\begin{table}[ht]
\centering
\begin{tabular}{| c | c c c c c |}
\toprule
\multirow[c]{1}{*}[0pt]{\textbf{Model}} &
\thead{\textbf{Accuracy}\\ \textbf{(\% top-1)}} &
\thead{$\Delta$\\ \textbf{Accuracy}\\ \textbf{(\% top-1)}} &
\thead{\textbf{Size}\\ \textbf{(MB)}} &
\thead{$\Delta$\\ \textbf{Size}\\ \textbf{Reduction}} &
\thead{\textbf{Bit}\\ \textbf{Precision}} \\
\midrule
\hline
\multirow[c]{2}{*}[0pt]{\thead{MobileNetV1$^{*}$\\ ImageNet}}
& 70.4 & - & 4.25 & - & {\small FP32} \\
& \textbf{68.2} & -2.2 & 0.53 & 8x & 4 \\
\hline
\multirow[c]{2}{*}[0pt]{\thead{ResNet50\\ ImageNet}}
& 72.8 & - & 98 & - & {\small FP32} \\
& \textbf{70.1} & -2.7 & 12.25 & 8x & 4 \\
\hline
\multirow[c]{3}{*}[0pt]{\thead{MobileNetV1$^{\dagger}$\\ ImageNette\\ (grayscale)}}
& 79.1 & - & 3.3 & - & {\small FP32} \\
& \textbf{72.3} & -6.8 & 0.41 & 8x & 4 \\
& \textbf{77.3} & -1.8 & 0.45 & 7.3x & 4 {\scriptsize p.c.} \\
\hline
\multirow[c]{3}{*}[0pt]{\thead{MobileNetV1$^{\dagger}$\\ ImageNette\\ (RGB)}}
& 81.2 & - & 3.3 & - & {\small FP32} \\
& \textbf{78.9} & -2.3 & 0.45 & 7.3x & 4 {\scriptsize p.c.} \\
& \textbf{69.5} & -11.7 & 0.25 & 13.2x & 2 {\scriptsize p.c.} \\
\hline
\multirow[c]{2}{*}[0pt]{\thead{ResNet50$^{\ddagger}$\\ Eight Classes}}
& 87 & - & 94 & - & 32 \\
& \textbf{84} & -3.0 & 11.75 & 8x & 4 \\
\hline
\end{tabular}
\captionsetup{singlelinecheck=off}
\caption{Comparison of the FP32 and QGT-compressed performance and model sizes for a number of image classification tasks. The abbreviation ``p.c.'' stands for per-channel. $^*$ $\alpha = 1.0$ and input size of $(224, 224)$. $^{\dagger\dagger}$ $\alpha=0.5$ input size of $(128, 128)$. $^\ddagger$ Classification on an eight-class subset of the COCO-2014 dataset (person, bicycle, car, motorcycle, airplane, bus, train, truck).}
\label{tbl_1}
\end{table}
The results in Table~\ref{tbl_1} suggest that QGT is able to effectively compress small and large DNN architectures regardless of the task / dataset complexity. We show that 4-bit bit-precision achieve significant compression (7-8$\times$) while reducing only 1-3\% drop in accuracy. We note that per-channel quantization provides higher accuracy than its per-tensor counterparts at the same bit-precision targets. At 2-bit precision target, our early results are not conclusive as the solution space might require a more comprehensive search, or the model architecture might reach its capacity for the task / dataset.
\begin{figure}[ht]
\centering
\includegraphics[width=1.0\linewidth]{histogram_overlay_2.pdf}
\caption{Comparison of kernel histograms of MobileNet V1 with $\alpha=0.5$ trained on the 10-class ImageNette dataset with (salmon) and without QGT (pale blue) at convergence. The bottom left histogram is the kernel of the dense layer.}
\label{mobilenetv1_hitograms}
\end{figure}
To see why QGT, in spite of the simplicity of its formulation is so effective, it is instructive to compare the histograms of a model parameters trained under QGT against those of its base floating-point model. Fig.~\ref{mobilenetv1_hitograms} presents several histograms (from the 27 convolutional kernels plus the final dense layer) of the MobileNetV1 model trained on the ten-class ImageNette task. The salmon-color histogram is the 4-bit per-tensor asymmetric dequantized trained model under QGT, and the pale blue histograms is that of the base floating point model. We make a number of important observations: First and perhaps most obviously, since the model trained under 4-bit asymmetric per-tensor QGT, we end up with the binning of the dequantized weight tensor entries into $2^4$ bins. Second, in most cases, it appears that the trained model under QGT converges to distributions that closely resemble their base-model counterparts. This seems to be the case when the weight histogram shape retains the bell shape of its initialization. This, perhaps, can be attributed to the fact that such tensors lack a subset of entries with oversized relevance to inference entailing large gradients that bring about homogeneous distortion. Third and related to the earlier point, the dequantized weight tensor histogram deviates significantly when the floating-point weight histogram is rather too distorted compared to its originally initialized distribution. These observations further bolster the flexibility and effectiveness of QGT.
\subsection{Wakeup Systems}
\label{section_4:wakeup systems}
Wakeup systems are good example applications that can best benefit from QGT trained models. With a low-cost compute platform, savings in memory footprint becomes important to support the limited on-chip memory and processing capability. Furthermore, wakeup systems are always on, and as such, low power consumption and low false alarms are critical requirements. For this paper, we focus on a computer vision use case of identifying whether a person is present in the image or not. Applications for such a person detection model include surveillance/security in entryways and passenger detection for in-vehicle use.
In our study, we focus on the MobileNet (V1 and V2) architecture. Person detection models for visual wakeup systems have been previously reported at 8-bit precision at 208KB using MobilenetV1 with depth multiplier 0.25, and 290KB using MobilenetV2 with depth multiplier 0.35 \cite{visual_wake_words}. Typical edge processors / microcontrollers for wakeup systems have extremely limited on-chip memory (100-320KB SRAM) and flash storage (up to 1MB). The DNN model parameters and associated inference code have to fit in memory buffer, with sufficient allocation for buffers for input/output data. In this paper, we push the envelope further to achieve a smaller DNN footprint to support additional models that can be processed concurrently.
To train the MobileNet models using QGT, we leverage the COCO-2014 dataset for sample labeled images for person and non-person categories, much like the Visual Wakeup dataset \cite{visual_wake_words}. Fig. \ref{instances} shows example images for small and large pixel on target person object (0.5\% and 10\% of the image, respectively). We evaluated the dataset for images with a minimum of approximate 100 vertical pixels on the person object, which is roughly 10\% of the VGA sized images in COCO-2014. This is done to match our camera resolution (160$\times$120) at the anticipated target distance to objects in our application use. Specifically, when the VGA sized image is resized to our camera resolution during training, we need to make sure there is physically enough texture and shape information.
\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.49\columnwidth}
\centering
\includegraphics[width=1.0\linewidth]{instance_0.5_percent.pdf}
\caption{\scriptsize Small person object below 0.5\% of image}
\label{0p5percent_person}
\end{subfigure}~
\begin{subfigure}[t]{0.49\columnwidth}
\centering
\includegraphics[width=0.89\linewidth]{instance_10.0_percent.pdf}
\caption{\scriptsize Large person objects above 10\% of image}
\label{10percent_person}
\end{subfigure}
\vspace{0.25cm}
\begin{subfigure}[b]{0.65\columnwidth}
\centering
\includegraphics[width=0.99\linewidth]{coco_person_hist_plot.pdf}
\caption{\scriptsize Histogram person objects sizes - normalized area, largest instance (blue) and all instances (gray) containing person}
\label{coco_person_histogram}
\end{subfigure}
\vspace{-8pt}
\caption{Sample COCO-2014 images for (a) small and (b) large person size, with normalized distribution in dataset (123,287 total, 66,608 with at least one person).}
\label{instances}
\end{figure}
As shown in Fig. \ref{coco_person_histogram}, over 60\% of the positive images contain a largest instance of a person that is smaller than 10\% of the image. With a size threshold of 10\%, over 60\% of the images containing a person have to be excluded. From this, we train our MobileNet models with assigned labels (person / non-person), while addressing class imbalance \cite{Buda2018} between the two classes by undersampling the non-person images and adjusting the operating thresholds of the final classification layer.
We evaluate the person detection models trained with QGT with different target bit precision to demonstrate the effectiveness of training methodology. Our goal is show the size reduction at low bit-precision, with minimal drop in accuracy. We selected the MobileNet (V1 and V2) architecture, with 0.25 depth multiplier for comparison purposes.
We first established a baseline floating point (FP32) model trained to convergence. We use PTQ to quantize the baseline FP32 model to 4bit and 2bit precision. Then we train the models with a sweep of QGT lambda hyperparameter (see Section \ref{Section3}), also with 4-bit and 2-bit target. We explored both per-tensor and per-channel quantization schemes with QGT. Since per-channel provided better compression ratio and for clarity-sake, we show only per-channel results. In our experiments, we found that bias tensors are more sensitive to quantization, and as such, we left bias tensors untouched. Since bias tensors are small with respect to number of tensor elements, the overall impact to memory footprint is negligible. Finally, we do fold in the batch-norm layer to evaluate the model accuracy and memory size. The sizes are calculated based on packing weight values, since there are no standard formats for sub 8-bit models.
Table \ref{tbl_2} shows the accuracy and size comparisons for the person detection model. We note that the accuracy levels at 4bits and 2bits (90.3\% and 87.3\%, respectively) for MobileNetV2 are only within 0.1 and 3\% drop from the FP32 baseline. When comparing to PTQ results at 1\% and 22\% drop, respectively, we find that QGT can help maintain accuracy with training for lower bit-precision. Similar general trend is observed for MobileNetV1. As a reference, earlier result from \cite{visual_wake_words} on person detection model was 85\% at 250KB size with 8-bit precision.
\begin{table}[ht]
\centering
\begin{tabular}{| c | c c c c c |}
\toprule
\textbf{Model} &
\thead{\textbf{Accuracy}\\ \textbf{(\%)}} &
\thead{$\Delta$\\ \textbf{Accuracy}\\ \textbf{(\%)}} &
\thead{\textbf{Size}\\ \textbf{(KB)}} &
\thead{$\Delta$\\ \textbf{Size}\\ \textbf{Reduction}} &
\thead{\textbf{Method,}\\ \textbf{Precision}} \\
\midrule
\hline
\multirow[c]{5}{*}{\thead{\textbf{MobileNet} \\ V1\\ ($\alpha=0.25$)}}
& 88.7 & - & 834 & - & FP32\\
& 72.2 & -16.5 & 123 & 6x & {\small PTQ}, 4bit \\
& 52.7 & -36.0 & 73 & 11.4x & {\small PTQ}, 2bit \\
& \textbf{87.9} & -0.8 & 123 & 6x & {\small QGT}, 4bit \\
& \textbf{82.0} & -6.7 & 73 & 11.4x & {\small QGT}, 2bit \\
\hline
\multirow[c]{5}{*}{\thead{\textbf{MobileNet} \\ V2\\ ($\alpha=0.25$)}}
& 90.4 & - & 1440 & - & FP32\\
& 89.1 & -1.3 & 133 & 10.8x & {\small PTQ}, 4bit \\
& 68.4 & -22.0 & 81 & 17.7x & {\small PTQ}, 2bit \\
& \textbf{90.3} & -0.1 & 133 & 10.8x & {\small QGT}, 4bit \\
& \textbf{87.3} & -3.1 & 81 & 17.7x & {\small QGT}, 2bit \\
\hline
\end{tabular}
\captionsetup{singlelinecheck=off}
\caption{Quantization results for person detector tiny models, showing superior QGT results over PTQ and baseline for accuracy and size.}
\label{tbl_2}
\end{table}
From a memory size perspective, QGT offers 17$\times$ smaller footprint compared to the FP32 baseline, and a 3$\times$ compression compared to the aforementioned 8-bit results \cite{visual_wake_words}. From a processing latency perspective, we are working with a number of hardware accelerators / SoC that supports sub 8bit processing (proprietary info). As a reference for this paper, on ARM A72 processor (Raspberry Pi4), we measured approximately 246 fps (frames per second) for the MobileNet V1 model. We ran on 8-bit configuration because the A72 processor does not have sub 8-bit acceleration support. In general, we see a \textasciitilde 5$\times$ latency improvements with 8-bit versus FP32 inferences.
\subsection{Analysis}
In this subsection, we offer additional insights on QGT based on our DNN training experiences and results.
\textbf{Impact of learning rate}. We evaluate QGT over DNNs with increasing depth and number of parameters. Our training results show the QGT's $\lambda$ hyperparameter that governs \emph{quantization-error losses} acts as an dynamic learning rate that is dependent to bit-precision. As such, QGT regulates learning in tandem with the global learning rate hyperparameter. One interpretation is that bit-precision is coupled with the learning capacity of the DNN (i.e., higher bit-precision can afford higher learning capacity, but at the cost higher memory footprint). In a sense, QGT regularizers is related to dynamic learning rate schedulers such as AdaGrad \cite{Duchi2011}. When we train with QGT, we can govern QGT's $\lambda$ and global learning rate hyperparameters to guide training towards an optimal solution space. That is, we can choose to train slowly to closely converge, or we can choose higher learning rate to move fast through the model parameter space. Future work will further explore the theoretical underpinnings of QGT regularization, with evaluations on larger datasets and deeper models.
\textbf{Impact of training time}. Most published research on model compression do not point out convergence speed. Admittedly, this aspect is very much depended on task and model complexity. Training time is also a function of available hardware allocated for training. Newer studies such as \cite{Cai2020,Li2020} are starting to consider training time as a part of the greener AI efforts to reduce carbon footprint. With QGT, we have the additional $\lambda$ hyperparameters that, in theory, can better reduce training time and guarantee convergence (see Section \ref{Section3}) with a guided search. Future work will include a more comprehensive study on training time.
\textbf{Impact on model size and capacity}. Limited on-chip memory will be a major constraint in deploying DNN models such as MobileNet on constrained edge processors. Results in our study using QGT to train and quantized models show that deployment of tiny vision models are possible, with sizes well below 100KB. To reach such model sizes at such low bit-precision, guided training approaches are important tools for the tiny ML community. Future studies can address model capacity to further explore hybrid bit-precision amongst the layers of the DNN.
\section{Conclusion}
We show that guided training maintains performance in high quantization regime. We validated our proposed Quantization Guided Training (QGT) works with a variety of deep neural networks and datasets, using a number of quantization schemes. Our method can be applied to hybrid methods with mixed bit-precision to achieve extreme compression ratio at low bit-precision. QGT imposes a soft DNN training constraint and can be used with other training-aware approaches, e.g. QAT (quantization aware training) and PTQ (post training quantization), and weight pruning. We also demonstrate the effectiveness with QGT trained model at 2-bit precision for visual wakeup application.
\bibliographystyle{ACM-Reference-Format}
|
\subsection{Twin boundary structure:}
\label{sec:TB_structures}
\Fig{TEM}a shows a high-resolution scanning transmission electron \blue{microscopy} (HRSTEM) image of the atomic structure of a \tb TB in a Ti-$0.3$ wt.\%O alloy that has been deformed at cryogenic temperatures \cite{chong2020}. The image has been obtained through high-angle annular dark-field scanning transmission electron microscopy (HAADF-STEM), as described in the Methods section. The structure features a relatively wide interfacial thickness compared to other common twin boundaries (cf., \figext{all_boundaries}). \blue{We observe that this interfacial width shows small fluctuations along the length of the TB, as will be discussed further below (and \notesup{more_exp})}. A Fast Fourier transform (FFT) of the HRSTEM image in the vicinity of the TB is plotted in the upper panel on the right side of \fig{TEM}c and shows peaks (cf., the peak circled in green) corresponding to the expanded interfacial region, which are located at positions distinct from those of the HCP twin variants (for higher resolution diffraction patterns, see \figext{FFT}). This observation suggests that there is well-ordered periodic structure formed at the TB which features an atomic arrangement distinct from the HCP phase of the bulk alloy.
To gain further insight into the nature of the interfacial structure we have undertaken atomistic and first-principles density-functional-theory (DFT) calculations to identify the lowest energy structure of the TB \blue{in elemental Ti (the role of oxygen will be discussed below).} The lowest-energy structure, with positions obtained from the DFT calculations, is shown in \fig{TEM}b in different projections, including the $[4\bar513]$ zone used in the HRSTEM image. The atoms are color coded using a common-neighbor analysis (CNA) \cite{honeycutt1987}, with gray corresponding to the parent $\alpha$-Ti HCP structure, and orange corresponding to a body-centered orthorhombic (BCO) crystalline structure that is a strained version of a known metastable polymorph of elemental Ti \cite{zarkevich2016}. The BCO structure is related to the well-known $\omega$ polymorph of Ti, as shown in the panel on the right side of \fig{TEM}b.
A comparison is given of the experimental and computed structures in \fig{TEM}c. The second panel from the left shows a simulation of an HRSTEM image formed from the DFT structure. It is noted that both the experimental and simulated image feature similar structural motifs including alternating planes containing either a periodic array of ``bright” spots or closely-spaced atomic columns parallel to the interface, which are structural features not observed in the regions away from the TB \blue{(see \figsups{4DSTEM}-\ref{figsup:HRSTEM_width})}. Further, the simulated FFT of the interfacial region derived from the calculations, shown in the lower panel on the right, contains extra spots at non-HCP positions consistent with the FFT of the experimental image. These spots can be identified as originating from the $(001)$ planes of the strained BCO structure, with an interplanar spacing of $\sim 3.04 \, \AA$. We do note that the experimental TB structure is observed to be slightly narrower than calculated by DFT, a result we rationalize as being due to differences in the relative (free) energies between the HCP and BCO structures for the zero-temperature calculations for pure Ti and room-temperature experiments in $\alpha$-Ti-O alloys, as discussed in \blue{\notesup{disjoining}}. Overall, the results summarized in \fig{TEM}c demonstrate striking similarity between the measured and calculated structures, providing experimental confirmation of the calculated structure, the origins of which we analyze next.
\subsection{ Twin boundary energy and excess properties:}
\label{sec:excess}
Further insight into the structure and energetic factors underlying the \tb TB structure for $\alpha$-Ti can be derived from the computational results summarized in \fig{unique}. The left panel shows the results of a search over \tb TB structures, performed using an evolutionary search algorithm \cite{zhu2018, oganov2006, lyakhov2013} based on the classical interatomic potential model of Hennig \et \cite{hennig2008} that has been fit to DFT energies and forces. The results plot the interfacial energy of all stable and metastable structures identified by the evolutionary search as a function \blue{of} the fraction of atoms added/removed from the bulk \tb planes joined to form the TB. The green circle and red star identify the lowest-energy BCO TB structure, which will hereafter be referred to as ``\tbBCOO", which is again illustrated in \fig{unique}b (after further relaxation by DFT). The results demonstrate that no addition or removal of atoms is required in the interfacial region to form the \tbBCO structure. We also note in \fig{unique}a, that there are a few other points with energies very close to the \tbBCO structure; these involve the same basic BCO interfacial atomic arrangement, but with slight distortions or relative displacements of the adjacent HCP crystals that raise the energy. The \tbBCO and these associated structures form a cluster of energy points in \fig{unique}a that are distinctly lower than all other identified TB structures, across the different values of the interfacial excess number of atoms. Also highlighted by the red circle in \fig{unique}a, is a higher-energy TB structure that we label ``\tbshufff", the DFT-minimized structure of which is shown in \fig{unique}c. \blue{Although this structure is considerably higher in energy for $\alpha$-Ti, we highlight it because it corresponds to a metastable structure with the same number of atoms and a structural motif distinct from the \tbBCO, and we find that it becomes lower in energy under tensile strain as discussed below. The crystallographic characteristics of different atomic structures of the \tb TB are detailed in \notesup{crystal}. }
Plotted in \fig{unique}d are the excess volume per area ($[V]_\text{N}$), excess interfacial energy ($\gamma$), and the trace of the interfacial stress ($\tau_{ij}= \frac{\partial \gamma}{\partial \varepsilon_{ij}}+\delta_{ij}\gamma$, where $\varepsilon_{ij}$ is the strain measured relative to the undeformed HCP structure, and $\delta_{ij}$ is the Kronecker delta). The values are tabulated in \tabext{excess} and plotted in \figext{energies} for \tb and other common TBs in Ti. Despite the lower value of $\gamma$ for the \tbBCO TB, it is seen to feature considerably higher excess volume and stress than the \tbshuff complexion. The magnitude of ($\tau_{xx}+\tau_{yy}$) in particular is highly noteworthy for the \tbBCO TB since it is more than an order of magnitude larger than the value of the interfacial energy itself, a result we rationalize below through a model for the BCO complexion as one that involves wetting of the interface by the BCO polymorph of Ti that is under tensile stress. The large values of the differences in excess volume and interfacial stress raise interesting possibilities for complexion transitions induced by strain, as we explore next.
\subsection{ Strain-induced complexion transitions:}
\label{sec:strain}
We explore this possibility using DFT calculations to compute the interfacial energy of the \tbBCO TB and \tbshuff complexions as a function of biaxial strain $\varepsilon_{\text{xx}}=\varepsilon_{\text{yy}}=\varepsilon$, where $x$ and $y$ refer to directions perpendicular and parallel to the tilt axis, respectively. In these calculations $\varepsilon$ is varied from $-2.5 \, \%$ (compression) to $7 \, \%$ (tension) and $\gamma$ as a function of $\varepsilon$ is computed from \eqn{GBE}.
Results of $\gamma$ versus $\varepsilon$ are plotted for the \tbBCO and \tbshuff TB complexions in \fig{transitions}a. \blue{These calculations are carried out using both free-surfaces (FS) and periodic boundary conditions (PBC) (see Methods)} The corresponding relaxed structures of the \tbBCO TB at representative strains are shown in \fig{transitions}b, highlighting changes in interfacial width induced by varying $\varepsilon$. We begin by considering tensile values of the strain and note that as $\varepsilon$ increases the value of $\gamma$ for the \tbBCO twin rises sharply, consistent with the large and tensile value of the interface stress. By contrast, $\gamma$ for the \tbshuff TB shows a weak decrease with increasing $\varepsilon$ near zero strain, consistent with its small and negative interfacial stress, and decreases more rapidly at larger positive values of $\varepsilon$. The two curves for $\gamma$ versus $\varepsilon$ cross at a biaxial strain of $\varepsilon=6.4 \, \%$, indicating a strain-induced interfacial phase transition from the \tbBCO to the \tbshuff complexion at this value of tensile strain. \blue{We note that the transition is first order, such that there is not a continuous transformation between the two complexions, i.e., the BCO complexion does not spontaneously transform to the shuffle complexion for strains above $6.4\, \%$, and vice versa below $6.4\,\%$ (i.e., these these phases exist as metastable states above or below the transformation point). } This first-order transition can be triggered not only by imposing biaxial strain, but also through hydrostatic or normal stress. Specifically, from the Gibbs adsorption equation for interfaces in crystalline materials \cite{frolov2012, cantwell2020}, the negative of the excess volume gives the rate of change of $\gamma$ with applied stress $\sigma_{\text{zz}}$ normal to the interface: $\partial \gamma / \partial \sigma_{\text{zz}} = -[V]_N$. The lower value of $[V_N]$ for the \tbshuff TB implies that a first-order transition from \tbBCO to this complexion can also be induced by applied compressive stress. The combination of compressive normal stress and tensile strain parallel to the interface would then act synergistically to induce this transition at lower stresses/strains.
Compared to the behavior under tension, the behavior under compressive biaxial strain is qualitatively different. As shown in \fig{transitions}a, application of compressive values of $\varepsilon$ leads initially to a decrease in $\gamma$ for the \tbBCO TB. However, as compressive strain is increased, the width of the interface increases and at an applied strain of approximately $\varepsilon=-1.4 \, \%$ we find that the entire supercell transforms to the BCO phase. This behavior is consistent with a solid-state wetting transition of the interface by the BCO polymorph structure. Specifically, as discussed in the \blue{\notesup{disjoining}}, $\gamma$ for the \tbBCO TB can be understood as reflecting a competition between (i) the energy per area to transform a region of HCP structure to BCO (which is strained relative to bulk), \blue{which is proportional to the energy difference $\Delta E$ between the bulk (strained) BCO and HCP structures}, and (ii) the change in interface energy when a narrow TB structure is replaced by the two BCO/$\alpha$ interfaces separated by distance $w$. The first term depends linearly on $w$ and the second generally non-linearly, as described by a \blue{so-called ``disjoining potential" (DP) \cite{lipowsky1987, fisher1985}. In this picture, for a fixed DP, the equilibrium value of $w$ will increase (decrease) with decreasing (increasing) values of $\Delta E$.} As discussed in \blue{\notesup{disjoining}}, if the \blue{DP} features a weak attractive minimum, the equilibrium value of $w$ will increase with increasing compressive strain, which lowers \blue{$\Delta E$}, until a critical strain where the width diverges, consistent with the calculated results \blue{(see \figsup{wet})}.
\blue{Further support of the DP theoretical framework for understanding BCO complexion formation and wetting is provided by DFT calculations employing an alternate exchange-correlation functional (GGA+U) that leads to increased values of $\Delta E$ relative to the GGA functional used for the results in \fig{TEM}. The same BCO complexion is predicted by GGA+U, but with a width that is smaller relative to GGA. This result is consistent with predictions of the DP theory, due to the higher value of $\Delta E$ for GGA+U (see \notesup{exchange}).}
\blue{Further support for the DP picture is provided by the experimental observations that $w$ shows small variations along the TB width. This would be consistent with the expected variations along the TB area in both the oxygen concentration, and the state of stress (strain) in the mechanically deformed sample. Both types of variations are expected to change $\Delta E$, which in turn would lead to changes in $w$. }
\blue{Finally, the DP formalism also provides a framework for understanding why the DFT results for pure Ti in \fig{TEM} predict an interfacial width larger than in the experimental sample with oxygen. DFT calculations presented in \notesup{oxygen} show that oxygen displays no energetic preference to segregate to the \tb TB, and that it raises the energy difference between BCO and HCP structures. Once again this effect should lead to smaller values of $w$ in samples with oxygen than in pure Ti, consistent with the results in \fig{TEM}. The DFT calculations also suggest that the fact that the \tb TB was only observed to form in samples with high oxygen content (and low deformation temperatures) is not due to the oxygen-segregation to the TB, but rather due to the oxygen's role in hardening the material (see \notesup{oxygen}). }
\subsection{\blue{Structural relationships between the polymorphs in $\alpha$-Ti:}}
\label{sec:omega}
\blue{We consider next the relation between the interfacial BCO complexion identified at the \tb TB and other relevant polymorphs of bulk Ti.} As illustrated in \fig{NEB}a and b, we identify from the relaxed TB structure the smallest conventional orthorhombic unit cell as corresponding to the red box in \fig{NEB}a. We form a bulk crystal structure based on this $12$-atom unit cell and perform a DFT geometrical relaxation keeping the unit cell dimensions parallel to the interface fixed at the dimensions found in the TB, while allowing the dimension normal to the interface to relax. The resulting structure is shown in \fig{NEB}b, which we will refer to in what follows as the ``interfacial BCO phase” and its energy provides a reference for the analysis that follows. We then allow a full geometric relaxation in DFT, yielding the strain-free BCO phase shown in \fig{NEB}c. Comparing the final relaxed BCO structure to the interfacial BCO phase, we find that the latter is under a state of tensile strain, corresponding to $\varepsilon_{\text{xx}}=0.007$ and $\varepsilon_{\text{yy}}=0.014$ relative to the strain-free structure. As indicated above, the fact that the interfacial BCO phase is under a state of tensile strain provides an explanation for the high values of the tensile interfacial stress computed for the \tbBCO TB.
For comparison, we also show in \fig{NEB}d the structure of the $\omega$ phase, illustrating the correspondence with the BCO phase. The orientation relationship for the $\omega$ phase relative to $\alpha$ in this representation is \blue{$(0001)_{\omega} \parallel (\bar{2}114)_{\alpha}$, $ [10\bar{1}0]_{\omega} \parallel [4\bar{2}\bar{2}3]_{\alpha}$}. Comparing \fig{NEB}(c) and (d) highlights that the two structures are related by homogeneous strains and atomic shuffles. Concerning the latter, we note that the periodicity of the atomic structure in the BCO phase repeats once every two $[0001]_{\omega}$ planes.
\blue{We next examine the relationship between these different phases by computing the minimum energy pathway (MEP) between the interfacial BCO and relaxed $\omega$ structures.} \Fig{NEB}e plots the energy versus reaction coordinate along the MEP. The (strained) interfacial BCO phase (corresponding to a zero value of the reaction coordinate) is connected by a barrierless path to the relaxed BCO phase (first minimum along the reaction path). \blue{This result is important because it establishes that the interfacial BCO phase is simply a strained version of the bulk BCO phase, and the lack of an energy barrier between them implies they are the same phase. By contrast, the} relaxed BCO phase is separated by a $9.1 \, \text{meV}/\text{atom}$ barrier from the relaxed $\omega$ phase, across a MEP that accomplishes homogeneous strains of $\varepsilon_{\text{xx}}=0.06$, $\varepsilon_{\text{yy}}=-0.09$, and $\varepsilon_{\text{zz}}=0.01$, as well as a series of atomic shuffles, to transform from the relaxed BCO to the $\omega$ phase. \blue{This result shows that BCO and $\omega$ are indeed separate phases, separated by an energy barrier along the MEP. Further, as shown by the DFT calculations in \figsup{DFV}, $\omega$ has a considerably higher energy than BCO under the biaxial strain state imposed in the \tb TB, such that there is no bulk driving force for $\omega$ to form at this interface.}
\section*{Outlook}
\label{sec:outlook}
The present work has identified an interfacial complexion in \tb TBs of $\alpha$-Ti that is characterized by a strong strain dependence of the interfacial free energy, and associated first-order interfacial phase transitions and solid-state wetting behavior under tensile and compressive biaxial loading, respectively. This behavior can be interpreted as arising from two key features of the interface complexion: (i) it displays a periodic crystalline structure that is linked by a barrierless energy path to a metastable polymorph of Ti (i.e., the BCO phase), and (ii) this polymorph has available to it a low-energy orientation relationship with $\alpha$-Ti, for the crystallography characteristic of the TB, leading to a low heterophase ($\alpha$/BCO) interface energy, at the expense of imposing a misfit strain on the polymorph (BCO) phase. We note that feature (i) is not uncommon and has been evidenced in $\beta-$Ti and other material systems \cite{Zhang2017, medlin2001}. However, what has not been reported, to the best of our knowledge, is the role that the strain required to accommodate such metastable polymorphs within the interface (i.e., ingredient (ii) above) plays in driving anomalous values of the excess interfacial quantities and associated complexion transitions. The presence of competing metastable polymorphs that are close in energy to the stable phase is common in many material systems, and the five-dimensional crystallographic space of interfaces provides numerous possibilities for accommodating these metastable structures with moderate misfit strains and low-energy orientation relationships. Therefore, formation of the class of polymorph complexions reported here, as well as the types of related interfacial phenomena identified in this work, could be expected to be encountered for other materials systems far more generally.
The findings also provide a framework for controlling features of interfaces that impact materials properties. For example, it has been observed experimentally that the formation of \tb deformation twins in Ti-O alloys correlates with fracture processes that underly a sharp decrease in ductility \cite{chong2020}. \blue{The correlation between observed cracks and the location of the \tb twins reported in Ref. \cite{chong2020} suggest that the large excess volumes and stresses reported here for this TB could enhance fracture and therefore contribute to embrittling the sample.} Thus, destabilization of the BCO complexion of this TB in favor of an alternate interfacial phase that can realize the benefits of twinning (plastic deformation and work hardening), without the detrimental effects associated with large excess stresses, could be beneficial in enhancing ductility.
\blue{More generally, such control of TB interfacial phases could impact other properties beyond those discussed specifically for Ti above. For example, the stabilization of complexions that can give rise to solid-state wetting transitions such as those demonstrated by the present calculations can provide pathways for phase transformations with lower nucleation barriers. Further, the formation of thick complexions like those found here are expected to have consequences for twin nucleation and growth, and also for TB/dislocation interactions that could have important consequences on strength and work hardening. }
\blue{In efforts aimed at control of interfacial phases,} the present work illustrates how the relative stability of competing complexions can be influenced by the free energy difference between stable ($\alpha$ in this case) and metastable polymorph (BCO in this case) phases. Such free energy differences can be tuned through alloying with solute species, in ways that can be predicted through \textit{ab initio} thermodynamics methods or, where appropriate databases are available, computational thermodynamics methods such as CALPHAD\cite{lukas2007}. Hence, for the class of interfacial complexions described in this work, there exists a unique opportunity to guide the design of the interface phases in much the same way that the community has used computational thermodynamics methods to guide the design of microstructures with desired phase combinations and transformations that can be accessed through thermomechanical processing. The present work thus provides a connection between bulk and interfacial phase diagrams that we expect can be exploited widely in materials design.
\section*{Methods}
\label{sec:methods}
\subsection{Computational methods:}
\label{sec:methods_comp}
DFT calculations are performed with VASP \cite{kresse1996} using the projector augmented wave (PAW) method \cite{kresse1999} within the generalized gradient approximation (GGA) exchange-correlation functional as parameterized by Perdew and Wang \cite{perdew1992} including the 3$p$ electrons as valence. A cutoff energy of $500 \, \text{eV}$ was used for the plane-wave basis set, and the Brillouin zone was sampled using the Methfessel-Paxton method \cite{methfessel1989} (ISMEAR=1 in VASP), with a smearing of $\sigma=0.15 \, \text{eV}$. For the twin boundary supercells, we used a k-point mesh of $6 \times 9 \times 1$, and $4 \times 6 \times 1$ for the calculations presented as a function of strain. The twin boundaries were studied using two different supercell geometries. \blue{In the first setup (i), which was used for all of the reported energies and excess quantities at zero applied strain}, we used a double-TB supercell, i.e., using two twin boundaries along the $z$-direction normal to the interface, to maintain periodicity in this direction with $\sim 38.2 \, \AA$ distance between twin boundaries. \blue{This setup contained $168$ atoms and hereafter is referred to as i.168.} The periodic length along $y=\langle 01\bar{1}0 \rangle$ (the direction parallel to the tilt axis) is $5.086 \, \AA$ and $7.489 \, \AA$ for $x=\langle 4\bar{2}\bar{2}3 \rangle$ (cf., \figext{all_boundaries}). For calculations using this supercell geometry, electronic structure self-consistency loops were terminated at an energy tolerance of $10^{-5} \, \text{eV}$, and in the structural relaxations we fixed the $x$ and $y$ dimensions parallel to the interface, adjusted the $z$ dimension to ensure zero normal stress, and relaxed all atomic positions to a force tolerance of $10 \, \text{meV}\AA^{-1}$. These settings were found to lead to convergence of total energies to approximately $1 \, \text{meV}/\text{atom}$ and TB energies to approximately $0.01 \, \text{J} \, \text{m}^{-2}$. In addition to the calculations for the \tb TB described above, we performed additional calculations for $\{11\bar{2}2\}$, $\{10\bar{1}2\}$, $\{11\bar{2}1\}$, and $\{10\bar{1}1\}$ TBs, using the same approach, with supercells characterized by a periodicity along the $x$ direction of $ 5.498\, \AA$, $6.890 \, \AA$, $ 9.749 \, \AA$, and $10.597 \, \AA$, respectively, and k-point density with the same density as for \tb, corresponding to $8 \times 9 \times 1$, $6 \times 16\times 1$, $4 \times 9 \times 1$, $4 \times 16 \times 1$ meshes, respectively (see \figext{all_boundaries}).
\blue{A second type of supercell geometry (ii), involving the use of free-surface boundary conditions, was used for the calculations of strain-dependent interface structures presented in \fig{transitions}b. They were also used to provide a basis for comparison of effects of boundary conditions on the TB energies calculated from the periodic supercells (cf., \fig{transitions}a and \tabext{excess}). The supercells with free surfaces had the dimensions of $7.490 \, \times 5.086 \, \times 110 \, \AA$ along $x=\langle 4\bar2\bar23 \rangle$, $y=\langle 01\bar10 \rangle$ and $(11\bar24)$ normal direction, respectively. A vacuum layer with thickness of $30 \, \AA$ was imposed between the surfaces. The rest of the calculation settings (including convergence criteria and k-point sampling) were the same as given above for the periodic supercell calculations. The interface energy of the single TB at each strain level is calculated by subtracting the total energy from the reference bulk cell with the same number of atoms divided by the TB area \blue{(cf., \tabext{excess})}. Two different system sizes with this setup, both with the same dimensions parallel to the TB plane, but different slab thicknesses in the direction normal to the TB were incorporated: one simulation cell contained $174$ atoms (ii.174), and featured a separation between twin and surfaces of $\sim 39.2 \,\AA$, and the other was $40\,\%$ thicker, with $242$ atoms (ii.242), and a separation between twin and free surfaces of $54.7 \,\AA$. }
\blue{In all, three different simulation cells have been used in the calculations (i.168), (ii.174) and (ii.242). For zero strain, all of the simulation cells, (i.168), (ii.174) and (ii.242) give rise to TB energies that agree to within $15 \, \text{mJ} \, \text{m}^{-2}$. The presence of the BCO complexion in the relaxed calculations is robust across all three simulation cells and system sizes, and the thickness of this interface differs by at most one atomic layer between the setup (i.168) and (ii.174) and by less than $1\,\AA$ between the setup (ii.174) and (ii.242) for zero applied strain. Additional calculations using setup (ii.174) were performed under applied compressive and tensile strains ranging between $-2\,\%$ to $3\,\%$, to investigate more fully the effect of the boundary conditions (cf., \fig{transitions}). For the tensile strains, where the interface width stayed narrow, results for thickness and interface energy showed very good agreement (to within $6 \,\AA$ and $30 \, \text{mJ} \, \text{m}^{-2}$, respectively), between (i.168) and (ii.174) supercells, suggesting that the different boundary conditions had minor effect on the calculated results. Under compressive strains, where the interface thicknesses grew quite large, the free surface boundary conditions were able to accommodate larger widths and gave rise to lower twin-boundary energies. For these compressive strains the free-surface boundary conditions were viewed to be more reliable and were featured in \fig{transitions}. Overall, these calculations establish that the key computational results used to reach the main conclusions in the paper are robust relative to the boundary conditions and system size.}
The grand-canonical TB evolutionary search is performed using the USPEX code \cite{oganov2006, lyakhov2013}. The details of this method are described in the work by Zhu \et \cite{zhu2018}. In this approach, various mutation operations including the displacement of atoms, insertion and removal of atoms from the TB and sampling of larger-area TB reconstructions are performed to predict the low-energy configurations. \blue{The setup for USPEX is made in a way that we start with the supercell with the TB and apply relative displacements of the two crystals on either side of the interface. In addition, we perform addition and removal of atoms to a sub-region of the structure near the interface, allowing atoms in this region to be relaxed while the rest of the atoms in the bulk regions away from the interface remain constrained. The morphology and the thickness of the interface is found to be insensitive to these constraints. The robustness of these results is validated by two analyses: (i) the obtained structures from the USPEX search have been further relaxed by adding $40 \, \AA$ of vacuum layer on the free surfaces and removing all constrains allowing all the atom positions to relax. No changes in the TB excess energies and interfacial width have been identified in this process; (ii) the same USPEX calculations were also performed around a wider sampling range of $25\,\AA$ subregion around the interface (compared to the $15\,\AA$ region used in the original search) which is allowed to relax during the search process while keeping all other simulation parameters and inputs the same. Both of these analyses validated the robustness of the results in identifying the identical minimum-energy structures with the same interfacial thickness and TB energy.} The USPEX analysis is performed with classical potential calculations at $0\,$K temperature using the LAMMPS \cite{plimpton1995} software. The modified embedded atom method (MEAM) potential of Hennig \et \cite{hennig2008} was used for evolutionary search calculations. This potential is able to capture the TB excess energy of the ground-state and metastable structures of \tb within $6 \,\, \text{mJ} \, \text{m}^{-2}$ accuracy. Relaxation was terminated when the norm of the forces on all atoms is less than $10^{-4}\,\text{eV}\,{\AA}^{-1}$.
Calculations of the MEP for the $\text{BCO} \rightarrow \omega$ transformation were performed using the $36$-atom supercell taken out from the non-HCP deformed region at the interface (cf., \fig{NEB}). The solid-state nudged-elastic-band (SS-NEB) method \cite{sheppard2012} , as implemented in VASP \cite{henkelman2015}, was used to identify the MEP and associated transition states. The SS-NEB method enables both atomic and cell volume relaxations throughout the MEP search. Calculations were performed using $8$ intermediate images starting from the BCO cell allowing both atomic and cell volume to relax to fully retrieve the $\omega$ phase. We first turned off climbing to verify the transition states and then turned it on to obtain the accurate barrier energy. Then, we fully relaxed the local enthalpy minimum (BCO phase) to verify its stability. The force criterion for SS-NEB convergence was set to be $10 \, \text{meV}\AA^{-1}$. For these calculations, we employed k-point sampling of $6 \times 9 \times 2$ and used the same exchange-correlation potential and plane-wave cutoff as listed above for the TB calculations.
Interfacial excess quantities corresponding to the common TBs in Ti were calculated by DFT as follows. For each structure corresponding to the local minimum of energy, as well as the metastable structure identified for \tb, the excess twin boundary energy ($\gamma$), excess volume per area ($[V]_\text{N}$), and two components of TB stress, $\tau_{xx}$ and $\tau_{yy}$, in the directions perpendicular and parallel to the tilt axis were calculated. These quantities were evaluated from DFT calculations following the equations below:
\begin{equation}
\begin{aligned}
\gamma= \frac{E_{2\text{TB}}-N \,E_{\text{bulk}}}{2A} , \\
[V]_\text{N}= \frac{V_{2\text{TB}}-N \, \Omega_{\text{bulk}}}{2A}
\end{aligned}
\label{eqn:GBE}
\end{equation}
\noindent where $E_{2\text{TB}}$, $E_{\text{bulk}}$, $V_{2\text{TB}}$, $ \Omega_{\text{bulk}}$, $N$ and $A$ are energy of double twin boundary cell, bulk energy per atom for HCP Ti calculated from the same size cell, volume of double twin boundary cell, bulk volume per atom calculated from the same size cell, number of atoms in the double twin cells and TB area, respectively. The factor of two in the denominators of \eqn{GBE} is due to the presence of two interfaces within the periodic supercells, which were used for the calculations of all of the excess-quantity values reported in this manuscript. When defining the TB stress tensor from DFT, we subtracted from the stress of double twin boundary cell constructed from the relaxed lattice dimensions in bulk the stress of the perfect same size (and k-point) supercell. Although this last contribution should be zero in theory for a relaxed box and atomic positions, a small residual stress exists in the perfect crystal because of finite numerical convergence with respect to the plane-wave basis and k-point sampling.
\blue{DFT calculations of the energetics of oxygen solutes in the $\alpha$, BCO, and $\omega$ bulk phases as well as the BCO phase under the strain state found in the TB interface were performed using $96$-atom supercells. The bulk supercells are constructed with lattice vectors parallel to $\text{x}: [2\bar1\bar10]$, $\text{y}: [01\bar10]$, and $\text{z}:[0001]$ for $\alpha$, $\text{x}: [100]$, $\text{y}: [010]$, and $\text{z}:[001]$ for BCO, and $\text{x}: [10\bar10]$, $\text{y}: [\bar12\bar10]$, and $\text{z}:[0001]$ for the $\omega$ phase, see \figsup{oxygen_bulk} for reference. A single oxygen atom is used in supercells with the dimensions $6 \,\times 2 \, \times 2$, $2 \,\times 2 \, \times 2$, and $2 \,\times 2 \, \times 4$ along the lattice directions of the orthogonal bulk $\alpha$, BCO, and $\omega$ cells, respectively with a $2 \times 4 \times 5$ k-point mesh. For the calculation of interaction energies between oxygen and the \tbBCO TB, we made use of the (i.168) supercell and the same k-point mesh, as described above. The convergence criterion and the rest of the DFT settings for the calculations of oxygen energetics in the bulk and at the TB interface are the same as used for the TB relaxations. }
\subsection{Experimental methods:}
\label{sec:methods_exp}
The Ti-$0.3$ wt.\%O alloy was provided by TIMET, UK. The initial material was argon arc melted and then forged into bars at $1125^\circ$C. The bars were then rolled at $900^\circ$C and annealed at $800^\circ$C for $1$ hour to establish an equiaxed microstructure. The average grain size was determined to be $\sim 60 \; \mu \text{m}$ by Electron backscatter diffraction (EBSD).
The as-annealed materials were then subjected to cryogenic temperature \blue{($\sim 77 \, \text{K}$)} tensile tests to generate deformation twinning. After the tensile tests, areas near the fracture surface were first mechanically polished and then electro-polished in a solution of $6 \, \%$ perchloric acid and $94 \, \%$ methanol at $-40^\circ$C. EBSD characterizations were carried out at the polished surface using a FEI Strata $235$ scanning electron microscope equipped with a EBSD detector. The \tb twins were identified and marked using the TSL-OIM software.
Samples for subsequent STEM analysis were made by \blue{focused-ion beam (FIB)}-liftout from an identified \tb twin boundary using a FEI Helios G4 FIB-SEM system. The HAADF-HRSTEM imaging of the twin boundary was conducted on the double-corrected TEAM I microscope (operated at $300 \, \text{kV}$) at the National Center for Electron Microscopy (NCEM), Lawrence Berkeley National Laboratory. \blue{To evaluate the long-range uniformity of the twin boundary phase, additional select area diffraction patterns and nano beam electron diffraction datasets were also collected. The analysis of the nano beam electron diffraction data was conducted using the py4DSTEM package \cite{savitzky2021}.}
STEM image simulations were conducted with the DFT-generated atomic configurations using the Prismatic software package for STEM simulation \cite{ophus2017, pryor2017}. The correction parameters (C1, C3 and C5) were set according to the experimental setup on the TEAM I microscope. The thermal effect was omitted to facilitate the image interpretation.
\section*{Acknowledgments}
\label{sec:ackn}
The authors would like to thank Professor Daryl C. Chrzan for valuable discussions. This research was supported by the Office of Naval Research under Grant no. N00014-19-1-2376. This work was partially performed under the auspices of the U.S. Department of Energy (DOE) by the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344. E.C. acknowledges support from a National Science Foundation Graduate Research Fellowship Program under Grant No. DGE-1752814, and T.F. acknowledges the funding by the Laboratory Directed Research and Development Program at LLNL under Project Tracking Code number 19-ERD-026. Work at the Molecular Foundry was supported by the Office of Science, Office of Basic Energy Sciences, of the U.S. Department of Energy under contract no. DE-AC02-05CH11231. This work made use of computational resources provided by the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number ACI-1548562, LLNL Institutional Computing facilities, and the Savio computational cluster resource provided by the Berkeley Research Computing program at the University of California, Berkeley (supported by the UC Berkeley Chancellor, Vice Chancellor for Research, and Chief Information Officer).
\section*{Author Contribution}
\label{sec:AC}
M.S.H, M.A, R.Z, Y.C and A.M.M designed the simulations and experiments. M.S.H performed all the DFT calculations, and led the analysis with input from M.A., D.L.O., and T.F. Y.C and R.Z conducted and analyzed the experiments, and performed image simulations and analysis with input from M.S.H, and A.M.M. E.C., and T.F. performed the evolutionary search simulations, and worked with M.S.H on their analysis. All authors contributed to the writing of the manuscript.
\section*{Data availability}
\label{sec:data}
The data that support the findings of this study are available from the corresponding author upon reasonable request.
\section*{Competing interests}
\label{sec:CI}
The authors declare that they have no competing interests.
\section*{}
\pagebreak
\newpage
\clearpage
\section*{References}
\bibliographystyle{sh}
\section{Further experimental evidence on the \tb twin boundary structure }
\label{secsup:more_exp}
Due to the wedge shape of the focused-ion beam (FIB)-milled sample, there is only a limited region that is feasible for atomic resolution scanning transmission electron microscopy (STEM) imaging on the sample. To further investigate the existence and the uniformity of the twin boundary (TB) phase, a nano beam electron diffraction (4D STEM) experiment was conducted at a region with intermediate thickness. The probe size used in the experiment is $\sim 1 \, \text{nm}$, and a $100 \times 100$ scan (in real space) with a step size of $1 \, \text{nm}$ is collected and analyzed. The results are summarized in \figsup{4DSTEM}. According to the virtual dark-field (DF) image of the TB phase (\figsup{4DSTEM}f), the thickness of the boundary phase is around $1-2 \, \text{nm}$ at a relatively thick region $(> 100 \, \text{nm})$ of the FIBed sample, consistent with the results obtained by high-resolution imaging in the thinner part of the sample. This result confirms that the presence of the body-centered orthorhombic (BCO) complexion for the TB is found in both thick and thin regions of the sample, and its existence is not attributed to surface effects in the thinnest region of the sample.
From measurement of the local strain across the sample, we find appreciable heterogeneous variations, as expected due to the presence of a high density of defects introduced in the deformation process used to form the TBs (See \figsup{HRTEM}). Similarly, we find that the local interface width of the TB also fluctuates along the length of the interface, as demonstrated in \figsup{HRSTEM_width}. These observations are discussed in the main context, in the context of the disjoining potential formalism, in which local variations in stress should alter the bulk energy difference between the BCO and hexagonal-close-packed (HCP) structures, which is expected to impact the local interfacial width.
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/4DSTEM.pdf}
\caption{Results of nano beam electron diffraction experiments. \textbf{a,} a reconstructed virtual bright-field (BF) image showing an area of intermediate thickness around the twin boundary. \textbf{b,} the maximum value diffraction pattern from the nano beam diffraction dataset. The red circle indicates the size and position of a virtual aperture used to reconstruct the BF image in a. \textbf{c,} the maximum value diffraction pattern from the nano beam diffraction dataset. The red, green and blue circles indicate the size and position of the virtual apertures used to reconstruct the dark-field (DF) images in \textbf{d, e, f,} respectively. \textbf{d-f}, virtual DF images showing the two matrix grains and the twin boundary phase. The contrast from the twin boundary phase is constantly around $1-2 \, \text{nm}$ throughout the entire region of interest.
}
\label{figsup:4DSTEM}
\end{center}
\end{figure}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/HRTEM.pdf}
\caption{ Additional transmission electron microscopy (TEM) observations of a sample containing the \tb twins. \textbf{a,} a low magnification TEM bright-field image showing the extensive deformation in the vicinity of the observed twin. \textbf{b,} a HRTEM image showing the phase contrast caused by defects near the twin boundary. }
\label{figsup:HRTEM}
\end{center}
\end{figure}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/HRSTEM_width.pdf}
\caption{Additional HRSTEM observation of a sample containing \tb twins. \textbf{a,} a HRSTEM image showing clear contrast of the BCO interfacial complexion. \textbf{b,} filtered HRSTEM image from the boundary phase Fast Fourier transform (FFT) spots. The fluctuation of the thickness of the boundary complexion is demonstrated and measured.
}
\label{figsup:HRSTEM_width}
\end{center}
\end{figure}
\pagebreak
\newpage
\clearpage
\section{Model for the stability of BCO complexion}
\label{secsup:disjoining}
The discovery of the solid-state wetting transition under applied compressive strain suggests a model for the stability of the \tbBCO complexion using concepts from interfacial wetting theory. In this model we make use of a thermodynamic formalism used for grain-boundary melting phenomena \cite{lipowsky1987, fisher1985}, in which the total excess free energy per area $F(w)$ of a system containing a \tbBCO TB with width $w$ is written as follows:
\setcounter{equation}{1}
\begin{equation}
F(w) = \Delta F_V \, w + \Psi(w)
\label{eqn:G_psi}
\end{equation}
\noindent where $\Delta F_V = F_V^{\text{BCO}} – F_V^{\text{HCP}}$ represents the free energy difference per volume between the BCO ($F_V^{\text{BCO}}$) and HCP $\alpha$-Ti ($F_V^{\text{HCP}}$) phases, and $\Psi(w)$ is the so-called ``disjoining potential” that represents a width-dependent interfacial free energy. At zero temperature, $\Delta F_V$ is proportional to the energy difference $\Delta E$ between the BCO and HCP. The disjoining potential takes values of $\gamma$ for a hypothetical \tb TB with no BCO wetting phase in the limit of $w \rightarrow 0$ and twice the interfacial free energy for a BCO/HCP heterophase interface in the limit $w \rightarrow \infty$. Two qualitatively different types of behavior for $\Psi(w)$ are typically assumed, which we will refer to as \textit{repulsive} and \textit{attractive}, as illustrated in \figsup{wet}.
In the repulsive case, $\Psi(w)$ decreases monotonically as a function of $w$ (\figsup{wet}a), while in the attractive case $\Psi(w)$ contains a minimum at a width $w_0$ (\figsup{wet}c). For repulsive $\Psi(w)$ the wetting transition is continuous in nature, with the interface width diverging as the bulk phase transition is approached from above, i.e., as $\Delta F_V$ approaches zero from the region above the transition where $\Delta F_V > 0$ (\figsup{wet}b). By contrast, if $\Psi(w)$ is attractive the wetting transition is first-order in character, with a finite-width interface being stable above and below the phase transition (\figsup{wet}d), until a limiting negative value of $\Delta F_V(w)$ is reached that corresponds to an instability point, where the finite-width interface is unstable and the system transforms to (i.e., is fully wetted by) the equilibrium phase. The behavior shown in \fig{transitions}b is consistent with such first-order wetting behavior, as discussed in further detail below.
\blue{For density functional theory (DFT) calculations using the generalized gradient approximation (GGA) exchange-correlation functional (hereafter is referred to as DFT-GGA)} at zero temperature, we note that the strained BCO phase is slightly lower in energy than $\alpha$-Ti (see \tabsup{wet} and \figsup{DFV}) for values of $\varepsilon$ that are zero. \blue{It is also evident from \figsup{DFV} that the strained $\omega$ is slightly higher in energy than strained BCO which explains that the complexion with BCO morphology is favored compared to $\omega$ at the interface of the \tb TB. } As shown in \figsup{DFV}, for increasing compressive strains the BCO phase becomes more stable (i.e., $\Delta F_V$ becomes increasingly negative), while for increasing tension HCP becomes more stable (i.e., $\Delta F_V$ becomes increasingly positive). The fact that a finite width interface is found by DFT at zero and slightly negative values of $\varepsilon$ where the BCO phase is stable suggests that within the framework described above, the \tbBCO interface is characterized by a disjoining potential with an attractive minimum. This can be seen from \figsup{wet}d, where a finite width for $\Delta F_V < 0$ requires an attractive $\Psi(w)$ (\figsup{wet}c).
This interpretation would then provide an explanation for why the width of the interface calculated by DFT is larger than that observed experimentally. Namely, for this type of wetting transition, the (stable or metastable) equilibrium interface width ($w_{\text{eq}}$) is that which leads to a (global or local) minimum of \eqn{G_psi}. Beyond the transition, where $\Delta F_V > 0$, $w_{\text{eq}}$ will be smaller than $w_0$ since the bulk free energy will favor reduction in the volume of the higher-energy phase. By contrast, below the transition, where $\Delta F_V < 0$, $w_{\text{eq}} > w_0$ since the $\Delta F_V$ will favor an increase in the volume of the lower-energy bulk phase. While in the zero-temperature DFT-GGA calculations for pure titanium at $\varepsilon=0$ the strained BCO phase has lower energy than $\alpha$-Ti, i.e., $\Delta F_V < 0 $, we expect the opposite to be true in the room-temperature measurements for $\alpha$ Ti-O alloys, since $\alpha$, with the HCP structure, is the known equilibrium phase. In this case it would follow that $w_{\text{eq}}$ in the experimental measurements would be lower than calculated by DFT, consistent with the results shown in \fig{TEM}.
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/wetting.pdf}
\caption{Classification of disjoining potential ($\Psi$) into representative repulsive and attractive cases. \textbf{a,} \textbf{c,} Potential shapes as a function of width ($w$). \textbf{b,} \textbf{d,} Schematic behavior of the equilibrium interfacial widths as a function of bulk free energy difference between the two phases ($\Delta F_v$). In \textbf{d}, the solid line corresponds to widths for stable (for $\Delta F_V > 0$) and metastable (for $\Delta F_V < 0$) minima in the interfacial structure, while the dashed line (for $\Delta F_V < 0$) corresponds to a local maximum in the excess energy versus width. Top and bottom panels correspond to the repulsive and attractive potentials, respectively.}
\label{figsup:wet}
\end{center}
\end{figure}
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=1]{figs/DFV.pdf}
\caption{\blue{The DFT-GGA calculated bulk energy differences (per atom) between the BCO and HCP (black circles) and the $\omega$ and HCP (blue squares) phases of titanium as a function of applied biaxial strain ($\varepsilon = \varepsilon_{\text{xx}}=\varepsilon_{\text{yy}}$). In these results, BCO and $\omega$ have been strained to the values corresponding to the state of strain imposed by the \tb TB (see main text). In other words, the data point at zero applied strain corresponds to the strain state of the \tb twin boundary in which the BCO phase is under tensile stress imposed by the stress-free bulk HCP structure at the interface. }}
\label{figsup:DFV}
\end{center}
\end{figure}
\section*{}
\pagebreak
\newpage
\clearpage
\begin{table}[]
\caption{ Structural parameters and the DFT-GGA calculated thermodynamic quantities. $\text{L}$, $\text{A}$, $N_\text{BCO}$, $N_{\alpha}$, $\text{V}^{\text{atom}}_\text{BCO}$, $\text{V}^{\text{atom}}_{\alpha}$, $\text{E}^{\text{atom}}_{\text{BCO}} $, and $\text{E}^{\text{atom}}_{\alpha}$ are the double twin boundary cell height (in $\AA$), twin boundary area (in $\AA^2$), number of atoms corresponding to BCO and $\alpha$-HCP identified in double twin boundary cell (per each interface), volume of BCO and $\alpha$ phases per atom (in $\AA^3$), and calculated energy per atoms (in eV), respectively. The values in the parentheses correspond to the strained BCO under the in-plane lattice constraint imposed by $\alpha$ matrix. }
\label{tabsup:wet}
\begin{adjustbox}{center}
\begin{tabular}{cccccccc}
\hline
$\text{L}(\AA)$ & $\text{A}(\AA^2)$ & $N_\text{BCO}$ & $N_{\alpha}$ & $\text{V}^{\text{atom}}_\text{BCO} (\AA^3)$ & $\text{V}^{\text{atom}}_{\alpha} (\AA^3)$ & $\text{E}^{\text{atom}}_{\text{BCO}} (\frac{\text{eV}}{\text{atom}})$ & $\text{E}^{\text{atom}}_{\alpha} (\frac{\text{eV}}{\text{atom}})$ \\ \hline
77.168 & 38.089 & 34 & 50 & \begin{tabular}[c]{@{}c@{}}17.379\\ (17.603)\end{tabular} & 17.361 & \begin{tabular}[c]{@{}c@{}}-7.8049\\ (-7.8029)\end{tabular} & -7.8024 \\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\section{Crystallographic charactristics of the \tb twin boundary structures}
\label{secsup:crystal}
Twinning operations can either correspond to a reflection with respect to the twinning plane, $K_1$, (Type I) or a rotation of $180 ^\circ$ along the twinning direction $\eta_1$(Type II). A previous study by Minonishi and co-workers \cite{minonishi1982} demonstrated that the minimum energy structure of twinned $\{11\bar21\}$ does not satisfy mirror symmetry. Instead, the alternate basal planes are displaced by $\frac{a\sqrt{3}}{12}$ normal to the plane of shear in the opposite direction which leads to a change in the stacking sequence. For the case of the \tb TB in Ti, we find that both modified embedded atom method (MEAM) and DFT predict a lower twin boundary energy than the mirror reflection and that of corresponding to the $\{11\bar21\}$ atomic structure. The minimum energy atomic structure for the case of \tb TB is achieved by translating consecutive basal planes by $\frac{a\sqrt{3}}{6}$ in the opposite direction along normal to the twinning direction (leading to the \tbBCO in \figsup{uspex}a). Pure mirror symmetry leads to the meta-stable structure of illustrated in \figsup{uspex}b, which corresponds to the morphology with higher energy than the \tbBCO structure (different stacking than BCO along the $c$ direction). The Shuffle structure can be obtained by displacing successive basal planes by $\frac{a\sqrt{3}}{3}$ (\figsup{uspex}c).
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.5]{figs/structures.pdf}
\caption{ Geometrical interpretation of atomic arrangements at the interface of the \tb TB. The results of the grand-canonical structure search for the \tb TB in Ti from \fig{unique} is repeated in the center. The ground state structure is indicated by the green circle. The yellow circle corresponds to a higher energy state in which the mirror symmetry between the parent and twinned crystal is preserved. The red circle indicates the competing shuffle state with higher excess energy. The atomic structures of these states relaxed using the MEAM interatomic potential are shown in \textbf{a-c}. Color coding of atoms are based on the two atom types per primitive cell of HCP lattice distinguishing every other basal planes. Colored lines are the twin-matrix traces of $\{01\bar10\}$ planes highlighting the structural differences between these structures. Comparison between the atomic configuration of the ground state structure shown in panel \textbf{a} with \textbf{b} highlights that the twinned crystal does not satisfy mirror symmetry. }
\label{figsup:uspex}
\end{center}
\end{figure}
\pagebreak
\newpage
\clearpage
\section{Effect of exchange-correlation functionals on the \tb TB structure}
\label{secsup:exchange}
Here, we study the effect of exchange-correlation (XC) functional on DFT-calculated structure for the \tb TB. Specifically, we compare the results from our DFT-GGA calculations with those using DFT+U (GGA+U here) functional with on-site Hubbard corrections \cite{dudarev1998}. The inclusion of +U has been proposed in previous calculations for Ti \cite{dudarev1998,lutfalla2011,zarkevich2016} to improve the description of the 3$d$ electron states. Specifically, we employ the Dudarev \et formalism \cite{dudarev1998} with $U-J = 2.2 \,\text{eV}$, which has been reported to reproduce the observed energy of reduction in Ti oxides \cite{lutfalla2011}. We start by calculating the relative structural enthalpies of $\alpha$, BCO and $\omega$ phases. \tabsup{DFTU} compares the relaxed lattice constants and relative structural enthalpies of these phases using the GGA and GGA+U functionals. GGA+U predicts the HCP phase as the ground state of Ti at zero temperature and pressure.
Using the GGA+U relaxed lattice constants, we then create the \tbBCO TB supercell (see Methods) and relax the structure. \figsup{GGAU_TB} compares the relaxed structure of the \tbBCO TBs and shows that the morphology at the interface corresponds to the BCO structure, as found in the calculations with GGA (without Hubbard-U corrections). However, GGA+U predicts a narrower width compared to GGA. We understand this observation in the context of disjoining potential picture described above. Specifically, \figsup{GGAU_energies} compares the bulk free energy differences from GGA and GGA+U for the BCO and $\alpha$ as well as the $\omega$ and $\alpha$ Ti at the strain state imposed by the \tbBCO TB. The results show that GGA+U predicts increased (more positive) values for the BCO-HCP energy difference relative to GGA, with the HCP structure being stable at all strains. Within the disjoining potential picture explained above, this increase in bulk energy difference between BCO and HCP will favor a reduction in the volume of the higher-energy phase (BCO in this case), leading to a lower interfacial width, consistent with the supercell calculations.
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/GGAU_TB.pdf}
\caption{ Relaxed structure of the \tbBCO TB using \textbf{a,} GGA and \textbf{b,} GGA+U exchange correlation functionals. BCO structure is formed at the interface using both exchange correlation functionals with a reduced width in GGA+U case. The interfacial width and the color coding of atoms is based on the CNA \cite{honeycutt1987} with gray and orange representing the HCP and non-HCP (BCO) interfacial regions, respectively. }
\label{figsup:GGAU_TB}
\end{center}
\end{figure}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/GGAU_energies.pdf}
\caption{The DFT calculated bulk energy differences (per atom) between the BCO and HCP (black circles) and $\omega$ and HCP (blue squares) phases of titanium as a function of applied biaxial strain ($\varepsilon = \varepsilon_{\text{xx}}=\varepsilon_{\text{yy}}$) using \textbf{a,} GGA (reproducing the results from \figsup{DFV}) and \textbf{b,} GGA+U exchange correlation functionals. The data point at zero applied strain corresponds to the strain state of the \tb twin boundary in which the BCO phase is under tensile stress imposed by the stress-free bulk HCP. }
\label{figsup:GGAU_energies}
\end{center}
\end{figure}
\begin{table}[]
\caption{Relaxed lattice constants of $\alpha$, BCO, and $\omega$ phases of Ti using GGA and GGA+U exchange correlation functionals. $\Delta E$ is the relative per atom energy of each phase relative to the $\alpha$ phase for each exchange correlation functional. Values in the parentheses correspond to the strained BCO under the biaxial strain state of the \tbBCO TB. }
\label{tabsup:DFTU}
\begin{adjustbox}{center}
\begin{tabular}{llccc}
& Method & \multicolumn{1}{l}{$\text{a,b}(\AA)$} & \multicolumn{1}{l}{$\text{c}(\AA)$} & \multicolumn{1}{l}{$\Delta E (\frac{\text{meV}}{\text{atom}})$} \\ \hline
$\alpha$ & GGA & 2.936 & 4.647 & 0 \\
& GGA+U & 2.972 & 4.719 & 0 \\
BCO & GGA & \begin{tabular}[c]{@{}c@{}}7.448, 5.013\\ (7.489, 5.086)\end{tabular} & 5.585 & \begin{tabular}[c]{@{}c@{}}-2.810\\ (-0.881)\end{tabular} \\
& GGA+U & \begin{tabular}[c]{@{}c@{}}7.634, 5.066\\ (7.587, 5.146)\end{tabular} & 5.621 & \begin{tabular}[c]{@{}c@{}}12.916\\ (14.202)\end{tabular} \\
$\omega$ & GGA & 4.576 & 2.829 & -6.473 \\
& GGA+U & 4.648 & 2.856 & 7.197 \\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\section{Effect of oxygen interstitials on the bulk phases and the \tbBCO twin boundary}
\label{secsup:oxygen}
DFT-GGA calculations were used to study the energetics of oxygen (O) impurity solutes in different bulk phases and in the vicinity of the \tbBCO TB in Ti. First, we compare the relative formation energy of oxygen atoms in $\alpha$, BCO, and $\omega$ phases. These calculations are also performed for the BCO structure at the biaxial strain state imposed by the \tbBCO TB. \tabsup{phases} lists the relaxed lattice parameters, space groups, and Wyckoff positions of lattice sites in these phases (for computational settings, see the Methods section).
The stable interstitial sites in the BCO phase were found through a systematic search by placing an oxygen atom into the regions between Ti atoms and relaxing the atomic positions. We found four distinct interstitial sites in the BCO phase (labelled as \textit{i}-\textit{iv}) among which the lowest energy site corresponds to the octahedral site occupying maximum interstitial volume between the host Ti atoms. Similarly, oxygen prefers to occupy an octahedral interstitial site surrounded by six Ti atoms in $\alpha$ and $\omega$ phases. Other metastable sites include hexahedral and crowdion sites in $\alpha$ and hexahedral and tetrahedral sites in the $\omega$ phases \cite{hennig2005}. \figsup{oxygen_bulk} shows the location of stable octahedral interstitial sites for oxygen in $\alpha$, BCO, and $\omega$ phases.
The formation energies for oxygen at different Wyckoff positions of the stable and metastable sites in the $\alpha$, BCO, and $\omega$ phases as well as the strained BCO complexion are calculated and listed in \tabsup{sites_bulk}. These energies are reported relative to molecular $\text{O}_2$. A comparison between the interstitial impurity formation energies among these phases shows that the octahedral formation energy is lower in $\alpha$. The difference between the site energies shifts the relative energy of crystal structures, decreasing the stability of BCO, and $\omega$ over $\alpha$. Additionally, this observation is consistent with the role of oxygen as an $\alpha$ stabilizer element reported in the literature \cite{trinkle2003}. The higher formation energy of oxygen in the strained state of BCO complexion found at the interface of the \tbBCO TB than the $\alpha$ phase indicates that oxygen atoms energetically prefer to stay at the bulk HCP sites compared to the strained BCO interfacial region.
Next, we explore the effect of oxygen on the \tbBCO TB by directly computing the interaction energy between oxygen and the TB using DFT. Oxygen/TB interaction energies can be defined as the difference between the energy of the supercell with oxygen located at the corresponding interstitial site and that of a supercell with oxygen at the reference octahedral site in the bulk-like HCP region. \figsup{oxygen_twin}a-d show the supercells with oxygen atoms placed at different interstitial sites at the interface of \tbBCO TB before and after energy minimization. \figsup{oxygen_twin}e shows the case where the oxygen atom is placed at the interface of BCO complexion and the HCP phase. The results demonstrate that it is energetically unfavorable for oxygen atoms to stay at the interfacial sites. Due to the large repulsive interaction between oxygen atoms and the TB, the interface is pushed away by few layers during the energy relaxation calculation, to enable the oxygen atom to be located in a bulk HCP octahedral environment as highlighted in \figsup{oxygen_twin}a, c, and d (corresponding to the sites \textit{i}, \textit{iii}, and \textit{iv} in the bulk phase). While the interface remains stable in the case of \figsup{oxygen_twin}b interstitial site (corresponding to the site \textit{ii} in the bulk phase), there is a large repulsive interaction energy of $0.921 \, \text{eV}$ suggesting that it is energetically favorable for oxygen atoms to stay in the bulk over the \tbBCO TB.
While the oxygen atoms are disfavored from segregating to the \tbBCO TB, they act as a hardening agent leading to the increase in the yield stress \cite{chong2020}. Therefore, the hardening induced by oxygen interstitials can create high enough stress levels to activate the \tbBCO twins which are not observed in the lower oxygen content samples. We believe this effect is the dominant one in correlating the presence of oxygen with the \tb TB formation, rather than being associated with a segregation-induced interface structure transition, due to the highly repulsive interactions between oxygen and the TB.
The results above also provide insights into why the DFT calculations for of the TB width in pure Ti are larger than those observed experimentally in the samples with oxygen. Specifically, as discussed in the main text and above, if the disjoining potential varies weakly with oxygen content, the role of oxygen in increasing the energy of BCO relative to HCP should lead to a narrowing of the interface width. To explore this interpretation further, our findings here show that the oxygen concentration of $0.3$ wt.\% ($0.88$ at.\%) raises the energy difference between (strained) BCO and HCP structures by roughly $8 \, \text{meV}$ which is the same energy increase realized when pure Ti is biaxially strained by $1.5\, \%$ applied tensile strain (see \figsup{DFV}). This amount of energy penalty leads to a narrower interfacial width of $11.07 \, \AA $ (see \fig{transitions}b), which is in a good agreement with the $11.70 \, \AA $ width measured experimentally.
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/oxygen_bulk.pdf}
\caption{Oxygen atoms at the lowest energy octahedral interstitial sites in: \textbf{a}, $\alpha$, \textbf{b}, BCO, and \textbf{c}, $\omega$ phases in Ti. Gray, orange and purple colors correspond to the Ti atoms in the $\alpha$, BCO and $\omega$ phases. Oxygen atoms are shown in red. }
\label{figsup:oxygen_bulk}
\end{center}
\end{figure}
\begin{table}[]
\caption{Relaxed structural parameters and space groups for $\alpha$, BCO, and $\omega$-Ti. Wyckoff positions of lattice sites within each phase are also listed. For the relaxed BCO structure, the ideal position of 8(j) Wyckoff lattice site is at $x=0.414$ and $y=0.677$. Subscripts A and B refers to the two atoms per unit cell of BCO and $\omega$ phases. }
\label{tabsup:phases}
\begin{adjustbox}{center}
\begin{tabular}{ll}
Site & Wyckoff position \\ \hline
\multicolumn{2}{l}{a) $\alpha$ phase ($a=2.94 \, \AA$, $c=4.65 \, \AA$); space group: $P6_3/mmc$} \\
$\alpha$ & $2\text{(c)} \, (\frac{1}{3},\frac{2}{3},\frac{1}{4})$ \\ \hline
\multicolumn{2}{l}{b) BCO phase ($a=7.44 \, \AA$, $b=5.02 \, \AA$, $c=5.58 \, \AA$); space group: $Ibam$} \\
$\text{BCO}_\text{A}$ & $4\text{(b)} \, (\frac{1}{2},0,\frac{1}{4})$ \\
$\text{BCO}_\text{B}$ & $8\text{(j)} \, (x,y,0)$ \\ \hline
\multicolumn{2}{l}{c) $\omega$ phase ($a=4.58 \, \AA$, $c=2.83 \, \AA$); space group: $P6/mmm$} \\
$\omega_\text{A}$ & $1\text{(a)} \, (0,0,0)$ \\
$\omega_\text{B}$ & $2\text{(d)} \, (\frac{1}{3},\frac{2}{3},\frac{1}{2})$ \\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\begin{table}[]
\caption{Formation energies and Wyckoff position of the minimum energy oxygen interstitial in the $\alpha$, BCO, strained BCO and $\omega$ phase derived from DFT-GGA calculations. The subscripts oct, hex, crowd and tet refer to the octahedral, hexahedral, crowdion, and tetrahedral interstitial positions. The formation energies $\text{E}_\text{f}$ are measured relative to molecular $\text{O}_2$. The interstitial site energies $\Delta E$ are reported relative to the octahedral site energy in the $\alpha$ phase. Values in parentheses correspond to the site energies at the BCO under the biaxial strain state of the \tbBCO TB . Calculations are performed at $1 \, \%$ oxygen concentration. The coordination number $Z$ for each site is also included. In the BCO phase, ideal interstitial positions are at $x=0.796$, $y=0.086$, $z=0.125$ for the 16(k) and $x=0.225$, $y=0.565$ for the 8(j) sites, respectively. In the $\omega$ phase, ideal $x$ is $0.240$, and $0.120$ for the 6(k) and 6(m) lattice sites, respectively. }
\label{tabsup:sites_bulk}
\begin{adjustbox}{center}
\begin{tabular}{lllcc}
Site & Wyckoff position & Z & $\text{E}_\text{f}$ (eV) & $\Delta E$ (eV) \\ \hline
\multicolumn{5}{l}{(a) $\alpha$ interstitial sites} \\
$\alpha_\text{oct}$ & $2\text{(a)} \, (0,0,0)$ & 6 & $-6.24$ & $+0.00$ \\
$\alpha_\text{hex}$ & $2\text{(d)} \, (\frac{2}{3},\frac{1}{3},\frac{1}{4})$ & 5 & $-5.12$ & $+1.12$ \\
$\alpha_\text{crowd}$ & $6\text{(g)} \, (\frac{1}{2},0,0)$ & 6 & $-4.52$ & $+1.72$ \\ \hline
\multicolumn{5}{l}{(b) BCO interstitial sites} \\
$\text{BCO}_\text{\textit{i}}$ (oct) & $8\text{(e)} \, (\frac{1}{4},\frac{3}{4},\frac{1}{4})$ & 6 & $-5.71 \, (-5.67)$ & $+0.53 \, (+0.57)$ \\
$\text{BCO}_\text{\textit{ii}}$ & $4\text{(a)} \, (\frac{1}{2},\frac{3}{4},\frac{3}{4})$ & 4 & $-5.41 \, (-5.37)$ & $+0.83 \, (+0.87)$ \\
$\text{BCO}_\text{\textit{iii}}$ & $16\text{(k)} \, (x,y,z)$ & 5 & $-5.25 \, (-5.32)$ & $+0.99 \, (+0.92)$ \\
$\text{BCO}_\text{\textit{iv}}$ & $8\text{(j)} \, (x,y,0)$ & 5 & $-5.08 \, (-5.16)$ & $+1.16 \, (+1.08)$ \\ \hline
\multicolumn{5}{l}{(c) $\omega$ interstitial sites} \\
$\omega_\text{oct}$ & $3\text{(f)} \, (\frac{1}{2},0,0)$ & 6 & $-6.19$ & $+0.05$ \\
$\omega_\text{hex}$ & $6\text{(m)} \, (x,2x,\frac{1}{2})$ & 5 & $-4.59$ & $+1.65$ \\
$\omega_\text{tet}$ & $6\text{(k)} \, (x,0,\frac{1}{2})$ & 4 & $-4.45$ & $+1.79$ \\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=\textwidth]{figs/oxygen_twin.pdf}
\caption{Interaction of oxygen interstitials and the \tbBCO twin boundary in Ti. \textbf{a}-\textbf{d,} show the supercells with oxygen at different interstitial sties at the \tbBCO TB before and after relaxation. Labels \textit{i}-\textit{iv} correspond to the equivalent interstitial sites in the BCO bulk phase (see \tabsup{sites_bulk}). \textbf{e,} shows the relaxation corresponding to site at the $\alpha$/BCO interface. Color codes are based on CNA parameter \cite{honeycutt1987} with gray representing HCP and orange showing defective regions. Oxygen atoms are shown in red. }
\label{figsup:oxygen_twin}
\end{center}
\end{figure}
\pagebreak
\newpage
\clearpage
\section*{References}
\bibliographystyle{unsrt}
|
\section{Introduction}
Many computer vision tasks have achieved great success with the advent of deep neural networks in recent years. However, the success of deep networks relies on a large amount of labeled data \cite{imagenet}, which is often expensive and time-consuming to collect.
Domain adaptation (DA) \cite{DA}, which aims at transferring knowledge from a labeled source domain to an unlabeled target domain, is a more economical and practical option than annotating sufficient target samples, especially in the keypoint detection tasks.
The fast development of computer vision applications leads to huge increases in demand for keypoint detection but the annotations of this task are more complex than classification tasks, requiring much more labor work especially when the objects are partially occluded.
On the contrary, accurately labeled synthetic images can be obtained in abundance by computer graph processing at a relatively low cost~\cite{vazquez2013virtual, virtual}. Therefore, regressive domain adaptation for unsupervised keypoint detection has a promising future.
There are many effective DA methods for classification \cite{DAN, DANN, MCD, MDD}, but we empirically found that few methods work on regression. One possible reason is that there exist explicit task-specific boundaries between classes in classification.
By applying domain alignment, the margins of boundaries between different classes on the target domain are enlarged, thereby helping the model generalize to the unlabeled target domain. However, the regression space is usually continuous on the contrary, \textit{i.e.}, there is no clear decision boundary. Meanwhile, although images have limited pixels, the key point is still in a \textit{large} discrete space due to a combination of different axes, posing another huge challenge for most DA methods.
\begin{figure}[!t]
\begin{center}
\includegraphics[width=1.\linewidth]{introduction_vis.pdf}
\end{center}
\vspace{-10pt}
\caption{\textbf{Visualization} before and after adaptation on the unlabeled target domain. (Left) The wrong predictions before adaptation are usually located at other key points. (Right) The predictions of the adapted model look more like hands or bodies.}
\label{fig: introduction}
\vspace{-12pt}
\end{figure}
To solve the issue caused by the large output space, we first delved into the prediction results of a source-only keypoint detection model.
We unexpectedly observed that when the predictions on the unlabeled domain are wrong, they are \textit{not equally distributed} on the image.
For example, if the position of a \textit{right} ankle is mistaken (see Fig. \ref{fig: introduction}), the wrong prediction is most likely at the position of the left ankle or other key points, instead of somewhere in the background as we expected.
This observation reveals that the output space is \textit{sparse} in the sense of probability.
Consider an extremely sparse case where the predicted position is always located at a key point, then a specific ankle detection problem becomes a $K$-classification problem, and we can reduce the domain gap by enlarging the decision boundary between different key points.
This extreme case above gives us a strong hint that if we can constrain the output space
from a whole image space into a smaller one with only $K$ key points, it may be possible to bridge the gap between regression and classification for RegDA.
Inspired by the latest theoretical work of DD~\cite{MDD}, we first utilize an adversarial regressor to maximize the disparity on the target domain and train a feature generator to minimize this disparity. Based on the above observations and analyses, we introduced a spatial probability distribution to describe the sparsity and use it to guide the optimization of the adversarial regressor. It can somewhat avoid the problems caused by the large output space and reduce the gap between the keypoint detection and classification in the DA setup.
Besides, we also found that maximizing the disparity of two regressors is unbelievably difficult (see Section \ref{result: ablation}). To this end, we convert the minimax game in DD \cite{MDD} into \textit{minimization of two opposite goals}. This conversion has effectively overcame the optimization difficulty of adversarial training in RegDA. Our contributions are summarized as follows:
\begin{itemize}
\item We discovered the sparsity of the regression space in the sense of probability, which gives a hint to bridge the gap between regression and classification.
\vspace{-5pt}
\item
We proposed a new and effective method by converting the minimax game between two regressors into the minimization of two opposite goals.
\vspace{-5pt}
\item We conducted solid experiments on various keypoint detection tasks and prove that our method can bring performance gains by $8\%$ to $11\%$ in terms of PCK.
\end{itemize}
\section{Related Work}
\paragraph{{Domain Adaptation.}}
Most deep neural networks suffer from performance degradation due to domain shift \cite{DomainShift}. Thus, domain adaptation is proposed to transfer knowledge from the source domain to the target domain.
DAN \cite{DAN} adopts adaptation layers to minimize MMD \cite{MMD} between domains. DANN \cite{DANN} first introduces adversarial training into domain adaptation.
MCD \cite{MCD} uses two task-specific classifiers to approximate $\mathcal{H}\Delta\mathcal{H}$-distance \cite{HHdistance} between source and target domains
and tries to minimize it by further feature adaptation.
MDD \cite{MDD} extends the theories of domain adaptation to multiclass classification and proposes a novel measurement of domain discrepancy.
These methods mentioned above are insightful and effective in classification problems. \textit{But few of them work on regression problems.}
In our work, we propose a novel training method for domain adaptation in keypoint detection, a typical regression problem.
\vspace{5pt}
\noindent
\textbf{{Keypoint Detection.}}
2D keypoint detection has become a popular research topic these years for its wide use in computer vision applications.
Tompson et al.\cite{JointTraining} propose a multi-resolution framework that generates heat maps representing per-pixel likelihood for keypoints.
Hourglass \cite{Hourglass} develops a repeated bottom-up, top-down architecture, and enforces intermediate supervision by applying loss on intermediate heat maps.
Xiao et al.\cite{SimpleBaselines} propose a simple and effective model that adds a few deconvolutional layers on ResNet \cite{RESNET}. HRNet \cite{HRNET} maintains high resolution through the whole network and achieves notable improvement.
\textit{Note that our method is not intended to further refine the network architecture}, but to solve the problem of domain adaptation in 2D keypoint detection. Thus our method is compatible with any of these heatmap-based networks.
Some previous works have explored DA in keypoint detection, but most in 3D keypoints detection. Cai et al.\cite{weakly} propose a weakly-supervised method with the aid of depth images and Zhou et al.\cite{zhou2017towards} conducts weakly-supervised domain adaptation with a 3D geometric constraint-induced loss. These two methods both assume 2D ground truth on target domain available and use a\textit{ fully-supervised method} to get 2D heat map. Zhou et al. \cite{zhou2018unsupervised} utilize view-consistency to regularize predictions from unlabeled target domain in 3D keypoints detection, but depth scans and images from different views on target domain are required. \textit{Our problem setup is completely different from the above works since we only have unlabeled 2D data on the target domain.}
\vspace{5pt}
\noindent
\textbf{{Loss Functions for Heatmap Regression.}}
Heatmap regression is widely adopted in keypoint detection.
Mean squared error between the predicted heat map and the ground truth is most widely used \cite{JointTraining, CPM, AdversarialPosenet, Multi-context-attention, MSPN, HRNET}.
Besides, Mask R-CNN \cite{Mask-r-cnn} adopts cross-entropy loss, where the ground truth is a one-hot heat map.
Some other works \cite{Deepercut, papandreou2017towards} take the problem as a binary classification for each pixel.
Differently, \textit{we present a new loss function based on KL divergence}, which is suitable for RegDA.
\section{Preliminaries}
\subsection{Learning Setup}
In supervised 2D keypoint detection, we have $n$ labeled samples $\{(\boldsymbol{x}_i, \boldsymbol{y}_i)\}_{i=1}^n $ from $ \mathcal{X}\times\mathcal{Y}^K$ , where $\mathcal{X} \in \mathcal{R}^{H\times W \times 3}$ is the input space, $\mathcal{Y} \in \mathcal{R}^2 $ is the output space and $K$ is the number of key points for each input.
The samples independently drawn from the distribution $D$ are denoted as $\widehat{D}$. The goal is to find a regressor $f\in \mathcal{F}$ that has the lowest error rate $\text{err}_{D} = \mathbb{E}_{(x, y)\sim D} L(f(x), y)$ on $D$, where $L$ is a loss function we will discuss in Section \ref{sec: method supervised keypoint detection}.
In unsupervised domain adaptation, there exists a labeled source domain $\widehat{P}=\{(\boldsymbol{x}_i^s, \boldsymbol{y}_i^s)\}_{i=1}^n$ and an unlabeled target domain $\widehat{Q}=\{\boldsymbol{x}_i^t\}_{i=1}^m$. The objective is to minimize $\text{err}_{Q}$.
\subsection{Disparity Discrepancy}
\begin{definition}[Disparity]
\label{def: disparity}
Given two hypothesis $f, f^{'}\in \mathcal{F}$, we define the disparity between them as
\begin{equation}
\mathrm{disp}_{D} (f^{'}, f)\triangleq \mathbb{E}_{D} L(f^{'}, f).
\end{equation}
\end{definition}
\begin{definition}[Disparity Discrepancy, DD]
Given a hypothesis space $\mathcal{F}$ and a specific regressor $f \in \mathcal{F}$, the Disparity Discrepancy (DD) is defined by
\begin{equation}
\label{equ: DD definition}
\begin{split}
d_{f, \mathcal{F}} (P, Q)&\triangleq \sup_{f^{'}\in \mathcal{F}} (\mathrm{disp}_Q(f^{'}, f)-\mathrm{disp}_{P}(f^{'},f)).\\
\end{split}
\end{equation}
\end{definition}
It has been proved that when $L$ satisfies the triangle inequality, the expected error $\text{err}_{Q}(f)$ on the target domain is \textbf{strictly} bounded by the sum of the following four terms: empirical error on the source domain $\text{err}_{\widehat{P}}(f)$, empirical disparity discrepancy $d_{f, \mathcal{F}}(\widehat{P}, \widehat{Q})$, the ideal error $\lambda$ and complexity terms \cite{MDD}.
Thus our task becomes
\begin{equation}
\label{equ: DD_bounds}
\min_{f\in\mathcal{F}} \text{err}_{\widehat{P}}(f) + d_{f, \mathcal{F}}(\widehat{P}, \widehat{Q}).
\end{equation}
We train a feature generator network $\psi$ (see Fig. \ref{fig: overall architecture}) which takes inputs $\boldsymbol{x}$, and regressor networks $f$ and $f'$ which take features from $\psi$.
We approximate the supremum in Equation \ref{equ: DD definition} by maximizing the disparity discrepancy,
\begin{equation}
\label{Equ: DD_maximization}
\begin{split}
\max_{f^{'}} & \mathcal{D}(\widehat{P}, \widehat{Q}) = \mathbb{E}_{\boldsymbol{x}^t\sim \widehat{Q}} L((f^{'}\circ \psi)(\boldsymbol{x}^t), (f\circ \psi)(\boldsymbol{x}^t))\\
&-\mathbb{E}_{\boldsymbol{x}^s\sim \widehat{P}} L((f^{'}\circ \psi)(\boldsymbol{x}^s), (f\circ \psi)(\boldsymbol{x}^s)).\\
\end{split}
\end{equation}
When $f^{'}$ is close to the supremum, minimizing the following terms will decrease $\text{err}_{Q}$ effectively,
\begin{equation}
\label{Equ: DD_minimization}
\begin{split}
\min_{\psi, f} \mathbb{E}_{(\boldsymbol{x}^s, \boldsymbol{y}^s)\sim \widehat{P}} L((f\circ \psi)(\boldsymbol{x}^s), \boldsymbol{y}^s)
+ \eta \mathcal{D}(\widehat{P}, \widehat{Q}),
\end{split}
\end{equation}
where $\eta$ is the trade-off coefficient.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=0.7\linewidth]{overall_architecture.pdf}
\end{center}
\vspace{-10pt}
\caption{DD architecture under the keypoint detection setting.
}
\label{fig: overall architecture}
\vspace{-5pt}
\end{figure}
\section{Method}
\subsection{Supervised Keypoint Detection}
\label{sec: method supervised keypoint detection}
Most top-performing methods on keypoint detection \cite{SimpleBaselines, HRNET, Hourglass} generate a likelihood heat map $\mathcal{H}(\boldsymbol{y}_k)\in R^{H'\times W'}$ for each key point $\boldsymbol{y}_k$ . The heat map usually has a 2D Gaussian blob centered on the ground truth location $\boldsymbol{y}_k$. Then we can use $L_2$ distance to measure the difference between the predicted heat map $f (\boldsymbol{x}^s)$ and the ground truth $ \mathcal{H}(\boldsymbol{y}^s)$.
The final prediction is the point with the maximum probability in the predicted map $\boldsymbol{h}_k$, i.e. $\mathcal{J}(\boldsymbol{h}_k)={\argmax_{\boldsymbol{y}\in \mathcal{Y}}}\boldsymbol{h}_k (\boldsymbol{y})$.
Heat map learning shows good performance in the supervised setting.
However, when we apply it to the minimax game for domain adaptation, we empirically find that it will lead to a numerical explosion. The reason is that $f (\boldsymbol{x}^t)$ is not bounded, and the maximization will increase the value at all positions on the predicted map.
To overcome this issue, we first define the \textit{spatial probability distribution} $\mathcal{P}_{\mathrm{T}}(\boldsymbol{y}_k)$, which normalizes the heat map $\mathcal{H}(\boldsymbol{y}_k)$ over the spatial dimension,
\begin{equation}
\mathcal{P}_{\mathrm{T}}(\boldsymbol{y}_k)_{h,w} = \dfrac{\mathcal{H}(\boldsymbol{y}_k)_{h,w}}{\sum_{h'=1}^{H'} \sum_{w'=1}^{W'} \mathcal{H}(\boldsymbol{y}_k)_{h',w'}}.
\end{equation}
Denote by $\sigma$ the spatial softmax function,
\begin{equation}
\begin{split}
\sigma (\mathbf{z})_{h,w} = \dfrac{\exp{\mathbf{z}_{h,w}}}{\sum_{h'=1}^{H'}\sum_{w'=1}^{W'} \exp{\mathbf{z}_{h', w'}}} .
\end{split}
\end{equation}Then we can use KL divergence to measure the difference between the predicted spatial probability $\widehat{\boldsymbol{p}}^s = (\sigma \circ f) (\boldsymbol{x}^s) \in R^{K\times H \times W}$ and the ground truth label $ \boldsymbol{y}^s$,
\begin{equation}
L_{\mathrm{T}} (\boldsymbol{p}^s, \boldsymbol{y}^s) \triangleq
\dfrac{1}{K} \sum_{k}^{K} \mathrm{KL}(\mathcal{P}_{\mathrm{T}}(\boldsymbol{y}_k^s) || \boldsymbol{p}^s_{k}).
\end{equation}
In the supervised setting, models trained with KL divergence achieve comparable performance with models trained with $L_2$ since both models are provided with pixel-level supervision. Since $\sigma(\mathbf{z})$ sums to $1$ in the spatial dimension, the maximization of $L_{\mathrm{T}} (\boldsymbol{p}^s, \boldsymbol{y}^s)$ will not cause the numerical explosion.
In our next discussion, KL is used by default.
\subsection{Sparsity of the Spatial Density}
Compared with classification models, the output space of the keypoint detection models is much larger, usually of size $64\times 64$. Note that the optimization objective of the adversarial regressor $f'$ is to maximize the disparity between the predictions of $f'$ and $f$ on the target domain, and minimize the disparity on the source domain.
In other words, we are looking for an adversarial regressor $f'$ which predicts correctly on the source domain, \textit{while making as many mistakes as possible on the target domain}.
However, in the experiment on \textit{dSprites} (detailed in Section \ref{sec: toy_experiments}), we find that increasing the output space of the adversarial regressor $f'$ will worsen the final performance on the target domain. Therefore, the dimension of the output space has a huge impact on the adversarial regressor. \textit{It would be hard to find the adversarial regressor $f'$ that does poorly only on the target domain when the output space is too large.}
Thus, how to reduce the size of the output space for the adversarial regressor has become an urgent problem.
As we mention in the introduction (see Fig.\ref{fig: introduction}), when the model makes a mistake on the unlabeled target domain, the probability of different positions is not the same. For example, when the model incorrectly predicts the position of the right ankle (see Fig. \ref{fig: ground false idea}), most likely the position of the left ankle is predicted, occasionally other key points predicted, and rarely positions on the background are predicted.
\textit{Therefore, when the input is given,
the output space, in the sense of probability, is not uniform. }
This spatial density is sparse, i.e. some positions have a larger probability while most positions have a probability close to zero.
To explore this space more efficiently, $f'$ should pay more attention to positions with high probability.
Since wrong predictions are often located at \textbf{other} key points, we sum up their heat maps,
\begin{equation}
\label{Equ: spatial probability distribution}
\mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}}_k)_{h,w} = \sum_{k'\neq k} \mathcal{H}(\widehat{\boldsymbol{y}}_{k'})_{h, w},
\end{equation}
where $\widehat{\boldsymbol{y}}_k$ is the prediction by the regressor $f$.Then we normalize the map $\mathcal{H}_{\mathrm{F}}(\boldsymbol{y}_k)$,
\begin{equation}
\label{Equ: spatial probability distribution}
\mathcal{P}_{\mathrm{F}}(\widehat{\boldsymbol{y}}_k)_{h,w} = \dfrac{\mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}}_k)_{h,w}}{\sum_{h'=1}^{H'} \sum_{w'=1}^{W'} \mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}}_k)_{h',w'}}.
\end{equation}
We use $\mathcal{P}_{\mathrm{F}}(\widehat{\boldsymbol{y}}_k)$ to approximate the \textit{spatial probability distribution} that the model makes mistakes at different locations and we will use it to guide the exploration of $f'$ in Section \ref{sec: minimax of target disparity}.
The size of the output space of the adversarial regressor is reduced \textit{in the sense of expectation}.
Essentially, we are making use of the sparsity of the spatial density to help the minimax game in the high-dimensional space.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=1.\linewidth]{ground_false_idea.pdf}
\end{center}
\vspace{-10pt}
\caption{The task is to predict the position of the right ankle. Predictions of $f$ and $f'$ on the source domain (in yellow) are near the right ankle. Predictions of $f$ on the target domain (in blue) are sometimes wrong and located at the left ankle or other key points. The predictions of $f'$ on the target domain (in orange) are encouraged to locate at other key points in order to detect samples far from the support of the right ankle.}
\label{fig: ground false idea}
\vspace{-10pt}
\end{figure}
\subsection{Minimax of Target Disparity}
\label{sec: minimax of target disparity}
Besides the problem discussed above, there is still one problem in the minimax game of the target disparity.
Theoretically, the minimization of KL divergence between two distributions is unambiguous. As the probability of each location in the space gets closer, two probability distribution will also get closer.
\textit{Yet the maximization of KL divergence will lead to uncertain results.} Because there are many situations where the two distributions are different, for instance, the variance is different or the mean is different.
In the keypoint detection, we usually use PCK (detailed in Section \ref{pck}) to measure the quality of the model. As long as the output of the model is near the ground truth, it is regarded as a correct prediction. Therefore, we are more concerned about the target samples whose prediction is far from the true value.
In other words, we hope that after maximizing the target disparity, there is a big difference between the mean of the predicted distribution ($\widehat{\boldsymbol{y}}'$ should be different from $\widehat{\boldsymbol{y}}$ in Fig. \ref{fig: maximization of distribution}).
However, experiments show that $\widehat{\boldsymbol{y'}}$ and $\widehat{\boldsymbol{y}}$ are almost the same during the adversarial training (see Section \ref{result: ablation}).
In other words,
\textit{maximizing KL mainly changes the variance of the output distribution. }The reason is that KL is calculated point by point in the space. When we maximize KL, the probability value of the peak point ($\widehat{\boldsymbol{y}}'$ in Fig. \ref{fig: maximization of distribution}) is reduced, and the probability of other positions will increase uniformly. Ultimately the variance of the output distribution increases, but the mean of the distribution does not change significantly, which is completely inconsistent with our expected behavior. Since the final predictions of $f'$ and $f$ are almost the same, it's hard for $f'$ to detect target samples that deviate from the support of the source. Thus, the minimax game takes little effect.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=0.9\linewidth]{max_kl.pdf}
\end{center}
\vspace{-10pt}
\caption{When we maximize the KL between the predictions by $f'$ and $f$ (fixed), we expect to maximize the mean difference, but what actually changes is often \textit{only} the variance.}
\label{fig: maximization of distribution}
\vspace{-5pt}
\end{figure}
Since maximizing cannot get our expected behavior, can we avoid using maximization and only use minimization in the adversarial training?
The answer is yes.
The reason that we had to maximize before was that we only had one optimization goal. \textit{If we have two goals with opposite physical meanings, then the minimization of these two goals can play the role of minimax game.} Our task now is to design two opposite goals for the adversarial regressor and the feature generator.
The goal of the feature generator is to minimize the target disparity or minimize the KL divergence between the predictions of $f'$ and $f$.
The objective of the adversarial regressor is to maximize the target disparity, and we achieve this by minimizing the KL divergence between the predictions of $f'$ and the \textit{ground false} predictions of $f$,
\begin{equation}
\label{Equ: L_f}
\begin{split}
L_{\mathrm{F}} (\boldsymbol{p}', \boldsymbol{p}) \triangleq \dfrac{1}{K} \sum_{k}^{K} \mathrm{KL}(& \mathcal{P}_{\mathrm{F}} ( \mathcal{J}(\boldsymbol{p}))_k
|| \boldsymbol{p}'_k),\\
\end{split}
\end{equation}
where $\boldsymbol{p}'=(\sigma \circ f' \circ \psi) (\boldsymbol{x}^t) $ is the prediction of $f'$ and $\boldsymbol{p}$ is the prediction of $f$.
Compared to directly maximizing the distance from the \textit{ground truth} predictions of $f$, minimizing $L_{\mathrm{F}}$ can take advantage of the spatial sparsity and effectively change the mean of the output distribution.
Now we use Fig. \ref{fig: ground false idea} to illustrate the meaning of Equation \ref{Equ: L_f}. Assume we have $K$ supports for each key point in the semantic space. The outputs on the labeled source domain (in yellow) will fall into the correct support. But for outputs on the target domain, the position of the left ankle might be regarded as the right ankle. These are the samples far from the supports. Through minimizing $L_{\mathrm{F}}$, we mislead $f'$ to predict other key points as right ankle, which encourages the adversarial regressor $f'$ to detect target samples far from the support of the right ankle. Then we train the generator network $\psi$ to fool the adversarial regressor $f'$ by minimizing $L_{\mathrm{T}} $ on the target domain. This encourages the target features to be generated near the support of the right ankle. This adversarial
learning steps are repeated and the target features will be aligned to the supports of the source finally.
\subsection{Overall Objectives}
\label{sec: training steps}
The final training objectives are summarized as follows. Though described in different steps, these loss functions are optimized simultaneously in a framework.
\paragraph{Objective 1}
First, we train the generator $\psi$ and regressor $f$ to detect the source samples correctly. Also, we train the adversarial regressor $f'$ to minimize its disparity with $f$ on the source domain. The objective is as follows:
\begin{equation}
\begin{split}
\min_{\psi, f, f'} &\mathbb{E}_{(\boldsymbol{x}_s, \boldsymbol{y}^s) \sim \widehat{P}} ( L_{\mathrm{T}} ((\sigma \circ f\circ \psi) (\boldsymbol{x}_s), \boldsymbol{y}^s) \\
+ \eta &L_{\mathrm{T}} ((\sigma \circ f^{'}\circ \psi) (\boldsymbol{x}_s), (\mathcal{J} \circ f\circ \psi) (\boldsymbol{x}_s)) ).
\end{split}
\end{equation}
\paragraph{Objective 2}
Besides, we need the adversarial regressor $f'$ to increase its disparity with $f$ on the target domain by minimizing $L_{\mathrm{F}}$. By maximizing the disparity on the target domain, $f'$ can detect the target samples that deviate far from the support of the source. This corresponds to \textbf{Objective 2} in Fig. \ref{fig: training steps}, which can be formalized as follows:
\begin{equation}
\min_{f'} \eta \mathbb{E}_{\boldsymbol{x}_t\sim \widehat{Q}} L_{\mathrm{F}} ((\sigma \circ f^{'}\circ \psi)(\boldsymbol{x}_t), ( f\circ \psi)(\boldsymbol{x}_t)).
\end{equation}
\paragraph{Objective 3}
Finally, the generator $\psi$ needs to minimize the disparity between the fixed regressors $f$ and $f'$ on the target domain. This corresponds to \textbf{Objective 3} in Fig. \ref{fig: training steps},
\begin{equation}
\min_{\psi} \eta \mathbb{E}_{\boldsymbol{x}_t\sim \widehat{Q}} \eta L_{\mathrm{T}} ((\sigma \circ f^{'}\circ \psi)(\boldsymbol{x}_t), (\mathcal{J} \circ f\circ \psi)(\boldsymbol{x}_t)).
\end{equation}
\begin{figure}[H]
\begin{center}
\includegraphics[width=1\linewidth]{training_steps.pdf}
\end{center}
\vspace{-5pt}
\caption{Adversarial training objectives. Our network has three parts: feature generator $\psi$, regressor $f$ and adversarial regressor $f'$ .
\textbf{Objective 2}: $f'$ learns to maximize the target disparity by minimizing its KL with \textit{ground false} predictions of $f$. \textbf{Objective 3}: $\psi$ learns to minimize the target disparity by minimizing the KL between the predictions of $f'$ with \textit{ground truth} predictions of $f$.}
\label{fig: training steps}
\vspace{-5pt}
\end{figure}
\section{Experiments}
First, we experiment on a toy dataset called \textit{dSprites} to illustrate how dimension of the output space affects the minimax game.
Then we perform extensive experiments on real-world datasets, including hand datasets (\textit{RHD}$\rightarrow$\textit{H3D}) and human datasets (\textit{SURREAL}$\rightarrow$\textit{Human3.6M}, \textit{SURREAL}$\rightarrow$\textit{LSP}), to verify the effectiveness of our method. We set $\eta = 1$ on all datasets. \textbf{Code is available at \url{https://github.com/thuml/Transfer-Learning-Library/tree/dev}.}
\subsection{Experiment on Toy Datasets}
\label{sec: toy_experiments}
\paragraph{Dataset}
\textit{DSprites} is a 2D synthetic dataset (see Fig. \ref{fig: dSprites_dataset}). It consists of three domains: \textit{Color} (C), \textit{Noisy} (N) and \textit{Scream} (S), with $737,280$ images in each. There are four regression factors and we will focus on two of them: position X and Y. We generate a $64\times 64$ heat map for the key point.
Experiments are performed on six transfer tasks: C→N,C→S,N→C,N→S,S→C, and S→N.
\begin{figure}[htbp]
\vspace{-5pt}
\begin{center}
\includegraphics[width=0.8\linewidth]{dSprites.pdf}
\end{center}
\vspace{-10pt}
\caption{Some example images in the dSpirtes dataset.}
\label{fig: dSprites_dataset}
\vspace{-15pt}
\end{figure}
\paragraph{Implementation Details} We finetune ResNet18 \cite{RESNET} pre-trained on ImageNet. Simple Baseline\cite{SimpleBaselines} is used as our detector head and is trained from scratch with learning rate $10$ times that of the lower layers. We adopt mini-batch SGD with momentum of $0.9$ and batch size of $36$. The learning rate is adjusted by $\eta_p = \eta_0 (1+\alpha p)^{-\beta}$ where $p$ is the training steps, $\eta_0=0.1, \alpha=0.0001$ and $\beta=0.75$. All models are trained for $20k$ iterations and we only report their \textit{final} MAE on the target domain.
We compare our method mainly with \textbf{DD} \cite{MDD}, which is designed for classification. We extend it to keypoint detection by replacing cross entropy loss with $L_{\mathrm{T}} $. The main regressor $f$ and the adversarial regressor $f'$ in \textbf{DD} and \textbf{ our method} are both $2$-layer convolution neural networks with width $256$.
\paragraph{Discussions}
Since each image has only one key point in \textit{dSprites}, we cannot generate $\mathcal{P}_{\mathrm{F}}(\widehat{\boldsymbol{y}})$ according to Equation \ref{Equ: spatial probability distribution}.
Yet we find that for each image in the \textit{dSprites}, key points only appear in the middle area $A=\{(h,w)|16\leq h \leq 47, 16\leq w \leq 47\}$. Therefore, we only assign positions inside $A$ with positive probability,
\begin{equation}
\label{Equ: spatial probability distribution2}
\begin{split}
\mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}})_{h,w} &= \sum_{\boldsymbol{a}\in A, \boldsymbol{a} \neq \widehat{\boldsymbol{y}} } \mathcal{H}(\boldsymbol{a})_{h, w} \\
\mathcal{P}_{\mathrm{F}}(\widehat{\boldsymbol{y}})_{h,w} & = \dfrac{\mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}})_{h,w}}{\sum_{h'=1}^{H'} \sum_{w'=1}^{W'} \mathcal{H}_{\mathrm{F}}(\widehat{\boldsymbol{y}})_{h',w'}}.
\end{split}
\end{equation}
We then minimize $L_{\mathrm{F}} $ to maximize the target disparity. Note that Equation \ref{Equ: spatial probability distribution2} just narrows the origin space from $64\times 64$ to $32\times 32$.
However, this conversion from maximization to minimization has achieved significant performance gains on \textit{dSprites}. Table \ref{Results: dSprites} shows that this conversion reduces the error by $\textbf{63}\%$ in a relative sense.
We can conclude several things from this experiment:
\begin{enumerate}
\item The dimension of the output space has a huge impact on the minimax game of the adversarial regressor $f'$. As the output space enlarges, the maximization of $f'$ would be increasingly difficult.
\vspace{-5pt}
\item When the probability distribution of the output by $f'$ is not uniform and our objective is to maximize the disparity on the target domain, minimizing the distance with this \textit{ground false} distribution is more effective than maximizing the distance with the \textit{ground truth}.
\end{enumerate}
\begin{table}[htbp]
\caption{MAE on \textit{dSprites} for different source and target domains (lower is better). The last row (oracle) corresponds to training on the target domain with supervised data (lower bound). }
\vspace{-5pt}
\addtolength{\tabcolsep}{-3pt}
\begin{small}
\begin{center}
\begin{tabular}{@{}l|cccccc|l@{}}
\toprule
Method & C$\rightarrow$N &C$\rightarrow$S &N$\rightarrow$C & N$\rightarrow$S & S$\rightarrow$C & S$\rightarrow$N & Avg \\ \midrule
ResNet18 \cite{SimpleBaselines} & 0.495 & 0.256 & 0.371 & 0.639 & 0.030 &0.090 &0.314 \\
DD \cite{MDD} & 0.037 & 0.078 &0.054& 0.239& 0.020 & 0.044 &0.079 \\
\textbf{RegDA (ours)} &\textbf{0.020} & \textbf{0.028}& \textbf{0.019}& \textbf{0.069}& \textbf{0.014}&\textbf{0.022} & \textbf{0.029} \\
\hline
Oracle & 0.016 & 0.022 & 0.014& 0.022& 0.014& 0.016 &0.017 \\ \bottomrule
\end{tabular}
\end{center}
\end{small}
\label{Results: dSprites}
\vspace{-10pt}
\end{table}
\subsection{Experiment on Hand Keypoint Detection}
\subsubsection{Dataset}
\paragraph{RHD}
Rendered Hand Pose Dataset (\textit{RHD}) \cite{RHD} is a synthetic dataset containing $41,258$ training images and $2,728$ testing images, which provides precise annotations for $21$ hand keypoints. It covers a variety of viewpoints and difficult hand poses, yet hands in this dataset have very different appearances from those in reality (see Fig. \ref{fig: rhd_dataset}).
\begin{figure}[htbp]
\vspace{-5pt}
\begin{center}
\includegraphics[width=0.9\linewidth]{rhd.pdf}
\end{center}
\vspace{-5pt}
\caption{Some annotated images in the \textit{RHD} dataset.}
\label{fig: rhd_dataset}
\vspace{-10pt}
\end{figure}
\paragraph{H3D}
Hand-3D-Studio (\textit{H3D}) \cite{Hand-3D-Studio} is a real-world dataset containing hand color images with $10$ persons of different genders and skin colors, $22k$ frames in total.
We randomly pick $3.2k$ frames as the testing set, and the remaining part is used as the training set.
Since the images in \textit{H3D} are sampled from videos, many images share high similarity in appearance. Thus models trained on the training set of \textit{H3D} (\textbf{oracle}) achieve high accuracy on the testing set. This sampling strategy is reasonable in the DA setup since we cannot access the label on the target domain.
\subsubsection{Training Details}
\label{sec: hand_training_details}
We evaluate the performance of Simple Baseline \cite{SimpleBaselines} with ResNet101 \cite{RESNET} as the backbone.
\textbf{Source only} model is trained with $L_2$. All parameters are the optimal parameters under the supervised setup. The base learning rate is 1e-3. It drops to 1e-4 at $45$ epochs and 1e-5 at $60$ epochs. There are $70$ epochs in total. Mini-batch size is $32$. There are $500$ steps for each epoch. Note that
$70$ epochs are completely enough for the models to converge both on the source and the target domain. Adam \cite{Adam} optimizer is used (we find that SGD \cite{SGD} optimizer will reach a very low accuracy when combined with $L_2$).
In our method, Simple Baseline is first trained with $L_T$, with the same learning rate scheduling as \textbf{source only}. Then the model is adopted as the feature generator $\psi$ and trained with the proposed minimax game for another $30$ epochs. The main regressor $f$ and the adversarial regressor $f'$ are both $2$-layer convolution neural networks with width $256$. The learning rate of the regressor is set $10$ times to that of the feature generator, according to \cite{DANN}. For optimization, we use the mini-batch SGD with the Nesterov momentum $0.9$.
We compare our method with several feature-level DA methods, including \textbf{DAN} \cite{DAN}, \textbf{DANN} \cite{DANN}, \textbf{MCD} \cite{MCD} and \textbf{DD} \cite{MDD}. All methods are trained on the source domain for $70$ epochs
and then finetunes with the unlabeled data on the target domain for $30$ epochs. We report the \textit{final} PCK of all methods for a fair comparison.
\subsubsection{Results}
\label{pck}
Percentage of Correct Keypoints (PCK) is used for evaluation. An estimation is considered correct if its distance from the ground truth is less than a fraction $\alpha=0.05$ of the image size. We report the average PCK on all $21$ key points. We also report PCK at different parts of the hand, such as metacarpophalangeal (MCP), proximal interphalangeal (PIP), distal interphalangeal (DIP), and fingertip.
The results are presented in Table \ref{result: rhd2h3d}.
In our experiments, most of the existing DA methods do poorly on the practical keypoint detection task. They achieve a lower accuracy than \textbf{source only}, and their accuracy on the test set varies greatly during the training.
In comparison, our method has significantly improved the accuracy at all positions of hands, and the average accuracy has increased by $\textbf{10.7}\%$.
\begin{table}[htbp]
\caption{PCK on task \textit{RHD}→\textit{H3D}. The last row (oracle) corresponds to training on \textit{H3D} with supervised data (upper bound on the DA performance). For all kinds of key points, our approach outperforms \textbf{source only} considerably.}
\vspace{-5pt}
\begin{center}
\begin{tabular}{@{}l|cccc|l@{}}
\toprule
Method & MCP & PIP & DIP & Fingertip & Avg \\ \midrule
ResNet101 \cite{SimpleBaselines} & 67.4 & 64.2 & 63.3 & 54.8 & 61.8 \\
DAN \cite{DAN} & 59.0 & 57.0 & 56.3 & 48.4 & 55.1 \\
DANN \cite{DANN} & 67.3 & 62.6 & 60.9 & 51.2 & 60.6 \\
MCD \cite{MCD} & 59.1 & 56.1 & 54.7 & 46.9 & 54.6 \\
DD \cite{MDD} & 72.7 & 69.6 & 66.2 & 54.4 & 65.2 \\
\textbf{RegDA (ours)} & \textbf{79.6} & \textbf{74.4} &\textbf{71.2} & \textbf{62.9} & \textbf{72.5} \\
\hline
Oracle & 97.7 & 97.2 & 95.7 & 92.5 & 95.8 \\ \bottomrule
\end{tabular}
\label{result: rhd2h3d}
\end{center}
\vspace{-5pt}
\end{table}
We visualize the results before and after adaptation in Fig \ref{fig: hand_vis}.
As we mention in the introduction, the false predictions of \textbf{source only} are usually located at the positions of other key points, resulting in the predicted skeleton not look like a human hand.
To our surprise, although we did not impose a constraint (such as bone loss \cite{zhou2017towards}) on the output of the model, the outputs of the adapted model look more like a human hand automatically.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=1.\linewidth]{hand_vis.pdf}
\end{center}
\vspace{-10pt}
\caption{Qualitative results of some images in the \textit{H3D} dataset.}
\label{fig: hand_vis}
\vspace{0pt}
\end{figure}
\subsubsection{Ablation Study}
\label{result: ablation}
We also conduct an ablation study to illustrate how minimization and maximization influences adaptation. Table \ref{result: rhd2h3d_ablation} shows the results. The first row is \textbf{DD}, which plays the minimax game on $L_{\mathrm{T}}$. The second row plays the minimax game on $L_{\mathrm{F}}$. The last row is our method, which minimizes two opposite goals separately.
Our proposed method outperforms the previous two methods by a large margin.
\begin{table}[htbp]
\caption{Ablation study on the minimax of target disparity. }
\vspace{-5pt}
\addtolength{\tabcolsep}{-4.2pt}
\begin{center}
\begin{tabular}{@{}l|ll|cccc|l@{}}
\toprule
Method & $f'$ & $\psi$ & MCP & PIP & DIP & Fingertip & Avg \\ \midrule
DD \cite{MDD} & max $L_{\mathrm{T}}$ & min $L_{\mathrm{T}}$ & 72.7 & 69.6 & 66.2 & 54.4 & 65.2 \\
& min $L_{\mathrm{F}}$& max $L_{\mathrm{F}}$ & 74.4 & 71.1 & 66.9 & 56.4 & 66.5 \\
\textbf{RegDA} &min $L_{\mathrm{F}}$ & min $L_{\mathrm{T}}$ & \textbf{79.6} & \textbf{74.4} &\textbf{71.2} & \textbf{62.9} & \textbf{72.5} \\
\hline
\end{tabular}
\label{result: rhd2h3d_ablation}
\end{center}
\vspace{-10pt}
\end{table}
Fig. \ref{fig:ablation} visualizes the training process. For \textbf{DD}, the difference in predictions ($||\widehat{\boldsymbol{y}}'-\widehat{\boldsymbol{y}}||$) is small throughout the training process, which means that maximizing $L_{\mathrm{T}}$ will make the adversarial regressor $f'$ weak. For methods that play minimax on $L_{\mathrm{F}}$ ,the difference in predictions keeps enlarging and the performance of $f'$ gradually drops. Thus, maximizing $L_{\mathrm{F}}$ will make the generator $\psi$ too weak. In contrast, the prediction difference of our method increases at first and then gradually converges to zero during the adversarial training.
As the training progresses, the accuracy of both $f$ and $f'$ \textbf{steadily} increases on the target domain.
Therefore, using two minimizations is the most effective way to do adversarial training in a large discrete space.
\begin{figure}[htbp]
\centering
\subfigure[Accuracy of $f$]{
\includegraphics[width=0.47\columnwidth]{acc_t.pdf}
\vspace{-10pt}
}
\subfigure[Accuracy of $f'$]{
\includegraphics[width=0.47\columnwidth]{acc_t_adv.pdf}
\vspace{-10pt}
}
\subfigure[Accuracy difference]{
\includegraphics[width=0.47\columnwidth]{delta_acc.pdf}
}
\subfigure[Prediction difference]{
\includegraphics[width=0.47\columnwidth]{y_difference.pdf}
}
\caption{Empirical values during the training process.}
\vspace{-5pt}
\label{fig:ablation}
\end{figure}
\subsection{Experiment on Human Keypoint Detection}
We further evaluate our method on the human keypoint detection task. The training details are the same as \ref{sec: hand_training_details}.
\vspace{-5pt}
\subsubsection{Dataset}
\paragraph{SURREAL}
\textit{SURREAL} \cite{SURREAL} is a synthetic dataset that consists of monocular videos of people in motion against indoor backgrounds (see Fig. \ref{fig: surreal_dataset}).
There are more than 6 million frames in \textit{SURREAL}.
\begin{figure}[htbp]
\vspace{-5pt}
\begin{center}
\includegraphics[width=0.9\linewidth]{surreal.pdf}
\end{center}
\vspace{-10pt}
\caption{Some annotated images in the \textit{SURREAL} dataset.}
\label{fig: surreal_dataset}
\vspace{-10pt}
\end{figure}
\paragraph{Human3.6M}
\textit{Human3.6M} \cite{Human3.6M} is a large-scale real-world video dataset captured in indoor environments, with $3.6$ million frames in total.
It contains videos of human characters performing actions. We down-sampled the video from $50$\textit{fps} to $10$\textit{fps} to reduce redundancy. Following the standard in \cite{Li20143DHP}, we use 5 subjects (S1, S5, S6, S7, S8) for training and the rest $2$ subjects (S9, S11) for testing.
\vspace{-10pt}
\paragraph{LSP}
Leeds Sports Pose (\textit{LSP}) \cite{LSP} is a real-world dataset containing $2k$ images with annotated human body joint locations collected from sports activities. The images in \textit{LSP} are captured in the wild, which look very different from those indoor synthetic images in \textit{SURREAL}.
\subsubsection{Results}
For evaluation, we also use the PCK defined in \ref{pck}. Since the key points defined by different datasets are different, we select the shared key points (such as shoulder, elbow, wrist, hip, knee) and report their PCK.
As shown in Table \ref{result: surreal2human} and \ref{result: surreal2lsp}, our proposed method substantially outperforms \textbf{source only} at all positions of the body.
The average accuracy has increased by $\textbf{8.3\%}$ and $\textbf{10.7\%}$ on \textit{Human3.6M} and \textit{LSP} respectively.
Fig. \ref{fig: human_vis} and \ref{fig: lsp_vis} show the visualization results. The model before adaptation often fails to distinguish between left and right, and even hands and feet. Our method effectively help the model distinguish between different key points on the unlabeled domain.
\begin{table}[htbp]
\caption{PCK on task \textit{SURREAL}→\textit{Human3.6M}. Sld: shoulder, Elb: Elbow. }
\vspace{-5pt}
\addtolength{\tabcolsep}{-4.2pt}
\begin{center}
\begin{tabular}{l|cccccc|l}
\hline
Method & Sld & Elb & Wrist & Hip & Knee & Ankle & Avg \\ \hline
ResNet101 \cite{SimpleBaselines} & 69.4 & 75.4 & 66.4 & 37.9 & 77.3 & 77.7 & 67.3 \\
DAN \cite{DAN} & 68.1 & 77.5 & 62.3 & 30.4 & 78.4 & 79.4 & 66.0 \\
DANN \cite{DANN} & 66.2 & 73.1 & 61.8 & 35.4 & 75.0 & 73.8 & 64.2\\
MCD \cite{MCD} & 60.3 & 63.6 & 45.0 & 28.7 & 63.7 & 65.4 & 54.5 \\
DD \cite{MDD} & 71.6 & 83.3 & 75.1 & 42.1 & 76.2 & 76.1 & 70.7 \\
\textbf{RegDA (ours)} & \textbf{73.3} & \textbf{86.4} & \textbf{72.8} & \textbf{54.8} & \textbf{82.0} & \textbf{84.4} & \textbf{75.6} \\
\hline
Oracle & 95.3 & 91.8 & 86.9 & 95.6 & 94.1 & 93.6 & 92.9 \\
\hline
\end{tabular}
\end{center}
\label{result: surreal2human}
\vspace{-10pt}
\end{table}
\begin{table}[htbp]
\caption{PCK on task \textit{SURREAL}→\textit{LSP}. Sld: shoulder, Elb: Elbow. }
\addtolength{\tabcolsep}{-4.2pt}
\vspace{-5pt}
\begin{center}
\begin{tabular}{l|cccccc|l}
\hline
Method & Sld & Elb & Wrist & Hip & Knee & Ankle & Avg \\ \hline
ResNet101 \cite{SimpleBaselines} & 51.5 & 65.0 & 62.9 & 68.0 & 68.7 & 67.4 & 63.9 \\
DAN \cite{DAN} & 52.2 & 62.9 & 58.9 & 71.0 & 68.1 & 65.1 & 63.0 \\
DANN \cite{DANN} & 50.2 & 62.4 & 58.8 & 67.7 & 66.3 & 65.2 & 61.8 \\
MCD \cite{MCD} & 46.2 & 53.4 & 46.1 & 57.7 & 53.9 & 52.1 & 51.6 \\
DD \cite{MDD} & 28.4 & 65.9 & 56.8 & 75.0 & 74.3 & 73.9 & 62.4 \\
\textbf{RegDA (ours)} & \textbf{62.7} & \textbf{76.7} & \textbf{71.1} & \textbf{81.0} & \textbf{80.3} & \textbf{75.3} & \textbf{74.6}\\
\hline
\end{tabular}
\end{center}
\label{result: surreal2lsp}
\vspace{-10pt}
\end{table}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=1.\linewidth]{surreal2human_vis.pdf}
\end{center}
\vspace{-10pt}
\caption{Qualitative results of some images in the \textit{Human3.6M} dataset.
Note that the key points on the blue lines are not shared between different datasets.}
\label{fig: human_vis}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=1.\linewidth]{surreal2lsp_vis.pdf}
\end{center}
\vspace{-10pt}
\caption{Qualitative results of some images in the \textit{LSP} dataset. Note that the key points on the blue lines are not shared between different datasets.}
\label{fig: lsp_vis}
\end{figure}
\section{Conclusion}
In this paper, we propose a novel method for unsupervised domain adaptation in keypoint detection, which utilizes the sparsity of the regression output space to help adversarial training in the high-dimensional space.
We use a spatial probability distribution to guide the optimization of the adversarial regressor and perform the minimization of two opposite goals to solve the optimization difficulties.
Extensive experiments are conducted on hand keypoint detection and human keypoint detection datasets. Our method is better than the source only model by a large margin and outperforms state-of-the-art DA methods.
{\small
\bibliographystyle{ieee_fullname}
|
\section{Introduction}
The emergence of machine learning as a society-changing technology in the last decade has triggered concerns about our inability to understand the reasoning of increasingly complex models. The field of Interpretable Machine Learning (IML)\footnote{The literature sometimes differentiates \textit{interpretable} ML (i.e., designing models which are understandable by-design) and \textit{explainable} ML (i.e., producing post-hoc explanations for models) \cite{rudin2019stop}.
We emphasize that whether an explanation is produced by-design or by a post-hoc method does not affect how it should be used or evaluated (though it may affect the quality of the results). Thus, we see this distinction as orthogonal to our paper.}
grew out of these concerns, with the goal of empowering various stakeholders to tackle use cases such as building trust in models, performing model debugging, and generally informing real human-decision making \cite{bhattpaper,lipton2018mythos, gilpin2018explaining}.
However, despite the flurry of IML methodological development over the last several years, a stark disconnect characterizes the current overall approach: IML methods typically optimize diverse but narrow technical objectives, yet their claimed use-cases remain broad and often under-specified.
Echoing similar critiques about the field made \cite{lipton2018mythos}, it has thus remained difficult for the field to sufficiently evaluate these claims
and thus to translate
methodological advances into widespread practical impact.
In this paper, we outline a path forward for the ML community to address this disconnect and foster more widespread adoption, focusing on two key principles:
\begin{figure}[]
\centering
\includegraphics[scale=0.25]{LaTeX/cropped_figure.pdf}
\caption{Currently, IML researchers focus more on technical objectives while consumers focus on use cases. Often, a lack of explicit connections remains between the two, making proper usage and development of IML methods difficult for both parties.
}
\label{fig:teaser}
\vspace{-0.75cm}
\end{figure}
\begin{figure*}[]
\centering
\includegraphics[scale=0.66]{LaTeX/Abstracted_versions6.pdf}
\caption{(Left) We focus on how researchers and consumers can work together to both establish a better use case organization (i.e., ``Use Case Goals'') and further connections through the current gap between methods and use cases (i.e., the cloud) by following steps (1)-(3) in our proposed workflow.
(Middle) As the two sides are increasingly connected to one another, researchers (R) and consumers (C) can make use of the taxonomy to find use cases for their methods and methods for their use cases, respectively. (Right) We highlight how three different potential diagnostics may provide useful insights for three use cases. In fact, the desired diagnostic information in each use case maps to a different Technical Objective (local feature attribution, local counterfactual, and global counterfactual, respectively) in our taxonomy (Figure \ref{fig:taxonomy}). When we later discuss a more concrete workflow for filling in the taxonomy we expand on the computer vision setting as a running example.}
\label{fig:abstractedversion}
\end{figure*}
\textbf{1. Embrace a “diagnostic” vision for IML.}
Instead of aiming to provide complete solutions for ill-defined problems such as ``debugging'' and ``trust'', we argue that the field of IML should focus on the important, if less grandiose, goal of developing a suite of rigorously-tested diagnostic tools. In treating IML methods as future diagnostics, we view each as providing a targeted, well-specified insight into a model’s behavior. In this sense, these methods should then be used alongside and in a manner similar to more classical statistical diagnostics (e.g., error bars, hypothesis tests, methods for outlier detection), for which clearer guidelines exist for when and how to apply them.\footnote{Under this vision, we treat existing IML methods as \textit{potential} diagnostics, emphasizing their need to be more rigorously-tested.}
\textbf{2. Rigorously evaluate and establish potential IML diagnostics.}
Currently, IML researchers typically develop and evaluate methods by focusing on quantifiable technical objectives, e.g., maximizing various notions of faithfulness or adherence to some desirable axioms \cite{lundberg2017unified, sundararajan2017axiomatic, bach2015pixel}. However, while these IML methods generally target seemingly relevant aspects of a model’s behavior, it is imperative to carefully measure their effectiveness on concrete use cases in order to demonstrate their utility as practical diagnostics.
Motivated by these principles, we first illustrate our diagnostic vision via an incomplete taxonomy that synthesizes
foundational works on IML methods and evaluation.
The taxonomy (as shown at an abstract level in Figure \ref{fig:abstractedversion} and discussed in more depth in Section \ref{section:taxonomy}) not only serves as a template for building an explicit mapping between potential IML diagnostics and specific use cases, but also as a tool to unify studies of IML's usefulness in real-world settings (concrete examples shown in Figure \ref{fig:abstractedversion}, right).
However, the incompleteness of
the current taxonomy emphasizes the need for researchers and consumers
to work together to expand its coverage and refine connections within it.
More specifically, doing so requires careful considerations at each of these 3 steps of the IML workflow in the context of our taxonomy as shown in Figure \ref{fig:abstractedversion} (left):
\newpage
\begin{enumerate}
\item[(1)] \emph{Problem Definition}, where researchers work with consumers to define a well-specified \textit{target use case} (TUC).
\item[(2)] \emph{Method Selection}, where they identify potential IML methods for a TUC by navigating the methods part of the taxonomy \textit{and/or} leveraging previously established connections between similar use cases and methods.
\item[(3)] \emph{Method Evaluation}, where they test whether selected methods can meet TUCs.
\end{enumerate}
\vspace{-0.2cm}
In Section \ref{section:workflow},
we provide an extensive discussion about best practices for this IML workflow to flesh out this taxonomy and deliver rigorously-tested diagnostics to consumers.
Ultimately, we envision an increasingly complete taxonomy that
(i) allows consumers to find suitable IML methods for their use cases; and (ii) helps researchers to ground their technical work in real applications (Figure \ref{fig:abstractedversion}, middle).
\section{Background} \label{sec:relatedwork}
An increasingly diverse set of methods has been recently proposed and broadly classified as part of IML.
However, multiple concerns have been expressed in light of this rapid development, focused on IML's underlying foundations and the gap between research and practice.
\textbf{Critiques of the field’s foundations:}
\cite{lipton2018mythos} provided an early critique, highlighting that the stated motivations of IML were both highly variable,
and potentially discordant with proposed methods.
\cite{krishnan2019against} added to these arguments from a philosophical angle, positing that interpretability as a unifying concept is both unclear and of questionable usefulness. Instead, as they argue, more focus should be placed on the actual end-goals, for which IML is one possible solution.
\textbf{Gaps between research and practice:} Multiple works have also highlighted important gaps between existing methods and their practical usefulness. Some have demonstrated a lack of stability/robustness of popular approaches \cite{adebayo2018sanity, laugel2019issues, alvarez2018robustness}. Others discuss how common IML methods can fail to help humans in the real-world, both through pointing out hidden assumptions and dangers \cite{barocas2020hidden, rudin2019stop} as well as conducting case-studies with users \cite{bansal2020does, kaur2020interpreting}.
More recently, many review papers \cite{gilpin2018explaining, mohseni2019multidisciplinary, murdoch2019interpretable, arya2019one} have attempted to clean up and organize aspects of IML, but largely do not address these issues head-on.
In contrast, our proposed re-framing of IML methods as diagnostic tools follows naturally from these concerns.
Notably we embrace the seeming shortcomings of IML methods as providing merely “facts” \cite{krishnan2019against} or “summary statistics” \cite{rudin2019stop} about a model, and instead focus on the practical questions of when and how these methods can be practically useful.
\section{A Diagnostic Vision for IML}
\label{section:taxonomy}
\begin{figure*}[!t]
\centering
\includegraphics[width=1.0\textwidth]{LaTeX/CACM_Taxonomy.pdf}
\caption{Our taxonomy consists of a hierarchical organization of both existing method and use case goals. Moving forwards, the goal for researchers and consumers is to conduct principled studies to both refine the current organization of use cases by defining more well-specified target use cases (green) and to establish explicit connections between these targets and technical objectives (blue).
}
\label{fig:taxonomy}
\end{figure*}
We think of a diagnostic as a tool that provides some insight about a model. As an analogy, consider the suite of diagnostic tools at a doctor's disposal
that similarly provides insight about a patient. An x-ray could be useful for identifying bone fractures while a heart rate monitor would be helpful for identifying an irregular heart rhythm. Importantly, neither tool enables the doctor to broadly ``understand'' a person's health. However, each can be useful \textit{if applied properly to a well-scoped problem}. Similarly, rigorously establishing connections between IML methods and well-defined use cases is imperative for the IML community.
To begin such a pursuit, we start by first identifying and reconciling the many method goals and use case goals that one might encounter currently. Based on contemporary practices and discourse, we propose a taxonomy that organizes separately the method goals at the top-end and use case goals at the bottom-end (Figure~\ref{fig:taxonomy}). While our diagnostic vision for the field ideally involves a robust set of connections between these two sides, we use a ``cloud'' to illustrate the current overall lack of well-established diagnostics.
\subsection{Method Goals}
\label{sec:methodgoals}
Each IML method provides a specific type of insight into a given model. Based on these types of insights, we first provide a hierarchical organization which divides the set of existing IML methods into 8 method clusters. In the diagnostic vision, we think of each method cluster broadly as a class of diagnostics that addresses a Technical Objective (TO). Then, we describe in more detail each TO in a way that allows one to specify individual method objectives.
\subsubsection{Hierarchical Organization}
The top-end of our taxonomy aims to differentiate between the various perspectives explanations provide based on three factors commonly discussed in existing literature \cite{arya2019one, guidotti2018survey, doshivelez2017rigorous}. We discuss these further in Appendix \ref{appendix:taxonomy}.
At the leaf nodes are \textit{technical objectives} (TOs), classes of goals that are precise enough to be generally linked to a \textit{method cluster} that most directly addresses them.
In total, there are 8 TOs/method clusters which captures a large portion of the goals of current IML methods. We note a few important nuances regarding our characterization of TOs.
First, although TOs and method cluster are bijective in our proposed taxonomy, it is important to explicitly distinguish these two concepts because of the potential for \emph{cross-cluster adaptation}.
This notion arises because
it is frequently possible for that method to, in an ad-hoc fashion, be adapted to address a different TO.
Second, we emphasize that each TO should be thought of as defining a \textit{class} of related goals.
Indeed, for a given TO, we hypothesize some of the key \textit{technical detail(s)} that must be considered towards fully parametrizing meaningfully different instantiations of the same broader goal.
These important technical details, taken together with the TO, allow one to define individual \textit{proxy metrics} that reflect the desired properties of one's explanations. Proxy metrics can then serve as tractable objective functions for individual methods to optimize, as well as measures of how well any method addresses a particular instantiation of the TO.
\subsubsection{Technical Objectives} \label{section:methodclusters}
We next overview the TOs (and their technical details) that correspond to various method clusters.
Due to the overlaps in content, we group together local and global versions of the same general method type/objective (for more extensive details and examples of specific methods for each, see Appendix \ref{appendix:methodclusters}).
\textit{\underline{Feature attribution}} address when features are present (or missing), how does this affect the the model's prediction(s) (i.e. how ``important'' each feature is to the model's prediction(s)). Often, measures of importance are defined based on how the model's prediction(s) change relative to its prediction for some baseline input. The baseline input is sometimes implicit and domain specific (e.g., all black pixels for grayscale images or the mean input in tabular data).
Thus, the technical details are both the precise \textit{notion of “importance”} and the choice of the \textit{baseline input}. Relevant proxy metrics typically measure how much the model prediction changes for different types of perturbations applied to the individual (or the training data) according to the ``importance'' values as computed by each method.
\underline{\textit{Counterfactual}} explanations address what “low cost” modification can be applied to data point(s) to achieve a desired prediction.
The most common technical detail is the specific measure of \textit{cost} and the most common proxy metric is how often the counterfactual changes the model's prediction(s).
\underline{\textit{Approximation}} methods address how can one summarize the model by approximating its predictions in a region, either locally around a data point, globally around as many points as possible, or across a specific region of the input space.
These methods require the technical detail of both what that \textit{region} is and what the simple function’s \textit{model family} is. For local approximation, a canonical metric is local fidelity, which measures how well the method predicts within a certain neighborhood of a data point. For global approximation, a proxy metric is coverage, which measures how many data points the explanation applies to.
\underline{\textit{Sample importance}} methods address what training points are influential on a model's prediction for either an individual point or the model as a whole.
Technical details differ from method to method, so currently it is difficult to identify a uniform axis of variation.
These methods can be evaluated with proxy metrics that represent the usefulness of the provided explanations, through simulated experiments of finding corrupted data points, detecting points responsible data distribution shifts, and recovering high accuracy with the samples considered important.
\subsubsection{\textbf{How do by-design methods fit in?}}
While they do not have a corresponding method cluster in our taxonomy, it is important to discuss another family of IML methods called ``interpretable by-design” methods \cite{rudin2019stop}.
The differentiating property of these models from the post-hoc methods that we reference above is that the TO(s) of these approaches is intrinsically tied to the model family itself, hence the models are interpretable by design.
That said, by-design methods also fit into our framework and should be viewed as a different way to answer the same TOs in our taxonomy.
When by-design methods are proposed or used, they should clearly specify which TO(s) they are intending to address.
\subsection{Use Case Goals}
\label{sec:usecasegoals}
Currently, much of the discourse on IML use cases surrounds differentiating fairly broad goals, such as model debugging, gaining trust of various stakeholders, providing actionable recourse, assisting in scientific/causal discovery, and aiding Human/AI teams \cite{bhattpaper,lipton2018mythos, gilpin2018explaining} (Figure~\ref{fig:taxonomy}).
While this represents a good start, it is of limited utility to treat each of these categories as monolithic problems for IML to solve. For one, these problems are complex and should not be assumed to be completely solvable by IML itself. Rather, IML is but one potential set of tools that must be demonstrated to be useful. That is, to show that an IML method is an effective diagnostic, specific use cases must be identified and demonstrated \cite{krishnan2019against}.
Secondly, each broad goal really includes multiple separate technical problems, crossed with many possible practical settings and constraints. It is likely that a given IML method will not be equally useful across the board for all of these sub-problems and domains.
Thus, claims of practical usefulness should ideally be specified down to the level of an adequately defined \textit{target use case} (TUC).
TUCs, like TOs on the methods side, correspond to learning a specific relevant characteristic about the underlying model (e.g. a certain property or notion of model behavior).
However, unlike a TO, they represent real-world problems that, while evaluable, often might not be amenable to direct optimization. For example, one can set up real or simulated evaluations (see Section \ref{section:pitfall3}) to determine whether an IML method is useful for identifying a particular kind of bug in the model (e.g. spurious positive correlations), but it is not so obvious how to optimize an IML method that will succeed on those real or simulated evaluations.
\section{A Workflow for Establishing Diagnostics}
\label{section:workflow}
We now turn to how a diagnostic vision for IML can be more fully realized, discussing how methods can be established as diagnostics, thus filling gaps in the existing taxonomy.
Specifically, we define an ideal workflow for consumer-researcher teams to conduct future studies about IML methods describing how the taxonomy can guide best practices for each of the three key steps: (1) Problem Definition, (2) Method Selection, and (3) Method Evaluation. This workflow applies to both teams who wish to study existing IML methods and those who are proposing new ones.
To help contextualize this discussion, we provide a running example that builds on the Computer Vision model debugging example from Figure~\ref{fig:abstractedversion} (right). Model debugging is not only a common \cite{hong2020human, bhattpaper}, but also well-grounded consumer use case. It is a natural starting point due to the versatile nature of its assumed consumer, data scientists, typically has both substantial ML knowledge and domain expertise, minimizing the communication gap between the data scientist and the IML researcher.
\begin{figure}[]
\centering
\includegraphics[scale=0.26]{LaTeX/Running_Example_updated.pdf}
\caption{A hypothetical version of the use cases part of our taxonomy as produced by the consumer-researcher handshake in our running example.
The identified TUC is highlighted by the box with the thicker border.}
\label{fig:runningexample}
\end{figure}
\subsection{Step 1: Problem Definition}
\label{section:pitfall1}
As motivated by Section \ref{sec:usecasegoals}, we argue that an important first step for any principled study is to define a well-specified TUC. We call this the \textit{consumer-researcher handshake} (Figure \ref{fig:taxonomy}), where researchers work with consumers to progressively refine the latter's real-world problems into relevant TUCs. In this process, some helpful pieces of information that should be discussed include: the data available, the ML pipeline used, the domain knowledge required to perform evaluations, etc. Ultimately, a more flushed out taxonomy will help researchers to have more concrete use cases at hand to motivate their method development and consumers to have more realistic guidance on what IML can and cannot do for them.
\textit{\textbf{Running Example:} Consider a data scientist who wants to debug their image-based object detection model.
The team needs to identify a TUC that is more specific than ``perform model debugging'' by identifying exactly what the notion of ``bug'' is that the IML method should detect.
As shown in a hypothetical version of the use cases part of the taxonomy (Figure \ref{fig:runningexample}), the umbrella of model debugging includes sub-problems such as detecting spurious correlations and identifying bad edge-case behavior.
Through the consumer-researcher handshake, it arises that the data scientist is concerned the model might not be making correct decisions based on the actual target objects, but rather relying on correlated objects which also happen to be present.
For example, the model might be using the presence of a person as an indicator that there is a tennis racket in the image, instead of the racket itself.
}
\textit{This information allows the team to navigate the portion of the taxonomy in Figure \ref{fig:runningexample}.
By considering the data scientist's concern, they first narrow the goal from model debugging to detecting spurious correlations (SCs).
Then, by also taking into account the specific setting (i.e. the presence of the tennis racket at the same time as the tennis player), they are able to arrive at a further specified use case of detecting SCs between two positively correlated objects.
In this case, the team takes care to differentiate this from the analogous problem of detecting reliance on negatively correlated objects, reasoning that the latter is fundamentally different (i.e., it is harder to tell that the output depends on an object or not if the co-occurrences are rare in the first place).}
\subsection{Step 2: Method Selection}
\label{section:pitfall2}
After a TUC has been properly defined, the next step is to consider which IML methods might be appropriate.
This does assume that IML methods are necessary, that is the team should have demonstrated that the TUC presents challenges to more ``trivial'' or conventional diagnostics. For example, \cite{bansal2020does} found model confidence to be a competitive baseline against dedicated interpretability approaches for AI-human decision making teams.
If non-IML diagnostics are unsuccessful, there are two ways the taxonomy can be used to select methods.
First, researchers and consumers can, as a default, traverse the methods part of the taxonomy to hypothesize the TOs (and thus respective method clusters) that might best align with the TUC.
Doing so should rely on the researcher's best judgment in applying prior knowledge and intuition about various method types to try to narrow down the set of potential TOs. If a method is being proposed, the method should be mapped to the appropriate method cluster and the same selection process should follow.
Second, the team can also navigate starting from the use cases part, leveraging and expanding on connections established by previous studies.
Naturally, if some methods have already been shown to work well on a TUC, then those (or similar) methods provide immediate baselines when studying the same (or similar) use cases.
In either case, an important --yet subtle-- choice must then be made for each method: exactly how its resulting explanations should be interpreted, i.e. which TO is being addressed.
As discussed in Section \ref{sec:methodgoals}, a method belonging to a specific cluster may most naturally address the associated TO, but it is also possible, and indeed commonplace, to attempt \textit{cross-cluster adaptation} for addressing other TOs.
Unfortunately, while such adaptations are perhaps useful at times, they are often performed in an ad hoc fashion.
Specifically, the differences between the technical details of each TO are often overlooked in the adaptation process, which we illustrate next via two examples (and in more depth in Appendix \ref{appendix:crosscluster}).
\begin{figure*}[!t]
\centering
\includegraphics[width=1.0\textwidth]{LaTeX/Evaluation.pdf}
\caption{An overview of where different types of IML evaluations (faithfulness and usefulness) fall within the overall pipeline of IML applications. We highlight differences in goals of these evaluations as well as the various moving components that affect them. Colored boxes denote components that need to be defined (IML method and TO, Chosen TUC), while gray boxes to denote components that require more careful study (Explanation Understanding and Decision Process).
}
\label{fig:evaluations}
\end{figure*}
First, one might try to use feature importance weights, via SHAP \cite{lundberg2017unified}, as linear coefficients in a local approximation.
Such an adaptation assumes that the notion of local ``importance'' also can reflect linear interactions with features on the desired approximation region. However, this is not necessarily guaranteed by SHAP, which instead enforces a different set of game-theoretic desiderata on the importance values and may be set up to consider a quite disparate set of perturbations compared to the target approximation region.
Conversely, one can think of saliency maps via vanilla gradients~\cite{simonyan2013deep} as an adaptation in the opposite direction.
These saliency maps, a local approximation where the effective neighborhood region is extremely small, are more popularly used to address local feature attribution objectives such as to identify which parts of the image are affecting the prediction the most.
However, this adaptation carries an underlying assumption that the pixels with the largest gradients are also the most ``important''. This approximation may not be accurate because the local shape measured by the gradient is not necessarily indicative of the model's behavior near a baseline input that is farther away.
\textit{\textbf{Running example:} In this scenario, suppose that there have not been previously established results for detecting positive SCs.
The team follows the methods part of the taxonomy to generate hypotheses for which types of local explanations best suits their needs for understanding individual images.
They decide against approximation based objectives, because as the inputs vary in pixel space, simple approximations are unlikely to hold or be semantically meaningful across continuous local neighborhoods.
They choose feature attribution because they hypothesize that visualizing the features that the model deems most important would be useful for detecting these types of SCs.}
\textit{The team proposes a method in the local counterfactual method cluster that identifies the super-pixels that must change in order to flip the prediction from ``tennis racket'' to ``no tennis racket''.
By ``visualizing'' the counterfactual explanation like a saliency map, the team performs a cross-cluster adaptation to interpret the counterfactual as a feature attribution explanation.
To do so, they are assuming that the most changed features are also the most important to detecting the tennis racket.
They reason that a feature attribution explanation would be a more intuitive format for the data scientist for this TUC.
In terms of comparison, a feature attribution method that the team selects for comparison is Grad-CAM \cite{selvaraju2017grad}, which also produces a saliency map.}
\subsection{Step 3: Method Evaluation}
\label{section:pitfall3}
Once appropriate method(s) have been chosen, the last step is to evaluate them. Evaluation is the crucial step of testing whether proposed methods can actually help address the specified TUC. However, evaluations are often carried out in manners incongruent with the properties they claim to test. One common mistake is that the evaluation of an explanation’s \textit{faithfulness} (i.e. ability to meet a specified TO) is often problematically conflated with the evaluation of its \textit{usefulness} (i.e., applicability for addressing practical TUCs). While both may play important roles, as we discuss further in this section, they target fundamentally different claims.
Our taxonomy addresses this mistake by mapping these evaluations to its different components: faithfulness corresponds to meeting objectives of a specific TO in the methods part and usefulness corresponds to meeting the TUC in the use cases part. Next, using Figure \ref{fig:evaluations} as a guide, we clarify differences between these two types of evaluations and how they can be carried out.
\textbf{Faithfulness Evaluations} are performed
with respect to a proxy metric specified using the relevant technical details from the target TO class. For example, if the goal was to show the usefulness of an approximation-based explanation adapted as a counterfactual, the faithfulness evaluation should be with respect to a counterfactual proxy metric. Referring to the terminology from \cite{doshivelez2017rigorous}, these types of evaluations are called \textit{functionally-grounded}, that is involving automated proxy tasks and no humans. While such evaluations are easiest to carry out, they come with key limitations.
In general, one should expect that a method would perform well at least on a proxy for its selected TO and, naturally, those methods which do not directly target this specific proxy will likely not perform as well. An explanation can also be faultily compared as a result of unfair or biased settings of technical details.
As an example, although GAMs \cite{hastie1990generalized} and linear models both provide local approximations, comparing these methods only in the context of fidelity ignores the fact that GAMs potentially generate more ``complicated'' explanations.
Further, while faithfulness evaluations can act as a first-step sanity check before running more costly usefulness evaluations, showing that a method is faithful to the model alone is not conclusive of the method's \textit{real-world} usefulness until a direct link is established between the corresponding proxy and TUC.
Once these links are established, these proxies can then be used more confidently to help rule out bad set-ups before performing expensive usefulness evaluations.
\textbf{Usefulness evaluations}, in contrast to faithfulness, measure a user’s success in applying explanations on the specified TUC. Since they are ultimately an evaluation of what one \textit{does} with an explanation, usefulness depends crucially on factors such as users' prior knowledge, such as domain and ML/IML experience. Referring to the terminology from \cite{doshivelez2017rigorous}, users' perspectives can be incorporated through studies on real humans performing simplified or actual tasks (i.e. \textit{human-grounded} or \textit{application-grounded} evaluations respectively). In particular, to successfully utilize explanations in practice, we would need to study how this process might differ depending on the presentation of the explanation and explicit instructions that are provided.
As highlighted by the cloud in Figure \ref{fig:evaluations}, how exactly users translate explanation calculations (in their minds) to their final judgments remains murky. This motivates further research relating to better understanding \textit{what users understand explanations to tell them} and \textit{how they act upon these understandings}. Then, when establishing new diagnostics, these assumptions/limitations should be clearly spelled out for when researchers use the method in a future study and when the consumers deploy the method.
Motivated by these challenges, we suggest researchers consider another type of usefulness evaluation called \textit{simulation evaluation}. Simulation evaluation is an algorithmic evaluation on a simulated version of the real task where success and failure is distilled by a domain expert into a measurable quantity (as illustrated in the running example).
This type of evaluation is still based on the real task, but is easier and potentially more reliable to run than user studies. By simulating the users and their decision-making process algorithmically, thus controlling some noisier aspects of usefulness evaluation, researchers may be able to better understand why their methods are “failing”. Is it because of the algorithm itself, or the actual decision process users take?
Overall, success on these various levels of evaluations provides evidence for establishing a connection between the method in question and the TUC. Specifically, the team should check to see if the proxy metrics considered earlier were correlated to success on the TUC. If so, this would provide evidence for whether the proxy metrics considered should be used again in future studies, connecting faithfulness and usefulness evaluations.
\textit{\textbf{Running example: } The team first performs respective local feature attribution faithfulness evaluations for both methods using the notions of importance that each defines. For example, for the proposed method, the team ensures that each generated explanation \textit{faithfully} carries out its intended TO of identifying the effect of the presence or missingness of a super-pixel. However, good performance on any proxy metric does not conclusively imply good performance on the \textit{actual} TUC, so they turn to usefulness evaluation.}
\textit{The team first conducts a simulation evaluation, where a set of datasets is created that contains either an (artificially induced) positive correlation between a pair of objects or no such correlations.
By carefully controlling the training and validation distributions, they can automatically verify whether or not a model has learned the problematic behavior they want to detect. Then, they can define a scoring function for the explanations (i.e., how much attention they pay to the spurious object) and measure how well that score correlates with the ground truth for each explanation.
}
\textit{Second, the team runs a human study with multiple models where they know the ground truth of which ones use SCs. They score data scientists based on whether they are able to use each explanation generated by the counterfactual versus Grad-CAM to correctly identify models which use SCs.
If the methods are successful on the human studies, the team has demonstrated the connection between them and the TUC of detecting positively correlated objects. }
\section{Conclusion}
Towards a diagnostic vision for IML, we presented a taxonomy as a way to clarify and begin bridging the gap between methods and use cases.
Further, we discussed best practices for how the taxonomy can be used and refined over time by researchers and consumers to better establish what methods are useful for what use cases.
As the taxonomy is flushed out via more studies by consumer-researcher teams, our vision is that it will be increasingly useful for both parties individually (Figure \ref{fig:abstractedversion}, middle).
We hope that our discussions promote better practices in discovering, testing, and applying new and existing IML methods moving forward.
\section{Acknowledgements}
We would like to thank David Alvarez-Melis, Maruan Al-Shedivat, Kasun Amarasinghe, Wenbo Cui, Lisa Dunlap, Boyang Fu, Rayid Ghani, Hoda Heidari, Oscar Li, Zack Lipton, Adam Perer, Marco Ribeiro, Kit Rodolfa, Sriram Sankararaman, Mukund Sundararajan, and Chih-Kuan Yeh for their valuable feedback. This work was supported in part by DARPA FA875017C0141, the National Science Foundation grants IIS1705121, IIS1838017 and IIS2046613, an Amazon Web Services Award, a Carnegie Bosch Institute Research Award, a Facebook Faculty Research Award, funding from Booz Allen Hamilton, and a Block Center Grant. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA, the National Science Foundation, or any other funding agency.
\bibliographystyle{icml2021}
|
\section*{This is an unnumbered first-level section head}
This is an example of an unnumbered first-level heading.
\specialsection*{THIS IS A SPECIAL SECTION HEAD}
This is an example of a special section head%
\footnote{Here is an example of a footnote. Notice that this footnote
text is running on so that it can stand as an example of how a footnote
with separate paragraphs should be written.
\par
And here is the beginning of the second paragraph.}%
.
\section{This is a numbered first-level section head}
This is an example of a numbered first-level heading.
\subsection{This is a numbered second-level section head}
This is an example of a numbered second-level heading.
\subsection*{This is an unnumbered second-level section head}
This is an example of an unnumbered second-level heading.
\subsubsection{This is a numbered third-level section head}
This is an example of a numbered third-level heading.
\subsubsection*{This is an unnumbered third-level section head}
This is an example of an unnumbered third-level heading.
\begin{lemma}
Let $f, g\in A(X)$ and let $E$, $F$ be cozero
sets in $X$.
\begin{enumerate}
\item If $f$ is $E$-regular and $F\subseteq E$, then $f$ is $F$-regular.
\item If $f$ is $E$-regular and $F$-regular, then $f$ is $E\cup
F$-regular.
\item If $f(x)\ge c>0$ for all $x\in E$, then $f$ is $E$-regular.
\end{enumerate}
\end{lemma}
The following is an example of a proof.
\begin{proof} Set $j(\nu)=\max(I\backslash a(\nu))-1$. Then we have
\[
\sum_{i\notin a(\nu)}t_i\sim t_{j(\nu)+1}
=\prod^{j(\nu)}_{j=0}(t_{j+1}/t_j).
\]
Hence we have
\begin{equation}
\begin{split}
\prod_\nu\biggl(\sum_{i\notin
a(\nu)}t_i\biggr)^{\abs{a(\nu-1)}-\abs{a(\nu)}}
&\sim\prod_\nu\prod^{j(\nu)}_{j=0}
(t_{j+1}/t_j)^{\abs{a(\nu-1)}-\abs{a(\nu)}}\\
&=\prod_{j\ge 0}(t_{j+1}/t_j)^{
\sum_{j(\nu)\ge j}(\abs{a(\nu-1)}-\abs{a(\nu)})}.
\end{split}
\end{equation}
By definition, we have $a(\nu(j))\supset c(j)$. Hence, $\abs{c(j)}=n-j$
implies (5.4). If $c(j)\notin a$, $a(\nu(j))c(j)$ and hence
we have (5.5).
\end{proof}
\begin{quotation}
This is an example of an `extract'. The magnetization $M_0$ of the Ising
model is related to the local state probability $P(a):M_0=P(1)-P(-1)$.
The equivalences are shown in Table~\ref{eqtable}.
\end{quotation}
\begin{table}[ht]
\caption{}\label{eqtable}
\renewcommand\arraystretch{1.5}
\noindent\[
\begin{array}{|c|c|c|}
\hline
&{-\infty}&{+\infty}\\
\hline
{f_+(x,k)}&e^{\sqrt{-1}kx}+s_{12}(k)e^{-\sqrt{-1}kx}&s_{11}(k)e^
{\sqrt{-1}kx}\\
\hline
{f_-(x,k)}&s_{22}(k)e^{-\sqrt{-1}kx}&e^{-\sqrt{-1}kx}+s_{21}(k)e^{\sqrt
{-1}kx}\\
\hline
\end{array}
\]
\end{table}
\begin{definition}
This is an example of a `definition' element.
For $f\in A(X)$, we define
\begin{equation}
\mathcal{Z} (f)=\{E\in Z[X]: \text{$f$ is $E^c$-regular}\}.
\end{equation}
\end{definition}
\begin{remark}
This is an example of a `remark' element.
For $f\in A(X)$, we define
\begin{equation}
\mathcal{Z} (f)=\{E\in Z[X]: \text{$f$ is $E^c$-regular}\}.
\end{equation}
\end{remark}
\begin{example}
This is an example of an `example' element.
For $f\in A(X)$, we define
\begin{equation}
\mathcal{Z} (f)=\{E\in Z[X]: \text{$f$ is $E^c$-regular}\}.
\end{equation}
\end{example}
\begin{xca}
This is an example of the \texttt{xca} environment. This environment is
used for exercises which occur within a section.
\end{xca}
The following is an example of a numbered list.
\begin{enumerate}
\item First item.
In the case where in $G$ there is a sequence of subgroups
\[
G = G_0, G_1, G_2, \dots, G_k = e
\]
such that each is an invariant subgroup of $G_i$.
\item Second item.
Its action on an arbitrary element $X = \lambda^\alpha X_\alpha$ has the
form
\begin{equation}\label{eq:action}
[e^\alpha X_\alpha, X] = e^\alpha \lambda^\beta
[X_\alpha X_\beta] = e^\alpha c^\gamma_{\alpha \beta}
\lambda^\beta X_\gamma,
\end{equation}
\begin{enumerate}
\item First subitem.
\[
- 2\psi_2(e) = c_{\alpha \gamma}^\delta c_{\beta \delta}^\gamma
e^\alpha e^\beta.
\]
\item Second subitem.
\begin{enumerate}
\item First subsubitem.
In the case where in $G$ there is a sequence of subgroups
\[
G = G_0, G_1, G_2, \ldots, G_k = e
\]
such that each subgroup $G_{i+1}$ is an invariant subgroup of $G_i$ and
each quotient group $G_{i+1}/G_{i}$ is abelian, the group $G$ is called
\textit{solvable}.
\item Second subsubitem.
\end{enumerate}
\item Third subitem.
\end{enumerate}
\item Third item.
\end{enumerate}
Here is an example of a cite. See \cite{A}.
\begin{theorem}
This is an example of a theorem.
\end{theorem}
\begin{theorem}[Marcus Theorem]
This is an example of a theorem with a parenthetical note in the
heading.
\end{theorem}
\begin{figure}[tb]
\blankbox{.6\columnwidth}{5pc}
\caption{This is an example of a figure caption with text.}
\label{firstfig}
\end{figure}
\begin{figure}[tb]
\blankbox{.75\columnwidth}{3pc}
\caption{}\label{otherfig}
\end{figure}
\section{Some more list types}
This is an example of a bulleted list.
\begin{itemize}
\item $\mathcal{J}_g$ of dimension $3g-3$;
\item $\mathcal{E}^2_g=\{$Pryms of double covers of $C=\openbox$ with
normalization of $C$ hyperelliptic of genus $g-1\}$ of dimension $2g$;
\item $\mathcal{E}^2_{1,g-1}=\{$Pryms of double covers of
$C=\openbox^H_{P^1}$ with $H$ hyperelliptic of genus $g-2\}$ of
dimension $2g-1$;
\item $\mathcal{P}^2_{t,g-t}$ for $2\le t\le g/2=\{$Pryms of double
covers of $C=\openbox^{C'}_{C''}$ with $g(C')=t-1$ and $g(C'')=g-t-1\}$
of dimension $3g-4$.
\end{itemize}
This is an example of a `description' list.
\begin{description}
\item[Zero case] $\rho(\Phi) = \{0\}$.
\item[Rational case] $\rho(\Phi) \ne \{0\}$ and $\rho(\Phi)$ is
contained in a line through $0$ with rational slope.
\item[Irrational case] $\rho(\Phi) \ne \{0\}$ and $\rho(\Phi)$ is
contained in a line through $0$ with irrational slope.
\end{description}
\bibliographystyle{amsplain}
\section{An example of slow decay in the Kolmogorov $n$-width}
\label{appendix:example}
\begin{examp}
\label{example:kolmogorov-decay}
Let $\Omega:=(-2,2)$. For any $x_{0}\in\Omega$, let $\delta_{x_{0}}$ be the Dirac delta distribution centered at $x_{0}$. Consider the 2-dimensional parameter space $\Theta:=\{\boldsymbol{\mu}=(\mu_{1},\mu_{2})\in[-1,1]\times[0,1]\;|\;-1\le \mu_{1}-\mu_{2}\le \mu_{1}+\mu_{2}\le 1\}$, together with the differential problem below
$$
\begin{cases}
-u'' = 2\delta_{\mu_{1}}-\delta_{\mu_{1}-\mu_{2}}-\delta_{\mu_{1}+\mu_{2}} & x\in\Omega
\\u(-2) = u(2) = 0
\end{cases}
$$
For each $\boldsymbol{\mu}\in\Theta$, the corresponding solution $u_{\mup}$ is a piecewise linear function with support given by $[\mu_{1}-\mu_{2},\mu_{1}+\mu_{2}]$. In particular, $u_{\mup}$ is a hat function with a peak of height $\mu_{2}$ at $x=\mu_{1}$. Also, by direct calculation, $$||u_{\mup}||_{L^{2}(\Omega)} = \sqrt{\frac{2}{3}\mu_{2}^{3}}.$$ Let now $\mathcal{S}:=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}\subset V:=L^{2}(\Omega)$ and fix any positive $n\in\mathbb{N}$. It is then easy to see that the functions
$$v_{i,n}:=u_{\left(-1+\frac{i}{n}-\frac{1}{2n}, \frac{1}{2n}\right)},\quad i=1,...,2n$$
are mutually orthogonal in $L^{2}(\Omega)$. As a consequence, the Kolmogorov $n$-width of $\mathcal{S}$ satisfies
\[
\begin{multlined}
d_{n}(\mathcal{S}) \ge d_{n}(\{v_{i,n}\}_{i=1}^{2n}) = \\\\
= d_{n}\left(\left\{||v_{i,n}||_{L^{2}(\Omega)}^{-1}v_{i,n}\right\}_{i=1}^{2n}\right)||v_{i,n}||_{L^{2}(\Omega)} = \frac{1}{\sqrt{2}}||v_{i,n}||_{L^{2}(\Omega)} = \frac{1}{2\sqrt{6}}n^{-3/2},
\end{multlined}
\]
\newline
where the second last equality follows by noticing that the set $\{||v_{i,n}||_{L^{2}(\Omega)}^{-1}v_{i,n}\}_{i=1}^{2n}$ is isometric to the canonical basis of $\mathbb{R}^{2n}$ (see \cite{ohlberger}).
Therefore, $d_{n}(\mathcal{S})$ decays with a rate of at most $n^{-3/2}$, which is relatively slow when compared to the ideal case where the parametric map is analytic and the Kolmogorov $n$-width is known to decay exponentially, $d_{n}(\mathcal{S})\sim\text{e}^{-\gamma n}$.
\end{examp}}
\section{Proof of the Claims in Section \ref{sec:experiments}}
\label{appendix:exp}
\newcommand{\x_{\mup}}{\mathbf{x}_{\boldsymbol{\mu}}}
\noindent\textbf{Proof of Claim 1.} Let $\boldsymbol{\mu}\in\Theta$. For the sake of brevity, define $\x_{\mup}:=(\mu_{6},\mu_{7})\in\Omega$. We shall recall that, by Morrey's embedding theorem \cite{evans}, we have $W^{1,4}_{0}(\Omega)\hookrightarrow\mathcal{C}^{0,1/2}(\Omega)$, the latter being the space of $1/2$-Hölder maps. As a consequence, for any $w\in W^{1,4}_{0}(\Omega)$, we have
\[
\begin{multlined}
\left|w(\x_{\mup})-\int_{\Omega}f_{\boldsymbol{\mu}}(\mathbf{z})^{\epsilon}w(\mathbf{z})d\mathbf{z}\right| = \left|\int_{\Omega}(w(\x_{\mup})-w(\mathbf{z}))f_{\boldsymbol{\mu}}^{\epsilon}(\mathbf{z})d\mathbf{z}\right|\le
\\
\le \int_{\Omega}|w(\x_{\mup})-w(\mathbf{z})|f_{\mup}^{\epsilon}(\mathbf{z})d\mathbf{z}\le C'||w||_{W^{1,4}_{0}(\Omega)}\int_{\mathbb{R}^{2}}|\x_{\mup}-\mathbf{z}|^{1/2}f_{\mup}^{\epsilon}(\mathbf{z})d\mathbf{z}
\end{multlined}
\]
for a constant $C'>0$ independent on both $w$ and $\boldsymbol{\mu}$. The change of variables $\mathbf{y}:=(\mathbf{z}-\x_{\mup})/\epsilon$ then yields
\[
\begin{multlined}
\left|w(\x_{\mup})-\int_{\Omega}f_{\boldsymbol{\mu}}(\mathbf{z})^{\epsilon}w(\mathbf{z})d\mathbf{z}\right| \le..\le C'||w||_{W^{1,4}_{0}(\Omega)}\epsilon^{1/2}\int_{\mathbb{R}^{2}}|\mathbf{y}|^{1/2}G(\mathbf{y})d\mathbf{y}
\end{multlined}
\]
where $G$ is the probability density of the standard normal distribution in $\mathbb{R}^{2}$. By passing at the supremum over $w$ with $||w||_{W^{1,4}_{0}(\Omega)}=1$ and $\boldsymbol{\mu}\in\Theta$ we get
$$\sup_{\boldsymbol{\mu}\in\Theta}||f_{\mup}-f_{\mup}^{\epsilon}||_{W^{-1,4}(\Omega)}\le C''\epsilon^{1/2}$$
for some constant $C''>0$. By classical stability estimates for elliptic PDEs, see e.g. Lemma \ref{lemma:abstract-continuity}, we then have $\sup_{\boldsymbol{\mu}\in\Theta}||u_{\mup}-u_{\mup}^{\epsilon}||_{W^{1,4/3}(\Omega)}\le 10C''\epsilon^{1/2}$, as $\cond_{\mup}(\mathbf{x})\ge10^{-1}$ for all $\boldsymbol{\mu}\in\Theta$. Up to the embedding the solution manifold in $L^{2}(\Omega)$, the claim now follows.\qed
\newline\newline
\textbf{Proof of Claim 2}. The idea is to re-parametrize the solution manifold, as the given parametrization suffers from the lack of injectivity. In fact, both $\mu_{5}=0$ and $\mu_{5}=2\pi$ return the same advective field (and we cannot exclude one extreme, or $\Theta$ would lose its compactness).
\newcommand{\mup'}{\boldsymbol{\mu}'}
\newcommand{\mup''}{\boldsymbol{\mu}''}
To do so, let $S^{1}$ be the unit circle in $\mathbb{R}^{2}$. We define the hypercylinder $\Theta':=[0,1]^{4}\times S^{1}\times[0.1, 0.9]^{2}$. We will adopt a seven component notation as before, even though $\Theta'\subset\mathbb{R}^{8}$, as $\boldsymbol{\mu}_{5}\in S^{1}$ is now 2-dimensional. We re-parametrize the coefficients of the PDE in terms of this new coordinates in the obvious way, especially for $\boldsymbol{\sigma}_{\mup'}$ and $f_{\mup'}$. For the advective field we let $\boldsymbol{b}_{\mup'}:=\boldsymbol{\mu}_{5}$. We shall now prove that: (i) the new parameter space satisfies $n_{\min}(\Theta')=7$, (ii) the new parametric map $\mup'\to u_{\mup'}$ is continuous and (iii) injective. Claim 2 then follows by Theorem \ref{theorem:parametric-reduction}.
\newline\newline
\textit{Proof that $n_{\min}(\Theta')=7$}. Consider the map $\phi:\Theta'\to\mathbb{R}^{7}$ given by
$$\phi(\mup')=(\mup'_{5}(1+\mu'_{1}),\; \mu'_{2},\;\mu'_{3},\;\mu'_{4},\;\mu'_{6},\;\mu'_{7}).$$
Then the image $\phi(\Theta')=\{\mathbf{z}\in\mathbb{R}^{2}:1\le|\mathbf{z}|\le2\}\times[0,1]^{3}\times[0.1,0.9]^{2}\subset\mathbb{R}^{7}$ has nonempty interior. In particular, $n_{\min}(\phi(\Theta'))=7$. Since $\phi$ clearly admits a continuous inverse, $\phi^{-1}: \phi(\Theta')\to\Theta'$, we conclude that $n_{\min}(\Theta')=7$.
\newline\newline\textit{Proof that the parametric map $\boldsymbol{\mu}'\to u_{\boldsymbol{\mu}'}$ is continuous}. Clearly $\boldsymbol{\sigma}_{\mup'}$ and $\boldsymbol{b}_{\mup'}$ depend continuously on $\mup'$. Using again the embedding $W^{1,4}_{0}(\Omega)\hookrightarrow\mathcal{C}^{0,1/2}(\Omega)$ as in the proof of Claim 1, it is also easy to see that the map $\mup'\to f_{\mup'}$ is $\Theta'\to W^{-1,4}(\Omega)$ Hölder continuous. By composition (see Lemma \ref{lemma:pde-continuity}), we then obtain the continuity of the parametric map.
\newline\newline\textit{Proof that the parametric map $\boldsymbol{\mu}'\to u_{\boldsymbol{\mu}'}$ is injective}. Let $\mup',\mup''\in\Theta'$ and assume that $u\in W^{1,4/3}(\Omega)$ is a solution for both parameters, that is $u=u_{\mup'}=u_{\mup''}$. Classical results on inner regularity of solutions to elliptic PDEs ensure that $u_{\mup'}$ is locally $H^{1}$ at all points except at the location of the Dirac delta $f_{\boldsymbol{\mu}'}$. The analogue holds for $u_{\mup''}$, so clearly it must be $\mu'_{6}=\mu''_{6}$ and $\mu'_{7}=\mu''_{7}$ in order for the solutions to coincide. Next, let $w\in\mathcal{C}^{\infty}_{0}(\Omega_{0})$ and extend it to zero on $\Omega\setminus\Omega_{0}$. Using $w$ as test function for the equations of both $\mup'$ and $\mup''$ and then subtracting term by term yields
$$C\int_{\Omega_{0}}\left(\boldsymbol{b}_{\mup'}-\boldsymbol{b}_{\mup''}\right)\cdot\nabla u w = 0.$$
As $w$ is arbitrary, it follows that $\nabla u$ is orthogonal to $(\boldsymbol{b}_{\mup'}-\boldsymbol{b}_{\mup''})$ on $\Omega_{0}$. In particular, if $\boldsymbol{b}_{\mup'}\neq\boldsymbol{b}_{\mup''}$, then $u$ must be constant along the direction $(\boldsymbol{b}_{\mup'}-\boldsymbol{b}_{\mup''})$ within $\Omega_{0}$. But, because of the boundary conditions, this would make $u$ identically constant near at least one edge of $\partial\Omega$. However, this is a contradiction. In fact, $u_{|\partial\Omega}\equiv1$, thus classical maximum principles ensure that $u>1$ a.e. in $\Omega$ (see e.g. Lemma \ref{lemma:positivity}). It follows that $\boldsymbol{b}_{\mup'}=\boldsymbol{b}_{\mup''}$ and so $\mup'_{5} = \mup''_{5}$. We now notice that, by subtracting the equations for $\mup'$ and $\mup''$, we have
\[\begin{multlined}
\sum_{i=1}^{4}(\mu'_{i}-\mu''_{i})\int_{\Omega_{i}}\nabla u\cdot\nabla w
= 0\quad\forall w\in \mathcal{C}^{\infty}_{0}(\Omega).
\end{multlined}\]
Fix any $i\in\{1,2,3,4\}$ and let $v\in\mathcal{C}^{\infty}(\Omega_{i})$. Define $w\in\mathcal{C}^{\infty}(\Omega_{i})$ to be any of the strong solutions to the PDE $-\Delta w = v$ with homogeneous Neumann boundary condition on $\partial\Omega_{i}$. Since the subdomains are clearly separated, it is possible to extend $w$ on the whole domain $\Omega$ so that $w$ is still smooth but also vanishes on $\partial\Omega$ and on $\Omega_{j}$ for all $j\neq i$. Using such $w$ in the last identity above and integrating by parts yields
$$0 = (\mu'_{i}-\mu''_{i})\int_{\Omega_{i}}\nabla u\cdot\nabla w = (\mu'_{i}-\mu''_{i})\int_{\Omega_{i}}u(-\Delta w) = (\mu'_{i}-\mu''_{i})\int_{\Omega_{i}}uv. $$
Now assume that $\mu'_{i}\neq\mu''_{i}$. Then $\int_{\Omega_{i}}uv=0$ for all $v\in\mathcal{C}^{\infty}(\Omega_{i})\implies u_{|\Omega_{i}}\equiv0$, contradiction. Then $\mu'_{i}=\mu''_{i}$ and thus $\mup'=\mup''$, as claimed.\qed
\section{Auxiliary results on Partial Differential Equations}
\label{appendix:pdes}
\newcommand{\normv}[1]{||#1||_{V}}
\newcommand{\normw}[1]{||#1||_{W}}
\newcommand{\normdual}[1]{||#1||_{*}}
\newcommand{\mathfrak{B}}{\mathfrak{B}}
\newcommand{\mathfrak{B}_{c}}{\mathfrak{B}_{c}}
\newcommand{\normb}[1]{|||#1|||}
\begin{lemma}
\label{lemma:abstract-continuity}
Let $(V, \normv{\cdot})$ and $(W, \normw{\cdot})$ be two Banach spaces, with $W$ reflexive. Let $(W^{*}, \normdual{\cdot})$ be the dual space of W and define $(\mathfrak{B}(V, W), \normb{\cdot})$ as the normed space of bounded bilinear forms $V\times W\to\mathbb{R}$, where
$$|||a|||:=\sup_{\substack{\\\normv{v}=1\\\normw{w}=1}}\;|a(v,w)|.$$
Let $\mathfrak{B}_{c}(V, W)\subset\mathfrak{B}(V,W)$ be the subset of coercive bounded bilinear forms, i.e. $a\in\mathfrak{B}(V,W)$ for which
$$\lambda(a) := \inf_{\normv{v}=1}\sup_{\normw{w}=1}\;|a(v,w)| > 0,\quad\quad\textnormal{and}\quad \inf_{\normw{w}=1}\sup_{\normv{v}=1}\;|a(v,w)|>0.$$
Then,
\begin{itemize}
\item[i)] $\lambda$ is $\mathfrak{B}(V,W)\to\mathbb{R}$ continuous
\newline
\item[ii)] For each $a\in\mathfrak{B}_{c}(V,W)$ and $F\in W^{*}$ there exists a unique $u=u_{a,F}\in V$ such that $a(v,w)=F(w)$ for all $w\in W$. Furthermore, $u$ depends continuously on both $a$ and $F$. In particular:
\begin{equation}
\label{eq:abstract-continuity}
\normv{u_{a,F}-u_{a',F'}} \le \frac{1}{\lambda(a)}\left(\normdual{F-F'}+\frac{1}{\lambda(a')}\normb{a-a'}\cdot\normdual{F'}\right)
\end{equation}
\newline
for all $a,a'\in\mathfrak{B}_{c}(V,W)$ and $F,F'\in W^{*}$.
\end{itemize}
\end{lemma}
\noindent
\proof{
i) Let $a,a'\in\mathfrak{B}(V,W)$. For every $v\in V$ and $w\in W$ with $\normv{v}=\normw{w}=1$ we have
$$a(v,w) = a'(v,w) + (a-a')(v,w) \le |a'(v,w)| + \normb{a-a'}.$$
Since the above holds for both $w$ and $-w$, we actually have $|a(v,w)| \le |a'(v,w)| + \normb{a-a'}$, and thus $\lambda(a) \le \lambda(a') + \normb{a-a'}$. As the situation is symmetric in $a$ and $a'$, it follows that $|\lambda(a)-\lambda(a')|\le\normb{a-a'}$. In particular, $\lambda$ is Lipschitz-continuous.
\newline
\newline
ii) Given $a\in\mathfrak{B}_{c}(V,W)$ and $F\in W^{*}$, the existence and uniqueness of $u_{a,F}$ follow from a Banach space version of the Lions-Lax-Milgram theorem (see Lemma 3.1. in \cite{hoffmann}). Furthermore, one also has the stability estimate $\normv{u_{a,F}} \le (\lambda(a))^{-1}\normdual{F}$.
To get the inequality in \eqref{eq:abstract-continuity}, let $a,a'\in\mathfrak{B}(V,W)$, $F,F'\in W^{*}$ and $u:=u_{a,F}$, $u':=u_{a',F'}$. Then $a(u,w)=F(w)$ and $a'(u',w)=F'(w)$ for all $w\in V$. We subtract these two identities to get
\[
\begin{multlined}
a(u,w)-a'(u',w) = F(w)-F'(w)
\\
\implies a(u-u',w) = (F-F')(w) + (a'-a)(u',w).
\end{multlined}
\]
It follows that, for all $w\in W$, one has $a(u-u',w) \le \normdual{F-F'}\normw{w} + \normb{a'-a}\cdot\normv{u'}\normw{w}$. By linearity, using both $w$ and $-w$, we conclude that
$$|a(u-u',w)| \le \normdual{F-F'}\normw{w} + \normb{a-a'}\cdot\normv{u'}\normw{w}\quad\quad\forall w\in W.$$
In particular, passing at the supremum over $\normw{w}=1$ yields
$$\lambda(a)\normv{u-u'} \le \normdual{F-F'} + \normb{a-a'}\cdot \normv{u'}.$$
Now, we may apply the stability estimate for $\normv{u'}$ and divide by $\lambda(a)$ to get \eqref{eq:abstract-continuity}. Finally the latter, together with (i), shows that $u' \to u$ as soon as $a'\to a$ and $F'\to F$.\qed
}
\newline\newline
For the next Lemma, we consider the notation introduced in Section \ref{sec:nonlinear-param-pdes}.1.
\begin{lemma}
\label{lemma:pde-continuity}
Let $\Omega\subset\mathbb{R}^{d}$ be a bounded domain. Let $1<q<+\infty$ and define the conjugate exponent $q':=(q-1)^{-1}q$. For each $\sigma\in\Sigma(\Omega)$, $b\in B(\Omega)$, $f\in W^{-1,q'}(\Omega)$ and $g\in W^{1/q',q}(\partial\Omega)$ let $u=u_{\sigma,b,f,g}$ be the unique solution to the following variational problem
\[
\begin{multlined}
u\in W^{1,q}(\Omega):\\ u_{|\partial\Omega}=g\quad\textnormal{and}\quad\int_{\Omega}\boldsymbol{\sigma}\nabla u\cdot\nabla w + \int_{\Omega}\left(\boldsymbol{b}\cdot\nabla u\right) w = \int_{\Omega}fw\quad\forall w\in W^{1,q'}_{0}(\Omega).
\end{multlined}
\]
Then, the solution map $(\boldsymbol{\sigma}, \boldsymbol{b}, f, g)\to u_{\boldsymbol{\sigma},\boldsymbol{b},f,g}$ is: (i) continuous, (ii) Lipschitz continuous on all compact subsets.
\end{lemma}
\noindent\proof{Before moving the actual proof, we shall recall that there exists a bounded linear operator $T: W^{1/q',q}(\partial\Omega)\to W^{1,q}(\Omega)$ for which $Tg_{|\partial\Omega} = g$, namely a right-inverse of the trace operator (see \cite{necas}). In particular, there exists a constant $\tilde{C}>0$ such that $||Tg||_{W^{1,q}(\Omega)}\le\tilde{C}||g||_{W^{1/q',q}(\partial\Omega)}$.
\newline\newline
For the sake of brevity, we let $V:= W_{0}^{1,q}(\Omega)$, $W:=W_{0}^{1,q'}$ and define $W^{*}$ as the dual space of $W_{0}^{1,q'}$ endowed with the operator norm.
As in Lemma \ref{lemma:abstract-continuity}, we also let $\mathfrak{B}(V,W)$ be the collection of all bounded bilinear maps $V\times W\to\mathbb{R}$ equipped with the corresponding operator norm. Similarly, we define $\mathfrak{B}_{c}(V, W)$ to be the subset of coercive bounded bilinear maps. We introduce the following operators:
\begin{align*}
\mathcal{A}:\quad&L^{\infty}(\Omega,\mathbb{R}^{d\times d})\times L^{\infty}(\Omega,\mathbb{R}^{d})\;\longrightarrow \;\mathfrak{B}(V,W)\\
&(\boldsymbol{\sigma},\boldsymbol{b})\;\longrightarrow\; a_{\boldsymbol{\sigma},\boldsymbol{b}}:=\mathcal{A}(\boldsymbol{\sigma},\boldsymbol{b}),
\end{align*}
\begin{align*}
\mathcal{F}:\quad&L^{\infty}(\Omega,\mathbb{R}^{d\times d})\times L^{\infty}(\Omega,\mathbb{R}^{d})\times W^{-1,q'}(\Omega)\times W^{1/q',q}(\partial\Omega)\;\longrightarrow \;W^{*}\\
&(\boldsymbol{\sigma},\boldsymbol{b}, f, g)\;\longrightarrow\; F_{\boldsymbol{\sigma},\boldsymbol{b},f,g}:=\mathcal{F}(\boldsymbol{\sigma},\boldsymbol{b},f,g),
\end{align*}
where,
$$a_{\boldsymbol{\sigma},\boldsymbol{b}}(v,w):=\int_{\Omega}\boldsymbol{\sigma}\nabla v\cdot\nabla w + \int_{\Omega}\left(\boldsymbol{b}\cdot\nabla v\right) w,$$
$$
F_{\boldsymbol{\sigma},\boldsymbol{b},f,g}(w):=\int_{\Omega}\boldsymbol{\sigma}\nabla Tg\cdot\nabla w + \int_{\Omega}(\boldsymbol{b}\cdot Tg)w + \int_{\Omega}fw.
$$
We claim that:
\begin{itemize}
\item [1)] The operator $\mathcal{A}$ is linear and continuous. Also, $a_{\boldsymbol{\sigma},\boldsymbol{b}}\in\mathfrak{B}_{c}(V,W)$ for all choices of $\boldsymbol{\sigma}\in\Sigma(\Omega)$ and $\boldsymbol{b}\in B(\Omega)$.\\
\item [2)] The operator $\mathcal{F}$ continuous. Also, it is Lipschitz continuous when restricted to any compact subset of its domain.
\end{itemize}
\noindent We shall now prove these claims. First of all, let $C>0$ be the Poincàre constant for the domain $\Omega$ and the exponent $q'$. Then, it is straightforward to see that
\newcommand{\normq}[1]{||#1||_{W^{1,q}_{0}(\Omega)}}
\newcommand{\normqp}[1]{||#1||_{W^{1,q'}_{0}(\Omega)}}
\newcommand{\normdd}[1]{||#1||_{L^{\infty}(\Omega,\mathbb{R}^{d\times d})}}
\newcommand{\normd}[1]{||#1||_{L^{\infty}(\Omega,\mathbb{R}^{d})}}
\[
\begin{multlined}
|a_{\boldsymbol{\sigma},\boldsymbol{b}}(v,w)| \le \normdd{\boldsymbol{\sigma}}\normq{v}\normqp{w}\\ + C\normd{\boldsymbol{b}}\normq{v}\normqp{w},
\end{multlined}
\]
for all $v\in V$ and $w\in W$. In particular, $\mathcal{A}$ is both linear and bounded, thus continuous. Let now $\boldsymbol{\sigma}\in\Sigma(\Omega)$, $\boldsymbol{b}\in B(\Omega)$ and define $\varepsilon=\varepsilon(\boldsymbol{\sigma})>0$ to be the ellipticity constant of $\boldsymbol{\sigma}$. We notice that if $\varphi\in\mathcal{C}^{\infty}_{0}(\Omega)$, then $\varphi$ is both an element of $V$ and $W$. Also, integrating by parts yields
\[
\begin{multlined}
a_{\boldsymbol{\sigma},\boldsymbol{b}}(\varphi,\varphi)=\int_{\Omega}\boldsymbol{\sigma}\nabla \varphi\cdot\nabla \varphi+\int_{\Omega}\boldsymbol{b}\cdot\left(\varphi\nabla\varphi\right)
\ge\\\ge\varepsilon\normq{\varphi}\normqp{\varphi} + \int_{\Omega}\boldsymbol{b} \cdot\nabla\left(\frac{1}{2}\varphi^{2}\right) =\\=\varepsilon\normq{\varphi}\normqp{\varphi} - \frac{1}{2}\int_{\Omega}\text{div}(\boldsymbol{b})\varphi^{2}=\\=\varepsilon\normq{\varphi}\normqp{\varphi},
\end{multlined}
\]
as $\boldsymbol{b}$ is divergence free. It follows that for each $\varphi\in\mathcal{C}^{\infty}_{0}(\Omega)$ with $\varphi\neq0$
$$\sup_{\\\substack{\psi\in\mathcal{C}^{\infty}_{0}(\Omega)\\\normqp{\psi}=1}} |a_{\boldsymbol{\sigma},\boldsymbol{b}}(\varphi,\psi)| \ge a_{\boldsymbol{\sigma},\boldsymbol{b}}\left(\varphi,\normqp{\varphi}^{-1}\varphi\right)\ge\varepsilon\normq{\varphi}$$
and, similarly,
$$\sup_{\\\substack{\psi\in\mathcal{C}^{\infty}_{0}(\Omega)\\\normq{\psi}=1}} |a_{\boldsymbol{\sigma},\boldsymbol{b}}(\psi,\varphi)| \ge a_{\boldsymbol{\sigma},\boldsymbol{b}}\left(\normq{\varphi}^{-1}\varphi,\varphi\right)\ge\varepsilon\normqp{\varphi}.$$
Since $a_{\boldsymbol{\sigma},\boldsymbol{b}}$ is continuous and $\mathcal{C}^{\infty}_{0}(\Omega)$ is both dense in $V$ and $W$, by the above we conclude that $a_{\boldsymbol{\sigma},\boldsymbol{b}}\in\mathfrak{B}_{c}(V,W)$. This proves claim (1).
\newline
\newline
We now move to (2). For each $\boldsymbol{\sigma},\boldsymbol{b},f,g$ and $w\in W$ we have\newcommand{\normtg}[1]{||#1||_{W^{1,q}(\Omega)}}
\[
\begin{multlined}
|F_{\boldsymbol{\sigma},\boldsymbol{b},f,g}(w)|\le \normdd{\boldsymbol{\sigma}}\normtg{Tg}\normqp{w}\\+C\normd{\boldsymbol{b}}\normtg{Tg}\normqp{w}\\+||f||_{W^{-1,q'}(\Omega)}\normqp{w}.
\end{multlined}
\]
In particular, for all $w\in W$ with unitary norm,
\newcommand{\normboundary}[1]{||#1||_{W^{1/q',q}(\partial\Omega)}}
\[
\begin{multlined}
|F_{\boldsymbol{\sigma},\boldsymbol{b},f,g}(w)|\le \tilde{C}\normboundary{g}\left( \normdd{\boldsymbol{\sigma}}+C\normd{\boldsymbol{b}}\right)+||f||_{W^{-1,q'}(\Omega).}
\end{multlined}
\]
From here, arguing by linearity easily yields (2).
\newline\newline
Finally, for each $\boldsymbol{\sigma}\in\Sigma(\Omega),\boldsymbol{b}\in B(\Omega),f\in W^{-1,q'}(\Omega),g\in W^{1/q',q}(\partial\Omega)$ let $\tilde{u}_{\boldsymbol{\sigma},\boldsymbol{b},f,g}\in V=W^{1,q}_{0}(\Omega)$ be the unique solution to the variational problem
$$a_{\boldsymbol{\sigma},\boldsymbol{b},f,g}(\tilde{u}, w) = F_{\boldsymbol{\sigma},\boldsymbol{b},f,g}(w)\quad\forall w\in W.$$
At this regard, we notice that $W = W^{1,q'}_{0}(\Omega)$ is reflexive, in fact $1<q<+\infty$ implies $1<q'<+\infty$. Therefore, by Lemma \ref{lemma:abstract-continuity}, we know that $\tilde{u}_{\boldsymbol{\sigma},\boldsymbol{b},f,g}$ exists unique and it depends continuously (by composition) on $(\boldsymbol{\sigma},\boldsymbol{b},f,g)$. Furthermore, as clear from inequality \eqref{eq:abstract-continuity} in Lemma \ref{lemma:abstract-continuity}, the correspondence $(\boldsymbol{\sigma},\boldsymbol{b},f,g)\to\tilde{u}_{\boldsymbol{\sigma},\boldsymbol{b},f,g}$ is Lipschitz continuous on every compact subset of the product space $\Sigma(\Omega)\times B(\Omega)\times W^{-1,q'}(\Omega)\times W^{1/q',q}(\partial\Omega)$. This is easily deduced by the properties of $\mathcal{A}$ and $\mathcal{F}$ as well as by the fact that compactness is preserved under continuous transformations. Finally, we notice that
$$u_{\boldsymbol{\sigma},\boldsymbol{b},f,g}=\tilde{u}_{\boldsymbol{\sigma},\boldsymbol{b},f,g}+Tg.$$
The conclusion follows.\qed}
\begin{lemma}
\label{lemma:positivity}
Consider the context and notation in Lemma \ref{lemma:pde-continuity}. If $g\equiv c\in\mathbb{R}$ and $f > 0$ in the distributional sense, then $u>c$ a.e. in $\Omega$.
\end{lemma}
\noindent\proof{This simply derives from maximum principles. We first prove the case $c=0$. Let $\eta\in\mathcal{C}^{\infty}_{0}(\Omega)$ be such that $\eta>0$ everywhere in $\Omega$. Let $w\in H^{1}_{0}(\Omega)$ be the solution to the following adjoint variational problem:
$$\int_{\Omega}\boldsymbol{\sigma}^{T}\nabla w\cdot\nabla v - \int_{\Omega}(\boldsymbol{b}\cdot\nabla w)v = \int_{\Omega}\eta v\quad\forall v\in\mathcal{C}^{\infty}_{0}(\Omega).$$
Within this regular case, the classical maximum principle states $w>\max w_{|\Omega} = 0$ in $\Omega$, see e.g. Theorem 2 in \cite{chicco}. Now we notice that $w\in W^{1,q'}_{0}(\Omega)$, as the PDE also admits a unique solution in that space. Thus, by density, we are allowed to consider $u$ as test function for $w$ and viceversa. Doing so and subtracting the equations for $u$ and $w$ yields
$$\int_{\Omega}\eta u = \int_{\Omega}fw,$$
since $\boldsymbol{\sigma}\nabla u\cdot\nabla w = \boldsymbol{\sigma}^{T}\nabla w\cdot \nabla u$ and the advective terms cancel out using the integration by parts formula (recall that $\boldsymbol{b}$ is divergence free while both $u$ and $w$ vanish on $\partial\Omega$). The above shows that $\int_{\Omega}\eta u > 0$, as the right hand side is positive by hypothesis. As $\eta$ was arbitrary, we conclude that $u>0$ a.e. in $\Omega$. Let now $c\neq0$. It is elementary to see that $u=c+u_{0}$, where $u_{0}$ solves the variational problem with homogenous boundary conditions. The conclusion follows.\qed}
\section{General background}
\label{sec:background}
Within the present Section we formally introduce the problem of reduced order modelling for parametrized PDEs. For later comparison, we also take the chance to recall the linear reduction technique known as Principal Orthogonal Decomposition \cite{luo,quarteroni}. In the remainder of the paper, we make use of elementary notions coming from the areas of Functional Analysis, Numerical Analysis and Topology. We respectively refer to \cite{adams,evans}, \cite{quarteroni-fem} and \cite{hocking}.
\subsection{Reduced Order Models for parametrized PDEs}
\label{sec:roms}
We are given a parameter space $\Theta\subset\mathbb{R}^p$, a Hilbert state space $(V, ||\cdot||)$ and \final{parameter dependent operators $a_{\boldsymbol{\mu}}: V\times V\to\mathbb{R}$ and $f_{\boldsymbol{\mu}}: V\to\mathbb{R}$. For each $\boldsymbol{\mu}\in\Theta$ we consider the variational problem}
\begin{equation}
\label{eq:ppde}
u\in V:\quad a_{\boldsymbol{\mu}}(u, v)=f_{\boldsymbol{\mu}}(v)\quad\forall v\in V.
\end{equation}
We assume the problem to be well-posed, so that for each $\boldsymbol{\mu}\in\Theta$ there exists a unique solution $u=u_{\mup}\in V$.
Our interest is to define a ROM that is able to approximate the parametric map $\boldsymbol{\mu}\tou_{\mup}$ efficiently.
In general, the workflow goes as follows. First, one chooses a FOM, which we here assume to be based on Galerkin projections. This corresponds to fixing a so-called \textit{high-fidelity discretization}, that is a finite dimensional subspace $V_{h}\subset V$, dim$(V_{h})=N_{h}$, used to replace the original trial space. Having chosen a basis for $V_{h}$, say $\{\varphi_{i}\}_{i=1}^{N_{h}}$, for each $\boldsymbol{\mu}\in\Theta$ one turns equation \eqref{eq:ppde} into the (discrete) problem
\begin{equation}
\label{eq:disc}
\ufom_{\mup}=[\textrm{u}_{\boldsymbol{\mu},1}^{h},\dots,\textrm{u}_{\boldsymbol{\mu},N_{h}}^{h}]\in\mathbb{R}^{N_{h}}:\quad a_{\boldsymbol{\mu}}\left(\sum_{i=1}^{n}\textrm{u}_{\boldsymbol{\mu},i}^{h}\varphi_{i},\; v\right)=f_{\boldsymbol{\mu}}(v)\quad\forall v\in V_{h}.
\end{equation}
The main purpose of the high-fidelity discretization is to reframe the original problem within a finite dimensional setting, without particular care on the computational cost (for now). Regarding the choice of $V_{h}$, we make the following assumption.
\begin{assump}
\label{assump:high-fidelity}
For any $\varepsilon>0$ there exists $V_{h}:=\textnormal{span}\{\varphi_{i}\}_{i}^{N_{h}}\subset V$ such that
$$\sup_{\boldsymbol{\mu}\in\Theta}\left|\left|u_{\mup}-\sum_{i=1}^{N_{h}}\textnormal{$\textrm{u}_{\boldsymbol{\mu},i}^{h}$}\varphi_{i}\right|\right|<\varepsilon$$
that is, the FOM accuracy can be bounded independently on the value of $\boldsymbol{\mu}\in\Theta$.
\end{assump}
\noindent\newline
The above is a very common assumption in the literature, see e.g. \cite{kutyniok}, that allows us to formally replace $V$ with $V_{h}$. The objective now becomes that of learning the map $\boldsymbol{\mu}\to\ufom_{\mup}$ in a way that reduces the FOM cost. In particular, the construction of the ROM consists in finding a suitable map $\Phi:\mathbb{R}^{p}\to\mathbb{R}^{N_{h}}$ for which $\Phi(\boldsymbol{\mu})\approx\ufom_{\mup}$. To do so, the common practice is to make extensive use of the FOM during a preliminary offline stage, which results in the collection of the so-called \textit{snapshots}, $\{\boldsymbol{\mu}_{i}, \ufom_{\mup_{i}}\}_{i}\subset\mathbb{R}^{p}\times\mathbb{R}^{N_{h}}$. These snapshots are then processed in order to build the ROM. In this sense, the identification of $\Phi$ can be seen as a problem of Statistical Learning, as argued in \cite{kutyniok}.
The way $\Phi$ is defined from the data is what characterizes each ROM, its efficiency and accuracy.
\subsection{Methods based on linear projections}
\label{sec:pod}
Many state-of-the-art ROMs are built upon the use of linear reduction techniques, which are known to work particularly well for second order elliptic PDEs with affine coefficients \cite{cohen}. The idea is the following. Having fixed a high-fidelity discretization, one considers the (discretized) solution manifold $\solmanifold^{h}:=\{\ufom_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$ and tries to approximate it using linear subspaces. This translates into fixing a reduced dimension $n\in\mathbb{N}$ and searching for the orthonormal matrix $\mathbf{V}\in\mathbb{R}^{N_{h}\timesn}$ that minimizes the errors $||\ufom_{\mup} - \mathbf{V}\mathbf{V}^{T}\ufom_{\mup}||$. In practice, the identification of such $\mathbf{V}$ is done empirically by exploiting the aforementioned snapshots $\{\boldsymbol{\mu}_{i}, \ufom_{\mup_{i}}\}_{i=1}^{N}$, which is often achieved through the so-called Principal Orthogonal Decomposition (POD). In short, this latter approach considers all the FOM snapshots as columns of a matrix, $\mathbf{U}:=[\textbf{u}^{h}_{\boldsymbol{\mu}_{1}},,\textbf{u}^{h}_{\boldsymbol{\mu}_{N}}]$ and computes its singular value decomposition
$$\mathbf{U} = \tilde{\mathbf{U}}\Sigma\mathbf{W}^{T}$$
where $\Sigma=$diag$(\sigma_{1},..,\sigma_{N})$ with $\sigma_{1}\ge...\ge\sigma_{N}\ge0$.
Then, in the POD approach, $\mathbf{V}$ is defined by extracting the first $n$ columns of $\tilde{\mathbf{U}}$. It is well-known that this choice of $\mathbf{V}$ is optimal -in some sense- over the training sample $\{\ufom_{\mup_{i}}\}_{i=1}^{N}$. We also mention that, while this version of the POD considers $\mathbb{R}^{N_{h}}$ as a Euclidean space, slight modifications allow to account for different (e.g. energy) norms.
Once $\mathbf{V}$ has been built, the solution manifold is projected onto the reduced space $\mathbb{R}^{n}$, and each FOM solution is associated with the corresponding low-dimensional representation, $\ub^{\rdim}_{\mup}:=\mathbf{V}^{T}\ufom_{\mup}$.
\final{To be operational, the ROM then needs to implement a suitable algorithm that approximates the correspondence $\boldsymbol{\mu}\to\ub^{\rdim}_{\mup}$. If we represent the latter as a map $\phi:\Theta\to\mathbb{R}^{n}$, then the ROM approximation of high-fidelity solutions can be written as $\Phi(\boldsymbol{\mu}):=\mathbf{V}\phi(\boldsymbol{\mu})\approx\ufom_{\mup}$.
Within the literature, this step has been handled in multiple ways. In the Reduced Basis method \cite{lassila,quarteroni}, particularly in the so-called POD-Galerkin method, $\phi$ is defined intrusively by projecting and solving equation \eqref{eq:disc} onto span$(\mathbf{V})$.} Depending on the parametrization and on the type of PDE, this procedure may turn to be too expensive, which is why several alternatives have been proposed, see e.g. \cite{barrault,manzoni,shah}. \final{Nonintrusive approaches for defining $\phi$ include Gaussian process regression \cite{hesthaven1}, polynomial chaos expansions \cite{jiang}, neural networks \cite{hesthaven3, hesthaven2} and others}.
Nevertheless, because of the linear approximation, these ROMs encounter substantial difficulties as soon as $\mathcal{S}$ has a Kolmogorov $n$-width, see equation \eqref{eq:kolmogorov}, that decays slowly. In fact,
$$ \sup_{\boldsymbol{\mu}\in\Theta}||\ufom_{\mup}-\mathbf{V}\phi(\boldsymbol{\mu})||\;\ge\;\sup_{\boldsymbol{\mu}\in\Theta}||\ufom_{\mup}-\mathbf{V}\mathbf{V}^{T}\ufom_{\mup}||
\;\ge\;d_{n}(\solmanifold^{h})\;\ge\; d_{n}(\mathcal{S})-\varepsilon,$$
where $\varepsilon>0$ is the accuracy of the high-fidelity discretization. Therefore, if $d_{n}(\mathcal{S})$ decays slowly, one may be forced to consider large values of $n$, which in turn makes $\phi$ more expensive and harder to identify.
As we argue in the next Section, one possible solution to this problem is given by nonlinear reduction techniques. However, despite this being a promising direction, only a few steps have been made so far, e.g. \cite{bhattacharjee,fresca,lee}.
\section{Conclusions}
We developed a novel deep learning approach for reduced order modelling of parameter dependent PDEs, here termed DL-ROM, where the solution map is approximated by a deep neural network $\Phi$. Our construction is based on the use of autoencoders, which we employ as a nonlinear alternative to other reduction techniques such as the POD. In the DL-ROM approach, we choose the latent dimension to be the smallest one granting arbitrary accuracy. The value of such dimension was investigated in detail in Section \ref{sec:nonlinear}. There, we proved some theoretical results, respectively Theorem \ref{theorem:parametric-reduction} and Theorem \ref{theorem:advediff-reduction}, that can be used as guidelines for practical applications. \review{Further insights on the potential of the DL-ROM approach were discussed in Theorem 5, Section \ref{sec:dlrom}. There, we provided explicit error estimates that were later confirmed via empirical evidence (cf. Section \ref{sec:exp1})}.
The results obtained in our experiments are promising. The DL-ROM appears to be a captivating alternative to traditional ROMs, especially in challenging situations where linear models fail. \review{Our first test case, Section \ref{sec:exp1}, shows that the method is able to handle transport-dominated problems and that it behaves well in the presence of singularities. Good results are also obtained for high-dimensional parameter spaces, Section \ref{sec:exp2}, even though it becomes harder to handle the generalization error. The latter can be either improved by increasing the number of training samples or by including physical terms in the loss function. While we wish to investigate this further in future works, we acknowledge that multiple researchers are now working on this topic, e.g. \cite{mishra, shin}.
In principle, being completely nonintrusive and data-driven, the proposed approach can be readily applied to nonlinear PDEs and more complicated systems. Also, at the cost of treating time as an additional parameter, as in \cite{fresca}, one may extend the DL-ROM approach to time dependent problems. However, some changes have to be made in order to extrapolate over time, for instance by enforcing those properties that are typical of dynamical systems (e.g. the existence of underlying semi-groups). We leave all these considerations for future works.}
We conclude with a few comments on the computational cost. While the offline stage is clearly expensive, our design choices allow for a significant reduction in the model complexity, which results in architectures that are easier to train (cf. e.g. \cite{fresca, geist}).
Nevertheless, the DL-ROM is extremely fast when used online. This makes the method suited for demanding tasks with multiple queries, as the ones typical of sensitivity analysis, uncertainty quantification and multiscale methods.
\section{Learning the Solution Manifold by means of Neural Networks}
\label{sec:learning}
\review{We now present our Deep-Learning approach to Reduced Order Modelling (DL-ROM). After a brief recap on deep feedforward neural networks, Section \ref{sec:nn}, we move to the actual description of the DL-ROM, where we discuss both its theoretical and numerical properties (Section \ref{sec:dlrom}). Then, respectively in Sections \ref{sec:ae} and \ref{sec:cc}, we dive deeper into the design choices for the nonlinear dimensionality reduction and the approximation of the reduced map.}
\subsection{Neural Networks}
\label{sec:nn}
Neural networks are nonlinear universal approximators that have recently gained a lot of popularity in several fields such as Machine Learning, Statistics and Approximation Theory. The fundamental building block of a neural network is the \textit{layer}. Given two state spaces $V_{1}:=\mathbb{R}^{n_{1}}$, $V_{2}:=\mathbb{R}^{n_{2}}$ and a scalar-valued function $\rho:\mathbb{R}\to\mathbb{R}$, a layer $L$ with activation $\rho$ is a map $L:V_{1}\to V_{2}$ of the form $$L(\textbf{v}) = \rho\left(\mathbf{W} \textbf{v}+\mathbf{b}\right),$$ where $\mathbf{W}\in\mathbb{R}^{n_{2}\times n_{1}}$ and $\mathbf{b}\in\mathbb{R}^{n_{2}}$ are respectively the weights and biases of the layer. Notice that, as $\mathbf{W} \textbf{v}+\mathbf{b}$ is $n_{2}$-dimensional, the operation $\mathbf{W} \textbf{v}+\mathbf{b}\to\rho\left(\mathbf{W} \textbf{v}+\mathbf{b}\right)$ is intended componentwise.
Deep neural networks are defined through the composition of multiple layers. More precisely, a DNN with $l\ge0$ \textit{hidden layers} is a map of the form $$\Phi=L_{l+1}\circ L_{l}...\circ L_{1},$$ where each $L_{i}$ is a layer. The layers $L_{i}: \mathbb{R}^{n_{i}}\to\mathbb{R}^{n_{i+1}}$, for $i=1,..,l,$ are called hidden layers, while $L_{l+1}$ is the output layer. The latter is sometimes assumed to have no activation, as in \cite{kutyniok,schwab}. We refer to $l$ as to the depth of the network. When $l=1$, the adjective \textit{deep} is usually dropped and $\Phi$ is said to be \textit{shallow}. Note that we also allow for the degenerate case $l=0$, where the NN actually reduces to the output layer. This is somewhat unusual, but it will help us in making the notation lighter. Finally, we say that $\Phi$ has activation function $\rho$, or equivalently that $\Phi$ is a $\rho$-DNN, if all of its (hidden) layers share that same activation.
\newline
\newline
The practical implementation of a neural networks is usually done as follows. At first, one designs the NN architecture. This corresponds to choosing (i) the depth $l$, (ii) the number of neurons within each layer $L_{i}$, i.e. the output dimension $n_{i+1}$, and (iii) suitable constraints on the weights and biases. Among other things, the latter is what makes the difference between dense layers (no constraints on $\mathbf{W}$) and convolutional layers ($\mathbf{W}$ is sparse and multiple values are shared), which heavily impacts on the network \textit{complexity} \cite{gu}. The second step regards the network training. There, the weights and biases are tuned and optimized according to a suitable loss function. The optimization is typically performed using gradient descent algorithms \cite{schmidhuber}. To measure the network complexity, we count its degrees of freedom, that is the number of scalar parameters that are actually optimized during the training. Therefore, the contribution of each layer $L_{i}$ depends on the corresponding type. For dense layers it is $(n_{i}+1)n_{i+1}$, while it can be substantially lower in sparse and convolutional layers.
\subsection{Deep-Learning based Reduced Order Model}
\label{sec:dlrom}
\input{Tables and Figures/workflow}
We are given a parameter space $\Theta\subset\mathbb{R}^{p}$, a parameter dependent PDE and a high-fidelity FOM $\boldsymbol{\mu}\to \ufom_{\mup}\in\mathbb{R}^{N_{h}}$.
Our purpose is to approximate the solution map by means of a suitable neural network $\Phi:\mathbb{R}^{p}\to\mathbb{R}^{N_{h}}$.
\review{For the sake of simplicity, through the whole section, we make the following assumption.
\begin{assump}
\label{assumption:dl-rom}
All DNNs use the same activation function $\rho:\mathbb{R}\to\mathbb{R}$ for the hidden layers, where $\rho$ is Lipschitz continuous and not a polynomial. The parameter space $\Theta$ is compact and the parametric map $\boldsymbol{\mu}\to\textnormal{\textbf{u}}_{\boldsymbol{\mu}}^{h}$ is continuous.
\end{assump}
\noindent A typical activation function satisfying the above requirements is the so-called $\alpha$-leaky ReLU, i.e. $\rho(x) = x\boldsymbol{1}_{[0,+\infty)}(x) + \alpha x\boldsymbol{1}_{(-\infty, 0)}(x)$ where $\alpha>0$ is fixed. In order to build $\Phi$, we mimic the two steps paradigm of the Reduced Basis method, yielding the workflow depicted in Figure \ref{fig:workflow}. This corresponds to introducing the three networks below,
$$\Psi':\mathbb{R}^{N_{h}}\to\mathbb{R}^{n},\quad\quad\Psi:\mathbb{R}^{n}\to\mathbb{R}^{N_{h}}$$
$$\phi:\mathbb{R}^{p}\to\mathbb{R}^{n}.$$
The first two, respectively the encoder $\decoder'$ and the decoder $\Psi$, serve for the nonlinear dimensionality reduction of the solution manifold $\solmanifold^{h}:=\{\ufom_{\mup}\}_{\boldsymbol{\mu}\in\Theta}\subset\mathbb{R}^{N_{h}}$, which we map onto $\mathbb{R}^{n}$. According to our previous analysis, we set the latent dimension to be $n:=n_{\min}(\solmanifold^{h})$. As discussed in Theorem \ref{theorem:parametric-reduction}, this often translates to $n\le 2p+1$, resulting in a massive reduction whenever $p\ll N_{h}$. The purpose of the third network is to approximate the reduced parametric map $\mathbb{R}^{p}\ni\boldsymbol{\mu}\to\Psi'(\ufom_{\mup})\in\mathbb{R}^{n}$, so that the final ROM is obtained by composition of $\phi$ and $\Psi.$
At the very end, the role of the encoder $\Psi'$ is only auxiliary as the DL-ROM ultimately results in a single network $\Phi:=\Psi\circ\phi$. However, we believe that our construction significantly facilitates the practical problem of designing the architectures. This is because the three networks have very different purposes. $\Psi'$ and $\Psi$ are required to learn the intrinsic characteristics of the solutions, so their complexity is related to the richness of the solution manifold and the geometrical properties of the solutions. Conversely, $\phi$ needs to understand the interplay between solutions and parameters, which can result in a very complicated relation even if the solution manifold is fairly simple (e.g. linear). As the design of DNN architectures is still far from obvious, we believe that this perspective can be of help in practical implementations. Nonetheless, this splitting of the ROM also allows for a few considerations on the numerical errors, that we discuss below.\\\\\noindent We notice that, due to assumption \eqref{assumption:dl-rom}, all the networks in the DL-ROM pipeline are Lipschitz continuous. Also, without loss of generality, we can assume that $\Psi$ has a Lipschitz constant equal to 1. In fact, for any $C>0$, the maps $\tilde{\Psi}'(\mathbf{x}):=C\Psi'(\mathbf{x})$ and $\tilde{\Psi}(\mathbf{x}):=\Psi(\mathbf{x}/C)$ define the same autoencoder as $\Psi'$ and $\Psi$. As a consequence, the worst-case approximation error of the DL-ROM
$$\mathcal{E}_{A}:=\sup_{\mu\in\Theta}||\ufom_{\mup}-\Psi(\phi(\boldsymbol{\mu}))||,$$
can be bounded as $\mathcal{E}_{A}\le\mathcal{E}_{R}+\mathcal{E}_{P}$, the latter being respectively the reconstruction error and the parametric error,
$$\mathcal{E}_{R}:=\sup_{\textbf{u}^{h}\in\solmanifold^{h}}||\textbf{u}^{h}-\Psi(\Psi'(\textbf{u}^{h}))||,\quad\quad
\mathcal{E}_{P}:=\sup_{\mu\in\Theta}|\Psi'(\ufom_{\mup})-\phi(\boldsymbol{\mu})|.$$
where $|\cdot|$ is the Euclidean norm, while we recall that $||\cdot||$ comes from the metric originally chosen over the state space $V_{h}\subset V$. In fact,
\begin{multline*}
\sup_{\mu\in\Theta}||\ufom_{\mup}-\Psi(\phi(\boldsymbol{\mu}))||\le \sup_{\mu\in\Theta}||\ufom_{\mup}-\Psi(\Psi'(\ufom_{\mup}))||+\sup_{\mu\in\Theta}||\Psi(\Psi'(\ufom_{\mup}))-\Psi(\phi(\boldsymbol{\mu}))||
\le\\
\le \sup_{\textbf{u}^{h}\in\solmanifold^{h}}||\textbf{u}^{h}-\Psi(\Psi'(\textbf{u}^{h}))||+\sup_{\mu\in\Theta}|\Psi'(\ufom_{\mup})-\phi(\boldsymbol{\mu})|.
\end{multline*}
\final{We remark that both $\mathcal{E}_{R}$ and $\mathcal{E}_{P}$ can be made arbitrarily small. In fact, as proven by Pinkus back in 1999 \cite{pinkus}, DNNs are dense in the space of continuous functions defined over compact domains (note that here our assumption on $\rho$ is crucial). Therefore, since $\Theta$ is compact and $\boldsymbol{\mu}\to\Psi'(\ufom_{\mup})$ is continuous, the parametric error can become as small as possible. Similarly, the reconstruction error can get closer and closer to the limit value $\delta_{n}(\solmanifold^{h})=0$. In fact, we can approximate the reconstruction provided by any two continuous maps $\Psi_{*}':\solmanifold^{h}\to\mathbb{R}^{n}$ and $\Psi_{*}:\mathbb{R}^{n}\to\mathbb{R}^{N_{h}}$ using DNNs. To see this, fix any $\varepsilon>0$ and let $\mathcal{V}:=\Psi_{*}(\solmanifold^{h})$ be the embedded solution manifold. Since $\mathcal{V}$ is compact, the aforementioned density result ensures the existence of some DNN $\Psi$ that approximates $\Psi_{*}$ over $\mathcal{V}$ upto an error of $\varepsilon$. Similarly, there exists a DNN $\Psi'$ that approximates $\Psi'_{*}$ over $\solmanifold^{h}$ upto an error of $\varepsilon/C$, where $C>0$ is the Lipschitz constant of $\Psi$. Then, for any $\textbf{u}^{h}\in\solmanifold^{h}$ one has \begin{multline*}
||\textbf{u}^{h}-\Psi(\Psi'(\textbf{u}^{h}))||\le\\\le||\textbf{u}^{h}-\Psi_{*}(\Psi'_{*}(\textbf{u}^{h}))||+||\Psi_{*}(\Psi'_{*}(\textbf{u}^{h}))-\Psi(\Psi'_{*}(\textbf{u}^{h}))||+||\Psi(\Psi'_{*}(\textbf{u}^{h}))-\Psi(\Psi'(\textbf{u}^{h}))||\le\\
\le ||\textbf{u}^{h}-\Psi_{*}(\Psi'_{*}(\textbf{u}^{h}))|| + \varepsilon + C|\Psi'_{*}(\textbf{u}^{h}))-\Psi'(\textbf{u}^{h})|\le\\\le||\textbf{u}^{h}-\Psi_{*}(\Psi'_{*}(\textbf{u}^{h}))||+2\varepsilon.
\end{multline*}
This shows that $\mathcal{E}_{R}$ can reach the limit value $\delta_{n}(\solmanifold^{h})$. In particular, thanks to our design choice of letting $n=n_{\min}(\solmanifold^{h})$, the reconstruction error can get arbitrarily close to zero.
In general, all the above reasoning suggests a two step approach where we first train the autoencoder $\Psi\circ\Psi'$ and then the reduced map $\phi$.} Nevertheless, before studying the two steps of the DL-ROM separately, some analysis of the networks complexity is needed. In fact, while the DL-ROM can reach any level of accuracy, the size of the networks involved may grow quickly, making their optimization problematic. The result below provides a \final{first} answer to such question.
\begin{theorem} Under Assumption \ref{assumption:dl-rom}, let $\rho$ be the ReLU activation function. Assume that the map
$\boldsymbol{\mu}\to\textnormal{\textbf{u}}_{\boldsymbol{\mu}}^{h}$ is Lipschitz continuous for some constant $L>0$, and that the infimum in $\eqref{eq:nonlinear-kolmogorov}$ is attained, i.e.
there exists two continuous maps $\Psi_{*}':\mathbb{R}^{N_{h}}\to\mathbb{R}^{n}$ and $\Psi_{*}:\mathbb{R}^{n}\to\mathbb{R}^{N_{h}}$ such that
$$\Psi_{*}(\Psi'_{*}(\textnormal{\textbf{u}}))=\textnormal{\textbf{u}}\quad\quad\forall\textnormal{\textbf{u}}\in\solmanifold^{h}.$$
Additionally, assume that $\Psi_{*}'$ and $\Psi_{*}$ are $s$-times differentiable, $s\ge2$, and have bounded derivatives. Let
$$C_{1}=\sup_{|\boldsymbol{\alpha}|\le s}\sup_{\textnormal{\textbf{u}}\in\mathbb{R}^{N_{h}}}|D^{\boldsymbol{\alpha}}\Psi'_{*}(\textnormal{\textbf{u}})|,
\quad\quad C_{2}=\sup_{|\boldsymbol{\alpha}|\le s}\sup_{\boldsymbol{\nu}\in\mathbb{R}^{n}}||D^{\boldsymbol{\alpha}}\Psi_{*}(\boldsymbol{\nu})||.$$
For any $0<\varepsilon<1$, let $m\in\mathbb{N}$ be the first integer for which $d_{m}(\solmanifold^{h})<\varepsilon$. Then, for some constant $c=c(\Theta, L,C_{1},C_{2},p,n,s)$, there exists a DL-ROM with a decoder $\Psi$ having at most
\begin{itemize}
\item [i)] $cm^{1+n/(s-1)}\varepsilon^{-n/(s-1)}\log(m/\varepsilon)+mN_{h}$ active weights
\item [ii)] $c\log(m/\varepsilon)$ layers
\end{itemize}
and a reduced map $\phi$ having at most
\begin{itemize}
\item [iii)] $c\varepsilon^{-p}\log(1/\varepsilon)$ active weights
\item [iv)] $c\log(1/\varepsilon)$ layers
\end{itemize}
such that the approximation error satisfies $\mathcal{E}_{A}<2\varepsilon$.
\end{theorem}
\begin{proof}
\input{Proofs/theorem5-proof}
\end{proof}
\noindent Theorem 5 suggests that the DL-ROM approach can take advantage of intrinsic regularities in the solution manifold, even if the parameter-to-solution map is just Lipschitz continuous. This situation reflects the case in which although the solutions depend in a complicated way with respect to the parameters, the solution operator has good analytical properties. For instance, it is known that the solution operator of elliptic PDEs is analytic with respect to the coefficients \cite{babuska,hoffmann}. Thus, we can think of $\boldsymbol{\mu}\to\phi(\boldsymbol{\mu})$ as a change of coordinates that enables a smooth description of the solutions.
Secondly, we note that an important role is played by the parameter $m$. This is in agreement with other results in the literature, see e.g. Theorem 4.3 in \cite{kutyniok}, and it suggests a link between the DL-ROM complexity and the linear Kolmogorov $m$-width. We may interpret $m$ as an \textit{equivalent linear dimension}: in fact, the DL-ROM accuracy in Theorem 5 is roughly equivalent to the optimal one achievable via projections on $m$-dimensional subspaces. In this sense, we can think of $m$ as being the number of modes in a Reduced Basis approach or, analogously, the number of trunk nets in a DeepONet based ROM \cite{karniadakis,mishra2}. In the case of DL-ROMs, the value of $m$ does not affect the latent dimension but has an impact on the DNNs complexity: the slower $d_{m}(\solmanifold^{h})$ decays, the more degrees of freedom in the DNN architecture and, consequently, the higher the number of training snapshots required for the optimization. Conversely, if the linear width decays mildly, then a mix of linear and nonlinear reduction may be an interesting choice, as in the recently proposed POD-DL-ROM approach \cite{fresca}.
Nevertheless, we mention that the complexity bounds for the decoder are suboptimal in the way they include the FOM dimension $N_{h}$. In fact, the extra contribute $mN_{h}$ comes from the choice of considering the state space $V_{h}$ as consisting of vectors rather than functions. In particular, we expect that better estimates can be found if the solutions are smooth with respect to the space variable $\mathbf{x}\in\Omega$. This goes in favor of architectures that explicitly account for space dependency, such as convolutional layers, or even mesh-free approaches, such as DeepONets.}
\subsubsection{Dimensionality reduction}
\label{sec:ae}
\review{We propose two alternative ways for compressing the solution manifold. The first one is completely unsupervised, in the sense that it only operates on the solutions irrespectively of the parameter values, and it is based on the use of autoencoders. The second one is a variation of the previous where we explicitly include $\boldsymbol{\mu}$ in the encoding process. We detail them below.
\\
\paragraph{\textit{Autoencoder approach}} According to the reasoning in Section \ref{sec:dlrom}, we let $n:=n_{\min}(\solmanifold^{h})$ and we introduce two DNN architectures, an encoder $\Psi':\mathbb{R}^{N_{h}}\to\mathbb{R}^{n}$ and a decoder $\Psi:\mathbb{R}^{n}\to\mathbb{R}^{N_{h}}$, which we design as follows. In principle, the encoder can be very simple, as its only purpose is to provide a different representation for each solution. The hard job is left to the decoder that needs to perform the reconstruction. In this sense, a plain design choice can be $\Psi'(\textbf{u}):=\rho\left(\mathbf{W}\textbf{u}+\mathbf{b}\right)$, i.e. to use a degenerate architecture with no hidden layers. Conversely, designing the decoder requires a little extra caution. If $\Omega$ is an hypercube, a good choice is to employ dense layers at the beginning and conclude with a block of convolutional layers as done in \cite{fresca,lee}. This allows the decoder to account for spatial correlations and be sufficiently expressive without growing too much in complexity. Indeed, convolutional layers have been proven to be very effective in image reconstruction tasks, and we see a clear analogy with our setting when $\Omega$ is an hypercube. More complicated geometries may require different strategies, but the terminal part of the decoder should still consist of sparse layers of some sort (such as those in Graph Convolutional Networks \cite{scarselli}). The expressiveness of the decoder may be increased in several ways. Empirically, we see that interesting results can be obtained for fixed depths but varying number of \textit{channels} in the convolutional layers.
Once the architecture has been fixed, we optimize the autoencoder by minimizing the loss function below
$$\text{Loss}(\decoder',\Psi)=\frac{1}{N_{\text{train}}}\sum_{i=1}^{N_{\text{train}}}\mathcal{L}(\ufom_{\mui},\;\Psi(\decoder'(\ufom_{\mui}))),$$
where $\mathcal{L}$ is a suitable measure of discrepancy. A classical choice is to consider squared errors, $\mathcal{L}(\mathbf{y},\hat{\mathbf{y}})=||\mathbf{y}-\hat{\mathbf{y}}||^{2}$, in order to favor differentiability of the loss function. However, other metrics, such as relative errors $\mathcal{L}(\mathbf{y},\hat{\mathbf{y}})=||\mathbf{y}-\hat{\mathbf{y}}||/||\mathbf{y}||$, can be used as well. The minimization of the loss function is handled via stochastic gradient descent, mainly using batching strategies and first order optimizers.
\\
\paragraph{\textit{Transcoder-decoder approach}} As an alternative, we also propose a different architecture where the encoder is replaced with a \textit{transcoder} $\encoder_{\mu}:\mathbb{R}^{p}\times\mathbb{R}^{N_{h}}\to\mathbb{R}^{n}$. The idea is to facilitate the encoding by making explicitly use of the parameters, so that different solutions are more likely to have different latent representations. This is clearly linked with Theorem \ref{theorem:parametric-reduction}.b1, and has the advantage of always enabling a maximal reduction, as we can now set $n=p=n_{\min}(\{\boldsymbol{\mu},\ufom_{\mup}\}_{\boldsymbol{\mu}\in\Theta})$. We define the decoder exactly as before, so that $\ufom_{\mup}\approx\Psi(\encoder_{\mu}(\boldsymbol{\mu},\ufom_{\mup}))$. We refer to the combined architecture, $\Psi\circ\encoder_{\mu}$, as to a \textit{transcoder-decoder}. In practice, the transcoder-decoder is analogous to an autoencoder but has $p$ additional neurons in the input layer, which is where we pass the parameters. To design the architectures, we follow the same rule of thumb as before. In general, we give more weight to the decoder, where we employ deep convolutional networks, while we use lighter architectures for the transcoder. For instance, in the limit case of 0-depth, the latter becomes of the form $\encoder_{\mu}(\boldsymbol{\mu},\textbf{u}) = \rho\left(\mathbf{W}'\boldsymbol{\mu} + \mathbf{W}\textbf{u} + \mathbf{b}\right)$. During the offline stage, the transcoder-decoder is trained over the snapshots by minimizing the loss function below,
$$\text{Loss}(\encoder_{\mu},\Psi)=\frac{1}{N_{\text{train}}}\sum_{i=1}^{N_{\text{train}}}\mathcal{L}(\ufom_{\mui},\;\Psi(\encoder_{\mu}(\mup_{i},\ufom_{\mui}))),$$
where $\mathcal{L}$ is as before. The two approaches, autoencoder and transcoder-decoder, adopt different perspectives and provide different advantages. The first one is completely based on the solution manifold, so it is likely to reflect intrinsic properties of $\solmanifold^{h}$. On the other hand, the transcoder-decoder ensures a maximal compression, the latent dimension being always equal to $p$. In particular, the latent coordinates can be seen as an alternative parametrization of the solution manifold. In this sense, we say that $\encoder_{\mu}$ performs a transcoding.}
\subsubsection{Approximation of the reduced map}
\label{sec:cc}
The second step in the DL-ROM pipeline is to approximate the reduced map $\mathbb{R}^{p}\ni\boldsymbol{\mu}\to\ub^{\rdim}_{\mup}\in\mathbb{R}^{n}$, where either $\ub^{\rdim}_{\mup}:=\decoder'(\ufom_{\mup})$ or $\ub^{\rdim}_{\mup}:=\encoder_{\mu}(\boldsymbol{\mu}, \ufom_{\mup})$, depending on the adopted approach.
\review{As we noted in Section \ref{sec:dlrom}, the reduced map is continuous, as it is given by the composition of $\boldsymbol{\mu}\to\ufom_{\mup}$ and $\decoder'$ (resp. $\encoder_{\mu}$), hence it can be approximated uniformly by some $\rho$-DNN $\phi:\mathbb{R}^{p}\to\mathbb{R}^{n}$}. In general, we do not impose a particular structure on $\phi$, rather we use a generic fully connected network with dense layers.
To design the architecture in terms of number of layers and neurons, we rely on \review{Theorem 5 and on the underlying} theoretical results available in the literature, e.g. \cite{bolcskei,daubechies,guhring2,park,petersen,siegel}.
\input{Tables and Figures/algorithm}
\review{In order to train $\phi$ we minimize the objective function below
$$\text{Loss}(\phi)=\frac{1}{N_{\text{train}}}\sum_{i=1}^{N_{\text{train}}}\mathcal{L}(\urom_{\mui},\;\phi(\mup_{i}))$$
where, once again, $\mathcal{L}$ is some discrepancy measure (this time having inputs in $\mathbb{R}^{n}\times\mathbb{R}^{n})$. Notice that the optimization of the above only involves $\phi$, as the weights and biases of $\decoder'$ (resp. $\encoder_{\mu})$ are frozen.}
At the end of the whole process, which we summarized in Algorithm 1, we let $\Phi:=\Psi\circ\phi$. Now the DL-ROM is fully operational, and for each new $\boldsymbol{\mu}\in\Theta$ we can approximate online the corresponding solution $\Phi(\boldsymbol{\mu})\approx\ufom_{\mup}$ almost effortlessly, with very little computational cost. \review{Also, the model can be efficiently evaluated on multiple parameter values simultaneously. In fact, as DNNs are ultimately based on elementary linear algebra, it possible to stack together multiple parameter vectors $\mathbf{M}=[\boldsymbol{\mu}_{1},\dots,\boldsymbol{\mu}_{l}]$ in a single matrix and directly return the corresponding list of ROM approximations $\Phi(\mathbf{M})\approx[\textbf{u}_{1}^{h},\dots,\textbf{u}_{l}^{h}]$.}
\noindent\newline\textit{Remark.\;} We mention that, in the case $n=p$, an interesting alternative for $\phi$ could be provided by the so-called ODE-nets \cite{chen}. In fact, if the reduced map happens to be injective, then $\Theta$ and $\{\ub^{\rdim}_{\mup}\}_{\mu\in\Theta}$ define two homeomorphic sets of coordinates. Even though homeomorphisms can be approximated by classical DNNs, we note that fully connected unconstrained networks can easily result in noninvertible models. In this sense, an alternative architecture which ensures the existence and continuity of $\phi^{-1}$ would be appealing. ODE-nets enjoys such property and have been proven to be universal approximators for homeomorphisms \cite{zhang}. However, the development and implementation of ODE-nets is still in its infancy so we did not investigate this further.
\section{Numerical experiments}
\label{sec:experiments}
We now present some numerical results obtained with our DL-ROM approach. So far, neural networks have shown remarkable performances in the approximation of the parametric map at least in those contexts where classical POD-based methods succeed, e.g. \cite{bhattacharya,geist}. There is now an increasing interest in understanding how and if NNs can be of help in more challenging situations. In the case of transport problems, some theoretical and numerical results are now appearing in the literature, see respectively \cite{laakman} and \cite{fresca}.
Here, we focus on parameter dependent second order elliptic PDEs. The first test case concerns an advection-diffusion problem with a singular source term. The PDE depends on 7 scalar parameters which affect the equation both in a linear and nonlinear fashion. We consider two variants of the same problem, one of which is transport-dominated. As second test case, we consider a stochastic Poisson equation. The main difference with respect to the previous case is that the equation is parametrized by a stochastic process, and the PDE formally depends on an infinite-dimensional parameter. In order to apply the DL-ROM approach, we consider a suitable truncation of the Karhunen–Loève expansion of the stochastic process.
\review{In all our experiments we consider $V=L^{2}(\Omega)$ as state space, and we quantify the ROM performance via the Mean Relative Error (MRE)
\begin{equation}
\label{eq:mre}
\mathbb{E}_{\boldsymbol{\mu}\sim\mathcal{P}}\left[\frac{||\ufom_{\mup}-\Phi(\boldsymbol{\mu})||_{L^{2}(\Omega)}}{||\ufom_{\mup}||_{L^{2}(\Omega)}}\right],
\end{equation}
where $\Phi=\Psi\circ\phi$ is the DL-ROM network, and $\mathcal{P}$ is some probability measure defined over the parameter space $\Theta$. We estimate \eqref{eq:mre} with a Monte Carlo average computed over 1000 unseen snapshots (test set). \final{To evaluate whether there is a gap in performance between training and testing, we also compute the MREs over the training set. For an easier comparison, in all our experiments, we fix the latter to have size $N_{\text{train}}=9000$.}}
\newline\newline
All our experiments were implemented in Python 3 and ran over GPUs. Specifically, we used the FEniCS library\footnote{https://fenicsproject.org/} to run the FOM and obtain the high-fidelity snapshots, while the construction and the training of the DL-ROM was handled in Pytorch\footnote{https://pytorch.org/}.
\subsection{Stationary advection-diffusion with singular source}
\label{sec:exp1}
\subsubsection{Problem definition}
On the spatial domain $\Omega = (0,1)^{2}$, we define the subdomains $\{\Omega_{i}\}_{i=0}^{4}$ as in Figure \ref{fig:domain-decomp}. We consider the following parameter dependent PDE in weak form
\[
\begin{multlined}
\frac{1}{10}\int_{\Omega_{0}}\nabla u\cdot\nabla w
+\sum_{i=1}^{4}\int_{\Omega_{i}}\mu_{i}\nabla u\cdot\nabla w
+ C\int_{\Omega}\left(\cos{\mu_{5}}\frac{\partial u}{\partial x_{1}}w
+ \sin{\mu_{5}}\frac{\partial u}{\partial x_{2}}w\right) = \\\\ = w(\mu_{6},\mu_{7})\quad\forall w\in \mathcal{C}^{\infty}_{0}(\Omega)\quad\quad
\end{multlined}\]
\review{with Dirichlet boundary condition $u_{|\Omega}=1$.} The above corresponds to a stationary advection-diffusion equation where: the conductivity field $\sigma_{\boldsymbol{\mu}}:=0.1 + \sum_{i=1}^{4}\mu_{i}\textbf{1}_{\Omega_{i}}$ is piecewise constant with values that change parametrically within the circular subdomains; the transport field $\adve_{\mup}:=(C\cos\mu_{5},C\sin\mu_{5})$ has a parametrized direction while it is uniform in space and has a fixed intensity $C>0$; finally, the source term $f_{\mup}$ is a Dirac delta located at the parameter dependent coordinates $(\mu_{6}, \mu_{7})$. \review{Globally, the PDE depends on 7 parameters that we consider to be varying in the parameter space $\Theta = [0,1]^{4}\times[0, 2\pi]\times[0.1, 0.9]^{2}$, which we endow with a uniform probability distribution $\mathcal{P}$}. We note that the PDE does not admit solutions in $H^{1}(\Omega)$ because of the singularity introduced by the Dirac delta. Nevertheless, the variational problem is well-posed in the Banach space $W^{1,4/3}(\Omega)\hookrightarrow L^{2}(\Omega)$, see e.g. \cite{casas}. We are hence allowed to consider the solution manifold $\mathcal{S}:=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$ as a subset of the Hilbert space $L^{2}(\Omega)$.
We analyze two different settings. In the first case we fix the transport field intensity to be $C=0.5$, so that the diffusion and the advection act over the same scale. Then, we consider a transport-dominated case where $C=40$.
\input{Tables and Figures/domain}
\subsubsection{Discretization and Full Order Model}
As FOM, we employ Lagrange piecewise linear finite elements over a triangular mesh. Prior to the discretization, we provide a Gaussian approximation of the Dirac delta as
$$f_{\mup}^{\epsilon}(x_{1},x_{2}):=\frac{1}{2\pi\epsilon^{2}}\exp\left({\frac{-(x_{1}-\mu_{6})^{2}-(x_{2}-\mu_{7})^{2}}{2\epsilon^{2}}}\right).$$
We shall write $u_{\mup}^{\epsilon}$ for the solutions of this smoothed problem and $\mathcal{S}^{\epsilon}$ for the corresponding solution manifold. We see that the following claim holds (for the details see the Appendix, Section \ref{appendix:exp})
\\\\\noindent\textbf{Claim 1. }$\sup_{\boldsymbol{\mu}\in\Theta}||u_{\mup}-u_{\mup}^{\epsilon}||_{L^{2}(\Omega)}\to0$ as $\epsilon\to0$.\\\\
\noindent In particular, $\mathcal{S}^{\epsilon}$ approximates $\mathcal{S}$ uniformly.
From here on, we shall fix $\epsilon = 1/420$ and formally replace $\mathcal{S}$ with $\mathcal{S}^{\epsilon}$. Next, we discretize the variational problem through P1-Finite Elements over a triangular mesh. Using the classical estimates from the FEM theory, e.g. \cite{quarteroni-fem}, it is not hard to see that Assumption \ref{assump:high-fidelity} is satisfied within the state space $L^{2}(\Omega)$. Here, we fix the mesh size to be $h = 1/210$, which results in a high-fidelity space $V_{h}\cong\mathbb{R}^{N_{h}}$ of dimension $N_{h}=44521$. We exploit the FOM to generate respectively $N_{train}=9000$ and $N_{test}=1000$ random snapshots.
\subsubsection{DL-ROM design and training}
In the construction of the DL-ROM, we do not make a distinction between the case of mild and strong advection, respectively $C = 0.5$ and $C=40$. In this way, we can see more clearly whether the intensity of the transport field affects the ROM performance. For the dimensionality reduction, we explore both the two alternatives presented in Section \ref{sec:ae}. For the autoencoder, we choose to consider the original solution manifold as a reference for the latent dimension, thus we let $n:=n_{\min}(\mathcal{S})$. Thanks to Theorem \ref{theorem:parametric-reduction}, the claim below holds true.
\\\\\noindent\textbf{Claim 2. } $n_{\min}(\mathcal{S}) = p = 7$.\\\\
\noindent The proof is straightforward and we leave the details to the Appendix, Section \ref{appendix:exp}. Note that in this way, regardless of the encoding strategy, we are fixing the reduced dimension to be $n=7$. Since $N_{h}=44521$, this corresponds to a compression of almost 99.98\%.
\input{Tables and Figures/architectures1}
The networks architectures are detailed in Tables \ref{tab:architectures1}.a, \ref{tab:architectures1}.b (encoding step) and Table \ref{tab:architectures1}.c (decoding step). The encoder and the transcoder are particularly light, as they actually consist of a single dense layer. In contrast, $\Psi$ is far more complex, with a depth of $l=4$. \review{The proposed architecture is closely related to the ones adopted in \cite{fresca,lee}, upto to some specifics dictated by the problem itself (namely the fact the high-fidelity mesh consists of a $211\times211$ square)}. The decoder makes use of transposed convolutional layers, choice that is mainly motivated by two reasons: (i) convolutional layers correspond to sparse operators, and are more easy to deal with in the case of high-dimensional data, (ii) 2D convolutions best describe spatially localized behaviors so they are a natural choice when the data itself is defined on a spatial domain. We shall also remark that the decoder architecture is given in terms of a hyperparameter $m\in\mathbb{N}$, $m>0$, which controls the number of channels in the convolutional layers. This was done in order to investigate how the network complexity impacts the reconstruction error, and allows for a direct comparison with linear methods such as the POD. We analyze the performance of the networks for different values of $m$ separately, namely $m=4,8,16,32$.
\newline\indent
Prior to training, the networks are initialized differently depending on the encoding type. In the autoencoder case, we initialize both $\decoder'$ and $\Psi$ accordingly to the (Gaussian) He initialization \cite{he}. Conversely, we initialize the transcoder in such a way that $\encoder_{\mu}(\boldsymbol{\mu},u_{\mup})=\boldsymbol{\mu}.$ This is equivalent to using the parameters as first guess for the intrinsic coordinates: then, during the training, and depending on the decoder needs, $\encoder_{\mu}$ will have the possibility of finding other representations. \review{As discrepancy measure for the loss function, we use squared errors, $\mathcal{L}(\mathbf{y},\hat{\mathbf{y}})=||\mathbf{y}-\hat{\mathbf{y}}||^{2}$}. We train the autoencoder (resp. transcoder-decoder) using the AdamW optimizer \cite{loshchilov}, with learning-rate $10^{-4}$, weight-decay $10^{-2}$, moments coefficients $\beta_{1}=0.99$, $\beta_{2}=0.999$ and adjustment $\varepsilon=10^{-8}$. We perform the gradient descent using batches of 50 and for a total of 1000 epochs. At the end of this first training session, we pick the best performing architecture and continue the construction of the DL-ROM from there.
Table \ref{tab:architectures1}.d reports the architecture for our third network, $\phi$. We initialize $\phi$ using the He initialization and proceed with its training accordingly to Section \ref{sec:cc}. \review{We consider again a loss function based on square errors}, and we perform the gradient descent using the same optimizer as before, only changing the learning rate to $10^{-3}$.
\subsubsection{Numerical results}
\input{Tables and Figures/mre_decay}
\review{Figure \ref{fig:dimreduction} reports the results limited to the dimensionality reduction, that is the first step in the DL-ROM pipeline. There, we compare the performance of autoencoders, transcoder-decoders and POD in terms of model complexity. In general, regardless of whether $C=0.5$ or $C=40$, both nonlinear methods show interesting results, with training errors close or below 1\%. Unsurprisingly, as the networks grow in complexity, the gap between training and test errors becomes larger, highlighting the need for more samples and a tendency towards overfitting (see the autoencoder in case $C=40$). Still, transcoders seem to mitigate this phenomenon, possibly because they provide more information in the latent space.
For POD, the degrees of freedom are defined as the number of entries in the projection matrix $\mathbf{V}$, while the errors are computed as $||\textbf{u}-\mathbf{V}\mathbf{V}^{T}\textbf{u}||/||\textbf{u}||$ (relative projection error). In particular, the MREs reported in Figure \ref{fig:dimreduction} provide a lower-bound for all POD-based ROMs. Interestingly, all the curves show a similar trend. This goes to support our conjecture that the decoder complexity may be linked with the Kolmogorov $n$-width (Section \ref{sec:dlrom}). More precisely, linear methods can improve the accuracy by adding $\Delta n$ modes, i.e. $\Delta n N_{h}$ degrees of freedom, but they also have to increase the ROM dimension. Conversely, in the DL-ROM approach, we can obtain a similar boost by investing the same degrees of freedom in the decoder, without having to modify the latent dimension. This is in agreement with Theorem 5, where we proved that $\mathcal{O}(m^{1+n/(s-1)}\log(m))$ active weights are sufficient for the decoder to match the accuracy of any projection method with $m$ modes. Of note, if we assume the solution manifold to be infinitely smooth and we let $s\to+\infty$, then we may conjecture the decoder complexity to behave as $\mathcal{O}(m\log(m))$. As matter of fact, this is what we observe in the picture, at least for the training errors. In fact, if the red lines were to be perfectly parallel to the blue ones, that would reflect a scenario in which the decoder complexity grows as $\mathcal{O}(m)$.
On the same time, Figure \ref{fig:dimreduction} goes to show that the upper bounds in Theorem 5 are suboptimal. In fact, both in the case of mild and strong advection, the nonlinear reduction is able to outperform POD with fewer degrees of freedom, i.e. without the extra contribute $mN_{h}$ in the decoder. We believe that this achievement is made possible by the use of convolutional layers, but this is yet to be made formal.
\input{Tables and Figures/errors1}
\input{Tables and Figures/dlrom1}
Let us now move to the actual approximation of the parametric map. To this end, we trained our third network $\phi$ on the basis of the best performing transcoder-decoder ($m=32$). Numerical results for the complete DL-ROM $\Phi:=\Psi\circ\phi$ are in Table \ref{tab:errors1} and Figure \ref{fig:examples1}. In general, the results are satisfactory, with test errors near 2\%. Both in the case of mild and strong advection, we note that POD-based ROMs require more than 300 modes to achieve the same accuracy. This makes intrusive ROMs, such as POD-Galerkin, too expensive to be used online. Conversely, the DL-ROM approach provides an appealing alternative. Indeed, while the whole offline stage took around 4 hours, the model is extremely fast when used online: solving the PDE for 1000 different values of the parameters (simultaneously) requires less than 2 milliseconds on GPU.}
\subsection{Stochastic Poisson equation}
\label{sec:exp2}
\subsubsection{Problem definition} On the spatial domain $\Omega = (0,1)^{2}$, we consider a Gaussian process $W$ with constant mean $w = -\log(10)$ and covariance kernel $\text{Cov}(\mathbf{x},\mathbf{y})=10\text{exp}(-4|\mathbf{x}-\mathbf{y}|^{2})$.
The latter is used to model the stochastic Poisson equation below,
$$
\begin{cases}
-\text{div}\left(\text{e}^{W(\omega)}\nabla u\right) = |\mathbf{x}|^{2} & \text{in }\Omega,
\\
u = 0 & \text{on }\partial\Omega.
\end{cases}
$$
\newline
Here, for each event $\omega$, the map $W(\omega):\Omega\to\mathbb{R}$ denotes the corresponding path of the stochastic process $W$. The above problem can be seen as a parameter dependent PDE that depends on (countably) infinite many parameters. To see this, we recall that there exist positive real numbers $\left\{\sqrt{\lambda_{i}}\right\}_{i=1}^{+\infty}$, orthonormal functions $\{\zeta_{i}\}_{i=1}^{+\infty}\subset L^{2}(\Omega)$ and independent standard gaussians $\{X_{i}\}_{i=0}^{+\infty}$ such that $$W = w+\sum_{i=1}^{+\infty}\sqrt{\lambda_{i}}X_{i}\zeta_{i}$$ almost surely. The latter is the so-called Karhunen-Loève expansion of $W$. We assume the $\lambda_{i}$ coefficients to be nonincreasing in $i$. In order to cast the problem into our framework, we approximate $W$ by truncating the aforementioned expansion at some index $k$. More precisely, we define $\Theta:=\mathbb{R}^{k}$ and $W_{\boldsymbol{\mu}}^{k}$ as
$$W_{\boldsymbol{\mu}}^{k}(x):= w+\sum_{i=1}^{k}\sqrt{\lambda_{i}}\mu_{i}\zeta_{i}(x).$$
\newline
Thanks to the usual continuity results and the convergence ensured by the Karhunen-Loève expansion, the impact of this substitution on the PDE can be made arbitrarily small with $k$. \review{We note that, by construction, the probability distribution to be considered over the parameter space is the Gaussian distribution $\mathcal{P}$ of density
$$G(\boldsymbol{\mu}):=\left(2\pi\right)^{-k/2}\text{e}^{-\frac{1}{2}|\boldsymbol{\mu}|^{2}}.$$}
\subsubsection{Discretization and Full Order Model}
On $\Omega$ we define a triangular mesh of size $h=10^{-2}$, over which we construct the high-fidelity space of piecewise linear Finite Elements $V_{h}$. The corresponding FOM dimension is $N_{h}=10121$. To approximate the Karhunen-Loève expansion of $W$, we project and solve over $V_{h}$ the following eigenvalue problem.
$$\int_{\Omega}\text{Cov}(\mathbf{x},\mathbf{y})\zeta_{i}(\mathbf{y})d\mathbf{y} = \lambda_{i}\zeta_{i}(\mathbf{x}).$$
\newline
In particular, we compute the first $k$ eigenvalues $\lambda_{i}$ and corresponding eigenfunctions $\zeta_{i}\in V_{h}$ for which
$$0.9\;\le\;\frac{\sum_{i=1}^{k}\lambda_{i}}{\sum_{i=1}^{+\infty}\lambda_{i}} = \frac{1}{10}\sum_{i=1}^{k}\lambda_{i},$$
\newline
where the last equality is easily deduced by the covariance kernel, as $\sum_{i=1}^{+\infty}\lambda_{i} = \int_{\Omega}\text{Cov}(\mathbf{x},\mathbf{x})d\mathbf{x}=\int_{[0,1]^{2}}10d\mathbf{x} = 10$. \input{Tables and Figures/eigdecay} \review{Figure \ref{fig:eigdecay} shows how the normalized eigenvalues $\lambda_{k}/10$ decay with $k$.} This procedure results in the choice of the truncation index $k=38$.
From a statistical point of view, we say that $W_{\boldsymbol{\mu}}^{k}$ explains at least 90\% of the variability in $W$. We run the FOM to generate respectively $N_{\text{train}}=9000$ and $N_{\text{test}}=1000$ snapshots, where the parameter values are sampled from $\Theta$ independently and accordingly to a $k$-variate standard Gaussian distribution.
\subsubsection{DL-ROM design}
We note that, in this case, the parameter space $\Theta$ is not compact, as it is unbounded. Nevertheless, since $\Theta$ has finite measure with respect to $\mathcal{P}$, it is straightforward to adapt the reasoning in Section \ref{sec:dlrom} to this context. For instance, the error defined in \eqref{eq:mre} can be made arbitrarily small provided that $\Phi$ is sufficiently accurate within some compact subdomain $\Theta_{M}:=\{\boldsymbol{\mu}\in\mathbb{R}^{p}\text{ s.t. }|\boldsymbol{\mu}|<M\}$. A more in depth discussion on the regularity of the parametric map in the case of stochastic coefficients can be found in \cite{babuska}.
\review{For the dimensionality reduction, we employ a transcoder-decoder. This is to ensure a maximal compression, as the number of parameters is already mildly large. The network topology is reported in Tables \ref{tab:architectures2}.a, \ref{tab:architectures2}.b. Coherently with the chosen approach, we fix the reduced dimension to be $n:=k=p=38$. In general, the architecture is very similar to those considered in Section \ref{sec:exp1}, the only difference being in the specifics of the convolutional layers.
\newline\indent
As before, we adopt the He initialization for the decoder while we force the initial state of the transcoder to behave as $\encoder_{\mu}(\boldsymbol{\mu},u_{\mup})=\boldsymbol{\mu}$. We train $\Psi\circ\encoder_{\mu}$ using stochastic gradient descent with minibatches of size 10 and for a total of 1200 epochs. In this case, we observe that snapshots come in rather different scales when compared one another. For this reason, we choose to define the loss function in terms of relative errors, $\mathcal{L}(\mathbf{y},\hat{\mathbf{y}}):=||\mathbf{y}-\hat{\mathbf{y}}||/||\mathbf{y}||.$ To optimize the latter we employ the Adamax optimizer \cite{kingma}, with default parameters and learning rate of $10^{-3}$. Here, the choice of Adamax over AdamW is motivated by the fact that the former is known to be more stable.
\newline\indent
Table \ref{tab:architectures2}.c reports the architecture for reduced map network, $\phi$. We train $\phi$ using the Adamax optimizer with batch size 50 and learning rate 5e-3, for a total of 5000 epochs. Here also we use relative errors as discrepancy measures. The whole offline stage of the DL-ROM took around 4 hours.}
\input{Tables and Figures/architectures2}
\subsubsection{Numerical results}
The dimensionality reduction is satisfactory, with mean relative errors of 1.10\% and 2.57\% respectively on the training and test sets. \review{Conversely, the approximation of the reduced map was more challenging, see Table \ref{tab:errors2} and Figure \ref{fig:examples2}. While the final model is able to approximate the parameter-to-state map with an error of 4.69\% over the training set, the inaccuracy increases to 12.50\% on the test set. This is a situation in which the solution manifold is relatively simple (even linear subspaces provide good approximations, cf. Figure \ref{fig:eigdecay}), but the parameter dependency is complicated. Therefore, while 9000 snapshots are sufficient for the training the transcoder-decoder, they are not enough for $\phi$ to generalize well. Another reason is that the parameter space is very large, and $\phi$ has to face the curse of dimensionality. Possible ways to overcome this drawback without having to generate more samples would be to exploit low-discrepancy sequences, as in \cite{mishra2}, or use physics-informed approaches at the reduced level, as in \cite{hesthaven3}.}
\input{Tables and Figures/errors2}
\input{Tables and Figures/dlrom2}
\newpage
\subsection{Some final remarks}
\subsubsection{On the choice of the latent dimension}
\label{sec:remark}
In all our experiments, the reduced dimension was equal to the number of parameters, that is $n=p$. For the Advection-Diffusion problem, this was motivated by the fact that $n_{\min}(\mathcal{S})=p$. Conversely, for the stochastic Poisson equation, we fixed $n=p$ due to our design choice of using a transcoder-decoder. However, this is not always the case. In fact, as we argued in Section \ref{sec:nonlinear}, it is possible that $n_{\min}(\mathcal{S})>p$, in which case the autoencoder latent dimension should exceed the number of parameters. As an example, consider the following boundary value problem,
\begin{equation}
\label{eq:remark}
\begin{cases}
-\Delta u
+ 10\left(\cos\mu, \sin\mu\right)\cdot\nabla u
=
10\text{e}^{-100|\mathbf{x}-\mathbf{x}_{0}|}
& \text{in }\Omega
\\
u = 0 & \text{on }\partial\Omega,
\end{cases}
\end{equation}
where $\Omega:=(0,1)^{2}$, $\mathbf{x}_{0}:=(0.5, 0.5)$ and $\mu\in\Theta:=[0,2\pi]$. In this case, $p=1$ but $n_{\min}(\mathcal{S})=2$. In fact, it is not hard to see that the solution manifold $\mathcal{S}$ is homeomorphic to the unit circle. Therefore, the DL-ROM approach requires an autoencoder with latent dimension $n=2$. In Figure \ref{fig:remark} we have summarized the results obtained with this design choice for this particular problem. We do not report the network architectures, as that is not the focus of our discussion here.
We note that the low-dimensional representation of $\mathcal{S}$ is given by a curve in $\mathbb{R}^{2}$, coherently with the fact that $\phi:\mathbb{R}\to\mathbb{R}^{2}$. It is interesting to see that the DL-ROM representation of $\mathcal{S}$ actually resembles a circle. We also note that the curve $\phi(\Theta)\subset\mathbb{R}^{2}$ is not smooth. This is not caused by the PDE itself, which is very regular, by rather by the use of the ReLU activation for $\phi$.
For the sake of completeness, we mention that: for this example, we considered the same FOM as in Section \ref{sec:exp2}; we trained and tested the DL-ROM respectively over 900 and 100 snapshots; the model reported average relative errors below 2\% both on the training and test set; the offline stage took around 10 minutes on GPU.
\input{Tables and Figures/remark}
\label{sec:directapproximation}
\subsubsection{On alternative Deep Learning approaches}
\review{The Reduced Order Modelling literature is becoming more and more flourishing, with a large variety of techniques being developed. It is thus important to understand how the DL-ROM approach relates to other Deep Learning based ROMs. In particular, we would like to comment on those alternative strategies that are significantly different in spirit.
One approach, is to directly approximate the correspondence $(\boldsymbol{\mu},\mathbf{x})\to u_{\boldsymbol{\mu}}(\mathbf{x})$ using a single DNN, namely $\Phi:\mathbb{R}^{p+d}\to\mathbb{R}$. This has the advantage of yielding a mesh-free ROM that can be trained on pointwise observations. Also, since $\Phi$ is scalar-valued, light architectures are expected to be sufficiently expressive. However, this approach has a few drawbacks. In fact, if $u_{\boldsymbol{\mu}}$ is not highly regular with respect to $\mathbf{x}$, e.g. not Lipschitz, then one may require a very deep (or large) architecture to obtain reliable approximations, and thus many samples too. For example, we have tested this approach on the Advection-Diffusion problem using a scalar-valued architecture with 7 hidden layers of constant width (50 neurons). We have used the same snapshots available for the DL-ROM, where each high-fidelity solution now contributed with a total of $N_{h}$ observations. Despite all our efforts, we were unable to obtain a sufficiently accurate network, as we always obtained relative errors above 20\% (both for the training and test sets). We believe that the main drawback is given by the singular source, which generates high gradients in the PDE solution. We also mention that, despite the light architecture, training $\Phi$ was quite expensive. In fact, each computation of the squared error $||u_{\boldsymbol{\mu}}^{h}-\Phi(\boldsymbol{\mu},\cdot)||_{L^{2}(\Omega)}^{2}$ required $N_{h}$ evaluations of the DNN. Even though these can be computed in parallel by stacking all quadrature nodes in a single matrix, the cost of the backpropagation step increases substantially, as keeping track of all the gradients becomes challenging.
An alternative strategy is given by DeepONets \cite{karniadakis}, which are now becoming very popular. DeepONets are primarily employed for learning operators in infinite dimensions, but they have a natural adaptation to the case of finite-dimensional parameters. In fact, the first step in the DeepONet pipeline is to encode the input through $p$ sensors, which allows us to formally recast the problem into one with $p$ scalar parameters. With this set up, DeepONets are still a mesh-free approach, but they consider an approximation of the form $u_{\boldsymbol{\mu}}(\mathbf{x})=\Psi(\mathbf{x})\cdot\phi(\boldsymbol{\mu})$, where $\cdot$ is the dot product, while $\Psi:\mathbb{R}^{d}\to\mathbb{R}^{n}$ and $\phi:\mathbb{R}^{p}\to\mathbb{R}^{n}$ are two neural networks, respectively called the \textit{trunk net} and the \textit{branch net}. The main advantages of DeepONets are the following. First of all, as they are intrinsically mesh-free, it is possible to train them on sparse pointwise data. Secondly, as they decouple the dependency between $\boldsymbol{\mu}$ and $\mathbf{x}$, it is possible to bound their complexity and to estimate their generalization capabilities in ways that are specific to this approach, see e.g. \cite{mishra3}. Finally, due to their original construction, they can be a natural choice when the input parameters are actually sensor observations of some functional input. However, DeepONets have their limitations as well. In fact, despite sharing some terminology with the DL-ROM approach, such as \textit{encoder} and \textit{decoder}, they ultimately rely on a linear strategy for representing solutions. To this end, let $\{\mathbf{x}_{i}\}_{i=1}^{N_{h}}$ be the nodes in the high-fidelity mesh. Then, the DeepONet approximation over these vertices is $\mathbf{V}\phi(\boldsymbol{\mu})$, where $\mathbf{V}:=[\Psi(\mathbf{x}_{1}),\dots,\Psi(\mathbf{x}_{N_{h}})]^{T}\in\mathbb{R}^{N_{h}\times n}$. As a consequence, the choice of $n$ is subject to the behavior of the linear Kolmogorov $n$-width. For instance, to match the DL-ROM accuracy in the Advection-Diffusion problem with $C=40$, a DeepONet architecture would require $n\ge300$, which may hinder its actual implementation. Also, due to the poor regularity with respect to the $\mathbf{x}$ variable, training $\Psi$ may be a challenging task.
Conversely, the DL-ROM approach treats solutions as single objects, $\ufom_{\mup}\in V_{h}$. While this clearly results in a loss of information, the space dependency of solutions can be partially recovered by interchanging nonlocal and local operators (respectively, dense and convolutional layers) in the ROM pipeline. Finally, thanks to the use of nonlinear reduction techniques, the DL-ROM can overcome some of the difficulties implied by the Kolmogorov $n$-width. Of course, though, our approach has some limitations too. First of all, it is mesh-constrained, as it is bounded to the existence of a high-fidelity model. Secondly, it mostly relies on convolutional layers, which makes it less obvious to adapt the current implementation to non-cubic domains. Finally, the approach was originally designed for the case $p\llN_{h}$. Even though infinite-dimensional parameters spaces can be handled as in Section \ref{sec:exp2}, better strategies may be available.}
\section*{Introduction}
\label{sec:intro}
In many areas of science, such as physics, biology and engineering, phenomena are modeled in terms of
Partial Differential Equations (PDEs) that exhibit dependence on one or multiple parameters. As an example, consider the stationary advection-diffusion equation below,
\begin{equation*}
\label{advection:diffusion}
\begin{cases}
-\textnormal{div}(\cond_{\mup} \nabla u) + \adve_{\mup}\cdot\nabla u = f_{\mup} & \textnormal{in }\Omega,\\
u=g_{\mup} & \textnormal{on }\partial\Omega,
\end{cases}
\end{equation*}
where $\Omega\subset\mathbb{R}^{d}$ is a bounded domain and $\boldsymbol{\mu}$ a vector parameter taking values in a suitable parameter space $\Theta\subset\mathbb{R}^{p}$. For each $\boldsymbol{\mu}\in\Theta$, we assume the above to admit a unique solution $u_{\boldsymbol{\mu}}$, to be sought within a given Hilbert space $(V, ||\cdot||)$.
\newline\indent
In some cases, one is not interested in computing the PDE solution for a single fixed $\boldsymbol{\mu}\in\Theta$, but rather for an ensemble of parameter values. In general, this corresponds to exploring the so-called \textit{solution manifold} $\mathcal{S}:=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$ \cite{fink,lassila}. The map $\boldsymbol{\mu}\tou_{\mup}$ is known under many equivalent names such as the \textit{parametric map} \cite{schwab}, the parameter-to-state map \cite{hoffmann} or the solution map \cite{ohlberger}.
Approximating the parametric map in a highly-efficient way is a challenging task that can be encountered in several contexts, from optimal control problems with parametric PDEs constraints \cite{binev} to multiscale fluid mechanics \cite{knezevic}, or Bayesian inversion and uncertainty quantification \cite{ghattas}. In all these cases, the main drawback is represented by the computational cost entailed by traditional PDE solvers. In fact, despite their accuracy, each query of a numerical scheme such as the Finite Element Method (FEM) implies a computational cost that easily becomes unsustainable in many query applications, where computations are supposed to be carried out within a very short amount of time.
\newline\indent
One possibility is then to replace Full Order Models (FOMs) with cheaper surrogate models, namely Reduced Order Models (ROMs). ROMs originate from the need of alleviating the computational burden of FOMs at the price of a negligible compromise in terms of accuracy. During the last decades, several successful model reduction techniques have been developed, such as the Reduced Basis method \cite{quarteroni} and others. However, the majority of these ROMs heavily relies on linear projection techniques, thus limiting significantly the spectrum of possible applications. Indeed, ROMs based on linear reduction methods encounter substantial difficulties whenever the solution manifold has a so-called Kolmogorov $n$-width \cite{kolmogorov} that decays slowly with $n$.
The Kolmogorov $n$-width is a quantity that measures the degree of accuracy by which a set can be approximated using linear subspaces of dimension $n$, namely
\begin{equation}
\label{eq:kolmogorov}
d_{n}(\mathcal{S}) := \inf_{\substack{\\V_{n}\subset V, \\\text{dim}(V_{n})=n}}\sup_{u\in\mathcal{S}}\;\inf_{\textbf{v}\in V_{n}} ||u-v||.
\end{equation}
If $d_{n}(\mathcal{S})$ decays slowly with $n$, then projection-based ROMs can reach meaningful accuracies only for large values of $n$, which in turn leads to expensive models. We point out that this phenomenon is far from being uncommon. As a matter of fact, the slow decay on $d_{n}(\mathcal{S})$ is typical of time-dependent transport-dominated problems, even under fairly simple circumstances \cite{greif,ohlberger}. The same is also true for stationary and purely diffusive problems, provided that the parameters enter in a highly nonlinear and possibly spatially localized way. \final{The interested reader can find a simple yet remarkable example of this fact in the Appendix, Example \ref{example:kolmogorov-decay}}.
In order to tackle these drawbacks, we propose a novel approach based on Deep Neural Networks (DNNs) \cite{schmidhuber} that naturally accounts for possible nonlinearities in the solution manifold. Our construction is mostly inspired by the recent advancements in nonlinear approximation theory, e.g. \cite{cohen2,daubechies,schwab}, and the increasing use of deep learning techniques for parametrized PDEs and \final{operator learning}, as in \cite{hesthaven3,fresca,kutyniok,karniadakis}.
\subsection*{Our contribution}
\label{sec:our}
The purpose of the present work is to provide alternative ROM techniques for parametrized PDEs that are able to overcome the drawbacks implied by the slow decay of the Kolmogorov $n$-width. In particular, we focus on nonintrusive ROMs where the solution map is approximated by a deep neural network $\Phi$. This idea has been recently investigated both theoretically, as in \cite{kutyniok, mishra3, schwab}, and practically, e.g. \cite{fresca,geist}. By now, the drawbacks posed by this approach are mainly practical: it is often unclear how the network architecture should be designed and which optimization strategies are better suited for the purpose. Also, we lack the understanding of the possible ways the nonlinearities in the DNN should be exploited in order to make the most out of it. Here, we wish to partially answer these questions and provide a constructive way of designing such $\Phi$.
The key idea is to break the problem into two parts. First, we seek for a low-dimensional representation of the solution manifold, which we obtain by training a deep autoencoder \cite{hinton}, $\Psi\circ\Psi'$.
The encoder, $\Psi'$, is used to map the solution manifold into a reduced feature space $\mathbb{R}^{n}$, while the decoder serves for the reconstruction task. Here we see a clear analogy with the Nonlinear Kolmogorov $n$-width as defined in DeVore et al. \cite{devore}. There, the authors define
\begin{equation*}
\delta_{n}(\mathcal{S})
:=
\inf_{
\substack{
\decoder'\in\mathcal{C}(\mathcal{S},\;\mathbb{R}^{n})\\
\Psi\in\mathcal{C}(\mathbb{R}^{n},\;V)}}
\;\;\sup_{u\in\mathcal{S}}\;\;||u-\Psi(\decoder'(u))||,
\end{equation*}
as a nonlinear counterpart of $d_{n}(\mathcal{S})$. In light of this, we introduce the concept of \textit{minimal latent dimension}, denoted as $n_{\min}(\mathcal{S})$, which we define as the smallest $n$ for which $\delta_{n}(\mathcal{S})=0$. By choosing this particular $n_{\min}(\mathcal{S})$ as latent dimension for the autoencoder, we are then able to perform a significant model reduction.
Once the autoencoder has been trained, we exploit the encoder $\Psi'$ in order to represent each solution $u_{\mup}$ through a low-dimensional vector $\ub^{\rdim}_{\mup}\in\mathbb{R}^{n}$. We then train a third network $\phi:\Theta\to\mathbb{R}^{n}$ to learn the \textit{reduced map} $\boldsymbol{\mu}\to\ub^{\rdim}_{\mup}$. In this way, by connecting the architectures of $\phi$ and $\Psi$ we obtain the complete model, $\Phi:=\Psi\circ\phi$, which we later term as DL-ROM (Deep Learning based Reduced Order Model, in the same spirit of previous works \cite{fresca,fresca2}).
\newline
\newline
The novelty of our contribution is twofold. First, we develop a new constructive way of using neural networks to approximate the solution map and we test it on some numerical examples. Second, we prove theoretical results that motivate the choice of the ROM dimension. Indeed, despite the popularity of autoencoders, e.g. \cite{fresca,lee,mucke,zhu}, the choice of the latent dimension $n$ is often handled by trial and error. In contrast, we establish precise bounds on $n$ thanks to a rigorous theoretical analysis.
More precisely, in Theorems 1 and 2, we investigate the link between the minimal latent dimension $n_{\min}(\mathcal{S})$ and the topological properties of $\mathcal{S}$. In Theorem 3 we explicitly bound $n_{\min}(\mathcal{S})$ in terms of the dimensionality of the parameter space. In particular, we show that $n_{\min}(\mathcal{S})\le 2p+1$ as soon as the parametric map is Lipschitz continuous. \review{The theory is then applied to the case of second order elliptic PDEs, in Theorem 4, where we demonstrate how the parameters directly affect the value of the minimal latent dimension. \final{Finally, in Theorem 5, we bound the model complexity in terms of the ROM accuracy, deriving suitable error estimates that are later confirmed experimentally.}}
\newline
\newline
The paper is organized as follows. In Section \ref{sec:background} we introduce our general framework and briefly recall the driving ideas of linear reduction.
In Section \ref{sec:nonlinear} we move to the nonlinear case, where we establish a solid theoretical background for the construction of the DL-ROM, with particular emphasis on minimal representations and parametrized PDEs. In Section \ref{sec:learning} we dive into the details of our deep learning approach, thereby discussing the general construction and \review{its numerical properties}. In Section \ref{sec:experiments} we present some numerical results and assess the proposed methodology. Finally, to make the paper self-contained, auxiliary mathematical results are reported in the Appendix.
\newpage
\section{Nonlinear Dimensionality Reduction}
\label{sec:nonlinear}
In the present Section we formalize the idea of using nonlinear reduction techniques for the compression of the solution manifold. We start by introducing all concepts and results in an abstract fashion. Only at the end, Section \ref{sec:nonlinear-param-pdes}, we rephrase the content in terms of parametrized PDEs.
\subsection{Nonlinear Kolmogorov $n$-width and minimal latent dimension}
\label{sec:nl-kw}
Within this Section, we consider an abstract setting where $(V, ||\cdot||)$ is a Hilbert space and $\mathcal{S}\subset V$ a generic subset. In particular, $\mathcal{S}$ needs not to be the solution manifold of a parametrized PDE and the theory is presented regardless of a possible discretization. We address the problem of finding a low-dimensional representation of $\mathcal{S}$ while minimizing the reconstruction error.
When $V$ is finite-dimensional, the linear reduction described in Section \ref{sec:pod} performs an encoding of $\mathcal{S}$ via the map $\textbf{u}\to\mathbf{V}^{T}\textbf{u}=:\textbf{u}^{n}\in\mathbb{R}^{n}$, where $n$ is the reduced dimension; the set is then recovered through $\textbf{u}^{n}\to \mathbf{V}\textbf{u}^{n}\approx\textbf{u}$. Therefore, a possible generalization to the nonlinear case is to substitute $\mathbf{V}^{T}$ with some \textit{encoder} $\decoder':\mathcal{S}\to\mathbb{R}^{n}$ and $\mathbf{V}$ with a \textit{decoder} $\Psi:\mathbb{R}^{n}\to V$. Of note, this is also an approach that easily extends to infinite-dimensional settings. Depending on the restrictions that we impose on $\decoder'$ and $\Psi$, different reconstruction accuracies can be obtained.
Here, we only require $\decoder'$ and $\Psi$ to be continuous. This, naturally gives rise to the optimization problem below,
\begin{equation}
\label{eq:nonlinear-kolmogorov}
\delta_{n}(\mathcal{S})
:=
\inf_{
\substack{
\decoder'\in\mathcal{C}(\mathcal{S},\;\mathbb{R}^{n})\\
\Psi\in\mathcal{C}(\mathbb{R}^{n},\;V)}}
\;\;\sup_{u\in\mathcal{S}}\;\;||u-\Psi(\decoder'(u))||,
\end{equation}
where $\mathcal{C}(X, Y)$ denotes the collection of all continuous maps from $X$ to $Y$.
As we mentioned in the Introduction, the above corresponds to the (continuous) Nonlinear Kolmogorov $n$-width as defined in \cite{devore}. It is clear that $d_{n}(\mathcal{S})\ge\delta_{n}(\mathcal{S})$. Also, $\delta_{n}(\mathcal{S})$ is nonincreasing in $n$, which reflects the fact that better approximations can be achieved in higher dimensional spaces. However, in the context of reduced order modelling, smaller values of $n$ are often preferable, as they allow for less expensive models.
In this sense, whenever there exists a smallest dimension $n_{\min}$ that allows for an arbitrarily accurate reduction, i.e. $\delta_{n_{\min}}(\mathcal{S})=0$, we may want to focus on that one. For this reason, we introduce the notation
$$n_{\min}(\mathcal{S}):=\min\{n\in\mathbb{N}\;|\; \delta_{n}(\mathcal{S})=0\},\vspace{1em}$$ were we adopt the convention $\min\emptyset=+\infty$. We refer to $n_{\min}(\mathcal{S})$ as to the minimal latent dimension of $\mathcal{S}$. Clearly, when $V\cong\mathbb{R}^{N_{h}}$ is finite-dimensional, the above definition is of interest only if $n_{\min}(\mathcal{S})\ll N_{h}$. Nevertheless, as we will see below, this is always the case as soon as $\mathcal{S}$ has an intrinsic low-dimensional structure.
Indeed, the value of $n_{\min}(\mathcal{S})$ is strongly related to the topological properties of $\mathcal{S}$. For instance, in the case of compact sets, it is invariant under bicontinuous transformations. More precisely, we have the following.
\begin{theorem}
\label{theorem:homeom}
Let $V$ and $W$ be two Hilbert spaces. Let $\mathcal{S}\subset V$ and $\mathcal{M}\subset W$ be two compact subsets. If $\mathcal{S}$ and $\mathcal{M}$ are homeomorphic, then $n_{\min}(\mathcal{S}) = n_{\min}(\mathcal{M})$.
\end{theorem}
\proof{\input{Proofs/theorem1-proof}}
\noindent The minimal latent dimension is also related to the so-called topological dimension, or Lebesgue covering dimension. For a formal definition of the latter we refer to \cite{drutu,engelking}. In particular, if $\mathcal{S}$ has an intrinsic $p$-dimensional structure, then we are able to bound $n_{\min}(\mathcal{S})$ explicitly. Indeed, by classical results of Dimension Theory, the following theorem holds true.
\begin{theorem}
\label{theorem:mindimbounds}
Let $V$ be a Hilbert space and $\mathcal{S}\subset V$ a compact subset. If $\mathcal{S}$ has topological dimension $p$, then $n_{\min}(\mathcal{S})\le 2p + 1$, and the infimum appearing in \eqref{eq:nonlinear-kolmogorov} is attained at all reduced dimensions $n\ge2p+1$.
Additionally, if $\mathcal{S}$ is a topological $p$-manifold, then the lower bound $n_{\min}(\mathcal{S}) \ge p$ also holds.
\end{theorem}
\proof{\input{Proofs/theorem2-proof}}
We mention that, in the particular case of $p$-manifolds and under suitable smoothness assumptions, the bounds in Theorem \ref{theorem:mindimbounds} can be sharpened to $n_{\min}(\mathcal{S})\le 2p$ or even $n_{\min}(\mathcal{S})\le 2p-1$ in case $p$ is not a power of 2. These are all consequences of the so-called Whitney embedding theorem and a few of its variants. We do not dive deeper into the matter but leave \cite{skopenkov} as a reference for the interested reader. We also note that the intrinsic dimension of $\mathcal{S}$ does not uniquely determine the value of $n_{\min}(\mathcal{S})$. In particular, $\mathcal{S}$ may have topological dimension $p$ but $n_{\min}(\mathcal{S}) > p$, coherently with Theorem \ref{theorem:mindimbounds}. In this respect, we report below two simple examples.
\begin{example}
\label{example:circle}
Let $V=\mathbb{R}^{2}$ and $\mathcal{S}=\{\mathbf{x}\in V : |\mathbf{x}|=1\}$ be the unit circle. Then, $\mathcal{S}$ is a one-dimensional manifold but $\delta_{1}(\mathcal{S}) = 1$ and $n_{\min}(\mathcal{S})=2$. To see this, consider any pair of continuous maps $\decoder':\mathcal{S}\to\mathbb{R}$ and $\Psi:\mathbb{R}\to\mathbb{R}^{2}$. By the Borsuk-Ulam theorem, there exists a point $\mathbf{x}\in\mathcal{S}$ such that $\decoder'(\mathbf{x})=\decoder'(-\mathbf{x})$. Therefore, being $||\cdot||=|\cdot|$ the Euclidean norm,
\begin{multline*}
\sup_{\textbf{v}\in\mathcal{S}}\;||\textbf{v}-\Psi(\decoder'(\textbf{v}))||
\ge
\max\{|\mathbf{x}-\Psi(\decoder'(\mathbf{x}))|,\;|-\mathbf{x}-\Psi(\decoder'(-\mathbf{x}))|\}
\ge
\\
\ge
\frac{1}{2}\left(|x-\Psi(\decoder'(\mathbf{x}))|+|-\mathbf{x}-\Psi(\decoder'(-\mathbf{x}))|\right)\ge\frac{1}{2}|\mathbf{x}-(-\mathbf{x})|=1.
\end{multline*}
As $\decoder'$ and $\Psi$ are arbitrary, we conclude that $\delta_{1}(\mathcal{S})\ge1$. The equality is then obtained by considering the case in which both $\decoder'$ and $\Psi$ are identically zero.
\end{example}
\begin{example}
\label{example:curve}
On the spatial domain $\Omega = (0,\pi)$, consider the boundary value problem
\[
\begin{cases}
u'' = -u & x\in\Omega
\\
u(0) = 10(2\mu^{3}-3\mu^{2}+\mu)&
\\
u'(\pi) = 1-2|1-2\mu|,&
\end{cases}
\]
where $\mu\in[0,1]$ is a parameter. Let us then consider the solution manifold
$\mathcal{S}=\{u_{\mu}\}_{\mu\in[0,1]}$ as a subset of $V=L^{2}(\Omega)$. Then, $\mathcal{S}$ is a 1-dimensional manifold but its minimal latent dimension equals $n_{\min}(\mathcal{S})=2$.
Indeed, explicitly expanding the solutions reads $$u_{\mu}(x) = 10(2\mu^{3}-3\mu^{2}+\mu)\cos x + (2|1-2\mu|-1)\sin x.$$ It is then clear that, up to scaling of the $L^{2}$-norm, $\mathcal{S}$ can be isometrically identified with the curve $\mu\to(20\mu^{3}-30\mu^{2}+10\mu,\;2|1-2\mu|-1)$ in $\mathbb{R}^{2}$. But the latter curve is a compact manifold with positive nonlinear Kolmogorov 1-width, as it is homeomorphic to the unit circle (see Figure \ref{fig:curve} and Theorem \ref{theorem:homeom}).
\end{example}
\noindent\textit{Remark.\;} Here we only considered the case of Hilbert spaces, which is the typical framework used for elliptic PDEs. However, as mentioned in the proof of Theorem \ref{theorem:mindimbounds}, many of the above ideas and results can be adapted to the more general context of normed and Banach spaces.
\input{Tables and Figures/curve}
\subsection{Application to Parametrized PDEs}
\label{sec:nonlinear-param-pdes}
Let us now consider the case of a PDE that depends on a vector of $p$ parameters. We fix a parameter space $\Theta\subset\mathbb{R}^{p}$ and a Hilbert state space $V$. As before, for each $\boldsymbol{\mu}\in\Theta$ we denote the corresponding PDE solution with $u_{\mup}$. Similarly, we define $\mathcal{S}=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$. Notice that we refer to $\mathcal{S}$ as the solution manifold even though, in fact, it is not granted that $\mathcal{S}$ is a manifold in the topological sense. This latter property can be recovered under additional hypotheses on the parameter space and the parametric map.
We consider the problem of finding a low-dimensional representation of $\mathcal{S}$ by means of nonlinear reduction. In particular, we wish to compress $\mathcal{S}$ as much as possible without paying in terms of accuracy, which corresponds to working with the minimal dimension $n_{\min}(\mathcal{S})$. To this end, we must take into account the fact that the dimension of the parameter space $\Theta$ influences the low-dimensional structure of $\mathcal{S}$, in fact, the latter is ultimately defined in terms of $p$ scalar parameters.
Parallel to this, one may also exploit the parameters as additional tools during the dimensionality reduction process. This corresponds to replacing the solution manifold with the augmented set $\mathcal{S}_{\Theta}:=\{(\boldsymbol{\mu}, u_{\mup})\}_{\boldsymbol{\mu}\in\Theta}\subset\mathbb{R}^{p}\times V$, where $\boldsymbol{\mu}$ appears explicitly. The following Theorem provides some insights about both alternatives.
\begin{theorem}
\label{theorem:parametric-reduction}
Let $\boldsymbol{\mu}\tou_{\mup}$ be a map from a compact set $\Theta\subset\mathbb{R}^{p}$ to some Hilbert space $V$. Define the sets $\mathcal{S}:=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$ and $\mathcal{S}_{\Theta}:=\{(\boldsymbol{\mu}, u_{\mup})\}_{\boldsymbol{\mu}\in\Theta}$. We have the following:
\begin{itemize}
\item [a1)] if the map $\boldsymbol{\mu}\tou_{\mup}$ is Lipschitz continuous, then $n_{\min}(\mathcal{S})\le 2p+1$.
\item [a2)] if there exists at least an internal point $\boldsymbol{\mu}_{0}\in\Theta$ where the correspondence $\boldsymbol{\mu}\tou_{\mup}$ is locally injective, then $n_{\min}(\mathcal{S}) \ge p$.
\item [a3)] if the map $\boldsymbol{\mu}\tou_{\mup}$ is continuous and injective, then $n_{\min}(\mathcal{S}) = n_{\min}(\Theta)$. In particular, $n_{\min}(\mathcal{S})=p$ whenever $\Theta$ has nonempty interior.
\item [b1)] if the map $\boldsymbol{\mu}\tou_{\mup}$ is continuous, then $n_{\min}(\mathcal{S}_{\Theta})=n_{\min}(\Theta)$. In particular, $n_{\min}(\mathcal{S}_{\Theta})=p$ whenever $\Theta$ has nonempty interior.
\end{itemize}
\end{theorem}
\proof{\input{Proofs/theorem3-proof}}
\noindent
\noindent\textit{Remark.\;} Theorem \ref{theorem:parametric-reduction} holds for a generic Hilbert-valued map, meaning that the correspondence $\boldsymbol{\mu}\to u_{\mup}$ needs not to involve the solution of a PDE. Because of this generality, some hypotheses cannot be weakened. For instance, one cannot replace the requirement of Lipschitz continuity in statement (a1) with continuity, mainly because of space-filling curves. As a counterexample, consider the Hilbert space of real square summable sequences, $V=\ell^{2}$. Then, by a straightforward application of the Hahn–Mazurkiewicz theorem (see Theorem 3-30 in \cite{hocking}), there exists a continuous map from the unit interval to $\ell^{2}$ whose image $\mathcal{S}$ is the so-called Hilbert cube, informally $\mathcal{S} = \prod_{n=1}^{+\infty} [0, 1/n]$. Therefore, being $\Theta:=[0,1]$ the parameter space, we have a case in which $p=1$ but $n_{\min}(\mathcal{S})=+\infty$. In fact, for each $n\in\mathbb{N}$, the Hilbert cube contains an homeomorphic copy of the $n$-dimensional unit cube $I^{n}$. Thus, $n = n_{\min}(I^{n}) \le n_{\min}(\mathcal{S})$ for all $n\ge0$ and so $n_{\min}(\mathcal{S})=+\infty$.
\newline
\newline
Before moving to the actual description of our Deep Learning approach, we conclude this Section with a practical application of the results we have presented so far. In particular, we focus on the case of second order elliptic PDEs.
\subsubsection{Second Order Elliptic PDEs}
In order to state the main result, we first provide some notation. We denote by $\Omega$ a bounded domain in $\mathbb{R}^{d}$ and by $\cdot$ the scalar product in $\mathbb{R}^{d}$.
For $1\le q<+\infty$, we denote by $L^{q}(\Omega)$ the Lebesgue space of $q$-integrable real-valued maps; when $q=+\infty$, $L^{\infty}(\Omega)$ is defined as the Banach space of essentially-bounded maps. Similarly, we define the spaces $L^{q}(\Omega, \mathbb{R}^{d})$ and $L^{q}(\Omega,\mathbb{R}^{d\times d})$ in the Bochner sense, where $\mathbb{R}^{d}$ is considered with the Euclidean norm $|\cdot|$ and $\mathbb{R}^{d\times d}$ with the operator norm, $|\boldsymbol{A}|_{\mathbb{R}^{d\times d}}:=\sup_{|\boldsymbol{\xi}|=1}|\boldsymbol{A}\boldsymbol{\xi}|$. Given $k\in\mathbb{N}$, $1\le q<+\infty$, we write $W^{k,q}(\Omega)$ for the Sobolev space of all $w\in L^{q}(\Omega)$ that are $k$-times weakly differentiable with derivatives in $L^{q}(\Omega)$. We use $W_{0}^{k,q}(\Omega)$ to denote the subspace of all $w\in W^{k,q}(\Omega)$ that vanish on $\partial\Omega$, and we write $W^{-k,q}(\Omega)$ for the dual space of $W^{k,q}_{0}(\Omega)$ with respect to the duality product $\langle f,g\rangle\to\int_{\Omega}fg$. In order to prescribe Dirichlet boundary data, we also make use of the Sobolev-Slobodeckij spaces $W^{s,q}(\partial\Omega)$, where $s>0$ is typically not an integer. All the aforementioned spaces are considered with their usual norms, see e.g. \cite{evans}.
\newline
\newline
We define the sets of all admissible conductivity tensor-fields and transport fields, respectively $\Sigma(\Omega)\subset L^{\infty}(\Omega, \mathbb{R}^{d\times d})$ and $B(\Omega)\subset L^{\infty}(\Omega, \mathbb{R}^{d\times d})$, as follows. We let $\boldsymbol{\sigma}\in\Sigma(\Omega)$ if and only if it is uniformly elliptic, that is, there exists $\varepsilon>0$ such that for almost all $x\in\Omega$ one has $\boldsymbol{\sigma}(x)\boldsymbol{\xi}\cdot \boldsymbol{\xi}\ge\varepsilon|\boldsymbol{\xi}|^{2}$ for all $\boldsymbol{\xi}\in\mathbb{R}^{d}$. We let $\boldsymbol{b}\in B(\Omega)$ if and only if it is differentiable and divergence free, that is, $\boldsymbol{b}\in\mathcal{C}^{1}(\Omega, \mathbb{R}^{d})$ and div$(\boldsymbol{b})=0$ in $\Omega$. We endow both $\Sigma(\Omega)$ and $B(\Omega)$ with the infinity norm $||\cdot||_{\infty}$. We are now able to state the following.
\begin{theorem}
\label{theorem:advediff-reduction}
Let $\Omega\subset\mathbb{R}^{d}$ be a bounded domain with Lipschitz boundary, and let $\Theta\subset\mathbb{R}^{p}$ be a compact subset with nonempty interior. Let $q\ge 2d/(d+2)$ be finite, and define the conjugate exponent $q':=q/(q-1)$. Moreover, let $\boldsymbol{\mu}\to\cond_{\mup}\in\Sigma(\Omega),$ $\boldsymbol{\mu}\to\adve_{\mup}\in B(\Omega),$ $\boldsymbol{\mu}\tof_{\mup}\in W^{-1,q'}(\Omega)$ be parameter dependent coefficients and $\boldsymbol{\mu}\to g_{\mup}\in W^{1/q',q}(\partial\Omega)$ boundary data. For each $\boldsymbol{\mu}\in\Theta$, we define $u_{\mup}\in W^{1,q}(\Omega)$ as the unique solution to the following second order elliptic PDE
\[
\begin{multlined}
u\in W^{1,q}(\Omega):\\ u_{|\partial\Omega}=g_{\mup}\text{ and }\int_{\Omega}\cond_{\mup}\nabla u\cdot\nabla w + \int_{\Omega}\left(\adve_{\mup}\cdot\nabla u\right) w = \int_{\Omega}f_{\mup} w\quad\forall w\in W^{1,q'}_{0}(\Omega),
\end{multlined}\]
\newline
Consider the solution manifold $\mathcal{S}:=\{u_{\mup}\}_{\boldsymbol{\mu}\in\Theta}$ as a subset of $V:=L^{2}(\Omega)$. The following hold true:
\begin{itemize}
\item [i)] if the dependence of $\cond_{\mup}$, $\adve_{\mup}$, $f_{\mup}$, $g_{\mup}$ on $\boldsymbol{\mu}$ is Lipschitz continuous, then $n_{\min}(\mathcal{S})\le 2p+1$.
\item [ii)] if $\cond_{\mup}$, $\adve_{\mup}$, $f_{\mup}$, $g_{\mup}$ depend continuously on $\boldsymbol{\mu}$ and the solution map $\boldsymbol{\mu}\to u_{\mup}$ is one-to-one, then $n_{\min}(\mathcal{S})=p$.
\end{itemize}
Additionally, let $\mathcal{S}_{\Theta}:=\{(\boldsymbol{\mu}, u_{\mup})\}_{\boldsymbol{\mu}\in\Theta}\subset\mathbb{R}^{d}\times V$ be the augmented manifold. Then:
\begin{itemize}
\item [iii)] if $\cond_{\mup}$, $\adve_{\mup}$, $f_{\mup}$, $g_{\mup}$ depend continuously on $\boldsymbol{\mu}$, then $n_{\min}(\mathcal{S}_{\Theta})=p$.
\end{itemize}
\end{theorem}
\proof{\input{Proofs/theorem4-proof}}
\noindent\textit{Remark.\;} In Theorem \ref{theorem:advediff-reduction}, the PDE is firstly solved in the Banach space $W^{1,q}(\Omega)$ and the solution manifold is then embedded in the Hilbert space $L^{2}(\Omega)$. This construction allows for a large spectrum of PDEs where the solution $u_{\mup}$ may exhibit singularities.
A remarkable example is found for the dimensions $d=2,3$, where singular forces such as Dirac delta functions produce solutions $u_{\mup}\notin H^{1}(\Omega):=W^{1,2}(\Omega)$ \cite{casas}. In these cases, the above Theorem still applies, e.g. with $q'=4$ and $q=4/3$ (cf. Morrey embedding).
Nevertheless, we shall point out that in the Hilbert case, $q'=q=2$, it is possible to restrict the state space to $V=H^{1}(\Omega)\subset L^{2}(\Omega)$. Note also that in this case the condition $q\ge 2d/(d+2)$ is redundant as it is trivially satisfied for any $d\ge1$, coherently with the fact that $H^{1}(\Omega)$ always embeds in $L^{2}(\Omega)$.
\section{}
\subsection{}
\begin{theorem}[Optional addition to theorem head]
\end{theorem}
\begin{proof}[Optional replacement proof heading]
\end{proof}
\begin{figure}
\includegraphics{filename}
\caption{text of caption}
\label{}
\end{figure}
\begin{equation}
\end{equation}
\begin{equation*}
\end{equation*}
\begin{align}
& \\
&
\end{align}
|
\section{Introduction}
The present manuscript is part of a recent series of papers \cite{eAl21,aBu20} dedicated to
astrodynamical properties of Molniya spacecraft.
It is well-known that the Molniya orbit provides a valuable
dynamical alternative to the geosynchronous orbit, suitable for
communication satellites to deliver a service in high-latitude
countries, as it is actually the case for Russia.
In the present contribution, we focus on the
decadal evolution of the semi-major axis.
We approach the problem by studying the long-term and drag-free motion of a test-particle subject to the non-spherical geometry of the Earth and third-body perturbations due to the Sun and the Moon.
The metrical Keplerian characteristic values of the Molniya-class, semi-major axis $a$ (expressed in units of Earth radius, $r_{\textrm{E}}$), eccentricity $e$ and inclination $i$, considered in this work are
\begin{align}
\oe_{\mathcal{M}}
=
(a_{\mathcal{M}},e_{\mathcal{M}},i_{\mathcal{M}})
\sim
(4.16\,r_{\textrm{E}},0.7,63.4^{\circ}).
\end{align}
To follow this goal, the zonal geopotential terms are first restricted to the second degree $J_{2}$ term.
Molniya satellites have a mean motion close to $2$ revolutions per day and thus are subject to a $2:1$ resonant commensurability with the Earth's rotation rate (semi-synchronous orbits). Therefore, $12$-hour resonant terms of the geopotential need to be taken into account to model the dynamics. The resonant terms are algebraically computed up to the $4$th degree and order.
Being interested in long-term dynamics, we deal with the various Hamiltonian contributions averaged over the fast variables, leading to the so-called \textit{secular} dynamics.
The fast timescales are connected to the mean anomaly of the test-particle and the Moon and the Sun, denoted respectively $M, M_{\textrm{M}}, M_{\textrm{S}}$.
The averaged contributions are introduced as the direct computation of the integral with respect to the fast variables. For the zonal contribution, this averaging is performed in closed form with respect of the eccentricity. The quadrupolar lunisolar perturbations, depending respectively on $M$ and $M_{\textrm{M}}$ or $M$ and $M_{\textrm{S}}$ are doubly averaged, also in closed form with respect of the eccentricity.
For the resonant contribution of the geopotential, the averaging requires some extra care. First, the averaging is not performed in
closed form over the eccentricity. Instead, we
employ a truncated series expansion, which, considering the highly eccentric nature of the orbit, is given to $4$th order in the eccentricity. Second, the averaging is not performed over the variable $M$ directly, as it would not take into account accurately the resonant dynamics. Instead, this step calls for the introduction of new slow/fast variables taking into account the very resonant nature of the problem \cite{vBe12}. Once those variables are recognised and introduced explicitly, the averaged contribution is obtained in the usual way, \textit{i.e.,\ } by averaging over the (new) fast variables. \\
Molniya, Raduga, Gorizont and Ekran are Russian communication satellites inherited from the Soviet era. Molniya is the Russian word for lightning, thus, given their interesting dynamical framework, are aptly named. The framework for the Russian communication satellite constellation was first presented by Bill Hilton in the British Interplanetary Society during the years 1959-60 \cite{bHa07} who suggested utilizing highly inclined, highly eccentricity orbits for communication systems for high latitude regions. The Molniya constellation operates on a unique orbital configuration, which, is not exploited by any other type of satellite system. While typical communication satellites operate on a $24$h geosynchronous equatorial orbit, the high latitude of many Russian areas poses a problem for radio frequency transmissions from equatorially orbiting spacecraft. For example, the Russian republic spans a range of
$40$ degrees in latitude from North to South, with the northernmost point being located at $80$ degrees North. The solution to the satellite communication problem for high latitude regions is the Molniya orbital regime. Operating on a highly inclined and eccentric $12$ hour orbit, the Molniya spacecraft reach geosynchronous altitude at apogee, providing access to Russian areas for over $8$ hours per orbit and reaches approximately $600$ km at perigee at much greater orbital velocities. Since their inception, over $160$ Molniya spacecraft have been launched which have provided a platform for research on their unique dynamical framework for nearly $60$ years.
Molniya orbits gather two distinct resonant phenomena\footnote{
The force model we employed is discussed in more details in Appendix \ref{app:ForceModel}. The resonant argument $\omega$ which appears in the expansion of the lunisolar Hamiltonian also appears in higher geopotential zonal terms. In this sense, Molniya orbits gather more than $2$ resonant phenomena, being affected by zonal, tesseral and third-body resonances.
Nevertheless, the effects of higher zonal terms
on the semi-major dynamics are negligible for our study and timescale of interests as we will demonstrate later.}, with quite distinct timescales,
giving rise to interesting qualitative dynamical behaviour. Firstly, as we mentioned, they are affected by a $2:1$ geopotential resonance. Secondly, their inclination close to the critical inclination value of $ 63.4^{\circ}$ place them near a so-called ``inclination dependent only'' lunisolar resonance \cite{sHu80}. Whilst the first affects the semi-major axis of the orbit on a yearly timescale, the lunisolar effect manifests primarily on the eccentricity of the orbit, which exhibits large oscillations on a much longer timescale. These pulsations contribute to modulate the (no-longer constant) coefficients of the tesseral problem; henceforth a coupling and indirect interplay between the two resonances might happen. The seminal contributions regarding the tesseral and lunisolar problems are gathered in \cite{fDe93,fDe93-2}, and in the PhD work of T.\,Ely \cite{tEl96}, later extended to full papers \cite{tEl97,tEl00}. F.\,Delhaise, J.\,Henrad and A.\,Morbidelli \cite{fDe93,fDe93-2} have focused their study on the eccentricity, inclination and argument of perigee, without paying attention to the behaviour of the semi-major axis. T.\,Ely \cite{tEl96} connected the resonant problem with large-scale chaos affecting the semi-major axis, including the disturbing effects of the lunisolar perturbation, but for orbital parameters which differ
quite significantly
from Molniya orbit (in fact, he considered either moderate inclined orbits with $i \sim 20^{\circ}$ or inclinations in the vicinity of the $2g+h$ lunisolar resonance, \textit{i.e.,\ } at $i \sim 56^{\circ}$). Thus, the secular dynamics of Molniya semi-major axis remains partially unexplored. \\
The first contribution of this paper is to discuss the dynamics of the semi-major axis beyond the integrable picture. For this task, we rely on classical tools from nonlinear dynamics to portray the dynamical structures organising the long-term dynamics (Poincar\'e section, sections of finite-time variational indicators). The chaotic nature of eccentric and inclined orbits subject to tesseral resonances, often explained through an overlap of nearby resonances \cite{bCh79}, has been known for some time in the context of tesseral resonances \cite{aCe14,jDa15,tEl96}. Nevertheless, as we will highlight, the extent of chaos affecting the semi-major axis phase space for Molniya satellites is much more limited in the range of $i \sim 63^{\circ}$ compared to the previously studied range of inclinations. In fact, large connected chaotic seas are absent from the dynamics. Yet, hyperbolic orbits still exist and surround the unperturbed separatrix as we will show.
The second contribution of this paper is to reveal the precise effects of this coupling on the dynamics of the semi-major axis. This is achieved via the introduction of several dynamical systems, aiming at isolating gradually the various effects and couplings.
The driving principle is to introduce basic dynamical models, with the lowest number of degree-of-freedom (DoF) possible, which still encapsulate the physics and long-term qualitative features of the dynamics.
Molniya orbits have also received attentions in \cite{tlZh15,tlZh14}, but predominantly oriented towards the description of the long-term evolution of the eccentricity. The authors have built simplified secular dynamical models, in the same spirit as ``isolating'' the building blocks of the dynamics and reconstructed the qualitative features of the eccentricity, inclination and argument of perigee observables. A few model generated orbits have been compared to the publicly available two-line element (TLE) datasets (see, \textit{e.g.,\ } \cite{mCa14,dVa01})\footnote{Available at
\href{https://www.space-track.org}{space-track.org}.}. We underline that our contribution is paying particular attention to the orbit of Molniya 1-69\footnote{North American Aerospace Defense Command (NORAD) satellite catalog number
$17078$, COSPAR ID 1986-089A.}, left untouched in a previous study, as being ``in the vicinity of the separatrix'' \cite{tlZh14}.
TLEs remain mainly the sole reservoir of orbital data. The TLEs result from observational measures, coupled with an orbit determination process and numerical propagations performed with simplified theories of motion. In this respect, they form rather pseudo-observations instead of ``pure'' observational data. Approximately every $8$ hours, the unclassified TLEs are released publicly. Molniya spacecraft have been tracked since the mid-70's, thus providing a sufficient long-time interval of TLEs to appreciate secular effects acting on the semi-major axis.
The third and final contribution of this paper is the clear connection of the dynamics of two satellites, Molniya 1-69 and Molniya 1-87\footnote{NORAD ID $22949$, COSPAR ID 1993-079A.}, with the fingerprints of the dynamics associated to the hyperbolic set. This last point sheds some light of the relevance of secular dynamical approaches and toolboxes for the field of space situational awareness and the continuing increasing space traffic. The patterns of the orbital semi-major axis time-series (extracted from the corpus of TLEs, more details will be presented in the subsequent) of the two aforementioned satellites are convincingly approached under this umbrella.
The paper is organised as follows:
\begin{itemize}
\item In section \ref{sec:geo}, based on the Earth-only disturbing potential,
a secular model is termed. A resonant integrable system is formulated from which analytical quantitative estimates (width of the resonance, characteristic timescales) are extracted. This integrable picture is altered by a multiplet of resonances producing a separatrix splitting phenomena, responsible for the apparition of a chaotic layer in the phase space.
For Molniya parameters, the overlap of resonances is complete.
The corresponding 2-DoF\, Hamiltonian and its phase space is described via Poincar\'e sections.
\item In section \ref{sec:LS}, we introduce two models including lunisolar perturbations to overcome the
limitations of the Earth-potential only based model. From these models, the effects of the lunisolar perturbations on the tesseral problem are studied. We use dynamical indicators to portray the phase space structures and reveal the hyperbolic set affecting the semi-major axis. The dynamics of the hyperbolic set is studied.
\item In section \ref{sec:TLE}, after providing more information about the TLEs datasets, we
connect the dynamics of the data for satellites Molniya 1-69 and Molniya 1-87 with
the dynamics
of the hyperbolic set.
Relying on our understanding of the underlying dynamics, we extract specific epochs and orbital parameters of the TLEs that spot the satellites within the hyperbolic tangle when computing their respective dynamical maps.
\end{itemize}
We close the paper by summarising our conclusions.
\section{The secular and geopotential based Hamiltonian}\label{sec:geo}
We present our steps and assumptions to recover a relevant secular Hamiltonian model for $12$-hour orbits based on the geopotential only and we describe the associated dynamics. \\
The disturbing
potential of the Earth, in an Earth-centered and Earth-fixed frame, admits the
following expansion \cite{wKa66}
\begin{align}\label{eq:PertPotential}
V(r,\phi,\lambda)=
V_{\mathcal{Z}}(r,\phi) + V_{\mathcal{T}}(r,\phi,\lambda),
\end{align}
with the zonal and tesseral parts respectively given by
\begin{align}
\left\{
\begin{aligned}
&V_{\mathcal{Z}}(r,\phi)=\frac{\mu}{r} \sum_{l \ge 2}
\Big(\frac{r_{\textrm{E}}}{r}\Big)^{l}
J_{l,0}P_{l,0} \sin \phi, \\
&V_{\mathcal{T}}(r,\phi,\lambda)=-\frac{\mu}{r}
\sum_{l \ge 2}
\sum_{m=1}^{l}
\Big(\frac{r_{\textrm{E}}}{r}\Big)^{l}
\Big(c_{l,m} \cos m\lambda + s_{l,m} \sin m\lambda\Big)P_{l,m}(\sin \phi),
\end{aligned}
\right.
\end{align}
where the vector $(r,\phi,\lambda)$ denote the spherical coordinates (respectively radius, latitude and longitude), $r_{\textrm{E}}$ denotes the mean Earth's radius, $\mu$ the gravitational parameter of the Earth.
The $P_{l,m}$ are the Legendre polynomials of degree $l$ and order $m$. The coefficients $c_{l,m}$ and $s_{l,m}$ are the harmonic
coefficients describing Earth's gravity field where we denoted classically $J_{l,0}=-c_{l,0}$.
Throughout this paper, we denote the Keplerian orbital elements in the usual way as $(a,e,i,\omega,\Omega,M)$ where $a$ denotes the semi-major axis, $e$ the eccentricity, $i$ the inclination, $\omega$ the argument of perigee, $\Omega$ the longitude of the ascending node and $M$ the mean anomaly.
\subsection{The secular zonal part}\label{subsec:zonal}
The zonal part
is dominated by its quadrupole $(l=2)$ term and we therefore truncate $V_{\mathcal{Z}}$ to $l=2$.
Being interested by secular properties,
the $M$-average of the $J_{2}$ part, defining the secular $J_{2}$ contribution, is computed (in closed form over the eccentricity) using
the differential relationship
\begin{align}
\textrm{d} M = \frac{r^{2}}{a\sqrt{1-e^{2}}}\textrm{d} f,
\end{align}
together with the formula
$r=a(1-e^{2})/(1+e \cos f)$ (see \textit{e.g.,\ } \cite{wKa66}):
\begin{align}\label{eq:AvJ2}
\bar{V}_{J_{2}}=\frac{1}{2\pi}\int_{0}^{2\pi}V_{J_{2}} \, \textrm{d} M
=
\frac{1}{2\pi}\int_{0}^{2\pi} \frac{r^2}{a^2\sqrt{1-e^2}}V_{J_{2}} \, \textrm{d} f.
\end{align}
The classical final expression (\ref{eq:AvJ2}), expressed in terms of the orbital elements, reads
\begin{align}
\bar{V}_{J_{2}}=\frac{\mu r_{\textrm{E}}^{2}J_{2}}
{4a^{3}}(1-e^{2})^{-3/2}(3 \sin^{2} i-2).
\end{align}
Secular expressions of higher order terms and their dynamical effects are
discussed
in Appendix \ref{app:ForceModel}. We note, for the remainder of the manuscript, we drop bars over averaged quantities, bearing in mind that we are dealing with secular functions in this study.
\subsection{The secular resonant tesseral part for $12$-hour orbits}\label{subsec:tess}
To compute the resonant secular contribution of the tesseral part
\begin{align}\label{eq:VTess}
V_{\mathcal{T}}=
\sum_{l \ge 2} \mathcal{T}_{l},
\end{align}
with
\begin{align}
\mathcal{T}_{l}= \sum_{m=1}^{l}-
\frac{\mu}{r} \Big(\frac{r_{\textrm{E}}}{r}\Big)^{l}
\Big(c_{l,m} \cos m\lambda + s_{l,m} \sin m\lambda\Big)P_{l,m}(\sin \phi),
\end{align}
we first express it in terms of the orbital elements using a series of formal substitutions. The spherical coordinates are related to the orbital elements by:
\begin{align}
\left\{
\begin{aligned}
&\cos(\alpha-\Omega)=\cos(\omega+f)/\cos \phi, \\
&\sin(\alpha-\Omega)=\sin(\omega+f)\cos i/\cos \phi, \\
&\sin \phi= \sin i \sin(\omega +f),
\end{aligned}
\right.
\end{align}
where $\alpha$ stands for the right ascension of the satellite (again, we refer to \cite{wKa66} for omitted details).
The longitude $\lambda$ is written
as a function of $\alpha$ and the sidereal time $\theta$ as
\begin{align}
\lambda = \alpha - \theta
=
(\alpha - \Omega) + (\Omega - \theta).
\end{align}
The sidereal time $\theta$ evolves linearly with time as $\theta=\varpi_{\textrm{E}}t$, with
$\varpi_{\textrm{E}} = 2 \pi / \textrm{sidereal day}$.
Writing the inverse of the radius as
\begin{align}
\frac{1}{r}=\frac{1 + e \cos f}{a(1-e^{2})},
\end{align}
the quantities $\sin f$ and $\cos f$ are then written using their infinite series representation as a function of the mean anomaly $M$ and the Bessel functions $J_{s}$ (see, \textit{e.g.,\ } \cite{cMu99})
\begin{align}\label{eq:cosfsinf}
\left\{
\begin{aligned}
&\sin f= \lim_{k \to +\infty}2\sqrt{1-e^{2}}\sum_{s=1}^{k}
\frac{1}{s} \frac{\textrm{d} }{\textrm{d} e}J_{s}(se) \sin sM, \\
&\cos f= \lim_{k \to +\infty} -e +\frac{2(1-e^2)}{e}\sum_{s=1}^{k}J_{s}(se)\cos sM.
\end{aligned}
\right.
\end{align}
Applying the aforementioned substitutions into Eq.\,(\ref{eq:VTess}) transforms it into an expression dependent solely on the orbital elements $(a,e,i,\Omega,\omega,M)$ and the sidereal time $\theta$.
The angles appear as linear combinations over the rationales of
$M, \theta - \Omega$ and $\omega$ \cite{wKa66}.
Computing at this stage the brute-force $M$-average to derive the secular tesseral contribution would suppress the dynamical effects of the resonant terms for $12$-hour orbits. In fact,
in the vicinity of $12$-hour orbits,
the fast angle
\begin{align}
u_{\textrm{F}} = \theta - \Omega,
\end{align}
combines with the fast variable $M$
as
\begin{align}
2 u_{\textrm{S}}=M - 2 u_{\textrm{F}},
\end{align}
to form a slow varying quantity. Therefore, in the neighborhood of $12$-hour orbits,
the variable $u_{\textrm{S}}$ needs to be considered as a slow and independent variable.
Dealing therefore with the variables $u_{\textrm{F}}, u_{\textrm{S}}, \omega$, there is one fast angle $u_{\textrm{F}}$ and two slow angles, $\omega$ and $u_{\textrm{S}}$. The resonant tesseral contribution is therefore obtained by averaging over the fast angle $u_{\textrm{F}}$ as
\begin{align}
\bar{V}_{\mathcal{T}} = \frac{1}{2\pi} \int_{0}^{2\pi}
V_{\mathcal{T}} \, \textrm{d} u_{\textrm{F}}.
\end{align}
The final expression has the form
\begin{align}
\bar{V}_{\mathcal{T}} = \sum_{k=(k_{1},k_{2}) \in K}
h_{k}(a,e,i) \cos(\sigma_{k} + k_{1}\lambda_{lm}), \, K \subset \mathbb{Z}^{2},
\end{align}
where
\begin{align}
\sigma_{k} = k_{1} u_{\textrm{S}} + k_{2} \omega,
\end{align}
and $\lambda_{lm}$ is a constant phase-term
defined as
\begin{align}
\left\{
\begin{aligned}
&c_{l,m} = -J_{lm} \cos m \lambda_{lm},\\
&s_{l,m} = -J_{lm} \sin m \lambda_{lm}.
\end{aligned}
\right.
\end{align}
In Tab.\,\ref{tab:ResCoeff}, we provide the final formal expression of the secular resonant terms\footnote{Note the discrepancies with the formula presented in \cite{aCe14} for the coefficients of the trigonometric terms with arguments $M - 2\theta_{S}+ 2 \Omega - 2 \omega$, $M - 2\theta_{S}+ 2 \Omega - 3 \omega$ and $M - 2\theta_{S}+ 2 \Omega +4 \omega $. We kindly acknowledge the authors of \cite{aCe14} for their independent confirmation.}
for $12$-hour orbits up to $l=4$ appearing in $\bar{V}_{\mathcal{T}}$ for the uplets $k \in K$ with Eq.\,(\ref{eq:cosfsinf}) truncated to $k_{\max}=4$.\\
Now that we have at hand the secular disturbing functions, the dynamics is cast into a Hamiltonian framework
accounting for the Keplerian central part,
\begin{align}\label{eq:H}
\mathcal{H}=
\mathcal{H}_{\textrm{kep}.}
+ V_{J_{2}}
+ \mathcal{T}_{2},
\end{align}
where $\mathcal{T}_{2}$ is obtained from (\ref{eq:VTess}) by restricting the expansion to $l=2$.
The Hamiltonian must be a function of canonical variables
which are presented hereafter. We mention however that we might sometimes refer to quantities expressed in orbital elements (non-canonical elements) and it is understood that the elements are themselves function of canonical variables.
\begin{table}
\centering
\begin{tabular}{lcc}
\hline
\hline
$k=(k_{1},k_{2})$ & $h_{k}(a,e,i)$ & $\sigma_{k}$ \\
\hline
\hline
& & \\
$(2,0)$ & $\frac{\mu r_{\textrm{E}}^2 J_{22} 9e (9e^{2}+8) \sin^2 i
}{32 a^3}$ & $ M - 2\theta_{S}+ 2 \Omega$ \\
& & \\
$(2,2)$ & $\frac{\mu r_{\textrm{E}}^2 J_{22} 3 e (e^2-8) (\cos i+1)^2
}{64 a^3}$ & $M - 2\theta_{S}+ 2 \Omega + 2 \omega$ \\
& & \\
$(2,-2)$ & $\frac{ \mu r_{\textrm{E}}^2 J_{22} e^{3} (\cos i-1)^{2}
}{64 a^3}$& $M - 2\theta_{S}+ 2 \Omega - 2 \omega$ \\
& & \\
\hline
& & \\
$(2,-3)$ & $\frac{-\mu r_{\textrm{E}}^3 J_{32} 5 e^{4} (\cos i-1)^2 \sin i
}{1024 a^4}$ & $M - 2\theta_{S}+ 2 \Omega - 3 \omega$ \\
& & \\
$(2,-1)$ & $ \frac{\mu r_{\textrm{E}}^3 J_{32} 15 e^{2} (49e^{2}+22) (3\cos i +1) (\cos i-1) \sin i
}{128 a^4}$ & $M - 2\theta_{S}+ 2 \Omega - \omega$ \\
& & \\
$(2,1)$ & $\frac{-\mu r_{\textrm{E}}^3 J_{32}
15(239e^{4}+128e^{2}+64)
(3\cos i-1) (\cos i+1) \sin i
}{512 a^4}$ & $M - 2\theta_{S}+ 2 \Omega + \omega$ \\
& & \\
$(2,3)$ & $\frac{ \mu r_{\textrm{E}}^3 J_{32}
5e^{2}(e^{2}+6)
(\cos i+1)^2 \sin i
}{128 a^4}$ & $M - 2\theta_{S}+ 2 \Omega + 3 \omega$ \\
& & \\
\hline
& & \\
$(2,0)$ & $\frac{-\mu r_{\textrm{E}}^4 J_{42}
75e(27e^{2}+8)
(21\cos^{2}i\sin^{2}i-7\sin^{2}i-4\cos^{2}i+4)
}{256 a^5}$ & $M - 2\theta_{S}+ 2 \Omega $ \\
& & \\
$(2,-2)$ & $\frac{\mu r_{\textrm{E}}^4 J_{42}
245e^{3}(\cos i -1)
(7\cos i\sin^{2}i-\cos i +1)}{128 a^5}$ & $M - 2\theta_{S}+ 2 \Omega -2 \omega $ \\
& & \\
$(2,2)$ & $\frac{\mu r_{\textrm{E}}^4 J_{42}
15e(33e^{2}+8)(\cos i +1)
(7\cos i\sin^{2}i-\cos i -1)}{128 a^5}$ & $M - 2\theta_{S}+ 2 \Omega +2 \omega $ \\
& & \\
$(2,4)$ & $\frac{\mu r_{\textrm{E}}^4 J_{42}
35e^{3}(\cos i +1)^{2} \sin^{2}i}{512 a^5}$ & $M - 2\theta_{S}+ 2 \Omega +4 \omega $ \\
& & \\
$(4,0)$ & $\frac{\mu r_{\textrm{E}}^4 J_{44}525e^{2}(31e^{2}+12)\sin^4 i}{32a^{5}}$ & $2(M - 2\theta_{S}+ 2 \Omega) $ \\
& & \\
$(4,2)$ & $\frac{\mu r_{\textrm{E}}^4 J_{44}
105(65e^{4}+16e^{2}+16)(\cos i +1)^{2} \sin^{2} i}{64 a^5}$ & $2(M - 2\theta_{S}+ 2 \Omega) +2 \omega $ \\
& & \\
$(4,4)$ & $\frac{-\mu r_{\textrm{E}}^4 J_{44}
35e^{2}(2e^{2}-3)(\cos i +1)^{4}}{32 a^5}$ & $2(M - 2\theta_{S}+ 2 \Omega) +4 \omega $ \\
\end{tabular}
\caption{\label{tab:ResCoeff}
Formal coefficients and resonant angles
of the $2:1$ resonance up to $l_{\max}=m_{\max}=4$
and up to the $4$th order in eccentricity.
}
\end{table}
\subsection{Dynamics}
We start by introducing the following canonical resonant coordinates
\begin{align}\label{eq:ResCoord}
\left\{
\begin{aligned}
& I_{1}=-L, \hspace{1.56cm} u_{1}=2\theta-\ell -2h, \\
& I_{2}=G, \hspace{1.8cm} u_{2}=g,\\
& I_{3}=H-2L, \hspace{0.9cm} u_{3}=h, \\
& I_{4}=-2L-\Gamma, \hspace{0.72cm} u_{4}=-\theta,
\end{aligned}
\right.
\end{align}
where $(L,G,H,\ell,g,h)$ denote the classical canonical Delaunay variables related to the Keplerian elements
by
\begin{align}
\left\{
\begin{aligned}
& L=\sqrt{\mu \, a}, \hspace{1.68cm} \ell=M, \\
& G=L \, \sqrt{1-e^{2}}, \hspace{0.77cm} g=\omega,\\
& H= G \, \cos i, \hspace{1.24cm} h=\Omega.
\end{aligned}
\right.
\end{align}
Given that the Hamiltonian (\ref{eq:H}) is time-dependent,
$
\dot{\theta}=\varpi_{\textrm{E}}=2\pi/\textrm{sidereal day}$,
we supplement the dynamics with $1$-DoF\, given by the canonical conjugate variables
denoted $(\Gamma,\tau=\theta)$, with $\dot{\theta}=\dot{\tau}=\varpi_{\textrm{E}}$. Those variables
enter into the definition of $(I_{4},u_{4})$. The autonomous
dynamics (we still note $\mathcal{H}$ the new Hamiltonian) reads
\begin{align}\label{eq:Haut}
\mathcal{H}=\mathcal{H} + \varpi_{\textrm{E}}\Gamma.
\end{align}
The Hamiltonian (\ref{eq:Haut}) written in terms of the resonant coordinates (\ref{eq:ResCoord}) reduces to a 2-DoF\, system
as both $u_{3}$ and $u_{4}$ are ignorable. Consequently, their conjugate canonical actions, $I_{3}$ and $I_{4}$, are constant over time (\textit{i.e.,\ } parameters).
Note that when $\dot{u_{2}}=0$, the problem is a $1$-DoF\, problem and is therefore
trivially
integrable.
\subsubsection{The integrable approximation}
When $\dot{u_{2}}\neq0$, we derive
the resonant integrable approximation assuming that the resonances are isolated \cite{aMo02}. It amounts to take into account in (\ref{eq:H}), besides the action-only dependent part, the harmonic with the largest amplitude. For Molniya's orbital parameters, the numerical evaluations of the coefficients gives
\begin{align}
\left\{
\begin{aligned}
& \vert h_{2,0}\vert \sim 3 \, \vert h_{2,2}\vert, \notag \\
& \vert h_{2,0}\vert \sim 10^{3} \, \vert h_{2,-2}\vert.
\end{aligned}
\right.
\end{align}
The $1$-DoF\, approximation is therefore built on the one-harmonic Hamiltonian
\begin{align}\label{eq:1dofharmonic}
\tilde{\mathcal{H}}=\mathcal{H}_{0}+h_{2,0} \cos(u_{1}+2\lambda_{22}).
\end{align}
The resonance $\dot{u_{1}} =0$ (let us recall $u_{1}=2\theta-\ell -2h$), that we denote $\mathcal{R}_{u_{1}}$, occurs for
\begin{align}
\varpi_{0}(I_{1})=\partial_{I_{1}} \mathcal{H}_{0}=0.
\end{align}
Solving this equation in $I_{1}$ for $I_{2}, I_{3}$ determined by $\oe_{\mathcal{M}}$,
we find a resonant action $I_{1}^{\star}$ leading to the resonant semi-major axis
\begin{align}
a_{\star}(I_{1}^{\star})=26,555 \, \textrm{km}.
\end{align}
The orbits of (\ref{eq:1dofharmonic})
coincide with the set of level curves. Yet, as it will be clear in the subsequent sections,
the phase space is analogue to the classical pendulum dynamics.
Analytical characteristics of the resonance might be derived from a low-order Taylor expansion of the Hamiltonian near $I_{1}=I_{1}^{\star}$. By keeping only the
quadratic action term,
it reduces the Hamiltonian to
\begin{align}\label{eq:H1dofTaylor}
\tilde{\mathcal{H}}=\frac{1}{2}\alpha_{0}J_{1}^{2} + h_{2,0} \cos(u_{1}+2\lambda_{22}),
\end{align}
where $J_{1}=I_{1}-I_{1}^{\star}$ and
\begin{align}
\alpha_{0}=\partial^{2}_{I_{1}I_{1}}\mathcal{H}_{0}\vert_{I_{1}=I_{1}^{\star}}.
\end{align}
The equilibria are given by the solution of
\begin{align}\label{eq:vEq}
\left\{
\begin{aligned}
&\dot{J_{1}}=-\partial_{u_{1}}\tilde{\mathcal{H}}=h_{2,0}\sin(u_{1}+2\lambda_{22})=0, \\
&\dot{u_{1}}=\partial_{J_{1}}\tilde{\mathcal{H}}=\alpha_{0}J_{1}=0,
\end{aligned}
\right.
\end{align}
leading to two the equilibrium solutions
\begin{align}\label{eq:Eq}
\left\{
\begin{aligned}
&\bold{x}_{s}=(0,u_{s}=-2\lambda_{22})\simeq (0,3.66), \\ &\bold{x}_{u}=(0,u_{s}=\pi-2\lambda_{22}) \simeq (0,0.52).
\end{aligned}
\right.
\end{align}
The eigensystem of the Jacobian matrix associated to (\ref{eq:vEq}) evaluated at the equilibrium solutions (\ref{eq:Eq}) shows
that $\bold{x}_{s}$ is elliptic (stable fixed point) and $\bold{x}_{u}$ is a saddle (unstable fixed point), from which emanates the separatrix (curve associated to the energy level of the unstable equilibria). It also provides further temporal characteristic timescales.
The eigensystem of the Jacobian
evaluated at $\bold{x}_{s}$ provide the two complex conjugate eigenvalues $(\lambda_{s},\bar{\lambda}_{s})$ leading to
the characteristic
periods of libration in the harmonic regime
\begin{align}
T_{\textrm{lib.}}=\frac{2 \pi}{\vert \Im(\lambda_{s})\vert} \simeq 1.76 \, \textrm{years}.
\end{align}
The eigensystem of the Jacobian evaluated at $\bold{x}_{u}$ is composed by two real eigenvalues $(\lambda_{u},-\lambda_{u})$
defining the e-folding time
\begin{align}
T_{e} = 1/\vert \lambda_{u} \vert\simeq 0.28 \, \textrm{year}.
\end{align}
The resonance half-width $\Delta J_{1}$ associated to (\ref{eq:H1dofTaylor}), \textit{i.e.,\ } the distance between $J_{1}=0$ and the apex of the separatrix satisfies
\begin{align}
\tilde{\mathcal{H}}(\Delta J_{1},u_{s})=
\tilde{\mathcal{H}}(0,u_{u}),
\end{align}
that is
\begin{align}
\frac{1}{2}\alpha_{0}\Delta J_{1}^{2} +h_{2,0}=-h_{2,0}.
\end{align}
Solving the last equality for $\Delta J_{1}$, we find
\begin{align}
\Delta J_{1}= 2 \sqrt{\frac{\vert h_{2,0}\vert }{\vert \alpha_{0} \vert }} \leftrightarrow \Delta a = 27 \, \textrm{km},
\end{align}
where the reader is referred to Fig.\,\ref{fig:1dof} for further qualitative details.
\begin{figure}
\begin{center}
\includegraphics[width=0.6\linewidth]{fig1.png}
\end{center}
\caption{\label{fig:1dof}
Phase space of the resonant integrable approximation.
The width of the separatrix (red curve) allows
excursion of the semi-major axis up to $2\Delta a= 54$ km within the libration domain. The oscillations near the elliptic fixed-point (blue point) have a period of about $1.76$ years.
}
\end{figure}
\subsubsection{The $2$-DoF\, picture}\label{subsec:2dofGeo}
When $\dot{u_{2}} \neq 0$,
the energy function (\ref{eq:H}) defines a
$2$-DoF\, problem with
the
multiplet of three resonances
$\mathcal{R}_{u_{1}}, \mathcal{R}_{u_{1}+2g}, \mathcal{R}_{u_{1}-2g}$. Each isolated resonant problem admits its own pendulum reduction, with the possibility to overlap \cite{bCh79}.
Analytical insights might be gained by some simplifications. In fact, let us approximate (\ref{eq:H}) with the following $2$-DoF\, problem
\begin{align}\label{eq:K}
\mathcal{K} =
\frac{1}{2}\alpha_{0}J_{1}^{2}
+ \varpi_{g} \Gamma
+ h_{2,0} \cos (\phi)
+ h_{2,-2} \cos (\phi+2 \tau)
+ h_{2,2} \cos (\phi-2 \tau),
\end{align}
with $\phi=u_{1}+2\lambda_{22}$, where
we have assumed the rate of variation of $u_{2}=g$ to be ruled by the $\mathcal{H}_{J_{2}}$ part, that is
\begin{align}\label{eq:FreqJ2omega}
\left.
\dot{u_{2}}\equiv\varpi_{g}
=\frac{\partial \mathcal{H}_{J_{2}}}{\partial G}=
\frac{3}{4}r_{\textrm{E}}^{2}J_{2}\frac{\mu^{1/2}}{a^{7/2}}
\frac{5 \cos^{2}i -1}{(1-e^{2})^{2}}
\right|_{\oe_{\mathcal{M}}}.
\end{align}
Therefore, $u_{2}$ evolves linearly with time which we denote as
$\tau$.
Using the canonical equations, we
find the three resonances centers of
$
\mathcal{R}_{u_{1}},
\mathcal{R}_{u_{1}+2g},
\mathcal{R}_{u_{1}-2g}$
to be located
respectively at
\begin{align}\label{eq:center}
\left\{
\begin{aligned}
&c_{u_{1}}(J_{1})=0, \\
&c_{u_{1}+2g}(J_{1})=-2\varpi_{g}/\alpha_{0}, \\
&c_{u_{1}-2g}(J_{1})=2\varpi_{g}/\alpha_{0}.
\end{aligned}
\right.
\end{align}
The mutual distances of the center of the resonances with respect to the center of $\mathcal{R}_{u_{1}}$,
\begin{align}\label{eq:Distance}
\left\{
\begin{aligned}
&\delta(\mathcal{R}_{u_{1}},\mathcal{R}_{u_{1}+2g})=\vert c_{u_{1}} - c_{u_{1}+2g}\vert = 2 \vert \varpi_{g}/\alpha_{0} \vert , \\
&\delta(\mathcal{R}_{u_{1}},\mathcal{R}_{u_{1}-2g})=\vert c_{u_{1}} - c_{u_{1}-2g}\vert = 2 \vert \varpi_{g}/\alpha_{0}\vert ,
\end{aligned}
\right.
\end{align}
are small
given
that $i_{\mathcal{M}} \sim i_{\star}$,
where $5 \cos^{2} i_{\star} -1 =0$ (critical inclination value). The corresponding $\delta a$ amounts to be less than $1$ km.
Treated as isolated,
the resonances
$
\mathcal{R}_{u_{1}},
\mathcal{R}_{u_{1}+2g},
\mathcal{R}_{u_{1}-2g}$
have the respective half-widths
\begin{align}
\left\{
\begin{aligned}
&\Delta_{\mathcal{R}_{u_{1}}}J_{1} = 2\sqrt{\vert h_{2,0}\vert/\vert \alpha_{0}\vert}
\leftrightarrow \Delta_{\mathcal{R}_{u_{1}}} a =
27.5 \,
\textrm{km}, \\
&\Delta_{\mathcal{R}_{u_{1}+2g}}J_{1}
=
2\sqrt{\vert h_{2,2}
\vert/\vert \alpha_{0}\vert}
\leftrightarrow \Delta_{\mathcal{R}_{u_{1}+2g}} a
=14.4 \,
\textrm{km}
, \\
&\Delta_{\mathcal{R}_{u_{1}-2g}}J_{1} =2\sqrt{\vert h_{2,-2}
\vert/\vert \alpha_{0}\vert}
\leftrightarrow \Delta_{\mathcal{R}_{u_{1}-2g}}a
= 0.78 \,
\textrm{km}
.
\end{aligned}
\right.
\end{align}
As inferred from the numerical computation of $h_{2,-2}$, the resonance
$\mathcal{R}_{u_{1}-2g}$ is negligible for
practical purposes. Due to the inequalities
\begin{align}
\left\{
\begin{aligned}
\Delta_{\mathcal{R}_{u_{1}}} + \Delta_{\mathcal{R}_{u_{1}+2g}} \gg
\delta(\mathcal{R}_{u_{1}},\mathcal{R}_{u_{1}+2g}), \\
\Delta_{\mathcal{R}_{u_{1}}} + \Delta_{\mathcal{R}_{u_{1}-2g}} \gg
\delta(\mathcal{R}_{u_{1}},\mathcal{R}_{u_{1}-2g}),
\end{aligned}
\right.
\end{align}
a complete resonance overlap takes place (\textit{i.e.,\ } the resonances are strongly overlapped), by which is meant that the widths of the resonances (treated as isolated) are much larger than their mutual separations. This paradigm is encapsulated into an analogue of the so-called \textit{modulated pendulum approximation} (see \textit{e.g.,\ } \cite{aMo02}). From this analogy, we might infer the absence of large chaotic seas known to exist for similar eccentricity range but at lower inclination \cite{jDa15,tEl96}. Instead, we expect chaotic motions to appear only in the vicinity of the unperturbed separatrix \cite{aMo02,nMu97}, with a librational region filled by stable orbits. This fact is indeed corroborated by computing the Poincar\'e map.\\
\noindent \textbf{Stroboscopic map.}
The Hamiltonian (\ref{eq:K}) is a 1-DoF\, system periodically perturbed. Its phase space can be described by computing the associated Poincar\'e map, which is, given the periodic nature of the forcing, a stroboscopic mapping \cite{jMe92,sWi03}. Let us denote this mapping by $\mathcal{P}$ and by $\mathcal{V}(0)$ a neighborhood of $J_{1}=0$.
By defining the lift and projector operators respectively as
\begin{align}
\frak{l}: \mathcal{V}(0) \times [0,2\pi] &\to \mathcal{V}(0) \times B \times [0,2\pi]^{2}, \, B \subset \mathbb{R},\notag \\
z=(J_{1},u_{1}) &\mapsto \frak{l}(z)=\bold{x}=(J_{1},\Gamma,u_{1},\tau),
\end{align}
and
\begin{align}
\frak{p}: \mathcal{V}(0) \times B \times [0,2\pi]^{2} & \to \mathcal{V}(0) \times [0,2\pi], \notag \\
\bold{x}=(J_{1},\Gamma,u_{1},\tau) & \mapsto \frak{p}(\bold{x})=(J_{1},u_{1}),
\end{align}
the stroboscopic map is defined as
\begin{align}
\mathcal{P}: \mathcal{V}(0) \times [0,2\pi] & \to \mathcal{V}(0) \times [0,2\pi], \notag \\
z & \mapsto \mathcal{P}(z)=z'=
\frak{p}\circ \Phi^{T_{g}} \circ \frak{l}
(z),
\end{align}
where $\Phi^{t}$ is the flow at time $t$ associated to (\ref{eq:K}) and
$
T_{g} = 2\pi/\varpi_{g}.
$
Note that the lift is parameterised by the choice of $\tau(0)=g_{0}$. The ``dummy'' variable $\Gamma$ does not enter into the equations of motion.
For Molniya-like spacecraft, $T_{g}$ defines a period of about $100$ years (\textit{i.e.,\ } the order of $ 10^{4}$ orbital revolutions).
The mapping $\mathcal{P}$ is constructed numerically based on the numerical propagation of the system (\ref{eq:K}).
Given a value of $g_{0}$, the
coordinates of the fixed points of the mapping $\mathcal{P}$ (\textit{i.e.,\ } the periodic orbits of (\ref{eq:K})) are determined using a Newton method.
Due to the periodicity
\begin{align}
\mathcal{K}(J_{1},u_{1};\tau) = \mathcal{K}(J_{1},u_{1};\tau+\pi),
\end{align}
the domain of $g$ can be restricted to $[0,\pi]$.
Let us recall that a fixed point $z_{\star}$ of $\mathcal{P}$, $\mathcal{P}(z_{\star})=z_{\star}$, is hyperbolic when the linearisation has at least one eigenvalue with modulus greater than one. In case of complex eigenvalues, the fixed point is elliptic. For $g_{0}=0$, the two fixed points (semi-major axis given in km) read as
\begin{align}
\left\{
\begin{aligned}
&\bold{x}_{s}=(a,u_{1})=(26554.841,3.662), \\
&\bold{x}_{u}=(a,u_{1})=(26554.850,0.521).
\end{aligned}
\right.
\end{align}
Changing $g_{0}$ alters slightly those coordinates and the slope of the eigenvectors associated to the unstable periodic orbit, which may widen the aperture
of the librational domain
by a few kilometers.
The stable and unstable manifolds associated to an hyperbolic point $z_{\star}$,
\begin{align}
\left\{
\begin{aligned}
&\mathcal{W}^{s}(z_{\star})=\{z \, , \, \norm{\Phi^{t}(z)-z_{\star}} \to 0, \, t \to +\infty\}, \notag \\
&\mathcal{W}^{u}(z_{\star})=\{z \, , \, \norm{\Phi^{-t}(z)-z_{\star}} \to 0, \, t \to +\infty\},
\end{aligned}
\right.
\end{align}
are grown by iterating points belonging to the fundamental domain $I \subset E^{s,u}$, where $E^{s,u}$ are respectively the stable and unstable eigenspaces associated to $z_{\star}$ (and derived from the eigensystem analysis). Recall that
$\mathcal{W}^{s,u}$ are locally tangent to $E^{s,u}$.
In Fig.\,\ref{fig:section}, we show the Poincar\'e section containing a chaotic zone surrounding the ``unperturbed separatrix''. A smaller portion of the phase space shows the first lobes associated to the stable manifold.
The analysis of the eigensystem associated to the linearisation of $\mathcal{P}$ at the saddle fixed-point is
enlightening in deriving the Lyapunov timescale analytically.
Let us
recall that a Floquet characteristic exponent $\mu$ is a complex number satisfying
\begin{align}
\lambda = e^{\mu T_{g}},
\end{align}
where $\lambda$ is an eigenvalue associated to the linearisation $\textrm{D}\mathcal{P}$ about
the fixed point.
For the hyperbolic saddle, the two eigenvalues
$\{\lambda_{1},\lambda_{2}=1/\lambda_{1}\}$ are real
and so are the corresponding $\{\mu_{1},\mu_{2}\}$, called in this case the Lyapunov exponents.
From
\begin{align}
\mu = T_{g}^{-1} \log \lambda,
\end{align}
the timescale of $1/\mu \sim 17$ years
is derived for the largest eigenvalue. This timescale has been compared with a brute-force estimation of the maximal Lyapunov exponents $\chi$ based on the variational dynamics (and their associated Lyapunov time $\tau_{\mathcal{L}}=1/\chi$) in the vicinity of the hyperbolic saddle. For hyperbolic orbits, we found Lyapunov times in the range of $15-18$ years, thus in very good agreement with the analytical timescale based on D$\mathcal{P}$. \\
\noindent \textbf{Consequences of the chaotic layer.}
The presence of the thin chaotic layer surrounding the unperturbed separatrix brings important distinguishable qualitative features to the dynamics: the semi-major axis might display
intermittency phenomena and the resonant angle alternates between librational and circulational regimes.
We note that such features have been observed for
simulated geosynchronous orbits \cite{sBr05,iWy07}. More precisely, for initial conditions in the chaotic layer, the orbit ``swaps'' between the ``inner-libration'' regime, characterised by
\begin{align}
\langle J_{1}\rangle_{u_{1}}^{\textrm{lib.}} \simeq 0,
\end{align}
and the ``outer-circulation'' regime for which
\begin{align}
\langle J_{1}\rangle_{u_{1}}^{\textrm{circ.}} \not\simeq 0.
\end{align}
The alternation takes place when the orbit returns close enough to the hyperbolic saddle $\bold{x}_{u}$ where the scattering takes place.
\subsubsection*{Remark}
This mechanism is illustrated and summarised within the composite panel in Fig.\,\ref{fig:sketch} based on the Hamiltonian model
\begin{align}
\mathcal{T}=\frac{1}{2}\Lambda^{2}
+ \Lambda_{1} + \cos(\rho) + \cos(\rho+ \epsilon \rho_{1}), \epsilon \ll 1.
\end{align}
For $\epsilon=0$, $\mathcal{T}$ is integrable and has a saddle structure at $(\Lambda,\rho)=(0,\pi)$. The separatrix has a cat-eye topology with half-width
$\Delta = 2 \sqrt{2}$.
When $\epsilon \neq 0, \epsilon \ll 1$, the
resonances
$\mathcal{R}_{\rho}$ and
$\mathcal{R}_{\rho+ \epsilon \rho_{1}}$,
$\epsilon$-apart, produce a
separatrix splitting.
The resonant angle of an orbit with initial condition in the hyperbolic set alternates among libration,
$\langle \Lambda \rangle_{\rho} \simeq 0$,
and circulation,
$\langle \Lambda \rangle_{\rho} \not\simeq 0$. The ``projection'' of one orbit with initial condition close to the saddle (trapped in the hyperbolic tangle) in the space $(\Lambda,\rho)$ shows that the orbit remains mainly guided by the unperturbed separatrix.
Under our selected initial condition, when the angle circulates, the action
is trapped in the tangle, evolving here in the domain
$\mathbb{\Lambda}^{-}:=\{\Lambda, \, \Lambda<0\}$. When the angle librates, the action experiences full homoclinic loops and evolve within
$
\mathbb{\Lambda}=\mathbb{\Lambda}^{-}
\cup
\mathbb{\Lambda}^{+}$.
This process continues and possibly alternates in the vicinity of the saddle, producing scattering and contributing to the growth of the tangent vector.\\
\begin{figure}
\begin{center}
\includegraphics[width=0.9\linewidth]{fig2.png}
\caption{\label{fig:section}
(Left) Poincar\'e section associated to (\ref{eq:K})
computed for $g(0)=0$. The unstable fixed point is labeled with the red cross, the blue circle
surrounds the stable periodic orbit.
The phase space is similar to the integrable approximation but contains a thin chaotic layer (scattered erratic points) surrounding the unperturbed separatrix. Each considered initial condition has been iterated $100$ times under $\mathcal{P}$. (Right) Details of finite pieces of the stable manifold $\mathcal{W}^{s}(\bold{x}_{u})$.
}
\end{center}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{fig3.png}
\caption{\label{fig:sketch}
Composite plot illustrating the mechanisms of the intermittency phenomena. The
red line represents the separatrix of the integrable model $\mathcal{T}$. Realisations of the stable and unstable manifolds,
for $\epsilon \neq 0, \, \epsilon \ll 1$,
are not shown for the sake of readability. One hyperbolic orbit trapped in the hyperbolic tangle is highlighted in the phase space, with a color code depending on the regime of the resonant angle. When the resonant angle circulates
(grey color), the action
takes negative $\Lambda$'s.
When the angle librates
(black color), the action variable performs the full homoclinic loop and exhibit larger variations.
}
\end{figure}
\noindent \textbf{Limitations of the model $\mathcal{K}$.}
The model (\ref{eq:K}) is based on geopotential perturbations only.
To build a more realistic model, the lunisolar perturbations, Moon and Sun, need to be included. In its present form, model $\mathcal{K}$ is limited in two ways:
\begin{enumerate}
\item Under the lunisolar effects and due to the proximity to the critical inclination value, the hypothesis that the argument of the perigee $(g=u_{2})$ flows linearly with time at a (constant) rate given by the $J_{2}$ effect is violated (a fact also observed at the data level).
\item The assumption that both the eccentricity and inclination are parameters is no longer true under the influence of the lunisolar perturbation.
\end{enumerate}
Increasing the complexity of the model gradually, we overcome the first limitation by decoupling the equations of motions. We isolate a simplified energy function $\mathcal{L}$ that dictates the time evolution of the argument of perigee,
$\dot{g}=\partial_{G}\mathcal{L}$, that we use to form a $6$-dimensional dynamical system with constant eccentricity and inclination. The variables $(J_{1},u_{1})$ are then studied. The second limitation is raised by introducing a $3$-DoF\, Hamiltonian system, where both the eccentricity and inclination vary according to the dynamics.
\section{Secular Hamiltonian including lunisolar effects}\label{sec:LS}
\subsection{The doubly-averaged lunisolar Hamiltonian}
We adopt a simplified sub-model of the quadrupolar doubly-averaged formulation to model the external third-bodies perturbations. The quadrupolar approximation is commonly employed to study medium-Earth orbit dynamics and has already demonstrated its relevance (see \textit{e.g.,\ } \cite{iGk16,jDa18}). Starting from the Hamiltonians
\begin{align}
\left\{
\begin{aligned}
&\mathcal{H}_{\textrm{M}} =
-\frac{\mu_{\textrm{M}}}{r_{\textrm{M}}}
\Big(
\frac{r_{\textrm{M}}}{\norm{\bold{r}-\bold{r}_{\textrm{M}}}}
-
\frac{\bold{r}\cdot \bold{r}_{\textrm{M}}}{r_{\textrm{M}}^{2}}
\Big), \notag \\
&\mathcal{H}_{\textrm{S}} =
-\frac{\mu_{\textrm{S}}}{r_{\textrm{S}}}
\Big(
\frac{r_{\textrm{S}}}{\norm{\bold{r}-\bold{r}_{\textrm{S}}}}
-
\frac{\bold{r}\cdot \bold{r}_{\textrm{S}}}{r_{\textrm{S}}^{2}}
\Big),
\end{aligned}
\right.
\end{align}
where $\bold{r}_{\textrm{M}},\bold{r}_{\textrm{S}}$ denote the geocentric vectors of the Moon and the Sun, $r_{\textrm{M}},r_{\textrm{S}}$ the corresponding geocentric distances and $\mu_{\textrm{M}},\mu_{\textrm{S}}$ their respective gravitational parameters, a Legendre-like expansion of
$\mathcal{H}_{\textrm{M}}$ and
$\mathcal{H}_{\textrm{S}}$, truncated to $l=2$ (\textit{quadrupolar hypothesis}), and averaged over
the mean anomalies $(M,M_{\textrm{M}})$ and $(M,M_{\textrm{S}})$ respectively, defines the so-called doubly averaged third-body model.
This averaging is performed in closed form over the eccentricity. Contrarily to the inner-perturbative part (geopotential), it requires to use the differential relationship
\begin{align}
\textrm{d} M = (1 - e \cos E) \,\textrm{d} E,
\end{align}
coming from Kepler's equation ($E$ refers to the eccentric anomaly).
The double-averaging
\begin{align}
\left\{
\begin{aligned}
&\mathcal{H}_{\textrm{M}} = \frac{1}{(2\pi)^{2}}
\int_{0}^{2\pi}
\int_{0}^{2\pi}
\mathcal{H}_{\textrm{M}} \, \textrm{d} M \, \textrm{d} M_{\textrm{M}}
=
\frac{1}{(2\pi)^{2}}
\int_{0}^{2\pi}
\int_{0}^{2\pi}
\mathcal{H}_{\textrm{M}} (1 - e \cos E)
\frac{r_{\textrm{M}}^{2}}{a_{\textrm{M}}^{2}\sqrt{1-e_{\textrm{M}}^{2}}}\,
\textrm{d} E \,
\textrm{d} f_{\textrm{M}}, \notag \\
&\mathcal{H}_{\textrm{S}} = \frac{1}{(2\pi)^{2}}
\int_{0}^{2\pi}
\int_{0}^{2\pi}
\mathcal{H}_{\textrm{S}} \, \textrm{d} M \, \textrm{d} M_{\textrm{S}}
=
\frac{1}{(2\pi)^{2}}
\int_{0}^{2\pi}
\int_{0}^{2\pi}
\mathcal{H}_{\textrm{S}} (1 - e \cos E)
\frac{r_{\textrm{S}}^{2}}{a_{\textrm{S}}^{2}\sqrt{1-e_{\textrm{S}}^{2}}}\,
\textrm{d} E \,
\textrm{d} f_{\textrm{S}}, \notag
\end{aligned}
\right.
\end{align}
reduces $\mathcal{H}_{\textrm{M}}$ and $\mathcal{H}_{\textrm{S}}$ to an expansion of the form
\begin{align}
\left\{
\begin{aligned}
&\mathcal{H}_{\textrm{M}} = h_{0}^{\textrm{M}}(a,e,i) + \sum_{j} h_{j}^{\textrm{M}}(a,e,i) \cos \phi^{\textrm{M}}_{j}, \notag \\
&\mathcal{H}_{\textrm{S}} = h_{0}^{\textrm{S}}(a,e,i) +
\sum_{j} h_{j}^{\textrm{S}}(a,e,i) \cos \phi^{\textrm{S}}_{j},
\end{aligned}
\right.
\end{align}
where $\phi^{\textrm{M}}_{i}$ and $\phi^{\textrm{S}}_{j}$ are permitted linear combinations of
$(\omega,\Omega,\Omega_{\textrm{M}})$ and $(\omega,\Omega)$ respectively. Given that the angle $\Omega_{\textrm{M}}$ does not enter $\phi^{\textrm{S}}_{j}$, the summations are homogenised by introducing $\phi_{q}$, where
\begin{align}
\phi_{q} = q_{1} \omega + q_{2} \Omega + q_{3} \Omega_{\textrm{M}},
\end{align}
with the convention that $q_{3}=0$ for the permissible solar arguments.
The quadrupolar doubly-averaged lunisolar Hamiltonian reads therefore
\begin{align}\label{eq:HMS}
\mathcal{H}_{\textrm{M}\textrm{S}}
=
\mathcal{H}_{\textrm{M}} + \mathcal{H}_{\textrm{S}}
=
(h_{0}^{\textrm{M}}+h_{0}^{\textrm{S}}) +
\sum_{q \in \mathcal{Q}} (
h_{q}^{\textrm{M}}+h_{q}^{\textrm{S}}
) \cos \phi_{q},
\end{align}
with (under the quadrupolar assumption)
\begin{align}
\mathcal{Q}=
\{
q \in \mathbb{Z}^{3}_{\star} \, \vert \,
q_{1} \in \{-2,0,2\}, (q_{2},q_{3})
\in
\{-2,-1,0,1,2\}^{2}
\}.
\end{align}
For the sake of concision, let us denote $h_{j}^{\textrm{M}\textrm{S}}=h_{j}^{\textrm{M}}+h_{j}^{\textrm{S}}$.
The Hamiltonian (\ref{eq:HMS}) is in general non-autonomous as time enters through the ecliptic precession of the lunar node, well-approximated by the linear law (Moon's elements are referred to the ecliptic plane)
\begin{align}
\Omega_{\textrm{M}} \simeq \Omega_{\textrm{M}}(0) + \varpi_{\Omega_{\textrm{M}}} t,
\end{align}
where $2\pi/\vert \varpi_{\Omega_{\textrm{M}}}\vert$ defines a period of about $18.6$ years. The Moon's inclination to the ecliptic plane is set to $i_{\textrm{M}}=5^{\circ}15$. However, as we will see hereafter, the simplified model allowed by Molniya's parameters leads to a model independent of the argument of the Moon and, therefore, to an autonomous model.
\subsection{Model for the time evolution of $\omega$}
The so-called ``double resonance model'' employed in \cite{tlZh15} based on the lunisolar harmonics $\cos 2g$ and $\cos 2g\pm h$ have shown to provide a realistic model to capture the time evolution of the argument of perigee. They compared orbits generated using this model against TLEs data on several cases and were able to reproduce qualitatively the time evolution of the argument of perigee on several decades.
More recently, \cite{tTa20} advocated that the $\cos h$ term produces a significant contribution to the dynamics of $\omega$,
where the reader is referred to Appendix \ref{app:ForceModel} for further details.
We adopt the following $2$-DoF\, Hamiltonian system
\begin{align}\label{eq:L0}
\mathcal{L}(G,H,g,h)=
\mathcal{L}_{0}(G,H) +
\mathcal{L}_{1}(G,H,g,h),
\end{align}
where
\begin{align}
\left\{
\begin{aligned}
&\mathcal{L}_{0}=\mathcal{H}_{J_{2}}
+ h_{0}^{\textrm{M}\textrm{S}}, \notag \\
& \mathcal{L}_{1}=
h_{2g}^{\textrm{M}\textrm{S}} \cos(2g)
+ h_{2g+h}^{\textrm{M}\textrm{S}} \cos(2g+h)
+ h_{2g-h}^{\textrm{M}\textrm{S}} \cos(2g-h),
\end{aligned}
\right.
\end{align}
to model the time evolution of $\omega$. From the canonical equations derived from (\ref{eq:L0}), we derive the dynamics of $g$. The formal coefficients appearing in (\ref{eq:L0}), expressed using the Keplerian elements, are listed in
table \ref{tab:LunarSolar}. The terms $h_{0}^{\textrm{M}}$ and $h_{0}^{\textrm{S}}$ refer to the
action dependent only terms of $\mathcal{H}_{\textrm{M}}$ and $\mathcal{H}_{\textrm{S}}$ and read
\begin{align}
\left\{
\begin{aligned}
&h_{0}^{\textrm{M}}=\frac{\mu_{\textrm{M}}a^{2}(3e^{2}+2)
(3\sin^{2}i-2)(3\sin^{2}\varepsilon-2)(3\sin^{2}i_{\textrm{M}}-2)}{64a_{\textrm{M}}^{3}\eta_{\textrm{M}}^{3}}\\ \notag
&h_{0}^{\textrm{S}}=-\frac{\mu_{\textrm{S}}a^{2}(3e^{2}+2)
(3\sin^{2}i-2)(3\sin^{2}\varepsilon-2)}{32a_{\textrm{S}}^{3}\eta_{\textrm{S}}^{3}}.
\end{aligned}
\right.
\end{align}
\begin{table}
\begin{minipage}{.45\textwidth}
\begin{tabular}{cc}
\hline
\hline
$h_{\sigma}^{\textrm{M}}(a,e,i)$ & $\sigma$ \\
\hline
\hline
& \\
$-\frac{15 \mu_{\textrm{M}}a^{2}e^{2}\sin^{2}i (3 \sin^{2}\varepsilon-2)(3\sin^{2}i_{\textrm{M}}-2)}{64 a_{\textrm{M}}^{3}\eta_{\textrm{M}}^{3}}$ & $2g$ \\
& \\
$-\frac{15 \mu_{\textrm{M}} a^{2}e^{2}(\cos i +1) \cos \varepsilon \sin i \sin \varepsilon(3 \sin^{2} i_{\textrm{M}}-2)}{32 a_{\textrm{M}}^{3}\eta_{\textrm{M}}^{3}}$ & $2g+h$ \\
& \\
$-\frac{15 \mu_{\textrm{M}} a^{2}e^{2}(\cos i -1) \cos \varepsilon \sin i \sin \varepsilon(3 \sin^{2} i_{\textrm{M}}-2)}{32 a_{\textrm{M}}^{3}\eta_{\textrm{M}}^{3}}$ & $2g-h$ \\
& \\
$\frac{3 \mu_{\textrm{M}} a^{2}(3e^{2}+2)
\cos i \cos \varepsilon
\sin i \sin \varepsilon (3 \sin^{2} i_{\textrm{M}}-2)}{16 a_{\textrm{M}}^{3}\eta_{\textrm{M}}^{3}}$ & $h$
\end{tabular}
\end{minipage}
\hspace{1cm}
\begin{minipage}{.45\textwidth}
\begin{tabular}{cc}
\hline
\hline
$h_{\sigma}^{\textrm{S}}(a,e,i)$ & $\sigma$ \\
\hline
\hline
& \\
$\frac{15 \mu_{\textrm{S}}a^{2}e^{2}\sin^{2}i (3 \sin^{2}\varepsilon-2)}{32 a_{\textrm{S}}^{3}\eta_{\textrm{S}}^{3}}$ & $2g$ \\
& \\
$\frac{15 \mu_{\textrm{S}}a^{2}e^{2}(\cos i +1) \cos \varepsilon \sin i \sin \varepsilon}{16 a_{\textrm{S}}^{3}\eta_{\textrm{S}}^{3}}$ & $2g+h$ \\
& \\
$\frac{15 \mu_{\textrm{S}}a^{2}e^{2}(\cos i -1) \cos \varepsilon \sin i \sin \varepsilon}{16 a_{\textrm{S}}^{3}\eta_{\textrm{S}}^{3}}$ & $2g-h$ \\
& \\
$\frac{-3 \mu_{\textrm{S}} a^{2}(3e^{2}+2)
\cos i \cos \varepsilon
\sin i \sin \varepsilon}{8 a_{\textrm{S}}^{3}\eta_{\textrm{S}}^{3}}$ & $h$
\end{tabular}
\end{minipage}
\caption{\label{tab:LunarSolar}Formal expression of the lunar and solar coefficients associated to the harmonics $2g$, $2g \pm h$ and $h$. The obliquity of the ecliptic with respect to the equatorial plane is $\varepsilon=23^{\circ}44$. The quantity $i_{\textrm{M}}$ refers to the inclination of the Moon with respect to the ecliptic plane, $i_{\textrm{M}}=5^{\circ}15$.}
\end{table}
\subsection{Effects of lunisolar perturbation on the tesseral dynamics}
We investigate now how the lunisolar perturbation affects the hyperbolic structures of the tesseral problem for Molniya parameters.
The basic model dictating the time evolution of $g$ being established by (\ref{eq:L0}), we focus now on two dynamical systems improving the caveats of (\ref{eq:K}):
\begin{enumerate}
\item First, we introduce the differential system in $\mathbb{R}^{6}$ defined by the equations of motion (EoM):
\begin{align}\label{eq:modelJ}
\left\{
\begin{aligned}
&\dot{J}_{1}=-\partial_{u_{1}}\mathcal{J}(J_{1},u_{1},g), \\
&\dot{u}_{1}=\partial_{J_{1}}\mathcal{J}(J_{1},u_{1},g), \\
&\dot{G}=-\partial_{g}\mathcal{L}(G,H,g,h), \\
&\dot{g}=\partial_{G}\mathcal{L}(G,H,g,h),\\
&\dot{H}=-\partial_{h}\mathcal{L}(G,H,g,h),\\
&\dot{h}=\partial_{H}\mathcal{L}(G,H,g,h).
\end{aligned}
\right.
\end{align}
where $\mathcal{J}$ is defined as,
\begin{align}
\mathcal{J}(J_{1},u_{1},g(t))=\frac{1}{2}\alpha_{0}J_{1}^{2} + \mathcal{T}_{2}(u_{1},g(t)).
\end{align}
Here $\mathcal{L}$ is the basic lunisolar Hamiltonian function. For short, we refer to the EoM (\ref{eq:modelJ}) as model $\mathcal{J}$
and we denote the right-hand side by $v_{\mathcal{J}}$.
\item Second, we consider the $3$-DoF\, Hamiltonian
\begin{align}\label{eq:S}
\mathcal{S}(I_{1},I_{2},I_{3},
u_{1},u_{2},u_{3})=\mathcal{H}_{\textrm{kep.}}(L) + \varpi_{\textrm{E}} \Gamma + \mathcal{T}_{2}(L,G,H,u_{1},g) + \mathcal{L}(G,H,g,h),
\end{align}
expressed within the resonant coordinates. With respect to the model $\mathcal{J}$, model $\mathcal{S}$ allows the action-terms to evolve under the correct dynamics. In particular, the tesseral coefficients $h_{2,0}(a,e,i)$, $h_{2,\pm2}(a,e,i)$ appearing in the dynamics of
$(I_{1},u_{1})$
are no longer frozen (instead, they vary according to the changes of the Delaunay action vector $(L,G,H)$). The right-hand side derived from $\mathcal{S}$ is denoted $v_{\mathcal{S}}$.
\end{enumerate}
Let us emphasise that both models are $\pi$-periodic in $g$. Molniya spacecraft have, in general, $g\sim 270^{\circ} \pm 20^{\circ}$.
For both models, in order to reveal the dynamical template
on
the $(I_{1},u_{1})$-plane, we compute the Fast Lyapunov Indicators \cite{mGu14,eLe16}
on a
$500 \times 500$ Cartesian mesh of initial conditions.
We use the following definition of the FLI.
For an $n$-dimensional autonomous ordinary differential system defined on a open domain $D \subset \mathbb{R}^{n}$,
$\dot{x}=f(x)$, the FLI at time $t$ is derived
from the linear map $\textrm{D}_{x}f$ at a point $x$:
\begin{align}
\textrm{D}_{x}f: \, &\mathbb{R}^{n} \to \mathbb{R}^{n}, \notag \\
&w \mapsto \textrm{D}_{x}f(x)w,
\end{align}
and the associated variational equations
\begin{align}
\left\{
\begin{aligned}
& \dot{x}=f(x), \\
& \dot{w}= \textrm{D}_{x}f(x)w,
\end{aligned}
\right.
\end{align}
as
\begin{align}\label{eq:FLI}
\textrm{FLI}(t) = \sup_{0 \le \tau \le t} \log(\norm{w(\tau)}).
\end{align}
The vector $w \in \mathbb{R}^{n}$ denotes the tangent
(or deviation) vector. The computation of the FLIs over resolved grid of initial conditions discriminates efficiently the structures of a given dynamical system, including the stable or unstable manifolds, ordered or chaotic seas. One advantage of the FLI over the characteristic Lyapunov exponent
\begin{align}
\lambda(x,w) = \lim_{t \to +\infty}
\frac{1}{t} \log(\norm{w(t)}),
\end{align}
is to get rid of the time-average computation, thus speeding the stability determination process.
For regular orbits, the deviation vector grows linearly with time and therefore the FLI on regular KAM tori are characterised by values close to $\log(\tau_{f})$. In hyperbolic regions, the norm of the tangent vector grows exponentially fast, and therefore the FLI display a linear trend surpassing quickly the value taken on KAM objects (see \cite{dBe05}, chapter $5$, for perturbative estimates).
\subsubsection*{Remark}
The parametric dependence
on $t$ in (\ref{eq:FLI}) is raised after
a calibration procedure. In our case, integration of several single orbits showed that $\tau_{f}=20$ years are sufficient to obtain a sharp distinction.
With our choice of units, the FLI of regular orbits is characterised by the value
$\log(\tau_{f})=4.99$.
\subsubsection*{Remark}
We restricted the computations of the FLIs over $\Sigma$
forward in time, \textit{i.e.,\ } on a time interval $[0,\tau_{f}]$, $\tau_{f}>0$, to obtain ``positive in time FLIs'',
$\textrm{FLIs}^{+}$. It is therefore understood that, in the context of the existence of hyperbolic invariants, these computations on $\Sigma$ would reveal the trace of the stable manifolds.
Similarly, backwards in time FLIs computed over $[-\tau_{f},0]$, $\textrm{FLIs}^{-}$,
would reveal the trace of the unstable
manifolds. Both manifolds can be displayed on $\Sigma$ by plotting, \textit{e.g.,\ } the standard average
\begin{align}
\textrm{FLI}=\frac{1}{2}(
\textrm{FLI}^{+}+\textrm{FLI}^{-}),
\end{align}
or any others weighted average (see \textit{e.g.,\ } \cite{mGu14,eLe16}). We computed a few of those maps backwards in time, to display the averaged FLI. However, because we are not particularly interested of highlighting homoclinic connections, we present hereafter only the forward in time FLI maps (\textit{i.e.,\ } we display $\textrm{FLI}^{+}$).\\
The FLIs computation are performed for the vector fields $v_{\mathcal{J}}$ and $v_{\mathcal{S}}$
over a Cartesian discretisation of $\Sigma \subset \mathbb{R}^{2}$, where
\begin{align}
\Sigma_{i_{0}} =
\big\{
(I_{1},I_{2},I_{3},u_{1},u_{2},u_{3}):
(I_{1},u_{1}) \in D,
u_{2}=270^{\circ},
u_{3}=0,
I_{2}=0.7,
I_{3}(i_{0})=H_{\star}-2L_{\star}
\big\},
\end{align}
with
\begin{align}
D = \mathcal{V}(I_{1}^{\star}) \times T, \quad T \subset [0,2\pi],
\end{align}
and an initial deviation vector $w_{0}$ chosen arbitrarily\footnote{Instead of choosing a random vector $w_{0}$, we could have computed the FLIs over a basis of the tangent space. However, to avoid spurious structures, this refinement is not pursued herein.}.
The neighborhood of the resonant action $\mathcal{V}(I_{1}^{\star})$ represents typically a range of $70$ km in the semi-major axis.
Our numerical campaign is parametric through $4$ allowed values of $i_{0}$, namely
\begin{align}
i_{0}\in\{62.5^{\circ}, 63.4^{\circ}, 64.3^{\circ},65.2^{\circ}\},
\end{align}
``piercing'' the critical inclination value. This choice enters $\Sigma_{i_{0}}$ through
\begin{align}
I_{3}(i_{0}) = L_{\star} \sqrt{1-e^{2}}
\cos i_{0} - 2 L_{\star}, \quad e=0.7.
\end{align}
Although aware that the precise geometry of the hyperbolic structures depend on the initial phasing $(\omega,\Omega)$, our investigations focus on $(\omega,\Omega)=(270^{\circ},0)$.
All the resulting maps of this numerical survey for models $\mathcal{J}$ and $\mathcal{S}$ are reported in Appendix \ref{app:maps} to ease the readability. We show hereafter in composite panels only the relevant information for the analysis. From this survey, we observe that:
\begin{enumerate}
\item Both models display a saddle-like point in $\Sigma$. This suggests the existence of an unstable periodic orbit (although this invariant has not been computed) for both flows, similar to the unstable periodic orbit we computed for model $\mathcal{K}$.
Following this idea, the hyperbolic set (high values of FLIs with yellow color) emerging from the saddle-type structure is very likely to represent the intersections of the stable manifold of the hyperbolic invariant with $\Sigma$. The fine mesh of initial conditions allows to recognise lobes distinctively for model $\mathcal{S}$.
\item The model $\mathcal{J}$ is overall weakly perturbed, and the hyperbolic layer is very close to the unperturbed separatrix.
\item On the contrary, the hyperbolic layer of $\mathcal{S}$ is much more developed.
This fact is imputable to the indirect modulation of the coefficients $h_{2,0}(a,e,i)$ and $h_{2,\pm2}(a,e,i)$ under the lunisolar effects. We therefore see the signature of the lunisolar coupling onto the tesseral problem.
\item In general, the width of the hyperbolic layer along a given line of $u_{1}$ increases with the values of $i_{0}$. For $u_{1}$ within the stable librational domain (say $u_{1} \sim 3.6$), the
hyperbolic width along the line is about $1$ km large in the semi-major axis ($i_{0}=62.5^{\circ}$) up to $\sim 6$ km large when $i_{0}=65.2^{\circ}$. For $u_{1}$ near the saddle, for the same inclination values, the hyperbolic layer foliates a width of about $10$ km in the semi-major axis for $i_{0}=62.5^{\circ}$ and up to $30$ km when $i_{0}=65.2^{\circ}$.
\item Lastly, and more will be commented on that in the following, we notice a growing asymmetry of the hyperbolic layer for increasing values of $i_{0}$. At $i_{0}=65.2^{\circ}$, the hyperbolic layer is clearly more developed for the lower range of semi-major axis.
\end{enumerate}
The dynamics associated to the hyperbolic layer of
model $\mathcal{S}$ is similar to model $\mathcal{T}$ apart that the coefficients of the respective resonances are slowly modulated in time.
This is exemplified for two orbits in the composite panel of Fig.\,\ref{fig:panel}, together with macro and micro views of the phase space structures.
The orbit immersed within the stable region displays oscillations, whilst the orbit trapped into the hyperbolic layer displays the characteristic intermittency.
Let us underline that the hyperbolic orbit, on the $20$ year timescale, displays U-turns (\textit{i.e.,\ } the alternation between libration and circulation regimes of the resonant angle $u_{1}$) always directed towards lower semi-major axis, with a timescale of about $1.5$ year. The full homoclinic loop takes about $3$ years.
We integrated the same orbit on a time interval $10$ times larger and we noticed the unevenly distribution between upper and lower U-turns, the latter being more frequent.
This property is clearly inferred from the thorough inspection and detailed geometry of the hyperbolic foldings near the saddle-like structure. The close-up view of the FLI map (see the magnified region materialised by the green box, Fig.\,\ref{fig:panel}) reveals more foldings in the lower part of the chart. Increasing the parametric value of $i_{0}$ makes this property even sharper, as shown in the maps provided in Appendix \ref{app:maps}. The asymmetry of the foldings emerges from the fact that
\begin{align}
\delta(i_{0}) = \frac{\vert h_{2,0}(a,e,i)\vert}{\vert h_{2,2}(a,e,i)\vert},
\end{align}
becomes larger along a solution
$\bold{x}(t)=
\big(a(t),e(t),i(t))
\big)$ for initial conditions near $\bold{x}_{u}$.
The layer's dependence upon $\omega_{0}$, for model $\mathcal{S}$, is shown for the fixed value of $u_{1}=3.6$ in the last map of the composite plot of Fig.\,\ref{fig:panel} (bottom right). It reveals a much wider width (roughly speaking on the order of $10$ km in the semi-major axis) for $\omega \in [\pi,3\pi/2]$, with petals structures.
For $\omega \in [3\pi/2,\pi]$,
the hyperbolic structure is much simpler to apprehend.
For Molniya's typical variation of
$\omega \sim 270^{\circ}\pm 20^{\circ}$, this corresponds to the rectangle
materialized with white dashed lines.
\begin{figure}
\centering
\includegraphics[width=1\textwidth]{fig4.png}
\caption{\label{fig:panel}
Composite plot highlighting the main features of Molniya semi-major axis dynamics. The global FLI map and a magnified portion near the saddle-like structure detail the hyperbolic structure. Initial conditions within the hyperbolic layer display intermittency phenomena, whilst stable orbits display regular oscillations. This is exemplified for two orbits whose initial conditions are labeled with the white stars.
The width of the layer, for a fixed $u_{1}$ but varying $\omega$, might exhibit a complex geometry. For Molniya's prototypical range of values of $\omega$, materialised by the white shaded-line region around $\omega=270^{\circ}$, the width is limited to a few kilometer in the semi-major axis only. See text for details.
}
\label{fig:panel}
\end{figure}
\section{Connections and links with the dynamics of Molniya 1-69 and Molniya 1-87}\label{sec:TLE}
On inspecting the extracted semi-major axis using
Molniya 1-69 and Molniya 1-87 TLE data, we notice that they display intermittency phenomena on their semi-major axis\footnote{
We extracted the mean semi-major axis (in the sense of the underlying \texttt{SGP4} theory) from the TLEs by following the ``un-Kozai'' mean-motion procedure (one step iterative method) presented in \cite{fHo80}, section $6$. See also \cite{dVa08}, Eq. (7) or \cite{fHo04}, appendix B, section A.}
as repeated in Fig.\,\ref{fig:tle69} and Fig.\,\ref{fig:tle87}. The figures also incorporate the time evolution of the resonant angle $u_{1}$. The relevant part of the data, in the light of the oscillating models previously derived, cover in both cases at least $2$ decades. Both data contain a transitory period, possibly remnants of unknown manoeuvres. For Molniya 1-87, after the epoch corresponding to mean Julian day (MJD) of $5.7 \times 10^{4}$, the satellite experienced a significant semi-major axis reduction. We will not pay attention to this part of the data. In the exploitable window, the resonant signature, consisting of alternation between libration and circulation, is well-marked and in accordance with the U-turns intermittent semi-major axis variations.
In both cases, the intermittency U-turns take place for $a \sim 26,550$ km, compatible with the locations of the hyperbolic foldings we located with model $\mathcal{S}$ close to the saddle.
It is worth mentioning that Molniya 1-69 has been left untouched in \cite{tlZh15}, as judged to ``locate in the vicinity of this separatrix''. Below, we give more credit to this claim, and we show that it is also the case for its cousin Molniya 1-87.
At the light of the dynamical mechanisms presented in section \ref{sec:LS} and the fingerprints just described, it is tempting to say that both satellites evolve within the hyperbolic layer. To give more weight to this claim, we performed the following steps:
\begin{enumerate}
\item At epochs $t_{\star}$ corresponding to the apex of the first U-turns, we extract from the TLEs the corresponding orbital parameters and we record the values of $(a^{\star},u_{1}^{\star})$. For case Molniya 1-69, we selected $t_{\star}=50,418.06$ (MJD), leading to the ``instantaneous'' elements
\begin{align}
\left\{
\begin{aligned}
& a=26,553.63 \, \textrm{km},
\hspace{0.44cm} u_{1}=0.5257, \\
& e=0.67633, \hspace{1.44cm} \omega=269^{\circ}95, \\
& i=64^{\circ}2544, \hspace{1.4cm} \Omega=249^{\circ}68.
\end{aligned}
\right.
\end{align}
For Molniya 1-87, we selected $t_{\star}=53,433.24$ (MJD), for which the sets of computed elements reads
\begin{align}
\left\{
\begin{aligned}
& a=26,550.06 \, \textrm{km},
\hspace{0.44cm} u_{1}=0.4749, \\
& e=0.6582, \hspace{1.58cm} \omega=262^{\circ}68, \\
& i=64^{\circ}1995, \hspace{1.4cm} \Omega=223^{\circ}01.
\end{aligned}
\right.
\end{align}
\item We compute the dynamical maps
with the FLIs for the vector field $v_{\mathcal{S}}$, using as parameters and phasing for the section
$\Sigma$ those extracted from the respective TLE at epoch $t_{\star}$.
\item On the obtained dynamical maps, the points of coordinates $\big(a(t_{\star}),u_{1}(t_{\star})\big)$ are spotted.
\end{enumerate}
The obtained dynamics maps shown in Fig.\,\ref{fig:TLEMAP} convincingly demonstrate that the satellites reside within the hyperbolic tangle.
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{fig5.png}
\caption{Time history of the semi-major axis
and resonant angle $u_{1}$
extracted from the TLE data for the satellite Molniya 1-69.}
\label{fig:tle69}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{fig6.png}
\caption{Time history of the semi-major axis
and resonant angle $u_{1}$
extracted from the TLE data for the satellite Molniya 1-87}
\label{fig:tle87}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{fig9.png}
\caption{Dynamical maps for Molniya 1-69 and Molniya 1-87. The locations of Molniya 1-69 and Molniya 1-87 are marked through the black circle. Both satellites reside within the hyperbolic tangle.}
\label{fig:TLEMAP}
\end{figure}
\section{Conclusions}
The constructed dynamical models and their analysis allowed us to deepen the understanding
of Molniya's semi-major axis dynamics.
The hyperbolic structures organising the phase space
have been portrayed via variational indicators through a series of compact, tractable and realistic secular models. The effect of lunisolar perturbations, on the $20$ years timescale, needs to be taken into account to reconstruct the correct dynamical template.
In fact, the induced modulations of the eccentricity and inclination contribute sufficiently to change the ``parameters'' of the tesseral problem; the coefficients we denoted by $h_{2,0}$ and $h_{2,\pm 2}$.
We connected the $20$ year long fingerprints of two satellites, Molniya 1-69 and Molniya 1-87, with the hyperbolic layer surrounding the unperturbed cat-eye separatrix. This hyperbolic layer, in absence of lunisolar perturbations, would be too thin to sustain the dynamical signatures visible at the publicly available data level.
By computing their associated dynamical maps,
we provided evidence that the two satellites are trapped within the hyperbolic tangle. The secular
dynamics umbrella provided a reliable and robust mold
to approach and explain the semi-major axis patterns extracted from the TLE space datasets.
As far as we are aware, this result is
the first report of long time scale hyperbolicity corroborated by pseudo-observations in the near-Earth space environment. The mechanisms and tools depicted in this contribution have relevance for other dynamical regions, most notably for the geosynchronous altitude where
similar patterns have been observed on simulated orbits \cite{sBr05,iWy07,sPr21}.
\section*{Acknowledgments}
J.D. is a postdoctoral researcher of the ``Fonds de la Recherche Scientifique'' - FNRS.
J.D. acknowledges discussions with Florent Deleflie, Denis Hautesseres, Alexis Petit
and David Vallado about the TLEs data, and discussions that have followed from the CNES \textsc{COMET-ORB} workshop on ``Uncertainty Quantification in Orbit Propagation'', Feb. $9-10$, $2021$. J.D. and A.L. acknowledge several discussions with Alessandra Celletti and C\u{a}t\u{a}lin Gale\c{s} on the resonant potential.
J.D. acknowledges discussions with Ioannis Gkolias on the $J_{2}^{2}$ effect and useful references provided. J.D. acknowledges several discussions all along this research with Aaron Rosengren.
\section*{Conflict of interest}
The authors declare that they have no conflict of
interest.
\newpage
\bibliographystyle{plain}
|
\section{Introduction}
Visual image sensors, e.g., digital cameras, have become an important
component to many autonomous and semi-autonomous navigational systems.
In many of these contexts, image processing algorithms process sensed
images to generate autonomous odometry estimates for the vehicle;
referred to as visual odometry. Early work on visual odometry dates
back more than 20 years and applications of this approach are pervasive
in commercial, governmental and military navigation systems. Algorithms
for visual odometry compute the change in pose, i.e., position and
orientation, of the robot as a function of observed changes in sequential
images. As such, visual odometry estimates allow vehicles to autonomously
track their position for mapping, localization or both of these tasks
simultaneously, i.e., the Simultaneous Localization and Mapping (SLAM)
applications. The small form factor, low power consumption and powerful
imaging capabilities of imaging sensors make them an attractive as
a source of odometry in GPS-denied contexts and for ground-based,
underground, indoor and near ground navigation.
While visual odometry using conventional digital cameras is a classical
topic, recent introduction of commercial sensors that capture both
color (RGB) images and depth (D) simultaneously, referred to as RGBD
sensors, has created significant interest for their potential application
for autonomous 3D mapping and odometry. These sensors capture color-attributed
$(X,Y,Z)$ surface data at ranges up to 6m. from a 58.5H x 46.6V degree
field of view. The angular resolution of the sensor is \textasciitilde{}5
pixels per degree and sensed images are generated at rates up to 30
Hz.
As in other visual odometry approaches, RGBD-based odometry methods
solve for the motion of the camera, referred to as ego-motion, using
data from a time-sequence of sensed images. When the geometric relationship
between the camera and vehicle body frame is known, estimated camera
motions also serve as estimates for vehicle odometry.
Algorithms that compute odometry from RGBD images typically match
corresponding 3D $(X,Y,Z)$ surface measurements obtained from sequential
frames of sensed RGBD image data. Since the image data is measured
with respect to the camera coordinate system, camera motions induce
changes in the $(X,Y,Z)$ surface coordinates of stationary objects
in the camera view. The transformation that aligns corresponding $(X,Y,Z)$
measurements in two frames indicates how the camera orientation and
position changed between these frames which, as mentioned previously,
also specifies vehicle odometry.
While several methods for RGBD odometry estimation exist in the literature,
published work on this topic lacks sensitivity to the larger issue
of integrating RGBD odometry estimates into autonomous navigation
systems. Researchers and practitioners acknowledge that visual odometry
can provide highly inaccurate odometry estimates; especially when
incorrect correspondences are computed. As shown in Fig. \ref{fig:Processing-pipeline},
navigation systems cope with this issue by adding odometry sensors
in the form of wheel-based odometry (ground vehicles) or Inertial
Measurement Units (IMUs) (aerial vehicles) and subsequently fusing
this data into a 3D state estimate for the vehicle. Fused state estimates
are typically produced by filtering sensor data using an Extended
Kalman Filter (EKF) \cite{MooreStouchKeneralizedEkf2014} or particle
filter. Regardless of the filter type, fused-state estimation requires
uncertainty estimates for each sensor measurement that, for an EKF,
re-weight the measurements by attributing values having low uncertainty
larger weight than other values. As such, navigational systems that
seek to leverage RGBD odometry \emph{require }uncertainty estimates
for these parameters.
For EKF-based navigation systems, absence of the RGBD odometry parameter
covariance implies that these systems include hand-specified or ad-hoc
estimates for the covariance of these parameters. For example, one
potential approach in this context is to assume a worst-case covariance
for the translational and orientation parameters via a user-specified
constant-valued diagonal covariance matrix. Yet, without means for
outlier rejection, artificially large covariances must be assumed
to cope with the possibility of potentially inaccurate RGBD odometry
parameters. When outlier rejection is applied, ad-hoc methods must
be used that dynamically change the parameter covariances which artificially
adjusts the weight of RGBD odometry estimates. While such ad-hoc approaches
may be more effective in leveraging RGBD odometry values, the artificially
chosen covariances do not characterize the true parameter uncertainty.
As a result, even sophisticated ad-hoc methods will significantly
limit the beneficial impact that RGBD odometry can have for system
navigation.
\emph{The key contribution of this article on RGBD odometry is that
it provides both an odometry estimate and a covariance for the odometry
parameters in real-time via a representative covariance matrix.} This
article proposes a statistical perturbation-based approach based on
observed RGBD measurement noise to compute the parameter covariance
estimates essential for efficiently leveraging estimated RGBD odometry
values in navigation systems. Results discuss the accuracy of our
RGBD odometry approach with respect to ground truth obtained from
a motion capture system and characterizes the suitability of this
approach for estimating the true RGBD odometry parameter uncertainty.
This article is divided into six sections as follows: \S~\ref{sec:Prior-Work}
discusses prior work on RGBD odometry related to this article, \S~\ref{sec:Background-Information}
discusses background information critical to the explanation of the
odometry algorithm, \S~\ref{sec:Methodology} discusses the RGBD
odometry and covariance parameter estimation algorithm, \S~\ref{sec:Results}
presents results for experimental odometry parameter and covariance
estimation and performance of the odometry estimation algorithm versus
ground truth data obtained via motion capture, \S~\ref{sec:Conclusion}
summarizes the impact of this work and discusses aspects of this work
that motivate future research.
\begin{figure}
\noindent \begin{centering}
\includegraphics[height=2.3in]{figs/rl2}
\par\end{centering}
\caption{\label{fig:Processing-pipeline}A typical fused-state estimator described
in \cite{MooreStouchKeneralizedEkf2014} is shown. Fused-state navigation
systems integrate visual odometry, e.g., RGBD odometry, with odometry
from sensors such as IMUs, GPS, and wheel odometry to provide a single
3D state estimate for the vehicle. Accurate fused-state estimation
relies heavily on knowledge of uncertainty in each sensor measurement
to determine the best possible state estimate. This article introduces
an RGBD odometry algorithm that provides both odometry values and
uncertainties for the estimated odometry values which are critical
to this important application.}
\end{figure}
\section{\label{sec:Prior-Work}Prior Work}
Since the commercial introduction of RGBD sensors, researchers have
been developing methods to leverage the additional depth data to improve
state-of-the-art for navigation and mapping. We touch on the most
popular approaches for RGBD odometry here which
In \cite{6225151} authors compute odometry from RGBD images by expediting
the ICP algorithm \cite{121791}. Their approach computes and matches
edges from the RGB data in sequential frames to quickly find matching
3D points from the depth image. The depth images are then aligned
by aligning 3D points at edge locations and uses the resulting transform
as an initial guess to accelerate the convergence of the computationally-costly
generalized ICP algorithm, \cite{Segal-RSS-09}, which solves for
the final estimate using a point-to-plane error metric.
In \cite{7139931} a MAV is navigated in dark environments using 6DoF
localization provided by fusing a fast odometry algorithm and generalizing
a ground-based Monte Carlo Localization approach \cite{Thrun:2005:PR:1121596}
for their 6DoF MAV application. Real-time odometry is obtained by
expressing the relative pose estimation problem as a differential
equation on each 3D point that models the change in the 3D point location
as a function of the changing pose parameters. The approach is made
real-time by sub-sampling the image data which reduces the full-frame
(640x480) image to a much smaller (80x60) image for processing.
In \cite{6696650} a warping function is used to map pixels in sequential
RGBD images. The warping function combines an appearance model with
a depth/geometric model to solve for the transformation parameters
that minimize the differences between measured RGB colors and depths
in the warped/aligned RGBD images.
While each of the approaches above for RGBD odometry have different
strengths and weaknesses, they all suffer from a lack of consideration
of the parameter uncertainty. As mentioned in the introduction, no
visual odometry approach has been demonstrated to be completely free
of incorrect odometry estimates.\emph{ As such, regardless of the
sophistication and accuracy of the approach, it is critical to provide
uncertainty measures for RGBD odometry estimates.} Absence of this
information severely limits the utility of this information for its
primary purpose: as a component to a fused-state navigational system.
\section{\label{sec:Background-Information}Background Information}
The proposed approach for odometry draws heavily from published results
on RGBD sensor characterization, computer vision, image processing
and 3D surface matching literature. This section includes aspects
from the literature critical to understanding the RGBD odometry algorithm
and subtle variations on published approaches we use that, to our
knowledge, have not been previously published elsewhere.
\subsection{Robust Correspondence Computation in RGBD Image Pairs}
Rather than matching all measured surface points and solving for the
point cloud alignment using ICP \cite{121791} or GICP \cite{Segal-RSS-09},
our odometry reduces the measured data in both frames to a set of
visually-distinct surface locations automatically selected via a user-specified
OpenCV feature detection algorithm, e.g., SIFT \cite{Lowe:2004:DIF:993451.996342},
SURF \cite{Bay:2008:SRF:1370312.1370556} , BRIEF \cite{Calonder:2010:BBR:1888089.1888148},
ORB \cite{Rublee:2011:OEA:2355573.2356268} etc. A user-specified
OpenCV feature descriptor is then computed at each detection location
to create a set of feature descriptors for each RGB image. Robust
methods then compute a correspondence between the RGBD images in a
two-stage process:
\begin{itemize}
\item Stage 1 identifies salient visual matches between the RGB feature
descriptors using a symmetric version of Lowe's ratio test.
\item Stage 2 refines correspondences from Stage 1 by applying the Random
Sample Consensus (RANSAC) algorithm \cite{Fischler:1981:RSC:358669.358692}
to identify the triplet of corresponding $(X,Y,Z)$ measurements that,
when geometrically aligned, result in the largest amount of inliers,
i.e., geometrically close, pairs in the remaining point set.
\end{itemize}
The two stages operate on distinct subsets measurements from the data.
Stage 1 exploits salient measurements from the RGB image data. Stage
2 exploits salient measurements in the 3D data. While the order of
the stages 1 and 2 could be switched, the computational cost of the
RANSAC algorithm increases significantly when no initial correspondence
is available (see \cite{schnabel-2007-efficient} for RANSAC computational
complexity analysis). This motivates use of RANSAC downstream from
RGB feature matching which, for most OpenCV features, is significantly
faster to compute.
\subsubsection{Stage 1: Robust Image Feature Correspondence via Lowe's Ratio Test
and Symmetry Criteria}
As with many time-based imaging and computer vision algorithms, e.g.,
optical flow, face tracking, and stereo reconstruction from images,
our RGBD odometry approach seeks to find a collection of corresponding
pixels from two sequential images in time. As in other approaches,
we compute sets of visual features from each image, $(F,G)$, that
are assumed invariant to small changes in viewpoint. Correspondences
are found by pairing elements from the feature sets, $(f_{i},g_{j})$.
These correspondences are found by imposing a metric on the feature
space, e.g., a Euclidean metric $\left\Vert f_{i}-g_{j}\right\Vert $,
and then associating features using a criterion on this metric, e.g.,
nearest neighbors: $j=\min_{k}\left(\left\Vert f_{i}-g_{k}\right\Vert ,\,\,g_{k}\in G\right)$.
Unfortunately, application of this type of matching often results
in many incorrect correspondences; especially when many features share
similar values.
In this work we adopt a symmetric version of Lowe's ratio test \cite{Lowe:2004:DIF:993451.996342}\textbf{
}to identify and reject potentially incorrect visual feature correspondences.
Conceptually, this is accomplished by examining the uncertainty in
the match. If computation were not a concern, this uncertainty could
be found by perturbing the value of $f_{i}$ and observing the variability
of the corresponding element $g_{j}$ but this is not feasible in
real-time applications. Lowe's test simplifies this decision by dividing
the distances between $f_{i}$ and it's 2-nearest neighbors $(g_{j},g_{k})$
where $\left\Vert f_{i}-g_{j}\right\Vert \leq\left\Vert f_{i}-g_{k}\right\Vert $
creating the ratio $\frac{\left\Vert f_{i}-g_{j}\right\Vert }{\left\Vert f_{i}-g_{k}\right\Vert }$.
A user-specified salience parameter, $\lambda_{ratio}$, is applied
to reject correspondences that satisfy the inequality $\frac{\left\Vert f_{i}-g_{j}\right\Vert }{\left\Vert f_{i}-g_{k}\right\Vert }>\lambda_{ratio}$.
Features that pass this test ensure the match for $f_{i}$ into the
set of $G$ is salient since the two best candidate matches in $G$
have significantly different distances for their best and next-best
matches. Unfortunately, Lowe's ratio \emph{is asymmetric as it does
not ensure that the match between} $g_{j}$ \emph{into the set} $F$\emph{
is also salient}. Symmetry is achieved by applying the ratio test
first for the element $f_{i}$; ensuring distinct matches from $f_{i}\rightarrow G$
and then again for $g_{j}$; ensuring distinct matches from $g_{j}\rightarrow F$.
Feature matches that satisfy this symmetric version of Lowe's ratio
test are considered to be candidate correspondences between two images.
Results shown in this article were generated by applying this test
with $\lambda_{ratio}=0.8$ which ensures that, for each correspondence,
the 2nd best match, $\left\Vert f_{i}-g_{k}\right\Vert $, has a distance
that is 25\% larger than the best match$\left\Vert f_{i}-g_{j}\right\Vert $.
\subsubsection{Stage 2: Robust 3D $(X,Y,Z)$ Odometry via RANSAC and RANSAC Refinement}
A second stage uses the image locations and depths of the visual correspondences
from Stage 1 to generate a pair of $(X,Y,Z)$ point clouds. Since
the correspondences between points in these clouds are given via the
visual correspondence, it is possible to directly estimate the transformation
in terms of a rotation matrix, $\mathbf{R}$, and translation, $\mathbf{t}$,
that best-aligns the two pointsets in terms of the sum of their squared
distances using solutions to the ``absolute orientation'' problem,
e.g., \cite{Umeyama:1991:LET:105514.105525,Horn87closed-formsolution}.
However, incorrect correspondences may still exist in the data and,
if so, they can introduce significant error.
The RANSAC algorithm leverages the geometric structure of the measured
3D data to reject these incorrect correspondences. It accomplishes
this by randomly selecting triplets of corresponding points, computing
the transformation,$\left(\mathbf{R},\mathbf{t}\right)$, that best
aligns the triangles these points describe and then scoring the triplet
according to the number of observed inliers in the aligned point clouds.
Inliers are determined by thresholding the geometric distance between
corresponding points after alignment with a user-specified parameter,
$\lambda_{inlier}$, such that a point pair $(\mathbf{p}_{i},\mathbf{p}_{j})$
is marked as an inlier if $\left\Vert \mathbf{p}_{i}-\left(\mathbf{R}\mathbf{p}_{j}+\mathbf{t}\right)\right\Vert <\lambda_{inlier}$.
In this way, the RANSAC-estimated transformation, $\widehat{\left(\mathbf{R},\mathbf{t}\right)}$,
is given by aligning the triplet of points having best geometric agreement
(in terms of inlier count) between the two point clouds.
We use the RANSAC algorithm included as part of the Point Cloud Library
(PCL v1.7) which also has an option to refine the inlier threshold.
The refinement process allows the RANSAC algorithm to dynamically
reduce the inlier threshold by replacing it with the observed standard
deviation of the inlier distances at the end of each trial. Specifically
the inlier threshold is replaced when the observed variation of the
inliers is smaller than the existing distance threshold, e.g., for
each refinement iteration the new threshold $\hat{\lambda}_{inlier}=\min\left(3\sigma_{inliers},\lambda_{inlier}\right)$.
Results shown in this article are generated using PCL's RANSAC algorithm
(with refinement) with user-specified settings that allow a maximum
of 200 RANSAC iterations and an inlier distance threshold of $\lambda_{inlier}=5cm.$
\subsection{RGBD Cameras: Calibration, 3D Reconstruction, and Noise}
\subsubsection{Calibration}
Primesense sensors are shipped with factory-set calibration parameters
written into their firmware. These parameters characterize the physical
characteristics of the RGB and IR/Depth cameras that make up the RGBD
sensor and allows data from these cameras to be fused to generate
color-attributed $(X,Y,Z)$ point clouds. While it is possible to
use the factory-provided calibration settings, better odometry estimates
are possible using experimentally calibrated parameters. Calibration
describes the process of estimating the \emph{in-situ} image formation
parameters for both the RGB and IR imaging sensors and the transformation,
i.e., rotation and translation, between these two sensors. Calibration
of the intrinsic, i.e., image formation, parameters for each camera,
provide values for the $(x,y)$ focal distance,$(f_{x},f_{y})$, the
image center/principal point, $(c_{x},c_{y}),$ and the $(x,y)$ pixel
position shift, $(\delta_{x},\delta_{y})$, that occur due to radial
and tangential lens distortions. Estimates for these values are obtained
by detecting (via image processing) the $(x,y)$ image positions of
features in images of a calibration pattern having a-priori known
structure (typically a chess board). After intrinsic calibration,
the extrinsic parameters of the sensor pair, i.e, the relative position
and orientation of the RGB and IR sensor, is estimated by applying
a similar procedure to images from both cameras when viewing the same
calibration pattern.
The key benefit of accurate calibration is to reduce the uncertainty
in the location of projected depth and color measurements (intrinsic
parameters) and to align/register the depth and color measurements
from these two sensors to a common $(x,y)$ image coordinate system
(extrinsic parameters) which, for simplicity, is taken to coincide
with the coordinate system of the RGB camera sensor. When using the
factory-shipped calibration values, this registration can occur on-board
the Primesense sensor (hardware registration). Experimentally estimated
calibration parameters are typically more accurate than factory settings
at the expense of additional computational cost (software registration).
Work in this article uses the factory-provided extrinsic calibration
values for hardware registration of the RGB/IR images and experimentally
calibrated values for the intrinsic/image formation parameters. This
compromise uses RGBD sensor hardware to perform the computationally
costly registration step and software to reconstruct 3D position values.
While use of the factory-provided extrinsic parameters can potentially
sacrifice accuracy, we found these values resulted in similar odometry
and simultaneously significantly reduced the software driver execution
overhead. As RGBD cameras are fixed focal length, the camera calibration
parameters are fixed in time and are recalled by the odometry algorithm
during initialization.
\subsubsection{Point Cloud Reconstruction}
Measured 3D $(X,Y,Z)$ positions of sensed surfaces can be directly
computed from the intrinsic RGBD camera parameters and the measured
depth image values. The $Z$ coordinate is directly taken as the depth
value and the $(X,Y)$ coordinates are computed using the pinhole
camera model. In a typical pinhole camera model 3D $(X,Y,Z)$ points
are projected to $(x,y)$ image locations, e.g., for the image columns
the $x$ image coordinate is $x=f_{x}\frac{X}{Z}+c_{x}-\delta_{x}$.
However, for a depth image, this equation is re-organized to ``back-project''
the depth into the 3D scene and recover the 3D $(X,Y)$ coordinates
as shown by equation (\ref{eq:XYZ_pinhole_reconstruction-1})
\begin{center}
\begin{equation}
\begin{array}{ccc}
X & = & (x+\delta_{x}-c_{x})Z/f_{x}\\
Y & = & (y+\delta_{y}-c_{y})Z/f_{y}\\
Z & = & Z
\end{array}\label{eq:XYZ_pinhole_reconstruction-1}
\end{equation}
\par\end{center}
where $Z$ denotes the sensed depth at image position $(x,y)$ and
the remaining values are the intrinsic calibration parameters for
the RGB camera.
\subsubsection*{Measurement Noise}
Studies of accuracy for the Kinect sensor show that assuming a Gaussian
noise model for the normalized disparity provides good fits to observed
measurement errors on planar targets where the distribution parameters
are mean $0$ and standard deviation $\sigma_{d'}=0.5$ pixels \cite{s120201437}.
Since depth is a linear function of disparity, this directly implies
a Gaussian noise model having mean $0$ and standard deviation $\sigma_{Z}=\frac{m}{f_{x}b}Z^{2}\sigma_{d'}$
for depth measurements where $\frac{m}{f_{x}b}=-2.85e^{-3}$ is the
linearized slope for the normalized disparity empirically found in
\cite{s120201437}. Since 3D $(X,Y)$ coordinates are also derived
from the pixel location and the depth, their distributions are also
known as shown below:
\begin{equation}
\begin{array}{ccc}
\sigma_{X} & = & \frac{x_{im}-c_{x}+\delta_{x}}{f_{x}}\sigma_{Z}=\frac{x_{im}-c_{x}+\delta_{x}}{f_{x}}(1.425e^{-3})Z^{2}\\
\sigma_{Y} & = & \frac{y_{im}-c_{y}+\delta_{y}}{f_{y}}\sigma_{Z}=\frac{y_{im}-c_{y}+\delta_{y}}{f_{y}}(1.425e^{-3})Z^{2}\\
\sigma_{Z} & = & \frac{m}{f_{x}b}Z^{2}\sigma_{d'}=(1.425e^{-3})Z^{2}
\end{array}\label{eq:noise_models}
\end{equation}
These equations indicate that 3D coordinate measurement uncertainty
increases as a quadratic function of the depth for all 3 coordinate
values. However, the quadratic coefficient for the $(X,Y)$ coordinate
standard deviation is at most half that in the depth direction, i.e.,
$(\sigma_{X},\sigma_{Y})\approx0.5\sigma_{Z}$ at the image periphery
where $\frac{x-c_{x}}{f}\approx0.5$, and this value is significantly
smaller for pixels close to the optical axis.
For example, consider a ``standard'' Primesense sensor having no
lens distortion and typical factory-set sensor values: $(f_{x},f_{y})=f=586\pm30$
for focal length, $(640,480)$ for image $(x,y)$ dimension, and $(c_{x},c_{y})=(320,240)$
for the image center. In this case the ratios $(\frac{x-c_{x}+\delta_{x}}{f_{x}},\frac{y-c_{y}+\delta_{y}}{f_{y}})=(0,0)$
at the image center and $(\frac{x-c_{x}+\delta_{x}}{f_{x}},\frac{y-c_{y}+\delta_{y}}{f_{y}})=(0.548\pm0.028,.411\pm0.021)$
at the $(x,y)$ positions on the image boundary. With this in mind,
the $(X,Y,Z)$ coordinates of a depth image are modeled as measurements
from a non-stationary Gaussian process whose mean is $0$ at all points
but whose variance changes based on the value of the triplet $(x,y,Z)$.
\subsection{Odometry Covariance Estimation}
The RGBD reconstruction equations (\ref{eq:XYZ_pinhole_reconstruction-1})
and measurement noise equations (\ref{eq:noise_models}) provide a
statistical model for $(X,Y,Z)$ measurement errors one can expect
to observe in RGBD data. Our approach for odometry parameter covariance
estimation creates two point clouds from the set of inliers identified
by the previously mentioned RANSAC algorithm. We then simulate an
alternate instance of the measured point cloud pair by perturbing
the $(X,Y,Z)$ position of each point with random samples taken from
a $0$ mean Gaussian distribution whose standard deviation is given
by measurement noise equations (\ref{eq:noise_models}). Each pair
of perturbed point clouds is aligned via the solution to the absolute
orientation problem (\cite{Umeyama:1991:LET:105514.105525}) to generate
an estimate of the odometry parameters. For a set of $N$ perturbed
point cloud pairs, let $\xi_{n}$ denote the odometry parameters obtained
by aligning the $n^{th}$ simulated point cloud pair. Unbiased estimates
for the statistical mean, $\widehat{\mu}$, and covariance, $\widehat{\Sigma}$,
of the odometry parameters is computed via:
\[
\widehat{\mu}=\frac{1}{N}\sum_{n=1}^{N}\xi_{n},\,\,\,\,\widehat{\sum}=\frac{1}{N-1}\sum_{n=1}^{N}(\xi_{n}-\widehat{\mu})(\xi_{n}-\widehat{\mu})^{t}
\]
Covariance estimates published in this article are generated by perturbing
each point cloud pair 100 times, i.e., $N=100$.
\section{\label{sec:Methodology}Methodology}
Our approach for odometry seeks to compute instantaneous odometry
directly from sensor measurements in a manner similar to a sensor
driver. As such, there is no attempt for higher-level processing such
as temporal consistency \cite{De-Maeztu:2015:TCG:2849459.2849478}
or keyframing \cite{Leutenegger:2015:KVO:2744155.2744163}. Given
this design goal, such tasks are more appropriate for user-space or
client-level application development where the problem domain will
drive the algorithm choice and design.
The following steps outline of the RGBD odometry driver:
\begin{enumerate}
\item Reduce the dimension of the data by converting the RGB image into
a sparse collection of feature descriptors that characterize salient
pixels in the RGB image.
\begin{enumerate}
\item Discard measurements at the image periphery and measurements having
invalid or out-of-range depth values.
\item Detect feature locations in the RGB image and extract image descriptors
for each feature location.
\end{enumerate}
\item For sequential pairs of RGBD images in time, match their feature descriptors
to compute candidate pixel correspondences between the image pair
using Lowe's Ratio test as discussed in \S~\ref{sec:Background-Information}.
\item Using only the candidate pixel correspondences from (2), compute two
sparse $(X,Y,Z)$ point clouds from the RGBD feature correspondences
using equation (\ref{eq:XYZ_pinhole_reconstruction-1}) from \S~\ref{sec:Background-Information}.
\item Apply Random Sample Consensus (RANSAC) to find the triplet of corresponding
$(X,Y,Z)$ points that, when aligned using the rotation and translation
$\widehat{\left(\mathbf{R},\mathbf{t}\right)}$, maximize the geometric
agreement (number of inliers) of the corresponding point cloud data
as described in \S~\ref{sec:Background-Information}.
\item The subset of points marked as inliers from (4) are used to generate
a new pair of point clouds. We then perturb the $(X,Y,Z)$ data in
each point cloud according to the measurement noise models of equation
(\ref{eq:noise_models}) and empirically compute the 6x6 covariance
matrix, $\widehat{\sum}$, of the odometry parameters as described
in \S~\ref{sec:Background-Information}.
\end{enumerate}
The 6DoF odometry estimate, $\xi$, is taken taken directly from the
alignment transformation parameters, $\widehat{\left(\mathbf{R},\mathbf{t}\right)}$,
computed in step 4. These values characterize the vehicle position
and angular velocities during the time interval spanned by each measured
image pair. Step 5 provides, $\widehat{\Sigma}$, our estimate for
the covariance of the odometry parameters.
\section{\label{sec:Results}Results}
To evaluate our approach for RGBD odometry we implemented the algorithm
as a C++ node using the Robot Operating System (ROS) development framework
\cite{288}. Experiments were conducted using an XTion Pro Live RGBD
camera at full-frame (640x480) resolution and framerate (30Hz). The
frame-to-frame odometry performance is tracked by calibrating the
pose of the RGBD camera to a motion capture system (Optitrack). In
our experiments, we initialize the RGBD camera pose to coincide with
the measured pose as given by averaging 5 seconds (500 samples) of
motion capture data while the RGBD camera is stationary. After initialization,
the pose of the RGBD camera is measured by the motion capture systems
independent from the pose obtained via the time integration of the
frame-to-frame odometry estimates.
\begin{table}
\begin{centering}
\begin{tabular}{|c|c|}
\hline
Name & Value\tabularnewline
\hline
\hline
OpenCV Detector Algorithm & ``ORB''\tabularnewline
\hline
OpenCV Descriptor Algorithm & ``ORB''\tabularnewline
\hline
$\lambda_{ratio}$ & 0.8\tabularnewline
\hline
$\lambda_{inlier}$ & 5cm.\tabularnewline
\hline
RANSAC MAX ITERATIONS & 200\tabularnewline
\hline
NUMBER PERTURBATIONS & 100\tabularnewline
\hline
\end{tabular}
\par\end{centering}
\caption{\label{tab:Algorithm-parameters}Parameters used for the proposed
RGBD odometry algorithm to generate results in this article.}
\end{table}
Using the algorithm parameter values shown in Table \ref{tab:Algorithm-parameters},
our RGBD algorithm runs in real-time (30Hz) on full-frame RGBD data
on a quad-core Intel i5 CPU with a clock speed 2.67GHz and our results
are generated using this configuration and hardware. We have also
run this algorithm, without modification, on an Odroid-XU3 which is
a very small (9.4cm.x7cm.x1.8cm.) and lightweight (\textasciitilde{}
72gram) single board computer having a quad-core Arm7 CPU with a clock
speed of 1.4GHz. Our RGBD algorithm runs on full-frame RGBD data at
a rate of 7.25Hz on this platform and has similar odometry performance.
\begin{figure*}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.97\textwidth,height=0.8in]{figs/pose_droll}
\par\end{centering}
}
\par\end{centering}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.96\textwidth,height=0.8in]{figs/pose_roll}
\par\end{centering}
}
\par\end{centering}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.95\textwidth,height=0.8in]{figs/pose_dx}
\par\end{centering}
}
\par\end{centering}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.97\textwidth,height=0.8in]{figs/pose_x}
\par\end{centering}
}
\par\end{centering}
\caption{\label{fig:Estimated-odometry-and-pose}(a,b,c,d) show estimated (blue/dashed)
and motion-capture (orange/solid) values for the velocity and position
of the body-frame $x$-axis during the experiment. (a,b) show the
$x$-axis angular velocity and angular position (roll) respectively.
(c,d) show x position velocities and the absolute x position respectively.
As one would expect, pairs (a,b) and (c,d) have (integral,derivative)
relationships. Inaccurate velocities from visual odometry, e.g., those
at time 32 sec., are coupled with large covariance (see Fig. \ref{fig:Summary}
time index 32 sec.) which indicates to fused-state navigation systems
that these estimates are not reliable.}
\end{figure*}
\begin{figure*}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.95\textwidth,height=1.2in]{figs/covariance2}
\par\end{centering}
}
\par\end{centering}
\begin{centering}
\subfloat[]{\begin{centering}
\includegraphics[width=0.48\textwidth,height=0.8in]{figs/covariance_4_to_15_sec}
\par\end{centering}
}\subfloat[]{\begin{centering}
\includegraphics[width=0.48\textwidth,height=0.8in]{figs/covariance_30_to_32_sec}
\par\end{centering}
}
\par\end{centering}
\caption{\label{fig:Summary}Plots (a-c) show three views of odometry error
(blue) and the $\pm1\sigma$ (purple) and $\pm3\sigma$ (red) confidence
intervals for the $x$ position velocity during the 35 second odometry
experiment. (b,c) show close-up views of time intervals (4,14) sec.,
(b), and, (30,32) sec. showing instances having normal odometry, (b),
and highly uncertain odometry, (c). Four time events of interest are
marked on plot (a). Events 1 and 3 mark instances where odometry is
tracking well and parameter variance is smoothly changing. Events
2 and 4 mark instances where the odometry is perceived to be highly-uncertain
and have large associated covariance estimates. As evident in these
plots, covariance values dramatically increase for inaccurate odometry
estimates. This allows fused-state navigation to ignore unreliable
odometry estimates when they occur.}
\end{figure*}
Our results analyze a single 35 second experiment with motion-tracked
RGBD odometry to assess algorithm performance. In this experiment
the sensor views an indoor environment (the laboratory) which includes
office furniture, boxes, chairs and a camera calibration pattern.
The full 6DoF range of motions were generated in the experiment by
manually carrying the camera around the laboratory and includes motions
having simultaneous $(X,Y,Z)$ and (roll, pitch, yaw) variations at
positional velocities approaching 1m/s and angular velocities approaching
50-100 degrees/s. The experiment also includes medium (\textasciitilde{}2m.
range) and long (\textasciitilde{}5m. range) depth images and images
of highly distinct surfaces, e.g., shipping boxes and textured floor
tiles as well as visually confusing surfaces, e.g., a calibration
pattern consisting of regularly spaced black squares on a white background.
All of these contexts promise to provide opportunities to observe
and characterize the odometry parameter estimate accuracy and the
accuracy of the associated covariance of these parameters.
\begin{figure*}
\begin{centering}
\subfloat[Event 1: Accurate odometry: depth \textasciitilde{}3m., slow velocity
(no blurring).]{\begin{centering}
\includegraphics[height=1.3in]{figs/frame_196_matches}
\par\end{centering}
}\subfloat[Event 2: Odometry error: depth \textasciitilde{}1m., some incorrect
visual correspondences.]{\begin{centering}
\includegraphics[height=1.3in]{figs/frame_211_matches}
\par\end{centering}
}
\par\end{centering}
\begin{centering}
\subfloat[Event 3: Accurate odometry: depth \textasciitilde{}3m., higher velocity
(blurring).]{\begin{centering}
\includegraphics[height=1.3in]{figs/frame_280_matches}
\par\end{centering}
}\subfloat[Event 4: Worst-case scenario: high velocity, incorrect visual correspondences.]{\begin{centering}
\includegraphics[height=1.3in]{figs/frame_352_matches}
\par\end{centering}
}
\par\end{centering}
\caption{\label{fig:Odometry-Image-Pairs}(a-d) show RGB image pairs from the
RGBD sensor at Events 1-4 from Fig. \ref{fig:Summary} respectively.
(Left column) Events (1) and (3) show that correct visual correspondences
lead to accurate RGBD odometry. In these cases the estimated odometry
covariance tends to vary smoothly and increases roughly proportional
to vehicle velocity which induces blur to images. (Right column) Events
(2) and (4) show that incorrect visual correspondences lead to inaccurate
RGBD odometry. While this can introduce error to RGBD-only based estimates
for pose (Fig. \ref{fig:Estimated-odometry-and-pose}(b,d)), the estimated
covariance at these time instances increases dramatically (see red
curve of Fig. \ref{fig:Summary}). This allows fused-state navigation
systems to automatically reject these estimates when they occur. As
such, the covariance estimation approach proposed here enables fused-state
navigation systems to benefit from accurate RGBD odometry when it
is available.}
\end{figure*}
Figure \ref{fig:Estimated-odometry-and-pose} depicts estimated (blue/dashed)
and motion-capture (orange/solid) values for the velocity and position
of the of the body-frame x-axis during the experiment. Since motion
capture systems measure absolute pose, i.e., position and orientation,
velocities must be computed by taking the time-differential of the
motion capture data. For this reason, the motion capture angular velocities
are particularly noisy since perturbations in the measured orientation
over short time intervals induce large instantaneous angular velocity
measurements. The close proximity of the estimated and measured velocities
in plots (a,c) show that, in most cases, the RGBD odometry algorithm
tracks well. Errors in angular velocity visible in (a) are localized
to time instants at time indices 16 sec. and 32 sec. The error at
time 16 sec. appears to be due to a combination of a erroneously high
velocity estimate from the motion capture and erroneously low error
from the estimated odometry. The error at time 32 sec. occurs when
the camera makes inaccurate visual matches that cannot be corrected
and result in a failed (highly inaccurate) odometry estimate. A similar
pattern exists for the $x$ position, (d), and position velocities,
(c). As one would expect, odometry errors in (a,c) introduce offsets
between the motion capture and estimated body frame $x$-axis angle
(b) and $x$ position (d) since these quantities are obtained by integrating
the their respective velocity signals (a,c).
Figure \ref{fig:Summary} depicts odometry errors for the vehicle,
i.e., body-frame, $x$-axis (blue) and the estimated $\pm1\sigma$
(purple) and $\pm3\sigma$ (red) confidence intervals for the $x$-axis
velocity parameter. Four events of interest are marked in Fig. \ref{fig:Summary}.
Events (1,3) demonstrate typical, i.e., nominal, RGBD odometry performance
as the vehicle velocity and scene depth simultaneously vary. Events
(2,4) demonstrate atypical, i.e., potentially erroneous, RGBD odometry
and demonstrate that, for both time instances where the odometry is
inaccurate, the covariance dramatically increases.
Analysis of the odometry error indicates that the estimated covariances
underestimate the experimentally measured odometry parameter uncertainty.
This is to be expected since the simulated point clouds from which
this covariance is derived does not account for noise from many sources
such as incorrect visual feature correspondences. Despite this, the
estimated covariances increase and decrease in a manner that is approximately
proportional to the experimentally observed parameter covariance.
Analysis of the data collected shows that taking $\Sigma=9\widehat{\Sigma}$
will place \textasciitilde{}99\% of measurements within their respective
$3\sigma$ bounds for all 6DoF. While the error distributions are
not Gaussian, they behave reasonably well and $\Sigma$ should be
a functional measure for sensor fusion. For this reason, we propose
taking $\Sigma=9\widehat{\Sigma}$ as an estimate for the measurement
uncertainty (Further analysis of the required multiple to place \textasciitilde{}95\%
of sample within $2\sigma$ may be a more practical choice.)
Figure \ref{fig:Summary} shows the associated $\pm3\sigma$ curves
for x position velocity estimates (red). Inspection of the covariance
curve shows smooth variations where the odometry parameters are valid
that tend to increase with vehicle velocity. The curve also includes
large jumps in the covariance, e.g., Events (2,4), where potentially
invalid odometry estimates occur.
Figure \ref{fig:Summary}(a-c) depicts representative image pairs
for Events 1-4 respectively. In each case, the image pair is shown
with 2D visual features indicated by circles on the image. The subset
of visual features that have been matched, as described in Step (2)
of our algorithm (see \S~\ref{sec:Methodology}), have a line shown
that connects corresponding feature locations in the image pair. The
left column shows frame pairs from approximately time index 10 sec.
and 26 sec. At these times the RGBD camera views similar scenes but
has significantly different velocities. The velocity increase is visually
apparent in the blurring artifacts which are absent in Event 1 and
present in Event 3. We feel that image blur due to higher vehicle
velocity contributes to inexact visual feature matches and that the
observed increase in parameter covariance that coincides in time with
higher vehicle velocities is evidence of this phenomena. Events (2,4)
show instances where we have either intentionally (Event 4) or unintentionally
(Event 2) caused the visual odometry estimate to fail. The potential
for failure in visual odometry is a phenomenon shared in differing
degrees by all visual odometry algorithms. In this article, one can
see that the RGBD odometry parameter covariance increases dramatically
in these contexts which allows fused-state navigational systems to
autonomously discard these estimates when they do occur.
\section{\label{sec:Conclusion}Conclusion}
This article proposes a method to estimate 6DoF odometry parameters
and their parameter covariance from RGBD image data in real-time.
The proposed method applies robust methods to accurately identify
pairs of $(X,Y,Z)$ surface measurements in sequential pairs of images.
Using RGBD sensor $(X,Y,Z)$ measurement and measurement noise models,
perturbations are introduced to corresponding pairs of $(X,Y,Z)$
points to simulate plausible alternative odometry estimates for the
same image pair. The covariance of the resulting odometry parameters
serves as an estimate for odometry parameter uncertainty in the form
of a full-rank 6x6 covariance matrix. Observation of the odometry
errors with respect to a calibrated motion capture system indicate
that the estimated covariances underestimate the true uncertainty
of the odometry parameters. This is to be expected since the perturbation
approach applied does not model all sources of uncertainty in the
estimate. While many additional error sources exist, we feel that
modeling uncertainty in correspondences and, to a lesser degree, uncertainty
in the true $(x,y)$ projected pixel position, i.e., $(\delta_{x},\delta_{y})$
from equations (\ref{eq:XYZ_pinhole_reconstruction-1}) show the most
promise for explaining differences observed between the apparent experimental
parameter covariance and our real-time estimate for that value. Despite
this, real-time covariances estimated by the proposed algorithm increase
and decrease in a manner that is approximately proportional to the
experimentally observed parameter covariance. As such, we propose
pre-multiplying estimated covariances by an experimentally motivated
factor ($9\widehat{\Sigma}$). The resulting odometry is real-time,
representative of the true uncertainty and modestly conservative which
makes it ideal for inclusion in typical fused-state odometry estimation
approaches. This dynamic behavior greatly expands the navigational
benefits of RGBD sensors by leveraging good RGBD odometry parameter
estimates when they are available and vice-versa. This is especially
important in situations where a pairwise RGBD odometry fails to return
a plausible motion as evidenced in our experiments which show a dramatic
increases in parameter covariance for these events.
\section{\label{sec:Acknowledgments}Acknowledgment}
This research is sponsored by an AFRL/National Research Council fellowship
and results are made possible by resources made available from AFRL's
Autonomous Vehicles Laboratory at the University of Florida Research
Engineering Education Facility (REEF) in Shalimar, FL.
\bibliographystyle{ieeetr}
|
\section*{Declaration}
\begin{itemize}
\item \textbf{Funding} : Radha Kopparti is supported by a PhD studentship from City, University of London
\item \textbf{Conflicts of interest/Competing interests} : No conflicts of interest
\item \textbf{Availability of data and material} : All the datasets used in the experiments are available online
\item \textbf{Code availability} : The code for the experiments will be made available online
\item \textbf{Authors' contributions} : Included in Introduction
\end{itemize}
\section{Introduction}
\label{sec:intro}
Humans are very good at learning abstract patterns, i.e. patterns based on relations rather than values,
from sensory input and systematically applying them to new stimuli, even after brief exposure.
On the other hand, neural networks fail to detect such patterns in unseen data \citep{GaryMarcus1999}.
The lack of systematicity in neural network learning has already been discussed over 30 years ago \citep{fodor1988connectionism}, but that discussion has still not led to a generally accepted consensus.
Nevertheless, deep learning has had impressive successes based on computational advances and greatly increased amounts of data.
Yet, it has become evident that there are still relevant limitations to systematicity and compositionality of learning and generalisation in current neural network architectures \citep[e.g.,][]{lake2018generalization, GaryMarcus2018,hupkes2019compositionality,DBLP:journals/corr/abs-1904-00157,keresztury2020compositional}.
Neural networks are effective at mapping numerical patterns similar to the training data to corresponding outputs, but often do not extrapolate this mapping successfully on unseen data \citep{liska-et-al-2018-memorize}.
Specifically, standard neural networks do not seem to learn equality relations \citep{mitchell2018extrapolation,weyde_kopparti_2018},
which define simple abstract patterns, such as those
used in the well-known study by \cite{GaryMarcus1999}.
In this study, we use Embedded RBP (ERBP) \citep{weight2020arx}, an extension of Relation Based Patterns \citep{weyde_kopparti_2019}, for effective generalisation of equality and similarity relationships.
ERBP is modeled as a prior over the network weights in standard feed-forward and recurrent network architectures.
Thus, ERBP enables the use of existing standard architectures with just one additional term in the loss function, as opposed to other architectures addressing systematicity, and it uses no fixed weights, in contrast to RBP.
Our experimental results confirm that ERBP consistently leads to almost perfect generalisation on abstract pattern learning.
\cite{GaryMarcus1999} and \cite{GaryMarcus2018} see the failure to learn abstract patterns as evidence for general limitations of neural network learning.
To our knowledge, this link has not been shown experimentally.
Therefore we evaluate our solution on language models for words and characters on real-life data.
We find consistent improvements in all experiments, providing evidence for a link between the capacity for low-level abstraction and performance in natural language modelling.
The main contributions of this study are:
\begin{itemize}
\item The application of the novel ERBP method for weight priors that enable abstract pattern learning
\item Extensive experimental evaluation on abstract pattern learning with perfect accuracy on synthetic test data
\item Multiple experiments on natural language modelling and graph neural networks, showing consistent improvements through ERBP
\end{itemize}
The remainder of the paper is organised as follows:
Section \ref{sec:relatedwork} discusses the related work.
In Section \ref{sec:inductivebias}, learning of abstract patterns with ERBP is explained.
Sections \ref{sec:abstract_pattern}, \ref{sec:realworld}, and \ref{exp:complex} describe the experimental setup and results on synthetic, real-world, and complex tasks, followed by the Discussion and Conclusions in Sections \ref{discussion} and \ref{conclusions}, respectively.
\section{Related Work}
\label{sec:relatedwork}
There has recently been an increased interest in inductive biases to improve generalisation in machine learning and specifically neural networks with potential benefits in various applications like relational reasoning \citep{battaglia2018relational}, spatial reasoning \citep{hamrick2018relational}, learning from few examples \citep{snell2017prototypical,DBLP:journals/corr/abs-1904-05046}, cognitive modelling \citep{cog1}, natural language processing \citep{mitchell2018extrapolation}, machine translation \citep{sutskever2014sequence,lake2018generalization}, and numeric reasoning \citep{trask2018neural}.
Earlier work on systematicity of human language learning and connectionism started with \citep{fodor1988connectionism}.
There have been wider debates on systematicity of neural network learning with claims and counter-claims on their abilities \citep{fodor1990connectionism,niklasson1994systematicity,christiansen1994generalization,frank2014getting}.
In the context of abstract pattern learning, there was series of studies triggered by \cite{GaryMarcus1999} with different extended network architectures and evaluation methods \citep{Elman1999,Altmann2,vilcu2005two,shultz2006neural,Alhama,Alhama2019}, but no general consensus has emerged.
Traditional rule based approaches
do not suffer from a lack of systematicity, but they lack the flexibility of neural networks.
Some approaches aim to improve rule based learning with more flexibility, e.g. through probabilistic logic \citep{deraedt,8618135}.
Other studies aim at combining symbolic rule based knowledge with neural networks \citep{city11838,DBLP:journals/corr/abs-1711-03902,Raedt2019NeuroSymbolicN,doi:10.1098/rstb.2019.0309}.
However, this approach has not yet been adopted in the mainstream of machine learning research and applications.
There has been work on different ways of modelling
inductive biases in neural networks in recent years, like using matrix factorisation \citep{DBLP:journals/corr/NeyshaburTS14} and convolutional arithmetic circuits \citep{DBLP:journals/corr/CohenS16a} for computer vision tasks, relational inductive bias models and Bayesian inference in the context of deep reinforcement learning \citep{zambaldi2018deep,Gershman2015NoveltyAI} and inductive bias for integrating tree structures in LSTMs by ordering neurons \citep{shen2018ordered}.
It has been identified for a long time that weight initialisation can improve the speed and quality of neural network learning \citep{Sutskever2013OnTI,DBLP:journals/corr/LeJH15,nye2018efficient}.
Various regularisation methods have also been proposed to improve generalisation \citep{DBLP:journals/corr/Sussillo14,DBLP:journals/corr/ZarembaSV14,Pachitariu2013RegularizationAN}.
\cite{mikolov-et-al-2015-learning} use two weight matrices with different learning dynamics to encourage short and long term memory.
Recently, spatial weight priors have been proposed for Bayesian convolutional neural networks by \cite{atanov2018the}.
There is work by \cite{demeester2016lifted} for injecting inductive bias in the form of implication first order rules through an additional regularisation term for learning relations between entities in WordNet.
Recent studies have confirmed that state of the art neural networks lack systematic generalisation, specifically recurrent neural networks for a sequence to sequence learning task \citep{lake2018generalization,DBLP:journals/corr/abs-1802-06467,DBLP:journals/corr/abs-1809-04640}
and have stressed the lack of compositionality and generalisation in neural networks \citep{DBLP:journals/corr/abs-1906-05381,DBLP:journals/corr/abs-1904-00157,nye2020learning,keresztury2020compositional,doi:10.1098/rstb.2019.0309,DBLP:journals/corr/abs-1903-12354,hupkes2019compositionality,Andreas2019MeasuringCI}.
Other works on incorporating symbolic prior knowledge into neural networks include that by \cite{xu2018semantic}, where a loss function based on constraints on the output has been developed as a regularisation term and evaluated on structured prediction and multi-label classification tasks.
\cite{DBLP:journals/corr/MinerviniDRR17, inbook} proposed a method for regularising multi-layer graph based neural networks using logic based prior knowledge on link prediction tasks.
There are other works like Neural Theorem Provers (NTPs) \citep{DBLP:journals/corr/RocktaschelR17} which are proposed to solve large scale knowledge reasoning tasks \citep{minervini2019differentiable} and systematic generalisation \citep{minervini2020learning}.
In the context of relational reasoning and natural language understanding, works like \cite{sinha2019clutrr, sinha2020evaluating} evaluate systematic out-of-order logical generalisation in graph neural networks.
\cite{mitchell2018extrapolation} studied among other problems the learning equality of numbers in binary representation, which does not generalise from even to odd numbers as pointed out already by \cite{GaryMarcus2001}.
They investigate several potential solutions, with a preference for a convolutional approach. \cite{trask2018neural} studied the numerical extrapolation behaviour using logic gates based on arithmetic logic units for fundamental numerical operations.
In our previous work \citep{weyde_kopparti_2018,weyde_kopparti_2019,kopparti-weyde-2019}, we have shown that equality relations and abstract patterns based on such relations are not generalised by standard feed-forward and recurrent neural network architectures.
This failure is independent of various parameters like the vector dimension, amount of training data, train/test split, type of activation function, data representation, vector coverage, and aspects of the network architecture.
The proposed RBP model,
creates a bias that leads to almost perfect generalisation on a number of tasks that relate to equality detection and learning abstract patterns.
\cite{tanneberg2020learning} use the differential rectifier units proposed as part of RBP \citep{weyde_kopparti_2018}
to develop an architecture for learning efficient strategies that solve abstract algorithmic problems.
In this work, we extend the RBP framework in the form of a Bayesian prior on the network weights to enable abstract relation learning.
\section{An Inductive Bias for Learning Abstract Patterns}
\label{sec:inductivebias}
To the best of our knowledge, a solution based on weight priors has not been proposed for the abstract pattern learning task.
We therefore re-model the RBP approach by proposing a weight prior which makes it a more effective inductive bias and simpler to integrate into standard neural networks.
\subsection{Motivation}
Neural networks are effective in recognising and mapping numerical patterns seen in the training data to corresponding outputs, but very often do not extrapolate this mapping outside
the range of the training data \citep{liska-et-al-2018-memorize}.
Specifically, standard neural networks do not seem to learn equality based abstract relations \citep{mitchell2018extrapolation},
which are fundamental for many higher level tasks.
Learning equality or identity based relations is not only a very useful numerical relationship but also an important characteristic that defines abstract relations in data
e.g., the grammar-like rules ABA or ABB as
used in the well-known study by \cite{GaryMarcus1999}.
It is not clearly understood why the standard neural network models in their current form are not able to learn abstract grammar-like rules based on equality.
To this end, we have proposed solutions based on \textit{Relation Based Pattern}s (RBP) \citep{weyde_kopparti_2018, weyde_kopparti_2019},
and \textit{Embedded Relation Based Pattern}s (ERBP) in \cite{weight2020arx} as re-modelling RBP as a weight prior with a regularisation term in otherwise standard neural network learning.
Here, we take this approach forward, and apply ERBP firstly to a wide range of synthetic tasks of learning abstract, mixed and concrete patterns, thereby modelling lower-level abstract patterns in data.
We then aim to evaluate whether modelling the lower-level abstractions in data can improve higher level tasks like language modelling.
To this end, we experiment with ERBP on real-word tasks of character and word prediction, music pitch prediction, graph distance modelling, and sentence entailment.
The aim behind this work
is not to improve the state-of-the-art performance on these tasks but
rather to focus on highlighting the problem of lower-level abstract pattern learning with neural networks and show that creating an inductive bias as a weight prior leads to improvements in several tasks.
\subsection{Relation Based Patterns (RBP)}
The RBP model introduced in \cite{weyde_kopparti_2018,weyde_kopparti_2019} is based on the comparison of input neurons that
are in some relation to each other.
For the comparison, Differentiator-Rectifier (DR) units are used that calculate the absolute difference of two inputs: $f(x,y) = |x-y|$.
DR units realise this
with fixed weights from the two neurons that are to be compared, with values $+1$ and $-1$, and the absolute value as activation function.
For abstract pattern learning, there are multiple vector comparisons that correspond to the different possible relations within the patterns, e.g. equality of pairs of vectors representing tokens in positions (1,2), (1,3), (2,3), to recognise abstract patterns within three elements.
For each dimension of the input vectors and each comparison there is a $DR_n$ unit.
$DR_n$ units are applied to every pair of corresponding input neurons representing the same dimension within a token representation.
There are also $DRp$ units, which we do not model in ERBP, that can be used to aggregate the activations for all dimensions in a vector comparison by summing the activations of the $DR_n$ values. \cite{weyde_kopparti_2019} has a detailed description of $DR_{n}$ and $DR_p$ units.
\begin{figure}[tb!]
\centering{\includegraphics[width=5cm]{drunit_early.png}}
\caption{Structure of RBP Early Fusion.
The DR units are concatenated with the input neurons.
The fixed connections from the Inputs to the DR units are not shown for simplicity.}
\label{fig:rbp1}
\end{figure}
\begin{figure}[tb!]
\centering{\includegraphics[width=5cm]{drunit_mid.png}}
\caption{Structure of the RBP Mid Fusion. The DR units are concatenated with the first hidden layer.
The weights of incoming connections of the DR units are fixed in RBP (see the main text for details).
In ERBP, we use the same structure but with trainable weights.
Then the only difference to a standard Feed Forward Neural Network is the prior on the weights between input and hidden units as described in the text.
This structure can be applied to Recurrent Neural Networks, as long as we have $n$ items represented in the input.}
\label{fig:rbp2}
\end{figure}
There are different ways of integrating DR units into neural networks in RBP: \textit{Early}, \textit{Mid} and \emph{Late Fusion}.
In \emph{Early Fusion}, DR units are concatenated to input units as shown in Figure \ref{fig:rbp1}.
In \emph{Mid Fusion}, they are concatenated to the hidden layer as shown in Figure \ref{fig:rbp2}.
In both cases, the existing input and hidden units are unchanged.
The \emph{Late Fusion} design
predicts abstract relations and is more complex.
Late Fusion are not used in this study, but a detailed description can be found in \cite{weyde_kopparti_2019}.
\subsection{Embedded Relation Based Patterns}
RBP adds units with hard-wired connections and non-standard activation function, which limits the flexibility of that part of the network and makes practical use more complex.
By contrast, ERBP introduces a modified Mid Fusion RBP structure and remodels it as a Bayesian prior on a standard weight matrix, thus avoiding hard-coded weights and non-standard network structures and activation functions.
The approach of using a prior has been introduced in our previous work \cite{weight2020arx} for equality learning and here we are extending it to abstract patterns and language modelling.
We model each DR unit of RBP with two standard neurons using ReLU activation and model the fixed weights with a default weight matrix $D$, that is applied at initialisation and through a loss function to the weights between input neurons and a hidden layer.
ERBP therefore has two nodes of comparison per pair of input neurons, unlike RBP which has one, and we need therefore a higher minimal number of hidden units in the first layer.
The matrix is initialised between the input and the first hidden layer as follows.
The incoming connections from two corresponding inputs to a neuron in the hidden layer to be compared have values of $+1$ and $-1$.
For the same pair we use another hidden neuron with inverted signs of the weights, as in rows 1 and 2.
All other incoming weights to the hidden layer are set to 0, including the bias.
This ensures that in all cases where corresponding inputs are not equal, there will be a positive activation in one of the hidden neurons.
More formally, we can define the matrix $D$ as follows.
Consider an architecture with input consisting of $n$ tokens represented as vectors of dimensionality $m$, concatenated to a $n \cdot m $ dimensional input vector.
Then each token vector $i$ starts at position $i \cdot m$ (assuming $i$ starts at $0$).
In the first hidden layer, we represent each of the $n(n-1)/2$ pairs of input tokens with $2m$ neurons, so that the representation of pair $j$ starts at position $p_j = j \cdot 2m$ (assuming 0-indexing again).
The hidden layer has to have at least $n(n-1)/2 \cdot 2m = n(n-1)m$ neurons.
We can then describe the creation of the matrix D with algorithm \ref{eq}.
\begin{algorithm}
\caption{ERBP creation of weight matrix $D$}
\label{eq}
\begin{algorithmic}
\STATE $D_{q,r} \leftarrow 0 \, \forall q,r$ \COMMENT{initialise the matrix to 0}
\STATE $p \leftarrow n(n-1)/2 $ \COMMENT{number of token pairs}
\STATE $k \leftarrow 0$ \COMMENT{will be used as row index}
\FOR{ $i_1$ from $0$ to $p - 1$}
\COMMENT{first token in pair}
\FOR{ $i_2$ from $i_1 + 1$ to $p$}
\COMMENT{second token in pair}
\FOR{ $j$ from 0 to $m$} \COMMENT{dimensions in token vectors}
\STATE $D_{k, i_1 \cdot m + j} = +1$ \COMMENT{first comparison neuron}
\STATE $D_{k, i_2 \cdot m + j} = -1$
\STATE $k \leftarrow k+1 $
\STATE $D_{k, i_1 \cdot m + j} = -1$ \COMMENT{second comparison neuron}
\STATE $D_{k, i_2 \cdot m + j} = +1$
\STATE $k \leftarrow k+1 $
\ENDFOR
\ENDFOR
\ENDFOR
\end{algorithmic}
\end{algorithm}
An example of this default matrix $D$ for three tokens of length $m=2$ is shown in Figure~\ref{fig:rbp4_2}.
\begin{figure}[h]
\centering
{
$\displaystyle
D = {\text{\boldmath$
\begin{pmatrix}
+1 & 0 &-1 & 0 & 0 & 0 \\
-1 & 0 &+1 & 0 & 0 & 0 \\
0 &+1 & 0 &-1 & 0 & 0 \\
0 &-1 & 0 &+1 & 0 & 0 \\
+1 & 0 & 0 & 0 &-1 & 0 \\
-1 & 0 & 0 & 0 &+1 & 0 \\
0 &+1 & 0 & 0 & 0 &-1 \\
0 &-1 & 0 & 0 & 0 &+1 \\
0 & 0 &+1 & 0 &-1 & 0 \\
0 & 0 &-1 & 0 &+1 & 0 \\
0 & 0 & 0 &+1 & 0 &-1 \\
0 & 0 & 0 &-1 & 0 &+1 \\
\end{pmatrix}$}}
$
}
\caption{Default weight matrix $D$ for 3 input token vectors of dimension \textit{m}=2.
Each row corresponds to the incoming weights of a hidden neuron and each column the outgoing weights of an input neuron.
If there are more hidden neurons than pairs of input neurons times token vector dimension ($p \cdot m$), the additional rows contain only zeros.}
\label{fig:rbp4_2}
\end{figure}
As stated, Matrix $D$ is used for the loss function and also for initialisation.
It is sufficient to use $D$ only in the loss function, but using $D$ also for initialisation speeds up convergence, as we found in initial tests, and is therefore applied in most of our experiments.
In the initialisation, we first initialise weight matrix $W$ between the input and hidden layer as normal, e.g. with low-energy noise,
and then copy the non-zero values of $D$ to $W$.
Further, we define an ERBP loss based on the difference between $D$ and the actual weights in $W$.
We compute the $L2$ or $L1$ norm of the difference $D-W$.
This loss term corresponds to a Bayesian prior on the weights with the mean defined by the values of $D$.
The $L2$ loss corresponds to a Gaussian prior and $L1$ loss to a Laplacian prior, such that back propagation maximises the posterior likelihood of the weights given the data \citep{williams1995bayesian}.
The overall training loss $l_t$ is defined as
\begin{equation}
l_t = l_c + \lambda \, l_{ERBP}
\end{equation}
where $l_c$ is the classification loss and $l_{ERBP}$ is
\begin{equation}
l_{ERBP} = wl_1
\sum_{i=1}^k (w_i - d_i)^2 + wl_2
\sum_{i=1}^k |(w_i - d_i)|.
\end{equation}
$\lambda$ is the regularisation parameter, corresponding to the inverse of the variance of the prior, effectively regulating the strength of the ERBP regularisation.
$(wl_1,wl_2)$ are the weights for L1 and L2, respectively.
In principle, any combination of weights is possible, but here we only use $(1,0)$ or $(0,1)$ for $(wl_1,wl_2)$.
We call these methods ERBP L1 and ERBP L2 respectively.
For $l_c$ we have used cross entropy loss in the experiments, although it can be replaced with any other loss function suitable for the task.
The ERBP approach can be applied to feed froward and to recurrent networks.
The only additional condition for recurrent networks is that we need to use a sliding window of size $n$.
ERBP requires $n(n-1)m$ neurons in the first hidden layer which leads to $n(n-1)m^2$ weight parameters.
If this number of neurons is present in the first hidden layer, no additional parameters are needed in the network.
Although the $L1$ loss
encourages sparsity, that is not the specific goal of ERBP L1.
Rather it is to enable learning of pairwise token equality by encouraging suitable features that compare token vectors in each dimension.
Since equality learning is needed for abstract pattern recognition, but equality learning is a hard problem for neural networks, we hope that abstract pattern learning will benefit from ERBP similarly to RBP.
We further apply this prior on a wide number of synthetic tasks which benefit from the equality based prior in different settings and experiments in the following sections.
\section{Experiments: Abstract Pattern Recognition}\label{sec:abstract_pattern}
In this section, we evaluate the ERBP method on generalising abstract patterns, based on equality relations, from training data.
We compare ERBP to standard neural networks and Early and Mid-Fusion RBP, and we evaluate the effect on mixed abstract and concrete patterns.
\subsection{Dataset}\label{subsec:data_gen}
For performing the rule learning experiments, we artificially generate data in the form of triples for each of the experiments.
We generate triples in all five abstract patterns of length 3: AAA, AAB, ABA, ABB, and ABC for the experiments.
We use as sample
vocabulary $a ... l$ (12 letters) for both prediction and classification tasks.
The sequences are divided differently for the different cases of classification.
For all the experiments we used separate train, validation, and test sets with 50\%, 25\%, and 25\% of the data, respectively.
All sampling (train/test/validation split, downsampling) is done per simulation.
We used half of the vocabulary for training and the other half for testing and validation (randomly sampled).
Using disjoint parts of the vocabulary means that the validation and test sets contain out of distribution patterns, in particular non-zero activations of input neurons that are always zero in the training set.
\subsection{Setup}\label{subsec:setup}
For all abstract pattern learning tasks, we used a standard feed-forward neural network.
We used a grid search over hyperparameters:
the number of epochs with values $[10,20,30]$,
and the number of neurons in the hidden layer with values $[10,20,30]$, except for ERBP where we use the minimal number necessary for the ERBP matrix.
We varied the regularisation parameter $\lambda$ with values $[0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30]$ for the ERBP approaches.
For larger values of regularisation beyond 30, the performance did not improve and showed a downward trend.
We ran a total of 10 runs for each experiment.
We used the Adam optimiser \citep{adam_ref} by default and also Stochastic Gradient Descent for comparison.
We used a single hidden layer and a mini-batch size of 1 unless indicated otherwise.
The networks have been implemented using the PyTorch library\footnote{\url{http://pytorch.org}}.
\subsection{Abstract Patterns}\label{subsec:abstract-patterns}
In this experiment, we aim to learn classification by abstract patterns based on equality as in the experiments by \cite{GaryMarcus1999}, using the terminology and tasks from \cite{weyde_kopparti_2019}.
Triples of items $(\alpha,\beta,\gamma)$ following the abstract patterns AAA, AAB, ABA ABB and ABC are presented to the network.
These abstract patterns can be described in logic using a binary equality predicate $eq(\cdot,\cdot)$.
E.g., the abstract patterns $ABA$ and $ABB$ can be represented by the following predicates:
\begin{align}
ABA&: \neg eq(\alpha,\beta) \land eq(\alpha,\gamma)
\\
ABB&: \neg eq(\alpha,\beta) \land eq(\beta,\gamma).
\end{align}
These predicates only depend on the equality relations and not the values of $\alpha,\beta, \text{and} \; \gamma$.
They are also called algebraic patterns or abstract rules \citep{GaryMarcus2001,dehaene2015neural}.
We represent the input tokens to the network as one-hot encoded vectors and perform 5 different experiments as follows.
\begin{enumerate}
\item ABA vs other: In this task, one class contains only patterns of ABA and the other class contains all the other possible patterns (AAA, AAB, ABB, ABC), downsampled for class balance.
Expressed in logic, the task is to detect whether $eq(\alpha,\gamma) \land \neg eq(\alpha,\beta)$ is true or false.
\item ABB vs other: In this task, one class contains only patterns of the form ABB and the other class contains all the other possible patterns (AAA, AAB, ABA, ABC), downsampled for class balance.
The logical task is to detect $eq(\beta,\gamma) \land \neg eq(\alpha,\beta)$.
\item ABA-BAB vs other: In this task, class one contains patterns of type ABA as in 1.
For ABA sequences in the training set, the corresponding BAB sequences appear in the test set.
The other class contains all other possible patterns (AAA, AAB, ABB, ABC) downsampled per pattern for class balance as before.
\item ABA vs ABB: This task is like task 1 above, but only pattern ABB occurs in the other class, so that this task has less variance in the second class.
We expected this task to be easier to learn because two equality predicates $eq(\alpha,\gamma), eq(\beta,\gamma)$ change their values between the classes and are each sufficient to indicate the class.
\item ABC vs other: In this case, class one (ABC) has no pair of equal tokens, while the $other$ class has at least one of $eq(\alpha,\beta), eq(\alpha,\gamma), eq(\beta,\gamma)$ as $true$, i.e. detecting equalities without localising them is sufficient for correct classification.
\end{enumerate}
\begin{table}[tb!]
\centering
\resizebox{\columnwidth}{!}{%
\begin{tabular}{lccccc}
\hline
Type & 1) & 2) & 3) & 4) & 5) \\
\hline
Standard & 50 (1.86) & 50 (1.83) & 50 (1.73) & 50 (1.81) & 50 (1.68) \\
Early Fusion & 65 (1.26) & 65 (1.29) & 75 (1.22) & 55 (1.18) & 65 (1.04) \\
Mid Fusion & 100 (0.00) & 100 (0.00) & 100 (0.05) & 100 (0.00) & 100 (0.00) \\
ERBP L1 & 100 (0.00) & 100 (0.00) & 100 (0.02) & 100 (0.00) & 100 (0.00) \\
ERBP L2 & 100 (0.00) & 100 (0.00) & 100 (0.00) & 100 (0.00) & 100 (0.00) \\
\hline
\end{tabular}
}
\caption{ Abstract Pattern Learning. Test accuracy (in \%) with different models: (1) ABA vs other, 2) ABB vs other, 3) ABA-BAB vs other, 4) ABA vs ABB, 5) ABC vs other). The table shows average and standard deviation (in brackets) over 10 simulations.}
\label{tab:exprs2}
\end{table}
In Table~\ref{tab:exprs2} (abstract patterns) we present test set accuracy, the training set accuracy was 100\% in all cases.
We find that abstract patterns are almost perfectly generalised with ERBP L1 and ERBP L2, like with Mid Fusion RBP.
We compared the differences between network performances across 10 simulations using the Wilcoxon Signed Ranked Test.
The differences between ERBP L1/L2 and Standard as well as between ERBP L1/L2 and Early Fusion are statistically significant in all abstract pattern experiments at a threshold of $p < 0.05$.
The differences between Mid Fusion, ERBP L1 and ERBP L2 are not significant.
However, while the Mid Fusion RBP achieves rounded 100\% test accuracy, the non-zero standard deviation indicates that some results are not fully accurate, while ERBP L2 has zero standard deviation in all tasks and ERBP L1 in all but one tasks.
\subsection{Parameter Variations}\label{subsec:parvar}
We study the effect of several parameters: number of hidden layers, choice of optimiser, regularisation factor and weight initialisation on the abstract pattern learning tasks.
\begin{table}[tb!]
\centering
\begin{tabular}{cccccc}
\hline
No of Hidden & Standard & Early & Mid & ERBP L1 & ERBP L2 \\ Layers & Network & Fusion & Fusion & & \\
\hline
h=2 & 50 (1.56) & 65 (1.23) & 100 (0.05) & 100 (0.00) & 100 (0.00) \\
h=3 & 52 (1.59) & 66 (1.08) & 100 (0.03) & 100 (0.00) & 100 (0.00)\\
h=4 & 55 (1.63) & 68 (1.12) & 100 (0.02) & 100 (0.00) & 100 (0.00) \\
h=5 & 56 (1.55) & 70 (0.89) & 100 (0.02) & 100 (0.00) & 100 (0.00)\\
\hline
\end{tabular}
\caption{Network Depth. Test accuracy (in \%) for abstract pattern learning (ABA vs other) with \textit{h}= 2,3,4,5 hidden layers. Averages and standard deviations over 10 simmulations.}
\label{tab:hiddd}
\end{table}
\begin{table}[tb!]
\centering
\begin{tabular}{lrr}
\hline
Type & ERBP L1 & ERBP L2 \\
\hline
Adam & 100 (0.00) & 100 (0.00) \\
SGD & 98 (0.06) & 96 (0.04) \\
\hline
\end{tabular}
\caption{Optimiser Choice. Test accuracy (in \%) and standard deviation of Abstract Pattern Learning (ABA vs other) using Adam and SGD for ERBP L1 and L2.
Averages and standard deviations (in brackets) over 10 simulations.
SGD can also lead to 100\% accuracy on the test set, but needs higher $\lambda$ values.}
\label{tab:opt14}
\end{table}
\textit{Network Depth}:
We test identity learning with deeper neural network models, using $h = {2,3,4,5}$ hidden layers.
The results are listed in Table~\ref{tab:hiddd}, showing only minor improvements in the network performance for deeper networks.
However, ERBP L1 and L2 generalisation is consistent and independent of the network depth.
\textit{Optimiser Choice}:
We test Stochastic Gradient Descent (SGD) and compare to the Adam optimiser \citep{adam_ref} for training the ERBP.
We observe faster convergence and greater improvement in the overall accuracy with Adam compared to SGD.
We observe similar results for both ERBP L1 and L2.
Table \ref{tab:opt14} summarises the results of abstract pattern learning for both optimisers with the regularisation parameter $\lambda$ set to 1.
We observe that the SGD does not reach full generalisation in this setting, however it does so at higher values of $\lambda$.
\begin{figure}[tb]
\centerline{\includegraphics[width=9cm]
{abstract_plot.png}}
\caption{Regularisation Factor. Test accuracy of the network with ERBP L1 and L2 when varying the regularisation factor $\lambda$ (in logarithmic scale) for abstract pattern learning (ABA vs other).
}
\label{fig:example3_2}
\end{figure}
\textit{Regularisation Factor}:
We vary the regularisation factor $\lambda$ in the loss function of the ERBP model and observe that a large factor reliably leads to perfect generalisation in abstract pattern learning task.
We vary the regularisation parameter $\lambda$ with values [0.01,0.03,0.1,0.3,1,3,10,30].
Figure \ref{fig:example3_2} shows how the effect depends on the size the regularisation factor $\lambda$ using L1 and L2 loss functions for abstract pattern learning task.
We test for larger values of $\lambda$, but the performance is worse beyond $\lambda$ value 30, hence, we do not consider values beyond that.
\textit{Weight Initialisation}:
We evaluate the effect of different weight initialisation schemes without the ERBP weight prior, to test whether ERBP initialisation or other schemes might be sufficient on their own to learn abstract patterns.
We test random, zero, Xavier \citep{xavier_init} and ERBP initialisation.
For random initialisation, weight and bias are initialised from a uniform distribution over$(-1/\sqrt{n}, 1/\sqrt{n})$
where
$n$ is the size of the weight matrix.
The results of the experiment
are shown in Table \ref{tab:init}.
Although ERBP initialisation shows the best generalisation in this comparison, it falls far short of the performance with the ERBP weight loss, which consistently achieves 100\% test accuracy (see Table~\ref{tab:exprs2}).
\begin{table}[tb]
\centering
\begin{tabular}{lrrrr}
\hline
Initialisation: & Random & Zero & Xavier & ERBP (init only) \\
\hline
Task 1 & 53 (1.82) & 51 (1.67) & 54 (1.53) & \textbf{61} (1.12) \\
Task 2 & 53 (1.76) & 52 (1.72) & 54 (1.57) & \textbf{61} (1.09) \\
Task 3 & 55 (1.73) & 54 (1.59) & 56 (1.49) & \textbf{65} (1.04) \\
Task 4 & 52 (1.89) & 54 (1.62) & 55 (1.62) & \textbf{60} (1.23) \\
Task 5 & 52 (1.54) & 53 (1.58) & 54 (1.67) & \textbf{62} (1.20) \\
\hline
\end{tabular}
\caption{Weight Initialisation. Test accuracy (in \%) with different weight initialisation methods on standard neural networks for various tasks ie. Task 1-5 Abstract Pattern Learning (ABA vs other, ABB vs other, ABA-BAB vs other, ABA vs ABB, ABC vs other).
Averages and standard deviations (in brackets) over 10 simulations.}
\label{tab:init}
\end{table}
We also evaluate the performance with the ERBP loss without the ERBP initialisation, using standard random weight initialisation instead.
The ERBP loss on its own is sufficient for the model to produce 100\% accuracy when tested on Task 1 (ABA vs other).
However, the training takes longer than with ERBP initialisation, doubling the number of epochs roughly from 30 to~60.
\subsection{Combined Abstract and Concrete Patterns}\label{subsec:mixed}
An important question about any inductive bias for abstract patterns is whether it has negative effects on other tasks.
Here we test the effect of ERBP on concrete patterns.
We will answer this question for real-world tasks in the following section.
Abstract pattern rules are independent of the actual values of $\alpha,\beta, \text{and} \; \gamma$.
Concrete patterns, on the other hand, are defined in terms of values from a vocabulary
a,b,c, ... .
E.g., sequences \textit{a**}, i.e. beginning with `a', or \textit{*bc}, ending with `bc', can be formulated in logic as follows:
\begin{align}
\textit{a**} &: eq(\alpha, \text{`a'}) \\
\textit{*bc} &: eq(\beta, \text{`b'}) \land eq(\gamma,\text{`c'}).
\end{align}
We conduct an experiment where the classes were defined by combinations of abstract and concrete patterns.
Specifically we define four combined patterns based on combinations of the abstract pattern $ABA$ and $ABB$ with the concrete patterns $a**$ and $b**$.
E.g., the pattern $(ABA,a**)$ can be expressed logically as
\begin{equation}
(ABA,\textit{a**}) = eq(\alpha,\gamma) \land \neg eq(\alpha,\beta) \land eq(\alpha, \text{`a'}).
\end{equation}
We define four classes based on two abstract and two concrete patterns, where
each class is a combination of one abstract and one concrete pattern.
The classes are defined as follows:
\begin{align}
1: (\textit{ABA,a**}) \qquad 2&: (\textit{ABB,a**}) \\
3: (\textit{ABA,b**}) \qquad 4&: (\textit{ABB,b**}).
\end{align}
We create the dataset with each class equally frequent and with items not prescribed by the patterns drawn at random, so that the abstract patterns (1,3 vs 2,4) and concrete patterns (1,2 vs 3,4) are statistically independent.
We use a vocabulary of 18 characters, out of which 12 are used for training and 6 are used for validation/testing in addition to `a' and `b', which need to appear in all sets because of the definition of the concrete patterns.
In our experiment we perform a four-way classification using train, validation and test split of 50\%, 25\% and 25\% respectively.
The results of the experiment are listed in Table~\ref{tab:mixed}
\begin{table}[tb]
\centering
\begin{tabular}{lr}
\hline
Type & Accuracy \\
\hline
Standard Network & 39 (1.53) \\
Early Fusion & 66 (1.22) \\
Mid Fusion & 100 (0.00) \\
ERBP L1 & 100 (0.00) \\
ERBP L2 & 100 (0.00) \\
\hline
\end{tabular}
\caption{Combined Patterns. Test accuracy (in \%) for learning combined abstract and concrete patterns using different models.
Averages and standard deviations (in brackets) over 10 simulations.
Both Mid Fusion and ERBP approaches result in 100\% accuracy in all cases.}
\label{tab:mixed}
\end{table}
The results show that the mixed patterns are perfectly generalised by Mid Fusion RBP and ERBP.
We also test with only concrete patterns with two classes starting with $a**$ and $b**$ respectively, and observe that ERBP leads to 100\% accuracy unlike a standard network without ERBP which gives an accuracy of 94\%.
This shows that the (E)RBP does not impede neural network learning of concrete patterns.
We try a range of values for $\lambda$ and found that a minimum was necessary for learning but higher values did not impede the learning of the concrete patterns.
The models with ERBP lead to 100\% accuracy on a wide range of synthetic classification tasks.
Several authors, like \cite{seidenberg1999infants,vilcu2005two,shultz2006neural, frank2014getting,Alhama,Alhama2019} claimed success and showed improvements for the abstract pattern learning task.
However, the evaluation has mostly been conducted by testing whether the output of the network shows a statistically significant difference between the output for inputs that conform to a trained abstract pattern and those that do not.
From a machine learning perspective, this criterion is not satisfactory.
Instead, we would expect that an identity/equality rule should always be applied correctly once if it has been learned from examples, at least in cases of noise-free synthetic data, which we have achieved in with the ERBP loss.
\section{Experiments: Language and Music Modelling}
\label{sec:realworld}
In order to evaluate the effect of ERBP on language models, we perform experiments with real world data on character and word prediction in natural language and also on pitches in melodies.
We use RNN, GRU and LSTM models for character, word, and musical pitch prediction.
The input
vectors represent items in a context window of length \textit{n}.
Therefore there are $n \cdot (n-1) / 2 $ pairs of vectors to compare.
The ERBP is applied in the same way as before in the first hidden layer after the input.
In these tasks, the encoding of the information is not binary, as in the synthetic tasks, but integer-based or continuous.
Thus, the differences in DR units and the ERBP hidden neurons represent not just equality but a form of distance of the input values, which we expect to be useful for prediction.
\subsection{Character and Word Prediction}
We use Wikitext-2 \citep{DBLP:journals/corr/MerityXBS16}
for character and word prediction.
For word prediction, the entire dataset with 2 million words was used with train/validation/test split as in the original dataset with pretrained Glove embeddings \citep{pennington2014glove} with 50 dimensional vectors.
For character prediction, a truncated version with $60\,000$ words was used with a train/valida\-tion/\linebreak[0]{}test split of 50/25/25 and with integer encoding of the characters.
\begin{table}[tb!]
\centering
\begin{tabular}{lrrrr}
\hline
Type & n=10 & n=20 & n=30 & n=40 \\
\hline
RNN &
21.99 & 21.73 & 21.42 & 21.47 \\
Early Fusion &
21.90 & 21.64 & 21.35 & 21.24 \\
Mid Fusion &
21.89 & 21.60 & 21.33 & 21.20 \\
ERBP L1 &
20.66 & \textbf{20.50} & 20.04 & 20.32 \\
ERBP L2 &
\textbf{20.60} & 20.53 & \textbf{20.03} & \textbf{20.27} \\
\hline
\end{tabular}
\caption{Character prediction. Perplexity per character
for various context lengths \textit{n} = 10,20,30,40 with RNNs on the Wikitext-2 dataset truncated to 60k words with integer encoding tested on standard RNN, Early, Mid Fusion, ERBP L1 and L2.
The best results (in bold) occur for the ERBP approaches with $\lambda = 0.3$.
}
\label{tab:char1}
\end{table}
We use networks with 2 hidden layers with 50 neurons each.
Both the hidden layers have recurrent connections and we have used this network structure throughout for all the experiments.
We train the networks for up to 30 epochs for characters and up to 40 for words.
The learning rate was set to 0.01.
Training typically converges after less than 30 epochs and we select the best model according to the validation loss.
We test with regularisation parameter $\lambda$ values [0.01,0.03,0.1,0.3,1,3] for ERBP.
We test only for the above set of $\lambda$ values, as the performance when $\lambda > 3$ was worse for both character and word predictions tasks.
Hence, we did not consider larger values of $\lambda$.
We use a context length $n$ of [10,20,30,40] and evaluate again ERBP L1 and L2, RBP Early and Mid Fusion, and standard networks.
\begin{table}[tb!]
\centering
\begin{tabular}{lrrrr}
\hline
Type &
n=10 & n=20 & n=30 & n=40 \\
\hline
GRU &
21.97 & 21.72 & 21.39 & 21.45 \\
Early Fusion &
21.89 & 21.63 & 21.33 & 21.20 \\
Mid Fusion &
21.87 & 21.59 & 21.30 & 21.19 \\
ERBP L1 &
20.61 & \textbf{20.43} & 20.02 & 20.25\\
ERBP L2 &
\textbf{20.53} & 20.46 & \textbf{19.96} & \textbf{20.23} \\
\hline
\end{tabular}
\caption{Character prediction. Perplexity per character for various context lengths \textit{n} = 10,20,30,40 with GRUs on the Wikitext-2 dataset truncated to 60k words with integer encoding tested on standard GRU, Early, Mid Fusion, ERBP L1 and L2.
The best results (in bold) occur for the ERBP approaches with $\lambda = 0.3$.
}
\label{tab:char3}
\end{table}
\begin{table}[htb!]
\centering
\begin{tabular}{lrrrr}
\hline
Type &
n=10 & n=20 & n=30 & n=40 \\
\hline
LSTM &
21.88 & 21.64 & 21.34 & 21.33 \\
Early Fusion &
21.84 & 21.63 & 21.27 & 21.14 \\
Mid Fusion &
21.81 & 21.57 & 21.24 & 21.16 \\
ERBP L1 &
20.54 & \textbf{20.32} & 19.89 & \textbf{20.18}\\
ERBP L2 &
\textbf{20.45} & 20.33 & \textbf{19.87} & 20.19 \\
\hline
\end{tabular}
\caption{Character prediction. Perplexity per character for various context lengths \textit{n} = 10,20,30,40 with LSTMs on the Wikitext-2 dataset truncated to 60k words with integer encoding tested on standard LSTM, Early, Mid Fusion, ERBP L1 and L2.
The best results (in bold) occur for the ERBP approaches with $\lambda = 0.3$.
}
\label{tab:char2}
\end{table}
The results for character prediction and word prediction are summarised in Tables \ref{tab:char1}, \ref{tab:char3}, \ref{tab:char2} and \ref{tab:word1}, \ref{tab:word3} \ref{tab:word2} for RNN, GRU and LSTM models respectively.
The performance was best for LSTMs with ERBP and the choice of $\lambda$ value didn't have a major effect in the case of word prediction, unlike character prediction where $\lambda = 0.3$ gave best performance.
We test for larger values of the regularisation factor but the performance did not improve.
\begin{table}
\centering
\begin{tabular}{lrrrr}
\hline
Type & n=10 & n=20 & n=30 & n=40 \\
\hline
RNN &
186.97 & 164.56 & 114.26 & 101.95\\
Early Fusion &
186.80 & 164.52 & 114.21 & 101.89 \\
Mid Fusion &
186.52 & 164.41 & 114.19 & 101.69 \\
ERBP L1 &
185.83 & 163.98 & \textbf{113.96} & 100.25 \\
ERBP L2 &
\textbf{185.54} & \textbf{163.90} & 113.99 & \textbf{100.23} \\
\hline
\end{tabular}
\caption{Word Prediction. Perplexity per word for various context lengths \textit{n} = 10,20,30,40 with RNNs on the Wikitext-2 dataset consisting of 2 million words with integer encoding tested on standard RNN, Early, Mid Fusion, ERBP L1 and L2.
The best results (in bold) occur for the ERBP approaches.
}
\label{tab:word1}
\end{table}
\begin{table}
\centering
\begin{tabular}{lrrrr}
\hline
Type & n=10 & n=20 & n=30 & n=40 \\
\hline
GRU &
174.62 & 160.31 & 114.05 & 97.62\\
Early Fusion &
174.35 & 160.26 & 113.86 & 96.39\\
Mid Fusion &
174.42 & 160.27 & 113.55 & 96.35\\
ERBP L1 &
173.33 & 159.36 & 113.42 & \textbf{96.21} \\
ERBP L2 &
\textbf{173.21} & \textbf{159.32} & \textbf{113.32} & 96.32 \\
\hline
\end{tabular}
\caption{Word Prediction. Perplexity per word for various context lengths \textit{n} = 10,20,30,40 with GRUs on the Wikitext-2 dataset consisting of 2 million words with integer encoding tested on standard GRU, Early, Mid Fusion, ERBP L1 and L2. The best results (in bold) occur for the ERBP approaches.
}
\label{tab:word3}
\end{table}
\begin{table}
\centering
\begin{tabular}{lrrrr}
\hline
Type & n=10 & n=20 & n=30 & n=40 \\
\hline
LSTM &
160.44 & 153.61 & 113.40 & 93.28\\
Early Fusion &
160.32 & 153.42 & 113.26 & 93.23\\
Mid Fusion &
160.38 & 153.30 & 113.23 & 93.15\\
ERBP L1 &
159.29 & \textbf{152.78} & 113.02 & 92.96 \\
ERBP L2 &
\textbf{159.22} & 152.89 & \textbf{112.99} & \textbf{92.82} \\
\hline
\end{tabular}
\caption{Word Prediction. Perplexity per word for various context lengths \textit{n} = 10,20,30,40 with LSTMs on the Wikitext-2 dataset consisting of 2 million words with integer encoding tested on standard LSTM, Early, Mid Fusion, ERBP L1 and L2.The best results (in bold) occur for the ERBP approaches.
}
\label{tab:word2}
\end{table}
We use the Wilcoxon Signed Rank test with threshold $p=0.05$ as above to compare the standard models with ERBP L1 and L2 for both character and word prediction across 60000 words for context length $n=10$.
For character prediction, RNN, GRU and LSTM with ERBP L1 and L2 are significantly better than the standard RNN, GRU and LSTM models.
For word prediction, all ERBP models except LSTM ERBP L1 are significantly better than the corresponding standard models.
In the case of language modelling for both character and word level, our results are not comparable to the SOTA models on the Wikitext-2 dataset,
which have about 395M parameters in perplexity of 34.1 without pre-training \cite{wang2019language}.
Even with state-of-the-art LSTM models our experiment are not comparable
as we used a subset of Wikitext-2.
\subsection{Melody Prediction}
In another experiment, we test ERBP for predicting the pitch of the next note in melodies with a selection of the Essen Folk Song Collection \citep{Schaffrath1995}, which comprises of 8 sets of songs in different styles.
Pitches are integer-encoded.
With RNN, GRU and LSTM we use two hidden layers of size 20.
In Figure \ref{fig:rep2} we indicated the sliding window at the initial position as a blue rectangle which is the given context.
We also highlighted repeated notes, where we hypothesise that the repetition has a bearing on the prediction of the next note, if the network learns to detect the repetition.
The notes in the pink circle correspond to the repetitions within a given context, and the notes in the green circle are an example of repetition between a given context and a corresponding note.
\begin{figure}[tb]
\centerline{\includegraphics[width=5.49cm]
{rep22.png}}
\caption{Examples from the Essen Folk Song Collection : Repetition of notes in a given context length `n`' = 6 here represented in a blue rectangle. Pink circles correspond to repeating notes in the context length `n'=6. Green circles correspond to repetition of notes within a given context and the next note being predicted.}
\label{fig:rep2}
\end{figure}
We use Adam and tested values [0.01, 0.03, 0.1, 0.3, 1, 3] for the regularisation factor $\lambda$.
Similar to the character and word prediction experiments, we evaluate for smaller $\lambda$ values, as the performance degraded for values of $\lambda > 3$.
We tested context lengths of 5 and 10 and the train/validation/test split was set to 50/25/25\%.
\begin{table}[htb!]
\centering
\begin{tabular}{lrrr}
\hline
Type & RNN
& GRU
& LSTM \\
\hline
Standard & 2.8012
& 2.7968
& 2.7928 \\
Early Fusion & 2.7365
& 2.7328
& 2.7314 \\
Mid Fusion & 2.7356
& 2.7302
& 2.7219 \\
ERBP L1 & 2.7264
& \textbf{2.7252}
& \textbf{2.7132} \\
ERBP L2 & \textbf{2.7240}
& 2.7260
& 2.7144 \\
\hline
\end{tabular}
\caption{Pitch Prediction. Average cross entropy per note for pitch prediction using context length $n=5$ on the Essen Folk Song dataset using standard models, Early, Mid fusion and ERBP approaches.
The best results (in bold) are achieved with the ERBP approaches at $\lambda$ = 0.3.
}
\label{tab:mel1}
\end{table}
\begin{table}[htb!]
\centering
\begin{tabular}{lrrr}
\hline
Type & RNN
& GRU
& LSTM \\
\hline
Standard & 2.7502
& 2.7457
& 2.7432 \\
Early Fusion & 2.6735
& 2.6723
& 2.6712 \\
Mid Fusion & 2.6653
& 2.6650
& 2.6648\\
ERBP L1 & \textbf{2.6642}
& \textbf{2.6641}
& 2.6639 \\
ERBP L2 & 2.6649
& 2.6645
& \textbf{2.6632} \\
\hline
\end{tabular}
\caption{Pitch Prediction. Average cross entropy per note for pitch prediction using context length $n=10$ on the Essen Folk Song dataset using standard models, Early, Mid fusion and ERBP approaches.
The best results (in bold) are achieved with the ERBP approach at $\lambda$ = 0.3.
}
\label{tab:mel2}
\end{table}
Tables~\ref{tab:mel1} and \ref{tab:mel2} summarise the results of the neural networks without and with RBP in early, mid fusion and using ERBP L1 and L2.
We observe the best results for $\lambda$ values of 0.3.
Larger values of $\lambda$ did not result in improved results.
We have tested for statistical significance over the results for the 8 subsets, using the Wilcoxon signed rank test with threshold $p = 0.05$ as above.
We find that all model types (Standard/Early/Mid/ERBP L1/L2) are different with statistical significance, so that ERBP L1 and L2 outperform standard networks and RBP models for this task.
In the case of music modelling, SOTA model on monophonic pitch prediction task is the work by \citep{DBLP:journals/corr/abs-1709-08842} in which a feature discovery \textit{PULSE} learning framework has been proposed.
The cross entropy was $2.395$ and the best performance with ERBP using LSTMs in our experiments was $2.663$.
However, the models cannot be directly compared here as well, as the approach, number of features, model architecture, parameters, context length are not directly comparable.
ERBP model has also not been evaluated on longer context lengths, which we believe might result in improved or closer SOTA model performance when fine-tuned effectively.
\section{Experiments: Complex Learning Tasks}\label{exp:complex}
In this section, we evaluate the use of ERBP for more complex tasks.
Specifically, we experiment with graph distance learning as an example of distance and relation learning and with compositional sentence entailment as a compositional natural language task.
\subsection{ERBP for learning Graph Edit Distance}
In this experiment, we extend the scope from equality based patterns and sequential prediction to a situation of end-to-end learning of a distance function.
Our goal is to learn a distance function between graphs.
Given two graphs $G_1, G_2$, a graph distance model is a function $f(G_1, G_2)$ that computes a scalar distance value.
This experiment uses Graph Neural Networks (GNN),
which are popularly used in relational learning tasks.
In a GNN, a graph structure with nodes and edges is used as input.
A standard GNN model comprises of two encoders to learn node and edge representations using iterative message passing.
For more details about the GNN model refer \cite{DBLP:journals/corr/abs-1812-08434}.
Our model is based on embedding each graph into a vector with a GNN and then classify pairs of graphs based on their distance.
We use the graph edit distance, which counts the number of operations needed for transforming one graph into another.
For more details refer to \citep{DBLP:journals/corr/abs-1904-12787}.
A graph distance model that aligns with the GED is trained by giving graphs with small edit distance a low distance and otherwise high distance as learning targets.
For our dataset, random pairs of graphs are generated from the Graph Similarity data generator \citep{DBLP:journals/corr/abs-1904-12787}.
The generator yields pairs of graphs $(G_1, G_2)$ and labels $t\in\{-1, 1\}$ for this pair where `-1' and and `+1' signify that GED is above or below a threshold, respectively.
The loss function we optimise is
\begin{equation}
L_\mathrm{pair} = \mathbb{E}_{(G_1, G_2, t)}[\max\{0, \gamma - t(1 - d(GNN(G_1), GNN(G_2)))\}] .
\end{equation}
This loss encourages similar graphs to have distance smaller than $1-\gamma$, and dissimilar graphs to have distance greater than $1 + \gamma$, where $\gamma$ is a margin parameter, the NN is applied twice with shared weights, and $d$ is a distance function to compare the graph.
The dimensionality of node vectors is 32 and that of graph embedding vectors is 128.
We evaluate the model here with several distance functions \textit{d}: The standard Euclidean distance and trainable NNs, specifically a Siamese Network and an MLP with and without ERBP .
The MLP has a single hidden layer with 256 neurons.
The whole network is trained end to end with a total of 1000 graph pairs in a split of 60/20/20\% for training, validation and test set, respectively.
The results are shown in Table \ref{tab:opt11}.
\begin{table}[tb!]
\centering
\begin{tabular}{lrr}
\hline
Distance Function & Accuracy \\
\hline
Standard MLP & 95.61\% \\
Siamese network & 96.09\% \\
Euclidean distance & 97.54\% \\
MLP with ERBP & 97.72\% \\
\hline
\end{tabular}
\caption{Graph Edit Distance. Accuracy of GNNs with different distance functions for the graph edit distance (GED) task.}
\label{tab:opt11}
\end{table}
As can be seen from Table \ref{tab:opt11}, the GNN outperforms a Siamese network in the GED task.
GNN with MLP+ERBP results in further improvements when compared to a standard GNN, even though the difference is small.
Table \ref{tab:opt11} shows that standard GNN reaches accuracy of 97.54\% and GNN with ERBP produces 97.72\% on 1000 pairs generated from the Graph Similarity data generator \citep{DBLP:journals/corr/abs-1904-12787}.
There is no directly comparable state of the art for this experiment and the standard Euclidean distance produces already good results. However, the MLP with ERBP reduces the number errors by over 9\% compared to Euclidean distance (2.28 vs 2.46\%), while the other two trainable models perform worse than Euclidean.
\subsection{Compositional Sentence Entailment}
In another experiment, the effect of ERBP is tested on an entailment task in natural language data.
In this task, we extend the notion of abstract rules to the semantics of sentences, albeit in a very restricted syntactic context.
The notion of compositionality here is in the sense of understanding of how words combine to form a sentence in a way that generalises to words and sentences that have not previously been encountered.
The dataset used in the task is the Compositional Comparison Dataset introduced by \cite{comp}.
The task is to classify a pair of sentences into neutral, contradiction or entailment originally motivated from the popular Stanford Natural Language Inference (SNLI) dataset \cite{snli:emnlp2015} natural language inference classification task.
In this abstract compositionality task, pairs of sentences (A,B) are generated which differ by permutation of words, such that each of the pairs represent different relations.
This dataset is called as the Compositional Comparison dataset as all the pairs of sentences are compositionally generated by changing the word ordering in the sentences.
There are three categories `Same',`More-less' and `Not'.
The structure of the sentences used is shown in Table \ref{tab:abs_sen}, where the type assignment holds true for any X, Y and Z.
It is tested if the neural network models to generalise to X, Y and Z that have never been encountered before.
\begin{table}[tb!]
\begin{center}
\begin{tabular}{lrrr}
\hline
Type & Entailment & Contradiction & No of Pairs \\
\hline
Same & X is more Y than Z & Z is more Y than X & 14670 \\
More-Less & Z is less Y than X & X is less Y than Z & 14670 \\
\hline
\end{tabular}
\end{center}
\caption{Sentence Entailment. Comparisons dataset summary. The premise to compare to is: X is more Y than Z}
\label{tab:abs_sen}
\end{table}
In this experiment,
we excluded the 'not' category and the 'neutral' class from the original dataset,
to focus on challenging tasks that are suitable for testing compositionality based on comparisons.
The values for X, Y and Z can be arbitrary nouns for X and Z and adjectives for Y.
For example, in the \textit{Same Type} Contradiction case, the sentence pairs differ only in the order of the words. \\
\textit{A} : The woman is more cheerful than the man \\
\textit{B} : The man is more cheerful than the woman \\
And in the \textit{Entailment} case, the sentences are identical: \\
\textit{A} : The woman is more cheerful than the man \\
\textit{B} : The woman is more cheerful than the man
(Entailment)
In the \textit{More-Less Type}, the \textit{Contradiction} pairs differ by whether they contain the word `more' or the word `less': \\
\textit{A} : The woman is more cheerful than the man \\
\textit{B} : The woman is less cheerful than the man \\
There the \textit{Entailment} also differs additionally by word order: \\
\textit{A} : The woman is more cheerful than the man \\
\textit{B} : The man is less cheerful than the woman
We encode the sentences pairwise by word in A and B, i.e. one pair of words at same position in A and B per time step.
We apply the ERBP prior to the pair of words rather than using a time window as in Section 5.
We use Glove embeddings \citep{pennington2014glove} and a network with a single LSTM layer and a sigmoid layer for classification as the output.
The dataset consists of approximately 5k sentences with equal split between the categories.
As a baseline, we use a Bag of Words (BOW) encoding that averages the Glove embeddings with a Multi-Layer Perception (MLP).
The state of art model for this type of task is the InferSent model \cite{DBLP:journals/corr/ConneauKSBB17}.
\begin{table}[tb!]
\centering
\begin{tabular}{lrr}
\hline
Model & Same type & More-Less type \\
\hline
BOW-MLP & 50\% & 30.24\% \\
InferSent model \cite{DBLP:journals/corr/ConneauKSBB17} & 50.37\% & 50.35\% \\
LSTM with ERBP & 51.32\% & 50.64\% \\
\hline
\end{tabular}
\caption{Sentence Entailment. Accuracy of various models for abstract compositionality task.}
\label{tab:opt1}
\end{table}
The results are listed in Table \ref{tab:opt1}.
The BOW/MLP model results are exactly at chance level and the InferSent model perform only slightly above at 50.37\% for the `Same' type class.
LSTM with ERBP results improves by just under 1pp with 51.32\%.
For the `More-Less' type, the Bag of Words MLP model gives only about 30\% accuracy where as the InferSent and the LSTM model with ERBP give slightly above 50\% accuracy.
We can say that the model did benefit from the ERBP and the improvements were consistent for the both the `Same' and `More-Less' types but the improvement size is small.
\section{Discussion}
\label{discussion}
We have introduced ERBP as a re-modelling of RBP in the form of a Bayesian prior on the weights as a solution for abstract pattern learning that is simple to integrate into standard recurrent and feed-forward network structures as a regularisation term and that retains the full flexibility of the network learning without hard coded weights.
The experiments in Section~\ref{sec:abstract_pattern} show that the ERBP L1 and L2 models are effective in learning classification of abstract patterns on artificial sequence data, and they improve performance slightly over the original RBP.
The learning of abstract patterns with ERBP is robust over a wide range of parameter settings (Section \ref{subsec:parvar})
and does not limit the network's learning of concrete pattern in combination with abstract patterns or on its own (Section~4.5).
The second point of this study is whether the enabling of the abstract pattern learning can improve neural network learning on real-world data.
This was addressed in the second set of experiments on language and music modelling as well as a sentence entailment task and graph comparison.
The language and music modelling results show that the prediction performance benefits from ERBP in all tested tasks of character and word prediction in natural language, and pitch prediction in melodies.
We observe that ERBP with recurrent models (RNN, GRU, LSTM) leads to consistent improvements across different context lengths and in tasks when compared to RBP and standard RNN model types.
The gain in perplexity obtained with ERBP is small but in most cases statistically significant compared to RBP and standard NNs.
We performed two additional experiments on more complex tasks, compositional sentence entailment with LSTMs and graph comparison with graph neural networks, where we achieved small improvements with ERBP.
For the compositional entailment task, and LSTM network with ERBP outperforms the baseline Bag of Words model and the state-of-the-art InferSent encoder-decoder model \citep{DBLP:journals/corr/ConneauKSBB17} slightly.
In the Graphs Edit Distance task, the GNN with MLP/ERBP as a trainable distance function outperforms both a Siamese network and a GNN with Euclidean distance, but the difference between the two GNN variants is small.
While we believe that modelling of equality and distance is a necessary component to better modelling, these tasks seem to require more comprehensive approaches where the comparisons are more strategically applied.
There is clearly room for improvement, particularly in the entailment task.
Overall, our results show that ERBP as a weight prior is an easy method to integrate into the standard networks, wherever there are multiple input vectors to compare.
We demonstrated the use of ERBP with several neural networks models, including feed-forward, RNNs and their gated variants, and Graph Neural Networks.
All networks did benefit from ERBP, with dramatic improvements in abstract pattern recognition on synthetic sequence data.
The prediction improvements are relatively smaller real-life applications, pointing to the fact that learning equality is not the only aspect that is missing for improved language learning.
This was even more pronounced in the complex tasks of entailment and graph distance.
Overall, we see the results provides evidence that addressing systematicity in the form of equality and distance learning in neural networks is not just a theoretical issue, but that it has a positive impact on real-life tasks.
From a practical perspective, ERBP is straightforward to implement and integrate into all standard network architectures, so that is still worth exploring, even if the gains are not always substantial.
We have observed no negative effects of ERBP compared to standard networks and the method proved to be robust to parameter values and the choice of L1 and L2 in all the experiments.
\section{Conclusions}
\label{conclusions}
In this study we focused on abstract pattern learning with neural network architectures based on equality and distance relations.
We introduce Embedded Relation Based Patterns (ERBP), a prior on the weights of feed-forward and recurrent neural network architectures that leads to learning of abstract patterns, where standard neural networks fail.
ERBP has been proven in our experiment as a way of creating an inductive bias that encourages learning of abstract patterns in synthetic as well as real word data.
The ERBP weight prior acts as a regularisation term which is easy to integrate into standard back-propagation.
We observed in experiments that with ERBP L1 and L2 weight priors, neural network models learn generalisable solutions to classification tasks based on abstract pattern learning.
While most approaches to learning abstractions focus on the structure of the network and non-standard operators, this is to our knowledge the first approach that addresses abstract pattern recognition with a prior on the network weights.
In general, we see ERBP-like mechanisms as a way of modelling inductive bias in neural network architectures that helps improve data efficiency by systematic learning.
We believe that this approach of creating an inductive bias with weight priors can be extended easily to other forms of relations and will be beneficial for many other learning tasks.
The effect of ERBP will be studied further to assess its effectiveness on different tasks and datasets.
Beyond its current form, ERBP can be adapted to other forms of abstract relations
and improving generalisation on more complex tasks such as question answering or perception-based reasoning by extending ERBP and combining it with memory models.
We also see promise in extending this approach towards learning higher-level abstractions by combining ERBP with explicit memory and thus approaching a more comprehensive learning model.
\bibliographystyle{spbasic}
|
\section{Introduction}
The dynamics of a quantum system depends not only on itself, but also on how it is probed, showcasing the remarkable extrinsic character of quantum mechanics.
This unavoidable backaction due to measurements can be directly probed in the laboratory~\cite{Murch2008,Purdy2013,Teufel2016,Minev2018}, and is by far the most intriguing and dramatic aspect of quantum theory.
It also has a clear thermodynamic flavor~\cite{Binder2018a}, since backaction is an intrinsically irreversible process.
A comprehensive theory describing the thermodynamics of monitored systems would therefore greatly benefit our understanding of the interplay between information and dissipation.
Constructing such a theory, however, is not trivial, since it requires reformulating the 2nd law to take into account the information learned from the measurements.
We call this a \emph{conditional $2^\text{nd}$ law}.
It quantifies which processes are allowed, \emph{given} a certain set of measurement outcomes.
Interestingly, due to measurement backaction, the noise introduced by the measurement can actually make the conditional process more irreversible, as recently demonstrated in a superconducting qubit experiment~\cite{Naghiloo2018}.
When a system is coupled to two baths at different temperatures, it usually tends to a non-equilibrium steady-state (NESS), where the competition between the two baths keeps the system away from equilibrium.
Continuous measurements can lead to a similar effect.
In this case, noise is constantly being introduced by the environment or the measurement backaction.
But information is also constantly being acquired.
These two effects compete, leading the system toward an \emph{informational steady-state (ISS)}.
Crucially, the ISS relies on the experimenter's knowledge of the measurement records.
A beautiful experimental illustration of this effect was recently given in~\cite{Rossi2019}, where the authors studied an optomechanical membrane monitored by an optical field.
By measuring the field, one could monitor the position of the mechanical membrane and thus infer a steady-state which was close to the ground state.
Conversely, if the measurements are not read, the membrane is perceived to be in a thermal state with higher temperatures.
The ISS is therefore \emph{colder}, due to the information acquired from the continuous measurement.
ISSs are just one example of the many interesting phenomena that emerge when quantum measurements are introduced in a thermodynamic picture.
The deep connections between the two concepts, together with recent experimental advances in controlled quantum platforms, have led to a surge of interest in formulating conditional laws of thermodynamics~\cite{Sagawa2008,Ito2013,Sagawa2012,Sagawa2013,Funo2013,Elouard2017a,Buffoni2018,Mohammady2019a,Beyer2020,Sone2020,Strasberg2019a,Strasberg2020,Belenchia2019}.
This also motivated ground-breaking experiments applying these ideas to Maxwell demon engines and feedback control~\cite{Toyabe2010,Koski2014,Cottet2017,Naghiloo2018,Debiossac2019}.
In all these frameworks, however, the measurements are assumed to act directly on the system, making them explicitly invasive.
Conversely, our interest in this paper will be on formulating the laws of thermodynamics when the measurements are done only on the environment and \emph{only} after it interacted with the system.
The scenario is therefore non-invasive by construction, so that any information acquired can only make the process more reversible, even if the measurement is very poor (as is often the case when dealing with large environments).
This represents a change in philosophy compared to, e.g., Ref.~\cite{Funo2013}, where the measurement was introduced by coupling the system to a memory and then measuring the memory.
In that case one constructs the conditional $2^{\text{nd}}$ law by comparing the situation where the system is fully isolated, with that in which it is open due to the interaction with the memory.
In our case, we assume instead that the interaction between system and bath is inevitable and will happen whether or not we measure it.
We then ask how measuring the bath affects the degree of irreversibility of the process.
Crucially, the framework we develop will focus on continuously monitored system, in contrast to e.g. Ref~\cite{Funo2013}.
It is therefore particularly suited for describing ISSs.
Our endeavor began in Ref.~\cite{Belenchia2019}, where we put forth a semiclassical theory valid for Gaussian processes.
We were interested in quantum optical experiments, which have already been using some of these ideas for many decades, in the framework of continuously monitored systems~\cite{Wiseman2009,Jacobs2014}.
In fact, our theory was recently employed in~\cite{Rossi2020} to experimentally assess the conditional $2^\text{nd}$ law in an optomechanical system.
However, in addition to being semiclassical, the framework of Ref.~\cite{Belenchia2019} also has another serious limitation: it is formulated solely in terms of the stochastic master equation obeyed by the system; that is, it does not require an explicit model of the environment, but only which type of open dynamics it produces.
There has been increasing evidence that a proper formulation of thermodynamics in the quantum regime is only possible if information on the environment and the system-environment interactions are provided~\cite{Landi2020a}.
Reduced descriptions, based only on master equations, can show apparent violations of the $2^{\text{nd}}$ law~\cite{Levy2014}, something which can only be resolved by introducing a specific model of the environment~\cite{DeChiara2018}.
In this paper we put forth a very general framework for describing the thermodynamics of continuously monitored systems, where measurements are only done indirectly in the bath.
The formalism applies to a broad variety of systems and process, and is particularly suited for describing ISSs.
The building block we use is to replace the continuous dynamics by a stroboscopic evolution in small time-steps, described in terms of a collisional model (CM)~\cite{Rau1963,Scarani2002,Ziman2002,Englert2002,Attal2006a,Karevski2009,Pellegrini2009,Giovannetti2012,Rybar2012a,Strasberg2016}.
This has two main advantages.
First, the thermodynamics of CMs is by now very well understood~\cite{Strasberg2016,Rodrigues2019,DeChiara2018,Barra2015,Pereira2018} (see also~\cite{Landi2020a} for a recent review).
And second, CMs naturally emerge in quantum optics, from a discretization of the field operator into discrete time-bins~\cite{Ciccarello2017,Gross2017a}.
The typical scenario is a system interacting with an optical cavity, where a constant flow of photons is injected by an external pump [cf. Fig.~\ref{fig:drawings}(a)]. At each time step, the system will only interact with a certain time-window of the input/output field, thus transforming the dynamics into that of a series of sequential collisions between the system and some ancilla.
Due to this connection, collisional models serve as a convenient tool for constructing the framework of continuous measurements in experimentally relevant systems.
We refer to these as Continuously Monitored Collisional Models ($\text{CM}^2$).
\begin{figure*}
\centering
\includegraphics[width=0.9\textwidth]{drawings.pdf}
\caption{\label{fig:drawings}
(a) A typical method for continuously monitoring a system is to couple it to an optical cavity and measure the photons leaking out.
(b) In a collisional model picture, the monitoring is introduced instead through a series of sequential collisions between the system $X$ and independent ancillae $Y_t$, which are subjected to measurement after each collision.
(c) Diagrammatic representation of the model. The system is described stroboscopically (discrete time) by a state $\rho_{X_t}$. At each instant of time, it interacts with an independent ancilla, prepared in state $\rho_Y$, according to the map in Eq.~\eqref{global_map}.
Afterwards, the ancillae are measured, as described by generalized measurement operators $\{M_z\}$, which produce a classical (and random) outcome $z_t$.
(d) As time progresses, one builds up a measurement record $\zeta_t = (z_1,\ldots,z_{t})$, which contains all the information acquired about $X$ up to time $t$.
}
\end{figure*}
Our paper is organized as follows.
Sec.~\ref{sec:setup} establishes the basic framework, including the collisional setup. The corresponding information flows and thermodynamic features are characterized in Sec.~\ref{sec:info}, which also contains the main contribution of this work: namely the construction of a conditional $2^{\text{nd}}$ law, which is capable of capturing the interplay between thermodynamics and information. In Sec.~\ref{sec:qubits}, we apply the $\text{CM}^2$ framework to models involving qubits providing some illustrative applications.
Accompanying this manuscript, we also make publicly available a self-contained numerical library in Mathematica, for carrying out stochastic simulations of $\text{CM}^2$s \footnote{The code can be downloaded \href{https://www.wolframcloud.com/obj/gtlandi/Published/CM2_qubit_models.nb}{here}.}.
Finally, in Sec.~\ref{sec:conc} we draw our conclusions and highlight the perspectives opened by our approach.
\section{\label{sec:setup}Continuously measured collisional models ($\text{CM}^2$)}
Here we develop the basic framework of $\text{CM}^2$.
We consider a system $X$, with initial density matrix $\rho_{X_0}$, which is put to interact sequentially with a series of independent and identically prepared (iid) ancillae, labelled $Y_1$, $Y_2$ etc., and prepared always in the same state $\rho_{Y_t} = \rho_Y$.
Time is labeled in discrete units of $t = 0,1,2,3,\ldots$.
The collision taking the system from ${t-1}$ to ${t}$ is described by a unitary $U_{t}$ acting only between the system $X$ and ancilla $Y_{t}$ as (Fig.~\ref{fig:drawings}(b)):
\begin{equation}\label{global_map}
\rho_{X_{t}Y_{t}'} = U_t(\rho_{X_{t-1}} \otimes \rho_{Y_t}) U_t^\dagger,
\end{equation}
where $Y_t'$ refers to the state of ancilla $Y_t$ after the collision.
Taking the partial trace over the ancilla leads to the stroboscopic (Markovian) map
\begin{equation}\label{unconditional_map}
\rho_{X_{t}} = \mathcal{E}(\rho_{X_{t-1}}) := \tr_{Y_t} \left\{\rho_{X_{t}Y_{t}'}\right\}
\end{equation}
Notice that $\mathcal{E}$ does not need to carry an index $t$, since it is the same for all collisions.
After such map, the ancilla $Y_t'$ never participates again in the dynamics and, for the next step, a fresh ancilla $Y_{t+1}$ is introduced and the map in Eq.~\eqref{unconditional_map} is repeated.
Information on the state of the system is acquired indirectly by measuring the states $\rho_{Y_t}'$ of each ancilla after they collided with $X$.
The measurement is described by a set of generalized measurement operators $\{M_z\}$, satisfying $\sum_z M_z^\dagger M_z = \openone$, so that outcome $z_t$ occurs with probability
\begin{equation}\label{Pz}
P(z_t) = \tr\Big\{ M_{z_t} \rho_{Y_t}' M_{z_t}^\dagger \Big\}.
\end{equation}
By using generalized measurements, we encompass both projective, as well as weak measurements in the bath.
A diagrammatic depiction of the dynamics is shown in Fig.~\ref{fig:drawings}(c).
A $\text{CM}^2$ is completely described by specifying $\{ \rho_Y, U, M_z\}$.
The distribution in Eq.~\eqref{Pz} concerns only the marginal statistics of a single outcome.
Our interest will be instead on the \emph{joint statistics} of the set of measurement records
\begin{equation}\label{zeta}
\zeta_t = (z_1, \ldots, z_t).
\end{equation}
The indices are chosen so that $\zeta_t$ contains all information about the system available up to time $t$.
As $\zeta$ encompasses the entire measurement record, it is associated with the ``integrated'' information on $X$. Conversely, $z_t$ represents a \emph{differential information gain} associated only with the step $X_{t-1} \to X_{t}$ (Fig.~\ref{fig:drawings}(d)).
The joint distribution $P(\zeta_t)$ is given by
\begin{equation}
P(\zeta_t) = \tr_{XY_1\ldots Y_{t}} \Big\{ M_{z_{t}} \ldots M_{z_1} \rho_{XY_1\ldots Y_{t}} M_{z_1}^\dagger \ldots M_{z_{t}}^\dagger \Big\},
\end{equation}
where
\begin{equation*}
\rho_{XY_1\ldots Y_{t}} = \left(\Pi^t_{k=1}U_{k}\right)\left( \rho_{X_0} \bigotimes^t_{j=1} \rho_{Y_j} \right)\left( \Pi^t_{k=1}U_{k}\right)^\dagger.
\end{equation*}
Note that since the measurements act only on those ancillae that no longer participate in the dynamics, it is irrelevant whether the measurement $M_{z_t}$ occurs before the next evolution with $Y_{t+1}$ or not.
Finally, we also require the \emph{conditional state} of the system $\rho_{X_t|\zeta_t}$, which quantifies the knowledge the experimenter has about the system, {given} that the measurement record $\zeta_t$ was observed.
Such state is given by
\begin{equation}\label{conditional_state}
\rho_{X_t|\zeta_t} = \frac{1}{P(\zeta_t)} \tr_{Y_1\ldots Y_{t}} \Big\{
\left(\Pi^t_{k=1}M_{z_k}\right) \rho_{XY_1\ldots Y_{t}}
\left(\Pi^t_{k=1}M_{z_k}\right)^\dagger \Big\}.
\end{equation}
As the measurements are performed only on the ancillae, there is never a direct backaction on the system, which is expressed mathematically by
\begin{equation}\label{marginal_rho_Xs}
\sum\limits_{\zeta_t} P(\zeta_t) \rho_{X_t | \zeta_t} = \rho_{X_t}
\end{equation}
for any choice of generalized measurements $\{M_z\}$.
That is, the average of $\rho_{X_t|\zeta_t}$ over all outcomes $\zeta_t$ yields back the unconditional state $\rho_{X_t}$.
Thus, while there may be a conditional backaction, unconditionally the measurement is non-invasive.
The normalization factor $P(\zeta_t)$ in Eq.~\eqref{conditional_state} introduces a unwanted complication, as it
forbids us to write $\rho_{X_t|\zeta_t}$ as a map acting on $\rho_{X_{t-1} | \zeta_{t-1}}$.
This can be resolved, however, if we work with unnormalized states.
We define the completely positive, trace non-preserving map
\begin{equation}\label{conditional_map_def}
\mathcal{E}_z(\rho_X) = \tr_Y \Big\{ M_z U (\rho_X \otimes \rho_Y) U^\dagger M_z^\dagger \Big\},
\end{equation}
which is indexed by the possible outcomes $z$ of the measurements.
Instead of working with $\rho_{X_t|\zeta_t}$ in Eq.~\eqref{conditional_state}, we consider the unnormalized states $\varrho_{X_t|\zeta_t}$, defined as the sequence generated by the map
\begin{equation}\label{conditional_map}
\varrho_{X_{t} | \zeta_{t} } = \mathcal{E}_{z_t} \big( \varrho_{X_{t-1}|\zeta_{t-1}}\big)
\end{equation}
with initial condition $\varrho_{X_0|\zeta_0} = \rho_{X_0}$. One may readily verify that
\begin{equation}\label{normalization_Pzeta}
\tr_X \varrho_{X_t|\zeta_t} = \tr_X \Big\{ \mathcal{E}_{z_{t}} \circ \ldots \circ \mathcal{E}_{z_1} (\rho_{X_0}) \Big\} = P(\zeta_t).
\end{equation}
The states $\varrho_{X_t|\zeta_t}$ therefore contain the outcome distribution $P(\zeta_t)$ at any given time.
And the normalized state in~\eqref{conditional_state} is recovered as $\rho_{X_t|\zeta_t} = \varrho_{X_t|\zeta_t} / P(\zeta_t)$.
It is useful to keep in mind the interpretation of a $\text{CM}^2$ as a Hidden Markov model~\cite{Darwiche2009,Neapolitan2003,Ito2013}.
The system evolution is Markovian, but this is hidden from the observer who is partially ignorant about its dynamics: access to $X$ is only possible through the classical outcomes $\zeta_t$.
In the language of Bayesian networks, the key issue entailed by our framework is thus about the predictions that can be made on the state of the hidden layer $X$ given the information available through the visible layer of the outcomes $\zeta_t$ only.
This highlights the nice interplay between quantum and classical features, present in these models:
The evolution of the system is quantum but information is only accessed through classical data.
We have also found it illuminating to understand what would be the classical version of a $\text{CM}^2$, as this allows us to relate our framework directly with the classical formalism of Ito, Sagawa and Ueda~\cite{Sagawa2012,Ito2013}.
This is addressed in Appendix~\ref{app:incoherent_models}, where we also discuss the conditions for a $\text{CM}^2$ to be incoherent.
\section{\label{sec:info} Information and thermodynamics}
\subsection{Quantum-classical information}
The information content in the unconditional state $\rho_{X_t}$ can be quantified by the von Neumann entropy $S(X_t) \equiv S(\rho_{X_t}) = - \tr \rho_{X_t} \ln \rho_{X_t}$.
Similarly, the information in the conditional state $\rho_{X_t|\zeta_t}$ (properly normalized) is quantified by
\emph{quantum-classical} conditional entropy
\begin{equation}\label{condS}
S(X_t | \zeta_t) = \sum\limits_{\zeta_t} P(\zeta_t) S(\rho_{X_t|\zeta_t}).
\end{equation}
Each term $S(\rho_{X_t|\zeta_t})$ quantifies the information for one specific realization $\zeta_t$, and
$S(X_t | \zeta_t)$ is then an average over all trajectories.
Note also that this is not the quantum conditional entropy, a quantity which can be negative.
Here, since we are conditioning on classical outcomes, $S(X_t | \zeta_t)$ is always strictly non-negative.
In this paper all conditional entropies will be of this form.
The mismatch between $S(X_t)$ and $S(X_t|\zeta_t)$ is given by the \emph{Holevo information} (or Holevo quantity)~\cite{Holevo1973}
\begin{equation}\label{holevo}
I(X_t \! :\! \zeta_t) := S(X_t) - S(X_t | \zeta_t).
\end{equation}
It quantifies the information about $X$ contained in the classical outcomes $\zeta_t$.
Its interpretation becomes clearer by casting it as
\begin{equation}\label{holevo_KL}
I(X_t \! :\! \zeta_t)= \sum\limits_{\zeta_t} P(\zeta_t) \;D\big( \rho_{X_t|\zeta_t} || \rho_{X_t}\big) \geqslant 0,
\end{equation}
where $D(\rho||\sigma) = \tr(\rho \ln \rho - \rho \ln \sigma)$ is the quantum relative entropy.
Therefore, $I(X_t \! :\! \zeta_t)$ is the weighted average of the ``distance'' between $\rho_{X_t|\zeta_t}$ and $\rho_{X_t}$.
The Holevo information reflects the \emph{integrated} information, acquired about the system, up to time $t$.
This is different from the small increment that is obtained from a single outcome $z$, at each step.
In order to quantify such \emph{differential} information gain, the natural quantity is the conditional
Holevo information
\begin{IEEEeqnarray}{rCl}\label{gain}
G_t := I_c(X_{t}\!:\! z_{t}| \zeta_{t-1})
&=& I(X_{t}\!:\! \zeta_{t}) - I(X_{t}\!:\! \zeta_{t-1}) \\[0.2cm]
&=& S(X_t|\zeta_{t-1}) - S(X_t | \zeta_t).
\nonumber
\end{IEEEeqnarray}
It describes the correlations between $X_t$ and the latest available outcome $z_{t}$, given the past outcomes $\zeta_{t-1} = (z_1,\ldots,z_{t-1})$.
The first term involves the state $\rho_{X_t|\zeta_{t-1}}$, which stands for the state of the system at time $t$, conditioned on all measurement records, except the last one.
In symbols, it can thus be written as
\begin{equation}\label{intermediate_unconditional_state}
\rho_{X_t|\zeta_{t-1}} = \mathcal{E}(\rho_{X_{t-1}|\zeta_{t-1}}),
\end{equation}
where $\mathcal{E}$ is the unconditional map in Eq.~\eqref{unconditional_map}.
This therefore affords a beautiful interpretation to
Eq.~\eqref{gain}.
Starting at $\rho_{X_{t-1}|\zeta_{t-1}}$, one compares two paths:
a conditional evolution taking $\rho_{X_{t-1}|\zeta_{t-1}} \to \rho_{X_t|\zeta_t}$ and a unconditional evolution taking
$\rho_{X_{t-1}|\zeta_{t-1}} \to \rho_{X_t|\zeta_{t-1}}$.
Eq.~\eqref{gain} measures the gain in information of the latter, compared to the former.
\subsection{Information rates and informational steady-states}
Eq.~\eqref{holevo} is always non-negative. However, this does not imply that it will necessarily increase with time.
In fact, the \emph{information rate}
\begin{equation}\label{Delta_I}
\Delta I_t := I(X_t \! :\! \zeta_t) - I(X_{t-1} \! :\! \zeta_{t-1})
\end{equation}
can take any sign.
This reflects the trade-off between the gain in information and the measurement backaction.
A natural question is then whether it is possible to split $\Delta I_t$ as the difference between two strictly non-negative terms, the first naturally identified with the differential gain of information~\eqref{gain}, and the second to the differential information loss.
That is, whether a splitting of the form
\begin{equation}\label{Delta_I_splitting}
\Delta I_t= G_t - L_t,
\end{equation}
would lead to the identification of a loss term $L_t$ which is strictly non-negative. As we will see in what follows, the answer to this question is in the positive.
To find a formula for $L_t$ we simply insert the first line of~\eqref{gain} into Eq.~\eqref{Delta_I} to find
\begin{equation}\label{loss}
L_t := I(X_{t-1} \! : \! \zeta_{t-1}) - I(X_t \! : \! \zeta_{t-1}).
\end{equation}
This is already clearly interpretable as a loss term, as it measures how information is degraded by the map in Eq.~\eqref{intermediate_unconditional_state}.
Indeed, we can show that it is strictly non-negative.
To do that, we use Eq.~\eqref{holevo_KL} to write $L_t$ as
\begin{equation}
\label{Lt}
L_t = \sum\limits_{\zeta_{t-1}} P(\zeta_{t-1}) \Big[
D(\rho_{X_{t-1} | \zeta_{t-1}} || \rho_{X_{t-1}})-D(\rho_{X_t | \zeta_{t-1}} || \rho_{X_t} ) \Big].
\end{equation}
But $\rho_{X_t} = \mathcal{E} (\rho_{X_{t-1}})$ [Eq.~\eqref{unconditional_map}] and $\rho_{X_t|\zeta_{t-1}} = \mathcal{E} (\rho_{X_{t-1} | \zeta_{t-1}})$ [Eq.~\eqref{intermediate_unconditional_state}].
Together with
the data processing inequality~\cite{Nielsen}, this is enough to ascertain the non-negativity of $L_t$ for any quantum channel $\mathcal{E}$.
In the long time limit the system may reach a steady-state where $I_\infty$ no longer changes, so $\Delta I_\infty = 0$.
This does not necessarily mean $G_\infty = L_\infty= 0$, however.
It might simply stem from a mutual balancing of gains and losses. That is, $G_\infty = L_\infty\neq 0$.
We define an informational steady-state (ISS) as the asymptotic state for which
\begin{equation}\label{ISS}
\Delta I_\text{ISS} = 0 \quad \text{ but} \quad G_\text{ISS} = L_\text{ISS} \neq 0.
\end{equation}
In an ISS, information is continuously acquired, but this is balanced by the noise that is introduced by the measurement.
Crucially, the ISS does \emph{not} mean that $\rho_{X_t|\zeta_t}$ is no longer changing.
This state is stochastic and thus continues to evolve indefinitely. Instead, what become stationary is the stochastic distribution of states in state-space~\cite{Ficheux2018}.
\subsection{Unconditional $2^{\text{nd}}$ law}\label{3c}
Next we turn to the thermodynamics.
The $2^{\text{nd}}$ law of thermodynamics characterize
the degree of irreversibility of a certain process and
can be formulated in purely information-theoretic terms.
This allows it to be extended beyond standard thermal environments, and also to avoid difficulties associated with the definition of heat and work, which can be quite problematic in the quantum regime~\cite{Landi2020a}.
At each collision, the entropy of the system will change from $S(X_t)$ to $S(X_{t+1})$.
This change, however, may be either positive or negative.
The goal of the $2^{\text{nd}}$ law is to identify a contribution to this change associated with the flow of entropy between system and ancilla, and another representing the entropy that was irreversibly produced in the process.
The separation thus takes the form
\begin{equation}\label{2nd}
\Delta \Sigma_t^u= S(X_t) - S(X_{t-1}) +\Delta \Phi_t^u,
\end{equation}
where $\Delta\Phi_t^u$ is the unconditional flow rate of entropy \emph{from} the system \emph{to} the ancilla in each collision, and $\Delta\Sigma_t^u$ is the unconditional rate of entropy produced in the process.
The $2^{\text{nd}}$ law is summarized by the statement that we should have $\Delta \Sigma_t^u\geq 0$.
Eq.~\eqref{2nd} is merely a definition, however.
The goal is precisely to determine the actual forms of $\Delta\Phi_t^u$ and $\Delta\Sigma_t^u$.
In standard thermal processes, this is usually accomplished by postulating that the entropy flow $\Delta \Phi_t^u$ should be linked with the heat flow $\dot{Q}_t$ entering the ancillae through Clausius' expression~\cite{Fermi1956} $\Delta\Phi_t^u = \beta \dot{Q}_t$, where $\beta$ is the inverse temperature of the thermal state the ancillae are in.
By fixing $\Delta \Phi_t^u$ we then also fix $\Delta \Sigma_t^u$.
This, however, only holds for thermal ancillae, thus restricting the range of applicability of the formalism.
Instead, we approach the problem using the framework developed in Ref.~\cite{Esposito2010a} (see also \cite{Manzano2017a,Strasberg2016}), which formulates the entropy production rate in information theoretic terms, as
\begin{equation}\label{sigma}
\Delta \Sigma_t^u= \mathcal{I}(X_t\!:\!Y_{t}') + D(Y_t'||Y_{t}) \geqslant 0,
\end{equation}
where $\mathcal{I}(X_t\!:\!Y_{t}') = S(\rho_{X_{t}}) + S(\rho_{Y_{t}}')- S(\rho_{X_tY_t'})$ is the quantum mutual information between system and ancilla after Eq.~\eqref{global_map} and $D(Y_t'||Y_t) = D(\rho_{Y_t'} || \rho_{Y_t})$ is the relative entropy between the state of the ancilla before and after the collision.
The first term thus accounts for the correlations that built up between system and ancilla, while the second measures the amount by which the ancillae were pushed away from their initial states.
Thus, from the perspective of the system, irreversibility stems from tracing over the ancillae after the interaction in such a way that all quantities related either to the local state of the ancilla, or to their global correlations, are irretrievable~\cite{Manzano2017a}.
As the global map in Eq.~\eqref{global_map} is unitary, and the system and ancillae are always uncorrelated before a collision, it follows that
\begin{equation}
S(\rho_{X_tY_t'}) =S(\rho_{X_{t-1}Y_t})= S(\rho_{X_{t-1}}) + S(\rho_{Y_t}).
\end{equation}
Hence, the mutual information may also be written as
\begin{equation}\label{MI_sum_entropies}
\mathcal{I}(X_{t}\!:\!Y'_{t}) = S(X_t) + S(Y_{t}') - S(X_{t-1}) - S(Y_{t}).
\end{equation}
Plugging this in Eq.~(\ref{sigma}) and comparing with Eq.~(\ref{2nd}) then allows us to identify the entropy flux as
\begin{equation}
\label{phi}
\Delta\Phi_t^u = S(Y_{t}') - S(Y_{t}) + D(Y_{t}'||Y_{t})= \tr\Big\{ (\rho_{Y_t} - \rho_{Y_t'}) \ln \rho_{Y_t}\Big\}.
\end{equation}
The entropy flux is seen to depend solely on the degrees of freedom of the ancilla.
Although Eq.~(\ref{phi}) is general and holds for arbitrary states of the ancillae, it reduces to $\beta \dot{Q}$, as in the Clausius expression, if $\rho_Y$ is thermal.
Another very important property of the entropy flux is additivity.
What we call an ``ancilla'' may itself be a composed system consisting of multiple elementary units.
In fact, as we will illustrate in Sec.~\ref{sec:qubits}, this can give rise to interesting situations. Suppose that $Y_t = (Y_{t1}, Y_{t2},\ldots, Y_{tN})$ and that the units are prepared in a globally product state
$\rho_{Y_t} = \bigotimes^N_{j=1} \rho_{Y_{tj} }$.
After colliding with the system, the state $\rho_{Y_t'}$ might no longer be uncorrelated, in general.
Despite this, owing to the structure of Eq.~\eqref{phi}, we would have
\begin{equation}\label{phi_multiple}
\Delta \Phi_t^u = \sum\limits^N_{j=1} \Delta \Phi_{tj}^u = \sum\limits^N_{j=1} \tr\Big\{(\rho_{Y_{tj}'} - \rho_{Y_{tj}}) \ln \rho_{Y_{tj}}\Big\},
\end{equation}
where $\rho_{Y_{tj}'}$ is the post-collision reduced state of the $j^\text{th}$ unit of the ancilla.
This property is quite important, as it allows one to compute the flux associated to each dissipation channel acting on the system.
\subsection{Conditional $2^{\text{nd}}$ law}\label{3d}
Eqs.~(\ref{2nd}), (\ref{sigma}) and (\ref{phi}) specify the thermodynamics of the unconditional trajectories $\rho_{X_t}$, when no information about the ancillae is recorded.
We now ask the same question for the conditional trajectories $\rho_{X_t|\zeta_t}$. In this case, the relevant entropy is the quantum-classical conditional entropy $S(X_t|\zeta_t)$ in Eq.~\eqref{condS}.
Thus, we search for a splitting analogous to Eq.~(\ref{2nd}), but of the form
\begin{equation}\label{2nd_cond}
\Delta\Sigma_t^c = S(X_{t}|\zeta_{t}) - S(X_{t-1}|\zeta_{t-1}) +\Delta \Phi_t^c,
\end{equation}
where $\Delta\Sigma_t^c$ and $\Delta \Phi_t^c$ are the conditional counterparts of the unconditional quantities used in Sec.~\ref{3c}.
The identification of suitable forms for such quantities is the scope of this Section.
We adopt an approach similar to that used in Refs.~\cite{Breuer2003,Belenchia2019}, which consists in defining the conditional flux rate as the natural extension of Eq.~(\ref{phi}) to the conditional case.
That is, as $\Delta \Phi_t^c$ refers to a specific collision, it should depend only on quantities pertaining to the specific ancilla $Y_t$, thus being of the form
\begin{equation}\label{phi_c}
\Delta\Phi_t^c = S(Y_t'|z_t) - S(Y_t) + \sum\limits_{z_t} P(z_t) D\big( \rho_{Y_t'|z_t} \big| \big| \rho_{Y_t}\big),
\end{equation}
where $\rho_{Y_t'|z_t}=({M_{z_t} \rho_{Y_t'} M_{z_t}^\dagger})/{P(z_t)}$ is the final state of the ancilla given outcome $z_t$ and
$P(z_t) = \tr\big(M_{z_t} \rho_{Y_t'} M_{z_t}^\dagger)$ [cf. Eq.~\eqref{Pz}].
Moreover, $S(Y_t'|z_t)$ is defined similarly to Eq.~\eqref{condS}.
Note how the causal structure of the model implies that the flux should be conditioned only to outcome $z_t$, instead of the entire measurement record $\zeta_t$.
By defining the reconstructed state of the ancilla after the measurement $\tilde{\rho}_{Y_t'} = \sum_{z_t} P(z_t) \rho_{Y_t'|z_t} = \sum_{z_t} M_{z_t} \rho_{Y_t'} M_{z_t}^\dagger$, Eq.~\eqref{phi_c} can be recast into the for
\begin{equation}\label{phi_c_tmp}
\Delta\Phi_t^c = \tr \Big\{ (\rho_{Y_t} - \tilde{\rho}_{Y_t'}) \ln \rho_{Y_t}\Big\},
\end{equation}
which showcases the potential difference between conditional and unconditional fluxes. Depending on the measurement strategy $\{M_z\}$ being adopted, it is reasonable to expect that $\rho_{Y_t'}\neq\tilde{\rho}_{Y_t'}$, thus resulting in $\Delta\Phi_t^u\neq\Delta\Phi_t^c$.
This reflects the potentially invasive nature of the measurements on the ancilla.
However, it should be noted that this is an extrinsic effect, related to the specific choice of measurement by the observer, and fully unrelated to the thermodynamics of the system-ancilla interactions.
We will henceforth assume that the measurement strategy is such that
\begin{equation}\label{measurement_condition}
\tr\{\tilde{\rho}_{Y_t'} \ln \rho_{Y_t}\} = \tr\{\rho_{Y_t'} \ln \rho_{Y_t}\}.
\end{equation}
That is, it that does not change the population of $Y_t'$ in the eigenbasis of the \emph{original} state $\rho_{Y_t}$.
This can be accomplished, for instance, by measuring in the same basis into which the state of the ancillae is prepared.
We can then reach the important conclusion that
\begin{equation}\label{phi_c_uc}
\Delta\Phi_t^c =\Delta \Phi_t^u.
\end{equation}
This result is intuitive: Conditioning on the outcome is a subjective matter, related to whether or not we read out the outcomes of the experiment.
It should therefore have no effect on how much entropy flows to the ancillae.
Similar ideas were also used in many contexts~\cite{Breuer2003,Sagawa2012,Funo2013,Strasberg2019a}.
However, these studies were concerned with the heat flux, which coincides with the entropy flux for thermal baths. Here we show that this is a general property, valid for any bath, provided we restrict to the special class of measurements characterized by Eq.~\eqref{measurement_condition}.
Under these conditions,
comparing Eqs.~\eqref{2nd_cond} and ~(\ref{2nd}), and reminding of the information rate in Eq.~\eqref{Delta_I}, we find
\begin{equation}\label{two_sigmas}
\Delta\Sigma_t^c = \Delta \Sigma_t^u- \Delta I_t.
\end{equation}
This is a key result of our framework: It shows how the act of conditioning the dynamics on the measurement outcome changes the entropy production by a quantity associated with the change in the Holevo information.
Hence, it serves as a bridge between the information rates and thermodynamics.
In particular, in an ISS, $\Delta I_\text{ISS} = 0$ and so
$\Delta \Sigma_\text{ISS}^c = \Delta \Sigma_\text{ISS}^u$,
although $\rho_{X_t}$ and $\rho_{X_t|\zeta_t}$ are in general different.
\subsection{Properties of the conditional entropy production}
We now move on to discuss the main properties of the conditional entropy production.
The quantities $\Delta \Sigma_t^u$ and $\Delta \Sigma_t^c$ refer to the incremental entropy production in a single collision.
Conversely, it is also of interest to analyze the integrated entropy production
\begin{equation}
\Sigma_t^\alpha = \sum\limits_{\tau=1}^t \Delta \Sigma_\tau^\alpha,\qquad \alpha = u,c.
\end{equation}
Since $\Delta I_t$ in Eq.~\eqref{Delta_I} is an exact differential, when we sum Eq.~\eqref{two_sigmas} up to time $t$, the terms in $\Delta I_\tau$ successively cancel, leaving only
\begin{equation}\label{integrated_sigmas}
\Sigma_t^c = \Sigma_t^u - I(X_t \! : \! \zeta_t).
\end{equation}
The integrated entropy production up to time $t$ therefore depends only on the net information $I(X_t\! : \! \zeta_t)$.
Since $I(X_t\! : \! \zeta_t) \geqslant 0$, it then follows that
\begin{equation}\label{integrated_sigma_bound_cu}
\Sigma_t^u \geqslant \Sigma_t^c.
\end{equation}
Therefore, \emph{conditioning makes the process more reversible}.
This happens because we only carry out measurements in the environment, so that there is never a direct backaction in the system.
A stronger bound can also be obtained by using the fact that $L_t \geqslant 0$, which then leads to
\begin{equation}
\Sigma_u - \Sigma_c \geqslant \sum\limits_{\tau=1}^t G_\tau.
\end{equation}
The reduction in entropy production is thus \emph{at least} the total information gain.
Returning now to the entropy production rate in each collision, in Appendix~\ref{app:proof_2ndlaw_conditional} we provide a proof of the following relation
\begin{equation}\label{delta_sigma_c_inequality}
\Delta \Sigma_t^c \geqslant D(Y_{t}' || Y_{t}) + I(Y_{t}' \! : \! \zeta_{t}) \geqslant 0,
\end{equation}
where $D(Y_{t}' || Y_{t})$, is the backaction caused in the ancillary state due to its collision with the system, while $I(Y_{t}' \! : \! \zeta_{t-1})$ quantifies the amount of information gained about the ancilla through the measurement strategy.
This is one of the overarching conclusions of our work, bearing remarkable consequences.
On the one hand, it proves that the $2^{\text{nd}}$ law continues to be satisfied in the conditional case.
On the other hand, it provides a non-trivial lower bound to the conditional entropy production rate in terms of the changes that take place in the \emph{ancillae} only.
It should also be noted that, the first inequality in Eq.~\eqref{delta_sigma_c_inequality} is saturated by processes where the measurement extracts all the information available.
\section{\label{sec:qubits}Simple qubit models}
We now apply the ideas of the previous sections to simple models of $\text{CM}^2$s, aimed at illustrating their overarching features while keeping the level of technical details to a minimum, so as to emphasize the physical implications of the framework illustrated so far.
We will focus on the case in which both the system and the elementary units of the ancilla are qubits. Despite their simplicity, such situations have far-reaching applications.
For instance, in Ref.~\cite{Gross2017a} it was shown how quantum optical stochastic master equations naturally emerge from modeling opticals baths in terms of effective qubits in a collisional model.
Moreover, suitably chosen measurement stategies $\{M_z\}$ implemented on qubits allow also to simulate widely used measurement schemes, such as photo-detection, homodyne and heterodyne measurements. Finally, by tuning the initial state of the qubits, one can also simulate out-of-equilibrium environments, such as squeezed baths. In Ref.~\cite{tofollow}, we complement the study reported here by addressing explicitly the case of continuous-variable systems.
Recall that a $\text{CM}^2$ is completely specified by setting $\{ \rho_Y, U, M_z\}$.
The unconditional dynamics is governed by the map $\mathcal{E}$ defined in Eq.~\eqref{unconditional_map}, which can be simulated directly with very low computational cost.
The conditional dynamics, on the other hand, is governed by the map $\mathcal{E}_z$ in Eqs.~\eqref{conditional_map_def} and~\eqref{conditional_map}, which we simulate using stochastic trajectories.
\subsection{\label{ssec:single_qubit}Single-qubit ancilla}
\begin{figure*}
\includegraphics[width=0.9\textwidth]{single_qubit.pdf}
\caption{
(a) Dynamics of a $\text{CM}^2$ under a quantum homogenization process where both system and ancilla are qubits.
(b) Unconditional and conditional entropies.
(c) Information rate $\Delta I_t$ [Eq.~\eqref{Delta_I}], and its splitting into a gain and loss term [Eq.~\eqref{Delta_I_splitting}].
(d) Unconditional and conditional entropy production rates, $\Delta \Sigma_t^u$ and $\Delta \Sigma_t^c$, as well as the entropy flux $\Delta \Phi_t$.
(e) Integrated unconditional and conditional entropy productions, and net Holevo information $I(X_t\! : \! \zeta_t)$ [c.f. Eq.~\eqref{integrated_sigmas}].
(f), (g), (h) Sample stochastic trajectories of $\Delta I_t$, $G_t$ and $L_t$.
We have taken $f=g=0.3$ (the results do not depend qualitatively on such choices) while details on how we chose $\rho_Y$, $\rho_{X_0}$, $U$ and $\{M_z\}$ are explained in the main text.
}
\label{fig:single_qubit}
\end{figure*}
We begin by studying the case where the system interacts with single-qubit ancillae
prepared in the thermal state
$\rho_Y = f|0\rangle\langle 0 |_Y + (1-f) |1\rangle\langle 1|_Y$, where
$f\in[0,1]$ and $\ket{0}, \ket{1}$ is the computational basis --- i.e., the eigenstates of the Pauli-$z$ operator $\sigma^z_Y=|1\rangle\langle 1 |_Y-|0\rangle\langle 0 |_Y$.
The collisions are modeled by a partial SWAP gate $U = e^{- i g(\sigma_X^+ \sigma_Y^- + \sigma_X^- \sigma_Y^+)}$, where $\sigma_{\alpha}^+=\left(\sigma_{\alpha}^-\right)^\dagger=\ket{1}\bra{0}_\alpha$ is the Pauli raising operator ($\alpha=X,Y$).
Finally, we assume that the ancillae are measured in the computational basis, so that
$M_0 = |0\rangle\langle 0 |_Y$ and $M_1 = |1\rangle\langle 1|_Y$.
For concreteness, we take the initial state of the system to be
$\rho_{X_0} = |x_+\rangle\langle x_+|_X$, where $\sigma^x_X|x_+\rangle_X= |x_+\rangle_X$.
The evolution of the relevant information and thermodynamic quantities of the problem, for a specific choice of $f$ and $g$, is presented in Fig.~\ref{fig:single_qubit}.
Panel (b) shows
how conditioning always reduces our ignorance about the system, by demonstrating that $S(X_t|\zeta_t) \leqslant S(X_t)$ at all times.
As the model being considered implement a homogenization process~\cite{Scarani2002,Ziman2002}, the steady state $\rho_{X_\infty}$ coincides with the initial state of the ancilla, $\rho_{X_\infty} = \rho_Y$.
This causes $U(\rho_{X_\infty} \otimes \rho_Y)U^\dagger = \rho_{X_\infty} \otimes \rho_Y$, so no information can be acquired anymore.
The final state is thus an equilibrium state, not an ISS.
The information rate, gain and loss are shown in Fig.~\ref{fig:single_qubit}(c).
Initially the gain is very large, as the state of the system is significantly different from the thermal steady state and each measurement results in a significant acquisition of information. In turn, this results in $\Delta I_t > 0$. As the system evolves towards $\rho_{X_\infty}$, the detrimental effect of homogenization starts prevailing over the information gain, causing an inversion in the sign of $\Delta I_t$. The long-time limit is associated with $(\Delta I_\infty, G_\infty, L_\infty)\to 0$ and no ISS emerges.
A comparison between the conditional and unconditional entropy production is shown in Fig.~\ref{fig:single_qubit}(d), which also reports on the entropy flux.
The rates $\Delta \Sigma_t^c$ and $\Delta \Sigma_t^u$ are both non-negative, but are not necessarily ordered.
This happens because, in individual collisions, conditioning may not make the process more reversible. An ordering is instead enforced when looking at integrated quantities: Conditioning always reduces the entropy production [cf. Eq.~\eqref{integrated_sigmas}], as shown in Fig.~\ref{fig:single_qubit}(e).
For completeness, we also show in Figs.~\ref{fig:single_qubit}(f), (g), (h) the behavior of $\Delta I_t$, $G_t$ and $L_t$ along six randomly sampled trajectories $\zeta_t$.
Typical stochastic fluctuations are observed, showing that in a single stochastic run, the net gain and loss can differ substantially (the curves in Fig.~\ref{fig:single_qubit}(b)-(e) were produced by averaging over 2000 such trajectories).
\subsection{\label{ssec:two_qubit_ancilla}Two-qubit ancilla}
We now move on to consider a case
allowing the emergence of ISSs, opening up many interesting possibilities.
\begin{figure*}
\includegraphics[width=0.9\textwidth]{two_qubits_ex1.pdf}
\caption{
Same as Fig.~\eqref{fig:single_qubit}, but for two-qubit ancillae, prepared in
$\rho_{Y^1} = f |0\rangle\langle 0 | + (1-f) |1\rangle\langle 1|$ and
$\rho_{Y_2} = |x_+\rangle\langle x_+|$. The qubits interact sequentially with the system via partial SWAPs and only ancilla $Y_1$ is measured.
In contrast to Fig.~\eqref{fig:single_qubit}, this model has a non-trivial ISS ($G = L \neq 0$). We have taken, for concreteness, $f = g_1 = 0.3$ and $g_2 = 0.1$.
}
\label{fig:two_qubits_ex1}
\end{figure*}
The ancillae do not have to be just a single qubit, but can have arbitrary internal structure.
Moreover, within a single collision, the system does not have to interact with all elementary units simultaneously, but may do so sequentially.
We illustrate this by considering the case where each ancilla is actually 2 qubits, $Y_t = (Y_{t1},Y_{t2})$, which interact sequentially with the system (cf. Fig.~\ref{fig:two_qubits_ex1}).
The unitary $U_t$ between $X$ and $Y_t$ will then have the form
\begin{equation}\label{qubits_composition_unitaries}
U_t = U_{XY_{t2}} U_{XY_{t1}},
\end{equation}
where $U_{XY_{tj}}$ has support only over the Hilbert space of $X$ and the unit $Y_{tj}$.
As discussed in Ref.~\cite{Rodrigues2019,Landi2020a}, if the ancillae are prepared in different states, the system will not be able to equilibrate with either, but will instead keep on bouncing back and forth indefinitely. Hence, it will reach a NESS.
Moreover, if at least one of the ancillae are measured, the conditional state may embody an ISS.
To illustrate this, we assume the first unit to be prepared in a thermal state such as the one considered in Sec.~\ref{ssec:single_qubit}, while the second unit is in $|x_+\rangle$.
The unitaries in Eq.~\eqref{qubits_composition_unitaries} are chosen, as before, to be partial SWAPs with strengths $g_1$ and $g_2$.
Finally, we choose to measure only the first unit which, by being prepared in a thermal state, acts as a classical probe. On the other hand, by being endowed with quantum coherence, the second unit represents a ``resourceful state.''
In Fig.~\ref{fig:two_qubits_ex1} we report the results of an analysis similar to the one that we have performed for the previous example, for direct comparison.
The results are strikingly different as, in particular, the system now allows for an ISS.
This is visible in Fig.~\ref{fig:two_qubits_ex1}(c) from the fact that $G = L \neq 0$ when $t\to \infty$ with the thermodynamic quantities in Fig.~\ref{fig:two_qubits_ex1}(d) also converging to non-zero long-time values.
A marked difference with the case of no ISS is also seen in the behavior of the integrated entropy production in Fig.~\ref{fig:two_qubits_ex1}(e):
As the rates now remain non-zero, the integrated quantities diverge in the long-time limit.
\begin{figure*}
\includegraphics[width=0.9\textwidth]{two_qubits_ex2.pdf}
\caption{
Similar to the two-qubit scenario of Figs.~\ref{fig:two_qubits_ex1}(b)-(e), but with the initial state $\rho_{X_0}$ chosen as the fixed point $\rho_{X^*}$ of the unconditional dynamics.
}
\label{fig:two_qubits_ex2}
\end{figure*}
We can also perform another experiment that beautifully illustrates the essence of an ISS.
While the initial state used in Fig.~\ref{fig:two_qubits_ex1} was arbitrarily chosen, we could take it to be the steady-state of the unconditional dynamics.
The idea is that we first allow the system to unconditionally relax by letting it undergo a large number of collisions, and only then we start measuring.
Due to the effect of the measurements, the conditional state $\rho_{X_t|\zeta_t}$ will start to differ from unconditional steady-state (while the unconditional dynamics remains fixed).
The results are shown in Fig.~\ref{fig:two_qubits_ex2}.
Panel (a), in particular, neatly illustrates how the unconditional entropy does not change in time, while the measurements performed in the conditional strategy reduce the entropy of the state of the system, which is effectively driven to a state with a larger purity. {This is the essence of an ISS.}
\subsection{Time series in the single-shot scenario}
The quantities in Fig.~\ref{fig:single_qubit}-\ref{fig:two_qubits_ex2} were obtained by repeating the experiment multiple times, always starting from the same state and evolving in the exact same way.
We now contrast this with the single-shot scenario.
That is, when we have access only to a single stochastic realization of the experiment.
We focus on the two-qubit model where the system starts in the steady-state of the unconditional dynamics, as in Fig.~\ref{fig:two_qubits_ex2}.
The dynamics of $S(X_t|\zeta_t)$, $G_t$ and $\Delta \Sigma_t^c$ along a single trajectory is shown in Fig.~\ref{fig:time_series}.
As one might expect, these quantities fluctuate significantly.
\begin{figure*}
\includegraphics[width=\textwidth]{time_series.png}
\caption{
Thermodynamics and information in the single-shot scenario.
The configuration is the same as Fig.~\ref{fig:two_qubits_ex2}, but everything now refers to a single stochastic realization of the experiment.
The red curves depict (a) $S(X_t|\zeta_t)$, (b) $G_t$ and (c) $\Delta \Sigma_t^c$ for that single realization.
The blue curves, on the other hand, represent the accumulate average; that is, the average of the given quantity up to that time.
Image (d), in particular, shows the accumulated average for the outcomes $Z_t = (\sum_{j=1}^t z_t)/t$, where the outcomes $z_t$ are either $0$ or $1$ (not shown for visibility).
The black line in image (c) is the unconditional entropy production rate $\Delta \Sigma_t^u$, which serves as a baseline for $\Delta \Sigma_t^c$.
Images (e)-(g) are the histograms obtained from the data in (a)-(d), discarding the first 20 points (to eliminate transients).
(h) Stochastic trajectory in Bloch's sphere.
}
\label{fig:time_series}
\end{figure*}
Fig.~\ref{fig:time_series} also shows the behavior of accumulated averages, up to a certain time, showing that both the entropy and gain rate
tend to converge precisely to the ISS value in Fig.~\ref{fig:two_qubits_ex2}.
In a classical context, processes satisfying this property are called stationary ergodic~\cite{Peebles1993}.
In Fig.~\ref{fig:time_series}(d) we plot the integrated average of the actual outcomes, $Z_t = (\sum_{j=1}^t z_t)/t$, the actual outcomes being binary.
Such integrated average outcome shows that in the ISS 70\% of the clicks are associated with $M_1$ and the remaining $30\%$ with $M_0$.
Finally, the single-shot data in Fig.~\ref{fig:time_series}(a)-(d) can also be used to construct a histogram of the most relevant quantities, as illustrated in panels (e)-(h). These histograms shed light on the magnitude of the fluctuations of the relevant quantities. For instance, $\Delta \Sigma_t^c$ fluctuates very little, while the information gain $G_t$ fluctuates dramatically.
\section{\label{sec:conc} Conclusions}
We have investigated the interplay between information and thermodynamics in continuously measured system by way of a collisional model construct. In particular, we were able to formulate the entropy production and flux rate --- two pivotal quantities in (quantum) thermodynamics --- from a purely informational point of view and accounting for repeated indirect measurements of the system of interest. These results offer a clear way to point-out and characterise the effect of quantum measurements on the thermodynamics of open quantum system.
We model the indirect measurement of the system via a collisional model where (a part of) the environment with which the system interact is monitored. This allows us to compare the entropy production with the case in which the environment is not measured and the evolution of the system is thus unconditioned. In turn, this comparison leads directly to a tightened second law for monitored systems with a very clear separation between entropic contributions coming from the dissipative interaction with the environment and the ones coming from the information gained during the monitoring.
This allows us to introduce the concept of information gain rate and loss rates, and informational steady-states. The latter are particularly interesting since they represent cases where a delicate balance is established between the information that gets lost into the environment and the one that is extracted by measuring.
The interplay between information and the $2^{\text{nd}}$ law has been the subject of several works over the last decade.
Stroboscopic dynamics, such as the one considered in Sec.~\ref{sec:setup}, have been studied in the classical context of Hidden Markov models~\cite{Darwiche2009,Neapolitan2003,Ito2013}.
A classical framework, where quantum measurements are mimicked by generic interventions, was put forth in~\cite{Strasberg2019a}, and resembles the classical version of our $\text{CM}^2$'s, developed in Appendix~\ref{app:incoherent_models}.
In the quantum context, the conditional dynamics analyzed here are a particular case of process tensors~\cite{Chiribella2008a,Pollock2018b,Pollock2018} whose thermodynamics has been recently considered in~\cite{Strasberg2019c,Strasberg2020}. Unlike our framework, however, these studies assume the system is always connected to a standard thermal bath, while the ancillae play only the role of memory agents. For this reason, their definition of entropy production is based on a Clausius-like inequality and is therefore different from ours. Furthermore, we have opted to focus on informational aspects of thermodynamics, neglecting entirely the \emph{energetics} of the problem. Detailed accounts of the latter can be found in Ref.~\cite{Alonso2016,Strasberg2019c,Strasberg2020}.
Ref.~\cite{Funo2013} put forth a framework (recently assessed experimentally in Ref.~\cite{Naghiloo2020}) where the ancillae play the role of active memories.
This means their effect is always deleterious to the system.
As a consequence, instead of using the Holevo quantity~\eqref{holevo} to quantify information, they use the Groenewold-Ozawa quantum-classical information~\cite{Groenewold1971,Ozawa1986} $I_{GO} = S(X) - S(X'|z)$. The two quantities are related by $I(X'\! : \! z) = I_{GO} - \Delta S_X$, where $\Delta S_X = S(X') - S(X)$.
Depending on the type of collision, $\Delta S_X$ may have any sign, so $I_{GO}$ is not necessarily non-negative.
The formalism developed in this work is widely applicable, as exemplified by the case studies we have considered (see also~Ref.~\cite{tofollow}).
This makes it a valuable tool in the thermodynamic assessment of a broad variety of quantum-coherent experiments.
The scenario we considered also fits perfectly with the characterization of emergent quantum applications, such as quantum computing devices~\cite{gardas2018quantum,buffoni2020thermodynamics,cimini2020experimental}.
Being able to characterize irreversibility in these devices should thus offer a significant advantage in the design and engineering of future devices.
\acknowledgements
We acknowledge support from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) project number BR 5221/4-1, the MSCA project pERFEcTO (Grant No. 795782), the H2020-FETOPEN-2018-2020 TEQ (grant nr. 766900), the DfE-SFI Investigator Programme (grant 15/IA/2864), COST Action CA15220, the Royal Society Wolfson Research Fellowship (RSWF\textbackslash R3\textbackslash183013), the Leverhulme Trust Research Project Grant (grant nr.~RGP-2018-266), the UK EPSRC (grant nr.~EP/T028106/1).
|
\section{Introduction}
Relativistic wave equations for bound systems represent a relevant,
controversial and extremely extended area of investigation in theoretical physics.
The aim of this work is to propose a three-dimensional reduction of the Dirac
and Breit equations in order
to describe in a relativistic way, avoiding some known inconsistencies,
the dynamics of spin 1/2 particles bound states.\\
The article is organized as follows:
in the remainder of the introduction, in Subsect. \ref{contextaim} we contextualize
the present study in the field of the relativistic equations and define the aim of the work;
in Subsect. \ref{symbnot}
we introduce the symbols and the notation of the article;
then, in Sect. \ref{diracappr} we study an approximate formal method of solution
of the one-body Dirac equation;
taking advantage of the obtained results, in Sect. \ref{redpro} we discuss reduction procedure
starting from the one-body case;
in Sect. \ref{twobody} we generalize the reduction procedure to the two-body case,
that will be analyzed in more detail, and to the n-body case that will be
introduced at formal level;
in Sect. \ref{applmw} we apply our reduction procedure to the modified Dirac equation proposed by Mandezweig and Wallace;
in Sect. \ref{charm} we introduce, as an example, an interaction model for the study of the Charmonium spectrum;
the numerical method of solution for the equation is briefly discussed
in Sect. \ref{solution};
in Sect. \ref{charmres} we discuss the results and make a comparison
with the experimental data for the Charmonium spectrum;
finally, some conclusions are drawn in Sect. \ref{conclusions}.
Appendix \ref{tr2bwe} is devoted to analyze the technical details of some
three-dimensional relativistic equations, particularly relevant for this work.
The reduction of the one- and two-body interaction is analyzed in the
Appendixes \ref{reduct1} and \ref{reduct2}, respectively.
\subsection{Context and aim of the work}\label{contextaim}
In this subsection, before defininig the objective of the work,
we try to contextualize the
content of the present paper in the framework of the
three-dimensional relativistic wave equations (TDRWEs),
with no attempt to cover the whole subject.
For a concise description of the technical details about the TDRWEs
related to this work,
the interested reader is referred to Appendix \ref{tr2bwe}.\\
We start by recalling that
Dirac equation represents the basic element for the study of all
the field theories, as QED, electroweak theory and QCD.
Historically, that equation, considered as a \textit{one-body}
relativistic equation for a \textit{bound} electron in an external potential,
has been successfully used to determine
the fine structure effects of the Hydrogen atom spectrum. \\
On the other hand, the study of relativistic equations for two- and
n-body \textit{bound} systems
(that is very relevant for atomic, nuclear and, particularly, for hadronic physics)
is much more complex and many different strategies
have been proposed. \\
In principle,
it is possible to construct the Hamiltonian for two- and n-body systems
as a straightforward sum of the one-body Dirac Hamiltonians.
This procedure gives rise to the Breit equation \cite{breit1,breit2,breit3}, that will be
conventionally denoted in the present paper as \textit{Dirac-like equation} (DLE)
in order to emphasize its relationship with the original Dirac theory.\\
The DLE is a TDRWE in Hamiltonian form.
A specific, relevant advantage of this equation consists
in its \textit{full locality},
if a local interaction is taken.\\
In recent years the derivation of the DLE has been formally revised
considering direct interactions
between spin $1/2$ particles \cite{louism}.
Furthermore, this equation
has been deeply analyzed and successfully used to calculate finite size
\textit{perturbative corrections} in the Hydrogen atom \cite{garciakelkar} and in mesonic atoms
\cite{kelkarnow}.\\
A semi-analytic study has been performed for some bound states with a
Coulomb potential \cite{kasa}.
A calculation of the spectra of quarkonia has been also developed \cite{tsibi}.\\
However, for that equation
a relevant formal difficulty has been found: the so-called \textit{continuum dissolution problem} (CDP) \cite{such}.
Essentially, it is related to the presence of spurious null mass solutions
for the case of non-interacting particles; in more detail,
considering a two-body system,
it is possible to have a positive energy solution for one particle and
a negative energy solution for the other particle;
in consequence, in the rest frame, a zero total mass is obtained.
Equivalently, these null mass free solutions correspond to
unphysical poles in the three-dimensional Green function,
as shown in Eq. (\ref{g2dl}).
The CDP is related to the difficulty of treating
the negative energy states generated by the one-body Dirac terms
of the Hamiltonian.\\
As a consequence, in \textit{nonperturbative} calculations,
the reliability of the solutions of the DLE is strongly questioned,
while it can be safely used in the perturbative ones.\\
Many other different methods have been followed to study relativistic bound states.
Among them, we only quote the \textit{Dirac's constraint dynamics} \cite{cra1,cra2,cra3}
and the
\textit{relativistic path integral Hamiltonian approach} \cite{sim1,sim2,sim3}.\\
We now discuss some models,
more strictly related to the present work, that have been derived from
the Bethe-Salpeter equation (BSE) \cite{sabe,bethes}; for this equation
an extensive didactic exposition can be found in Ref. \cite{bsed}. \\
The BSE is an explicitly covariant four-dimensional formalism that,
\textit{in principle},
allows to sum up the infinite series of all the Feynman graphs for two
interacting particles, reproducing completely the dynamics of the bound system.
However, this procedure would require to introduce in the interaction
kernel \textit{all} the corresponding \textit{irreducible} Feynman graphs.
Unfortunately, this task cannot be accomplished: only the \textit{tree-level}
boson exchange graph is usually considered for the kernel.
In this way the BSE could only reproduce the series of the
\textit{ladder} graphs.
But at this point also another problem is found: the tree-level
boson exchange graph, due to its singularities, gives rise to
abnormal (unphysical) solutions \cite{lucha}; for this reason one is forced to
assume an \textit{instantaneous} tree-level interaction.
With this assumption, the BSE is reduced to the three-dimensional
Salpeter instantaneous equation (SIE) \cite{bsed,salp}.
(In this concern, we recall that for the electromagnetic interaction in the Coulomb gauge,
the Coulomb term is instantaneous.)
The SIE is, in any case, a \textit{nonlocal} equation that is practically
written as an integral equation by means of the Green function
that propagates the $++$ and the $--$ states
\textit{but not} the $+-~$ and $-+$ states
that are excluded from the model.
For this reason the Green function of this model is not invertible.
The technical details about this point are given in Appendix \ref{tr2bwe}; in particular, see Eq. (\ref{g2si}) .
Incidentally, we recall that
a comparison between the numerical solutions of the SIE and of
the DLE has been performed, finding for the DLE equation
unphysical effects related to the CDP \cite{chang}.\\
Many efforts have been devoted to improve the SIE trying to incorporate,
with some approximation, the \textit{crossed} graphs in order to go beyond the
\textit{ladder} approximation for the full series of the equation.\\
This objective has been achieved in part by putting \textit{on-shell}
one fermion, in the so-called \textit{Relativistic Spectator Formalism},
originally developed for nuclear systems and also applied to quark bound states;
see, for example Refs. \cite{grossa,grossb,grossc,cst1}. \\
In another approach, that is the Mandelzweig and Wallace equation (MWE)
\cite{mwa,mwb,mwc},
the crossed graphs are taken into account, in the eikonal approximation,
by means of a suitable definition of the Green function.
In this way, the Green function is that of the SIE, \textit{plus}
the contributions of the $+- $ and $-+$ states, as shown in Eq. (\ref{g2mw}).
As a result one obtains an \textit{invertible} Green function that finally
gives rise to a modified Dirac equation for the bound state.
This equation has not the form of an eigenvalue equation for the total energy
of the system; the non-interacting term depends on nonlocal operators
but the \textit{interaction term has a local form}.
Due to its structure, the MWE is free from the CDP and represents an interesting improvement
with respect to the SIE.
However,
when applied to an effective gluon exchange interaction,
it should be carefully reexamined considering in particular
the noncommutativity of the interaction vertices for the crossed graphs.\\
The MWE has been also applied to study relativistic corrections for
few-body nuclear systems,
taking into account, in that case, the non-Abelian character of the one-pion exchange
interaction \cite{dspa,dspb,dspc}.\\
Given the structure of the MWE
and, in particular, due to the
locality of the interaction term, we shall apply also to this model
the reduction procedure developed in the present work.\\
A common problem of the DLE and MWE equations is the lack of explicit
relativistic covariance. This problem is standardly solved by defining
in a covariant way the variables of the center of mass,
where these equations are originally derived \cite{mwb,dspb,mosh}.\\
Finally, we note that the contribution of the $++$ states to the Green function
is \textit{the same}
for the DLE, SIE and MWE.\\
For this reason, and also
considering the dynamical uncertainties discussed above and the
difficulties of the numerical solutions,
a possible starting point for a relativistic study of the bound systems
consists in projecting any TRWE, that is the DLE, SIE or MWE,
\textit{only} onto the positive energy states, excluding completely the
$+-$, $-+$ and $--$ states.
In this way, the equation
shown in Eqs. (\ref{eqplusplus}) and (\ref{eqplusplusint}) has been obtained.
We denote this equation as
\textit{positive energy state equation} (PESE).
Moreover, it is possible to introduce into this equation some retardation contributions
without formal difficulties.
This equation has been used to study the spectra of heavy
quarkonia \cite{mdsf,mdsfs}.
\vskip 1.0 truecm
\noindent
The previous discussion shows that the problem of the relativistic
equations for bound states is still an open issue, with different levels of complexity.\\
From the numerical point of view,
in the two-body case, for the DLE and MWE, one has to solve
a coupled equation for \textit{four} two-component spinors.
For the DLE one has an eigenvalue equation with standard differential
operators in the coordinate space.
For the MWE, the non-interacting term is energy-dependent and nonlocal;
in consequence, a specific strategy should be studied.
For the SIE, due to its nonlocal form, one has to solve a coupled integral equation for \textit{two} two-body spinors,
corresponding to the $++$ and $--$ components of the wave function.
In the case of Eq. (\ref{eqplusplusint}) for $++$ states only, one has an integral equation for \textit{one} two-body spinor.\\
From the dynamical point of view, we note that, in any case,
starting from a hypothetical exact theory,
many (and not completely justified) approximations are required
to define a specific model.\\
In particular, assuming that the BSE represents the correct starting point,
one has to take into account that
the crossed graphs are not included or approximately
included in the SIE and MWE, respectively.
On the other hand,
the DLE can be considered an equation
based on \textit{first principles} but
the unphysical singularities of the Green function must be removed.\\
This situation has motivated the development of the present study.\\
In particular, the aim is to find
a \textit{reduction} of the DLE
equation by establishing a relationship, or \textit{correlation},
between the lower and upper components of the Dirac spinors of each interacting fermion.
This correlation has the same structure of the solutions
of the one-body Dirac equation
in the ``spin-symmetry" case \cite{spinsym1,spinsym2}.
We recall that a simplified Dirac-Coulomb equation was proposed for
atomic systems \cite{pest}.
A Dirac harmonic oscillator shell model with spin-symmetry
was also used to study quark-antiquark spectroscopy \cite{bhagh}.\\
The reduction of this work is mainly oriented to the study of
\textit{few-body hadronic systems}
and avoids from the beginning the CDP.
An energy-dependent, three-dimensional, completely
\textit{local} equation is obtained; consequently
a relatively simple numerical solution is achievable in the coordinate
space.
For the two-body case, one has to handle only \textit{one} two-body spinor.\\
Our reduction can be considered equivalent to the standard PESE
when applied to the scattering of on-shell particles but
includes, for bound states, some contributions of the negative energy states.
More details are given in Eqs. (\ref{amppos}), (\ref{ampneg}).
\noindent
After studying the reduction procedure for the DLE,
we also apply it to the MWE.
In this case, for the reduced noninteracting term of the equation,
we obtain a nonlocal operator
but, for the reduced interaction operator,
we have
the same local form obtained for the DLE.
In consequence, it is possible to use for the variational solution,
the harmonic oscillator (HO) basis, that admits an analytic Fourier transform.
We shall use the momentum space HO wave functions for the noninteracting term,
while the coordinate space wave functions will be used for he interaction term,
as discussed in Sect. \ref{solution}.
\noindent
As an example of application,
we use our reduced equation to study the Charmonium spectrum
by means of a standard interaction given by a vector and a scalar term.
The results given in Sect. \ref{charmres} show that a good quality reproduction of the spectrum can be obtained.
\vskip 0.5 truecm
\noindent
\subsection{Symbols and Notation}\label{symbnot}
In the present work we use
the gamma matrices $\gamma^\mu$ in the standard representation.
Given that we shall employ the \textit{Hamiltonian formalism}
for the Dirac equation,
we also introduce $\beta= \gamma^0$ and
the matrices
$\gamma^0 \gamma^\mu=(\mathcal{I}, \vec \alpha)$ where $\mathcal{I}$
represents the identity matrix in the $4 \times 4$ Dirac space.\\
In the two- and n-body cases, for the matrices and the operators
a \textit{particle} lower index $i=1,2,...n$ is introduced;
but for the one-body case the index $1$ is omitted.\\
The following shorthand notation is used:
$O_i=O(m_i,\vec p_i;\vec \alpha_i,....)$
where the generic one-body operator
$O(m,\vec p;\vec \alpha,....)$
is calculated for the $i$-th particle.\\
An operator specifically introduced for a n-body system will
be denoted by the subscript $(n)$, with parentheses.\\
The letter $\Psi$ denotes the complete Dirac wave functions, for the n-body system.
The letter $\Phi$ is used for the spinorial (reduced) wave functions.\\
For the general equations,
we use the \textit{bra-ket} Dirac notation $|\Psi>$, $|\Phi>$.\\
The interaction operators $W_{(n)}$ are referred to
the Hamiltonian formalism, that is:
$\Psi^\dag W_{(n)} \Psi= \overline \Psi \gamma_1^0 \cdot \cdot \cdot \gamma_n^0 W_{(n)} \Psi$.\\
The \textit{reduced} operators derived in the present work will be denoted
by a \textit{hat}.\\
The spin indices will be generally omitted.
Only in Sect. \ref{solution} the spin quantum numbers are explicitly indicated
for the variational wave functions.\\
Finally, throughout the work we use the so-called natural units, that is $\hbar=c=1$.\\
\vskip 1.0 truecm
\section{The Dirac equation and its approximate solution}\label{diracappr}
In order to introduce the reduction procedure,
we previously analyze a solution method for the Dirac equation.
Then, the reduction procedure of the one-body case will be
studied in Sect. \ref{redpro} and then generalized
to two- and n-body DLE and to MWE.
\noindent
We write the Dirac equation in the Hamiltonian form:
\begin{equation}\label{dirac1}
(H^{free} -E +W_{(1)})|\Psi>=0
\end{equation}
where $H^{free}$ represents the standard one-body, free, Dirac Hamiltonian,
that is
\begin{equation}\label{free1}
H^{free}= H^{free}(m;\vec p, \vec \alpha, \beta) =
\vec \alpha \cdot \vec p +\beta m
\end{equation}
with the Dirac matrices recalled in Subsect. \ref{symbnot};
$\vec p$ and $m $ repectively represent the particle momentum and mass;
furthermore, in Eq. (\ref{dirac1}) $E$ is the energy eigenvalue and
$W_{(1)}$ represents the one-body interaction with an external field.
Finally, $|\Psi>$ represents the four-component Dirac spinor
that in the coordinate representation reads $\Psi(\vec r)=<\vec r| \Psi>$. \\
In view of the formal development of the work, we also introduce here the
Dirac operator, in the form:
\begin{equation}\label{dirop}
D=D(m,E;\vec p, \vec \alpha, \beta)=H^{free}-E~.
\end{equation}
We take, for the following introductory discussion, a specific interaction with
a scalar field $V_s(\vec r)$ and the time component
of a vector field $V^0_v(\vec r)$; in this way the one-body interaction has the form:
\begin{equation}\label{intg1}
W_{(1)}=\beta V_s(\vec r) + V^0_v(\vec r)~.
\end{equation}
We split the four-component one-body Dirac spinor into two two-component spinors,
for the \textit{upper}
and the \textit{lower}
components:
\begin{equation}
|\Psi>=
\begin{pmatrix} |\Phi_U >\\
|\Phi_L >
\end{pmatrix}~.
\end{equation}
For the interaction fields we introduce
the shorthand notation
\begin{equation}\label{vpm}
\begin{split}
V_U(\vec r)= V^0_v(\vec r)+ V_s(\vec r)~~\\
V_L(\vec r)= V^0_v(\vec r)- V_s(\vec r) ~.
\end{split}
\end{equation}
With this notation, the total interaction of Eq. (\ref{intg1}) can be written as:
\begin{equation}\label{intgg1}
W_{(1)}= {\frac 1 2} \beta [V_U(\vec r) -V_L(\vec r)] +
{\frac 1 2} [V_U( \vec r) +V_L(\vec r)] ~.
\end{equation}
\noindent
In this way the Dirac equation (\ref{dirac1}) can be conveniently written
as a matrix equation in the form:
\begin{equation}\label{dirac1matr}
\begin{pmatrix}
m -E +V_U(\vec r) & \vec \sigma \cdot \vec p \\
\vec \sigma \cdot \vec p & -(m+E) +V_L(\vec r)
\end{pmatrix}
\begin{pmatrix}
|\Phi_U> \\
|\Phi_L>
\end{pmatrix}=0
\end{equation}
that
represents a \textit{coupled equation} for
the two spinors $|\Phi_U>$ and $|\Phi_L>$ .\\
Assuming that the quantity
$ m +E-V_L(\vec r)$
is nonvanishing,
one can express $|\Phi_L>$
by means of $|\Phi_U>$ in the form:
\begin{equation}\label{psilfpsiu}
|\Phi_L>= [m+E-V_L(\vec r)]^{-1} \vec \sigma \cdot \vec p
~|\Phi_U>
\end{equation}
In this way, one \textit{correlates} exactly the upper and the lower components
of the Dirac state $|\Psi>$.\\
Then, the equation for $|\Phi_U>$ can be written
\textit{exactly} as:
\begin{equation}\label{psiuexact}
\left[m -E +V_U(\vec r) +
\vec \sigma \cdot \vec p
(m +E-V_L(\vec r))^{-1}
\vec \sigma \cdot \vec p
\right] |\Phi_U> =0~.
\end{equation}
The last term of this equation, for a central interaction
$V_L=V_L(r)$, can be rewritten by using the
transformation given in Eq. (\ref{simpl1}) of Appendix \ref{reduct1}.
\vskip 0.5 truecm
\noindent
In order to introduce our reduction technique,
we factorize the constant factor $(m+E)^{-1}$.
With standard algebra we write :
\begin{equation}\label{algebex}
[m+E-V_L(\vec r)]^{-1}=
[1+ B(E;\vec r)] \cdot{\frac {1} {m+E}}
\end{equation}
with
\begin{equation}\label{ger}
B(E; \vec r)= F(E; \vec r)\cdot
{\frac {1} {1- {F(E;\vec r)} } }
\end{equation}
and
\begin{equation}\label{fer}
F(E;\vec r)={\frac {V_L(\vec r) } {m+E} }
\end{equation}
Replacing Eq. (\ref{algebex})
in Eq. (\ref{psiuexact}),
one obtains:
\begin{equation}\label{psiuuexact}
\left[m -E +
{\frac {{\vec p}^2} {m+E} } +V_U(\vec r) +
{\frac { 1 } {m+E} }
\vec \sigma \cdot \vec p
B(E;\vec r)
\vec \sigma \cdot \vec p
\right] |\Phi_U> =0
\end{equation}
where one has to remenber the definitions of the Eqs. (\ref{ger}) and (\ref{fer})
for $ B(E; \vec r)$.
Eq. (\ref{psiuuexact})
is an energy-dependent, still \textit{exact} equation for $|\Phi_U>$;
$|\Phi_L>$ can be reconstructed by means of Eq. (\ref{psilfpsiu}).
With respect to Eq. (\ref{psiuexact} )
the previous transformations have allowed to isolate
the energy-dependent \textit{pseudo-kinetic} term, that is:
\begin{equation}\label{tek}
T_K(E)={\frac {{\vec p}^2} {m+E} }~.
\end{equation}
For the last term in the parenthesis of Eq. (\ref{psiuuexact}),
analogously to what observed for Eq. (\ref{psiuexact}), one can use the
transformation given in Eq. (\ref{simpl1}) of Appendix \ref{reduct1}.
In this way,
a momentum dependent term and the spin-orbit interaction are obtained.
\noindent
A case of special interest is when
\begin{equation}\label{vm0}
V_L(\vec r)=0~.
\end{equation}
In this case,
due to the definition of Eq. (\ref{vpm}), one has $V^0_v(\vec r)=V_s(\vec r)$.
Furthermore, Eq. (\ref{psilfpsiu}) does not depend on $V_L(\vec r)$
and, in consequence, we also have:
\begin{equation}\label{ge0}
B(E;\vec r)= F(E;\vec r)=0
\end{equation}
This case, traditionally denoted as \textit{spin-symmetry} case
\cite{spinsym1,spinsym2},
allows for simple solutions of the Dirac equation,
in which the spin-orbit interaction is absent and
the orbital angular momentum and the spin are
\textit{decoupled}.\\
We now consider the case in which the absolute values
of the matrix elements of the adimensional quantity $F(E;\vec r)$
are small.
In this case $B(E;\vec r)$, defined in Eq. (\ref{ger}),
can be expanded in a power series of $F(E;r)$:
\begin{equation}\label{geseries}
B(E;\vec r)=
\sum_{k=1}^\infty
[F(E;\vec r)]^{k}~.
\end{equation}
At the first order $(k=1)$ one simply has:
\begin{equation}\label{geappr}
B(E;\vec r)\simeq F(E;\vec r)~.
\end{equation}
One can replace this relation in Eq. (\ref{psiuuexact})
obtaining an approximated equation for $|\Phi_U>$.
\section{The one-body reduction}\label{redpro}
Let us now study the formal reduction procedure suitable for the
generalization to the two- and n-body cases.\\
In the first place, we write the four-component Dirac spinor, that represents
the \textit{correlated} (approximate) solution, in the form:
\begin{equation}\label{psiapprox}
|\Psi_{corr}>= N_{(1)} \cdot K \cdot |\Phi>
\end{equation}
where $N_{(1)}$ represents the one-body numerical normalization constant,
to be discussed in the following, $K$ is the local reduction operator
that transforms the (reduced) spinor $|\Phi>$ into a four-component Dirac spinor;
it is defined as:
\begin{equation}\label{defk}
K= K(m,E; \vec p, \vec \sigma)=
\begin{pmatrix} 1 \\
{\frac {\vec \sigma \cdot \vec p} {m+E} }
\end{pmatrix}~.
\end{equation}
In Eq. (\ref{psiapprox}), we have taken as approximate solution
a Dirac spinor that represents the exact solution
in the case of Eq. (\ref{vm0}), that is when $V_L(\vec r)=0$. \\
The operator $K$ of the last equation defines the \textit{correlation}
between the upper and lower components of $|\Psi_{corr}>$ .\\
We now replace
in the original Dirac equation (\ref{dirac1}) (written by means of the Dirac operator
$D$ of Eq. (\ref{dirop}))
the exact solution
$|\Psi>$ with
$|\Psi_{corr}>$;
furthermore, in order to obtain
an Hermitean reduced operator acting on $|\Phi>$,
we also multiply the same equation from the left
by $K^\dag $.\\
In consequence, the reduced (approximated) equation for $|\Phi>$ is formally written in the form:
\begin{equation}\label{appreqphi}
K^\dag \left[D +W_{(1)} \right]
K ~|\Phi>=0~.
\end{equation}
For the Dirac operator $D$ of Eq. (\ref{dirop}), with standard calculations,
one finds the corresponding reduced \textit{noninteracting} operator $\hat D$,
in the form:
\begin{equation}\label{khmek}
\hat D=\hat D (m,E;\vec p )=
K^\dag D K=
m -E +
{\frac {{\vec p}^2} {m+E} } ~.
\end{equation}
The one-body reduced interaction is written, in general, in the form:
\begin{equation}\label{kwk}
K^\dag W_{(1)} K =\hat W_{(1)}~.
\end{equation}
For the specific Dirac interaction of Eq. (\ref{intgg1}),
the one-body reduced interaction takes the form:
\begin{equation}\label{kwkspec}
\begin{split}
\hat W_{(1)}
=V_U(\vec r)+
{\frac {1} {m+E}}
\vec \sigma \cdot \vec p
F(E;\vec r)
\vec \sigma \cdot \vec p= \\
=V_U(\vec r)+
{\frac {1} {(m+E)^2 }}
\vec \sigma \cdot \vec p
V_L(\vec r)
\vec \sigma \cdot \vec p~~.
\end{split}
\end{equation}
The reduction procedure can be generalized to any interaction.
The whole Appendix \ref{reduct1} is devoted to calculate the reduction
of the one-particle interaction with external scalar and vector fields.
At the end of that Appendix,
the corresponding transformation equations are also given.\\
Note that $\hat W_1$, in the previous equation, and also, in the following,
the two- and n-body reduced interactions $\hat W_{(2)}$ , $\hat W_{(n)}$
are all \textit{energy dependent} operators.
\noindent
Considering Eqs. (\ref{khmek}) and (\ref{kwk}),
we can write the one-body Dirac reduced equation in the form:
\begin{equation}\label{dirred1}
\left [ \hat D + \hat W_{(1)} \right] |\Phi>=0~.
\end{equation}
We have obtained for $|\Phi>$ the same equation
derived for $|\Phi_U>$, see Eq. (\ref{psiuuexact}),
with $B(E;\vec r)$ expanded up to the order $k=1$, as given in Eq. (\ref{geappr}).
\vskip 0.5 truecm
\noindent
We now introduce:
\begin{equation}\label{ksquared}
\hat Q= \hat Q(m,E;\vec p)=
K^\dag K =
1 +
{\frac {{\vec p}^2} {(m+E)^2} }~.
\end{equation}
By means of this operator,
we can define
the one-body normalization constant, $N_{(1)}$,
that is unrelevant for
obtaining the energy eigenvalue $E$
but is necessary to determine in a complete way the correlated Dirac spinor
and to calculate the matrix elements of any (other) Dirac operator.
The normalization constant $N_{(1)}$ can be obtained by requiring that,
for a bound state, the correlated Dirac spinor of Eq. (\ref{psiapprox})
is normalized to unity.
By using Eq. (\ref{ksquared}),
one has the following implicit definition:
\begin{equation}\label{norm1}
1= N_{(1)}^2 <\Phi| \hat Q |\Phi>=
N_{(1)}^2 \int d^3 r ~\Phi^\dag(\vec r)~ \hat Q ~\Phi(\vec r)
\end{equation}
from which one can immediately obtain $N_{(1)}$.
We consider $ N_{(1)}$ as a numerical constant, not included in the
definition of $K$, in order to have a \textit{local} reduced Dirac equation.
Otherwise, one could introduce the normalized, nonlocal, reduction operator,
in the form:
\begin{equation}\label{knorm}
K_{norm}=K \cdot \left [ 1+ {\frac {{\vec p}^2} {(m+E)^2} } \right] ^{-1/2}~.
\end{equation}
This choice will not be used in the present work because we prefer
to obtain a local equation.\\
Finally, we anticipate that
$N_{(2)}$ and $N_{(n)}$ that respectively represent
the two-body and the n-body normalization constants,
will be determined with an analogous procedure
in Sect. \ref{twobody}.
\noindent
We also note that the \textit{exact} equation (\ref{psiuuexact}),
without expansion of $B(E;\vec r)$, can be
recovered if in the interaction
(see Eq. (\ref{kwkspec}) )
one replaces $V_L(\vec r)$ with $V_L^{eff}(\vec r) $ defined as:
\begin{equation}
V_L^ {eff}(\vec r) = V_L(\vec r)\cdot
{\frac {1} {1- {F(E;\vec r)} } }~.
\end{equation}
Otherwise, if the fundamental interaction is not known,
one can construct a phenomenological model for $W_{(1)}$,
by using a suitable parametrization and then fitting the results
to the experimental data.\\
\section{Two- and n-body reduction of the DLE}\label{twobody}
We introduce here the generalization of our model to the two- and n-body case.
We start analyzing in detail the (relatively simple) two-body case.
The DLE is formally written in form:
\begin{equation}\label{dirac2}
[D_1 + D_2 +W_{(2)}]|\Psi>=0
\end{equation}
where we have used, for each particle ($i=1,2$), the standard one-body Dirac
operator
defined in Eq. (\ref{dirop}) with the shorthand notation introduced in
Subsect. \ref{symbnot}.
Furthermore,
$W_{(2)}$ represents the Dirac interaction operator for the two-body case
and $|\Psi>$ is the Dirac state of the system.
Finally,
the total energy is
$E_T=E_1+E_2$.
\vskip 0.5 truecm
\noindent
In a relativistic context, the separation of variables into CM and relative
variables is a difficult problem
that will not be studied here in detail.
In order to calculate the mass $M$ of the two-body bound system,
it is sufficient to
study the problem in the Center of Mass (CM) reference frame, where $E_T=M$
and the total momentum $\vec P$ is vanishing.
In this respect,
\textit{without introducing a new notation}, we assume in the following that
all the states we use
(\textit{i.e.}, Dirac states, correlated Dirac states and reduced states)
satisfy the condition of vanishing momentum:
\begin{equation}\label{condtotzero}
\vec P | \Psi>=0,~\vec P | \Psi_{corr}>=0,~ \vec P | \Phi>=0~ .
\end{equation}
In order to define the relative variables
we shall focus our attention on a specific, relatively simple, case
that corresponds directly to the very relevant physical
systems of the $ q \bar q$ mesons.
(However, as we shall see in the following, the formal reduction procedure of our model
is quite general and does not depend on the specific choice of the CM and relative variables.)\\
Now we consider two equal mass particles:
\begin{equation}\label{eqmass}
m_1=m_2=m~,
\end{equation}
furthermore, we assume that, in the CM, the two particles have the same energy:
\begin{equation}\label{eqen}
E_1=E_2= {\frac {E_T} {2}}= {\frac {M} {2}} ~.
\end{equation}
The momentum operators of the two particles are given by:
\begin{equation}\label{momentumops}
\vec p_1= -\vec p, ~~ \vec p_2= \vec p
\end{equation}
where $\vec p$ represents the relative momentum operator (in the CM reference frame), canonically conjugated
to the relative distance vector
\begin{equation}\label{rdv}
\vec r =\vec r_2 - \vec r_1~.
\end{equation}
In this way,
we can introduce, in that frame,
the Dirac wave function
$\Psi(\vec r)=<\vec r | \Psi> $;
furthermore, in a local model,
the interaction operator depends on the
spatial variable $\vec r$, that is $W_{(2)}=W_{(2)}(\vec r)$.\\
We construct the reduced equation by introducing, for the Dirac correlated wave function, the following expression:
\begin{equation}\label{psiapprox2}
|\Psi_{corr}>= N_{(2)} \cdot K_1 \cdot K_2
\cdot | \Phi>
\end{equation}
where
$K_i$
represents the one-particle reduction operator of the $i$-th particle ($i=1,2$),
as given
in Eq. (\ref{defk}).
Specifically, for the \textit{arguments} of these operators
(and of all the other operators in the following)
the definitions of Eqs. (\ref{eqmass})-(\ref{momentumops}) are used.
Finally, in Eq. (\ref{psiapprox2}),
$|\Phi>$ is the
two-particle reduced state.
Finally $N_{(2)}$ is the numerical
two-body normalization constant.
This last quantity is implicitly defined by
normalizing $|\Psi_{corr}>$ to unity, that is:
\begin{equation}\label{n2impdef}
1= N_{(2)}^2 <\Phi| \hat Q_1 \hat Q_2 |\Phi>=
N_{(2)}^2
\int d^3 r \Phi^\dag(\vec r) \hat Q_1 \hat Q_2
\Phi(\vec r)~.
\end{equation}
By using Eqs. (\ref{eqmass})-(\ref{momentumops}),
for a two-body, equal mass system,
one has $\hat Q_1=\hat Q_2$ and
\begin{equation}\label{q1q2presc}
\hat Q_1 \cdot \hat Q_2=
\left[ 1 + {\frac {\vec p^2} {(E_T/2+m)^2} } \right]^2~.
\end{equation}
As in the one-body case,
after replacing $|\Psi_{corr}>$ in Eq. (\ref{dirac2}),
we multiply from the left the same equation
by $ K_1^\dag \cdot K_2^\dag $
in order to obtain an Hermitean reduced operator.
We have:
\begin{equation}\label{dir2red1}
K_1^\dag \cdot K_2^\dag
(D_1 + D_2 +W_{(2)})
K_1
\cdot K_2
| \Phi> =0~.
\end{equation}
Using for the one-body operators $\hat Q_i$ and $\hat D_i$
their definitions of Eqs. (\ref{ksquared}) and (\ref{khmek}) respectively,
the previous equation can be rewritten as:
\begin{equation}\label{dir2red2}
\left[ \hat Q_2 \hat D_1 + \hat Q_1 \hat D_2 +\hat W_{(2)} \right]
| \Phi> =0
\end{equation}
where the two-body reduced interaction is:
\begin{equation}\label{w2red}
\hat W_{(2)}= K_1^\dag \cdot K_2^\dag ~ W_{(2)}
~ K_1 \cdot K_2~.
\end{equation}
The reduction of a scalar and vector two-body interaction
is studied in detail in Appendix \ref{reduct2}.
\noindent
With the specific definitions for the arguments of the operators,
given in Eqs. (\ref{eqmass})-(\ref{momentumops}),
one has $\hat Q_1= \hat Q_2 $ and $\hat D_1= \hat D_2$;
in consequence,
the explicit reduction of the noninteracting operator, in the CM, gives:
\begin{equation}\label{kterm2}
\begin{split}
\hat Q_2 \hat D_1 + \hat Q_1 \hat D_2=
-\hat G_{(2) D}^{-1}(E_T)=~~~~~~~~\\
=\left[ 1 + {\frac {\vec p^2} {(E_T/2+m)^2} } \right]
\left( {\frac { 2 \vec p^2} {E_T/2+m} } +2m -E_T \right)
\end{split}
\end{equation}
where, analogously Eq. (\ref{gm2dl}), we have introduced
the shorthand notation $\hat G_{(2) D}^{-1}(E_T)$
for the reduced operator, inverse of the Green function.
In this way, the reduced equation can be written as:
\begin{equation}\label{eq2fdl}
\left[ -\hat G^{-1}_{D}(E_T) + \hat W_{(2)}
\right ] |\Phi>=0
\end{equation}
The explicit expression of Eq. (\ref{kterm2}) clearly shows that our model
does not admit any free solution with $E_T=0$, avoiding the CDP.
Also note that both the reduced interaction of Eq. (\ref{w2red}) and
the operator of Eq. (\ref{kterm2}) are \textit{local} quantities.
\vskip 0.5 truecm
\noindent
From the previuos discussion, one can easily find the generalization
to the case of a system with $n$ constituents.
The DLE has the form:
\begin{equation}\label{diracn}
\left [ \sum_{i=1}^n D_i + W_{(n)} \right ] |\Psi>=0
\end{equation}\\
In the CM frame, one has to introduce
as spatial variables
the set of $n-1$ Jacobi variables, collectively denoted as $ \{\vec r\}$
and their conjugated Jacobi momenta $ \{\vec p\}$.
Furthermore, one has to express
the particle momenta
$\vec p_i$ in terms of the Jacobi momenta.
All the states satisfy, in the CM, the vanishing momentum condition
(\ref{condtotzero}).
The Dirac correlated state is defined as:
\begin{equation}\label{dircorrn}
|\Psi_{corr}>= \prod_{j=1}^n K_j
\cdot |\Phi> ~.
\end{equation}
Then, the reduction of the DLE is performed analogously
to Eq. (\ref{dir2red1}), giving:
\begin{equation}\label{dirnred1}
\prod_{i=1}^n K_i^\dag \cdot
\left [ \sum_{k=1}^n
D_k + W_{(n)}
\right ]
\cdot
\prod_{j=1}^n K_j
\cdot |\Phi> =0~.
\end{equation}
In consequence,
the reduced equation, that generalizes Eq. (\ref{dir2red2}), takes the form:
\begin{equation}\label{dirnred2}
\left[
\sum_{i=1}^n
\left(\prod_{j\neq i}^n
\hat Q_j
\right)
\hat D_i +\hat W_{(n)} \right]
|\Phi> =0
\end{equation}
where the product is performed over all the $n$ particles, excluding
the $i$-th one.
The reduced interaction is:
\begin{equation}\label{weffndef}
\hat W_{(n)} =
\prod_{i=1}^n K_i^\dag \cdot W_{(n)} \cdot
\prod_{j=1}^n K_j
\end{equation}
Finally, the implicit normalization condition for the reduced wave function is:
\begin{equation}\label{nnimpdef}
1= N_{(n)}^2
<\Phi|\prod_{i=1}^n \hat Q_i |\Phi>=
N_{(n)}^2
\int d^3 \{r\}
\Phi^\dag(\{\vec r\} )~ \prod_{i=1}^n \hat Q_i
~\Phi(\{\vec r \} )
\end{equation}
that generalizes the two-body case of Eq. (\ref{n2impdef}).\\
Obviously, all the expressions for the n-body reduced operators become increasingly
more complex as $n$ increases.
\section{Reduction of the MWE}\label{applmw}
The present reduction procedure can be also applied to the two-body MWE.
We recall that this equation avoids from the beginning the CDP by including
in the definition of the Green function the so-called \textit{crossed graphs},
as discussed in Appendix \ref{tr2bwe}.
For the two-body case, the MWE takes, in our notation, the following form:
\begin{equation}\label{mw2}
\left [D_1 S_2 + D_2 S_1 +W_{(2)} \right]|\Psi>=0
\end{equation}
where the first two terms represent
the noninteracting operator given by $-G_{(2)M}^{-1}$ of Eq. (\ref{gm2mw}).
The MWE
should be compared with the DLE of Eq. (\ref{dirac2}),
analyzed in Appendix \ref{tr2bwe}.
In particular, the difference with respect to that equation consists in the
insertion of the energy-sign operators $S_i$
(denoted as $\hat \rho_i$ in the original paper \cite{mwa}).
These operators are introduced in Eq. (\ref{ensign})
and are calculated here for the $i$-th particle.
When applied to the free Dirac spinors, they give
the energy sign of the free particle, as shown in Eq. (\ref{ensignlamb}).
Note that, due to the presence of the $S_i$,
in the MWE it is not possible to introduce an Hamiltonian operator.\\
\noindent
The reduction of the MWE (\ref{mw2}) is performed with the same technique
used for the DLE in Sect. \ref{twobody} .
The vanishing momentum condition (\ref{condtotzero}) is used.
Also, the same definitions of Eqs. (\ref{eqmass})-(\ref{rdv}) for the two-body equal mass problem are used here.
The correlated Dirac state is given by Eq. (\ref{psiapprox2}).
Analogusly to Eq. (\ref{dir2red1}), we have:
\begin{equation}\label{mw2red1}
K_1^\dag \cdot K_2^\dag
\left [ D_1 S_2 + D_2 S_1 +W_{(2)} \right]
K_1
\cdot K_2
|\Phi> =0~.
\end{equation}
This reduced equation can be rewritten as:
\begin{equation}\label{mw2red2}
\left[\hat D_1 \hat S_2 +\hat D_2 \hat S_1 +\hat W_{(2)} \right]
| \Phi> =0
\end{equation}
that replaces the Dirac-like reduced equation (\ref{dir2red2}).
In the previous equation we have introduced the reduced $\hat S_i$ operators.
The reduced $\hat S$ operator has the general form:
\begin{equation}\label{hatr}
\begin{split}
\hat S= \hat S(m, E;\vec p)=
K^\dag S K= ~~~~~~~~~~~~~~\\
={\frac 1 {\varepsilon}}
\left [ \hat D + E \hat Q \right ] =
{\frac 1 {\varepsilon }}
\left [ m + {\frac {\vec p^2} {m+ E}} + {\frac { \vec p^2 E} {(m+ E)^2}}
\right ] ~.
\end{split}
\end{equation}
With the definitions of Eqs. (\ref{eqmass})-(\ref{momentumops})
one has $\hat S_1= \hat S_2$ and $\hat D_1= \hat D_2$.
The reduction of the noninteracting operator
that appears in Eq. (\ref{mw2red2}),
takes the form:
\begin{equation}\label{kterm2mw}
\begin{split}
\hat D_1 \hat S_2 +\hat D_2 \hat S_1 = -\hat G^{-1}_{(2) M}(E_T)= ~~~~~~~~~~~~~~\\
={\frac 1 \varepsilon}
\left [ m + {\frac {\vec p^2} {m+ E_T/2}} + {\frac { \vec p^2 E_T/2 }{(m+ E_T/2)^2}}
\right ]
\left( {\frac { 2 \vec p^2} {E_T/2+m} } +2m -E_T \right)
\end{split}
\end{equation}
where, in analogy with Eq. (\ref{kterm2}),
we have introduced the shorthand notation $\hat G^{-1}_{(2) M}(E_T)$.
Inserting Eq. (\ref{kterm2mw}) in Eq. (\ref{mw2red2}) one can write the complete
reduced equation as:
\begin{equation}\label{eq2fmw}
\left[ -\hat G^{-1}_{(2) M}(E_T) + \hat W_{(2)}
\right ] |\Phi>=0~.
\end{equation}
Finally, the reduced interaction $\hat W_{(2)}$ is the same as that of the DLE,
given in Eq. (\ref{w2red});
the same
implicit normalization condition of Eq. (\ref{n2impdef})
is used here.\\
\section{Model of $q ~ \bar q$ interaction for the Charmonium spectrum}\label{charm}
We shall apply our reduction to the study of Charmonium spectrum.
In the present work we consider only a relatively simple effective interaction
model, following the standard prescriptions used for the study of heavy quarkonia.
A study of different possible interactions with an analysis
of the physical meaning of the various terms must be performed in a work apart.
\noindent
In the present model,
for the two-body interaction $W_{(2)}$,
we take the sum of a vector and scalar term, that is:
\begin{equation}\label{wmodel}
W_{(2)}= W_{(2)}^v+ W_{(2)}^s~.
\end{equation}
\vskip 0.5 truecm
\noindent
For the vector interaction we take the following standard expression:
\begin{equation}\label{vvect}
W_{(2)}^v=V_{(2)}^v(r)
\gamma_1^0 \gamma_2^0 \cdot
\gamma_1^\mu \gamma_2^\nu g_{\mu \nu}
\end{equation}
with the Dirac matrices recalled in Subsect. \ref{symbnot}.
\noindent
The potential function $V_{(2)}^v(r)$ will be discussed in the following.\\
In order to have a local interaction operator we have not included the retardation
contributions.
This approximated choice can be considered consistent with
Eq. (\ref{eqen}):
we make the hypothesis that the quark energies are
\textit{fixed};
consequently, the quarks do not interchange energy
with the effective gluonic field that mediates the interaction.
\noindent
For the scalar interaction we take the expression:
\begin{equation}\label{vscal}
W^s_{(2)}=V_{(2)}^s(r)
\gamma_1^0 \gamma_2^0 ~.
\end{equation}
We now discuss the spatial potential functions
$V_{(2)}^v(r)$ and $V_{(2)}^s(r)$ of the model.
For the vector potential function of Eq. (\ref{vvect}),
we take the following effective, regularized, expression:
\begin{equation}\label{vpot}
V_{(2)}^v(r)=\bar V_v ~ -{\frac 4 3} \cdot {\frac {\alpha_v} {r}} \cdot F_v(r)
\end{equation}
where $4/3$ is the color factor and $\alpha_v \equiv \alpha_{strong}$ represents the
effective strong coupling constant; we use the subscript $v$ (that denotes the vector interaction) to avoid confusion with the scalar terms.\\
The regularization for $r\rightarrow 0$ is performed having in mind a non-pointlike
chromo-electric charge distribution of the quarks
that gives rise to the additive energy constant
$\bar V_v$ and to the regularization function $ F_v(r)$,
as shown in Ref. \cite{chromomds}.
A detailed study of the relationship between these two quantities must be done
in a different work.
Here we recall that $\bar V_v$ is introduced also to reproduce
phenomenologically the quark confinement.
As for $F_v(r)$,
we choose
\begin{equation}\label{fvreg}
F_v(r)=\text{erf} \left({\frac r d_v} \right)
\end{equation}
being $d_v$ the regularization range.
Note that $F_v(\infty)=1$, not altering the long distance Coulombic behaviour,
and, for $r \rightarrow 0$, $F_v(r)\simeq {\frac {2} {\sqrt{\pi}}}{\frac r d_v} $;
in this way the Coulombic singularity is eliminated.
\vskip 0.5 truecm
\noindent
As for the scalar interaction, after trying different expressions, we take
the potential function of Eq. (\ref{vscal}) in
the following form:
\begin{equation}\label{spot}
V_{(2)}^s(r)=\bar V_s {\frac 1 2}
\left[
\text{erf} \left( (r-r_s)/d_s \right) -1
\right]~.
\end{equation}
Note that this potential represents a hole of depth approximately equal to
$ - \bar V_s$ at $r=0$, while for $r \rightarrow \infty$, one has $V_s=0 $;
the width of the hole is approximately $ r_s$;
finally, the parameter $d_s$ is related to the squareness of the hole.
\vskip 0.5 truecm
\noindent
As it will explained in Sect. \ref{charmres}, we shall use different numerical values
for some parameters of the model in order to reproduce accurately the
resonances above the open charm threshold.\\
The reduced interactions $\hat W_{(2)}^v$ and $\hat W_{(2)}^s$ for our equation
are obtained reducing the expressions of
Eqs. (\ref{vvect}) and (\ref{vscal}), respectively.
To this aim, we use
the two-body reduction equations of Appendix \ref{reduct2},
specifically:
Eq. (\ref{scalvtred2b}) for the product of the time components
($t$) of the vector interaction
and for the scalar ($s$) interaction;
Eq. (\ref{vectred2b}) for the product of the spatial parts of the vector interaction.
\section{Solution method}\label{solution}
In order to solve Eq. (\ref{eq2fdl}) for the DLE and
Eq. (\ref{eq2fmw}) for the MWE we use a variational procedure,
introduced in Ref. \cite{mdsquint},
that consists in diagonalizing the operators of the equations in
a HO basis.
The trial wave functions of this basis can be written
in the coordinate space as:
\begin{equation}\label{basisho}
\Phi_{n; L,S,J}(\vec r)=< \vec r| n; L, S, J> =
R_{n,L}(r;\bar r) {[Y_L(\hat r) \otimes \chi_S]}_J ~.
\end{equation}
In the previous equation the trial radial function is represented by
$R_{n,L}(r;\bar r)$, being $n$ the principal HO quantum number and
$\bar r$ the variational parameter with the dimension of longitude;
$Y_{L,M_L}(\hat r)$ is the corresponding spherical harmonic
and $\chi_{S,M_S}$, with $S=0,1$ is the $c~ \bar c$
coupled spin function.
The orbital angular momentum and the spin are standardly coupled to
the total angular momentum $J,M_J$.
For brevity we do not write $M_J$ because it is unrelevant for the calculations
of rotationally scalar operators.\\
Furthermore,
for simplicity reasons, we do not consider the possibility of mixing between
states with different values of $L$ , because these effects have been shown to be negligible in semirelativistic calculations.\\
The radial HO functions have the explicit form:
\begin{equation}\label{radialho}
R_{n,L}(r;\bar r) = {\frac {1} {{\bar r}^{\frac 3 2}} }
\left [{\frac {2(n !)} {\Gamma(n+L+{\frac 3 2} )} }
\right ]^{\frac 1 2}
s^L {\cal L}_n^{L+ {\frac 1 2}}(s^2)
\exp \left(- {\frac {s^2} {2}} \right)
\end{equation}
where $s=r/\bar r$ is the adimensional variable and
${\cal L}_n^{L+ {\frac 1 2}}(s^2)$
are the generalized Laguerre polynomials.\\
\noindent
The matrix elements of the operator $\hat G^{-1}_{(2) D}(E_T)$
of Eq. (\ref{kterm2}),
can be calculated in the coordinate space, because in that operator there only appear
finite powers of the momentum operator,
that is
$\vec p^{2q}$, with $0 \leq q\leq2$.
On the contrary, $\hat G^{-1}_{(2) M}(E_T)$ of Eq. (\ref{kterm2mw}),
due to the factor $1/\varepsilon$, depends \textit{nonlocally} on the momentum;
in consequence its matrix elements must be evaluated in the momentum space.
To this aim we use the standard analytic expression of the
HO wave functions in the momentum space
$\Phi_{n; L,S,J}(\vec p)=< \vec p| n; L, S, J> $.
We recall that in both DLE and MWE, $\hat W_{(2)} $ is a local operator
whose matrix elements are calculated in the coordinate space.
In particular,
the $\vec \sigma_i \cdot \vec p_i$ operators are applied to the wave functions of Eq. (\ref{basisho}).
As explained in Appendix \ref{tr2bwe},
this procedure would not be possible if positive (and negative) energy
projectors where used, requiring, in any case,
an integral equation in the momentum space.\\
We note that our reduced equations (\ref{eq2fdl}) and (\ref{eq2fmw})
do not represent standard eigenvalue equations.
On the contrary, due to the reduction procedure,
$\hat G^{-1}_{(2) D}(E_T)$ and $\hat G^{-1}_{(2) M}(E_T)$
(given in Eq. (\ref{kterm2}) and Eq. (\ref{kterm2mw}), respectively),
and also $\hat W_{(2)}$,
\textit{depend} on the total energy $E_T$;
consequently, we have to solve for both models
an energy dependent equation.\\
To this aim we make the following replacement for
$\hat G_{(2) X}^{-1}(E_T)$ :
\begin{equation}\label{gm1e}
-\hat G^{-1}_{(2)X} (E_T)= \hat {\cal F}_X(E_T) -E_T
\end{equation}
where the subscript $X=$ $D,~M$ stands for DLE or MWE. \\
In this way the energy dependent equation can be formally written as:
\begin{equation}\label{eqfet}
\left [
\hat {\cal F}_X(E_T) +\hat W_{(2)}(E_T)
\right ]
|\Phi> =E_T | \Phi>~.
\end{equation}
We replace $E_T$ in the \textit{l.h.s.} with the auxiliary parameter $E_V$,
obtaining the following fictitious eigenvalue equation:
\begin{equation}\label{eqfetfict}
\left [
\hat {\cal F}_X(E_V) +\hat W_{(2)}(E_V)
\right ]
|\Phi> =E_T |\Phi>~.
\end{equation}
We can solve \textit{variationally} this equation (as explained below)
for a given $E_V$ and determine the
corresponding value of $E_T$ in the $r.h.s.$.
Then, we vary $E_V$ until the value found for $E_T$ is equal to $E_V$ of the $l.h.s.$.
This value gives the solution of Eq. (\ref{eqfet})
and represents the energy of the system. \\
As for the variational procedure to solve the fictitious eigenvalue equation
(\ref{eqfetfict}),
we obtain good numerical convergence for $E_T$,
taking the first ten trial wave functions of the basis for each state.
In more detail, the $10 \times 10$ \textit{l.h.s} matrix is diagonalized and minimized
by means of the standard variational approach \cite{mdsquint}.
\section{Study of the Charmonium spectrum }\label{charmres}
In this Section we apply the reduced DLE and MWE to study the Charmonium spectrum
with the interaction introduced in Sect. \ref{charm}.
The obtained theoretical results and the experimental data \cite{pdg} are shown
in Table \ref{tabres};
the values of the parameters used for the calculation
are given in Table \ref{tabpar}.\\
The present model, that takes into account a \textit{fixed} number of degrees of freedom, is expected to work properly for the resonances below the open charm threshold.
For higher resonances some mechanism that takes into account the creation of new particles should be implemented.\\
We consider here the very simple, purely phenomenological, strategy of taking
different values of some parameters of the interaction
above the open charm threshold.
In more detail,
we introduce three intervals for the values of the resonance mass $M$ of the spectrum.
These intervals,
$I_1$, $I_2$ and $I_3$, are defined as:\\
- $I_1, ~~~~~ M < M_a$ , \\
- $I_2, ~~~~~ M_a \leq M < M_b$ ,\\
- $I_3, ~~~~~ M \geq M_b $ \\
where $M_a$ corresponds to the open charm threshold and $M_b$ has been fixed,
after some trials, to obtain a good reproduction of the data.
Their values are given in Table \ref{tabpar}.
As shown in Table \ref{tabres},
in the interval $I_1$ we have considered all the eight experimentally observed resonances;
in the intervals $I_2$ and $I_3$ we have considered respectively
five and three
not controversial resonances.
For a discussion about the phenomenological interpretation of the resonances
in different models, the interested reader is referred to Ref. \cite{mdsf}. \\
In principle, the parameters of the model are the quark mass $m_q$ and
the interaction parameters, introduced in Sect. \ref{charm}, that are:
$\alpha_v(I_i), ~ \bar V_v(I_i), ~ d_v(I_i),$
$\bar V_s(I_i), ~ r_s(I_i)$
and $d_s(I_i)$ for the three intervals $I_1,~I_2$ and $I_3$.\\
The quark mass $m_q$
has not been considered as a free parameter
but has been fixed at the \textit{current mass} QCD value \cite{pdg},
as shown in Table \ref{tabpar}.\\
We have performed \textit{two fits}, denoted as ``A" and ``B",
with the objective of obtaining an accurate
theoretical reproduction of whole experimental spectrum with the smallest possible number of free parameters.
To this aim we have \textit{vinculated} the numerical values of some parameters
in the different intervals.\\
In more detail, as shown in Table \ref{tabpar},
in the interval $I_1$, all the interaction parameters
are free parameters of the fit.\\
In the interval $I_2$, $\alpha_v(I_2)$, $\bar V_v(I_2)$ are free parameters;
the vinculated parameters are:
$d_v(I_2)=d_v(I_1), \bar V_s(I_2)=\bar V_s(I_1), d_s(I_2)=d_s(I_1)$;
in the fit A, $r_s(I_2)$ is a free parameters, while in the fit B,
it is vinculated: $r_s(I_2)= r_s(I_1)$.\\
In the interval $I_3$ all the parameters (in both fits A and B) are vinculated
as follows:
$\alpha_v(I_3)=\alpha_v(I_2)$, $\bar V_v(I_3)=\bar V_v(I_1)$,
$d_v(I_3)= d_v(I_1)$, $\bar V_s(I_3)=\bar V_s(I_1)$,
$r_s(I_3)=r_s(I_1)$ and $d_s(I_3)=d_s(I_1)$. \\
As a result of the fit procedure,
the \textit{same theoretical masses} have been obtained
by using the reduced DLE and MWE; these values, for the two fits, are
shown in the columns Theor.(A) and Theor.(B) of Table \ref{tabres}.
The results of the fit A, with one more free parameter, are slightly better
than the results of fit B.\\
The values of the free parameters of the fits present small differences
for the two equations, as reported in the columns DLE(A), DLE(B) and MWE(A), MWE(B)
of Table \ref{tabpar}. \\
Both the reduced DLE and MWE allow for an accurate reproduction of the spectrum,
showing that, for the Charmonium case, there is no argument
to prefer one of the two equations.
Some more comments are given in the Conclusions.
\section{Conclusions}\label{conclusions}
A local, energy dependent reduction of the DLE has been derived.
The same technique has been also applied to the MWE, obtaining in both cases
a relativistic equation that can be solved with standard numerical techniques.
Further investigation is needed to relate more strictly the reduced equation
to the dynamics of the underlying
field theory.\\
The reduced equations have been applied to the study of the Charmonium spectrum
obtaining accurate results.
Both the DLE and the MWE give the same spectrum with small differences of the free parameters.
This result can be related to the reduction procedure: the contributions
of the $+-$, $-+$ and $--$ states, that are \textit{different} for the DLE and MWE,
are diminished by the reduction operators $K_i$ while, in both equations,
the more relevant contributions
are given by the $++$ states that are the same for the two equations.\\
A deeper study of the interaction, possibly considering different Lorentz structures
beyond the standard vector-scalar model, should be also undertaken.
\vskip 0.5 truecm
\centerline{{\bf Aknowledgements}}
The author thanks the group of ``Gesti\'on de Recursos de Computo Cient\'ifico,
Laboratorio de Biolog\'ia Computacional,
Facultad de Ciencias - Universidad Nacional de Colombia"
for the access to the cluster that was used to perform the numerical calculations
of this work.
\vskip 0.5 truecm
|
\section{Introduction}
In the medical imaging community, challenges have become a prominent forum to benchmark the latest methodological advances for complex machine learning problems \citep{maier2018rankings}.
Across many semantic segmentation challenges \citep{menze2014multimodal,sekuboyina2020verse,bilic2019liver,bakas2018identifying}, convolutional neural networks (CNNs), and in particular the U-Net architecture \citep{ronneberger2015u}, gained increasing popularity over the years.
Most challenges rely upon a seemingly ad-hoc combination of Dice coefficient (DICE) with other metrics for scoring \citep{menze2014multimodal, maier2018rankings}.
How these metrics and the resulting rankings reflect clinical relevance and expert opinion regarding segmentation quality is poorly understood.
For example, segmentation models in the BraTS challenge \citep{bakas2018identifying} are evaluated on three label channels: \emph{enhancing tumor (ET)}, \emph{tumor core (TC)} and \emph{whole tumor (WT)} compartments.
Volumetric Dice coefficients and Hausdorff distances are aggregated equally across the three challenges to obtain the final challenge ranking.
In contrast, the ET channel is of higher importance from a medical perspective.
An increase in ET volume defines tumor progression \citep{wen2010updated}, and glioma surgery aims for a gross total resection of the ET \citep{weller2014eano}.
\citet{taha2015metrics} investigated how different metrics capture certain aspects of segmentation quality.
However, there is a clear gap in knowledge of approximating expert assessment using established metrics and achieving a clinically meaningful representation of segmentation performance.
This problem is of central importance when defining loss functions for CNN training; consequently, the optimized metrics are often selected in an ad-hoc fashion.
In contrast to a plethora of volumetric loss functions \citep{hashemi2018asymmetric,milletari2016v,sudre2017generalised,rahman2016optimizing,brosch2015deep,salehi2017tversky}, only a few non-volumetric losses are established for CNN training such as \citet{karimi2019reducing}\footnote{This is especially true when searching for multi-class segmentation losses, which support GPU-based training. For instance, according to the authors, there is no implementation of \citet{karimi2019reducing} with GPU support.}.
We aim to identify the quantitative correlates of human expert perception concerning semantic segmentation quality assessment.
Therefore, we conduct psychophysical segmentation rating experiments on multi-modal 3D magnetic resonance (MR) glioma data and 2D ultrasound (US) data for grey- and white matter segmentation with expert radiologists.
Building upon these insights, we propose a method exploiting techniques of classical statistics and experimental psychology to form new compound losses for convolutional neural network(CNN) training.
Even though our CNN training experiments do not achieve the initially intended goal, we derive meaningful insights for future research in semantic segmentation.
Across our quality assessment experiments, human experts consistently score computer-generated segmentations better than human-curated reference labels.
This finding raises many questions about the status quo of semantic segmentation in medical images.
\subsection{Statistical analysis}
\label{text:statistical_analysis}
All statistical analyses are computed with \emph{R}.
We implement linear mixed models via \emph{lme4} \citep{bateslme} and evaluate their performance using the package \emph{performance} \citep{performance}.
The principal component analysis is illustrated with \emph{factorminer} \citep{factominer}.
\subsection{Construction of compound losses}
\label{text:loss_construction}
To achieve a better correlation with human segmentation quality assessment, we aim to design new loss functions by combining established loss functions in a complementary fashion.
The resulting compound loss functions are constructed as a weighted linear combination of established loss functions per label channel:
\begin{equation}
L = \sum_{i} \alpha_i \sum_{j} w_{ij} loss_{ij}
\label{eq:compound}
\end{equation}
where $\alpha_i$ denotes weights for channel $i$, and $w_{ij}$ denotes weights for loss $j$ in channel $i$.
Here, the model coefficients obtained from the linear mixed models serve as weights.
Further information regarding the mixed model experiments can be found in \Cref{text:losses_derived} and \Cref{text:appendix_lmms}.
\section{Methodology}
\subsection{Collection of expert ratings}
\label{text:rating_collection}
To better understand how experts judge the quality of medical segmentations, we conduct experiments where participants rate segmentation quality on a six-degree Likert scale (see \Cref{fig:experiment}).
The selection options range from one star for \emph{strong rejection} to six stars for \emph{perfect} segmentations.
Participants assign star ratings by pressing the corresponding keys on the keyboard.
The hotkeys are selected, accounting for several international keyboard layouts to minimize and equalize reaction times.
All stimuli appear on a neutral-grey background.
The segmentation labels and other colorful items are presented employing a color-blind-friendly color palette \citep{wong2011points}.
Participants could toggle the display of the semi-opaque segmentation labels by pressing the space bar.
A fixation cross appears in a quasi-random inter-trial interval (ITI) of \emph{125 / 250 / 500 / 750} milliseconds to ensure participants cannot anticipate the onset of subsequent trials.
We recorded how often participants toggled the display of the segmentation labels and reaction times for all tasks.
By comparing the individual ratings against the mean, the methodology enables analyzing the participants' individual biases (see Appendix).
To allow the recording of accurate reaction times, the experiment was realized using \emph{JS Psych v6.1} \citep{de2015jspsych} embedded into a \emph{Vue JS v2.6} web application.
\begin{figure*}[htb]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/experiment_flow.png}
\caption{\small{Chronological sequence of the experiments from left to right.
Participants conduct the evaluations in a suitable environment for reading medical exams.
The experiments start with participants declaring consent.
Afterward, participants answer a survey regarding their age, gender, and various items to measure their expertise.
Subsequently, the stimulus trials are presented in random sequence to account for order effects.
Following the rating assignment, the experiment automatically progresses to the presentation of the next trial.
At each experiment's end, experts have the opportunity to provide feedback during a post-trial survey.
}}
\label{fig:experiment}
\end{figure*}
\subsection{Computation of metrics}
We calculate a comprehensive set of segmentation quality metrics for each experimental condition using \emph{pymia} \citep{jungo2021pymia}, summarized in \Cref{tab:metrics_implementations}.
The metrics compare the segmentations to the expert-curated reference images.
\input{flow/body/2-1_metrics_table}
\subsection{Loss function implementations}
\Cref{tab:loss_implementations} summarizes the loss functions implementations employed in our experiments.
For many losses, multiple implementations exist.
We discovered that multiple implementations of the same losses could produce different loss values.
Implementations might arise from different means of approximation, such as the choice of $\epsilon$.
To investigate whether the choice of implementation plays a role, we included multiple implementations in the analysis.
For Tversky loss, we choose combinations of hyperparameters that have proven successful for similar segmentation problems; in the following analysis, the parameters for $\alpha$ and $\beta$ are written behind the abbreviation.
\input{flow/body/2-1_loss_table}
\input{flow/body/2-1_loss_construction.tex}
\subsection*{Experiment 1: MR segmentation rating}
\label{text:brats_experiment}
\noindent \textbf{Motivation:}
To understand how human experts evaluate segmentation quality, we conduct a perception study.
We select the BraTS 2019 test set \citep{menze2014multimodal} as a platform for our experiments for several reasons.
First, glioma segmentation represents a complex multi-class segmentation problem.
Second, the annotations have been curated by multiple domain experts over the years.
Consequently, unlike in other available segmentation data sets, the annotations not only represent the interpretation of a single individual and are of high quality.
Last, the dataset is non-public, so we can be sure that the evaluated algorithms are not trained on the annotations.
\noindent \textbf{Procedure:}
We randomly select three exams from eight institutions that provided data to the BraTS 2019 test set \citep{menze2014multimodal}.
Additionally, we present one exam with apparently erroneous segmentation labels to check whether participants follow the instructions.
We display stimulus material according to four experimental conditions, i.e. four different segmentation labels for each exam: the human-annotated \emph{reference} segmentations, segmentations from team \emph{zyx} \citep{zhao2019multi}, a \emph{SIMPLE} \citep{langerak2010label} fusion of seven segmentations \citep{zhao2019multi,xfeng,isensee2018no,scan,lfb,gbmnet,econib} obtained from BraTS-Toolkit \citep{kofler2020brats}, and a segmentation randomly selected without replacement from all the teams participating in BraTS 2019.
In order to have an unbiased view, we select the non-public BraTS test set for this experiment, as we can be sure that none of the evaluated algorithms is trained on it.
For all \textbf{25} exams, the respective center of mass is displayed on \textbf{3} axes, namely axial, coronal, and sagittal view for each of the \textbf{4} experimental conditions.
This results in a total of \textbf{25 * 3 * 4 = 300} trials presented to each expert radiologist.
\Cref{fig:stimuli} depicts an example trial.
\begin{figure*}[hbtp]
\centering
\includegraphics[width=0.8\textwidth]{flow/figs/stimuli.png}
\caption{\small{Stimulus material and rating controls presented to the participants in the BraTS segmentation rating experiment}.
One trial consisted of the presentation of an MR exam in either axial, sagittal, or coronal view, along with the controls for the quality rating and a legend for the segmentation labels.
We presented the glioma's center of mass according to the TC, defined by the \emph{necrosis and enhancing tumor} voxels in 2D slices of T1, T1c, T2, T2 FLAIR in a horizontal row arrangement.
The stimulus presentation is conducted in line with best practices in experimental psychology; further details are outlined in \Cref{fig:experiment} and in \Cref{text:rating_collection}}
\label{fig:stimuli}
\end{figure*}
Furthermore, we calculate metrics comparing to the official reference labels for all BraTS evaluation criteria: \emph{WT}, \emph{TC}, and \emph{ET}, as well as the individual labels: \emph{necrosis} and \emph{edema}.
In addition, we compute mean aggregates for BraTS and individual labels.
\noindent \textbf{Results:}
A total of \emph{n=15} radiologists (\emph{two} female, \emph{13} male) from \emph{six} institutions participated in the experiment.
Participants had an average experience of 10.0$\pm$5.1 working years as radiologists and a mean age of 37.7$\pm$4.8.
Uninterrupted, participants needed approximately 50 minutes to complete the experiment.
\Cref{fig:brats_bc} and \Cref{fig:brats_stars} depict how experts evaluated the segmentation quality.
\Cref{fig:metrics} depicts the Pearson correlation matrix between segmentation quality metrics and expert assessment.
We find only low to moderate correlations across all metrics; correlations are especially low for the clinically important \emph{enhancing tumor} label.
It is important to note that the frequently used DICE coefficient is outperformed by other less established metrics.
\begin{figure}[hbtp]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/brats_bc_stars.png}
\caption{\small{
Bias-corrected mean star ratings per expert and method for the MR segmentation rating experiment.
Raw ratings and the bias correction methodology are detailed in Appendix.
Notably, the human-annotated reference labels (\emph{gt}) are predominantly rated worse than computer-generated annotations of \emph{simple} and \emph{zyx}.
}} \label{fig:brats_bc}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/brats1_violin_arranged.png}
\caption{\small{Mean expert assessment in star rating across exams for the different experimental conditions.
Ratings \emph{without} (left) vs. ratings \emph{with} bias correction (right).
Diamonds indicate mean scores.
Expert radiologists rated the \emph{simple} fusion with a mean of \emph{4.79} stars.
This is slightly higher than the best individual docker algorithm \emph{zyx}} with \emph{4.71} stars.
The fusions' mean improvement is mainly driven by more robust segmentation performance with fewer outliers towards the bottom.
We observe that both of these algorithmic segmentations receive slightly higher scores than the human expert-annotated \emph{reference} labels at \emph{4.47} stars.
The quality of the randomly selected BraTS submissions \emph{(rnd)} still lags behind with \emph{4.04} stars.
Three more qualitative segmentation rating examples can be found in the Appendix.
} \label{fig:brats_stars}
\end{figure}
\begin{figure*}[hbt]
\centering
\includegraphics[width=1.0\linewidth]{flow/figs/metrics.png}
\caption{\small{Pearson correlation matrix between expert assessment and segmentation quality metrics. The rows show the correlations for the individual label channels. In addition, we present the mean aggregates for the BraTS labels (\emph{enhancing tumor, tumor core, and whole tumor}), as well as the single channels (\emph{enhancing tumor, necrosis, and edema}). For the abbreviations in the figure refer to \citep{taha2015metrics,jungo2021pymia}.}}
\label{fig:metrics}
\end{figure*}
\subsection*{Experiment 2: US segmentation rating}
\noindent \textbf{Motivation:}
To understand how the findings from Experiment 1 translate into other segmentation problems, we conduct another expert perception study.
We investigate the task of tissue segmentation in ultrasound (US) imaging in a dataset from \citet{demiray2019weaklysupervised}.
The dataset has the interesting property that the reference annotations are created in a multi-stage collaborative human-machine interaction:
\citet{demiray2019weaklysupervised} base their work on the RESECT dataset \citep{xiao2017re}.
In addition to co-registered pre-operative T1-weighted and T2-weighted MR images and the intra-operative US images from different stages of the intervention, RESECT provides corresponding anatomic landmarks for both modalities.
First, the co-registered pre-operative MR and pre-durotomy US are re-registered with an affine registration with LC2 metric \citep{fuerst2014automatic} in ImFusion Suite \footnote{ImFusion GmbH, Munich, Germany, https://www.imfusion.com}.
Second, two human experts selected the registration result with smaller registration errors according to the RESECT landmarks as a starting point for manual corrections of the registration.
Third, the tissues in the MR volumes are segmented with FreeSurfer \citep{fischl2012freesurfer} and manually corrected by two medical imaging experts (work experience $>$3 years).
Fourth, the tissue segmentation maps are transformed from the MR space into the US space.
Last, the human experts again perform quality control on the resulting annotations.
\noindent \textbf{Procedure:}
For the perception study, human experts evaluate the performance of different tissue segmentation algorithms against the reference.
Analogue to the first experiment, the experts are blinded regarding the source of the segmentation.
In addition to the reference annotation, we present two segmentation algorithms from Demiray et al. (in preparation).
First, a segmentation algorithm based on DeepMedic \citep{kamnitsas2017efficient} and another based on nnUnet \citep{isensee2021nnu}.
Further, a control condition with broken annotations is presented to the participants.
\Cref{fig:us_stimuli} illustrates one example of the total 57 trials.
In line with Experiment 1, we compute segmentation quality metrics between the two candidate algorithms, the control condition, and the reference labels and correlate them with expert assessment.
\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/us_stimuli.png}
\caption{\small{Stimulus material presented to the participants during the US segmentation rating experiment.
One trial consisted of the presentation of a US image (left) with the source area delineated in a corresponding MR image (right).
In addition, the star rating assessment control elements were displayed analog to the BraTS experiment, see \Cref{fig:stimuli}.
As in the previous experiment, participants could toggle the display of segmentation maps for grey- and white matter with the space bar.
Further details regarding the stimulus presentation are outlined in Section \Cref{text:rating_collection}}}
\label{fig:us_stimuli}
\end{figure}
\noindent \textbf{Results:}
A total of \emph{n=8} radiologists (\emph{three} female, \emph{five} male), from \emph{two} institutions participated in the experiment.
Participants had an average work experience of 5.25$\pm$5.63 years and a mean age of 35.0$\pm$5.42.
Uninterrupted, participants needed around twenty minutes to complete the experiment.
\Cref{fig:us_bc} depicts how experts evaluated the segmentation quality across experimental conditions.
\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/us_bc_stars.png}
\caption{\small{
Bias-corrected mean star ratings per expert and condition for the ultrasound segmentation rating experiment.
Expert radiologists rated the \emph{nnu} (inspired by \citep{isensee2021nnu}) and \emph{dpm} (inspired by \citep{kamnitsas2017efficient,kamnitsas2015multi}) candidate algorithms much higher than the control condition (\emph{con}) consisting out of purposely wrongly manufactured segmentations.
Notably, again the U-Net segmentation achieves the highest ratings.
}}
\label{fig:us_bc}
\end{figure}
Furthermore, \Cref{fig:us_metrics} depicts the Pearson correlation matrix between segmentation quality metrics and the expert assessment.
Similar to the first Experiment, we find only low correlations across all metrics, especially for the grey matter label.
\begin{figure*}[htb]
\centering
\includegraphics[width=1.0\linewidth]{flow/figs/ultra_sound_metrics.png}
\caption{\small{Pearson correlation matrix between expert assessment and segmentation quality metrics for the US segmentation rating experiment.
The rows show the correlations for grey matter (\emph{gm}) and white matter (\emph{wm}).
}} \label{fig:us_metrics}
\end{figure*}
\subsection*{Experiment 3: Evaluation of established loss functions}
\noindent \textbf{Motivation:}
To evaluate how these findings could translate into CNN training.
A differentiable loss function is required to train a CNN with stochastic gradient descent (SGD).
As all metrics do not fulfill this criterion, we investigate how established loss functions correlate with expert quality assessment.
\noindent \textbf{Procedure:}
To achieve this, we use the binary label maps to compute established segmentation losses (defined in \Cref{tab:loss_implementations}) between the candidate segmentations and the \emph{reference} labels for the BraTS segmentation task.
To test the validity of this approach, we conduct a supportive experiment, comparing \emph{binary} segmentations to \emph{non-binary} network outputs and achieve comparable results across all loss functions.
In line with the previous experiments, we then correlate the resulting losses with expert assessment.
Furthermore, we conduct a principal component analysis (PCA) to better understand loss functions' complementarity.
\noindent \textbf{Results:}
\Cref{fig:losses} illustrates the correlations with expert assessment; again, we only find low to moderate correlations.
Furthermore, the results of the PCA are depicted in the Appendix.
\begin{figure*}[hbt]
\centering
\includegraphics[width=1.0\linewidth]{flow/figs/losses.png}
\caption{\small{Pearson correlation matrix between expert assessment and segmentation losses. With the exception of one Generalized Dice Score implementation, we observe only low correlations for the enhancing tumor and tumor core channel. In contrast, multiple losses are moderately correlated for the whole tumor channel. We observe huge variance across the implementations of \emph{Generalized Dice}. However, the implementations abbreviated as IOU and JAC for \emph{Jaccard index}, as well as DICE and SOFTD for \emph{Dice coefficient}, provide very similar signals, as expected.}}
\label{fig:losses}
\end{figure*}
\subsection*{Experiment 4: Construction of compound loss functions}
\label{text:losses_derived}
\noindent \textbf{Motivation:}
As all investigated established loss functions achieve, at best moderate correlation with expert assessment, we set out to explore whether we can achieve a better fit with expert assessment when combining these.
\noindent \textbf{Procedure:}
We approach this in a two-step process.
First, we identify promising loss combinations:
Losses produce different signals (gradients) when they react to input signals (network outputs).
With hierarchical clustering on a Euclidean distance matrix, we analyze similarity in loss response patterns, see \Cref{fig:loss_map}.
\begin{figure}[H]
\label{fig:loss_map}
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/loss_map.png}
\caption{\small{Phylogenetic tree illustrating hierarchical clustering on a Euclidean distance matrix.
Losses are colored according to ten cluster groups.
We included the expert assessment for reference; one can observe how it resides somewhere between the distance-based losses and the group of generalized Dice losses and SS loss.
These findings are in line with the \emph{PCA}, see Appendix.}}
\end{figure}
Applying \Cref{eq:compound}, we can now build complementary loss combinations by selecting established loss functions from the different and hopefully complementary cluster groups.
In a second step, we evaluate our loss combinations' predictive performance for the expert assessment using linear mixed models (LMM) as detailed in section \Cref{text:statistical_analysis}.
Therefore, we average the human expert rating across views to obtain a \emph{quasi-metric} variable allowing us to apply mixed models.
We deem this approach valid, as the distribution is consistent across views; see Appendix.
We then model the human expert assessment as a dependent variable and predict it by plugging in the loss values of our candidate combinations as fixed-effect predictor variables.
Mixed models allow accounting for the \emph{non-independence} of data points by additionally modeling random factors.
Therefore, we include \emph{exam} as a random factor, as some glioma are more difficult to segment.
This increased difficulty is expressed in less segmentation performance and greater variability across algorithmic and human segmentations.
Additionally we include the \emph{segmentation method} as a random factor, as some algorithms are better than others and human segmentations are worse than good algorithms according to our experts, compare \Cref{text:brats_experiment}.
To identify promising compound loss candidates for CNN training, we evaluate the predictive power of our models by computing Pseudo R\textsuperscript{2} \citep{nakagawa2017coefficient} while monitoring typical mixed regression model criteria, such as multi-collinearity, non-normality of residuals and outliers, homoscedasticity, homogeneity of variance and normality of random effects, see \Cref{text:appendix_lmms}.
Once a promising loss combination is detected, we obtain the weights for our loss formulation (see \Cref{text:loss_construction}) from the corresponding LMM.
\noindent \textbf{Results:}
Our methodology allows for generating a variety of loss candidates.
To evaluate the performance of our approach, we obtain four promising loss candidates.
The first two candidates use the same combination across all label channels.
Candidate \emph{gdice\_bce} uses \emph{GDICE\_W} in combination with \emph{BCE}.
Candidate \emph{gdice\_ss\_bce} iterates upon this by adding \emph{SS} loss to the equation.
In contrast the candidates \emph{channel\_wise\_weighted} and \emph{channel\_wise} use different losses per channel:
Channel \emph{whole tumor} uses the \emph{gdice\_ss\_bce} candidate loss, while channel \emph{tumor core} is computed via the \emph{gdice\_bce} variant.
In contrast, the \emph{enhancing tumor} channel relies solely on \emph{GDICE\_W}, as this is the only loss candidate with at least moderate correlation with expert assessment, compare \Cref{fig:losses}.
While candidate \emph{channel\_wise} treats all channels equally, the weighted variant prioritizes the more clinically relevant \emph{tumor core and enhancing tumor channels} by a factor of \emph{five}.
Detailed analysis for all models is provided in the Appendix.
\subsection*{Experiment 5: Quantitative evaluation of compound losses}
\noindent \textbf{Motivation:}
To explore how the four identified compound losses from Experiment 4 perform with regard to established metrics, we perform another experiment.
\noindent \textbf{Procedure:}
Therefore, we train nnU-Net \citep{isensee2021nnu} using a standard BraTS trainer \citep{isensee2020nnu} with a moderate augmentation pipeline on the \emph{fold 0 split} of the \emph{BraTS 2020} training set, using the rest of the training set for validation. The official \emph{BraTS 2020} validation set is used for testing.
To make our experiment fully reproducible, we select the BraTS 2020 data for this experiment as the training data is publicly available, and metric evaluation on the validation set can be obtained through the CBICA imaging portal.
Apart from replacing the default \emph{DICE+BCE} loss with our custom-tailored loss candidates and, in some cases, necessary learning rate adjustments, we keep all training parameters constant.\footnote{Friendly note to beloved reviewers: Naturally, the code for our nnU-net training will be publicly available on GitHub for full reproducibility.}
To shed some light on the training variance, we also train another five times with dice\_bce baseline.
\noindent \textbf{Results:}
We observe no significant quantitative improvement; the resulting volumetric dice scores are detailed in \Cref{fig:training_results}.
\begin{figure*}[hbtp]
\centering
\includegraphics[width=1.0\textwidth]{flow/figs/training_results.png}
\caption{\small{Dice comparison of loss candidates vs. baselines across BraTS label channels.
Diamonds indicate mean scores.
P-values, without adjustment for repeated tests, for paired-samples T-tests comparing our candidates with the dice\_bce baseline from left to right: \emph{0.1547, 0.04642, 0.05958, 0.01881} for the 95\% significance level.
While we consider the volumetric DICE score improvement as non-significant, interestingly, it is larger than the training variance, see Appendix.}}
\label{fig:training_results}
\end{figure*}
\subsection*{Experiment 6: Qualitative evaluation of compound losses}
\label{text:qualieva}
\noindent \textbf{Motivation:}
Even though we did not achieve a systematic improvement according to established segmentation quality metrics, we conduct another expert perception study to evaluate the generated compound losses with expert radiologists and fully close the loop.
As we learned from previous experiments that established quantitative metrics are not fully representative of expert assessment, we still consider this experiment worthy.
\noindent \textbf{Procedure:}
Experts evaluate only the axial views of the gliomas' center of mass on a random sample of 50 patients from our test set.
We present our four candidate losses vs. the \emph{reference} and \emph{DICE+BCE} baseline as conditions.
This way, the experiment incorporates 300 trials.
\noindent \textbf{Results:}
Three male senior radiologists from two institutions participated in the experiment.
Participants reported three, five, and eleven years of work experience and were aged 31, 37, and 40 years.
\Cref{fig:brats2_bc} illustrates how experts can hardly detect performance differences between the evaluated computer-generated segmentations.
Remarkably, again the human-annotated \emph{reference} is rated worse.
\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/brats2_bc_stars.png}
\caption{\small{
Bias-corrected mean star ratings per expert and condition for the second MR segmentation rating experiment.
Raw ratings and the bias correction methodology are detailed in the Appendix.
Expert assessment of the four loss candidates vs. \emph{reference} and the \emph{DICE+BCE} baseline.
We observe only subtle differences in expert rating between the \emph{DICE+BCE} baseline and our candidates.
Notably, as in the first perception study, the human-annotated \emph{reference} is rated worse, compare \Cref{fig:brats_bc} \& \Cref{fig:brats_stars}.
}} \label{fig:brats2_bc}
\end{figure}
\section{Experiments}
\input{flow/body/3-1_brats}
\input{flow/body/3-2_ultra-sound}
\input{flow/body/3-3_established}
\input{flow/body/3-4_construction}
\input{flow/body/3-5_cnn}
\input{flow/body/3-6_qualitative}
\section{Discussion}
We conducted multi-center expert perception studies with 15 expert radiologists for 3D MR- and eight expert radiologists for 2D ultrasound imaging segmentations.
Furthermore, to achieve a better fit with human expert assessment, we developed a method to construct compound loss functions for CNN training.
These compound loss functions represent an effort to better approximate abstract metrics that cannot be optimized directly, such as human expert assessment.
For this purpose, we select components based on the cluster - and principal component analysis and obtain weights from linear mixed models.
Even though we do not manage to train more expert-pleasing segmentation networks, our findings provide meaningful cues for future research.
Existing literature \citep{reinke2018exploit,maier2018rankings} reported on the discrepancy between expert segmentation quality assessment and established segmentation quality metrics.
Our approach, combining psychophysical experiments and classical statistics, identifies the quantitative correlates of qualitative human expert perception to shed more light on this complex phenomenon.
While both entities, \emph{segmentation quality metrics} and \emph{expert radiologists}, try to measure segmentation quality, our analysis reveals that their measurements correlate only moderately at best, especially for clinically relevant features such as the \emph{enhancing tumor} label.
Therefore, we highlight the need to develop new segmentation metrics and losses that better correlate with expert assessment.
One limitation of our study is that similarity metrics are always dependent on the employed reference annotations.
It is evident that \emph{DSC} fails to represent expert opinion when the segmentation of small structures matters, such as for multiple sclerosis lesion segmentation \citep{kofler2022blob} or metastasis segmentation \citep{buchner2022development}.
However, in the absence of actual ground truth, it is impossible to disentangle to which extent the observed low correlations are due to the incapability of metrics to capture expert assessment or a result of poor reference annotations \citep{kofler2022approaching}.
Nevertheless, it should be noted that the BraTS dataset arguably features above-average annotation quality, as, unlike other datasets in the biomedical field, it was curated by several experts over multiple years.
Another limitation of our study is that in the BraTS segmentation rating experiments, radiologists judge the complex 3D segmentations on three 2D views.
However, while axial views are rated slightly better, the rating effects are quite consistent across views (see \Cref{fig:per_view}).
When training a modern convolutional neural network with our expert-inspired compound loss functions, we cannot produce a significant improvement over the well-established \emph{Dice+BCE} baseline.
As we find \emph{BCE} to be one of few loss functions complementary to confusion-matrix-based losses and the \emph{Dice+BCE} baseline is mathematically similar to our identified loss candidates, this is perhaps not surprising (see \Cref{fig:loss_map}).
Hence our findings might explain why the empirically found \emph{Dice+BCE} provides a solid baseline across many segmentation tasks.
As algorithms and humans can usually generate satisfactory pre-operative glioma segmentations, poor segmentations are under-represented in our sample.
We hypothesize that if we replace our random sample from the BraTS test set with an equally distributed sample covering the full spectrum of segmentation quality, we might find higher correlations between established similarity metrics and human expert perception.
Up to the level of inter-rater agreement, it seems possible to train visually appealing segmentation networks using a plain soft Dice loss \citep{kofler2022approaching,kofler2022dqe}.
\footnote{This might also explain why surrogate models for human star rating reached a higher correlation with volumetric \emph{DSC} \citep{kofler2022dqe} on a dataset with a broader spectrum of segmentation quality.}
Interestingly, across all our experiments, experts consistently scored CNN segmentations better than the human-curated \emph{reference} labels.
This is not only true for sophisticated ensembles (see \Cref{fig:brats_bc}) but also for segmentations generated by single CNNs (compare \Cref{fig:us_bc}, \Cref{fig:brats2_bc}, \Cref{fig:per_view}).
This highlights the need to develop better annotation procedures.
We can only speculate why computers might produce better segmentations than human annotators.
In the annotation process, human annotators produce systematic and random errors.
With enough training data, a CNN can abstract and will only learn systematic errors represented in the training data.
However, training a CNN can eliminate random, non-systematic human annotation errors by averaging these out.
When interviewed in a single-blind setting, radiologists repeatedly attributed their judgments to the better tracing of contours \footnote{We find inconclusive multifaceted, moderate correlations between shape features of specific labels and expert ratings.}.
This seems plausible, as, unlike computers, humans do not possess unlimited diligence to pixel/voxel-perfectly trace contours.
Further, this is supported by the fact that the difference between algorithmic and human-annotated reference segmentations is least pronounced in the axial view \Cref{fig:per_view} that is the basis for most expert annotations (see \Cref{fig:per_view}).
However, how these complex decisions are formed remains an open research question.
\noindent\textbf{Conclusion:}
Even though the terms are often used synonymously in the literature, our experiments highlight that it is imperative to reflect upon whether \emph{reference} labels actually qualify as \emph{ground truth}.
In our experiments, a hypothetical volumetric DICE score of 1, so 100 percent overlap with the \emph{reference}, would translate to a worse segmentation quality, according to expert radiologists.
Therefore, our findings question the status of the Dice coefficient as the \emph{de facto gold standard} for measuring segmentation quality beyond expert agreement.
Furthermore, they question whether segmentation performance in general and challenge rankings, in particular, should be determined based on similarity metrics with potentially erroneous human-curated \emph{reference} annotations \citep{kofler2022approaching}.
Future research should investigate whether humans are still able to outperform CNNs when applying exhaustive quality assurance and control procedures.
While more participants would certainly add to the credibility of our experiments, we found the reported effects to be consistent across participants.
As senior radiologists are hard to come by, one should mention that this, to the best of our knowledge, represents the largest study featuring expert segmentation quality ratings.
As primate perception follows a fixed, partially understood set of rules, for instance, \citep{wagemans2012century,roelfsema2006cortical}, it might be that our findings also generalize to other segmentation problems, even outside the medical domain.
However, further research is required to explore this.
\clearpage
\section*{Acknowledgments}
\noindent Even though we cannot reveal their names to maintain anonymity, we want to thank the participating radiologists who enabled these studies.
\noindent Bjoern Menze, Benedikt Wiestler, and Florian Kofler are supported through the SFB 824, subproject B12.
\noindent Supported by Deutsche Forschungsgemeinschaft (DFG) through TUM International Graduate School of Science and Engineering (IGSSE), GSC 81.
\noindent Suprosanna Shit and Ivan Ezhov are supported by the Translational Brain Imaging Training Network(TRABIT) under the European Union's `Horizon 2020' research \& innovation program (Grant agreement ID: 765148).
\noindent Ivan Ezhov and Suprosanna Shit are funded by DComEX (Grant agreement ID: 956201).
\noindent With the support of the Technical University of Munich – Institute for Advanced Study, funded by the German Excellence Initiative.
\noindent Supported by Anna Valentina Lioba Eleonora Claire Javid Mamasani.
\noindent Suprosanna Shit is supported by the Graduate School of Bioengineering, Technical University of Munich.
\noindent Jan Kirschke has received Grants from the ERC, DFG, BMBF and is Co-Founder of Bonescreen GmbH.
\noindent Bjoern Menze acknowledges support by the Helmut Horten Foundation.
\noindent Research reported in this publication was partly supported by AIME GPU cloud services.
\section{Supplemental figures}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/pca.png}
\caption{\small{PCA with two factors.
The scree plot and multiple nongraphical tests show that two factors are sufficient to describe the loss landscape.
PCA analysis with the full set of loss functions on the \emph{left}, for the sake of clarity, we repeated the PCA analysis with a subset of commonly used loss functions on the \emph{right}.
Similar to the hierarchical clustering, one can see how expert assessment can be described as a combination of two factors.
While the volumetric losses load mainly on dimension one, only \emph{BCE} and the two Hausdorff losses cover dimension two.
This might explain why the empirically found baseline \emph{DICE+BCE} performs well across many segmentation tasks. }}
\label{fig:pca}
\end{figure}
\begin{figure}[htbp]
\label{fig:per_view}
\centering
\includegraphics[width=0.95\textwidth]{flow/figs/per_view.png}
\caption{\small{ Star rating across views. Diamonds indicate mean scores. The distribution is constant per \emph{axial}, \emph{coronal} and \emph{sagital} view. In general, segmentation quality ratings seem slightly higher on the axial view. We speculate this might occur because doctors usually annotate on the axial view, so the resulting annotation quality should be slightly higher. In addition, the resolution is often higher in the axial plane leading to less ambiguity when judging the quality of segmentation images.}}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[width=1.0\textwidth]{flow/figs/training_variance.png}
\caption{\small{Illustration of training variance. Diamonds indicate mean scores. To get an estimate of the randomness involved in our training process, we trained our \emph{nnU-net} implementation five times with \emph{DICE+BCE} loss. We observe a dice performance between \emph{0.72} and \emph{0.74}, which is lower than the performance of our loss candidates.}} \label{fig:training_variance}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[width=1.0\textwidth]{flow/figs/scree_plot.png}
\caption{\small{Scree plot. Multiple tests (see top right corner) indicate that two components are sufficient for the PCA.}} \label{fig:pca_scree}
\end{figure}
\begin{figure}[htbp]
\centering
\includegraphics[width=1.0\linewidth]{flow/figs/qualitative_examples.png}
\caption{\small{Three segmentation examples with varying expert assessment.
T1, T1c, T2, and FLAIR images are displayed from left to right.
The segmentations are overlayed in \emph{red} for \emph{necrosis}, \emph{yellow} for \emph{enhancing tumor} and \emph{green} for \emph{edema}.
The \emph{15} expert radiologists rated the top example \emph{superior} with a mean of \emph{5.73} stars, the middle example \emph{mediocre} with a mean of \emph{3.33} stars and the bottom example \emph{inferior} with a mean of \emph{1.93} stars.}} \label{fig:qualitative_examples}
\end{figure}
\section{Bias correction}
\begin{figure}[H]
\centering \includegraphics[width=0.55\linewidth]{flow/figs/brats_stars.png}
\caption{\small{Raw (non-averaged) expert assessment in star rating across exams for the different experimental conditions.
Diamonds indicate mean scores.
}} \label{fig:brats_raw_box}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.55\linewidth]{flow/figs/brats_raw_stars.png}
\caption{\small{
Mean star ratings per participant and method for MR segmentation rating Experiment 1.
Some participants reveal a strong / positive biases compared to the mean ratings, compare \Cref{fig:brats_biases}.
However, when correcting for these biases participants are remarkably consistent in their ratings, compare \Cref{fig:brats_bc}.
}} \label{fig:brats_raw}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.55\linewidth]{flow/figs/us_raw_stars.png}
\caption{\small{
Mean star ratings per participant and method for ultrasound segmentation rating experiment 2.
Similar to the MR experiment, some participants reveal a strong / positive biases compared to the mean ratings.
However, when correcting for these biases participants are remarkably consistent in their ratings, compare \Cref{fig:us_bc}.
}} \label{fig:us_raw}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.65\textwidth]{flow/figs/us_stars.png}
\caption{\small{
Raw (non-averaged) expert assessment in star rating across exams in the ultrasound segmentation rating experiment 2.
Diamonds indicate mean scores.
Expert radiologists rated the \emph{nnu} (inspired by \citep{isensee2021nnu}) and \emph{dpm} (inspired by \citep{kamnitsas2017efficient,kamnitsas2015multi}) candidate algorithms much higher than the control condition (\emph{con}) consisting out of purposely wrongly manufactured segmentations.
}} \label{fig:us_stars}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.65\linewidth]{flow/figs/brats2_raw_stars.png}
\caption{\small{
Mean star ratings per participant and condition for MR segmentation rating Experiment 6.
Some participants reveal strong biases in relation to the mean ratings.
However, when correcting for these biases, participants are remarkably consistent in their ratings, compare \Cref{fig:brats2_bc}.
}} \label{fig:brats2_raw}
\end{figure}
\begin{figure*}[hbtp]
\centering
\includegraphics[width=1.0\linewidth]{flow/figs/bias.png}
\caption{\small{Individual bias per participant in Experiment 1.
Diamonds indicate the mean.
The boxplots illustrate the difference between the participants individual ratings and the mean rating per exam accross all participants in Experiment 1.
While some participants are very congruent with the average, e.g. participant \emph{ablaze\_gull}, we observe strong inter-individual differences for others like \emph{miserly\_willet}.
One can obtain bias corrected ratings by subtracting the respective bias from the participants individual ratings resulting, compare \Cref{fig:brats_bc}.
}} \label{fig:brats_biases}
\end{figure*}
\section{Linear mixed models}
\label{text:appendix_lmms}
Following, we illustrate the model outputs and model diagnostics for the linear mixed models derived in \Cref{text:losses_derived}.
The model diagnostics are generated with \emph{performance} \citep{ludecke2021performance}.
The model coefficients serve as weights for our loss functions. For the \emph{channel\_wise\_weighted} loss functions the more clinically relevant \emph{tumor core} and \emph{enhancing tumor} channel are weighted with a factor of \emph{five} over the \emph{whole tumor} channel for the channel wise aggregation.
Note: in the model outputs the \emph{segmentation method} is referred to as \emph{condition}.
Further, the \emph{exam} is encoded as \emph{patient} (in our dataset there is only one exam per patient so the variables encode the same concept).
\newpage
\subsection{\emph{gdice\_bce} loss}
\lstset{basicstyle=\small\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstinputlisting[float=hbpt,frame=tb,caption=R model output for gdice\_bce loss,label=nf2]{flow/model_outputs/nf2.txt}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.98\textwidth]{flow/figs/nf2.png}
\caption{
\small{
Model diagnostics for the \emph{gdice\_bce} loss.
The loss function ombined \emph{BCE} and \emph{GDICE\_W} with weights \emph{0.4624} and \emph{0.7462} obtained from the respective coefficients in the linear mixed model.
The model achieved a \emph{Pseudo R2} of \emph{0.391}.
)}
}
\label{fig:model_gdicebce}
\end{figure}
\clearpage
\subsection{\emph{gdice\_bce\_ss} loss}
\lstset{basicstyle=\small\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstinputlisting[float=hbpt,frame=tb,caption=R model output for gdice\_bce\_ss loss,label=nf3]{flow/model_outputs/nf3.txt}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.98\textwidth]{flow/figs/nf3.png}
\caption{
\small{
Model diagnostics for the \emph{gdice\_bce\_ss} loss.
The loss function combined \emph{BCE}, \emph{GDICE\_W} and \emph{SS} with weights \emph{0.3267}, \emph{0.4570} and \emph{18.2016} obtained from the respective coefficients in the linear mixed model.
The model achieved a \emph{Pseudo R2} of \emph{0.405}.
}
}
\label{fig:model_gdicebcess}
\end{figure}
\clearpage
\subsection{channel wise losses: whole tumor channel}
\lstset{basicstyle=\small\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstinputlisting[float=hbpt,frame=tb,caption=R model output for whole tumor channel,label=cwwt]{flow/model_outputs/wt.txt}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.98\textwidth]{flow/figs/wt_channel.png}
\caption{
\small{
Model diagnostics for the \emph{whole tumor} channels of the \emph{channel\_wise} and \emph{channel\_wise\_weighted} loss functions.
The loss functions combined \emph{GDICE\_W}, \emph{SS} and \emph{BCE} with weights \emph{1.5876}, \emph{4.0027} and \emph{0.3039} obtained from the respective coefficients in the linear mixed model.
Notably, we observed higher variation inflation than for \emph{gdice\_bce\_ss} loss combining the same components over all channels.
The model achieved a \emph{Pseudo R2} of \emph{0.270}.
}
}
\label{fig:wt_model}
\end{figure}
\clearpage
\subsection{channel wise losses: tumor core channel}
\lstset{basicstyle=\small\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstinputlisting[float=hbpt,frame=tb,caption=R model output for tumor core channel,label=wctc]{flow/model_outputs/tc.txt}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.98\textwidth]{flow/figs/tc_channel.png}
\caption{
\small{
Model diagnostics for the \emph{tumor core} channels of the \emph{channel\_wise} and \emph{channel\_wise\_weighted} loss functions.
The loss functions combined \emph{GDICE\_W} and \emph{BCE} with weights \emph{0.77646} and \emph{21026} obtained from the respective coefficients in the linear mixed model.
The model achieved a \emph{Pseudo R2} of \emph{0.347}.
}
}
\label{fig:tc_model}
\end{figure}
\clearpage
\subsection{channel wise losses: enhancing tumor channel}
\lstset{basicstyle=\small\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\lstinputlisting[float=hbpt,frame=tb,caption=R model output for enhancing tumor channel,label=cwet]{flow/model_outputs/et.txt}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.98\textwidth]{flow/figs/et_channel.png}
\caption{
\small{
Model diagnostics for the \emph{enhancing tumor} channels of the \emph{channel\_wise} and \emph{channel\_wise\_weighted} loss functions.
The loss functions combined \emph{GDICE\_W} and \emph{BCE} with weights \emph{0.77646} and \emph{21026} obtained from the respective coefficients in the linear mixed model.
The model achieved a \emph{Pseudo R2} of \emph{0.112}, which is not surprising as our previous analysis showed that the clinically relevant \emph{enhancing tumor} label is very difficult to capture.
}
}
\end{figure}
\section{Terminology definitions}
Here we define some basic concepts of Neuroradiology and experimental Psychology used in the manuscript.
\noindent\textbf{Exam:} A radiology exam consists of a set of image recordings recorded in one session.
For instance, a glioma exam in the BraTS challenge consists of a T1, T1c, T2, and FLAIR image.
\noindent\textbf{Stimulus (material):} Unlike the control elements, which are constant over all trials, the stimulus material is varied across experimental conditions.
The participants' responses are recorded and analyzed with regard to different stimuli.
\noindent\textbf{Fixation cross:} In the inter-trial interval (ITI), we display fixation crosses to avoid confounding the recording of reaction times with \emph{unnecessary} eye movements such as \mbox{(re-)focusing} on the screen.
\section{Proof of the central theorem}
\end{document}
\chapter{Overview of Features}
Before using \verb!tabularray! package, it is better to know how to typeset simple text and
math tables with traditional \verb!tabular!, \verb!tabularx! and \verb!array! environments,
because we will compare \verb!tblr! environment from \verb!tabularray! package with these
environments. You may read web pages on LaTeX tables on
\href{https://www.learnlatex.org/en/lesson-08}{LearnLaTeX} and
\href{https://www.overleaf.com/learn/latex/Tables}{Overleaf} first.
\section{Vertical Space}
After loading \verb!tabularray! package in the preamble,
we can use \verb!tblr! environments to typeset tabulars and arrays.
The name \verb!tblr! is short for \verb!tabularray! or \verb!top-bottom-left-right!.
The following is our first example:
\begin{demo}
\begin{tabular}{lccr}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
Epsilon & Zeta & Eta & Theta \\
\hline
Iota & Kappa & Lambda & Mu \\
\hline
\end{tabular}
\end{demo}
\begin{demohigh}
\begin{tblr}{lccr}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
Epsilon & Zeta & Eta & Theta \\
\hline
Iota & Kappa & Lambda & Mu \\
\hline
\end{tblr}
\end{demohigh}
You may notice that there is extra space above and below the table rows with \verb!tblr! environment.
This space makes the table look better.
If you don't like it, you could use \verb!\SetTblrInner! command:
\begin{demohigh}
\SetTblrInner{rowsep=0pt}
\begin{tblr}{lccr}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
Epsilon & Zeta & Eta & Theta \\
\hline
Iota & Kappa & Lambda & Mu \\
\hline
\end{tblr}
\end{demohigh}
But in many cases, this \verb!rowsep! is useful:
\begin{demo}
$\begin{array}{rrr}
\hline
\dfrac{2}{3} & \dfrac{2}{3} & \dfrac{1}{3} \\
\dfrac{2}{3} & -\dfrac{1}{3} & -\dfrac{2}{3} \\
\dfrac{1}{3} & -\dfrac{2}{3} & \dfrac{2}{3} \\
\hline
\end{array}$
\end{demo}
\begin{demohigh}
$\begin{tblr}{rrr}
\hline
\dfrac{2}{3} & \dfrac{2}{3} & \dfrac{1}{3} \\
\dfrac{2}{3} & -\dfrac{1}{3} & -\dfrac{2}{3} \\
\dfrac{1}{3} & -\dfrac{2}{3} & \dfrac{2}{3} \\
\hline
\end{tblr}$
\end{demohigh}
Note that you can use \verb!tblr! in both text and math modes.
\section{Multiline Cells}
It's quite easy to write multiline cells without fixing the column width in \verb!tblr! environments:
just enclose the cell text with braces and use \verb!\\! to break lines:
\begin{demohigh}
\begin{tblr}{|l|c|r|}
\hline
Left & {Center \\ Cent \\ C} & {Right \\ R} \\
\hline
{L \\ Left} & {C \\ Cent \\ Center} & R \\
\hline
\end{tblr}
\end{demohigh}
\section{Cell Alignment}
From time to time,
you may want to specify the horizontal and vertical alignment of cells at the same time.
\verb!Tabularray! package provides a \verb!Q! column for this
(In fact, \verb!Q! column is the only primitive column,
other columns are defined as \verb!Q! columns with some options):
\begin{demohigh}
\begin{tblr}{|Q[l,t]|Q[c,m]|Q[r,b]|}
\hline
{Top Baseline \\ Left Left} & Middle Center & {Right Right \\ Bottom Baseline} \\
\hline
\end{tblr}
\end{demohigh}
Note that you can use more meaningful \verb!t! instead of \verb!p! for top baseline alignment.
For some users who are familiar with word processors,
these \verb!t! and \verb!b! columns are counter-intuitive.
In \verb!tabularray! package, there are another two column types \verb!h! and \verb!f!,
which will align cell text at the head and the foot, respectively:
\begin{demohigh}
\begin{tblr}{Q[h,4em]Q[t,4em]Q[m,4em]Q[b,4em]Q[f,4em]}
\hline
{row\\head} & {top\\line} & {middle} & {line\\bottom} & {row\\foot} \\
\hline
{row\\head} & {top\\line} & {11\\22\\mid\\44\\55} & {line\\bottom} & {row\\foot} \\
\hline
\end{tblr}
\end{demohigh}
\section{Multirow Cells}
The above \verb!h! and \verb!f! alignments are necessary
when we write multirow cells with \verb!\SetCell! command in \verb!tabularray!.
\begin{demo}
\begin{tabular}{|l|l|l|l|}
\hline
\multirow[t]{4}{1.5cm}{Multirow Cell One} & Alpha &
\multirow[b]{4}{1.5cm}{Multirow Cell Two} & Alpha \\
& Beta & & Beta \\
& Gamma & & Gamma \\
& Delta & & Delta \\
\hline
\end{tabular}
\end{demo}
\begin{demohigh}
\begin{tblr}{|l|l|l|l|}
\hline
\SetCell[r=4]{h,1.5cm} Multirow Cell One & Alpha &
\SetCell[r=4]{f,1.5cm} Multirow Cell Two & Alpha \\
& Beta & & Beta \\
& Gamma & & Gamma \\
& Delta & & Delta \\
\hline
\end{tblr}
\end{demohigh}
Note that you don't need to load \verb!multirow! package first,
since \verb!tabularray! doesn't depend on it.
Furthermore, \verb!tabularray! will always typeset decent multirow cells.
First, it will set correct vertical middle alignment,
even though some rows have large height:
\begin{demo}
\begin{tabular}{|l|m{4em}|}
\hline
\multirow[c]{4}{1.5cm}{Multirow} & Alpha \\
& Beta \\
& Gamma \\
& Delta Delta Delta \\
\hline
\end{tabular}
\end{demo}
\begin{demohigh}
\begin{tblr}{|l|m{4em}|}
\hline
\SetCell[r=4]{m,1.5cm} Multirow & Alpha \\
& Beta \\
& Gamma \\
& Delta Delta Delta \\
\hline
\end{tblr}
\end{demohigh}
Second, it will enlarge row heights if the multirow cells have large height,
therefore it always avoids vertical overflow:
\begin{demo}
\begin{tabular}{|l|m{4em}|}
\hline
\multirow[c]{2}{1cm}{Line \\ Line \\ Line \\ Line} & Alpha \\
\cline{2-2}
& Beta \\
\hline
\end{tabular}
\end{demo}
\begin{demohigh}
\begin{tblr}{|l|m{4em}|}
\hline
\SetCell[r=2]{m,1cm} {Line \\ Line \\ Line \\ Line} & Alpha \\
\cline{2}
& Beta \\
\hline
\end{tblr}
\end{demohigh}
If you want to distribute extra vertical space evenly to two rows,
you may use \verb!vspan! option described in Chapter \ref{chap:extra}.
\section{Multi Rows and Columns}
It was a hard job to typeset cells with multiple rows and multiple columns. For example:
\begin{demo}
\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{2 Rows}
& \multicolumn{2}{c|}{2 Columns}
& \multicolumn{2}{c|}{\multirow{2}{*}{2 Rows 2 Columns}} \\
\cline{2-3}
& 2-2 & 2-3 & \multicolumn{2}{c|}{} \\
\hline
3-1 & 3-2 & 3-3 & 3-4 & 3-5 \\
\hline
\end{tabular}
\end{demo}
With \verb!tabularray! package, you can set spanned cells with \verb!\SetCell! command:
within the optional argument of \verb!\SetCell! command,
option \verb!r! is for rowspan number, and \verb!c! for colspan number;
within the mandatory argument of it, horizontal and vertical alignment options are accepted.
Therefore it's much simpler to typeset spanned cells:
\begin{demohigh}
\begin{tblr}{|c|c|c|c|c|}
\hline
\SetCell[r=2]{c} 2 Rows
& \SetCell[c=2]{c} 2 Columns
& & \SetCell[r=2,c=2]{c} 2 Rows 2 Columns & \\
\hline
& 2-2 & 2-3 & & \\
\hline
3-1 & 3-2 & 3-3 & 3-4 & 3-5 \\
\hline
\end{tblr}
\end{demohigh}
Using \verb!\multicolumn! command, the omitted cells \textcolor{red3}{must} be removed.
On the contrary,
using \verb!\multirow! command, the omitted cells \textcolor{red3}{must not} be removed.
\verb!\SetCell! command behaves the same as \verb!\multirow! command in this aspect.
With \verb!tblr! environment, any \verb!\hline! segments inside a spanned cell will be ignored,
therefore we're free to use \verb!\hline! in the above example.
Also, any omitted cell will definitely be ignored when typesetting,
no matter it's empty or not.
With this feature, we could put row and column numbers into the omitted cells,
which will help us to locate cells when the tables are rather complex:
\begin{demohigh}
\begin{tblr}{|ll|c|rr|}
\hline
\SetCell[r=3,c=2]{h} r=3 c=2 & 1-2 & \SetCell[r=2,c=3]{r} r=2 c=3 & 1-4 & 1-5 \\
2-1 & 2-2 & 2-3 & 2-4 & 2-5 \\
\hline
3-1 & 3-2 & MIDDLE & \SetCell[r=3,c=2]{f} r=3 c=2 & 3-5 \\
\hline
\SetCell[r=2,c=3]{l} r=2 c=3 & 4-2 & 4-3 & 4-4 & 4-5 \\
5-1 & 5-2 & 5-3 & 5-4 & 5-5 \\
\hline
\end{tblr}
\end{demohigh}
\section{Column Types}
\verb!Tabularray! package supports all normal column types, as well as
the extendable \verb!X! column type,
which first occurred in \verb!tabularx! package and was largely improved by \verb!tabu! package:
\begin{demohigh}
\begin{tblr}{|X[2,l]|X[3,l]|X[1,r]|X[r]|}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
\end{tblr}
\end{demohigh}
Also, \verb!X! columns with negative coefficients are possible:
\begin{demohigh}
\begin{tblr}{|X[2,l]|X[3,l]|X[-1,r]|X[r]|}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
\end{tblr}
\end{demohigh}
We need the width to typeset a table with \verb!X! columns.
If unset, the default is \verb!\linewidth!.
To change the width, we have to first put all column specifications into \verb!colspec={...}!:
\begin{demohigh}
\begin{tblr}{width=0.8\linewidth,colspec={|X[2,l]|X[3,l]|X[-1,r]|X[r]|}}
\hline
Alpha & Beta & Gamma & Delta \\
\hline
\end{tblr}
\end{demohigh}
You can define new column types with \verb!\NewColumnType! command.
For example, in \verb!tabularray! package,
\verb!b! and \verb!X! columns are defined as special \verb!Q! columns:
\begin{codehigh}
\NewColumnType{b}[1]{Q[b,wd=#1]}
\NewColumnType{X}[1][]{Q[co=1,#1]}
\end{codehigh}
\section{Row Types}
Now that we have column types and \verb!colspec! option,
you may ask for row types and \verb!rowspec! option.
Yes, they are here:
\begin{demohigh}
\begin{tblr}{colspec={Q[l]Q[c]Q[r]},rowspec={|Q[t]|Q[m]|Q[b]|}}
{Alpha \\ Alpha} & Beta & Gamma \\
Delta & Epsilon & {Zeta \\ Zeta} \\
Eta & {Theta \\ Theta} & Iota \\
\end{tblr}
\end{demohigh}
Same as column types, \verb!Q! is the only primitive row type,
and other row types are defined as \verb!Q! types with different options.
It's better to specify horizontal alignment in \verb!colspec!,
and vertical alignment in \verb!rowspec!, respectively.
Inside \verb!rowspec!, \verb!|! is the hline type.
Therefore we need not to write \verb!\hline! command, which makes table code cleaner.
\section{Hlines and Vlines}
Hlines and vlines have been improved too. You can specify the widths and styles of them:
\begin{demohigh}
\begin{tblr}{|l|[dotted]|[2pt]c|r|[solid]|[dashed]|}
\hline
One & Two & Three \\
\hline\hline[dotted]\hline
Four & Five & Six \\
\hline[dashed]\hline[1pt]
Seven & Eight & Nine \\
\hline
\end{tblr}
\end{demohigh}
\section{Colorful Tables}
To add colors to your tables, you need to load \verb!xcolor! package first.
\verb!Tabularray! package will also load
\href{https://ctan.org/pkg/ninecolors}{\texttt{ninecolors}} package for proper color contrast.
First you can specify background option for \verb!Q! rows/columns inside \verb!rowspec!/\verb!colspec!:
\begin{demohigh}
\begin{tblr}{colspec={lcr},rowspec={|Q[cyan7]|Q[azure7]|Q[blue7]|}}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{colspec={Q[l,brown7]Q[c,yellow7]Q[r,olive7]},rowspec={|Q|Q|Q|}}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
Also you can use \verb!\SetRow! or \verb!\SetColumn! command to specify row or column colors:
\begin{demohigh}
\begin{tblr}{colspec={lcr},rowspec={|Q|Q|Q|}}
\SetRow{cyan7} Alpha & Beta & Gamma \\
\SetRow{azure7} Epsilon & Zeta & Eta \\
\SetRow{blue7} Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{colspec={lcr},rowspec={|Q|Q|Q|}}
\SetColumn{brown7}
Alpha & \SetColumn{yellow7}
Beta & \SetColumn{olive7}
Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
Hlines and vlines can also have colors:
\begin{demohigh}
\begin{tblr}{colspec={lcr},rowspec={|[2pt,green7]Q|[teal7]Q|[green7]Q|[3pt,teal7]}}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{colspec={|[2pt,violet5]l|[2pt,magenta5]c|[2pt,purple5]r|[2pt,red5]}}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\chapter{Basic Interfaces}
\label{chap:basic}
\section{Old and New Interfaces}
With \verb!tabularray! package, you can change the styles of tables via old interfaces or new interfaces.
The old interfaces consist of some table commands inside the table contents.
Same as \verb!tabular! and \verb!array! environments,
all table commands \textcolor{red3}{must} be put at the beginning of the cell text.
Also, new table commands \textcolor{red3}{must} be defined with \verb!\NewTableCommand!.
The new interfaces consist of some options inside the mandatory argument,
hence totally separating the styles and the contents of tables.
\begin{newtblr}[
caption = {Old Interfaces and New Interfaces},
label = {key:interface},
]{verb}
Old Interfaces & New Interfaces \\
\verb!\SetHlines! & \K{hlines} \\
\verb!\SetHline!, \verb!\hline!, \verb!\hborder!, \verb!\cline!
& \K{hline}, \K{hborder}, \K{rowspec} \\
\verb!\SetVlines! & \K{vlines} \\
\verb!\SetVline!, \verb!\vline!, \verb!\vborder!, \verb!\rline!
& \K{vline}, \K{vborder}, \K{colspec} \\
\verb!\SetCells! & \K{cells} \\
\verb!\SetCell! & \K{cell} \\
\verb!\SetRows! & \K{rows} \\
\verb!\SetRow! & \K{row}, \K{rowspec} \\
\verb!\SetColumns! & \K{columns} \\
\verb!\SetColumn! & \K{column}, \K{colspec} \\
\end{newtblr}
\section{Hlines and Vlines}
All available keys for hlines and vlines are described in Table \ref{key:hline} and Table \ref{key:vline}.
\begin{spectblr}[
caption = {Keys for Hlines},
label = {key:hline},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{}
Key & Description and Values & Initial Value \\
\underline{\K{dash}} & dash style: \V{solid}, \V{dashed} or \V{dotted} & \V{solid} \\
\K{text} & replace hline with text (like \V{!} specifier in \K{rowspec}) & $\times$ \\
\underline{\K{wd}} & rule width dimension & \V{0.4pt} \\
\underline{\K{fg}} & rule color name & $\times$ \\
\K{leftpos} & crossing or trimming position at the left side & \V{1} \\
\K{rightpos} & crossing or trimming position at the right side & \V{1} \\
\K{endpos} & adjust leftpos/rightpos for only the leftmost/rightmost column & \V{false} \\
\end{spectblr}
\vspace{-2em}
\begin{spectblr}[
caption = {Keys for Vlines},
label = {key:vline},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{}
Key & Description and Values & Initial Value \\
\underline{\K{dash}} & dash style: \V{solid}, \V{dashed} or \V{dotted} & \V{solid} \\
\K{text} & replace vline with text (like \V{!} specifier in \K{colspec}) & $\times$ \\
\underline{\K{wd}} & rule width dimension & \V{0.4pt} \\
\underline{\K{fg}} & rule color name & $\times$ \\
\K{abovepos} & crossing or trimming position at the above side & \V{0} \\
\K{belowpos} & crossing or trimming position at the below side & \V{0} \\
\end{spectblr}
\subsection{Hlines and Vlines in New Interfaces}
Options \verb!hlines! and \verb!vlines! are for setting all hlines and vlines, respectively.
With empty value, all hlines/vlines will be solid.
\begin{demohigh}
\begin{tblr}{hlines,vlines}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
With values inside one pair of braces, all hlines/vlines will be styled.
\begin{demohigh}
\begin{tblr}{
hlines = {1pt,solid}, vlines = {red3,dashed},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
Another pair of braces before will select segments in all hlines/vlines.
\begin{demohigh}
\begin{tblr}{
vlines = {1,3,5}{dashed},
vlines = {2,4}{solid},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
\end{tblr}
\end{demohigh}
The above example can be simplified with \verb!odd! and \verb!even! values.
(More child selectors can be defined with \verb!\NewChildSelector! command.
Advanced users could read the source code for this.)
\begin{demohigh}
\begin{tblr}{
vlines = {odd}{dashed},
vlines = {even}{solid},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
\end{tblr}
\end{demohigh}
Another pair of braces before will draw more hlines/vlines (in which \verb!-! stands for all line segments).
\begin{demohigh}
\begin{tblr}{
hlines = {1}{-}{dashed}, hlines = {2}{-}{solid},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
Note that you \underline{must} use indexes in order: first 1, then 2, etc.
Options \verb!hline{i}! and \verb!vline{j}! are for setting some hlines and vlines, respectively.
Their values are the same as options \verb!hlines! and \verb!vlines!:
\begin{demohigh}
\begin{tblr}{
hline{1,7} = {1pt,solid},
hline{3-5} = {blue3,dashed},
vline{1,5} = {3-4}{dotted},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
Phi & Chi & Psi & Omega \\
\end{tblr}
\end{demohigh}
You can use \verb!X!, \verb!Y!, \verb!Z! to denote the last three children, respectively.
It is especially useful when you are writing long tables:
\begin{demohigh}
\begin{tblr}{
hline{1,Z} = {2pt},
hline{2,Y} = {1pt},
hline{3-X} = {dashed},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
Phi & Chi & Psi & Omega \\
\end{tblr}
\end{demohigh}
Now we show the usage of \verb!text! key by the following example%
\footnote{Code from \url{https://tex.stackexchange.com/questions/603023/tabularray-and-tabularx-column-separator}.}:
\begin{demohigh}
\begin{tblr}{
vlines, hlines,
colspec = {lX[c]X[c]X[c]X[c]},
vline{2} = {1}{text=\clap{:}},
vline{3} = {1}{text=\clap{\ch{+}}},
vline{4} = {1}{text=\clap{\ch{->}}},
vline{5} = {1}{text=\clap{\ch{+}}},
}
Equation & \ch{CH4} & \ch{2 O2} & \ch{CO2} & \ch{2 H2O} \\
Initial & $n_1$ & $n_2$ & 0 & 0 \\
Final & $n_1-x$ & $n_2-2x$ & $x$ & $2x$ \\
\end{tblr}
\end{demohigh}
You need to load \verb!chemmacros! package for the \verb!\ch! command.
The \verb!leftpos! and \verb!rightpos! keys specify crossing or trimming positions for hlines.
The possible values for them are decimal numbers between \verb!-1! and \verb!1!.
Their initial values are \verb!1!.
\begin{center}
\begin{tblr}{width=0.5\textwidth,colspec={rX[l]},hlines}
-1 & the hline is trimmed by \V{colsep} \\
0 & the hline only touches the first vline \\
1 & the hline touches all the vlines \\
\end{tblr}
\end{center}
The \verb!abovepos! and \verb!belowpos! keys for vlines have similar meanings.
But their initial values are \verb!0!.
\begin{center}
\begin{tblr}{width=0.5\textwidth,colspec={rX[l]},hlines}
-1 & the vline is trimmed by \V{rowsep} \\
0 & the vline only touches the first hline \\
1 & the vline touches all the hlines \\
\end{tblr}
\end{center}
Here is an example for these four keys:
\begin{demohigh}
\begin{tblr}{
hline{1,4} = {1}{-}{},
hline{1,4} = {2}{-}{},
hline{2,3} = {1}{-}{leftpos = -1, rightpos = -1},
hline{2,3} = {2}{-}{leftpos = -1, rightpos = -1},
vline{1,4} = {abovepos = 1, belowpos = 1},
}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
There is also an \verb!endpos! option for adjusting \verb!leftpos!/\verb!rightpos!
for only the leftmost/rightmost column:
\begin{demohigh}
\begin{tblr}{
hline{1,4} = {1}{-}{},
hline{1,4} = {2}{-}{},
hline{2,3} = {leftpos = -1, rightpos = -1, endpos},
vline{1,4} = {abovepos = 1, belowpos = 1},
}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\subsection{Hlines and Vlines in Old Interfaces}
The \verb!\hline! command has an optional argument which accepts key-value options.
The available keys are described in Table \ref{key:hline}.
\begin{demohigh}
\begin{tblr}{llll}
\hline
Alpha & Beta & Gamma & Delta \\
\hline[dashed]
Epsilon & Zeta & Eta & Theta \\
\hline[dotted]
Iota & Kappa & Lambda & Mu \\
\hline[2pt,blue5]
\end{tblr}
\end{demohigh}
The \verb!\cline! command also has an optional argument which is the same as \verb!\hline!.
\begin{demohigh}
\begin{tblr}{llll}
\cline{1-4}
Alpha & Beta & Gamma & Delta \\
\cline[dashed]{1,3}
Epsilon & Zeta & Eta & Theta \\
\cline[dashed]{2,4}
Iota & Kappa & Lambda & Mu \\
\cline[2pt,blue5]{-}
\end{tblr}
\end{demohigh}
You can use child selectors in the mandatory argument of \verb!\cline!.
\begin{demohigh}
\begin{tblr}{llll}
\cline{1-4}
Alpha & Beta & Gamma & Delta \\
\cline[dashed]{odd}
Epsilon & Zeta & Eta & Theta \\
\cline[dashed]{even}
Iota & Kappa & Lambda & Mu \\
\cline[2pt,blue5]{-}
\end{tblr}
\end{demohigh}
Commands \verb!\SetHline! combines the usages of \verb!\hline! and \verb!\cline!:
\begin{demohigh}
\begin{tblr}{llll}
\SetHline{1-3}{blue5,1pt}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\SetHline{2-4}{teal5,1pt}
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{llll}
\SetHline[1]{1-3}{blue5,1pt}
\SetHline[2]{1-3}{azure5,1pt}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\SetHline[1]{2-4}{teal5,1pt}
\SetHline[2]{2-4}{green5,1pt}
\end{tblr}
\end{demohigh}
In fact, table command \verb!\SetHline[<index>]{<columns>}{<styles>}! at the beginning of row \verb!i!
is the same as table option \verb!hline{i}={<index>}{<columns>}{<styles>}!.
Also, table command \verb!\SetHlines[<index>]{<columns>}{<styles>}! at the beginning of some row
is the same as table option \verb!hlines={<index>}{<columns>}{<styles>}!.
The usages of table commands \verb!\vline!, \verb!\rline!, \verb!\SetVline!, \verb!\SetVlines!
are similar to those of \verb!\hline!, \verb!\cline!, \verb!\SetHline!, \verb!\SetHlines!, respectively.
But normally you don't need to use them.
\section{Hborders and Vborders}
Options \verb!hborder{i}! and \verb!vborder{j}! are similar to \verb!hline{i}! and \verb!vline{j}!,
respectively, but they hold border specifications not related to one specific hline and vline.
All available keys for \verb!hborder{i}! and \verb!vborder{j}! are described in
Table~\ref{key:hborder} and Table~\ref{key:vborder}.
\begin{spectblr}[
caption = {Keys for Hborders},
label = {key:hborder},
]{}
Key & Description and Values & Initial Value \\
\K{pagebreak} & pagebreak at this position: \V{yes}, \V{no} or \V{auto}
(See Chapter~\ref{chap:long}) & \V{auto} \\
\K{abovespace} & set \V{belowsep} of previous row (see Table \ref{key:row}) & \V{2pt} \\
\K{belowspace} & set \V{abovesep} of current row (see Table \ref{key:row}) & \V{2pt} \\
\K{abovespace+} & increase \V{belowsep} of previous row & $\times$ \\
\K{belowspace+} & increase \V{abovesep} of current row & $\times$ \\
\end{spectblr}
\vspace{-2em}
\begin{spectblr}[
caption = {Keys for Vborders},
label = {key:vborder},
]{}
Key & Description and Values & Initial Value \\
\K{leftspace} & set \V{rightsep} of previous column (see Table \ref{key:column}) & \V{6pt} \\
\K{rightspace} & set \V{leftsep} of current column (see Table \ref{key:column}) & \V{6pt} \\
\K{leftspace+} & increase \V{rightsep} of previous column & $\times$ \\
\K{rightspace+} & increase \V{leftsep} of current column & $\times$ \\
\end{spectblr}
Furthermore, table command \verb!\hborder{<specs>}! at the beginning of row \verb!i!
is the same as table option \verb!hborder{i}={<specs>}!,
and table command \verb!\vborder{<specs>}! at the beginning of column \verb!j!
is the same as table option \verb!vborder{j}={<specs>}!.
\section{Cells and Spancells}
All available keys for cells are described in Table \ref{key:cell} and Table \ref{key:cellspan}.
\begin{spectblr}[
caption = {Keys for the Content of Cells},
label = {key:cell},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{verb}
Key & Description and Values & Initial Value \\
\underline{\K{halign}}
& horizontal alignment: \V{l} (left), \V{c} (center), \V{r} (right) or \V{j} (justify)
& \V{j} \\
\underline{\K{valign}}
& vertical alignment: \V{t} (top), \V{m} (middle), \V{b} (bottom),
\V{h} (head) or \V{f} (foot)
& \V{t} \\
\underline{\K{wd}} & width dimension & $\times$ \\
\underline{\K{bg}} & background color name & $\times$ \\
\K{fg} & foreground color name & $\times$ \\
\K{font} & font commands & $\times$ \\
\K{mode} & set cell mode: \V{math}, \V{imath}, \V{dmath} or \V{text} & $\times$ \\
\verb!$! & same as \V{mode=math} & $\times$ \\
\verb!$$! & same as \V{mode=dmath} & $\times$ \\
\K{cmd} & execute command for the cell text & $\times$ \\
\K{preto} & prepend text to the cell & $\times$ \\
\K{appto} & append text to the cell & $\times$ \\
\end{spectblr}
\vspace{-2em}
\begin{spectblr}[
caption = {Keys for Multispan of Cells},
label = {key:cellspan},
]{}
Key & Description and Values & Initial Value \\
\K{r} & number of rows the cell spans & 1 \\
\K{c} & number of columns the cell spans & 1 \\
\end{spectblr}
\subsection{Cells and Spancells in New Interfaces}
Option \verb!cells! is for setting all cells.
\nopagebreak
\begin{demohigh}
\begin{tblr}{hlines={white},cells={c,blue7}}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
\end{tblr}
\end{demohigh}
Option \verb!cell{i}{j}! is for setting some cells,
where \verb!i! stands for the row numbers and \verb!j! stands for the column numbers.
\nopagebreak
\begin{demohigh}
\begin{tblr}{
cell{1}{2-4} = {cmd=\fbox}
}
Alpha & Beta & Gamma & Delta
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{
hlines = {white},
vlines = {white},
cell{1,6}{odd} = {teal7},
cell{1,6}{even} = {green7},
cell{2,4}{1,4} = {red7},
cell{3,5}{1,4} = {purple7},
cell{2}{2} = {r=4,c=2}{c,azure7},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
Phi & Chi & Psi & Omega \\
\end{tblr}
\end{demohigh}
\subsection{Cells and Spancells in Old Interfaces}
The \verb!\SetCell! command has a mandatory argument for setting the styles of current cell.
The available keys are described in Table \ref{key:cell}.
\begin{demohigh}
\begin{tblr}{llll}
\hline[1pt]
Alpha & \SetCell{bg=teal2,fg=white} Beta & Gamma \\
\hline
Epsilon & Zeta & \SetCell{r,font=\scshape} Eta \\
\hline
Iota & Kappa & Lambda \\
\hline[1pt]
\end{tblr}
\end{demohigh}
The \verb!\SetCell! command also has an optional argument for setting the multispan of current cell.
The available keys are described in Table \ref{key:cellspan}.
\begin{demohigh}
\begin{tblr}{|X|X|X|X|X|X|}
\hline
Alpha & Beta & Gamma & Delta & Epsilon & Zeta \\
\hline
\SetCell[c=2]{c} Eta & 2-2
& \SetCell[c=2]{c} Iota & 2-4
& \SetCell[c=2]{c} Lambda & 2-6 \\
\hline
\SetCell[c=3]{c} Nu & 3-2 & 3-3
& \SetCell[c=3]{c} Pi & 3-5 & 3-6 \\
\hline
\SetCell[c=6]{c} Tau & 4-2 & 4-3 & 4-4 & 4-5 & 4-6 \\
\hline
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{|X|X|X|X|X|X|}
\hline
Alpha & Beta & Gamma & Delta & Epsilon & Zeta \\
\hline
\SetCell[r=2]{m} Eta
& Theta & Iota & Kappa & Lambda & \SetCell[r=2]{m} Mu \\
\hline
Nu & Xi & Omicron & Pi & Rho & Sigma \\
\hline
\end{tblr}
\end{demohigh}
In fact, table command \verb!\SetCell[<span>]{<styles>}! at the beginning of cell at row \verb!i!
and column \verb!j! is the same as table option \verb!cell{i}{j}={<span>}{<styles>}!.
Also, table command \verb!\SetCells[<span>]{<styles>}! at the beginning of some cell
is the same as table option \verb!cells={<span>}{<styles>}!.
\section{Rows and Columns}
All available keys for rows and columns are described in Table \ref{key:row} and Table \ref{key:column}.
\begin{spectblr}[
caption = {Keys for Rows},
label = {key:row},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{verb}
Key & Description and Values & Initial Value \\
\underline{\K{halign}}
& horizontal alignment: \V{l} (left), \V{c} (center), \V{r} (right) or \V{j} (justify)
& \V{j} \\
\underline{\K{valign}}
& vertical alignment: \V{t} (top), \V{m} (middle), \V{b} (bottom),
\V{h} (head) or \V{f} (foot)
& \V{t} \\
\underline{\K{ht}} & height dimension & $\times$ \\
\underline{\K{bg}} & background color name & $\times$ \\
\K{fg} & foreground color name & $\times$ \\
\K{font} & font commands & $\times$ \\
\K{mode} & set mode for row cells: \V{math}, \V{imath}, \V{dmath} or \V{text} & $\times$ \\
\verb!$! & same as \V{mode=math} & $\times$ \\
\verb!$$! & same as \V{mode=dmath} & $\times$ \\
\K{cmd} & execute command for every cell text & $\times$ \\
\K{abovesep} & set vertical space above the row & \V{2pt} \\
\K{abovesep+} & increase vertical space above the row & $\times$ \\
\K{belowsep} & set vertical space below the row & \V{2pt} \\
\K{belowsep+} & increase vertical space below the row & $\times$ \\
\K{rowsep} & set vertical space above and below the row & \V{2pt} \\
\K{rowsep+} & increase vertical space above and below the row & $\times$ \\
\K{preto} & prepend text to every cell (like \V{>} specifier in \K{rowspec}) & $\times$ \\
\K{appto} & append text to every cell (like \V{<} specifier in \K{rowspec}) & $\times$ \\
\end{spectblr}
\vspace{-2em}
\begin{spectblr}[
caption = {Keys for Columns},
label = {key:column},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{verb}
Key & Description and Values & Initial Value \\
\underline{\K{halign}}
& horizontal alignment: \V{l} (left), \V{c} (center), \V{r} (right) or \V{j} (justify)
& \V{j} \\
\underline{\K{valign}}
& vertical alignment: \V{t} (top), \V{m} (middle), \V{b} (bottom),
\V{h} (head) or \V{f} (foot)
& \V{t} \\
\underline{\K{wd}} & width dimension & $\times$ \\
\underline{\K{co}} & coefficient for the extendable column (\V{X} column) & $\times$ \\
\underline{\K{bg}} & background color name & $\times$ \\
\K{fg} & foreground color name & $\times$ \\
\K{font} & font commands & $\times$ \\
\K{mode} & set mode for column cells: \V{math}, \V{imath}, \V{dmath} or \V{text} & $\times$ \\
\verb!$! & same as \V{mode=math} & $\times$ \\
\verb!$$! & same as \V{mode=dmath} & $\times$ \\
\K{cmd} & execute command for every cell text & $\times$ \\
\K{leftsep} & set horizontal space to the left of the column & \V{6pt} \\
\K{leftsep+} & increase horizontal space to the left of the column & $\times$ \\
\K{rightsep} & set horizontal space to the right of the column & \V{6pt} \\
\K{rightsep+} & increase horizontal space to the right of the column & $\times$ \\
\K{colsep} & set horizontal space to both sides of the column & \V{6pt} \\
\K{colsep+} & increase horizontal space to both sides of the column & $\times$ \\
\K{preto} & prepend text to every cell (like \V{>} specifier in \K{colspec}) & $\times$ \\
\K{appto} & append text to every cell (like \V{<} specifier in \K{colspec}) & $\times$ \\
\end{spectblr}
\subsection{Rows and Columns in New Interfaces}
Options \verb!rows! and \verb!columns! are for setting all rows and columns, respectively.
\nopagebreak
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
rows = {7mm}, columns = {15mm,c},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
Options \verb!row{i}! and \verb!column{j}! are for setting some rows and columns, respectively.
\begin{demohigh}
\begin{tblr}{
hlines = {1pt,white},
row{odd} = {blue7},
row{even} = {azure7},
column{1} = {purple7,c},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
Nu & Xi & Omicron & Pi \\
Rho & Sigma & Tau & Upsilon \\
Phi & Chi & Psi & Omega \\
\end{tblr}
\end{demohigh}
The following example demonstrates the usages of \verb!bg!, \verb!fg! and \verb!font! keys:
\nopagebreak
\begin{demohigh}
\begin{tblr}{
row{odd} = {bg=azure8},
row{1} = {bg=azure3, fg=white, font=\sffamily},
}
Alpha & Beta & Gamma \\
Delta & Epsilon & Zeta \\
Eta & Theta & Iota \\
Kappa & Lambda & Mu \\
Nu Xi Omicron & Pi Rho Sigma & Tau Upsilon Phi \\
\end{tblr}
\end{demohigh}
The following example demonstrates the usages of \verb!mode! key:
\nopagebreak
\begin{demohigh}
$\begin{tblr}{
column{1} = {mode=text},
column{3} = {mode=dmath},
}
\hline
Alpha & \frac12 & \frac12 \\
Epsilon & \frac34 & \frac34 \\
Iota & \frac56 & \frac56 \\
\hline
\end{tblr}$
\end{demohigh}
The following example demonstrates the usages of
\verb!abovesep!, \verb!belowsep!, \verb!leftsep!, \verb!rightsep! keys:
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
rows = {abovesep=1pt,belowsep=5pt},
columns = {leftsep=1pt,rightsep=5pt},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
The following example shows that we can replace \verb!\\[dimen]! with \verb!belowsep+! key.
\begin{demohigh}
\begin{tblr}{
hlines, row{2} = {belowsep+=5pt},
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
\subsection{Rows and Columns in Old Interfaces}
The \verb!\SetRow! command has a mandatory argument for setting the styles of current row.
The available keys are described in Table \ref{key:row}.
\begin{demohigh}
\begin{tblr}{llll}
\hline[1pt]
\SetRow{azure8} Alpha & Beta & Gamma & Delta \\
\hline
\SetRow{blue8,c} Epsilon & Zeta & Eta & Theta \\
\hline
\SetRow{violet8} Iota & Kappa & Lambda & Mu \\
\hline[1pt]
\end{tblr}
\end{demohigh}
In fact, table command \verb!\SetRow{<styles>}! at the beginning of row \verb!i!
is the same as table option \verb!row{i}={<styles>}!.
Also, table command \verb!\SetRows{<styles>}! at the beginning of some row
is the same as table option \verb!rows={<styles>}!.
The usages of table commands \verb!\SetColumn! and \verb!\SetColumns!
are similar to those of \verb!\SetRow! and \verb!\SetRows!, respectively.
But normally you don't need to use them.
\section{Colspec and Rowspec}
Options \verb!colspec!/\verb!rowspec! are for setting column/row specifications
with column/row type specifiers.
\subsection{Colspec and Width}
Option \verb!width! is for setting the width of the table with extendable columns.
The following example demonstrates the usage of \verb!width! option.
\nopagebreak
\begin{demohigh}
\begin{tblr}{width=0.8\textwidth, colspec={|l|X[2]|X[3]|X[-1]|}}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
You can omit \verb!colspec! name if it is the only key you use inside the mandatory argument.
The following example demonstrates the usages of \verb!$! and \verb!$$! keys:
\nopagebreak
\begin{demohigh}
\begin{tblr}{Q[l]Q[r,$]Q[r,$$]}
\hline
Alpha & \frac12 & \frac12 \\
Epsilon & \frac34 & \frac34 \\
Iota & \frac56 & \frac56 \\
\hline
\end{tblr}
\end{demohigh}
\subsection{Column Types}
The \verb!tabularray! package has only one type of primitive column: the \verb!Q! column.
Other types of columns are defined as \verb!Q! columns with some keys.
\begin{codehigh}
\NewColumnType{l}{Q[l]}
\NewColumnType{c}{Q[c]}
\NewColumnType{r}{Q[r]}
\NewColumnType{t}[1]{Q[t,wd=#1]}
\NewColumnType{m}[1]{Q[m,wd=#1]}
\NewColumnType{b}[1]{Q[b,wd=#1]}
\NewColumnType{h}[1]{Q[h,wd=#1]}
\NewColumnType{f}[1]{Q[f,wd=#1]}
\NewColumnType{X}[1][]{Q[co=1,#1]}
\end{codehigh}
\begin{demohigh}
\begin{tblr}{|t{15mm}|m{15mm}|b{20mm}|}
Alpha & Beta & {Gamma\\Gamma} \\
Epsilon & Zeta & {Eta\\Eta} \\
Iota & Kappa & {Lambda\\Lambda} \\
\end{tblr}
\end{demohigh}
Any new column type must be defined with \verb!\NewColumnType! command.
It can have an optional argument when it's defined.
\subsection{Row Types}
The \verb!tabularray! package has only one type of primitive row: the \verb!Q! row.
Other types of rows are defined as \verb!Q! rows with some keys.
\begin{codehigh}
\NewRowType{l}{Q[l]}
\NewRowType{c}{Q[c]}
\NewRowType{r}{Q[r]}
\NewRowType{t}[1]{Q[t,ht=#1]}
\NewRowType{m}[1]{Q[m,ht=#1]}
\NewRowType{b}[1]{Q[b,ht=#1]}
\NewRowType{h}[1]{Q[h,ht=#1]}
\NewRowType{f}[1]{Q[f,ht=#1]}
\end{codehigh}
\begin{demohigh}
\begin{tblr}{rowspec={|t{12mm}|m{10mm}|b{10mm}|}}
Alpha & Beta & {Gamma\\Gamma} \\
Epsilon & Zeta & {Eta\\Eta} \\
Iota & Kappa & {Lambda\\Lambda} \\
\end{tblr}
\end{demohigh}
Any new row type must be defined with \verb!\NewRowType! command.
It can have an optional argument when it's defined.
\chapter{Extra Interfaces}
\label{chap:extra}
In general, \verb!tblr! environment can accepts both inner and outer specifications:
\begin{codehigh}
\begin{tblr}[<outer specs>]{<inner specs>}
<table body>
\end{tblr}
\end{codehigh}
\textbf{Inner specifications} are all specifications written in the \underline{mandatory} argument
of \verb!tblr! environment, which include new interfaces described in Chapter \ref{chap:basic}.
\textbf{Outer specifications} are all specifications written in the \underline{optional} argument
of \verb!tblr! environment, most of which are used for long tables (see Chapter \ref{chap:long}).
You can use \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
to set default inner and outer specifications of tables, respectively (see Section \ref{sec:default}).
\section{Inner Specifications}
In addition to new interfaces in Chapter \ref{chap:basic},
there are several inner specifications which are described in Table~\ref{key:inner}.
\begin{spectblr}[
caption = {Keys for Inner Specifications},
label = {key:inner},
]{}
Key & Description and Values & Initial Value \\
\K{rulesep} & space between two hlines or vlines & \V{2pt} \\
\K{stretch} & stretch ratio for struts added to cell text & \V{1} \\
\K{abovesep} & set vertical space above every row & \V{2pt} \\
\K{belowsep} & set vertical space below every row & \V{2pt} \\
\K{rowsep} & set vertical space above and below every row & \V{2pt} \\
\K{leftsep} & set horizontal space to the left of every column & \V{6pt} \\
\K{rightsep} & set horizontal space to the right of every column & \V{6pt} \\
\K{colsep} & set horizontal space to both sides of every column & \V{6pt} \\
\K{hspan} & horizontal span algorithm: \V{default}, \V{even}, or \V{minimal} & \V{default} \\
\K{vspan} & vertical span algorithm: \V{default} or \V{even} & \V{default} \\
\K{verb} & you need this key to use verb commands & $\times$ \\
\K{baseline} & set the baseline of the table & \V{m} \\
\end{spectblr}
\subsection{Space between Double Rules}
The following example shows that we can replace \verb!\doublerulesep! parameter with \verb!rulesep! key.
\nopagebreak
\begin{demohigh}
\begin{tblr}{
colspec={||llll||},rowspec={|QQQ|},rulesep=4pt,
}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
\subsection{Minimal Strut for Cell Text}
The following example shows that we can replace \verb!\arraystretch! parameter with \verb!stretch! key.
\begin{demohigh}
\begin{tblr}{hlines,stretch=1.5}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
By replacing stretch with row heights, we can get perfect vertical centering for your numerical tables.
\begin{demohigh}
\begin{tblr}{hlines, stretch=0, rows={ht=\baselineskip}}
2021 & 2022 & 2023 \\
0.4 & 0.5 & 0.6 \\
1.1 & 2.2 & 3.3 \\
\end{tblr}
\end{demohigh}
\subsection{Rowseps and Colseps for All}
The following example uses \verb!rowsep! and \verb!colsep! keys to set padding for all rows and columns.
\nopagebreak
\begin{demohigh}
\SetTblrInner{rowsep=2pt,colsep=2pt}
\begin{tblr}{hlines,vlines}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{tblr}
\end{demohigh}
\subsection{Hspan and Vspan Algorithms}
With \verb!hspan=default! or \verb!hspan=even!,
\verb!tabularray! package will compute column widths from span widths.
But with \verb!hspan=minimal!, it will compute span widths from column widths.
The following examples show the results from different \verb!hspan! values.
\begin{demohigh}
\SetTblrInner{hlines, vlines, hspan=default}
\begin{tblr}{cell{2}{1}={c=2}{l},cell{3}{1}={c=3}{l},cell{4}{2}={c=2}{l}}
111 111 & 222 222 & 333 333 \\
12 Multi Columns Multi Columns 12 & & 333 \\
13 Multi Columns Multi Columns Multi Columns 13 & & \\
111 & 23 Multi Columns Multi Columns 23 & \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\SetTblrInner{hlines, vlines, hspan=even}
\begin{tblr}{cell{2}{1}={c=2}{l},cell{3}{1}={c=3}{l},cell{4}{2}={c=2}{l}}
111 111 & 222 222 & 333 333 \\
12 Multi Columns Multi Columns 12 & & 333 \\
13 Multi Columns Multi Columns Multi Columns 13 & & \\
111 & 23 Multi Columns Multi Columns 23 & \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\SetTblrInner{hlines, vlines, hspan=minimal}
\begin{tblr}{cell{2}{1}={c=2}{l},cell{3}{1}={c=3}{l},cell{4}{2}={c=2}{l}}
111 111 & 222 222 & 333 333 \\
12 Multi Columns Multi Columns 12 & & 333 \\
13 Multi Columns Multi Columns Multi Columns 13 & & \\
111 & 23 Multi Columns Multi Columns 23 & \\
\end{tblr}
\end{demohigh}
The following examples show the results from different \verb!vspan! values.
\nopagebreak
\begin{demohigh}
\SetTblrInner{hlines, vlines, vspan=default}
\begin{tblr}{column{2}={3.25cm}, cell{2}{2}={r=3}{l}}
Column1 & Column2 \\
Row1 & Long text that needs multiple lines.
Long text that needs multiple lines.
Long text that needs multiple lines. \\
Row2 & \\
Row3 & \\
Row4 & Short text \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\SetTblrInner{hlines, vlines, vspan=even}
\begin{tblr}{column{2}={3.25cm}, cell{2}{2}={r=3}{l}}
Column1 & Column2 \\
Row1 & Long text that needs multiple lines.
Long text that needs multiple lines.
Long text that needs multiple lines. \\
Row2 & \\
Row3 & \\
Row4 & Short text \\
\end{tblr}
\end{demohigh}
\subsection{Use Verbatim Commands}
With \verb!verb! key, you can write \verb!\verb! commands in the cell text:
\begin{demohigh}
\begin{tblr}{hlines,verb}
20 & 30 & \verb!\hello{world}!40 \\
50 & \verb!\hello!60 & 70 \\
\end{tblr}
\end{demohigh}
\subsection{Set Baseline for the Table}
With \verb!baseline! key, you can set baseline for the table.
All possible values for \verb!baseline! are as follows:
\begin{center}
\begin{tblr}{width=0.6\textwidth,colspec={cX[l]},hlines}
\V{t} & align the table at the top \\
\V{T} & align the table at the first row \\
\V{m} & align the table at the middle, initial value \\
\V{b} & align the table at the bottom \\
\V{B} & align the table at the last row \\
\V{<n>} & align the table at row \V{<n>} (a positive integer) \\
\end{tblr}
\end{center}
If there is no hline above the first row, you get the same result with either \V{t} or \V{T}.
But you get different results if there are one or more hlines above the row:
\begin{demohigh}
Baseline\begin{tblr}{hlines,baseline=t}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}Baseline
\end{demohigh}
\begin{demohigh}
Baseline\begin{tblr}{hlines,baseline=T}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}Baseline
\end{demohigh}
The differences between \verb!b! and \verb!B! are similar to \verb!t! and \verb!T!.
In fact, these two values \verb!T! and \verb!B! are better replacements
for currently obsolete \verb!\firsthline! and \verb!\lasthline! commands.
\section{Outer Specifications}
Except for specifications to be introduced in Chapter \ref{chap:long},
there are several other outer specifications which are described in Table~\ref{key:outer}.
\begin{spectblr}[
caption = {Keys for Outer Specifications},
label = {key:outer},
]{}
Key & Description and Values & Initial Value \\
\K{baseline} & set the baseline of the table & \V{m} \\
\K{long} & change the table to a long table & $\times$ \\
\K{tall} & change the table to a tall table & $\times$ \\
\K{expand} & you need this key to use verb commands & $\times$ \\
\end{spectblr}
\subsection{Set Baseline in Another Way}
You may notice that you can write \K{baseline} option as either an inner or an outer specification.
It is true that either way would do the job. But there is a small difference:
when \verb!baseline=t/T/m/b/B! is an outer specification,
you can omit the key name and write the value only.
\begin{demohigh}
Baseline\begin{tblr}[m]{hlines}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}Baseline
\end{demohigh}
\subsection{Long and Tall Tables}
You can change a table to long table by passing outer specification \K{long},
or change it to tall table by passing outer specification \K{tall} (see Chapter~\ref{chap:long}).
Therefore the following two tables are the same:
\begin{codehigh}
\begin{longtblr}{lcr}
Alpha & Beta & Gamma
\end{longtblr}
\begin{tblr}[long]{lcr}
Alpha & Beta & Gamma
\end{tblr}
\end{codehigh}
\subsection{Expand Macros First}
\verb!Tabularray! need to see every \verb!&! and \verb!\\! when splitting the table body
with \verb!l3regex!. And you can not put cell text inside any table command defined with
\verb!\NewTableCommand!. But you could use outer specification \verb!expand! to make \verb!tabularray!
expand every occurrence of a specified macro \underline{once} before splitting the table body.
The macro \underline{can not} be defined with \verb!\NewDocumentCommand! or
\verb!\NewExpandableDocumentCommand!, and \underline{can not} have optional argument.
\begin{demohigh}
\def\tblrbody{
\hline
20 & 30 & 40 \\
50 & 60 & 70 \\
\hline
}
\begin{tblr}[expand=\tblrbody]{ccc}
\hline
AA & BB & CC \\
\tblrbody
DD & EE & FF \\
\tblrbody
GG & HH & II \\
\hline
\end{tblr}
\end{demohigh}
\section{Default Specifications}
\label{sec:default}
\verb!Tabularray! package provides \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
for you to change the default inner and outer specifications of tables.
In general different \verb!tabularray! environments (\verb!tblr!, \verb!talltblr!,
\verb!longtblr!, etc) could have different default specifications.
You can list the environments in the optional arguments of these two commands,
and they only apply to \verb!tblr! environment when the optional arguments are omitted.
In the following example, the first line draws all hlines and vlines for all \verb!tblr! tables
created afterwards, while the second line makes all \verb!tblr! tables created afterwards
vertically align at the last row.
\begin{codehigh}
\SetTblrInner{hlines,vlines}
\SetTblrOuter{baseline=B}
\end{codehigh}
And the following example sets zero \verb!rowsep! for all \verb!tblr! and \verb!longtblr! tables
created afterwards.
\begin{codehigh}
\SetTblrInner[tblr,longtblr]{rowsep=0pt}
\end{codehigh}
\section{New Tabularray Environments}
You can define new \verb!tabularray! environments using \verb!\NewTblrEnviron! command:
\begin{demohigh}
\NewTblrEnviron{mytblr}
\SetTblrInner[mytblr]{hlines,vlines}
\SetTblrOuter[mytblr]{baseline=B}
Text \begin{mytblr}{cccc}
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\end{mytblr} Text
\end{demohigh}
\section{New General Environments}
With \verb!+b! argument type of \verb!\NewDocumentEnvironment! command,
you can also define a new general environment based on \verb!tblr! environment
(note that there is an extra pair of curly braces at the end):
\NewDocumentEnvironment{fancytblr}{+b}{
Before Text
\begin{tblr}{hlines}
#1
\end{tblr}
After Text
}{}
\begin{codehigh}
\NewDocumentEnvironment{fancytblr}{+b}{
Before Text
\begin{tblr}{hlines}
#1
\end{tblr}
After Text
}{}
\end{codehigh}
\begin{demohigh}
\begin{fancytblr}
One & Two & Three \\
Four & Five & Six \\
Seven & Eight & Nine \\
\end{fancytblr}
\end{demohigh}
\section{New Table Commands}
All commands which change the specifications of tables \textcolor{red3}{must} be defined with \verb!\NewTableCommand!.
The following example demonstrates how to define a new table command:
\begin{demohigh}
\NewTableCommand\myhline{\hline[0.1em,red5]}
\begin{tblr}{llll}
\myhline
Alpha & Beta & Gamma & Delta \\
Epsilon & Zeta & Eta & Theta \\
Iota & Kappa & Lambda & Mu \\
\myhline
\end{tblr}
\end{demohigh}
\section{Odd and Even Selectors}
From version 2022A, child selectors \verb!odd! and \verb!even! accept an optional argument,
in which you can specify the start index and the end index of the children.
\begin{demohigh}
\begin{tblr}{
cell{odd}{1} = {red9},
cell{odd[4]}{2} = {green9},
cell{odd[3-X]}{3} = {blue9},
}
Head & Head & Head \\
Talk A & Place A & Date A \\
Talk B & Place B & Date B \\
Talk C & Place C & Date C \\
Talk D & Place D & Date D \\
Talk E & Place E & Date E \\
Talk F & Place F & Date F \\
Talk G & Place G & Date G \\
Talk H & Place H & Date H \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{
cell{even}{1} = {yellow9},
cell{even[4]}{2} = {cyan9},
cell{even[3-X]}{3} = {purple9},
}
Head & Head & Head \\
Talk A & Place A & Date A \\
Talk B & Place B & Date B \\
Talk C & Place C & Date C \\
Talk D & Place D & Date D \\
Talk E & Place E & Date E \\
Talk F & Place F & Date F \\
Talk G & Place G & Date G \\
Talk H & Place H & Date H \\
\end{tblr}
\end{demohigh}
\section{Counters and Lengths}
Counters \verb!rownum!, \verb!colnum!, \verb!rowcount!, \verb!colcount! can be used in cell text:
\nopagebreak
\begin{demohigh}
\begin{tblr}{hlines}
Cell[\arabic{rownum}][\arabic{colnum}] & Cell[\arabic{rownum}][\arabic{colnum}] &
Cell[\arabic{rownum}][\arabic{colnum}] & Cell[\arabic{rownum}][\arabic{colnum}] \\
Row=\arabic{rowcount}, Col=\arabic{colcount} &
Row=\arabic{rowcount}, Col=\arabic{colcount} &
Row=\arabic{rowcount}, Col=\arabic{colcount} &
Row=\arabic{rowcount}, Col=\arabic{colcount} \\
Cell[\arabic{rownum}][\arabic{colnum}] & Cell[\arabic{rownum}][\arabic{colnum}] &
Cell[\arabic{rownum}][\arabic{colnum}] & Cell[\arabic{rownum}][\arabic{colnum}] \\
\end{tblr}
\end{demohigh}
Also, lengths \verb!\leftsep!, \verb!\rightsep!, \verb!\abovesep!, \verb!\belowsep! can be used in cell text.
\section{Tracing Tabularray}
To trace internal data behind \verb!tblr! environment, you can use \verb!\SetTblrTracing! command.
For example, \verb!\SetTblrTracing{all}! will turn on all tracings,
and \verb!\SetTblrTracing{none}! will turn off all tracings.
\verb!\SetTblrTracing{+row,+column}! will only tracing row and column data.
All tracing messages will be written to the log files.
\chapter{Use Long Tables}
\label{chap:long}
\section{A Simple Example}
To make a decent long table with header and footer, it is better to separate header/footer as
\underline{table head/foot} (which includes caption, footnotes, continuation text)
and \underline{row head/foot} (which includes some rows of the table that should appear in every page).
By this approach, alternating row colors work as expected.
\NewTblrTheme{fancy}{
\SetTblrStyle{firsthead}{font=\bfseries}
\SetTblrStyle{firstfoot}{fg=blue2}
\SetTblrStyle{middlefoot}{\itshape}
\SetTblrStyle{caption-tag}{red2}
}
\begin{longtblr}[
theme = fancy,
caption = {A Long Long Long Long Long Long Long Table},
entry = {Short Caption},
label = {tblr:test},
note{a} = {It is the first footnote.},
note{$\dag$} = {It is the second long long long long long long footnote.},
remark{Note} = {Some general note. Some general note. Some general note.},
remark{Source} = {Made up by myself. Made up by myself. Made up by myself.},
]{
colspec = {XXX}, width = 0.85\linewidth,
rowhead = 2, rowfoot = 1,
row{odd} = {gray9}, row{even} = {brown9},
row{1-2} = {purple7}, row{Z} = {blue7},
}
\hline
Head & Head & Head \\
\hline
Head & Head & Head \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta\TblrNote{a} & Eta \\
\hline
Iota & Kappa\TblrNote{$\dag$} & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Foot & Foot & Foot \\
\hline
\end{longtblr}
As you can see in the above example, the appearance of long tables of \verb!tabularray! package
is similar to that of \verb!threeparttablex! packages.
It supports table footnotes, but not page footnotes.
\newpage
The source code for the above long table is shown below. It is mainly self-explanatory.
\begin{codehigh}
\NewTblrTheme{fancy}{
\SetTblrStyle{firsthead}{font=\bfseries}
\SetTblrStyle{firstfoot}{fg=blue2}
\SetTblrStyle{middlefoot}{\itshape}
\SetTblrStyle{caption-tag}{red2}
}
\begin{longtblr}[
theme = fancy,
caption = {A Long Long Long Long Long Long Long Table},
entry = {Short Caption},
label = {tblr:test},
note{a} = {It is the first footnote.},
note{$\dag$} = {It is the second long long long long long long footnote.},
remark{Note} = {Some general note. Some general note. Some general note.},
remark{Source} = {Made up by myself. Made up by myself. Made up by myself.},
]{
colspec = {XXX}, width = 0.85\linewidth,
rowhead = 2, rowfoot = 1,
row{odd} = {gray9}, row{even} = {brown9},
row{1-2} = {purple7}, row{Z} = {blue7},
}
\hline
Head & Head & Head \\
\hline
Head & Head & Head \\
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta\TblrNote{a} & Eta \\
\hline
Iota & Kappa\TblrNote{$\dag$} & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
......
\hline
Alpha & Beta & Gamma \\
\hline
Epsilon & Zeta & Eta \\
\hline
Iota & Kappa & Lambda \\
\hline
Nu & Xi & Omicron \\
\hline
Rho & Sigma & Tau \\
\hline
Phi & Chi & Psi \\
\hline
Foot & Foot & Foot \\
\hline
\end{longtblr}
\end{codehigh}
As you can see in the above code, we typeset long tables with \verb!longtblr! environment.
And we can totally separate contents and styles of long tables with \verb!tabularray! package.
Row head and row foot consist of some lines of the table and should appear in every page.
Their options are inner specifications and should be put in the mandatory argument of the \verb!longtblr! environment.
In the above example, We set \verb!rowhead=2! and \verb!rowfoot=1!.
\begin{spectblr}[
caption = {Inner Specifications for Row Heads and Row Foots}
]{}
Key Name & Key Description & Initial Value \\
\V{rowhead} & number of the first rows of the table appear in every page & \V{0} \\
\V{rowfoot} & number of the last rows of the table appear in every page & \V{0} \\
\end{spectblr}
Table head and table foot consist of the caption, continuation text, footnotes and remarks.
Their options are outer specifications and should be put in the optional argument of the \verb!longtblr! environment.
\begin{spectblr}[
caption = {Outer Specifications for Table Heads and Table Foots}
]{verb}
Key Name & Key Description & Initial Value \\
\V{headsep} & vertical space between table head and table body & \V{6pt} \\
\V{footsep} & vertical space between table foot and table body & \V{6pt} \\
\V{presep} & vertical space between table head and the above text & \verb!1.5\bigskipamount! \\
\V{postsep} & vertical space between table foot and the below text & \verb!1.5\bigskipamount! \\
\V{theme} & table theme (including settings for templates and styles) & $\times$ \\
\V{caption} & table caption & $\times$ \\
\V{entry} & short table caption to be put in List of Tables & $\times$ \\
\V{label} & table label & $\times$ \\
\V{note\{<name>\}} & table note with \V{<name>} as tag & $\times$ \\
\V{remark\{<name>\}} & table remark with \V{<name>} as tag & $\times$ \\
\end{spectblr}
If you write \verb!entry=none!, \verb!tabularray! package will not add an entry in List of Tables.
Therefore \verb!caption=text,entry=none! is similar to \verb!\caption[]{text}! in \verb!longtable!.
If you write \verb!label=none!, \verb!tabularray! package will not step \verb!table! counter,
and set the \verb!caption-tag! and \verb!caption-sep! elements (see below) to empty.
Therefore \verb!caption=text,entry=none,label=none! is similar to \verb!\caption*{text}!
in \verb!longtable!, except for the counter.
\section{Customize Templates}
\subsection{Overview of Templates}
The template system for table heads and table foots in \verb!tabularray! is largely inspired
by \verb!beamer!, \verb!caption! and \verb!longtable! packages. For elements in Table \ref{tblr:element},
you can use \verb!\DefTblrTemplate!\footnote{From version 2022A,
\texttt{\string\DefTblrTemplate} has another name \texttt{\string\DeclareTblrTemplate}.}
to define and modify templates,
and use \verb!\SetTblrTemplate! to choose default templates. In defining templates,
you can include other templates with \verb!\UseTblrTemplate! and \verb!\ExpTblrTemplate! commands.
\begin{spectblr}[
caption = {Elements for Table Heads and Table Foots},
label = {tblr:element},
]{}
Element Name & Element Description and Default Template \\
\V{contfoot-text}& continuation text in the foot, normally ``Continued on next page'' \\
\V{contfoot} & continuation paragraph in the foot, normally including \V{contfoot-text} template \\
\V{conthead-text}& continuation text in the head, normally ``(Continued)'' \\
\V{conthead} & continuation paragraph in the head, normally including \V{conthead-text} template \\
\V{caption-tag} & caption tag, normally like ``Table 4.2'' \\
\V{caption-sep} & caption separator, normally like ``:\quad'' \\
\V{caption-text} & caption text, normally using user provided value \\
\V{caption} & including \V{caption-tag} + \V{caption-sep} + \V{caption-text} \\
\V{note-tag} & note tag, normally using user provided value \\
\V{note-sep} & note separator, normally like ``\enskip'' \\
\V{note-text} & note tag, normally using user provided value \\
\V{note} & including \V{note-tag} + \V{note-sep} + \V{note-text} \\
\V{remark-tag} & remark tag, normally using user provided value \\
\V{remark-sep} & remark separator, normally like ``:\enskip'' \\
\V{remark-text} & remark text, normally using user provided value\\
\V{remark} & including \V{remark-tag} + \V{remark-sep} + \V{remark-text} \\
\V{firsthead} & table head on the first page, normally including \V{caption} template \\
\V{middlehead} & table head on middle pages, normally including \V{caption} and \V{conthead} templates \\
\V{lasthead} & table head on the last page, normally including \V{caption} and \V{conthead} templates \\
\V{head} & setting all of \V{firsthead}, \V{middlehead} and \V{lasthead} \\
\V{firstfoot} & table foot on the first page, normally including \V{contfoot} template \\
\V{middlefoot} & table foot on middle pages, normally including \V{contfoot} template \\
\V{lastfoot} & table foot on the last page, normally including \V{note} and \V{remark} templates \\
\V{foot} & setting all of \V{firstfoot}, \V{middlefoot} and \V{lastfoot} \\
\end{spectblr}
An element which only includes short text is called a \underline{sub element}.
Normally there is one \verb!-! in the name of a sub element.
An element which includes one or more paragraphs is called a \underline{main element}.
Normally there isn't any \verb!-! in the name of a main element.
For each of the above elements, two templates \verb!normal! and \verb!empty! are always defined.
You can select one of them with \verb!\SetTblrTemplate! command.
\subsection{Continuation Templates}
Let us have a look at the code for defining templates of continuation text first:%
\footnote{To tell the truth, the default \texttt{conthead-text} and \texttt{contfoot-text}
are actually stored in commands \texttt{\string\tblrcontheadname} and \texttt{\string\tblrcontfootname}
respectively. And you may contribute your translations of them to \textbf{babel} package.}
\begin{codehigh}
\DefTblrTemplate{contfoot-text}{normal}{Continued on next page}
\SetTblrTemplate{contfoot-text}{normal}
\DefTblrTemplate{conthead-text}{normal}{(Continued)}
\SetTblrTemplate{conthead-text}{normal}
\end{codehigh}
In the above code, command \verb!\DefTblrTemplate! defines the templates with name \verb!normal!,
and then command \verb!\SetTblrTemplate! sets the templates with name \verb!normal! as default.
The \verb!normal! template is always defined and set as default for any element in \verb!tabularray!.
Therefore you had better use another name when defining new templates.
If you use \verb!default! as template name in \verb!\DefTblrTemplate!,
you define and set it as default at the same time.
Therefore the above code can be written in another way:
\begin{codehigh}
\DefTblrTemplate{contfoot-text}{default}{Continued on next page}
\DefTblrTemplate{conthead-text}{default}{(Continued)}
\end{codehigh}
You may modify the code to customize continuation text to fit your needs.
The templates for \verb!contfoot! and \verb!conthead! normally
include the templates of their sub elements with \verb!\UseTblrTemplate! commands.
But you can also handle user settings such as horizontal alignment here.
\begin{codehigh}
\DefTblrTemplate{contfoot}{default}{\UseTblrTemplate{contfoot-text}{default}}
\DefTblrTemplate{conthead}{default}{\UseTblrTemplate{conthead-text}{default}}
\end{codehigh}
\subsection{Caption Templates}
Normally a caption consists of three parts, and their templates are defined with the follow code:
\begin{codehigh}
\DefTblrTemplate{caption-tag}{default}{Table\hspace{0.25em}\thetable}
\DefTblrTemplate{caption-sep}{default}{:\enskip}
\DefTblrTemplate{caption-text}{default}{\InsertTblrText{caption}}
\end{codehigh}
The command \verb!\InsertTblrText{caption}! inserts the value of \verb!caption! key,
which you could write in the optional argument of \verb!longtblr! environment.
The \verb!caption! template normally includes three sub templates with \verb!\UseTblrTemplate! commands:
The \verb!caption! template will be used in \verb!firsthead! template.
\begin{codehigh}
\DefTblrTemplate{caption}{default}{
\UseTblrTemplate{caption-tag}{default}
\UseTblrTemplate{caption-sep}{default}
\UseTblrTemplate{caption-text}{default}
}
\end{codehigh}
Furthermore \verb!capcont! template includes \verb!conthead! template as well.
The \verb!capcont! template will be used in \verb!middlehead! and \verb!lasthead! templates.
\begin{codehigh}
\DefTblrTemplate{capcont}{default}{
\UseTblrTemplate{caption-tag}{default}
\UseTblrTemplate{caption-sep}{default}
\UseTblrTemplate{caption-text}{default}
\UseTblrTemplate{conthead-text}{default}
}
\end{codehigh}
\subsection{Note and Remark Templates}
The templates for table notes can be defined like this:
\begin{codehigh}
\DefTblrTemplate{note-tag}{default}{\textsuperscript{\InsertTblrNoteTag}}
\DefTblrTemplate{note-sep}{default}{\space}
\DefTblrTemplate{note-text}{default}{\InsertTblrNoteText}
\end{codehigh}
\begin{codehigh}
\DefTblrTemplate{note}{default}{
\MapTblrNotes{
\noindent
\UseTblrTemplate{note-tag}{default}
\UseTblrTemplate{note-sep}{default}
\UseTblrTemplate{note-text}{default}
\par
}
}
\end{codehigh}
The \verb!\MapTblrNotes! command loops for all table notes,
which are written in the optional argument of \verb!longtblr! environment.
Inside the loop, you can use \verb!\InsertTblrNoteTag! and \verb!\InsertTblrNoteText!
commands to insert current note tag and note text, respectively.
The definition of remark templates are similar to note templates.
\nopagebreak
\begin{codehigh}
\DefTblrTemplate{remark-tag}{default}{\InsertTblrRemarkTag}
\DefTblrTemplate{remark-sep}{default}{:\space}
\DefTblrTemplate{remark-text}{default}{\InsertTblrRemarkText}
\end{codehigh}
\begin{codehigh}
\DefTblrTemplate{remark}{default}{
\MapTblrRemarks{
\noindent
\UseTblrTemplate{remark-tag}{default}
\UseTblrTemplate{remark-sep}{default}
\UseTblrTemplate{remark-text}{default}
\par
}
}
\end{codehigh}
\subsection{Head and Foot Templates}
The templates for table heads and foots are defined as including other templates:
\begin{codehigh}
\DefTblrTemplate{firsthead}{default}{
\UseTblrTemplate{caption}{default}
}
\DefTblrTemplate{middlehead,lasthead}{default}{
\UseTblrTemplate{capcont}{default}
}
\DefTblrTemplate{firstfoot,middlefoot}{default}{
\UseTblrTemplate{contfoot}{default}
}
\DefTblrTemplate{lastfoot}{default}{
\UseTblrTemplate{note}{default}
\UseTblrTemplate{remark}{default}
}
\end{codehigh}
Note that you can define the same template for multiple elements in \verb!\DefTblrTemplate! command.
If you only want to show table caption in the first page, you may change the definitions of
\verb!middlehead! and \verb!lasthead! elements:
\begin{codehigh}
\DefTblrTemplate{middlehead,lasthead}{default}{
\UseTblrTemplate{conthead}{default}
}
\end{codehigh}
\section{Change Styles}
All available keys for template elements are described in Table \ref{key:element}.
\begin{spectblr}[
caption = {Keys for the Styles of Elements},
label = {key:element},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.
The keys \K{halign}, \K{indent} and \K{hang} are only for main templates.}
]{}
Key Name & Key Description & Initial Value\\
\underline{\K{fg}} & foreground color & $\times$ \\
\underline{\K{font}} & font commands & $\times$ \\
\underline{\K{halign}}
& horizontal alignment: \V{l} (left), \V{c} (center), \V{r} (right) or \V{j} (justify)
& \V{j} \\
\K{indent} & parindent value & \V{0pt} \\
\K{hang} & hangindent value & \V{0pt} or \V{0.7em} \\
\end{spectblr}
You may change the styles of elements with \verb!\SetTblrStyle! command:
\begin{codehigh}
\SetTblrStyle{firsthead}{font=\bfseries}
\SetTblrStyle{firstfoot}{fg=blue2}
\SetTblrStyle{middlefoot}{\itshape}
\SetTblrStyle{caption-tag}{red2}
\end{codehigh}
When you write \verb!\UseTblrTemplate{element}{default}! in defining a template,
beside including template code of the \verb!element!, the foreground color and font commands
of the \verb!element! will be set up automatically.
In contrast, \verb!\ExpTblrTemplate{element}{default}! will only include template code.
\section{Define Themes}
You may define your own themes for table heads and foots with \verb!\NewTblrTheme! command.
a theme consists of some template and style settings. For example:
\nopagebreak
\begin{codehigh}
\NewTblrTheme{fancy}{
\DefTblrTemplate{conthead}{default}{[Continued]}
\SetTblrStyle{firsthead}{font=\bfseries}
\SetTblrStyle{firstfoot}{fg=blue2}
\SetTblrStyle{middlefoot}{\itshape}
\SetTblrStyle{caption-tag}{red2}
}
\end{codehigh}
After defining the theme \verb!fancy!, you can use it
by writing \verb!theme=fancy! in the optional argument of \verb!longtblr! environment.
\section{Control Page Breaks}
Just like \verb!longtable! package, inside \verb!longtblr! environment,
you can use \verb!\\*! or \verb!\nopagebreak! to prohibit a page break,
and use \verb!\pagebreak! to force a page break.
\section{Floatable Tall Tables}
There is also a \verb!talltblr! environment as an alternative to \verb!threeparttable! environment.
It can not cross multiple pages, but it can be put inside \verb!table! environment.
\begin{demohigh}
TEXT\begin{talltblr}[
caption = {Long Long Long Long Tabular},
entry = {Short Caption},
label = {tblr:tall},
note{a} = {It is the first footnote.},
note{$\dag$} = {It is the second long long long long long long footnote.},
]{
colspec = {XXX}, width = 0.5\linewidth, hlines,
}
Alpha & Beta & Gamma \\
Epsilon & Zeta & Eta\TblrNote{a} \\
Iota & Kappa & Lambda\TblrNote{$\dag$} \\
\end{talltblr}TEXT
\end{demohigh}
\chapter{Use Some Libraries}
The \verb!tabularray! package emulates or fixes some commands in other packages.
To avoid potential conflict, you need to enable them with \verb!\UseTblrLibrary! command.
\section{Library \texttt{amsmath}}
With \verb!\UseTblrLibrary{amsmath}! in the preamble of the document,
\verb!tabularray! will load \verb!amsmath! package, and define \verb!+array!, \verb!+matrix!,
\verb!+bmatrix!, \verb!+Bmatrix!, \verb!+pmatrix!, \verb!+vmatrix!, \verb!+Vmatrix! and \verb!+cases!
environments. Each of the environments is similar to the environment without \verb!+! prefix in its name,
but has default \verb!rowsep=2pt! just as \verb!tblr! environment. Every environment
except \verb!+array! accepts an optional argument, where you can write inner specifications.
\begin{demo}
$\begin{pmatrix}
\dfrac{2}{3} & \dfrac{2}{3} & \dfrac{1}{3} \\
\dfrac{2}{3} & -\dfrac{1}{3} & -\dfrac{2}{3} \\
\dfrac{1}{3} & -\dfrac{2}{3} & \dfrac{2}{3} \\
\end{pmatrix}$
\end{demo}
\begin{demohigh}
$\begin{+pmatrix}[cells={r},row{2}={purple8}]
\dfrac{2}{3} & \dfrac{2}{3} & \dfrac{1}{3} \\
\dfrac{2}{3} & -\dfrac{1}{3} & -\dfrac{2}{3} \\
\dfrac{1}{3} & -\dfrac{2}{3} & \dfrac{2}{3} \\
\end{+pmatrix}$
\end{demohigh}
\begin{demo}
$f(x)=\begin{cases}
0, & x=1; \\
\dfrac{1}{3}, & x=2; \\
\dfrac{2}{3}, & x=3; \\
1, & x=4. \\
\end{cases}$
\end{demo}
\begin{demohigh}
$f(x)=\begin{+cases}
0, & x=1; \\
\dfrac{1}{3}, & x=2; \\
\dfrac{2}{3}, & x=3; \\
1, & x=4. \\
\end{+cases}$
\end{demohigh}
\section{Library \texttt{booktabs}}
With \verb!\UseTblrLibrary{booktabs}! in the preamble of the document,
\verb!tabularray! will load \verb!booktabs! package,
and define \verb!\toprule!, \verb!\midrule!,
\verb!\bottomrule! and \verb!\cmidrule! inside \verb!tblr! environment.
\begin{demohigh}
\begin{tblr}{llll}
\toprule
Alpha & Beta & Gamma & Delta \\
\midrule
Epsilon & Zeta & Eta & Theta \\
\cmidrule{1-3}
Iota & Kappa & Lambda & Mu \\
\cmidrule{2-4}
Nu & Xi & Omicron & Pi \\
\bottomrule
\end{tblr}
\end{demohigh}
Just like \verb!\hline! and \verb!\cline! commands,
you can also specify rule width and color in the optional argument of any of these commands.
\begin{demohigh}
\begin{tblr}{llll}
\toprule[2pt,purple3]
Alpha & Beta & Gamma & Delta \\
\midrule[blue3]
Epsilon & Zeta & Eta & Theta \\
\cmidrule[azure3]{2-3}
Iota & Kappa & Lambda & Mu \\
\bottomrule[2pt,purple3]
\end{tblr}
\end{demohigh}
If you need more than one \verb!\cmidrule!s, you can use \verb!\cmidrulemore! command.
\begin{demohigh}
\begin{tblr}{llll}
\toprule
Alpha & Beta & Gamma & Delta \\
\cmidrule{1-3} \cmidrulemore{2-4}
Epsilon & Zeta & Eta & Theta \\
\cmidrule{1-3} \morecmidrules \cmidrule{2-4}
Iota & Kappa & Lambda & Mu \\
\bottomrule
\end{tblr}
\end{demohigh}
From version 2021N (2021-09-01), trim options (\verb!l!, \verb!r!, \verb!lr!)
for \verb!\cmidrule! command are also supported.
\begin{demohigh}
\begin{tblr}{llll}
\toprule
Alpha & Beta & Gamma & Delta \\
\cmidrule[lr]{1-2} \cmidrule[lr=-0.4]{3-4}
Epsilon & Zeta & Eta & Theta \\
\cmidrule[r]{1-2} \cmidrule[l]{3-4}
Iota & Kappa & Lambda & Mu \\
\bottomrule
\end{tblr}
\end{demohigh}
Note that you need to put \verb!l!, \verb!r! or \verb!lr! option into
the \underline{\color{red3}square brackets}.
and the possible values are decimal numbers between \verb!-1! and \verb!0!,
where \verb!-1! means trimming the whole colsep, and \verb!0! means no trimming.
The default value is \verb!-0.8!, which makes similar result as \verb!booktabs! package does.
There is also a \verb!booktabs! environment for you. With this environment,
the default \verb!rowsep=0pt!, but extra vertical space will be added by
\verb!\toprule!, \verb!\midrule!, \verb!\bottomrule! and \verb!\cmidrule! commands.
The sizes of vertical space are determined by \verb!\aboverulesep! and \verb!\belowrulesep! dimensions.
\begin{demohigh}
\begin{booktabs}{
colspec = lcccc,
cell{1}{1} = {r=2}{}, cell{1}{2,4} = {c=2}{},
}
\toprule
Sample & I & & II & \\
\cmidrule[lr]{2-3} \cmidrule[lr]{4-5}
& A & B & C & D \\
\midrule
S1 & 5 & 6 & 7 & 8 \\
S2 & 6 & 7 & 8 & 5 \\
S3 & 7 & 8 & 5 & 6 \\
\bottomrule
\end{booktabs}
\end{demohigh}
You can also use \verb!\specialrule! command.
The second argument sets \verb!belowsep! of previous row,
and the third argument sets \verb!abovesep! of current row,
\begin{demohigh}
\begin{booktabs}{row{2}={olive9}}
\toprule
Alpha & Beta & Gamma & Delta \\
\specialrule{0.5pt}{4pt}{6pt}
Epsilon & Zeta & Eta & Theta \\
\specialrule{0.8pt,blue3}{3pt}{2pt}
Iota & Kappa & Lambda & Mu \\
\bottomrule
\end{booktabs}
\end{demohigh}
At last, there is also an \verb!\addlinespace! command.
You can specify the size of vertical space to be added in its optional argument,
and the default size is \verb!0.5em!.
This command adds one half of the space to \verb!belowsep! of previous row,
and the other half to \verb!abovesep! of current row.
\begin{demohigh}
\begin{booktabs}{row{2}={olive9}}
\toprule
Alpha & Beta & Gamma & Delta \\
\addlinespace
Epsilon & Zeta & Eta & Theta \\
\addlinespace[1em]
Iota & Kappa & Lambda & Mu \\
\bottomrule
\end{booktabs}
\end{demohigh}
From version 2022A (2022-03-01), there is a \verb!longtabs! environment
for writing long \verb!booktabs! tables,
and a \verb!talltabs! environment for writing tall \verb!booktabs! tables.
\section{Library \texttt{counter}}
You need to load \verb!counter! library with \verb!\UseTblrLibrary{counter}!,
if you want to modify some LaTeX counters inside \verb!tabularray! tables.
\begin{demohigh}
\newcounter{mycnta}
\newcommand{\stepcounter{mycnta}\arabic{mycnta}}{\stepcounter{mycnta}\arabic{mycnta}}
\begin{tblr}{hlines}
\stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} \\
\stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} \\
\stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} & \stepcounter{mycnta}\arabic{mycnta} \\
\end{tblr}
\end{demohigh}
\section{Library \texttt{diagbox}}
When writing \verb!\UseTblrLibrary{diagbox}! in the preamble of the document,
\verb!tabularray! package loads \verb!diagbox! package,
and you can use \verb!\diagbox! and \verb!\diagboxthree! commands inside \verb!tblr! environment.
\begin{demohigh}
\begin{tblr}{hlines,vlines}
\diagbox{Aa}{Pp} & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{hlines,vlines}
\diagboxthree{Aa}{Pp}{Hh} & Beta & Gamma \\
Epsilon & Zeta & Eta \\
Iota & Kappa & Lambda \\
\end{tblr}
\end{demohigh}
You can also use \verb!\diagbox! and \verb!\diagboxthree! commands in math mode.
\nopagebreak
\begin{demohigh}
$\begin{tblr}{|c|cc|}
\hline
\diagbox{X_1}{X_2} & 0 & 1 \\
\hline
0 & 0.1 & 0.2 \\
1 & 0.3 & 0.4 \\
\hline
\end{tblr}$
\end{demohigh}
\section{Library \texttt{functional}}
With \verb!\UseTblrLibrary{functional}! in the preamble of the document,
\verb!tabularray! will load \href{https://ctan.org/pkg/functional}{\texttt{functional}} package,
and define outer key \verb!evaluate! and inner key \verb!process!.
These two new keys are useful for doing functional programming inside tables.
\subsection{Outer key \texttt{evaluate} in action}
With outer key \verb!evaluate!, you can evaluate every occurrence of a specified protected function
(defined with \verb!\prgNewFunction!) and replace it with the return value before splitting the table body.
The first application of \verb!evaluate! key is for inputting files inside tables.
Assume you have two files \verb!test1.tmp! and \verb!test2.tmp! with the following contents:
\begin{filecontents*}[overwrite]{test1.tmp}
Some & Some \\
\end{filecontents*}
\begin{filecontents*}[overwrite]{test2.tmp}
Other & Other \\
\end{filecontents*}
\begin{codehigh}
\begin{filecontents*}[overwrite]{test1.tmp}
Some & Some \\
\end{filecontents*}
\end{codehigh}
\begin{codehigh}
\begin{filecontents*}[overwrite]{test2.tmp}
Other & Other \\
\end{filecontents*}
\end{codehigh}
Then you can input them with outer specification \verb!evaluate=\fileInput!.
The \verb!\fileInput! function is provided by \verb!functional! package.
\begin{demohigh}
\begin{tblr}[evaluate=\fileInput]{hlines}
Row1 & 1 \\
\fileInput{test1.tmp}
Row3 & 3 \\
\fileInput{test2.tmp}
Row5 & 5 \\
\end{tblr}
\end{demohigh}
In general, you can define your functions which return parts of table contents,
and use \verb!evaluate! key to evaluate them inside tables.
\begin{demohigh}
\IgnoreSpacesOn
\prgNewFunction \someFunc {m} {
\prgReturn {#1 & #1 \\}
}
\IgnoreSpacesOff
\begin{tblr}[evaluate=\someFunc]{hlines}
Row1 & 1 \\
\someFunc{Text}
Row3 & 3 \\
\someFunc{Text}
Row5 & 5 \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\IgnoreSpacesOn
\prgNewFunction \otherFunc {} {
\prgReturn {Other & Other \\}
}
\IgnoreSpacesOff
\begin{tblr}[evaluate=\otherFunc]{hlines}
Row1 & 1 \\
\otherFunc
Row3 & 3 \\
\otherFunc
Row5 & 5 \\
\end{tblr}
\end{demohigh}
You can even generate the whole table with some function.
\begin{demohigh}
\IgnoreSpacesOn
\prgNewFunction \makeEmptyTable {mm} {
\tlSet \lTmpaTl {\intReplicate {\intEval{#2-1}} {&}}
\tlPutRight \lTmpaTl {\\}
\intReplicate {#1} {\tlUse \lTmpaTl}
}
\IgnoreSpacesOff
\begin{tblr}[evaluate=\makeEmptyTable]{hlines,vlines}
\makeEmptyTable{3}{7}
\end{tblr}
\end{demohigh}
\subsection{Inner key \texttt{process} in action}
With inner key \verb!process!, you can modify the contents and styles before the table is built.
Several public functions defined with \verb!\prgNewFuncton! are provided for you:
\begin{itemize}
\item \verb!\cellGetText{<rownum>}{<colnum>}!
\item \verb!\cellSetText{<rownum>}{<colnum>}{<text>}!
\item \verb!\cellSetStyle{<rownum>}{<colnum>}{<style>}!
\item \verb!\rowSetStyle{<rownum>}{<style>}!
\item \verb!\columnSetStyle{<colnum>}{<style>}!
\end{itemize}
As the first example, let's calculate the sums of cells column by column:
\IgnoreSpacesOn
\prgNewFunction \funcSum {} {
\intStepOneInline {1} {\arabic{colcount}} {
\intZero \lTmpaInt
\intStepOneInline {1} {\arabic{rowcount}-1} {
\intAdd \lTmpaInt {\cellGetText {####1} {##1}}
}
\cellSetText {\expWhole{\arabic{rowcount}}} {##1} {\intUse\lTmpaInt}
}
}
\IgnoreSpacesOff
\begin{codehigh}
\IgnoreSpacesOn
\prgNewFunction \funcSum {} {
\intStepOneInline {1} {\arabic{colcount}} {
\intZero \lTmpaInt
\intStepOneInline {1} {\arabic{rowcount}-1} {
\intAdd \lTmpaInt {\cellGetText {####1} {##1}}
}
\cellSetText {\expWhole{\arabic{rowcount}}} {##1} {\intUse\lTmpaInt}
}
}
\IgnoreSpacesOff
\end{codehigh}
\begin{demohigh}
\begin{tblr}{colspec={rrr},process=\funcSum}
\hline
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\hline
& & \\
\hline
\end{tblr}
\end{demohigh}
Now, let's set background colors of cells depending on their contents:
\IgnoreSpacesOn
\prgNewFunction \funcColor {} {
\intStepOneInline {1} {\arabic{rowcount}} {
\intStepOneInline {1} {\arabic{colcount}} {
\intSet \lTmpaInt {\cellGetText {##1} {####1}}
\intCompareTF {\lTmpaInt} > {0}
{\cellSetStyle {##1} {####1} {bg=purple8}}
{\cellSetStyle {##1} {####1} {bg=olive8}}
}
}
}
\IgnoreSpacesOff
\begin{codehigh}
\IgnoreSpacesOn
\prgNewFunction \funcColor {} {
\intStepOneInline {1} {\arabic{rowcount}} {
\intStepOneInline {1} {\arabic{colcount}} {
\intSet \lTmpaInt {\cellGetText {##1} {####1}}
\intCompareTF {\lTmpaInt} > {0}
{\cellSetStyle {##1} {####1} {bg=purple8}}
{\cellSetStyle {##1} {####1} {bg=olive8}}
}
}
}
\IgnoreSpacesOff
\end{codehigh}
\begin{demohigh}
\begin{tblr}{hlines,vlines,cells={r,$},process=\funcColor}
-1 & 2 & 3 \\
4 & 5 & -6 \\
7 & -8 & 9 \\
\end{tblr}
\end{demohigh}
We can also use color series of \verb!xcolor! package to color table rows:
\definecolor{lightb}{RGB}{217,224,250}
\definecolorseries{tblrow}{rgb}{last}{lightb}{white}
\resetcolorseries[3]{tblrow}
\IgnoreSpacesOn
\prgNewFunction \funcSeries {} {
\intStepOneInline {1} {\arabic{rowcount}} {
\tlSet \lTmpaTl {\intMathMod {##1-1} {3}}
\rowSetStyle {##1} {\expWhole{bg=tblrow!![\lTmpaTl]}}
}
}
\IgnoreSpacesOff
\begin{codehigh}
\definecolor{lightb}{RGB}{217,224,250}
\definecolorseries{tblrow}{rgb}{last}{lightb}{white}
\resetcolorseries[3]{tblrow}
\IgnoreSpacesOn
\prgNewFunction \funcSeries {} {
\intStepOneInline {1} {\arabic{rowcount}} {
\tlSet \lTmpaTl {\intMathMod {##1-1} {3}}
\rowSetStyle {##1} {\expWhole{bg=tblrow!![\lTmpaTl]}}
}
}
\IgnoreSpacesOff
\end{codehigh}
\begin{demohigh}
\begin{tblr}{hlines,process=\funcSeries}
Row1 & 1 \\
Row2 & 2 \\
Row3 & 3 \\
Row4 & 4 \\
Row5 & 5 \\
Row6 & 6 \\
\end{tblr}
\end{demohigh}
\section{Library \texttt{nameref}}
From version 2022D, you can load \verb!nameref! library
to make \verb!\nameref! and \verb!longtblr! work together.
\section{Library \texttt{siunitx}}
When writing \verb!\UseTblrLibrary{siunitx}! in the preamble of the document,
\verb!tabularray! package loads \verb!siunitx! package,
and defines \verb!S! column as \verb!Q! column with \verb!si! key.
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
colspec={S[table-format=3.2]S[table-format=3.2]}
}
{{{Head}}} & {{{Head}}} \\
111 & 111 \\
2.1 & 2.2 \\
33.11 & 33.22 \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
colspec={Q[si={table-format=3.2},c]Q[si={table-format=3.2},c]}
}
{{{Head}}} & {{{Head}}} \\
111 & 111 \\
2.1 & 2.2 \\
33.11 & 33.22 \\
\end{tblr}
\end{demohigh}
Note that you need to use \underline{\color{red3}triple} pairs of curly braces to guard non-numeric cells.
But it is cumbersome to enclose each cell with braces. From version 2022B (2022-06-01)
a new key \verb!guard! is provided for cells and rows. With \verb!guard! key the previous example
can be largely simplified.
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
colspec={Q[si={table-format=3.2},c]Q[si={table-format=3.2},c]},
row{1} = {guard}
}
Head & Head \\
111 & 111 \\
2.1 & 2.2 \\
33.11 & 33.22 \\
\end{tblr}
\end{demohigh}
Also you must use \verb!l!, \verb!c! or \verb!r! to set horizontal alignment for non-numeric cells:
\nopagebreak
\begin{demohigh}
\begin{tblr}{
hlines, vlines, columns={6em},
colspec={
Q[si={table-format=3.2,table-number-alignment=left},l,blue7]
Q[si={table-format=3.2,table-number-alignment=center},c,teal7]
Q[si={table-format=3.2,table-number-alignment=right},r,purple7]
},
row{1} = {guard}
}
Head & Head & Head \\
111 & 111 & 111 \\
2.1 & 2.2 & 2.3 \\
33.11 & 33.22 & 33.33 \\
\end{tblr}
\end{demohigh}
Both \verb!S! and \verb!s! columns are supported. In fact, These two columns have been defined as follows:
\begin{codehigh}
\NewColumnType{S}[1][]{Q[si={#1},c]}
\NewColumnType{s}[1][]{Q[si={#1},c,cmd=\TblrUnit]}
\end{codehigh}
You don't need to and are not allowed to define them again.
\section{Library \texttt{varwidth}}
To build a nice table, \verb!tabularray! need to measure the widths of cells.
By default, it uses \verb!\hbox! to measure the sizes.
This causes an error if a cell contains some vertical material, such as lists or display maths.
With \verb!\UseTblrLibrary{varwidth}! in the preamble of the document,
\verb!tabularray! will load \verb!varwidth! package,
and add a new inner specification \verb!measure! for tables.
After setting \verb!measure=vbox!, it will use \verb!\vbox! to measure cell widths.
\begin{demohigh}
\begin{tblr}{hlines,measure=vbox}
Text Text Text Text Text Text Text
\begin{itemize}
\item List List List List List List
\item List List List List List List List
\end{itemize}
Text Text Text Text Text Text Text \\
\end{tblr}
\end{demohigh}
From version 2022A (2022-03-01), you can remove extra space above and below lists,
by adding option \verb!stretch=-1!.
The following example also needs \verb!enumitem! package and its \verb!nosep! option:
{\centering\begin{tblr}{
hlines,vlines,rowspec={Q[l,t]Q[l,b]},
measure=vbox,stretch=-1,
}
\begin{itemize}[nosep]
\item List List List List List
\item List List List List List List
\end{itemize} & oooo \\
\begin{itemize}[nosep]
\item List List List List List
\item List List List List List List
\end{itemize} & gggg \\
\end{tblr}\par}
\begin{codehigh}
\begin{tblr}{
hlines,vlines,rowspec={Q[l,t]Q[l,b]},
measure=vbox,stretch=-1,
}
\begin{itemize}[nosep]
\item List List List List List
\item List List List List List List
\end{itemize} & oooo \\
\begin{itemize}[nosep]
\item List List List List List
\item List List List List List List
\end{itemize} & gggg \\
\end{tblr}
\end{codehigh}
Note that option \verb!stretch=-1! also removes struts from cells, therefore it may not work well
in \verb!tabularray! environments with \verb!rowsep=0pt!, such as
\verb!booktabs!/\verb!longtabs!/\verb!talltabs! environments from \verb!booktabs! library.
\section{Library \texttt{zref}}
From version 2022D, you can load \verb!zref! library
to make \verb!\zref! and \verb!longtblr! work together.
\chapter{History and Future}
\section{The Future}
Starting from 2022, except for hotfix releases for critical bugs,
every new release will be published on the first day of some month.
You may watch the milestones page for the scheduled dates of upcoming releases
and their changes:\newline
\centerline{\url{https://github.com/lvjr/tabularray/milestones}}
To make the upcoming releases more stable, you are very welcome to test the latest package file
in the repository. To test it, you only need to download the following \verb!tabularray.sty!
and put it into the folder of your TeX documents:\newline
\centerline{\url{https://github.com/lvjr/tabularray/raw/main/tabularray.sty}}
\section{The History}
The change log of \verb!tabularray! package will be updated on the wiki page:\newline
\centerline{\url{https://github.com/lvjr/tabularray/wiki/ChangeLog}}
In version 2022A, there were several breaking changes:
\begin{itemize}[nosep]
\item \verb!\multicolumn! command was removed; it is better to use \verb!\SetCell! command.
\item \verb!\multirow! command was removed; it is better to use \verb!\SetCell! command.
\item \verb!\firsthline! command was removed; it is better to use \verb!baseline=T! option.
\item \verb!\lasthline! command was removed; it is better to use \verb!baseline=B! option.
\end{itemize}
For your old documents, you can still rollback to version 2021 by \verb!\usepackage{tabularray}[=v2021]!.
\chapter{The Source Code}
\dochighinput[language=latex/latex3]{tabularray.sty}
\end{document}
|
\section{Introduction}
A typical design process involves tedious trial and error procedures, wherein a designer modifies design configurations based on functional, geometric, or aesthetics requirements. From the structural or materials design in engineering applications to the shape design of everyday objects, this design process usually takes considerable time and effort. To reduce human effort, one can automate the trial and error process by using optimization techniques, but the computational time scales up with the problem dimension~\cite{Bellman34}. Besides, instead of isolating a final optimal solution, one may be interested in discovering multiple alternatives. Recent advances in deep generative models allow people to train a data-driven model that can propose new design alternatives~\cite{burnap2016estimating,yang2018microstructural,oh2019deep,guo2019circuit,zhang20193d,chen2020airfoil,shu20203d,wang2020deep,chen2021padgan,chen2021deep}. A generative model learns the distribution of past exemplars so that one can draw new samples from that distribution. In most scenarios, rather than drawing random samples, we also want these new designs to have certain desired properties, such as particular attributes or performance requirements. While one can still use an optimization process to select desired candidates~\cite{yang2018microstructural,chen2020airfoil,chen2021deep}, this method has the same issues as mentioned earlier. Instead, a conditional generative model can be trained to learn a conditional distribution ({\em i.e.}, distribution of designs conditioned on any property), so that new design candidates will be generated with given user-specified properties~\cite{liu2018generative,ma2019probabilistic,yilmaz2020conditional,achour2020development}. In this paper, we adopt this method and further address the problem of conditioning on range constraints~\textemdash~{\em i.e.}, given upper and lower bounds on any property, how can we generate designs for which this property falls within the specified bounds. This is different from previous work, where conditions are set as exact values. The consideration of range constraints is more practical since, in many cases, some tolerance is allowed for certain properties.
\begin{enumerate}
\item How to enforce range constraints (with arbitrary lower/upper bounds) on generated samples?
\item How to ensure accurate conditioning when data with some conditions are sparse or unavailable?
\item How to allow the conditions of generated samples to uniformly fall within the range constraints?
\end{enumerate}
To address the above challenges, we propose a deep generative model called the \textit{range-constrained generative adversarial network (Range-GAN)}. We then demonstrate the effectiveness of our proposed model on a 3D shape design example. Our primary contributions are as follows:
\begin{enumerate}
\item A new range loss function which allows for effective range conditioning in continuous spaces, with over 80\% constraint satisfaction.
\item We introduce a novel loss term to encourage uniform coverage of the condition (label\footnote{In this paper, the word label refers to the actual value of a design's performance or attribute.}) space inside the acceptable constraint range, and show that this loss leads to a 125\% average increase on the uniformity of generated samples' labels.
\item We propose label-aware self-augmentation, which allows for augmenting the data such that the sparsely populated regions of the condition (label) space are populated. We show that this augmentation improves the real-world performance of Range-GAN notably (by up to 18\%), which proves the effectiveness of the augmentation in improving Range-GAN.
\item We apply Range-GAN in a 3D shape generation process to demonstrate the ease with which Range-GAN can be effectively applied to any GAN approach.
\end{enumerate}
\section{Background and Related Work}
Our work addresses an inverse design problem, where a designer inputs some requirements and expects an algorithm/model to generate desired designs. In this section, we first introduce the techniques used in the inverse design problem, especially the use of data-driven methods. Then, we provide a brief description of conditional generative adversarial networks, upon which our proposed model is based.
\subsection{Inverse Design Problem}
Inverse design problems have been studied in various engineering design domains such as airfoil shape design, mechanism design, and metamaterial design. A typical inverse design problem can be solved by optimization, where we optimize design parameters such that the design's performance satisfies certain objectives or constraints. Unfortunately, gradient-based optimization ({\em e.g.}, topology optimization or adjoint-based shape optimization) is restricted to limited design representations and solver types. On the other hand, in gradient-free optimization ({\em e.g.}, genetic algorithm or Bayesian optimization), as the problem dimension ({\em i.e.}, the number of design parameters) increases, the computational cost quickly becomes prohibitive due to the curse of dimensionality~\cite{Bellman34}. Alternatively, one can use a neural network as a surrogate for any physics simulation, so that standard back propagation can be used to get analytical gradients for gradient-based optimization~\cite{peurifoy2018nanophotonic}. This approach applies to any black-box physics solvers and does not have the computational cost problem seen in gradient-free optimization methods.
While many traditional techniques on the inverse design problem focus on the use of optimization, research has been done to completely remove such time-consuming iterative optimization processes to significantly reduce the computational cost.
Reinforcement learning (RL) offers one way to achieve this goal.
For example, Vermeer~\cite{vermeer2018kinematic} used temporal difference (TD) learning to synthesize mechanism designs with desired output trajectories. Lee~{\em et~al.}~\cite{lee2019case} used a DQN to design a microfluidic device which led to a target flow shape.
While RL works well for discrete and low-dimensional design spaces, it does not effectively scale to more complex scenarios~\cite{theodorou2010reinforcement}.
The aforementioned approaches only allow for bijective mappings between the target and design parameters, which might be impractical for many problems. For example, a specific lift or drag coefficient may correspond to multiple feasible design solutions. This becomes more obvious when we only require that the target performance falls within a range rather than at an exact point. Recent advances in deep generative models, generative adversarial networks (GANs)~\cite{goodfellow2014generative}, and variational autoencoders (VAEs)~\cite{kingma2013auto} in particular, provide ways to solve this problem. Deep generative models can learn a distribution of designs so that one can quickly sample plausible designs without any optimization process. The learned distribution can be further conditioned on target performance by using models like conditional GANs (cGANs)~\cite{mirza2014conditional} or conditional VAEs (CVAEs)~\cite{sohn2015learning}. This allows us to generate many designs conditioned on any performance requirement; {\em i.e.}, the mapping from the performance space to the design space can be one-to-many. This technique has been used for the inverse design of metasurfaces, metamaterials, and cellular structures~\cite{liu2018generative,ma2019probabilistic,wang2021ih}.
As pointed out in~\cite{ding2020ccgan}, however, conditional generative models with continuous conditions may fail. Unlike finite discrete conditions, design data under certain continuous performance conditions can be sparse or even non-existing, leading to inaccurate conditioning under those conditions and subsequent failure of the model. Past work~\cite{yilmaz2020conditional,achour2020development} proposes to discretize the continuous values of the metrics. This approach, however, eliminates the possibility of setting arbitrary conditions.
In this paper, we address the above issue in continuous conditional generative models. Moreover, we consider a more general problem, where, instead of using exact performance metrics as conditions, we generate designs with performances within any user-defined range.
We achieve this goal by modifying the cGAN model, which we introduce in the next section.
\subsection{Conditional Generative Adversarial Networks}
A generative adversarial network~\cite{goodfellow2014generative} consists of two models~\textemdash~a \textit{generator} and a \textit{discriminator}. The generator $G$ maps an arbitrary noise distribution to the data distribution, in our case the distribution of designs, and can thus generate new data; simultaneously, the discriminator $D$ tries to perform classification ({\em i.e.}, attempts to distinguish between real and generated data). Both models are usually built with deep neural networks. As $D$ improves its classification ability, $G$ also improves its ability to generate data that fools $D$.
Thus, a vanilla GAN (standard GAN with no bells and whistles) has the following objective function:
\begin{equation}
\min_G\max_D V(D,G) = \mathbb{E}_{\mathbf{x}\sim P_{data}}[\log D(\mathbf{x})] +
\mathbb{E}_{\mathbf{z}\sim P_{\mathbf{z}}}[\log(1-D(G(\mathbf{z})))],
\label{eq:gan_loss}
\end{equation}
where $\mathbf{x}$ is sampled from the data distribution $P_{data}$, $\mathbf{z}$ is sampled from the noise distribution $P_{\mathbf{z}}$, and $G(\mathbf{z})$ is the generator distribution. A trained generator can thus map from a predefined noise distribution to the distribution of designs.
The \textit{conditional GAN}, or \textit{cGAN}~\cite{mirza2014conditional}, further extends GANs to allow the generator to learn a conditional distribution. This is done by feeding the condition, $\mathbf{y}$, to both $D$ and $G$. The loss function then becomes:
\begin{equation}
\begin{split}
\min_G\max_D V_{\text{cGAN}}(D,G) = & \mathbb{E}_{\mathbf{x}\sim P_{data}}[\log D(\mathbf{x}|\mathbf{y})] + \\
& \mathbb{E}_{\mathbf{z}\sim P_{\mathbf{z}}}[\log(1-D(G(\mathbf{z}|\mathbf{y})))].
\end{split}
\label{eq:cgan_loss}
\end{equation}
Therefore, given any conditions, cGAN can generate a set of designs that satisfy the given conditions, by feeding a set of random noise. In this paper, we use range constraints as conditions~\textemdash~{\em i.e.}, the performance/attribute of generated designs needs to fall within some lower and upper bounds. This is a more practical consideration because a certain level of tolerance on the performance/attribute is allowed in many cases.
As mentioned in the previous section, conditional GAN may fail when the conditions are continuous due to data sparsity at certain conditions. To address this issue, past work either discretizes continuous conditions~\cite{yilmaz2020conditional,achour2020development} or proposes a new sampling scheme to mitigate the problem~\cite{ding2020ccgan}. However, neither method works well with large sparse regions in the condition space. In this paper, we address this problem by using a label-aware self-augmentation method, which we elaborate on in Sect.~\ref{sec:augment}.
\subsection{3D Shape Synthesis via Deep Generative Models}
In this paper, we validate our proposed model on a 3D shape synthesis task. The goal of this task, in general, is to generate useful new 3D shapes while avoiding manual efforts/expertise to construct and modify detailed geometries.
Deep generative models, like GANs or VAEs, are excellent candidates for this task due to their ability to learn complex data distributions and generate realistic samples. The model architecture, cost, and performance are highly dependent on data representation. Volumetric representations, like voxel grids and point clouds, are straight-forward to learn but require large models and hence have wasteful computational or memory cost~\cite{wu2016learning,wang2018global,achlioptas2018learning,liu2018learning,zhang20193d,shu20203d}. View-based approaches generate multi-view depth maps, normal maps, or silhouettes, which reduce the computational/memory cost, but cannot produce shapes with self-occlusion~\cite{arsalan2017synthesizing}. Surface patch representation uses one or more images to represent the 3D object’s surface. This allows self-occlusion but requires complex data preprocessing and shape correspondence~\cite{ben2018multi}. To further reduce computation/memory requirement, 3D objects are represented as implicit fields ({\em e.g.}, signed distance fields) and neural networks are trained to approximate those functions, simply mapping 3D coordinates to scalars~\cite{mescheder2019occupancy,chen2019learning,park2019deepsdf}. This produces simple neural network architectures and generates shapes with no resolution limit, since each shape is represented as a continuous implicit field.
Our model for 3D shape synthesis is built on IM-NET~\cite{chen2019learning}, which is one of the implicit field-based methods. The IM-NET consists of two parts: representation learning ({\em i.e.}, learning a latent vector representation for 3D shapes) and generative modeling ({\em i.e.}, learning the latent vector distribution and generating new latent vectors). We modify the second part such that the latent vector distribution can be conditioned on any range constraints. We will further elaborate our shape generation pipeline in Sect.~\ref{sec:pipeline}.
\section{Methodology}
\label{sec:methodology}
This section describes our overall methodology. We start by discussing the overall pipeline for 3D shape generation (Sect.~\ref{sec:pipeline}). Next, we propose new loss functions and generator architecture to effectively enforce range-constraints (Sect.~\ref{sec:range}). The following two sections address problems with range-constraint conditioning: Sect.~\ref{sec:unform} addresses the problem of getting uniformly distributed samples within a range, while Sect.~\ref{sec:augment} addresses data sparsity with augmentation methods. Our methodology concludes by showing how these methods apply to constraints on multiple variables. We summarize the overall architecture of Range-GAN in Fig.~\ref{fig:architecture}.
\begin{figure*}[ht!]
\centering
\vskip -0.4in
\includegraphics[width=1.7\columnwidth]{fig/Range-GAN.pdf}
\vskip -0.1in
\caption{Overall architecture for the Range-GAN}
\label{fig:architecture}
\end{figure*}
\subsection{3D Shape Generation Pipeline}
\label{sec:pipeline}
While our method can be applied to various use cases, we demonstrate the effectiveness of the Range-GAN on a 3D shape design example. To generate 3D models, we combine our Range-GAN with the \textit{implicit decoder} in the \textit{IM-NET}~\cite{chen2019learning}. Specifically, the implicit decoder is a neural network that approximates the implicit fields of shapes. At each point $(x, y, z)$, an implicit field assigns a value of 1 if the point is inside the 3D shape, and 0 otherwise. Given the implicit field of a shape, we can obtain its surface mesh by using methods like marching cubes~\cite{lorensen1987marching}. Each implicit field is also conditioned on a \textit{latent vector}, which represents a unique shape and is learned by an encoder. The implicit decoder takes in both a latent vector and a 3D point coordinate and predicts the implicit field at the given point to describe a shape represented by the given latent vector. The combination of the encoder and the implicit decoder is called an \textit{IM-AE} and is trained according to Ref.~\cite{chen2019learning}. After training, we obtain the latent vectors for the training data. We can further use our Range-GAN to learn the distribution of those latent vectors. By concatenating the trained generator of the Range-GAN with the trained implicit decoder, we can generate 3D shapes based on any condition and noise vector, as shown in Fig.~\ref{fig:workflow} (we will elaborate on the generator training in the following sections). The merit of using this framework is that we can modularize two tasks~\textemdash~1)~generative modeling of latent vectors and 2)~transformation from latent vectors to 3D shapes. This, on one hand, simplifies the generative modeling task, because the GAN is learning a much lower-dimensional distribution compared to directly learning the distribution of 3D shapes. On the other hand, this provides a platform for future study on generative modeling for 3D shapes, where we do not need to worry about shape representation, because we already have the latent vector as an efficient shape representation.
\subsection{Enforcing Range Constraints in GANs}
\label{sec:range}
Similar to the idea of adding an auxiliary classifier/regressor to the cGAN~\cite{odena2017conditional,wang2021ih} to improve generation quality or enforce accurate conditioning, we use a label estimator to guide the generator during training to generate designs that meet input constraints. In this way, we utilize the discriminator's insight into the data distribution to promote synthesis of realistic designs while simultaneously using the estimator's insight to guide the generator towards meeting input requirements. In this approach, the estimator can be any differentiable model that predicts the label of generated designs ({\em e.g.}, an adjoint-based physics simulator or a deep neural network~(DNN) regression model). In this paper, we use a pre-trained DNN-based estimator to predict the labels of any given design. To integrate the estimator into the GAN's objective, we propose a novel loss function for the generator. This loss function must have certain characteristics to be effective~\textemdash~1)~the loss function must have a zero gradient for samples within the input condition range~({\em i.e.}, samples that meet the condition need no further change) and 2)~the gradient should start gradually decreasing as samples get closer to the acceptable range to stabilize training. Given that these characteristics are seen in the negative log likelihood~(NLL) function of the GAN objective, we attempt to create a similar loss function that applies the same principles for the range conditions. To imitate the NLL, we need a mechanism that turns predicted continuous labels into probabilities of condition satisfaction. To do this, we use two sigmoid functions shifted to the lower and upper bounds of the given range condition to estimate the probability of condition satisfaction:
\begin{equation}
\begin{split}
p(\mathbf{x}|[\mathbf{y}_{lb},\mathbf{y}_{ub}]) \approx\frac{1}{1+e^{\phi(E(\mathbf{x})-\mathbf{y}_{lb})}}-\frac{1}{1+e^{\phi(E(\mathbf{x})-\mathbf{y}_{ub})}},
\end{split}
\label{eq:3}
\end{equation}
where $E(\mathbf{x})$ is the label predicted by the estimator $E$, $\mathbf{y}_{lb}$ and $\mathbf{y}_{ub}$ are the lower and upper bounds of the range constraint, and $\phi$ is a scaling factor determining how aggressively the probability grows/shrinks at the lower/upper bounds. The hyper-parameter $\phi$ determines how aggressive the overall gradient will be, and how close the sigmoids will be to a unit step function. We measure the NLL based on this estimated probability using the \textit{range loss function}:
\begin{equation}
\begin{split}
\mathcal{L}_{\mathrm{range}}=-\frac{\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{i,ub}) \times(y_{i}-y_{i,lb})\geq 0}} \,\log(p(\mathbf{x}_{i}|[y_{i,lb},y_{i,ub}]))}{\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{i,ub}) \times(y_{i}-y_{i,lb})\geq 0}}}.
\end{split}
\label{eq:4}
\end{equation}
Here, $N$ is the number of samples generated in a batch and $\mathbf{x}_{i}$ is the $i$-th sample in the batch with an estimated/calculated label of $\mathbf{y}_{i}$. Note that $\mathcal{L}_{\mathrm{range}}=0$ for samples that meet the condition ($y_{i,lb}\leq y_{i}\leq y_{i,ub}$). When this loss term is added to the generator loss, the estimator will guide the generator to produce samples that satisfying the range condition as training proceeds.
We do not have $\mathbf{y}_{lb}$ and $\mathbf{y}_{ub}$ in the data. During training, $y_{i,lb}$ and $y_{i,ub}$ are randomly sampled as follows:
\begin{equation}
\begin{split}
&y_{i,lb}\sim \text{unif}(y_{\min}, y_{\max}-0.05(y_{\max}-y_{\min})),\\
&y_{i,ub}\sim \text{unif}(y_{i,lb}+0.05(y_{\max}-y_{\min}), y_{\max}),
\end{split}
\end{equation}
where $y_{\min}=\min_i \{y_i\}$ and $y_{\max}=\max_i \{y_i\}$. When we scale the label to the range [0,1], we simply have $y_{\min}=0$ and $y_{\max}=1$.
We only sample one condition at every training step and use that condition for the entirety of the batch. We found this treatment gave better results. Also, as we will discuss in Sect.~\ref{sec:unform}, this is a necessary requirement for our uniformity loss.
\subsection{Incorporating Conditions by Conditional Batch Normalization}
\begin{figure*}[ht!]
\centering
\vskip -0.4in
\includegraphics[width=1.8\columnwidth]{fig/rangeganarch.pdf}
\vskip -0.1in
\caption{3D shape generation pipeline during inference (\textit{left}) and detailed architectures for the generator (\textit{left}), the discriminator (\textit{middle}), and the estimator (\textit{right}). The residual connections in the estimator take the outputs of the higher layer before activation and batch normalization and add them to the outputs of the following layer before activation and batch normalization. (Cond. BN: conditional batch normalization; SELU: scaled exponential linear units~\cite{selu})}
\label{fig:workflow}
\end{figure*}
A na\"ive approach to incorporate input conditions in cGANs is to concatenate input conditions with the input noise vector before feeding them into the generator~\cite{mirza2014conditional}. For categorical labels, which cGANs were developed for, this approach is effective as input labels are typically one-hot embeddings that are highly discrete and distinct. On the other hand, scalar labels in continuous spaces may not be very distinct and are therefore not suitable for this approach~\cite{ding2020ccgan}. We avoid this issue by applying conditional batch normalization~\cite{cbn} to the output of every linear layer in the generator (Fig.~\ref{fig:workflow}), where the conditional batch normalization is computed based on the input conditions. This approach is effective in feeding continuous conditions~\cite{ding2020ccgan}.
\subsection{Enforcing Label Uniformity}
\label{sec:unform}
It is important to note that even the labels of generated designs satisfy a given range constraint, the label distribution can vary. For example, labels can either spread uniformly over the entire range or gathered at one point. So far in our implementation of the range loss~(Eqn.~\ref{eq:4}), samples that meet any given condition are treated equally, with no gradient applied to them based on their predicted labels. In this paper, we introduce an approach to promote uniform coverage of the condition range. Uniform coverage is the most generalizable case, because, since the generator can be trained to cover all of the condition space, it should theoretically also be possible to bias the generator towards the lower or higher bounds of any given input condition. Uniform coverage demonstrates that the generator can cover an entire range space and biasing the generator towards either bound should be as simple as changing the loss function to encourage the generator towards either bound.
To promote uniformity in the labels of generated designs, we can maximize any entropy-based metric on those labels. In our experiments, we found that general entropy losses are not very useful, as they encourage overall entropy, which means the loss terms encourage the generator to generate samples with labels having the largest possible distance, thus pushing generated designs outside the constraint range and significantly decreasing condition satisfaction rate. To overcome this, we introduce a novel \emph{uniformity loss} which takes into account the acceptable range and encourages entropy only within that acceptable range. Furthermore, our proposed uniformity loss is particularly geared around encouraging uniform distribution and takes advantage of a specific property of uniform distributions.
Specifically, we take advantage of two properties: 1)~given a starting distribution that is uniform, if we split this distribution into two, both resulted distributions will also be uniform; 2)~the mean of any uniform distribution is the mean of the lower and upper bound of the distribution. With those properties, the uniformity loss slices the generated samples' label distribution at random points within the constraint range. It then measures the mean of each label subset and uses the mean absolute error between the actual mean and the expected uniform distribution mean as the loss term. This is done multiple times for each batch during training to ensure that uniformity is stochastically encouraged. This is because, theoretically, if the slice points remained constant, a non uniform multi-modal distribution could mimic a uniform distribution for a set of slice points, where the modes of said distribution are located exactly between slice points. This loss function will only be applied to the samples that meet the input condition and can be formulated as such:
\begin{equation}
\begin{split}
&\mathcal{L}_{\mathrm{unif}}=\frac{1}{K}\\
&\sum_{j=1}^{K} \mathbb{E}_{\epsilon_{j} \sim \mathbb{U}(y_{lb}, y_{ub})}|\frac{
\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{ub})\times(y_{i}-\epsilon_{j})\leq 0}} \,(y_{i}-\frac{y_{ub}+\epsilon_{j}}{2})}{\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{ub})\times(y_{i}-\epsilon_{j})\leq 0}}}|+\\
&|\frac{
\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{lb})\times(y_{i}-\epsilon_{j})\leq 0}} \,(y_{i}-\frac{y_{lb}+\epsilon_{j}}{2})}{\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{lb})\times(y_{i}-\epsilon_{j})\leq 0}}}|,
\end{split}
\label{eq:5}
\end{equation}
where we apply random splits $K$ times using slice points~($\epsilon_{j}$) uniformly sampled in the input condition range. Note that we use the entire batch to form the distribution. Therefore, $y_{ub}$ and $y_{lb}$ are sampled once per batch and are used to generate every sample in that batch during training. At this point, the overall objective of Range-GAN can be written as the combination of the vanilla GAN objective from Eqn.~\ref{eq:gan_loss} and the new loss terms:
\begin{equation}
\min _{G} \max _{D} V(D, G)+\lambda_{1} \mathcal{L}_{\mathrm{range}}(G) +\lambda_{2} \mathcal{L}_{\mathrm{unif}}(G),
\end{equation}
where hyper-parameters $\lambda_{1}$ and $\lambda_{2}$ determine the weight of the range and uniformity losses, respectively.
\subsection{Label-Aware Self-Augmentation to Address The Data Sparsity Problem} \label{sec:augment}
As discussed before, sometimes exact estimators of any design's label~({\em e.g.}, performance metrics, attributes, etc.) are not readily differentiable. In these circumstances, the estimator can be a pre-trained DNN regression model which predicts the label based on a set of training data. It is, however, often the case that the labels in the data do not evenly cover the label space. In these circumstances, there may not be enough data associated with certain regions of the label space for the DNN estimator to learn those regions with high accuracy. This leads to inconsistencies in the actual labels of the generated designs compared to the predicted labels in the sparsely populated regions of the label space. This issue is often seen in engineering design datasets, where the extremes of any given label do not have many samples associated with them.
In this paper, we propose a self-augmentation method that uses the generated samples to augment the dataset and retrain the DNN estimator to better cover sparse regions of the label space. Specifically, after the first round of training is finished on the GAN, a number of samples are generated and evaluated using a high fidelity \textit{evaluator} ({\em e.g.}, a physics simulator). Unlike the label estimator mentioned earlier, such an evaluator is not necessarily differentiable and can be any black-box model. We then add samples from this subset to the dataset if their actual labels are located in sparse regions. Particularly, we split the label space into 10 equally spaced bins and count the number of samples from the data in each bin. We then add data from the generated and evaluated samples to bins with a smaller number of samples until the bin counts become equal or no more samples exist in the newly generated set to fill the less populated bins. We then re-train the DNN estimator using this augmented dataset and use the improved DNN estimator and the newly generated and evaluated data to re-train the GAN. By doing this, we overcome the initial shortcomings of the DNN in sparsely populated regions of the label space, which will, in turn, guide the generator towards meeting input conditions better. Generally, the quality of the estimator is crucial to Range-GAN's success, and exact differentiable estimators will ultimately be the strongest option. Regardless, the lack of data in certain regions will also always impact the performance of the trained GAN, given the fact that, if data doesn't exist in certain regions, GANs cannot be expected to explore those regions. Ultimately, GANs only emulate the dataset and do not typically generate novel samples.
\section{Experimental Settings}
In this paper, we illustrate our results using the real-world example of synthesizing 3D airplanes. For this purpose, we use the airplane subset of the ShapeNet dataset~\cite{chang2015shapenet}, which includes 4,043 airplane models. We then measure the \textit{aspect ratio} and \textit{volume ratio} of models and use them as the labels for conditioning. The aspect ratio is the measure of the ratio between fuselage length and wingspan, while the volume ratio is the ratio of the volume of the 3D model compared to a unit cube it occupied. And since the volume of the unit cube is constant, the volume ratio practically indicates the volume of the model.
As discussed prior, sparsity in the label space is a major problem, which also exists in this dataset. To avoid extremely sparse sectors of the label space, we remove the samples beyond the 99.5 percentile in both volume and aspect ratios. After this step, we are left with a dataset of 4,012 models. The distribution of labels in this dataset is presented in Fig.~\ref{fig:overall_dist}. As evident, the data is mostly centered around a very narrow region of the label space, which makes this dataset a perfect example to demonstrate the effectiveness of Range-GAN even in such extremely sparse datasets.
\begin{figure}[ht!]
\centering
\vskip -0.1in
\includegraphics[width=0.8\columnwidth]{fig/label_dist.png}
\vskip -0.1in
\caption{A kernel density estimation of the probability density function for the labels in the dataset, demonstrating the distribution of labels within the dataset. Note that these labels report the normalized values of volume and aspect ratios, and not the true values.}
\vskip -0.1in
\label{fig:overall_dist}
\end{figure}
We then train the IM-NET model (as described in Sect.~\ref{sec:pipeline} and Ref.~\cite{chen2019learning}) on this dataset and use the 256-dimensional latent vectors to train Range-GAN. After training, the Range-GAN can generate new latent vectors, which can then be transformed into the implicit field representation of 3D models using the implicit decoder. We further obtain the surface meshes via marching cubes~\cite{lorensen1987marching}. Fig.~\ref{fig:dataset} demonstrates some examples of the ShapeNet airplanes reconstructed using the implicit decoder.
\begin{figure}[ht!]
\centering
\includegraphics[width=1\columnwidth]{fig/rangegandata.png}
\vskip -0.1in
\caption{A subset of the ShapeNet airplane dataset reconstructed by our trained IM-NET model.}
\vskip -0.1in
\label{fig:dataset}
\end{figure}
For all experiments, we set $\phi=20$, $\lambda_{1}=2.0$, and $\lambda_{2}=1.0$.
We train our models for 50,000 steps with a batch size of 32. We use the Adam optimizer with a learning rate of $10^{-4}$, which decays by 20\% every 5,000 steps. We train the estimator using the L2 regression loss for 10,000 steps with a batch size of 256 using the Adam optimizer with a learning rate of $10^{-4}$, which decays by 40\% every 2,500 steps. To reduce bias in the discriminator, we sample the data during training such that the labels of any given batch are uniformly distributed across the label space. To do this, we uniformly sample random numbers between 0.0 and 1.0, which are the normalized bounds of the labels, and pick the sample with the label closest to the random number. We do the same when training the estimator; we found that this training improves the estimator significantly.
\section{Results and Discussion}
In this section, we present the results of training Range-GAN based on the methods described above. First, we demonstrate Range-GAN in the context of single constraint conditioning for both the volume and aspect ratio labels independently. Then, we demonstrate the performance of Range-GAN on conditioning in both volume and aspect ratio labels simultaneously. In the end, we discuss the effects of our data augmentation and the performance of Range-GAN when measured based on exactly calculated labels. In sections before the augmentation, unless otherwise specified, the results presented are based on estimator predictions rather than exact values, which we do because calculating the actual labels is computationally expensive. Finally, we normalize the labels for both volume and aspect ratio to span the full range from 0.0 to 1.0. The values of aspect ratio (A/R) and volume ratio (V/R) presented here are based on the normalized label values and not the physical values.
\subsection{Evaluation Metrics}
In this paper, the primary objective is for the generator to meet the input range condition. As such, we measure the success of any model by how well it can satisfy the input conditions. We do this using the condition satisfaction metric, which essentially measures the number of generated samples that meet the input condition:
\begin{equation}
\begin{split}
Satisfaction=\frac{\sum_{i=1}^{N}\mathbbm{1}_{{(y_{i}-y_{i,ub}) \times(y_{i}-y_{i,lb})\leq 0}}}{N},
\end{split}
\label{eq:4}
\end{equation}
where $N$ is the total number of generated samples.
The second metric we use is the measure of uniformity in the output distribution for the samples that meet the input condition. To do this, we use the quadratic entropy. Quadratic entropy is the mean of the square of the distances between any two samples' labels:
\begin{equation}
\begin{split}
Quadratic Entropy=\sum_{i=1}^{N}\sum_{i=j}^{N}\frac{1}{N^2}(y_{i}-y_{j})^2,
\end{split}
\label{eq:4}
\end{equation}
where $N$ is the number of generated samples that meet the input condition, and $y_{i}$ and $y_{j}$ are the labels of any two generated samples that meet the input condition.
\subsection{Single Constraint Case Studies}
First, we analyze Range-GAN's performance in a single constraint application. In this paper, we train Range-GAN using the volume ratio and aspect ratio labels separately. For the aspect ratio case, we present some of our results visually in Fig.~\ref{fig:ratio_res}-Left. It can be visually confirmed that, as the input aspect ratio condition increases, the ratio between the fuselage length and wingspan increases, which demonstrates Range-GAN is working as intended. The same visual confirmation is available in the volume ratio dataset. The samples of Range-GAN conditioned on different volume ratio ranges are presented in Fig.~\ref{fig:ratio_res}-Right. In this case as well, one can visually confirm that Range-GAN is performing as expected.
\begin{figure*}[ht!]
\centering
\includegraphics[width=1\columnwidth,height=2.0in]{fig/RATIO.pdf}
\includegraphics[width=1\columnwidth,height=2.0in]{fig/Volume.pdf}
\vskip -0.1in
\caption{Left: Example of Range-GAN outputs with different aspect ratio conditions. The input range conditions are presented above each column of images. The images in each column represent the outputs of Range-GAN given a single input condition. Right: Example of Range-GAN outputs with different volume ratio conditions. The input range conditions are presented above each column of images. The images in each column represent the outputs of Range-GAN given a single input condition. The images are to scale so models that appear larger occupy a larger volume.}
\label{fig:ratio_res}
\end{figure*}
With the results now visually confirmed, we can move on to measure the performance of the models using our metrics. To demonstrate the performance of the model across the label space, we compute the satisfaction metric for input ranges of length 0.05, 0.1, and 0.2 spanned from one side of the label space to the other for 100 input condition ranges spanned uniformly across the label space. For each condition, we generate 2,000 samples and use the predicted labels from the estimator to compute the condition satisfaction. Further, we show the satisfaction calculated for the same ranges in the data. The curves representing data are essentially demonstrating the probability of meeting the input conditions to the generator if we were to randomly sample airplanes from the dataset. The results of this are presented in Fig.~\ref{fig:satisfaction} and Table.~\ref{table:summary}. As evident, Range-GAN is performing very well when it comes to the single constraint range conditioning. Further, we observe that as the input constraint range becomes narrower, the performance of Range-GAN declines. This is expected as, when the range becomes more and more restrictive, it becomes more difficult for the generator to meet the input conditions. Finally, if the input range's bounds converge to a single point, it becomes practically impossible to meet the exact input condition up to machine precision~({\em i.e.}, $\epsilon_{machine}$).
\begin{figure}[ht!]
\centering
\includegraphics[width=1\columnwidth,height=2.0in]{fig/sat.png}
\vskip -0.1in
\caption{The performance of Range-GAN in input condition satisfaction for both volume and aspect ratios compared to the same metric in the data distribution. The x-axis on the plots represents the center of the input range condition, meaning input condition of the range with width of $range size$ centered at the value on the x-axis.}
\vskip -0.1in
\label{fig:satisfaction}
\end{figure}
We can then move onto measuring the uniformity of the label distribution of output samples. We use the quadratic entropy metric discussed before. To measure this, we take a similar approach as we did for satisfaction. We measure the quadratic entropy at different input conditions across the condition space. This time, however, we train Range-GAN without the uniformity loss to establish a baseline measurement for the effectiveness of the uniformity loss. We measure the quadratic entropy of the labels of 1,000 generated samples that meet the condition at every point in the conditioning space. Because uniformity is only relevant inside the acceptable range, we measure the uniformity only for samples that meet the input condition. For the sake of brevity, we only present the results for the aspect ratio case study. In Fig.~\ref{fig:uniformity}, we observe that the entropy increases significantly after introducing the uniformity loss. This demonstrably indicates the effectiveness of the introduced uniformity loss term. Furthermore, we observe that the difference between the label distributions' entropy becomes more pronounced with an increase in the size of the input condition range. This means that, in more broad input conditions, the GAN with a range loss alone can simply generate samples closer to each other within the acceptable range without any incentive to cover the entire acceptable label space without the uniformity loss. We visually demonstrate this in Fig.~\ref{fig:dist}, which shows one example of how the loss term improves the output distribution to allow for uniform coverage of the label space.
\begin{figure}[ht!]
\centering
\includegraphics[width=1\columnwidth]{fig/entropy.png}
\vskip -0.1in
\caption{The effect of the uniformity loss term on the output labels' quadratic entropy for two different range sizes at the input condition.The x-axis on the plots represents the center of the input range condition.}
\vskip -0.1in
\label{fig:uniformity}
\end{figure}
\begin{figure}[ht!]
\centering
\includegraphics[width=1\columnwidth]{fig/dist.png}
\vskip -0.1in
\caption{The histograms of the distribution of output labels (for the aspect ratio case) in the acceptable range of 0.4 to 0.5~(these conditions were picked arbitrarily to visually demonstrate the distributions), both with and without the uniformity loss. Both figures represent probability density on the y-axis. The overlaid constant distribution at a probability density of 10 illustrates a perfectly uniform distribution.}
\label{fig:dist}
\end{figure}
\subsection{Multi-Constraint Case Study}
Now that we have established the effectiveness of our approach in single constraint range conditioning, we will demonstrate that Range-GAN can be applied in multi-constraint range conditioning as well. We do this by passing range conditions for both the aspect ratio and the volume ratio to the generator. For the case of multi-constraint Range-GAN, we present some of our results visually in Fig.~\ref{fig:mo_res}. This figure demonstrates samples generated by Range-GAN that meet the input conditions since only one sample is presented for each input condition. Regardless, the visual trend seen here is present in generated samples overall. As evident in this image, the two trends seen before for the single constraint cases are present together, visually demonstrating the effectiveness of the Range-GAN in multi-constraint conditioning.
\begin{figure*}[ht!]
\centering
\includegraphics[width=1.3\columnwidth,height=2.5in]{fig/grid.pdf}
\vskip -0.1in
\caption{Example of Range-GAN outputs with different volume ratio and aspect ratio conditions. The input range conditions are presented above each column and to the left of each row. The images are to scale so models that appear larger occupy a larger volume, hence a larger volume ratio.}
\label{fig:mo_res}
\end{figure*}
Having established our results visually, we will present the condition satisfaction for the multi-constraint case study. Given the difficulty of presenting the higher dimensional data, we will only present our results for the range size of 0.1 for both constraints. Similar to the single constraint case before, we compute the satisfaction for 2,000 generated samples at each condition and calculate the satisfaction for 20 conditions spanned uniformly across each label space. The results of this analysis are presented in Fig.~\ref{fig:mo_sat} and Table.~\ref{table:summary}. Comparably to the single constraint case, Range-GAN is capable of conditioning effectively despite the very limited distribution of the data labels~(Fig.~\ref{fig:overall_dist}), which demonstrates the fact that the approaches discussed in Range-GAN can be expanded to multi-constraint applications effectively. We do, however, observe that the overall satisfaction is lower in the multi-constraint case than in the single constraint cases. This is expected, as the complexity of the task quadruples in going from a single constraint to two constraints. Another important observation is that Range-GAN has failed to produce low aspect ratio and high volume ratio samples, as can be seen in the top left corner of the Range-GAN satisfaction plot. This is not necessarily unexpected, as the data is practically non-existent in that location. A low aspect ratio requires that the generated aircraft have a significantly smaller fuselage compared to its wingspan, and, given that the fuselage typically contains most of the aircraft's volume, it becomes very difficult, in fact practically impossible, to generate large numbers of airplanes with such properties.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.7\columnwidth]{fig/mosat.png}
\vskip -0.1in
\caption{The performance of Range-GAN in input condition satisfaction in both volume and aspect ratio. The Values indicated on the x and y axes of the plots represent the center of the input range conditions with the range size of 0.1. The white grid lines indicate the start and end of the input condition ranges.}
\label{fig:mo_sat}
\end{figure}
\begin{table}[h!]
\vskip -0.1in
\caption{Experimental results on condition satisfaction (mean and standard deviation over the entire condition space) with estimator prediction}
\label{table:summary}
\begin{tabular}{ccc}
\toprule
Condition Variable & Range Size & Condition Satisfaction\\
\midrule
Volume Ratio& 0.1&0.9131$\pm$0.0309\\
Volume Ratio& 0.2&0.9841$\pm$0.0102\\
Aspect Ratio& 0.1&0.8723$\pm$0.03806\\
Aspect Ratio& 0.2&0.9687$\pm$0.0112\\
Both&0.1&0.6921$\pm$0.1102\\
Both&0.2&0.9294$\pm$0.0432\\
\bottomrule
\end{tabular}
\vskip -0.2in
\end{table}
\subsection{Effects of Data Augmentation}
So far, we have evaluated the performance of our models based on the DNN estimator predictions of performance. In this section, we will discuss the real measured performance of the generated samples by generating samples and reconstructing them using the implicit decoder, and measuring their volume and aspect ratios. This task is computationally expensive, which is why it is not practical to show these results for all of our work in this manner. Further, the methodology surrounding Range-GAN assumes that an accurate estimator is being used, which is crucial for the success of Range-GAN; measuring the performance based on the estimator shows how well the range loss works in guiding Range-GAN towards the correct labels. Nevertheless, the real-world implications of using DNN-based approximate estimators must be discussed. Additionally, we do this to show that the proposed data-augmentation improves the estimator, hence the real-world performance of Range-GAN. First, we present the real-world performance of the models with and without augmentation for the single constraint case-studies at 50 conditions uniformly spanned across the condition space for a range size of 0.1. For every condition, we generate and construct 50 3D samples and measure their real-world performance. The actual satisfaction are presented for both volume and aspect ratios in Fig.~\ref{fig:real_sat} and Table.~\ref{table:aug}. As is evident, the real-world performance of Range-GAN is worse than the performance of Range-GAN based on the estimator prediction. Further, we can see that the data after augmentation is relatively uniformly distributed across the label space, which has helped improve the DNN estimator significantly. We find that Range-GAN's real performance is more consistent in both volume and aspect ratio conditioning when augmentation is applied, while the Range-GAN without augmentation is more inconsistent in performance with significant dips in satisfaction. This proves the original claim that the DNN estimator would struggle in sparse regions, which we see specifically in the higher end of both volume and aspect ratios; the un-augmented Range-GAN performs poorly here, while the augmented Range-GAN does better. It is important to mention that the computational cost of augmentation is significant, as shapes have to be reconstructed to calculate their labels. The benefits, however, seem significant enough to justify such costs.
\begin{figure}[ht!]
\vskip -0.2in
\centering
\includegraphics[width=1\columnwidth]{fig/aug.png}
\vskip -0.1in
\caption{The real-world performance of Range-GAN in input condition satisfaction in both volume and aspect ratio compared to the same metric in the data distribution both before and after data augmentation for a range size of 0.1. The x-axis on the plots represents the center of the input range condition.}
\vskip -0.2in
\label{fig:real_sat}
\end{figure}
\begin{table}[h!]
\vskip -0.3in
\caption{Experimental results on condition satisfaction with a range size of 0.1 (mean and standard deviation over the entire condition space) with exact performance calculation}
\label{table:aug}
\label{table:summary}
\begin{tabular}{cccc}
\toprule
Condition Variable & Condition Satisfaction & Augmented\\
\midrule
Volume Ratio&0.5823$\pm$0.1861&No\\
Volume Ratio&0.7682$\pm$0.0763&Yes\\
Aspect Ratio&0.6745$\pm$0.1926&No\\
Aspect Ratio&0.7580$\pm$0.0896&Yes\\
\bottomrule
\end{tabular}
\vskip -0.2in
\end{table}
\subsection{Limitations and Future work}
The approach taken in Range-GAN has some notable limitations. First, is the fact that the method is heavily reliant on a differentiable estimator, the quality of which will determine the performance of Range-GAN. Therefore, great care must be taken when selecting the estimator, and exact estimators are always preferred. Unfortunately, in most design applications exact estimators are not readily differentiable, and even if they were, the evaluation speed is often quite slow and thus impractical. This means that, more often than not, we are bound to use a DNN-based estimator. Therefore, the most significant limitation in this approach to conditioning in continuous spaces is the estimator. Consequently, approaches in improving estimator models for more accurate guidance of the GAN are very important in this application. In the future, we intend to develop improved methods for obtaining highly accurate data-driven estimators that can mimic high-fidelity physics simulations and other exact estimators to create more consistency in results between Range-GAN's estimator predicted performance and its real-world performance.
Besides, it is important to note that the methodology presented in this paper is extendable to other domains of design, where data is available and labeled. In the future, Range-GAN can be applied to any domain to allow for design synthesis under continuous constraints, which, given the current lack of such tools, is an important contribution to the field of data-driven design synthesis.
\section{Conclusion}
In this paper, we introduced an approach that allows for data-driven design synthesis under range constraints in continuous label spaces. Range-GAN is the first to address this problem. To achieve this, we introduced a novel architecture that uses a pre-trained estimator to guide Range-GAN towards achieving proper conditioning through a novel loss function, the `range loss'. We demonstrated the effectiveness of this approach in both single constraint design and multi-constraint design using a 3D shape synthesis example to generate airplane models. We showed that Range-GAN can successfully generate samples that meet the input conditions, even when the dataset is extremely sparse in certain parts of the label space, achieving more than 80\% satisfaction of input range condition.
Another aspect of conditioning under range constraint is the output distribution of the generated samples' labels. In this paper, we developed an approach that encourages uniform coverage of the label space in the acceptable condition range.
To achieve this, we introduced a novel loss function, the `uniformity loss', to encourage uniform coverage of the input constraint range. We demonstrated this loss function's effectiveness at encouraging uniform coverage of the label space by comparing Range-GAN results with and without this loss, finding that the loss function is highly effective and more than doubles the label entropy.
We also analyzed how Range-GAN can be improved by label-aware self-augmentation of the data. We showed this by augmenting the data using the Range-GAN's own generated samples to add more samples to sparse regions of the label space, enabling us to re-train the DNN-based estimator and Range-GAN using this augmented data to improve the performance of Range-GAN significantly. We show that the label-aware self-augmentation leads to an average improvement of 14\% on the constraint satisfaction for generated 3D shapes.
This work laid the foundation for data-driven inverse design problems where we consider range constraints and there are sparse regions in the condition space. Both situations are common in engineering design scenarios. While we validated our proposed model on a 3D shape synthesis example, the method is not restricted to this application. For example, by replacing the latent vector with parameters of unit cell shapes, this model can also help address the inverse design problem of cellular structures~\cite{wang2021ih}.
\bibliographystyle{asmems4}
|
\section{Introduction}
In recent years, there has been a growing interest in developing and analyzing probabilistic counterparts of traditional numerical methods spanning most areas of computational mathematics. This gave rise to the field of Probabilistic Numerics (PN), whose founding principles and aims are summarized in the review papers \cite{OaS19, HOG15, COS19}. All methods belonging to the field of PN share the idea of introducing a probability measure on the solution of traditional numerical methods. The underlying rationale is to quantify the uncertainty due to numerical errors in a probabilistic manner, rather than with standard error estimates. Indeed, a probability measure over approximate solutions can be readily pushed through a pipeline of computations, thus justifying the need of probabilistic methods especially when the solution of the problem at hand is employed as the input of a subsequent analysis. A typical example of computational pipelines for which probabilistic methods are successfully employed is given by Bayesian inverse problems, where introducing a probability measure on the forward model allows for a better quantification of the uncertainty in the inversion procedure.
\subsection{Literature Review}
Several contributions to the field of PN concern differential equations. For ordinary differential equations (ODEs), the methodologies can be roughly split in two different areas. In \cite{Ski92, KeH16, KSH20, TKS19, SSH19, CCC16, SDH14} the authors present a series of schemes which rely in different measure on Bayesian filtering techniques. These methodologies proceed by updating Gaussian measures over the numerical solution with filtering formulae and evaluations of the right-hand side of the ODE, which are interpreted as observations. While being not involved computationally, analyzing the convergence properties of this class of methods is not always possible, and one can only marginally rely on standard techniques for this purpose. A valuable effort in this sense can be found in \cite{KSH20}, where the authors show rates of convergence of the mean of the Gaussian measure towards the exact solution. A different approach is presented in the series of works \cite{CGS17, LSS19b, AbG20, TLS18, TZC16}, where the authors propose probabilistic schemes which are based on perturbing randomly the approximate solution and on letting evolve these perturbations through the dynamics of the ODE. In this manner, it is possible to obtain empirical probability measures over the otherwise deterministic numerical solution. A random perturbation can be applied directly to the state, as it was presented and analysed for one-step methods in \cite{CGS17, LSS19b}, with a particular focus on implicit schemes in \cite{TLS18} and for multistep methods in \cite{TZC16}. Another approach, which was presented in \cite{AbG20}, consists in perturbing the scheme itself by randomizing the time steps of a Runge--Kutta method. This allows to maintain certain geometric properties of the deterministic scheme in its probabilistic counterpart, such as the conservation of invariants or the symplecticity.
There has been a keen interest from the PN community on developing probabilistic numerical solvers for partial differential equations (PDEs), too \cite{COS17, COS17b, OCA19, CCC16, CGS17, Owh15, Owh17, OwZ17, RPK17, RPK17b,GFY21}. In \cite{COS17b}, the authors present a meshless Bayesian method for PDEs, which they then apply to inverse problems in \cite{COS17}, and in particular to a challenging time-dependent instance drawn from an engineering application in \cite{OCA19}. Their methodology consists of placing a Gaussian prior on the space of solutions, thus updating it with evaluations of the right-hand side, which are interpreted as noisy observations. A similar idea has been presented in \cite{CCC16}, where the main focus are time-dependent problems, and in \cite{RPK17, RPK17b}, where the method is recast in the framework of machine learning algorithms. In \cite{Owh17, OwZ17}, a probabilistic approach involving gamblets is applied to the solution of PDEs with rough coefficients and by multigrid schemes, with a particular interest to reducing the complexity of implicit algorithms for time-dependent problems \cite{OwZ17}. Moreover, in \cite{Owh15} the author presents a Bayesian reinterpretation of the theory of homogenization for PDEs, which can be seen as a contribution to the field of PN. To our knowledge, the only perturbation-based finite element (FE) probabilistic scheme for PDEs is presented in \cite{CGS17}, where the authors randomize FE bases by adding random fields endowed with appropriate boundary conditions, thus obtaining an empirical measure over the space of solutions. By tuning the covariance of these random fields, they obtain a consistent characterization of the numerical error, which can then be employed to solve Bayesian inverse problems and to quantify the uncertainty over their numerical solution.
\subsection{Our Contributions}
In this work we present a probabilistic finite element method (FEM) which is based on a randomization of the mesh, and which we call RM-FEM. The idea underlying our method stems from both \cite{CGS17}, where the authors propose a probabilistic FEM based on random perturbations, and from \cite{AbG20}, in which the first instance of randomizing the discretization instead of the solution itself is presented. In the context of ODEs, a careful randomization of the time step in Runge--Kutta methods allows to maintain certain convergence and geometric properties, either path-wise or in the mean-square sense. In a similar fashion, creating a probability measure on the space of solutions by randomizing the mesh has the advantage that each sample is a FEM solution itself, and therefore a projection of the exact solution on some random finite-dimensional space.
Keeping in mind the fundamental goal of PN, we consider the problem of employing probabilistic methods to quantify numerical errors in the context of PDEs. Indeed, in \cite{CGS17, AbG20, KSH20} and other works concerning ODEs, the authors show that the probabilistic solution converges to the true solution with the same rate as the deterministic method, which represents a consistency result. No work so far shows that PN methods can be readily employed for an a posteriori estimation of the error. Some forms of adaptivity for nonlinear ODEs based on probabilistic information can be found in \cite{ChC19, SSH19, BHT20}, where the arguments are based on heuristics but are not rigorously analyzed. In this work, we construct and present a posteriori error estimators which can be readily employed for mesh adaptation in elliptic PDEs. Our estimators are entirely based on probabilistic information, are simple to compute and do not entail considerable computational cost. We present an analysis in the one-dimensional case that shows that our error estimators based on the RM-FEM are equivalent to a classical estimator by Babu\v{s}ka and Rheinboldt \cite{BaR81}, which employs the jumps of the derivative of the solution at the nodes to quantify the numerical errors. Our one-dimensional theoretical analysis is complemented by a series of numerical experiments confirming the validity of our theory in higher dimensions.
As stated above, probabilistic numerical methods are especially appealing when employed in pipeline of computations such as Bayesian inverse problems. In particular, employing deterministic methods for approximating forward maps leads to overly confident posterior measures, which can be corrected by appropriate probabilistic approximations. Similarly to \cite{CGS17, AbG20}, we show in this paper how the RM-FEM can be employed to construct empirical distributions over the forward problem and compute a random posterior measure, solution to the inverse problem in the Bayesian sense. The solution is consistent asymptotically with respect to the mesh spacing, but its quality is enhanced if the latter is relatively large, i.e., if the forward model is approximated cheaply.
\subsection{Outline}
The outline of the paper is as follows. In \cref{sec:RMFEM} we state the problem of interest, introduce the RM-FEM and the main assumptions and notation required by our analysis. We then present the two main applications of the RM-FEM, i.e., a posteriori error estimators and Bayesian inverse problems, in \cref{sec:APosteriori,sec:BIP}, respectively. For both applications, a series of numerical experiments in the one and two-dimensional cases illustrate the usefulness and efficiency of the RM-FEM. In \cref{sec:ProbErrEst} we present a rigorous a priori and a posteriori error analysis. Finally, in \cref{sec:Conclusion} we draw our conclusions.
\section{Random Mesh Finite Element Method}\label{sec:RMFEM}
\subsection{Notation}
Let $d = 1, 2, 3$ and $D \subset \mathbb{R}^d$ be an open bounded domain with sufficiently smooth boundary $\partial D$. For $v \in \mathbb{R}^d$, we denote by $\norm{v}_2$ the Euclidean norm on $\mathbb{R}^d$. We denote by $L^2(D)$ the space of square integrable functions, by $(\cdot, \cdot)$ the natural $L^2(D)$ inner product, and by $H^p(D)$ the Sobolev space of functions with $p$ weak derivatives in $L^2(D)$. Moreover, we denote by $H^1_0(D)$ the space of functions in $H^1(D)$ vanishing on $\partial D$ in the sense of traces, by $H^{-1}(D)$ the dual of $H_0^1(D)$ and by $\langle \cdot, \cdot \rangle$ the natural pairing between $H^{-1}(D)$ and $H_0^1(D)$. We equip the space $H^1_0(D)$ with the norm $\norm{v}_{H_0^1(D)} = \norm{\nabla v}_{L^2(D)}$, i.e. the $H^1(D)$ seminorm.
For an event space $\Omega$, with a $\sigma$-algebra $\mathcal A$ and a probability measure $P$, we let the triple $(\Omega, \mathcal A, P)$ denote a probability space. For an event $A \in \mathcal A$, we say that $A$ occurs almost surely (a.s.) if $P(A) = 1$. For $n \in \mathbb N$ we call random variables the measurable functions $X \colon \Omega \to \mathbb{R}^n$, and denote by $L^2(\Omega)$ the space of square integrable random variables, with associated inner product. Denoting by $\mathcal B(\mathbb{R}^n)$ the Borel $\sigma$-algebra on $\mathbb{R}^n$, we say that a probability measure $\mu_X$ on the measurable space $(\mathbb{R}^n, \mathcal B(\mathbb{R}^n))$ satisfying $\mu_X(B) = P(X^{-1}(B))$ for all $B \in \mathcal B(\mathbb{R}^n)$ is the measure induced by $X$, or equivalently the distribution of $X$. For a set of random variables $\{X_i\}_{i=1}^n$ which are independent and identically distributed, we say they are i.i.d., and denoting by $\mu$ their common induced measure on $(\mathbb{R}^n, \mathcal B(\mathbb{R}^n))$, we write $\{X_i\}_{i=1}^n \ensuremath{\stackrel{\text{i.i.d.}}{\sim}} \mu$.
\subsection{Problem and Method Presentation}
Let $\kappa \in L^\infty(D, \mathbb{R}^{d\times d})$, $f \in H^{-1}(D)$ and $u$ be the weak solution of the partial differential equation (PDE)
\begin{equation}\label{eq:PDE}
\begin{alignedat}{2}
-\nabla \cdot (\kappa \nabla u) &= f, \quad &&\text{in } D, \\
u &= 0, &&\text{on } \partial D,
\end{alignedat}
\end{equation}
i.e., the function $u \in V \equiv H^1_0(D)$ satisfying
\begin{equation}\label{eq:PDEWeak}
a(u, v) = F(v), \qquad a(u, v) \coloneqq \int_D \kappa \nabla u \cdot \nabla v \, \mathrm{d} x, \quad F(v) \coloneqq \langle f, v \rangle,
\end{equation}
for all functions $v \in V$. We assume there exist positive constants $\underline{\kappa}$ and $\bar \kappa$ such that for all $\xi \in \mathbb{R}^d$
\begin{equation}
\underline \kappa \norm{\xi}_2^2 \leq \kappa \xi \cdot \xi \leq \bar \kappa \norm{\xi}_2^2,
\end{equation}
where $\norm{\cdot}_2$ is the Euclidean norm on $\mathbb{R}^d$, so that there exist constants $m, M > 0$ such that for all $u, v \in V$ it holds
\begin{equation}
\abs{a(u, v)} \leq M\norm{u}_V \norm{v}_V, \quad \abs{a(u, u)} \geq m \norm{u}_V^2.
\end{equation}
The Lax--Milgram theorem then guarantees that the problem \eqref{eq:PDEWeak} is well-posed.
Let $N$ be a positive integer and let $\mathcal T_h = \bigcup_{i=1}^N K_i$ be a partition of $D$, where for all $i = 1, \ldots, N$, the element $K_i \subset D$ is a segment, triangle or tetrahedron for $d = 1, 2, 3$ respectively. We denote by $h_i = \mathrm{diam}(K_i)$ the radius of the smallest ball containing $K_i$, and by $h = \max_i h_i$ the maximum radius, indexing the mesh $\mathcal T_h$. We denote by $\mathcal V_h$ the set of all vertices of the elements of $\mathcal T_h$, and in particular as $\mathcal V_h^I \subset \mathcal V_h$ the set of vertices which do not lie on the boundary of $D$, and by $\mathcal V_h^B = \mathcal V_h \setminus \mathcal V_h^I$. Moreover, we denote by $N_I$ the number of internal vertices, i.e., $N_I = \abs{\mathcal V_h^I}$. We assume the partition to be conforming, i.e., if two elements have non-empty intersection, than the latter consists of a point (for $d = 1$), of either a vertex or a side (for $d = 2$), and of either a vertex, a segment or a face (for $d = 3$). We then denote by $V_h \subset V$, $\dim(V_h) < \infty$ the space of continuous piecewise linear finite elements on $\mathcal T_h$, i.e.,
\begin{equation}\label{eq:FESpace}
V_h \coloneqq \{v \in V \colon v\eval{K} \in \mathbb P_1, \; \forall K \in \mathcal T_h\},
\end{equation}
where $\mathbb P_1$ is the space of linear functions. Let us remark that imposing $u_h = 0$ on $\partial D$ yields $\dim(V_h) = N_I$. The FEM proceeds by finding $u_h \in V_h$ such that
\begin{equation}\label{eq:FESolution}
a(u_h, v_h) = F(v_h),
\end{equation}
for all $v_h \in V_h$, which is equivalent to solving the linear system $A\mathbf u = \mathbf f$, where
\begin{equation}
\mathbf u_j = u_h(x_j), \quad x_j \in \mathcal V_h^I, \quad A_{ij} = a(\phi_j, \phi_i), \quad \mathbf f_j = F(\phi_j), \quad i,j = 1, \ldots, N_I,
\end{equation}
and where $\{\phi_j\}_{j=1}^{N-1}$ are the Legendre basis functions defined on the internal vertices of $\mathcal T_h$. The assumptions on $\kappa$ guarantee that $A$ is symmetric positive definite, and in turn that $\mathbf{u}$ is uniquely defined and the problem \eqref{eq:FESolution} is well-posed.
We now introduce the random-mesh finite element method (RM-FEM), which is based on a random perturbation of the mesh $\mathcal T_h$ obtained by moving the internal vertices. First, we here detail how we build perturbed meshes and which kind of random perturbations we consider to be admissible. Let $p \geq 1$, $\alpha \coloneqq \{\alpha_i \colon \Omega \to \mathbb{R}^{d}\}_{i=1}^{N_I}$ be a sequence of random variables and let us define the set of internal points $\widetilde{\mathcal V}_h^I = \{\widetilde x_i\}_{i=1}^{N_I}$ where
\begin{equation}\label{eq:PerturbedPoints}
\widetilde x_i \coloneqq x_i + h^p \alpha_i.
\end{equation}
We then define the set of perturbed vertices as $\widetilde{\mathcal V}_h = \widetilde{\mathcal V}_h^I \cup \mathcal V_h^B$, i.e., the vertices on the boundary are left unchanged. The perturbed mesh is then simply $\widetilde{\mathcal T}_h = \bigcup_{i=1}^N \widetilde K_i$, where each element $\widetilde K_i$ has the same vertices as its corresponding element $K_i$ in the original mesh, modulo the random perturbation \eqref{eq:PerturbedPoints}. In other words, we compute the internal points of the perturbed mesh following \eqref{eq:PerturbedPoints}, and keep the connectivity structure of the original mesh $\mathcal T_h$. Clearly, the mesh so defined is not conforming for any sequence of random variable $\alpha$, for which we therefore introduce an assumption.
\begin{assumption}\label{as:meshPerturbation} The sequence of random variables $\alpha$ is such that
\begin{enumerate}
\item\label{as:meshPerturbation_sym} its components $\alpha_i$ admit densities $F_{\alpha_i}$ with respect to the Lebesgue measure on $\mathbb{R}^d$, which satisfy $\mathrm{supp}(F_{\alpha_i}) \subset B_{r_i}$, where $B_{r_i} \subset \mathbb{R}^d$ is the ball centered in the origin and of radius $r_i > 0$, and which are radial, i.e., $F_{\alpha_i}(x) = F_{\alpha_i}(\norm{x}_2)$,
\item\label{as:meshPerturbation_conf} the perturbed mesh $\widetilde{\mathcal T}_h$ is conforming a.s.
\end{enumerate}
\end{assumption}
Let us remark that the assumption \ref{as:meshPerturbation_sym} actually implies for all $p \geq 1$ the assumption \ref{as:meshPerturbation_conf} a.s., provided the radii $r_i$ are chosen small enough. We assume in \ref{as:meshPerturbation_sym} the densities $F_{\alpha_i}$ to be radial functions so that the random perturbations do not have a privileged direction.
\begin{example}\label{ex:ExRandomPerturbation} In the one-dimensional case, let $0 = x_0 < x_1 < \ldots < x_N = 1$ so that we have $N_I = N-1$. Denoting $K_i = (x_i, x_{i-1})$ we call $\bar h_i$ the minimum element size for the two intervals sharing the point $x_i$ as a vertex, i.e., $\bar h_i \coloneqq \min\{h_i, h_{i+1}\}$. Then, a choice of random variables satisfying \cref{as:meshPerturbation} is given by
\begin{equation}
\alpha_i = \left(h^{-1}\bar h_i\right)^p \bar \alpha_i, \quad i = 1, \ldots, N-1, \quad \{\bar \alpha_i\}_{i=1}^{N-1} \ensuremath{\stackrel{\text{i.i.d.}}{\sim}} \mathcal U\left(\left(-\frac12, \frac12\right)\right),
\end{equation}
where for a set $D \in \mathbb{R}^d$ we denote by $\mathcal U(D)$ the uniform distribution over $D$. With this choice, indeed, we have that $\widetilde x_i < \widetilde x_{i-1}$ a.s., and therefore the perturbed mesh is conforming. In the two-dimensional case, we introduce for $i = 1, \ldots, N_I$ the notation
\begin{equation}
\Delta_i = \{K \in \mathcal T_h\colon K \text{ has } x_i \text{ as a vertex} \}.
\end{equation}
Analogously to the one-dimensional case, we write $\bar h_i \coloneqq \min_{j:K_j \in \Delta_i} h_j$. In this case, it is possible to verify that choosing for all $i = 1, \ldots, N_I$
\begin{equation}
\alpha_i = (h^{-1}\bar h_i)^p \bar \alpha_i, \quad i = 1, \ldots, N_I, \quad \{\bar \alpha_i\}_{i=1}^{N_I} \ensuremath{\stackrel{\text{i.i.d.}}{\sim}} \mathcal U\left(B_{1/2}\right),
\end{equation}
then $\alpha$ satisfies \cref{as:meshPerturbation}. We verify this graphically in \cref{fig:Mesh}, where we show a realization of the perturbed mesh based on a generic Delaunay mesh and on a structured mesh on $D = (0,1)^2$ along with the sets where the perturbed points are constrained to belong a.s. We notice that for $p > 1$ the magnitude of the perturbations clearly tends to vanish. Finally, we remark that similar admissible perturbations can be introduced in higher dimensions.
\end{example}
\begin{figure}
\centering
\begin{tabular}{ccc}
\includegraphics[]{Figures/MeshPlot_Det} & \includegraphics[]{Figures/MeshPlot_p10} & \includegraphics[]{Figures/MeshPlot_p15} \\
\includegraphics[]{Figures/MeshPlot_Struct_Det} & \includegraphics[]{Figures/MeshPlot_Struct_p10} & \includegraphics[]{Figures/MeshPlot_Struct_p15}
\end{tabular}
\caption{A realization of $\widetilde{\mathcal T}_h$ for $p = \{1, 1.5\}$ based on two meshes $\mathcal T_h$ of $D = (0,1)^2$. On the first line, a Delaunay mesh. On the second line, a structured mesh. The regions where the perturbed points are included a.s. are depicted by light grey circles.}
\label{fig:Mesh}
\end{figure}
Having defined the perturbed mesh, we now proceed with describing the RM-FEM. Let $\widetilde V_h$ be the space of continuous piecewise linear finite elements on $\widetilde {\mathcal T}_h$. Let moreover $\{\widetilde \phi_i\}_{i=1}^{N_I}$ be the Legendre basis functions defined on the internal vertices of $\widetilde {\mathcal T}_h$ and $\widetilde {\mathcal I} \colon \mathcal C^0(D) \cap V \to \widetilde V_h$ be the Lagrange interpolation operator onto $\widetilde V_h$, i.e., for a function $v \in \mathcal C^0(D) \cap V$ and for $x \in D$ we define
\begin{equation}
\widetilde{\mathcal I}v(x) \coloneqq \sum_{i=1}^{N_I} v(x_i) \widetilde \phi_i(x).
\end{equation}
We are then interested in the two functions belonging to the finite element space $\widetilde V_h$ whose definition we give below.
\begin{definition}\label{def:ProbInterp} Let $u_h \in V_h$ be defined in \eqref{eq:FESolution}. We define the RM-FEM interpolant as the random function $\widetilde{\mathcal I} u_h \in \widetilde V_h$, where $\widetilde{\mathcal I}$ is the Lagrange interpolant onto $\widetilde V_h$.
\end{definition}
\begin{definition}\label{def:ProbSol} Given the random finite element space $\widetilde V_h$, we define the RM-FEM solution as the unique random function $\widetilde u_h \in \widetilde V_h$ such that
\begin{equation}
a(\widetilde u_h, \widetilde v_h) = F(\widetilde v_h),
\end{equation}
for all $\widetilde v_h \in \widetilde V_h$.
\end{definition}
\begin{remark} Clearly, either for any fixed $p \geq 1$ and $h \to 0$ or for any fixed $h < 1$ and $p \to \infty$, the functions $u_h$, $\widetilde{\mathcal I} u_h$ and $\widetilde u_h$ tend to coincide. We visualize this for $u_h$ and $\widetilde u_h$ in \cref{fig:RMFEM}, where we simply fix $\kappa = 1$ and the right-hand side $f$ such that $u = \sin(2\pi x)$ in \eqref{eq:PDE}, and consider the effects of increasing $p$ and decreasing $h$. For this simple problem, we notice that for $p = 2$ and $N = 20$ the FEM solution $u_h$ and the RM-FEM solution $\widetilde u_h$ are almost indistinguishable.
\end{remark}
\begin{remark} All the quantities distinguished by a tilde (e.g., $\widetilde{\mathcal T}_h$, $\widetilde V_h$, $\widetilde{\mathcal I}$) are random variables with values in appropriate spaces. For example $\widetilde u_h$ is a random function $\widetilde u_h \colon \Omega \times D \to \mathbb{R}$, such that $\Omega \times D \ni (\omega, x) \mapsto \widetilde u_h(\omega, x)$. For economy of notation, in the following we drop the argument $\omega$ from all random variables.
\end{remark}
\begin{remark}\label{rem:pCoeff} The coefficient $p$ in \eqref{eq:PerturbedPoints} has the same role as the coefficient identified by the same symbol in both \cite{AbG20, CGS17}, i.e., it controls the variability of the probabilistic solutions by tuning the variability of the noise which is applied to the method.
\end{remark}
\begin{remark}\label{rem:BoundaryPoints} Let us remark that the RM-FEM interpolant $\widetilde{\mathcal I} u_h$ is well-defined even allowing the vertices of $\mathcal T_h$ which lay on the boundary $\partial D$ to be perturbed, as far as the perturbation moves them inside the domain $D$. The random RM-FEM interpolant $\widetilde {\mathcal I} u_h$ does not in this case belong to the space $V$ in this case since it is not defined on the whole domain $D$ and does not satisfy boundary conditions. For practical applications, one can nevertheless employ the RM-FEM interpolant defined on a smaller domain, which results from a perturbation of all vertices of $\mathcal T_h$, including those on the boundaries.
\end{remark}
\begin{figure}[t]
\centering
\begin{tabular}{ccc}
\includegraphics[]{Figures/RMFEM_p1_N5} & \includegraphics[]{Figures/RMFEM_p1_N10} & \includegraphics[]{Figures/RMFEM_p1_N20} \vspace{0.1cm}\\
\includegraphics[]{Figures/RMFEM_p2_N5} & \includegraphics[]{Figures/RMFEM_p2_N10} & \includegraphics[]{Figures/RMFEM_p2_N20}
\end{tabular}
\caption{Comparison between the RM-FEM and the FEM solutions. We display the solution $u_h$ and $50$ realizations of $\widetilde u_h$, by row respectively for $p = \{1, 2\}$ and by column for $N = \{5, 10, 20\}$. }
\label{fig:RMFEM}
\end{figure}
Before proceeding with the two main applications of the RM-FEM, i.e., a posteriori error estimators and Bayesian inverse problems, we state an a priori error estimate, which suggests how to balance the sources of error due to numerical discretization and to the randomization of the method, respectively.
\begin{theorem}\label{thm:APriori} Let the solution $u$ of \eqref{eq:PDE} be $u\in H^2(D)$. Then, it holds
\begin{equation}
\norm{\widetilde u_h - u}_V \leq Ch, \quad \text{a.s.},
\end{equation}
for a constant $C > 0$ independent of $h$. Moreover, if $p = 1$ in \eqref{eq:PerturbedPoints} the numerical and discretization errors are balanced with respect to $h$, i.e., it holds
\begin{equation}
\norm{u_h - \widetilde u_h}_V = \mathcal O(h) = \mathcal O(\norm{u - u_h}_V), \quad \text{a.s.}
\end{equation}
\end{theorem}
This results indicates that one should fix $p = 1$ in \eqref{eq:PerturbedPoints} in order to obtain a family of probabilistic solutions whose statistical properties should reflect the true error. This is crucial when the RM-FEM is employed in a pipeline of computations such as Bayesian inverse problems, which will be presented in detail in \cref{sec:BIP}. The proof of \cref{thm:APriori} is elementary and discussed in \cref{sec:APriori}.
\section{A Posteriori Error Estimators based on the RM-FEM}\label{sec:APosteriori}
The first and foremost application of the RM-FEM is deriving a posteriori error estimators which are entirely based on the statistical information carried on by the mesh perturbation. We say that a quantity $\mathcal E_h$ is an a posteriori error estimator if it gives an error estimate on the numerical approximation and is computable only by knowledge of the numerical solution. Moreover, if there exist constants $C_{\mathrm{up}}$ and $C_{\mathrm{low}}$ independent of $h$ and of $u$ such that
\begin{equation}\label{eq:APosterioriBound}
C_{\mathrm{low}}\mathcal E_h \leq \norm{u-u_h}_V \leq C_{\mathrm{up}} \mathcal E_h,
\end{equation}
we say that the a posteriori error estimator is reliable and efficient, respectively. Indeed, the upper bound above guarantees that when the estimator is small, so is the numerical error. The lower bound, instead, gives an insurance on the quality of the estimator, as it shows that the estimation of the error is not exceedingly pessimistic. There exist in the literature a huge number of a posteriori error estimators, and we refer the reader to the surveys given e.g. in \cite{Ver13, AiO00}. Most a posteriori error estimators are expressed in the form
\begin{equation}\label{eq:GenericAPosteriori}
\mathcal E_h = \left(\sum_{K \in \mathcal T_h} \eta_K^2\right)^{1/2},
\end{equation}
where the $\eta_K$ are local quantities depending on the solution and the data on the element $K$ and its neighbors. For example, in the two-dimensional case a valid a posteriori error estimator is given by the expression of its local components
\begin{equation}\label{eq:APosteriori2D}
\eta_K^2 = h_K^2 \norm{f}^2_{L^2(K)} + h_K \norm{\dbrack{\nabla u_h \cdot \nu_K}}_{L^2(\partial K)}^2,
\end{equation}
where $\dbrack{\cdot}$ is the jump operator and $\nu_K$ denotes the unitary vector normal to the boundary of $K$ (see e.g. \cite[Section 3]{Ver94} or \cite[Chapter 2]{AiO00}). Other a posteriori error estimators are based on recovered gradients, which are employed as surrogates of the gradient of the exact solution to estimate the error. A notable member of these methodologies is the Zienkiewicz--Zhu (ZZ) patch recovery technique \cite{ZiZ92b, ZiZ92}, which is proved to be superconvergent on special meshes, and which is in practice widely employed on any mesh.
It has been heuristically noted for ODEs in \cite{BHT20, ChC19, SSH19} that information on the variability of a probabilistic solution can be employed to estimate the error and thus adapt the numerical discretization. Indeed, building probabilistic solution to otherwise deterministic problems should pursue the goal of quantifying numerical errors through uncertainty. Guided by this observation, we now introduce two probabilistic error estimators for elliptic PDEs.
\begin{definition}\label{def:ProbErrEst} Let $\widetilde{\mathcal I} u_h$ be the RM-FEM interpolant defined in \cref{def:ProbInterp} and for each $K \in \mathcal T_h$, let us denote by $\widetilde K \in \widetilde{\mathcal T}_h$ its corresponding element in $\widetilde {\mathcal T}_h$. We define the first RM-FEM a posteriori error estimator as
\begin{equation}
\widetilde{\mathcal E}_{h,1} \coloneqq \left(\sum_{K \in \mathcal T_h} \widetilde{\eta}_{K,1}^2\right)^{1/2}, \quad \text{ with } \quad \widetilde{\eta}_{K,1}^2 = h_K^{-(p-1)} \Eb{\norm{\nabla (u_h - \widetilde{\mathcal I} u_h)}_{L^2(\widetilde K)}^2}.
\end{equation}
Moreover, we define the second RM-FEM a posteriori error estimator as
\begin{equation}
\widetilde{\mathcal E}_{h,2} \coloneqq \left(\sum_{K \in \mathcal T_h} \widetilde{\eta}_{K,2}^2\right)^{1/2}, \quad \text{ with } \quad \widetilde{\eta}_{K,2}^2 = h_K^{-(2p-2)} \abs{K} \Eb{\norm{\nabla u_h\eval{K} - \nabla \widetilde{\mathcal I} u_h\eval{\widetilde K}}^2}.
\end{equation}
\end{definition}
\begin{remark} The scaling factors $h_K^{-(p-1)}$ and $h_K^{-(2p-2)}$ in the definition of $\widetilde{\mathcal \eta}_{K,1}$ and $\widetilde{\mathcal \eta}_{K,2}$ are necessary to obtain well-calibrated error estimators. This is made clearer in the one-dimensional case by the analysis presented in \cref{sec:ErrAnalysis}. For higher dimensions, they can be partially explained with the ansatz \eqref{eq:APrioriGenP}, especially for the first estimator $\widetilde{\mathcal E}_{h,1}$, and they appear in practice to be the correct scaling.
\end{remark}
\begin{remark}\label{rem:SuperMesh} Computing the estimator $\widetilde {\mathcal E}_{h,1}$ is more involved than the estimator $\widetilde {\mathcal E}_{h,2}$. Indeed, for the latter it is sufficient to compute the interpolant $\widetilde{\mathcal I} u_h$ and the gradients over each element of $u_h$ and of the interpolant. For $\widetilde {\mathcal E}_{h,1}$, instead, one has to compute on each element $\widetilde K$ the quantity
\begin{equation}
\norm{\nabla(u_h - \widetilde{\mathcal I} u_h)}_{L^2(\widetilde K)}.
\end{equation}
By construction, each element $\widetilde K$ overlaps with the elements corresponding to its neighbors in the original mesh in a non-trivial manner, and if $d > 1$ one has to rely to the construction of a ``super-mesh'' (see e.g. \cite{CGR18,CrF20}) such that on each of its elements the quantity $\nabla(u_h - \widetilde{\mathcal I} u_h)$ is constant. A super-mesh has to be built for each realization of the perturbed mesh $\widetilde{\mathcal T}_h$, which could therefore be expensive.
\end{remark}
In this article, we show in the one-dimensional case that the estimators given in \cref{def:ProbErrEst} are reliable and efficient in the sense of \eqref{eq:APosterioriBound}. In the statement of our theoretical result, which is given below, we make use of a quantity $\Lambda \in \mathbb{R}$ which is of higher order in most practical scenarios and which is defined as
\begin{equation}\label{eq:BabuskaLambdaIntro}
\Lambda^2 \coloneqq h^\zeta \sum_{j=1}^N \int_{K_j} (f(x) + C_j)^2 \, \mathrm{d} x,
\end{equation}
where for each $K_j$ the real constant $C_j$ will be specified in the analysis of \cref{sec:ErrAnalysis} (see e.g. \cite[Equation (8.7)]{BaR81}). Moreover, we consider one-dimensional meshes which are $\lambda$-quasi-uniform, i.e., we assume there exists a constant $\lambda \in (1, \infty)$ such that it holds
\begin{equation}
\frac1\lambda \leq \frac{h_j}{h_{j-1}} \leq \lambda, \quad j = 2, \ldots, N,
\end{equation}
uniformly in $h$. Finally, we consider perturbations satisfying
\begin{equation}
\alpha_i = \left(h^{-1}\bar h_i\right)^p \bar \alpha_i, \quad i = 1, \ldots, N-1,
\end{equation}
where $\bar h_i = \min\{h_i,h_{i+1}\}$ and for a i.i.d. sequence of random variables $\{\bar\alpha_i\}_{i=1}^{N-1}$ such that $\abs{\bar\alpha_1} \leq 1/2$ a.s. These perturbations are indeed the same as the ones presented in \cref{ex:ExRandomPerturbation}, but without the assumption of $\{\bar\alpha_i\}_{i=1}^N$ to be uniformly distributed, which is not necessary in the following. In practice, a uniform distribution is nevertheless advisable, as it is still general enough and satisfies the radial assumption of \cref{as:meshPerturbation}\ref{as:meshPerturbation_sym}. We moreover introduce the following technical assumption on the perturbation.
\begin{assumption}\label{as:AssumptionAPosteriori} Let the family of meshes $\mathcal T_h$ be $\lambda$-quasi-uniform, let $p$ be the coefficient introduced in \eqref{eq:PerturbedPoints} and assume that for all $h$ and $p$ there exists $C > 0$ such that
\begin{equation}
4h^{p-1}\frac{\operatorname{\mathbb{E}}\abs{\bar \alpha_1}^2}{\operatorname{\mathbb{E}}\abs{\bar \alpha_1}} + C < 1+\lambda^{-(p-1)}.
\end{equation}
\end{assumption}
\begin{remark}\label{rem:AssumptionAPosteriori} We note that \cref{as:AssumptionAPosteriori} holds for $p > 1$ and $h$ sufficiently small, and is therefore not restrictive in practice.
\end{remark}
We can now state the main result involving a posteriori error estimators.
\begin{theorem}\label{thm:MainThmAPosteriori} Let the dimension $d = 1$, let $p > 1$ in \eqref{eq:PerturbedPoints} and let \cref{as:meshPerturbation} hold. Moreover, let $\widetilde{\mathcal E}_{h,1}$, $\widetilde{\mathcal E}_{h,2}$ and $\Lambda$ be given in \cref{def:ProbErrEst} and \eqref{eq:BabuskaLambdaIntro} respectively and let the family of meshes $\mathcal T_h$ be $\lambda$-quasi-uniform. Then, there exists $C > 0$ independent of $h$ and of the solution $u$ such that it holds for $k \in \{1,2\}$
\begin{equation}
\norm{u-u_h}_V \leq \widetilde C (\widetilde{\mathcal E}_{h,k}^2 + \Lambda^2)^{1/2},
\end{equation}
up to higher order terms in $h$ and under \cref{as:AssumptionAPosteriori} for $k=1$. If additionally $\kappa \in \mathcal C^2(D)$ and $f \in \mathcal C^1(D)$, then there exist constants $\widetilde C_{\mathrm{low}}$ and $\widetilde C_{\mathrm{up}}$ independent of $h$ and of the solution $u$ such that for $k \in \{1,2\}$ it holds
\begin{equation}
\widetilde C_{\mathrm{low}} \widetilde{\mathcal E}_{h,k} \leq \norm{u-u_h}_V \leq \widetilde C_{\mathrm{up}} \widetilde{\mathcal E}_{h,k},
\end{equation}
up to higher order terms in $h$ and under \cref{as:AssumptionAPosteriori} for $k=1$.
\end{theorem}
Let us notice that the estimators given in \cref{def:ProbErrEst} involve the computation of an expectation with respect to the random perturbations of the mesh, and therefore a Monte Carlo simulation is needed in practice. Let $N_{\mathrm{MC}}$ be a positive integer, $k \in \{1,2\}$ and $\{\widetilde E_{h,k}^{(i)}\}_{i=1}^{M}$ be i.i.d. realizations of the estimator $\widetilde{\mathcal E}_{h,k}$, obtained with independent perturbations of the mesh. Then, in practice we compute
\begin{equation}\label{eq:ErrEstMC}
\widetilde E_{h,k} \coloneqq \frac1{N_{\mathrm{MC}}} \sum_{i=1}^{N_{\mathrm{MC}}} \widetilde E_{h,k}^{(i)}.
\end{equation}
\begin{remark}\label{rem:CompCost} It could be suggested that the application of Monte Carlo techniques increases dramatically the simulation time. We argue that in practice the computational overhead is not relevant, mainly for three reasons. First, it has been proved in \cite{AbG20} that the variance of Monte Carlo estimators drawn from probabilistic numerical methods decreases with respect to the discretization size $h$. Hence, the number of simulations $M$ does not need to be large, nor increasing if $h \to 0$, to guarantee a good quality of the estimator. The same arguments hold for the RM-FEM, too. Second, the Monte Carlo estimation is completely parallelizable, thus reducing the cost by a factor equal to the number of available computing units. Finally, the computation of the RM-FEM interpolant $\widetilde{\mathcal I}u_h$ is not computationally involved, neither when it is repeated $N_{\mathrm{MC}}$ times.
\end{remark}
\subsection{Numerical Experiments}\label{sec:NumExp_ErrEst}
We now present numerical experiments on one and two-dimensional test cases to demonstrate the validity of our a posteriori error estimators. In particular, we are interested in determining whether the probabilistic error estimators introduced in \cref{def:ProbErrEst} are indeed reliable estimators for the numerical error in the FEM, and in employing these estimators for local refinements of the mesh. Setting a tolerance $\gamma > 0$, our goal is building a mesh $\mathcal T_h$ such that
\begin{equation}\label{eq:APosterioriGoal}
\frac{\norm{u-u_h}_V}{\norm{u_h}_V} \leq \gamma.
\end{equation}
Replacing the numerator with $\widetilde{\mathcal E}_{h,k}$, $k \in \{1,2\}$, we notice that the condition \eqref{eq:APosterioriGoal} is satisfied if it holds for all $K \in \mathcal T_h$
\begin{equation}\label{eq:APosterioriLocalCondition}
\widetilde \eta_{K,k} \leq \frac{\gamma \norm{u_h}_V}{\widetilde C_{\mathrm{up}}\sqrt{N}} \eqqcolon \gamma_{\mathrm{loc}}.
\end{equation}
Indeed, in this case
\begin{equation}
\norm{u-u_h}_V^2 \leq \widetilde C_{\mathrm{up}}^2 \widetilde {\mathcal E}_{h,k}^2 = \widetilde C_{\mathrm{up}}^2 \sum_{K\in \mathcal T_h} \widetilde \eta_{K,k}^2 \leq \gamma^2 \norm{u_h}_V^2,
\end{equation}
and thus \eqref{eq:APosterioriGoal} holds. Let us remark that $\widetilde C_{\mathrm{up}}^2$ is not known a priori in practice, and therefore we just decide to employ the condition \eqref{eq:APosterioriLocalCondition} fixing $\widetilde C_{\mathrm{up}} = 1$ in our experiments. We therefore adapt the mesh by computing the local contributions and comparing them with $\gamma_{\mathrm{loc}}$, thus locally refining the mesh if the condition \eqref{eq:APosterioriLocalCondition} is not met, and coarsening if the local estimators are excessively small with respect to $\gamma_{\mathrm{loc}}$.
In the following we employ for both the one and the two-dimensional cases the uniform distributions given in \cref{ex:ExRandomPerturbation} for the random perturbations of the points. In light of \cref{lem:EquivProb1Jump} and \cref{lem:EquivProb2Jump}, we decide to correct the estimators by normalizing them with respect to the random perturbations. In particular, in the following, the estimators are normalized as $\widetilde{\mathcal E}_{h,1} \leftarrow \widetilde{\mathcal E}_{h,1} / \operatorname{\mathbb{E}}\norm{\bar \alpha_1}$ and $\widetilde{\mathcal E}_{h,2} \leftarrow \widetilde{\mathcal E}_{h,2} / \operatorname{\mathbb{E}}\norm{\bar \alpha_1}^2$.
\subsubsection{One-Dimensional Case}\label{sec:NumExp_1D}
\begin{figure}[t!]
\centering
\begin{tabular}{cc}
\includegraphics[]{Figures/Adapt1D_Sol_Init} & \includegraphics[]{Figures/Adapt1D_Err_Init} \vspace{0.1cm} \\
\includegraphics[]{Figures/Adapt1D_Sol_End} & \includegraphics[]{Figures/Adapt1D_Err_End} \vspace{0.1cm} \\
\includegraphics[]{Figures/Adapt1D_Conv} & \includegraphics[]{Figures/Adapt1D_Eff}
\end{tabular}
\caption{Results for the one-dimensional experiment of \cref{sec:NumExp_ErrEst}. First and second rows: numerical and exact solutions $u_h$ and $u$ on the left, local contributions to the error estimators of \cref{def:ProbErrEst} compared with the true error $\norm{u-u_h}_K$ on the right, at initialization and termination of the adaptivity procedure. Third row: on the left convergence of the global error $\norm{u-u_h}_V$ and of the estimator $\mathcal E_h$ until the tolerance $\gamma$, on the right the effectivity index.}
\label{fig:ErrEst}
\end{figure}
We first consider $d = 1$ and the two-point boundary value problem \eqref{eq:PDE_1d} with $\kappa$ and the exact solution $u$ given by
\begin{equation}
\kappa(x) = 1 + x^3, \quad u(x) = x^3 \sin(a\pi x) \exp(-b(x-0.5)^2) ,
\end{equation}
where we fix $a = 15$ and $b = 50$, and where we choose the right-hand side $f$ so that $u$ is indeed the solution. As a goal, we set the tolerance $\gamma = 10^{-2}$ in \eqref{eq:APosterioriGoal} and stop the algorithm when condition \eqref{eq:APosterioriLocalCondition} is met by all elements of the mesh. We consider the RM-FEM implemented with uniform random variables as in \cref{ex:ExRandomPerturbation} and fix $p = 3$ in \eqref{eq:PerturbedPoints}. Moreover, we consider $N_{\mathrm{MC}} = 20$ realizations of the probabilistic mesh to approximate the error estimator as in \eqref{eq:ErrEstMC}. We then compute both the error estimators given in \cref{def:ProbErrEst} and employ $\widetilde{\mathcal E}_{h,1}$ for adapting the mesh by refinement and coarsening, guided by the condition \eqref{eq:APosterioriLocalCondition}. The adaptivity algorithm is initialized with a mesh $\mathcal T_h$ built on $N = 30$ elements of equal size and proceeds by refinement and coarsening. Results, given in \cref{fig:ErrEst}, confirm the validity of our probabilistic error estimators. In particular, we remark that the local error estimators succeed in identifying the regions where the mesh has to be refined, thus getting a solution with an approximately equal distribution of the error over the domain. Both probabilistic estimators, moreover, succeed in bounding the global error until the tolerance is reached, with the estimator $\widetilde{\mathcal E}_{h,2}$ which appears to be more efficient than $\widetilde{\mathcal E}_{h,1}$.
\subsubsection{Two-Dimensional Case}\label{sec:NumExp_2D}
We now present two numerical experiments conducted in the two-dimensional case. In particular, for both experiments we only focus on the computation of $\widetilde{\mathcal E}_{h,2}$ in \cref{def:ProbErrEst}, since in view of \cref{rem:SuperMesh} this second estimator is computationally easier to implement than $\widetilde {\mathcal E}_{h,1}$ for $d > 1$. To account for errors on the boundary elements, we decide for these experiments to perturb all points, including those on the boundaries, following \cref{rem:BoundaryPoints}. In order for $\widetilde{\mathcal I}u_h$, and thus $\widetilde{\mathcal E}_{h, 2}$ to be well-defined, we reflect the perturbed boundary points symmetrically to the boundary $\partial D$ in case they are outside the domain. For both experiments, we implement the RM-FEM with a uniform distribution for the random perturbations, as described in \cref{ex:ExRandomPerturbation}. Moreover, we fix $p = 3$ and compute the Monte Carlo approximation \eqref{eq:ErrEstMC} on $N_{\mathrm{MC}} = 500$ realizations of the random mesh. For the adaptivity algorithm, we start from a coarse mesh and apply regular local refinements if the condition \eqref{eq:APosterioriLocalCondition} is not met by the local error estimator $\widetilde \eta_{K,2}$. In the two-dimensional case we do not apply coarsening to the mesh.
\begin{figure}[t]
\centering
\begin{tabular}{cc}
\includegraphics[]{Figures/Adapt2D_ZZ_ExSol} & \includegraphics[]{Figures/Adapt2D_ZZ_ExSol_Surf}
\end{tabular}
\caption{Exact solution $u_1$ for the experiment of \cref{sec:NumExp_2D}. Both the contour and the three-dimensional view highlight the steep gradient that features $u_1$.}
\label{fig:ExSol2D_ZZ}
\end{figure}
\begin{figure}[t]
\centering
\begin{tabular}{cc}
\includegraphics[]{Figures/Adapt2D_ZZ_ErrConvergence} & \includegraphics{Figures/Adapt2D_ZZ_EffIdx}
\end{tabular}
\caption{Error convergence and effectivity index for the first experiment (function $u_1$) of \cref{sec:NumExp_2D}}
\label{fig:Conv2D_ZZ}
\end{figure}
\begin{figure}[t]
\centering
\begin{tabular}{cccc}
Iter. 2 & Iter. 3 & Iter. 4 & Iter. 5 \vspace{0.2cm} \\
\includegraphics{Figures/Adapt2D_ZZ_ErrTrue_it2} & \includegraphics{Figures/Adapt2D_ZZ_ErrTrue_it3} & \includegraphics{Figures/Adapt2D_ZZ_ErrTrue_it4} & \includegraphics{Figures/Adapt2D_ZZ_ErrTrue_it5} \vspace{0.2cm}\\
\includegraphics{Figures/Adapt2D_ZZ_ErrEst2_it2} & \includegraphics{Figures/Adapt2D_ZZ_ErrEst2_it3} & \includegraphics{Figures/Adapt2D_ZZ_ErrEst2_it4} & \includegraphics{Figures/Adapt2D_ZZ_ErrEst2_it5}\vspace{0.2cm} \\
\includegraphics{Figures/Adapt2D_ZZ_Mesh_it2} & \includegraphics{Figures/Adapt2D_ZZ_Mesh_it3} & \includegraphics{Figures/Adapt2D_ZZ_Mesh_it4} & \includegraphics{Figures/Adapt2D_ZZ_Mesh_it5}
\end{tabular}
\caption{Per row: True local error, local error estimator $\widetilde \eta_{K,2}$ and mesh $\mathcal T_h$ at each iteration of the adaptivity algorithm for the function $u_1$ of \cref{sec:NumExp_2D}. The color bar is shared by the first and the second rows.}
\label{fig:Adapt2D_ZZ}
\end{figure}
We first consider $D = (0,1)^2$, the conductivity $\kappa = 1$, so that \eqref{eq:PDE} reduces to $-\Delta u = f$ with homogeneous Dirichlet boundary conditions. Moreover, we choose the right-hand side $f$ such that
\begin{equation}
u_1(x,y) = -x (1 - x)y(1-y) \arctan\left( \beta\left(\frac{x + y}{\sqrt{2}} - \frac{4}{5}\right)\right),
\end{equation}
where $\beta > 0$. The solution has a steep transition around the line $\{y = 4\sqrt{2}/5 - x\}$, whose steepness is proportional to the parameter $\beta$. In \cref{fig:ExSol2D_ZZ}, we show the exact solution for $\beta = 20$, which we fix for this experiment. We initialize the adaptivity procedure with a mesh with maximum element size $h = 1/5$ and proceed with adaptation until a tolerance $\gamma = 0.1$. In \cref{fig:Conv2D_ZZ} we show the convergence of $\widetilde {\mathcal E}_{h,2}$ with respect to the convergence of the true error, as well as the the effictivity index for this experiment. We can see that the estimator indeed captures the error globally. In \cref{fig:Adapt2D_ZZ}, we show the behavior of the local contributions $\widetilde \eta_{K,2}$ with respect to the true error on each element, as well as the mesh adaptation. We can see that the error estimator succeeds in identifying the region where gradients are the steepest and proposes a mesh which appears adapted to this problem.
We then consider the L-shaped domain with the re-entrant corner on the origin, i.e. $D = (-1, 1)^2 \setminus (-1, 0)^2$. We set $\kappa = 1$, $f = 0$ and fix a inhomogeneous Dirichlet boundary conditions $u = g$ on $\partial D$, with $g$ chosen such that the exact solution satisfies
\begin{equation}
u_2(r, \theta) = r^{2/3}\sin\left(\frac{2}{3}\left(\theta + \frac{\pi}{2}\right)\right),
\end{equation}
where $(r,\theta) \in \mathbb{R}^+ \times (0, 2\pi]$ are the polar coordinates in $\mathbb{R}^2$. The exact solution of this problem is given in \cref{fig:ExSol2D_L}. Let us remark that the gradient of the exact solution is singular at the re-entrant corner, and we expect the mesh to be refined consequently at the singularity. For this experiment, we fix the tolerance $\gamma = 0.03$, and initialize the mesh to have a maximum element size of $h = 1/3$. Results, given in \cref{fig:Conv2D_L} and \cref{fig:Adapt2D_L}, show on the one hand that the estimator reproduces well the behavior of the global error during adaptation, and on the other hand that the mesh is progressively refined at the singularity as expected.
\begin{figure}[t]
\centering
\includegraphics[]{Figures/Adapt2D_L_ExSol}
\caption{Exact solution $u_2$ for the experiment of \cref{sec:NumExp_2D}}
\label{fig:ExSol2D_L}
\end{figure}
\begin{figure}[t]
\centering
\begin{tabular}{cc}
\includegraphics[]{Figures/Adapt2D_L_ErrConvergence} & \includegraphics{Figures/Adapt2D_L_EffIdx}
\end{tabular}
\caption{Error convergence and effectivity index for the second experiment (function $u_2$) of \cref{sec:NumExp_2D}}
\label{fig:Conv2D_L}
\end{figure}
\begin{figure}[t]
\centering
\begin{tabular}{cccc}
Iter. 2 & Iter. 3 & Iter. 4 & Iter. 5 \vspace{0.2cm} \\
\includegraphics{Figures/Adapt2D_L_ErrTrue_it2} & \includegraphics{Figures/Adapt2D_L_ErrTrue_it3} & \includegraphics{Figures/Adapt2D_L_ErrTrue_it4} & \includegraphics{Figures/Adapt2D_L_ErrTrue_it5} \vspace{0.2cm}\\
\includegraphics{Figures/Adapt2D_L_ErrEst2_it2} & \includegraphics{Figures/Adapt2D_L_ErrEst2_it3} & \includegraphics{Figures/Adapt2D_L_ErrEst2_it4} & \includegraphics{Figures/Adapt2D_L_ErrEst2_it5}\vspace{0.2cm} \\
\includegraphics{Figures/Adapt2D_L_Mesh_it2} & \includegraphics{Figures/Adapt2D_L_Mesh_it3} & \includegraphics{Figures/Adapt2D_L_Mesh_it4} & \includegraphics{Figures/Adapt2D_L_Mesh_it5}
\end{tabular}
\caption{Per row: True local error, local error estimator $\widetilde \eta_{K,2}$ and mesh $\mathcal T_h$ at each iteration of the adaptivity algorithm for the function $u_2$ of \cref{sec:NumExp_2D}. The color bar is shared by the first and the second rows.}
\label{fig:Adapt2D_L}
\end{figure}
\section{The RM-FEM for Bayesian Inverse Problems}\label{sec:BIP}
Probabilistic numerical methods have been demonstrated to be particularly effective in the context of Bayesian inverse problems \cite{CGS17, AbG20, CCC16, LST18, COS17, OCA19, COS17b}. We consider the framework of \cite[Section 3.4]{DaS16} and introduce the parameterized PDE
\begin{equation}\label{eq:PDE_Inverse}
\begin{alignedat}{2}
-\nabla \cdot (\exp(\theta) \nabla u) &= f, \quad &&\text{in } D, \\
u &= 0, &&\text{on } \partial D,
\end{alignedat}
\end{equation}
where $D$ is an open bounded set of $\mathbb{R}^d$ and $\theta \colon D \to \mathbb{R}$ is a scalar function. In particular, we let $\theta$ be such that problem \eqref{eq:PDE_Inverse} is well-posed, i.e., $\kappa = \exp(\theta) \in L^\infty(D)$ and $\kappa \geq \underline{\kappa} > 0$, and we denote by $X$ the space of admissible values for $\theta$. We introduce the solution operator $\mathcal S \colon X \to V$ such that $\mathcal S \colon \theta \mapsto u$, and the observation operator $\mathcal O\colon V \to \mathbb{R}^m$, which maps the solution of the PDE to point evaluations inside the domain on points $x^* = x_1^*, \ldots, x_m^*$, i.e. $\mathcal O \colon u \mapsto y \coloneqq (u(x_1^*), \ldots, u(x_m^*))^\top$. Moreover, we denote by $\mathcal G = \mathcal O \circ \mathcal S$, $\mathcal G \colon X \to \mathbb{R}^m$, the so-called forward operator, which maps the parameter to the observations. We then have the Gaussian observation model
\begin{equation}\label{eq:ObsModel}
y = \mathcal G(\theta) + \beta, \quad \beta \sim \mathcal N(0, \Sigma),
\end{equation}
where $\Sigma \in \mathbb{R}^{m\times m}$ is a non-singular covariance matrix on $\mathbb{R}^m$. Given an observation $y^* = (u(x_1^*), \ldots, u(x_m^*))^\top$ associated to an unknown value $\theta^* \in X$ and corrupted by observational noise $\beta \in \mathbb{R}^m$ the inverse problem can then be stated as:
\begin{equation}\label{eq:InverseProblem}
\text{find } \theta^* \in X \text{ given observations } y^* = \mathcal G(\theta^*) + \beta.
\end{equation}
The randomness and the mismatch between the dimensionality of the unknown and of the observation make problem \eqref{eq:InverseProblem} ill-posed. Regularization can be achieved in the Bayesian framework (see e.g. \cite{Stu10,DaS16}) by introducing probability measures on the unknown, which summarize prior knowledge and the information provided by data. We briefly introduce the Bayesian paradigm in the remainder of this section. First, we restrict ourselves to the space $\mathcal H = \mathcal C^0(\overline D) \cap V$, which is a valid subspace of admissible values for $\theta$, i.e., $\mathcal H \subset X$. We then introduce a prior measure $\mu_0$ on $\mathcal H$, encoding all knowledge on the unknown $\theta$ before observations are obtained. In particular, we consider a Gaussian prior measure $\mu_0 = \mathcal N(0, \Gamma_0)$ on $\mathcal H$, where $\Gamma_0$ is a positive semi-definite covariance operator on $\mathcal H$, and such that $\mu_0(\mathcal H)= 1$, so that any sample from $\mu_0$ is in $\mathcal H$, a.s. We set the mean of the prior measure to zero without loss of generality. A broader class of prior measures could be employed, such as Besov or heavy-tailed measures \cite{DaS16, Sul17}, but we restrict ourselves to the Gaussian case for simplicity. Finally, we can obtain a measure $\mu^y$ on $X$ encoding all the knowledge on $\theta$ given the prior and the observations. We call this measure the posterior, and formally compute with Bayes' formula its Radon--Nykodim derivative with respect to the prior as
\begin{equation}\label{eq:Posterior}
\frac{\d \mu^y}{\d \mu_0}(\theta) = \frac1{Z^y}\exp(-\Phi(\theta; y)),
\end{equation}
where $Z^y$ is the normalization constant
\begin{equation}\label{eq:NormConstant}
Z^y = \int_{\mathcal H} \exp(-\Phi(\theta;y)) \, \mathrm{d}\mu_0(\theta),
\end{equation}
and where for any $y \in \mathbb{R}^m$ the potential $\Phi(\cdot; y) \colon X \to \mathbb{R}$ is given due to the Gaussian assumption on the noise $\beta \sim \mathcal N(0, \Sigma)$ by
\begin{equation}
\Phi(\theta; y) = \frac12\norm{\Sigma^{-1/2}\left(\mathcal G(\theta) - y\right)}^2_2.
\end{equation}
For economy of notation, in the following we drop the dependence of $\mu^y$ and $Z^y$ on the data, and simply denote these quantities $\mu$ and $Z$. In order for \eqref{eq:Posterior} to be well-defined, the posterior measure needs to be absolutely continuous with respect to the prior. This is ensured under some conditions on the forward map $\mathcal G$, in particular, Lipschitz continuity and some controlled growth condition. Precisely, $\mathcal G$ can be shown to satisfy \cite[Assumption 2.7]{Stu10}. We then choose the covariance $\Gamma_0 = -\Delta^{-\alpha}$ with $\alpha > d/2$ and where we equip the Laplacian with homogeneous boundary conditions. Fractional powers of the Laplacian should be understood as per \cite[Section 2]{Stu10}. With this choice, we have that $\mu_0(\mathcal H) = 1$. Together with the properties of $\mathcal G$ we can conclude by \cite[Theorem 3.4]{Stu10} that the posterior is indeed given by \eqref{eq:Posterior} and that the Bayesian inverse problem is well-posed, meaning that the dependence of the posterior on the observations is absolutely continuous.
In practice to evaluate the solution operator $\mathcal S$ we recur to the FEM and consider for an $h > 0$ the forward operator $\mathcal S_h \colon X \to V_h$ which maps $\mathcal S_h \colon \theta \mapsto u_h$, where $u_h$ is defined in \eqref{eq:FESolution}. Moreover, we denote by $\mathcal G_h = \mathcal O \circ \mathcal S_h$ the resulting approximate forward operator. Maintaining the same observation model and the same prior on $\mathcal H$ for the parameter as above, we consider the approximate posterior $\mu_h$ on $\mathcal H$ whose Radon--Nikodym derivative with respect to the prior is given by
\begin{equation}
\frac{\d \mu_h}{\d \mu_0}(\theta) = \frac1{Z_h}\exp(-\Phi_h(\theta; y)),
\end{equation}
where the potential $\Phi_h$ is given by
\begin{equation}\label{eq:NumPotential}
\Phi_h(\theta; y) = \frac12\norm{\Sigma^{-1/2}\left(\mathcal G_h(\theta) - y\right)}^2_2,
\end{equation}
and where the normalization constant $Z_h$ is defined equivalently to \eqref{eq:NormConstant}. A natural question arising from this setting is whether the approximate posterior $\mu_h$ converges to the true posterior $\mu$ in the limit $h \to 0$. This is indeed true, as it holds $d_{\mathrm{H}}(\mu, \mu_h) \to 0$ for $h \to 0$, where the Hellinger distance $d_{\mathrm{H}}(\cdot, \cdot)$ is defined as
\begin{equation}
d_{\mathrm{H}}(\mu, \mu_h) \coloneqq \sqrt{\frac12 \int_{\mathcal H} \left(\sqrt{\frac{\d \mu}{\d \mu_0}} - \sqrt{\frac{\d \mu_h}{\d \mu_0}}\right)^2 \, \mathrm{d} \mu_0}.
\end{equation}
For a proof of this result, see \cite[Theorem 4.6]{Stu10}, where the statement above is made more precise by the introduction of convergence rates.
It has been demonstrated heuristically that the approximate posterior measure $\mu_h$ can be overly confident on the parameter if $h > 0$ is a finite value and if the observation model is precise, i.e., when the covariance $\Sigma$ of the observational noise is small \cite{CGS17, AbG20, CCC16, LST18, COS17, OCA19, COS17b}. In particular, this is accentuated when $h$ is big relatively to the forward problem, or in other words when we employ a poor approximation of the forward map $\mathcal G$. It is therefore useful in applications to have a cheap surrogate which can be evaluated quickly, without renouncing to a complete uncertainty quantification of the solution to the inverse problem. Probabilistic numerical methods can be employed for this purpose. Let $\widetilde{\mathcal S}_h \colon X \to \widetilde V_h$ be the solution operator mapping $\widetilde{\mathcal S}_h \colon \theta \mapsto \widetilde u_h$, where $\widetilde u_h$ is the RM-FEM solution of \cref{def:ProbSol}. In particular, in this context it is advisable to fix $p = 1$ in \eqref{eq:PerturbedPoints}, so that the random deviations of the probabilistic numerical solution are of the same order of magnitude than the error itself by \cref{thm:APriori}. Coherently to the definitions above, we define the random forward map $\widetilde{\mathcal G}_h \colon X \to \mathbb{R}^m$ as $\widetilde{\mathcal G}_h = \mathcal O \circ \widetilde{\mathcal S}_h$ and the approximate random posterior measure $\widetilde \mu_h$ on $X$ as
\begin{equation}
\frac{\d \widetilde \mu_h}{\d \mu_0}(\theta) = \frac{\exp(-\widetilde\Phi_h(\theta; y))}{\widetilde Z_h} ,
\end{equation}
where the potential $\widetilde \Phi_h$ and the normalization constant $\widetilde Z_h$ are defined as above. Let us remark that the posterior $\widetilde \mu_h$ is a random measure, as it depends on the random variable $\alpha \colon \Omega \to \mathbb{R}^{N_I}$ governing the random perturbations of the mesh. To be more precise, the posterior $\widetilde \mu_h$ is a random variable $\widetilde \mu_h \colon \Omega \to \mathcal M(\mathcal H)$, where $\mathcal M(\mathcal H)$ is the space of probability measures over the space $\mathcal H$. Employing the tools of \cite{LST18} and due to \cref{thm:APriori}, it is possible to prove convergence results for $\widetilde \mu_h$ towards the true posterior $\mu$ for $h \to 0$ in the Hellinger metrics.
\begin{remark} There exist other approaches to factor the effects of discretization into Bayesian inverse problems. In particular, numerical error can be treated as modelling discrepancies. Under the assumption that the error is independent of the observational noise and of the inferred parameter $\theta$, a viable alternative to probabilistic methods is employing the techniques introduced in \cite{CDS18, CES14}, and further applied and analysed e.g. in \cite{AbD20, AGZ20}. We argue that while assuming numerical errors to be independent of the observational noise is reasonable, their independence from the inferred parameter itself is not, at least for the inverse problem \eqref{eq:InverseProblem}.
\end{remark}
\subsection{Implementation Details}\label{sec:BIP_Practice}
We now detail how one can solve the inverse problems above in practice. Given a smooth functional $\Psi$ on $X$, we are interested in approximating the quantities $\operatorname{\mathbb{E}}_{\mu_h}[\Psi(\cdot)]$ and $\operatorname{\mathbb{E}}_{\widetilde{\mu}_h}[\Psi(\cdot)]$, where $\operatorname{\mathbb{E}}_{\mu_h}$ denotes expectation with respect to the measure $\mu_h$ (respectively $\widetilde \mu_h$). To be more precise, in the probabilistic case we are interested to the quantity $\operatorname{\mathbb{E}}[\operatorname{\mathbb{E}}_{\widetilde \mu_h}[\Psi(\cdot)]]$, where the outer expectation is taken with respect to the random perturbations intrinsic to the RM-FEM, and where for a sufficiently smooth functional $\Psi$ the expectations can be exchanged by means of Fubini's theorem. Due to the high-dimensionality of the problem, Monte Carlo techniques are a natural choice. Let $N_{\mathrm{MC}}$ be a positive integer and let us assume that we have samples $\{\theta^{(i)}\}_{i=0}^{N_{\mathrm{MC}}}\sim \mu_h$, not necessarily independent. Then, defining
\begin{equation}\label{eq:PostMean}
\widehat \Psi_{\mu_h} \coloneqq \frac1{N_{\mathrm{MC}}} \sum_{i=1}^{N_{\mathrm{MC}}}\Psi(\theta^{(i)}).
\end{equation}
we have $\widehat \Psi_{\mu_h} \approx \operatorname{\mathbb{E}}_{\mu_h}[\Psi(\cdot)]$. For the probabilistic case, let $\widetilde N_{\mathrm{MC}}^{\mathrm{out}}$ and $\widetilde N_{\mathrm{MC}}^{\mathrm{in}}$ be positive integers, let $\{\widetilde \mu_h^{(j)}\}_{j=1}^{\widetilde N_{\mathrm{MC}}^{\mathrm{out}}}$ be a sequence of realizations of the measure $\widetilde \mu_h$, obtained with a corresponding series of random perturbations of the mesh, and let $\{\widetilde \theta^{(j,i)}\}_{i=1}^{\widetilde N_{\mathrm{MC}}^{\mathrm{in}}} \sim \widetilde \mu_h^{(j)}$. Then, we define
\begin{equation}\label{eq:PostMeanProb}
\widehat \Psi_{\widetilde \mu_h} \coloneqq \frac1{\widetilde N_{\mathrm{MC}}^{\mathrm{out}}\widetilde N_{\mathrm{MC}}^{\mathrm{in}}} \sum_{i=1}^{\widetilde N_{\mathrm{MC}}^{\mathrm{out}}}\sum_{j=1}^{\widetilde N_{\mathrm{MC}}^{\mathrm{in}}}\Psi(\theta^{(j,i)}),
\end{equation}
and we have $\widehat \Psi_{\widetilde \mu_h} \approx \operatorname{\mathbb{E}}[\operatorname{\mathbb{E}}_{\widetilde{\mu}_h}[\Psi(\cdot)]]$. Still, the random variable $\theta$ is infinite-dimensional, and we need to define a finite-dimensional approximation in order to obtain a practical procedure to generate the above samples and thus solve the inverse problem. We recur to the Karhunen--Loeve expansion (KL). Denoting by $\{(\lambda_i, \phi_i)\}_{i\geq 1}$ the ordered eigenvalues/eigenfunctions of the prior covariance $\Gamma_0$, a function $\theta \sim \mu_0$ is given by the convergent sum
\begin{equation}
\theta = \sum_{i \geq 1} \sqrt{\lambda_i} \phi_i \xi_i,
\end{equation}
where $\{\xi_i\}_{i\geq 1} \ensuremath{\stackrel{\text{i.i.d.}}{\sim}} \mathcal N(0, 1)$. We then let $ N_{\mathrm{KL}}$ be a positive integer and truncate the sum above as
\begin{equation}\label{eq:KarunhenLoeve}
\theta = \sum_{i = 1}^{ N_{\mathrm{KL}}} \sqrt{\lambda_i} \phi_i \xi_i,
\end{equation}
thus obtaining a function $\theta \in \mathcal H$ which is approximately sampled from $\mu_0$. Due to the super-quadratic decay of the eigenvalues of $\Gamma_0 = -\Delta^{-\alpha}$ for $\alpha > d/2$, disregarding the tail of the sum causes a negligible error in case $ N_{\mathrm{KL}}$ is chosen appropriately large. Our inversion problem is therefore shifted to computing the posterior distribution on a finite-dimensional parameter, comprising the coefficients of the expansion \eqref{eq:KarunhenLoeve}. We define the mapping $\mathcal K \colon \mathbb{R}^{ N_{\mathrm{KL}}} \to \mathcal H$, $\mathcal K \colon \xi \mapsto \theta$ by \eqref{eq:KarunhenLoeve}. The prior measure on $\xi$ is $\mu_0 = \mathcal N(0, I)$, with $I$ being the identity matrix of dimension $ N_{\mathrm{KL}}\times N_{\mathrm{KL}}$, and we denote by $\pi_0$ the density of $\mu_0$ with respect to the Lebesgue measure. The density $\pi_h$ of the posterior on the coefficients $\xi$ given the observations is then
\begin{equation}\label{eq:PosteriorDensity}
\pi_h(\xi) = \frac1{Z_h} \pi_0(\xi) \, \exp(-\Phi_h(\mathcal K(\xi); y)),
\end{equation}
where $\Phi_h$ is defined in \eqref{eq:NumPotential} and $Z_h$ is the normalization constant
\begin{equation}
Z_h = \int_{\mathbb{R}^{ N_{\mathrm{KL}}}} \exp(-\Phi_h(\mathcal K(\xi); y)) \, \pi_0(\xi) \, \mathrm{d} \xi.
\end{equation}
The same procedure can be applied seamlessly to the probabilistic case, thus obtaining a random posterior density $\widetilde \pi_h$ over $\mathbb{R}^{ N_{\mathrm{KL}}}$ for the coefficient $\xi$.
The last detail missing is how to produce samples in order to obtain the approximations \eqref{eq:PostMean} and \eqref{eq:PostMeanProb}. Being the normalizations constant unknown, we employ Markov chain Monte Carlo techniques (MCMC) (see e.g. \cite[Chapter 3]{KaS05} or \cite[Chapter 6]{KTB13}), which proceed by generating an ergodic Markov chain whose invariant density is the desired posterior. Successive states of the aforementioned Markov chain then serve as samples from the posterior density. We choose to employ the Metropolis--Hastings (MH) algorithm, which we here briefly detail. The Markov chain is built employing a symmetric proposal $q \colon \mathbb{R}^{ N_{\mathrm{KL}}} \times \mathbb{R}^{ N_{\mathrm{KL}}} \to \mathbb{R}$ satisfying $q(x,y) = q(y, x)$ for all $x,y \in \mathbb{R}^{N_{\mathrm{KL}}}$ and such that for any fixed $x \in \mathbb{R}^{N_{\mathrm{KL}}}$ the function $q(x, \cdot)$ is a probability density, and with an acceptance-rejection strategy. In particular, given an initial guess $\xi^{(1)}$, the algorithm proceeds for $i = 2, \ldots, N_{\mathrm{MC}}$ as
\begin{enumerate}
\item Sample $\bar \xi^{(i)} \sim q(\xi^{(i-1)}, \cdot)$;
\item Set $\xi^{(i)} = \bar \xi^{(i)}$ with probability $\alpha$, and $\xi^{(i)} = \xi^{(i-1)}$ with probability $1-\alpha$, where
\begin{equation}
\alpha = \min\left\{\frac{\pi_h(\bar \xi^{(i)})}{\pi_h(\xi^{(i-1)})}, 1\right\}.
\end{equation}
\end{enumerate}
Let us remark that the normalization constant $Z_h$ does not need to be known to run the algorithm, since we only compute ratios of posterior densities. Moreover, we note that the proposal distribution is the only tunable element of the MH algorithm. The easiest choice, at least for implementation, would be to fix $q(x, \cdot) = \mathcal N(x, \sigma^2 I)$ for some user-prescribed variance $\sigma^2$. Unfortunately, the quality of the resulting Markov chain is not robust with respect to $\sigma$. In particular, if $\sigma$ is too small, the probability to accept is too large and the Markov chain fails to effectively explore the posterior. At the other end of the spectrum, if $\sigma$ is too large the probability of accepting a new sample reduces drastically, and the Markov chain presents a sticky behaviour. We therefore decide to employ the robust adaptive Metropolis algorithm (RAM) (see \cite{Vih12} for details), in which the proposal is $q(x, \cdot) = \mathcal N(x, \Sigma_q)$, where the covariance $\Sigma_q$ is adapted on the fly to obtain a user-specified final acceptance ratio, i.e. the ratio between the accepted and the total number samples, which should be roughly $25\%$ (see e.g. \cite{Vih12}). Another viable option for the implementation of MCMC could have been the preconditioned Crank--Nicolson MCMC (pCN-MCMC) of \cite{CRS13, HSV14}, which is tailored for high-dimensional inverse problems.
For the probabilistic case, we perform a run of the MH, implemented with RAM proposal, with $\widetilde N_{\mathrm{MC}}^{\mathrm{in}}$ iterations for each one of the $\widetilde N_{\mathrm{MC}}^{\mathrm{out}}$ realizations of the random mesh, thus obtaining the approximation \eqref{eq:PostMeanProb}.
\begin{remark} The total number of samples is given by in the probabilistic case by $\widetilde N_{\mathrm{MC}}^{\mathrm{in}} \cdot \widetilde N_{\mathrm{MC}}^{\mathrm{out}}$. One could argue that, for a fair comparison between the probabilistic and the deterministic case in terms of computational cost, one should choose $N_{\mathrm{MC}} \approx \widetilde N_{\mathrm{MC}}^{\mathrm{in}} \cdot \widetilde N_{\mathrm{MC}}^{\mathrm{out}}$. In fact, since the ``outer'' Monte Carlo simulation can be performed in parallel, the correct scaling is $N_{\mathrm{MC}} \approx \widetilde N_{\mathrm{MC}}^{\mathrm{in}}$. Moreover, due to \cref{rem:CompCost}, the number of random meshes does not need to be chosen excessively large. \end{remark}
\subsection{Numerical Experiments}\label{sec:NumExp_BIP}
In this section we present numerical experiments highlighting the beneficial effects of adopting the probabilistic framework of RM-FEM in the context of Bayesian inverse problems.
\subsubsection{One-Dimensional Case}\label{sec:NumExpBIP_1D}
\begin{figure}[t]
\centering
\begin{tikzpicture}
\draw (0,0) -- (8.7, 0) -- (8.7, 0.5) -- (0, 0.5) -- (0, 0);
\draw[] (0.1, 0.25) -- (0.6, 0.25) node[right,color=black] {\small Truth $\kappa^*$};
\draw[style=dashed] (2.3, 0.25) -- (2.8, 0.25) node[right,color=black] {\small Mean $\operatorname{\mathbb{E}}_\mu[\kappa]$};
\draw[fill=gray!50,draw=none] (5.1, 0.2) -- (5.6, 0.2) -- (5.6, 0.3) -- (5.1, 0.3) -- (5.1, 0.2);
\node[right] at (5.6, 0.25){\small Confidence Interval} ;
\end{tikzpicture}
\vspace{0.5cm}
\begin{tabular}{ccc}
\includegraphics[]{Figures/ConfInt_DetN10} & \includegraphics[]{Figures/ConfInt_DetN20} & \includegraphics[]{Figures/ConfInt_DetN40} \vspace{0.1cm} \\
\includegraphics[]{Figures/ConfInt_ProbN10} & \includegraphics[]{Figures/ConfInt_ProbN20} & \includegraphics[]{Figures/ConfInt_ProbN40}
\end{tabular}
\caption{Numerical results for $\kappa_1^*$ in \cref{sec:NumExpBIP_1D}. In all plots, the solid line represents the true conductivity, the dashed line is the posterior mean, and the shaded grey area is a confidence interval. In the first row, results are obtained by approximating the forward map with FEM, and in the second with the RM-FEM.}
\label{fig:InverseProblem_Inf_Smooth}
\end{figure}
\begin{figure}[th]
\centering
\begin{tikzpicture}
\draw (0,0) -- (8.7, 0) -- (8.7, 0.5) -- (0, 0.5) -- (0, 0);
\draw[] (0.1, 0.25) -- (0.6, 0.25) node[right,color=black] {\small Truth $\kappa^*$};
\draw[style=dashed] (2.3, 0.25) -- (2.8, 0.25) node[right,color=black] {\small Mean $\operatorname{\mathbb{E}}_\mu[\kappa]$};
\draw[fill=gray!50,draw=none] (5.1, 0.2) -- (5.6, 0.2) -- (5.6, 0.3) -- (5.1, 0.3) -- (5.1, 0.2);
\node[right] at (5.6, 0.25){\small Confidence Interval} ;
\end{tikzpicture}
\vspace{0.5cm}
\begin{tabular}{ccc}
\includegraphics[]{Figures/ConfIntDisc_DetN10} & \includegraphics[]{Figures/ConfIntDisc_DetN20} & \includegraphics[]{Figures/ConfIntDisc_DetN40} \vspace{0.1cm} \\
\includegraphics[]{Figures/ConfIntDisc_ProbN10} & \includegraphics[]{Figures/ConfIntDisc_ProbN20} & \includegraphics[]{Figures/ConfIntDisc_ProbN40}
\end{tabular}
\caption{Numerical results for $\kappa_2^*$ in \cref{sec:NumExpBIP_1D} In all plots, the solid line represents the true conductivity, the dashed line is the posterior mean, and the shaded grey area is a confidence interval. In the first row, results are obtained by approximating the forward map with FEM, and in the second with the RM-FEM.}
\label{fig:InverseProblem_Inf_Disc}
\end{figure}
We first consider $D = (0,1)$ and solve the inverse problem presented above for two different true diffusion fields $\kappa^*$. In both cases, we consider the prior on $\mathcal H$ to be given by $\mathcal N(0, \Gamma_0)$, with $\Gamma_0^{-1} = -\d^2/\d x^2$ with homogeneous boundary conditions, so that the Bayesian inverse problem is well-posed. First, we consider $\kappa_1^* = \exp(\theta_1^*)$, where the log-conductivity $\theta_1^* \in \mathcal H$ is given by
\begin{equation}
\theta_1^*(x) = \sum_{j = 1}^{4} \xi_j \sqrt{\lambda_j} \phi_j(x),
\end{equation}
with $\xi_1 = \xi_2 = 1$, $\xi_3 = \xi_4 = 1/4$, and where $\{(\lambda_i, \phi_i)\}_{i=1}^4$ are the first four ordered eigenpairs of $\Gamma_0$. Second, we consider $\theta_2^* \in X \cap \mathcal H^C$, so that the true conductivity does not belong to the domain in which we solve the inverse problem, but it is still admissible for \eqref{eq:PDE_Inverse} to be well-posed. In particular, we consider the discontinuous conductivity
\begin{equation}
\kappa_2^*(x) = \left\{
\begin{alignedat}{2}
&1.5, &&\quad 0.2 < x < 0.6, \\
&0.5, &&\quad 0.6 < x < 0.8, \\
&1, &&\quad \text{otherwise},
\end{alignedat}
\right.
\end{equation}
and infer $\theta_2^* = \log(\kappa_2^*)$. For both problems, we choose the right-hand side in \eqref{eq:PDE_Inverse} as $f(x) = \sin(2\pi x)$. Synthetic observations are obtained as point evaluations of a reference solution on points $x_i^* = i/10$, for $i = 1, \ldots, 9$, corrupted by Gaussian noise $\mathcal N(0, 10^{-8} I)$. The forward map is approximated with FEM and RM-FEM. The mesh $\mathcal T_h$ for the FEM is equally spaced, and we vary the number of elements $N = \{10, 20, 40\}$. For the RM-FEM, we consider $p = 1$ in \eqref{eq:PerturbedPoints} as per \cref{thm:APriori} and implement the random perturbations with an uniform distribution as in \cref{ex:ExRandomPerturbation}.
We sample with the MH algorithm from the posterior distributions $\mu_h$ and $\widetilde \mu_h$, with $N_{\mathrm{MC}} = 2 \cdot 10^5$ for $\mu_h$ and with $\widetilde N_{\mathrm{MC}}^{\mathrm{out}} = 50$ and $\widetilde N_{\mathrm{MC}}^{\mathrm{in}} = 2 \cdot 10^5$ for $\widetilde \mu_h$. Knowing for the first conductivity $\kappa^*_1$ that the true conductivity is fully determined by four coefficients, we fix the truncation index $N_{\mathrm{KL}} = 4$ in the Karhunen--Loève expansion \eqref{eq:KarunhenLoeve}. For the second conductivity $\kappa^*_2$, we fix $N_{\mathrm{KL}} = 9$. We then approximate the mean and pointwise standard deviation with \eqref{eq:PostMean} and \eqref{eq:PostMeanProb} for the deterministic and probabilistic posteriors, respectively. Moreover, we arbitrarily fix a pointwise confidence interval at twice the standard deviation away from the mean. Numerical results are given in \cref{fig:InverseProblem_Inf_Smooth} and \cref{fig:InverseProblem_Inf_Disc}. Results highlight that for a coarse approximation, specifically for $N = 10$, the posterior distribution $\mu_h$ is overly confident on the result. Indeed, the posterior mean fails to capture precisely the true conductivity in both the continuous and discontinuous case, and the confidence interval is extremely sharply concentrated around the mean. Conversely, the distribution $\widetilde \mu_h$ based on the probabilistic forward model accounts better for the uncertainty due to numerical discretization. Increasing the number of elements $N$, the mean computed under $\mu_h$ and $\widetilde \mu_h$ tends to approximate better the true conductivity field. In particular, for $N = 40$ the posteriors $\mu_h$ and $\widetilde \mu_h$ are already practically undistinguishable and are close to the true field. Moreover, let us remark that while the width of the confidence interval seems independent of $N$ for $\mu_h$, it shrinks coherently to the discretization for $\widetilde \mu_h$. Finally, we note that for $\kappa^*_2$ even for larger values of $N$ the posterior $\widetilde \mu_h$ seems to capture with its uncertainty local errors in the solution of the inverse problem. Indeed, the posterior mean is particularly off the true field on the left side of the domain, where the confidence interval is wider with respect to areas where the solution is more accurate.
\subsubsection{Two-Dimensional Case}\label{sec:NumExpBIP_2D}
\begin{figure}[t]
\centering
\begin{tabular}{cccc}
\includegraphics[]{Figures/TrueDiff} & \includegraphics[]{Figures/MCMC_N_10} & \includegraphics[]{Figures/MCMC_N_20} & \includegraphics[]{Figures/MCMC_N_40}
\end{tabular}
\vspace{0.5cm}
\begin{tabular}{cc}
\includegraphics[]{Figures/ErrVsStd} & \includegraphics[]{Figures/ErrVsStd_Coeff}
\end{tabular}
\caption{Numerical results for \cref{sec:NumExpBIP_2D}. First row: True conductivity field $\kappa^*$ and posterior mean field $\widehat \kappa_{\mu_h}$ estimated with MCMC and different values of $h$. Second row: Mean error vs standard deviation under $\mu_h$ and $\widetilde \mu_h$. On the left, $L^2(D)$ error on the mean field vs $L^2(D)$ norm of the punctual standard deviation under $\mu_h$ and $\widetilde \mu_h$. On the right, error with respect to exact KL coefficients, and standard deviations under $\mu_h$ and $\widetilde \mu_h$.}
\label{fig:Bay2d}
\end{figure}
We consider now a two dimensional example on the domain $D = (0,1)^2$. We fix a Gaussian prior $\mu_0$ on $\mathcal H$ for the log-conductivity $\theta$ chosen as $\mu_0 = \mathcal N(0, \Gamma_0)$, where $\Gamma_0 = -\Delta^{-1.3}$ with homogeneous boundary conditions, so that the inverse problem is well-posed. We fix $N_{\mathrm{KL}} = 6$ and let the true conductivity $\kappa^* = \exp(\theta^*)$ in \eqref{eq:PDE_Inverse} be given by
\begin{equation}
\theta^* = \sum_{i=1}^{6} \sqrt{\lambda_i} \phi_i \xi_i^*,
\end{equation}
where $\{(\lambda_i, \phi_i)\}_{i=1}^6$ are the first six ordered eigenpairs of $\Gamma_0$, and where $\xi_i^* = (-1)^{i+1}\cdot 10$ for $i = 1, 2, \ldots, 6$. Let us remark that $\theta^* \in \mathcal H$. The right-hand side in \eqref{eq:PDE_Inverse} is chosen as $f(x, y) = 8\pi^2 \sin(2\pi x) \sin(2\pi y)$. Synthetic observations are obtained by evaluating a reference solution on $m = 50$ random locations sampled from $\mathcal U(D)$ and then corrupted by an observational noise distributed as $\mathcal N(0, 10^{-6}I)$. We then approximate the forward map in the inverse problem with the FEM and the RM-FEM. We choose a structured mesh $\mathcal T_h$ as the one in \cref{ex:ExRandomPerturbation} (or the second row of \cref{fig:Mesh}). In particular, in this case we let $h$ denote the constant length of the short side of the triangular elements, i.e., the inverse of the number of subdivisions of each side of $D$. In particular, we consider $h = 0.1 \cdot 2^{-i}$, $i = 0,1,\ldots, 3$. The RM-FEM is implemented with $p = 1$ in \eqref{eq:PerturbedPoints} as per \cref{thm:APriori}, and with an uniform choice for the random perturbations as the one described in \cref{ex:ExRandomPerturbation}.
Employing the notation introduced in \cref{sec:BIP_Practice}, we then sample from the posterior distributions $\mu_h$ and $\widetilde \mu_h$ employing the RAM method, considering only the first $N_{\mathrm{KL}} = 6$ coefficients in the KL expansion \eqref{eq:KarunhenLoeve}. In particular, we consider $N_{\mathrm{MC}} = 10^5$ samples for the deterministic case, and for the probabilistic case we generate $\widetilde N_{\mathrm{MC}}^{\mathrm{in}} = 10^5$ samples for $\widetilde N_{\mathrm{MC}}^{\mathrm{out}} = 24$ parallel chains, each corresponding to a realization of the random mesh in the RM-FEM. We then compute for each value of $h$ the mean and standard deviation of the field computed under $\mu_h$ (resp. $\widetilde \mu_h$) and denote their Monte Carlo approximations as $\widehat \kappa_{\mu_h}$ and $\widehat \sigma^\kappa_{\mu_h}$ (resp. $\widehat \kappa_{\widetilde \mu_h}$, $\widehat \sigma^\kappa_{\widetilde \mu_h}$). Moreover, we consider the statistics of the $6$-dimensional coefficient $\sigma$ of the KL expansion, and denote by $\widehat \xi_{\mu_h}$ and $\widehat \sigma_{\mu_h}^\xi$ the Monte Carlo approximation of mean and standard deviation computed under $\mu_h$ (resp. $\widehat \xi_{\mu_h}$, $\widehat \sigma_{\widetilde \mu_h}^\xi$). We show in \cref{fig:Bay2d} the posterior mean $\widehat \kappa_{\mu_h}$ for three values of $h$, compared to the truth $\kappa^*$, and remark that the mean approximation is sensibly better for smaller values of $h$. The mean value under the probabilistic posterior $\widetilde \mu_h$ is not shown, as it is essentially equal to the deterministic case. The beneficial effect of employing the RM-FEM-based posterior distribution $\widetilde \mu_h$, with respect to the FEM-based posterior $\mu_h$, consists of the approximate equalities
\begin{equation}
\norm{\widehat\sigma_{\widetilde \mu_h}^\kappa}_{L^2(D)} = \mathcal O\left(\norm{\kappa^* - \widehat \kappa_{\widetilde \mu_h}}_{L^2(D)}\right), \qquad \norm{\widehat \sigma^\xi_{\widetilde \mu_h}} = \mathcal O\left(\norm{\xi^* - \widehat \xi_{\widetilde \mu_h}}\right),
\end{equation}
which indicate that the error on the conductivity field, or on the coefficients of its KL expansion, are well represented by the uncertainty in the posterior distribution. This is shown in \cref{fig:Bay2d}, where we notice that under $\mu_h$ the standard deviation is practically independent of $h$ and small with respect to the error on the solution of the inverse problem. Conversely, under $\widetilde \mu_h$ we have that the posterior standard deviation converges accordingly to the error, both for the $L^2$-norm of the error on the mean and for the coefficients of the KL expansion.
\section{Error Analysis for the RM-FEM}\label{sec:ProbErrEst}
In this section, we present our a priori and our a posteriori error analysis for the RM-FEM. Let us remark that while the a priori error analysis is carried on for a general space dimension $d$ and the adaptive algorithm has been shown to be efficient in higher dimensions (see \cref{sec:NumExp_ErrEst}), we present a rigorous a posteriori error analysis only in case $d = 1$. Conversely, in the a priori analysis we fix the coefficient $p = 1$ in \eqref{eq:PerturbedPoints}, whereas in the a posteriori analysis we consider general perturbations, i.e., general coefficients $p \geq 1$ in the same equality.
\subsection{A Priori Error Estimates}\label{sec:APriori}
We first prove the a priori error estimate given in \cref{thm:APriori}. The convergence properties of the FEM for the elliptic problem \eqref{eq:PDE} are well-established. In particular, without any additional assumptions on the exact solution, i.e., when $u \in V$, it holds $\norm{u-u_h}_V \to 0$ for $h \to 0$. Under the more restrictive assumption $u \in H^2(D) \cap V$, we have a linear convergence rate, i.e.
\begin{equation}\label{eq:FEMAPriori}
\norm{u-u_h}_V \leq Ch \abs{u}_{H^2(D)},
\end{equation}
for a constant $C > 0$, which is independent of $h$ and $u$ \cite{Cia02, Qua09, BrS08}. It is desirable that the RM-FEM is endowed with the same property. Moreover, we wish the error due to randomization to be balanced with the error due to the FEM discretization, which is shown in the proof of \cref{thm:APriori} below.
\begin{proof}[Proof of \cref{thm:APriori}] Since \eqref{eq:FEMAPriori} holds independently of the mesh, we have
\begin{equation}
\norm{u - \widetilde u_h}_V \leq \widetilde Ch\abs{u}_{H^2(D)}, \quad \text{a.s.},
\end{equation}
for a constant $\widetilde C$ independent of $h$ and $u$ and of the coefficient $p$ in \eqref{eq:PerturbedPoints}. Hence, by the triangle inequality we have for $p = 1$
\begin{equation}\label{eq:APrioriDecomp}
\norm{u_h - \widetilde u_h}_V \leq \norm{u - u_h}_V + \norm{u - \widetilde u_h}_V \leq (C+\widetilde C)h\abs{u}_{H^2(D)}, \quad \text{a.s.},
\end{equation}
i.e., we have $\mathcal O(\norm{u_h - \widetilde u_h}_V) = \mathcal O(\norm{u - u_h}_V)$, which shows the desired result.
\end{proof}
Let us remark that we have shown above that the probabilistic solution converges with the same rate with respect to $h$ in case $p=1$, but we have not considered the case $p>1$, for which the probabilistic term may be of higher order. Indeed, a preliminary theoretical and numerical investigation leads us to conjecture that
\begin{equation}\label{eq:APrioriGenP}
\left(\operatorname{\mathbb{E}}\norm{u_h - \widetilde u_h}_V^2\right)^{1/2} \leq Ch^{(p+1)/2},
\end{equation}
so that, at least in the mean-square sense, the error due to randomization should converge faster than the error due to discretization if $p > 1$.
\subsection{A Posteriori Error Analysis in the One-Dimensional Case}\label{sec:ErrAnalysis}
In this section we prove our main result for the a posteriori error estimator of the RM-FEM given in \cref{def:ProbErrEst}, namely \cref{thm:MainThmAPosteriori}. Our goal is to prove in the one-dimensional case that the probabilistic a posteriori error estimators are reliable and efficient, i.e., that there exist positive constants $\widetilde C_{\mathrm{low}}$ and $\widetilde C_{\mathrm{up}}$ independent of $h$ and $u$ such that
\begin{equation}\label{eq:APosterioriBound_Prob}
\widetilde C_{\mathrm{low}}\widetilde{\mathcal E}_{h,k} \leq \norm{u-u_h}_V \leq \widetilde C_{\mathrm{low}}\widetilde{\mathcal E}_{h,k}.
\end{equation}
for $k = \{1,2\}$. Consider the elliptic two-point boundary value problem
\begin{equation}\label{eq:PDE_1d}
\begin{aligned}
&-(\kappa u')' = f, \quad \text{in } D, \\
&u(0) = u(1) = 0,
\end{aligned}
\end{equation}
where $\kappa \in L^\infty(D)$ satisfies $\kappa(x) \geq \underline{\kappa}$ almost everywhere in $D$, and where we assume $f \in L^1(D)$. We recall that the notation for one-dimensional problems has been introduced and discussed in \cref{ex:ExRandomPerturbation} and at the end of \cref{sec:APosteriori}. Additionally, we introduce here for a function $w$ which is piecewise constant on each $K_i \in \mathcal T_h$ the jump operator
\begin{equation}
\dbrack{w}_{x_i} \coloneqq w\eval{K_i} - w\eval{K_{i+1}}, \qquad i=1, \ldots, N-1, \quad \dbrack{w}_{x_0} = \dbrack{w}_{x_N} = 0.
\end{equation}
Our strategy for proving that the error estimator introduced in \cref{def:ProbErrEst} satisfies \eqref{eq:APosterioriBound_Prob} relies on showing it is equivalent to known valid estimators. In particular, we consider the following estimator, defined in \cite[Definition 6.3]{BaR81}.
\begin{definition}\label{def:DetErrEst} Let $\kappa$ be the diffusion coefficient of \eqref{eq:PDE_1d} satisfy $\kappa \in \mathcal C^0(D)$ and $\kappa \geq \underline \kappa > 0$. We define the error estimator
\begin{equation}\label{eq:DetErrEst}
\mathcal E_h^2 \coloneqq \sum_{j=1}^{N} \eta_j^2, \quad \eta_j \coloneqq \norm{\kappa^{-1}\ell_j}_{L^2(K_j)},
\end{equation}
with $\ell_j \colon K_j \to \mathbb{R}$ the linear function defined by $\ell_j(x_{j-1}) = \tau_{j,1}$, $\ell_j(x_j) = -\tau_{j,0}$ where
\begin{equation}
\tau_{j,k} = \frac{h_j}{h_{j-k+1} + h_{j-k}}\dbrack{u_h'}_{x_{j-k}}\kappa(x_{j-k}).
\end{equation}
\end{definition}
Clearly, the quantity $\mathcal E_h$ is computable up to quadrature error due to the approximation of the local estimators $\eta_j$. Let us finally introduce more precisely the higher-order quantity $\Lambda$ appearing in \eqref{eq:BabuskaLambdaIntro}, i.e.,
\begin{equation}\label{eq:BabuskaLambda}
\Lambda^2 \coloneqq h^\zeta \sum_{j=1}^N \int_{K_j} (f(x) + \ell_j'(x))^2 \, \mathrm{d} x,
\end{equation}
where $\zeta \in (0, 1)$ is arbitrary and $\ell_j$ are the linear functions employed in \cref{def:DetErrEst}. We can now state the main result concerning the estimator $\mathcal E_h$, which summarizes \cite[Theorems 8.1 and 8.2]{BaR81}.
\begin{theorem}\label{thm:BabuskaThm} Let $\mathcal E_h$ and $\Lambda$ be defined in \cref{def:DetErrEst} and \eqref{eq:BabuskaLambda}, respectively. Then, it holds up to higher order terms in $h$
\begin{equation}
\norm{u-u_h}_V \leq C\left(\mathcal E_h^2 + \Lambda^2\right)^{1/2},
\end{equation}
for a constant $C$ independent of $h$ and of the solution $u$. If moreover the family of meshes $\mathcal T_h$ is $\lambda$-quasi-uniform and if $\kappa \in \mathcal C^2(D)$ and $f \in \mathcal C^1(D)$ then, up to higher order terms, it holds
\begin{equation}
C_{\mathrm{low}} \mathcal E_h \leq \norm{u-u_h}_V \leq C_{\mathrm{up}} \mathcal E_h,
\end{equation}
for constants $C_{\mathrm{low}}$, $C_{\mathrm{up}}$ independent of $h$ and $u$.
\end{theorem}
We recall that in the one dimensional case the probabliistic error estimators for the RM-FEM are given by
\begin{equation}
\begin{alignedat}{2}
&\widetilde{\mathcal E}_{h,1} \coloneqq \left(\sum_{i=1}^N \widetilde{\eta}_{K_i,1}^2\right)^{1/2}, \quad &&\text{ with } \quad \widetilde{\eta}_{K_i,1}^2 = h_i^{-(p-1)} \Eb{\norm{u_h' - (\widetilde{\mathcal I} u_h)'}_{L^2(\widetilde K_i)}^2}.
\\
&\widetilde{\mathcal E}_{h,2} \coloneqq \left(\sum_{i=1}^N \widetilde{\eta}_{K_i,2}^2\right)^{1/2}, \quad &&\text{ with } \quad \widetilde{\eta}_{K_i,2}^2 = h_i^{-(2p-3)} \Eb{\norm{u_h'^\eval{K} - (\widetilde{\mathcal I} u_h)'\eval{\widetilde K}}^2}.
\end{alignedat}
\end{equation}
Our strategy to prove \cref{thm:MainThmAPosteriori} relies on showing that the deterministic estimator $\mathcal E_h$ of \cref{def:DetErrEst}, as well as its probabilistic counterparts $\widetilde{\mathcal E}_{h,1}$ and $\widetilde{\mathcal E}_{h,2}$ above are all equivalent to the quantity
\begin{equation}
\mathcal J(u_h) \coloneqq \sum_{i=1}^{N-1} \bar h_i \dbrack{u_h'}^2,
\end{equation}
i.e., the sum of all squared jumps of the derivatives on the internal nodes. We first prove the equivalence for $\widetilde {\mathcal E}_{h,1}$.
\begin{lemma}\label{lem:EquivProb1Jump} Let \cref{as:meshPerturbation} hold. Then, if the mesh is $\lambda$-quasi-uniform it holds
\begin{equation}
\left(\frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}\left(1+\lambda^{-(p-1)}\right)}{2} - 2h^{p-1}\operatorname{\mathbb{E}}\abs{\bar\alpha_1}^2\right) \mathcal J^2(u_h)\leq \widetilde{\mathcal E}_{h,1}^2 \leq \frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}\left(1+\lambda^{p-1}\right)}{2} \mathcal J^2(u_h),
\end{equation}
where $\widetilde{\mathcal E}_{h,1}$ is given in \cref{def:ProbErrEst}.
\end{lemma}
\begin{proof} Let $\widetilde K_i$, $i = 1, \ldots, N$, be a generic element of the perturbed mesh and let us compute the derivative of the interpolant on $\widetilde K_i$, which is given by
\begin{equation}
(\widetilde{\mathcal I} u_h)'\eval{\widetilde K_i} = \frac{u_h(\widetilde x_i) - u_h(\widetilde x_{i-1})}{\widetilde x_i - \widetilde x_{i-1}},
\end{equation}
where an exact Taylor expansion allows to compute
\begin{equation}
u_h(\widetilde x_{i-1}) = u_h(x_{i-1}) + h^p\alpha_{i-1} u_h'(\widetilde x_{i-1}).
\end{equation}
Hence, it holds
\begin{equation}
(\widetilde{\mathcal I} u_h)'\eval{\widetilde K_i} = \frac{x_i-x_{i-1}}{\widetilde x_i - \widetilde x_{i-1}} u_h'\eval{K_i} + h^p \frac{\alpha_i u_h'(\widetilde x_i) - \alpha_{i-1} u_h'(\widetilde x_{i-1})}{\widetilde x_i - \widetilde x_{i-1}},
\end{equation}
which we can rewrite rearranging terms as
\begin{equation}\label{eq:InterpDerDiff}
(\widetilde{\mathcal I} u_h)'\eval{\widetilde K_i} - u_h'\eval{K_i} = h^p \frac{\alpha_i \left(u_h'(\widetilde x_i) - u_h'\eval{K_i}\right) + \alpha_{i-1} \left(u_h'\eval{K_i} - u_h'(\widetilde x_{i-1})\right)}{\widetilde x_i - \widetilde x_{i-1}}.
\end{equation}
It is clear then that the expression above depends on the signs of the variables $\alpha_{i-1}$ and $\alpha_i$. For simplicity of notation, we therefore introduce the events $A_{i,j}^{(s_i, s_j)} \in \mathcal A$, where $s_i, s_j \in \{+,-\}$, defined as
\begin{equation}
A_{i,j}^{(s_i, s_j)} \coloneqq \{\omega \in \Omega \colon \alpha_i(\omega) \in \mathbb{R}^{s_i}, \alpha_j(\omega) \in \mathbb{R}^{s_j}\}.
\end{equation}
We now define $e_h \coloneqq u_h - \widetilde{\mathcal I}u_h$ and write for any $i = 1, \ldots, N$
\begin{equation}
\operatorname{\mathbb{E}}\norm{e_h'}_{L^2(\widetilde K_i)}^2 = \operatorname{\mathbb{E}}\left(I_{i-1, i} + I_i + I_{i+1,i} \right),
\end{equation}
with
\begin{equation}
I_{i,j} \coloneqq \int_{K_i \cap \widetilde K_j}(e_h')^2 \, \mathrm{d} x,
\end{equation}
and where we write $I_i \coloneqq I_{i,i}$ and adopt the convention $I_{0,1} = I_{N+1,N} = 0$. In what follows we study $\operatorname{\mathbb{E}} I_{i,j}$. We first consider $I_i$, which we express by the law of total expectation as
\begin{equation}\label{eq:IiSplit}
\operatorname{\mathbb{E}} I_i = \sum_{s_{i-1},s_i \in \{-,+\}} \operatorname{\mathbb{E}} \left[I_i \mid A_{i-1,i}^{(s_{i-1},s_i)}\right]P(A_{i-1,i}^{(s_{i-1},s_i)}).
\end{equation}
In the trivial case $\alpha_{i-1} > 0$ and $\alpha_i < 0$, i.e., if $A_{i-1,i}^{(+,-)}$ occurs, we have $\widetilde K_i \cap K_i = \widetilde K_i$ and therefore $\operatorname{\mathbb{E}}[I_i\mid A_{i-1,i}^{(+,-)}] = 0$. If $A_{i-1,i}^{(-,-)}$ occurs, the equality \eqref{eq:InterpDerDiff} simplifies to
\begin{equation}
(\widetilde{\mathcal I} u_h)'\eval{\widetilde K_i} - u_h'\eval{K_i} = -\frac{h^p\alpha_{i-1}}{\widetilde x_i - \widetilde x_{i-1}} \dbrack{u_h'}_{x_{i-1}}.
\end{equation}
Since in this case $\abs{K_i \cap \widetilde K_i} = \widetilde x_i - x_{i-1}$, integrating yields
\begin{equation}\label{eq:Ii--}
I_i = \frac{h^{2p}(\widetilde x_i - x_{i-1})}{(\widetilde x_i - \widetilde x_{i-1})^2} \alpha_{i-1}^2\dbrack{u_h'}_{x_{i-1}}^2.
\end{equation}
Similar calculations allow to show that if $A_{i-1,i}^{(+,+)}$ occurs, it holds
\begin{equation}\label{eq:Ii++}
I_i = \frac{h^{2p}(x_i - \widetilde x_{i-1})}{(\widetilde x_i - \widetilde x_{i-1})^2} \alpha_i^2 \dbrack{u_h'}_{x_i}^2,
\end{equation}
Finally, if $A_{i-1,i}^{(-,+)}$ occurs, we get
\begin{equation}\label{eq:Ii-+}
I_i = \frac{h^{2p}(x_i - x_{i-1})}{(\widetilde x_i - \widetilde x_{i-1})^2} \xi_i^2.
\end{equation}
where we denote
\begin{equation}\label{eq:ProofXi}
\xi_i \coloneqq \alpha_{i-1}\dbrack{u_h'}_{x_{i-1}} + \alpha_i\dbrack{u_h'}_{x_i}.
\end{equation}
We thus have an expression for $\operatorname{\mathbb{E}} I_i$ due to \eqref{eq:IiSplit}. We now turn to $I_{i-1,i}$. Since $\widetilde K_i \cap K_{i-1} = \emptyset$ if $\alpha_{i-1} > 0$, we have by the law of total expectation
\begin{equation}\label{eq:Ii-1iSplit}
\operatorname{\mathbb{E}} I_{i-1,i} = \operatorname{\mathbb{E}}\left[I_{i-1,i}\mid A_{i-1,i}^{(-,-)}\right]P(A_{i-1,i}^{(-,-)}) + \operatorname{\mathbb{E}}\left[I_{i-1,i} \mid A_{i-1,i}^{(-,+)}\right]P(A_{i-1,i}^{(-,+)}).
\end{equation}
Let us remark that adding and subtracting $u_h'\eval{K_i}$ yields
\begin{equation}\label{eq:InterpDiffDerivatives2}
(\mathcal{\widetilde I} u_h)'\eval{\widetilde K_i} - u_h'\eval{K_{i-1}} = (\mathcal{\widetilde I} u_h)'\eval{\widetilde K_i} - u_h'\eval{K_i} - \dbrack{u_h'}_{x_{i-1}}.
\end{equation}
The same computations employed for $I_i$ allow to conclude that
\begin{equation}
I_{i-1,i} =
\left\{
\begin{alignedat}{2}
&-h^p \alpha_{i-1} \left(\frac{h^p\alpha_{i-1}}{\widetilde x_i - \widetilde x_{i-1}} + 1\right)^2 \dbrack{u_h'}_{x_{i-1}}^2, &&\text{if } A_{i-1, i}^{(-,-)} \text{ occurs}, \\
& -h^p \alpha_{i-1} \left(\frac{h^p}{\widetilde x_i - \widetilde x_{i-1}} \xi_i + \dbrack{u_h'}_{x_{i-1}}\right)^2, \quad&& \text{if } A_{i-1, i}^{(-,+)} \text{ occurs}.
\end{alignedat}
\right.
\end{equation}
which, replaced into \eqref{eq:Ii-1iSplit} gives the final expression for $\operatorname{\mathbb{E}} I_{i-1, i}$. Similarly, for $I_{i+1,i}$ we have
\begin{equation}
\operatorname{\mathbb{E}} I_{i+1,i} = \operatorname{\mathbb{E}}\left[I_{i+1,i}\mid A_{i-1,i}^{(+,+)}\right]P(A_{i-1,i}^{(+,+)}) + \operatorname{\mathbb{E}}\left[I_{i+1,i} \mid A_{i-1,i}^{(-,+)}\right]P(A_{i-1,i}^{(-,+)}),
\end{equation}
where
\begin{equation}
I_{i+1,i} =
\left\{
\begin{alignedat}{2}
&h^p \alpha_i \left(\frac{h^p\alpha_i}{\widetilde x_i - \widetilde x_{i-1}} - 1\right)^2 \dbrack{u_h'}_{x_i}^2, &&\text{if } A_{i-1, i}^{(+,+)} \text{ occurs}, \\
& h^p \alpha_i \left(\frac{h^p}{\widetilde x_i - \widetilde x_{i-1}} \xi_i - \dbrack{u_h'}_{x_i}\right)^2, \quad&& \text{if } A_{i-1, i}^{(-,+)} \text{ occurs}.
\end{alignedat}
\right.
\end{equation}
We now reassemble the quantity $I_i + I_{i-1,i} + I_{i+1,i}$ by grouping terms with regards to their conditioning on the sign of $(\alpha_{i-1},\alpha_i)$. In particular, some algebraic simplifications yield
\begin{equation}
I_i + I_{i-1,i} + I_{i+1,i} =
\left\{
\begin{alignedat}{2}
&h^p\alpha_i \dbrack{u_h'}_{x_i}^2 - \frac{h^{2p}\alpha_i^2}{\widetilde x_i - \widetilde x_{i-1}}\dbrack{u_h'}_{x_i}^2, &&\text{if } A_{i-1, i}^{(+,+)} \text{ occurs}, \\
&-h^p\alpha_{i-1} \dbrack{u_h'}_{x_{i-1}}^2 - \frac{h^{2p}\alpha_{i-1}^2}{\widetilde x_i - \widetilde x_{i-1}}\dbrack{u_h'}_{x_{i-1}}^2, &&\text{if } A_{i-1, i}^{(-,-)} \text{ occurs}, \\
& h^p\alpha_i \dbrack{u_h'}_{x_i}^2 - h^p\alpha_{i-1} \dbrack{u_h'}_{x_{i-1}}^2 - \frac{h^{2p}}{\widetilde x_i - \widetilde x_{i-1}} \xi_i^2, \quad&& \text{if } A_{i-1, i}^{(-,+)} \text{ occurs}.
\end{alignedat}
\right.
\end{equation}
We now can compute the estimator $\widetilde{\mathcal E}_{h,1}$ by summing its local contributions, as in
\begin{equation}
\begin{aligned}
\widetilde{\mathcal E}_{h,1}^2 &= \sum_{i=1}^N \eta_{K,1}^2 = \sum_{i=1}^N h_i^{-(p-1)} \norm{e_h'}_{L^2(\widetilde K_i)}^2\\
&= \sum_{i=1}^N h_i^{-(p-1)} \operatorname{\mathbb{E}}(I_i + I_{i-1,i} + I_{i+1,i}) \eqqcolon J_1 + J_2,
\end{aligned}
\end{equation}
where $J_1$ and $J_2$ are given by
\begin{equation}
\begin{aligned}
J_1 &\coloneqq \frac{h^p}{2} \sum_{i=1}^N h_i^{-(p-1)}\left(\dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i \mid \alpha_i > 0} - \dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}\mid \alpha_i < 0}\right),
\\
J_2 &\coloneqq -\frac{h^{2p}}{4} \sum_{i=1}^N h_i^{-(p-1)}
\begin{aligned}[t]&\left(\dbrack{u_h'}_{x_{i-1}}^2\Eb{\frac{\alpha_{i-1}^2}{\widetilde x_i - \widetilde x_{i-1}} \mid A_{i-1,i}^{(-,-)}} + \dbrack{u_h'}_{x_i}^2 \Eb{\frac{\alpha_i^2}{\widetilde x_i - \widetilde x_{i-1}} \mid A_{i-1,i}^{(+,+)}}\right.\\
&\left. + \Eb{\frac{\xi_i^2}{\widetilde x_i - \widetilde x_{i-1}} \mid A_{i-1,i}^{(-,+)}} \right).
\end{aligned}
\end{aligned}
\end{equation}
Let us consider $J_1$ and $J_2$ separately. Rearranging the sum, noticing that under \cref{as:meshPerturbation}\ref{as:meshPerturbation_sym} it holds $\Eb{\alpha_i \mid \alpha_i > 0} = -\Eb{\alpha_i \mid \alpha_i < 0} = \operatorname{\mathbb{E}}\abs{\alpha_i}$ and recalling that $\alpha_i = (\bar h_i h^{-1})^p \bar \alpha_i$, we obtain
\begin{equation}
\begin{aligned}
J_1 &= \frac{h^p}2 \sum_{i=1}^{N-1} \left(h_i^{-(p-1)} + h_{i+1}^{-(p-1)}\right)\dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i \mid \alpha_i > 0}\\
&= \frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}}{2} \sum_{i=1}^{N-1} \left(h_i^{-(p-1)} + h_{i+1}^{-(p-1)}\right) \bar h_i^p \dbrack{u_h'}_{x_i}^2 .
\end{aligned}
\end{equation}
Now, let us remark that if the mesh is $\lambda$-quasi-uniform, it holds
\begin{equation}
\left(1+\lambda^{-(p-1)}\right) \bar h_i \leq \left(h_i^{-(p-1)} + h_{i+1}^{-(p-1)}\right)\bar h_i^p \leq \left(1+\lambda^{p-1}\right) \bar h_i,
\end{equation}
which implies
\begin{equation}\label{eq:ProofInterpBoundJ1}
\frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}\left(1+\lambda^{-(p-1)}\right)}{2} \mathcal J^2(u_h) \leq J_1 \leq \frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}\left(1+\lambda^{p-1}\right)}{2} \mathcal J^2(u_h).
\end{equation}
We now turn to $J_2$. Clearly, we have $J_2 \leq 0$, which implies the desired upper bound together with \eqref{eq:ProofInterpBoundJ1}. For the lower bound, we remark that in both cases $A_{i-1,i}^{(+,+)}$ and $A_{i-1,i}^{(-,-)}$ occur, we have that $\widetilde x_i - \widetilde x_{i-1} \geq h_i/2$, and if $A_{i-1,i}^{(-,+)}$ occurs, we have $\widetilde x_i - \widetilde x_{i-1} \geq h_i$. Hence, simplifying the conditioning in the first and second terms, we obtain
\begin{equation}
J_2 \geq -\frac{h^{2p}}{4}\sum_{i=1}^N h_i^{-p}
\begin{aligned}[t]
&\left(2\dbrack{u_h'}_{x_i}^2\Eb{\alpha_i^2 \mid \alpha_i > 0} + 2\dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2\mid \alpha_{i-1} < 0} \right. \\
&+ \left. \Eb{\xi_i^2\mid A_{i-1,i}^{(-, +)}}\right).
\end{aligned}
\end{equation}
We now consider $\xi_i$ given in \eqref{eq:ProofXi} and use $(a+b)^2 \leq 2(a^2 + b^2)$ for $a = \alpha_{i-1}\dbrack{u_h'}_{x_{i-1}}$ and $b = \alpha_i \dbrack{u_h'}_{x_i}$ to obtain
\begin{equation}
\Eb{\xi_i^2\mid A_{i-1,i}^{(-, +)}} \leq 2\dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2 \mid \alpha_{i-1} < 0} + 2\dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i^2 \mid \alpha_i > 0}.
\end{equation}
Therefore
\begin{equation}
J_2 \geq -h^{2p}\sum_{i=1}^N h_i^{-p} \left(\dbrack{u_h'}_{x_i}^2\Eb{\alpha_i^2 \mid \alpha_i > 0} + \dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2\mid \alpha_{i-1} < 0}\right).
\end{equation}
Rewriting the sum and replacing the definition of $\alpha_i$ yields
\begin{equation}
J_2 \geq -\sum_{i=1}^{N-1}\bar h_i^{2p}\dbrack{u_h'}_{x_i}^2 \left(h_i^{-p}\Eb{\bar\alpha_i^2 \mid \bar\alpha_i > 0} + h_{i+1}^{-p}\Eb{\bar \alpha_i^2 \mid \bar\alpha_i < 0}\right).
\end{equation}
Now $\bar h_i = \min\{h_i, h_{i+1}\}$ implies $h_i^{-p} \leq \bar h_i^{-p}$ and $h_{i+1}^{-p} \leq \bar h_i^{-p}$, which gives
\begin{equation}
\begin{aligned}
J_2 &\geq -2\sum_{i=1}^{N-1} \bar h_i^{p}\dbrack{u_h'}_{x_i}^2 \left(\frac12\Eb{\bar\alpha_i^2 \mid \bar \alpha_i > 0} + \frac12 \Eb{\bar \alpha_i^2 \mid \bar \alpha_i < 0}\right) \\
&\geq -2\operatorname{\mathbb{E}}\abs{\bar \alpha_1}^2 \sum_{i=1}^{N-1} \bar h_i^{p}\dbrack{u_h'}_{x_i}^2,
\end{aligned}
\end{equation}
where we applied the law of total expectation on the second line. Finally, we have $\bar h_i \leq h$ and $p \geq 1$, which yield
\begin{equation}
J_2 \geq -2 \operatorname{\mathbb{E}}\abs{\bar \alpha_1}^2 h^{p-1} \mathcal J^2(u_h).
\end{equation}
Combining this with \eqref{eq:ProofInterpBoundJ1} then yields the desired lower bound and thus concludes the proof.
\end{proof}
Let us remark that the coefficient appearing in the lower bound of \cref{lem:EquivProb1Jump} is positive if \cref{as:AssumptionAPosteriori} holds. We now prove the equivalence of the estimator $\widetilde{\mathcal E}_{h,2}$ given in \cref{def:ProbErrEst} with $\mathcal J(u_h)$.
\begin{lemma}\label{lem:EquivProb2Jump} Let \cref{as:meshPerturbation} hold and let the mesh $\mathcal T_h$ be $\lambda$-quasi uniform. Then, it holds
\begin{equation}
\frac{\operatorname{\mathbb{E}}\abs{\bar \alpha_1}^2}{2(1+\lambda)^2\lambda^{2p-1}} \mathcal J^2(u_h) \leq \widetilde{\mathcal E}_{h,2}^2 \leq 3\operatorname{\mathbb{E}}\abs{\bar \alpha_1}^2 \mathcal J^2(u_h),
\end{equation}
where $\widetilde {\mathcal E}_{h,2}$ is given in \cref{def:ProbErrEst}.
\end{lemma}
\begin{proof} As $\abs{K_i} = h_i$, we have
\begin{equation}
\widetilde{\mathcal E}_{h,2} = \sum_{i=1}^N h_i^{-(2p-3)} \Eb{\abs{u_h'\eval{K_i} - (\widetilde {\mathcal I} u_h)'\eval{\widetilde K_i}}^2}.
\end{equation}
Proceeding similarly to \eqref{eq:Ii--}, \eqref{eq:Ii++} and \eqref{eq:Ii-+} and applying the law of total expectation, we obtain
\begin{equation}\label{eq:ProofSecondInterp}
\begin{split}
\Eb{\abs{u_h'\eval{K_i} - (\widetilde {\mathcal I} u_h)'\eval{\widetilde K_i}}^2} =
\begin{aligned}[t]
&\frac{h^{2p}}4\dbrack{u_h'}_{x_i}^2\Eb{\frac{\alpha_i^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(+,+)}}\\
&+ \frac{h^{2p}}4\dbrack{u_h'}_{x_{i-1}}^2 \Eb{\frac{\alpha_{i-1}^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,-)}} \\
&+ \frac{h^{2p}}4 \Eb{\frac{\xi_i^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,+)}},
\end{aligned}
\end{split}
\end{equation}
where we recall the notation $\xi_i$ introduced in \eqref{eq:ProofXi}. Let us first consider the lower bound. Since $\xi_i^2 \geq 0$ a.s., and $\widetilde x_i - \widetilde x_{i-1} \leq (1+\lambda)h_i$ a.s. under the assumption that the mesh is $\lambda$-quasi-uniform, we have
\begin{equation}
\Eb{\abs{u_h'\eval{K_i} - (\widetilde {\mathcal I} u_h)'\eval{\widetilde K_i}}^2} \geq
\frac{h^{2p} h_i^{-2}}{4(1+\lambda)^2}
\begin{aligned}[t]
&\left(\dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i^2 \mid \alpha_i > 0} \right. \\
&\left. + \dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2 \mid \alpha_{i-1} < 0} \right).
\end{aligned}
\end{equation}
Assembling the sum, rearranging terms and recalling that $\alpha_i = (h^{-1}\bar h_i)^{p} \bar \alpha_i$ with $\bar h_i = \min\{h_i, h_{i+1}\}$, we then obtain
\begin{equation}
\begin{aligned}
\widetilde{\mathcal E}_{h,2}^2 &\geq
\frac1{2(1+\lambda)^2}\sum_{i=1}^{N-1} \bar h_i^{2p} h_i^{1-2p} \dbrack{u_h'}_{x_i}^2 \left(\frac12\Eb{\bar\alpha_i^2 \mid \bar\alpha_i > 0} + \frac12\Eb{\bar\alpha_i^2 \mid \bar\alpha_i < 0}\right) \\
&\geq \frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}^2}{2(1+\lambda)^2\lambda^{2p-1}} \sum_{i=1}^{N-1} \bar h_i \dbrack{u_h'}_{x_i}^2 = \frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}^2}{2(1+\lambda)^2\lambda^{2p-1}}\mathcal J^2(u_h),
\end{aligned}
\end{equation}
where we employed the law of total expectation and the inequality $h_i^{1-2p} \leq \lambda^{1-2p} \bar h_i^{1-2p}$ on the second line. Hence, we proved the lower bound. For the upper bound, using again the inequality $(a+b)^2 \leq 2(a^2 + b^2)$ we obtain
\begin{equation}
\xi_i^2 \leq 2\alpha_i^2 \dbrack{u_h'}_{x_i}^2 + 2\alpha_{i-1}^2 \dbrack{u_h'}_{x_{i-1}}^2, \quad \text{a.s},
\end{equation}
so that
\begin{equation}
\Eb{\frac{\xi_i^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,+)}} \leq
\begin{aligned}[t]
&2 \dbrack{u_h'}_{x_i}^2 \Eb{\frac{\alpha_i^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,+)}} \\
&+ 2\dbrack{u_h'}_{x_{i-1}}^2 \Eb{\frac{\alpha_{i-1}^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,+)}}.
\end{aligned}
\end{equation}
Under $A_{i-1,i}^{(-,+)}$, we have $\widetilde x_i - \widetilde x_{i-1} \geq h_i$, which implies
\begin{equation}
\Eb{\frac{\xi_i^2}{(\widetilde x_i - \widetilde x_{i-1})^2} \mid A_{i-1,i}^{(-,+)}} \leq 2h_i^{-2} \left( \dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i^2 \mid \alpha_i > 0} + \dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2 \mid \alpha_{i-1} < 0} \right).
\end{equation}
Then, considering that under $A_{i-1,i}^{(+,+)}$ or $A_{i-1,i}^{(-,-)}$ it holds $\widetilde x_i - \widetilde x_{i-1} \geq h_i/2$ and plugging into \eqref{eq:ProofSecondInterp} we have
\begin{equation}
\Eb{\abs{u_h'\eval{K_i} - (\widetilde {\mathcal I} u_h)'\eval{\widetilde K_i}}^2} \leq
\frac32 h_i^{-2} h^{2p} \left( \dbrack{u_h'}_{x_i}^2 \Eb{\alpha_i^2 \mid \alpha_i > 0} + \dbrack{u_h'}_{x_{i-1}}^2 \Eb{\alpha_{i-1}^2 \mid \alpha_{i-1} < 0} \right).
\end{equation}
We can therefore reassemble and rearrange the sum following the same procedure as for the lower bound, which, together with $h_i^{1-2p} \leq \bar h_i^{1-2p}$, yields
\begin{equation}
\widetilde{\mathcal E}_{h,2}^2 \leq 3\operatorname{\mathbb{E}}\abs{\bar\alpha_1}^2 \mathcal J^2(u_h),
\end{equation}
which proves the desired result.
\end{proof}
We finally prove the equivalence of the deterministic error estimator $\mathcal E_h$ given in \cref{def:DetErrEst} with the quantity $\mathcal J(u_h)$.
\begin{lemma}\label{lem:EquivDetJump} Let the mesh $\mathcal T_h$ be $\lambda$-quasi-uniform. Then, it holds
\begin{equation}
\frac{\lambda m^2}{6(1+\lambda)^3 M^2}\mathcal J^2(u_h) \leq \mathcal E_h^2 \leq \frac{2\lambda^2 M^2}{3(1+\lambda)m^2} \mathcal J^2(u_h),
\end{equation}
where $\mathcal E_h$ is given in \cref{def:DetErrEst} and where $m = \underline \kappa$ and $M = \norm{\kappa}_{L^\infty(D)}$.
\end{lemma}
\begin{proof} Simple algebraic computations yield
\begin{equation}
\norm{\ell_j}_{L^2(K_j)}^2 = \frac{h_j}{3} \left(\tau_{j,0}^2 - \tau_{j,0}\tau_{j,1} + \tau_{j,1}^2\right),
\end{equation}
where $\ell_j$ are the linear functions employed in \cref{def:DetErrEst}. Applying the inequalities $(a^2+b^2)/2 \leq a^2-ab+b^2 \leq 2(a^2 + b^2)$ we obtain
\begin{equation}
\frac{h_j}{6M^2} \left(\tau_{j,0}^2 + \tau_{j,1}^2\right) \leq \eta_j^2 \leq \frac{2h_j}{3m^2} \left(\tau_{j,0}^2 + \tau_{j,1}^2\right).
\end{equation}
We now remark that if the mesh $\mathcal T_h$ is $\lambda$-quasi-uniform and under the assumptions on $\kappa$ it holds for $k \in \{0,1\}$
\begin{equation}
\frac{m^2}{(1+\lambda)^2} \dbrack{u_h'}_{x_{j-k}}^2\leq \tau_{j,k}^2 \leq \frac{\lambda^2 M^2}{(1+\lambda)^2}\dbrack{u_h'}_{x_{j-k}}^2,
\end{equation}
which, in turn, implies
\begin{equation}
\frac{m^2h_j }{6(1+\lambda)^2M^2} \left(\dbrack{u_h'}_{x_{j-1}}^2 + \dbrack{u_h'}_{x_j}^2\right) \leq \eta_j^2 \leq \frac{2\lambda^2 M^2 h_j}{3(1+\lambda)^2m^2} \left(\dbrack{u_h'}_{x_{j-1}}^2 + \dbrack{u_h'}_{x_j}^2\right).
\end{equation}
We now focus on the upper bound. Reassembling the global error estimator $\mathcal E_h$, we have
\begin{equation}
\begin{aligned}
\mathcal E_h^2 &\leq \frac{2\lambda^2 M^2}{3(1+\lambda)^2m^2} \sum_{j=1}^N h_j\left(\dbrack{u_h'}_{x_{j-1}}^2 + \dbrack{u_h'}_{x_j}^2\right)\\
&= \frac{2\lambda^2 M^2}{3(1+\lambda)^2m^2} \sum_{j=1}^{N-1} (h_j + h_{j+1}) \dbrack{u_h'}_{x_j}^2 \\
&\leq \frac{2\lambda^2 M^2}{3(1+\lambda)m^2} \mathcal J^2(u_h),
\end{aligned}
\end{equation}
where we recall $\bar h_j = \min\{h_j, h_{j+1}\}$, so that $h_j + h_{j+1} \leq (1+\lambda)\bar h_j$. We conclude the proof proceeding similarly for the lower bound as in \cref{lem:EquivProb2Jump}.
\end{proof}
We can finally prove \cref{thm:MainThmAPosteriori} and conclude the error analysis.
\begin{proof}[Proof of \cref{thm:MainThmAPosteriori}] Let us first consider $\widetilde{\mathcal E}_{h,1}$. Under \cref{as:AssumptionAPosteriori}, we have for the lower bound of \cref{lem:EquivProb1Jump}
\begin{equation}
\left(\frac{\operatorname{\mathbb{E}}\abs{\bar\alpha_1}\left(1+\lambda^{-(p-1)}\right)}{2} - 2h^{p-1}\operatorname{\mathbb{E}}\abs{\bar\alpha_1}^2\right) \mathcal J^2(u_h) \geq C \operatorname{\mathbb{E}}\abs{\bar\alpha_1} \mathcal J^2(u_h)
\end{equation}
for a constant $C > 0$. Hence, due to \cref{lem:EquivDetJump} we have that there exists a constant $\widehat C$ such that
\begin{equation}
\widetilde{\mathcal E}_{h,1} \geq \widehat C \mathcal E_h,
\end{equation}
and therefore, \cref{thm:BabuskaThm} implies
\begin{equation}
\norm{u-u_h}_V \leq C_{\mathrm{up}} \mathcal E_h \leq C_{\mathrm{up}} \widehat C\widetilde{\mathcal E}_{h,1},
\end{equation}
which yields the desired upper bound with $\widetilde C_{\mathrm{up}} = \widehat C C_{\mathrm{up}}$. The lower bound follows equivalently under the additional regularity required by \cref{thm:BabuskaThm}. Similarly, the results for $\widetilde{\mathcal E}_{h,2}$ follows from \cref{lem:EquivProb1Jump,lem:EquivDetJump}, together with \cref{thm:BabuskaThm}.
\end{proof}
\section{Conclusion}\label{sec:Conclusion}
We have introduced a novel probabilistic methods for PDEs based on the FEM and random meshes, the RM-FEM. We demonstrated how our methodology can be successful when employed in pipelines of computations, such as Bayesian inverse problems. We also show a rigorous use of probabilistic methods for a posteriori error estimators, often speculated in the field. Extending such analysis to PN methods for ODEs would be of interest, thus creating a link between the guiding principles of PN and more classical theories. Generalizing the analysis of the RM-FEM to higher-dimensional PDEs as well as for parabolic or hyperbolic problems represent also interesting future work.
\subsection*{Acknowledgements}
The authors are partially supported by the Swiss National Science Foundation, under grant No. 200020\_172710.
\def$'${$'$}
|
\section*{\refname}}{}{}{}
\usepackage[margin=1.0in,hmarginratio=1:1,top=32mm,columnsep=15pt]{geometry}
\usepackage{color}
\definecolor{dark-gray}{gray}{0.1}
\usepackage{times}
\usepackage{microtype}
\usepackage[mathscr]{euscript}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[Symbol]{upgreek}
\DeclareMathAlphabet{\mathscrbf}{OMS}{mdugm}{b}{n}
\DeclareMathSizes{10}{9}{7}{5}
\usepackage[hang, font={footnotesize}, labelfont={bf,up}, textfont={sf,up}]{caption}
\usepackage{booktabs}
\usepackage{mwe}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{array}
\usepackage{longtable}
\usepackage{morefloats}
\usepackage{enumitem}
\setlist[itemize]{noitemsep}
\usepackage{abstract}
\renewcommand{\abstracttextfont}{\normalfont}
\AtBeginDocument{\renewcommand{\abstractname}{}}
\usepackage{titlesec}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\thesection\Alph{subsection}.}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}.}
\titleformat{\section}[block]{\normalfont\sffamily\bfseries}{\thesection}{1em}{\MakeUppercase}{}
\titleformat{\subsection}[block]{\normalfont\sffamily\bfseries}{\thesubsection}{1em}{}{}
\titleformat{\subsubsection}[block]{\normalfont\sffamily\bfseries}{\thesubsubsection}{1em}{}{}
\titlespacing*{\section}{0.0em}{1em}{0.25em}
\titlespacing*{\subsection}{0.0em}{1em}{0.25em}
\usepackage{indentfirst}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{\color{dark-gray}\textit{}}
\rhead{ {\it Submitted to ANS/NT (2021). LA-UR-21-20144.} }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{
\fancyhf{}
\lhead{\color{dark-gray}\textit{}}
\rhead{ {\it Submitted to ANS/NT (2021). LA-UR-21-20144.} }
}
\renewcommand{\thefootnote}{\textit{\alph{footnote}}}
\usepackage{titling}
\usepackage{hyperref}
\hypersetup{
backref=true,
pagebackref=true,
hyperindex=true,
colorlinks=true,
breaklinks=true,
urlcolor= black,
linkcolor=blue,
bookmarks=true,
bookmarksopen=false,
filecolor=black,
citecolor=blue
}
\title{
\vspace{-0.3in}
\sffamily{\large\bfseries
On the origins of Lagrangian hydrodynamic methods}
\vspace{-0.1in}
}
\author{%
\normalsize Nathaniel R. Morgan \thanks{corresponding author: <EMAIL>}\, and Billy J. Archer \\
\normalsize X-Computational Physics Division \\ [-0.5ex]
\normalsize Los Alamos National Laboratory \\ [-0.5ex]
\normalsize Los Alamos, NM 87545
}
\date{ }
\renewcommand{\maketitlehookd}{%
\begin{abstract}
\vspace*{-0.5in}
\noindent {\normalfont\textbf{Abstract}\textemdash}
\noindent
The intent of this paper is to discuss the history and origins of Lagrangian hydrodynamic methods for simulating shock driven flows. The majority of the pioneering research occurred within the Manhattan Project. A range of Lagrangian hydrodynamic schemes were created between 1943 and 1948 by John von Neumann, Rudolf Peierls, Tony Skyrme, and Robert Richtmyer. These schemes varied significantly from each other; however, they all used a staggered-grid and finite difference approximations of the derivatives in the governing equations, where the first scheme was by von Neumann.
These ground-breaking schemes were principally published in Los Alamos laboratory reports that were eventually declassified many decades after authorship, which motivates us to document the work and describe the accompanying history in a paper that is accessible to the broader scientific community. Furthermore, we seek to correct historical omissions on the pivotal contributions made by Peierls and Skyrme to creating robust Lagrangian hydrodynamic methods for simulating shock driven flows. Understanding the history of Lagrangian hydrodynamic methods can help explain the origins of many modern schemes and may inspire the pursuit of new schemes.
\end{abstract}
}
\begin{document}
\maketitle
\section{Prologue}
\label{sec:prolog}
We will start by providing an overview of the history surrounding the hydrodynamic methods work between 1943 and 1948 to establish context and communicate the sequence of events that occurred over that time frame to yield a suite of Lagrangian hydrodynamic methods. Subsequent sections in the paper will provide further details on the governing formulations and the four distinct numerical methods by John von Neumann, Rudolf Peierls, Tony H.R Skyrme, and then Robert Richtmyer.
Researchers at Los Alamos seemed surprisingly ready in early 1944 to numerically solve the partial differential equations for shock hydrodynamics. Looking back to 1940 through 1943, this readiness is not surprising. With the advent of World War II (WWII) the effects of the blast from bombs and artillery became of intense interest. Blast waves are described by a set of non-linear, time-dependent, partial differential equations. Further, the shock wave in an inviscid fluid has a discontinuous solution. These equations can only be solved analytically for a few very special cases, in general the solution requires numerical methods. Exploration of blast wave effects were organized in both the United States (U.S.) and the United Kingdom (U.K.). In the U.S., the National Defense Research Committee (NDRC) was established in June 1940. Section B concerned ``Bombs, Fuels, Gases, and Chemical Problems''\cite{1}. When the NDRC was superseded by the Office of Scientific Research and Development (OSRD) in June 1941, parts of the NDRC Section B became Division 2, ``Effects of Impact and Explosion'', and Division 8, ``Explosives''\cite{1}. Vannevar Bush was the chairman of OSRD with James B. Conant as chairman of NDRC.
In May 1942 OSRD Division 8 issued a report on the ``general conditions for the existence of shock waves'' by Hans Bethe, endorsed by George B. Kistiakowsky, Chairman of Section B-1\cite{2}. Hans Bethe was also exploring the pressure wave generated by underwater explosions\cite{3,4}. von Neumann published a series of OSRD reports on high explosive detonation waves and shock waves in 1942 and 1943\cite{5, 6, 7, 8}. See the Division 2 summary for the many reports on explosion effects\cite{9}.
Meanwhile in England, William G. Penney was carrying out research on shock waves due to explosions, summarized in 1950\cite{10}, and also on the effects of blast waves during the London Blitz\cite{11}, Geoffrey I. Taylor was a member of the British delegation with long experience in hydrodynamics, shock waves, and explosives\cite{11, 12, 13, 14}. Peierls was also working on the effects of blasts, corresponding with Taylor and Kistiakowsky\cite{11}. Peierls brought his assistants Klaus Fuchs and Skyrme to Los Alamos as members of the British delegation. Skyrme would make significant discoveries that enabled robust and accurate hydrodynamic calculations with strong shocks. By the time Project Y, the Los Alamos branch of the Manhattan Project, was formed in 1943 there was broad experience with shock hydrodynamics by the senior staff of both the U.S. and U.K.
During the summer of 1943 Robert Serber and Edward Teller derived an analytic approach to solve the shock hydrodynamics problem\cite{15}.
A set of IBM Punch Card Accounting Machines (PCAM) had been ordered in January 1944 for use by Stanley Frankel and Eldred Nelson to solve the gun bomb neutronics problem.
In March 1944 the tasking of Frankel and Nelson was changed to numerically solve a range of problems, including hydrodynamics problems.
See the companion ANS article for a discussion of the PCAM and the computing facility\cite{ArcherComputers}.
In March 1944, Hans Bethe reorganized T-Division, with the IBM calculations in Group T-2 under Serber\cite{18}.
\begin{itemize}
\item T-1, ``Hydrodynamics of Implosion, Super'', Edward Teller
\item T-2, ``Diffusion Theory, IBM Calculations, and Experiments'', Robert Serber
\item T-3, ``Experiments, Efficiency Calculations, Radiation Hydrodynamics'', Victor Weisskopf
\item T-4, ``Diffusion Problems'', Richard Feynman
\item T-5, ``Computations'', Donald Flanders
\end{itemize}
Peierls moved to Los Alamos in June 1944, replacing Teller as T-1 Group Leader.
Skyrme joined Los Alamos in T-1 in July 1944.
The stage was now set for researchers at Los Alamos to create hydrodynamic methods to simulate problems with strong shocks.
\section{History}
\label{sec:history}
After von Neumann visited Los Alamos in September and October 1943, he studied how to numerically solve the shock hydrodynamics equations.
The first 1D Lagrangian hydrodynamic method was a staggered-grid finite difference method, created by von Neumann, and was published in an OSRD report, AMP 108.1R, in March 1944\cite{22}. This first scheme was for 1D Cartesian coordinates and has not been well discussed in the broader literature, yet it is the foundation that most Lagrangian hydrodynamic methods are built upon. Soon thereafter von Neumann extended his method to 1D spherical coordinates, but that scheme was never published beyond Los Alamos laboratory reports\cite{31}. Von Neumann tested the method on a radially-outward propagating blast wave using the IBM PCAM at the Army Ballistics Research Laboratory (BRL) at Aberdeen Maryland in early 1944\cite{22}. Von Nuemann's early finite difference scheme suffered from oscillations at the shock front.
At the time, there was much debate over the physical correctness and source of the oscillations\cite{31,37}. Several alternate approaches would later be pursued to address the oscillations. Section \ref{sec:vnhydro} describes von Neumann's previously unpublished spherical coordinate hydrodynamic method.
Meanwhile Peierls visited Los Alamos in February 1944\cite{23}. In his autobiography, Peierls recounts how he had tried to solve the blast wave equation numerically: ``I tried a step-by-step method, in which you take the initial state as known at a chain of points a certain distance apart, and then determine approximately the state of affairs a certain time interval later. One can then repeat the process''\cite{11}. Peierls described his attempt to numerically solve the blast wave equations using the step-by-step method to the Los Alamos staff. The Los Alamos theoretical staff had been trying to solve the equations analytically\cite{15}. On February 14, 1944 J. Robert Oppenheimer wrote to General Groves about Peierls' visit\cite{24}. He noted that Peierls had explained the ``British methods'' for integrating the blast wave equations in great detail. Oppenheimer was ``not satisfied with the adequacy of the methods now in use in this laboratory'' for solving the shock hydrodynamics equations.
Peierls clearly did not know about the Courant stability condition\cite{CFL1928}, he re-discovered it empirically\cite{11}. The Los Alamos staff also did not know of the Courant stability condition, so at first they referred to it as the ``Peierls'' stability condition. Von Neumann clearly did know of the Courant stability condition, he discussed it in his March 1944 paper\cite{30}. By 1945 Los Alamos was referring to it as the Courant condition.
Peierls sent a letter to Oppenheimer on March 15, 1944\cite{25} that described ``a new form of the shock wave equations which was suggested by Skyrme'', see appendix \ref{app:letters} to read the original letter. These equations are simpler than the ones Peierls described during his February 1944 visit to Los Alamos\cite{25}. Peierls approach required knowledge about the material conditions ahead of the shock, which Skyrme's method did not.
Peierls and Skyrme\cite{31, 35} proposed coupling internal boundary conditions to the underlying hydrodynamic method to remove oscillations at a shock front. With these shock-fitting methods, a higher-order central difference Lagrangian hydrodynamic method were used on either side of the shock, and then the discontinuous solutions on each side of the shock were coupled together with Rankine-Hugoniot jump conditions. The first shock-fitting Lagrangian hydrodynamic method was created by Peierls\cite{25} and is briefly described by Skyrme\cite{31} and alluded to in a letter that he sent von Neumann in March 1944\cite{25}. The Peierls scheme was viewed unfavorably at the time. Skyrme says, ``The main disadvantage of this method ... was that a cycle (n+1) could not be completed until the positions of the points (i-1) etc., behind the shock had been found by numerical integration''\cite{31}.
Skyrme created an alternative shock-fitting Lagrangian hydrodynamic method that accurately captured a discontinuous solution at a shock and evolved it across the mesh. The method by Skyrme required an iterative solver to find the shock states. That scheme appeared to have similarities to the one by Peierls, but the details on the Peierls' scheme are limited in the available records.
It is important to recognize that the shock fitting methods by Peierls and Skyrme were quite different from and predate the artificial viscosity based method by von Neumann and Richtmyer\cite{RichtmyerHydro,30}.
By mid-March 1944, researchers at Los Alamos had at least four approaches available to solve the shock hydrodynamics equations: schemes by Serber, von Neumann, Peierls, and Skyrme.
Incorporating Rankine-Hugoniot jump conditions into a numerical scheme was revolutionary for that time period. Beyond the work by Skyrme and Peierls, there was just one other shock fitting scheme at that time. Howard Emmons\cite{Emmons1, Emmons2} published in 1944 a method for steady transonic flows over surfaces that arise in aeronautic applications. Emmons created an Eulerian approach that combined a stream-function based method for the subsonic region with a separate method for supersonic region. The method by Emmons differed significantly from the Lagrangian method by Skyrme and the one by Peierls that were designed for transient shock dynamics. Shock-fitting schemes similar to Peierls' and Skryme's were not published until many decades later, for example see the work by Maurizio Di Giacinto and Mauro Valorani\cite{DIGIACINTO198961}, the shock-fitting method implemented in the Los Alamos FRONTIER code\cite{GLIMM1984, SHARP1993, GLIMM2013}, the recent shock fitting book by Onofri and Paciorri\cite{ONOFRI2017}, or the modern moving Discontinuous Galerkin method with interface condition enforcement by Corrigan et. al. \cite{mDG-ICE-AndrewC, mDG-ICE-AndrewK}. The schemes by Peierls and Skyrme were never published in a journal so they remained somewhat lost to time and unknown to the broader scientific community. The details on Skyrme's shock-fitting scheme were documented in multiple laboratory reports and letters during and after the Manhattan Project. These were declassified many decades after authorship and have since been made available to the public. Details on Peierls' shock-fitting method have not been found in the available records. Skyrme's shock fitting scheme is described in Section \ref{sec:skyrmehydro}.
Frankel, Nelson, and Naomi Livesay developed a hydrodynamics computer program at Los Alamos for the soon-to-arrive IBM PCAM in March 1944.
The program was tested in March 1944 on the Marchant calculators with the assistance of Richard Feynman and Nicholas Metropolis\cite{23,26}. The hydrodynamics code being discussed had no name, it was just referred to as the IBM code or IBM problems.
The IBM PCAM arrived in Los Alamos on April 4, 1944.
A hydrodynamic calculation was started on the IBM PCAM ``within a week of arrival'' in early April 1944\cite{23,28}.
See the companion ANS article on the PCAM and the computing facility\cite{ArcherComputers}.
The calculation used von Neumann's spherical coordinate hydrodynamic method. Note that this method is not the method normally associated with von Neumann. The method that von Neumann and Richtmyer published in 1950 is based on artificial viscosity, and is quite different from the original method by von Neumann that was used in 1944\cite{30}.
The internal boundary conditions with Skryme's approach was too complicated for the IBM PCAM and had to be performed by hand using Marchant calculators, with the results inserted into the IBM hydrodynamic calculation at the appropriate position and time.
This motivated research into alternative Lagrangian hydrodynamic methods.
As an alternative to a shock-fitting approach, Peierls suggested to von Neumann in a March 28, 1944 letter that he should add a dissipative mechanism to his hydrodynamic scheme\cite{25} to remove the spurious oscillations near a shock. Peierls said,
``Incidentally, have you thought at all about the following alternative way of avoiding discontinuity. In actual fact, the shock front has a finite width because of the viscosity and thermal conductivity of the medium. But artificially, assuming a viscosity very much larger than the actual, you can obtain instead of the discontinuity a front of a finite width, and as long as this width is small compared to the scale of the phenomenon, this should otherwise give no trouble.''\cite{25}
Appendix \ref{app:letters} provides the original letter from Peierls.
In 1948, Richtmyer\cite{RichtmyerHydro} said,
``For strong shocks it has been customary to interrupt the normal calculating routine at the discontinuity and perform a special calculation (``shock-fitting'') based on the Rankine-Hugoniot theory.''
In that report, Richtmyer advocated for a new approach to simulate shocks using viscosity (real or fictitious) to smear the shock and achieve robust solutions without explicitly fitting the shock. He said,
``It was pointed out by von Neumann that what is clearly needed is to take into account in the equations the dissipative mechanisms that operate in a physical shock to convert mechanical energy irreversibly into heat. This is the basis of the second proposal.''
With this approach, ``shocks are automatically taken care of by ... introducing a (real or fictitious) dissipation term...''
Richtmyer\cite{RichtmyerHydro} provided an analysis to show the Rankine-Hugoniot jump conditions were satisfied using an artificial viscosity. Using artificial viscosity had the advantage of simplicity and could be readily implemented on the computers of that time.
By 1948, Richtmyer had developed a shock capturing scheme that incorporated artificial viscosity \cite{RichtmyerHydro,49,30}. Richtmyer added an artificial viscosity term to Peierls and Skryme's Lagrangian hydrodynamic scheme (without the shock-fitting boundary conditions) that was in terms of the initial coordinates. He also proposed a new scheme to solve the internal energy evolution equation, which included evaluating the EOS in terms of specific volume and temperature rather than entropy\cite{RichtmyerHydro}, $p = p(v,T)$. He also presented an approach to solve the entropy evolution equation.
The methods by Richtmyer to evolve internal energy and entropy, along with some of his derivations\cite{RichtmyerHydro}, were not discussed in the paper that von Neumann and he later published in 1950\cite{30}; likewise, that paper did not discuss the earlier work on hydrodynamic methods by von Neumann, Peierls, and Skyrme. We present the details on Richtmyer's 1948 scheme in Section \ref{sec:richtmyer}.
The von Neumann and Richtmyer artificial viscosity scheme published in 1950 \cite{30} used a new staggered time integration method with a staggered spatial discretization that was in terms of the initial coordinates, where the latter came from the hydrodynamic scheme by Peierls and Skyrme, and the spatially staggered-grid approach came from earlier work by von Neumann \cite{22}.
The origins of many modern Lagrangian hydrodynamic schemes can be traced to the pioneering work by Richtmyer and von Neumann, and the impact of that work will be discussed further in the Conclusions section.
\subsection{Historical documentation}
\label{sec:challenges}
Thoroughly understanding the specifics of the early Lagrangian hydrodynamic methods is somewhat challenging for a range of reasons. There are a limited set of historical reports that document the work, and these reports were not necessarily intended to educate an outside audience. The authors were inventing the syntax to describe the numerical approaches, so at times, their syntax differs from what is used in many journal papers and textbooks; likewise, many descriptions in the report centered around using the IBM PCAM e.g., punch cards, which is quite foreign to modern-day readers. The documents also contain typographical errors.
The Los Alamos staff at the time were experimenting with various methods of handling the shocks so many options were reported. They were also pioneering the transition from classical analytic methods to numeric methods, so many of the reports discuss both. The rest of this paper seeks to decipher this complicated story of the first numerical methods to simulate shock dynamics.
\section{John von Neumann's methods}
\label{sec:vnhydro}
von Neumann derived the Lagrange equations in terms of mass coordinates for the case of compressible, non-viscous, non-conductive hydrodynamics in his March 1944 paper\cite{22}. In that paper, the position at time $t$ is $x = x(a,t)$ where ``the substance contained in the interval $a$, $a+da$ has the mass $da$''\cite{22}. For the rest of the paper, we will use the syntax by Skyrme, Peierls, and Richtmyer for consistency purposes, which deviates from what was used by von Neumann in his paper\cite{22}. Using the alternate syntax, the Lagrange evolution equations for a position $X$ in 1D Cartesian coordinates is
\begin{equation}
\label{eq:0a}
\frac{\partial^2 X}{\partial t^2} = -\frac{\partial p}{\partial m}
\end{equation}
\noindent where the pressure is $p$ and the mass is $m$. The current position is $X$, which deviates from today's commonly used convention that denotes variables in the initial coordinates with capital letters, and the current coordinates with lower-case letters. The specific volume in 1D Cartesian coordinates is
\begin{equation}
\label{eq:0b}
v = \frac{\partial X}{\partial m} = \frac{1}{\rho}
\end{equation}
\noindent
von Neumann presented a finite difference approach (based on central differences) to solve these governing equations numerically on a staggered-grid.
This is the origin of the staggered-grid approach to solve the Lagrange hydrodynamics equations that is still in use today.
The focus of von Neumann's original paper\cite{22} was on 1D Cartesian coordinates, but at the end of his paper, a short discussion was given on extending the scheme to spherical coordinates.
We will now shift the focus to von Neumann's work to extend his original scheme to spherical coordinates that was documented in laboratory reports such as the one by Skyrme\cite{31}.
Shortly after arriving at Los Alamos, Skyrme adapted his shock-fitting treatment, mentioned in Peierls' March 15, 1944 letter\cite{25}, to work with von Neumann's hydrodynamic method\cite{22}, and he documented the method in LAMS-562\cite{31}.
In what follows, we will adopt the notation of LAMS-562\cite{31}.
The Lagrange evolution equation for the radius $R$ in 1D spherical coordinates is,
\begin{equation}
\frac{\partial^2 R}{\partial t^2} = -3R^2 \frac{\partial p}{\partial m}
\end{equation}
\noindent Here $m$ is the mass coordinate of an individual Lagrangian mass-point, ``equal to ($\frac{3\pi}{4}$) times the mass enclosed within the spherical shell corresponding to any point''\cite{31}, The position of a mass element at a particular time, t, is defined as $R$. The specific volume, $v$, is defined as
\begin{equation}
\label{eq:1}
v = \frac{\partial R^3}{\partial m} = \frac{1}{\rho}
\end{equation}
von Neumann presented a staggered-grid finite difference method to solve the governing evolution equations. If the time cycle is labeled by a superscript $n$, and the mass-points are labeled by a subscript $i$, the discrete equation to be solved is
\begin{equation}
R^{n+1}_i = 2R^n_i - R^{n-1}_i - 3(R^n_i)^2\,(\Delta t)^2 \, \frac{p^n_{i+\frac{1}{2}} - p^n_{i-\frac{1}{2}} }{\Delta m}
\end{equation}
\noindent See Figure \ref{fig:mesh_variables_vn} for a graphical illustration of the variable locations.
\begin{figure}
\centering
\includegraphics[trim=0 0 0 1.1in, width=2.25in,height=!,clip=true]
{diagrams/mesh_variables_vn.pdf}
\caption{\label{fig:mesh_variables_vn} The staggered mesh used with von Neumann's first Lagrangian hydrodynamic method}
\end{figure}
\noindent The time difference is
\begin{equation}
\Delta t = t^{n+1} - t^n = t^{n} - t^{n-1}
\end{equation}
\noindent The mass difference is
\begin{equation}
\Delta m = m_{i+\frac{1}{2}} - m_{i-\frac{1}{2}} = \frac{m_{i+1} - m_{i}}{2}
\end{equation}
\noindent A key assumption that von Neumann made was that entropy was constant everywhere away from the shocks. The pressure is determined using the equation-of-state from the entropy $S$ and the specific volume
\begin{equation}
p^n_{i+\frac{1}{2}} = p(v^n_{i+\frac{1}{2}}, S)
\end{equation}
\noindent The discrete specific volume is
\begin{equation}
v^n_{i+\frac{1}{2}} = \frac{ (R^n_{i+1})^3 - (R^n_{i})^3 }{m_{i+1} - m_{i}}
\end{equation}
\noindent Because the pressure could be calculated from the entropy and specific volume there was no need to solve the energy equation. The pressure was calculated at the mid-points between the mass-points, this was a staggered-grid Lagrangian formulation.
von Neumann pointed out the Courant time stability condition\cite{CFL1928, 22}. Peierls had empirically found the same condition\cite{11}.
Skyrme terms it the 'L-condition' in his report\cite{31}. Defining the local sound speed,
\begin{equation}
c = \sqrt{ \frac{\partial p}{\partial \rho} \bigg|_{S} }
\end{equation}
\noindent were the partial derivative is taken with entropy $S$ remaining constant, and should not be confused with the subscript $s$ that is used later in the paper to denote a quantity at a shock. The Courant limit is
\begin{equation}
L = \bigg|\frac{c\Delta t}{\Delta R}\bigg| =
\bigg|\frac{3 R^2 \rho c\Delta t}{\Delta m}\bigg| < 1
\end{equation}
\noindent A value of $L=1/2$ is reported to be used\cite{31}. As noted above, the equation of state (EOS) is needed to solve the difference equation.
The final form of the EOS was determined so as to limit the number of punch cards required, from LA-1058\cite{35},
\begin{equation}
p(v,S) = F_1\frac{v}{a} + bF_2\frac{v}{a}
\end{equation}
\noindent Here $F_1$ and $F_2$ are constants for a material, $v$ is the specific volume, and the coefficients $a$ and $b$ are known functions of $S$, the entropy. The entropy was calculated from the specific volume\cite{35}. One thousand punch cards\cite{35} were used to tabulate all possible values of $v/a$ and $b$.
This completes the hydrodynamics equations that were used with von Neumann's 1D spherical coordinate method.
von Neumann proposed using this method for treating shocks by just letting the hydro deal with it, i.e., ``completely ignoring the possibility of shocks''\cite{22}. He visualized the problem as a set of mass points connected by springs. He believed that the above hydrodynamic equations would allow good approximations of a shock, but with oscillations behind the shock. ``As soon as a shock has been crossed such oscillations must develop, and they have a perfectly good physical significance. They represent the thermic agitation caused by the degradation of energy through the shock''\cite{22}. Only the average hydrodynamic values were valid behind the shock. The test problems von Neumann carried out on the BRL PCAM in early 1944 were air blasts that had weak shocks\cite{22}. The approach of letting an inviscid hydrodynamic method calculate the shocks, especially weak shocks will be referred to as the von Neumann method in this paper.
When tried on strong shocks, von Neumann's method created more violent oscillations than expected. Peierls showed that von Neumann's method was only valid for weak shocks\cite{31,37}.
The conclusion was that von Neumann's method could not be used for strong shocks, and lead to them using shock-fitting methods.
\section{Rudolf Peierls' Shock-fitting Method}
\label{sec:peierlshydro}
Peierls proposed an approach in his March 28, 1944 letter to von Neumann that treated the ``shock wave classically''\cite{25,31}.
This method required extrapolating the shock position to the next time step\cite{25}. Metropolis worked out the numerics of Peierls shock method in April 1944.
Skyrme described Peierls' shock fitting method in LAMS-562\cite{31}. Skyrme stated that the ``main disadvantage of this method, apart from the fact that it introduced undesirable fluctuations behind the shock, was that a cycle (n+1) could not be completed until the positions of the points (i-1) etc. behind the shock had been found by numerical integration. This introduced a delay between cycles''\cite{31}. This is the same weakness as the extrapolation method Peierls described in his March 28, 1944 letter\cite{25}.
For strong shock problems, the pressure found in the ``classical calculation'' with Peierls' method agreed closely with the average pressure calculated using von Neumann's method.
However, the classical method showed that the high pressures from von Neumann's method on strong shock problems were spurious.
\section{Tony Skyrme's Shock-Fitting Method}
\label{sec:skyrmehydro}
Neither von Neumann's nor Peierls' shock methods were really satisfactory. Peierls' classical method required information ahead of the shock, and von Neumann's method was only valid for weak shocks\cite{31, 37}. This, coupled with the observation of the constant in space pressure behind the shock, lead to the use of a third method for handling strong shocks that also reduced the ``undesirable fluctuations behind the shock''.
Skyrme dramatically increased the sophistication of handling shocks with the intent of doing the best possible simulation. The shock-fitting method is documented in LAMS-562\cite{31} and in LA-1058\cite{35}. LAMS-562 was published in 1947 after Skyrme left Los Alamos, but it appears to have been written in December 1944 or January 1945. Similarly, LA-1058 was published in June 1949, but it contains a chapter written by Skyrme that thoroughly described his shock-fitting hydrodynamic method.
In both LAMS-562 and LA-1058, Skyrme described a novel iterative approach to impose the Rankine-Hugoniot jump conditions at the shock front within a Lagrangian hydrodynamic calculation.
Skyrme also presented a new Lagrangian staggered-grid hydrodynamic method based on the initial coordinates that is also referred to in an early letter by Peierls in 1944\cite{25}. Skyrme's hydrodynamic scheme was applied everywhere on the mesh in LA-1058, whereas in the case of LAMS-562, his hydrodynamic method was only used near the shock and von Neumann's method was used everywhere else.\cite{31}
For strong shocks, Peierls' shock fitting method was replaced with the shock fitting approach of Skyrme\cite{31}.
Skyrme's method shown in LAMS-562\cite{31} has 63 steps! The ``procedure used in computing the position of the shock is so complicated that it is impractical to use the I.B.M. machines for it, but it can be done satisfactorily with an ordinary calculating machine''\cite{35}. Even so, the shock procedure on the Marchant for a time step could be completed in about the same time it took the IBM PCAM to calculate a single hydro cycle\cite{35, 39}.
By March 1945 a standard shock procedure was in place, Skyrme's shock-fitting approach,
combined with von Neumann's hydrodynamic method,
was used for the strong shocks\cite{31}.
The weak shocks were treated using only von Neumann's method\cite{31}.
By the late 1940's, researchers had switched to using Skyrme's Lagrangian hydrodynamic method (which is in terms of the initial coordinates) in place of von Neumann's method (which used mass coordinates) but still with the shock-fitting approach.
The remainder of this section will focus on describing the key equations used with the shock-fitting scheme by Skryme. We will present the key parts for the scheme documented in LA-1058 as it is the most complete. There appears to be only one minor change between the scheme documented in LAMS-562 and LA-1058, which will be highlighted. The method in LA-1058 assumes an initial mesh that is at rest with a single outward propagating shock starting at the origin (akin to the Sedov blast wave problem\cite{Sedov, MorganSedov}); the presentation that follows adheres to this assumption. As a note of caution to the reader, the original manuscripts by Skyrme contained typographical errors such as placing a minus sign on an equation, omitting a superscript on a variable, or not including a square root sign on a term. As such, the equations presented in this paper will in a few cases deviate slightly from what was printed in the original manuscripts.
\subsection{Governing Lagrangian hydrodynamic equations}
\label{sec:skyrme-gov-eqns}
The shock fitting hydrodynamic methods by both Peierls and Skyrme solved the governing analytic Lagrangian hydrodynamic equations in terms of the position in the initial spatial coordinates $r$, which are termed total Lagrangian methods in modern literature. The position in current spatial coordinates is $R$. We follow the naming convention used by Peierls and Skyrme. The specific volume of the material in the initial coordinates is $v_0$ and the pressure is $p$. The evolution of a position in the current spatial coordinates is,
\begin{equation}
\label{mom}
\frac{d^2 R}{d t^2}= - v_0 \frac{ R^2 }{r^2} \frac{dp}{dr}
\end{equation}
\noindent The specific volume at time $t$ is
\begin{equation}
\label{specVol}
v = v_0 \frac{ \partial R^3 }{\partial r^3}
\end{equation}
\noindent It is reasonable to assume that the flow is adiabatic i.e., there is no time for heat to transfer away. A continuous flow will be isentropic. The only change in entropy is across the shock; as such, the rate of change of the entropy with respect to time away from a shock is zero.
\subsection{Rankine-Hugoniot jump relations}
This subsection presents the Rankine-Hugoniot relations used in the scheme by Skyrme\cite{31, 35}. The velocity of the shock is
\begin{equation}
\label{dr_sdt}
\frac{d r_s}{d t} = v_0 \sqrt{ \frac{p_s - p_0}{v_0 - v_s} }
\end{equation}
\noindent The pressure at the shock is $p_s$ and the specific volume of the shock is $v_s$. The shock pressure is a function of the specific volume and entropy, $p_s = \psi(v_s, S_s)$. The material velocity at the shock is
\begin{equation}
u_s \equiv \left( \frac{\partial R}{\partial t}\right)_s = \sqrt{ (p_s - p_0)(v_0 - v_s) }
\end{equation}
\noindent The acceleration of the shock is
\begin{equation}
\label{d2r_sdt2}
\frac{d^2 r_s}{d t^2} = \frac{v_0}{2u_s}\frac{d v_s}{d t} (W^2 - w^2)
\end{equation}
\noindent where
\begin{equation}
w \equiv \sqrt{ -\frac{\partial p}{\partial v}\,} \quad \text{and} \quad W \equiv \sqrt{ \frac{p_s - p_0}{v_0 - v_s} }
\end{equation}
\noindent The acoustic impedance is $\rho c = \sqrt{-\frac{\partial p}{\partial v}\big|_S}$ and is a material dependent variable that was tabulated. The rate of change of the specific volume at the shock is
\begin{multline}
\label{dv_sdt}
\frac{d v_s}{d t} = \\
\frac{2W}{3W^2 + w^2}
\left({ \frac{2 u_s v_s W}{R_s}
+ v_0 W^{2}\left(\frac{\partial v}{\partial r}\right)_s
+ v_0 \left( \frac{\partial p}{\partial r}\right)_s
}\right)
\end{multline}
\noindent where $R_s$ is the spherical radius at the shock front in the current coordinates. This equation is a function of the state of the material that is being shocked $(p_0, v_0)$ and a function of $v_s$. As a reminder, all presented equations assume a shock traveling in the positive radial direction into a medium that is at rest.
\subsection{Finite difference solver for shocks}
The specific volume at time $n$ is calculated using,
\begin{equation}
v^{n}_{i - \frac{1}{2}} =
v_o \frac{ (R_i^n)^3 - (R_{i-1}^n)^3}{(r_i^n)^3 - (r_{i-1}^n)^3}
\end{equation}
\noindent This equation is the identical to the strong mass conservation used in modern methods. The nodal positions in the initial coordinates are $r_i$ and the nodal positions in the current coordinates are $R_i$, see Figure \ref{fig:mesh_indicies} for a diagram illustrating the mesh nomenclature.
The finite difference equation for evolving nodal positions in the current coordinates away from the shock is
\begin{equation}
\label{eqn:R_Skyrme}
R^{n+1}_i =
2 R^n_i
-R^{n-1}_i
- ({\Delta t^2}) \frac{ v_0 (R_i^n)^2 }{r^2_i} \left(\frac{ p^n_{i + \frac{1}{2}} - p^n_{i - \frac{1}{2}} }{r^n_{i + \frac{1}{2}} - r^n_{i - \frac{1}{2}}} \right)
\end{equation}
\noindent The pressure $p^n_{i - \frac{1}{2}}$ is calculated using an equation of state that is a function of $v^n_{i - \frac{1}{2}}$ and entropy $S$, which is constant away from a shock. See Figure \ref{fig:mesh_variables_skyrme} for a diagram showing the variable locations with a notional shock profile.
The finite difference equation shown in Eq. \ref{eqn:R_Skyrme} will give rise to large oscillations near strong shocks. To correct these oscillations, Skyrme proposed a shock-fitting approach that introduces a discontinuity with boundary conditions to the finite difference equation. At a shock, the pressure gradient behind the shock is based on the shock pressure instead of the neighboring pressure at $p_{i + \frac{1}{2}}$.
\begin{equation}
R^{n+1}_i =
2 R^n_i
-R^{n-1}_i
- ({\Delta t^2}) \frac{ v_0 (R_i^n)^2 }{r^2_i} \left(\frac{ p^n_{s} - p^n_{i - \frac{1}{2}} }{r^n_{s} - r^n_{i - \frac{1}{2}}} \right)
\end{equation}
\noindent As mentioned earlier, the shock is moving in the positive direction relative to node $R_i$. The shock pressure $p^n_s$ is a function of $v^n_s$ through an equation of state. The shock pressure and the specific volume for the shock are unknowns and must be calculated using an iterative method and the Rankine-Hugoniot jump equations. The entropy only changes across the shock, so the flow is isentropic away from the shock.
\begin{figure*}
\centering
\includegraphics[trim=0 0 0 0in, width=4.5in,height=!,clip=true]
{diagrams/mesh_indices.pdf}
\caption{\label{fig:mesh_indicies} Skyrme's shock-fitting hydrodynamic method solved the governing equations in the initial coordinate system.}
\end{figure*}
\begin{figure}
\centering
\includegraphics[trim=0 0 0 0in, width=2.25in,height=!,clip=true]
{diagrams/mesh_variables_skyrme.pdf}
\caption{\label{fig:mesh_variables_skyrme} A notional shock profile is shown with corresponding variables used with Skyrme's shock-fitting method}
\end{figure}
\subsection{Solving the jump equations}
This subsection discusses how to calculate $v^n_s$, which in turn is used to calculate $p^n_s$ through an equation of state. The shock pressure $p^n_s$ is used to evolve the position of the nodes $R_i $ in the current coordinate system and the shock position in the initial coordinates $r_s$. The goal is to calculate the specific volume of the shock $v^n_s$ iteratively using
\begin{equation}
\label{vs-eqn}
v^n_s = v^{n-1}_s + \frac{\Delta t}{2} \left[ \left(\frac{d v_s}{d t} \right)^n + \left(\frac{d v_s}{d t} \right)^{n-1} \right]
\end{equation}
\noindent where $\left(\frac{d v_s}{d t} \right)^n$, see Eq. \ref{dv_sdt}, is a function of the unshocked state $(p_0^n, v_0^n)$, a function of the current shock position $r^n_s$ in the initial coordinates, a function of $v^n_s$, and a function of spatial derivatives at the shock $\left(\frac{\partial v}{\partial r}\right)^n_s$ and $ \left( \frac{\partial p}{\partial r}\right)^n_s$. These latter spatial derivatives are calculated using,
\begin{equation}
\left(\frac{\partial v}{\partial r}\right)_s = \frac{ v_s - v_{i - \frac{1}{2}} }{ r_s - r_{i - \frac{1}{2}} }
\,\,\,\, \text{and} \,\,\,\,
\left(\frac{\partial p}{\partial r}\right)_s = \frac{ p_s - p_{i - \frac{1}{2}} }{ r_s - r_{i - \frac{1}{2}} }
\end{equation}
\noindent
Eq. \ref{vs-eqn} is iteratively solved until $v^n_s$ on the left side is equal to the $v^{n}_s$ that is used to calculate $\left(\frac{d v_s}{d t} \right)^n$ on the right side.
The shock position at the next time step is calculated using,
\begin{equation}
\label{rs_eqn}
r^{n+1}_s = r^n_s
+ \frac{\Delta t}{2} \left[ \left(\frac{d r_s}{d t} \right)^n + \left(\frac{d r_s}{d t} \right)^{n-1} \right]
+ \frac{\Delta t^2}{2} \left(\frac{d^2 r_s}{d t^2} \right)^n
\end{equation}
\noindent The first derivative of the shock position with respect to time $\left(\frac{d r_s}{d t} \right)^n$, see Eq. \ref{dr_sdt}, is a function of $v_s$. The second derivative of the shock position with respect to time $\left(\frac{d^2 r_s}{d t^2} \right)^n$, see Eq. \ref{d2r_sdt2} is a function of $v_s$ and $\frac{dv_s}{dt}$. Skyrme found that calculating $r^{n+1}_s$ using
\begin{equation}
\label{rs_eqn2}
r^{n+1}_s = 2r^n_s - r^{n-1}_s
+ \frac{\Delta t^2}{2} \left(\frac{d^2 r_s}{d t^2} \right)^n
\end{equation}
\noindent generated oscillations, so he used Eq. \ref{rs_eqn}.
Skyrme's shock-fitting approach described in LAMS-562 is very close to what was presented in this section. One minor difference worth noting between the two reports (LA-1058 and LA-562) is that the shock position is calculated in LAMS-562 neglecting the second derivative term in Eq. \ref{rs_eqn}.
\section{Robert Richtmyer's hydrodynamic scheme}
\label{sec:richtmyer}
An interesting historical point is at the end of Peierls' March 28, 1944 letter to von Neumann where he suggested that an artificial viscosity could be used to slightly smear the shock discontinuity, making it numerically tractable\cite{25}. Richtmyer implemented this idea in 1948\cite{RichtmyerHydro, 49}. He and von Neumann made this the standard method for handling shocks in Lagrangian hydrodynamic codes with their 1950 journal paper\cite{30}. This is known as a smeared shock method or shock capturing method. Use of artificial viscosity allowed the intrinsic treatment of strong shocks without undue smearing of the weak shocks. The details on Richtmyer's scheme will now be discussed.
The staggered-grid hydrodynamic scheme by Richtmyer\cite{RichtmyerHydro} solves the governing equations in 1D Cartesian coordinates in terms of the initial spatial coordinates $x$. His approach builds on the one by Skyrme (subsection \ref{sec:skyrme-gov-eqns}), and includes an artificial viscosity term and solves the specific internal energy evolution equation. This is the first recorded instance of solving the specific internal energy evolution equation with a hydrodynamics method, which is now the standard practice. The pressure is calculated using the specific volume $v$ and temperature $T$, so $p = p(v,T)$. The prior hydrodynamic methods calculated the pressure in terms of the entropy $S$. The evolution equations for the position in the current coordinate system $X$ (in 1D Cartesian coordinates) and specific internal energy $\epsilon$ are as follows,
\begin{equation}
\label{mom-rich}
\frac{1}{v_0} \frac{d^2 X}{d t^2}=
-\frac{\partial p}{\partial x} +
2\alpha \bigg| \frac{\partial v}{\partial t} \bigg|
\frac{\partial^2 v}{\partial x \partial t}
\end{equation}
\begin{equation}
\label{spec-eng-rich}
\frac{d\epsilon}{d t} =
-p\frac{\partial v}{\partial t} +
\alpha \bigg| \frac{\partial v}{\partial t} \bigg|^3
\end{equation}
\noindent The artificial viscosity coefficient $\alpha$ is derived based on studying the Rankine-Hugoniot jump relations.
\begin{equation}
\alpha = \frac{\gamma+1}{2} \frac{l_s^2}{v_0^2v_s}
\end{equation}
\noindent where $l_s$ is the shock thickness and $v_s$ is the specific volume of shocked state. As an approximation, Richtmyer proposed to use the non-shocked value of specific volume $v_0$ in place of $v_s$.
The specific volume $v$ is calculated using
\begin{equation}
\label{spec-vol-rich}
v = v_0
\frac{\partial X}{\partial x}
\end{equation}
\noindent
These governing equations are discretized using a staggered arrangement and central difference approximations of the derivatives.
\begin{multline}
\frac{1}{v_0} \frac{X^{n+1}_i - 2X^n_i + X^{n-1}_i}{(\Delta t)^2} =
%
-\frac{ p^n_{i+\frac{1}{2}} - p^n_{i-\frac{1}{2}} }{\Delta x} + \\
2\alpha \bigg| \frac{ v^n_{i+\frac{1}{2}} + v^n_{i-\frac{1}{2}} - v^{n-1}_{i+\frac{1}{2}} - v^{n-1}_{i-\frac{1}{2}}}{2 \Delta t}\bigg|
%
\\
%
\left(
\frac{v^{n}_{i+\frac{1}{2}} - v^{n-1}_{i+\frac{1}{2}} - v^{n}_{i-\frac{1}{2}} + v^{n-1}_{i-\frac{1}{2}}}{\Delta x \Delta t}
\right)
\end{multline}
\begin{equation}
\frac{\epsilon^{n+1}_{i+\frac{1}{2}} - \epsilon^{n}_{i+\frac{1}{2}}}{\Delta t} =
-p^n_{i+\frac{1}{2}}\frac{v^{n+1}_{i+\frac{1}{2}} - v^n_{i+\frac{1}{2}}}{\Delta t} +
\alpha \bigg| \frac{v^{n+1}_{i+\frac{1}{2}} - v^n_{i+\frac{1}{2}}}{\Delta t} \bigg|^3_{_{\,}}
\end{equation}
\begin{equation}
v^{n+1}_{i+\frac{1}{2}} = v_0
\frac{X^{n+1}_{i+\frac{1}{2}} - X^{n+1}_{i+\frac{1}{2}}}{\Delta x}
\end{equation}
\noindent The pressure is calculated using
$p^n_{i+\frac{1}{2}} = p(v^n_{i+\frac{1}{2}}, T^n_{i+\frac{1}{2}})$. Richtmyer also presented an alternate entropy-based approach that evolves specific entropy $s$ in place of the specific internal energy.
\begin{equation}
T^n_{i+\frac{1}{2}} \frac{s^{n+1}_{i+\frac{1}{2}} - s^{n}_{i+\frac{1}{2}}}{\Delta T} = \alpha \bigg| \frac{v^{n+1}_{i+\frac{1}{2}} - v^n_{i+\frac{1}{2}}}{\Delta t} \bigg|^3 .
\end{equation}
In 1953, a code was implemented on the IBM Model II CPC\cite{50}. It employed both the method by von Neumann and Richtmyer that used an artificial viscosity for shocks, and also Skyrme's shock-fitting method, but some hand fitting was still required\cite{50}. By the mid-1950's, the shock fitting method of Skyrme was fully automated, and the successor code had the option to use either shock-fitting or smeared shock methods for simulating strong shocks.
\section{Conclusion}
The intent of this paper was to inform the broader community on the pioneering work by von Neumann, Peierls, Skyrme, and Richtmyer to create robust hydrodynamic methods to simulate shock drive flows. These researchers developed multiple Lagrangian hydrodynamic schemes between 1943 and 1948, and most of these schemes were never published beyond laboratory reports. These early foundational advances led to subsequent, important computational hydrodynamic methods created by researchers at Lawerence Livermore, Los Alamos, and Sandia National Laboratories, and at laboratories and universities in the UK, France, and other countries.
We discussed the original, 1D Cartesian coordinate staggered-grid Lagrangian scheme by von Neumann that was published in 1944, but garnered little attention by the broader community after it was published. That 1D scheme used central difference approximations for the derivatives. Soon thereafter, von Neumann proposed a 1D spherical coordinate Lagrangian hydrodynamic method, based on his earlier 1D scheme, to simulate a radially-outward propagating shock wave (akin to the Sedov blast wave problem) on the BRL IBM PCAM machine. We believe this was the first shock hydrodynamics code, but that scheme was prone to spurious oscillations near a strong shock, often with amplitudes twice the mean pressure. von Neumann's original method was only suitable for weak shocks.
At Los Alamos, von Neumann's hydrodynamic method was implemented in a computer program by Frankel, Nelson, and Livesey, who also directed a cadre of IBM PCAM operators. These efforts resulted in the Los Alamos IBM code, which would become the first hydrodynamics code to accurately and robustly simulating strong shocks.
The spurious oscillations in von Neumann's method motivated Peierls and Skyrme to investigate shock-fitting methods. We presented the details on a novel, essentially unknown shock-fitting Lagrangian hydrodynamic method created by Skyrme in 1944. It explicitly represented a shock discontinuity on a discrete mesh and coupled together two separate higher-order solutions with the Rankine-Hugoniot jump conditions. With this approach, higher-order accuracy is achieved without spurious oscillations on problems with discontinuities. The scheme by Skyrme was an improvement over an earlier shock-fitting scheme by Peierls.
The challenge with Skyrme's shock-fitting method was that it required an iterative solve to impose the shock boundary conditions, so it was not well suited for the IBM PCAM. Instead, the shock fitting was performed by hand using Marchant calculators with the results inserted into the IBM hydrodynamic calculation at the appropriate position and time. The scheme by Skyrme was fully automated on a computer by the mid 1950's.
The shock-fitting approaches by Peierls and Skyrme were used with a staggered-grid Lagrangian hydrodynamic method that was in terms of the initial coordinates. That formulation quickly replaced Von Neumann's mass coordinate formulation. Since that time, a range of Lagrangian hydrodynamic schemes have been proposed that use the initial coordinates (or fixed reference coordinates), examples include the discontinuous Galerkin hydrodynamic method\cite{VilarDGlagcaf2012, VilarDG, LiuDGlagcaf2017, LiuDGlagSMS2019, LiuDGlagRZ2018, LiebermanStrength1D2017, LIEBERMAN2019467, DGHEburn}, the finite element hydrodynamic method\cite{BLAST}, and the residual distribution hydrodynamic method\cite{SvetlanaRD, ANN-ShockDetector}.
Skyrme also introduced a strong mass conservation equation that has been used in many subsequent schemes\cite{Kolsky2D, BensonReview1992, BLAST, LiuDGlagcaf2017}.
After WWII, researchers at Los Alamos were motivated to create a robust Lagrangian hydrodynamic scheme to simulate strong shocks and that could be fully run on the computers at that time. The alternative to the Skyrme shock-fitting scheme was a shock capturing scheme that used artificial viscosity to smear the shock over several cells.
The use of artificial viscosity for shock capturing was first suggested in a letter by Peierls to von Neumann on March 28, 1944\cite{25}. Richtmyer developed the quadratic formulation of artificial viscosity in 1948, calling it a ``fictitious'' addition to the hydrodynamics equations\cite{RichtmyerHydro, 49}. Richtmyer added the artificial viscosity to Peierls' and Skyrme's finite difference scheme that was in terms of the initial coordinates.
Likewise, he introduced the now standard practice of solving the internal energy evolution equation, which included evaluating the EOS as a function of specific volume and temperature\cite{RichtmyerHydro}, whereas prior works used specific volume and entropy.
The artificial viscosity approach was introduced to the broader hydrodynamics community, using Peierls' artificial viscosity nomenclature, in the well known 1950 paper by von Neumann and Richtmyer\cite{30}. That paper presented a new staggered time integration method with a spatially staggered discretization that was in terms of the initial coordinates. Peierls and Skyrme were the first to create a Lagrangian hydrodynamic scheme in terms of the initial coordinates following the staggered-grid approach from von Neumann in 1944\cite{22}.
The staggered-grid discretization combined with artificial viscosity is the basis of most Lagrangian hydrodynamic schemes\cite{WilkinsSGH, BensonReview1992, Zukas2004, BurtonFLAG2007, ALE3D2017, BurtonSGH, Caramana}.
In 1955 at Los Alamos, Rolf Landshoff added a linear term to the artificial viscosity\cite{Landshoff1955, MorganSGHdisp}, and Marshall Rosenbluth suggested turning off the artificial viscosity during expansion\cite{RichtmyerMorton1967}. These additions to artificial viscosity were first publicly discussed in the 1957 edition of Richtmyer and Morton\cite{RichtmyerMorton1967}. Peter Lax and Burt Wendroff put the shock capturing method into conservative form in the 1960s\cite{Lax1954, LaxWendroff1958, LaxWendroff1960, RichtmyerMorton1967, Lax1971, Lax1972}. In 1964, Mark Wilkins published the artificial viscosity in the form that is most widely used\cite{Wilkins1964}. In the same volume, William Schulz described a tensor viscosity for use with a two-dimensional Lagrangian code\cite{Schulz1964}. The stability analysis techniques and convergence theory of partial differential equations were established by von Neumann, Richtmyer, and Lax\cite{30, vonNeumannRichtmyer1947, LaxRichtmyer1956}. See Maattsson and Rider for a review of the development of artificial viscosity\cite{MattssonRider2015}.
The creation of shock capturing schemes facilitated the development of two-dimensional Lagrangian shock hydrodynamics codes\cite{50, Kolsky2D, Hermann, Schulz1964, MaenchenSack1964, Wilkins1964}, and eventually three-dimensional codes\cite{BurtonFLAG2007, ALE3D2017}. Modern staggered-grid Lagrangian and artificial viscosity methods have evolved from the pioneering work of the 1940's\cite{BurtonSGH, Caramana1998a, Caramana1998b, Caramana1998c, Caramana2000, CampbellShashkov2001, Bauer2006, Barlow2008}. The first cell-centered Lagrangian hydrodynamic method was proposed by Sergei Godunov\cite{Godunov1, Godunov2}. Research at LANL on cell-centered Lagrangian hydrodynamic methods in the early 1980's resulted in the CAVEAT code\cite{CAVEAT, CAVEATGT}, which was followed by a myriad of work on cell-centered schemes in the 2000's\cite{Despres, Maire2007, Maire2008, Maire2009, Carre2009, Loubere2010a, Barlow2011, Burton2013, BurtonCGR, ChiravalleCCH, MorganVeloFilter2017}. The cell-centered work has led to notable improvements in the staggered-grid methods\cite{Loubere2010b, Maire3, Barlow2013, Loubere2013, MorganMARS, ChiravalleMARS}.
This history shows the vital contributions made to the hydrodynamic methods theory by von Neumann, Peierls, Skyrme, and Richtmyer. It certainly justifies Hans Bethe's statement that the ``collaboration of the British Mission absolutely was essential''\cite{51} and Norris Bradbury's statement that ``the British Mission supplied the major portion of experience in the field of theoretical hydrodynamics... It might also be pointed out that the United States was largely lacking in personnel experienced in this field of classical physics''\cite{51}.
This paper sought to correct historical omissions and to communicate the complicated story on the origins of Lagrangian hydrodynamic methods for simulating shock dynamics.
\section{Acknowledgements}
We are thankful for the helpful advice and input from Bill Rider, Don Burton, Len Margolin, and Misha Shashkov. We also gratefully acknowledge the support from the Advanced Scientific Computing (ASC) program at Los Alamos National Laboratory. The Los Alamos unlimited release number is LA-UR-21-20144. Los Alamos National Laboratory is operated by Triad National Security, LLC for the U.S. Department of Energy NNSA under Contract No. 89233218CNA000001.
\bibliographystyle{ieeetr}
|
\section{INTRODUCTION}
In engineering design synthesis creativity and innovation are among designers' and engineers' most important objectives. Creativity in design has been a major topic of research; such creativity has been correlated with design and designers' success ~\cite{creativity_assessment}. Design synthesis tools must address this aspect of the design process.
Creativity is not easily defined, despite many attempts to do so. Sarkar~{\em et~al.}, explore the literature surrounding the topic of creativity and definitions of creativity and propose their ``common" definition of creativity in design as having ``novelty" and ``usefulness"~\cite{SARKAR2011348}. The synthesis of ``useful" designs is often correlated to their quality ~\cite{SHAH2003111}, and their ``usefulness" is, therefore, measured based on quality. Engineering design tools are usually built with quality, hence usefulness, in mind and, therefore, focus primarily on this aspect of the process but seldom address novelty. In this paper, we focus our efforts on data-driven methods for design synthesis and propose an approach for guiding existing generative models to synthesize novel designs.
The conventional engineering design process involves iteratively and often manually exploring design alternatives and ideas. Designers must spend significant time examining numerous design alternatives until they identify useful solutions. This involves repeatedly evaluating all options, often using physics-based simulations, and adapting designs based on their quality and the design program's requirements. To overcome this, the engineering design community has made significant strides in speeding up or eliminating the conventional iterative design cycle. Topology ~\cite{duysinx1998topology,bendsoe2013topology} and adjoint-based optimization~~\cite{anderson1999aerodynamic} are examples of this effort commonly used in structural design and aerodynamic design, respectively. These methods automate the design synthesis process based on performance requirements, but they still be time-consuming due to the high computational cost of evaluations.
To overcome this problem, data-driven methods such as generative adversarial networks (GANs)~\cite{GAN} and variational auto-encoders (VAEs)~\cite{VAE}, have been employed in many design synthesis problems~\cite{padgan,mo-padgan,yilmaz2020conditional,achour2020development,Oh_2019,jang2021generative,yoo2021integrating}. GANs and VAEs are generally capable of learning complex distributions of existing designs and even considering performance and quality evaluation when generating new designs~\cite{padgan,mo-padgan}. They allow for learning an underlying low-dimensional latent space that can represent the existing designs. These data-driven approaches allow designers to rapidly generate new designs and reduce the complexity of design space exploration, greatly improving its efficiency. These methods, however, are lacking any mechanism for promoting novelty, a typical lack in most design automation tools.
In this paper we focus on using GANs for design synthesis.
One major problem of a typical GAN is \emph{mode collapse}, which refers to the phenomena in which the GAN model learns to generate samples from one or few modes of the design space but misses many other modes~\cite{improvinggan}.
This typically occurs in more common modes of the data, meaning the GAN will learn to produce only the most plausible output, leaving GANs inherently an inadequate method when it comes to novelty.
To ameliorate this problem, researchers have proposed methods, such as reconstruction networks proposed by Srivastava~{\em et~al.}, in VEEGAN~\cite{VEEGAN} or DPP-based promotion of diversity in generated samples proposed by Chen~{\em et~al.}, in PaDGAN. Although these methods help with mode collapse, the nature of GANs methods will always tend towards data used to train them. This ``emulative''\cite{can} property of GANs is understood well, and it has been shown that GANs will rarely produce designs outside the original distribution of data~\cite{mo-padgan,padgan,can} In addition to those rare designs, they can also produce designs that interpolate existing data and fill large gaps in the design space not filled by existing designs\cite{mo-padgan,padgan}. The rarity of such GAN-generated samples means they are not very useful and will likely be ignored. The current state of the art in GANs lacks mechanisms for generating novel samples.
Recent developments in GANs have proven they are useful for generating realistic designs and in fact, can be adapted to generate high quality~({\em i.e.}, useful) designs. Novelty, however, is a significant aspect of creativity. In fact, novelty is often emphasized in design creativity~\cite{SARKAR2011348}. Data-driven methods, such as GANs, are capable of generating many candidates, but very few novel designs.
If these existing models could be modified to create novel designs, they would allow for the development of creative automated design synthesis tools. In this paper we propose \emph{CreativeGAN} --- an approach to modify GAN models to synthesize novel designs. Our primary objective is to bridge the creativity gap in GAN-based design synthesis approaches by promoting novelty in GAN-generated designs. We combine state of the art StyleGAN2~\cite{stylegan2ada,stylegan2,stylegan}, which is capable of generating realistic designs with recent developments in \emph{rewriting} GANs~\cite{bau2020rewriting} through automatic detection and localization of novel features in generated designs. We achieve this by employing a K-nearest neighbour~(KNN) approach to detect novel samples and identifying those features that make them novel. We then use these novel features to modify trained StyleGAN2 models such that they would generate samples with the detected novel features. Doing this with many different unique features will allow designers to guide their data-driven models towards different novel designs. We demonstrate the results of our approach through two proof-of-concept examples within bike design application. We also provide two metrics, to quantify how the novel designs differ from designs that are common in the training data. Our main contributions are as follows:
\vskip -0.2in
\begin{enumerate}
\item We introduce an approach to systematically modify GAN models to synthesize novel designs in an automated fashion without the need for human interaction or involvement.
\item Using a bicycle synthesis application, we demonstrate that our method increases the novelty of designs generated by GANs, thereby showing the potential for automating creativity in data-driven design synthesis.
\item We demonstrate that anomaly detection algorithm when applied at different granularities can identify unique designs and unique components within each design.
\item We show the efficacy of a deep convolutional neural network~(CNN)-based semantic segmentation model to predict the location of parts of a bicycle for any new design, with an overall intersection over union (IoU) score of 83.8\%.
\item We provide two metrics for measuring novelty in GAN-generated samples, one using image structural similarity and the other combining features from a pre-trained neural network with the nearest-neighbor approach.
\end{enumerate}
\vskip -0.2in
\section{RELATED WORKS}
In this section, we provide a brief background on related topics seminal to this work. In this paper, we combine GANs and novelty detection methods to guide novelty and creativity in GANs, we will discuss these topics briefly here. If interested, readers are encouraged to refer to the sources cited for a more in-depth coverage of these topics.
\subsection{Generative Adversarial Networks}
A generative adversarial network~\cite{GAN} is usually made up of two models~\textemdash~a \textit{generator} and a \textit{discriminator}. The generator $G$ maps arbitrary noise distribution to the data distribution, the discriminator $D$ tries to to distinguish between real and generated data. As $D$ improves its classification ability, $G$ also improves its ability to generate data that fools $D$. Based on this GANs have th following objective:
\begin{equation}
\begin{split}
\min_{G} \max_{V} V(D, G)= & \mathbb{E}_{x \sim p_{\text {data}}(x)}[\log{D(x)}]+\\ & \mathbb{E}_{x \sim p_{z}(z)}[\log{(1-D(G(z)))}],
\end{split}
\label{eqn:1}
\end{equation}
where $p_{\text{data}}$ refers to the distribution of data and $p_{\text{z}}$ refers to the distribution of noise. In this approach for training, the generator will learn to relate the noise distribution $p_{\text{z}}$ to the design space distribution of the data $p_{\text{data}}$. GANs are notoriously difficult to train and may often be unstable~\cite{improvinggan}, therefore it may be unreasonable to use this approach for generating realistic designs. Recent developments in this area have improved GANs significantly and established a new state of the art in the quality of GAN- generated samples. We use the state-of-the-art GAN in single class image generation called StyleGAN2~\cite{stylegan2ada,stylegan2,stylegan}, which is capable of generating realistic and high quality images. Further, the research in the design community has proven the efficacy of GAN based automated design synthesis in recent years~\cite{yoo2021integrating,jang2021generative,Oh_2019}, which makes GANs a suitable option for data-driven automated design synthesis.
\subsection{The Creativity Problem In GANs}
The objective of GANs (Eq.~\ref{eqn:1}) encourages the generator to fool the discriminator, while the discriminator learns the distribution of the data. In this way the generator is ultimately learning to mimic the data, which makes GANs ``emulative"~\cite{can}. This ``emulative" nature has motivated researchers to look into areas where GANs can be pushed towards creativity. Elgammal~{\em et~al.}, investigate this matter in their Creative Adversarial Network~(CAN)~\cite{can}. If GANs are pushed too far from the original data distribution, their generated samples will lose quality and meaning. For design synthesis, this would mean loss of usefulness in generated designs. Therefore, Elgammal~{\em et~al.} suggest that the generator in GAN cannot be pushed too far from original distribution of data~\cite{can}. They, therefore take the approach of maximizing entropy in the generated samples. Others have shown that simply promoting diversity in GANs will allow GANs to fill in data distribution gaps and even deviate slightly from the original distribution\cite{mo-padgan,padgan}. In this work we take a different approach and promote self creativity in GANs. We do this by identifying instances when GANs are being creative, however rare this may be, and guide the generator towards these creative approaches. In this way, we utilize the GANs' own instances of novelty and creativity.
\subsection{Detecting Novelty}
In this section, we discuss methods to detect and score novel designs in a dataset. This type of novelty detection is often investigated as a form of anomaly detection~\cite{sabokrou2018adversarially}. In this paper we will also be focusing on this approach as well. In anomaly detection for image data, recent literature on the subject has shifted focus significantly more towards data-driven, specifically machine learning, approaches~\cite{sabokrou2018adversarially,SPADE,10.1145/3097983.3098052,10.1007/978-3-319-59050-9_12,dimattia2019survey,akcay2018ganomaly,zenati2019efficient}. Machine learning based approaches have been proven effective in detecting anomaly/novelty in images, with some researchers using generative adversarial networks to detect novelty by projecting images to the latent space of GANs and measuring the difference between GAN reconstructed images and the actual images~\cite{dimattia2019survey,akcay2018ganomaly,zenati2019efficient}. Others have introduced similar approaches in variational auto-encoders~(VAEs), where instead of reconstructing images using GANs they do so using VAEs~\cite{Xu_2018}. Others use classifiers and non-generative models to detect novelty effectively by using intermediate features of classifiers or training classifiers to identify novel samples~\cite{sabokrou2018adversarially,SPADE}. In this paper we are also interested in understanding what features make images novel. In this paper we use an approach which requires no training and utilizes intermediate features of pre-trained classifiers to detect novelty and localize novel features called, `Semantic Pyramid Anomaly Detection (SPADE)'~\cite{SPADE}.
\section{BACKGROUND}
Here we will discuss the details of some of the approaches in literature that we have implemented in our methodology. We use the SPADE~\cite{SPADE} approach for detecting and localizing novelty in designs and use the rewriting GANs method proposed by Bau~{\em et~al.}, to guide GANs towards novel features~\cite{bau2020rewriting}. We briefly discuss some of the details of these approaches in this section, however readers are encouraged to refer to the original sources for a more in-depth understanding of these topics.
\subsection{Rewriting GANs}
GANs trained on existing designs are capable of learning the physical and semantic rules in the datasets. Once the training has been completed, however, a mechanism is needed to alter these rules to synthesize designs which are novel. This was made possible recently thanks to the approach introduced by Bau~{\em et~al.}, called \emph{rewriting GANs}~\cite{bau2020rewriting}. In their approach, the authors propose a generalizable method for editing GANs based on examples of desired changes. In the case of images, these changes may be made by adding a new feature to existing images. For such a change to be possible, the generator $G$ must be altered to incorporate this desirable behavior. The naive way of doing this would be to retrain the model using edited images. This would present two challenges: all images with features we desire to alter must be manually edited, and training large GAN models can be inefficient. Bau~{\em et~al.}, address these challenges.
Given a trained generator $G\left(z ; \theta_{0}\right)$ with weights $\theta_{0}$, samples designs $x_{i}=G\left(z_{i} ; \theta_{0}\right)$, can be synthesized based on a latent code $z_{i}$. At this point we would have desired changes that we want to enforce in the generator. Imagine we have manually edited some generated design to include desired changes $x_{* i}$. We would update the generator weights $\theta_{1}$ to produce our desired changes examples $x_{* i} \approx G\left(z_{i} ; \theta_{1}\right)$. An appropriate editing would not interfere with other rules and behaviours in the generator. This can be done using the following objective~\cite{bau2020rewriting}:
\begin{equation}
\theta_{1}=\arg \min _{\theta} \mathcal{L}_{\text {smooth }}(\theta)+\lambda \mathcal{L}_{\text {constraint }}(\theta),
\label{eqn:2}
\end{equation}
\vskip -0.5in
\begin{equation}
\mathcal{L}_{\text {smooth }}(\theta) \triangleq \mathbb{E}_{z}\left[\ell\left(G\left(z ; \theta_{0}\right), G(z ; \theta)\right)\right],
\end{equation}
\vskip -0.5in
\begin{equation}
\mathcal{L}_{\text {constraint }}(\theta) \triangleq \sum_{i} \ell\left(x_{* i}, G\left(z_{i} ; \theta\right)\right),
\end{equation}
In the above equation, $\ell(\cdot)$ is a distance metric measuring the perceptual distance between the two sets of images and $\lambda$ is parameter determining the relative weight between the two loss terms. If we were to apply the optimization described in Eq.~\ref{eqn:2}, we would effectively retrain the model. As $\theta$ has a large number of parameters, if the number of examples were to be small, the generator will quickly over-fit and may not generalize. To overcome the overfitting issue and simultaneously reduce the computational cost of this optimization, Bau~{\em et~al.} propose that the changes in the generator be limited to only one layer. This decreases the computational cost and allows for a generalizable change in the generator~\cite{bau2020rewriting}. This, however, is still not sufficient and the number of parameters in one layer can be numerous. To overcome this, Bau~{\em et~al.} constrain the degrees of freedom during optimization by limiting changes in the weights to specific directions at every step~\cite{bau2020rewriting}~(or what they call `rank').
In this paper we will take a similar approach: basing our editing on novel samples generated by generator and transferring novel features from these samples to other generated samples. Using the approach developed by Bau~{\em et~al.}. Our work differs in two main ways from ~\cite{bau2020rewriting}. First, in contrast to the manual approach used in ~\cite{bau2020rewriting}, we identify the base image and the feature which needs to be copied in a completely automated way using a combination of novelty detection, novelty localization, and segmentation analysis. Second, our approach focuses on rewriting for novel designs and attributes. Third, our focus is Engineering Design applications, while ~\cite{bau2020rewriting} focused on computer vision applications.
\subsection{Identifying and Localizing Novelty}
\begin{figure*}[ht]
\centering
\includegraphics[width=1.8\columnwidth]{figures/novelgan_overview_v2.pdf}
\caption{Overview of the proposed method used to edit the generator to to generate more novel features.}
\vskip -0.1in
\label{fig:methodoverview}
\end{figure*}
In this paper we intend to modify GAN models to generate novel designs using the rewriting approach. This requires us to identify novel samples and identify the features in any novel design that make that design novel. For this purpose we use the Semantic Pyramid Anomaly Detection (SPADE) method developed by Cohen~{\em et~al.}~\cite{SPADE}. SPADE is a method based around the K nearest neighbours~(KNN) method, and KNN-based approaches have been shown to be highly effective in novelty/anomaly detection~\cite{MARKOU20032481}. SPADE is more than applying KNN to images. Cohen~{\em et~al.}, proposed using the global average by pooling the features of the last layer of a ResNet~\cite{resnet} classifier pre-trained on the ImageNet dataset. Bergman~{\em et~al.}, showed that pre-trained ImageNet features outperform the features learned from self-supervised method ~\cite{bergman2020deep}. This means that the classifier is not trained for the dataset; instead the pre-trained weights of the ResNet model, are used.
To detect image-level novelty~({\em i.e.}, determine how novel any generated sample is overall) in SPADE the features from the ResNet $f_{i}$ for all of the existing designs~({\em i.e.}, dataset) $x_{i}$ are extracted at the beginning, then during the inference stage, the ResNet features $f_{y}$ of any given sample $y$ is extracted. The novelty score of every image is defined as the mean of the distances between the sample's features $f_{y}$ and the features of the $K$ nearest existing design samples' $N_{k}(f_{y})$:
\vskip -0.1in
\begin{equation}
d(y)=\frac{1}{K} \sum_{f \in N_{K}\left(f_{y}\right)}\left\|f-f_{y}\right\|^{2}
\label{eqn:5}
\end{equation}
\vskip -0.1in
From here the novelty score $d(y)$ of any given sample $y$ can be determined; the higher this value the more novel the sample is expected to be.
Cohen~{\em et~al.} propose an approach to find the location of the features within an image that make it novel. To do this we again use KNN-based approach, but this time the novelty score is computed for any given pixel in an image rather then the overall image features. For this an approach similar to the computation of overall novelty score will be taken, however, this time the features of multiple layers~({\em i.e.}, intermediate features) will be captured for the $K$ nearest samples in the dataset and mapped to the corresponding pixels. Then the novelty score for each pixel location $p$ in a novel sample $y$ will be determined based on the mean of the distances between that pixel's features and the $\kappa$ nearest pixels in the same location amongst the $K$ nearest samples to $y$~({\em i.e.}, $N_{k}(f_{y})$):
\begin{equation}
d(y, p)=\frac{1}{\kappa} \sum_{f \in N_{\kappa}(F(y, p))}\|f-F(y, p)\|^{2}
\label{eqn:6}
\end{equation}
where $\kappa \leq K$ and $F(y,p)$ represent the feature extractor for sample $y$ at pixel location $p$. Thus, a map of novelty scores can be determined for any image with a high overall novelty score, and, from these values the locations of novel features can be determined by setting a threshold $\tau$ on the novelty scores of pixels and taking pixel locations with a score higher than the threshold. These locations will form an overall map of novelty in any image, which will determine which of its features are novel.
\section{METHODOLOGY}
In this paper, we show how the approaches described in the previous section can be combined as an automated approach for promoting novelty in GAN-generated designs. We call our method CreativeGAN. CreativeGAN identifies novel designs and the attributes that make a design novel (novel attributes) by combining novelty detection, novelty localization and segmentation algorithms. CreativeGAN then edits a pre-trained GAN to generate samples, which are more likely to exhibit the novel design attributes. CreativeGAN does not just copy and paste novel design features to new designs, instead it integrates those features with other design attributes in the new design. Fig.~\ref{fig:methodoverview} illustrates the overall architecture of CreativeGAN. We showcase our approach through an example of bike design, where we train a GAN to generate images of bikes and guide the generator to produce bikes with more novelty.
\subsection{Generating Realistic and Useful Designs}
In any GAN-based approach, generated designs should be realistic and useful. We train the state of the art GAN architecture, StyleGAN2~\cite{stylegan2}, which addresses many of these issues, on our dataset of bike designs with each image having 512 pixel x 512 pixel resolution.
\paragraph{Data augmentation:} StyleGAN2, like many other GAN models, often requires a large dataset of images to generate realistic images~\cite{stylegan2ada}. Because our datasets were of limited size, we augmented the size before training StyleGAN2. For augmentation, we employed the adaptive discriminator augmentation (ADA) method proposed by Karras~{\em et~al.}\cite{stylegan2ada}. In ADA, Karras~{\em et~al.} propose 6 different differentiable operations that can be done on images to augment the data. Further, they apply these augmentations stochastically with probabilities lower than 1.0, to give non-augmented images dominance so that the transformations do not leak into the generator~\cite{stylegan2ada}. They show that applying this improves the quality of samples generated by stylegan2 when the size of the dataset is small, as is the case here.
In the interest of space, we do not discuss the augmentation methods any further as it is not central to our key methodology. To increase the quality of our generated samples, we augment the training data by using images of bike parts~(details described in section \ref{sec:data}). The augmentation leads to 27,406 total images in the training dataset. We also find that providing images of bike parts as training data in the early stages of training StyleGAN2 leads to further improvement in the quality of generated bikes. After training the model with the bike part augmentation, we fine-tune the model with only full bike images to prevent the GAN model from generating partial bikes. Another reason for doing this is to achieve better disentanglement in the StyleGAN2 generator. The separation of the underlying aspects of the design generation, in this case bike parts, in the generator is often referred to as disentanglement, which is important for successful editing of GANs~\cite{bau2020rewriting}. The reason for this is that when editing GANs, if the feature being changed is not disentangled from other features, a change in that feature will cause unwanted and undesirable changes in other features of the images.
\subsection{Detecting and Localizing Novelty in Generated Designs}
\begin{figure*}[ht]
\centering
\includegraphics[width=1.8\columnwidth]{figures/anomaly_detection.pdf}
\vskip -0.1in
\caption{Overview of novelty detection algorithm used to select samples with novel features.}
\label{fig:anomaly}
\end{figure*}
StyleGAN2 generates realistic designs, but some will be more novel. In this section, we discuss how to identify these novel designs and further localize the design attribute in those generated designs that contribute most in making them unique.
Fig.~\ref{fig:anomaly} shows the overall method for detecting and localizing novel designs and their attributes. The process can be divided into three stages: (1)~feature extraction from the dataset images and a test image, (2)~Measuring overall novelty of designs using K-nearest neighbors, and (3)~identifying feature map contributing to novelty. We explain the steps below.
\paragraph{Feature extraction for novelty detection:}
For this purpose, we use the SPADE method described in the prior sections. The first step of detecting novelty using SPADE is to identify which samples exhibit the highest overall novelty. The SPADE method relies on features extracted from deep CNN models rather than the images themselves. In our implementation of SPADE we use the Wide Residual Networks50~(WideResNet50)~\cite{zagoruyko2017wide} architecture pre-trained on the ImageNet dataset.
To identify and localize novelty in generated designs, we first compute and store the intermediate features of the pre-trained WideResNET50 model as well as the globally averaged features of the final layer of the pre-trained WideResNET50 model. To identify the image-level novelty for any given generated design, we use the globally averaged features of the WideResNET50 model for the samples that are being analyzed.
\paragraph{Measuring overall novelty using K-nearest neighbors:}
Next, we compute the novelty score for the generated sample using the globally averaged features of the generated sample and the globally averaged features of the 50 nearest neighbors of the generated sample in the dataset as described by Eq.~\ref{eqn:5}. The resultant score is used as a novelty scores of any generated design.
\paragraph{Identifying feature map contributing to novelty:}
After scoring a set of generated designs on overall novelty and identifying the most novel designs, the next step is to find the features within novel designs that contribute the most to the overall novelty of these designs. To do this, we use a KNN based approach similar to Eq.~\ref{eqn:5}. However, instead of measuring novelty scores for each design, we estimate the novelty of each pixel in each design, and instead of using the globally averaged features, we use the intermediate features of the pre-trained WideResNET50 model.
Using these pixel-wise features and the pixel-wise features of the 50 nearest overall neighbors found in the process of determining the overall novelty score described above, we compute the novelty score for each pixel based on Eq.~\ref{eqn:6}. Then we classify each pixel as belonging to a novel feature if its novelty score exceeds a given threshold. This helps identify a novelty map, highlighting regions within a novel design which are most unique compared to other designs. The rightmost image in Fig~\ref{fig:anomaly} show the novelty feature maps, which help in identifying the area within a design, which is most unique.
\subsection{Editing a GAN to Generate Novel Designs}
The original generative model may occasionally create a unique design. However, by identifying what makes the design unique, we can modify the generative model itself to generate many unique designs with similar features. Our goal is to create an approach that can take novel features synthesized by a generative model and rewrite the generalized rules established by the generator towards synthesizing more samples with the novel feature identified. To do this we use the GAN rewriting approach introduced by Bau~{\em et~al.}~\cite{bau2020rewriting}. Bau~{\em et~al.} proposed a way to rewrite a GAN model based on a manually identified base image, context images and a mask which needs to be edited.
In this paper, we aim to build an automated design synthesis model which can give designers numerous novel design candidates without any insight or effort needed from the designer. As a person cannot practically sift through thousands of designs to identify novel designs and attributes, selecting novel features and applying them to other generated samples manually.
The GAN rewriting method relies primarily on three inputs:
\begin{enumerate*}
\item a feature that is desired to be emphasized in the generator rules, and
\item a primary example of where the desired feature can be transferred to in another generated design, which does not have the desired novel feature.
\item a secondary set of contextual examples which can help guide the generator to apply the desired features in a contextually appropriate manner.
\end{enumerate*}
The contextual and primary examples give context to the model about the real world. By seeing a few examples, the model learns in what context a feature is generally placed in an image. For example, a few context images for a bike handle will allow the model to learn that a bike handle generally appears in the front of a bike and does not hang from the back. Without these contextual examples, there would be no practical way to modify the generator without causing it to generate unrealistic or meaningless samples.
\paragraph{Automated identification of context:}
To make rewriting possible in an automated fashion for this application, we introduce an approach to not just identify the novel features but also contextually determine where said features could be applied in other common~({\em i.e.}, not novel) designs.
We do this by identifying which part of a design (of the 7 parts of any given bike) has the most overlap with the novelty feature identified earlier. When applying the rewriting method, we also observed that the generated designs were more realistic when the transfer of features happened from the entirety of parts rather than only a partial segment of parts, which confirmed our intuition.
\paragraph{Predicting design parts:}
A challenge in using parts of a design generated by a GAN for rewriting is that we do not have labels of different parts within an assembly. Hence, we first use a machine learning model to predict the parts of a generated bike.
We train a segmentation model~(with a U-Net Architecture~\cite{ronneberger2015unet}) on the bike part data we obtained from the original bike dataset as described earlier~(Fig.~\ref{fig:segmentation_data}). This model allows us to identify bike parts in generated samples where the segmentation information is not available. At this point to identify the novel \emph{part} of the bike rather than the localized novel feature, we combine the novelty feature and the segmentation masks of different parts to determine which part of the bike, the novel feature belongs to. To do this we compute the intersection over union~(IoU) of each part of the bike and the novelty map and choose the part of the bike with the highest IoU as the novel \emph{part} of that bike.
\paragraph{Identifying rewriting context:}
Our next step is to identify the contextual examples where the novel feature belongs. One straightforward way to identify context is to leverage the trained segmentation model. For any new image, identify the same segment as the novel segment identified previously. Many contextual examples can be obtained in this way, by simply segmenting any non-novel bikes~({\em i.e.}, context samples) and picking the location of the part in the context samples corresponding to the novel part of the novel sample. As our goal is to transform non-novel bike designs into novel bike designs, we randomly select 5 of generated samples, hence likely common designs generated by the GAN, as the target context for rewriting. This allows the rewriting to make changes across different generated samples, which increases the probability of the novel features appearing in randomly generated samples. In the end, we apply rewriting using the novel feature and target context described above. Our overall approach is summarized in Fig.~\ref{fig:methodoverview}.
\section{EXPERIMENTAL SETTINGS}
In this section we describe the experimental approach taken to demonstrate the effectiveness of CreativeGAN for an example of novel bike design. Furthermore, we describe some of the implementation details and specifics of the methods applied in CreativeGAN.
\subsection{Bike Dataset}
\label{sec:data}
\vskip -0.1in
\begin{figure}[ht]
\centering
\vskip -0.2in
\includegraphics[width=\columnwidth]{figures/bike_dataset_2x5.jpg}
\caption{Samples of the bike dataset.}
\label{fig:bike_dataset}
\vskip -0.2in
\end{figure}
In this paper we use a dataset of bikes, named BIKED, introduced by Regenwetter~{\em et~al.}, which includes 4,775 bikes~\cite{bikedata} created by people on a bike design platform. The data are available in BikeCAD, CSV and image file formats. Fig.~\ref{fig:bike_dataset} shows a few sample images from the dataset. We use bike assembly and part images in our approach. The bike assembly images are used to train generative models, while we use the part images for training a segmentation model. To obtain images of each part of the bike separately, we edit the CAD files to include only one part of one bike at a time. Each bike is divided in seven main parts, which are frame, saddle, wheel, handle, bottle, rack, and crank. These bike part images are used to augment the data during training a GAN model to improve the quality of the generated samples. We also use these images to train a machine learning model to identify each part for a new bike by learning semantic segmentation information. A sample of the bike segmentation is shown in Fig.~\ref{fig:segmentation_data}. We then use segmentation information to train a deep convolutional neural network~(CNN)-based semantic segmentation model based on the U-Net architecture\cite{ronneberger2015unet}. After training our implementation of U-Net achieves an overall IoU score of 0.838, which indicates that the masks cover 83.8\% of the parts of the bike correctly. To avoid problems caused by the 16.2\% remaining error we dilate the masks for rewriting the GAN, which we describe in the following section.
\begin{figure}[h]
\centering
\vskip -0.5in
\includegraphics[width=0.7\columnwidth]{figures/segmentation_sample.png}
\vskip -0.3in
\caption{Examples of the segmented bike images. Each color represent one part of the bike.}
\vskip -0.2in
\label{fig:segmentation_data}
\end{figure}
\subsection{Implementation Details}
In our experiments, we use the novelty detection method to compute the anomaly scores of 1,000 generated samples and identify the top novel bikes. We use gray-scale images in the anomaly detection as we are more interested in the structure of the novel bikes than their color since we based our rewriting approach on bike parts. We select the 20 bikes with the highest novelty score~(Fig.~\ref{fig:noveltydetection_overall_both}) and determine the novel part of the bikes using the segmentation and novelty detection method described in the previous section. After this, we apply our rewriting method using the novel part of the bike as the input feature desired to be transferred to other samples. It is important to mention that to ensure complete coverage of the bike parts in our masks for rewriting, we dilate the masks using a dilation kernel size of 16px by 16px~(examples of these masks are illustrated in the leftmost images of Fig.~\ref{fig:rewriting_frame} and Fig.~\ref{fig:rewriting_handle}).
For the rewriting method, we found rewriting layer 6 to be the best qualitatively for rewriting the frame and layer 8 for rewriting the handle. In the optimization for rewriting, we use a learning rate of 0.05 optimize the model for 2000 steps and use a rank~\cite{bau2020rewriting} of 15 to edit the models.
\subsection{Evaluation Metrics}
To quantitatively measure if the editing applied by our method has guided the generator to synthesize novel designs, we employ the SPADE anomaly detection method to establish a metric to validate that the changes have resulted in novelty in the generated samples. To measure the novelty of a generator, we compute the average novelty score of 10,000 samples randomly generated by any edited generator. Beyond this we introduce a different metric to further validate our quantitative results. This time we use the images themselves rather than machine-learning based features. We measure novelty using the structural similarity index measure~(SSIM). To do this we measure the SSIM distance of every generated sample with all of the images in the dataset and use the the top 50 nearest neighbours as the measure for novelty.
\begin{equation}
SSIM~distance=\frac{1-SSIM}{2}
\end{equation}
In this metric the higher the SSIM distance the more novel a model is.
\section{RESULTS AND DISCUSSION}
We use the CreativeGAN method described above to guide the StyleGAN2 generator to generate novel designs. We showcase CreativeGAN through experiments on guiding novelty by editing the generator based on the novel frames and handles found in the top 20 most novel samples generated by the generator. Figure~\ref{fig:rewriting_frame} and~\ref{fig:rewriting_handle} demonstrate some of the experimental results showing how CreativeGAN changes the behavior of the original GAN.
\subsection{StyleGAN2 Results}
Figure~\ref{fig:generated_samples} demonstrates 8 randomly generated bikes by our model. Note that the GAN model can generate realistic-looking bikes, with consistency in color schemes within each model. It also does a good job at generating small parts, as seen by the presence of bottles and cranks. It also preserves symmetry in generated samples (the front and back wheels are of similar size). Overall, the bike synthesis results demonstrate that GAN models give good results in generating functional designs with multiple parts.
\begin{figure}[ht]
\centering
\vskip -0.2in
\includegraphics[width=\columnwidth]{figures/Generated_Samples.png}
\caption{Randomly generated samples of StyleGAN2 trained on bike images with our augmentation method.}
\label{fig:generated_samples}
\vskip -0.2in
\end{figure}
\begin{figure*}[ht!]
\centering
\includegraphics[width=1.9\columnwidth,height=2.4in]{figures/novel_bikes.png}
\vskip -0.1in
\caption{Left: The top 20 most novel bikes in the BIKED dataset based on their novelty scores using our novelty detection approach. Right: The top 20 most novel bikes amongst 1,000 randomly generated samples based on their novelty scores using our novelty detection approach.}
\label{fig:noveltydetection_overall_both}
\end{figure*}
\subsection{Novelty Detection In Bikes}
To illustrate the efficacy of the novelty detection method employed in CreativeGAN we demonstrate the most novel designs from the training data as well as the designs synthesized by the GAN model. We first apply the novelty detection to the original bike dataset to identify unique designs in it. Fig.~\ref{fig:noveltydetection_overall_both}-Left depicts the top 20 most novel designs within the dataset ranked based on their novelty score. One can notice that the metric successfully identifies uncommon designs with unique frames, wheels or overall structure. Furthermore, we apply the same novelty scoring approach to 1,000 randomly generated designs by our GAN model and depict the top 20 most novel amongst them in Fig.~\ref{fig:noveltydetection_overall_both}-Right. It can be seen visually that the bikes ranked most novel in both often differ significantly in their design compared to the common samples seen in the dataset~(Fig.~\ref{fig:bike_dataset}), which contains 40\% road bikes.
\subsection{Introducing Novelty in Bikes}
\begin{figure*}[h!]
\centering
\includegraphics[width=1.7\columnwidth,height=3.0in]{figures/frames.pdf}
\vskip 0.1in
\caption{Rewriting result on novel frame. The leftmost column shows the novel frames and the dilated segmentation mask used for rewriting. The right three columns each including pairs of images showing the transition of samples before and after CreativeGAN.}
\label{fig:rewriting_frame}
\end{figure*}
\begin{figure*}[h!]
\centering
\includegraphics[width=1.7\columnwidth,height=2.3in]{figures/handle.pdf}
\caption{Rewriting result on novel handles. The leftmost column shows the novel handle and the dilated segmentation mask used for rewriting. The right three columns each including pairs of images showing the transition of samples before and after CreativeGAN.}
\label{fig:rewriting_handle}
\end{figure*}
In the experiments involving the novel bike frames~(Fig.~\ref{fig:rewriting_frame}) we observe that CreativeGAN is able to incorporate the structure of the novel features effectively in bikes. Of particular interest is CreativeGAN's ability to adapt unique frames from novel samples to common bikes with different saddles and handles. This is shown even if the saddle and handle have different locations, meaning the bikes have fundamentally different designs, CreativeGAN produces novel designs that do not change the fundamentals, but rather introduce the elements of novelty into those designs. This is significant from a design prospective as it shows that CreativeGAN does not simply replicate the novel design, but learns to generalize the novel elements. The results of introducing novel handles into the generator leads to realistic bike images as shown in Fig.~\ref{fig:rewriting_handle}. Introducing new handles seems to have worked as intended with little or no change to other parts of the bike design. This is expected, as bike handles have fewer connections to the rest of the bike design and do not effect other parts in any major way. The bikes produced by CreativeGAN in these examples do not exhibit distortions in other parts of the bike, indicating that the handles are disentangled from other parts of the bike in the generator. Further, We measure the average novelty score using the SPADE as well as the SSIM score for images generated by the GAN before and after applying CreativeGAN. The results of this are shown in Fig.~\ref{fig:evaluatin_metric}.
\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{figures/evaluation_plot.png}
\caption{Generator novelty scores in each experiment and the base-line unedited novelty of the StyleGAN2 generator.}
\vskip -0.2in
\label{fig:evaluatin_metric}
\end{figure}
As evident across both metrics, CreativeGAN increases the novelty of samples notably, proving that CreativeGAN is able to modify GANs to generate novel designs. One exception here is in the SSIM distance of the handle example 2, which shows a decrease in the top 50 SSIM. As the SPADE novelty in this example is high in comparison to the unedited model, it is still possible that the overall novelty increased in this example as well, however, the lower SSIM distance does point to the possibility that the specific handle in example 2 may not be as novel as the SPADE method has detected it to be. Regardless, the visual inspection of novel designs and the agreement between SSIM and SPADE in six out of seven examples indicate that the SPADE novelty detection method is effective as an overall method of detecting novel samples. Furthermore, since the SPADE novelty metric is computed for 10,000 randomly generated samples compared to the 100 samples in SSIM~(given SSIM is computationally expensive), it demonstrate the overall novelty of the model better. The increase in this novelty metric demonstrates that CreativeGAN can enable a GAN to generate novel designs in a generalizable way, which effects the overall behaviour of the model.
\subsection{Limitations And Future Works}
CreativeGAN provides a new way to synthesize designs with unique components. However, we are still exploring the tip of the iceberg. It is important to discuss the limitations of CreativeGAN and the challenges that must be addressed for creative design generation. One issue that we observe is that when novel frames are drastically different, CreativeGAN fails to produce realistic designs. This issue is particularly notable in the bottom row (Example 4) of the results presented in Fig.~\ref{fig:rewriting_frame}, where a novel bike with a frame structure that is drastically disproportionate compared to the common bikes is identified for GAN editing, which leads to some generated samples having distorted frames or missing saddles. Another important observation is the fact that the wheels are often observed to be distorted slightly when CreativeGAN is trained on novel frames, the reason behind this is likely the fact that when generating designs the generator does not disentangle the frame from the wheels which has to lead to some distortion in the wheels when changes have been applied to the frames. This is a significant limitation of CreativeGAN and great effort must be made to ensure proper disentanglement between different parts of any design in the generator. In the future, we intend to develop approaches to improve the results of CreativeGAN and reduce the number of distortions and unwanted changes.
An important aspect of creativity is `usefulness' which we did not include in our modeling. Currently, CreativeGAN relies on the generator learning to produce useful designs based on the training dataset. However, there is no rule restricting the GAN to not produce useful designs. In our model, we do not have a mechanism to promote the performance of bikes. In the future we intent to introduce mechanisms to promote generation of high performance bikes in the GAN. We also plan to introduce similar objectives to the constraint loss term in Eq.~\ref{eqn:2} to ensure editing is being done with performance and usefulness in mind, to improve creativity of components and entire design.
Finally, the novelty detection implemented here is not specialized for bikes and is a generalized method, which involves pre-trained models trained on ImageNET. We expect new insights if the novelty detection and localization were to be tailored specifically to any given application. In the future we intend to explore methods of novelty detection that are specifically tailored to CreativeGAN and GAN editing based on novelty and verify their efficacy using expert judgments. Furthermore, we intend to explore new design synthesis methods, which take into account multiple aspects of creativity such as novelty, usefulness, performance, cost, {\em etc.}{}.
\subsection{Broader Impacts of CreativeGAN In Design}
In this paper, we introduced a novel generalizable framework for promoting creativity in GANs. Automating creativity in design is a topic that is less explored in data-driven automated design synthesis. Due to a lack of common agreement on the definition of creativity, it is also less explored in the machine learning community working on generative models. Creativity in design is difficult to model and study and presents a limitation of real-world design applications of machine learning and data-driven design synthesis. Enabling machines to be creative has been a goal of artificial intelligence~(AI)-based automated design synthesis. At this point, most applications of AI and particularly machine learning in design focus primarily on mimicking existing designs or emulating designs that already exist in different ways. This although extremely valuable for design space exploration within the known realms of any field of design, provides no avenue for design space exploration beyond the existing known boundaries of the design space, and pioneering new designs that are truly creative and transformative. In this paper, we explorer an early proof of concept in automating creative design synthesis, showing that design space exploration in a truly creative and automated fashion may be possible using AI. Finally, it is important to note that the approaches introduced here are generalizable to many different fields of design, and can broadly be applied as a framework for promoting novelty in design synthesis using data-driven methods involving GANs. In this paper we specifically demonstrated our methods in a bike design example, however, the same approaches can be applied in other domains of design. Therefore, our contributions in this paper provide a stepping stone for other researchers to employ similar methodology to explore creativity in their own domains using GAN-based design synthesis.
\section{CONCLUSION}
In this paper, we introduce a novel approach, ``CreativeGAN'', for promoting creativity in GANs. We do this by combining principles of novelty detection using machine learning and modifying a pre-trained GAN, called `rewriting GANs'. By combining these two aspects we automate the process of guiding creativity in GANs without the need for human intervention, which combined with the automatic design synthesis of GANs automates the creativity process. We demonstrated that our method is capable of producing novel designs by detecting unique features within GAN-generated designs and applying these features in other bike designs to generate a large set of novel designs which incorporate the unique features discovered. In doing this the GAN generalizes these novelties into the design process and generates designs that are more novel. We verified the novelty of CreativeGAN generated designs both visually and through quantitative metrics and demonstrated that the approaches employed in this paper result in better novelty in generated samples. We discovered that CreativeGAN was able to adapt novel features in rare and novel bikes into more common bike designs without changing the overall structure of the common bikes, hence generating designs that integrate novelty in common designs to create previously undiscovered designs.
This paper provides a pathway for machine learning in design to think beyond interpolating existing designs to automate creative design synthesis and exploration. We show the potential for GAN-based approaches in going beyond design space exploration within the known boundaries of the design space and into pioneering transformative designs outside the known design space boundaries without human supervision.
\bibliographystyle{asmems4}
\begin{acknowledgment}
The authors acknowledge the MIT SuperCloud and Lincoln Laboratory Supercomputing Center for providing HPC resources that have contributed to the research results reported within this paper.
\end{acknowledgment}
|
\section{Introduction}
Geometric magnetic frustration is often explored for the unique quantum phenomena it may create, ranging from enabling superconducting states\cite{SupercondMagFrust, Supercond2} to generating a quantum spin liquid (QSL)\cite{QSLColloquium}. While superconductivity needs no introduction, we'll briefly introduce QSLs, though more thorough reviews of QSLs are available for the reader\cite{QSL_States, QSLColloquium}. QSLs are a novel phase of matter that, despite the presence of strong magnetic interactions, do not exhibit magnetic ordering down to 0K\cite{Savary_Balents}. QSLs have yet to be proven to exist in real materials, but recent work has extensively focused on the characterization of materials with magnetically frustrated lattices\cite{Shores_HSM, QSLColloquium} and applying advancements in computational methods to better describe and predict the spin interactions of QSLs\cite{Xiang_4SM2}. After several decades of effort on both the experimental and theoretical fronts, few of the explored QSLs remain candidates. The lack of remaining QSL candidates arises from the relative ease of disproving a material to be a QSL as compared to the challenge of proving its existence, yielding a small and ever-narrowing search space for this exotic phase of matter. As such, the lack of candidate compounds limits both the ability to discover materials with exotic magnetic properties and learn from their aggregate behavior. The opportunity is thus for solid state chemistry to discover new materials that expand the structural landscape of possible QSLs. Herein, we ($i$) comprehensively identify materials with magnetic kagom{\'e} sublattices, ($ii$) review and explore their associated properties, and ($iii$) and identify candidates for further exploration.
While we choose to only explore the kagom{\'e} lattice in this work, there are numerous crystal lattices that exhibit geometric magnetic frustration. For example, the triangular lattice in 2D and the pyrochlore and hyperkagom{\'e} lattices in 3D all make arranging spins antiferromagnetically impossible. Additionally, other exchange-frustrated lattices, namely the square\cite{square_frustrated2, square_frustrated3, square_frustrated4} and honeycomb lattices\cite{honeycomb_frustrated, honeycomb_frustrated2, honeycomb_frustrated3, honeycomb_frustrated_exp, honeycomb_frustrated_exp_2} also exist. However, the square and honeycomb lattices' more restrictive requirements for J$_{i}$/J$_{j}$ ratios\cite{SquareFrustrated, j1j2_tighttolerance, honeycomb_frustrated3} and dependence of magnetic interactions up to third nearest neighbors\cite{honeycomb_frustrated4, 3nn_honeycomb} complicate a high-throughput search for frustration. As such, the kagom{\'e} lattice makes an excellent initial choice for a large scale search for new candidate QSLs due to its relative simplicity in spin coupling terms and its previous exploration in QSLs\cite{Kapella_Haydeeite, QSLColloquium}.
In addition to its relative simplicity in coupling requirements, the kagom{\'e} lattice was selected for screening due to its relation to one of the strongest candidate QSLs to date: herbertsmithite (ZnCu$_{3}$(OH)$_{6}$Cl$_{2}$)\cite{Shores_HSM,braithwaite_mereiter_paar_clark_2004}. The crystal structure of herbertsmithite, with its Cu$^{2+}$ kagom{\'e} sublattice highlighted in blue, is shown in Figure \ref{figure:HSM}. Herbertsmithite has yet to be disproven for QSL behavior \cite{Han2012} with experimental measurements showing no magnetic ordering down to temperatures as low as 50mK.\cite{hsm_lowt1, hsm_lowt2}
\begin{figure}[h]
\centering
\includegraphics[height=3.8cm]{hsm_struct.png}
\caption{The crystal structure of herbertsmithite with the Cu$^{2+}$ kagom{\'e} sublattice highlighted in blue. On the left is one kagom{\'e} plane as seen when viewing the structure down the axis perpendicular to the planes. On the right is the staggering of the kagom{\'e} planes for a single unit cell of herbertsmithite.}
\label{figure:HSM}
\end{figure}
Motivated by the ease of eliminating candidate QSLs and the challenge of generating new materials with frustrated lattices, we seek to define the structure space of existing materials with kagom{\'e} sublattices to accelerate the search for new QSLs. While Karigerasi, Wagner, and Shoemaker\cite{OtherKagomeList} have compiled a complete list of known 2D frustrated quantum magnets that can be searched, filtered, and output using a web-based frontend accessible from the Illinois Data Bank, the paper does not supply a categorization or overview of the magnetic or structural properties of the kagom{\'e}s. Additionally, other reviews of QSLs\cite{QSLColloquium,Savary_Balents} do an excellent job of outlining the challenges of this search and summarizing previously explored candidates, but they fail to provide a comprehensive assessment of all known kagom{\'e}s to date.
We begin with a structural search for compounds that are symmetry-ideal and nearly ideal kagom{\'e} sublattices from the Inorganic Crystal Structure Database (ICSD). Armed with this information, we explore the prototypes of materials with kagom{\'e} sublattices and propose a nomenclature for the describing these sublattices, focusing on structural trends for the magnetic species. After performing this classification, we generate a complete list of known kagom{\'e} prototypes regardless of their performance to date. Within a subset of this list, we rule out materials as candidate QSLs both by examining the literature for previously investigated kagom{\'e}s and analysis of spin-polarized density functional theory calculations. The final list of candidate materials can inspire more rigorous calculations and synthetic efforts as well as provide parent compounds for chemical mutations.
\section{Methods}
The initial dataset was collected by examining stoichiometric, ordered crystal structures documented in the ICSD for the geometric features of the kagom{\'e} lattice. In particular, the search screened for materials with 4-fold coordinated transition metal or rare earth atoms at unique Wyckoff positions. At each of these unique Wyckoff positions, materials were required to have equal bond distances between all neighbors and 2 each of 60, 120, and 180 degree bond angles (see Figure \ref{figure:KagomeGeo}). Additionally, all triangles lining the hexagon of the kagom{\'e} lattice needed to be equilateral. A tolerance of .3 \AA $\textrm{ }$was allowed on the bond distances and 5$^{o}$ for the bond angles. Finally, an additional search agnostic of Wyckoff position was also performed with the same geometric requirements as listed above. These geometric search constraints also included the hyperkagom{\'e} lattice in the search results.
\begin{figure}[h]
\centering
\includegraphics[height=4cm]{kagome_geo.png}
\caption{Geometric features of the kagom{\'e} lattice: four fold coordination highlighted in turquoise, equal side lengths of all triangles, and the two sets of 60$^{o}$ and 120$^{o}$ bond angles.}
\label{figure:KagomeGeo}
\end{figure}
The initial search yielded 497 unique compounds with magnetic atoms forming a kagom{\'e} sublattice at at least one Wyckoff position. Details of structural and chemical trends for these materials is detailed in the results section. A subset of 87 of the 497 compounds that contained no transition metal or rare earth atoms beyond the kagom{\'e} sublattice were selected for magnetic property screening using density functional theory (DFT). While DFT will not produce highly accurate magnetic properties for correlated materials, it is an efficient way to screen large datasets for non-magnetic compounds and poor candidate QSLs.
The magnetic moments of the calculation subset were calculated by performing spin-polarized calculations with GGA functionals and an automatic k-mesh using the Vienna Ab Initio Simulation Package (VASP). The high-throughput DFT calculations were performed using PyLada\cite{pylada}, a Python framework for the organizing and managing high-throughput first-principles calculations. Using Pylada, all spin configurations for supercells of the compounds were enumerated and their properties calculated.
To eliminate compounds with little potential as QSLs, the magnitude of the magnetic moments on the kagom{\'e} atoms of each of the compounds was first assessed. If a compound's kagom{\'e} sublattice showed no magnetic moment in any of its spin configurations, that compound was eliminated from further screening due to its predicted lack of magnetic properties. Following examination of the magnitude of the magnetic moments, the orientation of the moments in the lowest energy spin configuration for each compound was assessed. If a compound had only ferromagnetic (FM) interactions in its lowest energy spin configuration, it was eliminated from further assessment as it is unlikely a material that is predicted to be FM in DFT would be a candidate QSL. Finally, compounds with majority antiferromagnetic (AFM) interactions in their lowest energy spin configuration were most thoroughly examined for the energy differences between the lowest energy spin configuration and the FM configuration. While DFT is not the most accurate tool to compute the magnetic properties of a material, it is one of the only tools that provides a feasible means to rapidly screen even a fraction of the compounds in this dataset. More typical tools for predicting magnetic behavior, such as dynamic mean field theory, are simply too computationally expensive for a dataset of this size and for materials that may have more than 70 atoms in the unit cell.
The magnitude of the energy differences between spin configurations for structures with majority AFM interactions in their lowest energy spin configurations was investigated to approximate the strength of the coupling of the spins in the structure. While computational methods to determine the coupling coefficients for magnetic materials from DFT exist\cite{CrSiT3_Jterms, BiFeO3_Jterms}, they typically require using a spin Hamiltonian and accurately tuning the U parameter in the Hubbard model\cite{BiFeO3_Jterms} to produce accurate results. Additionally, the four-state method\cite{Xiang_4SM2, 4SM_Xiang, General_4SM_Sabani} also exists to compute the exchange coefficients, though it relies on knowing four precise magnetic configurations of the system to accurately map the energies of these configurations to the Hamiltonian for the system. As such, we instead examine the energy differences between the lowest energy AFM configuration and the FM configuration as a proxy to this coupling term to screen for compounds with interacting spins.
\section{Results and discussion}
To form the original dataset, $\sim$40,000 fully ordered, stoichiometric structures from the ICSD were screened for structural features of the kagom{\'e} lattice as detailed in the Methods. From this search, 497 compounds were found with a kagom{\'e} sublattice at a minimum of one Wyckoff position in the structure. A full list of these materials is detailed in a table in the Supplemental Information and the list is included as a CSV. Since the goal of this research is to build a comprehensive list of all known materials with a kagom{\'e} sublattice, the search included elements that are typically non-magnetic, such as zinc and cadmium. The chemical diversity of the elements forming the kagom{\'e} sublattice is highlighted as a heat map of the periodic table in Figure \ref{figure:ptabletrend}. In terms of the counts of each element in the heatmap, the relatively weak showing of the more costly transition metals such as iridium and platinum is expected, especially considering their lack of representation in the ICSD. However, the comparatively high number of rhodium containing compounds is surprising, but appears to be due to three separate works\cite{Rh_1, Rh_2, Rh_3} that explore a total of 24 variants of rhodium kagom{\'e} sublattices. The large counts of iron, cobalt, and nickel are more expected given their prevalence in the ICSD.
\begin{figure}[h]
\centering
\includegraphics[height=4.4cm]{elements_onlykagome.png}
\caption{A heat map of the elements forming the kagom{\'e} sublattice in the 497 materials from the search. All transition metals and rare earths were considered in the search, so typically non-magnetic elements such as zinc and cadmium are shown in this heat map.}
\label{figure:ptabletrend}
\end{figure}
Venturing beyond the elements forming the kagom{\'e} lattice, the compounds from our search can be categorized based on the elements surrounding the kagom{\'e} sublattice. Initially, the most apparent differentiation of these compounds are those that have additional transition metal or rare earth elements outside of the kagom{\'e} sublattice and those that do not, which we will designate as complex and simple kagom{\'e} compounds respectively. Complex kagom{\'e} compounds can be further divided into two subcategories. First, if the transition metal or rare earth atoms of the same species as the kagom{\'e} forming atom also appear outside of the kagom{\'e} sublattice, we will refer to these compounds as intrinsically complex kagom{\'e}s. Intrinsically complex kagom{\'e} compounds are unlikely to be QSLs due to the high likelihood of magnetic interactions between kagom{\'e} and non-kagom{\'e} atoms of the same species, breaking the kagom{\'e} sublattice's frustration. Alternatively, the transition metal or rare earth atoms outside the kagom{\'e} sublattice may be a different species than the kagom{\'e} forming atom. We refer to these materials as extrinsically complex kagom{\'e}s, and materials such as herbertsmithite, where zinc sits outside the Cu$^{2+}$ lattice, and YFe$_{6}$Ge$_{6}$, where yttrium atoms are outside the iron kagom{\'e} lattice, fall into this category. Extrinsically complex kagom{\'e} compounds may very well be candidate QSLs, especially if the atoms outside the kagom{\'e} sublattice carry no magnetic moment. A total 413 of the 497 compounds in the dataset are complex kagom{\'e}s, with 123 of those being intrinsically complex. The remainder are simple kagom{\'e}s.
Next examining the structural complexity of the 497 compounds in the data set, a plethora of crystal structure prototypes emerged. In total, 130 unique structure prototypes appeared, with 81 of those prototypes unique to a single compound in the dataset. Within the prototypes, MgFe$_{6}$Ge$_{6}$ was the most frequently appearing prototype, accounting for 13\% of the compounds' prototypes in this dataset. Beyond MgFe$_{6}$Ge$_{6}$, the CeCo$_{4}$B, Co$_{3}$GdB$_{2}$, Th$_{2}$Zn$_{17}$(filled), Ni$_{3}$Pb$_{2}$S$_{2}$, and ErIr$_{3}$B$_{2}$ prototypes also make strong appearances, in total comprising an additional 28\% of the appearing prototypes.
Within these prototypes, three alignments of the kagom{\'e} sheets were observed when viewing the kagom{\'e}s down the axis perpendicular to the planes. An example of each of the prototypes demonstrating the different alignments is shown in Figure \ref{fgr:staggering_ptypes}, and simplified examples of each are shown in the supplemental. First, the atoms of the kagom{\'e} sheets may align when looking down the direction perpendicular to the planes, which we refer to as aligned planes. Examples of prototypes with aligned planes would be the MgFe$_{6}$Ge$_{6}$ and Co$_{3}$GdB$_{2}$ prototypes. Aligned kagom{\'e} planes make up 310 of the 497 compounds in the dataset. If the kagom{\'e} planes are not aligned, the planes stack with lateral translation (shear) between the layers. The most common shear is a ($\frac{1}{3},\frac{1}{3}$) translation of the kagom{\'e} lattice vectors (e.g. the Ni$_{3}$Pb$_{2}$S$_{2}$ prototype). This shear keeps the overall six-fold rotational symmetry of the individual kagom{\'e} plane when extended into a stack. We refer to this stack as a symmetric shear, and it accounts for the majority of the sheared stacks observed in this data set and appears in 171 of the compounds. The final type of shear between planes is a ($\frac{1}{2}$,0) shear and is displayed by only the Cs$_{2}$Pt$_{3}$S$_{4}$ and K$_{2}$Pd$_{3}$S$_{4}$ prototypes. This shear does not preserve the six-fold axial symmetry and is referred to as asymmetric shear. Asymmetric shear is a fairly rare occurrence in this dataset, appearing in only 16 compounds. An example of each of the shears is shown in Figure \ref{fgr:staggering_ptypes} for a representative prototype of each category with its kagom{\'e} sublattice highlighted in blue, and a simplified graphic visualizing the three stacking categories is given in the supplemental. In addition to these alignment trends in kagom{\'e} plane stacking, all kagom{\'e} planes were found to either be equally spaced in a compound or to group in sets of two close planes with larger distances between the grouped planes. The plane alignment and spacing is included as data in a CSV.
\begin{figure}[h]
\centering
\includegraphics[height=4.5cm]{staggering_ptypes.png}
\caption{Representative prototype for each type of kagom{\'e} plane alignment. From left to right, the kagom{\'e} planes are aligned in MgFe$_{6}$Ge$_{6}$, symmetrically sheared for Ni$_{3}$Pb$_{2}$S$_{2}$, and asymmetrically sheared for Cs$_{2}$Pt$_{3}$S$_{4}$. In each prototype, the kagom{\'e} sublattice is highlighted in blue.}
\label{fgr:staggering_ptypes}
\end{figure}
Further examining the structural trends in this our dataset, we next examine the specific Wyckoff positions that form the kagom{\'e} sublattice. Examples of each of the following Wyckoff position dependence for kagom{\'e} sublattice formation are given in the supplemental. In this data set, we found that kagom{\'e}s are either formed by a single Wyckoff position or multiple Wyckoff positions. 392 compounds were formed from only one Wyckoff position for all planes. For the remaining compounds whose kagom{\'e}s planes are composed of multiple Wyckoff positions, two the different Wyckoff positions either resided in different planes or the same plane. For example, if multiple Wyckoff positions correspond to separate planes of the kagom{\'e} sublattice, one Wyckoff position may form a kagom{\'e} layer at z = 0, with another Wyckoff position forms the kagom{\'e} layer at z = 0.5 for kagom{\'e} planes that stack in the z direction. This is the case for the Ce$_{3}$Co$_{11}$B$_{4}$ prototype. Alternatively, multiple Wyckoff positions may exist in a single kagom{\'e} plane, and all planes are consist of multiple Wyckoff positions. For example, materials in the ErIr$_{3}$B$_{2}$ prototype exhibit this type of combined-Wyckoff kagom{\'e} plane. For compounds whose kagom{\'e} planes are formed from multiple Wyckoff positions, 56 had different Wyckoff positions at different layers, whereas 49 compounds had kagom{\'e} where each plane consisted of multiple Wyckoff positions.
Moving beyond the structural and chemical trends of the full data set, the magnetic properties of a subset of compounds were also investigated to begin building insights to the connections between structure, chemistry, and magnetic behavior. A subset of 87 compounds containing no transition metals or rare earths beyond the kagom{\'e}-forming species were selected for an initial screening with DFT and a literature review to validate predictions of magnetic behavior. The compounds in this set spanned a diverse set of prototypes and transition metal or rare earth atoms forming the kagom{\'e} sublattice, each of which are featured Figure \ref{fgr:strc72_ptypes}, and a full list of these compounds is included as a table in the supplemental and as a CSV. For Figure \ref{fgr:strc72_ptypes}, a bin for each prototype is listed along the y axis of the heat map, and the options for transition metal or rare earth atoms that form the kagom{\'e} sublattice is on the x axis. Each box of the heat map details how many times a given prototype appeared in the calculation set with the corresponding transition metal or rare earth atom forming its kagom{\'e} sublattice. For example, the CoSn prototype appeared three times in the calculation set, which is noted on the histogram to the right of the heat map. For the three times the CoSn prototype appeared, it had 3 different transition metals forming its kagom{\'e} sublattice: iron, cobalt, and rhodium. The histogram to the right details how many times each prototype appeared in the calculation set. Considering the structural trends, most protoypes are unique to a specific compound in this dataset, and most kagom{\'e} sublattices are formed from Fe, Ni, Cu, and Au. For one of the most well represented prototype, Ni$_{3}$Pb$_{2}$S$_{2}$, a historical bias in the data is present due to the thorough exploration of the shandites' half-metallic ferromagnetic behavior\cite{Weihrich_HalfAPV, Weihrich_XtalElectricShandites, Ni3Sn2S2_nonmag, Kassem_ShanditeAlloying}.
\begin{figure}[h]
\centering
\includegraphics[height=5.5cm]{ptypes_atomcounts_hist.png}
\caption{A heat map of which prototype and transition metal or rare earth atom combinations appeared for the compounds investigated with DFT. Each box of the heat map details how many times a given prototype appeared in the calculation set with the corresponding transition metal or rare earth atom forming its kagom{\'e} sublattice. }
\label{fgr:strc72_ptypes}
\end{figure}
Going beyond the trends in kagom{\'e} atom type, Figure \ref{fgr:bond_planes} details the comparisons of the distances between nearest neighbor kagom{\'e} atoms, which will be referred to as the kagom{\'e} bond distance, and the distances between the planes of the kagom{\'e}s for each prototype. A separate version of this plot for all compounds in the dataset is included in the supplemental. The range of both kagom{\'e} bond distance and planar spacing of the `Unique Prototype' bin particularly highlights the diversity in structural trends for compounds with a kagom{\'e} sublattice and shows promise for the discovery of new kagom{\'e} sublattices given their ability to exist around many additional types of atoms between their layers. For the entire dataset, the mean kagom{\'e}-kagom{\'e} bond length is 3.05\AA ($\sigma$: 0.52 \AA) and the average distance between kagom{\'e} planes is 5.69 \AA ($\sigma$: 1.48 \AA). However, the `Unique Prototype' bin displays a much large deviation in both bond lengths and planar spacings. If the unique prototype bin is excluded, more consistency in the kagom{\'e} bond distance is found (avg: 2.92\AA$\textrm{ }$, $\sigma$: 0.32\AA), and the distance separating the kagom{\'e} planes varies between prototypes and within a given prototype (avg: 5.47\AA, $\sigma$: 1.19\AA).
\begin{figure}[h]
\centering
\includegraphics[height=6.5cm]{bond_planarspacing_prototype.png}
\caption{Comparison of the kagom{\'e} bond distance (red) and planar spacing (black) for the calculation set. The values of the bond distances and planar spacings are binned in the histogram to the right of the scatter plot.}
\label{fgr:bond_planes}
\end{figure}
Having established structural and chemical trends in the compounds found, we move forward with computational screening and a literature review of the 87 compounds in the calculation set. To investigate the quality of these materials as candidate QSLs, the magnitude and orientation of the magnetic moments and the energy of the various spin configurations were collected from the DFT calculations. For the 87 compounds studied, 62 were found to be non-magnetic with DFT. These 62 compounds were mostly composed of the shandites in the Ni$_{3}$Pb$_{2}$S$_{2}$ prototype group as well as many of the uniquely appearing prototypes. The remaining 25 compounds had magnetic moments greater than 0.5 $\mu_{B}$ per atom in the structure and are classified more thoroughly below.
To assess the overall validity of these magnetic moment calculations, calculation results were compared with experimental findings in the literature. Overall, our calculations find good agreement with experiment. For example, the shandite Co$_{3}$Sn$_{2}$S$_{2}$ has been experimentally found to be ferromagnetic below 175K,\cite{Co2Sn2S2_fm} and its Ni analog, Ni$_{3}$Sn$_{2}$S$_{2}$, is non-magnetic,\cite{Ni3Sn2S2_nonmag} both of which are confirmed by our calculations. Additionally, KV$_{3}$Ge$_{2}$O$_{9}$ is reported AFM in literature,\cite{KV3Ge2O9_AFM} a result that is also confirmed by our calculations, though with a small energy differences between spin configurations in our calculations.
For the 25 materials with sizable magnetic moments, 10 had a ferromagnetic (FM) in plane and between plane spin configuration as their lowest energy. Of the remaining 15 compounds, 3 compounds had FM interactions in-plane with antiferromagnetic (AFM) interactions between planes. The final 12 compounds had AFM interactions as their lowest energy configurations, and of these 12 compounds, five had small (< 5meV/kagom{\'e} forming atom) differences in energy between the lowest energy configuration with mostly AFM interactions and the FM configuration. The remaining 7 compounds with large energy differences between spin configurations and ground state that shows mostly AFM interactions are explored more thoroughly below. Additionally, we highlight two compounds (Na$_{2}$Mn$_{3}$Cl$_{8}$ and Cu$_{3}$Pb(AsO$_{4}$)$_{2}$(OH)$_{2}$) whose energy differences are smaller than this cut off but appear to have no literature regarding their magnetic properties.
\subsection{Jarosites: \textit{A}Fe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$$\textrm{ }$ (\textit{A} = K, Na, H$_{3}$O)}
Our dataset contained four compounds with the KAl$_{3}$(SO$_{4}$)$_{2}$(OH)$_{6}$ prototype: KFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, NaFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, (H$_{3}$O)Fe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, and KCr$_{3}$(SO$_{4}$)$_{2}$(OH)$_{6}$. KCr$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$ is a mineral known as alunite, which we predicted to have mostly AFM interactions in its lowest energy configuration. While KCr$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$ showed relatively small energy differences between its lowest energy and its FM configuration (4 meV/Cr atom), the remaining three members of this prototype showed more promise as candidate QSLs. KFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, NaFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, and (H$_{3}$O)Fe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$) are compounds belonging to the mineral group of jarosites, and we will focus the rest of this section on this class of materials.
Jarosites are a naturally occurring hydrous sulfate mineral with a composition following the formula AFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, (A = Na, K, Rb, H$_{3}$O, Pb, or other metals or molecules), where the Fe atoms form the kagom{\'e} sublattice in the crystal \cite{Basciano2007}. Previous investigations into both naturally occurring and synthetic jarosites has shown they typically exist with large concentrations of vacancies on the kagom{\'e} sublattice\cite{Grohol2003,Basciano2007}. Despite this large fraction of vacancies, jarosites are considered to be nearly ideal Heisenberg antiferromagnets, especially when the vacancy concentration is minimized\cite{Harrison2004}.
The original jarosite for which this group of minerals derives its name has the formula KFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$, where the Fe atoms form the kagom{\'e} sublattice. From DFT, we find jaroiste's lowest energy Ising spin configuration, which mostly consists of AFM interactions, and the FM configuration to have an energy difference of 90 meV/Fe atom with a magnetic moment of 4.2 $\mu_{B}$ per Fe atom. Next we examine a variation on jarosite where the K atoms surrounding the kagom{\'e} lattice are swapped for Na, creating natrojarosite (NaFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$). We predict natrojarosite to have a magnetic moment of 4.2 $\mu_{B}$ per Fe atom. Additionally, the lowest energy configuration with mostly AFM interactions and FM spin configurations varied by 132 meV/Fe atom for natrojarosite. Finally, hydronium jarosite ((H$_{3}$O)Fe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$) showed similar results to its previous mineral family members, showing a magnetic moment of 4.2 $\mu_{B}$ per Fe atom and an energy difference of 105 meV per Fe atom from the mostly-AFM to the FM spin configurations.
Most jarosites have been experimentally shown to undergo long range magnetic ordering between 50-65K. In particular, KFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$ orders at 65 K\cite{jarosite_inami} and NaFe$_{3}$(OH)$_{6}$(SO$_{4}$)$_{2}$ at 50 K\cite{Wills2000}. Hydronium jarosite, however, displays a break from the ordering trend and has been shown to be spin glass with a glass transition temperature of 15K\cite{hydronium_jarosite}. These experimental results eliminate all of the jarosites for QSL behavior. However, future investigations into the jarosites could model Wills'\cite{Wills2000,DopingJarosites} approach to taking advantage of the large vacancy concentration on the Fe sites and investigate the magnetic properties of doped jarosites to further illuminate their magnetic behavior .
\subsection{Cs$_{2}$KMn$_{3}$F$_{12}$}
From DFT, Cs$_{2}$KMn$_{3}$F$_{12}$ shows promise as a QSL candidate with a magnetic moment of 3.7 $\mu_{B}$/Mn atom and a difference of 200 meV/Mn atom between the mostly-AFM and FM spin configurations. This compound and those similar in their chemistry and structure have been previously investigated for its magnetic properties. While compounds such as Cs$_{2}$LiMn$_{3}$F$_{12}$ and Cs$_{2}$NaMn$_{3}$F$_{12}$ order at 2.1 K and 2.5 K, respectively, the ordering temperature of Cs$_{2}$KMn$_{3}$F$_{12}$ appears to order around 7 K\cite{Cs2Cu3F12Sn1_AFMOrder, Cs2F12K1Mn3_OrigMag}. However, it is unknown if the ordering in this sample is long-range or short range and the exact nature of the ordering should be investigated experimentally.
\subsection{Cs$_{2}$SnCu$_{3}$F$_{12}$}
Similar in composition to Cs$_{2}$KMn$_{3}$F$_{12}$ but quite different in structure, our predictions initially show Cs$_{2}$SnCu$_{3}$F$_{12}$ to be a candidate for QSL behavior. With a magnetic moment of 0.77 $\mu_{B}$/Cu atom and an energy difference of 12 meV per Cu atom between the mostly AFM and the FM states, Cs$_{2}$SnCu$_{3}$F$_{12}$ appears promising from our predictions. However, literature shows that Cs$_{2}$SnCu$_{3}$F$_{12}$ experiences long range magnetic ordering at 17K and structural distortions are reported around 185 K\cite{Cs2SnCu3F12_longrangeorder,Cs2SnCu3F12_longrangeorder2}, experimentally eliminating it as a candidate QSL.
\subsection{Na$_{2}$Ti$_{3}$Cl$_{8}$ and Na$_{2}$Mn$_{3}$Cl$_{8}$}
In calculation, Na$_{2}$Ti$_{3}$Cl$_{8}$ showed promise for a QSL with a magnetic moment of 1.7 $\mu_{B}$ per Ti atom in the structure and an energy difference of 390 meV/Ti atom in the structure from the lowest energy, mostly-AFM configuration to the FM configuration. Despite its computational promise, this material has been previously investigated for its magnetic properties and has been shown to undergo a Peierl's-type distortion at 200K, forming Ti trimers,\cite{NaTiCl_distort} experimentally eliminating it as a candidate QSL. Calculations were also performed on the Mn analog of this compound, Na$_{2}$Mn$_{3}$Cl$_{8}$, which was found to have a magnetic moment of 4.5 $\mu_{B}$ per Mn atom. However, Na$_{2}$Mn$_{3}$Cl$_{8}$ shows very small energy differences (1.6 meV/Mn atom) between the mostly-AFM and FM spin configurations, with the AFM being lower. Magnetic measurements of Na$_{2}$Mn$_{3}$Cl$_{8}$ have been made previously, finding no distortions or magnetic ordering down to 100 K\cite{Na2Mn3Cl8Mag}. However, this compound should be further investigated experimentally to determine if the distortions observed in Na$_{2}$Ti$_{3}$Cl$_{8}$ persist with swaps of the kagom{\'e}-forming atom and to determine an ordering temperature if one exists.
\subsection{Corkite, PbFe$_{3}$(SO$_{4}$)(PO$_{4}$)(OH)$_{6}$}
Similar in structure to the jarosites, we also find the compound corkite (PbFe$_{3}$(SO$_{4}$)(PO$_{4}$)(OH)$_{6}$) to have a spin configuration with mostly AFM interactions as its lowest energy state in calculation. With a magnetic moment of 4.2 $\mu_{B}$ per Fe atom and an energy difference of 80 meV per Fe atom between the lowest energy, mostly-AFM and FM spin configurations, corkite shows a remarkable similarity to the jarosites in DFT.
Corkite is another naturally occurring mineral that can be found in acidic mine runoff\cite{Corkite_wastedumps}. While corkite's structure has been extensively studied for determining the location of its phosphate and sulfate groups and to cope with the challenges of creating a high quality crystalline sample\cite{Corkite_wastedumps, Corkite_struct, GIUSEPPETTI1987}, little about its properties are reported in the literature other than its light brown color and its potential application in identifying economically valuable ores for mining\cite{Corkite_indicator}. Magnetic measurements of corkite should be made to determine if this mineral orders as the jarosites do.
\subsection{Bayldonite, Cu$_{3}$Pb(AsO$_{4}$)$_{2}$(OH)$_{2}$}
Though it has a smaller energy difference between its spin configurations than previously highlighted compounds in this section, we choose to highlight Cu$_{3}$Pb(AsO$_{4}$)$_{2}$(OH)$_{2}$ because its lack of magnetic data in the literature. Cu$_{3}$Pb(AsO$_{4}$)$_{2}$(OH)$_{2}$, also known by the mineral name bayldonite, was shown to have a configuration dominated by AFM interactions as its lowest energy configuration with a magnetic moment of roughly 0.7 $\mu_{B}$/Cu atom and large energy differences between the lowest energy and the FM spin configurations (on the order of 4.2 meV/Cu atom). To the best of our knowledge, this compound has not been investigated for its magnetic properties and should be explored experimentally to learn more about its magnetic behavior.
In the subset of materials DFT was performed on, we analyzed the proclivity for the transition metal or rare earth elements produce a magnetic moment as a function of the prototype each appeared in. Our findings are summarized in Figure \ref{fgr:tm_atom_presence} by giving a percentage of each transition metal or rare earth in each prototype that had a magnetic moment from DFT.
\begin{figure}[h]
\centering
\includegraphics[height=5cm]{ptype_magmom_heatmap.png}
\caption{Percent of elements with a magnetic moment for each prototype for the calculation subset of kagom{\'e}s. Ni, Pd, Pt, Ag, and Au never produced moments regardless of prototypes, while Cr, Mn, Fe, and Co always did.}
\label{fgr:tm_atom_presence}
\end{figure}
As expected, certain transition metals and rare earths are more prone to displaying a magnetic moment from calculation. Cr, Mn, Fe, and Co were always predicted to have a magnetic moment, while Ni, Pd, Pt, Ag, and Au never did. On the more ambiguous end of the spectrum are Ti, Cu, and Rh, which only produced moments when appearing in specific prototypes, each of which were expected given the charge counting. Given the small number of compounds investigated in each prototype, determining which prototypes are most likely to produce a magnetic properties from this dataset is unwise. Regardless, each of these prototypes can be manipulated to expand the possible structure space available for candidate QSLs. By swapping the various transition metal or rare earths forming the kagom{\'e} lattice, trends between structure, chemistry, and magnetism can be further elucidated while providing more options to search for candidate QSLs.
\section{Conclusion}
Despite hundreds of kagom{\'e} sublattice-containing compounds in known materials, there was a dearth of knowledge on their identification as well as structural and magnetic properties. By creating this dataset, we have been able to show that the kagom{\'e} sublattices appear in a chemically and structurally diverse set of materials. We report kagom{\'e} sublattices formed from 30 different transition metal or rare earths and 130 unique prototypes with variety of spacings between kagom{\'e} atoms both in plane and out of plane, as well as three different trends for stacking of the kagom{\'e} planes.
Additionally, we demonstrate of a method of computationally screening materials for their magnetic properties, particularly magnetic frustration, which is necessary for enhancing the search for candidate QSLs. As is elucidated by this search, there is a wide chemical and structural space for kagom{\'e} sublattices to exist in and it is nowhere near fully explored. Finally, we predict nine candidate materials for possible QSL behavior from the results of our calculations. Of these nine materials, six (the jarosites, Na$_{2}$Ti$_{3}$Cl$_{8}$, Cs$_{2}$KMn$_{3}$F$_{12}$, and Cs$_{2}$SnCu$_{3}$F$_{12}$) have been experimentally eliminated as candidate QSLs, leaving Na$_{2}$Mn$_{3}$Cl$_{8}$, corkite, and bayldonite as promising candidate QSLs to be investigated experimentally following this work.
\begin{acknowledgement}
V. Meschke acknowledges this material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. 1646713. EST acknowledges NSF award 1555340. The research was performed using computational resources sponsored by the Department of Energy's Office of Energy Efficiency and Renewable Energy and located at the National Renewable Energy Laboratory.
\end{acknowledgement}
\section*{Conflicts of Interest}
There are no conflicts to declare.
\begin{suppinfo}
The following files are available free of charge as supporting information:
\begin{itemize}
\item calculation\_set.xls: Spreadsheet listing the compounds DFT was used to screen magnetic properties on, as well as some key results of the calculations.
\item full\_kagome\_dataset.xls: Spreadsheet listing all found kagom{\'e} compounds from the search of the ICSD.
\end{itemize}
\end{suppinfo}
|
\section{Introduction}
Following Lindenstrass and Tzafriri \cite{LT}, we say a Banach space $Y$ has the \emph{lifting property} (LP) if for every bounded operator $\psi$ from a Banach space $X$ onto a Banach space $W$ and for every $S\in \L(Y,W)$, there is $\hat{S} \in \L(Y,X)$ such that $S=\psi \circ \hat{S}$. We note that in \cite{LT} it is shown that $\ell_1$ has the LP, but that can easily be extended to show that any space isomorphic to $\ell_1$ has the LP. The converse for infinite dimensional separable spaces is given in \cite{LT}.
If we put the attention on $W$ rather than $Y$, we say $W$ has the \emph{alternate lifting property} (ALP), if for an operator $\psi$ from $X$ onto $W$ and $S\in \L(Y,W)$, there is $\hat{S} \in \L(Y,X)$ such that $S = \psi \circ \hat{S}$. From the ideas in \cite{LT} we have the following theorem.\\
{\bf{Theorem.}} {\it Let $W$ be a Banach space. Then $W$ satisfies the ALP if and only if $W$ is isomorphic to $\ell_1(\Gamma)$, for a suitable index set $\Gamma$.
}\\
We consider the case where $W$ is the quotient of $X$ by a closed subspace $J$ with $\psi = \pi$, where $\pi$ is the quotient map. We are interested in the existence of norm preserving lifts of a bounded operator $S: Y \rightarrow X/J$. If, for every $Y$ and $S$, such a lift exists then we say that the pair $(X, J)$ has \textit{quotient lifting property} (QLP).
First, we give an alternate version of the QLP. We say that $Y$ satisfies the \textit{alternate quotient lifting property} (AQLP) if given a Banach space $X$ with closed subspace $J$ and bounded operator $S$ from $Y$ to $X/J$, there exists $\hat{S}\in \L(Y,X)$ such that $S = \pi\circ \hat{S}$. We obtain a similar characterization for Banach spaces with the AQLP.\\
{\bf{Theorem.}} {\it If $Y$ is Banach space then $Y$ satisfies the AQLP if and only if $Y$ is isomorphic to $\ell_1(\Gamma ),$ for a suitable index set $\Gamma $.\\
}
We remark that we have not required $\|\hat{S}\| = \|S\|$ in the alternate versions as we do for the QLP.
In this paper we first study conditions on a Banach space that ensure the existence of liftings for operators either into the space (ALP) or on the space (AQLP), and for which a diagram commutes. We also investigate conditions for the existence of norm preserving lifts of operators (QLP) and its interconnections with metric projections, linear selections and proximinality.\par
We start by recalling some definitions to be used throughout. For a closed subspace $J$ of $X$, we denote by $\pi$ the canonical quotient map from $X$ to $X/J$, given by $\pi (x) =x+J$ ($\|\pi\|=1$ unless $J=X$). A subspace $J$ of a normed linear space $X$ is called \textit{proximinal} (resp. \textit{Chebyshev}) if for each $x$ in $X$, the set of best approximations to $x$ in $J$,
\begin{center}
$P_J(x) := \{j \in J| \|x-j\|= dist(x,J)\}$
\end{center}
is nonempty (resp. a singleton). The set valued map $P_J$ is called the \textit{metric projection onto $J$}. For a proximinal subspace $J$, a \textit{selection} for $P_J $ is a function $p: X\to J$ with $p(x) \in P_J(x)$, for every $x$. If $p$ is linear we call it a \textit{linear selection}. The \textit{metric complement} of $J$ is defined to be $J_0=\{x \in X: \|x\|=dist(x, J)\}.$ We also recall that an M-ideal in a Banach space is a subspace for which the annihilator is an L-summand of the dual space. For details we refer the reader to Chapter 1 in \cite{hww}. It is a known fact that M-ideals are proximinal.
In section 2 we prove the theorems stated above. These theorems characterize spaces with the ALP and spaces with the AQLP, up to isomorphism. We draw some conclusions concerning subspaces of Banach spaces with the property. \par
In section 3 we show that proximinality is a necessary condition for the QLP and the metric complement being a subspace is sufficient for QLP. \par
In section 4 we study the relation between properties of the metric complement of $J$ and the QLP for $(X,J)$. It is worth to mention that the existence of a linear selection is an invariant condition under isometric isomorphisms. From this fact we derive that the QLP holds for several pairs of Banach spaces. Moreover, for proximinal subspaces, we show that the QLP is equivalent to the existence of a linear selection. \par
In Section 5 we consider the QLP for subspaces that are M-ideals. If $X$ is reflexive and $J$ is an $M$-ideal in $X$, then $(X,J)$ has the QLP. The same holds for $C([0,1]^n)$ and $J$ an $M$-ideal in $C([0,1]^n)$. The QLP does not hold, in general, for $(C(\Omega), J)$, with $\Omega$ a compact Hausdorff space and $J$ an $M$-ideal of $C(\Omega )$. Nevertheless, the QLP holds when $\Omega$ is compact and metrizable.
\section{The Alternate Lifting Properties}
We define the following alternate lifting properties for Banach spaces.
\begin{Def} Let $W$ be a Banach space. Then,
\begin{itemize}
\item \label{ALP} $W$ has the ALP if and only if given Banach spaces $X$ and $Y$, an operator $\psi$ from $X$ onto $W$ and $S\in \L(Y,W)$, there is $\hat{S} \in \L(Y,X)$ such that $S = \psi \circ \hat{S}$.
\item \label{AQLP}$Y$ has the AQLP if and only if for every Banach space $X$, a closed subspace $J$ and a bounded operator $S$ from $Y$ to $X/J$, there exists $\hat{S}\in \L(Y,X)$ such that $S = \pi\circ \hat{S}$, with $\pi$ denoting the quotient map from $X$ onto $X/J$.
\end{itemize}
\end{Def}
\begin{thm} \label{ALP-up-to-isomorphism} Let $W$ be a Banach space. Then $W$ satisfies the ALP if and only if $W$ is isomorphic to $\ell_1(\Gamma )$, for some suitable index set $\Gamma $.
\end{thm}
\begin{proof} The statement is straightforward for finite dimensional spaces. We present the proof for the infinite dimensional case. We recall that any Banach space is the quotient of $\ell_1(\Gamma)$ for some suitable index set $\Gamma$ (see \cite{R} page 21), and therefore is the range of a bounded operator on $\ell_1(\Gamma)$. Let $W$ satisfy the ALP and in that definition, let $X = \ell_1(\Gamma )$, $\psi$ a bounded operator from $X$ onto $W$, $Y = W$, and $S$ the identity operator on $W$, denoted by $Id$. Then by the ALP, there exists $\hat{S}$ from $W$ to $\ell_1(\Gamma)$ such that
\[Id = S = \psi \circ \hat{S}.\]
It is easy to see that $\hat{S}\circ \psi$ is a bounded projection onto a subspace of $\ell_1(\Gamma)$. It follows from the Koethe extension of Theorem 2.a.3 in \cite[p. 108]{LT} that W is isomorphic to $\ell_1 (\Gamma )$.
On the other hand, suppose $T$ is an isomorphism from $\ell_1(\Gamma )$ onto $W$. Let $w_{\gamma} = Te_{\gamma}$, where $\{e_{\gamma}\}$ denotes the standard family of functions from $\Gamma$ into the scalar field such that $e_{\gamma} (\alpha)= 1$ for $\gamma = \alpha,$ and $0$ otherwise. Thus if $w\in W$, there exists an absolutely summable family $\{\alpha_{\gamma}\}$ of scalars such that $w= \sum_{\gamma \in \Gamma} \alpha_{\gamma} w_{\gamma}$. There exists $x_{\gamma} \in X$ such that $\psi(x_{\gamma}) = w_{\gamma}$ and since $\psi$ is surjective and open, the family $\{x_{\gamma}\}$ must be bounded. For $y\in Y$ there is an absolutely summable family of scalars $\{\alpha_{\gamma}\}$ such that $S(y) = \sum_{\gamma \in \Gamma} \alpha_{\gamma} w_{\gamma}$. Since the series $\sum_{\gamma \in \Gamma} \alpha_{\gamma} x_{\gamma}$ is absolutely summable, it must converge to some $x\in X$. We define $\hat{S} (y) = x$ and it follows that $\hat{S}$ is a bounded linear operator from $Y$ to $X$ such that $S = \psi \circ \hat{S}$.
\end{proof}
Similar considerations apply to the AQLP (see Definition \ref{AQLP}) to prove the characterization for Banach spaces with the AQLP.
\begin{thm} \label{a} Let $Y$ be a Banach space. Then $Y$ satisfies the AQLP if and only if $Y$ is isomorphic to $\ell_1(\Gamma )$.
\end{thm}
\begin{proof} Suppose $Y$ has AQLP. As above, $Y$ is isometric with a quotient space $\ell_1(\Gamma)/J$ for some index set $\Gamma$. Let $X = \ell_1(\Gamma)$ and $J$ its subspace as given. Let $S$ be the isometry between $Y$ and $\ell_1(\Gamma)$. For $\hat{S}$ guaranteed by AQLP, the operator $\hat{S} \circ S^{-1} \circ \pi$ is a projection onto a complemented subspace of $\ell_1(\Gamma)$. The remainder of the proof follows as in the proof of Theorem \ref{ALP-up-to-isomorphism}.
\end{proof}
Therefore the class of Banach spaces with the ALP coincides with that of the AQLP.
\begin{thm}\label{b} Let $W$ be a Banach space and let $W_1$ be a complemented subspace of $W$. If $W$ has the AQLP then $W_1$ has the AQLP.
\begin{proof} Let $X$ be a Banach space and $J$ be a closed subspace of $X$.
Since $W_1$ is complemented in $W$, there exists a projection $P$ from $W$ onto $W_1$. Given $S\in L(W_1, X/J)$ and since $W$ has the AQLP, there exists $\widetilde{S\circ P}$, a lift of $S\circ P$, such that $\pi \circ \widetilde{S\circ P}= S\circ P$. Then $\widetilde{S\circ P}|_{W_1}$ is a lift for $S$. This concludes the proof.
\end{proof}
\end{thm}
Theorems \ref{a} and \ref{b} imply that every separable infinite dimensional complemented subspace of a space with the AQLP (or ALP) is isomorphic to $\ell_1$. We invoke the main theorem in \cite{PC} to conclude that $C(\Omega, E)$ (with $\Omega$ an infinite compact Hausdorff space and $E$ an infinite dimensional Banach space) does not satisfy the AQLP. In particular, $C(\Omega, C(\Omega))$; $C(K_1 \times K_2)$, where $K_1$ and $K_2$ are infinite compact Hausdorff spaces, do not satisfy the AQLP, since each of these spaces contain a complemented copy of $c_0$. See \cite{PC}.
\section{Proximinality and the Quotient Lifting Property}
In this section we start with the definition for a pair of Banach spaces to have the QLP. The authors are grateful to T.S.S.R.K.Rao for mentioning a property considered in \cite{hww} that lead to this definition.
\begin{Def} \label{(Quotient Lifting Property)} Let $X$ be a Banach space and $J$ be a closed subspace of $X$. The pair $(X,J)$ has the QLP if and only if for every Banach space $Y$ and every bounded operator $S: Y \to X/J$ there exists a bounded operator $T$ from $Y$ to $X$ lifting $S$ while preserving the norm, i.e. $\|T\|=\|S\|$ and $\pi \circ T = S$.
\end{Def}
Given $S$, as in the Definition \ref{(Quotient Lifting Property)}, there may exist several liftings, i.e. bounded operators $T$ such that $S=\pi \circ T$. For each such lifting, $T$, we have $\|S\|\leq \|T\|.$ It is easy to construct examples where the inequality is strict.
\begin{thm} \label{proximinality-as a necessary for qlp} Let $X$ be a Banach space and $J$ a closed subspace of $X$. Then
\begin{enumerate}
\item[(i)] If $(X,J)$ has the QLP then $J$ is proximinal in $X$.
\item[(ii)]\label{t4} If $J$ is proximinal in $X$ and $P_J$ has a linear selection, then $(X,J)$ has the QLP.
\end{enumerate}
\end{thm}
\begin{proof}
If $J$ is not proximinal in $X$, then there must exist a norm one element $x\in X$ such that $dist(x, J) < \|x-j\|$, for every $j \in J$.
We define $Y=span \{x\}$. Let $S: Y \rightarrow X/J$ be such that $S(x) = x+J$ then $\|S\|= dist(x, J)$. Every bounded operator $T: Y \rightarrow X$ such that $\pi \circ T=S$, satisfies $T(x) = x+j$, for some $j \in J$. Then $\|S\|<\|x+j\|\leq \|T\|.$ This proves (i).
\par
For (ii), suppose $P_J$ admits a linear selection $p:X\to J$ and let $\psi : X/J \to X$ be defined by $x + J\mapsto x-p(x)$. To see that $\psi$ is well defined, we suppose that $x_1 +J= x_2+J$. Then $x_2 = x_1+j$ for some $j\in J$, and by the linearity of $p$, we can write \[\psi(x_2 + J) = x_2-p(x_2) = x_1+j-p(x_1)-j=x_1-p(x_1)=\psi(x_1 + J) .\] Thus $\psi$ is a linear isometry. For a bounded operator $S: Y \to X/J$, $\tilde{S} = \psi\circ S$ provides the lifting as desired.
\end{proof}
\begin{cor}
If $ J$ is an M-summand in X, then (X,J) has QLP .
\end{cor}
\begin{proof}
If $ J$ is an M-summand in X, then J is proximinal and has a linear (continuous) selection, namely, the M-projection P. Therefore the statement.
\end{proof}
David Yost in \cite{DY} proved that a Banach space is reflexive if and only if every closed subspace is proximinal. Hence every nonreflexive space must contain a nonproximinal closed subspace and therefore this pair does not have the QLP.
We now give an example of a pair of spaces for which the proximinality condition holds but the QLP does not hold. First, we recall the notion of total subset of a Banach space. A subset $F$ of the dual space $X^{*}$ of a Banach space $X$ is said to be total if $f(x) =0$ for each $f \in F$ implies that $x=0$.
\begin{ex}\label{5} We consider the pair $(\ell_{\infty},c_0)$. From \cite{hww} we know $c_0$ is an $M$-ideal, hence a proximinal subspace of $\ell_{\infty}$.
We show that the pair $(\ell_{\infty},c_0)$ does not have the QLP. To see this, we observe that there is no injective bounded linear map from $\ell_{\infty} / c_0$ to $\ell_{\infty}$.
We assume the existence of an injective bounded linear map $\phi$ from $\ell^{\infty} / c_0$ to $\ell_{\infty}$.
Since $\left( \ell_{\infty}\right)^*$ contains a countable total set, $\{\tau_i : \tau_i(e_j)=\delta_{ij}\}$,
then $\phi^* \tau_i$ is a total set for $(\ell_{\infty}/c_0)^*$. Indeed, for $z\in \ell_{\infty}$ such that $\phi^* \tau_i (z)=0$ for all i, then $\phi z=0$. Since $\phi$ is injective, then $z=0$.
Arterbaum and Whitley in \cite{W} showed that $(\ell_{\infty}/c_0)^*$ has no countable total subset.
Therefore, the identity map from $\ell_{\infty} / c_0$ to $\ell_{\infty} / c_0$ has no lift.
If such a lift existed, it would be an injective bounded linear map. This is impossible and it shows that the pair $(\ell_{\infty} , c_0)$ does not have the QLP.
\end{ex}
We note that the quotient space $\ell_{\infty}/c_0$ does not have the ALP. To establish this take $S$ to be the identity map from $\ell_{\infty}/c_0$ to $\ell_{\infty}/c_0$ and $\psi$ to be the quotient map from $\ell_{\infty}$ to $\ell_{\infty}/c_0$.
If there exists $\hat{S}$ from $\ell_{\infty}/c_0$ to $\ell_{\infty}$ such that $S=\psi\circ\hat{S}$, then $\hat{S}$ is an injective map but no such map exists. Theorem \ref{ALP-up-to-isomorphism} implies that $\ell_{\infty}/c_0$ is not isomorphic to a $\ell_1( \Gamma ),$ for any index set $\Gamma$.
For completeness of exposition we include the following theorems from \cite{D} and from \cite{CW} to be used later.
\begin{thm}\label{4} (See Deutsch, \cite{D}) Let $J$ be a proximinal subspace of a normed linear space $X$. Then the following are equivalent
\begin{enumerate}
\item $P_J$ has a linear selection.
\item $J_0,$ the metric complement of $J$, contains a closed subspace $J_1$ such that $X = J\oplus J_1$.
\end{enumerate}
\end{thm}
\begin{thm}\label{2}(See Cheney and Wulbert \cite{CW}) Let $J$ be a subspace of $X$. Then
\begin{enumerate}
\item $J$ is a proximinal subspace if and only if $X= J+J_0$.
\item\label{3} $J$ is Chebyshev if and only if $X= J+J_0$ and the representation of each $x \in X$ as $x = j + j_0$, where $j\in J$ and $j_0 \in J_0$, is unique.
\end{enumerate}
\end{thm}
Thus we have the following proposition.
\begin{prop}\label{J_0 is a subspace}Let $J$ be a proximinal subspace of $X$. Then
\begin{enumerate} \item[(i)] If $J_0$ is a subspace of $X$ then $(X,J)$ has the QLP.
\item[(ii)] \label{c7}(cf. \cite{hk}) $J_0$ is a subspace if and only if $J$ is Chebyshev and $P_J$ is linear.
\end{enumerate}
\end{prop}
\begin{proof} From Theorem \ref{2}, we have $X= J+J_0$. By assumption $J_0$ is a subspace of $X$, so Theorem \ref{4} asserts that $P_J$ has a linear selection. So (i) follows from Theorem \ref{t4}-(ii).
\par
Since $J$ is proximinal in $X$ and $J_0$ is a subspace, Theorem \ref{2}-(1) implies that $X=J+ J_0$. It is clear that $J\cap J_0=\{0\}$, then $X=J\oplus J_0$. The existence of a linear selection of the metric projection $P_J$ follows from Theorem \ref{4}. The uniqueness of the representation of any element in $X$ implies that $J$ is Chebyshev by Theorem \ref{2}-(2). Conversely, since $J_0=\{ x-P_J(x): \, x \in X\}$, the linearity of the metric projection implies $J_0$ is a subspace of $X$.
\end{proof}
Next example shows that $J_0$ being a subspace is not a necessary condition for the QLP.
\begin{ex}(See example 2.7 of \cite{D})
Let $X = \ell_{\infty}^{(2)}(\mathbb{R})$ and $J=span \{e_1\}$. It is easy to see that $J_0$ is not a subspace. Just consider $(0,2)$ and $(1,-2)$, both in $J_0$ with sum $(1,0) \notin J_0$. We observe that $p:X\rightarrow J$ given by $p(x,y)=(x,0)$ is a linear selection for the metric projection, Theorem 2-(ii) implies that $(\ell_{\infty}^{(2)}({\mathbb{R}}), J )$ has the QLP.
\end{ex}
\section{On metric complement of subspaces for low dimensional Banach spaces}
In this section we start with a characterization of the metric complements of subspaces of $\ell_{\infty}^{(2)}(\mathbb{R})$. First, we notice that for $J=\{0\}$ or $J = X$ then $J_0=X$ or $J_0=\{0\}$ respectively.
\begin{prop}\label{1} Let $X = \ell^{(2)}_{\infty}(\mathbb{R})$ and let $J$ be a non-trivial subspace of $X$. Then $J_0$ is a subspace of $X$ if and only if $J$ is generated by $(u,v)$ with $uv\neq 0$.
\end{prop}
\begin{proof}
We claim that $J_0$ is homogeneous, i.e. given $(a,b) \in J_0$ and $\lambda$ a nonzero scalar, then $(\lambda a, \lambda b)\in J_0$. Towards this claim we just observe that
\[ \inf_{j \in J} \|(\lambda a, \lambda b)-j\| =|\lambda | \inf_{j \in J} \|( a, b)-\lambda^{-1} j\| =|\lambda | \|(a,b)\|= \|(\lambda a, \lambda b)\|. \]
Let $J$ be a non-trivial subspace of $\ell^{(2)}_{\infty}(\mathbb{R})$ generated by $(u,v)$. If $uv = 0$, WLOG assume that $u\neq 0$ and $v = 0$, then $J=span (1,0)$. If $J_0$ is a subspace we have $w_0=(0,1)$ and $w_1=(1,1)$ belong to $J_0$ but $w_1-w_0=(1,0)$ does not belong to $J_0$. This shows that $J_0$ is not a subspace. If $uv \neq 0$, let $a=\frac{v}{u}$ then $J$ is generated by $(1,a)$. For $x_1 = (1,c)$\vspace{-2mm}
\begin{center}
$dist(x_1,J)= \inf_{t \in \mathbb{R}}\{\max \{ |1-t|,|c-at|\}\}$
\end{center}\vspace{-3mm}
\begin{figure}[h]
\centering
\includegraphics[width=1\linewidth]{"pic_2"}
\end{figure}
The graphs of $|1-t|$ and $|c-at|$ plotted in the figure above illustrate the cases to be considered in the computation of $dist(x_1,J)$. In each case, the distance is equal to the second coordinate of $P$. We now proceed with the computations. \\
Case I: $a>0$\\
If $c>a$, $dist(x_1,J)=\frac{c-a}{1+a}$ which is not equal to $\|x_1\|_\infty$ for any choice of $c$. If $c<a$, $dist(x_1,J)=\frac{a-c}{1+a}$ which is equal to $\|x_1\|_\infty$ only if $c = -1$. So $J_0$ is generated by $(1,-1)$ and is a subspace of $X$.\\
Case II: $a<0$\\
If $c>a$, $dist(x_1,J)=\frac{c-a}{1-a}$ which is equal to $\|x_1\|_\infty$ only if $c = 1$. If $c<a$, $dist(x_1,J)=\frac{a-c}{1-a}$ which is not equal to $\|x_1\|_\infty$ for any choice of $c $. So $J_0$ is generated by $(1,1)$ and is a subspace of $X$.
\end{proof}
\begin{rem}\begin{enumerate}
\item Let $X$ be a Banach space and $J$ a proximinal subspace of codimension one. Then $(X,J)$ has the QLP. This follows from Corollary 2.8 in \cite{D}.
\item If $J$ is a closed subspace of a Hilbert space, $\mathcal{H}$, then the pair $(\mathcal{H}, J)$ has the QLP since the metric projection on a subspace of a Hilbert space is linear.
\end{enumerate}
\end{rem}
The next result gives a sufficient condition for the existence of a linear selection of the metric projection onto a proximinal subspace.
\begin{prop}\label{QLP->LS}
Let $X$ be a Banach space and let $J$ be a closed subspace of $X$. If $(X,J)$ has the QLP then the metric projection $P_J$ has a linear selection.
\end{prop}
\begin{proof} Since $(X, J)$ has the quotient lifting property then there exists a bounded operator $\tilde{Id} :X/J \rightarrow X$ such that $Id =\pi \circ \tilde{Id}$ and $\|\tilde{Id}\|=\|Id\|=1$. It is easy to check that $\tilde{Id} \circ \pi$ is a projection on $X$. For simplicity we denote this composition by $P$. Further, $X=Range (P) \oplus Ker (P)$ and $ker (P)=J$. It is clear that $J \subset ker (P)$, if $x \in Ker (P) $ then $\tilde{Id} (x+J)=0$ and $x+J=\pi \circ \tilde{Id} (x+J)=\pi (0)=J$. Hence $x \in J$. We claim that $Range (P) \subset J_0$, the metric complement of $J$. Towards this claim, we observe that, for $x \in Range (P)$, $P(x) = \tilde{Id} (x+J) =x$ and $\|x\| \leq \|x+J\|= dist (x, J)\leq \|x\|.$ Therefore $x \in J_0$. An application of the Theorem \ref{4} implies that the metric projection onto $J$ has a linear selection.
\end{proof}
\begin{rem} \label{QP-eq-LS}
Given $J$, a proximinal subspace of a Banach space $X$, and let $P_J$ denote the metric projection onto $J$. Then the theorems \ref{proximinality-as a necessary for qlp} and \ref{QLP->LS} imply the equivalence of the following statements: \begin{itemize}
\item $(X,J)$ has the QLP.
\item $P_J$ has a linear selection.
\end{itemize}
\end{rem}
{
\begin{ex}
Let $\Omega$ be a compact Hausdorff space and let $J$ be the subspace of all constant functions in $C(\Omega)$. The pair $(C(\Omega), J)$ has the QLP if and only if the cardinality of $\Omega$ is less or equal to 2. It is clear that $J$ is Chebyshev.
If $\Omega$ has 3 distinct points, $a, b, c$, we
consider three pairwise disjoint open neighborhoods, $U_a$, $U_b$ and $U_c$ of $a$, $b$ and $c$, respectively. Then there exist continuous functions $f_a$ and $f_b$ on $\Omega$ satisfying the conditions: $f_a:\Omega \rightarrow [0, 1]$, $f_a (a)=1$ and $f_a (x)=0,$ for all $x \notin U_a$; $f_b: \Omega \rightarrow [-1,0]$, $f_b(b)=-1$ and $f_b(x)=0$, for all $x \notin U_b$. We set $f=f_a+f_b$. Similarly we define $g=g_b+g_c$, with $g_b: \Omega \rightarrow [-1,0]$, $g_b(b)=-1$ and $g_b(x)=0$, for all $x \notin U_b$; $g_c : \Omega \rightarrow [0,1]$, $g_c (c)=1$ and $g_c (x)= 0, $ for all $x \notin U_c$. The constant function equal to $0$ is closest to $f$ and $g$ but $-1/2$ is closest to $f+g$. This implies that $P_J$ is not linear and then $(C(\Omega), J)$ does not have the QLP by Remark \ref{QP-eq-LS}. The other implication follows from Proposition \ref{1} . \end{ex}
}
This example shows that $X/J$ having the ALP does not imply that the metric projection onto $J$ has a linear selection. The lift of the identity operator on $X/J$ may not have norm 1, in which case the argument given in the proof for the Proposition \ref{QLP->LS} does not hold.
We add a few remarks that follow straightforwardly from previous results and theorems in \cite{D}. \begin{itemize}
\item If $\Omega$ contains n isolated points, there is an n-dimensional subspace $J$ of $C_0(\Omega) $ for which $P_J $ admits a linear selection. Therefore $(C_0(\Omega),J) $ has the QLP.
\item If $ J = span\{f\}$, then $(C_0(\Omega),J)$ has the QLP iff the support of $ f$ contains at most 2 points.
\item If $f$ is in $L^1 (\Omega,\Sigma, \mu) = X,$ then for $ J = span\{f\}$, $(X,J)$ has the QLP if support of $f$ is purely atomic and contains at most two atoms. A similar statement holds for $L^p$, with $1<p<\infty$ and $p \neq 2$. \end{itemize}
\noindent The next result addresses the problem of whether the existence of a linear selection for a pair of spaces transfers to other pairs of spaces defined from the given one. We consider sequence spaces, spaces of vector valued continuous functions on a compact Hausdorff space $\Omega$, Lebesgue-Bochner integrable function spaces ($L_1(\mu, X)$) and space of $\mu$-measurable Pettis integrable functions ($\hat{P_1}(\mu, X)$). { For the definitions and properties of these spaces we refer the reader to \cite{R}.
Given a Banach space $X$ we denote by $\mathcal{S} (X)$ any one of the following sequence spaces: $ \ell_{p}(X) $ ($1\leq p\leq \infty$), $c_0(X)$ or $c(X)$.
We denote by $\mathcal{F} (X)$ any one of the following function spaces: $ C(\Omega,X)$, with a compact Hausdorff space, or $Lip (\Omega, X)$ , with $\Omega$ a compact metric space endowed with one of the standard norms. We denote by $\mathcal{I} (X)$ any one of the following function spaces:
$L_1(\mu,X)$ or $\hat{P_1}(\mu, X)$. Further, $L(Y,X)$ denotes the space of bounded operators from $Y$ into $X$.} \vspace{-.4mm}
{\begin{prop}\label{gs}
Let $X$ and $Y$ be Banach spaces and let $J$be a proximinal subspace of $X$ such that the metric projection $P_J$ has a linear selection $p: X\to J$. Then the map $f\mapsto p\circ f$ from $\mathcal{S} (X)$ ($\mathcal{F} (X)$, $\mathcal{I} (X)$ or $ L(Y,X)$) onto $\mathcal{S} (J)$ (resp. $\mathcal{F} (J)$, $\mathcal{I} (J)$, $\mathcal{L} (Y, J)$) is a linear selection.
\end{prop}} \vspace{-.7mm}
\begin{proof}
The proof follows easily from $\|(p(x_n))\|\leq 2 \|(x_n)\|.$
\end{proof}
Let $J$ be a proximinal subspace of $X$ and let $p$ be a linear selection. We observe that if $f:Y \rightarrow X$ is an isometric isomorphism, then $f^{-1}(J)$ is proximinal in $Y$, and $f^{-1}\circ p \circ f$ defines a linear selection from $Y$ to $f^{-1}(J).$
We denote by $X\hat{\otimes}_\pi Y$ the tensor product space of $X$ and $Y$ endowed with the projective norm and by $X\hat{\otimes}_\epsilon Y$ the tensor product space of $X$ and $Y$ endowed with the injective norm. We refer the readers to \cite{R} for more details.
If $X$ and $Y$ are isometrically isomorphic we denote this by $X\cong Y$. The following identifications of tensor products are known: $\ell_1\hat{\otimes}_\pi X\cong\ell_1(X)$; $\ell_1\hat{\otimes}_\epsilon X\cong\ell_1[X]$, the space of unconditionally summable sequences in $X$; $c_0\hat{\otimes}_\epsilon X\cong c_0(X)$; $C(\Omega)\hat{\otimes}_\epsilon X \cong C(\Omega,X)$, the space of continuous functions from $\Omega$ to $X$; $ L_1(\mu)\hat{\otimes}_\pi X\cong L_1(\mu,X)$ and $L_1(\mu)\hat{\otimes}_\epsilon X \cong \hat{P_1}(\mu,X)$. These facts, together with the above observation and Proposition \ref{gs}, establish the next corollary.
\begin{cor}\label{tc} If $X$ is a Banach space, $J$ is a closed proximinal subspace of $X$, and $p:X\to J$ is a linear selection, then there is a linear selection from $\ell_1\hat{\otimes}_\pi X$ onto $\ell_1\hat{\otimes}_\pi J$, $\ell_1\hat{\otimes}_\epsilon X$ onto $\ell_1\hat{\otimes}_\epsilon J$, $c_0\hat{\otimes}_\epsilon X$ onto $c_0\hat{\otimes}_\epsilon J$, $C(\Omega)\hat{\otimes}_\epsilon X$ onto $C(\Omega)\hat{\otimes}_\epsilon J$, $ L_1(\mu)\hat{\otimes}_\pi X$ onto $ L_1(\mu)\hat{\otimes}_\pi J$, and $L_1(\mu)\hat{\otimes}_\epsilon X $ onto $L_1(\mu)\hat{\otimes}_\epsilon J. $
\end{cor}
\begin{rem} Using Theorem \ref{t4} we conclude that all the pairs listed in Proposition \ref{gs} have the QLP.
\end{rem}
\section{M-ideals and the quotient lifting property}
In this section we explore the QLP for pairs where the subspace is an M-ideal. Towards this we establish the existence of a linear selection for the metric projection.\par
In \cite{hww} (see p.59) it is mentioned that Ando, Choi and Effros proved that if $J$ is an $L_1$-predual M-ideal in Banach space $X$ and $Y$ is a separable Banach space, any bounded linear operator $T\in L(Y,X/J)$ has a bounded linear lifting $\tilde{T}\in L(Y,X)$ such that $\|T\|=\|\tilde{T}\|$ and $T=\pi \circ \tilde{T}$.
Our next result shows that this statement holds for $X=C(\Omega)$, where $\Omega$ is compact metrizable, any M-ideal $J$ and all Banach spaces $Y$. Therefore the pair $(C(\Omega), J)$ has the QLP. Let us recall a definition from \cite{Ando}.
\begin{Def}
A Banach space $X$ is called a $\pi$-\textit{space} if there is a sequence ${F_n}$ of finite dimensional subspaces such that $F_1\subset F_2\subset F_3\dots$ with $\overline{\cup_{n=1}^{\infty} F_n}=X$ and each $F_n$ is the range of a projection of norm one.
\end{Def}
\begin{rem}\label{rem} Separable $L_p (1\leq p <\infty)$ and $C(\Omega)$ on compact metrizable $\Omega$ are $\pi$-spaces (See \cite{Ando}.)
\end{rem}
\begin{prop}
The pair $(C(\Omega), J)$, where $\Omega$ is a compact metrizable space and $J$ is an M-ideal of $C(\Omega)$, has the QLP.
\end{prop}
\begin{proof}
Since $J$ is an M-ideal of $C(\Omega)$, then $J = \{f \in C(\Omega): f|_D \equiv 0 \}$ for some closed subset $D$ of $\Omega$. By Remark \ref{rem}, $C(\Omega)$ is a $\pi$-space and $C(D)$ is isometrically isomorphic to $C(\Omega)/J$. Therefore $C(\Omega)/J$ is a $\pi$- space. By Theorem 5 of \cite{Ando} there exists a norm one linear map $\phi$ from $C(\Omega)/J$ to $C(\Omega)$ such that $\pi\circ \phi = Id$. For a Banach space $Y$ and bounded linear map $S : Y \to C(\Omega)/J$, $\tilde{S} : Y \to C(\Omega)$ defined by $\tilde{S}= \phi\circ S$ is a lifting such that $S=\pi \circ \tilde{S}$ and $\|S\| =\|\tilde{S}\|$. This concludes the proof.
\end{proof}
Our next result shows on how to construct a linear selection onto an arbitrary M-ideal of the space of continuous functions on a particular class of Euclidean domains.
\begin{prop}
Let $J$ be an M-ideal of $C([0,1]^n)$, where $n$ is a positive integer. Then the metric projection $P_J$ has a linear selection.
\end{prop}
\begin{proof}Since $J$ is an M-ideal of $C([0,1]^n)$ there exists a closed subset $D$ of $[0, 1]^n$ such that $J = \{f \in C([0,1]^n): f|_D \equiv 0 \}$ (See \cite{hww} p.4.)
{ We observe that $g \in J_0$ if and only if $\|g\|_{\infty}= dist (g, J) =\|g|_D\|_{\infty}.$ We present the proof for the cases: $n=1$ and $n=2$; other cases follow similarly. For $n=1$, we first consider $D=[t_1,t_2]\cup [t_3,t_4].$ Let $f \in C[0,1]$, then we define $f_1$ as
\[(\star ) \,\,
f_1(x)=\begin{cases} f(x)-f(t_1\chi_{(-\infty,t_1)}+t_4\chi_{(t_4,\infty)}) & \text{for }x\notin [t_2,t_3] \\0 & \text{for } x\in D\\ f(x)-f(t_2)+\dfrac{x-t_2}{t_3-t_2}\left[f(t_2)-f(t_3)\right] &\text{for }x\in[t_2,t_3] \end{cases}
\]
The map $p: C([0,1])\to J$ defined by $f\mapsto f_1$ is a linear selection and $f-f_1 \in J_0$. For an arbitrary closed subset of $[0,1]$ we assign the value $0$ on $D$ and extend over the open intervals in $[0,1]\setminus D$ as in $(\star )$.\par
\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{"pic_1"}
\caption{$D$ is a closed subset of $[0,1]^2$ and $D'=D\cap \overline{OP}$}
\label{fig:pic-1}
\end{figure}
Let $n=2$ and $f\in C([0,1]^2)$. For $x\in [0,1]^2$ we will define $f_1 = f_{1_m}$ along the line of slope $m$ passing through $0$ and $x$. Let $D'$ be the intersection of $D$ with the line passing through $0$ and $x$, see Figure 1. For simplicity of notation, we assume that $D'$ has two connected components, i.e. $D'=[t_1,\, t_2]\cup [t_3,t_4].$ Then,
\[
f_{1_m}(x)=\begin{cases} f_1(x) &\text{for } \|x\|\notin [\|t_2\|,\|t_3\|] \\ f(x)-f(t_2)+\frac{\|x-t_2\|}{\|t_3-t_2\|}[f(t_2)-f(t_3)] &\text{for } \|x\|\in[\|t_2\|,\|t_3\|] \end{cases}
\]
The map $p: C([0,1]^2)\to J$ defined by $f\mapsto f_1$ is a linear selection.}
\end{proof}
The same techniques are unsuitable for general Hausdorff spaces.
It is well known that M-ideals are proximinal (see \cite{hww}, p.50). It is not the case that for every Banach space $X$ and an M-ideal $J$ in $X$, the pair $(X,J)$ has the QLP, as we have seen with the pair $(\ell_{\infty},c_0)$. However the conclusion is different for reflexive Banach spaces.
Given a Banach space $B$, let $J_B$ denote the canonical isometric embedding of $B$ into its double dual, $B^{**}$.
\begin{prop}
If $X$ is reflexive and $J$ is an M-ideal of $X$ then $(X, J)$ has the QLP.
\end{prop}
\begin{proof}
Let $Y$ be a Banach space and $S:Y \rightarrow X/J$, a bounded operator. We denote by $\pi :X\rightarrow X/J$, the quotient map, we assume that $J\neq X$. Since the dual of $X/J$ is identified with the annihilator of $J$, $J^{\perp}$, we have
$S^*: J^{\perp} \rightarrow Y^*$. Let $P$ denote the projection
$ X^*=J^{\perp}\oplus_1 J^* \rightarrow J^{\perp}$.
The composition $S^*\circ P: X^* \rightarrow Y^*$, is such that $\|S^*\circ P\|=\|S\|$, and $(S^*\circ P)^*: Y^{**} \rightarrow X^{**}=X$
also has the same norm as $S$.
We now show that $\pi \circ (J^{-1}_X \circ (S^*\circ P)^* \circ J_Y )=S$.
Let $y \in Y$, $(S^*\circ P)^* (y^{**})= J_X(x)$, and $\pi (x)= x+J$. Given $y \in Y$
and $\eta \in X^*$ then
\[ (S^* \circ P)^* \circ J_Y (y) (\eta)= P(\eta) (S(y)).\]
On the other hand, $S(y)=x+J$, identified with its image in $(X/J)^{**}$,
$(x+J)^{**} (P(\eta))= P(\eta)(x+J)=P(\eta) (S(y))$. This shows that $\pi \circ (J^{-1}_X \circ (S^*\circ P)^* \circ J_Y )=S$ and completes the proof.
\end{proof}\vspace{-5mm}
|
\section{Introduction}
The study of trees in tournaments has been motivated largely by Sumner's universal tournament conjecture from 1971, which states that every $(2n-2)$-vertex tournament should contain a copy of every $n$-vertex oriented tree (see, e.g.,~\cite{reid1983embedding}). In 1991, H\"aggkvist and Thomason~\cite{HAE-THO} gave the first proof that $O(n)$ vertices in a tournament are sufficient to find any $n$-vertex oriented tree. Following several subsequent improvements to the implicit constant~\cite{havet2000median,HAV,El_S}, Dross and Havet~\cite{DRO-HAV} recently showed that $\big\lceil\frac{21}{8}n-\frac{47}{16}\big\rceil$ vertices are in fact sufficient, giving the best known bound which holds for all $n$. On the other hand, Sumner's conjecture is known to be true for sufficiently large $n$, as shown in 2010 by K\"uhn, Mycroft and Osthus~\cite{KUE-MYC-OST-2}, using regularity methods.
If true, Sumner's conjecture would be tight for each $n$, as demonstrated by the $n$-vertex star with every edge oriented out from the root vertex. The appearance of many trees can, however, be ensured with far fewer than $2n-2$ vertices in the tournament. Indeed, confirming a conjecture of Rosenfeld~\cite{ROS}, Thomason~\cite{THO} showed in 1986 that there is some $n_0$ such that, whenever $n\geqslant n_0$, any $n$-vertex tournament contains a copy of every $n$-vertex oriented path. In 2000, Havet and Thomass\'e~\cite{HAV-THO} showed that the optimal value of $n_0$ is $8$, a result recently given a shorter proof by Hanna~\cite{HAN}.
Answering the natural question arising from the different behaviour here between stars and paths, H\"aggkvist and Thomason~\cite{HAE-THO} showed in 1991 that the number of additional vertices required in the tournament can be bounded as a function of the number of leaves in the tree. That is, for each $k$, there is some smallest $g(k)$ such that every $(n+g(k))$-vertex tournament contains a copy of every $n$-vertex tree with $k$ leaves. The upper bound shown by H\"aggkvist and Thomason on $g(k)$ is exponential in $k^3$, but was recently improved to $144k^2-280k+124$ by Dross and Havet~\cite{DRO-HAV}. Havet and Thomass\'e~\cite{HAV2} conjectured in 2000 that $g(k)\leq k-1$ for each $k\geq 2$. That is, generalising Sumner's conjecture, they conjectured that every $(n+k-1)$-vertex tournament contains a copy of every $n$-vertex oriented tree with $k$ leaves.
In this paper, we give the first linear bound on $g(k)$, as follows.
\begin{theorem}\label{thm:fewlinear}
There is some $C>0$ such that every $(n+Ck)$-vertex tournament contains a copy of every $n$-vertex oriented tree with $k$ leaves.
\end{theorem}
If true, Havet and Thomass\'e's conjecture would be tight whenever $k=n-1$ (i.e., whenever it is covered by Sumner's conjecture), but for general $n$ and $k$, we only have examples showing that the tournament may need to have at least $n+k-2$ vertices (as described below). From the result of Havet and Thomass\'e~\cite{HAV-THO} on oriented paths we know that $n+k-2$ is best possible if $k=2$ and $n\geq 8$, while Ceroi and Havet~\cite{CER-HAV} proved that $n+k-2$ is also best possible if $k=3$ and $n\geq 5$. Dross and Havet~\cite{DRO-HAV} conjectured that, for each $k$, if $n$ is sufficiently large then $n+k-2$ is best possible.
In this paper, we confirm this conjecture, as follows.
\begin{theorem}\label{thm:fewcst}
For each $k$, there is some $n_0$ such that, for each $n\geqslant n_0$, every $(n+k-2)$-vertex tournament contains a copy of every $n$-vertex oriented tree with $k$ leaves.
\end{theorem}
The following well-known example shows that this is best possible. Form a tree $T_{n,k}$ by taking a directed path $P$ with $n-k+1$ vertices and attaching $k-1$ out-leaves to the last vertex of $P$. The resulting oriented tree $T_{n,k}$ has $n$ vertices and $k$ leaves. Construct the following $(n+k-3)$-vertex tournament $G$. Let $V(G)=A\cup B$, where $A$ and $B$ are disjoint sets with $|A|=n-k$ and $|B|=2k-3$. Orient the edges of $G$ so that $G[B]$ is a regular tournament, $G[A]$ is an arbitrary tournament, and all edges are directed from $A$ to $B$. As $d_G^+(v)=k-2$ for each $v\in B$, if $G$ contains a copy of $T_{n,k}$ then the last vertex of $P$ must be copied to $A$. Then, as every edge between $A$ and $B$ is oriented into $B$, every vertex of $P$ must be copied into $A$, a contradiction as $|A|=n-k$. Thus the $n$-vertex tree $T_{n,k}$ with $k$ leaves does not appear in the $(n+k-3)$-vertex tournament $G$.
To prove Theorems~\ref{thm:fewlinear} and~\ref{thm:fewcst}, we use median orders, a technique first used to embed trees in tournaments by Havet and Thomass\'e~\cite{havet2000median}. In particular, we exploit the property that pairs of vertices in a median order can be robustly connected by directed paths with length 3 travelling in the direction of the order (see Lemma~\ref{lm:connecting_path_length_3}), using this repeatedly in our embeddings. We have not optimised the value of $C$ reachable with our methods as this will not reach a plausibly optimal bound, but we show that Theorem~\ref{thm:fewlinear} holds for some $C<500$. We do not calculate an explicit function $n_0(k)$ for Theorem~\ref{thm:fewcst}, but our methods show that we may take $n_0(k)=k^{O(k)}$. However, it seems likely some function $n_0(k)$ satisfying Theorem~\ref{thm:fewcst} with $n_0(k)=O(k)$ exists.
After stating our notation, in Section~\ref{sec:prelim}, we recall median orders and their basic properties, before proving Lemma~\ref{lm:connecting_path_length_3} and giving the other preliminary results we will use. In Section~\ref{sect:fewlinear}, after sketching its proof, we prove Theorem~\ref{thm:fewlinear}. In Section~\ref{sect:fewcst}, we give a proof sketch before proving Theorem~\ref{thm:fewcst}.
\section{Preliminaries}\label{sec:prelim}
\subsection{Notation}
For a directed graph (digraph) $G$, we use $V(G)$ to denote the vertex set of $G$ and $E(G)$ to denote the edge set of $G$. We write $|G|=|V(G)|$ for the order of $G$. Each element of $E(G)$ is an ordered pair $(u,v)$, where $u,v\in V(G)$, which we write as $uv$. If $uv\in E(G)$, then we say that \emph{$u$ dominates $v$} (written $u\rightarrow_G v$), that $v$ is an \emph{out-neighbour} of $u$, and that $u$ is an \emph{in-neighbour} of $v$. Given $v\in V(G)$, the \emph{out-neighbourhood} of $v$, written $N_G^+(v)$, is the set of out-neighbours of $v$ in $V(G)$, and the \emph{in-neighbourhood} of $v$, written $N_G^-(v)$ is the set of in-neighbours of $v$ in $V(G)$. Throughout, we use $+$ and $-$ interchangeably with `in' and `out' respectively. For each $\diamond\in\{+,-\}$, the \emph{$\diamond$-degree} of $v$ in $G$ is $d_G^\diamond(v)=|N_G^\diamond(v)|$. For $X,Y\subseteq V(G)$ and $\diamond\in\{+,-\}$, we write $N_G^\diamond(X)=(\cup_{v\in X}N_G^\diamond(v))\setminus X$ and $N_G^\diamond(X,Y)=N_G^\diamond(X)\cap Y$. We denote by $G[X]$ the induced sub-digraph of $G$ with vertex set $X$ and let $G-X=G[V(G)\setminus X]$. Subscripts are omitted wherever they are clear from context, as are rounding signs wherever they are not crucial.
An \emph{oriented graph} is a digraph with at most one edge between any pair of vertices. A \emph{tournament} $G$ is a digraph whose underlying graph is a complete graph, i.e., for each $u,v\in V(G)$ with $u\neq v$, exactly one of $uv$ or $vu$ is in $E(G)$. An \emph{oriented tree} (respectively, \emph{oriented path}) is a digraph whose underlying graph is a tree (respectively, path). A \emph{directed path} from $v_0$ to $v_\ell$ is a path of the form $v_0\rightarrow v_1\rightarrow \ldots\rightarrow v_\ell$. The \emph{length} of a path $P$ is $|P|-1$, and denoted $\ell(P)$. We say a subpath $P$ of a forest $T$ is a \emph{bare path} if all of the internal vertices $v$ of $P$ have $d_T(v)=2$, and we denote by $T-P$ the digraph formed from $T$ by removing all the edges and internal vertices of $P$.
Having proved, for example, a result holds for $\diamond=+$, we will occasionally deduce the same result for $\diamond=-$ by \emph{directional duality}. That is, reversing all the relevant orientations and applying the result with $\diamond=+$ implies, after reversing the edges again, the result with $\diamond=-$.
We also use standard hierarchy notation. That is, for $a,b\in(0,1]$, we write $a\ll b$ to mean that there is a non-decreasing function $f:(0,1]\to(0,1]$ such that the subsequent statement holds whenever $a\leqslant f(b)$.
\subsection{Median orders}
Median orders were first used to embed trees in tournaments by Havet and Thomass\'e~\cite{havet2000median}. Given a tournament $G$, an ordering $\sigma =v_1,\ldots,v_n$ of $V(G)$ is a \emph{median order} if it maximises the number of pairs $i<j$ with $v_iv_j\in E(G)$. The following lemma gives two simple fundamental properties of median orders (see, e.g., \cite[Lemma 9]{DRO-HAV}).
\begin{lemma}\label{lm:basic_properties_of_median_orders}
Let $G$ be a tournament and $v_1,\ldots,v_n$ a median order of $G$. Then, for any two indices $i$, $j$ with $1\leqslant i<j\leqslant n$, the following properties hold.
\begin{enumerate}[label = \textbf{\roman{enumi})}]
\item\label{median1} $v_i,v_{i+1},\ldots,v_j$ is a median order of the induced subtournament $G[\{v_i,v_{i+1},\ldots,v_j\}]$.
\item\label{median2} $v_i$ dominates at least half of the vertices $v_{i+1},v_{i+2},\ldots,v_j$, and $v_j$ is dominated by at least half of the vertices $v_i,v_{i+1},\ldots,v_{j-1}$. In particular, each vertex $v_i$, $1\leqslant i<n$, dominates its successor $v_{i+1}$.
\end{enumerate}
\end{lemma}
Median orders contain short directed paths from any vertex to any vertex later in the order, as follows (in combination with Lemma~\ref{lm:basic_properties_of_median_orders} i)).
\begin{corollary}\label{cor:last} Let $n\geq 2$.
If $v_1,\ldots,v_n$ is a median order of the $n$-vertex tournament $G$, then $G$ contains a directed path from $v_1$ to $v_n$ with length at most 2.
\end{corollary}
\begin{proof} Suppose $v_1v_n\notin E(G)$, for otherwise such a path exists, and let $V=\{v_2,\ldots,v_{n-1}\}$. Then, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), $|N^+(v_1,V)|=|N^+(v_1)|\geq \frac{n-1}{2}>|V|/2$, and, similarly, $|N^-(v_n,V)|>|V|/2$. Therefore, there is some $w\in V$ such that $v_1wv_n$ is a directed path.
\end{proof}
Median orders have been used particularly effectively to embed arborescences in tournaments. An \emph{out-arborescence} (respectively, \emph{in-arborescence}) is an oriented tree $T$ with a root vertex $t\in V(T)$ such that, for every $v\in V(T)$, the path between $t$ and $v$ in $T$ is directed from $t$ to $v$ (respectively, from $v$ to $t$). Dross and Havet \cite{DRO-HAV} used median orders to prove that any $(n+k-1)$-vertex tournament contains a copy of any $n$-vertex arborescence with $k$ leaves. We will use their result in the following slightly stronger form (see~\cite[Theorem 12]{DRO-HAV}).
\begin{theorem}\label{thm:DH}
Let $A$ be an $n$-vertex out-arborescence with $k\geqslant 1$ out-leaves and root $r$. Let $G$ be a tournament on $n+k-1$ vertices and let $\sigma=v_1,\ldots,v_{n+k-1}$ be a median order of $G$. Then, there is an embedding $\phi$ of $A$ in $G$ such that $\phi(r)=v_1$.
\end{theorem}
We will need some linear bound on the number of vertices required in a tournament, which we then apply for small trees. Any linear bound would suffice, but with the value of $C$ in mind we derive Corollary~\ref{cor:DHbound} from the following theorem of Dross and Havet~\cite{DRO-HAV}.
\begin{theorem}\label{thm:DHbound} For each $n\geq 2$, every $\big\lceil \frac{3}{2}n+\frac{3}{2}k-2\big\rceil$-vertex tournament contains a copy of every $n$-vertex oriented tree with $k$ leaves.
\end{theorem}
\begin{corollary}\label{cor:DHbound}
Let $n,r,k\geq1$, and suppose $G$ is a tournament with at least $\frac{3}{2}n+\frac{3}{2}k-2r$ vertices and $T$ is an oriented forest with $n$ vertices, $r$ components and, in total, $k$ leaves and isolated vertices. Then, $G$ contains a copy of $T$.
\end{corollary}
\begin{proof} Label the components of $T$ as $T_1,\ldots,T_r$, and say, for each $i\in [r]$, that $T_i$ has $n_i$ vertices and, in total, $k_i$ isolated vertices and leaves. Note that $n_i+3k_i\geq 4$ for each $i\in [r]$. Take the largest $s\leq r$ for which there are vertex-disjoint subgraphs $S_i\subset G$, $i\in [s]$ such that, for each $i\in [s]$, $S_i$ is a copy of $T_i$. Suppose $s<r$, for otherwise we have already found a copy of $T$ in $G$, and note that
\[
\biggl|G-\bigcup_{i\in [s]}V(S_i)\biggr|\geq |G|-n+n_{s+1}\geq \sum_{i\in [r]\setminus \{s+1\}}\frac{n_i+3k_i-4}{2} +\frac{3n_{s+1}}{2}+\frac{3k_{s+1}}{2}-2\geq \frac{3n_{s+1}}{2}+\frac{3k_{s+1}}{2}-2.
\]
Therefore, by Theorem~\ref{thm:DHbound}, $G-\cup_{i\in [s]}V(S_i)$ contains a copy of $S_{s+1}$, a contradiction.
\end{proof}
For Theorem~\ref{thm:fewcst} it is convenient to use the following bound, originally proved by El Sahili~\cite{El_S}, which can also be recovered from Theorem~\ref{thm:DHbound} by observing we must have $k\leq n-1$.
\begin{theorem}\label{cor:3n-3}
For each $n\geq 2$, every $(3n-3)$-vertex tournament contains a copy of every $n$-vertex oriented tree.
\end{theorem}
\subsection{Non-directed paths}\label{sec:andrewrulesok}
In both the proofs of Theorem~\ref{thm:fewlinear} and~\ref{thm:fewcst}, we will take a median order, $\sigma=v_1,\ldots, v_m$ say, of an $m$-vertex tournament, $G$ say, and carefully partition this order into intervals before embedding different parts of the tree into each interval. This embedding must thus work when $v_iv_j\in E(G)$ for each $1\leq i<j\leq m$, that is, when $G$ is a transitive tournament. Our embeddings then, will embed the vertices along a directed path into a consistent order under $\sigma$. From this, embedding directed paths will be more restrictive than embedding paths which have some changes of direction. Here, we will recall some results of Thomason which we use to embed paths with changes of directions, allowing us to assume later that each maximal bare subpath in the tree is directed.
To discuss the changes of direction in a path and recall these results, we use the terminology of blocks. A \emph{block} of an oriented path $P$ is a maximal directed subpath. When we introduce an oriented path we assume it has an associated overall direction, and thus a first and last vertex as well as a first block and a last block. When the path is a directed path we will always assume the associated direction is the natural one, i.e., the one in which the first vertex has no in-neighbours.
With only a couple of exceptions, when a tournament $G$ has one (or two) more vertices than an oriented path $P$, we can embed $P$ into $G$, while furthermore embedding one (or two) endvertices into a matching set of two vertices, if each endvertex is next to a block of length 1. That is, we have the following two results of Thomason.
\begin{theorem}[{\cite[Theorem~1]{THO}}]\label{thm:appending_non-directed_path}
Let $P$ be an oriented path of order $n$ with first block of length $1$. Let $G$ be a tournament of order $n+1$ and $X$ be a subset of $V(G)$ of order at least $2$.
Then, there is a copy of $P$ in $G$ with first vertex in $X$.
\end{theorem}
\begin{theorem}[{\cite[Theorem~5]{THO}}]\label{thm:connecting_non-directed_paths}
Let $P$ be a non-directed oriented path of order $n$ with first and last block of length 1. Let $G$ be a tournament of order $n+2$ and $X$ and $Y$ be two disjoint subsets of $V(G)$ of order at least 2.
If $P$ does not consist of three blocks with length one, then there is a copy of $P$ in $G$ with first vertex in $X$ and last vertex in $Y$.
\end{theorem}
\subsection{Short directed paths}
Having found parts of a tree in a median order of a tournament, we will often wish to join two of them with a directed path. The following lemma shows that this is possible across a median order, even in cases where the interval in between the vertices to be joined contains some forbidden vertices.
\begin{lemma}\label{lm:connecting_path_length_3}
Suppose $G$ is an $n$-vertex tournament with a median order $\sigma=v_1,\ldots,v_n$. Then, for any set $A\subset V(G)\setminus\{v_1,v_n\}$ with $|A|\leq (n-8)/6$, there is a directed $v_1,v_n$-path in $G-A$ with length~3.
\end{lemma}
\begin{proof} If there are some distinct $x,y\in (N^+_G(v_1)\cap N^-_G(v_n))\setminus A$, then assume, by relabelling if necessary, that $xy\in E(G)$ and observe that $v_1xyv_n$ is a path with length 3 in $G-A$, as required. Therefore, suppose that $|(N^+_G(v_1)\cap N^-_G(v_n))\setminus A|\leqslant 1$.
By Lemma~\ref{lm:basic_properties_of_median_orders}~ii), we have $|N^+_G(v_1)\setminus \{v_n\}|,|N^-_G(v_n)\setminus\{v_1\}|\geqslant (n-2)/2$. Let $B_1=N^+_G(v_1)\setminus (A\cup N^-_G(v_n)\cup\{v_n\})$ and $B_2=N^-_G(v_n)\setminus (A\cup\{v_1\})$. Note that $|B_1|\geqslant n/2-2-|A|>0$ and $|B_2|\geqslant n/2-1-|A|$. Let $B_0=V(G)\setminus (B_1\cup B_2\cup \{v_1,v_n\})$, so that
\begin{equation}\label{eq:B0}
|B_0|=n-2-|B_1|-|B_2|\leqslant n-2-(n/2-2-|A|)-(n/2-1-|A|)=2|A|+1.
\end{equation}
Colour vertices in $B_0,B_1$ and $B_2$ respectively green, red and blue. If any blue vertex, $x$ say, has a red in-neighbour, $y$ say, then $v_1yxv_n$ is a path with length 3 in $G-A$, as required. Therefore, suppose that every in-neighbour of each blue vertex is a green vertex or a blue vertex, for otherwise we have the desired path.
Let $j$ be the largest integer such that $v_j$ is blue. Let $A_1=A\cap\{v_2,\ldots,v_{j-1}\}$ and $A_2=A\cap \{v_{j+1},\ldots,v_{n-1}\}$, so that $|A_1|+|A_2|=|A|$. For the appropriate $r$, let $I_1,\ldots,I_r$ be the maximal intervals of $v_2,\ldots,v_{j-1}$ consisting of only red and green vertices. Observe that, for each $i\in [r]$, the vertex after $I_i$ in $\sigma$ is blue, and has at least $|I_i|/2$ in-neighbours in $I_i$ by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), all of which must be green. Thus, every interval $I_i$, $i\in [r]$, contains at least as many green vertices as red vertices.
As every red or green vertex before $v_j$ in $\sigma$ is in some interval $I_i$, $i\in [r]$, we have that there are at least as many green vertices as there are red vertices in $\{v_2,\ldots,v_{j-1}\}$. As $|N^+_G(v_1)\cap \{v_2,\ldots,v_j\}|\geqslant (j-1)/2$ by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), at least $(j-1)/2-|A_1|-1$ of the vertices in $\{v_2,\ldots,v_{j-1}\}$ are red. Therefore, there are at least $(j-1)/2-|A_1|-1$ green vertices in $\{v_2,\ldots,v_{j-1}\}$. By~\eqref{eq:B0} and the definition of $A_2$, we have that there at most $2|A|+1-|A_2|$ green vertices in $\{v_2,\ldots,v_{j-1}\}$. Thus, $2|A|+1-|A_2|\geqslant (j-1)/2-|A_1|-1$. Rearranging, and using that $|A_1|+|A_2|=|A|$, we get $3|A|\geqslant 2|A_2|+j/2-5/2$.
Now, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), $|N^-_G(v_n)\cap (\{v_{j+1},\ldots,v_{n-1}\})|\geqslant (n-1-j)/2$, so, as $v_j$ is the last blue vertex in $\sigma$, there are at least $(n-1-j)/2$ vertices in $A_2$.
Thus, $3|A|\geqslant 2|A_2|+j/2-5/2\geqslant (n-j)+j/2-7/2=n-j/2-7/2$. As $j\leqslant n-1$, we have $3|A|\geqslant (n-6)/2$, contradicting that $|A|\leq(n-8)/6$.
\end{proof}
\subsection{Trees and random sets}
Here we collect a number of elementary properties of oriented trees, which we use later, before recalling Chernoff's lemma. Our first proposition considers the number of maximal bare paths in a (non-oriented) tree with $k$ leaves, as follows.
\begin{proposition}\label{prop:deg3} An $n$-vertex tree $T$ with $k\geq 2$ leaves has at most $2k-3$ maximal bare paths, one of which must have length at least $(n-1)/(2k-3)$, and at most $2k-2$ vertices whose degree is not 2.
\end{proposition}
\begin{proof} For the appropriate $r$, let $P_1,\ldots,P_{r}$ be the maximal bare paths in $T$, and label vertices such that, for each $i\in [r]$, $P_i$ is an $x_i,y_i$-path. Note that the tree $T'$ formed from $T$ by replacing each path $P_i$, $i\in [r]$, by a single undirected edge has $r$ edges, $r+1$ vertices, $k$ leaves and no degree 2 vertices.
Therefore,
\[
2(|T'|-1)=2e(T')=\sum_{v\in V(T')}d_{T'}(v)\geqslant k+2(|T'|-k)+|\{v:d_{T'}(v)\geqslant 3\}|,
\]
and thus $|\{v:d_{T'}(v)\geqslant 3\}|\leqslant k-2$. As $\{v:d_{T}(v)\geqslant 3\}=\{v:d_{T'}(v)\geqslant 3\}$, $T$ has at most $2k-2$ vertices whose degree is not 2. Furthermore, $|T'|=r+1\leq k+(k-2)$, so that $r\leq 2k-3$. Finally, as $\sum_{i\in [r]}\ell(P_i)=e(T)=n-1$, one of the paths $P_i$, $i\in [r]$, has length at least $(n-1)/(2k-3)$.
\end{proof}
In the main embedding for both Theorem~\ref{thm:fewlinear} and Theorem~\ref{thm:fewcst}, we will embed collections of small subtrees with directed paths between them. The next two propositions (appropriately applied to an auxiliary oriented tree with vertices representing subtrees and edges representing paths) will give us an order in which these trees and paths will be embedded along a median order of the tournament.
We use Proposition~\ref{prop:treepart} for Theorem~\ref{thm:fewlinear}, and Proposition~\ref{prop:newgoodlabel} for Theorem~\ref{thm:fewcst}.
\begin{proposition}\label{prop:treepart} Every oriented tree $T$ with $n\geq 1$ vertices has a vertex partition $V(T)=V_1\cup\ldots \cup V_s$ of non-empty sets, for some $s\in [n]$, such that, for each edge $e\in E(T)$, for some $i\in [s-1]$, $e$ is an edge directed from $V_i$ to $V_{i+1}$.
\end{proposition}
\begin{proof} Noting that the statement is trivially true if $|T|\leqslant 2$, we prove this by induction on $|T|$. Suppose then it is true for all oriented trees with fewer than $n\geq 3$ vertices. We may assume, by directional duality, that $T$ has an out-leaf. Let $T'$ be formed from $T$ by removing such an out-leaf, $t$ say, and let $s\in [n-1]$ be such that there is a vertex partition $V(T')=V_1\cup\ldots \cup V_s$ of non-empty sets, such that, for each edge $e\in E(T')$, for some $i\in [s-1]$, $e$ is an edge directed from $V_i$ to $V_{i+1}$. Let $V_{s+1}=\emptyset$. Let $j$ be such that the in-neighbour of $t$ in $T$ is in $V_j$, and add $t$ to $V_{j+1}$. Taking the non-empty sets from $V_1,\ldots,V_{s+1}$ completes the proof of the inductive step, and hence the proposition.
\end{proof}
\begin{proposition}\label{prop:newgoodlabel}
Every $n$-vertex oriented tree $T$ has labellings $V(T)=\{t_1,\ldots,t_n\}$ and $E(T)=\{e_1,\ldots,e_{n-1}\}$, such that, for every $j\in[n-1]$, there is some $i_1,i_2\in [n]$ with $i_1\leqslant j<i_2$ and $e_j=t_{i_1}t_{i_2}$.
\end{proposition}
\begin{proof}
We proceed by induction on $n$, noting the proposition is trivial for $n=1$. For $n>1$, we may assume, by directional duality, that $T$ has an out-leaf. Let $t_n$ be this out-leaf, and $e_{n-1}$ its adjacent edge. By the inductive hypothesis, there are labellings $V(T-t_n)=\{t_1,\ldots,t_{n-1}\}$ and $E(T-t_n)=\{e_1,\ldots,e_{n-2}\}$, such that, for every $j\in[n-2]$, $e_j=t_{i_1}t_{i_2}$ for some $i_1\leqslant j<i_2$. Taking $V(T)=\{t_1,\ldots,t_n\}$ and $E(T)=\{e_1,\ldots,e_{n-1}\}$ completes the proof.
\end{proof}
Finally, in our embeddings we sometimes take small random sets, on which we use a standard Chernoff bound, as follows (see, for example~\cite{alon2004probabilistic}).
\begin{lemma}\label{chernoff} If $X$ is a binomial variable with standard parameters~$n$ and $p$, denoted $X=\mathrm{Bin}(n,p)$, and $\e$ satisfies $0<\e\leq 3/2$, then
\[
\P(|X-\E X|\geq \e \E X)\leq 2\exp\left(-\e^2\E X/3\right).\hfill\qedhere
\]
\end{lemma}
\section{Proof of Theorem~\ref{thm:fewlinear}}\label{sect:fewlinear}
In Section~\ref{subsec:reduction_to_bare_paths_directed}, we use the results quoted in Section~\ref{sec:andrewrulesok} to show that it is enough to prove Theorem~\ref{thm:fewlinear} in the case where all bare paths of $T$ are directed. That is, we reduce the proof to showing the following result.
\begin{theorem}\label{thm:fewlineardirected}
There is some $C>0$ such that each $(n+Ck)$-vertex tournament contains a copy of every $n$-vertex oriented tree with $k$ leaves in which every bare path is a directed path.
\end{theorem}
To prove Theorem~\ref{thm:fewlineardirected}, we first remove $O(k)$ long directed paths from $T$ to leave a forest with size linear in $k$. The components of this forest we embed into carefully chosen intervals of a median order with $O(k)$ spare vertices in total, using Corollary~\ref{cor:DHbound}. It remains then to embed the long directed paths, where we only have a constant number of spare vertices per path. This we do with Lemma~\ref{lm:many_connecting_paths} in Section~\ref{subsec:parallel_directed_paths}.
A simple modification of Dross and Havet's procedure for embedding arborescences into median orders (which they used to prove Theorem~\ref{thm:DH}) allows directed paths from specified first vertices to be embedded efficiently into a median order. To embed such paths with both endvertices specified, we adapt this procedure, using it to embed most of the directed paths, but, as soon as all but three edges of any path are embedded, using Lemma~\ref{lm:connecting_path_length_3} to connect the path to its desired last vertex. This allows us to find a set of directed paths while having only constantly many spare vertices per path (see Lemma~\ref{lm:many_connecting_paths}), which we use to prove Theorem~\ref{thm:fewlineardirected} in Section~\ref{subsec:proof_bare_paths_directed}.
\subsection{Reduction to trees with only directed bare paths}\label{subsec:reduction_to_bare_paths_directed}
To prove Theorem~\ref{thm:fewlinear} from Theorem~\ref{thm:fewlineardirected}, we take a tree $T$, remove most of the middle section of the maximal bare paths with at least 6 blocks, and duplicate each new leaf created by this removal. (Here, a \emph{duplicated vertex} is a new vertex with exactly the same in- and out-neighbourbood as the matching original vertex.) Calling the resulting forest $T'$, if we have an embedding of $T'$ then the duplication of a leaf gives us two options to embed the original vertex from $T$. This will allow us to use the results in Section~\ref{sec:andrewrulesok} to embed the deleted path given enough other vertices in the tournament (with no further restriction on these other vertices).
Not every maximal bare path in $T'$ will be directed, but each such path will have at most 5 blocks. Adding a dummy leaf at any vertex in two blocks will give a forest $T''$ containing $T'$ whose maximal bare paths are all directed, allowing us to apply Theorem~\ref{thm:fewlineardirected} to each component. Importantly, $T'$, and hence $T''$, will still have $O(k)$ leaves.
\begin{proof}[Proof of Theorem~\ref{thm:fewlinear} from Theorem~\ref{thm:fewlineardirected}] Using Theorem~\ref{thm:fewlineardirected}, let $C\geqslant 8$ be large enough that, for every $\bar{n}$ and $\bar{k}$, every $(\bar{n}+(C-8)\bar{k})$-vertex tournament contains a copy of every $\bar{n}$-vertex oriented tree with (at most) $9\bar{k}$ leaves in which every bare path is a directed path. Let $G$ be an $(n+Ck)$-vertex tournament, and let $T$ be an $n$-vertex oriented tree with $k$ leaves.
For the appropriate $r$, let $P_1,\ldots,P_{r}$ be the maximal bare paths in $T$, and label vertices such that, for each $i\in [r]$, $P_i$ is an $x_i,y_i$-path. By Proposition~\ref{prop:deg3}, we have $r\leqslant 2k-3$.
Let $I\subset [r]$ be the set of $i\in [r]$ such that $P_i$ has at least 6 blocks.
For each $i\in I$, let $P_i^{(1)}$ and $P_i^{(2)}$ be the first two blocks of $P_i$ from $x_i$, and let $P_i^{(3)}$ and $P_i^{(4)}$ be the first two blocks of $P_i$ from $y_i$. Let $e_i^{(1)}$ be the furthest edge of $P_i^{(2)}$ from $x_i$ on $P_i$, and let $e_i^{(2)}$ be the furthest edge of $P_i^{(4)}$ from $y_i$ on $P_i$. Let $Q_i=(P_i-\sum_{j=1}^4 P_i^{(j)})+e_i^{(1)}+e_i^{(2)}$.
Note that, for each $i\in I$, the first and last block of $Q_i$ have length 1, its endvertices have degree 2 in $T$, and it has at least 4 blocks (and thus length at least 4). Label vertices so that, for each $i\in I$, $Q_i$ is a $u_i,v_i$-path. Let $T'$ be the forest formed from $T$ by, for each $i\in I$, deleting $Q_i$ and creating two new vertices, $u_i'$ and $v_i'$, so that $u_i'$ is a duplicate of $u_i$ and $v_i'$ is a duplicate of $v_i$. Note that $u_i,u_i',v_i$ and $v_i'$ are all leaves of $T'$.
Let $B$ be the set of vertices with degree 2 in $T'$ with either no in-neighbour or no out-neighbour, so that they lie in the intersection of two (consecutive) blocks. Observe that each such vertex must lie on some path $P_i$, $i\in [r]\setminus I$, or on $P_i^{(1)}\cap P_i^{(2)}$ or $P_i^{(3)}\cap P_i^{(4)}$ for some $i\in I$. Therefore, $|B|\leqslant 4(r-|I|)+2|I|$. Now, form $T''$ from $T'$ by taking each $v\in B$ and adding a new out-neighbour as a leaf, calling the new vertex $u_v$. We note here that all bare paths of $T''$ are directed paths.
Note that, if $\bar{T}$ is a component of $T'$, and $q$ is the number of paths $Q_i$ adjacent to $\bar{T}$ that are deleted when forming $T'$ from $T$, then $\bar{T}$ has at most $k-q+2q \leqslant k+|I|$ leaves. Furthermore, $T'$ has in total $n+2|I|-\sum_{i\in I}(|Q_i|-2)\leqslant n+2|I|-3|I|=n-|I|$ vertices. Therefore, as $r\leqslant 2k-3$, each component of $T''$ has at most $k+|I|+|B|\leqslant 9k$ leaves and $T''$ in total has at most $n-|I|+|B|\leqslant n+8k$ vertices. Iteratively and vertex-disjointly, embed as many different components from $T''$ into $G$ as possible. If a component of $T''$, say a tree $\bar{T}$ with $\bar{n}$ vertices and $\bar{k}$ leaves, is left unembedded then there are at least
\[
|G|-(|T''|-|\bar{T}|)\geq (n+Ck)-(n+8k)+\bar{n}\geq \bar{n}+(C-8)k
\]
vertices not used in the embedding, and $\bar{k}\leq 9k$. Thus, by the choice of $C$, we can embed $\bar{T}$ using the unused vertices in $G$, a contradiction. Thus, $G$ contains a copy of $T''$, $S''$ say.
For each $v\in B$, delete the copy of $u_v$ from $S''$, and let the resulting copy of $T'$ be $S'$. Note that, as $C\geqslant 8$ and $|I|\leqslant2k-3$,
\[
|V(G)\setminus V(S')|= n+Ck-|T'|=n+Ck-\Big(n+2|I|-\sum_{i\in I}(|Q_i|-2)\Big)\geqslant \sum_{i\in I}(|Q_i|-2),
\]
and take vertex disjoint sets $A_i$, $i\in I$, in $V(G)\setminus V(S')$ with $|A_i|=|Q_i|-2$ for each $i\in I$.
For each $i\in I$, let $\bar{u}_i,\bar{u}_i',\bar{v}_i,\bar{v}_i'$ be the copy of $u_i,u_i',v_i,v_i'$ respectively in $S'$. Using Theorem~\ref{thm:connecting_non-directed_paths}, for each $i\in I$, find a copy of $Q_i$, say $R_i$, in $G[A_i\cup\{\bar{u}_i,\bar{u}_i',\bar{v}_i,\bar{v}_i'\}]$ starting at $\bar{u}_i$ or $\bar{u}_i'$ and ending at $\bar{v}_i$ or $\bar{v}_i'$.
Take then $S'$, and, for each $i\in I$, delete from $T'$ any vertices in $\{\bar{u}_i,\bar{u}_i',\bar{v}_i,\bar{v}_i'\}$ which are not an endvertex of $R_i$ and add the path $R_i$. Note that this gives a copy of $T$.
\end{proof}
\subsection{Joining vertex pairs with directed paths disjointly}\label{subsec:parallel_directed_paths}
We now connect multiple pairs of vertices with directed paths, where the start vertex for each path lies in a set $B_1$, and the end vertex lies in another set $B_2$, and the vertices of $B_1$ come before the vertices of $B_2$ in a median order. With Lemma~\ref{lm:connecting_path_length_3} we can find such paths; the challenge here is to find these paths when they collectively must use almost all of the intermediate vertices in the median order. To do this, we find most of the paths using a procedure of Dross and Havet~\cite{DRO-HAV} for embedding arborescences, modifying it with Lemma~\ref{lm:connecting_path_length_3} to attach each path to the correct end vertex when most of the path has been found.
\begin{lemma}\label{lm:many_connecting_paths}
Let $G$ be an $(m_0+m_1+m_2)$-vertex tournament, and suppose $\sigma=v_1,\ldots,v_{m_0+m_1+m_2}$ is a median order of $G$. Let $B_1\subseteq V(G)$ be the first $m_1$ vertices of $G$ according to $\sigma$, let $B_2\subseteq V(G)$ be the last $m_2$ vertices of $G$ according to $\sigma$, and let $B_0=V(G)\setminus(B_1\cup B_2)$. Let $(x_1,\ldots,x_r)\in B_1^r$ and $(y_1,\ldots,y_r)\in B_2^r$. For each $i\in [r]$, let $\ell_i\geqslant 5$.
Suppose finally that
\begin{equation}\label{eqn:m0bound}
m_0\geqslant m_1+m_2+\sum_{i\in [r]}\ell_i+22r-15.
\end{equation}
Then, there are internally vertex-disjoint directed paths $P_1,\ldots,P_r$ in $G$ such that, for each $i\in [r]$, $P_i$ is a directed $x_i,y_i$-path with length $\ell_i$ and internal vertices in $B_0$.
\end{lemma}
\begin{proof}
Let $B_1'$ be the first $(m_1+2r-2)$ vertices of $B_0$ according to $\sigma$, and let $B_2'$ be the last $(m_2+2r-2)$ vertices of $B_0$ according to $\sigma$. Choose $X'=\{x_1',\ldots,x_r'\}\subseteq B_1'$ such that $x_i'\in N^+(x_i)$ for each $i\in[r]$. This is possible as, if for $i\in [r]$ we have chosen $x_1',\ldots,x_{i-1}'$, letting $U_i=\{w\in B_1:x_i<_\sigma w\leqslant_\sigma v_{m_1}\}$, then Lemma~\ref{lm:basic_properties_of_median_orders}~ii) gives
\begin{align*}
|N^+(x_i,B_1')\setminus\{x_1',\ldots,x_{i-1}'\}|&=|N^+(x_i,U_i\cup B_1')\setminus(U_i\cup\{x_1',\ldots,x_{i-1}'\})|\\
&\geqslant\frac{|U_i|+|B_1'|}{2}-|U_i|-|\{x_1',\ldots,x_{i-1}'\}|=\frac{|B_1'|-|U_i|}{2}-(i-1)\\
&\geqslant\frac{(m_1+2r-2)-(m_1-1)}{2}-(r-1)>0.
\end{align*}
Similarly, choose $Y'=\{y_1',\ldots,y_r'\}\subseteq B_2'$ such that $y_i'\in N^-(y_i)$ for each $i\in[r]$.
Let $A$ be a digraph formed by taking the disjoint union of directed paths $Q_i$, $i\in[r]$, where $Q_i$ has length $\ell_i-5$ for each $i\in [r]$. For $i\in[r]$, let $b_i$ be the first vertex and $c_i$ be the last vertex of $Q_i$. Note that $A$ has $\sum_{i\in[r]}(\ell_i-4)$ vertices.
Let $n_1=m_0-m_2-20r+13$. We now give a procedure which produces a partial embedding $\phi$ of $A$ into $G[\{v_{m_1+1},\ldots,v_{m_1+n_1}\}]$. Throughout, if a vertex $v_j$ of $G$ is the image of a vertex of $A$, we say that it is \emph{hit} and denote its pre-image by $a_j\in V(A)$. The sets $W_j$ record vertices of $G$ already used for the last two internal vertices of the paths $P_1,\ldots,P_r$ found by stage $j$.
\begin{itemize}
\item Initially, set $W_{m_1+1}=\emptyset$ and $\phi(b_i)=x_i'$ for each $i\in[r]$ (so that $x_1',\ldots,x_r'$ are hit).
\item For $j=m_1+1$ to $m_1+n_1$ in turn, do the following.
\begin{enumerate}[label=(\alph*)]
\item If $v_j$ is hit and $a_j=c_i$ for some $i\in[r]$, then, if possible, let $w_{i,1},w_{i,2}\in\{v_{j+1},\ldots,v_{m_1+m_0}\}\setminus (W_j\cup Y')$ be such that $w_{i,1}$ and $w_{i,2}$ are not yet hit, and $v_j\rightarrow w_{i,1}\rightarrow w_{i,2}\rightarrow y_i'$ in $G$. Set $W_{j+1}=W_j\cup\{w_{i,1},w_{i,2}\}$. If it is not possible to find such a $w_{i,1}$ and $w_{i,2}$, then simply set $W_{j+1}=W_j$.
\item If $v_j$ is hit and $a_j\notin\{c_1,\ldots,c_r\}$, then extend $\phi$ if possible by assigning the first not-yet-hit out-neighbour of $v_j$ in $\{v_{j+1},\ldots,v_{m_1+n_1}\}\setminus W_j$ to the out-neighbour of $a_j$ in $A$. Set $W_{j+1}=W_j$.
\item If $v_j\in W_j$, then set $W_{j+1}=W_j$.
\item If $v_j\notin W_j$ and $v_j$ is not hit, then say that $v_j$ is \emph{failed}. Set $W_{j+1}=W_j$.
\end{enumerate}
\end{itemize}
Note that, for each $m_1+1\leq j\leq m_1+n_1$, the vertices in $W_j$ are never hit, so that this procedure is well-defined.
We first show that the paths with length 3 in (a) are always found, as follows.
\begin{claim}\label{clm:wgood}
For each $m_1+1\leqslant j\leqslant m_1+n_1$, if $v_j$ is hit and $a_j=c_i$ for some $i\in[r]$, then the procedure finds vertices $w_{i,1}$ and $w_{i,2}$ as described in (a).
\end{claim}
\renewcommand\qedsymbol{$\boxdot$}
\begin{proof}[Proof of Claim~\ref{clm:wgood}] Suppose $j$ satisfies $m_1+1\leqslant j\leqslant m_1+n_1$, $v_j$ is hit and $a_j=c_i$ for some $i\in[r]$, so that, at stage $j$, we carry out (a). Let $s$ denote the number of times (a) was carried out before stage $j$.
As $W_j$ contains only vertices found in these previous instances of (a), we have $|W_j|\leq 2s$.
At stage $j$, each path $Q_i$ has at most one vertex embedded by $\phi$ to $\{v_j,v_{j+1},\ldots,v_{m_1+n_1}\}$. Moreover, if a path $Q_i$ has a vertex embedded by $\phi$ to $\{v_{j+1},\ldots,v_{m_1+n_1}\}$, then (a) has not been carried out for that $c_i$. Thus, at most $r-1-s$ vertices in $\{v_{j+1},\ldots,v_{m_1+n_1}\}$ have been hit. Let $W'$ be the union of $W_j$, $Y'\setminus\{y_i'\}$, and the hit vertices in $\{v_{j+1},\ldots,v_{m_1+n_1}\}$.
Thus, as $s\leq r-1$,
\begin{equation}\label{eqn:Wbound}|W'|\leqslant 2s+(r-1)+ (r-1-s)\leqslant3(r-1).
\end{equation}
Let $j'$ be such that $v_{j'}=y_i'$, and note that, as $y_i'\in B_2'$, $j'\geqslant m_1+m_0-m_2-2r+3$, so that, as $n_1=m_0-m_2-20r+13$, we have
\begin{equation}\label{eq:int}
j'-j+1\geqslant m_1+m_0-m_2-2r+4-m_1-n_1= 18(r-1)+9\geqslant 6|W'|+9
\end{equation}
Therefore, by Lemma~\ref{lm:connecting_path_length_3}, vertices $w_{i,1}$ and $w_{i,2}$ exist in $\{v_j,v_{j+1},\ldots,v_{j'}\}\setminus(W_j\cup Y')$ which have not yet been hit so that $v_j\to w_{i,1}\to w_{i,2}\to v_{j'}=y_i'$ in $G$.
\end{proof}
If the procedure finds a full embedding of $A$ into $G[\{v_{m_1+1},v_{m_1+2},\ldots,v_{m_1+n_1}\}]$, then observe that, for each $i\in [r]$, the image of $Q_i$ and the path $\phi(c_i)\rightarrow w_{i,1}\rightarrow w_{i,2}\rightarrow y_i'$ together give a path, $P_i'$ say, with length $\ell_i-2$ which is directed from $\phi(b_i)=x_i'$ to $y_i'$. Furthermore, the paths $P_i'$, $i\in [r]$, are vertex-disjoint with vertices in $B_0$. Taking $P_i$ to be the path $x_iP_i'y_i$ for each $i\in[r]$ gives the desired result.
All that remains to show is that the procedure produces a full embedding $\phi$ of $A$. Let $W=W_{m_1+n_1+1}$ and note that $|W|\leqslant 2r$. Assume for a contradiction that the procedure does not yield an embedding of $A$ into $G$. Then the set, $F$ say, of failed vertices in $\{v_{m_1+1},\ldots,v_{m_1+n_1}\}$ has
$|F|>n_1-|A|-|W|$.
Let $U\subseteq V(A)$ be the set of embedded vertices at the end of the procedure. Let $L$ be the set of vertices of $A$ which are the last embedded vertex on some path $Q_i$. Note we have $|L|=r$.
Say a vertex $a\in V(A)$ is \emph{active at stage $j$} if $\phi(a)\in\{v_{m_1+1},\ldots,v_{j-1}\}$ and $a$ has an out-neighbour $b$ that is not embedded in $\{v_{m_1+2},\ldots,v_j\}$ (i.e., either $b$ is not embedded or $\phi(b)\in\{v_{j+1},\ldots,v_{m_1+n_1}\}$). Now, if $v_j\in F$ comes before some vertex in $X'=\{x'_1,\ldots,x'_r\}\subset B_1'$, then it is possible there will be no active vertex at stage $j$. However, because we have assumed that the procedure does not yield an embedding of $A$ into $G$, if $v_j\in F$ and $j\geq 2m_1+2r-1$, then there must be some active vertex at stage $j$, for otherwise all the vertices of $A$ would be embedded in $\{v_{m_1+1},\ldots,v_{j-1}\}$.
Let $\bar{F}=\{v_j\in F:j\geq 2m_1+2r-1\}$, so that, for each $v_j\in \bar{F}$ we can define $r_j$ to be the largest index such that $a_{r_j}$ is active for $j$. Note, by the definition of an active vertex, $r_j<j$.
Furthermore, as $|F|>n_1-|A|-|W|$, $B'_1=\{v_{m_1+1},\ldots,v_{2m_1+2r-2}\}$ contains at least $r$ vertices in the embedding (those in $X'$), and $|A|=\sum_{i\in [r]}(\ell_i-4)$, we have
\begin{equation}\label{eqn:Fbar}
|\bar{F}|>n_1-|A|-|W|-(m_1+2r-2-r)\geqslant m_0-m_2-20r+13-\sum_{i\in[r]}\ell_i+r-m_1+2\overset{\eqref{eqn:m0bound}}{\geqslant}3r.
\end{equation}
For each $v_j\in \bar{F}$, set $I_j=\{v_i:r_j<i\leqslant j\}$. We now bound from above the number of vertices of $\bar{F}$ in $I_j$, as follows.
\begin{claim}\label{clm:sizeIiF}
If $v_j\in \bar{F}$, then $|I_j\cap F|\leqslant |I_j\cap\phi(L)|+|I_j\cap W|$.
\end{claim}
\begin{proof}[Proof of Claim~\ref{clm:sizeIiF}] Let $J=(I_j\cap N^+(v_{r_j}))\setminus W$. As the out-neighbour of $a_{r_j}$ is never embedded in $I_j$, all the vertices in $J$ must be hit by the start of stage $r_j$. Thus, as $F\cap W=\emptyset$, we have $I_j\cap F\subseteq I_j\cap N^-(v_{r_j})$, so that
\begin{equation}\label{eq:interval_bound_1}
|I_j\cap F|\leqslant |I_j\cap N^-(v_{r_j})|.
\end{equation}
Now, let $A_{r_j}$ and $A_{j-1}$ be the sub-digraphs of $G[v_{m_1+1},\ldots,v_j]$ which are the image of the partial embedding $\phi$ at the end of stage $r_j$ and stage $j-1$, respectively, restricted to the vertex set $\{v_{m_1+1},\ldots,v_j\}$. Observe the following.
\begin{itemize}
\item Each vertex of $J$ is the last vertex of a path of $A_{r_j}$, as it is hit by the end of stage $r_j$ and occurs later in $\sigma$ than $r_j$.
\item Any vertex in $I_j$ which is the last vertex of some path of $A_{j-1}$ must be the image of some $c_i$, for otherwise it is active for $j$, contradicting the definition of $r_j$. Thus, because $L$ is the set of vertices of $A$ which are the last embedded vertex on some path $Q_i$, such a vertex is in $I_j\cap \phi(L)$.
\item As $r_j\leq j-1$, $A_{r_j}\subset A_{j-1}$, and $V(A_{j-1})\setminus V(A_{r_j})\subseteq I_j$, so $A_{j-1}$ must have at least as many paths terminating in $I_j$ as $A_{r_j}$ does.
\end{itemize}
Combining these three observations we have $|J|\leqslant |I_j\cap \phi(L)|$, and hence
\begin{equation}\label{eq:interval_bound_2}
|I_j\cap N^+(v_{r_j})|\leqslant |I_j\cap\phi(L)|+|I_j\cap W|.
\end{equation}
Now, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), $|I_j\cap N^-(v_{r_j})|\leqslant|I_j\cap N^+(v_{r_j})|$. Together with (\ref{eq:interval_bound_1}) and (\ref{eq:interval_bound_2}), this proves the claim.
\end{proof}
\renewcommand\qedsymbol{$\square$}
Let $M$ be the set of indices $j$ such that $v_j\in\bar{F}$, and $I_j$ is maximal for inclusion among the sets $I_i$, with $v_i\in\bar{F}$. We will show that the sets $I_j$, $j\in M$ are disjoint.
If $i,j\in M$ with $i<j$ and $I_i\cap I_j\neq \emptyset$, then we have $r_j< i$. Observe that, as $a_{r_j}$ is active for $j$ and $\phi(a_{r_j})\in \{v_0,\ldots,v_{i-1}\}$, $a_{r_j}$ is also active for $i$, and hence $r_i\geqslant r_j$. Thus, $I_i\subset I_j$ and, as $i<j$, $I_i\neq I_j$, and hence $I_i$ is not maximal for inclusion among the sets $I_{i'}$, with $v_{i'}\in\bar{F}$, a contradiction.
Since $v_j\in I_j$ for all $v_j\in\bar{F}$, we have $\bar{F}\subseteq \cup_{j\in M} I_j$. As the sets $I_j$, $j\in M$, are pairwise disjoint, $|\bar{F}|\leqslant\sum_{j\in M}|I_j\cap F|$. By Claim~\ref{clm:sizeIiF}, we therefore obtain
\begin{equation*}
|\bar{F}|\leqslant\sum_{j\in M}|I_j\cap F|\leqslant \sum_{j\in M}\left(|I_j\cap\phi(L)|+|I_j\cap W|\right)\leqslant|\phi(L)|+|W|\leqslant 3r,
\end{equation*}
contradicting~\eqref{eqn:Fbar}. This completes the proof of the lemma.
\end{proof}
\subsection{Proof of Theorem~\ref{thm:fewlineardirected}}\label{subsec:proof_bare_paths_directed}
Given Lemma~\ref{lm:many_connecting_paths} it is now straight-forward to prove Theorem~\ref{thm:fewlineardirected}. Given an $n$-vertex oriented tree $T$ with $k$ leaves whose maximal bare paths are directed, we label such paths with length at least 5 as $P_1,\ldots,P_r$, for the appropriate $r$ (which, by Proposition~\ref{prop:deg3}, satisfies $r=O(k)$). We can then consider $T$ to be formed of small vertex-disjoint subtrees $T_1,\ldots,T_{r+1}$ connected by the paths $P_1,\ldots,P_r$. We use Proposition~\ref{prop:treepart} to group these subtrees into classes, with the classes ordered so that each path $P_i$ goes from some class to the next class. Given then a tournament $G$ with $n+50k$ vertices, we divide a median order into intervals, with one interval for each class of subtrees and one for the set of paths between each pair of consecutive classes (see \eqref{eqn:splitorder}). Then, we then use Corollary~\ref{cor:DHbound} to embed the subtrees $T_i$ into their interval in the median order before using Lemma~\ref{lm:many_connecting_paths} to embed the paths $P_i$ with interior vertices in their interval in the median order.
\begin{proof}[Proof of Theorem~\ref{thm:fewlineardirected}] We will prove this with $C=50$, so let $\bar{n}=n+50k$.
Let $T$ be an $n$-vertex oriented tree with $k$ leaves in which every bare path is a directed path, and let $G$ be a $\bar{n}$-vertex tournament. Let $B$ be the set of vertices of $T$ which do not have degree 2, so that, by Proposition~\ref{prop:deg3}, $|B|\leqslant2k-2$. Remove all maximal bare paths of length at least $5$ from $T$. Let $r$ be the number of removed paths, noting that, by Proposition~\ref{prop:deg3}, $r\leqslant 2k-3$, and label these paths as $P_1,\ldots,P_r$ (where we recall $\ell(P_i)$ denotes the length of $P_i$). Say the remaining forest $F$ has component trees $T_1,\ldots,T_{r+1}$, and, for each $i\in [r+1]$, let $k_i$ be the number of leaves of $T_i$ if $|T_i|\geq 2$, and let $k_i=1$ if $|T_i|=1$. Note that $F$ is a union of $(|B|-1-r)$ maximal bare paths of $T$ with length at most 4 between vertices in $B$, resulting in a forest with $r+1$ components. Thus, we have that $|F|\leqslant|B|+3(|B|-1-r)\leqslant8k-3r-11$. Observing that every leaf or isolated vertex of $F$ is in $B$, we have $\sum_{i\in[r+1]}k_i\leqslant |B|\leq 2k-2$. We also note that
\begin{equation}
|F|=\sum_{i\in[r+1]}|T_i|
\;\;\text{ and }\;\;
\sum_{i\in[r]}\ell(P_i)=|T|-|F|+r=n-\sum_{i\in[r+1]}|T_i|+r.\label{eqn:sumPi}
\end{equation}
Let $S$ be the oriented tree on vertex set $[r+1]$ with $ij\in E(S)$ whenever there is a directed path from $T_i$ to $T_j$ in $T$. By applying Proposition~\ref{prop:treepart} to $S$, let $s\leqslant r+1$ be such that there is a partition $I_1,\ldots,I_s$ of $[r+1]$ into non-empty sets such that, for each distinct $i,j\in [r+1]$, and $i'\in [s]$, if $i\in I_{i'}$ and there is a directed path from $T_i$ to $T_j$ in $T$, then $i'<s$ and $j\in I_{i'+1}$.
For each $i\in [s-1]$, let $J_i$ be the set of indices $j\in [r]$ such that $P_j$ is directed from $T_{i'}$ to $T_{j'}$ for some $i'\in I_i$ and $j'\in I_{i+1}$, and note that $\cup_{i\in [s-1]}J_i=[r]$.
Let $\sigma=v_1,\ldots, v_{\bar{n}}$ be a median order of $G$. In this median order take consecutive intervals
\begin{equation}\label{eqn:splitorder}
V_1,U_1,V_2,U_2,V_3,\ldots,V_{s-1},U_{s-1},V_s,
\end{equation}
appearing in that order, such that, for each $j\in [s]$,
\begin{align}
|V_j|&=\Bigg\lceil\frac{3}{2}\sum_{i\in I_j}(|T_i|+k_i)\Bigg\rceil-2|I_j|\leq
\frac{3}{2}\sum_{i\in I_j}(|T_i|+k_i)+\frac{1}{2}-2|I_j|,\label{eqn:Ui}
\end{align}
and, for each $j\in [s-1]$,
\begin{align}\label{eqn:Vj}
|U_j|&=|V_j|+|V_{j+1}|+\sum_{i\in J_j}\ell(P_i)+22|J_j|-15.
\end{align}
Note that this is possible, as
\begin{align*}
\sum_{j=1}^s|V_j|+\sum_{j=1}^{s-1}|U_j|&\overset{\eqref{eqn:Vj}}{\leqslant}
3\sum_{j=1}^s|V_j|+\sum_{j\in [r]}\ell(P_j)+22\sum_{j\in [s-1]}|J_j|-15(s-1)
\\
&\overset{\eqref{eqn:Ui}}{\leq} \frac{9}{2}\sum_{i\in [r+1]}(|T_i|+k_i)+\frac{3}{2}s-6\sum_{j=1}^s|I_j|+\sum_{j\in [r]}\ell(P_j)+22r-15(s-1)\\
&\overset{\eqref{eqn:sumPi}}{\leq}n+r+\frac{7}{2}|F|+\frac{9}{2}\sum_{i\in[r+1]}k_i-6(r+1)+22r\\
&\leqslant n+\frac{7}{2}(8k-3r-11)+\frac{9}{2}(2k-2)+17r-6\\
&\leqslant n+37k+\frac{13}{2}r\leqslant n+50k,
\end{align*}
where we have used that $r\leq 2k-3$.
By Corollary~\ref{cor:DHbound} and \eqref{eqn:Ui}, a copy of $\cup_{i\in I_j}T_i$ exists in $G[V_j]$ for each $j\in [s]$. By Lemma~\ref{lm:many_connecting_paths} and \eqref{eqn:Vj}, for each $j\in [s-1]$, the $|J_j|$ paths $P_i$, $i\in J_j$, between $\cup_{i\in I_j}T_i$ and $\cup_{i\in I_{j+1}}T_i$ can then be embedded in the intervals $V_j,U_j,V_{j+1}$ with the appropriate first and last vertex in $V_j$ and $V_{j+1}$, respectively, and internal vertices in $U_j$. This completes the embedding of $T$, and hence the proof of the theorem.
\end{proof}
\section{Proof of Theorem~\ref{thm:fewcst}}\label{sect:fewcst}
As an illustrative case, let us first sketch Theorem~\ref{thm:fewcst} for trees consisting of a directed path between two arborescences, as follows.
Suppose we have a directed path $P$, an in-arborescence $S$ with root the first vertex of $P$, and an out-arborescence $S'$ with root the last vertex of $P$, and suppose that $S\cup P\cup S'$ is an oriented tree with $n$ vertices. Say $S$ has $k$ in-leaves and $S'$ has $k'$ out-leaves, and the tournament $G$ has $m:=n+k+k'-2$ vertices and a median order $v_1,\ldots,v_m$. Using Lemma~\ref{lm:basic_properties_of_median_orders}~i) and Theorem~\ref{thm:DH} (via directional duality), we can embed $S$ into $G[\{v_1,\ldots,v_{|S|+k-1}\}]$ with the root vertex embedded to $v_{|S|+k-1}$. Similarly, we can embed $S'$ into $G[\{v_{m-|S'|-k'+2},\ldots,v_m\}]$ with the root vertex of $S'$ embedded to $v_{m-|S'|-k'+2}$. Finally, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), we have $v_{|S|+k-1}\to v_{|S|+k}\to \ldots \to v_{m-|S'|-k'+2}$, so we can use this path to embed the $n-|S|-|S'|+2=m-|S|-|S'|-k-k'+4$ vertices of $P$ and complete an embedding of $T$ into $G$.
Essentially, all our embeddings will look like this, where $P$ will be a very long path, but with some additional subtrees and paths found within the interval we use to embed $P$. For example, suppose now the tree $T$ also has a subtree $F$ which shares one vertex, $t$ say, with $S$, where $t$ only has out-neighbours in $F$. If $P$ is a long path (compared to $|F|,|S|,|S'|$) then we can embed $T=F\cup S\cup P\cup S'$ into a tournament $G$ with $m:=|T|+k+k'-2$ vertices as follows. Carry out the above embedding of $S$ and $S'$ into the start and end respectively of a median order $v_1,\ldots,v_m$ of $G$ and note that the path $Q:=v_{|S|+k-1}\to v_{|S|+k}\to \ldots \to v_{m-|S'|-k'+2}$ has $|F|-1+|P|$ vertices. If $s$ is the embedding of $t\in V(S)$, then by Lemma~\ref{lm:basic_properties_of_median_orders}~ii) and as $|Q|\geq |P|-1\gg |F|,|S|$, $s$ will have many out-neighbours in this path, enough that we can easily embed $F-t$ among the out-neighbours of $s$ in $Q$ (using, in particular, Corollary~\ref{cor:DHbound}). However, we wish to do this so that there is a directed path between $v_{|S|+k-1}$ and $v_{m-|S'|-k'+2}$ covering exactly the $|Q|-(|F|-1)=|P|$ vertices of $V(Q)$ which are not used to embed $F-t$.
To do this, before embedding $F$, we first find a short directed $v_{|S|+k-1},v_{m-|S'|-k'+2}$-path $R$ with vertices in $V(Q)$ so that every vertex in $V(Q)$ has at least one out-neighbour on $R$ occurring after some in-neighbour on $R$. The path $R$ will be short enough that we can embed $F-t$ in the out-neighbours of $s$ in $V(Q)$ while avoiding $V(R)$. Once $F-t$ has been embedded, we slot the remaining vertices in $V(Q)$ into $R$ one by one. This will be possible from the property of $R$ as we are working in the tournament $G$ (see Claim~\ref{clm:Rismall}). Note that, in the language of absorption (as codified by R\"odl, Ruci\'nski and Szemer\'edi~\cite{rodl2006dirac}), $R$ is a path which can absorb any set of vertices from the interval of the median order between its first and last vertex.
More generally, we can embed small trees attached with an out-edge from $S\cup P\cup S'$, as long as the attachment point is not too late in $P$, and also not in $S'$, by embedding such small trees within the interval for the path $P$. Similarly, we can embed small trees attached with an in-edge from $S\cup P\cup S'$, as long as the attachment point is not too early in $P$, and also not in $S$. We can also use Lemma~\ref{lm:connecting_path_length_3} to add short paths between vertices in the interval from $P$ that are not too close together. We therefore decompose any $n$-vertex tree $T$ with $k$ leaves by finding a digraph $D$ which can be built in this way and which contains $T$.
Roughly speaking, we call the digraph $D$ a \emph{good decomposition for $T$} if it contains $T$ and can be built from some $S\cup P\cup S'$ as described above by adding digraphs in these ways; this is defined precisely in Section~\ref{subsec:gooddecomp}. In Section~\ref{subsec:finding_a_good_decomposition}, we show that there is a good decomposition for any tree without a subpath that we could otherwise deal with using Section~\ref{sec:andrewrulesok} as before. Then, in Section~\ref{subsec:embedding_a_good_decomposition}, we show it is possible to embed any good decomposition of any $n$-vertex tree with $k$ leaves into an $(n+k-2)$-vertex tournament. Finally, in Section~\ref{subsec:final}, we put this together to prove Theorem~\ref{thm:fewcst}.
\subsection{\texorpdfstring{$(r,m)$}{(r,m)}-good decompositions}\label{subsec:gooddecomp}
We now define a good decomposition precisely, using the follow definition of a path partition.
\begin{defn} Say a sequence of paths $P_1\ldots P_\ell$ is a \emph{path partition of a path $P$} if $P=\cup_{i\in [\ell]}P_i$ and, for each $i\in [\ell-1]$, the end vertex of $P_{i}$ is the start vertex of $P_{i+1}$, and all the paths are otherwise pairwise vertex disjoint.
\end{defn}
Roughly speaking, as depicted in Figure~\ref{fig:gooddecomp}, an $(r,m)$-good decomposition for a tree $T$ is a digraph $D$ with $T\subseteq D$, such that $D$ can be constructed by taking a long directed path $P$ from the root of an in-arborescence $S_1$ to the root of an out-arborescence $S_{r+1}$, attaching small forests $F_i$ to a limited number of well-separated subpaths $S_i$ of $P$, and, finally, attaching short directed paths $Q_i$ between some of these well-separated subpaths and forests. More precisely, we define an $(r,m)$-good decomposition as follows.
\begin{defn}\label{def:gooddecomp}
Say that a digraph $D$ is an \emph{$(r,m)$-good decomposition} for an $n$-vertex oriented tree $T$ if $V(D)=V(T)$, and, for some distinct $x,y\in V(D)$, there is a directed $x,y$-path $P$ with path partition
\begin{equation}\label{eqn:Ppart}
P=P_1S_2P_2S_3\ldots P_{r-1}S_{r}P_{r},
\end{equation}
an in-arborescence $S_1$ with root $x$, an out-arborescence $S_{r+1}$ with root $y$, and
\begin{itemize}
\item forests $F_i^+$, $F_i^-$, $i\in [r+1]$, and
\item for some $0\leq \ell \leq 2r$, vertices $s_i,t_i$ and directed $s_i,t_i$-paths $Q_i$, $i\in [\ell]$,
\end{itemize}
such that, letting $F_i=F_i^-\cup F^+_i$ for each $i\in [r+1]$, the following hold.
\stepcounter{capitalcounter}
\begin{enumerate}[label = {\bfseries \Alph{capitalcounter}\arabic{enumi}}]
\item $T\subseteq S_1\cup P\cup S_{r+1}\cup (\cup_{i\in [r+1]} F_i)\cup (\cup_{i\in [\ell]}Q_i)=D$.\label{prop1}
\item The following sets, over $i\in [r+1]$ and $j\in [\ell]$, form a partition of $V(T)=V(D)$:\label{prop2}
\[
V(P),\;V(F_i^+)\setminus V(S_i),\; V(F_i^-)\setminus V(S_i),\; V(S_1)\setminus \{x\},\; V(S_{r+1})\setminus \{y\},\; V(Q_j)\setminus \{s_j,t_j\}.
\]
\item For each $i\in [r]$, $P_i$ has length at least $2000m$.\label{prop3}
\item For each $i\in [r+1]$ and $\diamond\in \{+,-\}$, $V(S_i)\subset V(F_i^\diamond)$, $|F_i^\diamond|\leq m$, and $F_i^\diamond$ is a forest in which each component has exactly one vertex in $S_i$, which furthermore has only $\diamond$-neighbours in $F_i^\diamond$.\label{prop4}
\item $E(F_1^-)=E(F_{r+1}^+)=\emptyset$ and $|S_1|,|S_{r+1}|\geq 2$.\label{prop5}
\item The total number of in-leaves of $S_1$ and out-leaves of $S_{r+1}$ is at most the number of leaves of $T$.\label{prop6}
\item For each $i\in [\ell]$, one of the following holds.\label{prop78}
\begin{enumerate}[label = {\bfseries \Alph{capitalcounter}\arabic{enumi}.\arabic{enumii}}]
\item For some $1\leq j<j'\leq r+1$, $Q_i$ is a directed path from $F_j$ to $F_{j'}$ with length $3(j'-j)+1$.\label{prop7}
\item For some $2\leq j\leq r$, $Q_i$ is a directed path with length 3 from $V(F_j^-)\setminus V(S_j)$ to the last vertex of $S_j$.\label{prop8}
\end{enumerate}
\end{enumerate}
\end{defn}
\begin{figure}
\DiagramGoodDecomposition
\vspace{-0.75cm}
\caption{An $(r,m)$-good decomposition.\label{fig:gooddecomp}}
\end{figure}
\subsection{Finding a good decomposition}\label{subsec:finding_a_good_decomposition}
As noted before, by the results in Section~\ref{sec:andrewrulesok}, we will be able to assume that our $n$-vertex tree $T$ with $k$ leaves in Theorem~\ref{thm:fewcst} mostly consists of directed bare paths. To find a good decomposition, we consider these paths and arrange them in order of decreasing length. Identifying a point where the length of these paths drops significantly (perhaps including all the paths), we show that removing these long paths creates a forest in which each component is much smaller than each of the removed paths. Next, we order these paths and components using Proposition~\ref{prop:newgoodlabel}. Taking (essentially) the removed paths as the paths $P_i$, carefully chosen directed subpaths $S_i$ of the components of the forest (see \ref{case1}--\ref{case4}) and some dummy edges if necessary will form the path in~\eqref{eqn:Ppart}. After the careful selection in \ref{case1}--\ref{case4}, we will be able to divide naturally the rest of $T$ into the other sets in the decomposition.
\begin{lemma}\label{lem:gooddecomp} Let $1/n \ll \mu\ll 1/k$. Let $T$ be an $n$-vertex oriented tree with $k\geq 2$ leaves and no bare path of length at least $\mu n$ with first and last block of length 1 and whose endvertices have degree 2 in $T$. Then, for some $r\leq 10k$ and $m\geq \mu n$, $T$ has an $(r,m)$-good decomposition.
\end{lemma}
\begin{proof}
We will construct an $(r,m)$-good decomposition using the notation in Definition~\ref{def:gooddecomp}, and confirm that each of \ref{prop1}--\ref{prop78} hold.
Let $p$ be the number of maximal bare paths of $T$, and let them be $T'_1,\ldots,T'_{p}$. By Proposition~\ref{prop:deg3}, we have $p\leq 2k-3$. Observe that each $T'_i$ has fewer than $\mu n$ edges that are not contained in the first two blocks or the last two blocks, for otherwise, taking the last edge of the second block, and the first edge of the penultimate block, and all the edges between them on $T'_i$, gives a bare path with length at least $\mu n$ with first and last block of length 1 whose endvertices have degree 2 in $T$.
Let $q$ be the number of maximal directed bare paths of $T$ with length at least $\mu n$, and let them be $T_1,\ldots,T_q$ with length $\ell_1,\ldots,\ell_q$ respectively, so that $\ell_1\geq \ell_2\geq \ldots \geq \ell_q$. By the above observation, we find $q\leqslant 4p\leqslant 8k-12$, and $|T-T_1-\ldots-T_q|\leqslant(2k-3)(4\mu n+\mu n)\leqslant 10k\mu n$. Furthermore, as $\mu\ll 1/k$, we must have that $q\geq 1$ and $\ell_1\geq n/2q\geq n/20k$.
Now, let $r\in [q-1]$ be the smallest integer such that $\ell_r> 10^6k\ell_{r+1}$, if it exists, and $r=q$ otherwise. Let $m=\ell_r/2500$. Note that, as $\ell_1\geq n/20k$ and $\mu\ll 1/k$,
\begin{equation}\label{eqn:m}
m\geq \frac{\ell_1}{2500\cdot (10^6k)^{r-1}}\geq \frac{n/20k}{2500\cdot (10^6k)^{8k-12}}\geq\mu n.
\end{equation}
Note that, as $r\leq q$, $r\leq 10k$ and $m\geq \mu n$, as required.
As $T-T_1-\ldots-T_r$ is the union of $T-T_1-\ldots-T_q$ and at most $8k-12$ paths of length at most $\ell_r/10^6k$, we have $|T-T_1-\ldots-T_r|\leqslant 10k\mu n+m/4\leqslant m/2$. Note that $T-T_{1}-\ldots-T_r$ has $r+1$ components. Say these are $R_1,\ldots,R_{r+1}$, and note that $|R_i|\leqslant |T-T_1-\ldots-T_r|\leqslant m/2$ for each $i\in[r+1]$.
Using Proposition~\ref{prop:newgoodlabel}, relabel the components $\{R_1,\ldots,R_{r+1}\}$ and paths $\{T_1,\ldots,T_r\}$, and define functions $i^-,i^+:[r]\to[r+1]$, so that, for every $j\in[r]$, $T_j$ is a directed path from $R_{i^-(j)}$ to $R_{i^+(j)}$, and $i^-(j)\leqslant j<i^+(j)$.
For each $j\in[r]$, label vertices so that $T_j$ is an $x_j',y_j'$-path directed from $x_j'\in V(R_{i^-(j)})$ to $y_j'\in V(R_{i^+(j)})$. Let $I\subseteq \{2,\ldots,r\}$ be the set of $i$ with $y_{i-1}'\in V(R_i)$, $x_i'\in V(R_i)$, and such that the path between $y_{i-1}'$ and $x_i'$ in $R_i$ is not directed from $y_{i-1}'$ to $x_i'$. For each $j\in[r]$, let $Q_j^+$ be the path consisting of the last $3(i^+(j)-j-1)+1\geq 1$ edges of $T_j$. For each $j\in[r]\setminus I$, let $Q_j^-$ be the path consisting of the first $3(j-i^-(j))+1\geq 1$ edges of $T_j$. For each $j\in I$, let $Q_j^-$ be the path consisting of the first 3 edges of $T_j$. Note that the lengths of the paths $Q_j^+,Q_j^-$ are always much smaller than the length of the path $T_j$.
For each $i\in[r]$, let $P_i$ be such that $T_i=Q^-_iP_iQ^+_i$ is a path partition. Label vertices so that $P_i$ is an $x_i,y_i$-path directed from $x_i$ to $y_i$. Note that each path $P_i$ is $T_i$ with up to $3r+1$ edges removed from each end. As the original length of such a path was at least $\ell_r=2500m$, and we have $1/n\ll\mu\ll 1/r$, we have by \eqref{eqn:m} that \ref{prop3} holds.
Let $x=x_1$ and note that $Q_1^-=x_1'x$. Let $S_1\subset R_1+x_1'x$ be the maximal in-arborescence in $R_1+x_1'x$ with root $x$. Note we have that $|S_1|\geq 2$. Let $y=y_r$ and note that $Q_r^+=yy_r'$. Let $S_{r+1}$ be the maximal out-arborescence in $R_{r+1}+yy_r'$ with root $y$. Note we have $|S_{r+1}|\geq 2$.
If $k_0$ is the number of in-leaves of $S_1$, then as its root $x$ is an out-leaf, $S_1$ has $k_0+1$ leaves. Similarly, if $k_1$ is the number of out-leaves of $S_{r+1}$, then $S_{r+1}$ has $k_1+1$ leaves. Now, take the path, $S$ say, between $S_1$ and $S_{r+1}$ in $T$ and note that the tree $S_1\cup S\cup S_{r+1}$ has $(k_0+1)+(k_1+1)-2=k_0+k_1$ leaves. Noting that $T$ has at least as many leaves as $S_1\cup S\cup S_{r+1}\subset T$ completes the proof that \ref{prop6} holds.
Now, for each $i\in \{1,r+1\}$ and each $\diamond\in \{+,-\}$, let $F_{i}^\diamond\subset S_{i}\cup R_i$ be the digraph formed from the union of the paths in $(S_{i}\cup R_i)-E(S_i)$ from $V(S_i)$ which start with a $\diamond$-edge, and let $F_{i}=F_{i}^+\cup F^-_{i}=(S_{i}\cup R_i)-E(S_{i})$. Note that, by the maximality of $S_1$ as an in-arborescence and the maximality of $S_{r+1}$ as an out-arborescence, we have that $E(F_1^-)=E(F_{r+1}^+)=\emptyset$, completing the proof that \ref{prop5} holds. For each $i\in \{1,r+1\}$, $|F_i|\leq |R_i|+1\leq m/2+1\leq m$, so \ref{prop4} holds as well for $i\in \{1,r+1\}$.
We now construct $y_{i-1},x_i$-paths $S_i$, for each $2\leqslant i\leqslant r$. For each such $i$, we consider $Q^+_{i-1}\cup R_i\cup Q^-_i$, and add up to two edges (according to the cases below) before finding a directed path $S_i$ through the resulting digraph. We divide into cases \ref{case1}--\ref{case4} according to whether $y_{i-1}'\in V(R_i)$ (i.e., if $i^+(i-1)=i$) and whether $x_i'\in V(R_i)$ (i.e., if $i^-(i)=i$) . These cases are depicted in Figure~\ref{fig:paths-through-islands}. Note that, if $y'_{i-1}\in V(R_i)$ then $Q_{i-1}^+$ consists of only the edge $y_{i-1}y_{i-1}'$, and if $x_i'\in V(R_i)$ with $i\notin I$, then $Q_i^-$ consists of only the edge $x_i'x_{i}$.
Precisely, for each $2\leq i\leq r$, we do the following.
\stepcounter{capitalcounter}
\begin{enumerate}[label={\bfseries\Alph{capitalcounter}\arabic{enumi}}]
\item If $y_{i-1}'$ and $x_i'$ are both in $V(R_i)$, then do the following.\label{case1}
\begin{enumerate}[label = {\bfseries \Alph{capitalcounter}\arabic{enumi}.\arabic{enumii}}]
\item\label{case11} If the $y_{i-1}',x_{i}'$-path in the tree $R_i$ is a directed path from $y_{i-1}'$ to $x_{i}'$, then let $S_{i}$ be the directed path from $y_{i-1}$ to $x_i$ in $R_i+y_{i-1}y_{i-1}'+x_i'x_i$.
\item\label{case12} If the $y_{i-1}',x_{i}'$-path in the tree $R_i$ is not a directed path from $y_{i-1}'$ to $x_{i}'$ (i.e., if $i\in I$), then let $S_{i}'$ be the maximal directed subpath from $y_{i-1}'$ that it contains. Let $S_i$ be the path consisting of the edge $y_{i-1}y_{i-1}'$, followed by $S_i'$, followed by a new edge from the endvertex of $S_i'$ to $x_i$.
\end{enumerate}
\item\label{case2} If $y_{i-1}'\in V(R_i)$ and $x_i'\notin V(R_i)$, then let $S_i$ be the path $y_{i-1}y_{i-1}'x_i$.
\item\label{case3} If $y_{i-1}'\notin V(R_i)$ and $x_i'\in V(R_i)$, then let $S_i$ be the path $y_{i-1}x_i'x_i$.
\item\label{case4} If $y_{i-1}',x_i'\notin V(R_i)$, then let $z\in V(R_i)$ be arbitrary, and let $S_i$ be the path $y_{i-1}zx_{i}$.
\end{enumerate}
\begin{figure}
\DiagramPathsThroughIslands
\vspace{-0.75cm}
\caption{Cases~\ref{case1}-\ref{case4}.}\label{fig:paths-through-islands}
\end{figure}
Now, for each $2\leq i\leq r$, we choose $F_{i}^+$, $F_{i}^-$ and $F_{i}=F_{i}^+\cup F_{i}^-$. To do so, for each $2\leq i\leq r$ and each $\diamond\in \{+,-\}$, let $F_{i}^\diamond\subset S_{i}\cup R_i$ be the digraph formed from the union of the paths in $(S_{i}\cup R_i)-E(S_{i})$ from $V(S_{i})$ which start with a $\diamond$-edge, and let $F_{i}=F_{i}^+\cup F^-_{i}=(S_{i}\cup R_i)-E(S_{i})$.
Note that $F_i^+$ and $F_i^-$ could consist of a single vertex. For each $2\leq i\leq r$, $|F_{i}|= |R_i|+2\leq m/2+2\leq m$. We now have that \ref{prop4} holds for each $i\in[r+1]$, as required.
Let $\ell$ be the number of paths $Q_i^\diamond$, $i\in[r]$, $\diamond\in\{+,-\}$ with length greater than 1, so that $0\leqslant\ell\leqslant2r$. Relabel these paths arbitrarily as $Q_i,i\in[\ell]$. Note that, as we created no new vertices, we have that $V(D)\subset V(T)$ (with equality once we confirm $T\subset D$ below). It is left then to prove that \ref{prop1}, \ref{prop2}, and \ref{prop78} hold and check the properties at the start of Definition~\ref{def:gooddecomp}.
Note that, for each $2\leq i\leq r$, $S_i$ was a directed $y_{i-1},x_i$-path. Therefore, as $x=x_1$ and $y=y_r$,
\begin{equation}
P:=P_1S_2P_2S_2\ldots P_{r-1}S_{r}P_{r}
\end{equation}
is a path partition of the directed $x,y$-path $P$. Furthermore, we have that $S_1$ is an in-arborescence with root $x$ and that $S_{r+1}$ is an out-arborescence with root $y$.
Now, by construction, $T\subseteq P\cup S_1\cup S_{r+1}\cup (\cup_{i\in [r+1]}F_i)\cup(\cup_{i\in [r],\diamond\in\{+,-\}}Q_i^\diamond)=D$. Whenever $Q_i^+$ has length~1 and $i<r$, we have that $i^+(i)=i+1$, so $S_{i+1}$ is chosen in \ref{case11}, \ref{case12}, or \ref{case2}, and hence $Q_i^+=y_{i-1}y_{i-1}'\subseteq S_{i+1}$. Note that $Q_r^+$ has length~1, and $Q_r^+=yy_r'$ is in $S_{r+1}$. Whenever $Q_i^-$ has length 1 and $i>1$, we must have that $i\notin I$ and $i^-(i)=i$, and therefore $S_{i}$ is chosen in \ref{case11} or \ref{case3}, so that $Q_i^-=x_i'x_i\subseteq S_i$.
Note that $Q_1^-$ has length 1, and $Q_1^-=x_1'x$ is in $S_1$.
Therefore, $P\cup(\cup_{i\in [r],\diamond\in\{+,-\}}Q_i^\diamond)=P\cup(\cup_{i\in[\ell]}Q_i)+x_1'x+yy_r'$, and so $T\subseteq P\cup S_1\cup S_{r+1}\cup (\cup_{i\in [r+1]}F_i)\cup(\cup_{i\in[\ell]}Q_i)=D$ and \ref{prop1} holds.
Furthermore, note that $V(R_i)$, $i\in [r+1]$, and $V(T_i)\setminus\{x_i',y_i'\}$, $i\in [r]$, form a partition of $V(T)$. For each $i\in [r]$, $V(Q_i^-)\setminus \{x_i,x_i'\}$, $V(P_i)$ and $V(Q_i^+)\setminus \{y_i,y_i'\}$ form a partition of $V(T_i)\setminus\{x_i',y_i'\}$. For each $2\leq i\leq r$, by the choice of $F^+_i$ and $F^-_i$, $V(F_i^+)\setminus V(S_i)$, $V(F_i^-)\setminus V(S_i)$ and $V(S_i)\setminus \{y_{i-1},x_i\}$ form a partition of $R_i$, while $V(F_1^-)\setminus V(S_1)=\emptyset$, $V(F_1^+)\setminus V(S_1)$ and $V(S_1)\setminus \{x_1\}$ partition $V(R_1)\setminus \{x_1\}$, and $V(F_{r+1}^-)\setminus V(S_{r+1})$, $V(F_{r+1}^+)\setminus V(S_{r+1})=\emptyset$ and $V(S_{r+1})\setminus \{y_{r}\}$ partition $V(R_{r+1})\setminus \{y_r\}$. As $V(P)=(\cup_{i\in [r]}V(P_i))\cup (\cup_{2\leq i\leq r}(V(S_i)\setminus \{y_{i-1},x_i\}))$, the sets listed in \ref{prop2} form a partition of $V(T)$.
Therefore, we need only show that, for each path $i\in [\ell]$, either \ref{prop7} or \ref{prop8} holds. If $Q_i=Q_j^+$ for some $j\in[r]$, then $Q_i$ is a directed $y_j,y_j'$-path of length $3(i^+(j)-(j+1))+1>1$, so that $i^+(j)>j+1$. As $y_j\in V(S_{j+1})\subseteq V(F_{j+1})$ and $y_j'\in V(R_{i^+(j)})\subseteq V(F_{i^+(j)})$, \ref{prop7} holds for $Q_i$. If $Q_i=Q_j^-$ for some $j\in[r]\setminus I$, then $Q_i$ is a directed $x_j',x_j$-path of length $3(j-i^-(j))+1>1$, so that $i^-(j)<j$. As $x_j'\in V(R_{i^-(j)})\subseteq V(F_{i^-(j)})$, and $x_j\in V(S_j)\subseteq V(F_j)$, \ref{prop7} holds for $Q_i$. Finally, if $Q_i=Q_j^-$ for some $j\in I$, then $S_j$ was chosen in \ref{case12}. From the choice of the relevant maximal directed path $S_{j}'$, the first vertex $x_j'$ of $Q_i$ is in $V(F_{j}^-)\setminus V(S_{j})$ and the last vertex $x_j$ of $Q_i$ is also the last vertex of $S_{j}$, and therefore \ref{prop8} holds.
\end{proof}
\subsection{Embedding a good decomposition}\label{subsec:embedding_a_good_decomposition}
We now show that it is possible to embed an $(r,m)$-good decomposition $D$ of a $n$-vertex tree $T$ with $k$ leaves into an $(n+k-2)$-vertex tournament $G$, when $1/n\ll 1/r,1/k,m/n$. For our sketch we will use the notation of Definition~\ref{def:gooddecomp}. We take a median order of $G$ and find within it consecutive disjoint intervals $V_1,U_1,V_2,U_2,\ldots,V_r,U_r,V_{r+1}$ with carefully chosen sizes. We will embed $S_1$ into $G[V_1]$ while embedding its root to the last vertex of $V_1$ under $\sigma$, using Theorem~\ref{thm:DH}, and similarly embed $S_{r+1}$ into $V_{r+1}$ so that its root is embedded to the first vertex of $V_{r+1}$ under $\sigma$. For each $i\in\{2,\ldots,r\}$, we will have $|V_i|=|S_i|$ and embed the directed path $S_i$ into $G[V_i]$ using the ordering provided by $\sigma$.
As described at the start of this section, for each $i\in [r]$, we then find a short path $R_i$ from the last vertex of $V_i$ under $\sigma$ to the first vertex of $V_{i+1}$ under $\sigma$ which can `absorb' any subset of vertices from $U_i$ (see Claim~\ref{clm:Rismall}). We then embed the forests $F_i^+$, $F_i^-$, $i\in [r+1]$ and directed paths $Q_i$, $i\in [\ell]$, into $\cup_{i\in [r]}(U_i\setminus V(R_i))$, before incorporating the right number of vertices into each path $R_i$. More specifically, as depicted in Figure~\ref{fig:embedding}, for each $i\in [r]$, we will divide $U_i$ into six parts, $U_{i,1},\ldots,U_{i,6}$, again with carefully chosen sizes. The sets $U_{i,1}$ and $U_{i,6}$ will be small and covered by $R_i$ (aiding the desired `absorption' property of $R_i$).
We will embed $V(F_i^+)\setminus V(S_i)$ into $U_{i,2}\setminus V(R_i)$, using \ref{prop4} and that typical vertices in $V_i$ (the image of $S_i$) have plenty of out-neighbours in $U_{i,2}$ (see Claim~\ref{clm:manynbr}) and $V(R_i)$ is small. Similarly, we will embed $V(F_{i+1}^-)\setminus V(S_{i+1})$ into $U_{i,4}\setminus V(R_i)$ (see also Claim~\ref{clm:manynbr}). We will embed paths $Q_j$ satisfying \ref{prop8} using the appropriate set $U_{i,5}$ (see Claim~\ref{clm:connectUi3short}).
We will then embed paths $Q_j$ satisfying \ref{prop7} using different sets $U_{i,3}$ (see Claim~\ref{clm:connectUi3}).
As we chose the size of the sets $U_i$, $i\in [r]$, carefully, for each $i\in [r]$, we will then have the correct number of vertices unused in $U_i$ to absorb into $R_i$ and complete the embedding of $P_i$, and hence also the embedding of $T\subset D$.
\begin{lemma}\label{lem:embedgood} Let $1/n\ll \mu, 1/r,1/k$ and $m\geq \mu n$. Every tournament with $n+k-2$ vertices contains a copy of every $n$-vertex oriented tree with $k$ leaves which has an $(r,m)$-good decomposition.
\end{lemma}
\begin{proof} Note that we can additionally assume that $\mu\ll 1/r,1/k$. Let $G$ be an $(n+k-2)$-vertex tournament and suppose that the $n$-vertex tree $T$ with $k$ leaves has an $(r,m)$-good decomposition $D$ using the notation in Definition~\ref{def:gooddecomp}.
Let $k_0$ be the number of in-leaves of $S_1$ and let $k_1$ be the number of out-leaves of $S_{r+1}$. By \ref{prop5}, we have $k_0,k_1\geq 1$ and by \ref{prop6} we have $k_0+k_1\leq k$.
Let $I_1\subset [\ell]$ be the set of $i\in [\ell]$ satisfying \ref{prop7}. Let $I_2=[\ell]\setminus I_1$, so that, by \ref{prop78}, each $i\in I_2$ satisfies \ref{prop8}.
For each $i\in I_1$, using \ref{prop7}, let $q_i,r_i\in[r+1]$ with $q_i<r_i$ be such that $Q_i$ is a directed path from $F_{q_i}$ to $F_{r_i}$ with length $3(r_i-q_i)+1$. For each $i\in [r]$, let $a_i$ be the number of $j\in I_1$ for which $q_j\leq i<r_j$. For each $i\in I_2$, using \ref{prop8}, let $2\leq s_i\leq r$ be such that $Q_i$ is a directed path from $V(F_{s_i}^-)\setminus V(S_{s_i})$ to the last vertex of $S_{s_i}$. For each $i\in [r]$, let $b_i$ be the number of $j\in I_2$ with $s_j=i+1$ (and note that we always have $b_r=0$).
Let $\sigma=v_1,\ldots,v_{n+k-2}$ be a median order of $G$. Take in $v_1,\ldots, v_{n+k-2}$ consecutive disjoint intervals
\[
V_1,U_1,V_2,U_2,V_3,\ldots,V_r,U_{r},V_{r+1}
\]
such that $|V_1|=|S_1|+k_0-1$, $|V_{r+1}|=|S_{r+1}|+k_1-1$, and, for each $2\leq i\leq r$, $|V_i|=|S_i|$, and, for each $i\in [r]$,
\begin{equation}\label{Uisize}
|U_i|=|P_i|-2+|V(F^+_{i})\setminus V(S_i)|+|V(F^-_{i+1})\setminus V(S_{i+1})|+3a_i+2b_i\geq |P_i|-2\overset{\text{\ref{prop3}}}{\geq} 2000m-1 .
\end{equation}
Note that this is possible, as, by \ref{prop4} and \ref{prop5}, $|F^-_1|=|S_1|$ and $|F^+_{r+1}|=|S_{r+1}|$, so that, using \ref{prop4}, we have
\begin{align*}
\sum_{i=1}^{r+1}|V_i|&+\sum_{i=1}^{r}|U_i|=k_0+k_1-2+\sum_{i=1}^{r+1}|S_i|+\sum_{i=1}^{r}(|P_i|-2+|F^+_{i}|+|F^-_{i+1}|-|S_{i}|-|S_{i+1}|+3a_i+2b_i)\\
&\overset{\text{\ref{prop6}}}{\leq} k-2+|S_1|+|S_{r+1}|+\sum_{i=2}^{r}|S_i|+\sum_{i=1}^{r}(|P_i|-2)+\sum_{i=1}^{r+1}(|F^+_{i}|+|F^-_{i}|-2|S_{i}|)+\sum_{i\in [r]}(3a_i+2b_i)\\
&\overset{\eqref{eqn:Ppart}}{=}k-2+|S_1|+|S_{r+1}|+|P|-2+\sum_{i=1}^{r+1}(|F^+_{i}|+|F^-_{i}|-2|S_{i}|)+ 3\sum_{i\in I_1}(r_i-q_i)+2|I_2|\\
&=k-2+|P|+(|S_1|+|S_{r+1}|-2)+\sum_{i=1}^{r+1}|(V(F^+_{i})\cup V(F^-_i))\setminus V(S_i)|+ \sum_{i\in [\ell]}(|Q_i|-2)\\
&\overset{\text{\ref{prop2}}}=n+k-2.
\end{align*}
Next, for each $i\in [r]$, partition $U_i$ as intervals $U_{i,1},\ldots,U_{i,6}$ in that order such that
\begin{equation}\label{eqn:Uijsizes}
|U_{i,1}|=m,\;|U_{i,2}|=10m,\; |U_{i,4}|=110m,\;|U_{i,5}|=100m,\; |U_{i,6}|=m
\end{equation}
\begin{equation}\label{eqn:Ui3size}
\text{ and }|U_{i,3}|=|U_i|-222m\overset{\eqref{Uisize}}\geq 1700m.
\end{equation}
Note also, by \ref{prop4}, that, for each $i\in \{2,\ldots,r\}$,
\begin{equation}\label{eqn:Visize}
|V_i|=|S_i|\leq |F_i|\leq m.
\end{equation}
For each $i\in [r]$, let $U'_i$ be a subset of $U_i$ where each vertex is included uniformly at random with probability $\mu/20$. By Lemma~\ref{lm:basic_properties_of_median_orders}~ii) $v_1v_2\ldots v_{n+k-2}$ forms a directed path in that order, so there is a directed path from the last vertex of $V_i$ under $\sigma$ to the first vertex of $V_{i+1}$ under $\sigma$, whose vertex set covers $U_{i,1}\cup U'_i\cup U_{i,6}$ and whose vertex order is a suborder of $\sigma$. Let $R_i$ be a shortest such path. We now prove that, with positive probability, the `absorption property' we need for $R_i$ holds, as well as a bound on $|R_i|$.
\begin{claim}\label{clm:Rismall} With positive probability, for each $i\in [r]$, $|V(R_i)\setminus (U_{i,1}\cup U_{i,6})|\leq m$, so that $|R_i|\leq 3m$, and, for any $U\subset U_i\cup V(R_i)$ with $V(R_i)\subset U$, there is a directed path with the same start vertex and end vertex as $R_i$ but with vertex set $U$.
\end{claim}
\renewcommand\qedsymbol{$\boxdot$}
\begin{proof}[Proof of Claim~\ref{clm:Rismall}] Let $p=\mu/20$ and $i\in [r]$. Note that, by Lemma~\ref{chernoff}, as $|U_i|\leq n$ and $1/n\ll \mu,1/r$, we have, with probability at least $1-1/3r$ that $|U'_i|\leq 2pn$. For each $v\in U_i\setminus (U_{i,1}\cup U_{i,6})$, let $\mathbf{E}_v$ be the following event.
\begin{itemize}
\item[$\mathbf{E}_v$:] There are $u\in N^-(v)\cap U_i'$ and $u'\in N^+(v)\cap U_i'$ with $u<_\sigma v<_\sigma u'$.
\end{itemize}
Now, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), for each $v\in U_i\setminus (U_{i,1}\cup U_{i,6})$, we have
\[
|\{u\in N^-(v)\cap U_i:u<_\sigma v\}|\geq \frac{|\{u\in U_i:u <_\sigma v\}|}{2}\geq \frac{|U_{i,1}|}{2}\overset{\eqref{eqn:Uijsizes}}{=} \frac{m}{2},
\]
and
\[
|\{u\in N^+(v)\cap U_i:u>_\sigma v\}|\geq \frac{|\{u\in U_i:u >_\sigma v\}|}{2}\geq \frac{|U_{i,6}|}{2}\overset{\eqref{eqn:Uijsizes}}{=} \frac{m}{2},
\]
so that $\P(\mathbf{E}_v\text{ does not hold})\leq 2(1-p)^{m/2}\leq 2\exp(-pm/2)\leq 2\exp(-\mu^2 n/40)$. Therefore, as $1/n\ll \mu,1/r$, a union bound implies that, with probability at least $1-1/3r$, $\mathbf{E}_v$ holds for each $v\in U_i\setminus (U_{i,1}\cup U_{i,6})$. Thus, with probability at least 1/3, we have, for each $i\in [r]$, that $\mathbf{E}_v$ holds for each $v\in U_i\setminus (U_{i,1}\cup U_{i,6})$, and $|U'_i|\leq 2pn$. Assuming these events occur, we now prove that the property in the claim holds for each $i\in [r]$.
By Corollary~\ref{cor:last} and the minimality of $R_i$, any two vertices in $U_{i,1}\cup U_i'\cup U_{i,6}$ on $R_i$, with no vertices between them on $R_i$ from $U_{i,1}\cup U_i'\cup U_{i,6}$
have at most 1 vertex between them on $R_i$. As the vertices from $U_{i,1}\cup U_{i,6}$ form two intervals on $R_i$, just after the first vertex and just before the last vertex of $R_i$ respectively, $|V(R_i)\setminus (U_{i,1}\cup U_{i,6})|\leq 2+2|U_i'|+1\leq 4pn+3\leq m$.
Now, take any set $U\subset U_i\cup V(R_i)$ with $V(R_i)\subset U$. Let $R_U$ be a directed path with the same endvertices as $R_i$ which contains every vertex of $R_i$ in order according to $\sigma$ and for which $V(R_U)\subset U$, and which, under these conditions, has the maximum possible length. Note that this exists as $R_i$ itself satisfies these conditions. Suppose, for contradiction, that there is some $v\in U\setminus V(R_U)$. Note that $v\in U_i\setminus (U_{i,1}\cup U_{i,6})$. Let $\ell$ be the length of $R_U$ and label vertices so that $R_U=u_0u_1\ldots u_\ell$. As $\mathbf{E}_v$ holds and $U_i'\subset V(R_i)\subset V(R_U)$, we can take $j=\min\{j'\in \{0,1,\ldots,\ell\}:u_{j'}\in N^-(v)\}$ and find that $u_j<_\sigma v$. Let $j''\in \{0,1,\ldots,\ell\}$ be the smallest $j''>j$ such that $u_{j''}\in N^+(v)$.
Observe that, $u_{j''-1}\notin N^+(v)$, so that, as $G$ is a tournament, $u_{j''-1}\in N^-(v)$ and therefore
\[
u_0u_1\ldots u_{j''-1}vu_{j''}\ldots u_\ell,
\]
is a directed path with the same endvertices as $R_U$ (and hence $R_i$) which contains every vertex of $R_i$ in order according to $\sigma$. As this path has vertex set $\{v\}\cup V(R_U)\subset U$ and $v\notin V(R_U)$, this path contradicts the maximality of $R_U$. Thus, $V(R_U)=U$, so that $R_U$ is a directed path with the same endvertices as $R_i$ and with vertex set $U$, as required.
\end{proof}\renewcommand\qedsymbol{$\square$}
Assume then, that the property in Claim~\ref{clm:Rismall} holds. We now show three further claims, before embedding $T$. This embedding, annotated with which part of the embedding is done with each claim, is depicted in Figure~\ref{fig:embedding}. For each $i\in [r+1]$, we will use the following claim to embed the vertices in $V(F^+_i)\setminus V(S_i)$ to $U_{i,2}$ (if $i\neq r+1$) and embed the vertices in $V(F^-_{i})\setminus V(S_{i})$ to $U_{i-1,4}$ (if $i\neq 1$) so that they attach appropriately to an embedding of $S_i$ into the vertex set $V_i$.
\begin{figure}
\DiagramEmbedding
\vspace{-0.75cm}
\caption{Embedding an $(r,m)$-good decomposition (as depicted in Figure~\ref{fig:gooddecomp}) into a median order, with the claims used to embed each part.}\label{fig:embedding}
\end{figure}
\begin{claim}\label{clm:manynbr}
For each $i\in [r]$ and $v\in V_i$, we have $|N^+(v,U_{i,2})\setminus V(R_i)|\geq 3m$, and, for each $i\in [r]$ and $v\in V_{i+1}$, we have $|N^-(v,U_{i,4})\setminus V(R_i)|\geq 3m$.
\end{claim}
\renewcommand\qedsymbol{$\boxdot$}
\begin{proof}[Proof of Claim~\ref{clm:manynbr}] Let $i\in [r]$ and $v\in V_i$, and take $V_{i,v}=\{u\in V_i:u>_\sigma v\}$. By Lemma~\ref{lm:basic_properties_of_median_orders}~ii), we have that
\begin{align*}
|N^+(v,U_{i,2})|&\geq |N^+(v,V_{i,v}\cup U_{i,1}\cup U_{i,2})|-|V_{i,v}\cup U_{i,1}|\geq \frac{|V_{i,v}\cup U_{i,1}\cup U_{i,2}|}{2}-|V_{i,v}\cup U_{i,1}|\\
&=\frac{|U_{i,2}|-|V_{i,v}\cup U_{i,1}|}{2}\geq\frac{|U_{i,2}|-|V_{i}\cup U_{i,1}|}{2}\overset{\eqref{eqn:Uijsizes},\eqref{eqn:Visize}}{\geq} \frac{10m-m-m}{2}=4m.
\end{align*}
Therefore, by the property from Claim~\ref{clm:Rismall}, $|N^+(v,U_{i,2})\setminus V(R_i)|\geq |N^+(v,U_{i,2})|-(|R_i|-|U_{i,1}|-|U_{i,6}|)\geq 3m$.
Let then $i\in [r]$ and $v\in V_{i+1}$ and let $V'_{i+1,v}=\{u\in V_{i+1}:u<_\sigma v\}$. By Lemma~\ref{lm:basic_properties_of_median_orders}~ii), we have similarly that
\begin{align*}
|N^-(v,U_{i,4})|&\geq |N^-(v,V'_{i+1,v}\cup U_{i,4}\cup U_{i,5}\cup U_{i,6})|-|V'_{i+1,v}\cup U_{i,5}\cup U_{i,6}|\\
&\geq \frac{|U_{i,4}|-|V'_{i+1,v}\cup U_{i,5}\cup U_{i,6}|}{2}\overset{\eqref{eqn:Uijsizes},\eqref{eqn:Visize}}{\geq}\frac{110m-100m-m-m}{2}=4m.
\end{align*}
Therefore, by the property from Claim~\ref{clm:Rismall} again, $|N^-(v,U_{i,4})\setminus V(R_i)|\geq |N^-(v,U_{i,4})|-(|R_i|-|U_{i,1}|-|U_{i,6}|)\geq 3m$.
\end{proof}\renewcommand\qedsymbol{$\square$}
We will use the following claim, for each $i\in I_2$, to embed the path $Q_i$ when its first and last vertex have already been embedded into $U_{s_i-1,4}$ and $V_{s_i}$ respectively.
\begin{claim}\label{clm:connectUi3short}
For each $2\leq j\leq r$, $v\in U_{j-1,4}$, $w\in V_{j}$ and $U\subset U_{j-1,4}\cup U_{j-1,5}$ with $|U|\leq2m$, there is a directed $v,w$-path in $G$ with length 3 and internal vertices in $(U_{j-1,4} \cup U_{j-1,5})\setminus (U\cup V(R_{j-1}))$.
\end{claim}
\renewcommand\qedsymbol{$\boxdot$}
\begin{proof}[Proof of Claim~\ref{clm:connectUi3short}]
Let $A_{j,v,w,U}=\{u\in U\cup V(R_{j-1})\cup V_{j}:v<_\sigma u <_\sigma w\}$ , and note that, by~\eqref{eqn:Visize} and the choice of $R_i$ according to Claim~\ref{clm:Rismall}, $|A_{j,v,w,U}|\leq 6m$. The number of vertices between $v$ and $w$ in $\sigma$ is at least $|U_{j-1,5}|+|U_{j-1,6}|=101m> 6|A_{j,v,w,U}|+8$. Therefore, by Lemma~\ref{lm:connecting_path_length_3}, there is a directed $v,w$-path in $G$ with length 3 and internal vertices in $\{u\notin A_{j,v,w,U}:v<_\sigma u <_\sigma w\}$. Because $U_{j-1,6}\subseteq V(R_{j-1})$, we have $\{u\notin A_{j,v,w,U}:v<_\sigma u <_\sigma w\}\subset (U_{j-1,4} \cup U_{j-1,5})\setminus (U\cup V(R_{j-1}))$, and so the claim holds.
\end{proof}\renewcommand\qedsymbol{$\square$}
For each $i\in [6]$, let $U_{0,i}=U_{r+1,i}=\emptyset$, and note that, by \ref{prop4} and \ref{prop6}, $|V_1|,|V_{r+1}|\leq m+k\leq 2m$. For each $i\in [r+1]$, let $\bar{V}_i=U_{i-1,4}\cup U_{i-1,5}\cup U_{i-1,6}\cup V_i\cup U_{i,1}\cup U_{i,2}$, and note that, by \eqref{eqn:Uijsizes} and \eqref{eqn:Visize}, $|\bar{V}_i|\leq 225m$. Note that $\bar{V}_1U_{1,3}\bar{V}_2U_{2,3}\ldots \bar{V}_rU_{r,3}\bar{V}_{r+1}$ are consecutive intervals in $\sigma$.
We will use the following claim, for each $i\in I_1$, to embed the path $Q_i$ when its first and last vertex have already been embedded into $\bar{V}_{q_i}$ and $\bar{V}_{r_i}$ respectively.
\begin{claim}\label{clm:connectUi3}
For each $1\leq i<j\leq r+1$, $v\in \bar{V}_i$, $w\in \bar{V}_j$ and $U\subset V(G)$ with $|U|\leq m$, there is a directed $v,w$-path in $G$ with length $3(j-i)+1$ and exactly 3 vertices in each set $U_{i',3}\setminus (U\cup V(R_{i'}))$, $i\leq i'<j$.
\end{claim}
\renewcommand\qedsymbol{$\boxdot$}
\begin{proof}[Proof of Claim~\ref{clm:connectUi3}]
First we will choose vertices $u_{i'}$, $i\leq i'<j$ between $u_{i-1}:=v$ and $w$ in the median order, with $u_{j-1}w\in E(G)$ before carefully applying Lemma~\ref{lm:connecting_path_length_3} to each consecutive pair of vertices in $v,u_i,u_{i+1},\ldots,u_{j-1}$ to get, together with $u_{j-1}w$, a $v,w$-path with length $3(j-i)+1$.
To do this, first, for each $i'$, $i\leq i'\leq j-2$, let $u_{i'}$ be the last vertex in $U_{i',3}\setminus (U\cup V(R_{i'}))$ under $\sigma$. Let $U'_{j-1,3}$ be the set of the last $250m$ vertices of $U_{j-1,3}$ under $\sigma$, and let $\bar{V}_{j,w}=\{w'\in \bar{V}_j:w'<_\sigma w\}$, so that $|\bar{V}_{j,w}|\leq |\bar{V}_j|\leq 225m$. Note that, by Lemma~\ref{lm:basic_properties_of_median_orders}~ii), we have
\begin{align*}
|N^-(w,U'_{j-1,3})\setminus (U\cup V(R_{j-1}))|&\geq |N^-(w,\bar{V}_{j,w}\cup U'_{j-1,3})|-|\bar{V}_{j,w}|-|U\cup V(R_{j-1})|\\
&\geq \frac{|U'_{j-1,3}|-|\bar{V}_{j,w}|}{2}-|U\cup V(R_{j-1})|\geq\frac{250m-225m}{2}-4m>0.
\end{align*}
Let $u_{j-1}$ then be the last vertex of $N^-(w,U_{j-1,3})\setminus (U\cup V(R_{j-1}))$ under $\sigma$, noting that there are fewer than $250m$ vertices in $U_{j-1,3}$ after $u_{j-1}$ under $\sigma$. Let $u_{i-1}=v$.
For each $i\leq i'<j$, we will show there exists a directed $u_{i'-1},u_{i'}$-path $T_{i'}$ with length 3 and internal vertices in $U_{i',3}\setminus (U\cup V(R_{i'}))$. Noting that $T_{i}T_{i+1}\ldots T_{j-1}w$ is a directed path with length $3(j-i)+1$ and exactly three vertices in each set $U_{i',3}\setminus (U\cup V(R_{i'}))$, $i\leq i'<j$, will then complete the proof of the claim.
Let then $i\leq i'<j$ and let $A_{i'}=\{u\in U_{i'-1,3}\cup \bar{V}_{i'}\cup ((U\cup V(R_{i'}))\cap U_{i',3}):u_{i'-1}<_\sigma u<_\sigma u_{i'}\}$. Note that, for each $i\leq i'<j$, by the choice of $u_{i'}$ there are at most $|U\cup V(R_{i'-1})|\leq 4m$ vertices after $u_{i'-1}$ in $U_{i'-1,3}$ under $\sigma$, so $|A_{i'}|\leq 4m+225m+|U\cup V(R_{i'})|\leq 233m$. In addition, recall that there are fewer than $250m$ vertices in $U_{j-1,3}$ after $u_{j-1}$ under $\sigma$. Therefore, by \eqref{eqn:Ui3size}, for each $i\leq i'<j$, there are at least $1700m-250m> 6|A_{i'}|+8$ vertices in $U_{i',3}$ before $u_{i'}$ under $\sigma$. So, by Lemma~\ref{lm:connecting_path_length_3}, there is a directed $u_{i'-1},u_{i'}$-path $T_{i'}$ with length 3 and internal vertices in $\{u\notin A_{i'}:u_{i'-1}<_\sigma u <_\sigma u_{i'}\}\subset U_{i',3}\setminus (U\cup V(R_{i'}))$, as required.
\end{proof}
\renewcommand\qedsymbol{$\square$}
We are now ready to embed the $(r,m)$-good decomposition $D$ into $G$, as follows. Begin with the empty embedding $\phi:\emptyset\to V(G)$. For each $2\leq i\leq r$, recalling that $|V_i|=|S_i|$, extend $\phi$ to embed the directed path $S_i$ onto the vertices in $V_i$ in the order given by $\sigma$. Note that the vertices of each interval $V_i$ form a directed path in this order by Lemma~\ref{lm:basic_properties_of_median_orders}~ii).
Let $x'$ be the last vertex of $V_1$ under $\sigma$, and let $y'$ be the first vertex of $V_{r+1}$ under $\sigma$. Recall that $P$, as defined in \eqref{eqn:Ppart}, is a directed $x,y$-path, $S_1$ is an in-arboresence with $k_0$ in-leaves and root $x$, and $S_{r+1}$ is an out-arboresence with $k_1$ out-leaves and root $y$. Therefore, as $|V_1|=|S_1|+k_0-1$ and $|V_{r+1}|=|S_{r+1}|+k_1-1$, by Theorem~\ref{thm:DH} (applied twice, once with directional duality) we can extend $\phi$ to embed $S_1$ into $V_1$ such that $\phi(x)=x'$ and embed $S_{r+1}$ into $V_{r+1}$ such that $\phi(y)=y'$.
Now, for each $i\in [r+1]$ and $v\in V(S_i)$, let $F_v^-$ be the component of $F_i^-$ containing $v$ and let $F_v^+$ be the component of $F_i^+$ containing $v$. For each vertex $v\in V(S_i)$ in increasing order of $\phi(v)$ under $\sigma$, greedily and disjointly extend $\phi$ to embed $F_v^--v$ into $N^-(\phi(v),U_{i-1,4})\setminus V(R_{i-1})$ and $F_v^+-v$ into $N^+(\phi(v),U_{i,2})\setminus V(R_{i})$.
Note this is possible for each $v\in V(S_i)$ as, by \ref{prop5}, if $|E(F_v^-)|>0$, then $i\geq 2$ and thus, by Claim~\ref{clm:manynbr},
\begin{align*}
|N^-(\phi(v),U_{i-1,4})\setminus (V(R_{i-1})\cup (\cup_{u\in V(S_i):\phi(u)<_\sigma \phi(v)} \phi (F_u^-)))|&\geq 3m-(|F_i^-|-|V(F_v^-)\setminus\{v\}|)\\
&\overset{\text{\ref{prop4}}}{\geq} 3|V(F_v^-)\setminus\{v\}|,
\end{align*}
so that a copy of $F_v^--v$ in $N^-(\phi(v),U_{i-1,4})\setminus (V(R_{i-1})\cup (\cup_{u\in V(S_i):\phi(u)<_\sigma \phi(v)} \phi (F_u^-)))$ exists by Theorem~\ref{cor:3n-3}. Similarly, for each $v\in V(S_i)$, this is also possible for $F_v^+-v$.
For each $i\in [\ell]$, say that $Q_i$ is a directed path from $x_i$ to $y_i$. For each $i\in[\ell]$ in turn, extend $\phi$ to cover $V(Q_i)\setminus \{x_i,y_i\}$, by doing the following.
\begin{itemize}
\item If $i\in I_1$, recall that $q_i,r_i$ are such that $Q_i$ is a directed path from $F_{q_i}$ to $F_{r_i}$ with length $3(r_i-q_i)+1$, where $q_i<r_i$, and note that $\phi(x_i)\in \phi(V(F_{q_i}))\subset \bar{V}_{q_i}$ and $\phi(y_i)\in \phi(V(F_{r_i}))\subset \bar{V}_{r_i}$. Embed $Q_i$ as a directed $\phi(x_i),\phi(y_i)$-path with length $3(r_i-q_i)+1$ and exactly three vertices in $U_{i',3}\setminus (V(R_{i'})\cup (\cup_{j\in [i-1]}\phi(V(Q_j))))$, for each $q_i\leq i'<r_i$. Note that this is possible, by Claim~\ref{clm:connectUi3}, as when we look for such a path we have $|\cup_{j\in [i-1]}\phi(V(Q_i))|\leq \ell\cdot (3r+2)\leq m$ as $\ell\leqslant2r$, $1/n\ll \mu\ll 1/r$ and $m\geq \mu n$.
\item If $i\in I_2$, recall that $2\leq s_i\leq r$ is such that $Q_i$ is a directed path with length 3 from $V(F_{s_i}^-)\setminus V(S_{s_i})$ to the last vertex of $S_{s_i}$, and note that $\phi(x_i)\in \phi(V(F_{s_i}^-)\setminus V(S_{s_i}))\subset U_{s_i-1,4}$ and $\phi(y_i)\in \phi(V(S_{s_i}))\subset V_{s_i}$. Embed $Q_i$ as a directed path with length 3 from $\phi(x_i)$ to $\phi(y_i)$ with interior vertices in $(U_{s_i-1,4}\cup U_{s_i-1,5})\setminus (\phi(V(F_{s_i}^-))\cup (\cup_{j\in [i-1]}\phi(V(Q_j)))\cup V(R_{s_i-1}))$. Note that this possible, by Claim~\ref{clm:connectUi3short}, as when we look for such a path we have, by \ref{prop4}, $|\phi(V(F_{s_i}^-))|+|\cup_{j\in [i-1]}\phi(V(Q_j))|\leq m+\ell\cdot (3r+2)\leqslant2m$.
\end{itemize}
Finally, we extend $\phi$ to cover the internal vertices of $P_i$, for each $i\in [r]$. For each $i\in [r]$, let $U''_i=\bigl(V(R_i)\cup U_i\bigr)\setminus \phi\bigl(V(F^+_{i})\cup V(F^-_{i+1})\cup (\cup_{j\in [\ell]}V(Q_j))\bigr)$. Note that $V(R_i)\cup U_i$ contains exactly the vertices in $U_i$ and the endvertices of $R_i$. Therefore,
\begin{align*}
|U''_i|&=|U_i|+2-(|F^+_{i}|-|S_{i}|)-(|F^-_{i+1}|-|S_{i+1}|)-3|\{j\in I_1:q_j\leq i<r_j\}|-2|\{j\in I_2:s_j=i+1\}|\\
&\overset{\eqref{Uisize}}=(|P_i|+3a_i+2b_i)-3a_i-2b_i=|P_i|.
\end{align*}
By Claim~\ref{clm:Rismall}, for each $i\in [r]$, there is a directed path between the endvertices of $R_i$ with vertex set $U''_i$. Using these paths, for each $i\in [r]$, extend the embedding $\phi$ to cover $P_i$, for each $i\in [r]$. This completes the embedding $\phi$ of $D=P\cup S_1\cup S_{r+1}\cup (\cup_{i\in [r+1]} F_i)\cup (\cup_{i\in [\ell]}Q_i)$, and hence, by \ref{prop1}, $G$ contains a copy of $T$.
\end{proof}
\subsection{Proof of Theorem~\ref{thm:fewcst}}\label{subsec:final}
Given Lemmas~\ref{lem:gooddecomp} and~\ref{lem:embedgood}, it is now straight-forward to prove Theorem~\ref{thm:fewcst}.
\begin{proof}[Proof of Theorem~\ref{thm:fewcst}] Note that, due to the result of Thomason~\cite{THO} quoted in the introduction, we may assume that $k\geq 3$.
Let $n_0$ and $\mu$ be such that $1/n_0\ll \mu\ll 1/k$. Let $T$ be a tree with $n\geq n_0$ vertices and $k$ leaves, and let $G$ be a tournament with $n+k-2$ vertices.
If there are no vertices $x$ and $y$ with degree 2 in $T$ and a bare $x,y$-path $P$ with length at least $\mu n$ with first and last block of length 1, then, by Lemma~\ref{lem:gooddecomp}, $T$ has an $(r,m)$-good decomposition for some $m\geq \mu n$ and $r\leq 10k$. In this case, then, by Lemma~\ref{lem:embedgood}, $G$ contains a copy of $T$. Thus, we can assume that $T$ contains vertices $x$ and $y$ with degree 2 in $T$ and a bare $x,y$-path $P$ with length at least $\mu n$ with first and last block of length 1.
Suppose first, that $k=3$. Note that in this case $P$ must lie in a maximal bare path of $T$ with one endvertex that is a leaf. Say this leaf is $z$, and assume, by relabelling $x$ and $y$ if necessary, that the path, $Q$ say, from $x$ to $z$ in $T$ contains $y$ (and hence $P$). Let $T'=T-(V(Q)\setminus\{x\})$.
Noting that $x$ is a leaf of $T'$, duplicate $x$ to get the tree $T''$ with the new leaf $x'$. Note that $T''$ has $4$ leaves and $|T|-|Q|+2\leq n-\mu n+1$ vertices. Therefore, by Theorem~\ref{thm:fewlinear}, as $1/n\ll\mu,1/k$, $G$ contains a copy of $T''$, $S''$ say. Let $s$ and $s'$ be the copy of $x$ and $x'$ in $S''$ respectively. Note that $|G-(V(S'')\setminus\{s,s'\})|=n+1-(n-|Q|)=|Q|+1$. By Theorem~\ref{thm:appending_non-directed_path}, there is a copy, $Q'$ say, of $Q$ with $x$ embedded to $\{s,s'\}$. Then $S''\cup Q'$ gives a copy of $T$.
Therefore, we have that $k\geq4$. In this case, let $T'=T-(V(P)\setminus\{x,y\})$. Noting that $x$ and $y$ are leaves of $T'$, create $T''$ by duplicating $x$ and $y$ to get the new vertices $x'$ and $y'$ respectively, and adding the edge $xy$. Note that $T''$ has $k+2$ leaves and $|T|-|P|+4\leq n-\mu n+3$ vertices.
Therefore, by Theorem~\ref{thm:fewlinear}, as $1/n\ll \mu, 1/k$, $G$ contains a copy of $T''$, $S''$ say. Let $s,s',t$ and $t'$ be the copy of $x,x',y$ and $y'$ in $S''$ respectively. Note that $|G-(V(S'')\setminus\{s,s',t,t'\})|=n+k-2-(n-|P|)=|P|+k-2\geq |P|+2$.
By Theorem~\ref{thm:connecting_non-directed_paths}, there is a copy, $P'$ say, of $P$ with $x$ embedded to $\{s,s'\}$ and $y$ embedded to $\{t,t'\}$. Observing that $S''\cup P'$ contains a copy $T$ completes the proof that $G$ contains a copy of $T$ in this case.
\end{proof}
\bibliographystyle{abbrv}
|
\section{Introduction}
The absence of shear stiffness is one of key physical-mechanical properties of equilibrium classical liquids distinguishing liquids from solids~\cite{Frenkel_book,Bol_Phys_Enciclopedy,Phys_Enc}. This property is manifested in the inability of liquids to maintain a definite volume form if there are no boundary surfaces and the ability to take the shape of a filled vessel. The absence of shear stiffness is also manifested in the fact that in contrast to crystalline and amorphous solids, liquids are unable to support the propagation of transverse (so-called shear) oscillation processes~\cite{Trachenko2016,Tareyeva2018}. In fact, everything occurs for equilibrium classical liquids on that way only under conditions close to hydrodynamic, when we consider macroscopic spatial scales and sufficiently large observation times in corresponding experiments. Thus, for example, in the case of a high-frequency shear-deformation perturbation under the action of a varying force, a high-density liquid demonstrates an elastic response typical for solids. This is clearly seen in experiments measuring the frequency-dependent shear modulus~\cite{hypersound_experiments}. Such a reaction of a liquid to a perturbation is fully rather understandable: in simple liquids, this reaction is most clear expressed when external mechanical excitation has a time scale $\tau'$ (where $\tau' = 2\pi/\omega'$ and $\omega'$ is the excitation frequency) comparable to the structural relaxation time $\tau_s$. Moreover, transverse oscillatory processes typical for solids can be manifested in the collective dynamics of particles of a high-density liquid at \textit{microscopic spatial scales}. In this case, the manifestation of microscopic shear stiffness is due to the action of \textit{effective attractive forces} in the interaction between particles of liquid, and the spatial scale $l_g$ at which liquid quasistiffness is manifested must be determined by the size of the action region of these forces.
The existence of propagating shear waves in compressed noble gases (so-called Lennard-Jones liquids in the general case) near the triple point was first confirmed using methods for modeling equilibrium molecular dynamics~\cite{Levesque/Verlet_1973,Sjogren1978}. The spectra of the computed spectral density $C_T(k,\omega)$ of transverse molecule current for wave numbers $k$ corresponding to spatial scales of several effective linear sizes of the molecule turned out to contain in expressed component in the terahertz region with a maximum at the frequency $\omega_c^{(T)} \neq 0$~\cite{Levesque/Verlet_1973}. The dependence of $\omega_c^{(T)}$ on the wave number $k$ produces a dispersion relation $\omega_c^{(T)}(k)$ characterizing the propagation of transverse oscillatory processes in a liquid. As a rule, there is a \textit{gap} with zero values of $\omega_c^{(T)}$ in the dispersion law $\omega_c^{(T)}(k)$ in the domain of small wave numbers $k$. Obviously, the size $k_g$ of this gap must be related to the spatial scale $l_g$ at which a quasistiff shear response is manifested in a liquid.
The methods of classical and quantum mechanical molecular dynamics simulations still remain the most appropriate tool for directly quantitatively estimating almost all effects related to the shear oscillation dynamics of molecules in both model~\cite{Donko,Khrapak2019,Ryltsev2013} and real liquids (see, e.g.,~\cite{Gonzalez2017,Jakse/Bryk2019,Jones2016,Fomin2019,Wang2019}). Although direct experimental measurements are difficult, some indirect information about shear waves in high-density liquids can be obtained from inelastic neutron scattering (INS) and inelastic x-ray scattering (IXS) experiments~\cite{Hosokawa_2015}. In particular, effects due to the transverse oscillation dynamics of particles can be manifested in the contour of the dynamic structure factor $S(k,\omega)$ measured in INS and IXS experiments~\cite{Egelstaff_book,Burkel_review}.
We note that key components (a central Rayleigh and two symmetric Brillouin components) of the scattering law in a liquid at microscopic spatial scales accessible by INS and IXS experimental techniques are not separated, and the contribution to the general scattering law $S(k,\omega)$ due to transverse oscillation dynamics is weakly expressed and is not recognized in the form of a separate component. Features typical for transverse oscillatory processes must obviously appear in the spectra $S(k,\omega)$ in a frequency range between the Rayleigh and Brillouin peaks. In fact, only continuations of the Brillouin and Rayleigh peaks are observed in the experimental spectra $S(k,\omega)$ in this frequency range. Consequently, directly interpreting the experimental data is complicated, and the resulting conclusions from this interpretation can be ambiguous~\cite{Hosokawa_Ga,Hosokawa2013,Monaco_PNAS,Monaco_PRB}.
We mention some currently well-known theoretical models and approaches connected with describing transverse collective dynamics: the viscoelasticity model~\cite{MacPhail/Kivelson,Bryk_PRE2000}, the generalized collective mode method~\cite{Mryglod_CMP1994}, the Maxwell-Frenkel model for describing the dispersion relation of transverse collective modes~\cite{Trachenko2017,Baggioli2020}, and the approach for recovering the dispersion dependences of longitudinal and transverse collective modes based on separate and joint mode analysis (the ``two oscillator model'')~\cite{Yurchenko2019,Yurchenko_SC_2019,Yurchenko_1}. It is also remarkable that the presence of transverse excitations can lead to the appearance of so-called positive dispersion of longitudinal sound: the observed/measured speed of sound in a certain range of finite wave numbers is higher than the hydrodynamic values~\cite{Fomin_JPCM_2016,Brazhkin_2018}.
Here, we show that the transverse collective dynamics in simple liquids can be described in the framework of a self-consistent relaxation theory. This theoretical description is a direct development of the idea of the time-scale invariance of relaxation processes in liquids~\cite{Mokshin_PRE2001,Mokshin2002}, based on which a theory of local density fluctuations in liquids was developed and the use of this theory for analyzing INS and IXS experimental data was demonstrated in liquid lithium~\cite{Mokshin_JPCM2018}, sodium~\cite{Mokshin_JPCM2003,Mokshin_JCP2004}, cesium~\cite{Mokshin_PRE2001,Mokshin2002}, aluminum~\cite{Mokshin_JETP2006, Mokshin_JPCM2007}, and gallium~\cite{Khusnutdinoff2020}. We present the theoretical formalism in Sec.~\ref{sec: theory} and compare the theoretical results with data from equilibrium atomic dynamics simulations of liquid lithium in Sec.~\ref{sec: comparison}.
\section{Theoretical formalism \label{sec: theory}}
In the framework of the general statistical mechanics approach, we can regard an equilibrium liquid as a multiparticle system, an ensemble of atoms and molecules~\cite{Ryzhov_UFN2008}. In this case, it is convenient to use the mathematical apparatus of correlation functions, distribution functions, moments, and cumulants of these functions to describe both structural and dynamical properties of this liquid~\cite{Hansen/McDonald,Zwanzig2001,Mokshin/Yulmetyev,Klumov}.
We consider an isotropic system comprising $N$ identical classical particles of mass $m$ in a volume $V$. The coordinates $\mathbf{r}_j$ and velocities $\mathbf{v}_l$, $j,\,l = 1,\, \ldots,\, N$, of these particles determine a $6N$-dimensional phase space, where we can define a certain dynamical variable $A(\mathbf{r}_1,\, \ldots,\, \mathbf{r}_N,\, \mathbf{v}_1,\, \ldots,\, \mathbf{v}_N)$. Let the system Hamiltonian $H$ be given. We can then determine the mean $\left \langle A \right \rangle$ in terms of the phase space density distribution $\rho \propto \exp\{-(H-\mu N)/(k_BT)\}$, where $T$ and $\mu$ are the temperature and chemical potential. Moreover, the Hamiltonian $H$ determines the evolution of the dynamical variable $A$:
\begin{equation}\label{43}
\frac{\partial}{\partial t} A(t) = \left \{ H, A(t) \right \} = i\hat{\mathcal{L}}A(t),
\end{equation}
where $\{...\}$ is Poisson bracket, $\hat{\mathcal{L}}$ is the Liouville operator, which is Hermitian~\cite{Zwanzig2001,Balucani2003}. In the case where the interaction potential $u(r)$ between particles is pairwise and spherical, we can write the Liouville operator in the form
\begin{equation}\label{5}
\hat{\mathcal{L}} = -i\left\{ \frac{1}{m}\sum_{j=1}^{N} \left ( \mathbf{p}_j\cdot\nabla_j \right ) - \sum_{l>j=1}^{N}\nabla_ju(r_{jl}) \left ( \nabla_{\mathbf{p}_{j}}-\nabla_{\mathbf{p}_{l}} \right ) \right\}.
\end{equation}
where $\mathbf{p}_{j}$ is the momentum of the $j$th particle and $\nabla_j$ and $\nabla_{\mathbf{p}_{j}}$ are the coordinate and momentum gradients.
\subsection{Dynamical variables \label{sec: Dyn_var}}
Let the particle current occur in some region of the inverse space of the wave vectors $\textbf{k}$ and be determined by the velocities of all particles belonging to that region. We can write the expression for the full particle current
\begin{eqnarray}\label{44}
\textbf{j}_{k}(t) = \sum_{l=1}^{N} \textbf{v}_{l}(t) \; \mathrm{e}^{-i \textbf{k}\cdot \textbf{r}_{l}(t)},
\end{eqnarray}
where $k = \left | \textbf{k} \right |$ is the wave number and $\textbf{r}_{l}(t)$ is the radius vector characterizing the trajectory of the $l$th particle. Assuming that the wave vector $\textbf{k}$ is directed along the coordinate axis $OZ$, we can introduce the corresponding expressions for the longitudinal current
\begin{eqnarray}\label{45}
j_{k}^{(z)}(t) = \sum_{l=1}^{N} v_{l}^{(z)}(t)\; \mathrm{e}^{-i\textbf{k}\cdot \textbf{r}_{l}(t)}
\end{eqnarray}
and the transverse current
\begin{eqnarray}\label{46}
j_{k}^{(x)}(t) = \sum_{l=1}^{N} v_{l}^{(x)}(t)\; \mathrm{e}^{-i\textbf{k}\cdot \textbf{r}_{l}(t)},
\end{eqnarray}
and
\begin{eqnarray}\label{46}
j_{k}^{(y)}(t) = \sum_{l=1}^{N} v_{l}^{(y)}(t)\; \mathrm{e}^{-i\textbf{k}\cdot \textbf{r}_{l}(t)},
\end{eqnarray}
where $v^{(x)}$, $v^{(y)}$ and $v^{(z)}$ are the velocity components for the $l$th particle, $\mathbf{v}_l = v_l^{(x)}\mathbf{i_1} + v_l^{(y)}\mathbf{i_2} + v_l^{(z)}\mathbf{i_3}$ and $\textbf{j}_{k} = j_{k}^{(x)}\mathbf{i_1} + j_{k}^{(y)}\mathbf{i_2} + j_{k}^{(z)}\mathbf{i_3} $. The quantities $j_{k}^{(z)}$, $j_{k}^{(x)}$ and $j_{k}^{(y)}$ and similarly for $\textbf{j}_{k}$ have the meaning of dynamical variables characterizing the collective dynamics of the multiparticle system. The transverse current components $j_{k}^{(x)}$ and $j_{k}^{(y)}$ in a structurally isotropic system (dense gases, liquids, amorphous solids) are obviously equal.
It is convenient in considering transverse collective dynamics to choose the transverse current $A_1^T$ as initial dynamical variable:
\begin{equation}
A_1^T(k) = j_{k}^{(x)}= j_{k}^{(y)}.
\label{eq: initial_dyn_var}
\end{equation}
Using the orthogonalization procedure~\cite{Reed_Book}
\begin{eqnarray} \label{eq: orthogonal}
A_{l+1}^T(k) &=& i\hat{\mathcal{L}}A_l^T(k)+ \frac{\left \langle \left | A_{l+1}^T(k) \right |^2 \right \rangle}{\left \langle \left | A_{l}^T(k) \right |^2 \right \rangle} A_{l-1}^T(k), \\
l &=& 1,\; 2,\; 3,...; \ \ A_{0}^T \equiv 0, \nonumber
\end{eqnarray}
we obtain the set
\begin{equation} \label{eq: set_var}
\textbf{A}^T(k) = \left\{A_1^T(k),\; A_2^T(k),\; A_3^T(k),\; \ldots,\; A_l^T(k),\; \ldots \right\},
\end{equation}
of dynamical variables satisfying the orthonormalization condition
\begin{eqnarray} \label{eq: orthonorm}
\left \langle A_{i}^T(-k)A_j^T(k) \right \rangle &=& \delta_{i,j}\left \langle \left | A_j^T(k) \right |^2 \right \rangle, \\
i,\;j &=& 1,\; 2,\; 3,\; \ldots. \nonumber
\end{eqnarray}
where the angle brackets denote averaging over the statistical ensemble and $\delta_{i,j}$ is the Kronecker symbol.
It follows from expressions~(\ref{eq: initial_dyn_var}) and (\ref{eq: orthogonal}) that the dynamical variable $A_2^T(k)$ is related to the acceleration
and kinetic energy in the transverse collective particle dynamics:
\begin{equation}
\label{eq: A2}
A_2^T(k) = \sum_{l=1}^{N} \dot{v}_l^{(x)}\; \mathrm{e}^{-i\mathbf{k}\cdot\mathbf{r}_l} - i \sum_{l=1}^{N} k_x \left (v_l^{(x)}\right )^2\; \mathrm{e}^{-i\mathbf{k}\cdot\mathbf{r}_l},
\end{equation}
For the third dynamical variable, we obtain
\begin{eqnarray}
\label{eq: A3}
A_3^T(k) &=& \sum_{l=1}^{N} \ddot{v}_l^{(x)}\; \mathrm{e}^{-i\mathbf{k}\cdot\mathbf{r}_l} - 3i \sum_{l=1}^{N} k_x \dot{v}_l^{(x)} v_l^{(x)}\; \mathrm{e}^{-i\mathbf{k}\mathbf{r}_l} \nonumber \\
&-& \sum_{l=1}^{N} k_x^2 \left ( v_l^{(x)}\right )^3\; \mathrm{e}^{-i\mathbf{k}\cdot\mathbf{r}_l}
+ \frac{\left \langle \left | A_{2}^T(k) \right |^2 \right \rangle}{\left \langle \left | A_{1}^T(k) \right |^2 \right \rangle} \; \sum_{l=1}^{N} {v}_l^{(x)}\; \mathrm{e}^{-i\mathbf{k}\cdot \mathbf{r}_l}.
\end{eqnarray}
The dynamic variable $A_3^T(k)$ characterizes the change in the particle acceleration.
\subsection{Correlation functions, frequency moments, and relaxation parameters}
We define time correlation functions (TCFs) for the set $\textbf{A}^T(k)$ of dynamical variables:
\begin{equation}
\label{eq: TCF}
M_{l}^T(k, t) = \frac{\left \langle A_{l}^T (-k,0) A_{l}^T(k, t) \right \rangle}{\left \langle \left | A_{l}^T(k, 0) \right |^2 \right \rangle}, \ \ \ l = 1,\; 2,\; \ldots ,
\end{equation}
where
\[
M_1^T(k,t) \equiv C_T(k,t).
\]
The TCFs $M_{l}^T(k, t)$ have the properties~\cite{Plakida2005,Lee2000}
\begin{subequations}\label{tq: TCF_prop}
\begin{equation}
M_{l}^T(k,t) \bigg|_{t=0} = 1, \label{eq: prop1}
\end{equation}
\begin{equation}
\left\{\begin{matrix} \text{ }\cfrac{d^{p}}{dt^p}M_{l}^T(k,t)\bigg|_{t=0} = 0, \text{$p$ is odd,}\\
\cfrac{d^{p}}{dt^p}M_{l}^T(k,t)\bigg|_{t=0} \neq 0, \text{$p$ is even,}
\end{matrix}\right. \label{eq: prop2}
\end{equation}
\begin{equation}
\left | M_{l}^T(k,t) \right |\leq 1, \label{eq: prop3}
\end{equation}
\begin{equation}
\lim_{t \rightarrow \infty} M_{l}^T(k, t) = 0. \label{eq: prop4}
\end{equation}
\end{subequations}
Properties~(\ref{eq: prop1}), (\ref{eq: prop2}) and (\ref{eq: prop3}) reveal that the TCF $M_{l}^T(k, t)$ takes its maximum value $1$ at the initial instant. Property~(\ref{eq: prop4}) is related to ergodicity and indicates that the correlation weakens with time.
The TCF of the transverse current is then
\begin{eqnarray}
\label{eq: CTCF}
M_1^T(k,t) = C_T(k,t) = \frac{\left \langle j_{-k}^{(x)}(0) j_{k}^{(x)}(t) \right \rangle}{\left \langle \left |j_{k}^{(x)}(0) \right | ^2 \right \rangle}.
\end{eqnarray}
This quantity is related to the spectral density of transverse current TCF by
\begin{eqnarray}
\label{eq: spectr_density_CTCF}
C_T(k,\omega) = \frac{1}{2\pi}\int_{-\infty}^{\infty} \; C_T(k,t)\; \mathrm{e}^{i\omega t}\;dt.
\end{eqnarray}
The quantity $\left \langle \left |j_{k}^{(x)}(0) \right | ^2 \right \rangle$ in~(\ref{eq: CTCF}) is equal to
\begin{equation}
\left \langle \left |j_{k}^{(x)}(0) \right | ^2 \right \rangle = \omega_T^{(0)}(k) = \frac{1}{N} \sum_{l=1}^N \left (v_l^{(x)} \right )^2 = \frac{k_BT}{m}.
\end{equation}
We define the frequency moments of the spectral density $C_T(k,\omega)$ as
\begin{eqnarray}
\label{eq: freq_moments}
\left \langle \omega_T^{(l)}(k) \right \rangle = \left ( -i \right )^l \left . \frac{d^l}{dt^l} C_T(k,t)\right |_{t=0} = \frac{\int_{-\infty}^{\infty}\omega ^l C_T(k, \omega)\;d\omega}{\int_{-\infty}^{\infty} C_T(k, \omega)\;d\omega}, \ \ \ l = 1,\;2,\;\ldots.
\end{eqnarray}
As follows from property~(\ref{eq: prop2}), only even frequency moments $\omega_T^{(2)}(k)$, $\omega_T^{(4)}(k)$, $\omega_T^{(6)}(k)$, $\ldots$ take nonzero values.
We introduce the frequency relaxation parameters
\begin{eqnarray}
\label{eq: freq_parameters}
\Delta_{T,\;l+1}^{2}(k) = \frac{\left \langle \left | A_{l+1}^T(k) \right |^2 \right \rangle}{\left \langle \left | A_{l}^T(k) \right |^2 \right \rangle}, \ \ \ l=1,\;2,\;3,\;\ldots.
\end{eqnarray}
The super- and subscripts $T$ mean that parameters are computed based on the dynamical variables related to the transverse dynamics, and the index $l$ is the order number of the parameter according to set $\mathbf{A}^T(k)$ of dynamical variables.
The parameters $\Delta_{T,\;l}^2(k)$ have the following properties~\cite{Mokshin_JPCM2018}.\footnote{The parameters $\Delta_{T,\;l}^2(k)$ are called static correlation functions in the Mori formalism~\cite{Balucani2003} and denote recursion coefficients in the M.H. Lee's recurrent relation method~\cite{Lee2000}.} First, the $l$th-order frequency relaxation parameter characterizes the relaxation time $\tau_{T,\;l}(k)$ of a process related to the dynamical variable $A_l^T(k)$:
\begin{equation}
\label{eq: relaxation_time}
\tau_{T,\;l}(k)=1/\sqrt{\Delta_{T,\;l}^2(k)}.
\end{equation}
Hence, for example, as follows from~(\ref{eq: initial_dyn_var}), (\ref{eq: A2}) and (\ref{eq: freq_parameters}), the frequency relaxation parameter $\Delta_{T,\;2}^2(k)$ in the short-wave limit related to free particle dynamics characterizes mean travel time of a particle at the spatial scale $\ell=2\pi/k$:
\begin{equation}
\tau_{T,\;2}(k) = 1/\sqrt{k_x^2 \; (k_BT)/m} = 1/\sqrt{(k_x \bar{v}_x)^2},
\end{equation}
where $k_x \equiv k$ and $\bar{v}_x$ is the mean velocity of the particle. This property was discussed in detail in paper~\cite{Mokshin2005}.
Secondly, the frequency relaxation parameters are related to the frequency moments~\cite{Mokshin2015}:
\begin{subequations}
\label{eq: Delta_vs_moments}
\begin{equation}\label{eq: Delta1}
\Delta_{T,\;2}^2(k) = \langle \omega_T^{(2)}(k) \rangle,
\end{equation}
\begin{equation}\label{eq: Delta2}
\Delta_{T,\;3}^2(k) = \frac{\langle \omega_T^{(4)}(k) \rangle}{\langle \omega_T^{(2)}(k) \rangle} - \langle \omega_T^{(2)}(k) \rangle,
\end{equation}
\begin{equation}\label{eq: Delta3}
\Delta_{T,\;4}^2(k) = \frac{\langle \omega_T^{(6)}(k) \rangle \langle \omega_T^{(2)}(k) \rangle - (\langle \omega_T^{(4)}(k) \rangle)^2}{\langle \omega_T^{(4)}(k) \rangle \langle \omega_T^{(2)}(k) \rangle - (\langle \omega_T^{(2)}(k) \rangle)^3}.
\end{equation}
\end{subequations}
\noindent
Expressions~(\ref{eq: Delta_vs_moments}) are also called the \textit{sum rules} of the spectrum~$C_T(k,\omega)$. The mathematical meaning of this property is that a unique set of frequency relaxation parameter values can be related to a particular form of the spectrum~$C_T(k,\omega)$. Consequently, the sum rules can be used to verify the correctness of a proposed theoretical model of the spectrum~$C_T(k,\omega)$. In this case, the frequency relaxation parameter values obtained based on some theoretical model are related to the parameter values obtained from the definition of the frequency moments by numerically computing the integral expressions for the frequency moments based on an experimental spectrum~$C_T(k,\omega)$ [see the second equality in (\ref{eq: freq_moments})].
Finally, as follows from~(\ref{eq: initial_dyn_var}), (\ref{eq: A2}) and (\ref{eq: A3}), the frequency relaxation parameters can be expressed in terms of microscopic characteristics of the system, such as the mean particle velocity, the interaction potential between particles, and particle distribution functions~\cite{Balucani2003}. Hence, for example, in the case of the set of dynamical variables defined by~(\ref{eq: initial_dyn_var}), (\ref{eq: A2}) and (\ref{eq: A3}), the frequency relaxation parameter~$\Delta_{T,\;2}^2(k)$ is
\begin{equation}
\label{eq: Delta1_micro}
\Delta_{T,\;2}^2(k) = \left ( \frac{k_B T}{m} \right )^2 k^2 + \frac{\rho}{m} \int \left [ 1 - \cos(kz) \right ] \frac{\partial^2 u(r) }{\partial x^2} g(r)\; d^3 \mathbf{r},
\end{equation}
where $\rho$ is the quantitative particle density and $g(r)$ is the radial distribution function of particles in the system. We can also obtain microscopic expressions for the other frequency relaxation parameters $\Delta_{T,\;3}^2(k)$, $\Delta_{T,\;4}^2(k)$, $\ldots$~\cite{Balucani2003}. These microscopic expressions are usually not used for direct numerical calculations, because they contain multiparticle distribution functions and the well-known problem of decoupling an equation chain for the particle distribution functions must be solved for corresponding computations~\cite{Bogolyubov_book}. We note that these frequency relaxation parameters can also be computed based on basic definition~(\ref{eq: freq_parameters}) with configuration data (trajectories and particle velocities) obtained, for example, from molecular dynamic modeling (see the appendix in~\cite{Mokshin_JPCM2018}). The following analysis of the frequency relaxation parameters values allows defining such physical characteristic of the system as the sound propagation velocity, the sound damping coefficient, the mean particle velocity, etc.~\cite{Mokshin_JPCM2018}.
\subsection{The function $C_T(k,t)$ in the hydrodynamic limit}
In the case of transverse collective dynamics in a liquid, solutions are generally known in only two limit cases: in the hydrodynamic limit ($k \to 0$) and in the free-moving particle limit (large wave numbers $k$).
In the hydrodynamic limit, the time evolution of the transverse current $j_k^{(x)}$ is given by
\begin{equation}
\label{eq: hydro1}
\frac{\partial }{\partial t} j_k^{(x)}(t) = - \nu k^2 j_k^{(x)}(t),
\end{equation}
where $\nu$ is kinematic shear viscosity. The solution of this equation has the form
\begin{eqnarray}
\label{eq: hydro_sol}
j_k^{(x)}(t) = j_k^{(x)}(0)\; \exp{(- \nu k^2 t)}.
\end{eqnarray}
Multiplying~(\ref{eq: hydro1}) by the complex conjugate quantity
\[
j_{-k}^{(x)}(0)\frac{1}{\left \langle \left |j_{k}^{(x)}(0) \right | ^2 \right \rangle}
\]
and averaging over the ensemble, we obtain an equation for the TCF $C_T(k, t)$
\begin{equation}
\label{eq: hydro2}
\frac{\partial }{\partial t}C_T(k,t) = - \nu k^2 C_T(k,t).
\end{equation}
The solution of~(\ref{eq: hydro2}) has the form
\begin{eqnarray}\label{62}
C_T(k,t) = \exp{(-\nu k^2t)}.
\end{eqnarray}
Acting on~(\ref{62}) with the Fourier transform operator
\[
FT\{f\}(\omega) = f(\omega) = \frac{1}{2\pi} \int_{-\infty}^{\infty} \exp(i\omega t) f(t)\, dt,
\]
we obtain an expression for spectral density of the TCF of the transverse current:
\begin{equation}
\label{eq: hydro3}
{C}_T(k, \omega) = \frac{1}{\pi} \frac{\nu k^2}{\omega^2 + \left (\nu k^2 \right )^2}.
\end{equation}
Therefore, in the hydrodynamic limit, the TCF $C_T(k,t)$ is characterized by an exponentially decaying time-dependence with the relaxation time $\tau=1/(\nu k^2)$ and a Gaussian dependence on $k$. The absence of high-frequency components in the spectrum ${C}_T(k, \omega)$ defined by~(\ref{eq: hydro3}) indicates the absence of transverse acoustic waves in the hydrodynamic mode.
\subsection{The function $C_T(k,t)$ in the short-wave limit \label{sec: shortwavelengths}}
We consider the short-wave limit, where the particle dynamics occurs on spatial scales comparable to the mean free path. In this case, the time and spatial scales are so small that particles in fact demonstrate free motion. In the case of free motion of an arbitrary $i$th particle, its velocity is constant:
\[
v_{i}^{(x)}(t) = v_{i}^{(x)}.
\]
For the TCF of the transverse current, we have~\cite{Hansen/McDonald}
\begin{eqnarray}
\label{eq: free_part_limit}
C_T(k,t) &=& \frac{m}{k_B T} \frac{1}{N} \sum_{i,j=1}^{N} \; \left ( v_{i}^{(x)} \right )^2 \; \exp \left ( -i \textbf{k} \cdot \left [ \textbf{r}_j(t) - \textbf{r}_i(0) \right ] \right ) \nonumber\\
&=& \exp{\left (- \frac{k_BT}{2m} \; k^2t^2 \right ) }.
\end{eqnarray}
For the spectral density ${C}_T(k,\omega)$, we find
\begin{eqnarray}
\label{eq: spectral_density_CT}
{C}_T(k,\omega) &=& \sqrt{ \frac{m}{2\pi \; k_BT \; k^2} }\; \exp{\left ( - \frac{m\; \omega^2}{2k_BTk^2} \right ) } \nonumber\\
&=& \sqrt{\frac{1}{2\pi}} \frac{1}{\bar{v}_x k} \; \exp{\left ( - \frac{\omega^2}{2 \bar{v}_x^2 k^2} \right )} .
\end{eqnarray}
Similarly to~(\ref{eq: hydro3}), relation~(\ref{eq: spectral_density_CT}) defines a spectrum with no high-frequency components.
\subsection{Transverse current in a range of wave numbers}
From the Liouville equations of motion for the dynamical variables $A_1^T(k)$, $A_2^T(k)$, $A_3^T(k)$ and $A_4^T(k)$ [see expressions (\ref{eq: initial_dyn_var}), (\ref{eq: A2}) and (\ref{eq: A3})] we can obtain exactly two interrelated kinetic integro-differential equations containing the TCFs $C_T(k,t)$, $M_2^T(k,t)$, $M_3^T(k,t)$ and $M_4^T(k,t)$ of these variables~\cite{Mokshin2015,Lee2000,Zwanzig2001}:
\begin{subequations}\label{15xy}
\begin{equation}
\frac{\partial^2}{\partial t^2} C_T(k,t) + \Delta_{T,\;2}^2(k)C_T(k,t) + \Delta_{T,\;3}^2(k)\int_{0}^{t} M_3^T(k,t-\tau ) \frac{\partial}{\partial \tau '} C_T(k,{\tau }') d\tau = 0, \label{15x}
\end{equation}
\begin{equation}
\frac{\partial^2}{\partial t^2} M_2^T(k,t) + \Delta_{T,\;3}^3(k)M_2^T(k,t) + \Delta_{T,\;4}^2(k)\int_{0}^{t} M_4^T(k,t-\tau ) \frac{\partial}{\partial \tau '} M_2^T(k,{\tau }') d\tau = 0. \label{15y}
\end{equation}
\end{subequations}
Applying the Laplace transformation
\begin{equation} \label{eq: time_scale_invariance}
LT\{f\}(s) = \tilde{f}(s) = \int_0^{\infty} \exp(-st) f(t) dt, \ \ \ s=i\omega,
\end{equation}
to Eqs. (\ref{15xy}) and expressing the Laplace image of the transverse current TCF $\widetilde{C}_T(k,s)$, we find
\begin{eqnarray}\label{eq_CT_rec2}
\widetilde{C}_T(k,s) =\cfrac{1}{s + \cfrac{\Delta_{T,\;2}^2(k)}{s + \cfrac{\Delta_{T,\;3}^2(k)}{s + \Delta_{T,\;4}^2(k) \widetilde{M}_4^T(k,s)}}} =\cfrac{1}{s + \cfrac{\Delta_{T,\;2}^2(k)}{s + \cfrac{\Delta_{T,\;3}^2(k)}{s + \cfrac{\Delta_{T,\;4}^2(k)}{s + \ddots }}}}.
\end{eqnarray}
The quantity $\widetilde{C}_T(k,s)$ is related to the spectral density $C_T(k,\omega)$ by
\begin{equation} \label{030}
C_T(k,\omega)=\frac{1}{\pi}\; \mathrm{Re} \left[\widetilde{C}_T(k,s = i\omega)\right].
\end{equation}
The key idea of a self-consistent relaxation theory of equilibrium liquids is that the description of the equilibrium dynamics in the whole range of wave numbers $k$ is realized using a dynamical variable set $\textbf{A}(k)$ related to the variables in the hydrodynamic theory~\cite{Mokshin_JPCM2018}. Namely, the dynamical variable set $\textbf{A}(k)$ either corresponds exactly to the hydrodynamic quantity or contains the hydrodynamic quantity in its expression (see, e.g., the discussion in Sec.~\ref{sec: Dyn_var})). In the case of describing transverse collective dynamics, the variables in the corresponding hydrodynamic equations are related to the dynamical variables $A_1^T(k)$ and $A_2^T(k)$.
In the hydrodynamic limit $k \to 0$, variables such as current and energy vary slowly with large relaxation times~\cite{Gotze2009}. This allows excluding other variables from consideration using a simple Markov approximation in the kinetic equations~\cite{Resibua/Lener}. In accordance with the self-consistent relaxation theory, typical relaxation times of processes related to the hydrodynamic variables and other variables also differ, and this difference can be significant. But the description is reduced not by neglecting ``nonhydrodynamic'' variables but by assuming the their characteristic time scales are comparable:
\begin{eqnarray}\label{34}
1/\sqrt{\Delta_{T,\;l}^2(k)} = 1/\sqrt{\Delta_{T,\;l+1}^2(k)} = 1/\sqrt{\Delta_{T,\;l+2}^2(k)}, \ \ \ l \in \mathbb{N}^*.
\end{eqnarray}
In case of transverse collective particle dynamics with the extended variable set containing the energy current $A_3^T(k)$ in addition to $A_1^T(k)$ and $A_2^T(k)$, we have $l=4$. We note that a completely \textit{equivalent} variable set (the density $A_0(k)$, longitudinal current $A_1(k)$, energy $A_2(k)$, and energy current $A_3(k)$ is realized in describing longitudinal collective particle dynamics in equilibrium liquids~\cite{Mokshin_JPCM2018}.
From~(\ref{eq_CT_rec2}) with (\ref{eq: time_scale_invariance}) taken into account, we obtain expressions for the Laplace images of the TCFs:
\begin{subequations} \label{eq: CT_k_omega}
\begin{eqnarray}\label{36}
\widetilde{M}_{3}^T(k,s) = \frac{-s \pm \sqrt{ s^2 + 4\Delta_{T,\;4}^2(k) }}{2\Delta_{T,\;4}^2(k)},
\end{eqnarray}
\begin{equation}
\widetilde{M}_{2}^T(k,s) = \frac{2\Delta_{T,\;4}^2(k)}{s[2\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)] \pm \Delta_{T,\;3}^2(k)\sqrt{s^2 + 4\Delta_{T,\;4}^2(k)}},
\end{equation}
and
\begin{eqnarray} \label{eq: spectr_CT}
\widetilde{C}_{T}(k,s) &=& \widetilde{M}_{1}^T(k,s) =\\
&=& \frac{s[2\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)] \pm \Delta_{T,\;3}^2(k)\sqrt{s^2 + 4\Delta_{T,\;4}^2(k)}}{2\Delta_{T,\;2}^2(k)\Delta_{T,\;4}^2(k) + s^2 [2\Delta_{T,\;4}^2(k) - \Delta_{T,\;3}^2(k)] \pm s \Delta_{T,\;3}^2(k)\sqrt{s^2+4\Delta_{T,\;4}^2(k)}}. \nonumber
\end{eqnarray}
\end{subequations}
From~(\ref{eq: spectr_CT}) and (\ref{030}), we then directly obtain an expression for the spectral density of the transverse particle current:
\begin{subequations}
\begin{eqnarray} \label{eq: CT_omega}
C_T(k,\omega) = \frac{1}{2\pi}\;
\frac{\Delta_{T,\;2}^2(k)\Delta_{T,\;3}^2(k)}{\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)}\;\frac{\pm \sqrt{4\Delta_{T,\;4}^2(k)-\omega^2}}{\omega^4 + \mathcal{A}_1^T(k)\omega^2 + \mathcal{A}_2^T(k)},
\end{eqnarray}
where
\begin{eqnarray}\label{eq_CT_theory_a}
\mathcal{A}_1^T(k) = \frac{\Delta_{T,\;3}^4(k)+\Delta_{T,\;2}^2(k)\Delta_{T,\;3}^2(k)-2\Delta_{T,\;2}^2(k)\Delta_{T,\;4}^2(k)}{\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)},
\end{eqnarray}
\begin{eqnarray}\label{eq_CT_theory_b}
\mathcal{A}_2^T(k) = \frac{\Delta_{T,\;2}^4(k)\Delta_{T,\;4}^2(k)}{\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)}.
\end{eqnarray}\label{eq_CT_theory}
\end{subequations}
\begin{figure}
\begin{center}
\includegraphics[height=8cm,angle=0]{fig_01_1.pdf} \vskip -0.8cm
\includegraphics[height=10cm,angle=0]{fig_01_2.pdf} \vskip -0.8cm
\caption{\textbf{Top:} Schematic illustrating the dispersion law of similar transverse acoustic oscillations $\omega_c^{(T)}(k)$ and the static structure factor $S(k)$ of some equilibrium liquid. \textbf{Bottom:} Schematic showing the form of the spectrum of the transverse current $C_{T}(k,\omega)$ for the domain of intermediate values of the wave number $k$, for transition regime, and for the domain of generalized hydrodynamics (the small-$k$ limit).}
\label{Fig_01}
\end{center}
\end{figure}
As follows from~(\ref{eq_CT_theory}), the contour $C_T(k,\omega)$ of the frequency spectrum is determined by the frequency parameters $\Delta_{T,\;2}^2(k)$, $\Delta_{T,\;3}^2(k)$ and $\Delta_{T,\;4}^2(k)$ and is consequently determined by the structural features of the system and the interparticle interaction and also depends on the thermodynamic state of the system.
We can distinguish characteristic regimes in the transverse collective particle dynamics of an equilibrium liquid, which are conveniently considered in correspondence with the dispersion law of similar transverse acoustic oscillations $\omega_c^{(T)}(k)$ and with a static structure factor $S(k)$ (see Fig.~\ref{Fig_01} (top)). We have the following c regimes as the wave number increases on the $k$ scale: the hydrodynamic regime ($k \to 0$), generalized hydrodynamics, the transition regime, the domain of intermediate values of $k$, and the short-wave limit (not shown in Fig.~\ref{Fig_01}).
\vskip 0.5cm
\textbf{Short-wave limit.} The particle dynamics in the short-wave limit is characterized by a single parameter, the mean particle velocity $\bar{v}_x$. The frequency relaxation parameters are related by the recurrence relation
\begin{equation} \label{eq: recurr}
\Delta_{T,\;l+2}^2(k) = (l+1)\; \Delta_{T,\;2}^2(k), \ \ \ l=1,\;2,\; \ldots,
\end{equation}
where the equality
\[
\Delta_{T,\;2}^2(k) = (k \bar{v}_x)^2
\]
follows from (\ref{eq: Delta1_micro}) if we neglect the interparticle interaction. In this case, expression (\ref{eq_CT_theory}) for the spectral density $C_T(k,\omega)$ with~(\ref{eq: recurr}) taken into account becomes
\begin{equation}
C_T(k,\omega) = \sqrt{ \frac{1}{2\pi \; \Delta_{T,\;2}^2(k)} }\; \exp{\left ( - \frac{\omega^2}{2 \Delta_{T,\;2}^2(k)} \right )},
\end{equation}
which corresponds exactly to the correct model result~(\ref{eq: spectral_density_CT}).
\vskip 0.5cm
\textbf{Domain of intermediate values of \textit{k}.} The domain of intermediate values of $k$ is realized for wave numbers corresponding to spatial scales comparable to the effective action scale of the interaction potential between particles. This wave-number domain is shown in dark gray in Fig.~\ref{Fig_01} (top). At these spatial scales, shear stiffness appears in a liquid, and quasi-solid-state collective dynamics supporting transverse oscillatory processes are realized. In this regime, the spectral density $C_T(k,\omega)$ is a high-frequency doublet: two expressed symmetric maximums located at the frequencies $\pm \; \omega_c^{(T)}$ and a minimum at the frequency zero ($\omega = 0$) (Fig.~\ref{Fig_01} (bottom)). Moreover, the dispersion $\omega_c^{(T)} = \omega_c^{(T)}(k)$ of transverse collective excitations in an equilibrium high-density liquid near the melting point must be extrapolated to the domain of small wave numbers in the form of the usual linear relation
\begin{equation}
\omega_c^{(T)}(k) = v^{(T)} k,
\end{equation}
where $v^{(T)}$ is propagation velocity of transverse sound waves.
The frequency relaxation parameter $\Delta_{T,\;4}^2(k)$ characterizes the minimum time scale $\tau_{T,\;4}(k) = 1/\sqrt{\Delta_{T,\;4}^2(k)}$ at which the transverse collective particle dynamics is realized. Consequently, for the frequency domain in which we are interested, we can write
\begin{equation}
\label{eq: cond1}
\omega^2 \ll \Delta_{T,\;4}^2(k).
\end{equation}
Expression (\ref{eq_CT_theory}) then becomes
\begin{equation} \label{eq: CT_mediate_k}
C_T(k,\omega) = \frac{1}{\pi}\;
\frac{\Delta_{T,\;2}^2(k)\Delta_{T,\;3}^2(k) \sqrt{\Delta_{T,\;4}^2(k)}}{\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)}\;\frac{1}{\omega^4 + \mathcal{A}_1^T(k)\omega^2 + \mathcal{A}_2^T(k)},
\end{equation}
where the coefficients $\mathcal{A}_1^T(k)$ and $\mathcal{A}_2^T(k)$ are defined by (\ref{eq_CT_theory_a}) and (\ref{eq_CT_theory_b}).
We note several important properties of expression~(\ref{eq: CT_mediate_k}).
First, because the spectral density can take
only nonnegative values, $C_T(k,\omega) \geq 0$, the relation between the frequency parameters $\Delta_{T,\;3}^2(k)$ and $\Delta_{T,\;4}^2(k)$
\begin{equation}
\label{eq: cond0}
\Delta_{T,\;4}^2(k) \geq \Delta_{T,\;3}^2(k),
\end{equation}
must be satisfied, which completely agrees with condition~(\ref{eq: cond1}) for the minimum time scale.
Second, for a fixed $k$, the form of the spectrum $C_T(k,\omega)$ is defined by the biquadratic polynomial in the denominator in~(\ref{eq: CT_mediate_k}). Almost all features of the spectrum $C_T(k,\omega)$ can be rather easily determined in the framework of the usual mathematical analysis of~(\ref{eq: CT_mediate_k}).
Further, solving the problem of the existence of extremums, we obtain the dispersion law from~(\ref{eq: CT_mediate_k}):
\begin{subequations}
\begin{equation}
\label{eq_omegaT_1}
\omega_c^{(T)}(k)=\sqrt{-\frac{\mathcal{A}_{1}^T(k)}{2}}
\end{equation}
or
\begin{equation}
\label{eq_omegaT_2}
\omega_c^{(T)}(k) = \sqrt{\Delta_{T,\;2}^{2}(k) - \frac{ \Delta_{T,\;3}^{2}(k)[\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)]}{2[\Delta_{T,\;4}^{2}(k)-\Delta_{T,\;3}^{2}(k)]}}.
\end{equation}
\end{subequations}
As can be seen from (\ref{eq_omegaT_1}), the high-frequency doublet in the spectrum $C_T(k,\omega)$ appears under the condition $\mathcal{A}_{1}^T(k)<0$ [see Fig.~\ref{Fig_01}], which is similar to the existence condition for high-frequency excitations in accordance with the viscoelastisity model (see p.~268 in~\cite{Hansen/McDonald}):
\begin{equation} \label{eq: disp_viscoelastic}
\omega_c^{(T)}(k) = \sqrt{\Delta_{T,\;2}^2(k) - \frac{1}{2\tau_{t}^2(k)}}
\end{equation}
with the relaxation time $\tau_t(k)$. Comparing (\ref{eq_omegaT_2}) and (\ref{eq: disp_viscoelastic}), we find the definition of the relaxation time in the framework of the self-consistent relaxation theory with expression (\ref{eq: CT_mediate_k}):
\begin{equation}
\tau_t^2(k) = \frac{\Delta_{T,\;3}^{2}(k)[\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)]}{\Delta_{T,\;4}^{2}(k)-\Delta_{T,\;3}^{2}(k)}.
\end{equation}
It is important that the quantity $\tau_t^2(k)$ remains undefined in the viscoelasticity model. An interesting consequence of the obtained expression~(\ref{eq_omegaT_1}) for the dispersion law that the dispersion of transverse collective excitations is determined by the interaction potential $u(r)$, between particles and also by two-, three-, and four-particle correlations. This conclusion follows directly from the microscopic expressions for the frequency relaxation parameters in (\ref{eq_omegaT_1}).
Finally, expression~(\ref{eq: CT_mediate_k}) allows estimating the values of physical quantities characterizing the propagation of shear oscillations in a liquid: the propagation velocity $v^{(T)}$ and the damping coefficient $\Gamma^{(T)}$ of transverse sound oscillations. Hence, for the velocity $v^{(T)}$, from dispersion relation~(\ref{eq_omegaT_2}), we obtain
\begin{subequations}
\begin{equation}
\label{eq: v_T_1}
v^{(T)} k = \lim_{k \to 0} \sqrt{\Delta_{T,\;2}^{2}(k) - \frac{ \Delta_{T,\;3}^{2}(k)[\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)]}{2[\Delta_{T,\;4}^{2}(k)-\Delta_{T,\;3}^{2}(k)]}}
\end{equation}
or
\begin{equation}
\label{eq: v_T_2}
v^{(T)} k = \lim_{k \to 0} \sqrt{\frac{2\Delta_{T,\;2}^2(k) \Delta_{T,\;4}^2(k)}{2\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)}}.
\end{equation}
\end{subequations}
Expression~(\ref{eq: v_T_2}) is obtained as a result of solving the dispersion equation solution according to the approximation scheme proposed by Mountain in~\cite{Mountain_1966} (also see \cite{Mokshin_JPCM2018}). Expressions~(\ref{eq: v_T_1}) and (\ref{eq: v_T_2}) must give close values for $v^{(T)}$. For the damping coefficient of transverse sound, we obtain
\begin{eqnarray}
\label{eq: Gamma_T}
\Gamma^{(T)} k^2 = \lim_{k \to 0} \; \frac{\Delta_{T,\;3}^2(k)\sqrt{\Delta_{T,\;4}^2(k)}}{2\Delta_{T,\;4}^2(k)-\Delta_{T,\;3}^2(k)}.
\end{eqnarray}
Therefore, we can respectively compute the values of $v^{(T)}$ and $\Gamma^{(T)}$ from~(\ref{eq: v_T_1}) or (\ref{eq: v_T_2}) and~(\ref{eq: Gamma_T}). For these computations, we must use values of the frequency parameters corresponding to wave numbers in the domain of intermediate values of $k$, where we have quasi-solid-state properties of the liquid. We note that~(\ref{eq: Gamma_T}) is also interesting because direct experimental measurements of $\Gamma^{(T)}$ are rather complicated.
\vskip 0.5 cm
\textbf{Transition regime}. Expression (\ref{eq: CT_mediate_k}) for the spectral density $C_{T}(k,\omega)$ with a dispersion law $\omega_c^{(T)}(k)$ of form ~(\ref{eq_omegaT_1}) indicates the existence of regime in the transverse collective particle dynamics, where we have a transition from quasi-solid-state dynamics, discussed above, to the dynamics of an ordinary equilibrium liquid. In Fig~\ref{Fig_01} (top), the wave number domain corresponding to this regime is shown in gray. Here, the high-frequency doublet in the spectrum $C_{T}(k,\omega)$ is transformed into a single broadened spectral component with the form of smoothed trapezoid centered on the frequency $\omega = 0$ (see Fig.~\ref{Fig_01} (bottom)). The tangents to the dispersion curve $\omega_c^{(T)}(k)$ for the corresponding wave numbers are extrapolated to finite values $k$ as $\omega_c^{(T)} \to 0$ (see Fig.~\ref{Fig_01} (top)).
The existence of this regime is quite understandable because the transition to quasi-solid-state dynamics occurs in some domain of spatial scales and consequently in some wave number domain. An analysis of expression (\ref{eq: CT_mediate_k}) for $C_{T}(k,\omega)$ shows that such a transition is realized for the correspondence between frequency relaxation parameters
\begin{eqnarray}\label{eq_main_conditions}
\Delta_{T,\;3}^{2}(k)&=&3\Delta_{T,\;2}^{2}(k), \\
\Delta_{T,\;4}^{2}(k)&=&2\Delta_{T,\;3}^{2}(k) = 6\Delta_{T,\;2}^{2}(k). \nonumber
\end{eqnarray}
In this case, for the coefficients $\mathcal{A}_1^T(k)$ and $\mathcal{A}_2^T(k)$ in~(\ref{eq: CT_mediate_k}), we obtain
\begin{subequations}
\begin{equation} \label{eq_CT_theory_trans_a}
\mathcal{A}_1^T(k) = 0,
\end{equation}
\begin{equation} \label{eq_CT_theory_trans_aa}
\mathcal{A}_2^T(k) = 2\Delta_{T,\;2}^4(k),
\end{equation}
\end{subequations}
and expression~(\ref{eq: CT_mediate_k}) becomes
\begin{eqnarray}\label{eq_CT_theory_trans}
C_T(k,\omega) = \frac{1}{\pi} \;
\frac{\Delta_{T,\;2}^2(k)\sqrt{6\Delta_{T,\;2}^2(k)}}{\omega^4 + 2\Delta_{T,\;2}^4(k)}.
\end{eqnarray}
In fact, correspondence law~(\ref{eq_main_conditions}) for the frequency relaxation parameters is equivalent to relation~(\ref{eq_CT_theory_trans_a}) and represents existence condition for this transition mode.
In turn, as can be seen from~(\ref{eq_CT_theory_trans}), transverse collective dynamics is determined by only the frequency relaxation parameter ~$\Delta_{T,\;2}^2(k)$ and consequently by the interaction potential $u(r)$ between particles, the particle radial distribution function $g(r)$, and the mean particle velocity $\bar{v}_x$. This regime is related to the transition from the collective dynamics description in terms of microscopic characteristics to the description where hydrodynamics parameters such as the generalized viscosity $\nu(k)$ and the thermal conductivity $D_T(k)$ can be used.
\vskip 0.5 cm
\textbf{Generalized hydrodynamics regime}. The generalized hydrodynamics regime corresponds to small wave numbers and passes into the usual hydrodynamic regime in the limit $k \to 0$. Here, we have typical liquid collective dynamics, and transverse acoustic waves are absent, i.e., $\omega_c^{(T)}=0$. In Fig.~\ref{Fig_01} (top), the wave number domain corresponding to this regime is shown in light gray. Here, as in the case of the hydrodynamic regime, the spectrum $C_T(k,\omega)$ has only a single component at the frequency zero and is reproduced by a Lorentz function (see expression~(\ref{eq: hydro3}) and Fig.~\ref{Fig_01} (bottom)). The width of this spectral component is determined by the generalized shear viscosity $\nu(k)$, whose values depend on the wave number $k$. In passing to the hydrodynamic limit $k \to 0$, $\nu(k)$ is extrapolated to the hydrodynamic kinematic shear viscosity,
\[
\nu = \lim_{k \to 0} \; \nu(k).
\]
In this regime, the transverse collective particle dynamics is described by the hydrodynamic variables $A_1^T(k)$ and $A_2^T(k)$. Consequently, the equalization of the time scales given by relation~(\ref{34}) occurs for $l=3$:
\begin{eqnarray}\label{eq: delta3_4}
1/\sqrt{\Delta_{T,\;3}^2(k)} = 1/\sqrt{\Delta_{T,\;4}^2(k)} = 1/\sqrt{\Delta_{T,\;5}^2(k)} = \ldots,
\end{eqnarray}
and this time scale equality naturally realizes the transition from the extended variable set $A_1^T(k)$, $A_2^T(k)$ and $A_3^T(k)$ to the usual hydrodynamic variables $A_1^T(k)$ and $A_2^T(k)$. Taking (\ref{eq: delta3_4}) into account, from (\ref{eq: CT_omega}), we obtain
\begin{subequations}
\begin{eqnarray}\label{eq_CT_theory_gp}
C_T(k,\omega) = \frac{1}{\pi}\;
\frac{\Delta_{T,\;2}^2(k)\sqrt{\Delta_{T,\;3}^2(k)}}{\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)} \; \frac{1}{\omega^2 + \mathcal{A}_2^T(k)},
\end{eqnarray}
where
\begin{equation}
\mathcal{A}_2^T(k)=\frac{\Delta_{T,\;2}^4(k)}{\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)}.
\end{equation}
\end{subequations}
Expression~(\ref{eq_CT_theory_gp}) is characterized by the following properties. First, this expression determines the spectral density~$C_T(k,\omega)$ in the frequency domain
\begin{equation}
\label{eq: cond2}
\omega^2 \ll \Delta_{T,\;3}^2(k),
\end{equation}
where $\tau_{T,\;3}(k)=1/\sqrt{\Delta_{T,\;3}^2(k)}$ is the minimum time scale in the collective particle dynamics for wave numbers corresponding to the generalized hydrodynamics.
Second, expression~(\ref{eq_CT_theory_gp}) yields the correspondence between the frequency parameters
\begin{equation}
\Delta_{T,\;3}^2(k) \geq \Delta_{T,\;2}^2(k),
\end{equation}
which is analogous to relation~(\ref{eq: cond0}) and which just like condition~(\ref{eq: cond2}) reflects the fact that the existence of oscillatory processes related to transverse collective particle dynamics in the generalized hydrodynamic regime are characterized by frequencies not exceeding $\sqrt{\Delta_{T,\;3}^2(k)}$.
Third, expression~(\ref{eq_CT_theory_gp}) corresponds to the known hydrodynamic expression~(\ref{eq: hydro3}) for the spectral density $C_T(k,\omega)$ of the of transverse current, and coefficient $\mathcal{A}_2^T(k)$ is related to the generalized shear viscosity $\nu(k)$:
\begin{equation} \label{eq: shear_visc}
\nu(k) = \frac{1}{k^2}\sqrt{\mathcal{A}_2^T(k)} = \frac{1}{k^2} \frac{\Delta_{T,\;2}^2(k)}{\sqrt{\Delta_{T,\;3}^2(k)-\Delta_{T,\;2}^2(k)}}.
\end{equation}
Fourth, expression~(\ref{eq_CT_theory_gp}) becomes identical to hydrodynamic expression~(\ref{eq: hydro3}) under the relation between
the frequency parameters
\begin{equation}
\Delta_{T,\;3}^2(k) \gg \Delta_{T,\;2}^2(k),
\end{equation}
which is equivalent to the assumption that the time scales are separated and to the Markov approximation, which are used in hydrodynamic theory~\cite{Hansen/McDonald} and lead to Eq.~(\ref{eq: hydro2}) and expression~(\ref{eq: hydro3}) for $C_T(k,\omega)$.
\section{Transverse collective dynamics of liquid lithium near the melting point \label{sec: comparison}}
A self-consistent relaxation theory of longitudinal collective particle dynamics in simple liquids was presented in~\cite{Mokshin_JPCM2018}. As an example, the theoretically calculated spectra of the dynamic structure factor $S(k,\omega)$ and the dispersion law $\omega_c^{(L)}(k)$ of longitudinal sound waves were compared with experimental data on inelastic x-ray scattering in liquid lithium at the temperature $T=475$\;K (the melting temperature is $T_m=453.65$~K)~\cite{Scopigno2000}. Moreover, in the framework of the theory, the sound propagation velocity $v^{(L)}=6000 \pm 1200$~m/s, sound damping coefficient $\Gamma^{(L)}= 18.4 \pm 3.5$~nm$^2$/ps and thermal conductivity $D_T = 21.5 \pm 3.5$~nm$^2$/ps were computed. Here, we also quantitatively compute various characteristics of the transverse collective dynamics for liquid lithium at $T=475$\;K and the number density of atoms $\rho=0.0\,445$~$\textrm{\AA}^{-3}$. We compare the theoretical results with the results of the equilibrium atomic dynamics simulations in an $NVT$ ($N$ is the number of particles, $V$ is the volume, $T$ is the temperature)-ensemble~\cite{Murtazayev1999}.
The modeling details are analogous to those presented in~\cite{Mokshin_JPCM2018,Khusnutdinoff2018}. We performed the simulation calculations for a system of $N=16\,000$ atoms enclosed in cubic box with periodic boundary conditions. The interaction between lithium atoms was given by a spherical pseudopotential~\cite{Gonzalez1993}. As we previously showed \cite{Khusnutdinoff2018}, this model of the potential agrees best with experimental data on elastic and inelastic x-ray scattering compared with known multiparticle potentials of the EAM (embedded atom model) type. The equations of motion were integrated according to the velocity Verlet algorithm with the time step $\tau '=0.01$~ps \cite{Mokshin2012}. To bring the system to the thermodynamic equilibrium and to calculate the spectral characteristics, we respectively performed $200\;000$ and $100\;000$ time steps.
\begin{figure*}
\begin{center}
\includegraphics[height=10.0cm, angle=0]{fig_02.pdf}
\caption{Frequency relaxation parameter $\Delta_{T,\;2}^2(k)$, $\Delta_{T,\;3}^2(k)$, $\Delta_{T,\;4}^2(k)$ and $\Delta_{T,\;5}^2(k)$ of the transverse collective atom dynamics in equilibrium melted lithium at the temperature $T=475$\;K: the results were obtained based on configurational data for the atomic dynamics simulated. Vertical closed intervals denote the confidence intervals obtained as a result of numerical calculations with the configurational data at different instants. The dashed line is the experimental static structure factor $S(k)$ lithium at the given temperature~\cite{Waseda}.}
\label{Fig_02}
\end{center}
\end{figure*}
\begin{figure*}
\begin{center}
\includegraphics[height=11cm, angle=0]{fig_03.pdf}
\caption{\textbf{Top}: Dispersion law of transverse oscillatory dynamics of atoms of equilibrium melted lithium
at the temperature $T=475$~K: circles ($\circ ~\circ ~\circ$) denote data from atomic dynamics simulations data; squares joined by a solid line are the results of theoretical calculations with Eq. (\ref{eq_omegaT_2}); the straight line (T) (T) in the small wave number range is the extrapolated hydrodynamic result $\omega_c^{(T)}(k)=v^{(T)}k$, where $v^{(T)}=2\,390$~m/s is the transverse speed of sound.
\textbf{Bottom}: An enlarged fragment of Fig.~\ref{Fig_02} showing the frequency relaxation parameters $\Delta_{T,\;2}^2(k)$, $\Delta_{T,\;3}^2(k)$, $\Delta_{T,\;4}^2(k)$ and $\Delta_{T,\;5}^2(k)$ in the range of small finite
wave numbers: vertical dashed lines separate different regimes of the oscillatory dynamics.}
\label{Fig_03}
\end{center}
\end{figure*}
Based on the configurational data representing an array data structure of atom coordinates and velocities at an arbitrary fixed instant, we calculated frequency moments and also frequency relaxation parameters $\Delta_{T,\;n}^{2}(k)$, $n=2$, $3$, $4$ and $5$, in a wide range of wave numbers $k \in [0.072,\; 6.481]$~\AA$^{-1}$ [see expressions~(\ref{eq: freq_parameters}) and (\ref{eq: Delta_vs_moments})]. We note that basic definition~(\ref{eq: freq_parameters}) and microscopic expression~(\ref{eq: Delta1_micro}) for the frequency parameter $\Delta_{T,\;2}^2(k)$ give identical results. As can be seen from Fig.~\ref{Fig_02}, the calculated frequency parameters have a similar monotonic dependence on $k$ in the wave number range $k>0.25$~\AA$^{-1}$. Just as expected, the typical time scales $\tau_{T,\;n}(k) = 1/\sqrt{\Delta_{T,\;n}^2(k)}$ shorten as $k$ increases. The minimum values are taken by $\tau_{T,\;4}(k) = 1/\sqrt{\Delta_{T,\;4}^2(k)}$ and $\tau_{T,\;5}(k) = 1/\sqrt{\Delta_{T,\;5}^2(k)}$, determining time scales less than $0.01$\;ps. Such time scales are even shorter than the step $\tau'$ for integrating the atomic equation of motion in the simulation calculations. The time $\tau_{T,\;4}(k)$ can therefore indeed be regarded as a threshold quantity in the hierarchy of time scales for the relaxation process~\cite{Bogolyubov_book}. In the wave number range $k \leq 3.5$~\AA$^{-1}$, the frequency parameters $\Delta_{T,\;4}^2(k)$ and $\Delta_{T,\;5}^2(k)$ take comparable values and show a difference only as $k$ increases further, approaching correspondence (\ref{eq: recurr}) characteristic of the free-moving particle regime.
\begin{figure*}
\begin{center}
\includegraphics[width=14cm, angle=0]{fig_04.pdf}
\caption{Spectra ${C}_T(k,\omega)$ of transverse current of melted lithium at the temperature $T=475$~K for
different wave numbers: circles ($\circ ~\circ ~\circ$) are denote the atomic dynamics simulations data; the solid line is the
theoretical results with general expression~(\ref{eq_CT_theory}); the dotted line shows theoretical results for different
regimes, Eq. (\ref{eq_CT_theory_gp}) for $k=0.18$~\AA$^{-1}$; Eq. (\ref{eq_CT_theory_trans}) for $k=0.27$~\AA$^{-1}$, and Eq. (\ref{eq: CT_mediate_k}) for $k=0.54$~\AA$^{-1}$, $0.81$~\AA$^{-1}$, $1.08$~\AA$^{-1}$ and $1.80$~\AA$^{-1}$.}
\label{Fig_04}
\end{center}
\end{figure*}
The obtained frequency relaxation parameter values allow calculating the dispersion relation $\omega_c^{(T)}(k)$ of the transverse oscillatory dynamics based on Eq. (\ref{eq_omegaT_2}). As can be seen from Fig.~\ref{Fig_03}, the theoretical expression for the dispersion relation completely reproduces the modeling results. Moreover, the typical regimes of collective oscillatory dynamics in melted lithium at the given temperature can be clearly seen in the plot of $\omega_c^{(T)}(k)$. The \textit{generalized hydrodynamics regime} corresponds to small $0.25$~\AA$^{-1} < k < 0.4$~\AA$^{-1}$, the \textit{transition regime} is realized on the interval $k \geq 0.4$~\AA$^{-1}$, and the \textit{domain of intermediate values} of $k$, where shear oscillatoty processes occur, is $k \geq 0.4$~\AA$^{-1}$.
In Fig.~\ref{Fig_04}, we compare the spectra $C_T(k,\omega)$ obtained based on the atomic dynamics simulations data and calculated according to general expression~(\ref{eq_CT_theory}). Here, we also give the theoretical spectra $C_T(k,\omega)$ calculated by formulas (\ref{eq_CT_theory_gp}), (\ref{eq_CT_theory_trans}) and (\ref{eq: CT_mediate_k}) or the corresponding typical collective atomic dynamics regimes of lithium. As can be seen from the figure, the theoretical and modeling results agree completely. The theory reproduces all features of the spectra $C_T(k,\omega)$ for different wave numbers, correctly reproducing the transition from dynamics the expressed high-frequency oscillation modes [see the spectra $C_T(k,\omega)$ in Fig.~\ref{Fig_04}] for wave numbers from $k=0.54$~\AA$^{-1}$ to $k=1.80$~\AA$^{-1}$] to the usual transverse collective dynamics for a liquid [see the spectrum $C_T(k,\omega)$ at $k=0.18$~\AA$^{-1}$ in Fig.~\ref{Fig_04}].
Based on Eqs.~(\ref{eq: v_T_2}) and (\ref{eq: Gamma_T}), we determined transverse speed of sound $v^{(T)} \simeq 2\,390$~m/s and the damping coefficient $\Gamma^{(T)} \simeq 17$~\AA$^2$/ps of the transverse sound mode. Numerical calculations with Eq.~(\ref{eq: shear_visc}) show that the generalized kinematic shear viscosity depends on $k$ as
\begin{equation}
\nu(k) = \frac{\nu}{1+ \alpha^2 k^2},
\end{equation}
where the coefficient $\alpha$ and kinematic shear viscosity $\nu$ take the values $\alpha=1.1$ and $\nu = 105 \pm 11$~\AA$^2$/ps. It is remarkable that the obtained viscosity value agrees well with the experimental value: $\nu_{exp} = 111$~\AA$^2$/ps~\cite{link_1}.
\section{Concluding commentary}
In conclusion, we note the following points.
The presented self-consistent relaxation theory of transverse collective particle dynamics in equilibrium liquids is a realization of Bogoliubov's idea about a reduced description of relaxation processes in liquids. This theory is completely consistent with the theoretical description of longitudinal collective dynamics in liquids, which was previously given in detail in~\cite{Mokshin2015,Mokshin_JPCM2018,Mokshin_JPCM2018/Corrigendum}. A similar consistent, albeit more simplified, description until now could only be realized in the framework of the viscoelasticity model~\cite{Copley/Lovesey}.
The theory yields the proper asymptotic behavior in both the short-wave limit, corresponding to free particle motion, and the long-wave hydrodynamic limit and allows calculating hydrodynamic characteristics. The key condition determing the correspondence between time scales of relaxation processes in liquids allows acounting for the presence of high-speed processes, which are usually ignored in hydrodynamic theory and some of its generalizations, in the framework of the presented theoretical description. The theory satisfies a complete set of so-called sum rules of the spectral density $C_T(k,\omega)$. It generalizes the known viscoelasticity model~\cite{Copley/Lovesey}, whose key parameters can be calculated in the framework of the presented theory (also see Sec. 3.1. in~\cite{Mokshin_JPCM2018}).
In this theory, we did not use any assumptions that some particular ``relaxation'' and ``oscillation'' regimes (or modes) form any features of the transverse collective particle dynamics, in turn determining some regions of the spectral density $C_T(k,\omega)$ of the transverse particle current. Therefore, it is totally unnecessary to separate or isolate any components of this spectral density for interpreting an experimentally measured or a numerically modeled spectral density.
|
Subsets and Splits